{"version":3,"file":"static/chunks/pages/_app-ec67d9ff33ac1186.js","mappings":"6GAyDA,iBAEA,cACA,WAEA,4BACA,MAIA,EAFA,kBACA,iBACA,6BACU,UACV,uBAEA,SAGA,oCAGA,8BAEA,cACA,EAEA,0CACA,aACA,WACA,mBAEA,CAFgC,GAEhC,WACA,2BACA,uBACA,qCACA,gBACA,CAEA,kBA0CA,OAxCA,sBACA,0BACA,EAEA,qBAIA,2CA3DA,EA4DA,iBA3DA,CADA,mCACA,gCA2DA,CA3DA,KAEA,aAyDA,CAzDA,OACA,2BAwDA,CAxDA,OAGA,2CACA,4BACA,GAoDA,CAEA,oCAEA,kBACA,MAtFA,YACA,WACA,eAMA,YAAkB,8BAAiC,IACnD,yCACA,gCA4EA,GAEA,IAGA,iCACA,CAAQ,SACR,CACA,EAAM,IACN,yCAGA,WACA,EAEA,mBACA,8BACA,MAEA,qDACA,CAAK,EACL,aACA,UACA,EAEA,CACA,CAAC,GCrIM,WAMI,EAAI,oBAMJ,EAAM,cAkCV,SAAS,EAAO,OACvB,MADuB,CACvB,cACA,CAOO,gBACP,mBACA,CAOO,SAAS,EAAM,KACtB,OADsB,EACtB,eACA,CAQO,SAAS,EAAM,OACtB,KADsB,EACtB,YACA,CAMO,SAAS,EAAM,GACtB,SADsB,MACtB,CAgBO,SAAS,EAAM,KACtB,kBACA,CCvGO,QACA,IACI,EAAM,EACV,IACA,IACA,IAHU,CAcV,0BACP,OAAS,qFACT,CAOO,SAAS,EAAI,KACpB,OADoB,EACN,kCAAiD,iBAAqB,GACpF,CAwBO,aAMP,OALA,IAAwB,EAAS,EAAM,SAEvC,GAF8B,CAE9B,QACA,UAEA,CACA,CAKO,aACP,OAAQ,EAAM,IACd,CAsBO,OAvBO,EAuBP,KACP,UAEA,sCACA,QAEA,0DAEA,0BACA,QAEA,SACA,QAEA,iCACA,QAEA,iBACA,QACA,CAEA,QACA,CAMO,cACP,aAA2B,EAAS,EAAM,YAAT,SAe1B,SApDA,IAqDP,MDtGA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OAZA,qBACA,2BAGA,WACA,KAEA,IAF0B,UAE1B,mBACA,gBAGA,gBACA,WACA,SACA,CACA,CAAG,MACD,OAAoC,YACtC,gBACA,OAGA,GAFA,KAEA,CACA,QACA,MACA,CAOA,GALA,iBAEM,QAAY,cAGlB,eAEA,iDACA,WACA,SACA,CAEA,mBACA,CAAG,aACH,IACA,CAAC,EAID,aAGA,0CAAsE,IAAa,IACnF,kBAGA,MAAS,OAAe,GACxB,CAWA,iBAGA,gCACA,sBACA,OACA,OACA,yBAAqC,aAA0B,EAC/D,OACA,oBACA,+CACA,CACA,CACA,iDErJA,IC4LA,ED5LA,GACA,0BACA,cACA,oBACA,mBACA,mBACA,UACA,eACA,kBACA,cACA,UACA,OACA,WACA,eACA,aACA,eACA,YACA,UACA,aACA,cACA,eACA,aACA,gBACA,iBACA,kBACA,YACA,gBACA,eACA,mBACA,aACA,aACA,UACA,QACA,UACA,QACA,UACA,SACA,SACA,OACA,kBAEA,cACA,eACA,cACA,kBACA,mBACA,mBACA,gBACA,aACA,aC3CA,eACA,gCAEA,cACA,2BACA,EAEA,cACA,mCACA,EAEA,EAAsC,OAAO,aAC7C,8CACA,CAAC,EAED,gBACA,UACA,gBACA,oBAEA,sBACA,mCAMA,OALA,GACA,OACA,SACA,MACA,EACA,CACA,CAAW,CAGX,QAEA,IAAM,CAAQ,qCAId,EAHA,MAIA,EAIA,kBACA,WACA,SAKA,YAFA,EAEA,iBAEA,OAJA,EAOA,iBACA,cAEA,QAGA,cAIA,OAFA,EAEA,KAMA,OALA,GACA,KAJA,EAIA,KACA,OALA,EAKA,OACA,MACA,EAPA,EAQA,KAKA,sBACA,MAHA,EAGA,KAEA,cAGA,iBACA,GACA,YACA,gBACA,MACA,EACA,SAMA,OAFA,WAAmD,CAGnD,CAEA,OA2BA,gBACA,SAEA,oBACA,YAAoB,WAAgB,IACpC,iBAAyE,OAGzE,gBACA,WAEA,sBAGA,oBAFA,EAEA,CACA,OAA4B,IAH5B,EAG4B,GAA6B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,IClQW,GDsUS,uBApEE,OClQM,MDsUR,gBCtUQ,yCC8B5B,qCACA,0BACA,4BACA,WACA,cACA,SA6BA,MA5BA,oBACA,mCAEA,qBACA,qCAEA,4BAoBA,MAlBA,oBACA,oCACA,qCAGA,QACA,oCAGA,WACA,qCAIA,oCACA,2BACA,0CAEA,EACA,CAAK,EACL,CACA,CACA,cACA,UACA,gBACA,OACA,kBACA,CACA,uBACA,SACA,OACA,yBACA,CACA,mBACA,SACA,OACA,oBACA,CACA,8BACA,UACA,OACA,qBACA,yBACA,CACA,wBACA,SACA,OACA,wBACA,CACA,mCACA,UACA,OACA,yBACA,yBACA,CACA,kBACA,SACA,OACA,mBACA,CACA,CACA,CAiCA,qBAGA,EADA,IADA,EAMA,CChJO,OACP,OACA,IACA,IACA,CACA,KACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,KACA,IACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,IACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,KACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,CACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,KACA,KACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,IACA,IACA,KACA,IACA,CACA,IACA,IACA,KACA,KACA,IACA,CACA,IACA,IACA,KACA,CACA,IACA,IACA,IACA,KACA,KACA,CACA,IACA,IACA,KACA,IACA,KACA,CACA,IACA,IACA,IACA,CACA,SACA,IACA,IACA,KACA,KACA,CACA,UACA,IACA,KACA,KACA,IACA,CACA,SACA,IACA,IACA,KACA,CACA,UACA,IACA,KACA,IACA,KACA,CACA,SACA,IACA,KACA,IACA,KACA,CACA,SACA,IACA,IACA,KACA,KACA,CACA,SACA,IACA,KACA,IACA,KACA,CACA,SACA,IACA,IACA,KACA,KACA,CACA,SACA,IACA,IACA,KACA,KACA,CACA,SACA,IACA,IACA,KACA,KACA,CACA,SACA,IACA,IACA,KACA,CACA,SACA,IACA,IACA,KACA,CACA,SACA,KACA,KACA,IACA,IACA,CACA,SACA,KACA,IACA,IACA,CACA,SACA,IACA,IACA,KACA,CACA,SACA,IACA,IACA,KACA,CACA,SACA,KACA,IACA,IACA,CACA,SACA,KACA,IACA,IACA,CACA,SACA,KACA,KACA,IACA,IACA,CACA,SACA,KACA,KACA,IACA,IACA,CACA,SACA,KACA,IACA,KACA,IACA,CACA,SACA,KACA,IACA,IACA,CACA,SACA,IACA,KACA,KACA,IACA,EEh4CA,wBAAwD,EAAqB,aAC7E,MAD6E,OAC7E,UAAqD,EAAqB,cAC1E,KAD0E,IAC1E,OACA,OAAa,cACb,CAGA,4DACA,yBACA,uBACA,iCACA,+BACA,6BAEA,EADA,qBAEA,qBACA,YACA,0BACA,aACA,mBACA,6BACA,EAEA,KACA,IACA,gBAAwB,YAAY,IAAI,eAAe,WAOvD,wDACA,CACA,SACA,IACA,CACA,QAEA,gBACA,wBACA,EAEA,gBACA,gCACA,EACA,IACA,qBAEA,WAEA,QAMA,EAPA,KACA,IAA6B,mBAAuB,IACpD,kBAMA,IARA,IAIA,KACA,WACA,IAEA,MAEA,GADA,WACA,QACA,iDACA,GACA,QACA,uBACA,wDACA,CACA,QACA,EACA,EAEA,EACA,mBAEA,YAEA,QADA,KACA,IAAkD,WAAuB,KACzE,wBACA,OACA,CACA,QACA,EACA,IAEA,cACA,uBACA,EAEA,cACA,IAKA,EALA,WACA,oBAGA,sBAEA,gBACA,SACA,SACA,6BACA,QACA,EACA,8BACA,EACA,IAEA,YACA,oBACA,EAEA,YACA,sBACA,EACA,IAEA,YACA,kBACA,EAEA,YACA,sBACA,EAEA,gBACA,sBACA,CAGA,MAEA,gBAA4C,YAAY,IAAI,eAAe,WAC3E,gBAGA,IAFA,EAGA,OAFA,cAEA,UADA,SACA,qBACA,CACA,MAGA,gBAEA,IADA,WACA,CACA,IA62BA,EA72BA,SACA,sBA62BA,CADA,EA52BA,IA62BA,WACA,QACA,cACA,QACA,QACA,QACA,QACA,QACA,QACA,cACA,cACA,cACA,cACA,QACA,QACA,QACA,QACA,QACA,SACA,SACA,SACA,SACA,SACA,gBACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,kBACA,kBACA,UACA,UACA,UACA,kBACA,UACA,UACA,UACA,kBACA,kBACA,UACA,UACA,kBACA,kBACA,UACA,UACA,UACA,kBACA,UACA,UACA,kBACA,kBACA,kBACA,kBACA,kBACA,UACA,kBACA,UACA,kBACA,UACA,kBACA,UACA,kBACA,kBACA,kBACA,UACA,UACA,UACA,kBACA,kBACA,kBACA,UACA,UACA,UACA,UACA,kBACA,kBACA,iBACA,UACA,UACA,kBACA,UACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,kBACA,UACA,kBACA,UACA,kBACA,kBACA,kBACA,UACA,mBACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,oBACA,oBACA,WACA,WACA,oBACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,oBACA,oBACA,oBACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,oBACA,WACA,WACA,WACA,WACA,oBACA,WACA,WACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,oBACA,WACA,oBACA,oBACA,WACA,WACA,WACA,WACA,oBACA,WACA,WACA,WACA,WACA,WACA,oBACA,WACA,oBACA,WACA,WACA,WACA,WACA,oBACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,oBACA,WACA,oBACA,oBACA,oBACA,WACA,WACA,WACA,oBACA,oBACA,WACA,oBACA,oBACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,oBACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,oBACA,WACA,WACA,WACA,WACA,mBAnmCA,MAEA,UACA,eACA,CACA,wBACA,EAEA,IAAI,EAAM,oBACV,OACA,aAAkC,MAClC,eACA,eAA0B,0BAC1B,6BACA,qBACA,iDACA,mDAsyBA,OApyBA,6BACA,qBACA,4CAEA,iCACA,EACA,yCAEA,IADA,SACA,gBACA,kBACA,WAAkC,KAClC,0BACA,SACA,SAEA,aACA,MACA,YAAuC,IACvC,WAEA,WACA,qCACA,2BACA,YACA,QACA,KAA0B,EAAI,MAC9B,kCACA,CAAiB,CACjB,MACA,WACA,gBACA,kBASA,WACA,iBACA,mBACA,yBACA,SACA,SAEA,aACA,KACA,CACA,6BACA,SACA,SAEA,aACA,MAvBA,CACA,MAIA,kBAAsC,EAAS,oEAH/C,KAKA,CAiBA,CACA,OAAiB,eACjB,EAmBA,mCACA,2BACA,YACA,CADqB,GACrB,sBAEA,GADA,iBACA,kBAEA,OACA,KACA,KAA0B,EAAI,QAC9B,yBACA,kCACA,CAAiB,CACjB,QACA,EAEA,qBAoCA,kBAA8B,EAAS,uCAnCvC,kCACA,SACA,SAEA,YAEA,uBACA,sBAwBA,kBAAkC,EAAS,wCAvB3C,iCACA,kBAAsC,EAAS,uCAE/C,kCAEA,IADA,oBAEA,WAAsC,EAAS,kDAE/C,iBACA,kBAGA,CACA,KACA,KAA8B,EAAI,IAClC,QACA,WACA,kCACA,CAAqB,CACrB,QACA,EAVA,WAAsC,EAAS,sCAmB/C,EAIA,oCACA,IA4qBA,EA5qBA,gBAEA,IADA,YACA,CADqB,IACrB,UA2qBA,OADA,EA1qBA,cA4qBA,QACA,cACA,QACA,eACA,cACA,QACA,gBACA,gBACA,gBACA,iBACA,kBACA,kBACA,kBACA,oBACA,oBACA,oBACA,oBACA,sBA5rBA,YAEA,0CACA,EACA,uCAGA,IAFA,2BACA,OACA,CACA,4BACA,MACA,KACA,QACA,CACA,iCACA,MACA,KACA,QACA,CACA,sCACA,MACA,KACA,QACA,CACA,KACA,CACA,gCACA,OACA,KAAmB,KAAM,EAAI,2BAA4C,CACzE,QACA,CACA,EACA,oDAsoBA,SAroBA,cACA,kBACA,iBAooBA,GADA,EAjoBA,iBAkoBA,QA9nBA,CA8nBoD,KAjoBpD,YACA,CADyB,GAIzB,EAMA,sCACA,kCACA,YAIA,oBACA,QAIA,OAFA,YACA,YACA,GAEA,UACA,QACA,QACA,SACA,KACA,SACA,qCACA,MAEA,WACA,SACA,WACA,CACA,YACA,CADqB,GACrB,gBAGA,CAHwC,GACxC,YAEA,gBACA,kBACA,WACA,oBACA,WAEA,gBAEA,CAEA,YACA,KACA,OAGA,UAEA,WACA,CACA,wBACA,EACA,2CACA,gBACA,YAEA,yBACA,QACA,SAA4B,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uBACR,CAAQ,QAChB,GACA,EA5DA,GAIA,IAHA,kBACA,MAEA,QACA,GANA,IAQA,aACA,KAEA,KACA,QACA,OAGA,IAEA,CACA,QACA,ECyf4D,gBAE5D,OACA,KAAkC,EAAa,SAC/C,EAD+C,MAC/C,EACA,yBACA,yCN3hBA,KM4hBuD,EN3hBvD,sBACA,eACA,aAEA,QACA,0CACA,KAEA,SACA,iCACA,KACA,SACA,QACA,QACA,QACA,gFAEA,SACA,QACA,8DAEA,SACA,QACA,2DACA,KAEA,SACA,QACA,2DACA,SACA,iCACA,KACA,SACA,QACA,QACA,6EAEA,SACA,8CACA,KACA,SACA,OACA,iEAEA,kDACA,KACA,SACA,OACA,iEAEA,kDACA,KAEA,SACA,YACA,KACA,SACA,QACA,8EAEA,SACA,kBACA,kCACA,KACA,SACA,kBACA,kCACA,KACA,SACA,kBACA,kCACA,KACA,SACA,kBACA,kCACA,KACA,SACA,QACA,QACA,oFAEA,SACA,oCACA,KAEA,SACA,oCACA,KACA,SACA,QACA,8EAEA,SACA,kCACA,KACA,SACA,QACA,QACA,QACA,QACA,QACA,wFACA,CACA,QACA,CAAK,EACL,GMmbA,EAAoC,EAGpC,OACA,KAAmC,KAFnC,WAAwD,EAAI,KAAQ,EAAI,KAErC,2BAA8D,CACjG,QACA,CAEA,CAEA,OACA,KACA,kBAC8B,EAAI,OAClC,WACkC,EAAI,KACJ,EAAI,KACtC,QACA,WACA,0DACA,CAAqB,CACrB,QACA,CAEA,cACA,oBACA,aAIA,2BAEA,GADA,iBACA,kBACA,kBAAsC,EAAS,mCAAmE,EAAQ,EAAG,IAAH,EAE1H,iBASA,uCACA,IACA,qCACA,qBACA,kBAA0C,EAAS,kFAEnD,iBACA,kCAA6D,EAAS,oCAAsC,EAAS,sCACrH,SACA,SAGA,iBACA,mCACA,QAEA,kDACA,SACA,SAEA,oCACA,SACA,SAEA,gCACA,gBACA,OACA,KACA,KAAkC,EAAI,OACtC,QACA,iBACA,UACA,CAAyB,CACzB,QACA,EAGA,OACA,KACA,KAAkC,EAAI,OACtC,QACA,iBACA,SACA,6CACA,UACA,CAAyB,CACzB,QACA,CAGA,SACA,kBAAkC,EAAS,6BAC3C,CACA,EACA,qDAGA,uBAAqD,CAArD,QACA,WAA8B,EAAS,0DAEvC,YACA,CAAiB,KADS,EACT,UACjB,EAIA,qDAGA,IAFA,QACA,uBACA,eAEA,OADA,aAEA,QAGA,YACA,2BACA,wBACA,kBAA0C,EAAS,4DAEnD,YACA,KAEA,UACA,KAD8B,IAE9B,QACA,KAEA,UACA,KAD8B,EAC9B,GAIA,OACA,+CACA,QACA,EANA,KAQA,KAEA,SACA,WAEA,CAEA,OACA,+CACA,QACA,CACA,EACA,wDACA,SACA,IACA,EHrsBO,YACP,gBACA,CGmsBkD,KHnsBlD,yCAOA,QAJA,IACA,MAAe,GACf,mBAA+B,WADC,IACD,GAAsB,EACrD,KACA,IAAoD,EAApD,EAAoD,OAA4B,KAEhF,MAFA,CACA,IACA,WACA,gBACA,uCAGA,QADA,oBACA,IAA8C,EAA9C,EAA8C,OAAuB,IAErE,OAFA,CACA,IACA,OACA,uCAGA,QAAsB,iBAA8B,CACpD,CACA,QACA,EG4qBkD,EAClD,CACA,SACA,kBAA8B,EAAS,0BACvC,CACA,OACA,KACA,KAAsB,EAAa,OACnC,IADmC,GACnC,EACA,WACA,wCACsB,SH5jBf,GAEP,OG0jByC,CH3jBzC,KACA,IAAwC,EAAxC,EAAwC,OAAsB,KAC9D,MADA,CACA,IACA,eACA,cACA,QACA,kBACA,QACA,aACA,kBACA,YACA,QACA,gBACA,mBACA,wBACA,QACA,iBACA,SACA,iBACA,QACA,yBACA,QACA,0BACA,QACA,oBACA,WACA,eACA,OArJA,EAqJA,WArJA,sBAsJA,QACA,qBACA,QACA,qBACA,yBACA,QACA,oBACA,SACA,qBACA,wBACA,QACA,kBACA,EAAyB,EAAS,EAAS,EAAQ,EAAG,KAAa,GAAlC,EAAS,EAAS,EAAgB,aAAwB,iCAA8C,OAAQ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yC,GACzC,EAAwB,CACX,CACb,QACA,CACA,EAWA,4DASA,IAPA,IADA,EACA,KACA,KACA,UACA,yBAIA,CACA,iBACA,2BACA,mCAEA,kCAA6D,EAAS,gCAAkC,EAAS,kCACjH,SACA,SAEA,4BACA,4CACA,MAEA,KAEA,CAEA,YACA,+BACsB,EAAS,mCACT,EAAS,qCAE/B,cACA,OAKA,iBACA,2BACA,kBAA+B,GAC/B,+BACsB,EAAS,yCACT,EAAS,uFAE/B,iCACA,SACA,SAEA,oCACA,SACA,SAEA,QACA,EACA,CACA,YACA,kCACA,CAAiB,CACjB,EAEA,SAEA,iBACA,iEAEA,aACA,wBACkB,EAAS,gCACT,EAAS,8EAE3B,6BACA,WAA8B,EAAS,mEAEvC,CAAiB,eACjB,EACA,iDACA,QACA,uBACA,kBAEA,kBACA,OAIA,IAFA,SACA,IACA,gBACA,kBACA,gBACA,KACA,cACA,iBAGA,KAEA,CACA,uCACA,EAIA,EADA,MAIA,CAAiB,gBAFjB,gBAJA,eAOA,EACA,8BACA,6BAEA,6BACA,4CAEA,qCAEA,OACA,4BACA,wBACA,4BAEA,EAKA,4BACA,2BACA,0BACA,4BAEA,wBACA,cACA,4EAEA,QACA,EACA,gCACA,OACA,SACA,KACA,OACA,qBACA,UACA,CAAa,CAEb,EAEA,4BACA,kBAGA,iBACA,SACA,sBACA,uBACA,0BAGA,wBAEA,mCAEA,EAOA,+BACA,oCACA,YAA4B,WAAmB,IAC/C,YAEA,QACA,CACA,QACA,EAKA,kCACA,oBACA,mCACA,MACA,eACA,KAGA,iCACA,GAEA,EAKA,+BACA,mBACA,qHAGA,IADA,oCACA,CACA,oBACA,SACA,MAEA,OACA,kFAGA,GADA,YACA,aACA,KAEA,CACA,EAEA,iCACA,qCACA,WAEA,EAKA,4BACA,gBACA,YAEA,kBACA,gBACA,4CACA,qBACA,EACA,CACA,CAAC,GAOD,cACA,sBACA,YACA,CA8BA,eACA,oBACA,QACA,SACA,kBACA,UACA,QACA,CCp+BO,iB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kCACA,cAEA,iBACA,gBAA0B,EAAM,EAEhC,cAEA,IACA,CACO,kBACP,IACA,aACA,CAAI,SAIJ,QACA,CACA,CAQO,gBAGP,GAFA,OACA,OACA,uBACA,sBACI,oDACJ,YAAoB,IAAO,KAC3B,iBAGA,WACA,CACO,kBACP,IACA,aACA,CAAI,SAIJ,QACA,CACA,CAQO,gBAGP,GAFA,OACA,OACA,uBACA,sCACI,0BACJ,YAAoB,IAAO,KAC3B,sCAEI,4BACJ,YAAoB,IAAO,KAC3B,+BAGA,WACA,CACO,kBACP,IACA,aACA,CAAI,SAIJ,QACA,CACA,CAYO,kBACP,IACA,gBALO,SACP,4BACA,EAGA,IACA,CAAI,SAIJ,QACA,CACA,kGC9TO,MAA2B,OAAW,GAGtC,cACP,uDACA,CACA,kBACA,OA6MA,YAEA,eACA,SAEA,QACA,EAnNA,YACA,CACA,oCACA,kBACA,UACA,YAEA,OACA,KACA,oBACA,EAGA,OAFA,OACA,OACA,CACA,CAOA,gBACA,kCACA,oBACA,4BAEA,mCAMA,EALA,IACA,OAIqB,EAJrB,EACA,KACA,CAAM,EACN,IAIA,cAAiC,WAAqB,MACtD,WACA,8BAMA,IALA,KACA,KACA,gBACA,yBAEA,YACA,QACA,MAEA,qBACA,qDACA,WAIA,kBACA,QAEA,4BACA,KACA,KACA,gBACA,yBAEA,oBAEA,eAEA,CAGA,QACA,CACA,QACA,CACe,eAAgC,EAC/C,IACA,UACA,iBACA,0BACA,0BACA,CAAI,EACJ,KACW,OAAe,kBAE1B,oBACA,OAAwC,QArExC,MAyFA,EAlBI,QAAa,uCACjB,IACA,OACA,OACA,uBACA,SAGA,oBA9EA,CADA,EA+EA,IAmIA,wBAnIA,EAmIA,SAnIA,GA3EA,YAFA,IA6EA,CACA,KACA,CAAM,EAGN,eAGA,8BACA,QASA,GAIA,wBACA,IACM,EAEN,IA+FA,iBA9FM,GAkGN,oBAhGA,WAEA,MAAkC,QAAkB,IACpD,oBACA,QACA,IACA,CAAK,EACL,K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A,EASA,OACA,KAEA,EGhEuC,GACvC,EAAkB,OAAa,IAC/B,EAAiB,OAAS,EAC1B,cACA,gBACA,aAAkB,CAElB,SACA,aACA,KACK,CACL,UACA,OACA,GAAS,CAAK,CACd,KAEA,CAAG,IAcH,MAZA,CADA,EAAa,QAAmB,KAChC,YAAyB,EAEzB,CADA,QADoC,EACpC,QAA4C,OAAS,UACrD,mBACA,GAAO,GAAe,CACtB,yBAEA,0BACA,MAAW,OAAe,EAC1B,KACA,WACK,CACL,EACA,CACA,+BCxCO,gBACP,uBACA,SAEA,wEACA,+BACA,iDACA,CAAG,SACH,SAGA,iBACA,WAGA,OAFA,YACA,OACA,CACA,CAAG,EACH,IACA,CAAG,EATH,CAUA,CACO,gBACP,8DAAoG,EAAI,uBACxG,CACO,gBACP,qCACA,MAKA,YAEA,YACA,2BACA,kCACA,CACe,cACf,gDAAmG,EAAK,gBACxG,gBACA,yCACA,6CACA,mDACA,6CACA,eACA,0CACA,0BAEA,+GAEA,CACA,CACA,CACA,SACA,MACA,OACA,GAGA,OADA,KACA,CACA,KACA,kBACA,CACA,4GC5DA,MARA,qBACA,EAGS,OAAS,GAIE,EAJF,CAClB,QACA,CAAG,EAJH,CAKA,0HEHA,OACA,WACA,WACA,EACA,GACA,QACA,UACA,WACA,SACA,mBACA,oBAEA,GACA,aACA,aACA,cACA,aACA,EAKA,ED3Be,OC2BiB,ED3BjB,GACf,SACA,WACA,eACA,YAEA,KAEA,ECmBgC,IAEhC,eACA,SAGA,UAFA,OAKA,qBACA,OACA,WACA,4CACC,EACM,gOACA,6OACP,cACO,oBACP,MAAuB,QAAO,kBAC9B,uCACA,GACA,mBACA,EAOA,mBACA,QAAuB,GAAK,IAAI,EAAa,GAE7C,IAGA,iBACA,IACA,sBACA,SAEA,IAQA,IARA,YAQA,QACA,KACA,EAEA,mBACA,GAEA,IAAiB,EAAY,GAG7B,qBACA,EAKA,UACA,CACO,cACP,iCACA,CACO,sBACP,4BACA,EAEA,IACA,CAkBA,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,IACA,MAAW,IAAO,CACf,CACH,IACA,MAAW,IAAO,CACf,CACH,IACA,MAAW,IAAO,CACf,CACH,SACA,MAAW,IAAO,CACf,CACH,YACA,MAAW,IAAO,CACf,CACH,cACA,MAAW,IAAO,CACf,CACH,eACA,MAAW,IAAO,CACf,CACH,aACA,MAAW,IAAO,CACf,CACH,UACA,MAAW,IAAO,CACf,CACH,UACA,MAAW,IAAO,CACf,CACH,eACA,MAAW,IAAO,CACf,CACH,oBACA,MAAW,IAAO,CACf,CACH,kBACA,MAAW,IAAO,CACf,CACH,cACA,MAAW,IAAO,CACf,CACH,mBACA,MAAW,IAAO,CACf,CACH,iBACA,MAAW,IAAO,CACf,CACH,GACA,MAAW,IACX,CAAG,CACH,IACA,MAAW,IAAM,CACd,CACH,IACA,MAAW,IACX,CAAG,CACH,IACA,MAAW,IAAM,CACd,CACH,IACA,MAAW,IAAM,CACd,CACH,IACA,MAAW,IACX,CAAG,CACH,IACA,MAAW,IAAM,CACd,CACH,QACA,MAAW,IAAM,CACd,CACH,WACA,MAAW,IAAM,CACd,CACH,aACA,MAAW,IAAM,CACd,CACH,cACA,MAAW,IACX,CAAG,CACH,YACA,MAAW,IAAM,CACd,CACH,SACA,MAAW,IAAM,CACd,CACH,SACA,MAAW,IAAM,CACd,CACH,cACA,MAAW,IAAM,CACd,CACH,mBACA,MAAW,IAAM,CACd,CACH,iBACA,MAAW,IAAM,CACd,CACH,aACA,MAAW,IAAM,CACd,CACH,kBACA,MAAW,IAAM,CACd,CACH,gBACA,MAAW,IAAM,CACd,CAEH,cACA,eACA,eACA,gBACA,SACA,CACA,EAAK,CACF,CACH,UAAa,CACb,WAAc,CACd,eAAkB,CAClB,aAAgB,CAChB,aAAgB,CAEhB,YAAe,CACf,gBAAmB,CACnB,WAAc,CACd,iBAAoB,CACpB,aAAgB,CAChB,eAAkB,CAClB,QAAW,CACX,OAAU,CACV,WAAc,CACd,aAAgB,CAChB,YAAe,CACf,eAAkB,CAClB,cAAiB,CAEjB,KACA,MAAW,CACX,CAAG,CADW,OAEd,CACA,MAAW,CACX,CAAG,CACH,GAFiB,OAEjB,CACA,MAAW,CACX,CAAG,CACH,MAFoB,KAEpB,EAAgB,CAChB,UAAa,CACb,eAAkB,CAClB,kBAAqB,CACrB,eAAkB,CAClB,sBAAyB,CACzB,mBAAsB,CACtB,oBAAuB,CACvB,WAAc,CAEd,WAAc,CACd,QACA,iBACA,CAAG,CACH,MAAS,CACT,QAAW,CACX,SAAY,CACZ,OAAU,CAEV,WACA,kBACA,CAAG,CAEH,OACA,UAAe,CACf,CAAG,CACH,UACA,EAH8B,IAGnB,CACX,CAAG,CACH,KAFmB,IAEnB,CACA,UAAe,CACf,CAAG,CACH,QACA,IAH8B,MAGf,CACf,CAAG,CACH,WACA,CAH8B,SAGf,CACf,CAAG,CACH,WACA,CAH8B,SAGf,CACf,CAAG,CACH,YAF8B,CAI9B,MACA,eACA,CAAG,CACH,YACA,qBACA,CAAG,CACH,UACA,qBACA,CAAG,CACH,WACA,qBACA,CAAG,CACH,YACA,qBACA,CAAG,CACH,gBAAmB,CACnB,gBAAmB,CACnB,aAAgB,CAChB,YAAe,CACf,YACA,eACA,qBACA,CACA,2EClSA,UACA,OACA,cAAmB,CACnB,aACA,EACA,+BAAoD,GAAe,CAQnE,OAPA,2BACA,KACA,sBAEA,qBAEG,EACH,CACA,EACe,kBASf,EARA,IACA,KACA,KACA,CAAI,EACJ,CACA,cACA,aACA,CAAI,KAqBJ,OAlBA,EADA,iBACA,SACI,qBACJ,SACA,oBACA,CAAW,MAAa,IAGxB,CACA,KACA,MAJA,CAMA,EAEA,CACA,KACA,MAGA,CACA,KACA,IACA,CACA,sHC0EA,iBA3GA,oBACA,OACA,MACA,OACA,EACA,OACA,MACA,OACA,KACA,EAEA,IACA,gBACA,WACA,YACA,QACA,CAAM,EACN,WACA,YAIA,mCACA,OACA,KACA,EAEA,MAAyB,QAAO,iBAChC,EACA,KAeW,QAAiB,KAb5B,IACA,MAAkB,QAAQ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EA,CACA,gECrBe,cACf,sBACA,YAAoB,CAAmG,MAAsB,EAAjF,CAAwD,EAEpH,2CACA,iDCPA,MAHA,4BAGe,KAAK,GAHpB,4BACA,gCACA,gCCGe,kBACf,SACA,gBACA,WACA,KACA,KACA,YAAoB,WAAiB,MACrC,WACA,IACA,wBACA,KACA,SACA,cAGA,CACA,MACA,CACA,QACA,gDClBe,iBACf,uBACA,QACA,EAEA,eACA,gBACA,eACA,EACG,MAAU,CACb,gDCde,oBACf,MACA,iBAKA,gBACA,aALA,KAEA,eACA,EAEA,EACA,CAIA,OAHA,aACA,eACA,EACA,CACA,gDCfO,cACP,gCACA,SAEA,+BACA,4HACA,cAWe,kBACf,QACA,CAAC,EACD,eACA,MACI,EAeJ,OAdA,YACA,2BACA,SAEA,mDAEA,oBACQ,QACR,aAxBA,cACA,SACA,SAEA,SAIA,OAHA,2BACA,YACA,CAAG,EACH,CACA,EAeA,WAEA,UAEK,EAEL,CACA,2DCtBA,MAVA,iBACA,WASe,CATf,EACA,SAEA,QAMmC,CAFnC,OAHA,mGACA,UACG,EACH,CACA,gCCXe,cAKf,kDACA,YAAkB,mBAAsB,KAGxC,+CAEA,kCAA4C,kCAE5C,iFCjBO,OACP,gBACA,kBACA,sBACA,oBACA,cACA,oBACA,kBACA,4BACA,YACA,oBACA,oBACA,mBACA,EACe,wBACf,WACA,YAA+B,EAAkB,GAAG,EAAiB,KAAO,GAAkB,aAAyB,GAAG,EAAK,iEChBhH,wBACf,SAIA,OAHA,cACA,KAAmB,QAAoB,OACvC,CAAG,EACH,CACA,+DCEe,qBACf,GAAiC,gBAAoB,IAKrD,gDAIA,MARA,IASA,gCClBe,cAEf,oCACA,oCACA,gDCHe,cACf,IACA,kCACA,CAAI,SAMJ,CACA,QACA,gECdgX,MAAxH,WAAgB,wCAAwC,IAAI,kCAApT,KAAc,aAAa,+CAA+C,iDAAgD,eAAe,QAAQ,IAAI,0CAA0C,yCAAyC,UAA4E,wBAAmD,SAAS,gBCiBhX,M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AG,WAAe,0ECQjG,MATA,YACA,MAAc,QAAY,EAQX,EAJf,MAHE,OAAiB,CAOY,KAN/B,WACA,CAAG,EACM,QAAY,SAErB,uGCbe,iBAMf,OAAS,SAAa,KACtB,oBACA,KAEA,IACA,cACQ,OAAM,KACd,CAAO,CACP,EAGG,EACH,kECnBA,QAkBA,EAAwB,iBAAK,qBAOd,cACf,eACA,UACA,WACA,CAGA,gBA/BA,GACA,SAAoC,UAAc,IAClD,OAWA,OAVE,WAAe,MACjB,UAKA,KACA,SAA0B,EAAS,GAEnC,CAAG,MACH,CACA,EAiBA,EACA,gECjCA,SASe,gBACf,MAAc,QAAY,IAI1B,OAHA,eACA,iBAEA,CACA,gGCmBA,MAvBA,YACA,IACA,cACA,UAoB2B,QApB3B,EACA,aACA,4BACA,KACA,CAAI,EACJ,OAA8D,CAAE,MAAqB,MACrF,CACA,QACA,cACA,CAAI,CAAE,MAAc,EACpB,KACA,mBACA,CAAG,EACH,EAAc,OAAU,kCAKxB,MAJgB,OAAgB,IAChC,KACA,KACA,CAAG,GAEH,mFCjCA,eCCO,EACP,gBACA,YACA,CACA,eAKA,WACA,aACA,+BACA,oBACA,GACA,CAAK,GACL,CACA,WACA,wBACA,6BACA,oBAEA,EACA,kBACA,UAEA,CACe,iBDtBA,ECuBf,MAAkB,OAAU,mBAE5B,ODzBe,ECwBH,gBDrBV,WAAe,MCsBjB,CACA,4KC1BA,UAAmB,CAAC,KACpB,UAAmB,CAAC,KACpB,UAAmB,CAAC,KACpB,MAA8B,OAAY,oBAHC,cACF,EAEC,QADP,2IACO,iEAA0P,WAAW,oCAC/S,GAEA,UACA,MACA,mBACA,oBACA,WACA,CAAG,CAEH,GACA,oBACA,oBACA,WACA,CAAG,CACH,WACA,KACA,oBACA,oBACA,CAAG,CACH,MACA,oBACA,oBACA,CAAG,CAEH,GACA,kBACA,oBACA,WACA,CAAG,CACH,SACA,IACA,kBACA,+BACA,CAAG,CAEH,GACA,sBACA,oBACA,WACA,CAAG,CACH,IACA,sBACA,oBACA,CAAG,CACH,KACA,sBACA,oBACA,CAAG,CACH,MACA,sBACA,oBACA,CAAG,CAEH,aACA,aAEA,GACA,oBACA,oBACA,WACA,CAAG,CACH,WACA,GACA,oBACA,oBACA,WACA,CAAG,CACH,WAEA,GACA,sBACA,oBACA,WACA,CAAG,CACH,aAEA,GACA,sBACA,oBACA,WACA,CAAG,CACH,YACA,EACA,GACA,YACA,aACA,iBACA,eACA,eACA,mBACA,cACA,cACA,aACA,aACA,aACA,cACA,+BACA,iBACA,kBACA,oBACA,mCACA,yBACA,sBACA,cACA,sBACA,oBACA,mBACA,6BACA,2BACA,wBACA,gCACA,6BACA,EACA,wLACA,mNACA,sCA2BO,SACP,aACA,SACA,UACA,WACA,CAAI,EAAI,EACR,KACA,sBACA,6BACA,iBACA,6BACA,kBACA,mBACA,oBACA,wBACA,UACA,OACA,EACA,sBACA,0BACA,yCACA,eACA,EAEA,WACA,EACA,2BAAqD,EAAhB,UAAgB,IACrD,uBAAyD,OAAf,SAC1C,sBACA,8CACA,gCACA,EAIA,6CACA,0BAGA,yBACA,gCAEA,kDACA,MAAyB,MAAe,SAIxC,aACA,OAAiB,MAAe,KAGhC,CACA,OAAa,IAAY,EACzB,EACA,uBAEA,aAJyB,QAIzB,GACA,eAEA,OAAa,OAAgB,GAC7B,EACA,0BAEA,wBACA,eAIA,6BACA,eAEA,mCACA,OAAa,IAAY,8BACzB,EACA,QAFyB,aAEzB,MACA,MAAsB,OAAe,CAAf,CAEtB,EADA,kBACA,CAKA,OAJA,aACA,IACA,QAEA,SACA,EACA,aACA,SACA,KAEA,cAEA,kCAIA,SAHA,SACA,MAIA,EADA,UACA,sBACQ,wDAGR,uBAFA,yBAIA,sBACA,EAEA,qBACA,EACA,qBACA,kCACA,YAEA,6BACA,MAEA,wCACA,yBACA,CACA,cACA,EACA,yBACA,2BACA,SAEA,cAEA,wBACA,eAEA,cACA,CAKA,gBACA,iBAEA,8BACA,iBACA,QAIA,eACA,CACA,OAAa,MAAe,yBAC5B,EACA,iBACA,WAEA,iBACA,cAEA,cACA,gBAEA,kBACA,OACA,KAEA,+BAEA,8BACA,kBAEA,sCAEA,2CAEA,sBACA,8BAGA,wEACA,sCAAiD,IAAI,GAAG,IAAI,cAC5D,yBACA,uBACA,CAAO,CACP,EACA,4BACA,iEAEA,eACA,SAEA,gBACA,wBAEA,mBACA,uCAEA,2BACA,wBAEA,qBACA,EAEA,sBACA,YAEA,oBACA,oBAGA,oEAEA,uBACA,wBAEA,wBACA,2BAEA,sBACA,8BAEA,uBACA,mBAEA,oBACA,IAEA,wBACA,oBAGA,uCAFA,oBAIA,uBACA,oBAGA,sCAFA,mBAIA,qBACA,IAEA,yBACA,oBAGA,uCAFA,qBAIA,wBACA,oBAGA,sCAFA,oBAIA,8BACA,WAEA,oBACA,kBAEA,qBACA,mBAEA,oBACA,kBAEA,mBACA,iBAEA,kBACA,gBAEA,mBACA,iBAEA,kBACA,gBAEA,iBACA,eAEA,qBACA,mDAEA,sBACA,qDAEA,qBACA,mDAEA,oBACA,iDAEA,qBACA,mDAEA,uBACA,uDAEA,uBACA,uDAEA,gBACA,SAEA,iBACA,UAEA,gBACA,SAEA,iBACA,SAEA,mBACA,WAEA,mBACA,WAEA,wBACA,gBAEA,oBACA,gBAEA,qBACA,iBAEA,oBACA,gBAEA,qBACA,gBAEA,uBACA,kBAEA,uBACA,kBAEA,4BACA,uBAEA,uBACA,gBAEA,qBACA,iBAEA,yBACA,sBAEA,uBAEA,OADA,kBACA,CACA,mBACA,oBACA,2BACA,CACA,QACA,EACA,6BACA,uDAEA,sBACA,mCACA,sEACA,EACA,sBACA,0BACA,2BACA,qCACA,iCACA,IACA,IACA,KACA,WACA,qBACA,eACA,aACA,iBAMA,mDACA,mCAEA,IACA,CACA,QACA,EACA,sBACA,SAEA,0BACA,wBACA,kBACA,KACA,IACA,UACA,UACA,kBAEA,QACA,EACA,wBACA,mBAEA,wBACA,+CAA8G,IAAY,GAC1H,cACA,CAF8G,G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AG,CACH,MAAQ,EAAmB,SAAU,IACrC,IAD2B,EAC3B,mCACG,CACH,MAAQ,EAAmB,SAAU,IACrC,IAD2B,EAC3B,yCACA,iDACA,oBACA,iDAEA,CACA,CAAC,GAKM,EAAkC,MAAU,aACnD,MAAgB,OAAa,EAC7B,QACA,sBACA,CAAG,EACH,CACA,YACA,WACA,WACA,QACA,WACA,UACA,YACA,UACA,SACA,iBAEA,CAAM,EACN,EAAY,OAA6B,MACzC,EAAc,QAAY,OAC1B,OAOA,MANE,OAAiB,MACnB,MACA,KACA,+BACA,CACA,CAAG,MACmB,SAAI,GAAmB,OAAQ,EACrD,iBACA,YACA,CAAG,IACH,SAA2B,SAAI,IAC/B,MACA,WACA,cACA,gBACA,iBACA,kBACA,oBACA,kBACA,iBACA,wBACA,aACA,UACA,CAAK,CACL,CAAG,EACH,CAAC,iBC3HM,cACP,MAAS,QAAoB,sBAC7B,CACoC,OAAsB,8ECF1D,IAAM,EAAS,2QAeT,EAAiB,IACvB,IACA,UACA,CAAI,EAIJ,MAAS,EAPc,CAOd,IAAc,CAHvB,CACA,eAE+B,EAA4B,EAC3D,EAgBA,EAA0B,QAAM,QAChC,IAlB2D,CAkB3D,mBACA,YACA,gCACC,GACD,eACA,gBACA,uBACA,gBACA,SACA,CAAC,EACM,EAAmC,YAAgB,eAC1D,eA3BO,KACP,MAAgB,QAAQ,GACxB,EAAuB,QAAe,GACtC,EAAqB,OAAa,EAClC,QACA,MACA,CAAG,EACH,MAAS,OAAQ,EACjB,iBACA,cACA,CAAG,IACH,QAAa,QAAgB,wBAC7B,QAAa,QAAgB,uBAC7B,CAAG,CACH,EAaA,sBACA,CACA,YACA,QACA,eACA,gBACA,WACA,gBACA,cACA,UACA,UACA,WACA,qBACA,WACA,wBACA,eACA,eACA,WACA,sBACA,iBACA,WACA,CAAM,EACN,EAAY,OAA6B,GAAQ,GACjD,CACA,QACA,UAH0D,QAG1D,EACA,WACA,CAAM,OAA8B,EACpC,qBACA,WACA,QACA,e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C1D,EAgBA,EAAyB,QAAM,QAC/B,GAlB0D,EAkB1D,kBACA,YACA,gCACC,GACD,eACA,oBACA,gBACA,iBACA,cACA,gBACA,UACA,aACA,CAAC,EACM,EAAkC,YAAgB,eACzD,MA9BA,cACA,MAAgB,QAAQ,GACxB,EAAuB,QAAe,GACtC,EAAqB,OAAa,EAClC,QACA,MACA,CAAG,EACH,MAAS,OAAQ,EACjB,eACA,gBACA,CAAG,IACH,QAAa,QAAgB,wBAC7B,QAAa,QAAgB,uBAC7B,CAAG,CACH,EAgBA,qBACA,CACA,YACA,YACA,QACA,eACA,gBACA,WACA,gBACA,cACA,UACA,UACA,WACA,WACA,oBACA,wBACA,cACA,WACA,sBACA,gBACA,WACA,CAAM,EACN,EAAY,OAA6B,GAAQ,GACjD,CACA,QACA,SAH0D,SAG1D,EACA,WACA,CAAI,CAAE,MAA8B,EACpC,oBACA,WACA,QACA,eACA,WACA,aAAkB,GAClB,CAAG,EACH,EAAc,QAAM,IACpB,EAAgB,OAAQ,GACxB,EAAgB,QAAQ,GACxB,EAAwB,SAAa,KAAO,GAAsB,2BAClE,QACA,QACA,QACA,WACA,gBACA,YAAiB,IAAwB,MACtC,MAIH,EAAkB,EADlB,GAEA,EAAoB,SAAa,cADE,CACF,UACjC,EAAuB,SAAa,KACpC,QACA,aAEA,EACA,KAEA,aACG,WACH,MAAwC,UAAc,WACtD,QAAkD,OAAa,EAC/D,oBACA,iBACA,aACA,kBACA,CAAG,EACH,GAAyB,OAAgB,KACzC,MACA,GACA,IAEA,CAAG,EACH,GAAyB,aAAiB,IAC1C,2BAGA,uBAGA,wBAGA,0BAGA,GAIA,EADA,kBAEG,iBACH,GAA8B,OAAgB,SAC9C,GAIA,EADA,yBAEA,CAAG,EACH,GAAoB,OAAgB,KACpC,+BACA,KACA,OACA,cAEA,CAAG,EACD,WAAe,MACjB,yBACA,CAAG,MACH,OAAwB,OAAgB,SACxC,cACA,cACA,QACA,mBACA,KACA,iBACA,QACA,mBACA,KACA,iBACA,iCACA,mBACA,KACA,kBACA,iCACA,kBAIA,CACA,CAAG,EACH,GAA0B,OAAgB,SAC1C,KACA,CAAG,EACH,GAAyB,OAAgB,SACzC,OACA,MAEA,CAAG,EACH,GAAsB,QAAY,OAClC,GAAoB,OAAU,OAsB9B,OArBE,WAAe,MACjB,wBACA,OAEA,iDACA,MACA,OAIA,qBACA,cACA,0BACA,uBAEA,UAIA,sBALA,IAKA,QACA,CAAG,MACmB,SAAI,GAAmB,OAAQ,EACrD,OACA,UAAe,OAAI,WACnB,WArHA,CAsHA,CAAG,IACH,qCACA,mBAEA,WACA,MAA0B,SAAI,CAAC,EAAW,CAC1C,QAD0C,CAF1C,MAIA,QACA,WACA,aACA,oBACA,WACA,oBACA,WACA,UACA,mCACA,cACA,2BACA,CAAO,oBACP,CAAK,CACL,CAAG,EACH,CAAC,qOCjPM,cACP,0BACA,WACA,+BAAwC,YAAY;uIAAA,QAEpD,mBACA,CACA,OACA,4CACA,gBACA,EAEA,CACA,mBACA,0BACA,sBAEA,EACA,MACA,UACA,cACA,QACA,iBACA,SACA,cACA,QACA,gBACA,SACA,SACA,QACA,CACA,EACO,YACP,SACA,+BACA,mBACA,iBACA,IACA,sBACA,UACA,iBAEA,sCACA,EACO,cACP,UACA,YAEA,MAAe,QAAe,8DAE9B,eAEA,eAEA,gBACA,CACA,mCACA,mEACA,CACA,QAEA,SAGA,EACO,YACP,QAMA,IAHA,uBAGA,YACA,MAAwB,EAAc,EAEtC,QACA,EACO,gBAOP,wDACA,kCACA,mCACA,CAGA,0BACA,yBACA,mBAEA,CACA,EACO,oBACP,WACA,aACA,YACA,2BAqDA,6DACA,CArDA,KACA,iBACA,cACA,gBACA,0BACK,EAEL,6DAEA,EADA,qBACA,IACA,MACA,2BACA,+DAGA,EADA,OACA,UAEA,iBAXA,MAwBA,CAVA,SACA,UACA,eAGA,CAH+E,EAG/E,OACA,UAGA,aACA,kDAEA,YACA,kDAEA,EA7BA,IA8BA,KAmBA,CAlBA,KACA,6BACA,gBACA,eAEA,YACA,OACA,KAEA,cAGA,SADA,iBACA,qBACA,YACA,GAKA,EACO,UACP,6BACA,qEAiBA,MAhBA,uEACA,yBAQA,kFAEA,MAAe,EAAM,SAErB,iBACA,YAAqB,EAAM,SAE3B,CACA,EACO,iDACA,UACP,QACA,QACA,KACA,YAAkB,WAAqB,MACvC,WACA,iCACA,KAA0B,iBAAuB,EAAE,EAAc,EAAE,eAAqB,EACxF,cACA,WAGA,OACA,4CACA,aACA,OAAqB,OAAQ,GAAG,IAChC,QACA,QACA,eACA,YACA,CAAK,GACL,KAEA,IACA,CACA,QACA,EACA,gBACA,eACA,WAEA,+BACA,oEACS,CAET,aAEA,gCACA,0BACS,CAET,WAEA,8BAEA,eAEA,kCACA,0BACS,CAET,aAEA,gCAEA,eAEA,kCAEA,eAEA,kCAEA,gBAEA,mCAEA,SAEA,QAEA,CACA,EACO,aAMP,iCAEA,uEACO,gBACP,eACA,SAEA,mCACA,UAEA,WAEA,YAEA,eADA,mCAIA,aADA,qCAGA,aAEA,oDAEA,WAEA,qDAEA,eAEA,oDAEA,aAEA,mDAEA,eAIA,cAFA,qDAMA,SAEA,mCAEA,CACA,EACA,UACA,SACA,CACA,QACA,MACA,CAAI,oBACJ,eAAkC,EAAU,MAAM,EAAQ,MAAM,EAAQ,SACxE,OAEA,kBACA,QACA,cACA,iBACA,CAAK,EAEL,QACA,EACO,sBACP,SACA,KACA,WACA,MACA,UACA,YAEA,aACA,gCACA,8BACA,wBACA,6BACA,OACA,MACA,KACA,mDACQ,CACR,qBACA,8BAA4C,GAAO,0DAEnD,cACA,GACA,YAEA,EAcA,OAZA,OAAkB,OAAQ,GAAG,IAC7B,SACA,YACA,QACA,yBACA,kBACA,0BACA,yBACA,iCACA,gBACA,WACA,CAAK,GACL,IACA,EAGA,KACA,IACA,oBACA,YAIA,GAHA,IACA,oBACA,OACA,EACA,qJAGA,QAGA,SAGA,cAA6C,wCAA4C,IACzF,KACA,YAAkB,WAA2B,MAC7C,sCACA,OACA,UACA,KAA8B,EAAkB,EAAE,WAAwB,GAC1E,qCACA,KAIA,8DAEA,KACA,KACA,aACA,KAEA,8BAIA,CAEA,OADA,KACA,UACA,UACA,QAOA,OANA,8BACA,YAAoC,EAAiB,SAErD,2CACA,OAA+B,IAAkB,EAEjD,CACA,EAGA,OAFA,qCACA,iCACA,CACA,CAAG,CACH,EAMO,UAIP,gCACA,KACA,KACA,YAAkB,WAAqB,MACvC,WACA,wBAEA,iBACA,yBAEA,CACA,kBACA,cACA,mBACA,EACO,UAKP,QAJA,QACA,qCACA,SAAc,iBAAuB,EAAE,EAAU,EAAE,eAAqB,EACrE,EACH,gBACA,EASA,SAAkB,EAAQ,QAR1B,CASA,EACO,UACP,mCACA,iBACA,CACA,iBACA,eACA,CAAM,QAAe,qBACrB,iCACA,mBACA,CACA,iBACA,cACA,EAEA,CACA,CAAG,EACH,iBACA,iBACA,CAAG,EACH,OACA,OACA,SACK,KACL,UACA,wBACA,EAAK,CACL,YACA,UAEA,uBACA,EAAK,CACL,MACA,cACK,KACL,UACA,oDACA,cACA,EAAK,CACL,UACA,SACA,cACK,IACL,gBACA,2BACA,OACA,uBACA,sBACA,CACA,CACA,OACA,UACA,SACA,CACA,CAAK,CACL,QACA,SACK,IACL,2BACA,iDAEA,CACA,UACA,mDACA,EAEA,CACA,UACA,SACA,CACA,CAAK,CACL,cACA,UAEA,uBACA,EAAK,CACL,cACA,UAEA,uBACA,EAAK,CACL,eACA,UACA,SACA,EAAK,CAEL,EAEO,UAiBP,EACA,gBACA,eACA,WAEA,gCAEA,aAEA,kCAEA,eACA,CACA,sBACA,+BACA,eACA,qBAEA,mBADA,IAEA,CACA,UAEA,gCAEA,gBACA,CACA,uBACA,gBACA,YACA,yBAEA,YACA,wBAEA,QACA,CACA,YAEA,kCAEA,eAEA,sCAEA,eAEA,sCAEA,SAEA,QAEA,CACA,EACA,GACA,OACA,QACA,MACA,UACA,QACA,UACA,UACA,UACA,EACO,iBAEP,sDACA,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P,UACA,EAAc,QAAY,GAI1B,OAHA,oBACA,yCAEA,SACA,yGClBO,QACP,WACA,QACA,eACA,WACA,eACC,IACD,QACA,MAAgB,QAAQ,GACxB,EAA4B,QAAY,IACxC,+CACA,EAAwB,SAAa,iCACrC,EAA2B,OAAgB,IAC3C,QACA,EAEA,sBAEA,oCAMA,OACA,MANoC,SAAa,qCAOjD,kBAN4B,OAAgB,YAC5C,UACA,mBACA,CAAG,EAIH,UACA,CACA,EAKO,IACP,OACA,WACA,QACA,eACA,WACA,eACC,IACD,SAA6C,OAAa,EAC1D,OACA,cACA,aACA,+BACG,EAKH,UACA,WACA,QACA,oBACA,SARmB,OAAgB,YACnC,KACA,kBACA,CAAG,EAMH,cACA,CAAG,CACH,yICnEO,QACP,OACA,gBACA,cACA,UACA,UACA,iBACA,QACA,WACC,IACD,iDACA,oBACA,MAEA,mBACA,MAEA,QACA,IAWA,IAVA,kBACA,IACA,QAEA,iBACA,GACA,MAEA,QAEA,OAOA,GANA,mBACA,SAEA,oBACA,SAEA,GACA,SACA,SAEA,gBACA,CACA,MACA,SACA,SAEA,iBACA,CACA,CACA,WACA,EACO,sCACA,WACP,sBAGA,EAFA,EAIO,WACP,iDAGA,eAEO,UAEP,OADA,iBACA,CACA,mBACA,oBACA,wBACA,CACA,QACA,EACO,YACP,QAIA,OAHA,8BACA,kCACA,iCAEA,EACO,8FACP,yBACO,mBACA,MACP,SACA,QACC,MACD,WACA,SAEA,sBACM,OAAa,aACnB,OAEM,OAAa,cACnB,QAEM,OAAa,YACnB,aAEM,OAAa,qBACnB,GAAc,SAAe,EAAE,OAAa,EAEtC,OAAa,oBACnB,GAAc,SAAe,EAAE,aAAmB,EAElD,EAIA,yEAEA,4GC/GO,OACP,OACA,QACA,MACA,QACA,UACA,UACA,cACA,EACO,2BACP,MACA,8BACA,CAAC,GAKD,YACA,cACA,wBAEA,eACA,yBAEA,aACA,uBAIA,QAUA,OATA,aACA,sBAEA,aACA,sBAEA,kBACA,2BAEA,CACA,EACO,IACP,QACA,QACA,cACA,WACA,eACC,IACD,MACA,kBAAwF,QAAY,MACpG,6CACA,qBAEA,6CACA,qBAEA,MAAkB,QAA2B,4DAO7C,OANA,iCACA,8DAAmH,QAAgB,kBAEnI,iCACA,8DAAmH,QAAgB,kBAEnI,CACA,2DCjEA,oCACO,mBAqBA,SACP,sDAEO,gBACP,EACA,eAEA,qHC7BA,gCAIO,GACP,gBACA,cAAiB,IAAY,CAC7B,6BACA,IACA,QACA,gBACA,CAAQ,EACR,EAAe,OAA6B,aAC5C,4BACA,EAEA,QACA,EAEW,QAAuB,GAClC,CAAG,CACH,WAAc,IAAwB,CACtC,eAAkB,IAAa,CAC/B,yBACA,oBACA,uBACA,iDACA,oDACA,EACO,GACP,wDACA,kCACA,iBAEA,EAEW,QAA+B,SAE1C,wBAA2B,IAAiC,CAC5D,8BACA,aACA,+BACA,iBACA,mCACA,QACA,uDACA,EACA,EAAG,CACH,oCACA,yDClDO,aACP,qBAGA,0BAEO,IACP,SACA,gBACA,QACA,eACC,QAED,EADA,kBAEA,WACA,SACI,iBACJ,SACI,cACJ,YAEA,oEAEA,OACA,QACA,QACA,CACA,iDCbO,wBACP,SACA,kCACA,WACA,IACA,KACA,YACA,iBAEA,gBAGA,CACA,gCC3Be,kBACf,SAkBA,OAjBA,uBAGA,IACA,yBACA,MACA,UACA,SACA,UAEA,SACA,YAEA,CACA,QACA,CAAK,cACL,CAAG,EACH,CACA,kECpBA,WAeA,GAdA,KACA,QACA,OACA,aACA,GACA,CAAK,CACL,YACA,KAEA,QACA,GACA,CACA,EACA,ICbO,GACP,gBACA,kBACA,sBACA,oBACA,cACA,oBACA,kBACA,4BACA,YACA,oBACA,oBACA,mBACA,EACe,wBACf,WACA,YAA+B,EAAkB,GAAG,EAAiB,KDDtD,ECC+E,YAAyB,GAAG,CDDzF,CCC8F,kBAAjC,+CChB/E,wBACf,SAIA,OAHA,cACA,KAAmB,QAAoB,OACvC,CAAG,EACH,CACA,gECHe,YACf,a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iDACA,QAAc,WAAyB,IACvC,OACA,GA5CA,EA4CA,kBAEA,WAAmB,EAAI,IAAI,EAAK,KAGhC,iBACA,EA7EA,KAKA,yBAZA,EAYA,yBAIA,UAEA,YACA,eAGA,wBAtBA,MAuBA,CAAI,SACJ,iBACA,CACA,CA+DA,aACA,IACA,gCACI,SACJ,QACA,CACA,CAmBA,qBACA,qCACA,4BAEA,IACA,gCCpIA,aACA,gFACA,CAKA,aAEA,WACA,wMC7BA,gCASA,cACA,kBACA,qBACA,yBACA,4BACA,QACA,SACA,iBACA,CACA,CAQA,gBACA,8BAAiD,EAAU,GAU3D,cACA,wBACA,CASA,cACA,sBACA,CASA,cACA,0BACA,CASA,cACA,oBACA,CASA,cACA,yDACA,CASA,cACA,oBACA,CASA,cACA,2CACA,CASA,cACA,+CACA,CASA,cACA,oBACA,CAMA,cAEA,8CACA,CASA,cACA,2EACA,CASA,cACA,8BACA,CAUA,gBACA,IACA,qBACA,CAAI,SACJ,QACA,CACA,CAQA,cAEA,6DACA,4FCrLA,6DAGA,EAEA,GAUA,cACA,KAAQ,kBACR,WAGA,MAAkB,IAAU,SAC5B,KAEA,iBAGA,cACA,UACA,WACA,MACA,CAAG,EAEH,IACA,UACA,EAAI,OAEJ,cACA,UACK,CACL,CACA,CAkCA,MAhCA,WACA,SACA,GACA,YACA,IACA,CAAK,CACL,aACA,IACA,CAAK,CACL,eACA,EAmBA,MAjBA,uDACA,cAEA,cACA,GACA,OACY,IAAU,eAAkB,OAAO,QAAG,KAAK,MACvD,CAAW,CAEX,CACA,CAAK,EAEL,cACA,eACA,CAAK,EAGL,CACA,0HCpEA,aACA,MAAc,IAAU,CACxB,uBAEA,uBACA,IACA,mBACA,uCAEA,sBACA,+CAEA,CAAI,SAGJ,CAIA,6DAEA,+BAEA,CAEA,cACA,mEACA,CAMA,cACA,YAAU,cAA6B,EACvC,KACA,SAGA,kBACA,EACA,gBACA,GAAgB,OAAoB,IAAI,QAAqB,EAE7D,gCAEA,cACA,CASA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A,CAAK,EAEL,CACA,CAEA,QACA,EA3CA,EAHA,QAIA,mFC7LA,wBACA,0BACA,EAEA,iBAAsC,aAAkB,KAqDxD,gBACA,qBACA,SAGA,SAEA,YAAkB,WAAkB,KACpC,WACA,IAMU,QAAc,IACxB,yBAEA,iBAEA,CAAM,SACN,sCACA,CACA,CAEA,gBACA,CAuCA,WACA,EACA,KACA,MAEA,kBAlCA,SACA,EACA,EACA,YAEA,EAAO,QAAQ,MAIT,QAAQ,IACd,YAEM,QAAQ,KACd,yBAIA,EAiBA,OACA,wECpIA,aAiBA,cACA,iBACA,IACA,CAAG,CACH,CAQA,cACA,qBACA,IACA,CAAG,CACH,EAjCY,YAES,YAArB,EAAqB,WAEC,aAAtB,EAAsB,YAEA,aAAtB,EAAsB,WACtB,CAAC,UAAwB,CAgCzB,SAEA,YACA,EACA,CAAK,8BAAwC,+BAAyC,+BAAyC,+BAC/H,sBACA,kBAEA,IACA,6BACA,CAAM,SACN,eACA,CACA,CAGA,KACA,EACA,EACA,CACA,qBACA,qBACA,GACA,IACA,KAKA,IACA,OACA,CAAc,SACd,IACA,MANA,IAQA,CAAS,CACT,IACA,KAGA,IACA,OACA,CAAc,SACd,IACA,MANA,IAQA,CAAS,CACT,EACA,uBACA,CAAK,CACL,CAGA,MACA,EACA,CACA,wBACA,CAGA,WACA,qBACA,MACA,EAEA,iBACA,IACA,KACA,IACA,GACA,GAEA,CAAS,CACT,IACA,KACA,IACA,GACA,GAEA,CAAS,EACT,UACA,MACA,KACA,MACA,CAEA,IACA,CAAO,CACP,CAAK,CACL,CAGA,SAAc,kBACd,6BACA,EAGA,UAAe,iBACf,6BACA,EAGA,UAAe,wBACf,4BAIA,GAAQ,QAAU,KAClB,mCACA,MACA,CAEA,cACA,cAEA,wBACA,EAGA,UAAe,2BACf,2BACA,OAGA,4BACA,mBAEA,cACA,OAIA,0BAEA,kBAGA,0BACA,kBAGA,QACA,CAAK,CACL,EACA,yGCxLA,MAAe,QAAe,GAa9B,GACA,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AEA,CAAG,EACH,aACA,kBACA,wBAIA,OAHA,yCACA,YACA,CAAO,EACP,sBAEA,CAAG,EACH,cACA,kBACA,WACA,+BACA,QACA,CAAO,CACP,CACA,CAAG,EACH,UACA,kBACA,iCACA,CACA,CAAG,EACH,WACA,eACA,yBAEA,CAAG,EApD2D,SAD9D,KAA4C,YAAgB,WAAkB,KAAO,WAA2B,8BAAwD,kBAAgC,6BAAuD,sCAa/P,EAZ8D,aAAoI,UAA9D,WAA8D,CAYlM,EAZkM,aAAkD,YAAiB,EAqDrQ,CACA,CAAC,GACD,MAAe,8BCpDR,KDoDkD,EAAC,ECpDnD,KACP,MACA,OACA,qCAEA,uBAEA,CACA,OACA,kBACA,sBACA,gBACA,mBACA,gBACA,gBACA,gBACA,UACA,iBACA,gBAEA,YACA,qBACA,aACA,aACA,aACA,aACA,aACA,aACA,gBACA,eACA,gBACA,gBACA,cACA,YACA,YACA,YACA,iBACA,UACA,iBAEA,gBACA,gBACA,uBAEA,iBACA,iBACA,cACA,iBACA,mBACA,iBAEA,UACA,kBACA,iBACA,SACA,SACA,EACA,GACA,kDACA,+CACA,mDACA,mDACA,yEACA,oDACA,oDACA,uDACA,iDACA,oDACA,qDACA,EAuBA,gBAEA,MAfA,4FAEA,kBAEA,6BAEA,cAEA,oIACA,MACA,wCAKA,EALA,wBACA,CAAG,CAKH,CCnGO,cACP,6CAEO,cACP,aAAwC,YAAZ,EAAY,EACxC,CACO,OAFiC,EAEjC,KACP,aAAwC,cACxC,CA8CO,gBACP,4BAEA,mCAGA,gDACA,yBACA,0BACA,CAAK,qBACL,eACA,EAGA,CAEA,SAEO,sBACP,QACgC,KAAhC,UD0Be,OC1BiB,ED0BjB,GACf,eAqEA,GACA,6BACA,aACA,6BAGA,cACA,QAEA,CACA,WACA,EAhFA,GACA,iCACA,eAOA,GACA,cACA,cACA,SAEA,aACA,QACA,WACA,WACA,0BACA,aAEA,KACA,WACA,2CACA,qBAEA,WACA,aAEA,IACA,EADA,EACA,KACA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A,iBAEA,8BAEA,0BAEA,oBAEA,qBACA,YACA,8FAEA,OADA,oCACA,CACA,CAAG,CACH,qCACA,sCACA,EASA,eACA,sBAGA,UAIA,IACA,MACA,KAEA,CAKA,0EAQA,eAOA,MALA,kCATA,qBACA,sCACA,GAEA,6BACA,8CACA,EAIA,GAEA,uBAMA,mBAGA,SADA,kBAEA,wBAOA,0EALA,EAKA,2CAHA,WADA,2CACA,yBAFA,EAGA,CAIA,SAAS,GAAS,OAClB,IACA,GAFkB,MAElB,MACA,CAAI,cAAwB,EAC5B,oCACA,oBACA,0BACA,sCACA,UACA,cACA,gBACA,EAAM,CACN,WACA,gBACA,CACA,CAAG,2BAIH,EACA,QAJA,MAKA,YAHA,8BADA,6DACA,2BAIA,EAEA,CAEA,eACA,WACA,YACA,mGAEA,CACA,qBACA,sBACA,SAEA,MACA,iBACA,uCACA,qDACI,qBACJ,OAEA,OAEA,CACA,qBACA,sBACA,SAEA,MACA,kBACA,sBACA,OACI,oBACJ,QAEA,aAEA,CACA,eACA,IACA,UACA,wBACA,CAAI,cAAwB,EAC5B,WACA,QAGA,OAFA,eACA,2BAEA,CACA,CAYA,eACA,IACA,OACA,qBACA,aACA,CAAI,EACJ,MAEA,WACA,OACA,oBACA,CAAK,EAEL,0BAEA,wMAAgN,yBAAyB,iCAEzO,QACA,CACA,iBACA,gBAKA,OAJA,4BACA,8KACA,eAEA,CACA,CAEA,sBACA,uEACA,QAEA,kGACA,CAEA,gBAoEA,GA8DA,SAIA,2BACA,SACA,MA5BA,YACA,IACA,gBACA,CAAM,EAGN,6DACA,MAEA,sCAEA,eAlDA,GACA,IACA,OACA,aACA,CAAM,EACN,qBACA,IACA,OACA,QACA,iBACA,CAAQ,EACR,8BACA,+BACA,WAEA,kBACQ,EACR,gBACQ,EACR,0BAEA,SACA,CAAK,UACL,EA2BA,CACA,KACA,YACA,CAAK,EACL,UACA,4BAGA,YAEA,EAOA,GACA,oBACA,qBA7CA,GACA,IACA,gBACA,CAAM,EACN,iBAyCA,EACA,CAAK,EAEL,cA1CA,cACA,IACA,cACA,CAAM,EACN,CACA,cACA,CAAM,EACN,UACA,EAmCA,EA9I6C,IAAY,EAMzD,qBACA,eAGA,wCAIA,SADA,4BACA,4BAoBA,iBACA,YACA,OAEA,IACA,2BACA,CAAI,EAGJ,cAFA,4BAEA,+BACA,SAEA,QACA,SACA,QACA,SAEA,iBACA,CACA,QACA,CACA,eAGA,QACA,QACA,QACA,CAAI,KACJ,QACA,aAGA,SAqNA,iBACA,8BACA,YAGA,mBAIA,CA2DA,YAIA,eACA,cAHA,EAGA,cAHA,oBAAoC,oBAGpC,CAH0D,GAI1D,CACA,qBACA,IACA,UACA,OACA,CAAI,EACJ,KACA,KACA,0CACA,GACA,eAEA,oBACA,YACA,oNAEA,yBACA,UAEA,eACA,OACA,YACA,cACA,YACA,UACA,UACA,WACA,GACA,gBAEA,WAMA,aALA,mCACA,UAA+B,4BAC/B,WACA,eACA,CAAO,gBAAkB,MACzB,GACA,CACA,CACA,CACA,mBACA,iDACA,CACA,mBACA,QAKA,GAJA,YACA,UAGA,4BACA,OAIA,qEACA,iCACA,sBACA,UACA,KAAY,EAAqB,GACjC,gBADiC,oBACjC,sCACA,CAAO,CACP,CAAK,EAEL,MAAoB,GAAS,wCAC7B,uBACA,2BACA,SACA,CAAK,EAEL,oCACA,6BACA,iCACA,SACA,CAAK,EAEL,gBACA,kBACA,sBACA,SACA,CAAK,EAEL,gCACA,wCACA,SACA,CAAK,EAEL,4BACA,qBACA,yBACA,SACA,CAAK,EAEL,8BACA,mBACA,uBACA,SACA,CAAK,EAEL,yCACA,oBACA,wBACA,SACA,CAAK,CAGL,CAIA,iBACA,4CACA,CAmKA,iBACA,8BACA,CAIA,qBACA,IACA,WACA,qBACA,OACA,aACA,CAAI,cAAwB,EAC5B,UACA,MACA,qBACA,OACA,YACA,CAAG,EACH,sFACA,CAYA,iBACA,mBACA,kDAA2F,IAAa,IACxG,oBAEA,gBACA,eACA,+CACA,OApCA,KAoCA,oDApCA,yIAoCA,EACA,CACA,iBACA,CACA,CACA,iBACA,OA1zBA,GA0zBA,+EACA,CAmBA,eACA,iBACA,UAnFA,KAGA,mCACA,qCAvJA,KACA,IACA,gBACA,UA7mBA,GA6mBA,iBACA,mDACA,kBACA,cACA,gBACA,mCACA,MAnnBA,GAmnBA,qCACO,EACP,EACK,CACL,2BACA,WACA,aACA,cACA,gBACA,EACA,CAAI,EACJ,wBACA,8DAEA,oCACA,MACA,SACA,SACA,aAuGA,WACA,MACA,GACA,IACA,0CACA,UAGA,iCACA,GACA,SAGA,YACA,EArHA,GACA,MACA,MACA,IACA,gCACA,CAAQ,GAOR,IANA,IAMA,KACA,SACA,gVACA,WACA,KACA,MACA,CAiBA,GAVA,kBAMA,2BACA,CAAS,EAGT,EACA,MAMA,GACA,CACA,EAAM,IACN,IACA,IACA,CAAQ,SACR,KACA,MACA,CACA,mBACA,IACA,mBACA,CAAQ,KACR,aACA,aACA,GACA,CACA,gBACA,KACA,gBACA,IACA,iBACA,gBAEA,EACA,KAEA,IAEA,CACA,aACA,QAKA,UALA,EACA,gVAEA,OADA,WACA,IACA,CAGA,CACA,aACA,iBACA,IACA,eA/uBA,GACA,IAEA,OADA,wCACA,GACA,EAAI,OACJ,uCACA,CACA,EAwuBA,EACA,4CACA,YACA,WACA,aACA,SACA,CAAW,KACX,aACA,GACA,CAAW,GAEX,SAGA,CAAQ,SAER,GACA,CACA,CAgBA,CAAG,CACH,GAKA,GACA,kBACA,KACG,GACH,EA2EA,IACA,SACK,CACL,YACA,KACK,CAEL,CACA,4BACA,kDAA6F,IAAe,IAC5G,oBAEA,gBACA,EACA,8BACA,CAAI,EAAI,cACR,SACA,cACA,+BACA,wBAEA,CACA,QACA,EACA,wBACA,kDAA6F,IAAe,IAC5G,oBAEA,gBACA,EACA,8BACA,CAAI,EAAI,cACR,gBAGA,4BACA,MACA,4CACA,CAAK,IACL,GAEA,0BAEA,sBACA,gBAEA,CACA,QACA,EAKA,mBACA,iCACA,WAvEA,GACA,kDAA+F,IAAe,IAC9G,oBAEA,MAmEA,EAnEA,QACA,aACA,MAt0BA,GAs0BA,6BAEA,QACA,EA+DA,UACA,qBAIA,SAHA,6CAGA,EAFA,2BACA,wBACA,CA8BA,uBACA,IACA,WACA,OACA,qBACA,aACA,CAAI,cAAwB,EAC5B,UACA,MACA,qBACA,OACA,YACA,CAAG,EAEH,OA1BA,qDACA,EACA,OACA,iBACA,IACG,WACH,IACA,cACA,CAAM,EACN,eACA,CAAG,EAgBH,WACA,IACA,OACA,cACA,CAAM,EACN,iBACA,CAAG,UACH,IACA,OACA,CAAM,EACN,QACA,CAAG,CACH,EACA,mBACA,IACA,eACA,WACA,qBACA,OACA,aACA,CAAI,cAAyB,EAC7B,KACA,cACA,MACA,qBACA,OACA,YACA,CAAG,EAmCH,0BAlCA,8CACA,iDACG,eACH,MAAsB,GAAS,KAC/B,SAD+B,CAE/B,CAAK,EACL,yCACA,+CACA,qBAEA,CAAK,EACL,iDAkBA,OAjBA,sBACA,UAEA,YACA,kBACA,YACA,UAEA,aACA,cACA,YACA,sBACA,SAGA,CAAO,EAEP,CACA,CAAG,iCACH,QACA,YACA,CAAG,KACH,uBACA,EASA,iBACA,kDAAyF,IAAa,IACtG,oBAEA,mBACA,cACA,mBACA,aACA,gBAYA,cACA,4BACA,MACA,YAEA,sCACA,qCACA,GAnBA,qBACA,YACA,MA3gCA,GA2gCA,+TAEA,uNAEA,CACA,CADM,KACN,mEAEA,CACA,QACA,EAWA,yDACA,iCACA,aACA,gCACA,6BACA,2BACA,wBACA,6BAEA,cACA,0CAAsE,IAAa,IACnF,kBAGA,OADA,QACA,sBACA,EAGA,6BACA,uBAHA,kEACA,qEAIA,mBACA,IACA,eACA,WACA,qBACA,OACA,0BACA,aACA,CAAI,cAAwB,EAC5B,KACA,cACA,MACA,qBACA,OACA,YACA,CAAG,EACH,KAIA,MAHA,4CACA,QAEA,4CAEA,sDACA,EAsBA,6BACA,uBAtBA,mDACA,gBACA,Y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GA7kCA,cACA,IACA,SACA,qBACA,CAAI,EAKJ,sBAJA,SA/BA,KACA,IACA,YACA,CAAI,cAAwB,EAI5B,OAHA,cACA,qEACA,EACA,aACA,oBACG,cAQH,CALA,uBACA,6CAEA,OAEA,mCACA,KACA,eACA,EAAM,CACN,KACA,OACA,CAAK,IACF,EAAI,CACP,EAMA,GACA,QACA,CAAG,GAEH,WACA,SACA,mBACA,CAAG,UACH,WACA,iBAcA,iBAbA,UACA,eAAqC,EAAqB,GAC1D,gBAD0D,oBAC1D,uCACO,SACP,6BACA,EAIA,KAHA,gBAAqD,EAA4B,GACjF,uBADiF,aACjF,uCACS,SACT,EAEA,MACA,CAAK,eACL,QACA,CAAG,YACH,EA+iCA,GACA,SACA,6BACA,CAAK,CACL,CAAG,EAIH,EAFA,aACA,OACA,qPAEA,gCAGA,sIAkBA,mFAfA,WACA,GACI,mBACJ,oBAEA,sBAGA,WACA,GACI,mBACJ,2BAEA,4BAEA,gBACA,GAIA,0BACA,cACA,0CAAsE,IAAa,IACnF,kBAGA,OADA,QACA,aACA,EAGA,6BACA,uBAHA,wDACA,2DAIA,sBACA,eACA,uBACA,oBACA,qBACA,kBACA,sBACA,mBACA,0BACA,6BACA,wBACA,2BACA,4BACA,yBACA,eACA,kBACA,aACA,gBACA,iBACA,cACA,uBACA,0BACA,qBACA,wBACA,yBACA,sBACA,kBACA,qBACA,gBACA,mBACA,oBACA,iBACA,gBACA,mBACA,cACA,iBACA,kBACA,eACA,eACA,kBACA,gBACA,aACA,iBACA,cACA,iBACA,oBACA,eACA,kBACA,mBACA,eACA,CAAC,EA0BD,IA8CA,IAEA,MACA,2BACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,KACA,2BACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,OACA,2BACA,aACA,WACA,cACA,WACA,CACA,CAAG,CAEH,gBACA,6BACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,kBACA,6BACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,mBACA,6BACA,aACA,WACA,cACA,WACA,CACA,CAAG,CAEH,SACA,0BACA,aACA,WACA,cACA,WACA,WACA,CACA,CAAG,CACH,UACA,0BACA,aACA,WACA,cACA,WACA,WACA,CACA,CAAG,CACH,OACA,0BACA,aACA,WACA,cACA,WACA,WACA,CACA,CAAG,CAEH,OACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,MACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,SACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,UACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CAEH,QACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,OACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,QACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,OACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CAEH,OACA,uBACA,aACA,WACA,cACA,SACA,WACA,CACA,CAAG,CACH,aACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,UACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,MACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,SACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,UACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,UACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,MACA,sBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,YACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,YACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,UACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,SACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CAEH,QACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CAEH,aACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,UACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,YACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CAEH,QACA,oBACA,aACA,WACA,aACA,CACA,CAAG,CACH,QACA,oBACA,aACA,WACA,aACA,CACA,CAAG,CAEH,OACA,uBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CAEH,OACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,gBACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,gBACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,WACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,OACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,YACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,gBACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,WACA,0BACA,aACA,WACA,aACA,CACA,CAAG,CACH,OACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,MACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,UACA,0BACA,aACA,WACA,aACA,CACA,CAAG,CACH,YACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,QACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,YACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,cACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CAEH,MAKA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,OACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CAEH,gBACA,2BACA,aACA,WACA,aACA,CACA,CAAG,CACH,cACA,2BACA,aACA,WACA,aACA,CACA,CAAG,CACH,oBACA,2BACA,aACA,WACA,aACA,CACA,CAAG,CAEH,kBACA,4BACA,aACA,WACA,aACA,CACA,CAAG,CACH,eACA,4BACA,aACA,WACA,aACA,CACA,CAAG,CACH,eACA,4BACA,aACA,WACA,aACA,CACA,CAAG,CACH,iBACA,4BACA,aACA,WACA,aACA,CACA,CAAG,CAEH,aACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,cACA,yBACA,aACA,WACA,aACA,CACA,CAAG,CACH,aACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,aACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,WACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,eACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,YACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,cACA,yBACA,aACA,WACA,aACA,CACA,CAAG,CACH,mBACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CACH,oBACA,yBACA,aACA,WACA,cACA,WACA,CACA,CAAG,CAEH,UACA,0BACA,aACA,WACA,aACA,CACA,CAAG,CAEH,SACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,QACA,kBACA,aACA,WACA,aACA,CACA,CAAG,CACH,UACA,gCACA,aACA,WACA,aACA,CACA,CAAG,CACH,UACA,gCACA,aACA,WACA,aACA,CACA,CACA,EACA,IACA,sBACA,EAEA,iBACA,OA7vEA,GA6vEA,kBACA,MACA,yEAEA,MACA,mFAEA,yBACA,CAAG,CACH,CACA,qBACA,IAmCA,EAnCA,CACA,oBACA,iBACA,CAAI,cAAwB,EAC5B,MACA,8EAEA,OACA,KACA,MAEA,CACA,QACA,QACA,QACA,KACA,CAAM,GACN,CAAI,CACJ,aACA,SA0EA,KACA,IACA,MACA,CAAI,+CAEJ,CACA,MACA,CAAI,gCAHJ,yBAGI,aACJ,YACA,iBAIA,KACA,iBAEA,6DAGA,EA7FA,KAEA,YAIA,iCACA,gBACA,cACA,YACA,OACA,CAAK,EAEL,mBACA,WACA,gBAGA,wBACA,iBACI,CAEJ,4BACA,IACA,UACA,aACA,SACA,KACA,CAAM,EACN,qBACA,2BACA,SACA,CAAK,CACL,CAwBA,MArBA,iCACA,YACA,WACA,qBAEA,kCACA,2BACA,mDACA,2BACA,WACa,EACb,GACW,mBACX,CAAS,EAET,2BACA,OACA,CAAS,EAGT,CAAG,EACH,CACA,CACA,4BACA,IACA,YACA,cACA,CAAI,MACJ,iBACA,wBACA,YACA,aACA,CAAG,EACH,6BACA,CAAC,EAwBD,4BACA,YACA,iBACA,0BACA,CACA,CAAC,EAmCD,QACA,MApBA,4DAqBA,wBApBA,gBAPA,EAYA,GAJA,YACA,aAGA,wBACA,uEACA,MACA,CAEA,iBACA,+DACA,MACA,CACA,MAjBA,2CAJA,EAqBA,YApBS,iCAAsC,GAH/C,oCAyBA,OADA,mDACA,CACA,CAIA,CACA,6CAv6BA,gBAOA,OANA,YACA,OAEA,YACA,OAEA,8BACA,WAEA,OADA,oBACA,CACA,CAAG,GACH,EA45BA,oDAIA,UACA,4JACA,EACA,GACC,gCC3xFD,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,oBAA4B,CA+B5B,SACA,EACA,EACA,EACA,EACA,EACA,EAGA,QAEA,SACA,WAEA,YACA,kBACA,iBAEA,eACA,QACA,WACA,E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KACA,+DAKA,4CAEA,yBACA,QAEA,uBACA,iBACA,SACA,aACA,gCAEA,CA2BA,uBACA,EAIA,uCAHA,YAIA,CAEA,cACA,wCACA,CAEA,cACA,uBACA,CAMA,oBACA,kBACA,WAGA,cACA,kBAGA,YACA,aAGA,eAEA,gBACA,OA3CA,UA2CA,EA3CA,gBA2CA,GAGA,gBACA,OA3CA,UAAmB,EAAI,IA8CvB,uBACA,EACA,kCAGA,UAGA,kBACA,cAGA,gBACA,YAGA,sBAEA,uBACA,WAAsB,EAGtB,uBACA,WAAsB,EAItB,yBACA,iCAEA,OAGA,sBACA,KAGA,oBACA,kBAAiC,KAAK,YAGtC,qBACA,KAGA,sBACA,EAEA,oCAAgE,YAGhE,UAGA,mBACA,KAGA,IACA,CAMA,WACA,EACA,EACA,EACA,EACA,EACA,GAEA,qBACA,mBAGA,cACA,QACA,qBACA,QAEA,GACA,cACA,IACA,UACA,6BACA,GAEA,gCAGA,sBAEA,yBACA,EACA,cACA,oBACA,IACA,qBACA,EACA,EACA,EACA,EACA,EACA,GAEA,IAGA,sBA/KA,yBA+KA,GA9KA,sBA8KA,GA7KA,0BA6KA,GA5KA,0BA4KA,GA3KA,uBA2KA,GA1KA,wBA0KA,GAzKA,wBAyKA,GAxKA,wBAwKA,GAvKA,+BAuKA,GAtKA,yBAsKA,GArKA,yBAqKA,EACA,EACA,2BACA,GACA,GACA,oDAEA,uBADA,EACA,EACA,IACA,qBACA,EACA,EACA,EACA,EACA,EACA,GAEA,IAGA,mBACA,EACA,QACA,MAAc,EACd,2BACA,YACA,EACA,EACA,EACA,EACA,EACA,QAEA,EAAY,EAGZ,mBACA,EACA,QACA,MAAc,EACd,0BACA,WACA,EACA,EACA,EACA,EACA,GAEA,EAAY,EAIZ,QACA,aACA,GACA,GACA,uCAEA,SADA,EACA,EACA,EAAU,EACV,4BACA,EACA,EACA,EACA,EACA,EACA,GAEA,EAAU,CACV,CAMA,wBACA,MAEA,IACA,EAPA,kBAQA,yBACA,QACA,EACA,gBACA,IACA,iBACA,OACA,EACA,mBAEA,CAAW,CACX,CACA,2BACA,UACA,uBACW,CACX,SAEA,CAAI,SACJ,8BACA,CAEA,sBACA,YACA,yEAA+E,SAAe,KAI9F,QACA,CAEA,gBACA,YAAkB,WAAoB,IACtC,IACA,gBACA,YAEM,SACN,8BACA,CAGA,WACA,CAEA,wBACA,qBAEA,YACA,sBAGA,QACA,EACA,oBACA,cACA,uBAGA,SACA,EAGA,EACA,EACA,EACA,EACA,EACA,EACA,EAEA,CAEA,OACA,eACA,gBACA,cACA,WACA,aACA,EACA,iBACA,GACA,cACA,mBACA,eACA,gBACA,aACA,SACA,aACA,OACA,WACA,uBACA,qBACA,OACA,EA6BA,KACA,iBACA,MACA,6BACA,WACA,KACA,kBAEA,GACA,GACA,0BACA,wBAEA,YAEA,YACA,4CAAoD,EAAI,iBAAiB,EAAM,iCAI/E,QACA,CAAG,sBAEH,MACA,iBACA,MACA,SACA,OACA,EACA,GACG,qBAEH,KACA,gCACA,oBACA,oBAEA,KACA,0BACA,cACA,cAEA,KACA,2BACA,eACA,eAEA,MACA,MAEA,OACA,WACA,yBACA,aACA,aACA,OACA,eACA,KACA,IACA,YACA,oCACA,cACA,cACA,iBACA,kBACA,OACA,SACA,GA+BA,OA7BA,qBACA,SACA,UA2BA,aAzBA,SACA,uBACA,WACA,WACA,IACA,8BACA,QACA,sBACA,UACA,UACA,oBACA,UACA,QACA,OACA,wBACA,YACA,EAEA,uBACA,+BACA,6BACA,CACA,EAsCA,GACA,4BACA,sBACA,wBACA,qBACA,oBACA,uBACA,4BACA,EACA,IAAe,iCChlBf,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,IAAY,CAAG,WAAiB,CAAG,SAAe,QAElD,MAAmB,EAAQ,KAAgB,EAE3C,EACA,QAH0B,KAG1B,kBACA,WACI,WACJ,EACI,yBACJ,KACI,2BACJ,OAEA,0BAIA,0CACA,MACA,4BACA,gCACA,QAGA,kBACA,yBAEA,oBACA,GACA,yB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A,gCC3EA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,IAAY,CAAG,WAAiB,CAAG,SAAe,QAElD,MAAc,EAAQ,KAAc,EAYpC,UAZqB,wBAcrB,MACA,IACA,6DACA,CAAI,MACJ,QACA,CACA,EAEA,MACA,yBACA,UAAS,aAAmB,EAC5B,EACA,qCACA,KACA,OACA,OACA,gBACA,mBACA,sBACA,8BAEA,EAEA,MACA,MAEA,MACA,SACA,OACA,0BACA,WACA,OACA,aAEA,EAYA,cACA,uBAXA,MAAY,GAcZ,sBACA,GAZA,IAYA,EAZA,SAaA,gCAGA,GA3DA,IA2DA,EAZA,SAaA,mCAGA,WACA,mBACA,8BAEA,eACA,8BAGA,mBACA,EACA,iBACA,KACA,GACA,yBACA,eACA,OACA,KACA,GACA,wCACA,kBACA,GACW,EAAI,EACf,EACA,WACA,EACA,EACA,GAEA,oBACA,qDACA,EACA,WACA,EACA,EACA,GAEA,EACA,EAEA,EAEA,WAAiB,GAMjB,SAAe,CALf,CACA,YACA,MACA,gCC3HA,qCAA6C,CAC7C,QACA,CAAC,EACD,MAAY,CAAG,WAAiB,CAAG,SAAe,QAElD,MAAmB,EAAQ,KAAgB,EAa3C,UAb0B,wBAoB1B,oBAEA,eAKA,GACA,EACA,EACA,EACA,EACA,EACA,EACA,IAEA,eACA,QACA,UAGA,2BACA,YACA,EACA,EACA,EACA,EACA,GAEA,EAAQ,EAuBR,CAvBW,CAuBX,CACA,EACA,EACA,EACA,EACA,EACA,KAIA,2BACA,qBACA,KACA,OAGA,2BACA,SArCA,GACA,QACA,OACA,OACA,qBACA,mBACA,OACA,QACA,mBAEA,CAEA,OACA,QACA,YACA,CACA,CACA,CACA,EAmBA,GACA,EACA,EACA,EACA,EACA,GAEA,EAAU,CACV,EAEA,kBACA,qBAEA,eACA,KAGA,EA/FA,0BA+FA,CAEA,OAGA,oBACA,2BACA,YACA,EACA,EACA,EACA,EACA,GA7FA,GA+FA,EACA,EAAQ,EAKR,OAGA,UACA,UACA,eACA,YACA,0BACA,WACA,EACA,EACA,EACA,EACA,GAlHA,GAoHA,EACA,GAEA,EAEA,GACA,EACA,EACA,EACA,EACA,EACA,EACA,IAEA,eACA,QACA,UAGA,0BACA,WACA,EACA,EACA,EACA,EACA,GAEA,IAEA,iBACA,EA/JA,wBA+JA,CACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,yBAIA,EA7KA,yBA6KA,CACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,QAIA,EAlLA,wBAkLA,CACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,yBAIA,EA7LA,0BA6LA,CACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,SAIA,EA3MA,wBA2MA,CACA,eAGA,eAIA,WAAiB,GAEjB,SACA,GACA,QA9NA,6BA8NA,SAzNA,2BAyNA,CAzNuD,CA2NvD,MAAY,GAMZ,SAAe,CALf,CACA,YACA,MACA,gCClPA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,IAAY,CAAG,WAAiB,CAAG,SAAe,QAElD,eAaA,KACA,mBACA,SAEA,sDACA,OAAY,WAEZ,QAPA,QAQA,eACA,gBAEA,SACA,EACA,uDACA,eACA,6DACA,QACA,qCACA,IACA,mBACA,6BAEA,SAEA,CAMA,OAJA,YACA,GACA,WAEA,CACA,EA5CsC,EAAQ,KAAU,GAExD,EAAc,EAAQ,KAAc,EAEpC,UAFqB,CAErB,GACA,0CACA,kBACA,cACA,qBACA,YACA,EAAG,GACH,CA2CA,iBACA,iBACA,cACA,MACA,CAAK,EACD,iBACJ,UAGA,GAGA,MACA,aAEA,sBACA,SAGA,wBACA,wCAGA,mBACA,uBAGA,mBACA,uBAGA,iCACA,0BACA,yBAGA,0BACA,yBAGA,sBACA,iBACA,qBAGA,8CACA,aACA,oBACA,YACA,CAEA,gBACA,MACA,mDACA,iCACA,CACA,CAEA,iBACA,EAEA,MACA,UAAS,GAAO,EAChB,sBACA,yCACA,MACA,EAEA,iBACA,eACA,iCACA,mBACA,KACA,iBACA,KACA,QACA,EACA,WACA,EACA,EACA,GAEA,oBACA,oBACA,EACA,WACA,EACA,EACA,GAEA,EACA,GAGA,WAAiB,GAEjB,iCAEA,MAAY,GAMZ,SAAe,CALf,CACA,YACA,MACA,gCCjKA,qCAA6C,CAC7C,QACA,CAAC,EACD,MAAY,CAAG,WAAiB,CAAG,SAAe,QAElD,MAAc,EAAQ,KAAc,EAEpC,EACA,QAHqB,KAGrB,kBACA,WACI,WACJ,EACI,yBACJ,KACI,2BACJ,OAEA,0BAIA,0CACA,MACA,4BACA,yBACA,UAEA,MACA,UAAS,GAAO,EAChB,SACA,eACA,yBACA,OACA,IAGA,iBACA,eACA,mCACA,mBACA,OACA,QACA,iBACA,KACA,QACA,EACA,WACA,EACA,EACA,GAEA,GACA,WACA,oBACA,WACA,EACA,WACA,EACA,EACA,GAEA,GACA,EACA,GAGA,WAAiB,GAEjB,0BAEA,OAAY,GAMZ,SAAe,CALf,CACA,YACA,MACA,8BC1EA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,CAQf,YACA,2BAAgC,qBAAsB,EACtD,gCCbA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,SAAiB,CACf,YAAkB,CAClB,oBAA0B,CAC1B,cAAoB,CACpB,cAAoB,CACpB,eAAqB,CACvB,OAEA,eAEA,GACA,0BAAwC,UACxC,EAJyC,EAAQ,KAAc,GAiD/D,SAjDgD,GAiD9B,CApClB,kBACA,iBACA,WACA,SACA,QACA,WACA,eAeA,MAbA,qBACA,sBACA,GACA,eACA,EACA,EACA,eACA,GAGA,IAAoB,MAAgB,GAIpC,eACA,EACA,YACA,EACA,aACA,IACA,aACA,EACA,cAEK,EACL,QACA,EAgBA,CAhBG,CAgBH,aAAqB,CAZrB,eACA,EACA,IACA,GACA,eACA,EACA,oBACA,OACA,eAEA,SAIA,cACA,uBACA,OACA,iCAIA,WAAiB,GAgBjB,cAAoB,CAdpB,QACA,uBACA,OACA,OACA,UACA,iBACA,S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A,CAAC,mBACD,eACA,CAAC,oBACD,cACA,CAAC,oBACD,cACA,CAAC,mBACD,cACA,CAAC,oBACD,aACA,CAAC,mBACD,aACA,sDACC,uBACD,aACA,CAAC,uBACD,aACA,CAAC,mBACD,SACA,CAAC,oBACD,cACA,CAAC,sBACD,iBACA,uDACC,wBACD,SACA,CAAC,oBACD,eACA,iBACA,CAAC,kBACD,aACA,CAAC,mBACD,eACA,iBACA,CAAC,oBACD,aACA,uDACC,kBACD,eACA,iBACA,CAAC,mBACD,aACA,oCACC,wBACD,aACA,CAAC,iBACD,aACA,CAAC,sBACD,aACA,CAAC,iBACD,cACA,CAAC,gBACD,aACA,oCACC,iBACD,cACA,CAAC,qBACD,cACA,CAAC,2BACD,cACA,CAAC,uBACD,aACA,6CACC,gBACD,aACA,CAAC,uBACD,aACA,CAAC,oBACD,cACA,CAAC,mBACD,eACA,CAAC,oBACD,cACA,CAAC,oBACD,iBACA,4CACA,CAAC,oBACD,cACA,CAAC,2BACD,aACA,CAAC,oBACD,cACA,CAAC,oBACD,cACA,CAAC,mBACD,cACA,CAAC,oBACD,eACA,iBACA,CAAC,mBACD,cACA,CAAC,gBACD,aACA,iDACC,oBACD,aACA,CAAC,oBACD,aACA,CAAC,oBACD,aACA,CAAC,qBACD,aACA,CAAC,GACD,GACA,mBACA,QACA,CAAG,CACH,oBACA,IAEA,EAFA,8DACA,EA7HA,cAAyD,sEAAiF,OAAW,+BAAwH,SAAgB,QAAW,eAAyB,OAAS,wBAAwB,aAA4B,SAAc,MAAS,iBAA+B,eAAuB,QAAY,MAAY,yJAAgK,gBAAkD,OAAS,aAAkB,YAAkB,cAAoB,eAAoD,OAA9B,SAA8B,EAAc,eAAuB,KAAe,IAAY,cAAoB,IAAM,+BAA2D,OAAU,iBA6Hz8B,GAEA,IACA,UAA0B,gBAA8B,EACxD,mBACA,OACA,OACA,eACA,CACA,CAAM,SACN,MACA,EAAM,OACN,KACA,CACA,CAAG,CACH,gBACA,yBACA,eACA,CAAK,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AC,eACD,WACA,CAAC,iBACD,WACA,CAAC,aACD,WACA,CAAC,WACD,WACA,CAAC,aACD,WACA,CAAC,WACD,WACA,CAAC,YACD,WACA,CAAC,eACD,WACA,CAAC,SACD,WACA,CAAC,SACD,WACA,CAAC,SACD,WACA,CAAC,SACD,WACA,CAAC,SACD,WACA,CAAC,SACD,WACA,CAAC,WACD,WACA,CAAC,aACD,WACA,CAAC,aACD,WACA,CAAC,SACD,WACA,CAAC,WACD,WACA,CAAC,QACD,WACA,CAAC,aACD,WACA,CAAC,UACD,WACA,CAAC,YACD,WACA,CAAC,UACD,WACA,CAAC,UACD,WACA,CAAC,aACD,WACA,CAAC,YACD,WACA,CAAC,aACD,WACA,CAAC,SACD,WACA,CAAC,WACD,WACA,CAAC,WACD,WACA,CAAC,UACD,WACA,CAAC,WACD,WACA,CAAC,cACD,WACA,CAAC,WACD,WACA,CAAC,eACD,WACA,CAAC,WACD,WACA,CAAC,YACD,WACA,CAAC,UACD,WACA,CAAC,cACD,WACA,CAAC,eACD,WACA,CAAC,aACD,WACA,CAAC,SACD,WACA,CAAC,eACD,WACA,CAAC,aACD,WACA,CAAC,aACD,WACA,CAAC,QACD,WACA,CAAC,YACD,WACA,CAAC,cACD,WACA,CAAC,UACD,WACA,CAAC,eACD,WACA,CAAC,QACD,WACA,CAAC,SACD,WACA,CAAC,SACD,WACA,CAAC,UACD,WACA,CAAC,WACD,WACA,CAAC,QACD,WACA,CAAC,WACD,WACA,CAAC,aACD,WACA,CAAC,cACD,WACA,CAAC,aACD,WACA,CAAC,YACD,WACA,CAAC,aACD,WACA,CAAC,aACD,WACA,CAAC,WACD,WACA,CAAC,aACD,WACA,CAAC,aACD,WACA,CAAC,YACD,WACA,CAAC,UACD,WACA,CAAC,cACD,WACA,CAAC,UACD,WACA,CAAC,YACD,WACA,CAAC,YACD,WACA,CAAC,SACD,WACA,CAAC,eACD,WACA,CAAC,YACD,WACA,CAAC,SACD,WACA,CAAC,YACD,WACA,CAAC,WACD,WAC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ECpBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwBf,SAAe,CAvBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,oBACA,CAAG,CACH,kBACA,SACA,YACA,CAAK,CACL,eACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,kCACA,8BCzBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAqBf,SAAe,CApBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,qBACA,oBACA,CAAG,CACH,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,mECrBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA6Cf,SAAe,CA5Cf,CACA,YACA,0BACA,gBACA,0BACA,YACA,mBACA,OACA,mBACA,iBACA,qBACA,oBACA,wBACA,oBACA,uBACA,mBACA,oBACA,mBACA,yBACA,kBACA,uBACA,iBACA,iBACA,qBACA,2BACA,CAAG,CACH,kBACA,SACA,WACA,CAAK,CACL,cACA,CAAG,EACH,SACA,WACA,CAAK,CACL,oBACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,2CC7CA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAgCf,SAAe,CA/Bf,CACA,YACA,0BACA,gBACA,0BACA,YACA,mBACA,QAAW,CACX,kBACA,SACA,kBACA,CAAK,CACL,YACA,CAAG,EACH,SACA,YACA,CAAK,CACL,YACA,CAAG,EACH,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,mEChCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,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ACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,2BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,yBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,iFCzBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,kCACA,CAAK,CACL,aACA,CAAG,EACH,wCACA,yCACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,8BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,4CACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,yBACA,mBACA,CAAG,CACH,kBACA,SACA,2BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,iFCzBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,yBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6EC5BA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,4BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,uBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,qDACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,wBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,+CACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,yBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,uFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,4BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6EC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,oCACA,qCACA,yBACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,2BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,wCACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,4EC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,wBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuBf,SAAe,CAtBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6EC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,gDACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,yBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,mDACA,8BC1BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,uBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,uEACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,8BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,yBACA,mBACA,CAAG,CACH,kBACA,SACA,yBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,gFCzBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,wBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,sDACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA2Bf,SAAe,CA1Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,2BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,+EC3BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,2BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,qGC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,sBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,yBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,2BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,qBACA,8BCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,qBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,4EC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,0BACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,iFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,sBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,oFC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,qBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,uEACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsCf,SAAe,CArCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,kBACA,SACA,sBACA,CACA,CAAG,EACH,cACA,SACA,UACA,CACA,CAAG,EACH,cACA,SACA,cACA,CACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA0Cf,SAAe,CAzCf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,kBACA,SACA,wBACA,CACA,CAAG,EACH,cACA,SACA,YACA,CACA,CAAG,EACH,cACA,SACA,UACA,CACA,CAAG,EACH,kBACA,SACA,sBACA,CACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,oFC1CA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuBf,SAAe,CAtBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,mFCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,uBACA,CAAG,CACH,kBACA,SACA,YACA,CAAK,CACL,eACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECzBA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,YACA,CAAK,CACL,eACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,oHCtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,6BACA,qBACA,yBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,wCACA,CACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,mEC5BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,cACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,8ECzBA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAuBf,SAAe,CAtBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,2CACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,iBACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,4ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAoEf,SAAe,CAnEf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,aACA,YACA,cACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,YACA,aACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,YACA,aACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,YACA,cACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,SACA,cACA,CAAK,CACL,eACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,4CACA,8BCrEA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,cACA,CAAK,CACL,aACA,CAAG,EACH,6CACA,8CACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,oBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,sDACA,SACA,CAAK,CACL,aACA,CAAG,EACH,2BACA,4BACA,yBACA,gBAAmB,CACnB,6EC5BA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAwCf,SAAe,CAvCf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,oBACA,yBACA,qBACA,oBACA,qBACA,oBACA,CAAG,CACH,kBACA,SACA,aACA,YACA,gBACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,mBACA,CAAG,CACH,wECxCA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA0Cf,SAAe,CAzCf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,gBACA,CAAG,CACH,kBACA,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,aACA,WACA,CAAO,EACP,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,aACA,gBACA,CAAO,EACP,SACA,CAAK,CACL,aACA,CAAG,EACH,2BACA,4BACA,yBACA,gBAAmB,CACnB,iNC1CA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAuHf,SAAe,CAtHf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,6BACA,yBACA,yBACA,oBACA,qBACA,qBACA,wBACA,yBACA,CAAG,CACH,kBACA,SACA,aACA,oBACA,WACA,CAAO,EACP,YACA,aACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,WACA,CAAO,EACP,YACA,cACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,WACA,CAAO,EACP,YACA,WACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,WACA,CAAO,EACP,YACA,YACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,WACA,CAAO,EACP,YACA,WACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,WACA,CAAO,EACP,YACA,WACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,0BACA,eACA,CAAO,EACP,0BACA,WACA,CAAO,EACP,8GACA,aACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,eACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,qBACA,uBACA,CAAG,CACH,wECvHA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA0Cf,SAAe,CAzCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,iBACA,CAAO,EACP,6GACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,sBACA,CAAO,EACP,6GACA,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC3CA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuBf,SAAe,CAtBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,2CACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,kCACA,8BCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAmBf,SAAe,CAlBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,oBACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,oFCnBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA0Bf,SAAe,CAzBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,wCACA,CACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,mEC1BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,oCACA,gBAAmB,CACnB,oFCjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,+CACA,8BCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Cf,SAAe,CA3Cf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,aACA,oBACA,iBACA,CAAO,EACP,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,sBACA,CAAO,EACP,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,WACA,CAAO,EACP,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BC7CA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAkHf,SAAe,CAjHf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,QACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,QACA,CAAK,CACL,aACA,CAAG,EACH,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,SACA,0IACA,aACA,CAAK,CACL,aACA,CAAG,EACH,SACA,0IACA,aACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,SACA,QACA,CAAK,CACL,aACA,CAAG,EACH,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,SACA,QACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,cACA,CAAK,CACL,aACA,CAAG,EACH,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,QACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,qCACA,8BCnHA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAoBf,SAAe,CAnBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,4BACA,oBACA,CAAG,CACH,mBACA,sBACA,uBACA,mDACA,gBAAmB,CACnB,uHCpBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAgCf,SAAe,CA/Bf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,yBACA,qBACA,qBACA,oBACA,qBACA,qBACA,oBACA,CAAG,CACH,kBACA,SACA,gGACA,SACA,CAAK,CACL,aACA,CAAG,EACH,2BACA,4BACA,yBACA,gBAAmB,CACnB,0GChCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwCf,SAAe,CAvCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,6BACA,oBACA,CAAG,CACH,kBACA,SACA,cACA,CAAK,CACL,aACA,CAAG,EACH,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,SACA,cACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,+CACA,8BCzCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAmDf,SAAe,CAlDf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,gBACA,CAAG,CACH,kBACA,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,gBACA,CAAG,CACH,mDACA,8BCpDA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwCf,SAAe,CAvCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,aACA,oBACA,UACA,CAAO,EACP,UACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,0BACA,UACA,CAAO,EACP,UACA,CAAK,CACL,aACA,CAAG,EACH,SACA,eACA,CAAK,CACL,YACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECxCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,+CACA,8BCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuCf,SAAe,CAtCf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,qBACA,oBACA,CAAG,CACH,kBACA,SACA,aACA,oBACA,WACA,CAAO,EACP,QACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,WACA,CAAO,EACP,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0ECvCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAgCf,SAAe,CA/Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,qCACA,gBAAmB,CACnB,6EChCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA0Df,SAAe,CAzDf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,yBACA,qBACA,oBACA,4BACA,qBACA,qBACA,6BACA,CAAG,CACH,kBACA,SACA,aACA,mBACA,WACA,CAAO,EACP,2DACA,aACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,eACA,CAAO,EACP,aACA,CAAK,CACL,aACA,CAAG,EACH,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,eACA,CAAG,EACH,sBACA,uBACA,sDACA,gBAAmB,CACnB,yIC1DA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAgCf,SAAe,CA/Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,kBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,8FACA,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,eACA,CAAG,EACH,wCACA,yCACA,yBACA,gBAAmB,CACnB,+CACA,8BCjCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAmBf,SAAe,CAlBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,oBACA,CAAG,CACH,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,+CACA,8BCpBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,6BCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA0Bf,SAAe,CAzBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,mBACA,OACA,yBACA,mCACA,uBACA,CAAG,CACH,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6EC1BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,+CACA,6BClBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,+CACA,8BCvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuCf,SAAe,CAtCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,6BACA,CAAG,CACH,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,eACA,CAAG,EACH,SACA,cACA,CAAK,CACL,YACA,CAAG,EACH,sBACA,uBACA,wJACA,gBAAmB,CACnB,yICvCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwBf,SAAe,CAvBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,+BACA,CAAG,CACH,kBACA,SACA,cACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,wJACA,gBAAmB,CACnB,yHACA,8BCzBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsCf,SAAe,CArCf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,qBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,gBACA,CAAK,CACL,aACA,CAAG,EACH,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,8CACA,+CACA,yBACA,gBAAmB,CACnB,0ECtCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwBf,SAAe,CAvBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,QAAW,CACX,kBACA,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,8CACA,+CACA,yBACA,eACA,mBACA,CAAG,CACH,8HCxBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwBf,SAAe,CAvBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,QAAW,CACX,kBACA,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,8CACA,+CACA,yBACA,eACA,mBACA,CAAG,CACH,0MCxBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA4Bf,SAAe,CA3Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,sBACA,sBACA,mBACA,CAAG,CACH,kBACA,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,oBACA,CAAG,CACH,6CACA,8BC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFCtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,YACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,2CCjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuCf,SAAe,CAtCf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,oBACA,qBACA,oBACA,uBACA,CAAG,CACH,kBACA,SACA,WACA,CAAK,CACL,eACA,CAAG,EACH,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,uBACA,CAAG,CACH,0CACA,8BCxCA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,QACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA0Bf,SAAe,CAzBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,aACA,WACA,QACA,CAAO,EACP,UACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,qCACA,6BC3BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA6Bf,SAAe,CA5Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,CAAG,CACH,kBACA,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,iGC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAgCf,SAAe,CA/Bf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,oBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,aACA,YACA,aACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,mBACA,CAAG,CACH,0CACA,8BCjCA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QA2Bf,SAAe,CA1Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,yBACA,oBACA,qBACA,oBACA,CAAG,CACH,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,kCACA,gBAAmB,CACnB,yIC3BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuCf,SAAe,CAtCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,aACA,oBACA,iBACA,CAAO,EACP,cACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,oBACA,sBACA,CAAO,EACP,cACA,CAAK,CACL,aACA,CAAG,EACH,SACA,oDACA,CACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wFCvCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA8Bf,SAAe,CA7Bf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,qBACA,kBACA,qBACA,qBACA,qBACA,mBACA,CAAG,CACH,kBACA,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,0DACA,2DACA,6EACA,gBAAmB,CACnB,yGC9BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAgCf,SAAe,CA/Bf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,QAAW,CACX,kBACA,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,+CACA,gDACA,gCACA,gBAAmB,CACnB,mEChCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAqCf,SAAe,CApCf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,gBACA,CAAG,CACH,kBACA,SACA,aACA,aACA,WACA,CAAO,EACP,SACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,aACA,gBACA,CAAO,EACP,SACA,CAAK,CACL,aACA,CAAG,EACH,sCACA,uCACA,yBACA,gBAAmB,CACnB,iNCrCA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QA0Bf,SAAe,CAzBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,sBACA,8BACA,sBACA,mBACA,CAAG,CACH,mBACA,sBACA,uBACA,yBACA,eACA,qBACA,oBACA,CAAG,CACH,iGC1BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,0DACA,8BClBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA8Bf,SAAe,CA7Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,aACA,0BACA,WACA,CAAO,EACP,YACA,cACA,CAAO,EACP,8CACA,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,kFC9BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA6Bf,SAAe,CA5Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,gCACA,sBACA,oBACA,qBACA,qBACA,CAAG,CACH,kBACA,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,mEC7BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAqCf,SAAe,CApCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,yBACA,qBACA,oBACA,qBACA,sBACA,gCACA,sBACA,mBACA,CAAG,CACH,kBACA,SACA,aACA,YACA,aACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,oBACA,CAAG,CACH,yGCrCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiCf,SAAe,CAhCf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,yBACA,oBACA,qBACA,qBACA,sBACA,mBACA,CAAG,CACH,kBACA,SACA,aACA,YACA,cACA,CAAO,EACP,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6GACA,8BClCA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,oBACA,CAAG,CACH,kBACA,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECzBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,wBACA,iDACA,QAAW,CACX,kBACA,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwBf,SAAe,CAvBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,QAAW,CACX,kBACA,SACA,aACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,eACA,mBACA,CAAG,CACH,mFCxBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwBf,SAAe,CAvBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,qBACA,qBACA,qBACA,oBACA,uBACA,CAAG,CACH,mBACA,+BACA,gCACA,yBACA,gBAAmB,CACnB,uGCxBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAyBf,SAAe,CAxBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,qBACA,oBACA,CAAG,CACH,kBACA,SACA,YACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,mDACA,gBAAmB,CACnB,6ECzBA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QA0Bf,SAAe,CAzBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,kBACA,4BACA,+BACA,CAAG,CACH,kBACA,eACA,SACA,YACA,CACA,CAAG,EACH,sBACA,uBACA,gCACA,gBAAmB,CACnB,8CACA,8BC3BA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,4ECjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QA2Bf,SAAe,CA1Bf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,UACA,CAAK,CACL,aACA,CAAG,EACH,SACA,SACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,4EC3BA,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QAsGf,SAAe,CArGf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,6BACA,yBACA,yBACA,qBACA,oBACA,sBACA,wBACA,qBACA,oBACA,CAAG,CACH,kBACA,SACA,aACA,0BACA,WACA,CAAO,EACP,0BACA,WACA,CAAO,EACP,8CACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,0BACA,WACA,CAAO,EACP,YACA,aACA,CAAO,EACP,8CACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,0BACA,WACA,CAAO,EACP,YACA,WACA,CAAO,EACP,8CACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,0BACA,WACA,CAAO,EACP,YACA,YACA,CAAO,EACP,8CACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,aACA,0BACA,WACA,CAAO,EACP,YACA,WACA,CAAO,EACP,8CACA,YACA,CAAK,CACL,aACA,CAAG,EACH,SACA,YACA,CAAK,CACL,eACA,CAAG,EACH,SACA,eACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,wECtGA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,kBACA,SACA,WACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECtBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,sFCjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAwBf,SAAe,CAvBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,+BACA,CAAG,CACH,kBACA,SACA,cACA,CAAK,CACL,aACA,CAAG,EACH,sBACA,uBACA,yBACA,gBAAmB,CACnB,uDACA,8BCzBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,yBACA,gBAAmB,CACnB,6ECjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAuBf,SAAe,CAtBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,OACA,yBACA,oBACA,4BACA,qBACA,6BACA,CAAG,CACH,mBACA,sBACA,uBACA,0DACA,gBAAmB,CACnB,yICvBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAiBf,SAAe,CAhBf,CACA,YACA,0BACA,gBACA,0BACA,oBACA,mBACA,QAAW,CACX,mBACA,sBACA,uBACA,mDACA,gBAAmB,CACnB,kPCjBA,qCAA6C,CAC7C,QACA,CAAC,EAAC,EACF,OAAe,QAsBf,SAAe,CArBf,CACA,YACA,0BACA,gBACA,0BACA,+BACA,mBACA,OACA,qBACA,oBACA,CAAG,CACH,mBACA,oCACA,qCACA,yBACA,eACA,oBACA,CAAG,CACH,iICnBA,IAAa,CAAG,IAAoB,CAAG,IAAoB,CAA6B,EAA1B,GAA0B,EACxF,QAA2C,EAAQ,KAAgB,GACnE,IAAqC,CAFuC,CAE/B,GADK,EACK,GACvD,IAAuC,EAAQ,GADH,EACe,GAC3D,IAA6C,EAAQ,GADP,EACyB,GACvE,IAA6C,EAAQ,GADD,EACmB,GACvE,SADoD,EACpD,GAAuC,0BAAuC,WAE9E,UAEA,UAFA,IAIA,YACA,I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AO,GAAoB,GAqCpM,CAEA,GAvCoM,CA2C5L,SACR,MACA,EAAQ,OACR,KACA,CACA,CACA,CAAI,SACJ,MACA,EAAI,OACJ,KACA,CACA,CAAC,EACD,OACA,mBACA,QACA,CAAG,CACH,oBACA,IAEA,EAFA,8DACA,OAEA,IACA,UAA2B,gBAAgC,EAC3D,mBACA,OACA,OACA,eACA,CACA,CAAM,SACN,MACA,EAAM,OACN,KACA,CACA,CAAG,CACH,gBACA,yBACA,eACA,CAAK,EACL,eACG,CACH,gBACA,gBACA,CAAG,CACH,gBACA,yBAGA,OADA,EADA,IACA,IAEK,CACL,CAAG,CACH,kBACA,yBAGA,OAFA,MACA,IAEK,CACL,CACA,EACA,+BACA,SAAe,iCC/Gf,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,CAIf,cAMA,MALA,0DACA,yCACA,uBACA,CAAK,EAEL,CACA,EAVA,eACA,GAAuC,0BAAuC,YADlC,EAAQ,KAAiB,GAErE,SAFmD,EAEnD,GAAmD,EAA3B,IAA2B,2EAAsG,iBAAqB,YAAmB,qGAA8H,iCCN/T,qCAA6C,CAC7C,QACA,CAAC,EACD,SAAe,QA4Bf,SAAe,CAzBf,WACA,WACA,IACA,GACA,wBACA,QACA,CAAK,CACL,gBACA,iBAQA,OACA,OACA,EATA,WAEA,OADA,KACA,CACA,QACA,OACA,CAMA,CACA,EACA,QACA,iDC/BkW,MAAnH,WAAgB,iBAAkH,CAAlH,GAAsH,EAAjG,iBAAmB,iCAAvS,KAAc,aAAa,+CAA+C,wDAAuD,WAAW,2CAA0C,wCAAyC,UAAwE,wBAAkD,SAAS,4BCAjW,IAaA,gBAMD,EACA,EAGA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EAsDA,EAKA,EA4IA,OApNA,IADA,IACA,YACA,SAGA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KACA,KAGA,WAGA,QADA,KACA,IAAyB,MAAS,IAClC,MACA,UAEA,cAOA,QAFA,IACA,IACA,IAAyB,MAAS,KAElC,4BACA,iBACA,OACA,OAGA,WACA,OACA,OAGA,sBACA,kBACA,kBACA,iBACA,OAGA,2CACA,kBACA,kBACA,iBACA,OAGA,GAGA,iBACA,YAHA,KAKA,CACA,CAAM,GAGN,iCAKA,kBACA,oBAIA,oDAiBA,QApBA,EAQA,gCACA,UACA,eAMA,IAHA,mBAGA,KAGA,uBACA,IAAiC,IAAgB,IACjD,IACA,WAEA,SAEA,IASuB,aAEvB,6DAHA,EAHA,GAHA,kBAGA,oDAGA,aAMA,eAMA,QADA,0BACA,IAAoC,IAAmB,KACvD,UAEA,OACA,gBAEA,aAGA,UACA,OAEA,mCACA,6BAGA,CAAU,CAEV,2BACA,mDACA,CAAU,CAEV,2BAEA,YACA,eACA,SAEA,uDAGA,aACA,cACA,QACA,CAAU,CAEV,wCAcA,QAZA,gBAGA,YACA,cACA,cACA,cAGA,IAGA,IAAiC,IAAiB,KAElD,2DACA,uDACA,uDACA,uDAGA,IACA,IACA,IACA,GACA,CAxBA,IA2BA,oEACA,oEACA,oEACA,oEAGA,OACA,SACA,SACA,QACA,CAAU,CAEV,SACA,CAAM,EAxMN,EAkNA,uBAIA,MAEC,CAtOD,YAAqC,EAAQ,KAAQ,EAAG,EAAQ,KAAc,EAAG,CAArC,CAA6C,KAAO,EAAG,CAApC,CAA4C,KAAU,EAAG,CAAhC,CAAwC,KAAe,GAArC,SAAqB,kBCH9H,IAaA,YAucD,OArcA,WAIA,MAFA,EACA,IACA,YACA,EAHA,EAGA,KAKA,OACA,2CACA,2CACA,4CACA,4CACA,sBACA,CAEA,GACA,6CACA,4CACA,2CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,yCACA,4CACA,2CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,6CACA,0CACA,4CACA,4CACA,4CACA,4CACA,2CACA,2CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,2CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,6CACA,6CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,0CACA,4CACA,2CACA,4CACA,4CACA,0CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,2CACA,4CACA,2CACA,4CACA,yCACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,6CACA,6CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,2CACA,4CACA,4CACA,4CACA,4CACA,0CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,0CACA,2CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,2CACA,4CACA,4CACA,4CACA,4CACA,4CACA,2CACA,4CACA,4CACA,4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AuD,KAAmB,EAAG,CAAlD,CAA0D,KAAiB,EAAG,CAAnD,CAA2D,KAAc,EAAG,CAA9C,CAAsD,KAAO,EAAG,CAApC,CAA4C,IAAa,EAAG,EAAQ,KAAO,EAAG,EAAnC,KAAqD,EAAG,CAAhC,CAAwC,KAAiB,EAAG,CAA1C,CAAkD,KAAY,GAAzC,SAA4B,iBCHv0B,IAaA,YA4DD,OA1DA,WAEA,mCAOA,MAFA,EACA,IACA,UAGA,QA0CA,CAvCA,oBAqBA,GAnBA,0BACA,sBAKA,yBACA,uEACA,yBACA,0BACA,yBACA,0BACA,2BACA,4BAEA,uDAIA,yBAMA,QAJA,eAGA,KACA,IAA6B,IAA0B,IACvD,yBAIA,gBACA,EAAW,IAEX,uBAEA,GAEA,YACA,CAAE,GAGF,gBAEC,CAxED,YAAqC,EAAQ,KAAQ,YAAT,kBCH3C,IAaA,YA4PD,OA1PA,YAGA,YACA,cACA,WACA,SAGA,MAGA,WACA,YAAyB,KAAQ,IACjC,oCAEA,CAAM,GAKN,sBACA,oBACA,uBACA,sBACA,sBACA,CACA,CAAU,CAEV,8BAEA,YAA6B,KAAQ,KAErC,UACA,OAEA,KACA,uBACA,wBAEA,CAGA,uBAEA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UACA,UACA,UACA,UACA,UACA,UAGA,OACA,OACA,OACA,OAGA,sBACA,uBACA,uBACA,uBACA,sBACA,uBACA,uBACA,uBACA,sBACA,uBACA,wBACA,wBACA,uBACA,wBACA,wBACA,wBAEA,uBACA,uBACA,wBACA,wBACA,uBACA,uBACA,wBACA,wBACA,uBACA,uBACA,wBACA,wBACA,uBACA,uBACA,wBACA,wBAEA,uBACA,wBACA,wBACA,wBACA,uBACA,wBACA,wBACA,wBACA,uBACA,wBACA,wBACA,wBACA,uBACA,wBACA,wBACA,wBAEA,uBACA,wBACA,wBACA,wBACA,uBACA,wBACA,wBACA,wBACA,uBACA,wBACA,wBACA,wBACA,uBACA,wBACA,wB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BACmB,CACnB,oCACA,gBACA,CAEA,2BACA,KACA,yBACmB,KACnB,sBACmB,KACnB,4BAEA,sBAGA,IACA,IACA,cACA,IACA,GACA,CAGA,cACA,cACA,cACA,cACA,aACA,CAAU,CAEV,uBAEA,iBACA,UAEA,qBACA,eAYA,OATA,uBACA,8CACA,sBACA,sBAGA,gBAGA,WACU,CAEV,iBACA,yBAGA,OAFA,2BAEA,CACA,CACA,CAAM,EAgBN,0BA9GA,EA8HA,gCAIA,OAEC,CAlJD,YAAqC,EAAQ,KAAQ,YAAT,kBCH3C,IAaA,gBAMD,EACA,EACA,EAKA,EAmDA,OA1DA,EADA,MACA,UAEA,GADA,EAHA,EAGA,MACA,OAKA,qBACA,oBACA,uBACA,4CACA,4CACA,CACA,CAAU,CAEV,uBACA,+BAIA,OAFA,cAEA,CACA,CACA,CAAM,EAxBN,EAwCA,0BAxCA,EAwDA,kCAIA,SAEC,CA5ED,YAAqC,EAAQ,KAAQ,EAAG,EAAQ,KAAU,GAA9B,SAAmB,kBCH9D,IAaA,gBAED,EAGA,EACA,EACA,EACA,EAGA,EACA,EAoCA,EAKA,EAkIA,OArLA,EAkLE,KA9KF,GADA,EADA,EACA,KACA,UACA,WACA,SAGA,KACA,KAGA,WAYA,cACA,6BACA,CAIA,IAFA,QACA,IACA,MACA,CAlBA,YAEA,QADA,YACA,IAAkC,KAAiB,IACnD,UACA,SAIA,QACA,GASA,KACA,KACA,sBAEA,qBAEA,KAGA,GAEA,CAAM,GAGN,KAKA,qBACA,oBACA,iCACA,CAAU,CAEV,8BAeA,QAbA,mBAGA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAGA,IAA6B,KAAQ,KACrC,QACA,kBACmB,CACnB,cACA,gBACA,eACA,MAEA,SACA,iBACA,eACA,MAEA,yBAGA,eACA,cAEA,8CAGA,IAFA,6CAEA,YACA,MAEA,IACA,IACA,IACA,QACA,IACA,IACA,IACA,OACA,CAGA,cACA,cACA,cACA,cACA,cACA,cACA,cACA,aACA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xC,YAAqC,IAAO,KAE5C,YACA,OACA,OACA,iBACA,iBAGA,6BACA,yBAKA,WACA,OACA,eACA,aAEA,CAAU,CAEV,uBAEA,iBACA,UACA,iBACA,mBACA,oBAGA,qBACA,kCACA,sBAGA,gBASA,QANA,cACA,0BACA,MAGA,KACA,IAA6B,IAAuB,KAEpD,WACA,SACA,QAGA,EACA,uBACA,yBAEA,EACA,uBACA,yBAIA,UACA,SACA,CAGA,sBACA,CAAU,CAEV,iBAIA,QAHA,qBAEA,gCACA,IAA6B,KAAQ,IACrC,kBAGA,QACA,CACA,CAAM,EA9QN,EA8RA,wBA9RA,EA8SA,gCAIA,OAEC,CAlUD,YAAqC,EAAQ,KAAQ,EAAG,EAAQ,KAAY,GAAhC,SAAmB,kBCH9D,IAaA,gBAKD,EACA,EACA,EACA,EACA,EAKA,EAqDA,OA7DA,GADA,SACA,KACA,cAEA,GADA,UACA,OAKA,qBACA,oBACA,uBACA,oEACA,oEACA,oEACA,oEACA,CACA,CAAU,CAEV,uBACA,+BAIA,OAFA,eAEA,CACA,CACA,CAAM,EA3BN,EA2CA,0BAgBA,oCAIA,SAEC,CA/ED,YAAqC,EAAQ,KAAQ,EAAG,EAAQ,KAAY,EAAG,CAAnC,CAA2C,KAAU,GAAlC,SAAuB,kBCHrF,IAaA,YAsTD,OApTA,WAIA,QADA,IACA,OACA,QACA,SACA,cACA,EANA,EAMA,KAEA,aACA,kCACA,CAGA,OACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,iDACA,kDACA,kDACA,kDACA,kDACA,kDACA,gDACA,kDACA,kDACA,kDACA,kDACA,kDACA,iDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,kDACA,gDACA,kDACA,kDACA,kDACA,kDACA,kDACA,CAGA,MACA,WACA,YAAyB,KAAQ,IACjC,QAEA,CAAM,GAKN,yBACA,oBACA,uBACA,oEACA,oEACA,oEACA,oEACA,CACA,CAAU,CAEV,8BAiDA,QA/CA,mBAEA,OACA,OACA,OACA,OACA,OACA,OACA,OACA,OAEA,SACA,QACA,SACA,QACA,SACA,QACA,SACA,QACA,SACA,QACA,SACA,QACA,SACA,QACA,SACA,QAGA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IAGA,IAA6B,KAAQ,KAKrC,IAJA,EACA,EAGA,OAGA,QACA,oBACA,yBACmB,CAEnB,cACA,SACA,QACA,oCACA,4CAGA,UACA,WACA,UACA,2CACA,oDAGA,UACA,WACA,UAEA,WACA,WACA,UAGA,SADA,UACA,aACA,MACA,0BACA,MACA,0BAEA,SACA,OACA,CAEA,gBACA,YACA,eACA,eAEA,6CACA,6CACA,+CACA,+CAGA,QACA,WACA,UAEA,QACA,2BACA,SACA,6BACA,SACA,6BACA,QACA,2BAGA,SACA,6BAGA,IACA,IACA,IACA,IACA,IACA,IAEA,SADA,YACA,eACA,IACA,IACA,IACA,IACA,IACA,IAEA,UADA,aACA,eACA,CAGA,YACA,6BACA,YACA,6BACA,YACA,6BACA,YACA,6BACA,YACA,6BACA,YACA,6BACA,YACA,6BACA,YACA,4BACA,CAAU,CAEV,uBAEA,iBACA,UAEA,qBACA,eAeA,OAZA,uBACA,gDACA,wBACA,sBAGA,gBAGA,kBAIA,CAAU,CAEV,iBACA,yBAGA,OAFA,2BAEA,CACA,CAAU,CAEV,YACA,CAAM,CAgBN,CA9RA,EA8RA,0BAgBA,mCACA,CAAE,GAGF,SAEC,CAlUD,YAAqC,EAAQ,KAAQ,EAAG,EAAQ,KAAY,GAAhC,SAAmB,iBCH9D,IAaA,YA2vBD,OAzvBA,WAGA,MADA,EACA,IACA,cACA,gBACA,SAGA,GACA,sBACA,uBACA,uBACA,wBACA,uBACA,uBACA,sBACA,CAGA,GACA,gBACA,gBACA,gBACA,gBACA,kBACA,kBACA,kBACA,kBACA,CAGA,+CAGA,GACA,CACA,UACA,iBACA,mBACA,aACA,eACA,mBACA,mBACA,mBACA,eACA,mBACA,iBACA,mBACA,iBACA,mBACA,aACA,iBACA,YACA,mBACA,iBACA,iBACA,mBACA,eACA,mBACA,aACA,mBACA,iBACA,mBACA,mBACA,mBACA,iBACA,eACA,mBACA,QACA,aACA,mBACA,mBACA,mBACA,iBACA,eACA,mBACA,mBACA,mBACA,mBACA,iBACA,eACA,mBACA,iBACA,aACA,kBACA,mBACA,mBACA,eACA,iBACA,mBACA,aACA,iBACA,iBACA,mBACA,eACA,mBACA,mBACA,aACA,iBACA,kBACA,CAAU,CACV,CACA,aACA,gBACA,iBACA,qBACA,qBACA,qBACA,qBACA,aACA,iBACA,qBACA,qBACA,iBACA,iBACA,YACA,gBACA,qBACA,mBACA,iBACA,aACA,qBACA,qBACA,qBACA,iBACA,qBACA,iBACA,YACA,gBACA,qBACA,qBACA,iBACA,qBACA,gBACA,aACA,sBACA,sBACA,sBACA,sBACA,cACA,kBACA,iBACA,iBACA,kBACA,kBACA,sBACA,kBACA,sBACA,sBACA,sBACA,kBACA,kBACA,sBACA,iBACA,sBACA,sBACA,cACA,sBACA,sBACA,sBACA,sBACA,kBACA,aACA,iBACA,sBACA,iBACA,CAAU,CACV,CACA,MACA,UACA,kBACA,cACA,cACA,kBACA,kBACA,kBACA,kBACA,kBACA,eACA,mBACA,mBACA,eACA,WACA,aACA,iBACA,kBACA,UACA,kBACA,kBACA,cACA,cACA,YACA,UACA,YACA,mBACA,eACA,eACA,mBACA,mBACA,mBACA,oBACA,gBACA,gBACA,oBACA,cACA,oBACA,oBACA,YACA,oBACA,oBACA,YACA,gBACA,oBACA,cACA,gBACA,oBACA,oBACA,cACA,oBACA,YACA,gBACA,oBACA,cACA,oBACA,gBACA,oBACA,gBACA,oBACA,oBACA,oBACA,YACA,eACA,CAAU,CACV,CACA,aACA,iBACA,eACA,kBACA,SACA,eACA,kBACA,eACA,kBACA,eACA,UACA,kBACA,kBACA,YACA,YACA,kBACA,iBACA,SACA,kBACA,kBACA,eACA,kBACA,SACA,kBACA,YACA,kBACA,eACA,YACA,kBACA,eACA,eACA,mBACA,gBACA,gBACA,mBACA,UACA,aACA,mBACA,mBACA,mBACA,mBACA,mBACA,mBACA,gBACA,mBACA,gBACA,WACA,aACA,mBACA,mBACA,UACA,gBACA,gBACA,mBACA,mBACA,WACA,mBACA,aACA,mBACA,mBACA,aACA,mBACA,gBACA,eACA,CAAU,CACV,CACA,MACA,eACA,YACA,iBACA,iBACA,gBACA,iBACA,aACA,gBACA,iBACA,iBACA,iBACA,iBACA,QACA,gBACA,iBACA,eACA,gBACA,UACA,gBACA,aACA,iBACA,iBACA,iBACA,iBACA,QACA,iBACA,gBACA,iBACA,iBACA,gBACA,aACA,aACA,UACA,iBACA,iBACA,gBACA,iBACA,iBACA,gBACA,iBACA,kBACA,iBACA,kBACA,cACA,kBACA,SACA,iBACA,iBACA,gBACA,gBACA,iBACA,iBACA,gBACA,UACA,iBACA,cACA,kBACA,SACA,kBACA,iBACA,cACA,kBACA,iBACA,CAAU,CACV,CACA,aACA,SACA,eACA,eACA,gBACA,aACA,aACA,gBACA,OACA,gBACA,aACA,OACA,gBACA,aACA,UACA,gBACA,eACA,eACA,MACA,YACA,aACA,gBACA,gBACA,UACA,aACA,UACA,gBACA,gBACA,OACA,gBACA,aACA,gBACA,gBACA,gBACA,gBACA,UACA,aACA,gBACA,gBACA,aACA,aACA,OACA,OACA,gBACA,UACA,gBACA,gBACA,aACA,OACA,aACA,aACA,gBACA,gBACA,UACA,gBACA,gBACA,gBACA,gBACA,UACA,aACA,aACA,OACA,gBACA,eACA,CAAU,CACV,CACA,UACA,aACA,QACA,WACA,aACA,KACA,KACA,cACA,cACA,YACA,cACA,cACA,cACA,SACA,YACA,cACA,YACA,KACA,aACA,aACA,WACA,aACA,cACA,SACA,YACA,cACA,cACA,YACA,SACA,cACA,MACA,YACA,cACA,YACA,cACA,cACA,YACA,cACA,cACA,YACA,SACA,cACA,YACA,MACA,MACA,cACA,cACA,SACA,YACA,cACA,cACA,MACA,cACA,YACA,SACA,cACA,cACA,cACA,MACA,cACA,YACA,SACA,cACA,WACA,CAAU,CACV,CACA,YACA,SACA,YACA,KACA,SACA,YACA,YACA,OACA,YACA,YACA,UACA,aACA,QACA,KACA,aACA,UACA,gBACA,qBACA,qBACA,qBACA,qBACA,kBACA,kBACA,cACA,qBACA,gBACA,kBACA,qBACA,aACA,qBACA,qBACA,kBACA,UACA,aACA,MACA,QACA,aACA,aACA,aACA,UACA,KACA,UACA,aACA,aACA,aACA,UACA,QACA,aACA,kBACA,gBACA,qBACA,kBACA,cACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,aACA,kBACA,gBACA,kBACA,oBACA,EACA,CAGA,GACA,wCACA,2BACA,CAKA,kBACA,oBAOA,QAJA,EADA,UACA,MAGA,KACA,IAA6B,KAAQ,KACrC,YACA,0BACA,CAIA,QADA,mBACA,IAAmC,KAAc,KAQjD,QANA,UAGA,OAGA,IAAiC,KAAQ,IAEzC,mCAGA,4CAMA,wBACA,YAAiC,IAAO,IACxC,qBAEA,uBACA,CAIA,QADA,sBACA,IAA6B,KAAQ,IACrC,YAEA,CAAU,CAEV,2BACA,qCACA,CAAU,CAEV,2BACA,wCACA,CAAU,CAEV,8BAEA,kBACA,oBAGA,yBACA,sBACA,0BACA,wBACA,0BAGA,YAAiC,KAAY,KAQ7C,QANA,OACA,eACA,eAGA,IACA,IAAiC,IAAO,IACxC,6BAEA,eACA,gBACA,CAGA,mBACA,0BACA,eAGA,0BACA,wBACA,0BACA,sBACA,yBAGA,kBACA,oBACU,CAEV,UAEA,SAEA,WACA,CAAM,EAGN,gBACA,uCACA,iBACA,kBACA,CAEA,gBACA,uCACA,iBACA,kBACA,CAUA,yBAKA,4BACA,oBAGA,MADA,UACA,MAEA,0CACA,6FAIA,mBACA,uCACA,sCAGA,2CACA,0CACA,yCACA,CAAU,CAEV,2BACA,6BACA,6BACA,4BACA,CAAU,CAEV,2BACA,6BACA,6BACA,4BACA,CAAU,CAEV,U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ACA,EACA,kBACA,CACA,EAEA,cACA,kBACA,UAGA,SACA,iBACA,gBACA,WAEA,cACA,aACA,SACA,+BACA,WACA,QAAsB,OAAY,aAClC,GAAoB,cAAwB,EAC5C,aACA,CAAS,CACT,CAAO,CACP,EAGA,KAqHA,OApHA,kCAGA,CAFA,WAEA,2BAEA,gDACA,6BACO,EACP,2CACA,cACA,oBAAmC,UACnC,oBACA,CAAO,EACP,CAAK,EAEL,wCACA,cACA,+BACA,6BACA,CAAO,CACP,CAAK,EAEL,0CACA,aACA,UACA,+BAEA,GACA,6BACA,yBAEA,WAIA,UACA,yBACA,SACA,EAGA,YACA,qBAAqC,iBAAwB,SAC7D,IAEA,iBACA,aACA,8BACA,IACA,CAAS,CACT,CAAO,CACP,CAAK,EAGL,4BAEA,WACA,SACA,UAGA,+CAIA,iBACA,GACA,+BACA,aACA,WAGA,mBAIA,yBACA,MAGA,cACA,aACA,SAGA,kBACA,QACA,iBACA,iBACA,iBACA,WACA,MACA,CAAa,CAGb,YACA,mBAIA,+BACA,QACA,OACA,CAAe,GAEf,CAAW,CACX,4BAEA,mBADA,SACA,IACA,GACA,eAEA,CAAS,EAET,CAAK,EAEL,CACA,SAEA,+BAEA,CACA,EAWA,MAPA,sDAEA,uBACA,yCAAiD,SAAgB,GAIjE,CACA,CAAC,CA1LD,qCCFA,IAMC,WACD,aAEA,kBACA,kBACA,UAEA,SACA,oBACA,sBAgHA,OA7GA,oCACA,cACA,wCACA,SAGA,6BACA,sBACA,SAGA,oCACA,qBAKA,CAAS,EAKT,4BACA,cACA,iCAEA,wCACA,YAIA,yCACA,YACA,YAIA,6BACA,uBACA,GACA,QACA,2CACA,oCACA,WACA,EACA,IACA,wBACA,4BAEA,CAA6B,CAC7B,CACA,CAAqB,EAErB,MACA,CAGA,6BACA,uBACA,GACA,QACA,2CACA,oCACA,WACA,EACA,IACA,wBACA,4BAEA,CAA6B,CAC7B,CAAyB,CACJ,EAErB,MACA,CAGA,mCACA,aAEA,2CACA,mBAC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D,WAGlD,6CAEA,CACA,EAWA,MAPA,sDAEA,uBACA,yCAAiD,SAAgB,GAIjE,CACA,CAAC,CA7OD,qCCFA,IAOC,WACD,aAgGA,cACA,cACA,CAEA,cACA,QAqBA,gBACA,IACA,cACA,UACA,iBACA,oCACA,YACA,MACA,YACA,MACA,CAEA,6BACA,CAAW,CACX,YACA,YACA,EAEA,CAAQ,SACR,YACA,CACA,CAEA,gBACA,UACA,aACA,WACA,QACA,OACA,CAAW,EACX,KAEA,aACA,YACA,KAEA,SACA,WACA,QACA,OACA,CAAW,CAEX,CAEA,WAGA,eAEA,MAEA,CAEA,aAxEA,cACA,iCACA,OACA,MACA,MACA,UACA,SACA,SACA,EAEA,EACA,YAEA,MACA,OAEA,CAAO,CACP,EAyDA,6BACA,oBAEA,CA0kBA,gBACA,OACA,SAiCA,GACA,4BACA,EAnCA,IA6CA,cACA,SACA,KACA,KACA,SAEA,IACA,IACA,6BACA,yBAGA,gBAEA,kBAJA,MAMA,CAAM,SACN,KACA,GACA,EAAM,OACN,IACA,6BACA,EAAQ,OACR,YACA,CACA,CAEA,QACA,EAxEA,MA8FA,WACA,uEACA,GA7FA,CA9kBA,iDACA,8CACA,YACA,EAGA,6BACA,6BACA,EAEA,8BACA,8BACA,EAEA,+BACA,+BACA,EA44CA,oBACA,qBACA,EAEA,gBACA,yBACA,EAEA,cACA,wCACA,MACA,CACA,IACA,GACA,EAEA,cACA,EAEA,kBACA,kBACA,cACA,qBACA,SACA,gBACA,gBAEA,EAEA,aACA,MACA,yDACA,EACA,yDACA,OAAa,QACb,EAEA,gBACA,MACA,yDACA,+CACA,mBACA,gBAEA,mBACA,4CAGA,EAEA,kBACA,0CACA,gDACA,4CACA,IACA,2BACA,EACA,GAaA,OACA,iBAZA,mBAaA,kBAZA,oBAaA,oBACA,mBAZA,mBACA,GACA,EACA,gBACA,eACA,CAAa,EACb,UAOA,SACA,OACA,QARA,YASA,CACA,EAEA,cACA,cACA,EAEA,gBACA,MACA,yDAEA,EACA,oBACA,sBACA,EACA,qBACA,sBACA,yBACA,2BACA,yBACA,2BAkCA,OAhCA,OAEA,EADA,WACA,aAEA,GAIA,OAEA,EADA,WACA,YAEA,GAIA,OAEA,EADA,WACA,YAEA,GAIA,OAEA,EADA,WACA,aAEA,GAIA,CACA,OACA,OACA,WACA,WACA,CACA,EAaA,gBACA,0CACA,6BACA,CAAK,CACL,EAGA,gBACA,+BAFA,6BAEA,GAIA,OAHA,GACA,OAEA,CACA,EA4BA,GACA,wBACA,sBACA,EAWA,GACA,aACA,gBACA,WACA,EAsHA,cACA,mBACA,YAAyB,QAAe,CACxC,CACA,EAwCA,GACA,MAvCA,YACA,iBACA,QACA,yBACA,0BACA,WACA,CAAK,EAUL,OARA,oBACA,sCACA,EACA,iBACA,+BACA,aACA,OAEA,CACA,EAuBA,eACA,qBACA,eACA,eACA,KAzBA,YACA,aACA,QACA,yBACA,yBACA,CAAK,EAEL,YACA,iBAEA,gBACA,iBAEA,gBAGA,OAFA,iBAEA,CACA,CASA,EAEA,GACA,KAxNA,YACA,SACA,EACA,gBAAsB,kBAEtB,EAoNA,QAlNA,YACA,+BACA,4BACA,kBACA,mBACA,SACA,EACA,cACA,CACA,KACA,KACA,KACA,IACA,CAAS,CACT,UAGA,EAkMA,MA3LA,cACA,EACA,EACA,gBAAsB,kBACtB,oCACA,CAAO,EAEP,EAqLA,KA7KA,kBACA,wBACA,6BACA,yBACA,0BAEA,EACA,EACA,gBAAsB,kBACtB,iBACA,gBACA,cACA,gBACA,eACA,CAAO,GAIP,kBACA,cACA,uCAEA,EAwJA,KA3EA,kBACA,EACA,EACA,gBAAsB,WACtB,YACA,EACA,yBACA,OACA,qBACA,qBACA,CACA,CAAW,EApLX,kBACA,SACA,0BACA,gBACA,WACA,CAAO,EACP,SAgLA,CAAO,EAEP,EA6DA,KAvJA,kBACA,EACA,EACA,gBAAsB,kBACtB,WACA,CAAO,GAGP,sBACA,kBACA,kBAEA,SAEA,GACA,wBACA,0BAUA,GAPA,KACA,OACA,OACA,OACA,OACK,EAEL,kBAEA,uBACA,uBAEA,SACA,UACA,UACK,EAEL,aAEA,iDAEA,UADA,QAEA,WACA,YAEA,KACA,qBAA8B,EAC9B,MACA,gBACA,iBACA,gBACA,iBACA,gBACA,WACA,CAAO,CACP,CAEA,+CAEA,UADA,SAEA,WACA,YAEA,KACA,qBAA8B,EAC9B,MACA,gBACA,iBACA,gBACA,iBACA,gBACA,WACA,CAAO,CACP,EACA,CA+EA,EAMA,WACA,EACA,EACA,EACA,EACA,GAEA,YACA,kBAEA,kBACA,aACA,EAEA,GACA,IACA,IACA,OACA,MACA,QACA,SACA,QACA,SACA,CASA,cACA,aACA,OACA,OAEA,WACA,GACA,2BAdA,EAgBA,OADA,KAdA,iBADA,EAeA,OAdA,YACA,kBACA,EAaA,CACA,CAAS,GAAI,EAEb,OACA,EACA,cACA,CACA,QACA,CAAS,CACT,EACA,GAEA,EAGA,uBACA,wBACA,EAEA,wBACA,GAEA,CACA,EAmGA,gBACA,OAAa,QACb,EAMA,gBACA,yBACA,EAEA,oBARA,IASA,OATA,EASA,OATA,EASA,OARA,iBAWA,gBACA,wBACA,EAEA,gBAKA,2BAIA,cACA,cACA,IAJA,EAQA,WAPA,SAJA,GAWA,IAFA,EAEA,EACA,EAEA,gBACA,cACA,WAEA,SACA,SAEA,yCAEA,IACA,0BACA,mBAGA,IACA,kBACA,4BAGA,OACA,aACA,aACA,CACA,EAEA,WACA,EACA,GAEA,MACA,yDAEA,mBAKA,IACA,IACA,EAHA,GAKA,GADA,GAJA,CAIA,EACA,GAGA,wBACA,kBAGA,OACA,QACA,OAJA,GAKA,CACA,EAEA,WACA,EACA,EACA,EACA,GAGA,uBACA,mBACA,cACA,eAGA,SAGA,gBACA,UACA,WAEA,EAEA,WACA,EACA,GAEA,cACA,MAQA,OAPA,YAEA,IADA,YACA,GAKA,CACA,EAJA,eAKA,EAJA,gBAKA,QACA,QACA,CACA,EAEA,cACA,MACA,0DACA,SACA,aACA,WACA,gBAEA,wBAEA,eAEA,GACA,aACA,eAGA,GACA,IACA,IACA,cACA,gBACA,QACA,EAEA,sCASA,IAPA,EACA,EACA,OACA,EACA,KAA+B,YAM/B,OACA,qBACA,uBACA,4BACA,6BACA,CACA,EAEA,GACA,cACA,aACA,YACA,OACA,EA6UA,IAqCA,aACA,2BACA,wDACA,kBAA2B,uBAAgC,KAC3D,CAAO,CACP,CACA,EAKA,aACA,2BAqCA,IApCA,+BACA,6BAEA,SACA,WAEA,OACA,OACA,OACA,OACA,OAEA,OACA,OACA,OACA,OACA,OAEA,QACA,QACA,QACA,QACA,QAEA,QACA,QACA,QACA,QACA,QAEA,IACA,IACA,IACA,IACA,IAEa,IAAW,KACxB,WACA,aACA,aACA,aACA,cACA,EACA,uCAEA,gBACA,EACA,uCAEA,gBACA,EACA,uCAEA,gBACA,EACA,uCAIA,kBAAyB,uBAAmC,EAC5D,cACA,CACA,CACA,EAEA,gBACA,eACA,qBACA,qBACA,kBACA,OACA,MACA,EACA,OACA,EAEA,GACA,aACA,oBACK,CACL,cACA,oBACA,CAAK,CACL,gBACA,sBACK,CACL,gBACA,qBACK,CACL,aACA,oBACK,CACL,gBACA,qBACK,CACL,gBACA,sBACK,CACL,cACA,qBAEA,EAEA,WACA,EACA,EACA,EACA,GAGA,QAIA,8BACA,EAGA,WACA,EACA,EACA,EACA,GAGA,gBACA,gBAGA,sCACA,WACA,WACA,yBAGA,eACA,YACA,OACA,OASA,OALA,WAGA,uBAEA,CACA,EAEA,cACA,gDACA,EAKA,cACA,eAJA,GAIA,qBAEA,mCACA,qBACA,+BACA,iCACA,uBACA,WACA,IACA,+BACM,SACN,WACA,CAQA,IAPA,eAEA,IACA,IACA,IACA,IAEW,IAAO,KAClB,aACA,iBACA,iBAOA,OAAa,EAJb,SAIa,EAHb,SAGa,EAFb,SAGA,EAEA,gBACA,qCACA,EAWA,cACA,MACA,IACA,iCACA,CAAM,SAGN,EAFA,iCACA,iBACA,iCACA,CAEA,OADA,0CACA,CACA,EAgBA,cAEA,MAxRA,oBACA,6BACA,UACA,cACA,mBACA,aACA,UACA,EAZA,89BAaA,mCACA,cACA,uDACA,KACA,oCACA,CAEA,IACA,wBACA,qDAGA,2CACA,CAAO,CACP,QACA,mBACA,YACA,SAAqB,sBACrB,CACA,CACA,CAAK,EA8PL,EApYA,oBACA,qBACA,UACA,cACA,QACA,6DAEA,kDAEA,YACA,SACA,SACA,aACA,SAAqB,0BACrB,CACA,CAAO,CAEP,mBACA,aACA,UACA,6BACA,kBAvLA,oBACA,kBACA,UACA,cACA,QACA,MACA,OACA,SACA,SACA,QACA,SACA,QACA,aACA,CAEA,oCACA,YACA,SAAqB,0BACrB,CACA,CAAO,CAEP,yBACA,aACA,UACA,cACA,8CACA,CAAO,CACP,mBACA,aACA,UAEA,8BACA,kBAsgBA,EAxlBA,kBACA,4BACA,UACA,cACA,QACA,+BAEA,QACA,UACA,UACA,aACA,aACA,SACA,SACA,UACA,CAEA,YACA,UACA,UACA,SACA,SACA,aACA,aACA,SACA,CACA,CAAO,CAEP,mBACA,aACA,UACA,sBACA,wBACA,+BACA,kBAhDA,oBACA,oBACA,cACA,QAAgB,2BAA8B,CAC9C,mBACA,aACA,UACA,sBACA,CACA,CAAK,EAuCL,CAAsD,cAAoB,EAE1E,CAAO,CACP,kBACA,aAEA,IADA,MACA,UACA,eACA,2BACA,wBACA,CACA,CAAK,EAuCL,gBAA4B,MAI5B,8BACA,cACA,gCACA,kBA6fA,EAn4BA,kBACA,4BACA,UACA,cACA,QACA,yDACO,CAEP,kBACA,aACA,UAEA,YACA,aACA,WACA,WAEA,UACA,WAEA,UACA,WAEA,MACA,aAEA,aACA,cACA,SACA,YAEA,aACA,aAEA,MACA,SAEA,aACA,IAOA,EAPA,MACA,KAEA,cACA,IACA,MAGA,YACA,gBACgB,eAChB,kBAEA,KACA,KAEA,CACA,CAEA,OACA,QACA,QACA,EAEA,wCACA,0CAEA,uBAGA,wBAGA,iDAGA,EACA,UACA,OACA,QACA,oBACA,aACA,OACA,OAGA,EA1JA,EA0JA,EA1JA,CA0JA,GAGA,aAGA,wBACA,CAAW,EACX,CACA,CAAK,EAySL,gBAAsE,KACtE,CACA,EAEA,+BACA,eACA,gCACA,kBACA,EAGA,cACA,2CAEA,YAGA,WACA,0CAIA,gDAEA,CAAO,CACP,kBACA,aACA,UACA,mBACA,SACA,WACA,WACA,UACA,UACA,WAEA,mBAEA,OACA,IACA,IACA,QACA,SACA,QACA,OACA,MACA,CACA,EAEA,GACA,wBACA,yBACA,EAEA,GACA,qBACA,uBAGA,GACA,gCACA,kCAGA,mCAEA,kCAEA,EACA,oCAEA,IACA,EACA,OAEA,EACA,YAAwC,YAGxC,UAGA,cACA,qBACA,qBACA,sBACA,sBACA,qBACA,sBACA,0BACU,cACV,sBAIA,kBAGA,MACA,eACA,eACA,kBACA,kBACA,eACA,cACA,cACA,MACA,CAEA,cACA,cACA,iBACA,iBACA,YACA,WACA,UACA,CACA,CAAK,EAyBL,CACA,QACA,cACA,YACA,gBACA,gBACA,cACA,wBACW,EAEX,CAAO,CACP,kBACA,aACA,UACA,mBACA,aACA,UACA,SACA,WACA,WACA,UAWA,GATA,SACA,WACA,WACA,UAGA,gBAGA,4BAGA,uBACA,mBAGA,qBACA,sBAEA,sCACA,0CACA,0CAEA,oCACA,gCAEA,QACA,MACA,KAIA,MACA,SACA,EACA,SACA,EACA,iBAGA,MACA,KAEA,IADA,KACA,GAGA,MACA,IACA,OAGA,UACA,WACA,CACA,CAAK,EAoSL,uBAEA,kBACA,+BAEA,iBACA,mBACA,iBACA,oCAIA,yBAEA,qBAEA,OADA,uCACA,IAGA,WACA,OACA,CACA,YACA,aACA,CAAW,CAEX,YAEA,uCAGA,cAGA,GACA,CAAW,CACX,gBAEA,CAAO,CACP,EAEA,gBACA,qBACA,gBACA,iBACA,YACA,EAGA,cACA,aACA,uBAIA,OAHA,YACA,iBACA,2BACA,CACA,EAGA,cACA,IA2BA,EACA,EA5BA,SACA,UACA,UACA,OACA,sBAA0C,KAAQ,EAClD,MAEA,8BACA,QACA,KACA,IACA,CAAS,CAET,MACA,cACA,WACA,CAAS,CAET,OACA,WACA,gBACA,EAEA,UACA,+CAKA,KACA,2CACA,8BACA,0BACA,MAIA,wBACA,qBACA,KACA,QACA,OACA,SACA,SACA,QACA,aACA,UACA,YACA,YACA,aACA,CAAS,EAET,qBAGA,qBAGA,YACA,WACA,WACA,eAGA,sBACA,qCAAkD,KAAQ,CAC1D,CAAO,MACP,EAEA,cACA,aACA,UACA,sBAA0C,QAAc,EACxD,MACA,yCACA,8BACA,qBACA,+CAGA,2CACA,WACA,iCACA,kCAEA,EAkDA,cAIA,aADA,oBACA,mCAEA,EADA,yBACA,KAEA,kCACA,EAyLA,cACA,aACA,8BACA,6BACA,8BACA,EAEA,cACA,aACA,gCACA,4BACA,EA6CA,2BACA,6BACA,OApCA,YACA,aAEA,gBAGA,qBAGA,sBAGA,sCACA,qBACA,UACA,aACA,CAAS,GAGT,uCACA,qBACA,UACA,gBACA,CAAS,GAGT,qCACA,qBACA,UACA,gBACA,CAAS,EAET,EAKA,kBACA,gBACA,oBACA,OAEA,+BACA,gBACA,gBACA,CAAS,CACT,CAAO,CACP,yBAEA,EADA,KACA,+BACA,UACA,CAAS,CACT,CAAO,CACP,0BACA,CAEA,uBA3FA,YACA,aAEA,sCACA,eACA,WACA,WACA,WACA,EAoFA,mCAnQA,YACA,aAEA,EADA,QACA,GAGA,wBACA,GAMA,EAHA,4BAGA,cAEA,+CACA,KACA,QACA,QACA,CAAS,CACT,CAAO,CACP,EA+OA,iCA7OA,YACA,aACA,UACA,OAGA,wBACA,MAGA,kCAGA,aAEA,IAzQA,sBACA,eACA,2BACA,oBACA,IACA,EACA,sBACA,IACA,EACA,MAgQA,CA/PA,CAAK,EA+PL,OACA,EAGA,cAEA,uBAKA,OADA,2BACA,gBAGA,UACA,WAGA,SAEA,eACA,YACA,OACA,OAKA,8CAQA,EAHA,yCAGA,EAGA,MAGA,uBACA,wBAEA,IACA,KAEA,KAEA,GADA,mBACA,EAGA,GADA,mBACA,EAIA,QACA,EACA,EACA,EACA,GAIA,aAEA,cACA,mDAEA,QACA,KACA,4BAGA,aACA,UAIA,8BAGA,GAAsB,uBAA+C,CACrE,EAGA,0BACA,EACA,iBAEA,IAEA,EAGA,cAEA,WAEA,OACA,CACA,YACW,CAEX,YAMA,GAJA,cAIA,IACA,IACA,MACA,CAGA,IACA,EAEA,EAAQ,IAER,IAEA,EAmGA,yBAlUA,YACA,aACA,UACA,WAEA,mDAGA,qBAGA,0BAA0C,QAAc,EACxD,MAGA,gCACA,0CACA,4BACA,MACA,CAEA,4CACA,4BACA,sCAGA,GACA,GACA,eACA,QACA,oBACA,gDACA,CACA,IA9NA,IA8NA,KAAwC,OAAY,EACpD,GACA,OACA,QACA,OAlOA,EAkOA,QAjOA,wCACA,cACA,kBAEA,EADA,iBACA,iBACA,EA6NA,CAAW,CACX,MAGA,GAAwB,eAA0B,CAElD,GACA,EAwRA,4BACA,kCACA,yBACA,6BA1EA,YACA,YACA,iCACA,8BACA,EAuEA,4BACA,4BACA,CAAS,CAET,YACA,aAEA,wCACA,qBACW,CAGX,uDACA,GAEA,kBACA,CAAW,EAGX,sBACA,aACA,CAAW,EACX,UACA,EAEA,CAAK,CACL,EAKA,cACA,kBACA,UACA,SACA,gBACA,WAGA,OA+MA,OA5MA,4BAEA,WACA,SACA,UAGA,4CAqDA,oBACA,uBACA,WAGA,sBAA4C,KAAQ,EACpD,MAGA,wCACA,yCACA,sCACA,eAGA,YACA,eACA,gBACA,SAGA,8CACA,0CAIA,EADA,4BACA,gBAGA,eACA,YACA,OACA,OAIA,qDACA,aACA,KACA,IACA,CAGA,UAGA,EACA,2BAAyC,gBAGzC,WACA,EACA,eAIA,WACA,EAFA,mBAEA,EACA,GAIA,sCACA,QACA,QACA,CAAS,KACT,EAEA,cACA,OAEA,oBACA,EA2BA,iBACA,EACA,CACA,kBACA,kBACA,cA1JA,YACA,aAEA,EADA,QACA,GACA,kBAGA,8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,OACA,MACA,CACA,0CAA6D,IAC7D,EAEA,gBACA,eACA,qBAIA,SAEA,EAEA,cACA,SAIA,OAHA,gBACA,WACA,CAAS,EACT,CACA,EAEA,gBACA,kEACA,YACA,4CAEA,mBACA,EAGA,iBAEA,CAFuC,CAEvC,YACA,oBACA,EAEA,gBACA,+DACA,sBACA,IACA,QAEA,WACA,yBAdA,6BAcA,GACA,0BAWA,OAVA,IACA,KACA,eAEA,eAGA,kBACA,QACA,CAAS,EACT,CACA,EAsCA,EACA,qDAEA,aACA,QACA,EAGA,EACA,YAFA,kBAGA,YACA,0BAEA,YACA,0BACA,EAEA,oBACA,mBACA,cACA,YACA,uBAEA,GAEA,wBAAqC,IAGrC,OACA,YACA,UACA,cACA,gBACa,CAIb,OACA,OACA,MACA,QACA,QACA,CAAa,EA0Bb,OAtBA,EACA,mBACA,wBACA,CAAa,EACb,gBACA,cACa,EACb,oBACA,0BAAuD,WACvD,0BAAuD,UACvD,CAAa,EAGb,WAGA,uCACA,qCAGA,WAEA,CACA,EAEA,gBAEA,aACA,gBACA,gBACA,eAEA,mBACA,oBAGA,iBACA,iBAEA,EAEA,cACA,uBACA,yBAGA,cACA,wBACA,EAUA,kBACA,kEACA,qCACA,EAyHA,cACA,8BACA,EAwFA,GACA,OA7MA,WAEA,+DAA6F,CAC7F,cACA,kBACA,YACA,mBACA,SACA,kBACA,OACA,OACA,IACA,KA6EA,KACA,YA3EA,cAEA,OAGA,kBACA,KACA,IACA,MACA,CAMA,GAHA,SAGA,EAGA,KAGA,KAGA,aACA,IACA,IACA,KAGA,cACA,iBAGA,cAEA,EAwCA,QACA,IAnCA,YAgBA,GAdA,aACA,MAIA,WACA,IACA,KAOA,IAHA,OAGA,YAEA,KACA,IAGA,cACA,gBAEA,MACA,CAEA,IACA,EAOA,eACA,QACA,CAAqB,CACJ,CAEjB,SACA,eACA,QACA,CAAqB,CACJ,CAEjB,sBAAqD,CACrD,wBAAyD,CAC5C,EAEb,QACA,EAiGA,MAtFA,WAEA,IAQA,EACA,EATA,2DAA6F,CAC7F,aACA,mBACA,WACA,iBACA,UACA,iBACA,OAGA,KACA,KACA,OA0BA,KACA,YAzBA,eACA,cAEA,UACA,MAGA,QAEA,WAEA,MACA,IACA,QACA,gBACA,kBACA,OAEA,MACA,oCAEA,EAKA,QACA,eACA,YACA,CAAqB,CACrB,gBAEA,aACA,IACA,cACA,gBACA,MACA,CAGA,KACA,IACA,OAGA,KACA,KAIA,KACA,MACA,CAAqB,CACJ,CAEjB,SACA,eACA,QACA,CAAqB,CACJ,CAEjB,sBAAqD,CACrD,wBACA,CAAa,EAEb,QACA,CAKA,EAOA,kBAGA,MACA,+BACA,QACA,QAEA,8BACA,qCAA8D,OAE9D,wBACA,EAEA,kBACA,8DACA,2BACA,oBACA,sBACA,QACA,aACA,aAEA,cACA,aACA,CAEA,sBACA,QACA,cACA,eAGA,YAIA,OACA,MACA,KACA,EACA,CAAa,CACb,CAAS,CACT,EAyIA,cACA,cACA,EAOA,GACA,UACA,SACA,SACA,aACA,aACA,UACA,UACA,UACA,UACA,SACA,EA4DA,gBAEA,iDACA,SAIA,eACA,eACA,SAIA,QACA,EAEA,gBACA,gBACA,gBACA,eACA,eACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,UACA,WAEA,KACA,KAGA,cACA,kDAA2F,EAK3F,MACA,6BAIA,cACA,IACA,+CAIA,cACA,IACA,WACA,WACA,KACA,WACA,SAIA,MACA,0BAGA,MACA,0BAGA,MACA,0BAIA,UACA,sBAAoD,EAIpD,OACA,kBAA+C,EAG/C,OACA,wBAA6C,EAI7C,KACA,0BAA+C,GAK/C,MACA,qBAA+C,EAI/C,MACA,oBAA6C,EAI7C,gCAGA,+BACA,kBAGA,wBAEA,EAEA,GACA,OA/KA,YACA,oBACA,cACA,oBACA,oBACA,SAEA,kBAA2C,IAG3C,KAGA,aAUA,iBACA,cACA,sBARA,kCAIA,2BAKA,IACA,EAWA,OAVA,QAAiC,OACjC,QAAiC,OAGjC,sBACA,KACA,wBACS,EAGT,CACA,iBAEA,UAWA,OANA,eAGA,gCAA4D,KAG5D,EACA,CAAa,CACb,oBAA0C,CAE1C,EAwHA,UA5PA,YACA,cACA,YACA,kBAFA,IAdA,EAMA,EAWA,oBAEA,GADA,YACA,QACA,KAEA,GAtBA,EAsBA,UArBA,cACA,uBACA,GAoBA,GAjBA,EAiBA,UAhBA,cACA,0BACA,GAoCA,OApBA,mBACA,QACA,OACA,IACA,CAAa,EAEb,MACA,EAEA,oBACA,SACA,wBACA,2BACA,CAAiB,EACjB,GAGA,MACA,EAEA,CACA,iBAEA,QACA,CAAa,CACb,mBACA,sBACA,cACA,CAAiB,CACjB,CAAa,CAEb,EAkNA,WA1UA,YACA,oBACA,cACA,oBACA,oBAEA,kBAA2C,IAG3C,KAyCA,OAtCA,kBACA,WACA,IAKA,uBACA,MACA,EAGA,cAmBA,GAhBA,CACA,MACA,mBAEA,cAIA,YACA,CAAiB,CACjB,kBACA,YACiB,EAIjB,aAGA,UACA,CAAS,EAGT,CACA,kBACA,sBACA,KAKA,OAJA,sBACA,kBACA,kBACA,CAAiB,EACjB,CACA,CAAa,CACb,oBACA,CACA,EA6QA,KA/MA,YACA,oBACA,cAEA,IADA,kBACA,EACA,CA2MA,EAEA,aACA,gEACA,4DACA,4DAuBA,OArBA,qBACA,0CACA,wCACA,4CACA,8CACA,0CACA,uBAGA,uBACA,qBACA,yBACA,2BAEA,uBACA,wBAEA,wBAEA,+BAEA,CACA,EAEA,EAEA,WACA,+DAA6F,CAC7F,QACA,qBACA,SACA,oBACA,eACA,gBAA6D,EAC7D,SACA,0BAA4D,EAC5D,UACA,0BAA8D,EAC9D,WACA,0BAAgE,EAChE,YACA,0BAAkE,EAClE,+BACA,EACA,WACA,cACA,QACA,EACA,EACA,kBACA,0BAA8E,EAC9E,iBACA,0BAA4E,EAC5E,eACA,gBACA,qBACA,gBACA,WACA,kBACA,gBAEA,GAEA,gEAEA,wBAGA,kCAGA,MACA,OAGA,KAGA,KAGA,KAGA,KAGA,KAGA,GACA,EACA,CAEA,GACA,EACA,CAEA,GACA,EACA,CAGA,aACA,QACA,EACA,aACA,iBACA,EASA,oBACA,GAGA,sBAEA,EAoIA,GACA,SACA,KACA,CAAqB,CAErB,OACA,IAzIA,WACA,QACA,CAwIA,CAAqB,CAErB,YACA,KACA,CAAqB,EAIrB,kBAA4D,IAC5D,MACA,KACA,CAAqB,CAGrB,KACA,IAxKA,WACA,QACA,CAuKA,CAAqB,CAGrB,eACA,YACA,CAAqB,CACrB,qBA3gCA,KACA,0BACA,iBAygCA,EAzgCA,aAEA,gBAEA,EAsgCA,yBA5KA,KACA,SA2KA,EA3KA,EACA,EA2KA,qBAEA,OADA,UACA,CACA,CAAqB,CACrB,uBACA,wBACA,CAAqB,CACrB,yBA1gCA,KAOA,OANA,WAygCA,EAxgCA,cAEA,UAGA,CACA,EAmgCA,yBA//BA,GASA,OAPA,yBAGA,sBACA,yBAGA,CACA,EAs/BA,2BACA,gBACA,CAAqB,CACrB,2BACA,gBACA,CAAqB,CACrB,8BACA,gBACA,CAAqB,CACrB,4BACA,4BACA,CAAqB,CAGrB,oBACA,cACiB,EAGjB,GACA,SACA,KACA,CAAqB,CAErB,YACA,KACA,CAAqB,CAErB,MACA,KACA,CAAqB,CAErB,SACA,eACA,QACA,CAAyB,CACJ,CAErB,yBACA,QACA,CAAqB,CACrB,MA5MA,WACA,OAGA,sBACA,gBACA,CAAqB,EAErB,sBAEA,SAIA,OAAgC,uBAChC,sBACA,WACA,CAAqB,CACrB,EA2LA,OArLA,gBAEA,mBAiFA,OA9EA,sBASA,KARA,GACA,QACA,OACA,UACA,YACA,gBACA,CAAyB,GAGzB,MAEA,CAAqB,EAGrB,sBAGA,KADA,YAEA,MAEA,CAAqB,EAGrB,EACA,mBACA,6BACyB,EACzB,oBAEA,SACA,EACA,OACA,IAIA,MAEA,CAAyB,EAGzB,EAEA,sBAEA,uBAKA,2BAGA,UAGA,SACA,EACA,OACA,GAIA,KACA,CAAyB,EAGzB,IAEA,GACA,QACA,OACA,UACA,WACA,CAAqB,EAGrB,CACA,EAkGA,SAhGA,WACA,sBACA,kBACA,CAAqB,EACrB,sBACA,GAAoC,eAAiC,CACrE,CAAqB,EACrB,sBACA,mBACA,CAAqB,CACrB,CAuFA,EAGA,kBAAyD,IACzD,MACA,eACA,QACA,CAAyB,CACJ,CACJ,EAGjB,eACA,yBAEA,aACA,EAC0B,aAC1B,GAEA,CACA,CAAqB,EACrB,oBACA,YACA,iBACA,YACA,YACA,kBACA,kBACA,SACA,CAAyB,EAEzB,GACA,SAEA,CAAqB,EAGrB,WAGA,GACA,OACA,OACA,CAAiB,EAGjB,WASA,OATyD,EACzD,sBACA,4BACA,CAAiB,EAGjB,KAGA,IACA,CACA,EA2FA,gBACA,mBACA,aACA,UACA,YACA,kBACA,cACA,mBACA,EACA,mBACA,iBACiB,EACjB,oBACA,kBACA,OACA,QACA,cACA,YACA,gBACA,CAAqB,CACrB,CAAiB,EAEjB,GACA,GACA,OACA,QACA,UACA,YACA,gBACA,CAAiB,CAEjB,CACA,EAEA,gBACA,qCACA,EAEA,gBACA,iDACA,EAEA,cACA,uBACA,EAEA,cACA,cACA,EAEA,cACA,eACA,EAEA,cACA,UACA,EAkBA,cACA,yBACA,EAEA,cACA,wBACA,EAEA,cACA,wBACA,EAEA,cACA,YACA,EACA,KACA,4BACA,CACA,EAEA,cACA,wBACA,EAEA,cACA,uBACA,EAEA,cACA,2CACA,EAEA,cACA,iEAEA,QACA,SAIA,wBAGA,eAEA,EADA,+BACA,IAIA,cAEA,EADA,+BACA,EAGA,IACA,EAEA,cACA,0BACA,EAEA,cAIA,IAHA,WACA,eACA,OACA,aAEA,IADA,SAEA,YAGA,QACA,EAEA,GACA,eACA,cACA,gBACA,YACA,cACA,UACA,EAEA,cACA,SAmBA,OAjBA,uBACA,6CACA,iCAEA,gBACA,uCACA,CAAS,EAGT,gDAGA,wBAGA,iBAEA,CACA,EAEA,sBAEA,YACA,YAIA,wBACA,SAIA,OACA,wCACA,SACA,UACA,mBACA,UACA,YACA,YACA,YACA,EAGA,QAEA,OADA,QACA,EAOA,GAHA,mBAGA,cACA,8BACA,YACA,YACA,WAEA,CAKA,OAFA,uCAEA,CACA,EAUA,cACA,kCACA,EAaA,qBACA,KACA,QApBA,OAuBA,EACA,OAGA,KACA,MAGA,mCACA,QAvBA,EA0BA,IAzBA,EAyBA,EAzBA,MACA,cACA,aACA,cACA,WAsBA,MAGA,QACA,EAYA,GACA,MAnOA,YACA,wEACA,KACA,GAEA,KACA,EAEA,KACA,SACA,OACA,mBACA,gBACa,CACb,EAsNA,UACA,gBACA,8BACA,CAAS,CACT,SACA,QACA,QACA,mBACA,kBACA,CAAS,CACT,qBACA,WACA,CAAS,CACT,UAxEA,YACA,WACA,EAuEA,mBACA,IACA,kBA3BA,EACA,UAAuB,SAAU,IACjC,cAA2B,MAAO,GAClC,uBACA,uBACA,uBACA,uBAsBA,CAAc,SACd,WACA,CACA,CAAS,EAOT,mBAEA,SACA,SAIA,WAGA,UAEA,IAhBA,EAgBA,GAhBA,EAgBA,EAfA,EAeA,EAfA,KAqBA,GAHA,OAGA,SACA,uDACA,OACA,qBACA,EACA,IAEA,GAEA,CAGA,QACA,EAEA,iBACA,QACA,OACA,cACA,eACA,QACA,CAAa,CACb,gBACA,WACA,CAAa,CAEb,EAEA,eACA,SAKA,OAJA,gBACA,WACA,kBACA,CAAS,EACT,IACA,EAqBA,eACA,iEACA,SACA,mBACA,gBACA,sBACA,CAAa,EACb,OACA,EAEA,iBACA,SAaA,OAZA,gBACA,MACA,eACA,+BACiB,CACjB,gBACA,2CACA,OACA,CAAqB,CACrB,CAAiB,CAEjB,CAAS,EACT,CACA,EAiCA,IACA,MACA,OACA,SACA,QACA,MACA,EAEA,cACA,qBACA,aACA,eACA,EAyFA,eACA,cACA,CAEA,eACA,QAqBA,gBACA,IACA,cACA,UACA,kBACA,oCACA,YACA,MACA,YACA,MACA,CAEA,6BACA,CAAqB,CACrB,YACA,YACA,EAEA,CAAc,SACd,YACA,CACA,CAEA,gBACA,UACA,aACA,WACA,QACA,OACA,CAAqB,EACrB,KAEA,aACA,YACA,KAEA,SACA,WACA,QACA,OACA,CAAqB,CAErB,CAEA,WAGA,eAEA,MAEA,CAEA,aAxEA,cACA,iCACA,OACA,MACA,MACA,UACA,SACA,SACA,EAEA,EACA,YAEA,MACA,OAEA,CAAa,CACb,EAyDA,6BACA,oBAEA,CA2mBA,eACA,gBAGA,GACA,qBACA,8BAA0D,WAAgB,cAE1E,QACA,CACA,EATA,aAeA,GACA,GACA,8BACA,yDAEA,oBACA,EArBA,eA8DA,kEACA,GA9DA,CA3mBA,iDACA,+CACA,YACA,EAGA,8BACA,6BACA,EAEA,+BACA,8BACA,EAEA,gCACA,+BACA,EA62CA,qBACA,oBACA,EAEA,iBACA,EACA,IACU,gBACV,2BAEA,eAEA,EAEA,cACA,SACA,gBACA,GACA,EACA,wBACA,kCACA,CAAiB,EAEjB,EACA,kBACA,EACA,mBACA,kBACA,CAAiB,EACjB,gBACA,YACiB,EACjB,oBACA,qBACA,4BACA,CAAqB,GACrB,CAAiB,CACjB,EACA,OACA,qBACA,IACA,uBACA,mBACA,IACA,IACA,IAEA,oBAEA,SACA,CAAa,CACb,iBACA,IACA,uBACA,mBACA,IACA,IACA,IAEA,oBAEA,SACA,CAAa,CACb,iBACA,QAAiC,aAAsB,CACvD,CAAa,CACb,qBACA,QACA,QACA,cACA,OACA,yBACA,CAAqB,CACJ,CACjB,CAAa,CACb,KACA,CACA,EAEA,YACA,EACA,EACA,GAEA,8BACA,mBACA,oBACA,CAAa,EACb,oBACA,6BACA,EACA,EACA,qCAEA,CAAa,CACb,EAEA,IACA,OACA,UACA,SACA,OACA,KACA,MACA,SACA,YACA,SACA,UACA,WACA,UACA,WACA,oBACA,SACA,CAEA,eACA,SAEA,OADA,WACA,CACA,EAEA,eACA,wBACA,YACA,OAEA,CAAS,CACT,EAEA,IACA,OACA,OACA,oBACA,aACA,sBACA,mBACA,2BACA,UACA,YACA,EAEA,IACA,QACA,QACA,OACA,EAEA,eACA,uBACA,EAEA,cACA,oCAeA,IACA,kBACA,UACA,gBACA,gBACA,cACA,gBACA,oBACA,gBACA,uBACA,aACA,EAGA,MAGA,mBACA,iCAEA,SACA,mBACA,gBACA,CAAiB,EACjB,gBACA,YACiB,EAGjB,iBACA,KACA,MACA,CAGA,gBAGA,EACA,OAEA,cACA,0BACA,aACA,CAAyB,CACzB,CAAqB,CAGrB,QAIA,iBACA,WACA,CAAiB,EACjB,kBACA,WACA,CAAiB,CACjB,CAAS,CACT,EAEA,mBACA,UACA,mBACA,gBACA,CAAa,EACb,gBACA,gBACA,CAAa,CACb,EAGA,iBACA,gBAA8B,WAAkB,CAChD,EAMA,cACA,uBAA+B,IAC/B,EAEA,eACA,kBAEA,OAGA,aACA,EACA,SACA,SACA,CACA,CAAS,CACT,EAGA,IAEA,oBAGA,4BAGA,yBAGA,2BAGA,yBAGA,+BAMA,yCAGA,0BACA,4BACA,2BACA,8BACA,6BACA,4BACA,4BACA,6BACA,6BACA,qCAGA,4BAGA,4BAGA,uBACA,8BAGA,0CACA,wCACA,+BAGA,2BACA,8BACA,+BACA,gEAGA,8BACA,8BACA,2CAGA,6BACA,2BACA,uBACA,0CAGA,4BAGA,0BAGA,uCACA,wCACA,wCACA,wCAEA,uCACA,0BA9LA,OAGA,UAFA,wBAGA,SAEA,iBAwLA,WAEA,WACA,+EACA,UACA,CAEA,6DACA,uDACA,2DACA,kDACA,iDACA,uCACA,mCACA,mDACA,uCACA,uDACA,4CACA,0DACA,0DACA,2DACA,iEAEA,6CACA,2CACA,yCAEA,2CACA,6CACA,6CACA,oDACA,iDACA,mDACA,4CAGA,YACA,6UACA,UACA,CAEA,aACA,yTACA,UACA,CAEA,WACA,8YACA,UACA,CAEA,UACA,kZACA,UACA,CAEA,UACA,oQACA,UACA,CAGA,0BACA,6BACA,2BACA,kCACA,8BACA,kCACA,qCACA,6BACA,sCACA,yCACA,sCACA,uCACA,iCACA,kCACA,gCACA,iCACA,iCACA,kCAGA,kCACA,iCACA,oCACA,qCAGA,kCACA,uCACA,2CACA,iDACA,mDACA,+CACA,mDACA,2CAGA,oBAGA,6DAGA,wBAEA,KACA,WAIA,KACA,YAIA,oBACA,SAKA,mBACA,eACA,CAAa,QAEb,EAEA,eACA,QACA,SAEA,gBACA,mBACA,gBACA,CACA,oBACA,EAEA,eACA,4BACA,kBACS,CACT,EAEA,IACA,QACA,OACA,QACA,OACA,OACA,EAEA,QACA,cACA,aACA,IACA,uBACA,wDACA,sCACA,8BACA,gBACA,sBACc,SACd,KACA,CAEA,SACA,EAEA,IACA,cACA,oBACA,2BACA,CAEA,IACA,WACA,cACA,qBACA,QACA,CAEA,4BAEA,eACA,4BACA,EACA,eACA,4BACA,EACA,eACA,4BACA,EAEA,eACA,OACA,qBACA,0DAEA,EAEA,eACA,OACA,sBACA,kBACA,WACA,WACA,UACA,UACA,kBAEA,eAEA,aAEA,aAEA,aAEA,CACA,CAAa,CAEb,qBACA,oBACA,CAAa,CAEb,4BACA,wBACA,CAAa,CAEb,4BACA,kBACA,CAAa,CAEb,qBACA,eACa,CAEb,0BACA,oBACA,wBACA,CAAa,CAEb,0BACA,oBACA,wBACA,CAAa,CAEb,sBACA,8BACA,mBACA,sBACA,CAAqB,EACrB,gBACA,OACA,OACA,mBAEA,CAAqB,CACrB,CAAa,CAEb,kCAKA,MAJA,0CAEA,EACA,mCAEA,CAAa,CAEb,uCACA,2CACa,CAEb,gCACA,sCACA,mBACA,CAAiB,CACjB,CAAa,CAEb,2BACA,0BACa,CAEb,oCACA,0CACA,CAAa,CAEb,oBACA,YACA,CAAa,CAEb,iCACA,OACA,kDACA,0DACA,0DACA,yDACA,CACA,CAAa,CAEb,EAEA,eACA,yBAGA,4BACA,aAIA,gCACA,UAKA,GAMA,EAEA,mBACA,gCACA,EAMA,uBAJA,SAKA,KACA,MAIA,WACA,WAXA,EAgBA,mBAGA,EAlBA,WAkBA,IAGA,EACA,EAEA,eACA,uCAAgD,wBAAwB,2BAA2B,6BACnG,EAEA,EAEA,eACA,SACA,WACA,MACA,WACA,OACA,EAEA,eACA,yBACA,EAEA,eAEA,sBACA,SAIA,+BAGA,cACA,MAGA,yBACA,MAGA,gBACA,MAGA,iBACA,MAIA,iBAEA,WACA,MAIA,EAGA,EACA,EAEA,eACA,gEACA,4BACA,EAEA,cACA,sEACA,OACA,gBACA,IACA,wBACA,IACA,qBACA,IACA,sBACA,IACA,wBACA,IACA,uBAEA,EAEA,iBACA,kEACA,8DACA,EACA,mBACA,oBACA,yBAmBA,OAlBA,4BAGA,mDAGA,MACA,SAIA,mBACA,UAEA,gBACA,uBAGA,CACA,EAUA,iBACA,MARA,mBACA,oBACA,0BACA,uBACA,qBAMA,MACA,YAEA,OADA,YACA,YACA,CAEA,qBACA,MACA,CAAS,CACT,EAEA,YACA,EACA,GAKA,QAHA,4BACA,oBAEA,IAAwB,WAAuB,IAC/C,qBAGA,cACA,EAEA,eACA,mBAA4B,uBAC5B,EAcA,eACA,YAGA,UAPA,KAJA,EAHA,cAGA,mBAWA,EACA,EAMA,eAEA,iDAGA,QACA,mCACA,UACA,gBACA,iCAAoD,IAAI,IAAI,OAC5D,CAAa,EACb,mBACA,gBACa,EAEb,6CACA,EAEA,eACA,+BACA,2BACA,4BACA,CACA,WACA,EAUA,eACA,OACA,YACA,UACA,SACA,EAEA,gBACA,KACA,KACA,SACA,IACA,IACA,6BACA,uBACA,KACA,CACA,cAEA,QACA,MACA,SACA,QACA,CAEA,YACA,MACA,SACA,QACA,CAEA,MAtCA,+BAsCA,IArCA,CAqCA,EArCA,2BACA,KAqCA,MACA,WACA,QACA,CACA,CACA,CAAU,SACV,KACA,GACA,EAAU,OACV,IACA,mBACA,UAEA,EAAc,OACd,KACA,OAEA,CACA,CAEA,QACA,EAEA,eACA,OACA,YACA,YACA,WACA,UACA,eACA,WACA,YACA,EAkCA,cAEA,OACA,gBACA,aACA,sBACA,QACA,CAAiB,EAEjB,MACA,CAGA,uBAGA,YACA,EACA,YAEA,kCAGA,cAGA,mBACA,MACA,EACA,cACA,EAGA,OACA,OAEA,kCAEA,CAAiB,CACjB,YACA,OACA,QACA,mBACA,CACA,aACA,OACA,MACA,EACA,EAEA,CAAiB,CACjB,gBAUA,GARA,GACA,WAIA,kCAGA,IACA,gBACA,MACA,CAGA,eAGA,6BACA,CAAiB,CACjB,WACA,eACA,CAAiB,CACjB,YACA,SACA,gCAEA,eACA,oBACA,gBACA,eACA,CAAqB,CACrB,EAEA,EAEA,kBAAkC,OAClC,sBACA,iBACA,CAAa,CACb,YA5HA,WACA,mBA4HA,MA1HA,WACA,4BACA,iBAEA,EAuHA,KApHA,WAEA,gBAEA,iBAGA,mBACA,iBACc,kBAEd,4BACc,MAEd,cA/HA,MA+HA,GAhIA,OACA,KADA,SAmIA,IAEA,CAkGA,CAAS,EAET,QACA,EAEA,eACA,wBACA,EAEA,mBACA,OACA,sBAA8C,CAC9C,uBAAgD,CAChD,mBAAwC,CACxC,sBAA8C,CAC9C,oBAA0C,CAC1C,oBAA0C,CAC1C,iBACA,KACA,SACA,CAAa,EAIb,KACA,KAGA,gBACA,CACA,cACA,UAA2B,CAC3B,kBACA,CAAa,CACb,GAIA,eAIA,iBACA,GACA,GACA,EACA,4DAIA,yBAwFA,MApFA,CADA,yBACA,uBAEA,GAIA,iDACA,EAGA,gCAEA,gBAKA,gCAIA,IAIA,KAGA,eACA,EAGA,oBAEA,4BACA,YAEA,YAEA,EAGA,qBACA,mBACA,EAGA,qBACA,KACA,WACA,EAGA,uBACA,qBACA,EAGA,sBAGA,cACA,sBAIA,2CACA,iDACA,uBACA,CAAS,EAGT,gBACA,gCAIA,mBACA,uBAIA,UAEA,CACA,EAEA,qBACA,OACA,OACA,OACA,OACA,SACA,CACA,EAEA,eACA,mBACA,oDACA,CACA,EAEA,eACA,kBACA,EACA,cAEA,QADA,KACA,kCAA6E,IAAa,IAC1F,kBAKA,OAHA,sBACA,qCACA,CAAS,EACT,CACA,EAEA,cACA,gEACA,yCAEA,wBACA,SAIA,iBACA,YAIA,MACA,UACA,YACA,QACA,EACA,EACA,WACA,YACA,WACA,EAGA,6BAEA,SACA,EACA,YACA,gBAAgC,IAChC,mBACA,CAAiB,GA2CjB,OAxCA,qBAEA,gCAGA,oBAGA,EACA,GACA,OACA,SACA,kBACA,KACA,oBACA,GAGA,EAEA,sBACA,EACA,GACA,QACA,SACA,4BACA,2BAGA,EAEA,wBACA,wDACA,EAEA,kBACA,eACA,YAGA,CACA,CACA,EAEA,IACA,SACA,WACA,aACA,QACA,SACA,EAYA,YACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GA8GA,QAnCA,EAQA,EAKA,EAvDA,EACA,EAKA,EAOA,EAKA,EAhDA,KACA,oBACA,gBACA,cACA,qBAGA,GACA,WACA,UACA,EAGA,EACA,UACA,YACA,QACA,EACA,EACA,UACA,cACA,gEACA,EACA,EACA,WACA,YACA,WACA,EA+EA,uBACA,IAAwB,KAAqB,KAC7C,UACA,kDACA,OACA,QACA,YACA,SACA,OACA,OACA,WACA,cACA,iBACA,WACA,aACA,YACA,CACA,CA3HA,IAiIA,cACA,kDAGA,cAEA,eAMA,IAHA,iBAGA,CAGA,oBACA,8BACqB,GApBrB,cA0BA,MACA,CAGA,uBACA,gBAGA,MACA,UACA,YACA,QACA,EACA,EACA,WACA,YACA,WACA,EAGA,yBAEA,EACA,6BACA,aACA,gBAAsC,YACtC,iDACA,yBACA,uBACA,qBACuB,EAEvB,eACA,UACA,EACA,gBAAgC,IAChC,SACA,CAAiB,EAGjB,qBAEA,qBAGA,eAGA,GACA,EAEA,6BACA,oBACA,GACA,EAEA,sBACA,kBACA,eACA,oCACA,MACA,EACA,GACA,QACA,SACA,4BACA,2BAIA,EAEA,wBACA,kBACA,eACA,MACA,QAEA,EAEA,qBACA,mBACA,eACA,GACA,EACA,EAEA,qBAEA,uBAGA,oBACA,wBACA,gCACA,IACA,CAAa,oBAGb,GACA,EAEA,aAEA,oCACA,iCACA,aACa,IAGb,6BAQA,OALA,uBACA,gBACa,IAIb,EAGA,aACA,qBACA,gCACa,UACb,GACA,GACA,EAEA,aACA,sBACA,wBACA,WACA,iBAEA,CAAa,CACb,EAmCA,OAhCA,YA5NA,EAyOA,YAEA,YAGA,EACA,mBACA,iBACA,CAAqB,EACrB,oBACA,qBACA,kBACqB,EAGrB,IACA,CAAa,CA1Ob,CAFA,UAZA,uBAOA,GACA,QALA,6BACA,sBACA,gBAAsC,YAItC,aACA,IAIA,mBACA,uBACA,EAEA,sBACA,SACA,GACA,QACA,SACA,4BACA,2BAGA,EAEA,oBAxEA,EAuQA,YAEA,YAGA,KAGA,aACA,IACA,CAAa,CAhRb,eAGA,oCAEA,EACA,6BACA,eACA,gBAAsC,YACtC,uBACuB,EAEvB,kBAAgD,IAChD,SACA,CAAa,EASb,CANA,KACA,KACA,YACA,IAGA,mBACA,uBACA,EAEA,sBACA,SACA,GACA,QACA,SACA,4BACA,2BAGA,EAEA,mBA+PA,CACA,iBACA,aACA,GACA,CAAa,CAEb,EA2HA,cACA,gEACA,yCACA,yCACA,+CAGA,qBACA,WACA,IACA,sCACA,IACA,IAEA,kBAEA,wCACA,EAGA,qBA/HA,eAEA,MAGA,qBACA,YA4HA,EA5HA,UACA,uBACA,wBACA,UAyHA,MArHA,EACA,EACA,EACA,EACA,EACA,EACA,EA+GA,GA1GA,MACA,UACA,YACA,QACA,EACA,EACA,UACA,YACA,QACA,EACA,EAgGA,EA/FA,SACA,YACA,WACA,EAEA,EACA,mBAyFA,EAzFA,QACA,mBACA,cACA,EAA4B,CAE5B,WAGA,kBAAgD,CAiFhD,EAjFgD,CAChD,SACA,CAAa,EAGb,eAGA,MACA,SAwEA,EAxEA,mBAIA,qBAAuC,iBAAwB,yBAC/D,SAmEA,EAjEA,OACA,gDAEA,CAAa,EAGb,SACA,KACA,GAyDA,IAzDA,KACA,GA6BA,OA3BA,qBACA,EACA,GACA,OACA,SACA,cACA,2BAGA,EAEA,sBACA,EACA,GACA,QACA,SACA,4BACA,2BAGA,EAEA,kBACA,eACA,YAGA,EACA,EAuBA,IAIA,EAMA,cACA,gEACA,yCAEA,wBACA,SAIA,iBACA,qBACA,UACA,EAIA,MACA,UACA,YACA,QACA,EACA,EACA,WACA,YACA,WACA,EAGA,uBACA,SACA,EACA,QACA,GA0BA,OAxBA,qBACA,EACA,GACA,OACA,SACA,cACA,2BAGA,EAEA,sBACA,EACA,GACA,QACA,SACA,4BACA,2BAGA,EAEA,kBAEA,CACA,CACA,EAEA,cACA,+DACA,2DACA,4BACA,EAEA,eACA,gEACA,yDACA,gEACA,6DACA,OACA,aAuBA,OAFA,KAnBA,aACA,mBACA,UAEA,OACA,UAGA,UACA,0BACA,KACA,MACA,CAEA,KAEA,iBACA,IAIA,CACA,iBACA,eACA,CAAa,CAEb,EAEA,iBACA,OACA,YACA,oBACA,iCACA,cACA,eACA,oBACA,WACA,aACA,aACA,EACA,+BAoIA,aAEA,YAGA,sCAGA,mCAGA,cACA,EAcA,IACA,WACA,+DACA,EACA,WACA,uBACA,EAEA,IACA,WACA,+CACA,EACA,WACA,mBAGA,kBAAkC,OAClC,QA7KA,cACA,iBAIA,mCAGA,kCACA,EAEA,aACA,cACA,wCACA,EAGA,gBAGA,uBAGA,iCACA,YACA,sBACA,2CAEA,IAIA,kDAEA,GAEA,CAAiB,CAGjB,kBAIA,YAEA,EAGA,EAKA,YAGA,gBACA,EACA,CACA,YACA,SACA,UACA,UACA,EAGA,kCAGA,aAGA,+BAMA,KACA,6BAEA,GAEA,CAAiB,CAGjB,YAEA,sCAGA,OACA,QACA,KACA,EACA,CACA,aACA,OACA,SACA,EAEA,CAAiB,CAGjB,gBAEA,kCAGA,sBAEA,GACA,CAAiB,CAGjB,WAEA,sCAGA,+CACA,CAAiB,CAGjB,YACA,oBACA,EAEA,EA8CA,QACA,cACA,cACA,MAjCA,WACA,IACA,cACA,sBACA,aACA,iBACA,sBACA,aACA,eACA,eACA,CAwBA,CAAS,EAET,QACA,EAEA,eACA,2CACA,EAEA,eACA,6BAgBA,OAbA,yBACA,kBACU,OAEV,cACA,YACU,OAEV,WACA,OACA,iCAGA,CACA,UACA,UACA,UAEA,EAEA,eACA,sDACA,EAEA,iBACA,kBACA,iBACA,eACA,wBACA,WACA,oBAEA,QACA,EAEA,cACA,kEACA,EACA,4DACA,8DAEA,OAKA,GAEA,YAGA,UAGA,YAGA,YAGA,OAGA,sBAGA,gBAGA,qBAGA,wCAGA,kBACA,oBACA,EAGA,OAKA,KAGA,cACA,iBACA,EAGA,cACA,2BACA,IACA,8CACA,IACA,IAEA,oBAEA,8BACA,EA0TA,kBACA,mBACA,OACA,UACA,IACA,sBACA,cACa,EAGb,2CAGA,OAGA,qBACA,MACA,WACA,QACA,CAAa,EACb,EAMA,gBACA,CACA,IACA,eACA,QACA,CAAqB,CACJ,CACjB,QACA,eACA,QACA,CAAqB,CACrB,gBACA,UACA,CAAqB,CACJ,CACjB,UACA,eACA,6BACqB,CACJ,CACjB,YACA,eACA,oBACqB,CACJ,CACjB,QACA,eACA,gBACqB,CACJ,CACjB,UACA,eACA,mBACqB,CACJ,CACjB,0BACA,eACA,sBACA,CAAqB,CACJ,CACjB,eAAiC,IA1XjC,WACA,sBACA,CAwXiC,CAAuB,CACxD,UAA4B,IAxX5B,WACA,mBAuX4B,CAAkB,CAC9C,UAA4B,IAtX5B,WACA,kBACA,CAoX4B,CAAkB,CAC9C,MAAwB,IApXxB,WACA,cAmXwB,CAAc,CACtC,cACA,eACA,4BACqB,CACJ,CAEjB,QACA,eACA,gBACqB,CACJ,CAEjB,YA5DA,YACA,mBACA,EA2DA,mCACA,MAEA,YADA,GACA,oBACA,IAFA,CAEA,MACA,CAAyB,EACzB,IAEA,SACA,EACA,CAAiB,CAEjB,qBACA,aACA,CAAiB,CAEjB,UAvRA,WACA,mBACA,uBACA,MACA,CACA,WACA,eACA,EAiRA,UA/RA,WACA,gBAGA,qBACA,EA2RA,kBA/KA,WACA,uBACA,uBACA,EA6KA,gBA3KA,WACA,+BACA,uBACA,uBAEA,WACA,mBAEA,IACA,MACA,CAEA,aACA,GACA,EAEA,yBACA,CAAa,CACb,EA2JA,KAhZA,gBAQA,GANA,WAGA,mBAGA,QACA,wBACA,MACA,CAGA,aAGA,uBACA,cACA,CAAa,EAGb,wBAEA,mBAGA,2BAGA,WACA,WACA,+BACA,iCAIA,cACA,CAAa,EAGb,4BACA,cAEA,oBACA,CAAa,EAGb,yBACA,iBAEA,yBACA,CAAa,EAGb,wBACA,WACA,eACA,CAAa,EAGb,wBAEA,oBAGA,kBAEA,sBAGA,oCACA,0BAEA,WAGA,SACA,EAYA,0BACA,KACA,MACA,CAGA,MAhBA,YAEA,SACA,eAEA,iBACA,sBACA,EAUA,CAAa,EAGb,eAGA,iBAGA,QACA,EAsSA,QAjRA,gBAEA,wBACA,uBACA,MACA,CASA,GANA,iBAGA,OAGA,2BACA,uBACA,MACA,CAAiB,EACjB,MACA,CAGA,wBAEA,kBACA,uBACA,CAAa,EAGb,4BAEA,cACA,CAAa,EAEb,kCAEA,uBAGA,kBACA,wBAEA,0BACA,uBACA,CAAa,EAEb,wBACA,kBACA,CAAa,EAEb,yBACA,uBACA,uBACA,oBACA,CAAa,EAEb,yBACA,uBAGA,wBAEA,WACA,mBAGA,GACA,GAEA,CAAa,EAEb,4BACA,uBACA,CAAa,EAYb,oBAGA,SAZA,YAEA,YAGA,4BAAwD,IACxD,EAMA,GAGA,mBACA,EAsLA,OAxJA,cACA,iCAGA,MACA,6BACA,sBACA,aAGA,aACA,IACA,MACA,CAGA,EACA,EACA,WAEA,2BACA,kBACA,GACA,CAAqB,CACrB,YAEA,OACA,IACA,MACA,CAGA,8BACA,0BACA,IACA,GAIA,WACA,mBACA,CAAa,CACb,CA+GA,CAAa,CAEb,KACA,CACA,kBACA,kBACA,CAAiB,CAEjB,mBACA,oBACA,CAAiB,CACjB,UACA,eACA,kBACqB,CACJ,CAEjB,mBACA,oBACA,CAAiB,CACjB,UACA,eACA,iBACA,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,WACA,WACA,WAEA,WAGA,kCACA,0CACA,IAgEA,EAhEA,gBAGA,mBAEA,+BACA,OACA,QACA,SACA,QACA,CAAyB,mBAEzB,mCACA,GACA,WAEA,GAEA,EACA,yBACA,CACA,QACA,OACA,oBACA,wBAAyE,YAAoB,CAC7F,CAAqC,CACJ,CAEjC,GAEA,CAAyB,EAEzB,MACA,CAGA,qBACA,mBACA,QACA,WACA,6BACyB,EAIzB,iBAEA,sBACA,6BAAkE,QAAW,CAC7E,CAAyB,IACzB,SAmBA,kCAjBA,YACA,SACA,GACA,qBACA,yBAEA,uBAEA,qBAAmE,EACnE,kBAAgD,CAChD,EAQA,yBAIA,0BAVA,EAWA,6BAVA,yCAAqF,QAarF,yBACA,IAEA,CAAiB,IACjB,CAAa,CAEb,sBACA,cACA,UACA,gBACA,MACA,yBAEA,IADA,8BAEA,2CACA,CAAa,CAEb,iBAEA,KADA,WAEA,oBACA,2BACA,CAAiB,CACjB,CAAa,CAEb,sBACA,cACA,UACA,sBACA,YAEA,YAEA,IAEA,uBACA,oCACA,uBACA,kBACA,CAEA,6BAqBA,YAfA,SALA,YACA,aACA,kCACA,KACA,GAGA,gBACA,iCACA,cACA,oBACA,mBACA,UACA,UACA,UACA,qBAAyD,CAChC,CACzB,CAAqB,CACrB,CAAiB,GAGjB,KAjCA,wBAAuE,GAkCvE,MAhCA,wBAAuE,EAiCvE,CAAa,CAOb,qBACA,IAnTA,EAmTA,WACA,UACA,kBACA,sBACA,YACA,0BAAuE,EACvE,YACA,0BAAuE,EACvE,YACA,gBAA4D,EAE5D,SACA,GACA,gCACA,SACA,CAAqB,EAErB,MACA,CAGA,IACA,QACA,wDAOA,WAGA,GACA,yBACA,kDACA,CACA,kCAEA,yBACA,SACA,OACA,CAAyB,EAEzB,GAAkC,kBAA0B,EAE5D,MACA,CAIA,qBAGA,GACA,mCACA,sCACA,CACA,4BAwBA,GAvBA,EACA,OACA,GACA,qBACA,yBAEA,GAEA,gBACA,GAGA,cACA,SACA,QAC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,SACA,GACA,qBACA,yBAEA,uBAKA,IAEA,CAAa,EAEb,iCACA,aACA,CAAa,EAEb,uCAEA,eACA,4BAAyD,QAAa,EACtE,MACA,CAGA,oCACA,yBAEA,iBAAkD,WAAgB,CAElE,CAAiB,CACjB,CAAa,EAEb,gDAEA,6BACA,4BAAyD,QAAa,EACtE,MACA,CAIA,kBACA,GACA,4BAAyD,QAAa,CACtE,EAEA,8BACA,MACA,aAGA,sBACA,QAEA,MAGA,oBACA,UAGA,2BACA,UAEA,CAAa,EAEb,wCACA,SACA,iDACA,uBAEA,gBACA,0BAtlCA,WAslCA,GAEA,iBAAsD,WAAgB,CAEtE,CAAqB,EACrB,kBAAwC,CACxC,CAAa,EAEb,wBACA,gBAEA,iBAGA,wBACA,oBACA,CAAiB,EAajB,EAVA,QACA,MACA,GACA,kCACA,oBACA,CAAyB,IAKzB,oBACA,kCACA,UACA,CAAqB,CACrB,CAAiB,CACjB,CAAa,CAEb,EAEA,cAEA,eACA,QACA,EAEA,eACA,gCACA,EAEA,iBACA,sBACA,EAGU,iBACV,iBAHA,6BACA,iBAIA,EAEA,qBACA,6BACA,OACA,kBACA,iBACA,CACA,EAEA,yBACA,kBACA,cACA,mDACA,EAEA,uBACA,QAOA,OANA,cACA,MAEA,cACA,MAEA,GACA,EACA,EACA,EACA,sBACA,sBACA,EAEA,EAgEA,MACA,UACA,0BACA,oBACA,cACA,OAnEA,YACA,aACA,UAEA,UACA,aACA,YAGA,cACA,sBACA,iBACA,wBACA,CAAS,EAET,0BAEA,YAEA,gBACA,EAgDA,MA9CA,YACA,aACA,UACA,kBAIA,SACA,kCAIA,gDAGA,0BAGA,IACA,GAGA,SACA,IACA,OAEA,IACA,cAIA,sBAGA,oBAGA,wDACA,EASA,QACA,iCACA,mBACA,YACA,SAA2B,0BAA8B,CACzD,UACA,cACA,cACA,YACA,OACA,CAAiB,CACJ,CACJ,CACJ,EAyBL,MACA,aACA,YACA,aACA,CAAS,CAET,cACA,oBACA,0BACA,QACA,eACA,+DACA,YACA,gBACA,gBACA,oBACA,oBACA,SAA2B,0BAA8B,CAC5C,CAEb,YACA,CAAS,CAET,OA9CA,YACA,aACA,UACA,4DAEA,eACA,EAyCA,MAvCA,YACA,aACA,UACA,eACA,yCAEA,OACA,gBACA,oCACU,QACV,gBACA,sCAEA,CA2BA,CAAK,EAEL,eACA,MACA,2DACA,6DACA,4DACA,eAEA,mBAEA,mBAEA,mBAOA,MACA,cAGA,CAPA,2BAEA,EAMA,MAjBA,uBAqBA,IACA,aAXA,GAWA,IApBA,oBAwBA,IACA,gBAvBA,oBA2BA,gBAzBA,mBA0BA,EAEA,mBACA,SACA,WACA,WACA,mBACA,aACA,CAAa,EACb,OACA,EA0BA,eACA,aACA,UACA,GACA,eACA,GACA,8BACA,IACA,8BACA,0CAIA,oDACA,EAEA,eACA,aACA,UAEA,qCACA,IAAyB,eAA0B,EACnD,MACA,CAEA,+DACA,EAEA,MACA,iBACA,cACA,oBACA,SACA,iBACA,wBACA,6BACA,yBACA,CAAS,EAET,0BACA,iCAAwD,IAAU,OAAY,EAC9E,CAAS,CACT,OAlEA,YACA,aACA,UAEA,YACA,wCAIA,0BACA,iBACA,iBAGA,gBACA,uCACA,iBACA,iBAGA,iDACA,uCACA,EA6CA,QACA,mCACA,YACA,oBACA,mBACA,CAAa,CACJ,CACJ,EAEL,eACA,wBACA,EAoBA,eACA,aACA,WACA,EACA,kBACA,kCACA,yDAEA,iBACA,gDACA,EAmCA,eACA,aACA,kBACA,gBACA,EAEA,eACA,aACA,WACA,6BACA,0BACA,EAEA,MACA,mBACA,cACA,oBACA,SACA,iBACA,8BACA,4BAtCA,YACA,aACA,oDACA,gDACA,EAmCA,0BAjCA,YACA,aACA,4DACA,+CACA,EA8BA,6BA5BA,YACA,aACA,6DACA,8CACA,EAyBA,iCAxDA,YACA,aACA,WACA,EACA,kBACA,qCACA,qCACA,IACA,eACA,IAEA,iBACA,gDACA,EA4CA,iCACA,6BACA,0BACA,mCACA,0CACA,8BACA,CAAS,EAET,0BACA,iCAAwD,IAAU,OAAY,EAC9E,CAAS,CACT,OAlGA,YACA,aAGA,YACA,0CACA,iBACA,aAGA,gBACA,yCACA,iBACA,YAEA,IAAiC,eAAsB,eAAkB,CACzE,EAmFA,QACA,6CACA,YACA,SAA2B,0BAA8B,CACzD,oBACA,mBACA,CAAa,CACJ,CACJ,EAML,IACA,eACA,yCACA,yBACA,6CACA,+BACA,CAAS,CACT,eACA,yCACA,yBACA,sBACA,6CACA,oCACA,CAAS,CACT,YACA,qCACA,6BACA,uBACA,yCACA,mCACA,CAAS,CACT,aACA,sCACA,iCACA,wBACA,0CACA,oCACA,CAAS,CACT,qBACA,+CACA,+BACA,mDACA,oCACA,CAAS,CACT,qBACA,+CACA,+BACA,sBACA,mDACA,oCACA,CAAS,CACT,sBACA,8CACA,wCACA,qBACA,oDACA,oCACA,CAAS,EAIT,MACA,iBACA,UACA,CAAK,EAEL,mBACA,4BACA,0CACA,mCACA,EAEA,eAEA,OADA,uCACA,OAIA,eACA,+DACA,EACA,eACA,6DACA,EAQA,eACA,uDACA,EAEA,IACA,qBAA+B,UAAY,CAC3C,qBAA+B,UAAY,CAC3C,kBAA4B,UAAY,CACxC,mBAA6B,UAAY,CACzC,2BAAqC,UAAY,CACjD,2BAAqC,UAAY,CACjD,4BAAsC,UAAY,CAClD,uBAAiC,gBAlBjC,YACA,mDACA,CAgBiC,CAA8C,CAC/E,0BAAoC,gBAhBpC,YACA,uDACA,CAcoC,CAAiD,CACrF,6BAAuC,gCAAwC,CAC/E,MAAgB,oCAA0C,CAC1D,QAAkB,oCAA0C,EAG5D,IACA,kBAA4B,UAAY,CACxC,mBAA6B,UAAY,CACzC,MAAgB,cAAqC,CACrD,QAAkB,cAAqC,EAGvD,IACA,2BAAqC,UAAY,CACjD,0BAAoC,UAAY,CAChD,QAAkB,UAAY,EAG9B,IACA,wBACA,kBAAgC,UAAY,CAC5C,MAAoB,cAAqC,CACzD,QAAsB,wBAAiD,CAC9D,CAET,qBACA,qBAAmC,UAAY,CAC/C,uBAAqC,UAAY,CACjD,QAAsB,UAAY,CACzB,CAET,2BACA,qBAAmC,UAAY,CAC/C,kBAAgC,UAAY,CAC5C,MAAoB,cAAqC,CACzD,QAAsB,UAAY,CACzB,CAET,uBACA,0BAAwC,mBAA+C,CACvF,MAAoB,cAAqC,CACzD,QAAsB,UACtB,CAAS,CAET,6BACA,0BAAwC,mBAA+C,CACvF,kBAAgC,UAAY,CAC5C,MAAoB,cAAqC,CACzD,QAAsB,wBAAiD,CAC9D,CAET,iBACA,qBACA,kBAAgC,UAAY,CAC5C,MAAoB,cAAqC,CACzD,QAAsB,cAAqC,CAClD,CAET,6BACA,+BACA,oCACA,8BACA,4BAA0C,UAAY,CACtD,MAAoB,UAAY,CAChC,QAAsB,UACtB,CAAS,CAET,iCACA,kBAAgC,UAAY,CAC5C,2BAAyC,UAAY,CACrD,QAAsB,UAAY,CAClC,MAAoB,cAAqC,CAChD,CAET,wCACA,4BAA0C,UAAY,CACtD,QAAsB,UAAY,CAClC,MAAoB,UAAY,CACvB,CAET,2BACA,kBAAgC,UAAY,CAC5C,mBAAiC,UAAY,CAC7C,MAAoB,cAAqC,CACzD,QAAsB,UAAY,CACzB,CAET,6BACA,EAGA,MACA,mBACA,YACA,6CACA,CAAS,CACT,qCACA,cACA,QACA,qCACA,YACA,gBACA,gBACA,SAA2B,0BAC3B,CAAa,CAEb,CAAK,EAoOL,MACA,oDACA,GAEA,aACA,WACA,6CACA,CAAS,CACT,iDACA,aACA,WACA,wCACS,CACT,iDACA,GAEA,aACA,WACA,2CACS,CACT,wCACA,aACA,uCACA,yCACA,CAAS,CACT,gCACA,aACA,oCACA,sCACA,CAAS,CACT,kCACA,aACA,uCACA,yCACA,CAAS,CACT,0CACA,aACA,WACA,oCACA,gDACS,CACT,6CACA,aACA,WACA,uCACA,mDACS,CACJ,EAEL,MACA,OAjRA,YACA,IA4BA,EA5BA,SACA,UAEA,uCAEA,OADA,qBAAyC,QACzC,C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B,iCAiD/B,mBACA,SACA,qCACA,gBACA,mBACA,CAAS,EAET,8BAEA,mCACA,EAiCA,MACA,aACA,iBACA,aAEA,OADA,QACA,sCACS,CACT,MAtCA,YACA,aACA,UASA,GANA,uDACA,0CACA,2CAIA,UAGA,6BACA,4BAGA,sCAGA,kCAIA,8CAGA,mCACA,EAUA,OAlGA,YACA,aACA,UACA,CACA,CACA,UACA,CAAa,CAEb,CACA,cACA,OACA,gBACA,WACA,CAAiB,CAEjB,QACA,YACA,SACA,CAAqB,CAErB,+BACiB,CACJ,CAEb,CACA,cACA,OACA,eACA,CAAiB,CAEjB,QACA,YACA,aACA,CAAqB,CAErB,sBACiB,CACJ,CACb,qBACA,cACA,CAAS,EAET,6CAEA,mBACA,EAsDA,cACA,QACA,2CACS,CACJ,EAEL,eACA,wBACA,YACS,EACT,SACA,OACA,qBACA,GACA,CAAa,CACb,oBACA,QACA,CAAa,CACb,yBACA,sBACA,CAAa,CAEb,EAEA,IACA,cACA,cACA,YACA,OACA,EAEA,YAEA,IACA,2BACA,wCACA,sCACA,uCACA,qBACA,2CACA,6BACA,4CACA,8CACA,8CACA,mDACA,mDACA,iEACA,sCACA,iCACA,EAiHA,MACA,oCACA,aACA,WACA,kBACS,CACJ,EA6EL,MACA,OAhMA,YACA,aACA,UAGA,8BACA,uCAAwD,QAAc,CACtE,EAGA,oCACA,sDAGA,kCACA,sBAAgD,QAAc,GAI9D,oDAA4E,kBAAoB,GAGhG,wBAGA,sBAGA,+BAGA,mCA0EA,yCAxEA,YACA,gBAEA,SAEA,GACA,UACA,UAGA,eACA,eACA,gBAGA,cACA,YACA,aAGA,sCAEA,4BAA6C,oBAAoC,EAEjF,kBACA,cAEA,oBACA,mBAEA,cACA,cACA,eAKA,8BACA,8BACA,SACA,KACA,0DAGA,4BAAiD,oBAAoC,EACrF,EAuBA,2CACA,sCAtBA,cACA,cAEA,8CACA,4CAEA,cACA,cACA,eAGA,4BAAiD,oBAAoC,EAGrF,GACA,sBACA,4DACA,CAAqB,IAErB,GAIA,GAGA,EAuFA,MA7EA,EACA,CACA,0BACA,aACA,QACA,YACA,eACA,eAEA,CAAa,CACb,0BACA,OACA,gCACA,CAAa,CACb,0BACA,aACA,UACA,kBACA,kBACA,kCACA,CAAa,CACJ,CACT,YACA,aACA,YACA,UACA,kBAEA,uCACA,aACA,qCAKA,QACA,SACA,mBACA,0BACA,CAAiB,EACjB,UACA,iBACA,kBACiB,EAGjB,6BAEA,sBAGA,4DAIA,MACA,0EACA,EAKc,GACd,mCALA,IAA0B,yBAA4C,EACtE,kDACA,gDAOA,GACA,0BAGA,2BACA,GAMA,oBACA,aACA,UACA,yDACA,2BAA4C,WAAiB,CAC7D,CAAS,CACT,SACA,YACA,QACA,MACA,KACA,oBACA,mBACA,YACA,aACA,aACA,aACA,CACA,wEAEA,YACA,UACA,UACA,cACA,cACA,SAA2B,0BAA8B,CAC5C,CACJ,CACJ,EAEL,iBAGA,sCACA,EAEA,mBACA,MAEA,2BAEA,WACA,OAGA,gDAIA,MADA,KACA,aACA,6BACA,YACA,UAGA,UACA,YAAgC,IAAW,KAC3C,WACA,4CACA,WACA,QAEA,CACA,QACA,CAKA,QAFA,6BACA,aACA,IAA6B,IAAY,KAIzC,MAHA,IAGA,EACA,EAHA,gBAGA,EAEA,gBACA,MACA,qBAEA,qBACA,YACA,SAEA,EADkB,QAClB,EAEA,IAEA,CACA,QAEA,SACA,EAGA,EACA,EAEA,IACA,SACA,QACA,gBACA,mBACS,CACT,mBACA,6CACA,CAAS,CACT,eACA,kBACS,CACT,kBACA,2CACA,CAAS,CACT,4BACA,0CACA,uCACA,CAAS,EAwDT,mBACA,+DACA,0DAEA,eACA,kBACA,kBACA,2CACA,2CACA,eACA,iBAEA,eACA,eAEA,yBAEA,eACA,cAIA,WACA,WACA,aAGA,EAEA,uBACA,+BACA,kBACA,eACA,kBACA,gBACU,+BACV,kBACA,oBAEA,kBACA,oBAEA,YACA,aACU,iCACV,kBACA,mBACU,+BACV,kBACA,kBACA,kBAEA,EA+BA,eACA,OACA,sBACA,+BACA,6BA+HA,MACA,aA/PA,YACA,aACA,WACA,OACA,UACA,sBAEA,iBAEA,iBACA,IACA,IAEA,gBACA,IACA,0CACA,4BACA,eACA,CAEA,0BAEA,kBACA,kBAEA,GAGA,CACA,YACA,KACA,UACA,mBACA,GAGA,EAEA,EA0NA,gBA7JA,YACA,aAEA,IADA,OACA,GAGA,gCACA,eACA,CAAS,EAGT,IAKA,YACA,YACA,YAGA,sBACA,EAwIA,cAvHA,YACA,aACA,WACA,OACA,cAGA,sBAA4C,KAAQ,EAGpD,gCACA,eACA,CAAS,EAET,sBACA,oBAGA,MAEA,OACA,+CACA,gDAIA,QACA,EAjCA,qBACA,6BACA,8BAkCA,mCACA,WAGA,uBAEA,kBACA,gBAGA,OACA,oBACA,oBACA,+BACA,EACA,gBACA,OACA,iBACA,MAEA,EACA,gBACa,CACb,uBAoBA,QAnBA,8BACA,kCACA,6BACiB,EACjB,oBACA,0BACA,kBACA,CAAqB,CACrB,CAAiB,EAEjB,0BACA,YACA,CAAiB,EACjB,QACA,WACA,IACA,IACA,IACA,IACA,IAAgC,IAAO,IAIvC,GAHA,WAEA,EADA,MACA,EACA,OACA,QACA,YACA,IACA,KACA,CACA,QACA,CACA,IACA,KACA,CAEA,QACA,CAAa,EAIb,uCACA,wBAAqC,gBAA2B,EAGhE,mBAEA,sBAGA,GAFA,cAEA,kBAEA,gCACA,kCACA,SACA,QACA,CAAa,CACb,EACA,CASA,CAAK,EA+JL,MACA,OA/aA,YACA,aAEA,2BAEA,kCACA,EA0aA,MAzJA,YACA,aACA,UACA,YACA,mBAEA,IAAkB,yBAA4C,EAC9D,wBAGA,uBAGA,kCACA,6BACS,EAGT,IACA,0BACA,gBACA,0BACA,kBACA,CAAiB,CACjB,CAAa,EACb,mBACA,QACA,CAAa,EAGb,IACA,UACA,KAGA,sBAGA,qBAEA,QACA,IACA,IAEA,iBAEA,wBACA,6BACA,6BACA,YACA,aACA,UAGA,UACA,QACA,IAEA,wBACA,MACA,UAEA,EADA,OACA,SACsB,OACtB,SACsB,MACtB,MACsB,MACtB,MAEA,CAEA,CAEA,IACA,kBACA,mBAGA,oBACA,YAKA,MAFA,0BAEA,iCAEA,IACA,CAAa,CACb,KAEA,CACA,QACA,IAEA,wBACA,OACA,MAGA,OACA,OAGA,kCACA,OAGA,cAGA,kBAEA,IAHA,EAGA,EACA,MAEA,iBACA,iBAEA,IACA,IAEA,qBAEA,IACA,kBACA,mBAGA,cACA,CAAa,CACb,EACA,EAsBA,SACA,YACA,yBACA,aACA,aACA,mBACA,oDACiB,EACjB,oBACA,aACA,oBACA,CAAiB,CACjB,CAAS,CACT,2BA5BA,cACA,kCAEA,qBACA,iBAKS,CACT,EAmBA,QACA,wBACA,CAAS,CACJ,EA4BL,MACA,SAnBA,YACA,aACA,UACA,WACA,6CACA,oBACA,uDACA,IACA,oBACA,oEACA,EACA,EASA,aAPA,YAEA,EADA,MACA,oBACA,CAKA,CAAK,EAiCL,MACA,OA/DA,YACA,aACA,UACA,oDACA,uBACA,gBACA,EA0DA,MAjCA,YACA,aACA,UAmBA,GAfA,IAAkB,uBAHlB,UAG8D,EAG9D,6CAGA,6BACA,iBAGA,2BACA,eAIA,YACA,6BACA,eACA,iBACA,mCACA,WAEA,CACA,EAKA,qBACA,QACA,oCACA,+BACA,YACA,mBACA,CAAa,CACJ,CACJ,EAEL,mBACA,gEACA,EACA,SAEA,oBAEA,EAEA,eAEA,oBAIA,IAEA,UACA,CAAU,UAGV,YAEA,iBACA,eACA,gBACA,iBACA,UAGA,EACA,oBAEA,gBAEA,EACA,EAyDA,eACA,aACA,WACA,4CACA,GACA,UACA,SACA,UACA,6BAEA,EAEA,eACA,aACA,WACA,gCACA,EAEA,eACA,aACA,WACA,uCACA,EAEA,eACA,aACA,0BACA,8BAEA,wBADA,MAEA,EAEA,eACA,aACA,SAEA,MAIA,gCACA,4BAJA,2BAMA,EAEA,eACA,aACA,WACA,GACA,UACA,UACA,UACA,wBAEA,EAEA,eACA,aACA,WAEA,+BACA,oBACA,kBAGA,oCAGA,+BAEA,wBAIA,yBACA,oBAGA,EASA,MACA,YACA,eACA,cACA,oBACA,YACA,WACA,CAAS,CAET,OAvJA,YACA,aACA,UAGA,uCAGA,wCAGA,yDAGA,4DAGA,IACA,OACA,QAAsB,yCAA8C,CAC3D,EACT,IAA8B,eAAsB,qCAA2C,EAC/F,IACA,OACA,QAAsB,4CAAiD,CAC9D,EACT,IAAyB,OAAY,EACrC,IAAyB,eAAsB,+BAAqC,EACpF,IAA2B,eAAsB,qCAA2C,EAG5F,+BACA,oBAKA,kDAEA,OADA,qCACA,CACA,CAAa,EAGb,sBAEA,YAGA,aACA,CAAa,MACb,EAEA,uDACA,EAmGA,oBACA,aACA,0DACA,CAAS,CACT,SACA,iBACA,mBACA,uBAxBA,YACA,aACA,+BAEA,+DACA,EAqBA,oBACA,wBACA,kCACA,0BACA,+BACA,0BACA,mBACA,CAAS,CACT,CAAK,EAEL,IACA,SACA,QACA,EAiDA,iBACA,cACA,iDAIA,OAHA,GACA,oBAEA,CACA,EAEA,MACA,kBACA,cACA,OA3DA,YACA,aACA,UAGA,cACA,qCAGA,uCAGA,0BAGA,gCACA,+CAGA,mBAGA,oBACA,EAEA,8BACA,oCAMA,mBACA,EAGA,kDACA,sDAGA,gBAGA,iBACA,aACA,EAeA,oBACA,aACA,4DACA,wDACA,CAAS,CACT,SACA,+BACA,aACA,WACA,uBACA,CAAa,CACJ,EAET,QACA,6CACA,YACA,SAA2B,0BAA8B,CACzD,oBACA,mBACA,CAAa,CACJ,CACJ,EAEL,MACA,iBACA,cACA,QACA,+DACA,YACA,gBACA,gBACA,oBACA,oBACA,SAA2B,0BAC3B,CACA,CAAS,CACJ,EAEL,eACA,aACA,0BACA,2BAEA,6BACA,sBACA,UACA,WACA,WACA,aACA,YACA,CAAa,EAEb,EAgDA,MACA,SA/CA,YACA,aACA,WACA,gBACA,IAAsB,OAAY,EAClC,MACA,CAEA,2CACA,0CACA,oBACA,oBACA,oBACA,EAmCA,SAzBA,YACA,aACA,aAGA,sBACA,sBACA,qBACA,EAkBA,aAlCA,YACA,aACA,YAGA,sBACA,CA6BA,CAAK,EAEL,MACA,cACA,oBACA,YACA,MAvBA,YACA,aACA,UACA,YACA,IAAkB,yBAA4C,EAC9D,iBAEA,iCACA,qBACA,gBAEA,CAaA,CAAK,EAEL,iBACA,IAEA,uBACA,sBACA,kBACA,eAEA,YACA,qBACA,YACyB,EAGzB,CAAa,EAGb,eACA,CAAU,SACV,QACA,CACA,QACA,EAOA,iBACA,wBAGA,eACA,gDACA,oBACA,yCACA,CAAS,CACT,EAEA,eAEA,UADA,OAEA,EAqFA,MACA,eACA,YACA,OA3GA,YAEA,SADA,KACA,aAAoC,EA0GpC,MAfA,GACA,iBA/BA,YACA,aACA,0CACA,EA6BA,aA1EA,YACA,aACA,WAGA,EAFA,yBACA,mBACA,oCACA,aACA,0BACA,2BACA,mCACA,qBACA,KACA,EA+DA,cA7DA,YACA,aACA,WACA,aACA,IAGA,8DAGA,qCAGA,MADA,yBACA,OACA,EAgDA,gBA7BA,YACA,aACA,WACA,aACA,IACA,0CACA,0BACA,EAuBA,iBApBA,YACA,aACA,WACA,aACA,IACA,eAEA,2BAGA,gBAEA,MACA,EAQA,mBAhDA,YACA,aACA,WAEA,qCACA,sBACA,iBACA,GACA,cACA,CAAS,GACT,EAuCA,qBACA,iBACA,CAAK,EAOL,aACA,CAAK,EAML,wDACA,8BACA,IACA,qBACA,2BACA,EAEA,cACA,sEAEA,CADA,kBACA,gBAEA,SACA,yCAGA,eACA,UAGA,SACA,EAEA,eACA,iCAEA,YACA,oBACA,YAGA,aACA,CAAS,CACT,EAKA,qBACA,2BAEA,EAKA,eACA,iCAEA,uCAEA,mBACA,YACA,CAAiB,EAGjB,gBACA,YACA,CAAiB,EAGjB,cAGA,kCACA,MACA,CAGA,eACA,iBAEA,SACA,sBACA,iBACA,CAAqB,EAGrB,EACA,EACA,mBACA,QACA,CAA6B,EAC7B,gBAGA,OAFA,iBACA,uCACA,CACA,CAA6B,EAE7B,CAAiB,EACjB,oBACA,CAAS,CACT,EAEA,eACA,UACA,YACA,KACA,+BAGA,uBAGA,eACA,iCACA,UACA,UACA,QACA,SACA,MACA,CAEA,kBACA,CAAS,CACT,EAEA,eACA,iCACA,SAGA,IACA,IAEA,aACA,cACA,IAEA,GA8CA,SA3CA,KACA,IAEA,wBAGA,aACA,0BACA,iBACA,IACA,IACA,MACA,CAEA,sBAEA,cACA,MAGA,IAEA,mBACA,WACA,aACA,6BACA,UACA,IACA,GACA,CAAiC,EAEjC,CAAyB,EAGzB,GACA,CAAqB,GACrB,GAIA,EAGA,EACA,CAAS,CACT,EAEA,eACA,0BACA,yBACA,SACA,wBACA,WACA,wBACA,OACA,sBAHA,CAKA,EAEA,eACA,yBAAuD,cAGvD,eACA,4BACA,EAEA,eACA,2BACA,EAKA,eACA,SACA,IAGA,GADA,UACA,OACA,SAEA,OACA,CAAU,SAEV,CACA,QACA,EAEA,eACA,6BACA,6BACA,IAEA,IAGA,eACA,6BACA,iCACA,mCACA,KACA,YAEA,CACA,UAGA,MAEA,eACA,OACA,iBACA,gBACA,8BACA,6BAEA,EAEA,YACA,EACA,EACA,GAEA,YAEA,GACA,UACA,gBACA,WACA,mBAAwC,CACxC,oBAA0C,CAC1C,mBAAwC,CACxC,mBAAwC,CACxC,mBAAwC,CACxC,sBAA8C,EAK9C,OAFA,2BAEA,CACA,EAEA,eAEA,0BACA,oBACA,CAAS,EACT,KACA,SAIA,YAEA,OADA,WACA,CACA,EAEA,eACA,SAEA,GACA,aACA,YACA,aACA,OACA,EAEA,KAEA,kBACA,YACA,6BACA,CAAS,EAET,OACA,UACA,wBAKA,OAHA,UAGA,WAEA,yBAGA,eACA,2BAEA,gBACA,gCACA,CAAyB,EAEzB,CACA,CAAa,EAGb,QACA,EASA,iBAMA,IAbA,IAaA,GAbA,EAhVA,gBAyVA,IAzVA,uBAgVA,EAaA,CACA,6BACA,6BACS,CAfT,wBACA,aAEA,6BAeA,2BACA,EAEA,QAEA,iBAEA,IACA,cACA,CAAU,UACV,EAEA,iBACA,mBACA,mBAEA,YAEA,sBACA,gBACA,YAEA,UACA,gBAGA,SAEA,CAAa,CACb,CACA,EAEA,iBACA,mBACA,mBAEA,qBAEA,uBACA,SAEA,mBACA,sBACA,YACA,YACA,WACA,WACA,cAGA,aAGA,WAGA,OACA,aACA,MACA,CAGA,YAIA,GAHA,KAGA,gBACA,gBACA,SACA,MACA,CAMA,GAHA,eAGA,OACA,aACA,MACA,CAGA,QACA,EAAsB,IAEtB,OACA,aAIA,UACA,aACA,SAGA,CAAiB,CACjB,CAAa,CACb,CACA,EAEA,iBACA,mBACA,mBAIA,GAFA,gBAEA,iBACA,sBACA,sBACA,YACA,WACA,WACA,cAKA,GAHA,aAGA,aAGA,yBAGA,WACA,CAAiB,CACjB,CAAa,CACb,CACA,EAEA,iBACA,mBACA,eAIA,sBACA,cAEA,cAEA,QACA,CAAa,CACb,CACA,EAEA,mBAEA,oCAGA,2BACA,0BACA,gBACA,EACA,WACA,YACA,QACA,EACA,EAGA,KACA,EACA,6BACA,GAIA,KACA,IAGA,yBAGA,cACA,EAEA,uBACA,WAEA,UACA,eACA,MACA,CAEA,cAEA,aACA,EAEA,qBACA,WACA,EAEA,sBACA,cAEA,gBACA,EAEA,qBACA,cAEA,cACA,EAEA,OACA,6BACA,QACA,wBACA,IAEA,CAAa,CACb,mBAAwC,CACxC,wBAAkD,CAClD,mBAAwC,CACxC,sBAA8C,CAC9C,mBAEA,WACA,CAAa,EAGb,QACA,EAEA,MACA,MAEA,eAEA,6BACA,0CAIA,IAFA,SACA,IACA,oBACA,2CACA,KACA,KACA,CACA,eAGA,YACA,CAEA,qCAEA,UAKA,uBACA,WACA,CAAa,CACb,CAAS,CACT,EAEA,gBAEA,iBAKA,WAGA,KAIA,MACA,uCACA,EAEA,eACA,qBAGA,gBACA,yCACA,MAEA,EAEA,cACA,kBACA,WACA,EAEA,GACA,mBACA,KACA,CAAa,CACb,mBAAwC,EAKxC,OAFA,MAEA,CACA,EAcA,QACA,QAEA,MAEA,iBACA,uBACA,EAEA,eACA,wBACA,EAEA,mBACA,iCACA,GACA,EACA,EACA,IACA,EACA,KACA,EACA,IACA,OACA,yCACA,yCAIA,iBACA,yBACA,KACA,CAAS,MACT,EAEA,eACA,4DACA,EA4CA,eACA,aACA,WAEA,EADA,yBACA,SACA,+CAEA,aACA,EAEA,eACA,aACA,WAEA,EADA,yBACA,SAIA,0CACA,EAEA,MACA,OAhHA,YACA,aACA,UACA,yCACA,6BACA,kCACA,wCACA,EA0GA,cACA,oBACA,SACA,cApEA,YACA,aACA,WACA,UAIA,yBACA,+BACA,oBAEA,iBACA,yBACA,oDAEA,WACA,CAAS,MACT,EAoDA,gBAlDA,YACA,aACA,WACA,OAKA,KADA,OACA,2CACA,EA0CA,6BAxCA,YACA,aACA,WAIA,IADA,uBACA,SACA,gDAEA,aACA,EAgCA,6BACA,8BAEA,+BACA,6BACA,0BACA,kCACA,CAAS,EAET,WACA,gBACA,CAAK,EAEL,eACA,iEACA,+CACA,gCACA,CAAS,CACT,EAEA,eACA,gEACA,EACA,2DACA,aACA,OAEA,kBACA,IACA,sCACA,IACA,IAEA,kBAEA,gBAEA,mBAEA,aACA,aACA,iBACA,CAEA,KAIA,GACA,sBAIA,GAEA,CACA,EAIA,eACA,yBACA,EAyVA,eACA,6CACA,SACA,CACA,6BACA,oCAEA,CACA,MACA,QACA,CACA,EAEA,eACA,QACA,IAGA,aACA,kBACA,kCACA,6BACS,EACT,IACA,0BACA,gBACA,0BACA,mBACiB,CACjB,CAAa,EACb,mBACA,QACA,CAAa,EAGb,uBAA4C,mBAE5C,2BACA,4BAEA,oBAEA,6BACA,6BAEA,YACA,aAGA,qBACA,wCACA,CAAS,EACT,GACA,EACA,WANA,uBAMA,EACA,UAgBA,OAbA,MACA,sBACA,8BACA,KACA,eACa,EAKb,EADA,mBAIA,CAAiB,kBACjB,EAEA,eACA,gCAIA,OACA,aAJA,qCAKA,YAJA,YAKA,CACA,EAEA,iBACA,mCACA,gCACA,6BACA,2BAGA,iBAGA,SACA,kCACA,SACA,iCACA,CAAa,EAEb,KAIA,QAEA,aAMA,MACA,QACA,kCACA,SACA,iCACA,CAAa,EAEb,IAIA,EAEA,mBACA,sBACA,eACA,qCACA,IACA,WACA,oEACA,CAAS,CACT,EAKA,eACA,gCACA,0BACA,QACA,qBACA,SACA,UACA,YAEA,MACA,iCACA,WACA,QACA,EAIA,OADA,gCAEA,oBACA,OACA,0BACA,cACmC,oBACnC,YACA,CAAmC,OAEnC,CAA2B,CAE3B,CAAiB,CACjB,CACA,wBACA,mCACA,kCACA,QACA,iCAGA,CAAyB,CACzB,CAAqB,CACrB,+CACA,oDACA,EAGA,wBAGA,MADA,yBACA,8BACA,6BACiB,EACjB,IACA,0BACA,gBACA,0BACA,mBACyB,CACzB,CAAqB,EACrB,mBACA,QACA,CAAqB,EAErB,kBAAuD,oBAAyB,gBAChF,GAGA,oBAGA,wBACA,QACA,yBACA,0BACqB,CACrB,CAAiB,EAEjB,uBAA4C,WAAoB,EAEhE,2BAAgD,WAAoB,CACpE,EAEA,0BACA,6BAAkD,WAAoB,CACtE,EAEA,wBACA,uBAA4C,WAAoB,CAChE,CAAa,EAEb,wBACA,2BAAgD,WAAoB,CACpE,EAEA,eAEA,mDACA,EAAU,sBACV,uBACA,kBACA,8BAEA,EAKA,iBACA,kCACA,0BACA,OACA,mBACA,gCACA,kBACA,GACA,gBAAoC,IACpC,mBACA,kBACA,oBAC6B,mBAE7B,oBAGA,wBACA,QACA,SACA,4BACiC,CACjC,CAA6B,CAC7B,CAAyB,CACJ,GAGrB,GAEU,oBACV,iCACA,mBAEA,EAKA,eACA,iCACA,0BACA,OACA,mBACA,kBACA,gCACA,kBAAuD,oBAAyB,gBAChF,GAGA,oBAGA,wBACA,QACA,SACA,2BACqB,CACrB,CAAiB,CACjB,GACU,mBACV,uBACA,kBAEA,EAKA,MACA,iCAGA,GAFA,OACA,QAEA,CAAS,CACT,+BAEA,GADA,OAEA,CAAS,CACT,gCAEA,GADA,OAEA,CAAS,CACT,6BACA,aACA,UACA,MACA,MACA,QACA,wBAEA,sCAGA,0CAEA,CAAS,CACJ,EAEL,MACA,YACA,iBACA,aACA,eACA,gDAEA,CAAS,CACT,OArrBA,YACA,aACA,UAEA,oBACA,GACA,iBAIA,gCACA,GACA,EACA,WACA,mBACA,gBACiB,EACjB,oBACA,0BACA,CAAiB,EAIjB,8BACA,kBACA,GACA,gBAAgC,IAChC,gBACA,iCACA,CAAiB,IAKjB,6BACA,sBAAiD,gBAAkB,GAInE,oDAA4E,kBAAoB,GAGhG,kCACA,qCAA4D,MAI5D,kEAAwF,MAIxF,wBACA,kCACA,qCAGA,kBAGA,sBACA,mBACA,iBACA,CAAa,EACb,gBACA,aACA,UACA,sBACA,CAAa,EAGb,yBACA,iCACA,uBACA,6BACA,CAAS,MAGT,+BACA,uBAGA,sEACA,0BACA,sCACA,2CAAkE,WAAgB,EAClF,+CAIA,6BAEA,GADA,aACA,CACA,iCACA,iCACA,qCACA,YACA,cACA,kBACA,4BACA,mBACA,yBACA,eACA,CACA,EA+kBA,MA7kBA,YACA,aACA,UACA,YAoBA,GAlBA,IAAkB,yBAA4C,EAG9D,EACA,mBACA,oCACA,CAAa,EACb,mBACA,sBACA,CAAa,EACb,gBACA,aACA,SACA,sCACA,8BACA,oBACA,CAAa,GAEb,uBAEA,6CACA,yCACA,sBAIA,mBACA,IACA,qBAGA,qCACA,oBAIA,YACA,WACA,UACA,SACA,UAGA,GACA,sBAIA,wCACA,gCACA,6BAEA,MADA,6BAvKA,IAuKA,GAIA,qBACA,8BACS,EAGT,SAEA,+BAGA,YAEA,EACA,iBAEA,WACA,gBACkB,cAClB,gBAEA,eAGA,EAAU,QACV,YACA,eACA,gBAGA,YAEA,QAEA,wBACA,YAEA,+BACA,sCAEA,EACA,eACA,EACA,eAMA,GAHA,aACA,6CAEA,GAIA,2BACA,MAGA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AEA,GACA,yBAEA,mBAEA,iCAEA,4BACA,sCACA,mDACA,2BAEA,iDAEA,oDAEA,yDAEA,oCAEA,gDACA,0DACA,gDACA,8CACA,mDACA,kDAEA,8DAEA,gCAEA,kCAEA,oCAEA,mCACA,EAEA,cAEA,qBAAyC,OAAe,GACxD,eACA,wBACA,oCAEA,SAGA,WACA,cACA,WACA,CAAiB,GAIjB,SAGA,2BACA,gBAIA,0BACA,eAIA,8BACA,eACA,mBACA,oBACA,CAAiB,EACjB,oBACA,mBACA,CAAiB,EAGjB,mCAGA,6CACA,GACA,iBAEA,EAEA,cACA,UACA,EACA,mBACA,iBACiB,EACjB,oBACA,gBACA,6CAEA,yBACA,aAEA,sBACA,YACA,CAA6B,GAE7B,CAAqB,CACrB,CAAiB,CACjB,EAaA,cACA,iCACA,mCACA,QACA,oBACA,IACA,CAAqB,CACrB,oBACA,IACA,CAAqB,CACJ,CACjB,CAAa,CACb,EAiBA,oBAJA,EAeA,MATA,oBALA,CADA,EAMA,GALA,YAKA,IACA,IACA,UAIA,yCAA0D,IAAa,QAAc,GAGrF,mCACA,EAEA,aACA,IACA,sCACA,IACA,IAEA,kBAEA,iCACA,SACA,KAGA,WACA,qBACA,wBAAwD,MACtC,CAElB,oBACA,uCACA,yBAIA,iBACA,CAEA,wBACA,QACA,cACA,yBACA,UACA,SACA,CAAiB,CACjB,CAAa,CACb,EAEA,aACA,kCACA,EAEA,cACA,iCACA,sCACA,QACA,oBACA,IACA,CAAqB,CACrB,oBACA,IACA,CAAqB,CACJ,CACjB,CAAa,CACb,EAgFA,gBACA,EAAc,CAEd,KACA,EAAc,CAzad,CAOA,iBAGA,IACA,oBACA,GACA,MAGA,WACA,+BACA,OAIA,MAEA,kCAIA,IAGA,UAGA,wBACA,CAAa,CAMb,mBAEA,QACA,qBAGA,mBACA,2BACA,CAAqB,EAGrB,iBAGA,KAGA,kBAGA,yBAGA,GACA,yBAEA,CAAa,EAyWb,EAAc,CAEd,QACA,CAKA,WAvMA,YAC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A,MACA,CAGA,cACA,aACA,UAGA,KA1CA,CADA,EA2CA,iBA1CA,mCA0CA,GACA,CAAa,EAGb,WACA,uBAEA,CAAS,CACT,EAEA,eACA,MACA,0DAEA,KACA,2BACA,uBACA,CAAS,EAET,QACA,mBACA,cACa,EACb,qBACA,kBAIA,OAFA,EAhEA,KAgEA,KAhEA,sBAgEA,CACA,cACA,CACA,CAAa,GAAI,EAKjB,OAFA,QAEA,CACA,EAEA,eACA,gEAGA,GAEA,sBACA,6BACA,4BACA,2CAGA,WACA,eACA,SACA,YACA,eACA,CAAqB,CAErB,WACA,cACA,CAAqB,CAErB,UACA,aACA,CAAqB,CAErB,YACA,eACA,CAAqB,CAErB,SACA,YACA,CAAqB,CACJ,CACJ,CAGb,YACA,YACA,EAGA,oCAGA,sBAA4C,IAE5C,KACA,8DACA,GAIA,mCACA,SACA,SACA,UAEA,0BAEA,UAES,EAIT,6BACA,yEACA,OACA,eACA,SACA,oBACqB,CAErB,CAAa,GAIb,YAaA,OAVA,SACA,wCACA,YACA,CAAa,EAIb,oBAGA,CACA,EAGA,kBApjYA,EAqjYA,OArjYA,EAqjYA,wCApjYA,0BAqjYA,2BACA,0BACA,EAEA,6BAEA,eACA,SAIA,OAFA,WAEA,CACA,EAOA,iBACA,sBAAmC,YAAY,kBAC/C,YACS,CACT,EAEA,eACA,yCACA,6BACA,CAAS,EAET,yBACA,gBAEA,OACA,wBAAuD,CACvD,qBACA,UAEA,yBACA,eACA,iBAEA,EAEA,cACA,CACA,KACA,SACA,CAAqB,CAErB,EAEA,CAAa,CACb,qBACA,cACA,sBACA,CAAa,CAEb,EAEA,eACA,iCACA,eACA,qBACA,IACA,EACA,sBACA,IACA,EACA,OACA,CAAS,CACT,EAEA,iBACA,+BAGA,OAFA,sCACA,SACA,CACA,EAEA,eACA,mBACA,EAGA,MAGA,eAEA,iBAKA,WAhjRA,iBAmjRA,GACA,aACA,OACA,QACA,QACA,WACA,UACA,qBACA,mBACA,4BACA,+BACA,uBACA,mBACA,sBACA,cACA,gBACA,aACA,iBACA,aACA,YACA,cACA,cACA,oBACA,QACA,kCACA,CAAa,CAEb,OACA,mBACA,CAAa,CACJ,EAGT,SACA,EA4BA,IAEA,EAEA,KA5BA,yEAYA,8BATA,oBAGA,0BAGA,gDAMA,wBAuBA,aApBA,gBAA8C,EAG9C,+CAiBA,EAEA,WACA,QACA,GAMA,IAEA,OACA,EAQA,gBAcA,GAbA,YACA,gBACA,gBACA,iBACA,YACA,aACA,WACA,UACA,oBACA,gBACA,gBAGA,OAp+VA,cACA,gEAEA,mBAGA,cACA,0BACA,0BACA,MACA,CAEA,WACA,YACA,aAGA,gBAEA,QACA,OACA,OACA,OACA,OAEA,aACA,iBACA,aACA,oCACA,2BACA,CAAqB,GACrB,EACA,aACA,6BACA,IAEA,aACA,sCACA,EACA,aACA,qCACA,EAEA,EAEA,wDACA,OACA,IACA,oBACA,CAAS,EAET,oBAEA,OAGA,GACA,MAGA,UAEA,OAMA,QAGA,8BACA,UACA,CAAa,EACb,8BACA,WACA,CAAa,EACb,EAEA,IACA,oBAOA,EAg5VA,WACA,4BACA,gBACA,CAAiB,CACjB,CAAa,CACb,YACA,4BACA,kBACA,CAAiB,CACjB,GAIA,oBAEA,uBACA,mCACA,QACA,aACA,gBACA,kBACA,cACA,YACA,gCACA,wBACqB,CACJ,GAIjB,kDACA,CAEA,iCAEA,sBACA,WACA,CAAa,IAEb,iDAIA,kBACA,4BACA,sBACa,CACb,CAEA,0BAAyC,KACzC,6BAA6C,KAC7C,6BAA6C,KAE7C,iBACA,KAGA,oBACA,iCAGA,OAFA,0BACA,gBACA,KACA,EAGA,sBAEA,oCACA,wBACA,CAAa,SACb,OAEA,uBAGA,iBAEA,GAIA,EAGA,oBAYA,OAVA,4CAGA,mBACA,gCACA,wBACA,CAAiB,CACjB,CAAa,EAGb,gBACA,kBACA,CAAa,CACb,EAGA,mBACA,+BACA,wBACA,CAAa,SACb,EAGA,MAFA,IAGA,EAGA,4BACA,IACA,sCAC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A,CAAS,CACT,MACA,OACA,eACA,gBACA,CAAa,CACb,QACA,eACA,iBACA,gBACA,CAAa,CACb,MACA,eACA,iBACA,iBACA,oBACA,CAAa,CACb,MACA,eACA,iBACA,iBACA,oBACA,CACA,CAAS,EAET,CACA,CAAC,2FC3OM,cACP,YAEA,gCAEA,gCAEA,qCACA,CAAC,YACD,kBAEA,kBACA,2BAGA,OAFA,SACA,oBACA,CACA,CAIA,MAVI,QAAS,MAOb,gCACA,qEACA,EACA,CACA,CAAC,QAED,cAEA,oBACA,yJAEA,MAJI,QAAS,MAIb,CACA,CAAC,IAED,cAEA,kBACA,kGACA,CACA,MAJI,QAAS,MAIb,CACA,CAAC,IAED,cAEA,gBACA,8IAEA,MAJI,QAAS,MAIb,CACA,CAAC,kEClBM,uBAEP,GAEA,iBAA4B,QAAgB,OAC5C,OACA,CACA,eACA,iBACa,CACb,CAGA,QADA,KACA,IAAkC,EAAlC,EAAkC,OAAmB,KACrD,MADA,CACA,IAEA,GAAY,QAAgB,KAC5B,QACA,eACA,aACA,CAAa,EACb,QACA,CAGA,GAAY,QAAc,KAC1B,oBACA,QACA,eACA,oCACA,CAAiB,EAEjB,QACA,CACA,cAEA,gBACA,UAAsB,IAAiB,MAEvC,WACA,GAAY,QAAiB,KAC7B,2CACA,GACA,uCACA,UACA,IAEA,QACA,2CACA,OACA,CAAa,EACb,QACA,CAIA,GAAY,QAAa,KACzB,+BACA,gBACkB,QAAkB,UACpC,sBACA,OACA,QACA,eACA,QACA,uBACA,SACA,CAAa,EACb,QACA,CACA,GAAY,QAAa,KACzB,+BACA,gBACkB,QAAkB,UACpC,sBACA,cACA,QACA,eACA,QACA,uBACA,SACA,CAAa,EACb,QACA,CACA,GAAY,QAAe,KAC3B,+BACA,kBACkB,QAAgB,UAClC,sBACA,OACA,YACA,IAEA,YAEA,QACA,eACA,QACA,qBACA,SACA,CAAa,EACb,QACA,CACA,GAAY,QAAY,KACxB,2BACA,OACA,SACA,UAA0B,IAAqB,iBAG/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UACA,OACA,cAEA,EADA,kBACA,uBACA,iCAiGA,SAnCA,WACA,YACA,gBAEA,IACA,cACA,EA8BA,QA5BA,WACA,0BACA,EA2BA,CACA,mBCjPA,IATA,EASA,aAGA,0BACA,sEACA,sEACA,KAEA,gBACA,UACA,QACA,YAAmB,WAAoB,IACvC,mBAEA,CACA,eAGA,OACA,6BACA,oBACA,kCAAuD,mBAA+B,EACtF,mBACA,EAD8B,MAE9B,eACA,sBACA,qBACA,oBACA,CACA,CAAG,CAEH,wCACA,WACA,WACA,sCAAoE,wBAAyD,CAC7H,CAAG,CAEH,mCACA,WACA,6BAAqD,eAAgB,KACrE,CAAG,CAEH,uCACA,WACA,WACA,yCAA4E,0BAA2C,CACvH,CAAG,CAGH,iCAIA,QAHA,gBACA,qBAAiD,MAAjD,EAEA,eAA8C,IAAY,KAC1D,qBACA,cACA,cACA,CACA,QACA,CAAG,CAGH,qCACA,WACA,uBAGA,QADA,oBACA,CADgD,CAChD,aAA2C,IAAY,IACvD,yBAFA,IAKA,KAIA,OAHA,sBACA,YACA,CAAS,EACT,wBAIA,CAAG,CAIH,iDACA,WACA,4BAAoD,mBAAgC,CACpF,CAAG,CAGH,qDACA,WACA,YACA,sBACA,sCAAoE,wBAA0D,EAC9H,CAAG,CAEH,qBACA,oCAA4D,YAAa,CACzE,CAAG,CACH,0BACA,oBACA,QAYA,EAXA,IAA8B,CAC9B,IAAsC,CACtC,KACA,KACA,KACA,IACA,IACA,IACA,KACA,IACA,IAGA,QAAiB,WAA0B,KAQ3C,GAPA,cACA,4CACA,SACA,SAGA,MACA,0CACA,QACQ,CACR,8CACA,wBACA,QAAuB,IAAoB,IAC3C,MACA,QACA,IACA,aACA,KAEA,IAIA,QADA,kBACuB,IAAM,IAC7B,WACA,QACA,IACA,aACA,KAEA,IAEA,KAEA,EAAY,IAEZ,QADA,IACuB,IAAoB,IAC3C,SACA,QACA,IACA,aACA,KAEA,IAEA,IAGA,QADA,kBACuB,KAAO,IAC9B,WACA,QACA,IACA,aACA,KAEA,IAEA,KAEA,CAEA,SACA,gBACA,KAEA,aACU,IAEV,QADA,OACqB,IAAoB,IACzC,WACA,QACA,IACA,aACA,KAEA,IAEA,KAMA,UACA,gBACA,KAGA,SACA,WACA,CAIA,WACA,8CACA,wBACA,QAAqB,IAAoB,IACzC,MACA,QACA,IACA,aACA,KAEA,IAIA,QADA,kBACqB,IAAM,IAC3B,WACA,QACA,IACA,aACA,KAEA,IAEA,KAEA,EAAU,IAEV,QADA,IACqB,IAAoB,IACzC,SACA,QACA,IACA,aACA,KAEA,IAEA,IAGA,QADA,kBACqB,KAAO,IAC5B,WACA,QACA,IACA,aACA,KAEA,IAEA,KAEA,CAEA,SACA,gBACA,KAEA,WACA,EAAQ,IAER,QADA,OACmB,IAAoB,IACvC,WACA,QACA,IACA,aACA,KAEA,IAEA,KAMA,UACA,gBACA,IAEA,CAIA,QADA,IACe,IAAoB,IACnC,WACA,QACA,IACA,aACA,KAEA,IAEA,MAIA,QAEA,GADA,MACA,QACA,aACA,KACA,CACA,GACA,CACA,iBACA,CAAG,CAEH,8BACA,WACA,WACA,yCAA4E,uBAAsC,CAClH,CAAG,CAEH,4BACA,IAOA,EACA,EACA,QACA,EAVA,KAEA,IACA,IACA,IACA,KACA,KAKA,GAAgB,6BAEhB,QAAgB,IAAO,KACvB,OAMA,IAHA,IACA,IACA,IACA,MACA,mBACA,eACA,gBACA,aACA,oBAEA,eACA,MAGA,UACA,OAIA,IAHA,IACA,MACA,IACA,MACA,mBACA,eACA,gBACA,aACA,oBAEA,eACA,MAEA,OACA,KACA,QAIA,IAHA,IACA,QACA,IACA,MACA,mBACA,eACA,gBACA,aACA,oBAEA,eACA,MAEA,OACA,KACA,QACA,QACA,CAIA,IAHA,OACA,IACA,YACA,CACA,aACA,SAMA,IAHA,IACA,gBACA,IACA,MACA,mBACA,eACA,gBACA,aACA,oBAEA,eACA,MAGA,YACA,OAIA,IAHA,IACA,MACA,IACA,MACA,mBACA,eACA,gBACA,aACA,oBAEA,eACA,KAGA,aACA,MACA,IACA,KACA,QAIA,IAHA,IACA,QACA,IACA,MACA,mBACA,eACA,gBACA,aACA,oBAEA,eACA,KAEA,aACA,MACA,IACA,KACA,QACA,iBACA,CAOA,GALA,OACA,gBACA,KAGA,KACA,WACQ,CACR,SAGA,YAFA,eAIA,CACA,UAGA,qBACA,IAEA,IAEA,OACA,gBACA,IAGA,CACA,CACA,EACA,QACA,CAAC,EAGwC,UAAvC,IAAO,WAAc,UAAkB,gCAAC,uBC/e1C,IAMA,EAigIA,EACA,EAxgIA,GACA,SACA,CAqgIqB,EACA,SAtgIrB,QACA,EAIA,+BACA,OACA,WACA,EACA,GACA,WAAqB,aAAe,CACpC,UACA,WACA,WACA,CAAS,CACT,QAAkB,iBAAqB,CACvC,UACA,CACA,EAAE,IACF,SAQA,sBACA,qBACA,mBACA,UACA,aACA,mBACA,YACA,cACA,aACA,UACA,WACA,cACA,SACA,YACA,YACA,QACA,gBACA,KACA,GACA,iBAEA,yDACA,CACA,EAGA,GAEA,eACA,iCACA,IACA,wBACA,CAAc,SACd,6BACA,QACA,CAAiB,CACjB,CAEA,CAAK,CAEL,gBACA,kCACA,yDACA,IACA,iBACA,CAAc,SACd,qBACA,SACA,CAAiB,CACjB,CACA,CACA,CAAK,CAEL,iBACA,kCACA,uDACA,IACA,kBACA,CAAc,SACd,qBACA,UACA,CAAiB,CACjB,CACA,CACA,CAAK,CAEL,oBACA,yBACA,uDACA,IACA,kBACA,CAAc,SACd,qBACA,UACA,CAAiB,CACjB,CACA,CACA,CACA,EAEA,gBACA,kBAEA,OADA,qCACA,oBACA,CACA,EACA,cACA,OACA,eACA,mBACA,wBACA,CACA,EAKA,qBACA,QACA,iBACA,sCAEA,oBACA,kBAiBA,OAfA,sBACA,aACA,wBACA,8CAEA,QACA,yBACA,WACA,kBACA,oDACA,cACA,EAEA,CACA,CAEA,EAOA,uBACA,YAGA,oBACA,oBACM,wBACN,wBAAwC,IAAO,IAC/C,kCACA,MAEA,MAEA,eACA,gBACA,uBACA,OAKA,EAEA,qBAQA,OAPA,uCACA,eACA,eACA,WAGA,CAAK,EACL,CACA,EAEA,yBACA,kCACA,EAKA,yBACA,IACA,gCACA,CAAM,SACN,QACA,CACA,EAEA,0BACA,+BACA,EAEA,6BACA,EAGA,UACA,YAEA,cAGA,iBAFA,UAKA,YAXA,EAYA,EAEA,sBACA,gBACA,kBAEA,SAIA,OAHA,qBACA,mBACA,CAAS,EACT,CAEA,EAEA,mBACA,gBACA,UAGA,uBACA,aACA,CAAK,EAJL,CAMA,EAEA,qBACA,gBACA,UAGA,qBACA,aACA,CAAK,EAJL,CAMA,EAEA,wBACA,gBACA,SACA,EAEA,iBACA,kBAEA,qBACA,gBACA,QAEA,CAAK,EACL,EACA,EAEA,yBACA,wBACA,EAGA,wBAIA,OAHA,kBACA,0BACA,yBACA,CACA,EAEA,uBACA,mCACA,EAEA,4BACA,kBACA,eACA,eACA,SAGA,QACA,CACA,QACA,EAEA,0BACA,iBACA,EAEA,uBACA,kCACA,EAEA,qBACA,gCACA,EAEA,uBACA,kCACA,EAEA,wBACA,2BACA,EAEA,0BAQA,OAPA,uBACA,YACA,qBACU,eACV,uBAEA,CAAK,CAFkC,CAGvC,CACA,EAEA,uBAIA,OAHA,8BACA,eACA,EACA,UACA,EAEA,yBAEA,cACA,mBACA,CACA,8BACA,yBACA,sBACA,uBACA,yBACA,oBACA,EAEA,qCACA,SAMA,OALA,uBACA,2BACA,QAEA,CAAK,EACL,CACA,EAOA,yBACA,MAkBA,MAhBA,mBACA,eACM,cACN,KACA,qBACA,uBACA,CAAS,GACH,eACN,KACA,uBACA,oBACA,CAAS,GAET,IAGA,CACA,EAEA,aACA,YAEA,kBACA,gIACA,CADuJ,CACvJ,CACA,CADyB,IACzB,MACA,UACA,WACA,WACA,WACA,UACA,WACA,EAGA,OADA,cACA,UACA,4BACA,WACA,2BACA,qDACA,CAAiB,MACjB,SACA,EAEA,gBACA,SAEA,IACA,CADuB,CACvB,GACA,CADwB,CACxB,GACA,CADwB,CACxB,EACA,IACA,KACA,OASA,OANA,uBACA,6BACA,gBAIA,UACA,aACA,WAEA,cAEA,mCAEA,eACA,WAKA,gBAEA,cAKA,MACA,aAQA,GAJA,GA1CA,OA2CA,KAGA,+BAKA,QADA,WACoC,IAAY,KAChD,oBAWA,OANA,oBACA,UACA,qBACA,MACA,oBACA,IACA,CACA,CAGA,WACA,aACA,YAEA,4BAWA,OAJA,kBAAkD,EAClD,IAAgC,cAChC,IAAiC,IAAM,gBAA0B,EACjE,IACA,CACA,CACA,EAIA,aACA,GAlHA,CAmHA,CAAS,CACT,EAOA,wBACA,MACA,EAWA,EA6HA,EAvIA,GACA,QACA,UACA,QACA,OACA,OACA,OACA,OACA,KACA,CAAS,CAET,cACA,oBAGA,OAFA,OACA,SACA,CACA,CAAS,CACT,cASA,OAPA,UACA,yCAIA,cACA,KACA,CACA,CAAS,CACT,aAEA,MACA,KAMA,IAJA,UACA,MACA,QAEA,gBACA,KACA,IAEA,WAEA,IADA,OACA,qBACA,KAGA,oBAOA,IANA,KACA,IACA,qBACA,KACA,KAEA,gBACA,KACA,IAIA,YADA,MAIA,SAFA,eAIA,CAAS,CAET,aAEA,MACA,EAEA,EADA,KAGA,WACA,WACA,WAEA,OADA,IACA,EAEA,aAEA,GADA,IACA,SAEA,QADA,IACwC,KAExC,SADA,oBAD+C,KAK/C,SAEA,yBACA,EAA0B,6BAC1B,aAEA,WAGA,IAEA,CAEA,eACA,CAAS,CACT,aAEA,gBACA,GAEA,CAAS,CACT,aAEA,UACA,QAKA,OAJA,OACA,OACA,OACA,OACA,EACA,SAMA,OALA,OACA,OACA,OACA,OACA,OACA,EACA,SAKA,OAJA,OACA,OACA,OACA,OACA,IACA,CACA,uBACA,CAAS,CAET,aAEA,SAEA,YAGA,GAFA,OACA,IACA,QAEA,OADA,OACA,EAEA,KAFkC,GAElC,CAGA,GAFA,YACA,IACA,QAEA,OADA,OACA,EAEA,OACA,GACA,CACA,CACA,cACA,CAAS,CACT,aAEA,MACA,KAEA,KAAyB,IAAzB,EAAyB,CAGzB,GAFA,IAAuB,GACvB,IACA,EAA6B,IAA7B,EAEA,OADA,IAA2B,GAC3B,EAEA,MAFmC,EAEnC,CASA,GARA,MACA,IACA,OACA,iCACA,2BAEA,SACA,IACA,EAAiC,IAAjC,EAEA,OADA,IAA+B,GAC/B,EAEA,OACA,GACA,CACA,CACA,eACA,EAsBA,OApBA,aAIA,OADA,IACA,GACA,MAAmB,EACnB,UACA,SACA,UACA,SACA,UACA,SACA,UACA,SACA,6BACA,CACA,EAIA,YACA,MAWA,OATA,IACA,IACA,MACA,MACA,IACA,GACA,kBAGA,CACA,CACA,CAAC,GAED,2BACA,IACA,UADA,sEACA,IACA,IACA,KACA,KAEA,MACA,SAGA,kBAEA,GAOA,EAFA,KAJA,iBAIA,GAHA,mBAGA,EAFA,iBAEA,GAEA,MACA,WACA,UACA,OAGA,6DACM,YAIN,OAFA,aAEA,YACA,OACA,qBACA,KACA,QACA,mBAEA,CAEA,QACA,EAEA,yBACA,mDAEA,IACA,EACA,EAEA,EAJA,KAGA,IAMA,QAHA,MACA,WAEgB,IAAa,KAC7B,sBACA,MAEA,OACA,IAEA,EADU,cACV,uCAEA,oDAEA,WACA,KACA,sBAEA,KACA,QAEA,CAMA,OAJA,KACA,6BAGA,CACA,EAEA,kBAGA,iBACA,IACA,EADA,aAEA,GAFmC,EAEnC,+BACA,2BAQA,IALA,IAKA,eACA,IAGA,gDACA,EAWA,aACA,IACA,SACA,IAEA,gBACA,UACA,QAAwB,WAAuB,IAC/C,aAEA,UACA,CAEA,QAAoB,WAAe,IACnC,kBACA,iBACA,cACA,SACA,MAQA,OAJA,YACA,WAGA,cACA,EAEA,kBACA,sCACA,eAtCA,2CAsCA,qBACA,CACA,CAAC,GAKD,OACA,YACA,cACA,UACA,cACA,mBACA,WACA,YACA,iBACA,eACA,YAIA,gBACA,cACA,mBACA,qBACA,iBACA,qBACA,oBACA,YACA,iBACA,uBACA,kBACA,CACA,0BACA,MAEA,QADA,kBACgB,WAA4B,IAC5C,wBACA,SAGA,QACA,EAMA,+BACA,aAYA,OAVA,kBACA,QAGA,uBACA,mCACA,wBACA,mBACA,CAAK,EAEL,SACA,EAEA,8BAIA,IAEA,EADA,OADA,SADA,iDACA,aAEA,QACA,mDACA,SAEA,WACA,IACA,uBACA,CAAU,SACV,0DACA,CACA,2BAEA,EAKA,UACA,gBAGA,QAFA,QACA,mBAA2C,GAC3C,IAAwB,WAAe,KAEvC,IADA,WACA,kBACA,0BAEA,oBACA,yDAEA,CACA,WACA,CAAK,CAEL,kBACA,MACA,IACA,mCACA,CAAU,SAEV,CACA,QACA,CAAK,CAEL,oCACA,SACA,KACA,KAEA,KACA,KAAyB,gBACf,MACV,6BACA,OAAkC,cAClC,CAEA,MACA,eACA,6BACA,KAAyB,yBACzB,CAEA,IACA,KACA,KAAwB,gBAExB,GACA,OAAyB,SAGzB,0CAAkF,WAClF,CAAK,CAEL,4BACA,mBAEA,KACA,KAAyB,gBACf,MACV,6BACA,OAAkC,cAClC,CAEA,MACA,eACA,+BACA,KAAyB,yBACzB,CAEA,IACA,KACA,KAAwB,gBAExB,GACA,OAAyB,SAGzB,uCAAmF,YAEnF,OADA,WACA,CACA,CAAK,CAEL,uBACA,+BACA,CACA,EAEA,WACA,gBACA,gBACA,SAGA,SACA,IACA,yBACA,sBAEA,YADA,eAEA,cACA,OAEA,eACA,CAAM,SACN,IACA,CAGA,OADA,IACA,CACA,EAGA,gBACA,yBACA,gBAIA,OAHA,GACA,mCAAqD,+BAErD,CACA,CAAK,CAEL,kBACA,iCACA,CAAK,CAEL,gBACA,IACA,qCACA,CAAU,SACV,uBACA,CACA,WACA,CAAK,CAEL,kBACA,IACA,8CACA,CAAU,SAEV,CACA,WACA,CAAK,CAEL,kBACA,IACA,gCACA,CAAU,SACV,uBACA,CACA,CAAK,CAEL,mBACA,IACA,iCACA,CAAU,SACV,uBACA,CACA,CACA,EAEA,4BA6DA,cAKA,OAJA,IACA,kCACA,qCAEA,CACA,CAQA,OAPA,4BACA,mBACA,EACA,6BACA,oBACA,EA1DA,oBACA,OACA,uDACA,MACA,CAEA,0BACA,gCACU,CACV,aACA,OACA,CAD+C,CAC/C,YAKA,GAQA,GAPA,sBAWA,IACA,IADA,KAYA,OATA,aApBA,IAqBA,GArBA,EAqBA,IAEA,EAvBA,EAuBA,KAvBA,EAuBA,GAEA,kBACA,OAGA,EACA,CA7BA,CACA,CAgDA,CAAC,GAGD,wEAEA,uBAyBA,cAEA,8CACA,CAEA,kBAOA,cAEA,2BACA,SAGA,mBAEA,MACA,QAAoB,WAAmB,KAEvC,GADA,+CACA,iBAGA,EADA,gBACA,IACA,WACA,sBACA,sCAEA,SAGA,MACA,QACA,CACA,CAF0B,EAE1B,mBAGA,GADA,eACA,IACA,WAOA,IANA,GACA,QAGA,KACA,IACA,IAA4B,WAA2B,IAMvD,QAJA,EADA,OACA,QAEA,6BAEgC,WAAqB,IACrD,YAKA,QAFA,KACA,IAC4B,WAAkB,IAC9C,gBACA,4BArDA,MAsDA,IAtDA,sCADA,IAuDA,EAvDA,MACA,GAwDA,cAGA,QACA,CAEA,CAH0B,GAG1B,aACA,MACA,OACA,IAvDA,oBA4EA,EArBA,OACA,MAoBmC,CAnBnC,OAOA,IANA,GACA,QAGA,KACA,IACA,IAA4B,WAA2B,IAMvD,QAJA,EADA,OACA,QAEA,6BAEgC,WAAqB,IACrD,YAMA,OAHA,KACA,IAEA,GACA,QACA,cACA,2BACA,EACA,KACA,SACA,cACA,qDACA,EACA,KACA,SACA,cACA,kDACA,EACA,KACA,SACA,cACA,uCACA,EACA,KACA,SACA,cACA,4EAEA,KACA,SACA,cACA,sCACA,EACA,KACA,SAEA,cACA,wBACA,CACA,CAGA,QAFA,KACA,IAC4B,WAAkB,IAC9C,SACA,cAIA,QACA,CAKA,CAN0B,GAM1B,IAHA,IACA,KACA,IACwB,WAA2B,IAEnD,QADA,+BAC4B,WAAqB,IACjD,YAGA,GACA,CACA,QACA,CAEA,0BACA,eACA,IACU,wCACV,EAEA,cAEA,CACA,CAAC,GAED,0EACA,4FAEA,QACA,2BACA,SACA,KAUA,OATA,qBAEA,CADA,4BACA,OACA,OACc,YACd,QAEA,CAAS,EAET,CACA,CAAK,CAEL,uBACA,SACA,KAQA,OAPA,qBAEA,CADA,4BACA,QACA,QAEA,CAAS,EAET,CACA,CAAK,CAEL,2BACA,6DACA,CAAK,CAEL,gCACA,6CACA,SACU,sCACV,OACU,uCACV,QACU,4CACV,aAEA,IAEA,CAAK,CAEL,uBACA,6BAEA,KAEA,aACA,mBAEA,wBANA,mBAOA,WACA,gBAEA,CAEA,QACA,CAAK,CAOL,wBAEA,GADA,QACA,CAD+B,EAC/B,6BACA,qBACA,aAEA,QACU,yCACV,mBACU,uDACV,iCACU,mCAEV,yBACU,8CACV,uBACU,yBACV,wBACU,0BACV,oBACU,yBACV,wBACU,oDACV,wBACU,yBACV,yBACU,gCACV,uBACA,gBAEA,cACU,2BACV,4BACU,6BACV,uBACU,2BACV,qBACU,kDACV,+BACU,yBACV,qBAEA,QAEA,CAAK,CAOL,+BACA,IAmBA,EAlBA,CACA,8CACA,wCACA,+BACA,oCACA,gDACA,gCACA,yCACA,mCACA,iCACA,qCACA,oCACA,sCACA,0CACA,mDACA,+CACA,0BACA,CACA,CAnBA,sBAmBA,CACA,cACA,YAEA,wBACA,EAGA,0BAFA,IAGA,CAAK,CAEL,cAEA,mBADA,SAEA,aAFA,IAEA,iBAFA,GAGA,gBAEA,UACU,6BANV,GAOA,YACU,kBARV,GASA,gBACU,sCAVV,GAWA,mBACU,eAZV,GAaA,iBACU,gBAdV,GAeA,cACU,eAhBV,GAiBA,uBAEA,QAEA,CAAK,CAEL,yBACA,8CACA,gBACU,eACV,OACU,eACV,aACU,iBACV,SACU,sCACV,aACU,kBACV,UAEA,EAEA,CAAK,CAEL,4BACA,0BACA,YACA,KAEA,EACA,CAAK,CAEL,sBACA,0CACA,gBACA,sCACA,qBACA,qDACA,wBACA,CAAS,GACT,6BACA,qDACA,wBACA,sBACA,aACA,2BACA,eACA,sBACA,CAAS,CACT,CAAK,CAEL,6BACA,0CACA,gBACA,qCACA,CAAS,GACT,oDACA,CAAS,CACT,CAAK,CAEL,gCACA,iCACA,2BACA,mCACA,qCACA,yCACA,qCACS,CACT,CACA,EAEA,kBACA,4FACA,2BACA,EAGA,iCAEA,8BAAqD,IAAI,IAczD,cACA,QACA,eACA,gBACA,oCACA,MAEA,iBACA,gBACA,EAEA,OACA,MACA,4BACA,iBACA,cAEA,kBACA,kBAGA,oBACA,sBACA,0BACA,0BACA,4BACA,gCACA,cACA,4BACA,8BACA,4CACA,oCAMA,mBAIA,2CACA,uCACA,6CAEA,6BAEA,OADA,UACA,MASA,oCACA,WACA,iBAEA,iBACA,qDACA,MACA,CAkBA,OAhBA,qBACA,mDACA,SACA,8BACA,yCAEA,0BAGA,gDAGA,uCACA,CAAS,CACT,CAAK,OAEL,EACA,EAOA,6CACA,QACA,WAEA,mBAGA,mBACA,CADsC,CACtC,kBAEA,gBAMA,6BACA,CACA,EAEA,4CASA,MANA,qBACA,KAEA,WAA2B,GAI3B,EAOA,iBACA,2BACA,EACA,eAEA,4CACA,2DAIA,OAFA,SAAwB,cAExB,CACA,EAEA,0CACA,UACA,aACA,WACA,WACA,oBAEA,cAEA,WACA,kBAEA,EAEA,8CACA,WAEA,EAF2B,SAE3B,WACA,uBACK,GACL,EAOA,iBACA,4BACA,EACA,eAEA,0CACA,YACA,kBACA,EAEA,8CACA,sBACA,kBACA,CAAK,GACL,EAIA,gBAsBA,gBACA,QAEA,kBACA,4CACA,0CACA,+BACA,EAIA,qCACA,0BACA,IACA,QAGA,gDACA,uBAEA,kBACA,sBACA,iBACA,eAEA,SACA,SACA,SAEA,cACA,OACA,EAEA,cACA,6BACA,6CAAsE,yBACtE,gBACA,gBACA,IACA,MACA,CACA,sBACA,IACA,GACA,CAAc,SACd,IACA,CACA,CAAS,sBACT,EAEA,gBACA,IACA,IAEA,aACA,MACA,CAAa,CAEb,EAEA,aACA,mBACA,YACA,GADkC,GAClC,GAGA,GADA,eACA,iBACA,SAEA,YACA,iEAEA,QAGA,EAEA,aACA,eAEA,eACA,qBACA,IACA,MACA,CAEA,aACA,qBACA,IACA,MACA,CACA,aACA,mBACA,CAAiB,GACjB,CAAa,CACb,CAAS,CACT,EAEA,aACA,iBACA,IACA,GACA,EAAU,OACV,gBACA,kBACA,gBAEA,kBACA,eAEA,CACA,EAEA,IACA,WACA,SAEA,gDAEA,CAAM,SACN,IACA,CACA,EAIA,iBAkBA,gBACA,QACA,kBACA,4CACA,oDACA,mBAA4C,qBAAsB,EAElE,qBAEA,CAFoC,GAEpC,cAeA,oCACA,OACA,OACA,oCACA,SACA,EAEA,qCACA,MACA,IACA,6BACA,UACA,2BAGA,qBAEA,CAAU,SACV,4CACA,IACA,CACA,GACA,IAEA,CAAK,0BACL,mDACA,GACA,KAEA,CAAK,gBACL,EAQA,kCACA,+BACA,eAIA,6BACA,aAEA,SACA,CADiC,CACjC,mBAA2C,WAAgC,EAE3E,YAA4B,WAAwB,KACpD,WACA,iDACA,cACA,UACA,aACA,KAGA,CACA,CACA,CACA,QACA,EAOA,oBACA,SAMA,OALA,qBACA,gBACA,SAEA,CAAK,EACL,CACA,EAMA,0CACA,SACA,CADoB,CACpB,mBAA+B,QAAmB,EAElD,iCAEA,wBACA,MACA,IACA,6BAMA,GALA,SACA,wBAIA,CACA,yBACA,YAAgC,WAAwB,KACxD,WACA,iBAEA,OADA,kDACA,EAEA,CACA,CACA,CAAU,SACV,2CACA,IACA,CACA,QACA,CAAK,OAEL,8BACA,UACA,GACA,IAEA,CAAK,oBACL,SAEA,GADA,mDACA,qBAMA,CADA,QAIA,IACA,wCACA,CAAkB,SAClB,0CACA,CAGA,GACA,IAEA,CAAK,gBACL,EAGA,oBACA,SAcA,OAbA,qBACA,WACA,WACA,kBACA,IACA,YACA,UAEA,EAAU,IAEV,SAEA,CAAK,EACL,CACA,EAMA,yCACA,iCACA,qCACA,MACA,IACA,6BACA,SACA,uBACA,CAAU,SACV,2CACA,IACA,CACA,GACA,IAEA,CAAK,0BACL,mDACA,GACA,KAEA,CAAK,gBACL,EAMA,uCACA,MACA,IACA,4CAEA,OACA,eACA,6CACA,QAGA,CAAM,SACN,6CACA,MACA,CACA,cAMA,sCACA,IAEA,OADA,2CACA,EACA,CAAM,SAEN,OADA,yCACA,EACA,CACA,EAKA,6BACA,iBACA,wCACA,EAOA,iBAQA,gBACA,mCACA,oBACA,4CACA,kBACK,EAEL,2BACA,mCACA,qCACA,2CAGA,yCACA,0DAEA,6CACA,kCAGA,+BACA,EAiSA,gBACA,UACA,CAcA,gBACA,UACA,CAUA,gBACA,mBACA,CAWA,iBACA,YAgHA,GACA,kBACA,SAEA,qBACA,kBACA,KAYA,OAVA,QACA,aACA,eACA,aACA,aACA,gCACA,MAEA,CAAK,EAEL,CACA,EAnIA,GAEA,OADA,+NACA,GAEA,oBAIA,OAHA,GACA,4GAEA,CACA,CASA,eACA,wBACA,yBACA,CAAK,CACL,CASA,eACA,wBACA,0BACA,CAAK,CACL,CASA,eACA,wBACA,0BACA,CAAK,CACL,CAcA,iBAEA,GADA,SACA,OACA,gDAEA,CAUA,eAEA,uBADA,UACA,uCACA,CASA,iBAEA,OADA,UACA,mBAtJA,kBAsJA,GACA,CASA,iBACA,yBACA,CA6CA,mBACA,8BACA,sEACA,MACA,CAIA,GAFA,SAEA,IACA,QACA,MACA,uDACA,yBACA,iBACA,oBACA,gBAGA,YACA,SADqC,CACrC,6CACA,mBACA,CAAS,CAET,CAUA,iBACA,kBACA,SAEA,IACA,2BACA,4BACA,mDACA,gDACA,wBAEA,CAF2D,EAG3D,MADyB,EACzB,CACA,YACA,kBACA,oBACA,QACA,EAAiB,CAEjB,CAAU,SACV,qEACA,CAEA,MACA,+BAGA,oCACA,sBACA,IAIA,CACA,CA7hBA,kCACA,0CACA,EAMA,6BACA,gBACA,kCACA,YACA,EAKA,4BACA,gBACA,iBACA,6BACA,oBAEA,EAKA,6BACA,kBACA,EAKA,sCACA,0CAMA,kCACA,0DACA,EAKA,sCACA,qBACA,cACA,EADyB,GACzB,kEAEA,EAYA,8BACA,IAEA,2BACA,4CACA,MACA,CAEA,QACA,8CACA,uBACA,iBACA,0BACA,KACA,KAsCA,GArCA,qBACA,gBAIA,GAHA,kCACA,2BAEA,GAIA,uBACA,uBACA,EAA0B,CAC1B,aACA,CAAyB,sCACzB,EAEA,SACA,OACA,EACA,yCACA,oEACA,OACA,mBACA,0CACyB,EACzB,MAGA,iDAAsE,OAAW,EAGjF,GACA,SAEA,CACA,SACA,CAAS,OACT,YACA,kBACA,MACA,CAEA,CAHoB,GAGpB,sBAEA,yBACA,0BAEA,IAKA,SACA,eAEA,kCACkB,GAClB,eACA,qBACA,0BAEA,mCAAuD,WACvD,kBACkB,GAClB,eACA,WACA,qEACA,CAEA,2BACA,4BACA,MACA,uBACA,GACA,yBAEA,CACA,WAlMA,IAkMA,GACA,SAnM4C,OAmM5C,SAA6C,oBAC7C,qBACA,EAAkB,yDAElB,eACA,iCACA,sDACA,gCAAwD,yCACxD,iBACA,EAAsB,IACtB,kDAA0E,aAC1E,sBACA,UAKA,KAGA,IACA,2BACA,oBAAsD,YAAoB,EAC1E,mBACA,GACA,kCACA,cAA8C,CAE9C,sDACA,qCACA,2CAA+E,6BAC/E,wBAEA,kBAGA,CAAyB,QAIzB,4BACA,WACA,GACA,mEACA,kCACA,mCACA,uDACA,OACA,mBACA,0CACiC,GAGjC,gEAA6F,OAAW,CAExG,CAAqB,QAGrB,CAAc,SACd,kDACA,iBACA,CACA,CAAS,OACT,GACA,cACA,WACA,sBACA,YACA,CACA,cACA,2BAEA,6BACA,uBAEA,CAAM,SACN,mDACA,iBACA,CACA,EAKA,sCAEA,GADA,iCACA,mBACA,IACA,oBACA,aAEA,uBACA,CAAU,SACV,UACA,CAEA,EAgSA,cACA,eACA,YACA,UACA,aACA,YACA,aAKA,IACA,yBACA,SACA,KAYA,OAXA,cACA,uBACA,+BACA,QAEA,CAAa,OAEb,OAGA,QACA,CACA,CAAK,CAEL,yBACA,SACA,KAYA,OAXA,cACA,QAGA,qBACA,+BACA,SAEA,CAAS,OAET,QACA,CACA,CAAK,CAEL,8BACA,SACA,KAWA,OAVA,cACA,uBACA,+BACA,QAEA,CAAa,OAEb,OAEA,QACA,CACA,CAAK,CAEL,2BACA,SACA,KAWA,OAVA,cACA,uBACA,+BACA,yBAEA,CAAa,OAEb,wBAEA,QACA,CACA,CAAK,CAEL,4BACA,SACA,KAWA,OAVA,cACA,uBACA,+BACA,QAEA,CAAa,OAEb,OAEA,QACA,CACA,CAAK,CAEL,4BACA,SACA,KAWA,OAVA,cACA,uBACA,+BACA,QAEA,CAAa,OAEb,OAEA,QACA,CACA,CAAK,CAEL,yBACA,SAEA,OADA,EAzGA,OAyGA,IACA,CACA,CACA,EAMA,gBAEA,0BAEA,mCACA,iBACA,kBACA,gBACA,EAoBA,oCACA,2BAIA,OAHA,eACA,MAEA,uBACA,CAAC,EAsBD,yCACA,gCAIA,OAHA,eACA,MAEA,uBACA,CAAC,EAYD,oCACA,2BACA,8BACA,CAAC,EAcD,sCACA,eACA,MAEA,6BACA,8BACA,CAAC,EAWD,mCAEA,2BACA,8BACA,CAAC,EAaD,uCACA,8BACA,8BACA,CAAC,EAED,yCACA,6BACA,2BACA,mCAEA,uBACA,uCACA,cACA,OACA,iDACA,8CACA,CAAK,GACL,EAEA,+CACA,uCACA,EAEA,qCACA,mCACA,EAEA,iCACA,+EAIA,wCACA,kCACA,4CACA,sCACA,sCACA,4CAMA,oBAEA,0BAEA,+BACA,gBACA,EAqBA,oCACA,2BAgBA,OAfA,eACA,MAGA,mCACA,mEAIA,eACA,EAAU,CACV,2BACA,+CACA,OAEA,uBACA,CAAC,EAuBD,yCACA,gCAIA,OAHA,eACA,MAEA,uBACA,CAAC,EAeD,oCACA,2BACA,8BACA,CAAC,EA2BD,0CACA,SACA,KAuBA,OAtBA,eACA,uBACA,mCACA,yBACA,0FACA,MACA,CACA,CADkB,CAClB,IAEA,CACA,CAAS,OACT,MAIA,kBACA,MAEA,QAEA,QAEA,uBACA,CAAC,EAqBD,uCACA,eACA,MAEA,8BACA,8BACA,CAAC,EAaD,uCACA,eACA,MAEA,8BACA,8BACA,CAAC,EA4BD,sCACA,eACA,MAEA,6BACA,8BACA,CAAC,EAsBD,6CACA,mBAEA,MADA,iBACA,CACA,mFACA,MACA,CAGA,6CACA,SACA,CAAK,MACL,CAAC,EAaD,uCACA,qCACA,EAYA,oCACA,6BACA,+EACA,MACA,CACA,OAAgB,0CAChB,4BACA,EAEA,iCACA,0CACA,EAEA,yCACA,mCACA,gDACA,gDACA,0CACA,4DACA,GACA,iBAEA,GACA,eAEA,GACA,iCAGA,8BAEA,wBAYA,gCACA,cACA,OACA,iDACA,+CACK,KAhBL,iBACA,kBAEA,EADA,4BACA,CAA0B,qBAAwB,CAElD,IAGA,kBASA,EAEA,qCACA,mCACA,EAEA,yCACA,gDACA,EAGA,kCACA,QACA,sDACM,QACN,sDACM,QACN,sDACM,QACN,sDACM,QACN,sDACM,QACN,sDACM,QACN,sDAEA,wCAEA,EAEA,gDACA,WACA,aAAiC,2CACjC,GAEA,yDACA,oDACA,GACA,SAEA,yBAEA,OACA,kDAEA,kBACA,MAEA,CAAS,EAET,EAIA,6BACA,eAEA,WACA,4CACA,4CAUA,GARA,qCACA,0CACA,kDAAuF,iBAAuB,EAC9G,2CACA,uCAIA,2CAUA,QATA,EACA,gBACA,OACA,mDAEA,kBACA,MAEA,EACA,aAA+C,KAAQ,IACvD,UACA,oBACA,cAIA,8BACA,CAGA,8CAUA,QATA,EACA,gBACA,OACA,mDAEA,kBACA,MAEA,EACA,aAA+C,KAAQ,IACvD,UACA,oBACA,cAGA,8BACA,CACA,EAEA,+CACA,0GACA,EAGA,kCACA,4CACA,sCACA,8CACA,wCACA,wCACA,sCACA,oDACA,sDACA,kDACA,4CAKA,eACA,YACA,YACA,WACA,YACA,WACA,WAEA,yBACA,aACA,cACA,IACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,CAMA,eACA,cACA,8BAEA,mBACA,mCAEA,oCAGA,oBACA,mCACA,4CAAyE,yBACzE,0BAGA,kDACA,4BAEA,sBAGA,YACA,sBACA,gBACA,WACA,EAEA,mCACA,SAOA,OALA,gCACA,iBACA,QAEA,CAAK,EACL,CACA,EAEA,6BACA,mBAEA,EAFyB,EAEzB,gCAEA,GACA,uBAAmC,KAEnC,EAEA,iCACA,IACA,EACA,EAFA,YAIA,IACA,wBAEA,oBACA,MAGA,wBAGA,uBACA,0BAEA,GACA,qBACA,WACA,MACA,SACA,GAIA,sCAGA,2BACA,4BAGA,uBACA,0BAIA,wBAIA,gCACA,4BAEA,2BACA,8BAEA,GACA,sBAGA,EAEA,6BACA,eACA,EADyB,EACzB,aACA,UACA,yBACA,iBACA,qBACA,YACA,gBACA,mBAEA,EAEA,+BAEA,qDACA,oDACA,EAIA,8BACA,cACA,aACA,EAOA,iDACA,kBACA,aAAqD,UACrD,kDAEA,uBACA,iDACA,iBAEA,CAAS,OAET,YAEA,GAGA,EAMA,0CACA,kBACA,kDAEA,uBAEA,YAEA,GAGA,EAEA,oCACA,kBACA,qBACA,YAEA,EAEA,+CACA,mCACA,EAGA,8CAEA,oBACA,+BACA,8DACA,CAAK,IACL,EAEA,0CACA,iCACA,+CACA,+DACK,CACL,EAKA,oCAOA,OANA,gCACA,QACA,QAEA,CAAK,EAEL,CACA,EAEA,uCACA,yDACA,yCACA,wCACA,yCACA,mDACA,gCACA,EAEA,sCACA,gBACA,cACA,cAEA,WAEA,EAEA,2CACA,yBACA,cACA,qBACA,YAEA,EAEA,wCACA,sBACA,kBACA,cACA,YAEA,EAEA,6CACA,2BACA,uBACA,cACA,YAEA,EAEA,4CACA,6BAGA,oCACA,kBACA,gBACA,cACA,YAEA,EAEA,gDACA,6BACA,OACA,gCACA,gCACA,gCACA,gCACA,gCACA,mCACA,kCAEA,SAEA,cAGA,kCAGA,kCACA,mCACM,QAEN,uBACA,QACA,QAEA,CAAS,EACT,mCACM,OACN,qBAGA,6BACA,QACA,WAEA,CAAa,EACb,qBACA,QACA,YAEa,EAEb,OAEA,CAAS,EACH,QACN,uBAGA,OACA,SAIA,QACA,SAEA,QAEA,CAAS,OACT,mCACM,QACN,uBACA,eACA,QACA,UAGA,oBAEA,CAAS,EACT,mCACM,QACN,UACA,mCACM,SACN,UACA,mCAGA,6DACA,SAEA,WACA,EAEA,kDACA,yBACA,mBACA,uBACA,eAIA,qBACA,UACA,YAEiB,EAEjB,YAES,OAET,YAEA,EAEA,+CACA,OACA,GACM,OACN,GACM,OACN,GACM,OACN,GACM,OACN,GACM,OACN,GACM,OACN,QAEA,2BAEA,EAEA,oCACA,2CAEA,gDACA,6BAGA,OAFA,sBAAkD,EAElD,gCACA,EAEA,2CACA,wBACA,QACA,iBACA,WACA,EAEA,4CAEA,OADA,mBACA,IAKA,OAJA,mBACA,yBACA,aAEA,CACA,EAkCA,mBAAiC,UACjC,gBAEA,cACA,YAEA,cAQA,4DAKA,0DAGA,OACA,eACA,eAEA,sCACA,GAMA,QACA,uCACA,kBACA,oBACA,sBACA,gCACA,4BACA,qBACA,0BACA,kBACA,qBACA,oBACA,iBACA,eACA,UACA,mBACA,kBACA,8BACA,gBACA,iBACA,QACA,WACA,OACA,SACA,wBACA,sBACA,WACA,uBACA,kBACA,iBACA,MACA,+BACA,kCACA,iDACA,oCACA,sBACA,cAA2C,CAC3C,MADkD,KAClD,GACA,kBACA,cACA,4BACA,6BACA,mBACA,QACA,EAEA,MAMA,gBAWA,mBACA,MACA,gBAEA,MAvGA,IAuGA,EACA,QACM,CACN,qBACA,2CACA,MACA,CACA,QACA,CASA,GAPA,oBAEA,CAFkC,CAElC,aAEA,gBACA,kBAEA,6CAKA,kCACA,KACA,KACA,uBACA,kBACA,GACA,MAEA,CAAS,EACT,GACA,oBAEA,CAeA,OAXA,uCAIA,kCAGA,yCACA,qBAGA,CACA,EAoBA,kCACA,qBACA,+EACA,MACA,CACA,WACA,kHACA,MACA,CAEA,gBAIA,OAHA,OACA,YAEA,CACA,EASA,mCACA,QAEA,iBACA,eAEA,SA6BA,GA1BA,6BAEA,CADA,yBACA,0BACA,sBAzMA,MAyMA,EAIA,2BAA+B,SAC/B,OACA,QACA,uCACA,CAAK,GAEL,aAEA,2BACA,wBACA,0BACA,aACA,sBACA,kBACA,EAGA,yBACA,uDACA,sBACA,uCAKA,IADA,qBACA,wBAYA,wBACA,sCACA,oCAA4D,aAAgB,CAE5E,CAAiB,OACjB,0CACA,aACA,GAEA,CAAiB,EACjB,iDACA,8BACA,GAEA,CAAiB,CACjB,OA/BA,wBACA,8CAAgE,qCAkChE,iDACA,+BACA,kBAEA,eACA,wBAIA,oBACA,iBACA,YACA,CAAS,KAGT,mCACA,qBAEA,EAIA,gCACA,gCACA,8BACA,EAGA,gDACA,mDACA,iCACA,uCAAgD,cAAkB,EAElE,kCACA,iDAEA,EAEA,oCACA,2CACA,6BACA,CAAK,OAEL,+BACA,wCACA,gCACA,CAAS,OAGT,+BACA,6BAGA,sCACA,0BAEA,OADA,2EACA,GAGA,OAEA,OADA,oCACA,GAGA,yBACA,yBACA,EAWA,6CACA,oBACA,YAGA,MAIA,OAHA,YACA,MACA,EAMA,gBACA,mCACA,2CAKA,OAJA,iBACA,YACA,MACA,EACA,CAEA,EAEA,6CACA,SAEA,MAEA,OADA,qCACA,EAGA,OACA,qCACA,2CACA,kCACA,EACA,MAEA,6CACA,IACA,QAEA,kBAAqD,EACrD,IACA,iBAEA,wBACA,kDAGA,YACA,YAA2B,MAE3B,0BAAmC,UACnC,GAAwB,cACxB,yBAAkC,SAClC,MACA,EACA,aACU,8BAKV,0BAA6C,KAI7C,+BACA,oCAEA,IACA,qCACA,eAGA,2BAEA,WACA,cACA,4BACA,SACA,qBACA,EAAM,UACN,IACA,SACA,CAAU,SACV,kBACA,IACA,CACA,IACA,GACA,QAEA,CAAU,SACV,iBACA,CACA,EAAM,UACN,IACA,yBACA,sBAEA,qCAQA,GAPA,GACA,wDAEA,uBACA,uBACA,CAAa,EAEb,kCACA,uBACA,0BACA,CAIA,qBACA,gCACA,sBAA4C,GAI5C,EAiBA,EApBA,kBACA,OACA,MAEA,IACA,8BACA,CAAkC,SAElC,GADA,mBACA,qBAGA,OAFA,iBAKA,IACA,EAA8B,IAC9B,0BAEA,MAQA,EAJA,WACA,WACA,kCAEA,UAEA,8CAEA,kBACA,IACA,EACA,GAA0C,2BAAsC,EAEhF,KAIA,CACA,EACA,SACA,CAAU,SACV,kBACA,IACA,KACM,CACN,+BACA,0BACA,WACA,WACA,QACA,0CACA,8BACA,CAEA,QACA,EAcA,wCACA,qBACA,qBACA,IACA,OACA,aACA,UACc,IAD6B,QAC7B,SACd,aACc,0BACd,UACc,kEACd,UAEA,UAGA,CAAK,OAEL,oBACA,qBACA,oBAEA,QACA,qBACA,6BACA,CAAiB,CACjB,EAAc,IACd,iCAEA,CAAS,GACT,EAEA,UACA,UACA,SACA,EAIA,iDACA,oCACA,EAEA,sCACA,+BACA,qCACA,yBACA,aACA,0BACA,CACA,sBACA,uCACA,mBACA,uCACA,iCACA,EACA,4BAEA,CAAqB,OACrB,kCACA,8CACA,CAAqB,OACrB,gDACA,wDACA,EAEA,CAAS,MACT,wBACA,UAAiC,oDAAyD,EAC1F,UAAiC,qDAA0D,EAC3F,UAAiC,qDAA0D,CAC3F,CACA,CACA,oCACA,0BAEA,EAEA,4CACA,kCACA,wBACA,yCACA,SACA,CAAS,EAET,EAEA,2CACA,wBACA,yCACA,SACA,SACA,CAAK,CACL,EAcA,8BACA,wBACA,EAaA,iCACA,WACA,kCAEA,uDAEA,EAEA,kDACA,sBAIA,OAHA,4CACA,sBAEA,CAAY,OACZ,EAGA,2CACA,6BACA,aACA,YACA,4BACA,6BACA,QAEA,SACA,0BAIA,CAHA,cACA,4CAEA,IACA,2BACA,SACA,mBACA,EACA,iCACA,EACA,8BAGA,IAEA,CAAK,OAcL,OAZA,yBACA,wBACA,EACA,OAEA,GAEA,CAAS,EAET,MAGA,IACA,EAyBA,wCACA,0BACA,IACA,QAGA,MADA,UACA,UACA,CAD0C,EAE1C,gBAEA,CAFuC,GAEvC,qBAKA,GAJA,sBACA,OAGA,kBACA,8DACA,MACA,CAEA,+BACA,KACA,MACA,CAIA,CADA,SACA,+BAGA,6CACA,sBACA,4BACA,2CACA,CAEA,+BAEA,yCACA,yBACA,GAOA,WACA,EAAU,CACV,oBACA,EACA,8BACA,4BACA,GAGA,4CACA,aACA,qBACA,YACS,EAET,qEAGA,OACA,QACA,YACA,EAUA,OATA,sBACA,cACA,OACA,+CACA,qCACA,0BACA,sBACA,CAAK,GAGL,CAAC,EAgBD,0CACA,cACA,QAEA,SAGA,OAFA,OACA,iBACA,sBACA,CAAC,EAaD,0CACA,2BACA,eACA,QACA,UACA,gBACA,EAAM,IACN,oBACA,UACA,kBAGA,+BACA,CAAC,EAaD,6CACA,2BAEA,eACA,mBACA,OACA,cACA,eAA2B,YAAqB,GAEhD,cACA,kBAEA,CACA,gCACA,CAAC,EAcD,oDACA,iBAAoC,MAAkB,EAMtD,OALA,6BACA,GACA,QAEA,CAAK,EACL,iBACA,CAAC,EAED,2CACA,8BACA,EAEA,oDACA,qDACA,EAaA,qCACA,gCACA,yBAMA,MALA,kDAEA,CADA,UACA,gBACA,0BAEA,CACA,EA8BA,6CACA,oBACA,OAGA,MADA,UACA,gCAEA,WACA,8BACA,wBACA,sBAGA,WACA,EAAU,CACV,EACA,GAGA,sBACA,CAAC,EA8BD,oCACA,6CACA,EA6BA,oCACA,6CACA,EAmBA,oCACA,qBACA,mEACA,MACA,CAEA,4BAIA,wDACA,EAEA,QACA,aACA,EAOA,eACA,MAQA,OANA,EADA,cACA,EACM,iBAGN,GAFA,CAAmB,QAInB,WAAsB,MACtB,EAyBA,oCACA,WACA,cACA,oCAEA,uCAEA,EA6BA,2CACA,WACA,cACA,4CAEA,YACA,WAEA,uBACA,mFACA,kCAEA,CAAS,OAET,EASA,sCACA,UACA,WACA,+BAEA,uCAIA,4CACA,QACA,QACA,gBACA,EA0BA,+BACA,iBAUA,6BACA,aAGA,yCAEA,OADA,6DACA,GAEA,eAAuB,WAA4B,CACnD,CAEA,iCAIA,oBACA,8BACA,WAHA,CAIA,CAAS,KAKT,mCACA,oBACA,eAAuB,cAA+B,GAEtD,+BAEA,kCAIA,OACA,wBACA,cACA,mBACA,CAAS,EAAG,cAAiB,CAE7B,EAMA,8BACA,yBACA,+BACA,eACA,oBACA,iBACA,YACA,CAAK,IACL,EAkBA,wCACA,uCACA,EAsCA,iCAIA,6BAEA,OADA,qFACA,GAGA,iBAIA,CAHA,kBACA,2BAEA,QACA,4BACA,4BACA,QACA,aACA,CAAS,EACT,aACA,CAAS,YAET,aACA,CAAS,IAET,4EACA,iBACA,GAEA,EAaA,kCACA,sCACA,EA6HA,oCACA,gBACA,wBAEA,cAEA,yCACA,kBACA,CAAa,EAGb,qCACA,uDAEA,wCACA,6DAGA,kBACA,4CAEA,0CAEA,EAKA,oCACA,uBASA,mCACA,iEAKA,OAJA,aACA,oDACA,QAEA,CACA,EAoBA,sCACA,kCAGA,iCACA,8BAIA,OAHA,QACA,aAEA,CACA,EAEA,4CACA,yBACA,gCACA,mCACA,EAGA,mCACA,uEAGA,gCACA,2DAAyE,0BAA6B,GACtG,sBAAkC,sBAA4B,EAE9D,6DAA2E,0BAA6B,GACxG,uBAAmC,qBAA2B,EAE9D,gCACA,0BACA,qBACA,CAAS,GAIT,8BACA,+BAAuC,qBAA0B,EAK3D,+BACN,8EAEA,6BACA,uBACA,mEACA,CAAS,EAET,EAQA,kDACA,MACA,0BACA,UACM,6BAGN,OAFA,KAKA,uEACA,iCAGA,GACA,yCACA,SACA,CAAS,CAET,EAGA,2CAkBA,OAjBA,YACA,8BACA,sEACA,gEACA,uDACA,uDACA,iEACA,+CACA,+CACA,wCACA,CAAK,IAGL,+BACA,8BAGA,4BACA,cACA,kCACA,mCACA,mCACA,kCACA,6BACA,qCACA,oCACA,8CACA,6BACA,uBACK,CACL,EAiCA,yCACA,YACA,qBACA,CAAK,IAEL,0BACA,gCACA,EA2BA,0CACA,aACA,qBACA,cACA,CAAK,KAGL,2DACA,0BACA,6BAGA,0BACA,gCACA,EAeA,+CACA,gCACA,EAeA,gDACA,iCACA,EA2BA,mDACA,YACA,qBACA,CAAK,IAEL,2BACA,gCACA,EAEA,wCACA,iCACA,IACA,uBACA,aAEA,sCACA,CAAM,SACN,UACA,CACA,EAKA,oCACA,sCACA,0CACA,gDACA,sCACA,kDACA,kDACA,wDACA,4CACA,sDACA,gDACA,4CACA,sCACA,4CACA,gDACA,gDACA,oDACA,0DACA,4CACA,4DACA,0DACA,wEACA,sEACA,8EACA,8CACA,8CACA,8CACA,oDACA,8DACA,kEACA,gEAGA,gDACA,sEACA,oEACA,kEACA,sCAGA,UACA,cAEA,wBACA,SAA8C,OAC9C,CAAK,EAGL,KACA,EAuGA,IAVA,EA/9DA,EAg+DA,WAzFA,qBACA,KAMA,OAJA,OACA,qBACA,gBAEA,KAEA,OAEA,QAEA,SACc,IAGd,CADA,cACA,UACA,UAGA,IA35DA,IA45DA,GACA,UAEA,IAEA,EAiEA,SACA,WA7DA,aAEA,SACA,CADuC,CACvC,QAEA,MACA,MAEA,sBACA,eACA,CAAS,EACT,CAaA,sBACA,0BAKA,IAEA,iDAEM,kBAEN,sCAGA,SACA,IACA,wBACU,SAEV,CAEA,+BACA,SAlCA,IACA,IACA,kCACA,CAAU,SACV,gBACA,MACA,CAEA,GACA,GA2BA,CAGA,+BACA,IAUA,GAKA,8BCr/LA,4CACA,QACA,WACA,OAAe,EAAQ,KAA6B,CACpD,EACA,SAFsB,uBCDtB,IAAIA,EAAyBC,EAAQ,KAA8C,CAInFC,GAAAA,CAAe,CAAG,KAAK,CAJaD,CAKpC,IAAIE,EAAiBH,EAAuBC,EAAQ,KAAuB,GACvEG,EAAcH,EAAQ,KADyBA,CAEpCC,GAAAA,CAAe,CAAG,CAAC,EAAGC,EAAeE,C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AE,YAAe,EACxE,SACA,iBACA,KACA,CAAS,EACT,aAA4C,EAAO,MACnD,aAAwD,EAAO,IAAI,EAAc,KACjF,CAEA,CAAG,mBAEH,CACA,MACA,OACA,kBACA,CACA,CCwBA,MAtJA,eAAgD,EAChD,IACA,GAoJe,SApJf,EA+CA,GAqG6B,MArG7B,KACA,QAWA,GAVA,aACA,UAEA,YACA,gBAEA,2CAEA,OAAiB,EAAS,SAE1B,GACA,gBACA,4BACA,cAEA,6BACA,OACA,kCAA4C,EAAK,KACjD,SACA,CACA,CACA,CACA,YACA,yBACA,UAA2B,0BAAwC,EAEnE,yBAEA,CACA,aACA,CA/EA,CACA,wBACA,sBACA,CAAI,EAEJ,CACA,iBAAqB,CACrB,aACA,6BACA,KACA,CAAI,EACJ,CACA,OACA,MACA,mBACA,CAAI,EAAe,KACnB,IACA,EAFmB,CAEnB,EACA,CACA,MACA,KACA,CAAI,EAaJ,GAZA,oBAAwC,oBACxC,IACA,OACA,MACA,mBACA,CAAM,EAAe,KACrB,EAAgB,IADK,CACL,EAAS,MACzB,MACA,MACA,MACA,CACA,CAAG,EACH,GAEA,IACA,MACA,OACA,mBACA,CAAM,EAAe,KACrB,EAAgB,IADK,CACL,EAAS,MACzB,MACA,MACA,MACA,CACA,CAgGA,OACA,OACA,kBAhEA,KACA,OACA,MAOA,OALA,8BACA,OACK,KACL,EAAa,OAAS,KACtB,CAAK,EACL,CACA,EAuDA,oBAtDA,KACA,SACA,gCACA,gBACA,uBACA,2BACA,KACA,KAEA,EAAU,EAEV,CACA,YACA,KACK,KACL,IACA,MACA,KACA,CAAM,EACN,MAEA,IACA,MACA,CAAQ,EACR,sBACA,SACA,cACA,MACQ,CACR,MAEA,OACA,KACO,IACP,CAeA,OAdA,+BACA,MACK,KACL,0BACA,SACA,cACA,MACQ,CACR,MAEA,OACA,KACO,IACP,CAAK,EACL,CACA,CAKA,CACA,kDGpJA,SAASw5C,IAAa,kDAAGC,CAAAA,CAAH,eAAK,CACzB,MAAO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,CAEA,GHhHA,MGgH6B,4BAC7B,SAGA,MAAoB,QAAW,KAkB/B,EAjBA,EAkBA,CACA,WACA,QACA,CACA,0BAEA,0DAAqE,UAAe,EAC3E,CACT,CACK,GA1BK,GAAqB,gBAE/B,EAF+B,CAE/B,cAEA,gCAEA,CAAK,CAEL,CAwDA,qBAEA,iCAAoD,CAEpD,wBAEA,eAAkC,CAElC,+BAAqD,CAErD,wBAEA,iCACA,iCACA,EAAmB,QAAQ,kBAAgC,SAAe,GAa1E,OAVA,cACA,QACA,QACA,WACA,aACA,UACA,QACA,CAAK,EAGL,CACA,CAMA,qBACE,QAAqB,IACvB,WACA,MACA,CAAG,EACH,kBACA,mBACA,CAAG,CACH,CAEA,cACA,MAAc,QAAa,GAC3B,gBACA,sBACA,mBACA,mBACA,EACA,2CA1LE,kBCvDF,QACA,cACA,SACA,OACA,mBACA,iBACA,mBACA,oBACA,kBACA,cACA,aACA,qBACA,cACA,aACA,iBACA,eACA,kBACA,cACA,cACA,eACA,qBACA,SACA,eACA,YACA,eACA,gBACA,YACA,kBACA,SACA,iBACA,4BACA,uBACA,OAGA,GAIA,sBAA0B,mBAW1B,eACA,gBACA,eACA,kBACA,eACA,yBACA,eACA,cACA,KAEA,CAMA,YACA,0BACM,QAAI,CAAC,GAAM,iBAGjB,2BACM,QAAI,CAAC,GAAM,kBAGjB,qCACM,QAAI,CAAC,GAAM,4BAGjB,8BAAwC,uBAClC,QAAI,EADwD,cACxD,qBAGV,gCACA,GAEA,CADA,uBACA,WAEA,CACA,CAGA,eAEA,sBACA,WAQA,OAPA,KAAc,GAAI,GAClB,WACA,MAAgB,SAAU,EAAe,GAAY,CACrD,SADyC,EAEzC,iBACA,CAAO,CACF,EACL,eACA,CACA,CAIA,eAEA,mBAEA,qBACM,GAAI,GACV,WACA,MACA,iCACA,QAAqB,EAAe,EACpC,CAAW,CACX,SAFoC,EAGpC,iBACA,CAAS,CACF,EACP,CACA,CACA,CAGA,eAEA,sBAEA,WA8BA,MA7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CAEA,QACA,0BAEA,UACA,uBAEA,gBACA,kCAEA,CAGA,WACA,2BACA,CAEA,YACA,eACA,CAKA,WACA,EACA,CACA,cACA,KACA,yBACA,qBACA,qBACK,EASL,GAPA,iCACA,gBACA,sBAGA,+BAEA,yEACA,gCACA,yCACA,uBAEA,yBAAgD,EAAM,yBAAyB,EAAQ,KAAK,EAAM,IAClG,0DAAwE,GAClE,IAAM,OACZ,CAEA,QACA,CAKA,YAEA,OADA,WAAkB,oBAClB,KAOA,aAEA,OADA,WAAkB,oBAClB,KAMA,aAEA,OADA,cACA,KAMA,iBACA,0CACA,4CACA,eAiIA,GACA,iBACA,WAGA,iBACA,UACA,SACA,uBACA,UACA,yBACA,UACA,iBACA,UACA,sBACA,UACA,2BACA,UACA,0BACA,SACA,wBACA,CAGA,iBACA,UACA,SACA,qBACA,UACA,mBACA,UACA,yBACA,SACA,sBACA,CAGA,qBACA,EAvKA,GAIA,MAHA,qBACA,kBAEA,KAMA,WACA,kBACA,CAKA,YACA,wBACA,CAKA,UACA,GACA,0DAEA,kBACA,sCACA,CACA,IAAc,cAAa,oDAC3B,GACQ,IAAM,uCAEd,CAEA,uCAA0E,SAAkB,EAC5F,CAKA,gBACA,OAAW,GAAyB,sCACpC,CAKA,YACA,MAAW,QAAiB,EAC5B,eACA,6BACA,+BACA,WACA,+BACA,qBACA,mBACA,mCACA,mBACA,eACA,qBACK,CACL,CAKA,qBAaA,OAZA,qBACA,+BACA,iCACA,aACA,iCACA,uBACA,kCACA,0DACA,qBACA,qBACA,qCAEA,KAMA,kBACA,MAAW,QAAiB,EAC5B,sDACA,6BACA,WACA,iCACA,oBACA,mBACA,sDACA,sBACK,CACL,CAKA,QAEA,CACA,MAAW,QAAiB,EAC5B,sDACA,6BACA,WACA,iCACA,oBACA,oCACA,mBACA,sDACA,4BACA,sBACA,mBACK,CACL,CACA,CCnUA,iBAA0B,GAa1B,CAb8B,WAa9B,KACA,SAGA,wBAEA,sBACA,kBAEA,aAAuB,QAAa,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A,YACA,2BACA,mCACA,yBACA,mBACA,qBACA,wBACA,CAAC,WA2ED,UACA,cACA,uBACA,4BACA,CACA,SACA,MACA,MACA,UACA,yDACA,mBACA,CACA,WACA,kCACA,CACA,SACA,wCACA,CACA,WACA,oCACA,CACA,qBACA,oBACA,yBACA,cACA,kDAEA,CACA,OACA,4BACA,CACA,WACA,8BACA,CACA,SACA,WACA,wBACA,yBACA,CACA,aACA,sBACA,MACA,8BACA,GACA,yBACA,CACA,uBACA,CACA,QACA,uBACA,4BACA,CACA,CAIA,8BAA2B,mBAAkC,EAI7D,MAHA,cACA,aAEA,uBACA,SACA,gBACA,wBACA,CACA,sBAA0B,kCAAwC,EAClE,mBACA,GAGA,GACA,WAEA,sBALA,CAMA,CACA,eACA,sBACA,CACA,eACA,sBACA,CACA,4BAmBA,eACA,aACA,6CACA,WACA,EAEA,MACA,IACA,CACA,yBACA,2CACA,4BAEA,OACA,CAEA,SACA,0BAEA,cACA,WACA,CAwBA,oDACA,yBACA,eACA,2BACA,iBACA,yCACA,cACA,WACA,MACA,SAEA,2BAGA,WAFA,aAA0B,EAAW,EAAE,EAAS,EAAE,EAAW,GAK7D,cACA,aAA0B,EAAW,EAAE,GA7BvC,iBA6BuC,EA5BvC,gCAGA,iBAEA,cAuBuC,EAA+B,EAAE,EAAW,GAEnF,mBACA,eAEA,aADA,QACA,GACA,UAGA,SACA,QAGA,WAGA,aAAsB,EAAW,EAAE,YAAgB,EAAE,EAAW,GAC3D,CACL,CACA,4BACA,wBA2DA,iBACA,qBACA,SAEA,2BAEA,OADA,SACA,MACA,CAIA,cACA,kCAEA,OADA,UACA,OAEA,gCACA,EAGA,WACA,qCAGA,gCAGA,mBACA,iCAGA,aAzFA,cACA,iBACA,SAEA,QACA,kBACA,EACA,oCACA,GACA,OACA,YACA,GAEA,EACA,CACA,SACA,KACA,OACA,eAFA,CAKA,YACA,qBACA,kCACA,cAEA,CACA,SACA,UACA,SACA,QACA,kBACA,WACA,qBACA,KACA,CACA,KAWA,SACA,WAZA,CACA,YACA,KACA,qBACA,KACA,CACA,SACA,MAEA,CAMA,KACA,IACA,CACA,CACA,CACA,mBACA,EAiCA,KAEA,YACA,WAEA,yBACA,QAEA,qBACA,SAEA,EArBA,QAJA,CA0BA,CACA,mBACA,gDACA,CAoCA,iCACA,IAEA,6BAEA,IAHA,GAKA,KACA,EACA,wBACA,CACA,iBACA,WAEA,UADA,EAEA,SACA,MACA,sBACA,IALA,EAKA,YAAmC,EAAU,GAC7C,cAEA,GA9BA,cACA,6BAA2C,KAAS,CACpD,GADoD,CACpD,iBACA,aACA,QAEA,CACA,QACA,EAcA,EAQA,GACA,iBAGA,iBAGA,CACA,CACA,yBACA,IACA,kCACA,EACA,gBACA,YACA,SACA,SACA,KACA,MAEA,GADA,kBACA,EACA,SAEA,0BACA,KACA,CAEA,GADA,kBACA,EACA,SAEA,0BACA,CACA,YACA,SACA,KAEA,SAEA,GACA,CACA,SACA,CACA,SACA,CAmWA,sBACA,QACA,GAGA,eAEA,CAyEA,qBA6BA,EA5BA,QAAY,4MAA6M,kFAA+E,0LAA+M,EACvf,oBAAU,MAA4B,EACtC,WA1XA,KACA,IAAY,gNAAoM,+CAA8C,yEAA4E,EAC1U,WA0EA,KACA,iBACA,OACA,iBACA,qBACA,EA/EA,KACA,mBACA,qBACA,+BACA,OACA,gBACA,cACA,uBACA,EAGA,OACA,gBACA,cAGA,2BACA,OACA,oBACA,YACA,oBACA,oBACA,QACA,CACA,qBACA,gBA8GA,SA4IA,EA3IA,QAAY,yFAAwF,oDAAmD,0KAAuK,EAC9T,WA1SA,SACA,IACA,mBACA,SAEA,sBACA,4BACA,QACA,MAGA,6BAAwD,KAAS,CACjE,GADiE,CACjE,iBACA,aACA,QAEA,CAEA,KACA,mBAEA,CACA,SACA,CACA,QACA,EAiRA,SACA,WAndA,GACA,gCACA,aAEA,2BACA,WACA,MAEA,CACA,EA0cA,GACA,KACA,sBACA,YAAoB,IAAS,KAC7B,sBACA,sBACA,0CAEA,CACA,kBACA,wCACA,iBAEA,OACA,GACA,UAEA,IACA,aACA,cACA,wBAEA,CACA,gBACA,SACA,iDACA,kBACA,GACA,uBAEA,CACA,gBACA,gBACA,cACA,cAEA,SADA,GAEA,KAFA,EAEA,SACA,EAHA,EAGA,QACA,kCACA,SALA,EAKA,YACA,OACA,cACA,kBACA,CAAa,EACb,aACA,WACA,QAZA,EAaA,QACA,aACA,CAAa,CACb,CACA,GACA,aAEA,CASA,GARA,eACA,sBACA,cAGA,mBAGA,iBACA,sBACA,UA7jBA,GACA,yBACA,MACA,SAEA,YAAoB,UAAkB,GADtC,GAEA,YAAwB,WAAmB,GAF3C,GAE2C,CAC3C,qBAKA,OADA,aAHA,QACA,MACA,GACA,oBAPA,GAOA,oBAPA,GAOA,0BACA,eACA,QACA,CAEA,QACA,EA4iBA,IACA,kDAGA,uBACA,oCACA,kCACA,iBACA,kBAEA,IADA,+BAEA,gBAEA,EAEA,iBACA,GAEA,GADA,8BACA,kBAGA,MADA,EACA,YADA,EAEA,wBACA,WAHA,EAIA,8BACA,IACA,QANA,EAMA,aACA,SAPA,EAOA,cACA,YARA,EAQA,KACA,0CACA,CACA,SACA,sCAZA,EAYsD,WAAiB,WAAW,EAAI,EACtF,CACA,EACA,gBAfA,EAgBA,8BACA,CACA,CAlBA,EAkBA,cAlBA,EAkBA,aACA,IAnBA,EAqBA,0BACA,CAeA,GAdA,6BACA,yBACA,SACA,SACA,qCAEA,KACA,cACA,+BAEA,aACA,8BAGA,GACA,IAAgB,kBAAgB,0BAChC,GACA,cACA,YAAyB,EAAM,IAC/B,aAA0B,EAAO,IAEjC,CACA,yBACA,mBACA,iBAEA,cAGA,IACA,uBACA,MACA,CACA,SACA,CACA,OACA,eACA,UACA,aACA,cACA,MAveA,0CAueA,OACA,YACA,SACA,UACA,CACA,EA3QA,GACA,MACA,aACA,gBACA,kBACA,mBACA,kBACA,mBACA,cACA,iBACA,eACA,eACA,kBACA,oBACA,SACA,cACA,gBACA,kBACA,mBACA,oBACA,CAAa,CACb,kBACA,gBAiCA,KACA,MACA,gBAAY,oIAAwI,EACpJ,qCACA,gBACA,sBACA,uBACA,yBACA,SACA,IACA,kCAEA,+DACA,0BAEA,CACA,SACA,qEAAiF,EAAI,IACrF,CACA,YACA,CACA,GACA,yBAEA,sBAwBA,OAvBA,iBACA,KACA,KACA,wBAEA,uBACA,KACA,kBACA,wBAEA,iBAMA,OACA,sBANA,IACA,UACA,UACA,kBACA,CAAS,GAGT,UACA,QACA,aACA,EAAS,EAET,CACA,YACA,kBACA,UACA,QACA,CACA,EAvFA,GACA,cACA,gBACA,kBACA,mBACA,qBACA,aACA,mBACA,cACA,QACA,CAAa,CACb,2BACA,OACA,aACA,eACA,QACA,CACA,qBACA,OACA,eACA,8BACA,QACA,CACA,SACA,QACA,CACA,EA+SA,GACA,MACA,SACA,aACA,gBACA,cACA,kBACA,gBACA,kBACA,mBACA,qBACA,mBACA,mBACA,kBACA,aACA,cACA,iBACA,eACA,eACA,kBACA,mBACA,CAAK,EACL,MAEA,OADA,iCACA,KAIA,EADA,aACA,WAEA,CAzGA,cACA,iCACA,SAEA,uBACA,aACA,uBACA,oBACA,+BACA,qCACA,4BACA,oBACA,+BACA,oCACA,oCAGA,eACA,yDACA,oBACA,mEACA,4CACA,+BACA,2CACA,yCATA,SAYA,uBACA,2BACA,uDAGA,kBACA,uDACA,+CACA,qCALA,SAQA,qBACA,mCACA,qCACA,mCACA,SAEA,wBACA,oCACA,cAEA,yBACA,mCACA,qCACA,qCACA,qCACA,kCACA,8CACA,8CACA,cAEA,2BACA,qDACA,+CACA,sCACA,2CACA,qCACA,wCACA,sDACA,QAEA,CACA,CACA,QACA,EAkCA,MACA,IACA,iBACA,WACA,gDAIA,KA3uBA,GA6uBA,0BAA4D,EAAI,EAEhE,GADA,WACA,OACA,YAEA,GACA,KAEA,SACA,uBACA,kBACA,mBACA,mBACA,UACA,mBACA,CACA,yBACA,qBACA,GACA,kBACA,oBACA,oBACA,OAEA,OACA,MACA,SACA,aACA,gBACA,cACA,kBACA,gBACA,kBACA,mBACA,qBACA,YACA,mBACA,mBACA,kBACA,aACA,cACA,iBACA,iBACA,eACA,eACA,qBACA,cACA,eACA,oBACA,mBACA,wBACA,iBACA,EACA,uCACA,cACA,GACA,oBAEA,CACA,KAt+BA,2BAs+BA,aACA,kDACA,cACA,IACA,kBACA,gBACA,qBAEA,CAEA,CAsFA,OArFA,cACA,kBACA,kBACA,gBAEA,oBACA,sBACA,SA1iBA,WAMA,EALA,sBACA,MACA,OAEA,SAEA,IACA,wBAEA,SACA,MACA,CACA,mBACA,sBACA,IACA,IACA,KAEA,CAAS,IACT,+BACA,gBACA,KACA,GACA,CAAS,EACT,MACA,CACA,oBACA,wBACA,WACA,WAEA,OADA,gBACA,6BAEA,4BACA,EAugBA,OACA,wBACA,SACA,YACA,MACA,SACA,aACA,gBACA,kBACA,cACA,gBACA,kBACA,mBACA,qBACA,aACA,mBACA,mBACA,kBACA,aACA,cACA,iBACA,iBACA,eACA,eACA,qBACA,cACA,eACA,oBACA,mBACA,wBACA,iBACA,CAAiB,EACjB,GACA,MAEA,CACA,CAAS,IAET,oBACA,oBACA,iCA9iBA,gBACA,IACA,EADA,KAEA,IACA,UAEA,SACA,MACA,CACA,KACA,OACA,sBACA,IACA,IACA,KAEA,CAAK,IACL,+BACA,gBACA,KACA,GACA,CAAK,CACL,EAyhBA,OACA,MACA,YACA,MACA,SACA,aACA,gBACA,kBACA,cACA,gBACA,kBACA,mBACA,qBACA,aACA,mBACA,mBACA,kBACA,aACA,cACA,iBACA,iBACA,eACA,eACA,qBACA,cACA,eACA,oBACA,mBACA,wBACA,iBACA,CAAiB,EACjB,GACA,MAEA,CACA,CAAS,IAET,CACA,CAyEA,4BACA,OAAsB,uBAEtB,OADA,0BACA,gCACA,CACA,mOAKA,IACA,MAAW,CACX,WACA,kBACA,IAEA,aACA,kBACA,MAEA,oBACA,iBACA,CAAK,CACL,SACA,kBACA,IAEA,QACA,iBACA,CACA,EAWA,oBAA4C,EAC5C,WACA,IACA,sBACA,iBACA,mBACA,MAEA,cACA,OACA,WACA,IACA,gBACA,QAEA,IACA,cAEA,oBACA,mBACA,8BACA,OACA,YACA,CAAa,IAEb,CACA,CACA,8BACA,6CAaA,OAZA,8BACA,EACA,CACA,OACA,gBACA,kBACA,CAAiB,IACjB,UACA,kBAEA,CAAa,CACJ,EACT,gBAAuD,IACvD,CACA,mBACA,IACA,aACA,WACA,EAEA,WACA,OAWA,MAVA,uBACA,4BACA,2BACA,oBACA,cACA,OACA,CAAiB,CACJ,GAEb,OACA,KACA,MACA,CACA,CACA,SACA,WACA,CACA,CACA,CA/EA,0DACA,kBACA,cACA,WACA,kBAEA,mBAEA,EAAK,EAwEL,gBAIA,eACA,gBACA,iBACA,OACA,wBACA,8BACA,uBACA,cACA,+CACA,kHACA,oEACA,EACA,uBACA,6BACA,uBACA,cACA,8CACA,iHACA,mEACA,CACA,CACA,CACA,cACA,2BACA,iEACA,0CAEA,cACA,0BACA,gEACA,yCAEA,uBACA,MACA,SAEA,kCACA,EACA,gBACA,MACA,SACA,cACA,OACA,sBACA,eACA,CACA,cACA,WACA,SAGA,GACA,qBAEA,WAGA,IACA,CAIA,iBACA,OApoCA,KAooCA,UACA,CAkBA,eACA,yBA0BA,iBACA,6CACA,CACA,iBACA,8BACA,6BACA,gBACA,sCACA,aACA,CACA,eACA,qCACA,CA5HA,YAAkB,GAAG,+BACrB,6BA4HA,UACA,cACA,UACA,4BACA,uBACA,CACA,SACA,MACA,yDACA,CACA,OACA,6BACA,CACA,aAGA,SAFA,YACA,eAGA,EADA,WACA,UAGA,EACA,yBACA,yBACA,EACA,CACA,YACA,mCACA,CACA,QACA,4BACA,wBACA,SACA,CACA,aACA,gBACA,CACA,CACA,eACA,QACA,WAIA,MAHA,gIACA,sBACA,yBACA,CACA,CAeA,eACA,4BACA,KAEA,gBAXA,YACA,sBACA,MACA,SACA,MAXA,YACA,IACA,EADA,IAEA,cACA,IACA,QACA,EAKA,GACA,oBACA,EAKA,GACA,CAEA,YACA,2CACA,mBACA,mCACA,iDACA,mBACA,uBACA,uBACA,EACA,CAAC,OAAiB,EAClB,QACA,2BACA,6BACA,2CACA,uBACA,uCACA,qBACA,6BACA,2CACA,uCACA,uCACA,oBACA,kBACA,oBACA,4CACA,8BACA,8CACA,sCACA,EACA,CAAC,OAAyB,EAC1B,QACA,yBACA,6BACA,qBACA,iCACA,2BACA,qBACA,mBACA,+BACA,+CACA,2BACA,kCACA,EACA,CAAC,OAAyB,EAC1B,QACA,qBACA,iBACA,qBACA,EACA,CAAC,OAAoB,EACrB,QACA,kBACA,qBACA,uBACA,EACA,CAAC,OAAqB,CAKtB,UACA,cACA,cACA,eACA,cACA,CACA,OACA,kBACA,8CAEA,gBACA,YAA4B,IAAkB,IAC9C,gCAEA,QACA,CACA,WACA,OACA,QACA,cACA,SACA,EAEA,GADA,SACA,mBAzBA,SAyBA,mBACA,kCACA,SACA,kCACA,8BACA,GACA,cAEA,MACA,kBAlCA,SAmCA,eACA,6BACA,kCACA,aACA,0BACA,8BACA,GACA,UAEA,MAEA,WACA,uBAEA,iBACA,WAEA,gBACA,cAEA,aACA,CACA,cACA,YACA,aAGA,YAUA,uBACA,OACA,2BAGA,uBAdA,iBACA,UACA,wBAGA,gBAYA,QACA,cAEA,cACA,CACA,CACA,iBAAqC,EAAG,GAAG,EAAS,QACpD,GACA,cACA,eACA,eACA,cACA,mBACA,gBACA,mBACA,iBACA,sBACA,sBACA,wBACA,0BACA,gCACA,WACA,EACA,eACA,4BACA,OAEA,SACA,UACA,SACA,MACA,QACA,EA56CA,GA66CA,aAEA,EADA,sBACA,qBAEA,QACA,EACA,MACA,yBACA,OAEA,uBACA,yBACA,gCACA,OACA,kBACA,oBAEA,YACA,aACA,mBACA,2BACA,iCACA,6BACA,qCACA,iCACA,qCACA,uCACA,2CACA,aACA,qBACA,uCACA,uCACA,qCACA,2BACA,6BACA,mCACA,mCACA,+BACA,+BACA,gBACA,mBACA,gCAEA,mBACA,2CAEA,OACA,0DAEA,CAAqB,CACrB,qBACA,qCACA,4CACA,CAAqB,CACrB,yBACA,6CACA,CAAqB,CACJ,EACjB,IACA,QACA,WACA,SACA,MACA,CAAqB,EACrB,YAEA,EACA,6BACA,uDAEA,2BACA,kCACA,kCAGA,KAEA,2BACA,uBACA,+BAGA,oBACA,KAGA,uBANA,KASA,WACA,gBACA,WACA,MACA,4CACA,YACA,iBACA,KAEA,CACA,OACA,aACA,SACA,QAEA,GADA,aACA,GACA,4CAEA,QADA,WAEA,SACA,WACA,IACA,KACA,CACA,CACA,cACA,iBACA,wBACA,6BACA,mBACA,KAEA,QADA,qBACA,CACA,IACA,KACA,CACA,CACA,CACA,CACA,CACA,CACA,OACA,aACA,2BAEA,KACA,CACA,aACA,sBACA,UACA,CACA,OACA,iBACA,SACA,6BACA,cACA,CAAiB,EACjB,wBACA,iCACA,2BACA,QACA,eAA4B,GAAa,EACzC,6BACA,kCACA,oCACA,0BACA,6BACA,8BACA,qBAGA,CACA,OACA,6BACA,YACA,CACA,CAAiB,EACjB,wBACA,iCACA,qBACA,MACA,EACA,iBACA,qBACA,kBACA,iBAGA,cACA,mBACA,gBACA,sBACA,sBACA,wBACA,iBACA,mBACA,EACA,6BAIA,EAHA,8BAIA,IACA,8CACA,CACA,SACA,WAEA,eACA,qBACA,2BACA,yEACA,gBACA,iBACA,6HACA,gBACA,mBACA,uBACA,EACA,cACyB,EAEzB,KACA,CACA,kBACA,eACA,kBACA,2BACA,gBACA,YACA,YACA,YACA,UACA,uCACA,UACA,MACA,CAAyB,EAEzB,MACA,SAFA,qGAGA,UACA,QACA,6BACyB,CACzB,CACA,4EACA,eACA,OAEA,iDACA,yBACA,WACA,0BACA,qBAIA,OAHA,UAKA,CAeA,GAdA,IACA,GACA,cACA,aAA0C,CAC1C,YAAyC,CACzC,mBAAgD,EAEhD,yBAEA,YACA,qBACA,6CACA,6CAEA,mBACA,0EACA,cACA,8BAIA,aAHA,YACA,mCAEA,sBACA,kCACA,gCACA,kCACA,mCACA,OACA,iBAGA,qBAIA,4BAGA,iCACA,kCACA,mBAGA,CAEA,KACA,CACA,gBACA,2EACA,OAEA,kDACA,2BACA,2BACA,eACA,iCACA,4BACA,yEACA,mBA9lBA,SA+lBA,QA/lBA,MA+lBA,KAGA,sBACA,oBACA,wBAEA,qCACA,SAlmBA,OACA,SACA,SAEA,uBACA,WAGA,gBACA,4CAGA,cAGA,kBACA,EAklBA,wBACA,sBACA,uBACA,oBAGA,mBACA,WACA,KACA,yCAEA,MACA,CAA6B,GAE7B,wBACA,CAAqB,CAGrB,EACA,EACA,qBACA,sDAEA,8CAEA,2BACA,qBACA,OAEA,qBACA,WACA,2BACA,yBAEA,WACA,8CAEA,MAEA,qBACA,yBAEA,qEACA,yCACA,OACA,oCACA,sCACA,iBACA,CAAqB,GAGrB,CACA,CACA,QACA,CACA,aACA,aACA,gBACA,kBACA,cACA,gBACA,kBACA,mBACA,qBACA,mBACA,mBACA,kBACA,aACA,cACA,kBACA,eACA,eACA,iBACA,iBACA,MACA,SACA,gBACA,oBACA,mBACA,gBACA,uBACA,aACA,aACS,CACT,CACA,SACA,eACA,2BACA,CACA,WACA,eACA,8BACA,WACA,CACA,WACA,kBACA,CACA,OACA,eACA,yBACA,CACA,SACA,eACA,4BACA,WACA,CACA,QACA,8BACA,0BACA,CACA,CACA,iBACA,YACA,gCACA,CACA,0BACA,cAEA,SAEA,SACA,eAAY,GAAa,EACzB,MACA,SAEA,uBACA,uBAGA,QACA,EAZA,MACA,CAYA,wBACA,YAEA,SAEA,OACA,eAAY,GAAa,QACzB,QAGA,UAGA,OACA,EAXA,IACA,CAmBA,UACA,EAGA,SACA,IACA,cACA,CACA,SACA,gBACA,WACA,CAEA,QACA,CACA,CAAK,CAbL,EAiBA,MACA,SAAS,GAAc,GACvB,IACA,QAFuB,YAEvB,GACA,uBACA,YACA,iBAGA,6BACA,iBAGA,SACA,CACA,mBAEA,iBACA,QACA,aACA,WACA,UACA,+BACA,4BACA,wIACA,GACA,WACA,cAEA,mBACA,oCAGA,6BACA,CAAK,GASL,OARA,aACA,cACA,qBACA,iBACA,yBACA,aACA,UACA,CAAK,EACL,CACA,CA8IA,sBAA8B,2EAA8E,EAwB5G,mBAvBA,aACA,MAAuB,GAAc,GACrC,OACA,KAFqC,EAErC,QACA,OAEA,iBACA,yBACA,wBACA,GACA,KACA,SACA,QACa,CACb,MAEA,GACA,KACA,eACA,cACa,CAEb,CAAK,kBACL,EACA,CAkBA,iBACA,sBAAkC,IAGlC,OAFA,GACA,uBACA,CACA,CACA,qCACA,eAoGA,mBAEA,EAoBA,OApBA,EADA,GAEA,uBAmBA,EAlBA,uCACA,oBACA,sCACA,uBAeA,EAdA,uCACA,wBACA,yCAGA,UADA,MADA,KAWA,EAXA,qBACA,QAUA,MAPA,kBAGA,UAFA,wCACA,QAKA,IAFA,CAGA,CACA,mBACA,eACA,GAEA,YACA,uBAEA,aACA,CACA,UACA,IACA,GARA,EASA,CA+IA,oBAAyC,sBAA4B,IACrE,UACA,WAEA,EADA,yBACA,WAEA,gBACA,+BACA,uDACA,uGACA,+BACA,iFACA,cACA,UACA,QACA,GACA,GAGA,8CACA,4BACA,wBACA,MACA,MACA,uDACA,CAAS,CACT,OACA,MACA,yDACA,oBACA,IACA,uBACA,CACA,SACA,CAEA,QACA,CACA,CAAK,EACL,QACA,8CACA,4BACA,wBACA,UACA,UACS,CACT,CAAK,GA7BL,KACA,CA6BA,CA8PA,kBAAoC,EACpC,wBACA,MACA,WACA,GAEA,SAvFA,KACA,IAAY,kNAAsM,CAClN,uBACA,YACA,iBAEA,OACA,EACA,uBACA,aACA,kBAEA,OACA,EACA,8BACA,oBACA,yBAEA,OACA,EACA,oBACA,UACA,eAEA,OACA,EACA,4BACA,kBACA,uBAEA,OACA,EACA,mBACA,SACA,cAEA,OACA,EACA,8BACA,mBACA,wBAEA,OACA,EACA,4BACA,kBACA,uBAEA,OACA,EACA,8BACA,oBACA,yBAEA,OACA,EACA,4BACA,kBACA,uBAEA,OACA,EACA,kBACA,QACA,aAEA,OACA,EACA,uBACA,aACA,kBAEA,OACA,EACA,2BACA,iBACA,sBAEA,OACA,CACA,EAOA,KACA,kBACA,EA3wBA,UAA4B,wCAAqC,MAUjE,EATA,oBACA,WACA,EAEA,kDACA,uCACA,oBACA,IACA,KAEA,YACA,mBACA,YACA,gBACA,IACS,GACT,KACA,MACA,CAAK,KACL,eACA,MAAuB,GAAc,GACrC,SAAgB,GADqB,OACrB,GAAmB,MACnC,oBACA,EACA,GACA,SAEA,QACA,IACA,IACA,cACA,iBACA,CAAS,EACT,wDACA,QACA,wBACA,aACA,aACA,CAAK,KACL,WACA,CAAK,GACL,GACA,oBACA,oBACA,eACA,CACA,eACA,iBACA,CAAK,CACL,EAytBA,GACA,EAztBA,6BAAwC,2EAAwF,EAChI,2BACA,WACA,EAEA,+BACA,4BACA,GACA,mBACA,KACA,OACA,KACA,IACA,MAA2B,GAAc,GACzC,kBACA,OAEA,WACA,IACA,sBACA,sBACA,YACA,WACA,KACA,aACA,WACA,KACA,WACA,SAGA,aACA,qBACA,eAEA,oBACA,eAGA,YAEA,OACA,YAEA,WACA,IACA,wBACA,cACA,uBACA,eACA,UAGA,mBACA,IACA,QAEA,kCACA,MACA,OAEA,iBACA,SAAoB,aAAmB,EACvC,qBAAgE,wBAAmE,wBAA6B,EAAa,EAC7K,EAsBA,OApBA,gBACA,mCACA,0BACA,WACA,YACA,YACA,OACA,uBACA,cACA,kBACA,gBACA,+BACA,KACA,oBACA,iBACA,MACA,CAEA,iBACA,CAAK,EACL,QACA,iBACA,CAAK,CACL,EAgoBA,GACA,QACA,EAvmBA,2BAAsC,EAAkB,MAAI,EAAK,EACjE,SACA,KAaA,mBAZA,cACA,WACA,OACA,iBACA,GACA,gBACA,gBACA,CAAa,EACb,IACA,IAEA,CAAK,QACL,EACA,EAulBA,GACA,KACA,CAAK,EACL,EAjlBA,kBAA6B,4OAAqO,EAClQ,cACA,MAAqB,GAAc,GACnC,YADmC,CACnC,CACA,mBAGA,GAFA,cACA,oBACA,IACA,IACA,iBACA,eACA,OAEA,QACA,4BACA,gBACA,OAEA,YACA,YACA,KACA,MACA,mBACA,UACA,MACA,CAAS,EACT,kBACA,+BACA,cAEA,MACA,WACA,UACA,QACA,aACA,CAAS,EACT,YAA8E,mCAAgC,KAC9G,aACA,mBACA,EACA,8CAA+D,EAAK,KACpE,YACA,UACA,UACA,WACA,UACA,gBACA,aACA,CAAqB,EACrB,YACA,OACA,aACA,gBACA,CAAqB,IACrB,CACA,CAAa,CAEb,CACA,gBACA,gBACA,OACA,iBACA,2BACA,YACA,iBACA,oCAAmE,QAAQ,EAAI,EAC/E,CACA,CAEA,OADA,gDACA,sBACA,gBACA,MACA,WACA,iBACA,EAEA,8EACA,GACA,uCACA,yCACA,wCACA,0CACA,gDACA,2CACA,CAWA,OAVA,UACA,iCACA,MACA,OACA,YACA,YACA,CAAiB,CACjB,CACA,CAAS,SAET,QACA,iBACA,CAAK,CACL,EA+eA,GACA,WAxNA,oBAAwC,2EAAwF,EAChI,sBACA,MAAuB,GAAc,GACrC,OACA,eACA,OAEA,gBAAgB,mCAA2C,EAC3D,GACA,OACA,cACA,cACA,SACA,QACA,cACA,CAAS,CACT,CAAK,iBACL,GACA,kBACA,mBACA,oBACA,0BACA,wBACA,CACA,eACA,iBACA,CAAK,CACL,EA6LA,GACA,WA3cA,kBAAkC,+BAA6C,MAAI,EAAK,MAmCxF,EAkBA,EApDA,gDACA,WACA,EAEA,2CACA,kDACA,mBACA,WACA,IAAoB,aAAc,sBAQlC,MAPA,wBACA,GACA,KACA,UACA,YAA6B,UAAa,EACzB,EAEjB,YACA,CAAS,CACT,CAAK,EACL,2CACA,kDACA,mBACA,SACA,IAAoB,aAAc,sBAQlC,MAPA,wBACA,GACA,KACA,UACA,gBAAgC,EAAO,EACtB,EAEjB,YACA,CAAS,CACT,CAAK,EAEL,oCACA,oCACA,+CACA,mBACA,SACA,IAAwB,aAAc,sBAQtC,MAPA,wBACA,GACA,KACA,UACA,SACA,CAAqB,EAErB,YACA,CAAa,CACb,CAAS,GAGT,wCACA,wCACA,mDACA,mBACA,SACA,IAAwB,aAAc,sBAQtC,MAPA,wBACA,GACA,KACA,UACA,aACA,CAAqB,EAErB,YACA,CAAa,CACb,CAAS,GAET,SACA,sBACA,qCAGA,oBACA,gCAEA,wBACA,wCAEA,uBACA,uCAGA,SA6CA,OA5CA,oCACA,MACA,kCACA,mCAEA,kDACA,mBACA,WACA,IAAwB,aAAc,uCAgBtC,MAfA,wBACA,GACA,KACA,UACA,MACA,CACA,OACA,UACA,MACA,KACA,CAC6B,CAE7B,CAAqB,EAErB,YACA,CAAa,CACb,CAAS,EACT,kDACA,mBACA,SACA,IAAwB,aAAc,uCAUtC,MATA,wBACA,GACA,KACA,UACA,SACA,CAA8B,mBAAuD,CACrF,CACqB,EAErB,YACA,CAAa,CACb,CAAS,CACT,CAAK,EACL,QACA,uCACA,uCACA,yCACA,6CACA,oCACA,uCACA,uCACS,CACT,CAAK,CACL,EA8TA,GAA2D,MAAoB,EAC/E,cACA,WA/QA,oBAAwC,qDAAqE,MAAI,EAAK,EACtH,iDACA,0DACA,mBACA,MACA,aACA,YACA,0BAEA,OAAoB,aAAc,kFAalC,MAZA,wBACA,GACA,KACA,UACA,KACA,WACA,QACA,UACA,CAAqB,CACrB,sBACA,CAAiB,EAEjB,YACA,CAAS,CACT,CAAK,EACL,qDAsBA,OArBA,4DACA,mBACA,MACA,SACA,YACA,sBAEA,OAAoB,aAAc,kFAWlC,MAVA,wBACA,GACA,KACA,UACA,QACA,UACA,CAAqB,CACrB,sBACA,CAAiB,EAEjB,YACA,CAAS,CACT,CAAK,EACL,QACA,8CACA,gDACA,CAAK,CACL,EA4NA,GACA,KACA,CAAK,EACL,iBAlMA,iBAA4B,QAAa,EACzC,oBACA,MACA,WACA,EAEA,SACA,cACA,aACA,2BACA,mBASA,OARA,SACA,SACA,0BACA,cACA,8BACA,EACA,6CACA,CAAS,EACT,CACA,EACA,mCACA,mBAQA,OAPA,mBACA,eACA,IACA,KACA,YAEA,CAAa,KACb,iBACA,CACA,CAAK,EAKL,OAJA,YACA,YACA,CAAK,EACL,UACA,QACA,iBACA,CAAK,CACL,EA2JA,GACA,KACA,EACA,EA7JA,YACA,QAAY,yEAAwE,EACpF,KACA,UACA,uBACA,yCACA,OACA,oBACA,SACA,kBACA,YAAwB,IAAW,KAEnC,mBAAoB,4CAAuD,EAD3E,cAEA,gBACA,gBAGA,QACA,iBACA,cACA,eACA,WACA,CAAa,CACb,CACA,GAAsB,SAAQ,CAC9B,CAAK,EAEL,OADA,IACA,uBACA,EAiIA,GACA,WAjIA,KAAqC,oBAAuB,EAC5D,2BACA,oBAIA,yCACA,uBACA,IACA,GACA,QACA,MACA,CAAqB,CACJ,CACjB,CACA,SACA,CACA,4BACA,CACA,CAAK,EAhBL,KACA,CAiBA,EA4GA,GACA,KACA,uBACA,2CAEA,eACA,yBACA,eACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,iBACA,CAAK,CACL,CACA,eACA,0BAEA,eACA,6BACA,qBACA,oCACA,mCACA,CAEA,SACA,eACA,oBACA,uCACA,sCACA,CACA,eACA,oCACA,gCACA,WAMA,OALA,IACA,sBACA,WACA,YAEA,CACA,CACA,YACA,iCACA,6BACA,oCACA,CACA,mBACA,0CACA,mBACA,EACA,UAEA,EAEA,CACA,kBACA,iCACA,wCACA,CACA,SACA,OACA,uCACA,uCACA,MACA,CACA,qCACA,oCACA,CACA,sBACA,wCAKA,OAJA,IACA,UACA,qCAEA,CACA,CACA,sBACA,wCAKA,OAJA,IACA,UACA,qCAEA,CACA,CACA,CAEA,SACA,cACA,wCACA,2CACA,CACA,YACA,CACA,kBACA,CACA,eACA,CACA,CACA,SACA,eACA,yBACA,sCACA,wCACA,4CACA,6BACA,+BACA,2CACA,yDACA,iIACA,qBACA,+BACA,gEAEA,CACA,aACA,uBACA,iBACA,gDACA,CACA,mBACA,mBACA,CACA,kBACA,MACA,iBACA,MACA,CACA,8BACA,YACA,MACA,CAAiB,CACjB,CACA,WACA,SACA,cACA,iBACA,CAAS,EACT,yDACA,mBACA,sCACA,+CACA,kHACA,CACA,iBAEA,aADA,EACA,WACA,0BAGA,CADA,SADA,OAIA,8CACA,MACA,OACA,qDACA,GACA,qCACA,CACA,+BACA,MACA,eACA,sBACA,sCACA,2CACA,oCACA,qBAGA,OAFA,yCACA,sCACA,CACA,sBACA,4BACA,MACA,mBACA,MACA,CACA,8BACA,YACA,iBAC6B,CAC7B,CACA,WACA,SACA,cACA,iBACA,CAAqB,CAErB,CACA,aACA,aACA,yBACA,KAEA,gBACA,QAEA,gBAEA,OADA,0EACA,CAEA,6BACA,sBACA,iBAoBA,OAnBA,wBACA,qBACA,WACA,SACA,aACA,EACA,+BACA,4CACA,oCACA,CAAyB,EACzB,2BACA,sCACA,CAAyB,EACzB,8BACA,2BACA,CAAyB,EACzB,yBACA,2BACA,CAAyB,EACzB,CAEA,cACA,kBACA,kBAIA,OAHA,6BACA,2BACA,CAAyB,EACzB,CAEA,wBACA,QAEA,0BACA,yBACA,eACA,uBACA,cAEA,OADA,iCACA,CAEA,wBACA,yBAGA,OAFA,iCACA,2CACA,CAEA,cACA,QAEA,mBAIA,OAHA,0BACA,oCACA,CAAyB,EACzB,CAEA,2BAMA,OALA,iCACA,4CACA,oDACA,qCACA,CAAyB,EACzB,CAEA,CAEA,CACA,QACA,CACA,iBACA,eACA,+CAEA,oBACA,sBAGA,sBAGA,QACA,CACA,kBACA,uDACA,CACA,uBACA,4DACA,CACA,qBACA,qCACA,kBACA,yBACA,yBACA,CAAa,CAEb,CACA,uBACA,+BACA,aACA,kBACA,yBACA,2BACA,CAAa,CAEb,CACA,CAEA,SACA,OACA,CACA,gBACA,CACA,sBACA,CACA,QACA,CACA,CACA,SACA,eACA,4BACA,wBACA,6BACA,yBACA,mCACA,qBACA,WACA,CACA,OACA,aACA,wCACA,CACA,mBACA,WAEA,uBADA,OAGA,uBACA,uCAA4E,sBAAyB,0EAA+E,KACpL,8CACA,2DAAmF,sBAAyB,gDAA+D,IAC3K,gBACA,sBACA,+BACA,sGACA,8BACA,mBACA,uDACa,IACb,CAAS,GACT,CACA,uBACA,oCAEA,iEACA,CACA,uBACA,WACA,oEACA,mBACA,qBAGA,OAFA,2BACA,mCACA,CACA,CACA,CAAS,EACT,CACA,QACA,iCACA,IACA,GACA,CACA,SACA,CACA,CAAS,EACT,wBACA,2BACA,CACA,CA+CA,QAHA,sEAEA,yDACA,KAAgB,aAAkB,KAClC,yBAJA,IAMA,eACA,0CACA,QAAgB,IAAS,KACzB,eACA,6BACA,gCACA,iBAQA,OANA,OACA,gCAEA,QACA,mCAEA,CACA,EAEA,eAYA,aACA,OACA,+BACA,OAEA,MAhBA,cACA,gBAQA,OAPA,IACA,UACA,aAEA,UACA,YAEA,QACA,EAMA,EADA,oBAEA,eAKA,OAJA,SACA,WACA,WAEA,CACA,EA2EA,YACA,eA3EA,kBACA,sBACA,0BAEA,kBAGA,8BACA,2BACA,yBACA,0BACA,yBACA,0BACA,yBACA,wBACA,+BAEA,OACA,QAFA,mBAGA,8BAGA,4BAGA,OACA,QAHA,mBAIA,OAHA,KAIA,OAEA,yBAEA,OACA,QAFA,mBAGA,MACA,gBACA,aACA,aACA,OAGA,kCACA,yBACA,CAAgB,OAAM,EACtB,OACA,UACA,KACA,CACA,MACA,kCAGA,OACA,QAHA,mBAIA,IAHA,aAIA,OAEA,0BAEA,OACA,QAFA,mBAGA,4CAGA,+BAGA,OACA,QAHA,mBAIA,MAHA,SAIA,EAEA,SACA,EAEA,QAEA,UAeA,EAdA,CACA,kBACA,cACA,mBACA,eACA,oBACA,cACA,6BACA,eACA,uBACA,yBACA,4BACA,CACA,mCACA,2BAkDA,uBACA,SACA,IACA,gEACA,wBACA,uBACA,MARA,uBAQA,EARA,QAQA,EAGA,GAFA,oBACA,mBACA,GACA,gCACA,gCACA,UACA,0BACA,4BAEA,MAEA,cACA,wBACA,CAA6B,EAG7B,CACA,6BACA,CACA,CAAS,EACT,SACA,CACA,SACA,uEACA,CACA,WACA,iBACA,CACA,CAEA,6BACA,SAEA,aADA,8BAEA,KACA,gBACA,SACA,qBACA,sBACA,aAGA,IACA,2BACA,SAEA,yBACA,sBACA,sBAEA,GADA,aACA,yBACA,2BACA,wBACA,GACA,OACA,WACA,MACA,EACA,gBACA,CACA,QACA,CACA,CAAa,EACb,SACA,CACA,SACA,cACA,OACA,eACA,OACA,WACA,SACA,SACA,CAAqB,CACrB,CAAiB,CACJ,EACb,SACA,CAEA,QACA,CA0CA,OARA,gBACA,MACA,uBATA,EACA,EAEA,EAQA,kBADA,MATA,GADA,EAfA,cACA,cACA,MAEA,QADA,2BACA,eAAiD,IAAO,IACxD,qBAEA,gEACA,CACA,QACA,EAeA,EAXA,SAWA,OATA,mBAEA,YADA,kBACA,EAAkC,8BAAgC,EAClE,wBAOA,EACA,CACA,EAEA,wyNAEA,UACA,QACA,CACA,SACA,CACA,WACA,CACA,OACA,CACA,SACA,CACA,CACA,SACA,QACA,oCACA,0CACA,CACA,SACA,cACA,CACA,WACA,cACA,CACA,OACA,cACA,CACA,SACA,cACA,CACA,eACA,oCACA,gBAA2B,0BAC3B,eACA,eACA,6BAGA,CAFA,yBACA,mDACA,2BACA,kDACA,oCACA,sCAEA,0CACA,EACA,aAAgB,8FAAmG,CACnH,8BACA,qBACA,cACA,yCACA,uBACA,sCACA,gBACA,CAAa,CACb,CACA,uCAwCA,EAvCA,qBACA,UACA,QACA,iBACA,OAAoB,GAAK,OAEzB,GADA,YACA,qBACA,OACA,WAAoB,2BAA8B,OAClD,iBACA,KACA,cACA,UACA,CACA,qBACA,eACqB,CACrB,CACA,qBACA,MACA,CACA,sBACA,MACA,CACA,eACA,OAAiD,+BAAgC,EACjF,MACA,CAAqC,CAErC,CAA6B,CAC7B,EACA,EACA,CACqB,CACrB,CACa,CACb,EACA,YACA,IAEA,OACA,SAMA,OALA,kDACA,gBACA,SAEA,CAAa,EACb,CACA,EACA,MACA,MACA,OACA,2BACA,MACA,CACA,IACA,IACA,gBAhcA,iBAgcA,KAhcA,EAgcA,OAhcA,EAgcA,OAhcA,EAgcA,YACA,MACA,2BACA,YACA,OAEA,GADA,YACA,0CACA,gCACA,sGACA,2BAEA,CACA,iCACA,eACA,KACA,SACA,cACA,gBACA,gCACiB,KACjB,CAAa,CAldb,kCACA,cAAoC,IAAM,aAA+B,SAAY,MACrF,cAAmC,IAAM,cAAmC,SAAY,MACxF,kBAJA,EAIgC,mBAJJ,CAA5B,EAIgC,mBAJJ,sBAA+D,MAAiB,EAI5E,UAChC,8BACA,CAAK,IA8cL,0BACA,EACA,2BACA,yBACA,IACA,uBACA,CACA,CACA,oCACA,4BACA,yCACA,qBACA,WAnUA,WACA,SAEA,aADA,iEAEA,IACA,8DACA,SAEA,4DACA,sBAWA,OAVA,0BACA,gBACA,wBACA,eACA,cACA,WACA,MACA,CAA6B,CAC7B,CAAyB,IAEzB,eACA,CACA,CAAa,EACb,SACA,CACA,SACA,iDACA,OACA,eACA,cACA,WACA,SACA,SACA,CAAqB,CACrB,CAAiB,CACJ,EACb,SACA,CAEA,WACA,iBACA,CACA,EAyRA,yCACA,EA7LA,sBACA,SAKA,OAJA,sEACA,mCACA,wEAEA,KACA,iBACA,CACA,EAoLA,oDACA,0BACA,IACA,IACA,GACA,CACA,CACA,oCACA,6DACA,CACA,uBACA,UACA,0BACA,wBACA,EACA,wBACA,CACA,8BACA,4CACA,2BACA,uCACA,CAAS,EACT,6DACA,CACA,mCACA,4BACA,OAEA,yCACA,cACA,OACA,eA7gBA,eACA,SACA,0EACA,YACA,4DACA,8CAA6D,WAAc,IAC3E,uEACA,kBAEA,QACA,GAogBA,aAGA,MAAgB,GAAO,KACvB,oBAA0B,oBAA4B,EACtD,qCACA,CACA,CAEA,SACA,eACA,qCACA,wBACA,6BACA,+CAEA,uBACA,2BACA,iBACA,QACA,WACA,SACA,YACA,CACA,QACA,aACA,WACqB,CACrB,CACa,EACb,wBACA,CACA,oBACA,kCAEA,gCACA,qCACA,CACA,sBACA,gBACA,OACA,OACA,KACA,aAEA,KACA,gBACA,MACA,wBAWA,6BAVA,0BACA,QACA,UACA,2CACA,WACA,OACA,EAAqB,CACrB,CAAiB,GAIjB,kBACA,CACA,YACA,aACA,2BACA,CACA,QACA,yBACA,oCACA,CACA,gCACA,CACA,CAEA,SACA,cACA,yBACA,aACA,wBACA,CACA,oBACA,2BACA,aACA,WACA,wBACA,CAAS,CACT,CACA,mBACA,0BACA,sCACA,CACA,SACA,yDACA,CACA,QACA,wBACA,CACA,UACA,YACA,CACA,CAEA,eACA,qCAAyC,KAAQ,eAA2B,CAC5E,CAIA,UACA,GA9yHA,OA+yHA,gBAA4B,MAkE5B,EAjEA,SAAY,qaAAmd,oBAAqB,kHACpf,cACA,uKAAmM,EAr3DnM,EAs3DA,EACA,UACA,uBAEA,KACA,MACA,IACA,wBACA,MAEA,CACA,SACA,IACA,CAEA,SACA,wCAEA,mCACA,gBAEA,WACA,aACA,CACA,SACA,QACA,oBACA,SACA,SACA,UACA,SACA,UACA,OACA,QACA,QACA,OACA,QACA,YACA,UACA,SACA,WACA,EACA,WACA,EACA,GACA,oBACA,CACA,UACA,WACA,eACA,kBACA,kBACA,kBACA,qBACA,wBACA,6BACA,8BACA,EACA,GAEA,IACA,SAtpFA,UACA,+CACA,8CACA,SAEA,uDACA,kDACA,SAEA,yBACA,kCACA,WACA,aACA,0CAEA,GACA,YACA,eAEc,mBACd,QACA,EAEA,IAioFA,QACA,MACA,mBACA,kBACA,wBAOA,OAJA,GACA,IACA,SAEA,CACA,EACA,UACA,MAOA,GANA,oDACA,0BACA,mCACA,8BACA,4BAEA,EACA,wBAEA,MACA,OACA,aACA,WACA,8BACA,YACA,EACA,gCACA,CACA,4BACA,IACA,SAEA,oCACA,gCACA,sBACA,MAEA,KACA,cACA,KACA,0BACA,QACA,KAEA,CACA,EACA,UACA,MACA,4BACA,oBAAkC,mBAAoC,GACtE,CAAS,EACT,EACA,WACA,4BACA,oBAA8B,iBAAkC,GAChE,CAAK,GACL,WACA,4BACA,oBAA8B,yBAA0C,GACxE,CAAK,GAKL,UACA,aACA,oBANA,SACA,4BACA,oBAA8B,4BAA6C,GAC3E,CAAK,EAIL,CAAK,EACL,uEACA,OACA,QACA,UACA,aACA,oBACA,2BACA,aACA,CAAS,EACT,mBACA,aACA,aACA,cACA,kDACA,4DACa,EAEb,aACA,EACA,qEACA,OACA,QACA,eACA,aACA,WACA,aACA,gBACA,kBACA,UACA,kBACA,gBACA,CAAa,EACb,uDACA,6BACA,OACA,QACA,aACA,WACA,eACA,aACA,aACA,gBACA,kBACA,cACA,gBACA,kBACA,mBACA,qBACA,mBACA,mBACA,iBACA,kBACA,aACA,cACA,eACA,eACA,WACA,iBACA,gBACA,oBACA,gBACA,kBACA,sBACA,CAAa,CACb,SACA,CAAS,EACT,WACA,MACA,aACA,MACA,0BACA,WACA,WACA,CAAa,CACJ,KACT,UACA,UACA,wBACA,MA/jGA,cACA,WAAY,oeAA6gB,MAuCzhB,aACA,MACA,SACA,aACA,gBACA,kBACA,cACA,gBACA,kBACA,mBACA,qBACA,aACA,mBACA,iBAnDA,OACA,CACA,SACA,QACA,oBACA,SACA,SACA,UACA,SACA,UACA,OACA,QACA,QACA,OACA,QACA,YACA,SACA,EACA,OACA,GACA,EAgCA,kBACA,aACA,cACA,eAlCA,kBAEA,CACA,UACA,WACA,eACA,kBACA,+BACA,kBACA,kBACA,qBACA,sBACA,uBACA,EACA,OACA,GACA,EAmBA,iBACA,eACA,eACA,qBACA,cACA,eACA,oBACA,mBACA,wBACA,kBACA,oBACA,CAAK,CACL,EAy/FA,UACA,UACA,aACA,gBACA,kBACA,cACA,gBACA,kBACA,mBACA,qBACA,mBACA,gBACA,kBACA,cACA,aACA,UACA,iBACA,eACA,eACA,gBACA,UACA,eAEA,UACA,sBAEA,OACA,uCAEA,CAAa,CACb,qBACA,oBACA,yBACA,CAAa,CACb,yBACA,wBACA,CAAa,CACb,iBACA,CAAS,EACT,MACA,uDAEA,MACA,qBACA,MACA,OACA,wBACA,CAAa,CACJ,KACT,0BACA,mEACA,kEACA,EACA,IACA,SACA,MACA,MACA,eACA,aACA,aACA,yBACA,4BACA,MACA,SACA,WACA,CACA,CAAiB,GACjB,4BACA,4BACA,oBAA0C,2BAA4C,GACtF,CAAiB,GACjB,WACA,0BACA,4BACA,oBAA0C,yBAA0C,GACpF,CAAiB,GACjB,iBACA,4BACA,oBAA0C,gBAAiC,GAC3E,CAAiB,GACjB,4BACA,4BACA,oBAA0C,2BAA4C,GACtF,CAAiB,GACjB,0BACA,4BACA,oBAA0C,yBAA0C,GACpF,CAAiB,GACjB,4BACA,4BACA,oBAA0C,2BAA4C,GACtF,CAAiB,GACjB,mBACA,gBACA,4BACA,oBAA0C,eAAgC,GAC1E,CAAiB,GACjB,gBACA,MACA,4BACA,oBAA8C,oBAAqC,GACnF,CAAqB,EACrB,CAAiB,CACjB,oBACA,MACA,4BACA,oBAA8C,wBAAyC,GACvF,CAAqB,EACrB,CAAiB,CACjB,aACA,cACA,iBACA,cACA,gBACA,kBACA,mBACA,qBACA,mBACA,mBACA,WACA,eACA,eACA,uBACA,eACA,MACA,kBACA,cACA,aACA,kBACA,gBACA,kBACA,iBACA,iBACA,UACA,gBACA,oBACA,oBACA,uBACA,gBACA,sBACA,yFACA,oBACA,kBACA,kBACA,eACA,MACA,cACA,SACA,CAAyB,CACJ,EACrB,EAAiB,MACjB,CAAa,GACb,EACA,sBACA,IACA,4BACA,CACA,SACA,eACA,CACA,CAAS,EACT,WACA,IACA,oBACA,KACA,EAuBA,MAtBA,qCACA,iCACA,KAGA,kCACA,MACA,yBACA,OAA4B,CACX,GACjB,wBACA,GACA,CAAa,GACb,sBACA,MACA,aACA,OAA4B,CACX,GACjB,YACA,GACA,CAAa,WAEb,KACA,kBACA,YACA,MAxwEA,QA0wEA,CACA,CACA,SACA,eACA,CACA,CA2BA,eAEA,OADA,cACA,OACA,CAaA,iBACA,oCAIA,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YACA,QA2MA,kBAEA,aACA,MACA,EAIA,6EAKA,qBAGA,yBACA,4BAEA,CAGA,qBACA,+BACA,cACA,CAAK,CACL,CAGA,cACA,yCACA,CAGA,eACA,SAEA,OAiBA,aAfA,yBACA,sCACA,wFAEA,kCACA,kFAIA,8BACA,SAEA,CAAK,EAGL,IACA,8BAEA,OACA,6BACA,yBAEA,CAGA,qBACA,2BAEA,CAGA,wBACA,mBACA,mDACA,oDAGA,CAAY,gCAA8B,EAG1C,GAJA,OAIA,CAGA,iEACA,2CAEA,GACA,eACA,kBACA,sBACA,gCACA,MACA,UACA,IAAe,GAAM,cACrB,0BACA,mBACA,YAGA,eACA,CAAS,EAGT,8BACA,MACA,CAGA,QACA,OACA,eACA,kBACA,sBACA,yBACA,MACA,UACA,IAAe,GAAM,cACrB,0BACA,aACA,SACA,CAAS,EAGT,6BACA,CACA,CAGA,uBACA,yBACA,sCAGA,+DACA,CACA,CAEA,8BAmCA,cACA,qBACA,CAKA,YACA,GAEA,OACA,yBACA,eACA,KAEA,EAGA,YACA,2BACA,mCACA,yBACA,mBACA,qBACA,wBACA,CAAC,UAA4B,EAI7B,gBACA,KACA,QACA,aACA,OACA,OACA,MACA,QACA,eACA,cACA,WACA,gBACA,EAsBA,MAGA,IACA,kBACA,OAGA,eA4DA,GACA,WAAU,aAAkB,SAQ5B,OAGA,EAFA,uBAGA,OAGA,IACA,4BACA,EAAc,SAAgB,IAAW,oBAAsB,cAC/D,CAAI,SACJ,aACA,CAEA,cAAW,YACX,EAvB4B,GAE5B,WACA,eAAoB,OAAiB,EACrC,UACA,CAAG,CACH,EAnEA,GAEA,MACA,OAGA,uBACA,cAGA,IACA,kBACA,GACA,UACA,WACA,WACA,YAlWA,gBACA,kBACA,EAmWA,gBACA,EACA,aAIA,OACA,EAIA,iBACA,yBACA,0BACA,0BACA,OAqDA,iBArDA,OAEA,OACA,UACA,OACA,CACA,SACA,MACA,KACA,kBACA,qCACA,uCACA,gBACA,iBACA,SACA,WA1EA,YACA,SACA,eACA,cACA,QAEA,yCACA,aAGA,UAIA,QACA,EA2DA,aACA,CACA,EACA,EAAU,CAEV,CAiGA,OAEA,CAEA,SAuFA,SACA,GAEA,IACA,YACA,gBACA,OACA,cACA,YACA,kBACA,kBACA,iBACA,eACA,CAAI,QAGJ,uCACA,KAGA,CACA,QAAa,EAAU,GAAG,EAAc,EACxC,MAAW,GAAe,GAC1B,IAAS,GAAe,GACxB,GAF0B,EAE1B,EACA,MAFwB,KAGxB,EACA,aACA,kBACA,iBACA,CAAK,CAEL,EAtHA,MA4BA,YACA,aAAU,kCAAuC,EAEjD,EAAgB,GAAe,GAC/B,OACA,MAF+B,CAG/B,OACA,QACA,QACA,WACA,CACA,EArCA,WAuCA,YACA,IACA,YACA,OACA,kBACA,WACA,cACA,kBACA,6BACA,2BACA,iBACA,iBACA,eACA,gBACA,YACA,eACA,OACA,CAAI,SAGJ,MACA,KAGA,CACA,QAAa,EAAU,GAAG,EAAK,EAC/B,MAAW,GAAe,GAC1B,IAAS,GAAe,GACxB,GAF0B,EAE1B,EACA,MAFwB,KAGxB,EACA,kBACA,kBACA,WACA,iBACA,6BACA,2BACA,iBACA,eACA,cACA,eACA,CAAK,CAEL,CAjFA,EAWA,sBACA,gBAIA,mBAHA,IAIA,CAEA,SAAS,GAAe,GAGxB,QAAW,KAA4B,EAAI,GAAM,8BACjD,CAoKA,iBACA,2DAIE,IAAM,SAER,GACA,MAEA,CAMA,iBACA,2DAIE,IAAM,SAER,GAGA,gBACA,KACA,CAAK,IAEL,CAEA,eACc,QAAa,GAC3B,cACA,CACA,mBACA,MACA,eACA,CAAO,CACP,aACA,SACA,CAAK,CACL,CAAM,aAAe,CAErB,CAGA,uBACA,cACA,+CAAmD,SACnD,CACA,CAMA,SAKA,SAbgF,IAahF,CACA,eACA,kBACA,mBACA,CAGA,gBACA,2BACA,CAGA,WACA,YACA,CAGA,UACA,eAIA,kBACA,+BAEA,GADA,mBACA,gBAtvKA,IAuvKA,aAGA,mBACA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CAEA,uBAQA,GAPA,+CACA,oGAMA,kBACA,iCACA,sBACA,uBACA,MACA,CAQA,IACA,sBACM,SACN,0DAAuE,IAAM,SAC7E,EAAM,OACN,sBACA,CACA,EAGA,oBACA,2CACA,gBAEA,CAGA,UAAc,4BACd,eAEA,8BACA,wCACA,SAIA,WACA,UACA,4BACA,MACA,QACA,OACA,CAAS,CACF,EACP,+BACA,OAGA,KACA,WAAuB,iEAAuE,EAC9F,GAKA,EACA,CAEA,YACA,EACA,EACA,EACA,GAIA,UACA,KAHA,sCAQA,EACA,CAeA,OAZA,aAEA,oBACA,WAA4B,EAAsB,GAIlD,aACA,4IAIA,WACA,CAuFA,OACA,mGAEA,8CAEA,KAKA,UAIA,sBAA0B,iBAkB1B,aACA,gBAt7SA,GAs7SA,CACA,gBAp7SA,IAo7SA,CACA,oBA95SA,IA85SA,CACA,oBA15SA,IA05SA,CACA,IA35SqC,UA25SrC,KACA,oBACA,YACA,iBAAqB,CACrB,oBACA,kBACA,iBACA,mBACA,mBAEA,8BACA,oBAEA,uBACA,8BAEA,4BACA,2BACA,0BACA,2BACA,4BAEA,UACA,yCACA,YACA,WACA,aACA,YACA,SAEA,0BAGA,aAEA,gBAEA,mBAEA,gBAEA,mBAEA,cACA,CAAI,EAAI,EACR,gBAEA,eAtKA,CACA,OACA,SACA,QACA,UACA,SAGA,aAEA,gBAEA,gBAEA,mBAEA,cACC,EAGD,IAGA,GAEA,iBALA,gDAMA,mBALA,gDAOA,iBACA,EACA,uCAZA,iBAYA,CACA,EACA,GAEA,kEACA,qFACA,EAUA,OARA,qBACA,iBAGA,qBACA,oBAGA,CACA,EAuHA,CACA,OACA,SACA,QACA,UACA,SACA,aACA,gBACA,gBACA,mBACA,aACA,CAAK,EAiGL,GA/FA,wBACA,gBACA,cACA,kBAA0B,QAA0B,aAAmB,CACvE,aACA,cACA,yBArIA,WACA,KACA,MACA,iBACA,cACA,iBACA,QACC,QAED,IAKA,sDAJA,EASA,eAGA,2FAEA,uBAGA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B,SAAI,GAAa,OAAQ,GAAG,uCACzD,SAA+B,SAAI,GAAQ,OAAQ,GAAG,IACtD,YACA,MACA,KACA,gCACA,CAAW,CACX,iBACA,MACA,KACA,qCACA,CAAW,CACX,WAAsB,OAAQ,GAAG,CAlEjC,EAkEiC,CACjC,WACA,CAAW,EACX,UACA,CAAS,EACT,CAAO,EACP,CAAK,EACL,CAAG,EACH,iBC3RO,SACP,OACA,SACA,UACC,IACD,MAAgC,QAAY,8BAC5C,MAAsC,UAAc,KAuBpD,OAnBE,WAAe,MACjB,MACA,uBACA,kFAEA,IACA,CACA,CAAG,QAYH,CACA,SACA,UAboB,aAAiB,KACrC,GACA,KAEA,MACA,IAEA,OACA,GAEA,CAAG,SAIH,CACA,EChCO,qBACP,IACA,QACA,UACA,CAAI,EACJ,EAAkB,OAAsB,GACxC,EAAqC,QAAY,IACjD,KACA,UACA,QACA,OACA,CAAG,EAOH,OANE,WAAe,MACjB,oBACA,OAEA,WACA,CAAG,cACH,CACA,iBCRA,WACA,IACA,SACA,aACA,YACA,eACA,CAAI,EACJ,yCAGA,+BAGA,8BAGA,4DAGA,yBAEA,2DAQA,iEALA,MAGA,uBADA,EAYA,EAOA,OACA,IACA,SACA,aACA,YACA,eACA,gBACA,CAAI,EACJ,yCACA,8BAGA,4DAGA,wBAEA,4DAGA,KAGA,wBAEA,iCACA,sDAGA,EAKA,OACA,IACA,SACA,gBACA,CAAI,QACJ,gCAGA,4BACA,+BAEA,iCACA,8BAGA,EAKO,KACP,QACA,eACA,YACA,iBACA,YACC,IACD,IACA,WACA,WACA,QACA,eACA,8BACA,mBACA,2BACA,WACA,CAAI,EACJ,CACA,UACA,CAAI,EAAE,MAAY,IAClB,CACA,UACA,CAAI,EAAE,MAAY,aAiBlB,EAAgB,QAAQ,GACxB,EAAkB,OAAsB,GACxC,MAAkD,QAAa,EAC/D,aACA,aACA,sBACA,wBACA,CAAG,EACH,CACA,SACA,YACA,CAAI,GAAc,GAClB,MADkB,EACkB,QAAc,MAClD,MAQA,OACA,MAPA,EADA,WACA,EACM,WACN,EAEA,aAIA,qBACA,qBACA,sBACA,4BACA,CACA,CAAG,EACH,CACA,WACA,oBACA,CAAI,CAAE,OAAoB,EAC1B,WACA,QACA,eACA,WACA,cACA,CAAG,EACD,GAAc,OAAQ,GAAT,CAAY,GAC3B,cACA,UACA,CAAG,uCACH,MAAqB,QAAgB,KACrC,OACA,SACA,YACA,6CACA,eACA,eACA,EACA,QACA,QACA,QAOA,GANA,KAAyB,OAAQ,GAAG,IACpC,cACA,kDACA,kDACA,4BACA,CAAK,GACL,GACA,gEACA,UACA,cACA,MAAe,OAAQ,GAAG,IAC1B,cACA,UACA,CAAS,CACT,CAAO,EAIP,UAHA,CACA,iBACA,EAEA,CACA,MACA,WAEA,GACA,KAEA,CAAG,EACH,+FACA,oCACA,KAAyB,OAAQ,GAAG,IACpC,qBACA,CAAK,MAAgC,CACrC,qBACA,qBACA,QACA,4BACA,CAAK,EACL,CACA,MAAsB,QAAgB,MACtC,GACA,mBACA,0BACA,oBACA,CAAK,CACL,CAAG,EACH,EAAuB,QAAgB,MACvC,GACA,2BACA,0BACA,qBACA,CAAK,CACL,CAAG,EACH,EAAwB,QAAgB,MACxC,GACA,2BACA,0BACA,sBACA,CAAK,CACL,CAAG,EACH,EAAuB,QAAgB,MACvC,GACA,2BACA,0BACA,qBACA,CAAK,CACL,CAAG,EACH,EAAyB,QAAgB,MACzC,GACA,6BACA,0BACA,oBACA,CAAK,CACL,CAAG,EACH,EAAqB,QAAgB,YACrC,EAAsB,QAAgB,YACtC,EAAuB,QAAgB,qBACvC,wBACA,QACA,gBACA,CAAG,GACH,EAA+B,QAAgB,WAC/C,4BACA,QACA,mCACA,CAAG,GACH,EAAgC,QAAgB,WAChD,yBACA,QACA,SACA,CAAG,GACH,EAA4C,QAAgB,KAC5D,KACA,aACA,CAAG,EACH,GACA,UACA,WACA,YACA,WACA,aACA,SACA,SACA,EACA,GACA,cACA,WACA,mBACA,0BACA,EACA,EAAoB,SAAa,4CAmBjC,EAAyB,OAAQ,GAAG,IACpC,QACA,WACA,mBACA,QAfA,IACA,SACA,UACA,QACA,MAAa,OAAQ,GAAG,IACxB,QACA,UACA,CAAO,CACP,CAAK,EACL,oBACA,CAMA,CAAG,EACH,OACA,OACA,aACA,UA3BA,CACA,QACA,WACA,UACA,OACA,0BACA,EAsBA,cACA,SACA,CACA,kBCtVO,aACP,WACA,eACA,SACA,OACA,QACA,YACA,cACA,sBACC,EACD,QAaA,MAAyB,QAAY,IACrC,EAAwB,QAAY,IACpC,EAAsB,QAAY,uBAClC,MAA0B,QAAa,EACvC,gBACA,aACA,aACA,kBACG,EACH,EAA6B,QAAY,WACzC,MAAwC,QAAa,EACrD,gBACA,oBACA,aACA,kBACG,EACD,WAAe,MAEjB,2EACA,wBACA,YACA,YAEA,CAAG,YACH,mBACA,0BACA,0BACA,EAAkC,QAAgB,SAClD,EAEA,KAGA,mBAIA,eACA,CAAG,EACH,EAA2B,QAAgB,KAC3C,QAGA,KACA,QACA,GACA,KAEA,CAAG,EACH,EAAuB,QAAgB,MACvC,GACA,KAEA,OACA,CAAG,EACH,EAAkC,QAAgB,WAClD,mBACA,IAGA,4BAEA,IADA,kBAEA,GACA,GAEA,CAAG,EACH,EAA8B,QAAgB,WAC9C,4BACA,IACA,KACA,QAEA,CAAG,EACH,OACA,OACA,UACA,cACA,iBACA,WACA,eACA,sBACA,eACA,0BACA,qBACA,CACA,iBC/GA,IAAM,GAAS,mBAyBR,CAzBQ,EAyBR,EACP,QACA,uBACA,sBACA,WACA,gBACC,IACD,IACA,WACA,OACA,2BACA,UACA,CAAI,EACJ,CACA,QACA,SACA,eACA,oBACA,gBACA,WACA,CAAI,EACJ,EAA+B,OAA6B,GAAQ,IACpE,CACA,OACA,UACA,CAJ6E,WAI7E,EACA,cACA,iBACA,0BACA,CAAI,GAAU,CACd,IADc,CACd,OACA,QACA,SACA,WACA,eACA,WACA,CAAG,EACH,CACA,YACA,iBACA,CAAM,SAAa,sBACnB,MAYA,OAVA,EADA,EACA,QACM,WACN,KAEA,QAEA,sBACA,UACA,iBAEA,CACA,CAAG,EACH,aACA,iBACA,CAAG,WACH,EAAyB,SAAa,qBACtC,YAAgD,SAAU,IAC1D,IAEA,EACG,UACH,OACA,EAA6B,QAAgB,eAC7C,MAAsC,UAAc,yBACpD,oBACA,KAEE,QAAiB,MAEnB,iBACA,IACA,gBAGA,2BACA,IACA,CAAO,EAEP,CAAG,MAED,CAFY,EAEZ,KAAiB,MACnB,MACA,OAEA,OAGA,uBACA,MAIA,iCACA,MAEA,OACA,KAEA,OACA,CAAG,MAOH,CAPc,UAQd,EACA,qBACA,YARA,CACA,QACA,OACA,cACA,EAKA,uBACA,WACA,YAEA,kBACA,QACA,KAEA,EAAsB,OAAQ,GAAG,QACjC,QACA,WACA,WACA,OACA,eACA,cACA,sBACA,qBACA,gBACA,CAAO,EACP,CACA,CACA,EC9JA,oBACA,2BACA,WAEA,0EACA,sEAIA,oBACA,gEAGA,CACO,eACP,SAAwC,UAAc,WAUtD,CATE,OAAiB,MACnB,WACA,OACA,EAEA,OADA,+CACA,KACA,iDACA,CACA,CAAG,MP1BI,aO2BY,QP1BnB,iBACA,8BAEA,iBACA,EOsBmB,kCAKnB,cADA,MAEA,ECvBO,KACP,QACA,uBACA,uBACA,iBACC,IACD,IACA,cACA,CAAI,EACJ,EAAsB,GAAc,iBAOpC,CACA,YAPsB,OAAQ,GAAG,MACjC,cACA,iBACA,oBACA,oBACG,CAGH,CACA,EC1BiC,cAAY,wTACtC,SACP,QACA,eACA,YACA,iBACA,WACA,sBACA,YACA,gBACC,IAMD,MAA8B,GAAc,CAC5C,QACA,EAF4C,WAE5C,EACA,YACA,iBACA,WACA,CAAG,EACH,EAA8B,GAAc,CAC5C,QACA,EAF4C,OAE5C,EACA,sBACA,gBACA,iCACG,EACH,EAA+B,GAAoB,CACnD,QACA,QAFmD,OAEnD,EACA,mCACA,mCACG,EACH,OAEA,YACA,kBACA,wBAEA,sC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J,MAAS,OAAc,CATvB,CACA,6BACA,kCACA,oBACA,wBACA,cACA,wBACA,yBAE+B,GAA4B,EAC3D,EAqHA,GApHA,IACA,QACA,IACA,EAL2D,YAsH5C,CAjHf,EACA,WACA,CA+G8B,OA/G9B,EACA,WACA,aACA,OACA,QACA,eACA,QACA,WACA,mBACA,UACA,cACA,WACA,WACA,WACA,aACA,kBACA,QACA,YAKA,CAAI,EACJ,YAAkD,EAAsB,GACxE,cACA,EAAkB,CAFsD,EAErC,GAInC,2BAJmC,CAInC,aAA+G,GAC/G,EAAyB,EAAY,CACrC,QAF+H,CAC1F,GACrC,EACA,6CACA,iBACA,WACA,UACA,WACA,aACA,6CACA,sBACK,CACL,WAAgB,OAAQ,GAAG,IAC3B,gBACA,CAAK,CACL,CAAG,EACH,EAAiC,SAAI,GAAY,OAAQ,GAAG,KAI5D,2BACA,EAAuB,EAAY,CACnC,SADmC,GACnC,EACA,2CACA,iBACA,cACA,WACA,QACA,OACA,eACA,QACA,WACA,WACA,oBACK,CACL,WAAgB,OAAQ,GAAG,IAC3B,gBACA,CAAK,CACL,CAAG,EACH,WA3FA,MA2FA,EAA2E,SAAI,GAAU,OAAQ,GAAG,UAQpG,wBACA,OAA2C,SAAI,GAAO,OAAQ,EAC9D,OACA,cACA,CAAG,8BAIH,yCAA+G,GAC/G,EAAyB,EAAY,CACrC,QAF+H,CAC1F,GACrC,EACA,6CACA,iBACA,UACA,cACA,WACA,sBACK,CACL,YACA,UACA,cACA,WACA,sBACA,gBACA,CACA,CAAG,EAEH,OACA,UACA,QAjCA,EAkCA,OACA,YACA,UANA,KAAuD,SAAI,GAAY,OAAQ,GAAG,SAOlF,CACA,ECtIM,GAAiB,IACvB,IACA,cACA,MAHuB,EAGvB,EACA,CAAI,EAKJ,MAAS,OAAc,CAJvB,CACA,6BACA,iCACA,EAC+B,GAA4B,EAC3D,EACA,GAA0B,QAAM,QAChC,EAH2D,GAG3D,mBACA,YACA,gCACC,IACD,QACA,aACC,KACD,e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BACA,wBACA,CAAK,CACL,EA2GA,uBAnCA,QAAyE,OAAQ,GAAG,IACpF,qBACA,CAAG,GAkCH,0BACA,cACA,UACA,CACA,ECjRA,wBASO,KACP,WACA,qBACA,0BACA,yBACA,WACC,IACD,MAAgB,QAAQ,GACxB,MAA4B,UAAc,OAC1C,EAAqB,QAAgB,cACnC,WAAe,MACjB,KACA,uEACA,GAEA,CAAG,UACD,WAAe,MACjB,YACA,yBA5BA,KA6BA,WACA,sBACA,CACA,CACA,YACA,CAAG,QACH,QACA,aACA,eACG,QACH,sBACA,OAIA,kDACA,SAAwC,QAAY,EAAE,EAAgB,EACtE,SACA,UAMA,OALA,GACA,eACA,QACA,kBACA,CAAS,EACT,CAEA,CACA,oBACA,qBACA,IACA,OAEA,GACA,eACA,QACA,kBACA,CAAK,EACL,OACA,KAEA,CACA,EACA,MACA,gBACA,wDACA,aACA,CACA,YACA,EAEA,CACA,kBACA,mCAEA,EACA,cACA,SAAmC,SAAuB,eAC1D,4BACA,iCAMA,eAA8F,WAAnC,SAAmC,mBAC9F,WACA,kBACA,MACA,CACA,YACA,EAEe,OAAQ,GAAG,IAC1B,gCACA,CAAS,CACT,CACA,OACA,YACA,CACA,EAyBA,WAxBA,QACA,eACA,YAGA,6BADA,GAAyD,SAAwB,+BAGjF,eAGA,+BADA,+BAGA,gBAEA,aAEA,SAEA,OACA,YACA,CAEA,CACA,EAEA,EACA,MACA,cACA,gBAAyC,EAAW,GACpD,aACA,iBACA,gBACA,0BACO,EACP,eACA,OACA,YACA,EAMA,eACA,OACA,YACA,EAEA,gBAA8C,EAAW,sDAEzD,OACA,aAF8B,SAAsB,YAGpD,uBACA,CACA,EA2CA,WA1CA,QACA,gEACA,cAKA,qBACA,MAAwC,SAAiC,2BACzE,OACA,YACA,YACA,0BACA,0BACA,oBACA,WACA,CAAS,EACT,SACA,SAEA,MAA+B,SAAwB,iCACvD,MAAe,OAAQ,GAAG,IAC1B,cACA,CAAS,CACT,CAIA,uBACA,aACA,SACA,SAEA,MAA+B,SAAgB,yCAC/C,MAAe,OAAQ,GAAG,IAC1B,cACA,CAAS,CACT,CACA,OACA,YACA,CACA,EACA,4BACA,EAeA,OACA,sBAfgC,QAAgB,KAChD,wBAEA,SADA,4BACA,SACA,SACA,QAEA,GACA,gBACA,+BACA,8CACO,CAEP,CAAG,EAGH,qBACA,CACA,EC5PM,GAAS,yEAYR,OACP,MAAgB,QAAQ,GACxB,CACA,QACA,yBACA,sBACA,aACA,qBACA,qBACA,0BACA,yBACA,0BACA,cACA,WACA,CAAI,GAAe,GACnB,CACA,MAFmB,GAEnB,EACA,gBACA,eACA,cACA,mBACA,cACO,CACP,gBACA,UACA,YACA,UACA,SACA,YACA,UACA,QACO,CACP,oBACA,eACA,YACA,CAAM,EACN,EAA0B,OAA6B,kBAAwB,IAC/E,CACA,YAFwF,UAExF,EACA,sBACA,CAAI,GAA0B,CAC9B,oBACA,qBACA,0BACA,yBACA,UACA,CAAG,EACH,EAAmB,QAAY,OAC/B,EAAoB,OAAU,MAC9B,EAA0B,QAAY,SAEtC,UADgB,QAAQ,GACxB,UACA,EAAuB,SAAa,KAAO,SAAe,+BAC1D,WACA,MAMA,EALA,MACA,QACA,MACA,CACA,6CAYA,EADA,MAPA,EAFA,8BAEA,EACM,8CAEN,EAEA,mEAEA,wBAEA,EACA,EAA2B,QAAgB,UAC3C,iBACA,GACA,CAAG,EACH,EAA6B,QAAgB,KAC7C,cAGA,kBACA,CAAG,EACH,EAA2B,QAAgB,UAC3C,iBAEA,gBACA,+BACA,0BAEA,kBAGA,cAKA,iFACA,SAEA,IAEA,CAAK,CACL,CAAG,EACH,EAA0B,QAAgB,UAC1C,iBACA,OACA,CAAG,EACH,EAA2B,QAAgB,KAE3C,GADA,cACA,GACA,mBACA,MACA,CACA,sCACA,iCACA,+BACA,wBACA,qBACA,mDAEA,GADA,gGAGA,OAEA,SAGA,mBACA,MACA,CACA,CACA,mBACA,IACA,IACA,CAAG,EACH,EAA4B,QAAgB,SAa5C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gBAEH,GADA,wBAAiE,GAAgB,YACjF,CADiF,CACjF,uCAgBA,OAfE,qBAAyB,SAC3B,2BACA,2BACA,QACA,6CACA,uCACA,gBACA,YAEA,sCACA,kEACA,qCACA,CAAK,CACL,2BACA,EAAG,EACM,OAAQ,EACjB,cACA,kBACA,CAAG,IACH,aACA,YACA,WACA,UACA,UACA,SACA,UACA,WACA,YACA,YACA,QACA,KACA,CAAG,CACH,ECnZO,oHACA,gKACA,iCACP,uBAKO,wBACP,qBACA,YAEA,GACC,EAAI,ECXL,6MACO,WACP,MAAyB,OAAQ,GAAG,IACpC,KACA,MACA,sBAEA,UACA,YAEA,EAWA,OAVA,cACA,WACI,GAA0B,WAC1B,WACA,CAF0B,EAEA,WAC1B,YAD0B,EAC1B,IACA,GAA0B,WAC1B,GAA0B,SADA,EAE1B,GAA+B,SADL,GAG9B,CACA,eAHmC,EAInC,eACA,CACA,ECpBA,OACA,UACA,MAAgB,QAAQ,GACxB,EAAuB,QAAe,GACtC,MAAS,OAAQ,GAAG,IACpB,uCACA,2CACA,mDACA,QAAa,QAAgB,wBAC7B,QAAa,QAAgB,uBAC7B,CAAG,CACH,EACO,KACP,QACA,WACC,IAED,IACA,iBACA,gBACA,CAAI,GAJJ,MAIyC,QACzC,OAAS,GAAQ,CACjB,IADiB,GADwB,EAEzC,EACA,iBACA,gBACA,aAAkB,GAAsB,CACxC,kBAAuB,GAA2B,CAClD,UAAe,EACf,UAD2B,MAE3B,CAAG,CACH,ECnCM,GAAS,+EACb,GAAU,aACV,GADU,CACA,oDAQZ,GAA+B,YAAgB,eAC/C,UACA,MAAqB,OAAa,EAClC,QACA,mBACA,CAAG,EACH,CACA,aACA,kBACA,QACA,YACA,aACA,aACA,CAAM,EACN,EAAY,OAA6B,GAAa,IAEtD,cAF+D,GAE/D,+DAA4L,IAAY,CACxM,EAAwB,EAAY,CACpC,SADoC,GACpC,EACA,oFACA,yBACA,WANA,CAOA,CAAK,EACL,CACA,WACA,CAAM,EACN,EAAq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IACnD,YADwC,aAExC,CAAK,CACL,OAAW,EAA6B,6BAA6B,IACrE,uBACA,6BACA,aACA,QACA,CAAK,CACL,OAAW,EAA6B,8BAA8B,IACtE,uBACA,4BACA,aACA,QACA,CACA,CACA,CAAC,ECvFM,MAA2C,QAAoB,qBACtC,OAAsB,kJCAtD,IAAM,GAAS,0GACb,GAAU,eAiBN,GAAiB,IACvB,IACA,UACA,CAAI,EAWJ,KAduB,CAcd,OAAc,CAVvB,CACA,kBACA,8BACA,sCACA,oCACA,kCACA,gCACA,oCACA,2BAE+B,GAA0B,EACzD,EACA,mBAFyD,UAEzD,GAEA,GAAiC,QAAM,QACvC,sBACA,cACA,kCACC,GACD,eACA,wBACA,mBACA,CAAC,EACD,GAAoC,QAAM,CAAC,GAAU,EACrD,sBACA,oBACA,wCACC,IACD,QACC,KACD,SACA,UACA,eACA,mBACA,eACA,wBACA,oBACA,yCACA,CAAC,EACD,GAAuC,QAAM,CAAC,GAAU,EACxD,oBACA,uBACA,2CACC,IACD,QACC,KACD,SACA,UACA,eACA,mBACA,eACA,wBACA,oBACA,8BACA,CAAC,EACD,GAAkC,QAAM,CAAC,GAAU,EACnD,oBACA,kBACA,sCACC,IACD,QACC,GAAK,OAAQ,GAAG,uBACjB,M1BtFO,C0BsFE,EACT,MADiB,C1BtFV,C0BuFG,EACV,MADkB,EAClB,EACA,YAAe,GACf,OADyB,CAAC,OAC1B,eACA,mBACA,oBACA,wBACA,qBACA,CAAC,GACD,GAAwC,QAAM,QAC9C,sBACA,wBACA,4CACC,GACD,eACA,wBACA,oBACA,UAnEA,GAoEA,CAAC,EACD,GAAuC,QAAM,CAAC,SFbvC,GACP,MAAgB,IEYoD,CFZpD,EAAa,EAC7B,QACA,gCACA,CAAG,EACH,CACA,WACA,YACA,mBACA,WAEA,CAAM,EACN,EAAY,OAA6B,GAAQ,IACjD,EAAkB,GAAiB,GACnC,KACA,MAAwB,SAAI,QAC5B,MAHmC,IAGlB,OAAI,WACrB,UACA,CAAK,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a,EAC7B,QACA,qBACA,CAAG,EACH,CACA,qBACA,YACA,eACA,eACA,aACA,UACA,uBACA,+BACA,WACA,mBACA,oBAAuC,SAAI,SAC3C,cACA,CAAK,EACL,iBACA,kBACA,cACA,gBACA,UACA,UACA,oBACA,qBACA,oBACA,wBACA,WACA,sBACA,cACA,oBACA,kBACA,YACA,WACA,CAAI,EACJ,EAAc,QAAM,IACpB,EAAgB,QAAQ,GACxB,EAAkB,GAAiB,GAEnC,UADgB,QAAQ,GACxB,EAFmC,OAEnC,CACA,EAAyB,GAAiB,CAC1C,aAD0C,KAC1C,EACA,qBACA,oBACA,UACA,UACA,cACA,gBACA,UACA,CAAG,EACH,EAAqB,QAAa,GAClC,MAAkD,QAAa,EAC/D,mBACA,iBACA,aACA,kBACA,CAAG,EACH,MAAsD,UAAc,WACpE,EAA0B,QAAgB,KAC1C,GAGA,IACA,CAAG,EACH,MACA,OACA,KACA,KACA,eACA,MAEA,EACA,EAAwB,QAAgB,SACxC,cACA,cACA,mBACA,mBACA,KACA,iBACA,kBACA,mBACA,KACA,iBACA,CACA,0BACA,wBASA,EARoC,QAAsB,EAC1D,QACA,OACA,8BACA,4BACA,iBACA,UACA,CAAW,GACX,GACA,mBACA,KACA,CACA,iBACA,CACA,0BACA,wBASA,EARoC,QAAsB,EAC1D,QACA,OACA,8BACA,4BACA,iBACA,UACA,CAAW,GACX,GACA,mBACA,KACA,CACA,WACA,oBACA,mBACA,KACA,WACA,kBACA,mBACA,KACA,cACA,oBACA,mBACA,KACA,gBACA,qBACA,kBAIA,CACA,CAAG,EACH,EAAsB,QAAgB,cACtC,EAAqB,QAAgB,SACrC,qBACA,gBAEA,CAAG,EACH,gBACA,EAA4B,SAAa,qDAKzC,GAAuB,SAAa,KAAoB,WAAe,IAFvE,EAEuE,EACvE,oBACA,GAAuB,SAAa,MACpC,wBACA,yBACA,4CACa,QAAsB,EACnC,QACA,OACA,UACA,UACA,cACA,gBACA,iBACA,UACA,CAAO,EAEP,CACA,CAAG,kBACH,GAAyB,SAAa,MACtC,yBACA,oBACA,mBACA,qBACA,wBACA,wCACA,2BACA,YACA,SAEA,CAAO,EACP,kBACA,CACA,QACA,CAAG,YACH,MAAsB,UAAK,QAC3B,YACA,oBACA,UAA4B,UAAK,KACjC,WACA,mBACA,aAAmD,SAAI,KACvD,kBACA,oBACA,6CACA,4BACA,wCACO,8BACP,MACA,MAA4B,SAAI,KAChC,kBACA,oBACA,iDACA,yBACA,0CACA,CAAS,gBACT,CAAO,GACF,IAA0B,SAAI,KACnC,6BACA,YACA,CAAK,EAAiB,SAAI,IAAiC,OAAQ,EACnE,SA/DA,EAgEA,WACA,mBACA,iBACA,UAAiB,OAAI,qBACrB,CAAK,IACL,WACA,SAA6B,SAAI,KACjC,OACA,gBACA,2BACA,uBAAmE,UAAK,KACxE,WACA,0BAIA,oBACA,aAAuD,SAAI,KAC3D,uBACA,iBACA,sEACA,wDACA,CAAW,eAA4C,SAAI,KAC3D,cACA,MACA,eACA,gBACA,YACA,UACA,SACA,cACA,iBACA,qBACA,gBAGA,mBACA,CAAW,iBACF,SAAU,KAAQ,GAC3B,CAAO,CACP,CAAK,GACL,CAAG,CACH,4BC7cO,eACP,MAAS,QAAoB,6BAC7B,CAC2C,OAAsB,uDCFjE,IAAM,GAAS,+KACb,GAAU,eACV,GAAU,SADA,KACA,CAYZ,GAAiC,QAAM,QACvC,+BACA,YACA,gCACC,GACD,cACA,CAAC,EACD,GAAmC,QAAM,QACzC,+BACA,cACA,kCACC,IACD,QACC,KACD,mBACA,CAAC,EACD,GAAmC,QAAM,CAAC,GAAU,EACpD,+BACA,cACA,kCACC,IACD,aACC,GAAK,OAAQ,GAAG,YACjB,mBACA,CAAC,GACK,GAAiB,IACvB,IACA,UACA,CAAI,EAMJ,MAAS,OAAc,CATA,CAKvB,cACA,kBACA,mBAE+B,GAAmC,EAClE,EACO,GAA0C,YAAgB,aAFC,EAGlE,YAEA,cADgB,QAAQ,GACxB,UACA,EAAgB,OAAa,EAC7B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AAG,IAC1I,CAAK,IACF,EACH,CAAC,EEnKM,MAAqD,QAAoB,+BACzE,GAAqC,OAAsB,mGCA5D,GAAS,eAiBT,GAAiB,IACvB,IACA,CAnBe,OAmBf,EACA,CAAI,EAQJ,MAAS,OAAc,CAPvB,CAJuB,KAKvB,SACA,kCACA,gBACA,sCACA,mCAE+B,GAAoC,EACnE,EACA,GAAkC,QAAM,QACxC,UAHmE,sBAInE,YACA,gCACC,GACD,eACA,oBACA,aACA,eACA,eACA,gBAEA,aACA,YACA,CAAC,EACD,GAA4C,QAAM,QAClD,gCACA,sBACA,0CACC,IACD,QACC,GAAK,OAAQ,EACd,eACA,kBACA,oBACA,iBACA,kBACA,CAAC,qBACD,yCACC,GACD,GAAmC,QAAM,QACzC,gCACA,aACA,iCACC,GACD,aACA,CAAC,EACD,GAA8C,QAAM,CAAC,GAAU,EAC/D,gCACA,wBACA,2CACA,CAAC,IACD,aACC,GAAK,OAAQ,EACd,kBACA,CAAC,mBACD,KAAO,GAA4B,eAAgB,IACnD,MADmC,IACnC,gBACA,CACA,CAAC,GACD,GAA4C,QAAM,CAAC,GAAiB,CACpE,aADoE,mBAEpE,sBACA,0CACC,IACD,QACC,KACD,uBACA,6CACA,yBACA,CAAC,EAKM,eACP,QACA,MAAqB,QAAa,GAClC,EAAgB,QAAQ,GACxB,EAAgB,OAAa,EAC7B,QACA,+BACA,CAAG,EACH,CACA,QACA,YACA,eACA,WACA,gBACA,cACA,UACA,UACA,gBACA,eACA,OACA,mBACA,QACA,UACA,WACA,CAAI,EAEJ,EAAkB,GAAiB,GACnC,iCADmC,WACnC,OACA,EAAgC,EAAY,CAC5C,SAD4C,GAC5C,EACA,oDACA,iBACA,aACA,sDACA,CAAK,CACL,WAVA,EAWA,6BACG,EACH,iDAEA,EAAwB,EAAY,CACpC,SADoC,GACpC,EACA,kDACA,kBACA,0BACA,CAAK,EACL,EAA0B,OAA6B,GAAgB,IAGvE,EF/IO,YACP,QE8IkD,IAH8B,EF3IhF,E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AA0B,CAC7E,sBAD6E,CAE7E,+BACA,mDACC,IAAI,EAWE,GAAkC,YAAgB,eACzD,MAAgB,QAAQ,GACxB,EAAa,KAAK,EAClB,SAhDA,KACA,MAAgB,QAAQ,GACxB,EAAuB,QAAe,GACtC,EAAqB,OAAa,EAClC,QACA,MACA,CAAG,EACH,MAAS,OAAQ,EACjB,WACA,eACA,iBACA,aACA,qBACA,iBAAsB,GACtB,kBAAsC,EADO,CACP,MAAI,SAC1C,cACA,CAAK,CACL,CAAG,IACH,QAAa,QAAgB,wBAC7B,QAAa,QAAgB,uBAC7B,CAAG,CACH,EA2BA,qBACA,CACA,YACA,eACA,QACA,eACA,gBACA,gBACA,cACA,uBACA,WACA,eACA,gBACA,mBACA,oBACA,qBACA,oBACA,OACA,QACA,SACA,YACA,WACA,WACA,UACA,UACA,wBACA,cACA,sBACA,8BACA,kBACA,qBACA,aACA,kBACA,QACA,YACA,UACA,gBACA,oBACA,cACA,eACA,WACA,CAAM,EACN,EAAY,OAA6B,GAAQ,IACjD,CACA,SACA,OAH0D,WAG1D,GACA,YACA,CAAM,QAA8B,EACpC,oBACA,WACA,QACA,eACA,WACA,aAAkB,GAAsB,CACrC,EACH,CACA,QACA,WACA,eACA,kBACA,gBACA,2BACA,CAAI,GAAU,CACd,IADc,CACd,EACA,QACA,SACA,YACA,eACA,YACA,cACA,qBACA,CAAG,EACH,CACA,iBACA,iBACA,oBACA,eACA,qBACA,kBACA,gCACA,CAAI,GAAkB,CACtB,SACA,GAFsB,kBAEtB,EACA,gBACA,mBACA,gBACA,UACA,UACA,oBACA,cACA,gBACA,WACA,CAAG,EACH,GAAgC,QAAgB,KAChD,wBACA,kBACA,QAAyD,QAAsB,EAC/E,QACA,OACA,4BACA,2BACA,cACA,gBACA,kBACA,WACA,CAAK,IACL,GACA,eACA,gBAEA,KACA,OAEA,QACA,CAAG,EACH,GAA+B,QAAgB,KAC/C,uBACA,iBACA,QAAyD,QAAsB,EAC/E,QACA,OACA,4BACA,2BACA,cACA,gBACA,kBACA,WACA,CAAK,IACL,GACA,eACA,gBAEA,KACA,OAEA,QACA,CAAG,EACH,GAAkC,QAAgB,IAClD,EAEA,GAA+B,QAAgB,+BAE/C,gBAEE,WAAe,MACjB,yBACA,MAEA,CAAG,OAGH,CAHe,GAGf,GAAkB,GADlB,GAEA,IACA,cACA,MAHmC,QAGnC,EACA,UACA,SACA,EAGA,YACA,YACA,IACA,wBACA,WACA,WACA,WACA,EACA,MAAyB,EAAG,aAC5B,aACA,GAA0B,QAAY,KACpC,WAAe,MAGjB,kBAGA,iBACA,UAEA,cACA,CAAG,aACH,OAAuB,SAAa,gBACpC,MAAsB,UAAK,IAAmB,OAAQ,EACtD,MACA,UAAe,OAAI,YACnB,WApCA,CAqCA,CAAG,IACH,UAA4B,SAAI,CAAC,GAAqB,CACtD,QACA,QACA,CAHsD,YAGtD,gBACA,gBACA,yBACA,WACA,WACA,CAAO,EACP,WACA,WACA,WACA,cACA,gBACA,mBACA,WACA,QACA,YACA,WACA,CAAK,EAAgB,SAAI,KACzB,mBACA,qCACA,YACA,WA7DA,EA8DA,SAA6B,UAAK,QAClC,uBAAmD,SAAI,CAAC,IAAY,CAAE,OAAQ,GAAG,QACjF,SACA,YACA,oBACA,YACA,oCACA,cACA,gBACA,CAAS,iBAAqC,SAAI,CAAC,IAAa,CAAE,OAAQ,GAAG,QAC7E,YACA,YACA,SACA,YACA,qBACA,qCACA,eACA,gBACA,CAAS,eAAmC,SAAI,CAAC,GAAa,OAAQ,CAAV,CAAU,CAAG,WACzE,gCACA,sBACA,mBACA,gBACA,wBACA,oBACA,qBACA,oBACA,YACA,mCACA,eACA,8BACA,kBACA,qBACA,oBACA,aACA,kBACA,QACA,YACA,UACA,eACA,CAAS,GACT,CAAO,CACP,CAAK,GACF,EACH,CAAC,EC9UM,KACP,OACA,eACA,QACA,cACA,sBACA,QACA,eACA,WACA,YACA,UACA,gBACA,cACA,UACA,UACA,oBACA,qBACA,oBACA,mBACA,gBACA,eACA,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CAAIA,CAAC,oBAAqB,CACnC,iBAAkB6oF,EAASE,qBAAqB,EAAI,EACpD,iBAAkBF,EAASE,qBAAqB,CAAG,CACrD,aAECF,EAASE,qBAAqB,EAAI,EAAI,IAAM,GAC5CF,EAASE,qBAAqB,CAAC,QAAMF,EAASG,WAAW,IAE5D,UAACC,GAAYA,CACXP,QADWO,CACH,GACRt5C,MAAM,SACNg5C,SAAS,iBACT9D,OAAQgE,EAASK,MAAM,GAEzB,UAACD,GAAYA,CAACt5C,MAAM,EAAPs5C,SAAkBN,SAAS,cAAc9D,OAAQgE,EAAS3D,QAAQ,QAKzF,EAAE,SCrEF,MACA,aACA,CACA,0CACA,eACA,2BACA,CAIA,eACA,0BACA,CACA,eACA,6BACA,CACA,eACA,0BACA,CAEA,QAAe,qGACf,2BACA,eACA,8BACA,yBACA,yCAuBA,wBAQA,kHACA,mBACA,wBACA,0DACA,uBAEA,mBACA,4DACA,uBAEA,uBAEA,EADA,iBAOA,IALA,QACA,UACA,KACA,MAEA,IAAc,IAAO,IACrB,YACA,QAEA,QACA,CAUA,mBAQA,MANA,UADA,IAEA,MAFA,IAGA,MAHA,IAIA,kBACA,kBACA,UAQA,OANA,QACA,MACA,yBAEA,KADA,GApBA,IAoBA,EAnBA,CAmBA,GAnBA,EAmBA,EAnBA,CAmBA,IAnBA,KAEA,IAiBA,EAhBA,GAgBA,CAhBA,EAgBA,EAhBA,EAEA,CAcA,GAdA,EAcA,EAdA,CAcA,EACA,IAEA,aAEA,qBACA,OACA,iBACA,kBACA,UACA,OACA,CAUA,eACA,qBACA,CAiDA,QACA,SACA,UACA,OACA,QACA,OACA,WACA,UACA,OACA,OACA,OACA,OACA,UACA,UACA,OACA,aACA,OACA,OACA,OACA,OACA,OACA,UACA,OACA,OACA,SACA,OACA,UACA,MACA,EACA,IACA,gBACA,qBACA,YACA,mBACA,cACA,eACA,gBACA,UACA,sBACA,QACA,iBACA,cACA,mBACA,gBACA,kBACA,iBACA,aACA,qBACA,iBACA,iBACA,YACA,SACA,aACA,iBACA,cACA,YACA,cACA,gBACA,iBACA,kBACA,gBACA,eACA,aACA,gBACA,gBACA,cACA,eACA,eACA,WACA,gBACA,gBACA,gBACA,gBACA,gBACA,kBACA,kBACA,kBACA,kBACA,gBACA,iBACA,mBACA,aACA,gBACA,aACA,WACA,eACA,aACA,iBACA,gBACA,iBACA,eACA,cACA,eACA,gBACA,mBACA,iBACA,oBACA,aACA,cACA,eACA,mBACA,cACA,cACA,cACA,cACA,gBACA,gBACA,gBACA,eACA,eACA,iBACA,aACA,YACA,iBACA,aACA,gBACA,eACA,oBACA,SACA,eACA,gBACA,gBACA,cACA,iBACA,aACA,kBACA,oBACA,iBACA,kBACA,iBACA,oBACA,UACA,gBACA,cACA,iBACA,eACA,iBACA,cACA,mBACA,gBACA,eACA,oBACA,mBACA,iBACA,cACA,aACA,cACA,iBACA,eACA,qBACA,YACA,kBACA,eACA,mBACA,eACA,mBACA,eACA,iBACA,eACA,gBACA,eACA,aACA,cACA,cACA,cACA,gBACA,gBACA,aACA,WACA,eACA,gBACA,YACA,eACA,aACA,cACA,mBACA,YACA,cACA,EAiCA,0GAiCA,uDACA,qDAaA,mBACA,MACA,WACA,oDACA,EAjUA,MAiUA,EAlUA,eAmUA,SACA,SACA,SAEA,CACA,iBACA,4BAAsC,KACtC,CACA,eACA,OAAW,mBAYX,OAXA,iBACA,cACA,GAAW,4BACX,YACA,gBAIA,SAAsB,iBAAuB,EAC7C,UAEA,CACA,CAOA,SACA,mBAKA,EAJA,mBACA,SAEA,cAEA,cACA,QACM,cACN,GAjcA,YACA,IACA,EADA,WAmBA,MAjBA,aACA,aACA,GACA,kBACA,kBACA,kBACA,uBACA,EACM,gBACN,IACA,uBACA,uBACA,uBACA,gCACA,IAGA,CACA,EA4aA,IAzGA,YACA,GAEA,CADA,kBAhBA,UAHA,SACA,kBACA,kBAEA,QAAc,WAAiB,KAE/B,QADA,SACgB,WAAkB,IAClC,OACA,qBAEA,qBACA,gCAEA,QACA,GAKA,EACA,uBAEA,yBACA,WACA,OACA,OACA,OACA,uBACA,CACA,EA6FA,IAhBA,kBACA,kBA3EA,gBAGA,MAFA,iBACA,MAEA,MAGA,aACA,YACA,4BACA,CAOA,OANA,QACA,QACA,QAIA,CACA,EAJA,+BAKA,EAJA,+BAKA,EAJA,+BAKA,GACA,EACA,EAqDA,GAhVA,gBAGA,EAFA,iBACA,MAEA,MACA,MAEA,WACA,6BAEA,gBACA,YACA,YAQA,OACA,GAPA,EADA,aArBA,MAsBA,OACI,aApBJ,MAqBA,OA3BA,MA6BA,OAGA,IACA,OACA,OACA,GACA,CACA,EAwTA,EACA,EAWA,IAEA,YACA,eACA,CACA,YACA,mBAEA,UACA,oBAIA,OAHA,GACA,cAEA,CACA,CACA,WACA,eACA,CACA,gBApFA,EAqFA,mBApFA,CADA,EAqFA,YAnFA,SACA,QAAgB,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,QAAS,GACjD,OAAe,IAAI,IAAI,IAAI,IAAI,IAAI,IAiFnC,MACA,CACA,gBA/bA,EACA,EA+bA,oBA/bA,KADA,EAgcA,WA/bA,MACA,EACA,mCACA,QA4bA,MACA,CACA,YACA,mBApVA,YACA,MACA,OAEA,YACA,OACA,WACA,WACA,eACA,QAAc,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,QAAS,GAC3C,OAAa,EAAE,IAAI,EAAE,KAAK,EAAE,KA0U5B,iBACA,CACA,SACA,UAGA,EAFA,eACA,QAEA,aACA,QACA,UACA,kCACA,MACA,uBACA,uBACA,uBACA,oBACA,UACA,CACA,YAEA,iBAIA,OAHA,GACA,oBAvGA,OACA,kBACA,cACA,cACA,OACA,8BACA,8BACA,8BACA,iBACA,CACA,EA6FA,qBAEA,KAEA,QACA,uBACA,CACA,SAEA,OADA,kBACA,KAEA,WACA,gBAEA,OADA,SACA,KAEA,YACA,gBACA,6BAEA,OADA,cACA,KAEA,WACA,gBAEA,OADA,SACA,IACA,CACA,SACA,gBAIA,OAHA,YACA,YACA,YACA,KAEA,WAEA,OADA,kBACA,KAEA,UAEA,OADA,mBACA,KAEA,YAEA,OADA,kBACA,KAEA,cAEA,OADA,mBACA,IACA,CACA,cApaA,EACA,EAqaA,MApaA,CADA,KADA,EAqaA,WAnaA,YAmaA,GAlaA,EAzCA,MAyCA,EA1CA,eA2CA,SACA,SACA,SAgaA,KAEA,CC1jBA,cACA,CAGA,aACA,QACA,cACA,CAAC,GAKD,eACA,cACA,CAKA,eACA,mCACA,SAEA,8CACA,gDAIA,CAKA,eACA,sEACA,CAIA,eACA,6DACA,CAKA,iBACA,gBACA,CAKA,iBACA,qBACA,CACA,yEACA,qEAOA,mBACA,gCACA,mBAEA,CACA,qBACA,UACA,UAEA,GADA,WACA,EACA,UAA6B,KAAQ,IACrC,sBAGA,QAAuB,IAAS,IAChC,sBAGM,SAGN,QADA,EADA,mBACA,OACmB,IAAS,IAC5B,sBAGA,CAMA,iBACA,YACA,+BACA,SAEA,mBAAiC,IAAU,IAG3C,GAFA,OACA,OACA,mDACA,SAGA,QACA,CAIA,SAAa,GAAK,GAClB,SACA,MAFkB,CAElB,MAA0B,IAE1B,UACA,OAH+B,MAG/B,aACA,iBACA,WACA,IACA,KAAc,IAAU,IACxB,QAA8B,GAAK,SAEnC,QACA,CAHmC,OAInC,CACA,CACA,eACA,OAIA,KAJA,CACA,YACA,YACA,cACA,WACA,CAKA,qBACA,UACA,OAEA,WACA,OACA,aAEA,UAEA,KAAsB,GAAK,EAE3B,CACA,eAH2B,CAG3B,OAUA,EATA,eACA,EACA,CACA,WACA,UACA,SAGA,OADA,SACA,WAEA,YAAmB,IAAU,KAE7B,OADA,QAEA,SAEA,qBACA,uBAA2C,IAAU,IACrD,aAEA,CACA,QACA,CACA,iBAEA,eACA,SACA,CAAK,CACL,CAIA,mBACA,UACA,OAEA,WACA,OACA,aACA,QACM,2CACN,MAAsB,GAAK,GAE3B,CASA,QAEA,MAb2B,EAe3B,SACA,UA+BA,iBAEA,OADA,uBAbA,GACA,MAhBA,YACA,mBACA,KACA,KACA,eACA,OACA,eACA,qBAEA,UACA,MAGA,QACA,EAEA,GACA,WACA,gBACA,UACA,MAEA,UAEA,QACA,CACA,EAEA,KACA,EACA,CAGA,eACA,2CACA,CACA,qBACA,2BAEA,WACA,mBACA,SAEA,eACA,aACA,SAGA,QACA,EAWA,WACA,QACA,SACA,4BACA,UACA,QACA,QACA,UACA,cACA,aACA,mBACA,sBACA,CAGA,eACA,oBAEA,4BADA,uBAEA,MAEA,MADA,0BACA,CACA,CAoBA,eACA,wCACA,CAOA,mBACA,UACA,mBAAoC,IAAU,IAE9C,MADA,aAEA,wBACA,wBAGA,CACA,eACA,eACA,CAUA,eACA,UACA,OAEA,QACA,IACA,4BACA,MACA,IAEA,QACA,CAEA,iBACA,cACA,UACA,qBACA,kBAIA,OAHA,UACA,QAEA,CAFsB,MAGtB,EACA,UACA,CACA,CACA,iBACA,yDACA,CAIA,iBACA,oBACA,CAIA,eACA,kBACA,CAGA,qBACA,YACA,QACA,QACA,UACA,UACA,UACA,UACA,uCACA,CAOA,mBACA,gCACA,CAaA,0BACA,6CACA,CAEA,uBAIA,EAHA,iBACA,iBACA,IAEA,YAEA,EADA,UAEA,IAEA,IAGA,OACA,KACA,IACA,CACA,CAQA,+BACA,cACA,gCACA,EAAM,cAON,kCAkBA,IACA,OACA,MACA,QACA,SACA,UACA,CAiCA,iBACA,iBACA,MACA,OAEA,kBACA,cACA,SACA,cAEA,aAGA,eACA,YACK,EACL,kBACA,CAGA,eACA,wBACA,kBACA,EAEA,aACA,CAOA,OACA,2BACA,YACA,UACA,EAEA,6BAKA,iBACA,SACA,KACA,sBAEA,IACA,IACA,KACA,oBACA,KACA,YACA,CAAa,EAEb,CACA,CAkBA,wDAIA,8CAIA,cAEA,IADA,mBACA,yBAKA,mBACA,eACA,IACA,IACA,cACA,WAAgB,aAAoB,EACpC,SACA,KAAgB,mCAAuC,kBACvD,GACA,eACA,kBACA,8CAGA,EADA,EACA,YACA,uBACA,kDAEA,GAEA,CACA,OACA,QACA,OACA,CACA,CAMA,eACA,WAAY,2BAAkC,EAC9C,GACA,WACA,WACA,WACA,YAEA,MAEA,OADA,iBACA,GAEA,qEAEA,OADA,mBACA,CACA,CAEA,uBACA,0DACA,qDAKA,IACA,YACA,kBACA,wBACA,oDACA,qBACA,6BACA,uDACA,uBACA,kCACA,4DACA,yBACA,iCACA,+DACA,gCACA,8BACA,wCACA,2CACA,4CACA,wFACA,2CACA,qCACA,iFACA,uCACA,wCACA,oBAGA,uBAFA,MACA,KACA,eAFA,MACA,KAGA,cAEA,eADA,OACA,EAEA,eAEA,oBADA,OACA,IAEA,iBACA,oBACA,UACA,8BAEA,oCACA,CAAK,CACL,wCACA,iBAGA,qBACA,WAEA,oBACA,oCAEA,oBACA,sCAEA,wCAEA,6EACA,EAEA,eACA,0BACA,mBACA,iEACA,CACA,QACA,CACA,eACA,mBAAoD,GAAK,GAEzD,eACA,mBAAoD,GAAK,sCACzD,CAEA,QACA,IACA,IACA,cACA,SACA,UACA,CACA,IACA,QACA,cACA,kBACA,CA+EA,WAWA,mBACA,OAXA,cAEA,uBADA,SAEA,YAKA,OAJA,IACA,6BACA,aAEA,EACA,EAEA,cACA,CAEA,QACA,UACA,aAEA,mBAKA,EAJA,SACA,UAEA,gCAEA,IACA,mBAoCA,EAnCA,mEACA,kBACA,iBAkCA,SADA,EA/BA,EA+BA,SA/BA,CA+BA,gCA/BA,CA+BA,YACA,GAhCA,IAgCA,WAhCA,IAiCA,GAjCA,EAiCA,WAjCA,EAiCA,EAjCA,EAmCA,CAlCA,CACA,sBACA,uDACA,GACA,WACA,wBACA,uBACA,EAEA,OADA,2CACA,SACA,CAAK,CACL,0BACA,MACA,IAGA,CACA,EACA,EACA,EACA,EACA,GACA,GACA,UARA,qDAQA,cACA,4BAEA,EACA,CACA,EAQA,QACA,aACA,EAyEA,2BACA,uBACA,iBACA,MACA,SAEA,mBACA,uBAAoC,IAAO,KAC3C,WACA,kCACA,CACA,QACA,CACA,yBACA,mBACA,cAEA,cACA,CACA,SACA,iBACA,sBACA,uCACA,mCACA,kBACA,iBACA,gEACA,iBACA,aACA,YACA,WACA,QACA,aACA,YACA,CACA,WACA,4DACA,QACA,eACA,eACA,WACA,EACA,cACA,uDACA,+CACA,mCACA,mBACA,kBACA,eACA,aACA,mBACA,EACA,4BACA,kBACA,kBACA,gBACA,gBACA,mBACA,kBACA,eACA,iBACA,gCACA,iBACA,aACA,CACA,SACA,mBACA,CACA,OACA,iBACA,CACA,cACA,iBACA,CACA,cACA,iBACA,CACA,eACA,iBACA,aACA,QACA,2BACA,KACA,WACA,WACA,CAAa,CACb,KACA,cACA,MACA,cACA,cACA,MACA,gBAA+C,MAE/C,OACA,CAAiB,CACjB,OACA,SACA,CACA,CACA,CAAS,CACT,CACA,SACA,qBACA,CACA,CACA,eACA,mCACA,2BACA,OACA,uBACA,CAAK,CACL,aACA,eACA,aACA,CACA,CAAC,EAjVD,YACA,mBACA,aACA,aACA,sBACA,UACA,YACA,YACA,UACA,WACA,CAAK,EACL,wBACA,aACA,cACA,2DACA,CAAK,EACL,oBACA,QACA,aACA,aACA,CAAS,CACT,SACA,cACA,aACA,CACA,CAAK,EACL,yBACA,qBACA,CAAK,EACL,qBACA,QACA,WACA,YACA,CACA,CAAS,CACT,QACA,WACA,UACA,CACA,CAAS,CACT,MACA,YACA,QACA,kBACA,CAAiB,CACjB,SACA,eACA,UACA,CACA,CACA,CAAS,CACT,MACA,YACA,QACA,gBACA,CAAiB,CACjB,SACA,eACA,gBACA,SACA,CACA,CACA,CACA,CAAK,CACL,EAEA,YACA,gBACA,eACA,SACA,MACA,QACA,SACA,MACA,CACA,CAAK,CACL,EA0EA,YACA,eACA,WACA,UACA,WACA,eACA,eACA,QACA,MACA,WACA,YACA,mBACA,aACA,aACA,6BACA,yBACA,SACA,CAAS,CACT,QACA,WACA,QACA,aACA,OACA,CAAS,CACT,OACA,WACA,QACA,SACA,MACA,QACA,CACA,CAAS,CACT,OACA,cACA,eACA,UACA,kBACA,mBACA,UACA,WACA,YACA,kBACA,cACA,8BACA,QAAqB,CACrB,QAAqB,CACrB,eACA,kBACA,qBACA,0CACA,iBACA,CACA,CAAK,EACL,0CACA,+CACA,iDACA,0CACA,oBACA,aACA,6FACA,gEACA,CAAK,EACL,qBACA,iBACA,CAAK,EACL,0BACA,qDACA,mCACA,CAAK,CACL,EA0HA,EAeA,uBACA,WAQA,OAPA,IACA,8BACA,WAEA,KACA,MAEA,CACA,CAoDA,mBACA,gCACA,2BACA,8BACA,CAGA,iBAEA,CADA,yBACA,OAGA,mBACA,kCACA,WACA,CACA,qBAEA,gBACA,CAEA,2BACA,gBACA,mBACA,aACA,WACA,YACA,0BAEA,+BADA,kBACA,mCACA,SACA,iBACA,YACA,uDACA,YACA,MACA,CAEA,uBAIA,OADA,cACA,GAEA,QACA,EACA,4BAEA,kBAEA,cACA,KACA,gBACA,UACA,0CACA,MACA,0CACA,MACA,0CACA,cACA,KACA,mBAQA,SAEA,iBADA,QAEA,6BACA,mBACA,6BACA,2BACA,wBACA,wBACA,2BACA,cACA,KACA,YACA,OACA,iBACA,UACA,wBACA,KACA,CACA,KACA,eACA,wBACA,gBACA,gBACA,wBACA,kBACA,kBACA,kBACA,kBACA,cACA,KACA,gBACA,KACA,aACA,wBACA,gBACA,gBACA,wBACA,kBACA,kBACA,kBACA,kBACA,KACA,YACA,wBACA,gBACA,gBACA,wBACA,kBACA,kBACA,kBACA,kBACA,MACA,wBACA,gBACA,gBACA,wBACA,kBACA,kBACA,kBACA,kBACA,KACA,YACA,sBACA,gBACA,kBACA,kBACA,KACA,YACA,cACA,kDACA,KACA,QACA,aAEA,CACA,SACA,iBACA,WAEA,CAOA,mBAEA,OADA,QACA,EAD4B,EAC5B,2DACA,CACA,iBACA,SACA,cACA,mDACA,QACA,CACA,eACA,WACA,CAGA,uBACA,MACA,yBAEA,iBACA,kBACA,gBACA,eACA,EAAM,oBACN,kBAEA,kBAEA,iBACA,CAGA,qBACA,MACA,yBAEA,wFACA,CAgDA,0BAAwD,MAKxD,IAJA,eACA,EACA,CACA,sCAKA,IAHA,SACA,gBACA,EAtDA,aAsDA,EArDA,UAqDA,EArDA,iCAEA,gBAmDA,EAlDA,mBAEA,SACA,sBAEA,aACA,0BAEA,gBACA,gCA0CA,IAAe,WAAkB,IACjC,OACA,YACA,SApBA,KACA,kBACA,oBACA,0CACA,aACA,EAeA,cAEA,IACA,eACA,8BAEA,mBACA,4BAEA,gCAEA,6BACA,SAtDA,WACA,iCAOA,uBACA,4BACA,6BACA,8BACA,+BACA,2BACA,2BACA,cACA,iCACA,cACA,cACA,UACA,CACA,EAiCA,WACA,wBAEA,WACA,CAKA,iBACA,MAAY,wBAA0B,EAEtC,mDAEA,6BAEA,6DAEA,gCAEA,iEAEA,2BAEA,uDAEA,uBACA,CAEA,8CACA,2EA0BA,YACA,iBACA,SACA,QACA,qBACA,4CACA,eACA,cAEA,QACA,CAQA,eACA,aACA,QACA,UACA,WACA,QACA,CAAK,CACL,CAOA,eACA,aACA,UACA,WACA,aACA,cACA,CACA,CAQA,eACA,YAGA,OAFA,uBACA,wBACA,CACA,CAOA,iBACA,QACA,aACA,uBACA,qBACA,mBAEA,0BACA,uBACA,sDACA,UAEA,OACA,6BACA,WAxFA,cACA,uBACA,uBACA,aAGA,OADA,QACA,MACA,SACA,QACA,SACA,MAEA,CACA,UACA,EA0EA,iCACA,OACA,QACA,6BACA,SACA,EAEA,OADA,SArdA,CAqdA,GArdA,GAqdA,EArdA,UAqdA,EArdA,QACA,KAEA,CAkdA,EAldA,MAkdA,EAldA,eAkdA,EAldA,wBAkdA,EAldA,WAkdA,EAldA,OAmdA,CACA,CAWA,qBACA,IACA,MADA,KAEA,mBAAqC,IAAU,IAE/C,YADA,WAIA,mCACA,OACA,MAEA,oBACA,gBACA,MAEA,YAIA,OAHA,OACA,iBAEA,CAGA,CAeA,iBACA,wCACA,CAWA,iBACA,GACA,iBACA,WAgBA,OAfA,YACA,sBAcA,UAZA,CACA,8BACA,cACA,UACA,cACA,YACA,aACA,gBACA,KACA,EACA,OACA,EACA,CAGA,uBACA,YACA,CADiC,MACjC,QACA,CADiC,MACjC,QACA,CADoC,GAKpC,WACA,YAyOA,kBACA,MACA,eAEA,YADA,kBAEA,4BAGA,GAjPA,UAKA,gCACA,iDAIA,mBACA,6BAIA,WACA,kBAIA,WACA,MAIA,WACA,mCAGA,OAFA,YACA,KADkD,EAClD,QACA,CADiC,CAEjC,CACA,CAAK,CACL,CAQA,qBAWA,iBAVA,CACA,cACA,SACA,WACA,YACA,eACA,qBACA,0BACA,mCACA,EACA,CAGA,uBACA,YACA,CADiC,MACjC,KACA,CADgC,GAKhC,aACA,YA6DA,gBACA,WAAY,yCAA6D,EACzE,OAYA,CAZ8B,MAE9B,0BACA,GAWA,kBACA,WAAY,mCAA0C,EACtD,YACA,oEAEA,SACA,gBAMA,OALA,YACA,SAEA,wBAEA,CACA,EAxBA,UAEA,iBACA,YAsBA,SACA,WAAY,yCAA6D,EACzE,0BACA,2BACM,aAEN,QACA,6BAEA,aADA,KACA,IACA,kBACA,yBACA,CACA,CACA,QACA,EArCA,sBAEA,SAEA,sBAEA,CACA,GA5EA,QAKA,gCACA,yCACA,cACA,eACA,EAAc,6CAId,mBACA,0BAIA,WACA,iBAIA,YACA,mBAIA,cACA,OACA,KADiC,EACjC,KACA,CADiC,EAGjC,CAAK,CACL,CAGA,iBACA,cACA,YACA,CAAC,EACD,gBAAY,8DAAkG,EAC9G,OACA,UACA,aACA,YACA,2BACA,yBACA,CACA,CACA,0BACA,2FACA,mBACA,6CACA,YAEA,UAGA,OADA,OACA,CACA,CAkDA,yDAoBA,yBAvBA,EAwBA,oBACA,EAxBA,GADA,EAyBA,aAxBA,EAwBA,KAxBA,EAyBA,MACA,KACA,EACA,CACA,UACA,SACA,8BACA,UAGA,oBAEA,OADA,iBADA,GAMA,kBACA,GACA,UAQA,gBACA,qBACA,QACA,UAEA,kBACA,aAEA,EAEA,MACA,EAnBA,OACA,CACA,uBACA,QACA,WA5CA,WACA,gBACA,cACA,UAPA,EAQA,SACA,MARA,GADA,EASA,aARA,EAQA,KARA,EASA,4BAGA,QAEA,EAAU,iCAGV,WAEA,CACA,QACA,EA0BA,WAEA,QACA,CAsBA,iBACA,gBACA,MACA,SAEA,WACA,cACA,QAEA,CACA,CACA,eACA,cAIA,OAHA,GACA,oBAIA,GACA,cACA,eACA,0DACA,SAGA,oBACA,EAZA,YAEA,CACA,CAUA,yBAIA,MAHA,WAAY,GAAU,EACtB,KAAY,OAAY,cACxB,WAEA,QAA6B,EAA7B,EAAuC,IAEvC,IADA,MACA,CACA,MACA,oBACA,EAEA,QACA,CAEA,6BACA,uCACA,sBA+GA,mBACA,gCACA,CAyDA,cACA,8DACA,CAGA,eACA,mBAIA,OAHA,yCACA,WAEA,CACA,CAIA,mBACA,MAUA,MATA,oBACA,iBACA,qBAEA,2BAGA,IAEA,CACA,CACA,+DAIA,IACA,MACA,QACA,SACA,OACA,CACA,mBACA,SACA,aACA,YAAmB,IAAO,KAC1B,YACA,gCACA,CAGA,OAFA,uBACA,wBACA,CACA,CACA,gDA+BA,iBACA,gBACA,SAEA,WAAY,6BAAoC,EAChD,QACA,6BACA,kBACA,yBACA,GAAY,aAnCZ,kBAKA,IAJA,gBACA,qBACA,SAAY,aAAqB,EACjC,KAEA,oBACA,IACA,QACM,CACN,gCACA,mBACA,kBACA,IACA,CACA,OACA,IACA,IACA,KACA,CACA,EAe2B,KAC3B,qBACA,mBACA,OAAU,YAAkB,EAK5B,OAJA,IACA,mBACA,sBAEA,CACA,gCACA,gCACA,CACA,CA0BA,8BAuCA,mBACA,WACA,yBACA,uBACA,+BACA,4BACA,sBAIA,gDACA,kBAAiC,SAAa,IAC9C,iBAAgC,QAAY,KAE5C,6DACA,4BACA,WACA,UACA,gCACA,GAGA,CAKA,kBACA,SACA,IACA,OACA,cAEA,OADA,KACA,EACA,CACA,EACA,uCACA,yCACA,CAAM,SAEN,CACA,QACA,CAAC,GASD,iBACA,MA5LA,GA4LA,GA5LA,iBA4LA,GACA,kCACA,qBACA,CAIA,qBACA,OACA,kBACA,iBACA,CACA,CAGA,qBACA,OACA,kBACA,gEAEA,CAGA,qBACA,OACA,SACA,UAEA,GACA,SACA,UAEA,YACA,YACA,YACA,YACA,YACA,gBACA,CAyCA,uBAvCA,EAwCA,UAxCA,EAwCA,EAvCA,CACA,KACA,EAqCA,EArCA,IAEA,YACA,GACA,CAAS,CACT,aACA,aACA,EAEA,2BAEA,aACA,IAEA,kBACA,GAEA,GAGA,CACA,KACA,EAEA,aAAuB,CACvB,aACA,EAEA,aACA,IAEA,kBACA,CAEA,CAIA,CACA,iBACA,QACA,yBAEA,GACA,CAFA,kBAEA,8BACA,mCACA,CACA,yCACA,sBAEA,CACA,iBACA,aACA,2BACA,kDAEA,CAEA,qBACA,YACA,CACA,WACA,WACA,YACA,EAEA,CACA,WACA,mBACA,cACA,CACA,CACA,mBAA4B,+BAAqC,EACjE,OACA,UACA,QACA,qBACA,OACA,CACA,CA8BA,uBAaA,MAZA,MACA,OACA,EACA,CAEA,aAAY,iBAAgD,EAC5D,WACA,SAAY,yBAAiC,MAC7C,OAAY,wBAA8B,SAtC1C,WAKA,EAJA,IAAY,0BAAgD,EAC5D,SAAY,eAAuB,MACnC,WACA,OAAU,gBAAsB,EAEhC,MAGA,IAFA,KACA,KACA,IACA,EADA,GACA,oBAD2C,IAI3C,IACA,IAEA,KACA,IACA,CAIA,OAHA,KACA,OAEA,CACA,QACA,MACA,OACA,cAEA,EAU0C,OAC1C,KACA,KACA,OAEA,2BACA,2BACA,aACA,cACA,gBAAqC,KAAU,IAC/C,WACA,MAGA,cACA,IAGA,WACA,eACA,mBAEA,gBACA,WACA,QACA,MACA,OACA,QACA,OACA,CAAa,GACb,QAEA,IACA,KAWA,OATA,UACA,WACA,QACA,MACA,OACA,QACA,OACA,CAAS,GAET,CACA,CACA,iBACA,SACA,aACA,YAAmB,WAAqB,KACxC,yBACA,WACA,YAEA,CACA,QACA,CAkFA,4BACA,mBAGA,SAEA,SACA,4BACA,gBACA,CAAY,kCAAyC,IAAe,EACpE,WACA,KACA,IACA,aACA,IACA,oBACA,aACA,UAIA,IADA,KACA,aACA,KAEA,kBACA,KAEA,WACA,QACA,UACA,QACA,OACA,OACA,CAAa,EACb,IACA,OAEA,CACA,oBAGA,EADA,SADA,eACA,GAEA,UAA2B,SAAkB,KAC7C,aASA,CAuBA,cACA,MACA,SAEA,SACA,uBACA,OAGA,eACA,UAEA,cALA,CAMA,EACA,iDACA,EA9CA,wBACA,eACA,KACA,KACA,oBACA,gBACA,cACA,CAAa,IACb,IACA,kBAEA,IACA,GACA,CACA,OACA,iBAEA,CACA,QACA,EA3DA,SAFA,CAGA,CA2DA,eACA,OACA,kCACA,gCACA,wBACA,oCACA,kCACA,0BACA,0BAEA,CC1pFA,SACA,cACA,mBACA,qBACA,iBACA,qBACA,CACA,iBACA,qBACA,aACA,gBACA,QACA,kBACA,WACA,iCACA,CAAa,EACb,CACA,WACA,gBAGA,iBACA,cAAwB,GAAgB,iBACxC,eACA,mBACA,eACA,eAEA,CAAS,EACT,CACA,sBACA,QACA,iCAOA,EANA,+BACA,OAEA,cACA,aACA,KAEA,KAAkB,KAAQ,IAC1B,SACA,SACA,qBACA,sBAEA,UACA,OAEA,mBACA,SAGA,IACA,SACA,gCAEA,WACA,aACA,+BACA,cAEA,YACS,EACT,iBACA,OACA,kBAEA,CACA,aACA,mBACA,WAaA,OAZA,IACA,GACA,WACA,WACA,SACA,WACA,YACA,YAEA,EACA,YAEA,CACA,CACA,cACA,sCACA,CACA,SACA,aAGA,kCACA,CACA,OACA,uCACA,CACA,SACA,0BACA,IAGA,aACA,mBACA,4DACA,gBACA,CACA,WACA,kBACA,SAEA,gCACA,mCAKA,QACA,0BACA,uBACA,OAEA,cACA,aACA,KAAc,KAAQ,IACtB,aAEA,YACA,uCACA,CACA,UACA,6BACA,CACA,CACA,cAEA,qBACA,IACA,iBACA,SAEA,aACA,MAAmB,GAAK,OACxB,WAA+B,GAAK,OACpC,0CACA,CAAK,CACL,gBACA,SAEA,CACA,UACA,qBACA,WACA,EAAa,GAAO,CACpB,GADoB,CACpB,CACA,EACA,EACA,OACA,EACA,MAAqB,GAAO,CAC5B,GAD4B,GAC5B,CACA,EACA,EACA,CACA,iBACA,oCACA,aAAuB,EAAO,YAAgB,GAAO,OACrD,gDACA,kDACA,oBACA,eACA,aACA,aACA,WACA,qBACA,CACA,SACA,oBAEA,cACA,iBACA,iBACA,+BACA,gBACA,kBACA,eACA,kDACA,eACA,oBACA,SAAuB,GAAO,CAC9B,GAD8B,CAC9B,CACA,EACA,EACA,OACA,EACA,WAAyB,GAAO,CAChC,GADgC,GAChC,CACA,EACA,EACA,CACA,CACA,CACA,SACA,eACA,sBACA,gBACA,iBAEA,CACA,YAOA,EANA,oBACA,iBACA,aACA,aACA,aACA,WAGA,GADA,6BACA,eACA,kBACA,iBACA,MACA,CACA,QACA,kBACA,MACA,CACA,QACA,eACA,0CACA,+BACA,CACA,OACA,0CACA,2BACA,QACA,MACA,KACA,CAAa,CACb,CAAS,CACT,CACA,WACA,oBACA,qBACA,YAAuB,WAAqB,IAC5C,SAEA,CACA,CAEA,SACA,iBACA,cACA,yBACA,iBACA,CACA,aACA,IAAa,GAAQ,GACrB,EADqB,KAGrB,kBAA6C,GAAQ,WACrD,mBACA,0CACA,WACA,IAAiB,GAAQ,GACzB,EADyB,KAGzB,SACA,eACA,UAEA,CAAa,GAAO,8BACpB,EACA,cACA,iBACA,UAEA,CAAa,CACb,CAAS,CACT,CACA,qBACA,gBACA,WAwEA,KACA,MACA,OAEA,gBACA,OACA,YACA,MACA,CAOA,OANA,WACA,6BAAmD,IACnD,WACA,cACA,EAAS,EAET,CACA,EAxFA,KACA,MACA,SAEA,kCAOA,OANA,WACA,CAuDA,cACA,SACA,iBACA,YAAmB,WAAiB,KACpC,cACA,eACA,gBAEA,CACA,sBACA,EAjEA,mCACA,WACA,CAAa,MACb,CAAa,EAEb,CACA,CACA,2BAMA,EALA,uBACA,KACA,mCAAsE,CACtE,iBACA,aAEA,iBAAkC,KAAQ,KAC1C,WACA,qBACA,SAEA,kBACA,qCACA,QACA,CACA,WACA,OACA,WACA,MACA,kBACA,gBACA,QACA,CACA,CADkB,CAClB,QAEA,CACA,oBACA,OACA,QACA,CACA,uBACA,SACA,CACA,QACA,CACA,YACA,8BACA,mBACA,MACA,CACA,kCACA,YAEA,OADA,sBACA,EAEA,CACA,CA8BA,iBACA,uBACA,YACA,qBACA,qBACA,OACA,YACA,SACA,CACA,CAgCA,qBAGA,IAFA,SACA,8BAEA,mBAAuC,IAAU,IACjD,mBAEA,QACA,CACA,sBAAuD,MAGvD,QAFA,aACA,oBAEA,aAGA,mBAAmC,IAAU,KAE7C,IADA,WACA,GACA,SACA,SAEA,KACA,CAEY,GADZ,gBAC0B,WAA8C,GAAI,KAAY,GAAI,KAC5F,MAEA,CACA,SACA,CAcA,iBACA,2BACA,uCAgBA,qBACA,qDACA,iBACA,mBACA,eAGA,WACA,CACA,qBAQA,EAPA,UAAY,iBAA6B,EACzC,2BAAuD,CACvD,QAAY,oBAAyC,EACrD,SACA,SACA,GA5BA,EAAc,KAAc,GAAG,KAAc,GAAG,gBAAwB,EA6BxE,WAEA,YAAmB,IAAU,KAC7B,WACA,CAAgB,aAAmC,CAGnD,CADA,GADA,0BAA6D,CAC7D,IA1BA,gBACA,qBAA+D,CAC/D,qBAA6D,CAC7D,EAuBA,OACA,MACA,yBACA,4BACA,sCAA6E,CAC7E,KACA,CACA,CACA,iBACA,eACA,sDACA,CAuBA,iBACA,yBACA,0BACA,KAIA,aADA,eACA,CACA,gBACA,uCACA,MAEA,gBACA,6DACA,6BAGA,CACA,kCACA,8BAA6E,IAC7E,uCACA,cACA,WACA,CACA,UACA,0BACA,+BACA,iCACA,KACA,aACA,gBACA,aACA,wBACA,gCACA,iCACA,oBACA,iBACA,kBACA,wBACA,2BACA,uBACA,uBACA,4BACA,2BACA,qBACA,kBACA,sDACA,gDACA,iBACA,CACA,aACA,uBACA,iBACA,kBACA,0BACA,mBACA,0DACA,kLAEA,CACA,eACA,gBACA,qBAEA,YACA,CACA,aACA,iBACA,mBACA,oBACA,mCACA,YAAmC,GAAc,qBACjD,YAAmC,GAAc,qBACjD,YAAmC,GAAc,qBACjD,cACA,uBACA,sBACA,gCACA,+BACA,+BACA,+BACA,8BACA,CACA,aACA,4CAEA,UACA,4CACA,CACA,iBACA,4BAEA,kBACA,uBACA,sCAEA,QACA,qBACA,CACA,WACA,uBACA,YACY,GAAmB,iBAE/B,YACA,KAEA,CACA,aACA,wBACA,sBACA,aACA,GAAY,GAAQ,GACpB,EADoB,EACpB,gBAxMA,OAGA,MAFA,qBACA,kBAEA,mBAAmC,IAAU,IAC7C,OACA,MACA,IACA,MACA,EAEA,QACA,EA4LA,QACU,UACV,MACgB,GAAmB,QACnC,QADmC,EACnC,aACA,MACA,aAEA,2BACgB,SDvKhB,KACA,eACA,6BACA,MACA,CACA,oCACA,gBACA,cACA,OACA,WACA,EAEA,CACA,CAAK,EACL,eACA,sBACA,OACA,2BACA,gBACA,cACA,YACA,sBAMA,OALA,iCACA,yBACA,UAEA,CAAiB,EACjB,CACA,CACA,CAAS,CACT,CAAK,CACL,ECwIiC,QAEjC,kBACA,YACA,CACA,CACA,cACA,uBACA,kBACA,yBACA,uCAEA,CACA,yBACA,uBACA,oBACA,KACA,kBACA,iBACA,0BACA,oBACA,KACA,MACA,iBAEA,wBACA,qBACA,kBAEA,CACA,YACA,wBACA,iCACA,2CACA,oDACA,mCACA,uBACA,CACA,eAMA,MALA,IAAgB,uBAAmC,KACnD,QAAgB,cAAqB,EACrC,SACA,iCACA,sBAEA,sBACA,YACA,aACA,QACU,CAEV,EADgB,GAAO,MACvB,6BACuB,GAAQ,MAC/B,8BAEA,iCAEA,oCACA,QAAuB,IAAW,IAClC,sBACA,IACA,KACA,OAEA,IAGA,YACA,CACA,GACA,UAEA,CACA,gCAOA,IANA,WAAgB,YAAmB,EACnC,SACA,SACA,gBACA,QACA,WAEA,QAAiC,EAAjC,EAA2C,IAC3C,MACA,MACA,uBACA,mBACA,EAEA,QACA,CACA,4BAGA,MAFA,WAAgB,YAAmB,EACnC,WAEA,QAAiC,EAAjC,EAA2C,IAE3C,IADA,MACA,CACA,MACA,kBACA,iBACA,EAEA,QACA,CACA,6BAIA,MAHA,WAAgB,YAAmB,EACnC,UAAgB,sBAAiC,cACjD,WAEA,QAAiC,EAAjC,EAA2C,IAE3C,IADA,MACA,CACA,MACA,UAAgC,GAAgB,QAChD,KADgD,IAChD,CAAgC,GAAgB,OAChD,EAEA,IAHgD,GAGhD,CACA,CACA,aACA,mCAEA,kBACA,gCAEA,kBACA,iBACA,mBACA,YAKA,UAJA,CACA,cACA,sCACA,EACA,WACA,MACA,CAAS,CACT,CACA,+BACA,gBACA,iBACA,uBACA,OACA,WACA,kCAEA,wBACA,uBACA,CACA,mBAYA,IAXA,uBACA,YACA,0BACA,WACA,yBACA,qBACA,GACA,6BACA,8BAEA,CAAgB,aAAiC,SA5VjD,GACA,QAAY,mCAAuC,kBACnD,OACA,iCACA,iCAEA,EAsViD,GAEjD,aAEA,MADA,QACA,SACA,OAAoB,GAAc,oBAClC,CACA,QAAmB,MACnB,MAGA,qCACA,IAL6B,KAS7B,KACA,WAA8B,KAAQ,IACtC,SAGA,oCACA,MACA,CAEA,QACA,CACA,0BAGA,MAFA,+BACA,KAEA,mBAAyC,IAAU,IAEnC,GADhB,WAC8B,EAD9B,IAEA,UAGA,QACA,CACA,iBACA,QACA,CACA,oBACA,uBACA,WACA,WACA,oBACA,OACA,4CACA,2CACA,CACA,CACA,eArdA,MACA,QAqdA,uBACA,0BACA,SAtdQ,GAFR,EAwd4B,GAtdZ,IAsd0B,cAre1C,gBACA,UACA,SAEA,cACA,UACA,OACA,UACA,YACA,eACA,aAEA,EAyd0C,4CArd1C,QACA,UACA,WACA,UAEA,UAEA,CACA,MACA,QACA,SACA,OACA,eACA,EAycA,CACA,WACA,WAUA,EATA,gBACA,aACA,mBACA,aACA,cACA,KACA,qBACA,8BACA,uCAKA,IAHA,WACA,wBAEA,IAAuB,MAAmB,KAC1C,WACA,WAGA,YACA,UAEA,YAEA,CACA,QAAmB,WAAmB,IACtC,cAEA,CACA,cACA,2BACA,uHACA,CACA,sBA1YA,MA4YA,EADA,wBAEA,yCACA,+BACA,2BApYW,GAoYX,UApYwB,KAoYxB,GApYwB,CACxB,UACA,UAkYA,EAjYA,cACA,WACA,QA+XA,EA9XA,MA8XA,EA7XA,eACA,WACA,CAAK,CA2XL,GACA,yBACA,gBACA,qBACA,EAAU,GAEV,CADA,gCAnZW,GAmZX,UAnZwB,CAmZxB,aAnZwB,CACxB,UACA,eACA,aAJA,EAoZA,WA/YA,QACA,eACA,cACA,CAAK,CA4YL,GACA,UACA,kCAIA,OAFA,aACA,SACA,CACA,CACA,gCACA,gEACA,CACA,+BACA,+DACA,CACA,wCACA,mBACA,uBACA,UACA,OACA,4BAAoD,GAAO,GAC3D,CAD2D,EAC3D,EACA,eAEA,wBACA,0CACA,KACA,GAAe,EAAY,OAC3B,QACA,EACA,GACA,EACA,EACA,GACA,CACA,yCACA,cAAkC,GAAQ,aAE1C,4BADA,2BACA,GAKA,OAJA,YACA,YACA,6BAEA,CACA,CACA,8BAQA,EAPA,iBACA,uBACA,eAAsC,EAAW,EACjD,OACA,KACA,SAGA,6BACA,wBACA,4CACA,yCACA,4CACA,CACA,gCAIA,OAHA,iBACA,wBAEA,CACA,CACA,oBACA,aAGA,iEAA6E,IAC7E,CACA,oBACA,gDAEA,uBACA,0CACA,sBACA,2BACA,kCAEA,OADA,gCACA,CACA,gBACA,gBACA,CACA,CACA,uBACA,MACA,mBAEA,wCAEA,CACA,2BACA,WACA,6CAEA,CACA,mBACA,WACA,yBACA,yCACA,uCACA,CAAS,CACT,CACA,wBACA,+BACA,CACA,qBACA,+BACA,CACA,2BACA,+BACA,GACA,oCAEA,CACA,wBACA,+BACA,GACA,oCAEA,CACA,mBACA,iBACA,wBACA,gCACA,YAEA,mBACA,eACA,WACA,gBACA,GACA,gBAEA,IACA,8BACU,KACV,2BAEA,CACA,8BAIA,EAHA,uBACA,SACA,MAEA,MAEA,IADA,YACA,aAAoC,KAAU,IAC9C,WAEA,EAEA,IADA,KACA,IAAuB,IAAS,IAChC,8BAEA,eACA,aAEA,gBACA,GACA,kCAEA,CACA,yBACA,qBACA,uBACA,kBACA,2BACA,aACA,OAEA,CACA,kBACA,CACA,SACA,iBACA,2BACU,CACV,aACA,YACA,CACA,8BACA,cACA,EACA,CACA,CACA,cACA,uBACA,YACA,kBACA,gCACA,EACA,CACA,CACA,aACA,YACA,kBACA,+BACA,EACA,CACA,CACA,eACA,YACA,kBACA,EACA,EACA,CACA,CACA,mBACA,GACA,YACA,kBACA,EACA,EACA,EAEA,yBACA,GACA,YACA,kBACA,EACA,EACA,CAEA,CACA,iBACA,YACA,kBACA,EACA,iBACA,CACA,CACA,CA+FA,qBAMA,OALQ,GAAO,GAtBf,CAsBe,QAtBf,SACA,sBACA,kBACA,gBACA,gBACA,IACA,IACA,0BACA,IACA,KAEA,YACA,WACA,WACA,SACA,QACA,MACA,MACA,KACA,CACA,EAGA,SAEA,uBAEA,CACA,CACA,yBAMA,QALA,eACA,WACA,gBACA,QACA,KAEA,cAAyC,IAAU,IACnD,OACA,MACA,4BACA,oBAEA,QACA,CACA,eACA,iDAiEA,yBASA,EAFA,OAJA,EAFA,EAEA,GADA,EAQA,CADA,EAPA,SAQA,IARA,IAQA,EAPA,KAEA,SAGA,CAIA,mBACA,iCACA,CAIA,oBACA,uBACA,UACA,sBACA,sBACA,sBACA,iBACA,WACA,YACA,SACA,cACA,YACA,IACA,IACA,OACA,QACA,SACA,CAEA,CACA,SACA,WACA,QACA,SACA,gBACA,UACA,MACA,SACA,CACA,CAAa,CACb,SACA,cACA,cACA,CACA,CACA,EACA,4BACA,kBACA,CACA,wBACA,kBACA,CACA,6BAMA,QALA,IAAgB,mBAAmB,EACnC,UAAgB,sBAAiC,cACjD,mBACA,mBACA,KAEA,cAA6C,IAAU,IACvD,OACA,MACA,iBAA6C,GAAgB,QAC7D,KAD6D,CAC7D,IAAmC,GAAgB,oBAEnD,CACA,CACA,+BACA,qCACA,gBACA,iCACA,4BACA,4BAEA,CACA,iBACA,QACA,CACA,oBAEA,WAAgB,YADhB,iBAEA,oBACA,YACA,oEACA,OACA,uCACA,OACA,CACA,CACA,aACA,4BACA,mBACA,iBACA,8BAEA,UACA,uBACA,6CACA,CACA,wBACA,kBACA,OAAgB,sBAAuB,IAAa,KACpD,mBACA,mBACA,mBACA,eAAgB,oBAAkC,4BAClD,YAA2B,MAAmB,KAC9C,wBACA,KAAqC,GAAa,YAClD,OACA,MACA,EAAc,iCACd,qCACA,iBAA+C,SAC/C,GACA,aACA,YACA,gEACA,oBACA,oBACA,iCACA,iCAEA,GACA,wEAEA,+BArKA,kBACA,IA1BA,UA0BA,kBACA,KACA,OACA,kBACA,MACA,CACA,WACA,iBACA,OACA,SACA,UACA,OACA,EACA,MACA,CACA,UAAY,kCAAwC,CAxCpD,cACA,aACA,SACA,YAEA,SAmCoD,EAnCpD,EACA,WACA,SAEA,GACA,QACA,YAEA,UACA,SAEA,CACA,QACA,MACA,UACA,MACA,QACA,EAmBA,mBACA,wBACA,gBACA,IACU,mBACV,KAEA,kBACA,MAGA,kBACA,iBACA,EAwIA,SACA,SAzHA,iBAAwC,EAAgB,IACxD,wCACA,EAuHA,aACA,8BACA,CACA,CACA,gBACA,IAAgB,UAAU,iBAC1B,gFACA,oBACA,KACA,MACA,gCACA,sBACA,GAAgB,GAAa,aAC7B,QAEA,EACA,eACA,yBAGA,iEACA,gBAEA,aACA,MAMA,OAHA,UACA,eAEA,CACA,CACA,kBACA,wCAEA,sBACA,2BACA,6BACA,0BACA,CACA,gBAKA,IAJA,mBACA,mBACA,WACA,KAEA,wBAA4C,IAAU,IACtD,wDAEA,qBAEA,OACA,IAFA,GArWA,gBAIA,QAHA,eACA,WAbA,KACA,mBACA,mCACA,KACA,uBAAmD,IAAU,IAC7D,iDAEA,eAA4B,GAAY,mBACxC,CACA,sBAIA,UACA,YAEA,OACA,wBAGY,GAAO,IACnB,iCAEA,IACA,EACA,mBAAqC,IAAU,IAC/C,2BACA,IAGA,QADA,SACA,iBAA0C,IAAU,IACpD,uBACA,IAEA,QACA,EA6UA,GAGA,SACA,oBACA,gBACA,iCACA,QACA,kBACA,+CAEA,CACA,gCASA,IARA,IAAgB,oBAAe,sBAA2C,SAAa,wBAAqC,KAC5H,OACA,oBACA,YACA,QACA,YACA,IACA,6BAEA,QACA,MACA,KAEA,IACA,aACA,sBACA,OAA+B,GAAI,KAAY,GAAI,WACnD,MAEA,MAEA,SAAyC,YACzC,sBAOA,YADA,GAJA,EADA,gCACA,wBAEA,GAEA,GACA,OAnSA,EAoSA,EAnSA,MADA,EAoSA,GAlSe,GAAI,GAEnB,gCAgSA,EAhSA,KADA,EAiSA,EACA,OACA,SAEA,8BACA,0BACA,gBAGA,EADA,uBADA,eACA,IACA,EACA,OACA,gFAEA,CACA,8BACA,MAA6B,GAAI,+BACjC,KACA,IACA,CACA,OACA,OACA,OACA,OACA,YACA,CACA,CACA,kCAKA,IAJA,cACA,eACA,aACA,EAAgC,GAAc,uBAE9C,cACA,4CACA,0BAzYA,kBACA,eACA,OACA,kBACA,2BACA,sBACA,WACA,mCAEA,UACA,UAEA,8BAEA,OACA,MAFA,kBAEA,EACA,sBACA,OACA,CACA,EAsXA,kBAzZA,aAEA,IADA,qBASA,OAPQ,GAAa,IACrB,MADqB,CACrB,sBACA,oBAEA,MACA,KAEA,CACA,UACA,QACA,qBACA,CACA,EA0YA,SACA,oEACA,8BACA,6BACA,EAAU,IACV,kDACA,4BAEA,OACA,WACA,WACA,SACA,MACA,CACA,CACA,OACA,uBACA,WACA,SACA,WACA,IACA,KAAc,IAAU,IACxB,kCACA,oBAGA,CACA,CAEA,MAAM,WAAgB,GACtB,QADsB,EACtB,gBACA,UACA,sBACA,wBACA,YACA,SACA,cACA,YACA,IACA,IACA,cACA,SAEA,CACA,CACA,SACA,WACA,QACA,GACA,aACA,CAAa,CACb,GACA,aACA,CACA,CACA,CACA,cACA,4BACA,kBACA,CACA,4BACA,wCACA,YAAuB,WAAmB,IAC1C,wDAEA,QACA,CACA,wBACA,oCACA,YAAuB,WAAmB,KAC1C,aACA,aAAgC,GAAc,gDAC9C,CACA,QACA,CACA,yBACA,qCACA,YAAuB,WAAmB,KAC1C,aACA,aAAgC,GAAc,wDAC9C,CACA,QACA,CACA,iBACA,4BACA,IACA,qBAAqC,KAAQ,IAC7C,6DAEA,aACA,CACA,oBACA,uBACA,6BACA,QAAgB,YAAmB,EACnC,oBACA,0BACA,0BACA,YACA,OACA,eACA,oCACA,CACA,CACA,UACA,4BACA,mCACA,CACA,wBACA,kBACA,QAAgB,YAAmB,iBACnC,CAAgB,kCAAkC,4BAClD,SACA,SACA,YAA2B,MAAmB,KAC9C,WACA,wBACA,KACA,2DACA,kDACA,2BACA,IACA,mEACA,GACA,sBAGA,2BACA,CACA,CACA,+BACA,wBACA,sCACA,YACA,mBAAqC,IACrC,UACA,EAAa,EAEb,eAKA,MAJA,cACA,aAEA,UAAyB,GAAc,gBACvC,CACA,CACA,CAgCA,MAAM,WAAkB,GACxB,UADwB,UACxB,QACA,UACA,sBACA,sBACA,WACA,iBACA,eACA,CAAS,CACT,YACA,SACA,cACA,YACA,gBACA,WACA,cACA,cACA,aACA,IACA,IACA,SACA,cACA,UAEA,CACA,CAAS,CACT,aACA,WACA,kBACA,cACA,UACA,aACA,SACA,aACA,6BACA,0FACA,SACA,WACA,cACA,SACA,QACA,QACA,kBACA,aACA,uCACA,IAAoC,mBAAU,YAAyB,iBACvE,4BAEA,MADA,oBACA,uBACA,OACA,OACA,4BACA,0BACA,YACA,wBACA,aACA,+BACA,OACA,CACA,CAA6B,CAC7B,CACA,SAEA,CAAiB,CACjB,eACA,sCACA,gBACA,CACA,CACA,CACA,cACA,KACA,WACA,4BACA,wBACA,wBACA,oBACA,mBACA,CACA,cACA,WACA,6BACA,mBACA,sBACA,gBACU,CACV,IAKA,IALA,WACA,GAAgB,GAAQ,OACxB,QAAwB,WAAgB,cACxC,MAA+B,GAAgB,OAC/C,CAEA,KAH+C,CAG/C,QAAiD,IAAU,IAC3D,iBAEA,CACA,CACA,eACA,OAAe,GAAS,yBACxB,CACA,oBACA,OAAe,GAAS,2BACxB,CACA,sBACA,MAAkB,GAAG,EACrB,CAAmB,GAAG,IACtB,QAAuB,kCAAqC,IAC5D,mFACA,8CACA,mBACA,wBACA,gBACA,iBACA,CAEA,OACA,WACA,iBACA,CACA,CACA,UAEA,cAAgB,GADhB,WAEA,mBACA,SACA,qEACA,+CACA,WAAgC,GAAY,0BAC5C,kCACA,eAAgB,cAA4B,2BAC5C,QAAgB,gCAAuC,SAhKvD,OACA,QACA,IACA,IACA,IACA,KAAwB,GAAG,CAE3B,MADA,EACA,EACA,WAFA,GAGA,WAHA,GAIA,cACA,cACA,WAAuC,GAAa,EANpD,EAMoD,8BACpD,WAAuC,GAAa,EAPpD,EAOoD,+BACpD,WACA,IAA6B,GAAO,KACpC,IAA6B,EAAE,MAC/B,IAA6B,EAAE,CAAG,GAAO,KACzC,UACA,UACA,WACA,UACA,CACA,OACA,SACA,SACA,UACA,SACA,CACA,EAmIuD,OAGvD,oBAFA,cACA,gBACA,KACA,EAA4B,GAAW,uBACvC,kBACA,4CACA,kBACA,iBACA,8BACA,2DACA,kDACA,mCACA,CACA,oBACA,mBACA,mBACA,kCACA,sGACA,EAEA,2CAA6E,GAAG,CAEhF,4BAaA,EAZA,kBACA,aACA,cAEA,EADA,UACA,UACA,qBACA,qBACA,oBACA,uBACA,uBACA,eAAgB,oBAAkC,4BAClD,sBAEA,QAAmB,IAAW,IAC9B,4BAEA,QAAuB,MAAmB,KAC1C,+BACA,OACA,GACA,iBACA,iBACA,aACA,aACA,gBACA,cACA,aACA,EACA,GACA,qEAEA,KACA,2BACA,CACA,CACA,qBAIA,EAHA,uBACA,SACA,IAEA,QAAmB,WAAqB,KACxC,0BACA,6DACA,gBAEA,CACA,QACA,CACA,0BACA,oCACA,eACsB,cAAH,GAEnB,CACA,CACA,oBACA,uBACA,aACA,oBACA,EAAsB,GAAY,+BAClC,OACA,eACA,OACA,CACA,CACA,qBACA,IAEA,UAFA,IACA,aAEA,MACA,kCAA0D,IAAU,IACpE,0BAEA,EADA,wBACA,KACA,eACA,KACA,CACA,CAEA,MACA,SAEA,mBAAuC,IAAU,IAEjD,WADA,kCACA,aACA,uDAGA,QACA,CACA,gBACA,QACA,uBAA2C,IAAU,KACrD,wCACA,0CACA,CACA,QACA,CACA,wBACA,QACA,YAAuB,IAAkB,IACzC,gCACA,4BAGA,QACA,CACA,kBACA,gBAAwB,GAAc,wCACtC,CACA,gCACA,oEACA,CACA,CAEA,MAAM,WAAc,GACpB,MADoB,CACpB,iBACA,UACA,0BACA,wBACA,YACA,WACA,SACA,WACA,QACA,SACA,eACA,CAAa,CACb,SACA,aACA,CACA,CACA,EACA,aACA,4BACA,2BACA,kBACA,CACA,UACA,uBACA,CAAgB,gCAAgD,EAChE,iCACA,OAAc,WAAiB,GAAkC,MACjE,mBACA,kBACY,GAAmB,KAC/B,IACA,OAF+B,GAE/B,EAEA,oBACA,2BACA,4BACA,WACA,0CACA,wBACA,kBAEA,+BACA,6BACA,YACA,SACA,CAAS,IACT,4BACA,CACA,wBACA,kBACA,QAAgB,kCAAyC,iBACzD,eAAgB,oBAAkC,4BAClD,SACA,SACA,UAAgB,aAAsB,aACtC,EAA6B,GAAQ,8BACrC,gDACA,MACA,WACA,2BACA,YAAuB,IAAiB,KACxC,WACA,SACA,cACA,UACA,QACA,CACA,wBACA,EAA6B,GAAa,MAC1C,IAD0C,EAC1C,4BACA,gFACA,8BACA,kCACA,IACA,WACA,iBAEA,GACA,qEAEA,GACA,4BAEA,GACA,CACA,CACA,iBACA,uBACA,YACA,sCACA,oBACA,SAKA,WAFA,6CACA,gEACA,EAJA,CAKA,CACA,OACA,uBACA,kEACA,YACA,CACA,CAEA,MAAM,WAAmB,GACzB,WADyB,UACzB,QACA,UACA,sBACA,WACA,iBACA,eACA,CAAS,CACT,YACA,SACA,cACA,YACA,IACA,IACA,aACA,WACA,cACA,cACA,CAEA,CAAS,CACT,cACA,YACA,SACA,WACA,cACA,SACA,QACA,QACA,kBACA,aACA,uCACA,IAAoC,mBAAU,YAAyB,iBACvE,4BAEA,QADA,kBACA,uBACA,OACA,OACA,4BACA,0BACA,YACA,wBACA,aACA,+BACA,OACA,CACA,CAA6B,CAC7B,CACA,SAEA,CAAiB,CACjB,eACA,sCACA,gBACA,CACA,CACA,CAAS,CACT,QACA,GACA,oBACA,YACA,UACA,CAAiB,CACjB,eACA,MACA,WACA,CAAiB,CACjB,aACA,UACA,CAAiB,CACjB,YACA,CACA,CACA,cACA,KACA,WACA,wBACA,uBACA,CACA,oBACA,uBACA,aACA,oBACA,EAAsB,GAAY,iCAClC,OACA,eACA,OACA,CACA,CACA,yBACA,OAAe,GAA2B,mBAC1C,CACA,IAF0C,GAE1C,GACA,4BACA,qBACA,mCACA,CACA,YACA,uBACA,GACA,6BACA,8BAaA,OAXA,uBACA,2BACA,4CACA,SACA,UAEA,SACA,UAGA,CAAS,EACT,CACA,CACA,gBACA,iBACA,cACA,YAEA,WADA,wCACA,KACA,4DACA,kCACA,iCACA,mCACA,CACA,4BAUA,EATA,kBACA,aAEA,EADA,UACA,UACA,0BACA,YACA,YACA,wBAAiE,EAAE,CACnE,IAEA,kCACA,QAAmB,IAAW,IAC9B,6BAEA,QAAuB,MAAmB,KAC1C,WACA,IACA,8BACA,gFACA,IACA,IACA,gBACA,MAEA,iBACA,SAGA,OACA,IACA,IACA,cACA,cACA,aACA,WACA,6DACA,EACA,2BACA,CACA,CACA,uBACA,uBACA,IAMA,OALA,uBACA,8DACA,GAEA,CAAS,EACT,CACA,CACA,qBACA,uCAAqD,GAAS,+CAC9D,CACA,CAEA,MAAM,WAAsB,GAC5B,KADmB,EACnB,cAD8C,EAE9C,UACA,SACA,WACA,kBACA,aACA,EAGA,MAAM,WAAe,GACrB,OADqB,GACrB,eACA,UACA,0BACA,wBACA,cACA,YACA,UACA,MACA,YACA,CACA,CACA,CACA,mBACA,cACA,QACA,GACA,mBACA,CACA,CACA,EACA,oBACA,8BACA,oBACA,OACA,uBACA,sCACA,CACA,CACA,yBACA,OAAe,GAA2B,mBAC1C,CACA,IAF0C,GAE1C,GACA,uBACA,YACA,aACA,uBAEA,GADA,WACA,cACA,0CACA,wBACA,kBAEA,OACA,SACA,8BACA,SACA,EACA,gCACA,CACA,mCACA,CACA,wBACA,8BACA,cACA,YAA2B,MAAmB,KAC9C,WACA,wDACA,oDACA,kBACA,kBACA,GACA,IACA,IACA,cACA,wBACA,SACA,EACA,2BACA,CACA,CACA,CAEA,MAAM,WAAiB,GACvB,SADuB,CACvB,iBACA,UACA,sBACA,wBACA,YACA,OACA,SACA,WACA,aACA,YACA,CAAS,CACT,QACA,GACA,aACA,CAAa,CACb,GACA,aACA,CACA,CACA,EACA,oBACA,uBACA,6BACA,QAAgB,YAAmB,EACnC,oBACA,0BACA,0BACA,OACA,eACA,sBACA,CACA,CACA,UACA,uBACA,CAAgB,WAAqB,EACrC,iCACA,CAAc,iBAAiB,GAAkC,OAOjE,GANA,kBACA,CAFiE,GAEjE,cACY,GAAmB,KAC/B,IACA,OAF+B,GAE/B,EAEA,uBACA,IAAoB,sBAA4B,CAChD,qBACA,2BACA,4BACA,WACA,0CACA,gCACA,6BACA,YACA,SACA,CAAa,GACb,CACA,4BACA,CACA,cACA,aAAgB,GAAY,cAC5B,4BACA,iEAEA,mBACA,CACA,wBACA,kBACA,QAAgB,kCAAyC,iBACzD,sCACA,2BACA,2BACA,SACA,SACA,UAAgB,aAAsB,aACtC,EAA6B,GAAQ,8BACrC,gDACA,2BACA,YAA2B,MAAmB,KAC9C,WACA,oBACA,SACA,EAA6B,GAAa,MAC1C,IAD0C,EAC1C,4BACA,gFACA,8BACA,kCACA,IACA,WACA,iBAEA,GACA,qEAEA,GACA,4BAEA,GACA,CACA,+BACA,CACA,iBACA,uBACA,aACA,2BACA,QACA,qBAAyC,KAAQ,IACjD,6DAEA,aACA,CACA,gBACA,6CACA,SAKA,WAFA,6CACA,gEACA,EAJA,CAKA,CACA,CAkBA,SAAa,KACb,SADqB,GACrB,kFACA,CAMA,SAUA,mBACA,6BACA,CACA,OACA,gBACA,kBACA,CAEA,QACA,UACA,OAAe,IACf,CACA,QACA,CAHuB,MAGR,IACf,CACA,SAFuB,OAGR,IACf,CACA,MACA,GAHuB,IAGR,IACf,CACA,OACA,EAHuB,KAGR,IACf,CACA,SAFuB,CAGvB,OAAe,IACf,CACA,QACA,CAHuB,MAGR,IACf,CACA,CACA,QACA,QACA,EA2BA,uBACA,uCACA,OACA,uBAA2C,IAAU,KACrD,UAAgB,UAAgB,KAChC,IAAgB,QAAW,SA9B3B,SACA,eAAY,oBAA+B,EAC3C,uBACA,wCACA,uBAAqD,GAAgB,GACrE,MACA,CAFkE,EAAe,IAEjF,SACU,qBACV,WACA,+CACA,MACA,iBACA,aACA,OACA,QACA,QAEA,CACA,CACA,CACA,OACA,KACA,aACA,CACA,EAM2B,YAC3B,YAAwB,KAAS,KACjC,WACA,QACA,QAEA,CACA,CACA,CAUA,uBACA,eACA,yBAeA,SAZA,gBACA,IAAkC,GAAc,mBAGhD,sBACA,QACA,UACA,eACA,OACA,CAAa,CAEb,EACA,IAdA,CAgBA,CA0DA,6BAxDA,SAyDA,sBAGA,oBAvCA,aACA,SACA,EArDA,YACA,0BACA,sBACA,qBAGA,0BAFA,sBAEA,YADA,sBACA,GACA,CACA,EA6CA,GACA,2BA8BA,OADA,SA5BA,gBACA,2BACA,SACA,OAEA,0BAEA,IADA,yBACA,GACA,OAEA,YACA,MACA,GACA,CACA,UACA,eACA,OACA,EACA,CACA,KACU,OACV,QACA,UACA,eACA,OACA,CAAa,CAEb,GAEA,CACA,EAKA,cA5DA,KAkBA,GA0CA,MA3DA,gBACA,eAAgB,cAAyB,YACzC,aACA,WACA,CAuDA,GAtDA,CAAgB,SAAS,GAAmB,GAC5C,MACA,EAoDA,EApDA,CACA,CAAS,EACG,GAAa,QACzB,QACA,UACA,eACA,OACA,CAAa,CAEb,GAEA,GAuCA,GAIA,uBACA,SACA,gCACA,WAWA,CAVA,mBACA,eACA,QACA,UACA,eACA,OACA,CAAa,EACb,0BAEA,CAAK,EACL,OACA,GAEA,CACA,CACA,QAEA,OACA,eACA,MAA6B,GAAmB,KAChD,WADgD,GAEhD,yBACA,6CACA,YACA,UAGA,6CACA,iBACA,YACA,YACA,QACA,UACA,qBACA,OACA,CAAqB,CAErB,CAAa,EACb,GAbA,EAcA,CAAS,CACT,iBACA,MAA6B,GAAmB,KAChD,WADgD,IAEhD,yBACA,6CACA,eACA,wBACA,2BACA,KACA,YAA+B,WAAiB,IAChD,QACA,aACA,eACA,OACA,CAAqB,CAErB,CACA,QACA,CAAS,CACT,eACA,MAA6B,GAAmB,KAGhD,WAHgD,CAGhD,EAFA,aAEA,EADA,uBAEA,CAAS,CACT,iBACA,MAA6B,GAAmB,KAChD,WADgD,IAEhD,yBACA,gCACA,CAAS,CACT,WACA,MAA6B,GAAmB,KAChD,WADgD,CAChD,oBACA,CAAS,CACT,WACA,MAA6B,GAAmB,KAChD,WADgD,CAChD,oBACA,CACA,CACA,EAEA,QACA,OACA,MACA,QACA,SACA,CACA,iBACA,6BACA,CACA,iBACA,0DACA,CACA,iBACA,sBACA,YACA,QACA,6DACK,CACL,CA0EA,qBACA,8CACA,CACA,iBACA,4BACA,+BACA,qCACA,iCACA,CAmEA,yBAEA,YADA,SAEA,uBAA+C,IAAU,KAEzD,GADA,SACA,KACA,2CA5BA,KACA,mBAaA,OAZA,YACA,OACA,OACA,MACA,QACA,QACA,EAIA,OAHA,cACA,wBACA,CAAS,EACT,CACA,EACA,GACA,OACA,QACA,EACA,MACA,SACA,CACA,EAOA,iBACA,SAAgB,WAAgB,SAzEhC,SACA,QAAY,SAAa,EACzB,eACA,IAAS,GAAQ,IACjB,CADiB,CACjB,MACA,eAEA,mBACA,OACA,OACA,CACA,uDACA,sBACA,aAEA,cACA,qBAEA,sDACA,mDACA,UACA,UAGA,OAFA,MACA,MACA,cACA,OACA,OACA,EAAM,CACN,OACA,OACA,CACA,EA0CgC,SAChC,eACA,OACA,YACA,SAEA,CACA,wBACA,CACA,uBACA,QACA,SACA,YACA,aACA,UACA,UACA,CACA,qBACA,gBACA,CAAU,SAAS,EACnB,gBACA,YACA,eACA,QACA,SACA,QACA,EACA,4BACA,iBACA,YACA,mBACgB,GAAO,UACvB,YAEA,WACA,6CAEA,4BAEA,UACA,YACA,YACU,IACV,YACA,kBACgB,GAAO,UACvB,YAEA,WACA,6CAEA,2BAEA,UACA,YACA,SACA,CACA,CACA,MACA,KACA,CACA,QACA,YACA,SACA,aAEA,0BACA,6BACA,qBACA,gCACA,OACA,CACA,IACA,QACA,SACA,CACA,EACA,EAEA,eACA,CAAK,CACL,eACA,mCACA,SACA,mBAEA,CAAK,CACL,iBACA,sBACA,sBACA,kBACK,CACL,gBACA,MACA,OAEA,MAAwB,GAAS,0BACjC,wBACA,yBACA,EAvMA,YACA,MAxDA,gBAEA,YADA,SAEA,yBAA4C,IAAU,IACtD,OACA,EAAW,0BAA2B,oBAA6B,GACnE,QACA,QACA,MACA,MACA,4BACA,gBACA,aACA,aACA,CAAS,EAET,QACA,EAuCA,GACA,qCACA,sBACA,oBACA,qBACA,qBACA,YACA,YACA,OACA,WACA,uBACA,+CACA,4BACA,+BACA,gCACA,CACA,EAsLA,SACA,aACA,eACQ,GAAI,YACZ,mCACA,gBAEA,CAAS,EAET,qBACA,aACA,cACA,UACA,iBACA,kBACA,iBAPA,wEAQA,iBACA,CAAS,EACT,kBAA2C,IAC3C,KAAqC,GAAS,IAC9C,EAD8C,EAC9C,iBACA,aACA,IACA,IACA,SACA,QACS,IACT,WArPA,SAGA,MAFA,eAnBA,GACA,SACA,gBACA,UAAgB,uBAA6B,EAC7C,uBACA,SAEA,mBACA,QACA,SACA,SACA,MACA,EAAS,CACT,UACA,WACA,CACA,QACA,EAEA,GACA,cAAY,mBAAgC,EAE5C,mBAAsC,IAAU,KAEhD,aAAgB,GADhB,SAC4B,IAC5B,aACA,4BACA,cACA,kCACA,aAEA,UACA,oCAEA,CACA,QACA,EAmOA,eACA,qBACA,YACA,aACA,YA3KA,YACA,mBACA,cACA,4BAEA,OADA,QACA,CACA,CACA,cACA,eACA,WACA,WACA,EAkKA,GACA,uBACA,SACA,SACA,2BACA,aACA,YACA,UACA,iBACA,iBACA,WACA,WAEQ,GAAI,gBACZ,YACA,6BACA,kBACA,OACA,MACA,QACA,QACA,CAAa,CACb,CAAS,CACT,CACA,CAEA,UACA,qBACA,kBACA,QACA,CACA,yBACA,4BACA,sBACA,QACA,CACA,wBAGA,OAFA,yBACA,cACA,CACA,QACA,sCACA,CACA,CACA,cACA,QACA,CACA,gBACA,CACA,CAEA,oBACA,kBACA,gDACA,CACA,gBACA,sBACA,CACA,CAEA,kBACA,IACA,uBACA,sBACA,mBACA,0BACA,wBACA,wBACA,oBACA,wBACA,qBACA,EACA,uBAoCA,KAA6B,IAA4B,CACzD,UACA,EAAE,SAkBF,EApByD,CAoBzD,KACA,eACA,wBACA,QAGA,CACA,mBACA,eACA,2BACA,SACA,eAEA,EADA,2BACA,sBAEA,GACA,GAEA,CAAK,EAKL,OAJA,oBACA,aACA,UACA,CAAK,EACL,CACA,CACA,mBACA,eACA,2BACA,SACA,eAEA,EADA,6BACA,oBAEA,GACA,GAEA,CAAK,EAKL,OAJA,oBACA,aACA,UACA,CAAK,EACL,CACA,CACA,eACA,KACA,cACA,8BACA,SAGA,KACA,mBACA,+BACA,GAEA,CAAK,EACL,CAaA,mBACA,eACA,KAAgC,GAAc,GAC9C,MACA,EAF8C,KAI9C,MAAmB,GAAS,QAC5B,oBACA,OACA,iBACA,GAEA,CAAK,SACL,yBACA,WACA,sBACA,uBACA,gBAGA,MACA,CAAK,EAGL,OAFA,aAjCA,SACA,qCAEA,OA+BA,KACA,CACA,CACA,mBACA,GACA,eAEA,eAnCA,UAoCA,GAnCA,SACA,wCAoCA,CACA,mBACA,eACA,EAAkB,GAAS,IAC3B,EAD2B,KAC3B,OACA,WAtHA,KACA,yBACA,GAAY,OAAS,GAAqB,KAC1C,OACA,IAF0C,CAE1C,EACA,QACA,SACA,oBACA,mBACA,CACA,EA4GA,KAEA,CAAK,IAEL,OAhIA,gBACA,0BACA,EA6HA,OACA,CACA,CACA,oBACA,oBACA,iDACA,kBACA,SA5KA,KACA,cACA,2BACA,0BAcA,GAbA,OACA,SACA,SACA,QACA,OACA,kBACA,gBACA,aACA,CACA,CACA,EACA,6BACA,sCACA,OACA,MAA6B,GAAY,UACzC,aACA,WAEA,CACA,UACA,uBACA,4BACU,CACV,MAAkC,GAAY,WAC9C,aACA,YAEA,EAGA,EA0IA,KACA,GAEA,IACA,CACA,kBACA,eACA,UACA,SAEA,oBACA,CACA,SACA,QACA,aACA,WACgB,GAAa,GAC7B,OAD6B,UAC7B,IAEA,mBAEA,CAAS,EACT,kBAMA,OALA,2BACA,gBACS,EACT,gBACA,aACA,EACA,CACA,wBACA,8BACA,iCAA8D,CAM9D,EALA,CACA,UACA,UACA,SACA,CACA,OACA,cACA,CACA,yBACA,iCAA8D,CAC9D,OACA,IASA,CANA,EACA,UACA,UACA,SACA,EACA,KAvLA,gBACA,oCACA,CAqLA,EACA,OACA,YACA,CACA,sBACA,+BAEA,wBACA,OAAe,SD3pCf,SACA,YACA,iBACA,qCACA,uCACA,EAhCA,gBACA,QACA,2BACA,YACA,KAGU,CACV,gCACA,CAD4D,CAC5D,MACA,yBACA,kBACA,0BACA,6BACA,iCACA,kCACA,MAXA,gBACA,iBAYA,OACA,QACA,SACA,eACA,eACA,CACA,EAQA,OACA,OAAU,YAAkB,EAC5B,gCACA,6BACA,kBACA,mBACA,qBAgBA,OAdA,wBACA,+BACA,+BACA,gCACA,OAGA,YAEA,0BACA,yBAEA,iBADA,aACA,KAEA,CACA,QACA,QACA,CACA,EC4nC6B,QAC7B,CACA,cACA,MAA0B,GAAc,GACxC,QADwC,CACxC,iBACA,CACA,CASA,SACA,0BACA,qBACA,CACA,GACA,UACA,QACA,YACA,mBACA,MAAgB,OAAS,eACzB,IACA,IACA,IACA,OACA,IACA,GACA,CACA,CACA,WACA,OAAe,GAAQ,SAAY,GAAQ,OAC3C,CACA,cACA,uBACA,UAEA,YAEA,SAIA,OAHA,cACA,0CACS,EACT,CACA,CACA,CA0EA,2BAIA,MAHA,MAAkB,GAAc,KAChC,MADgC,CAChC,IAAyB,GAAc,sBACvC,IAQA,IANA,eACA,GAEA,IADA,OACA,iBAEA,IACA,KAEA,uBAEA,oBAAgC,IAAS,IACzC,QACA,aAEA,uBAGA,CAeA,kDACA,gDACA,2BACA,iBACA,SACA,aACA,WACA,IACA,KAAU,IAAS,KACnB,yBAEA,QACA,CAqCA,eACA,iCACA,CACA,iBACA,cACA,SAEA,MAAiB,GAAM,UACvB,EAAoB,GAAS,WAE7B,OADkB,GAAO,yBACzB,sBA6DA,oBACA,eACA,QACA,aACA,iBACA,oBACA,eACA,mBACA,gBACA,mBACA,iBACA,kBACA,kBACA,mBACA,eACA,OACA,QACA,MACA,QACA,EACA,qBACA,sBACA,uBACA,0BACA,wBACA,yBACA,iBACA,0BACA,gBACA,gBACA,mBACA,cACA,yBACA,sBACA,sBACA,eACA,kBACA,0BACA,wBACA,sBACA,uBACA,qBACA,qBACA,0BACA,0BACA,oBACA,oBACA,eACA,0BACA,oBACA,CACA,QACA,6CACA,iBACA,gCACA,gCACA,8CACA,6CACA,CACA,WACA,QACA,CACA,gBACA,aAAc,8CAAuD,KAKrE,OAJA,EAAmB,GAAe,4BAClC,EAAmB,GAAe,4BAClC,EAAwB,GAAe,4BACvC,EAAwB,GAAe,4BACvC,CACA,IAAiB,GAAe,KAChC,IAAiB,GADe,EACA,GAChC,OADgC,IACR,GAAc,GACtC,QADsC,GACd,GAAc,EACtC,CACA,CACA,OAHsC,GAGtC,GACA,IACA,EADA,KAAc,mCAAuC,qBAErD,QACA,OACA,MACA,KACA,EAEA,qCACA,uBAA4C,IAAU,IACtD,oCACA,GACA,sBAEA,GACA,sBAKA,OAFA,aACA,aACA,CACA,IAAiB,GAAe,EAAM,GAAe,MACrD,CADgC,GACf,EADoC,CACrB,EAAM,GAAe,KACrD,CACA,CACA,KAHqD,OAGrD,CACA,OACA,yBACA,uBACA,2BACA,4BACA,CACA,CACA,WACA,kBAEA,YACA,sBACA,oFAEA,sCAEA,OADA,+DAEA,CACA,eACA,eACA,yBACA,CACA,eACQ,GAAQ,2BAChB,KACA,CACA,CACA,cACA,gBAAgB,mBAAyC,aACzD,eACA,oBACA,gBACA,iBACA,+BACA,OACA,QACA,MACA,QACA,CAAS,IACT,gBACA,sBACA,yBACA,sBACA,2BACA,qBACA,0BACA,yFACA,yBACA,wBACA,2BACA,uBACA,YDzsEA,SCysEmC,CDzsEnC,MACA,QAAY,SAAa,EACzB,gBACA,wBACA,OACA,sBACA,UACA,CACA,ECisEmC,UACnC,2BAEA,wBACA,iCACA,uBACA,0BACA,0DACA,iBACA,oCACA,8BACA,mCACA,6CACA,WA3YA,cACA,sBACA,WAyBA,GACA,uBACA,gBAGA,2BAFA,oBACA,gBAEA,EA/BA,GACA,iCACA,2BA6CA,OAEA,IADA,SAEA,mBAAoC,IAAU,IAC9C,YACA,UAGA,QACA,EAtDA,MACA,WACA,OACA,SACA,KACA,OAEA,OAgDA,kBACA,IAEA,EAFA,IACA,OAGA,QADA,eACe,WAAkB,IACjC,QACA,aAEA,WAGA,EA7DA,WACA,EAEA,MAqBA,gBACA,eA4DA,OAEA,IADA,eAEA,OACA,SAEA,eAA8B,IAAS,IACvC,mBACA,SAGA,QACA,EAxEA,GACA,aACA,MACA,qBAEA,MDnpGA,gBAGA,EAFA,SACA,eAEA,QAAe,IAAU,IACzB,SACA,UACA,aAOA,OAJA,WACA,UAEA,yBACA,CACA,ECooG8B,GAC9B,yBAA8C,IAAU,KACxD,WACA,OACA,QAEA,CACA,oBACA,EAnCA,OACA,YACA,IACA,uCAEA,IADA,SAAuC,GAAa,YACpD,UAA+C,IAAU,IACzD,sBAGA,OADA,WAA6C,GAAa,iBAC1D,CACA,CAEA,OADA,UACA,CACA,EAiXA,iBACA,sBACA,sBAEA,GACA,uCAEA,iBACA,WACA,gBACA,kBACA,CACA,YACA,IACA,IADA,uBAEA,qBACA,YACA,eAEA,WACA,cACA,MAEA,mBACA,iBACA,sBACA,iBACA,8CACA,CACA,cACQ,GAAQ,0BAChB,KACA,CACA,CACA,sBACQ,GAAQ,kCAChB,KACA,CACA,CACA,gBACA,qBACA,yBACA,YACA,wBAEA,2BACA,WACA,yBAEA,mBACA,kBACA,oBACA,oBACA,CACA,qBACQ,GAAQ,iCAChB,KACA,CACA,CACA,cACA,8CACQ,GAAQ,iBAChB,KACA,CACA,CACA,mBACA,mCACA,CACA,uBACA,kBACA,kCACA,CACA,mBACA,mCACA,CACA,aACA,SAEA,kBACA,kCACA,CACA,8BACQ,GAAQ,0CAChB,KACA,CACA,CACA,0BAEA,MADA,yBAEA,mBAAwC,IAAU,IAClD,SACA,MAAyB,GAAQ,YACjC,QACA,EACA,EACA,MAEA,CACA,6BACQ,GAAQ,yCAChB,KACA,CACA,CACA,+BACQ,GAAQ,2CAChB,KACA,CACA,CACA,6BAOA,MANA,mBACA,UACA,8CACA,mBACA,gBACA,IAEA,qEACA,qBACA,MACA,CACA,4BACA,iBACA,mBACA,EAAyB,GAAW,oCAEpC,IADA,uCAEA,wBACA,0EACA,qBAEA,wBADA,EDhlHA,OCglHqC,OAAT,CAAS,WAAoB,GAAW,wCAAiE,GAAW,qBAAmD,GAAW,eAG9M,oBACA,CACA,8BACQ,GAAQ,0CAChB,KACA,CACA,CACA,iBACA,YACQ,GAAQ,wBAChB,KACA,CACA,CACA,MACA,OACA,QACA,QACA,EACA,OAAgB,WAAmB,yBAA0D,KAC7F,oBACA,sBACA,MACA,2BAQA,GAPA,GACA,sBACA,mBAEA,wBACA,iBAEA,8BACA,UAAwB,6BAAmC,sBAC3D,cACA,EAAqC,GAAS,oBAC9C,cACA,cACA,MACA,sCACA,8CACA,EAAkB,IAClB,sCACA,2CACA,CACA,+BACA,CACA,CACA,sBACA,GACA,uEACA,uBAEA,mBACA,yEAEA,CACA,2BACA,IAAgB,aAAS,aAAmB,YAAc,aAC1D,yBACA,6BACA,wBACA,wCACA,uDACA,IACA,IACA,EACA,GACA,YACA,eAEA,aACA,aAEc,YACd,UACc,UACd,UACc,cACd,YACA,aAEA,+DACA,+DACA,EAAU,IACV,iBACA,YACA,cACA,IACA,YACc,YACd,WACA,KAEA,oBACA,sBACA,CACA,CACA,iBACA,gBACA,iEACA,8DACA,oEACA,uEAEA,CACA,WACQ,GAAQ,uBAChB,KACA,CACA,CACA,eACA,SAAgB,cAAmB,aACnC,sCACA,CACA,aACA,6BAEA,6BAGA,IACA,IAHA,mCACA,2BAEA,eAAwC,IAAU,IAClC,GAAa,cAC7B,cACA,IACA,KAGA,iCACA,CACA,iBACA,uBACA,OACA,oCACA,aACA,YACA,YAEA,uFACA,CACA,QACA,CACA,8BAOA,sBANA,QAAgB,uBAAmC,KACnD,KACA,KACA,wBACA,IACA,IAEA,QAAmB,IAAY,MAU/B,GATA,aACA,kCACA,kBACA,cACA,OAAwB,CACxB,OAEA,eACA,MACA,GAA8B,IAAY,GAAO,GAGnC,CAHmC,GAG1B,GAAO,GAC9B,CAD8B,GAC9B,eAAgD,IAAU,IAEjC,GADzB,SACwD,CAAlB,EAAyB,KAC/D,EAAgC,GAAY,mBAC5C,KAGA,MAVA,EAAwB,GAAY,mBACpC,IAUA,UACA,UACA,gBACA,eACA,CA5iBI,GA6iBJ,CA7iBQ,SAGR,EAFA,WACA,aAEA,KAyiBA,EAziBA,CACA,QAAuB,IAAW,IAClC,oBAEA,aACA,CACA,CAAK,EAoiBL,mBACA,eACA,OACA,cACA,cACA,EAAa,CACb,OACA,WACA,YACA,YACA,aACA,SACA,SACA,CACA,CACA,oBACA,QACA,CACA,sBACA,UACA,CACA,qBACA,mBACA,wBACA,kBACA,KAEA,iCACA,CACA,sBACA,qBACA,QAEA,sCACA,OD5tHA,GC4tH0B,oBAAuB,GAAW,kBD5tH5D,aC6tHA,CACA,sBACA,wCACA,gCACA,CACA,eACA,iDACA,CACA,eACA,QAAgB,SAAa,KAC7B,8BACA,CACA,cACA,qBACA,qBACA,WACA,+BAlkBW,GAkkBX,UAlkBwB,KAkkBxB,GAlkBwB,CACxB,KAikBA,EAhkBA,MAgkBA,EA/jBA,WACA,CAAK,CA8jBL,CACA,CACA,qCA1kBW,GA0kBX,UA1kBwB,CA0kBxB,aA1kBwB,CACxB,MAykBA,KAxkBA,YACA,CAAK,CAukBL,CACA,CACA,YACA,yBACA,EAAoB,GAAS,oBAC7B,wBACA,wBACA,wBACA,uBACA,uBACA,yBACA,0DACA,CACA,aACA,iCACA,WACA,IAEA,uCACA,CACA,6BAiBA,QACA,gBAjBA,gBACA,aACA,eACA,MAAgB,uBAA4B,EAC5C,WACA,sBAEA,MADA,OACA,eACA,QACA,KACA,kCACA,sBACA,MACA,cACA,OAAmB,GAAW,MAC9B,EAD8B,GAI9B,UACA,iBACA,gBACA,MACA,aACA,gBACU,gBACV,cACA,QACA,gBACA,MACA,kBACU,cACV,gBACA,eACA,MACA,cACA,eACU,eACV,eACA,SACA,eACA,MACA,mBACU,YACV,gBACA,gCACc,GAAS,GAAQ,IAC/B,CAD+B,GAC/B,oBACA,OACA,6CACA,CACA,QACA,WAEA,GADA,OACA,CACA,EAAU,gBACV,gBACA,6BACc,GAAS,GAAQ,IAC/B,CAD+B,GAC/B,oBACA,OACA,6CACA,CAEA,EADA,QACA,EACA,SACA,UAEA,MAAsB,GAAc,yBACpC,6BACA,QAAmB,IAAiB,MACpC,yBACA,kBACA,kBACA,cACA,UACA,aACA,eACA,cACA,cACA,uBACA,8BAEA,IADA,GAjuBA,oBAOA,EANA,qBACA,kBACA,gBACA,cAEA,uBAEA,QAEA,EADA,MACA,kBACU,MACV,2BAEA,6BAGA,EADA,cACA,EAZA,IAYA,SAZA,IAYA,GAIA,QACA,EA2sBA,aAIA,EAA+B,GAAW,OAC1C,CAD0C,CAE1C,UAEA,UAEA,QACA,MACA,MACA,MACA,MACA,KACA,KACA,KACA,KACA,QACA,QACA,aACA,mBACA,YACA,YACA,iBACA,sBACA,CAAa,EACb,CAGA,OAFA,oBACA,oBACA,CACA,CACA,0BAYA,sBAXA,gBACA,eACA,UAAgB,WAAiC,EACjD,sBACA,aACA,OAAgB,mCAAyC,EACzD,aACA,MACA,SACA,GAA0B,GAAS,oBACnC,KAEA,WACA,aACA,gBACA,sCACU,gBACV,aACA,sCACU,eACV,sCACA,cACA,OACU,oBACV,sCACA,cACA,OACU,gBACV,gBACA,4BACc,GAAS,GAAQ,IAC/B,CAD+B,GAC/B,oBACA,OACA,4CACA,CACA,gCACA,EAAU,gBACV,gBACA,4BACc,GAAS,GAAQ,IAC/B,CAD+B,GAC/B,oBACA,OACA,0CACA,CACA,4CAEA,UACA,YACA,QACc,WACd,cAGA,4BACA,mBAAwC,IAAU,SAmDlD,EAjDA,EADA,KACA,MACA,uCACA,wCAEA,EADA,oCACA,WAEA,MADA,GAAwB,GAAO,eAC/B,EACA,UACA,oBACA,oBACA,IAwCA,GAvCA,GACA,IACA,cAEA,EADA,QACA,oCACsB,MACtB,oCAEA,UAKA,EAFA,UACA,kBACA,SACsB,aACtB,0BAEA,sBAGA,kBACA,IACsB,aACtB,uBAEA,qBAGA,GACA,QAEA,4BACA,uBAGA,IACA,aAGA,qBACA,MAAqC,GAAS,mBAC9C,eACA,cACA,UACA,WACA,UACA,aACA,OACA,KACA,cACA,IAEA,CACA,UACA,aACA,OACA,KACA,aACA,IAEA,CACA,GACA,OACA,MACA,gBACA,kBACA,sBAEA,CACA,QACA,QACA,OACA,aACA,SACA,WACA,QACA,cACA,cACA,YACA,eACA,aACA,EACA,EACA,CACA,UACA,CACA,CAAa,CACb,CACA,QACA,CACA,0BACA,aAAgB,WAAoB,aAEpC,GADA,CAA0B,GAAS,oBAEnC,+BAEA,eAQA,MAPA,kBACA,SACU,gBACV,UACU,mBACV,YAEA,CACA,CACA,+BAKA,EACA,EALA,IAAgB,6BAAoB,uBAAoC,aACxE,wBACA,MACA,iBAsDA,MAnDA,WACA,GACA,eACA,WACA,SACkB,cAClB,WACA,SAEA,UACA,QAGA,eACA,WACA,UACkB,cAClB,WACA,SAEA,SACA,cAGU,YACV,GACA,cACA,WACA,UACkB,cAClB,WACA,SAEA,SACA,QAGA,cACA,WACA,SACkB,cAClB,WACA,SAEA,UACA,eAIA,UAEA,CACA,YACA,GACA,CACA,CACA,oBACA,6BACA,OAEA,iBACA,8BACA,wBACA,CACA,MACA,eACA,gBACA,kBAGA,wBACA,CACA,aACA,OACA,mBACA,qBAGA,CACA,iBACA,QAAgB,2BAAiB,GAAmB,+BAAiC,KACrF,IACA,SACA,cACA,oBACA,YAEA,CACA,wBACA,wBACA,kCACA,SAGA,MADA,WACA,iCACA,KACA,iCACA,UAEA,CACA,CACA,gBAIA,IAHA,wBACA,WACA,2EAEA,YACA,mBAGA,SACA,oBACA,sBACA,gCACA,oCACA,cACA,kBACA,kBACA,WACA,YACA,EACA,aACA,mBAA4C,IAAU,KACtD,WACA,mBACA,GACA,OACA,OACqB,EACrB,OACA,OACqB,IAErB,aACA,GACA,QACA,QACqB,EACrB,QACA,QACqB,EACrB,kBACA,kBACA,4BACA,uCACA,CAAqB,CAErB,CAEA,CACA,iBASA,QARA,UAAgB,wBAAyB,WAAoB,KAC7D,kCACA,sBACA,MACA,OAEA,iDACA,oBAEA,qBACA,EAAiB,GAAW,mBAC5B,EAAiB,GAAW,oBAC5B,QAEA,EAAiB,GAAW,kBAC5B,EAAiB,GAAW,qBAC5B,OAEA,SACA,oBACA,sBACA,cACA,cACA,cACA,WACA,WACA,CACA,cAEA,IADA,mBACA,QACA,OAEA,eACA,2BAKA,aAJA,GACY,GAAQ,KAEpB,uBACA,CACA,gBACA,SAGY,GAAU,EAFtB,KAEsB,EAFtB,CAEsB,EADtB,aACsB,IACtB,CACA,GACY,GAAU,EAEtB,CACA,IAHsB,OAGtB,KAjkCA,EAkkCA,IAAgB,wBAAiB,sBAAiC,KAClE,cACA,OAEA,MAAqB,GAAM,QAC3B,EAAwB,GAAS,WACjC,UACA,gBACA,6BAA8D,GAAQ,IACtE,CADsE,EACtE,SACgB,GAAO,SACvB,qCAGA,SAEA,WAAgB,kCAAyC,SA5kCzD,aAIA,MAHA,QAAY,mCAAuC,EACnD,WAAY,YAAsB,EAClC,IAEA,MACA,MACA,qBAEA,GADA,EAAiB,GAAc,OACnB,GAAQ,CADW,EACX,CACpB,CADoB,GACpB,oBACA,OACA,8BACA,EAAU,IACV,EADU,aACV,uBAEA,UAEA,KACA,EAAM,IACN,GAAY,GAAQ,IACpB,CADoB,GACpB,oBACA,OACA,8BACA,EAAU,IACV,EADU,aACV,uBAEA,UAEA,EAAiB,GAAc,OAC/B,IAD+B,OAC/B,GAA0C,GAAU,EACpD,CACA,CAFiD,GAAU,EAE3D,CACA,SACA,SACA,WACA,UACA,CACA,EAsiCyD,YACjD,GAAU,gBAClB,cACA,WACA,WACA,WAvlCA,EAAe,GAulCf,GAtlCA,YADiC,EAulCjC,GAtlCA,CAslCA,GAtlCA,UAslCA,CAtlCA,GACA,UAEA,GAolCA,sBACA,aACA,EACA,EACA,CACS,CACT,CACA,QACA,oBAGA,sBACA,iBACA,kBACA,iBACA,mBACA,CACA,UACA,mBACA,wBACA,EAAmB,GAAc,qBACjC,EAAmB,GAAc,+BACjC,iDAUA,CACA,CACA,IACA,SACA,sBACA,iBACA,gBACA,CACA,CAAa,CACb,CACA,IACA,UACA,iBACA,CACA,CAAa,CACb,CACA,IACA,SACA,kBACA,CACA,EACA,CA9BA,CACA,CACA,IACA,SACA,YACA,CACA,EAyBA,CACA,+BAIA,IAHA,gDACA,qBACA,KAEA,mBAAwC,IAAU,KAClD,WACA,+BACA,SAEA,CACA,QACA,CACA,2BAEA,OAAe,GADf,GACqB,CADrB,8CACqB,KACrB,CACA,aACA,iDACA,oDACA,CACA,CAEA,SACA,mBACA,YACA,aACA,gBACA,8BACA,CACA,aACA,2EACA,CACA,gBAEA,EADA,8BAmEA,QAjEA,GAiEA,aAjEA,GACA,qBAEA,iBACA,OACA,mBACA,MACA,iDAEA,SAGA,OACA,SAwBA,OACA,MAAyB,GAAK,qBAC9B,EAAsB,GAAQ,SAAsB,CAC5C,GAAQ,OAChB,WACA,EACI,GAAQ,SACZ,iBACA,SAMA,KACA,2BACA,mBACA,UACA,GACA,EACA,qBACA,kBACA,UACA,cACQ,GAAQ,cAChB,CAAK,CACL,EAlBA,mBAEA,eACQ,GAAQ,yBAEhB,EArCA,OACA,eACY,GAAQ,4BALpB,CAQA,CACA,OACA,qBAEA,cACA,iBACA,OACA,aACA,QACA,YAEA,QAA2B,EAAQ,MACnC,OAAmB,EAAQ,OAC3B,eACA,OAAuB,EAAS,IAGhC,CACA,CAgCA,SACA,cACA,0CACA,oCACA,sCACA,gCACA,uBACA,iBACA,YACA,cACA,CAEA,UACA,wBACA,CACA,aACA,0BACA,CACA,qBACA,yCACA,CACA,kBACA,sCACA,CACA,iBACA,qCACA,CACA,gBACA,oCACA,CACA,iBACA,iDACA,CACA,cACA,2CACA,CACA,aACA,yCACA,CACA,YACA,uCACA,CACA,wBACA,2CACA,CACA,qBACA,wCACA,CACA,oBACA,uCACA,CACA,mBACA,sCACA,CACA,aACA,IACA,EACA,aACA,oCACA,2CACA,kBAEgB,GAAI,MACpB,qCACA,iBACA,CAAiB,CAEjB,CAAS,CACT,CACA,aACA,MAA4B,GAAW,GAC/B,GAAQ,EADuB,GACvB,eAChB,QACQ,GAAQ,kBAChB,CACA,uBACA,YAAuB,+BAAkC,KACzD,+BACA,kBACA,QAEA,CACA,oBAEA,YACA,eACA,cACA,kDAEA,QACA,CACA,CACA,aAEA,UACA,cACA,cAEA,gBACA,mBACA,yCACA,sCAEA,4DACA,wBAKA,MAJA,qBACA,yBACA,wCAEA,CACA,CACA,iBAEA,aADA,QACA,IACA,eAOA,GAAwB,KAAR,GANhB,KACA,CACA,EACA,EACA,UACA,CACwB,iBACxB,QAEA,CACA,QACA,CACA,aACa,GAAa,eAC1B,2BACA,mBAEA,CACA,gBACA,eACA,mBAEA,6CAEA,OADA,4BACA,CACA,CACA,wBACA,kBACA,EAAwB,GAAc,+BAA6C,EACnF,WAWA,GACA,SACA,KACA,gCACA,YAAmB,WAAiB,IACpC,2BAEA,oBACA,YAAmB,WAAkB,KACrC,WACA,oBACA,UACA,WAEA,CACA,OACA,UACA,UACA,CACA,EA9BA,GACA,yBAuCA,WAAoC,aAAqB,MACzD,SACA,iBACA,oBAZA,EAaA,WACA,GAdA,EAcA,QAbA,OAGA,OACA,GAEA,EALA,KAaA,WAGA,QACA,SACA,iBAQA,UAA8B,UAAiB,MAC/C,2BACA,yBAIA,OAHA,eACA,mBAEA,sBACA,GACA,EACA,cACA,aACA,UACA,CAAK,CACL,EArBA,UACA,SACA,WACa,KACb,CAAS,CACT,CACA,QACA,EAzDA,YAEA,uBACA,yBACA,cACA,4DACA,8BACA,8BACA,CACA,CAgEA,iBACA,MAA4B,GAAQ,gBAEpC,MADA,iBAAkD,SAClD,wCACA,CAaA,eACA,6BACA,QAEA,CASA,oBACA,SACA,SAEA,oBAZA,EAaA,cAZA,UADA,EAaA,aAZA,aACA,IAEA,wBACA,UAFA,GAUA,mCACA,KACA,QAEA,CACA,yCAAiD,EAAG,qDACpD,CACA,mBACA,qBACA,OACA,MACA,CAEA,CAgEA,eACA,+BAA0D,CAC1D,UAAsB,GAAc,YAAoB,EACxD,SAzDA,cACA,MAA0B,EAAS,WACnC,SACA,EACA,eACA,eACA,sBA8CA,OA7CA,2BACA,WACA,IAAa,GAAQ,GACrB,EADqB,KACrB,wDAA2E,EAAG,GAE9E,YACA,sEAAkF,EAAG,GAErF,sBAxBA,KACA,4BACA,8DACA,YACA,qCAEA,CACA,QACA,EAgBA,KAAwF,GAAQ,gBAChG,QA3DA,oBA4DA,cACA,MAAqB,GAAO,qBAC5B,CACA,MACA,CAAa,CACb,EACA,KACA,KACA,CACA,CAAK,EACL,4BACA,qBACA,uBAEA,GADgC,EAAS,SACzC,WACA,+BApFA,EAqFA,OArFA,EAqFA,EApFA,YAoFA,EAnFA,EAmFA,EAlFM,YAkFN,GAjFA,SAiFA,EAjFA,SAEA,GAgFA,kBACA,gCACY,GAAO,MACnB,CACA,MACA,CAAiB,CACjB,KACA,KACA,CACA,CAAS,CACT,CAAK,EACL,2BACA,WACQ,GAAO,GACH,CADG,EACK,eACR,GAAQ,MACpB,CACA,CAAK,EACL,CACA,EAIA,IACA,CACA,eAIA,MAFA,CADA,SACA,wBACA,sBACA,CACA,CAOA,eACA,WACA,iBACA,gBAMA,OALA,IACA,MACA,YACA,WAEA,CACA,CACA,iBACA,MAAiB,GAAgB,IACjC,SADiC,CACjC,GACA,QAEA,CACA,UACA,eACA,aAzBA,YAIA,MAFA,CADA,SACA,gBACA,MACA,CACA,EAoBA,GACA,yBACA,2BACA,CACA,eACA,4BACA,CACA,WACA,yBAEA,YACA,mBACA,CACA,WACA,yBAEA,YACA,uBACA,CACA,cACA,4BAEA,eACA,sBACA,CACA,cACA,4BAEA,SACA,mBACA,kBACA,KACA,CACA,aACA,yBACA,2BACA,CACA,oBACA,iBACA,CACA,YAAgC,EAAY,EAC5C,GACA,CACA,CACA,CACA,+BACA,aAA6B,EAAY,cAAc,EAAW,OAClE,CACA,YAAgC,EAAY,eAAe,EAAW,EACtE,eAAmC,EAAW,EAC9C,CACA,CACA,YAAgC,EAAY,EAC5C,GACA,CACA,CACA,CACA,6BACA,aAA6B,EAAY,GAAG,EAAY,OACxD,CACA,YAAgC,EAAY,YAAY,EAAY,EACpE,YAAgC,EAAY,EAC5C,YAAgC,EAAY,EAC5C,GACA,CACA,CACA,CACA,mBACA,WACA,YACA,aAA6B,EAAK,UAAU,EAAG,OAC/C,CACA,WAA+B,EAAG,KAClC,6BACA,CACA,CACA,CACA,mBACA,uBACA,WAKA,MAJA,UACA,UACA,YAEA,CACA,CACA,uBACA,YAAgB,UAAkB,KAClC,0BACA,WACA,KACA,SAEA,cACA,cACA,IACA,SACA,yBAEA,wBACA,kBAAmD,EAAS,OAAY,KACxE,kBAAmD,GAAQ,IAC3D,CAD2D,CAC3D,gBAAmD,GAAW,GAC9D,CAAS,EACT,EAF8D,EAE9D,gBAOA,OANA,cACA,4BAEA,WACA,WAEA,CACA,CACA,oBACA,YAAgB,UAAkB,KAClC,OACA,EACY,EAAS,OAAY,CACrB,GAAQ,eAAqB,CACzC,CACA,MACA,CAAa,CACD,GACA,GACZ,CAEA,CAJoB,MACG,aAGvB,SACA,GACA,EACA,OACA,UACA,EACA,UAAgB,iBAA0B,4BAC1C,IACA,YAqCA,KACA,iBAAY,iBAA8B,GAAc,GACxD,MADwD,EACxD,QACA,WACA,OACA,eACA,MAA2B,IAAU,eAA+C,GAAO,GAC3F,CAD2F,KAC3F,EAEA,CACA,QACA,EAhDA,MACA,aACA,EAAsB,GAAU,SAChC,iCACA,EAAsB,GAAc,MACpC,CACA,eACA,UAEA,QACA,CACA,sBACA,GACA,IACA,aAAgB,GAAY,4BAC5B,OAAe,GAAQ,GAAY,EAAZ,CAA0B,eACjD,CACA,CACA,mBACA,eACA,IACA,UACA,YAEA,eACA,WASA,OARA,IAEA,GACA,SAFyB,GAAe,KAGxC,OAHwC,KAGxC,+CACA,EACA,YAEA,CACA,CACA,UAA6B,GAAQ,mDAAuE,GAAU,UAgBtH,IACA,MACA,SACA,OACA,QACA,YACA,CACA,iBACA,0DACA,CACA,iBACA,qBACA,uCAEA,CACA,eACA,cACA,sBACA,+BACI,GAAQ,iBACZ,EACA,GACA,CACA,eACA,cACA,sBACI,GAAQ,iBACZ,EACA,GACA,CACA,eASA,OARQ,MAAe,mBACvB,6BACM,aACN,SAEA,aACA,aAEA,CACA,CACA,UACA,OACA,YACA,sDACA,CAkCA,UACA,gBAAsB,EAAQ,QAC9B,oBACA,UAAuB,EACvB,OADgC,CAChC,mBACA,QAtFA,OAsFA,QACA,mBACA,eACA,aACA,IACA,CACA,wBACA,gBACA,IACA,CACA,iBACA,4BACA,QACA,QACA,KACA,+IAEA,+DACA,gCAtmEA,CAAS,MAAe,kEACxB,GAEA,GAmmEA,EACA,8BACA,oDACA,cACA,cACA,aA6BA,GA5BA,QAAkB,GAAG,EACrB,WACA,cACA,aACA,cACA,gBACA,mCACA,gBACA,kBACA,oBACA,cACA,oCACA,sBACA,gBACA,uBACA,mBACA,iCACA,wBACA,eACA,qBACA,iBACA,uBACA,iBACA,gCACA,qBACA,eAAyB,QAAQ,CDj7JjC,KACA,MACA,sBAOA,OANA,GACA,gBACA,qBAEA,gBAEA,CACA,CACA,ECs6JiC,oCACjC,qBACA,iBACA,QACA,mFACA,MACA,CACA,8BACA,8BACA,mBACA,eACA,aAEA,CACA,kBACA,IAAgB,SAAW,qCAAqC,iCAAmC,YACnG,GAA0B,GAG1B,KACA,EAJ0B,EAM1B,SALA,CAMA,CACA,WACA,uBACA,CACA,YACA,kBACA,CACA,cACA,qBAEA,eACA,qBACA,CACA,eACA,SACA,CACA,cASA,OARA,iCACA,wBACA,cAEY,GAAW,oCAEvB,kBACA,gCACA,KAEA,QAEA,OADQ,GAAW,sBACnB,KAEA,OAEA,OADA,cACA,KAEA,YACA,iBAGA,wBACA,QACA,QACA,EALA,iBAOA,CACA,aACA,mBACA,cACA,0CACA,wCACA,0DACA,8BACA,oBACA,qBACA,mCACa,GAAW,aAGxB,6BACA,MACA,CAAS,EACD,GAAQ,YAChB,KACA,EACA,OACA,eACA,mBACA,cAGA,CACA,sBAGQ,GAFR,CAEY,GAFZ,SACA,WACY,QACZ,MACA,CAAS,CACT,CACA,sBACA,mBACA,WACA,cACA,gCACA,QACA,GACS,EAAI,EACb,KACA,GACA,mCACA,WACA,UACA,UACA,UACA,OACA,UACA,0CACA,4CACA,CACA,CAAa,IAEL,GAAI,MACZ,gBACA,OACA,UACA,EAA8B,GAAc,gBAC5C,2DACA,yBAEA,QACA,UACA,uBACA,OASA,EANA,MADA,iBACA,CACA,KACA,OACA,aACA,YACiB,EACjB,MAEA,WACA,CAAS,EACD,GAAI,UACZ,GACA,WAEA,CAAS,EACD,GAAI,MACZ,+BACA,iBACA,CAAS,CACT,CACA,kBACA,qBACA,4BACA,WAEA,GADA,+BACA,KACA,YAAiC,IAAa,IAC9C,4BAEA,eACA,CACA,yDACA,CACA,8BACA,IAAgB,2BAA8B,IAAe,KAC7D,mBACA,oBAEA,kBACA,wCACA,2BAEA,CAAS,CACT,CACA,+BAGA,IAFA,SACA,qBAGA,IADA,mCACA,eAA2C,IAAU,KACrD,WACA,yBACA,2BAWA,GAVA,qBACA,4BACA,0BAEA,SACA,4CACA,mBACA,UACA,mBACA,mCACA,aACA,4BACA,8BACc,CACd,0BACA,oBAAwB,qBAAwC,GAAU,YAC1E,iBACA,iCACA,sCACA,CAAiB,EACjB,2BACA,oBACA,CACA,CAEA,OADA,uBACA,CACA,CACA,iBACQ,GAAI,2BACZ,yCACA,CAAS,MACT,CACA,QACA,sBACA,2BACA,CACA,UACA,kBACA,WACA,8EACA,wCAKA,GAJA,qBACA,2BACA,4BACA,2BACA,CAGS,IAHT,mCACA,OACA,aACA,CAAS,EACT,OAEA,sCACA,2CACA,QACA,wCAAyD,IAAU,KACnE,eAAoB,GAAc,uBAClC,wBACA,2BACA,iCACA,CACA,4CACA,sBACA,GACY,GAAI,MAChB,SACA,CAAa,EAEb,wBACA,kCACA,MACA,CAAS,EACT,kCACA,YAAgB,gBAAwB,KACxC,EACA,yBACU,UACV,gCAEA,aACA,CACA,gBACQ,GAAI,gBACZ,oBACA,CAAS,EACT,2BACA,0BACA,CACA,sBACA,mBAGa,GAFb,MAEsB,EAFtB,8BACA,oBACsB,6CACtB,oBACA,kBAEA,CACA,uBACA,mBAAgB,GAAkB,KAElC,eAAqB,mBAA0B,EAD/C,mCAvXA,gBAEA,aADA,eACA,CACA,SACA,SACA,kBACA,KACA,YACA,UAEA,CACA,CACA,EA8WA,IADA,2BAGA,CACA,yBACA,wBACA,iBACA,MAEA,sBACA,gCACA,4EACA,OACA,YAAuB,IAAkB,IACzC,IAAiB,GAAS,QAC1B,OAGA,mDACA,YACA,YACA,YACA,CAAa,CACb,CACA,iBACA,GAES,KAFT,mCACA,aACA,CAAS,EACT,OAEA,yCACA,qBACA,yBACA,iBACQ,GAAI,eACZ,8BAGA,aACA,cAEA,kCACA,CAAS,OACT,6BACA,QACA,CAAS,EACT,iCACA,CACA,mBACA,IAGS,IAHT,2CACA,OACA,aACA,CAAS,GAGT,wCAAyD,IAAU,IACnE,8CAEA,wCAAyD,IAAU,IACnE,sBAAmC,GAAU,MAC7C,CAD6C,YAC7C,CACA,CAAa,KAEb,0CACA,MACA,CAAS,EACT,CACA,oBACA,6BACA,GACA,OACA,QACA,OACA,aACA,CACA,oDAGA,wBACA,gBACA,2CACA,CACA,SAGS,KAFT,mCACA,aACA,CAAS,IAGT,aACA,kCACA,gBAGA,YACA,IACA,WACa,GAEb,CACA,WACA,EACA,2BACA,UAAoB,YAAkB,uBACtC,kBACA,2BACA,CAEA,GADA,aACA,+BAGA,CAES,IAFT,iCACA,aACA,CAAS,EAJT,OAOA,mBACA,QAAmB,sBAAuC,IAC1D,0BAGA,IADA,qBACc,WAAmB,IACjC,0BAEA,+BACA,CACA,8BAGA,IAFA,2BACA,KAEA,mBAA2C,IAAU,KACrD,WACA,iBACA,SAEA,CACA,QACA,CACA,+BACA,sCACA,CACA,gBACA,IAES,IAFT,yCACA,aACA,CAAS,EACT,OAEA,0CACA,qBAAyC,KAAQ,IACjD,wBAEA,uCACA,CACA,gBACA,eACA,UACA,cACA,WA/fA,GACA,IAAY,mBAAmB,EAC/B,QACA,OACA,YACA,cACA,UACA,gBAGA,EAqfA,mBACA,GACA,OACA,cACA,aACA,CACA,kDAGA,GACY,GAAQ,GACpB,EADoB,GACpB,4BACA,8CACA,6BACA,mDACa,EAEb,oBACA,GACY,GAAU,GAEtB,IAFsB,QAEtB,IACA,yCACA,CACA,iBACA,OAAe,GAAc,kCAC7B,CACA,mCACA,wBACA,qBACA,cAEA,GAEA,kBACA,4BACA,iBACA,uCAkBA,OAjBA,IACA,GACA,UACA,QACA,aACA,gBACA,YACA,aACA,aACA,oBACA,QACA,WACA,WACA,UACA,EACA,WAEA,CACA,CACA,aACA,qCAAiD,GAAa,MAC9D,IAD8D,EAC9D,KACA,YACA,EAAS,CACT,CACA,yBACA,kDAEA,oBACA,4BACA,MACA,SAEA,6BACA,qDAEA,0BACA,uBACA,SACA,CACA,wBACA,+CAEA,qBACA,8BAEA,yBACA,sBACA,yBACA,4CACY,GAAO,MACnB,kBACA,gBAEA,+BACA,YACA,SACA,CAAa,EACb,4CAEA,CACA,UACA,8BACA,CACA,UACA,8BACA,CACA,uBACA,wBACA,iBACA,wBAEA,yBAEA,QACA,QAGA,IAFA,YACA,gBACA,gCAAqD,IAAU,IAC/D,2BAEA,CACA,UACA,oCACA,WAAgB,SAAgB,KAChC,aACA,yBACA,IACA,oBACY,GAAW,KACvB,GADuB,CACvB,4BACA,iBACA,eAEA,mBACA,kCACA,CACA,oBACA,kCACA,CACA,aACA,sBACA,wBACA,4BAEA,gBAEA,CACA,iBACA,sBACA,gBACA,UACA,6BACA,MACA,EACA,YACA,YACA,YACA,qBACA,EACQ,GAAI,8BACZ,CACA,2BAqBA,CApBA,4BACA,+BAEA,gCACA,gBACA,UACA,6BACA,MACA,EACA,UACA,OACA,gCACA,YAEA,EACA,UACA,aACA,gBAEA,EAEA,OACA,cACA,iBACA,cACA,cACA,aACA,EACA,OACA,iBACA,cACA,aACA,kBACA,aACA,EACA,0BACA,IAEA,GAEA,CACA,eACQ,GAAI,wBACZ,2CACA,CAAS,EACT,mBACQ,GAAI,kCACZ,2CACA,CAAS,EACT,gCACA,CACA,4BAEA,MADA,uBAMA,IAJA,eACA,uCACA,wCAEA,eAAwC,IAAU,KAElD,MADA,UACA,+CACA,GACA,mDAEA,CACA,CACA,oBACA,wBAEA,qBACA,uBACA,uBAA6C,UAAuB,IACpE,6BACA,MACA,4CAEA,OACA,eACA,kBACA,OACA,CACA,CAAS,EACgB,GAAc,OAEvC,IAFuC,CAEvC,UACA,qBACA,6BAEA,CACA,qBACA,uCACA,CACA,mBACA,kEAEA,0BACA,yBACA,qFACA,SACA,YACA,WACA,mCAEA,kBACA,kCAEA,CACA,mBACA,OACA,QACA,SACA,cACA,iCACA,EACA,qEACA,8CACA,OAEA,2CAMA,OALA,gBACA,qCACA,gBACA,cAEA,IACA,CACA,wBAvyBA,EAwyBA,IAAgB,wBAAsC,KAEtD,gCADA,GAEA,EDx8LA,QCw8LwB,IAAa,EDx8LrC,OCw8LqC,SDx8LrC,+BCy8LA,GA5yBA,EA4yBA,gBA3yBA,uBA2yBA,EAvyBA,EAuyBA,EA1yBA,MA2yBA,IACA,qBACY,GAAQ,WACpB,EACA,EACA,KACA,OACA,GACgB,GAAQ,WACxB,EACA,EACA,KACA,QAGA,OAAyB,GAAc,KAMvC,MANuC,CACvC,QACA,eACA,gCAEA,kBACA,CACA,CACA,4BACA,uBACA,SAEA,MACA,SAEA,yBACA,mDACA,CACA,CACA,cACA,OAAW,GAAI,wCACf,CAoDA,qBACA,OACA,kBACA,iBACA,CACA,CAcA,yBACA,MAAY,gDAAiE,EAC7E,kCACA,gBACA,IACA,MACA,MAKA,gBACA,GAFA,YAEA,KAEA,KADA,mBACA,GACA,CACA,0BAAgE,EAAE,IAClE,UACA,QACA,QACA,YAAY,sCAAiD,SA/D7D,SACA,MAVW,GAUX,cAV4B,QAU5B,CAV4B,CAC5B,aACA,WACA,aACA,WACA,EAMA,UACA,oBAQA,MACA,4BACA,OAAe,GAAW,kBAC1B,EACA,OACA,2BACA,uBACA,WAAoB,GAAW,kBAC/B,SAAkB,GAAW,eAC7B,CACA,EA0C6D,WAC7D,MACA,MACA,QACA,QACA,MACA,MACA,QACA,QAEA,GADA,cACA,GAEA,cAIA,GAHA,iBACA,iBAEA,KACA,kBACA,oBAAsF,GACtF,CAEA,GAH6F,CAG7F,cAGA,GAFA,kBAEA,KACA,kBACA,kBAA+D,GAAO,UACtE,CAEA,wBAIA,GAHA,wBACA,wBAEA,KACA,kBACA,4BAAsG,GACtG,CAEA,GAH6G,CAG7G,cAGA,GAFA,kBAEA,KACA,kBACA,kBAAmE,GAAO,EAC1E,CACA,CAF0E,CAEpE,IACN,cACA,sBACA,kBACA,cACA,sBACA,kBACA,aACA,CACA,aACA,CAmDA,oBACA,uBACA,UACA,qBACA,mBACA,cACA,mBACA,uBACA,eACA,cACA,SACA,UACA,aACA,WACA,SACA,eACA,iCACA,CACA,qBACA,eACA,8BACA,EACA,cACA,SACA,YACA,YACA,YACA,WACA,WACA,gBACA,QACA,oBACA,0BACA,uBACA,qBACA,wBACA,wBACA,mBACA,mBACA,GACA,qBAEA,CACA,eAKA,UAAgB,cAAoB,GAJpC,eACA,IACA,IACA,IACuD,CACvD,IACA,GACA,CAAS,EACT,YAAgB,0DAAqE,eACrF,aACA,WACA,cACA,cACA,gBACA,IACA,oDAEA,KAD6C,QACG,GADH,CACU,GAAa,OACpE,EAA6B,CADuC,EAC7B,WACvC,WACA,CACA,kBACA,IAAgB,6DAA6D,eAC7E,IACA,IACA,aACA,WACA,cACA,cACA,IACA,QAAgB,aAAoB,aACpC,UACA,cACA,OACA,kBACA,iBACA,CACA,CACA,mBACA,6BACA,CACA,QACA,YAAgB,mBAA2B,KAC3C,kBACA,mBACA,aAGA,GAFA,+CACA,mBAA2C,GAAG,aAA8B,GAAG,GAC/E,8CACA,OAEA,SACA,wCACA,yCAEA,QADA,qBAA0C,EAAE,QAE5C,+BACA,4BAvJA,oBACA,IAAY,4CAA4C,EACxD,aACA,MACA,gBACA,YAAuB,IAAiB,IACxC,SAEA,UACA,QAAqD,GAAG,CAAI,GAAG,CAE/D,CACA,gBACA,QAEA,EAyIA,cAxIA,oBACA,gBAAY,0CAAsD,EAClE,CAAY,iEAAiE,EAC7E,0BACA,MACA,OAEA,qBACA,mBACA,GACA,gBACA,wBAEA,cACA,uBAEA,iBACA,MACA,gBACA,YAAuB,IAAiB,IACxC,WAEA,UACA,QAAqD,GAAG,CAAI,GAAG,CAE/D,CACA,GA3LA,gBACA,eAAY,qDAAgE,EAC5E,MAGA,cACA,qBACA,KACA,MACA,yBAEA,cAA8C,GAAO,EAAe,EAAf,EAErD,GAF2E,QAE3E,GACA,QACA,EA6KA,OAEA,IACA,gBACA,WAEA,EAwGA,cACA,WACA,CACA,CAEA,qBACA,UAAkB,GAAc,mCAChC,cAAoB,GAAc,4BAClC,iBAAyB,GAAc,uCACvC,WAAmB,GAAc,qCACjC,YAAoB,GAAc,6BAClC,cAAsB,GAAc,4BACpC,CACA,mBACA,iBACA,CAUA,oBAA8C,EAC9C,eACA,CAAY,qBAAuD,EACnE,CAAY,eAAyC,EACrD,gBACA,gBAEA,OACA,QACA,QACA,YACA,WALA,qBAKA,SACA,CACA,CACA,yBAKA,MAJA,WAAY,aAAoB,EAChC,CAAY,+BAA+B,UAC3C,IAzBA,QACe,GAEf,WAF6B,aAE7B,yBACe,GAEf,GAoBA,MAAU,gBAAwB,MAElC,QAAe,KAAW,IAC1B,uBACA,OAEU,GACV,kBACA,MAEA,qBAEA,KAMA,OAJA,GAEA,MADA,mBACA,aAEA,GACA,CACA,yBAMA,YALA,eACA,OAAY,kBAAwB,UACpC,MAAY,gBAAwB,MACpC,IACA,IAEA,qBACA,OACA,QACA,cACA,cACA,cAEA,EAKA,IAJA,IACA,UACA,mBAEA,IAAe,KAAW,KAE1B,GADA,YACA,KACA,SAEA,UACA,MACA,KACA,QACA,IACA,IACc,KACd,MAEA,gBAEA,IACA,cACA,IACA,IACA,OAEA,GACA,CACA,GACA,CACA,eACA,gBACA,oCAEA,OADA,sFACA,KACA,CAoCA,gCAQA,qBACA,wBACA,UACA,sBACA,cACA,mBACA,wBACA,cACA,mBACA,iCACA,QACA,YACA,WACA,SACA,SACA,eACA,kCACA,yBACA,SACA,aACA,eACA,0CACA,cACA,GACA,QACA,iBACA,oBACA,mBACA,kBACA,sBACA,kBACA,oBACA,sBACA,mBACA,uBACA,0BACA,GACA,qBAEA,CACA,yBACA,mBACA,yFACA,4CDtsJA,oBACA,YAKA,GAHA,YACA,yBAEA,uCACA,SA1DA,aAMA,MALA,YACA,WACA,mBACA,WAGA,UACA,QAAe,IAAe,IAI9B,GAHA,IACA,IACA,YACA,GAGA,MACA,eAEA,2BACA,CACA,6DAEA,CA9EA,oBAEA,UADA,eAEA,UACA,YAAmB,MAAmB,IAGtC,GAFA,IACA,YACA,MAGA,kBACA,cACA,QACA,CAGA,YAFA,YAEA,YADA,cACA,KACA,IAGA,iBACA,cACA,iBAEA,GAsDA,OArDA,wBAGA,MAFA,YACA,WAEA,UACA,YAAmB,IAAe,KAIlC,GAHA,IACA,IACA,YACA,GACA,SAEA,WACA,OACA,IACA,aACA,QAA+B,EAAU,OACzC,QAA+B,EAAU,aAEzC,IACA,aACA,QAA+B,EAAU,OACzC,QAA+B,EAAU,YAEzC,CACA,EA6BA,MACA,EAkCA,SACM,CACN,2BACA,mBAAyC,IAAU,IAEnD,EApJA,kBAIA,iBAEA,aACA,KAFA,EAEA,GACA,OAHA,GAIA,UACA,UAEA,eACA,eACA,UACA,GADwB,CACxB,EACA,OACA,UACA,EAbA,EAaA,cACA,EAdA,EAcA,aACA,CAAS,CACT,MACA,EAjBA,EAiBA,cACA,iBACA,CACA,CACA,EA0HA,EADA,OACA,wCACA,oBACA,oBACA,gBACA,gBACA,GAEA,CACA,mBA3CA,kBACA,UACA,iBACA,mBAAqC,IAAU,IAC/C,IACA,IACA,sBACA,IAGA,OACA,IACA,iCACA,kCAEA,IACA,iCACA,kCAGA,EAwBA,IAEA,ECgrJsC,sBACtC,sBACA,CACA,CACA,cACA,eACA,sBACA,kBACA,sBACA,CACA,aACA,oBAEA,eACA,uCDrsIA,cACA,ECosImE,EDpsInE,WACA,qBACA,WACA,MACA,SAEA,gBACA,OAAY,SAAe,SAnE3B,SACA,QACA,MACA,SACA,sBACA,IAGA,qBACA,IAMA,IAJA,KACA,GACA,OAEA,kBACA,IAGA,OACA,QACA,IAHA,IAIA,CACA,EA4C2B,SAC3B,UACA,aACA,CACA,QACA,MACA,MACA,EACA,MAEA,gBACA,gCACA,qBAvDA,aAKA,EAJA,eACA,KACA,IACA,OAEA,UAAyB,KAAY,KACrC,YACA,gBACA,SACA,KACA,QACA,UACA,YACA,MACA,CAAiB,EACjB,oBAGA,IACA,QACA,OAGA,GACA,CAQA,OAPA,UACA,QACA,UACA,QACA,MACA,CAAS,EAET,CACA,EAqBA,aACA,ECgrImE,2BACnE,CACA,QACA,oBACA,cACA,+BAEA,OACA,oBACA,cACA,WACA,uBACA,CACA,qBAcA,IAbA,mBACA,OACA,cACA,EAAyB,GAAc,MACvC,KADuC,IACvC,EACA,QACA,KACA,CAAS,EACT,aACA,OAEA,SACA,EA9HA,UACe,GAEf,kBAFoC,MA6HpC,EA3HA,uBACe,GAEJ,GA0HX,SA1HuB,CA0HvB,IA5HmC,IA4HnC,CAA2C,IAAU,KACrD,IAAoB,eAAe,KACnC,OACA,OACA,UACA,UACA,QACA,CACA,qCACA,oBACA,WACA,SACA,CACA,0BACA,CACA,mBAEA,OADA,SACA,WACA,CACA,YACA,oBACA,WACA,aAGA,aAFA,OACA,0BACA,GACA,eACA,QACA,SACA,CAAa,EAEb,SACA,CACA,cACA,sBAEA,CADA,kBACA,wBACA,SACA,SAnIA,SACA,+BA3BA,KA4BA,EA5BA,SAEA,EA0BA,EA1BA,iBACA,SAyBA,MAxBA,eAGA,GAqBA,EArBA,WACA,WAqBA,EAAM,IACN,SApBA,SACA,aAAY,aAAsB,EAClC,QACA,eACA,gBACA,cACA,SACA,QACA,SACA,CAAS,GACT,cAEA,UAEA,EAMA,QAEA,EA6HA,YACA,aAEA,gBACA,uBACA,kBAEA,CACA,CAEA,qBACA,gBACA,CAAY,OAAiB,YAC7B,EACA,IACA,0CAEA,oBACA,kBACA,OACA,KACA,YAGA,UACA,cACA,YACA,mBACA,cACA,oBACA,SACA,UACA,SAGA,eACA,kCACA,yBACA,cACA,GACA,QACA,oBACA,mBACA,iBACA,iBACA,GACA,qBAEA,CACA,eACA,mBACA,CAAgB,SAAS,eACzB,IACA,IACA,IACA,uEACA,CACA,cACA,uBACA,CACA,cACA,uBACA,CACA,kBACA,MAAgB,OAAS,eACzB,IACA,IACA,IACA,OACA,IACA,GACA,CACA,CACA,QAEA,MADA,wBACA,UAEA,EADA,qCACA,iBACA,aACA,CACA,UACA,oBACA,2BAAkD,GAAc,yBAGhE,4BACA,0BACA,8BACQ,GAAS,mBACjB,CACA,WACA,uBAEA,4BAEA,CAEA,qBAQA,UAPA,MAAY,+BAAiC,YAC7C,IACA,IACA,OACA,QACA,SACA,IAeA,OAbA,cACA,MACA,gBACA,gBACA,MACA,QAGA,IADA,QAEA,MACA,gBACA,iBAEA,CACA,OACA,MACA,QACA,QACA,CACA,CACA,qBACA,WAAsB,GAAW,MACjC,CAwDA,CAzDiC,QAyDjC,YACA,eACA,WAEA,MADA,QACA,QACA,cAA+B,GAAU,wBAA6C,GAAU,kBAChG,CAIA,iBACA,uBACA,CACA,oBAA+C,EAC/C,qBACA,iBACA,4BACA,4BACA,OACA,QACA,QACA,QACA,QACA,eACA,CACA,CACA,oBACA,uBACA,UACA,sBACA,cACA,eACA,qBACA,iBACA,SACA,eACA,kCACA,yBACA,CACA,gBACA,QACA,oBACA,uBACA,iBACA,kBACA,mBACA,0BACA,GACA,qBAEA,CACA,YA5CA,EA6CA,kBAAgB,uBAA2B,sBAAoC,KAC/E,OAAgB,WAAiB,SAjFjC,GACA,YACA,iBACA,iBACA,EA/BA,gBACA,4BACA,kBACA,EAAc,GAAM,SACpB,CACA,sBACA,0BACA,4BACA,uBACA,CACA,EAqBA,WACA,EArBA,gBACA,uBAAY,GAAsB,YAClC,qBACA,EACA,yBACA,EAAc,GAAa,GAC3B,OAD2B,GAC3B,MACA,kBACA,KAA+C,GAAQ,GACvD,EADuD,IACvD,CACA,4CACA,+CACA,qDACA,uDACA,CACA,EAMA,WACA,OACA,OACA,SACA,QACA,IACA,IACA,QACA,CAAS,CACT,OACA,aACA,YACA,YACA,YACA,QACA,gDACA,kDACA,sDACA,uDACA,CACA,CACA,CACA,EAsDiC,MACjC,EA9CA,CADA,EA+CA,UA9CA,iDA8CsD,GAAkB,GACxE,SACA,GAFwE,CAExE,qBACA,cACA,eACA,SACA,gBACA,cACA,mBAEA,cACA,aACA,cACA,SACA,WACA,CACA,eACA,qBACA,CACA,cACA,wBACA,CACA,cACA,wBACA,CACA,kBACA,MAAgB,2BAA6B,eAC7C,IACA,IACA,OACA,aACA,IACA,OACA,cACA,aACA,CACA,CACA,YACA,wCACA,CACA,CAuUA,qBACA,KACA,OAEA,WACA,OAKA,MAJA,cACA,EAAgB,GAAe,GAC/B,EAAc,GAAe,IAE7B,CACA,OAH6B,EAG7B,EACA,QACA,KACA,CACA,CA+BA,mBACA,KAAU,IAAa,KACvB,WACA,4BACA,KAEA,CACA,QACA,CACA,4BACA,KACA,aAEA,eACA,CA/WA,mDAmwBA,qBACA,yBACA,GACA,iBAEA,CA0EA,eACA,cAAU,kBAA4C,EAKtD,OAJA,kBACA,gBACA,oCAEA,CACA,WACA,YACA,wBACA,CACA,EACA,uFACA,cACA,eACA,QACA,eACA,uBACA,uBACA,qBACA,mBACA,uBACA,eACA,wBACA,wBACA,uBACA,sBACA,qBACA,gBACA,mBACA,iBACA,kBACA,mBACA,kBACA,qBACA,qBACA,mBACA,oBACA,CACA,cACA,gBACA,iBACA,gBACA,qBACA,mBACA,UACA,CACA,gBACA,qBACA,yBACA,6BACA,wBAEA,2BACA,2BACA,wBAEA,CACA,cACA,8BACA,EAA0B,GAAQ,kBAClC,WACA,WACA,UACA,6CAEA,QACA,+CAEA,sBACA,YAEA,kBACA,CACA,UAWA,IAVA,IAAgB,iBAAiB,KACjC,eACA,yBACA,MACA,CACA,eACA,EAA0B,GAAM,QAChC,SACA,6BACA,UAAgB,gBAAyB,OAEzC,iBACA,qBACA,gBACA,8BAEA,iBACA,6BAEA,iDACA,mDACA,CACA,kBACA,QAAgB,sBAA4B,gBAAU,KAAiB,KACvE,yBACA,mBACA,EACA,CACA,MACA,GACA,oBACA,wBACA,SACA,KAkBA,OAjBA,iCACA,wCACA,iCACA,KACA,wBACA,KACA,KAEA,MACA,OACA,MACA,MACA,QACA,QACA,EACA,kBACA,CAAS,EACT,CACA,CACA,kBACA,QAAgB,uBAA6B,gBAAU,KAAiB,KACxE,yBACA,sBACA,MACA,IACA,IACA,IACA,IACA,IA4BA,OA3BA,qCAqSA,MANA,EAOA,EArSA,cAAoB,gBAA0B,CAyR9C,YAKA,EA9R8C,EA8R9C,OACA,oBACA,2CAEA,mCARA,YAUA,EApS8C,EAuR9C,WAcA,EArS8C,EAsS9C,iBAtS8C,EAsS9C,MACA,MAvS8C,EAuS9C,IAEA,IAxSA,iBACA,OACA,QACA,QACA,QACA,CAAiB,EACjB,OACA,IACA,OAEA,MACA,OACA,MACA,MACA,QACA,QACA,EACA,gBACA,MACA,CAAS,EACT,KACA,QACA,QACA,QACA,CAAS,EACT,CACA,CACA,iBACA,yBACA,OAEA,iCACA,CAAgB,gCAAsC,kBAAkB,GAAW,QAAY,KAC/F,EAA0B,GAAa,wBACvC,wBACA,QACA,EAAuB,GAAc,6CACrC,eACA,YACA,QACA,EAA2B,GAAc,8CAEzC,oBACA,oCACA,YAEA,EAAU,IACV,QACA,EAAsB,GAAc,uDACpC,eACA,YACA,QACA,EAA0B,GAAc,wDAExC,QACA,oBACA,yCACA,aAEA,CACA,CACA,eACA,sEAEA,OACA,yBACA,eACY,GAAQ,QACpB,aACY,GAAU,EACtB,CACA,CACA,GAHsB,IAGtB,KASA,EARA,IAAgB,4CAAkD,KAClE,OAAgB,YAA6B,EAC7C,EAA6B,GAAQ,MACrC,EAA0B,GAAa,4BACvC,EAA0B,GAAM,QAChC,SAAgB,GAAW,EAC3B,SACA,MAEA,iBACA,gCACA,wBACA,eACA,gBACA,aAAgB,4BAAqC,QACrD,kBACA,iCACA,OAEA,SACA,MAA8B,GAAc,eAQ5C,GAPA,YAA4B,GAAc,eAC1C,UAA0B,GAAc,kBACxC,iBAAiC,GAAc,oBAC/C,WAA2B,GAAc,oBACzC,cACA,cAA8B,GAAc,iBAC5C,cAA4B,GAAc,gBAC1C,gBASgB,GAAe,EAR/B,CACA,sBACA,wBACA,oBACA,aACA,EACA,eACA,IAC+B,0BACjB,CACd,4BACA,oBACA,EAAqC,GAAa,gBAClD,cACA,gCACoB,GAAkB,GACtC,IACA,IACA,IAHsC,EAItC,EACA,QACA,CAAqB,EAErB,gBAEA,SACA,OACA,UAEA,CACA,WACA,EACA,kBACY,GAAU,oBACtB,uBACA,kCACA,CAAa,CACb,EACA,sBACA,6BAEA,EADA,EACA,CACA,EAAmB,GAAc,+BACjC,eACA,MACA,EAEA,CACA,cACA,EAAmB,GAAc,wCACjC,MACA,EAEQ,GAAqB,0BAC7B,UACA,iCACA,0BACA,wBACA,kCACA,sDACA,QACA,MACA,MAiBA,GAhBA,uBACA,EACA,wBACA,SACA,SACA,MAAmC,GAAc,qCAEnC,uBACd,0BACA,SACA,MAA+B,GAAc,8CAG7C,EADA,OACA,KACA,EAAgB,GAAM,gCACtB,cACA,EACA,cACc,4BACd,mBACA,YACA,EAAc,IACd,MAEA,CAAS,EACD,GAAoB,yBAC5B,CACA,gBAaA,EAZA,mBACA,UACA,EAA0B,GAAM,QAChC,EAA6B,GAAS,WACtC,cACA,OAEA,MAA0B,GAAa,4BACvC,WACA,aACA,WACA,UAEA,YACA,aACA,uBACA,+BACA,aACA,EAAmB,GAAc,4BACvB,CACV,6DACA,IAA6C,GAAc,2EAC3D,CACA,MAAkB,GAAc,QAChC,yBAA4C,GAAkB,IAC9D,WAD8D,GAC9D,UACA,sBACA,oBACA,gBACQ,GAAU,eAClB,CACA,sBACA,yBACA,EAA0B,GAAM,QAChC,EAA6B,GAAS,WACtC,wCACA,CACA,sBACA,UACA,GAAY,GAAU,yBAA8B,GAAU,wBAE9D,SADA,sBACuB,WAAe,IAEtC,GAAoB,GAAU,GAD9B,QAC8B,sBAAgD,GAAU,wBACxF,2BAIA,WACA,CACA,mBA2DA,EA1DA,mBACA,GA0DA,gBADA,EAzDA,SA0DA,yCAGA,yCA5DA,OAEA,qCACA,8CACA,wBACA,UACA,OACgB,GAAQ,WACxB,EACA,EACA,KACA,OAEA,oBACA,OACgB,GAAQ,WACxB,EACA,EACA,KACA,MAEA,EAAU,OACE,GAAQ,WACpB,EACA,EACA,KACA,MAEA,CACA,CAuBA,iBAEA,SADA,2BAEA,CA8GA,MAAM,WAAK,GACX,eACA,QACA,mBACA,uBACA,eACA,qBACA,gBACA,mBACA,iBACA,kBACA,kBACA,mBACA,qBACA,mBACA,oBACA,CACA,YACA,mBAGA,GAFA,YACA,WACA,YACA,gDACA,MACA,CACA,wBACA,0BACA,MAA0B,GAAO,uBACjC,eAAwB,GAAS,WACjC,QAAqC,GAAM,wCAC3C,oBACA,cAEA,YAEA,CACA,eACA,4BACA,6BACA,CACA,iBAIA,MAHA,QAAgB,qCAAyC,KACzD,UACA,IAkBA,OAhBA,qBACA,EAAqB,GAAc,OACnC,IADmC,EAEnC,QAEA,qBACA,MACA,EAAyB,GAAc,OACvC,EAA6B,EADU,EACZ,EAAE,GAE7B,MACA,EAAyB,GAAc,OACvC,EAA6B,EADU,CACZ,EAAE,EAE7B,OAEA,CACA,SACA,SACA,WACA,UACA,CACA,CACA,OACA,eACA,eACA,cACA,OAEA,MAAyB,GAAM,QAE/B,EADA,aACA,oBACA,QAAgB,kCAAyC,kBACjD,GAAU,gBAClB,cACA,WACA,WACA,UAAuB,GAAkB,SACzC,MADyC,OACzC,SACA,aACA,EACA,EACA,CACS,CACT,CACA,CAgDS,YAAT,IA2CA,EA3CM,CA2CN,CACA,OA5CS,CA4CT,OAIA,IAHA,aACA,SAGA,QACA,IACA,IACA,mBAAuC,IAAS,KAChD,mBACA,oBACA,0BACA,OACA,OACA,GACA,CACA,CACA,OACA,MACA,KACA,CACA,CAAK,CACL,iBAOA,MANA,aACA,SAEA,UACA,MACA,2BAEA,mBAAuC,IAAS,KAChD,mBACA,oBAEA,MAA0B,GAAqB,EAD/C,gBAC+C,IAC/C,MACA,IACA,IAEA,CACA,CACA,MACA,0BACA,MACA,MAEA,OACA,IACA,GACA,CACA,CACA,EACA,iBAQA,OAPA,IACY,GAAO,GACnB,CADmB,KACnB,0BAEA,WAGA,CACA,CACA,qBACA,8DACA,cAEA,CACA,CAiBA,iBACA,kBACA,MAAY,oBAAyB,EACrC,UAAY,eAAwB,EACpC,EAAqB,GAAM,YAC3B,EAAsB,GAAM,aAC5B,EAAuB,GAAM,cAC7B,WACA,WACA,WACA,EAAoB,GAAS,WAC7B,WACA,IACA,qEACA,0CACA,GACA,6DAEA,GAEA,MADA,wDACA,wCAEA,GACA,4DAEA,QACA,cACA,sCACA,EAiBA,OAhBA,SACA,gBACI,GAAI,WACR,gBACI,GAAI,oCACR,qCACI,GAAI,MACA,GAAI,YACJ,GAAI,WACJ,GAAI,UACZ,CAAK,EACL,IACA,gBACI,GAAI,YACR,YAEA,CACA,MAFA,WAGA,QACA,CACA,CAoCA,mBACA,0BApCA,cACA,IAAY,cAAc,SAC1B,MACA,MACM,eACN,SAEA,QACA,EA4BA,KACA,OACA,oCAnBA,SACA,MAAY,WAAa,EACzB,CAAY,mBAAiC,iBAAmB,EAChE,WAWA,MAVA,aACA,4BACM,OACN,SACM,UACN,YAEA,SArBA,SACA,MAAY,WAAa,EACzB,6BACA,8BAGA,qBAFA,QAKA,EAYA,UACA,aAEA,CACA,EAIA,SACA,QACA,CACA,CAqBA,qBACA,cAAY,iCAA2C,EACvD,QAAY,YAAmB,EAC/B,MACA,SAAY,yCAAiD,GAAe,GAC5E,OAD4E,IAxB5E,KACA,IAAU,aAAa,EAMvB,MALA,YACA,KACM,cACN,SAEA,CACA,EAiBA,KACA,EAjBA,gBACA,MAAU,YAAc,EAQxB,MAPA,UACA,KACM,aACN,OAEA,OAEA,CACA,EAOA,OAYA,MAXA,aACA,WACA,KACU,aACV,OAEM,WACN,mBACM,aACN,qBAEA,CACA,EAAW,GAAW,qBACtB,EAAW,GAAW,sBACtB,CACA,CACA,mBACA,MAAoB,GAAS,WAC7B,4EAYA,iBACA,mEACA,wBACA,CACA,QACA,YAAiB,GACjB,CADqB,KACrB,GACA,eACA,WACA,sBACA,eACA,qDACA,2BACc,WACd,eACc,sBACd,qBAEA,CACA,QACA,CAAK,CACL,WAAgB,GAChB,CADoB,UACJ,GAChB,CADoB,WACH,GACjB,CADqB,KACrB,GACA,qDACA,uDAEA,0BACA,GACA,UAEA,uBAIA,OAHa,GAAa,IAC1B,MAD0B,CAG1B,CACA,CAAK,CACL,cAEA,MADA,uCACA,iCACA,OACA,0BACA,kCACA,0BACA,wBACA,oCACA,cACA,CACA,CAAK,CACL,iBACA,8BACK,CACL,mBAEA,QADA,qCACA,iCACA,OACA,wBACA,oBAEA,CAAK,CACL,WAAgB,GAChB,CADoB,SACL,GACf,CADmB,YACD,GAClB,CADsB,MACV,GACZ,CADgB,WACC,EACjB,EADqB,SAErB,YACA,4BACA,WACA,gBAEA,CACA,CACA,oBACA,kCACA,GACA,QACA,eACA,gBACA,2BACA,kBACA,8BACA,sBACA,wBACA,qBACA,mBACA,uBACA,uBACA,kBACA,uBACA,iBACA,sBACA,mBACA,mBACA,mBACA,cACA,cACA,mBACA,kBACA,mBACA,mBACA,wBACA,6BACA,2BACA,CACA,cACA,eACA,8BACA,oBACA,CACA,qBACA,6BACA,KACA,SAEA,iBACA,6CACA,+CACA,uBAIA,OAHA,cACA,0CAEA,CACA,CACA,aACA,qCApIW,GAoIX,UApIwB,CAoIxB,aApIwB,CACxB,QAmIA,KAlIA,aAkIA,mBAjIA,cACA,CAAK,CAgIL,CACA,CACA,cACA,cAAgB,GAAa,EAC7B,6BACA,uBACA,4BACA,KAIA,OAHA,cACA,cACA,aAEA,CACA,mBACA,OArJA,SAqJA,qCACA,CACA,aACA,cAAgB,GAAa,EAC7B,KAaA,OAZQ,GAAI,MACZ,OACA,UACA,SACA,UAEA,UACA,4CACA,iCACA,0CACA,SACA,CAAS,EACT,CACA,CACA,kBACA,OAzKA,SAyKA,oCACA,CACA,eACA,IAAgB,aAAa,EAC7B,8BACA,wBACA,6BACA,KAIA,OAHA,cACA,cACA,aAEA,CACA,oBAOA,IANA,mBACA,kBACA,KACA,KACA,KACA,KAEA,mBAAwC,IAAS,IACjD,OA3VA,cACA,YAAY,0BAAkC,EAC9C,iCACA,OAAY,WAAiB,sBAC7B,OACA,QACA,QACA,sBACA,+BACA,iBACA,uBACA,YACA,eACA,SACA,CACA,EA4UA,kBAkBA,OAhBA,UACA,yCAEA,YACA,qCAEQ,GAAI,MACZ,wBACA,kCACA,uCACA,qCACA,CAAS,EACT,mBACA,wBACA,uBACA,kBACA,CACA,CACA,gBAGA,EAFA,iDACA,eAEA,KACA,YAMU,CACV,sDACA,uBACA,8BACA,wCACA,4BACA,sCACA,gCACA,4BACA,kBAAoD,MACpD,qBACA,sBACA,sBACA,qBACA,GACA,UACA,MACA,MACA,cACA,gBACA,WACA,WAEA,MA5BA,kBACA,IACA,SACA,EA0BA,sBACA,qBACA,GACA,yCAEA,eACA,sBACA,iBACA,aACA,QACA,CAAa,CAEb,CACA,mBACA,mCACA,oBACA,oBACA,mBACA,CACA,4BAMA,YALA,WAAgB,YAAmB,KACnC,WAAgB,kBAA4B,EAC5C,CAAgB,iDAAmD,GAAa,GAChF,CAAgB,SAAmB,EACnC,OAAgB,YAAkB,EAqClC,MAnCA,cACA,QACA,YAEA,EADA,MACA,EACA,MACA,QAGA,GADA,OACA,EACA,MACA,OAEA,MAGA,EADA,WACA,kBACc,YACd,oBAEA,YAEA,WAEA,EADA,MACA,EACA,MACA,QAGA,EADA,QACA,EACA,MACA,OAEA,KAEA,CACA,KACA,KACA,KACA,KACA,KACA,IACA,CACA,CACA,qBAGA,MAFA,iBACA,WAEA,MACA,MAA8B,GAAa,yBAQ3C,QAPA,4BACA,sCACA,wBACA,EAAwB,GAAM,aAC9B,iBACA,yBACA,gBACuB,IAAY,IACnC,6CACA,oBACA,SACA,4BAGA,CACA,CACA,yBACA,0BACA,2BACA,CAAgB,wBAAwB,EACxC,EAAyB,GAAM,YAC/B,oBACA,SACA,sCACA,QACA,oBACA,OACA,uBACA,wBACA,oBACA,aACA,EACA,wBACA,OACA,oCACA,iCACY,GAAS,SACrB,4BACA,8BACY,GAAS,QACrB,EAAU,IACV,YAA4B,GAAQ,0EACpC,4BACA,gCACA,uCACA,wBACA,iCACA,EAAiC,GAAa,gBAC9C,iCACA,cACA,iCACgB,GAAkB,GAClC,IACA,IACA,IAHkC,EAIlC,EACA,QACA,CAAiB,EACjB,SACA,WACA,8BACA,cACgB,GAAkB,GAClC,IACA,MACA,EAHkC,EAGlC,EACA,MACA,QACA,CAAiB,EACjB,WAEA,iCACA,oBACA,sBACA,8BACA,0BAEA,CACA,oCAEA,oBAYA,cAXA,SAAgB,GAAQ,KACxB,aAAgB,mEAA+E,EAC/F,EAAyB,GAAM,YAC/B,eACA,IACA,EAA0B,GAAa,yBACvC,cACA,iCACA,QACA,EACA,iBASA,IAPA,cACA,wBACA,gBACA,iBACA,wBACQ,GAAI,mBACZ,4CACA,eAAuC,IAAU,KAUjD,IATA,OACA,0BACA,cACY,GAAI,YAChB,UACA,cACA,8BACA,4BAEA,eAA4C,IAAU,IACtD,QACA,eAEY,GAAI,UAChB,CACA,IACA,eACQ,GAAI,kBACZ,MACA,CACA,sBAGA,IAFA,kBACA,WAEA,MACA,MAA8B,GAAa,yBAQ3C,IAPA,6BACA,uBACA,uCACA,wBACA,EAAyB,GAAM,cAC/B,0BACA,gBACA,IAAuB,IAAY,IACnC,6CACA,kCAGA,CACA,wBACA,WAAgB,YAAmB,KACnC,GAAgB,OAAS,EACzB,OAAgB,YAAkB,EAClC,SAAgB,yCAAiD,GAAe,eAChF,+BACA,4BACA,0BACA,cACA,gBACA,WACA,wBAEA,kBACA,kCACA,2BACA,wBAEA,oBACA,sCACA,cACA,wBAEA,kBACA,kCACA,0BACA,wBAEA,gBACA,8BACA,cACA,SACA,iBACA,UAEA,CACA,0BACA,iBACA,mBACA,SACA,SACA,SACA,iEACA,MACA,OAEA,4BACA,kBAAoD,eACpD,YACA,cACA,6BACA,qBACA,qBACA,mBACA,qBACA,gBACA,gBACA,yCAEA,CACA,CACA,cACA,qBAEA,QACA,iDACA,eACA,MACA,OAEA,+BACA,OACA,iBACA,kBACA,EACA,GACA,SACA,UAEA,uBACA,MAAwB,GAAS,WACjC,wGACA,gBACA,SACA,gBACA,6BACY,GAAqB,mBACjC,WACA,sBACA,qBACA,uBACY,GAAoB,mBAChC,YAEA,CACA,oBACA,wBAEA,uBACA,mBACA,uBAA6C,UAAuB,IACpE,mCACA,MACA,iDAEA,OACA,eACA,kBACA,OACA,CACA,CAAS,EACT,GAAyB,GAAc,KACvC,MADuC,CACvC,sBACA,SACA,eACA,sBACA,4BACA,gBAEA,CACA,sBACA,+BACA,QAEA,6BACA,mBACA,mBACA,mCACA,6BACA,MAAmC,GAAc,QAWjD,GAXiD,IACjD,IACA,eACA,0BACA,qBACA,MACA,OAEA,oBAGA,CACA,CACA,4BACA,mBACA,uBACA,SAEA,MACA,SAEA,yDAIA,OAHA,WACA,YAEA,CACA,CACA,sBACA,WAAgB,sBAA6B,KAC7C,gCACA,gCACA,CACA,CA2IA,mBACA,oBACA,cACA,WACA,QACA,OACA,CAAS,GACH,UACN,SAEA,GAUA,wBAAyD,GAAW,mBACpE,eACA,8BACA,iBACA,KAEA,CACA,CACA,oBACA,4BACA,UACA,OACA,WACA,CACA,cACA,GACA,SACA,wBACA,mBACA,qBAEA,QACA,wBACA,aACA,uBACA,QAAyB,iBAAiB,IAC1C,UACA,aAGA,sBAEA,aACA,CACA,WACA,GAAY,GAAa,GACzB,OADyB,KAGzB,uBAEA,UADA,0BA/CA,kBACA,0BACA,OACA,YAGA,IADA,iBACA,GACA,EAwCA,IAA+F,GAAc,wBAC7G,WACA,CACA,sBACA,eAAgB,gBAA2B,qBAC3C,KAAc,SAAa,kBAC3B,iCACA,GACA,MAEA,GACA,+BAGA,WACA,UACA,CACA,aACA,eACA,WACA,sBACA,KACA,mBACA,yCACA,8CACA,mCACA,YAA6B,KAAc,IAC3C,QACA,OACA,CAAa,EAEb,QACA,CACA,oBACA,sBACA,CACA,YACA,kBACA,qBACA,0CAEA,CACA,oBAIA,MAHA,oBACA,kBAEA,2EACA,CACA,mBACA,wBACA,kBACA,KAEA,iCACA,CACA,oBACA,+EACA,CACA,eACA,mBAEA,CAsGA,4BAAgD,gBAA2B,EAC3E,MAAgB,GAAS,GACzB,GADyB,EACzB,+BACA,sBACA,sBACA,CACA,oBACA,eACA,SACA,kBACA,gBACA,wBACA,sBACA,kBACA,CACA,kBACY,GAAa,IAGzB,MAHyB,KAGzB,8CAFA,KAKA,EACA,CACA,yBACA,gBAAgB,GAAe,aAC/B,YAAgB,gBAA2B,qBAC3C,KAAc,SAAa,KAC3B,aACA,aACA,MACA,MAA4B,GAAI,GAChC,EAA4B,GAAI,EAChC,UACA,KACc,UACd,IAEA,CACA,UACA,8BACA,OACA,GACA,MAEA,CACA,WACA,UACA,CACA,mBAGA,EADA,kBAAc,cADd,mBAgBA,OAbA,EACA,mDACA,MACA,uBAAuC,QAAQ,mBAAmB,GAAU,gCAAgC,GAAU,2BACtH,QAGA,0BACA,SAEA,GACA,kBAEA,CACA,CACA,mBACA,gCAEA,aACA,mBACA,UACA,sBAgBA,EA9LA,kBAYA,QAXA,SAEA,QAAY,iFAAwF,EACpG,OACA,MACA,CAAY,aAAyB,EACrC,GAAwB,GAAa,GACrC,GAAwB,GAAa,CADA,EAErC,GAA0B,GAAa,CADF,EAErC,OADuC,CACvC,MACA,EAAkB,GAAO,aAEzB,KAXA,OAWA,OACA,OACA,CACA,OACA,CAAa,CACb,CACA,OACA,EACA,CAEA,mCACA,GACA,GAAkB,GAAO,YAEhB,GAAa,IAEtB,MAFsB,EAEtB,OADA,oBACA,GAEA,aACA,oBACA,qBAEA,IACA,KAEA,SDn9SA,WCm9SuD,CDn9SvD,EACA,oBACA,qBACA,ECg9SuD,gBACvD,kCACA,UACA,IACA,KACM,GACN,QAGA,IAFA,SAEA,GADA,SAKA,EADY,GADZ,SACwB,sBACxB,cAEA,aAGA,eAAmC,GAAc,GAAW,GAAc,IAE1E,CAFiD,CAEjD,KAF0E,KAE1E,GADA,eAA0B,GAAa,YAEvC,oBACA,QAgBA,IAfA,IACA,UACA,QACA,OACA,CAAa,EACb,KACA,IAEgB,GAAY,sCAC5B,KAEU,KACV,KAGU,IAAe,KACzB,8BACA,UACA,MAEA,QACA,OACA,CAAS,CACT,CAcA,OAbA,YACA,UAA4B,GAAY,iCACxC,sBAEA,QACA,OACA,CAAa,EAEP,UACN,QACA,OACA,CAAS,EAET,CACA,EA6EA,CACA,SAFA,gBAGA,gBACA,UACA,UACA,sBACA,gBACA,cACA,4BACA,+BACA,6BACA,kCACA,EACA,mBAaA,MAXA,oBACY,GAAkB,gBAE9B,WACA,YACA,oBACA,oBAEA,oBACA,mBAEA,CACA,CACA,YACA,iBACA,WACA,WAEA,GADA,kBACA,+BACA,qCACA,KACA,IACA,CACA,mBACA,iBACA,oBACA,CACA,oBACA,OAAe,GAAY,sDAC3B,CACA,CAEA,oBACA,0BACA,UACA,OACA,SAAsB,GAAK,mBAE3B,EACA,sBACA,QAAgB,SAAa,kBAC7B,UAAmB,GAAc,OACjC,SAAmB,GAAc,OACjC,IADiC,CACjC,wBACA,CACA,mBACA,0BACA,2BACA,EAA4B,GAAS,gCACrC,oCAEA,+BADA,gCACA,cACA,CACA,oBACA,kFACA,CACA,oBACA,mEACA,CACA,CAEA,qBAAmC,GAAK,IACxC,+BACA,eAEA,UADA,oBAEA,CACA,mBACA,qBACA,kBAEA,YADA,UACA,CACA,CAkDA,oBACA,+BACA,UACA,OACA,SAAsB,GAAK,uBAC3B,OACA,UACA,CACA,CACA,cACA,GACA,SACA,kBACA,gBACA,wBACA,kBACA,CACA,WACA,qCACA,EACA,EACA,EACA,UACA,cACA,MACA,CACA,OAAe,GAAc,cAC7B,CACA,sBACA,QAAgB,SAAa,kBAC7B,UAAmB,GAAc,sBACjC,SAAmB,GAAc,sBACjC,0BACA,gBAEA,4CAA8D,GAAc,gBAC5E,6DAEA,6BACA,CACA,yBACA,IAAgB,2BAA2B,qBAC3C,WACA,WACA,aACA,aACA,QACA,MACA,KACA,QAEA,YACA,aAGA,MACA,YAEA,MACA,WAEA,WACA,UACA,CACA,aACA,mBAKA,EA5GA,gBAA6C,QAAY,EACzD,EAAU,GAAe,SACzB,GADyB,CACzB,KACA,QACA,EAfA,cAEA,SADA,KAEA,mBACA,IAEA,mBACA,IAEA,wBACA,EAKA,KACA,iCACA,iBACA,uBACA,wBACA,8BACA,mCACA,EAAgB,GAAe,8CAC/B,UACA,QACA,QACA,YACA,aACA,CAAS,EACT,MACA,aAEA,IAEA,QAEA,IACA,cAEA,yCAEA,MAAqB,GAAe,SAMpC,GANoC,IACpC,QACA,QACA,YACA,aACA,CAAK,EACL,CACA,EAmEA,CACA,kBACA,mBAEA,MAYA,MAXA,oBACY,GAAkB,gBAE9B,WACA,YACA,oBACA,oBAEA,oBACA,mBAEA,CACA,CACA,oBACA,sBAA2C,GAAY,sDACvD,CACA,YACA,eACA,kBACA,iBAA2B,GAAK,GAChC,iBAA2B,GAAK,UAAa,GAAK,GAElD,0BAIA,CAHA,qBACA,aAEA,oBACA,IAEA,2CAAsE,sCACtE,CACA,oBACA,iCACA,uDACA,CACA,CAEA,eACA,cACA,yBACA,MAAwB,GAAS,mBACjC,OAAe,GAAc,oBAAsC,GAAQ,oBAE3E,QACA,CAUA,8BACA,aACA,CACA,YACA,SACA,EACM,SACN,CACA,UACA,KACA,EAEA,CACA,QACA,OACA,CACA,CAqLA,qBACA,QAAY,GAAO,EACnB,KACA,8BAAyD,GAAG,KACtD,CACN,8BACA,kBACA,YAAuB,IAAgB,IACvC,0BACA,iBAEA,CACA,CA0BA,oBACA,gCACA,UACA,WACA,WACA,qBACA,YACA,WACA,YACA,cACA,kBACA,CAAS,CACT,MACA,WACA,CAAS,CACT,aACA,OACA,qBACA,SAAsB,GAAK,kBAC3B,CAAS,CACT,aACA,qBACA,kBACA,WACA,MACA,OACA,CAAa,CACb,YACA,EAEA,UACA,oBACA,CACA,SACA,eACA,iCACA,4BACA,qBACA,SACA,aACA,YACA,gBACA,CACA,cACA,GACA,SACA,oBACA,oBACA,wBACA,qBACA,yBAEA,gBACA,oBAAwC,GAAS,oBACjD,mCACA,sCACA,8CACA,4CACA,4CACA,CACA,sBACA,QAAgB,SAAa,kBAC7B,UAAmB,GAAc,kBACjC,SAAmB,GAAc,kBACjC,6BACA,CACA,mBACA,mDACA,CACA,sBACA,6CACA,+CACA,MAA0B,GAAQ,mCAClC,EACA,EACA,OACA,oBACA,CAAS,gDACT,CACA,MACA,mBACA,iCA3SA,YACA,OACA,yBACA,2BACA,uBACA,8BAEA,kBAAmC,IACnC,KACA,KACA,wBACA,wBACA,sBAA+D,EAAE,KACjE,YAAmB,IAAgB,SAvCnC,IAwCA,6CACA,gBACA,iDACA,EAAuB,GAAM,QAC7B,GA5CA,EA4CA,MA3CA,EAAY,GADZ,EA4CA,mBA3CmB,GACnB,EACA,CACA,CACA,EAAW,SD5jSX,aAaA,UAXA,MADA,UACA,gBACA,wCACA,aACA,YACA,sBACA,UAEA,SACA,SACA,QACA,WAEA,QAAe,IAAU,IAGzB,SAFA,UAEA,MAEU,UAGV,mBAA4C,IAAU,UACtD,UAEA,OACA,iBAGA,MAXA,gBAaA,YACA,iBACA,eACA,QAAmB,IAAW,IAC9B,eAEA,aACA,CACA,QACA,ECohSuB,cACvB,yBAuCA,QACA,MAA6B,GAAe,sBAC5C,aDr3TA,OCq3T0C,IAG1C,SAKA,WACA,4BACA,wBACA,IACA,GACA,cACA,kBACA,yBACM,YACN,gBACA,yBAEA,aACA,kBACA,yBACM,YACN,gBACA,wBAEA,EAxBA,MAFA,oBACA,qBAEA,CACA,kDACA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O,EACzD,EADyD,IACzD,CACA,6BACA,6BACA,OACA,CACA,CACA,8BACA,qEACA,CACA,mBACA,8DACA,CACA,yBACA,SAAgB,0BAA+B,yBAC/C,OACA,OACA,MACA,QACA,QACA,CACA,CACA,iBACA,oBAAgB,iBAA0B,IAAe,aACzD,MACA,eACA,SACA,cACA,uFACA,cACA,cACA,SACA,WACA,CACA,CACA,eAKA,MAJA,eACA,eACA,YAAgB,mBAA8B,EAC9C,2BAgBA,GAdA,uBA3NA,cACA,QAAY,uBAAiB,IAAkB,EAC/C,cAAgC,KAAQ,KACxC,4BACA,cACA,SAEA,+CACA,SAlCA,OACA,IAAY,+BAA+B,EAC3C,eAAY,GAAiB,EAC7B,IAAS,GAAa,IACtB,MAA6B,GAAa,gBAC1C,EAAwB,GAAS,kBACjC,eACA,eACA,UACA,cACA,eACA,iCACA,cACY,GAAkB,GAC9B,IACA,IACA,IAH8B,EAI9B,EACA,QACA,CAAa,EACb,UAEA,mBAEA,CACA,EASA,OACA,MAAuB,GAAM,QAC7B,GAAgB,mBAAqB,EAC7B,GAAU,0CAClB,cACA,YACA,qBACA,CAAS,CACT,CACA,EA2MA,QAEA,WACA,2BACA,UACA,8CACA,yBACA,kBACA,mBArMA,oBACA,YACA,aACA,OAAY,eAAqB,EACjC,uBAGA,SACA,gBACA,cACA,sBACA,8BACA,cACA,YACA,cACA,WACA,YACA,EAqLA,aACA,CACA,CAAa,EAEb,WAEA,IADA,SACA,MAAoC,KAAQ,KAC5C,iDACA,OAAwB,eAAqB,EAC7C,OAGA,cACA,gBACA,4BACA,oCACA,wEACA,6BACA,cACA,oCACA,kBACA,WACA,CACA,WACA,CACA,CACA,cACA,iBAQA,IAPA,eACA,eACA,UACA,cACA,OAEA,4BAEA,SACA,uCACA,YACA,qBACA,wBACA,2BACA,qBACA,OAEA,uCACA,EAA6B,GAAM,QAEnC,GADA,0DACA,qBACA,gBACA,+BACA,4BACA,MAAgC,GAAS,mBACzC,mEACA,CACY,GAAU,kBACtB,cACa,CACb,CAAS,EACT,WACA,CACA,aACA,CAEA,QACA,aACA,UACA,OACA,SACA,CAAK,CACL,QACA,UACA,SACA,QACA,CAAK,CACL,QACA,UACA,SACA,QACA,CAAK,CACL,MACA,UACA,UACA,QACA,CAAK,CACL,KACA,UACA,WACA,QACA,CAAK,CACL,MACA,UACA,YACA,OACA,CAAK,CACL,OACA,UACA,YACA,QACA,CAAK,CACL,SACA,UACA,YACA,OACA,CAAK,CACL,MACA,UACA,WACA,CACA,EACA,mBACA,iBACA,UACA,CACA,iBACA,GAAQ,GAAa,GACrB,YAEA,iBACA,QAAY,wBAA+B,aAC3C,UAOA,CANA,sBACA,SAES,GAAc,IACvB,OADuB,MACvB,kCAEA,UACA,MAEA,GACA,gBAAqC,GAAQ,qDAE7C,GACA,CACA,qBACA,gBACA,wBAAwC,MAAc,KACtD,gBACA,0CACA,4CACA,YAEA,CACA,eAkBA,mBACA,KAEM,cACN,OAAgB,QAAW,GAAS,KAEpC,EADA,kBACA,GACA,OALA,OAMA,CAcA,uBAIA,IAHA,SACA,KACA,WAEA,QAAe,IAAU,IAEzB,EADA,OACA,GACA,QACA,QACA,QACA,CAAS,EAET,gBA1BA,sBAIA,IAHA,iBACA,2BACA,sBAEA,QAAuB,KAAe,gBACtC,UACA,GACA,gBAGA,QACA,EAcA,UACA,CACA,oBACA,wBACA,UACA,cACA,WAAoB,CACpB,MACA,UACA,QACA,SACA,cACA,sBACA,iBACA,CAAS,CACT,OACA,cACA,YACA,OACA,UACA,CACA,CACA,cACA,GACA,SACA,aACA,QACA,UACA,QAEA,iBACA,uBACA,iBACA,oBACA,sBACA,CACA,WAA6B,EAC7B,yBAA2D,CAC3D,8CACA,UACQ,GAAO,8BACf,iBACA,gBACA,cACA,yBAEA,cACA,8BAEA,kBACA,WACA,KAEA,UACA,CACA,eACA,qBACA,aACA,QACA,UACA,OAEA,CACA,sBACA,mBACA,gBACA,qBACA,KAAc,mCAAuC,qBACrD,cACA,iBACA,sBAEA,iBACA,qBAEA,CACA,OACA,0BACA,iDACA,uBAGA,EAAc,GAAc,yCAC5B,EAAc,GAAc,yCAC5B,yBACA,wBACA,CACA,kBACA,gCACA,2BACA,2BAKA,OAJA,WACA,OACA,iBAEA,CACA,MACA,KACA,CACA,CACA,aACA,mBACA,SACA,UACA,gEACA,gCACA,6BACA,uCAEA,eAEA,ED35UA,gBACA,QACA,WACA,kBACA,IAEA,oBACA,IAEA,qCACA,ECi5UoC,IADpC,UAQA,OANA,yFAnKA,oBACA,sBAAkC,iBAA6B,KAC/D,YACA,6CACA,QAEA,CACA,8BA4JA,4CACA,qDA3JA,YACA,sCAA8D,IAAU,IACxE,oBACA,cAwJA,mBACA,oBACA,WACA,YAEA,0BACA,CACA,gBACA,kCACA,6CAEA,CACA,kBACA,IAEA,IAFA,IACA,GAEA,iCACA,gCAEA,EADA,aACA,IAEA,oCAEA,yCAEA,EADA,aACA,EAEA,8CAGA,wBACA,EAAgB,GAAW,OAC3B,CAD2B,CACb,GAAW,OACzB,CADyB,GACzB,WACA,QACA,MACA,gBACA,CACA,CACA,gBAYA,IAXA,oBACA,WACA,WACA,eACA,SACA,sDACA,EAAyB,GAAc,oBACvC,2BACA,EAA2B,GAAQ,WACnC,KACA,IAMA,GAJA,GACA,8BAEA,0BACA,oBACA,wEAEA,wDACA,YAAqC,IAAY,oBACjD,UAKA,MAHA,oCACA,UAEA,0CACA,CACA,oBACA,oBACA,2BACA,gBACA,4BAEA,qCACA,CACA,YAEA,MADA,aACA,oBACA,aACA,UACA,gCACA,CACA,6BACA,mBACA,mBACA,KACA,OAAmB,GAAQ,GAC3B,EAD2B,EAG3B,EACA,OAEA,4BACA,aACA,kBACA,UACA,UACA,OACA,mBACA,yCACA,CACA,sBACA,UACA,mBAAwC,IAAU,IAClD,SACA,2CAEA,CACA,sBACA,oDACA,CACA,oBACA,oBACA,6BACA,oDACA,CACA,oBACA,oBACA,4CACA,qCACA,CACA,iBACA,yBACA,gCACA,EAAsB,GAAS,iDAC/B,cACA,cACA,uCACA,OACA,UACA,SACA,CACA,CACA,qBACA,wBACA,mBACA,2BACA,wCACA,EACA,qBACA,wBACA,mEACA,cACA,CACA,oBACA,IACA,IADA,uBAEA,YACA,SAEA,qCACA,8BACA,iEAEA,mBAAwC,IAAU,IAClD,qDAEA,yCACA,CACA,yBAEA,IADA,6BAEA,YACA,SAEA,uBACA,mBAAyC,IAAU,IACnD,sBAEA,8DACA,CACA,aACA,OAAe,GAAY,WAC3B,CACA,CAEA,SAAS,GAAW,OACpB,IAEA,GAHoB,CAGpB,IAFA,IACA,aAEA,GACA,0BACA,KAAe,QAAa,GAAY,YAExC,CAAW,cAAsC,KACjD,CAAW,cAAsC,OAEjD,4BACA,KAAe,QAAW,GAAc,aAExC,CAAW,cAAsC,KACjD,CAAW,cAAsC,MAEjD,UACA,0BACA,CACA,oBACA,8BACA,iCACA,GACA,SACA,eACA,oBACA,uBACA,CACA,cACA,oCACA,sCACA,cAAuB,GAAW,YAClC,EADkC,EAClC,aAA2B,GAAW,yBACtC,oBACA,CACA,wBAIA,MAHA,QAAgB,SAAa,KAC7B,KACA,KAEA,mBAA6C,IAAU,IACvD,UACA,SACA,UAGA,cACA,OACA,CACA,OACA,KACA,CAAiB,CACjB,CACA,OACA,KACA,EACA,CAEA,mBAAwC,IAAU,IAIlD,YAHA,OACA,QAEA,KADA,UAEA,QACA,OACA,WACA,CAAiB,EAGjB,QACA,CACA,yBACA,0BACA,YACA,SAEA,+BACA,4BAOA,OALA,EADA,mBACA,4BAEA,aAEA,mBAEA,CACA,sBACA,OAAgB,GAAW,6CAC3B,CACA,oBACA,oBACA,4CACA,OAAe,GAAW,+CAC1B,CACA,CCxoWA,eACA,iBACA,qBACA,KACM,GACN,aAEA,CAUA,iBACA,gEACA,KACA,qBAEA,4CAEA,2BACA,CACA,OAGA,UACA,mBACA,EACA,CAAK,CACL,CA0HA,IAAM,GAAsB,OAAjB,QAAiB,CAAU,CAhFtC,cACA,WAAY,uHAAgJ,EAC5J,EAAsB,YAAM,OAC5B,EAAqB,YAAM,GAC3B,OACA,YACA,cAA+B,GAAO,WACtC,OACA,cAjDA,OApBA,EAqBA,gEACA,GACA,UACA,aAIA,OA5BA,EA0BA,WAzBA,SA0BA,mBACA,CACA,EAwCA,KACA,YACA,KACa,CACb,SACA,CAAS,EACT,gBACA,EACA,OACA,WACA,YACA,oBACA,eAEA,EAmDA,MAlDI,eAAS,MACb,kBA3FA,cACA,gBACA,MACA,kBAEA,EAuFA,YAEA,CAAK,EACL,EACA,EACA,EACI,eAAS,MACb,sBA7FA,MA8FA,sBA9FA,EA8FA,SA7FA,UA8FA,CACA,CAAK,EACL,EACA,SACA,EACI,eAAS,MACb,2BACA,sCAEA,CAAK,EACL,EACA,WACA,EACI,eAAS,MACb,YACA,GACA,IACA,eAEA,oBAEA,CAAK,EACL,EACA,EACA,SACA,WACA,EACA,EACI,eAAS,MACb,YACA,IACA,cACA,CAAK,EACL,EACA,EACI,eAAS,MACb,IACA,SACK,IACoB,eAAmB,yBAC5C,MACA,WACA,SACA,OACA,CAAK,MACL,GAWA,IAPI,GAAO,SAOyC,IAN3B,SAMwC,MANxC,CAAU,QAA6B,eAAmB,CAAC,GAAK,gBAAkB,IAC3G,MACA,KAIA,KAHA,CAAS,KCvJTiE,GAAQxqB,EAADwqB,MAAS,CAACC,GAAeC,GAAaC,GFokR7C,CACA,IErkR2CD,EAAYC,EAAE/c,GFskRzD,SAAW,EEtkRqD1+B,CFukRhE,QADgB,CAChB,IEvkRuEA,CFwkRvE,CExkRyE07C,QF0jRzE,KE1jR+EA,IF2jR/E,MAAsB,GAAK,CAC3B,OAD2B,EAC3B,CACA,UACA,OACA,CAAK,EACL,oBACA,eACA,cACA,EAKA,IACA,CAAK,CACL,QACA,mBACA,kBACA,oBACK,CACL,oBACA,mBACA,oBACA,WACA,CAAK,CACL,UACA,eACA,WACA,MACA,aACA,CAAS,CACT,YACA,WACA,eACA,QACA,UACA,CAAK,CACL,eACA,aACA,CAAK,CACL,aACA,eACA,aACA,CACA,EA83BA,CACA,aACA,YACA,eACA,iBACA,GACA,mBACA,QACA,SACA,EAAa,CAEb,CAAK,CACL,oBACA,WACA,uBAEA,CAAK,CACL,aACA,WACA,uBAEA,CAAK,CACL,aACA,gBACA,uBACA,OACA,SACA,EACA,IAGa,IAHb,qCACA,KACA,aACA,CAAa,EACb,OAEA,cACA,qCACA,CACA,CAAK,CACL,gBACA,cACA,eACA,gDACA,cAEA,CACA,CAAK,CACL,UACA,WACA,cACA,mBACA,kCACA,kBACA,WACA,aACA,CAAS,CACT,eACA,oBACA,kBACA,iBACA,cACA,WAAoB,CACpB,iBACA,mBACA,gBACA,kBACA,YACA,aACA,CAAS,CACT,mBACA,UACA,eACA,YACA,eACA,iCACA,gCACA,0BACA,iBACA,aACA,4BACA,cACA,WACA,aACA,qBACA,CAAS,CACT,YACA,SACA,cACA,YACA,IACA,IACA,QACA,SACA,SACA,SACA,CACa,CACb,SACA,gBACA,YACA,CACA,CAAS,CACT,YACA,CAAK,CACL,eACA,gBACA,kBACA,gBACA,CAAK,CACL,aACA,4DACA,cACA,WACA,eACA,aACA,CAAS,CACT,WACA,YACA,CAAS,CACT,YACA,qBACA,CACA,CAAK,CACL,wBACA,cAEA,EAvuCA,CACA,YACA,YACA,aACA,uBACA,UACA,UACA,OACA,CAAS,EACT,oBACA,cACA,CAAK,CACL,QACA,yBACA,gBACK,CACL,oBACA,eACA,oBACA,WACA,CAAK,CACL,eACA,eACA,gBACA,kBACA,CAAK,CACL,gBACA,UACA,6BAEA,CAAK,CACL,UACA,WACA,eACA,eACA,YACA,WACA,WACA,eACA,qBACA,UACA,uBACA,UACA,cAEA,UACA,YAEA,CAAS,CACT,aACA,aACA,QACA,+BACA,YACA,WACA,kBACA,sBACA,CAAwB,sBAAU,sEAAsF,iBACxH,0CACA,wCACA,EAAwC,GAAS,eACjD,OACA,sBACA,4BACA,YACA,kBACA,yBACA,sBACA,kCACA,2BACA,+BACA,0BACA,2BACA,oBACA,yBACA,oCAC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GAIA,oBAIA,oBAKA,2BAKA,2BAKA,mFAIA,mBACA,mCACA,CAAK,CAIL,2BACA,mCACA,CAAK,CAQL,2CAUA,qBACA,qBACA,6DAEA,aACA,QACA,2BACA,oBACA,KACA,YAAwB,WAAkB,MAC1C,WACA,eACA,aACA,eACA,aACA,OACA,gBACA,iBACA,OACA,IACA,KACA,GACA,QAGA,2BACA,CACA,iBACA,CAAK,CASL,yBAGA,4BACA,QAEA,4BACA,CAAK,CASL,yBAGA,4BACA,QAEA,oCACA,CAAK,CAgBL,6BACA,aACA,QACA,2BACA,oBACA,KACA,YAAwB,WAAiB,EACzC,uBAEA,EADA,WACA,iBAGA,IADA,WACA,kBAGA,IADA,WACA,kBAEA,GADA,IACA,mCACA,YAEA,gBAEA,GADA,UACA,QACA,oBAEA,GADA,UACA,QACA,iBACA,SACA,CACA,CACA,CACA,QACA,CAAK,CAML,QACA,yBACA,uBACA,uBACA,8BACA,8BAEA,YAA4B,2BAA8B,IAC1D,mDACA,8CACA,kEACA,4DAEA,mCACA,2DACA,0DAGA,CACA,CACA,CAIA,uBACA,cACA,oBACA,mCACA,CACA,CAIA,kBACA,WACA,8BACA,EAKA,cAEA,6BACA,EAUA,cACA,IACA,2BACA,CACA,SACA,wCACA,CACA,WACA,EA4HA,OA7BA,WACA,4BACA,YAEA,8BACA,cAEA,QAAqB,IAAN,GAAM,CACrB,OAAe,GAAM,OAErB,yCACA,IAkBA,sBASA,OACA,QAAsB,IAAP,GAAO,KAAkC,IAAP,EAAO,IACxD,CADwD,MAGxD,MAA+B,EAAO,0BACtC,KACA,oBAEA,EACA,WAIA,EAHA,gCACA,OAGA,IACA,mDAAiE,KACjE,CACA,SAGA,MACA,CACA,iBACA,uBACA,EAQA,OACA,IACA,YACA,KACA,GACA,CACA,SAOA,4DAAoE,EAAE,GACtE,MACA,CACA,EAOA,MAAkD,QAAY,6FA8B9D,OAAoC,MAAQ,mDAM5C,MAA2C,MAAQ,+CAAwE,EAAK,GAkBhI,SACA,cACA,mBACA,oBACA,iCACA,eACA,aACA,CAAS,CACT,CAMA,gBACA,cACA,EACA,eAGA,gBAEA,uBAGA,yBAA4C,EAG5C,aACA,KAGA,OAGA,CACA,CACA,CAoEA,SAAS,UACT,SADc,IACd,kBACA,qCACA,oBAGA,EAEA,CA2MA,sBACA,YAEA,IAEA,GACA,SACA,YACA,kBAEA,UAbA,gBAgBA,wCAGA,yBACA,gDAEA,CACA,CACA,QACA,mBACA,eACA,mBACA,aACA,CACA,eACA,eACA,KAA4B,aAAa,GAAG,EAAK,EACjD,iBACA,MAQA,kBACA,WACA,6BAAmD,EAAI,IAClD,EAXL,QAEA,KAA+B,iBAAiB,IAAI,GAAS,GAAG,EAAS,IAEzE,OADA,YAEA,CACA,CAOA,SAAmB,MAAM,IAAI,GAkM7B,gBACA,SACA,SAEA,qBACA,iBACA,gBACA,kBACA,SAEA,WACA,OACA,cACA,YACA,QACA,MAEA,SACA,QAEA,CACA,eACA,kBACA,SAGA,QACA,CACA,cACA,mCACA,CAkDA,SAAS,EAAW,GACpB,SACA,WAFoB,CAEpB,qBACA,iBACA,cACA,uDACA,CAAa,EAGb,wDAGA,kCACA,CAKA,cACA,SAQA,OAPA,+BACA,YACA,MACA,qBACA,+CACA,CACA,CAAK,EACL,CACA,CAIA,cACA,qBACA,MACA,SAEA,uBACA,kCACA,CAkRA,QAMA,iBACA,kBACA,qBACA,qBAEA,4BACA,kBACA,qBAIA,UACA,UACA,OACA,CAAS,EACT,UACA,aACA,CAAS,CACT,CACA,QACA,yBACA,SACA,CAAS,CACT,CACA,SACA,yBACA,UACA,CAAS,EACT,aACA,CACA,WACA,yBACA,YACA,CAAS,EACT,YACA,CAOA,qBACA,EACA,eACA,YACA,WACA,gCAiBA,WATA,GALA,SA8HA,KACA,gCACA,SAEA,eACA,mCACA,SAGA,QACA,EAxIA,GACA,OACA,QACA,WACA,EAIA,CACA,OACA,QACA,UACA,EAPA,GASA,MACA,WAEA,kBACA,YAEA,qBACA,eAEA,2DAsBA,OAlBA,gBAEA,oBACA,IACA,gBACA,yBAGA,YAEA,CACA,SAEA,CAEA,CAAa,EAEb,uBACA,CACA,CAGA,kBACA,sDAGA,yBACA,sBACA,qDACA,yBAEA,CACA,mBACA,mBAMA,YAAwB,wBAA2B,IACnD,iBAEA,CAIA,aAGA,oBACA,uDACA,IACA,oBACA,CACA,SAIA,4CACA,gBAEA,CAEA,CAAS,CACT,CACA,SACA,iBAGA,kBACA,YACA,oBAIA,oBACA,sBACA,yBACA,CAAS,EACT,CACA,CA8BA,aAEA,CA6UA,SAAS,EAAkB,UAC3B,eACA,KAF2B,MAE3B,CAGA,CAEA,CCvjEA,QAOA,mBACA,YACA,uBACA,YACA,0BAIA,qBACA,8BACA,2BACA,CACA,wBAEA,OADA,yBACA,IACA,CACA,wBAEA,OADA,yBACA,KAEA,mBAEA,OADA,oBACA,KAEA,8BAEA,OADA,yBACA,KAEA,CAkBA,iBAsBA,SACA,iBACA,YACA,iBACA,oBACA,uBACA,+BACA,8BACA,4BACA,CAKA,OAEA,0CACA,mCACA,UAAiC,EAEjC,GADA,GADyC,CACzC,4BACA,uBACA,4BAEA,IACA,mCACA,oBACA,CAAqB,EACrB,GACA,YAEA,CACA,SAGA,CAEA,CACA,6CAEA,gBACA,MAEA,oEACA,sDACA,0BACA,4BACA,IACA,oCACA,oBACA,CAAiB,CACjB,CACA,SACA,KACA,WAGA,QAEA,KAEA,CAEA,KACA,WAGA,wBAAuC,WAAW,kBAElD,CACA,CACA,eACA,sBAEA,gBACA,sBACA,qCAAiD,QAAgB,eAAe,UAAU,IAE1F,kBACA,6BAAyC,WAAW,4BAIpD,GAFA,iBAEA,6BAIA,GAyKA,UAzKA,EAyKA,kBAxKA,IACA,6BAA8C,qBAAwC,CACtF,CACA,SAKA,CAKA,iDACA,0CACA,IAEA,mCACA,oBACA,CAAiB,EACjB,YACA,CACA,SAGA,CACA,EACA,CACA,mBACA,iCACA,gCACA,wBACA,CAGA,eACA,yCACA,uBACA,EACA,0BAEA,+BACA,EACA,yBAEA,oBACA,CACA,CACA,iBACA,4BAEA,mBACA,4BACA,CACA,gBACA,uCACA,CACA,eAAwB,EACxB,YAAgB,MAAe,EAC/B,yDACA,yBACA,eAA2B,UAAU,GAAG,EAAqB,iCAE7D,0BACA,yBAAqC,WAAW,8BAEhD,mCACA,qBACA,SACA,CAAS,EAET,gDAEA,IADA,qCAEA,aAGA,QACA,CASA,YACA,MACA,0CACA,+DACA,SACA,8BACA,4BAIA,OAHA,GACA,OAEA,KACA,WACA,CACA,CAKA,2BACA,kCACA,KAGA,eACA,IACA,MACA,CACA,SAEA,CAEA,CACA,2CAA6B,eAAkC,EAC/D,4BACA,wBACA,iDACA,mBA0CA,aA1CA,EACA,SACA,CAAa,EACb,wBACA,+BAMA,gCAMA,kCACA,IACA,oDACA,CACA,SAEA,CAGA,cACA,CACA,wCACA,eACA,qCAGA,CAEA,CACA,UAH+B,YAG/B,CACA,wBACA,8CAEA,CA4BA,QACA,eACA,YACA,sBACA,CAUA,gBACA,+BACA,sBACA,yBAAyC,QAAgB,mCAAmC,UAAU,GAEtG,iBACA,CACA,2BACA,yBACA,kBAEA,8BAEA,oBACA,CAQA,eACA,yBACA,6BAGA,oBAEA,OADA,wBACA,CACA,CACA,eACA,0CACA,CACA,CClYA,UAaA,YACA,qBACA,yBACA,mBACA,mBACA,qBACA,sBACA,CAAC,UAA4B,EAC7B,OACA,cACA,kBACA,YACA,YACA,cACA,eACA,EAIA,SAOA,GACA,gBACA,kBACA,gBACA,gBACA,iBACA,EAMA,eACA,gBACA,OAEA,+BACA,OACA,KACA,eAA4B,EAAI,KAAK,OAAc,cAGnD,0EAAsF,EAAQ,GAE9F,CACA,SAOA,eACA,YAIA,iBAKA,mBAIA,0BAIA,YACA,CACA,eACA,sBAEA,gBACA,aACA,kCAAkD,EAAI,4BAEtD,iBACA,CAEA,eACA,wCACA,CACA,iBACA,wBAEA,kBACA,wBACA,oEAEA,mBACA,CACA,qBACA,4BAEA,sBACA,sBACA,CAIA,YACA,8DACA,mCACA,CACA,UACA,sBACA,0CACA,qCACA,CACA,WACA,6DACA,kCACA,CACA,WACA,6DACA,kCACA,CACA,YACA,8DACA,mCACA,CACA,CClKA,uCAwBA,cACA,eACA,eACA,eACA,eA0DA,IACA,WACA,gCAEA,cACA,iBAEA,0BACA,qCAGA,eACA,6BACA,OACA,oCAEA,CAEA,OAAe,GAAI,KACnB,CAAK,CACL,SAFmB,KAGnB,OACA,IAEA,WACA,6BACA,2BAGA,MAEA,EA+CA,SAAS,GAAI,OAZb,EAeA,OAHa,SAGb,WACA,OA3IA,YACA,0BACA,WACA,mCACA,gCACA,EACA,OACA,EAAoB,GAAI,WACxB,GACA,EAFwB,EAGxB,KACA,WACA,GACA,EACA,gCACA,6BACA,CAAK,EAcL,OAbA,EACA,SAGA,wBACA,UAGA,CAAK,EACL,YAAwB,EAGxB,YACA,CACA,EA4GA,GAGA,aACA,iBACA,MApBA,mBADA,EAqBA,GAnBA,IA7BA,mCACA,8CAYA,CAzHA,GACA,IACA,4BACA,6BACA,uCACA,GAoHA,SAgBA,GAfA,eAIA,OAWA,EAZA,kBACmB,GAAI,YACvB,EAEA,EAHuB,OAGvB,MAGA,OAAe,GAKf,EALmB,kBACnB,EAvBA,iBACA,8BAEA,OADA,8BACmB,GAAI,EACvB,EA4BA,CAFA,WA3BuB,EA2BvB,gBAhGA,YAEA,aACA,OACA,0BACA,WACA,oCACA,iCACA,gCACA,EACA,OACA,IACA,GACA,EACA,OACA,wDACA,GACA,EACA,iCACA,8BACA,6BACA,CAAK,EAEL,WACA,EAyEA,GACA,IAzJA,GACA,IACA,YACA,eACA,SACA,UACA,eACA,IAmJA,gBAEA,EAkBA,OAJA,QACA,YACA,aAEA,CACA,CACA,oBCrIA,kDACA,kCACA,WACA,iBACA,+BACA,WACA,oBACA,OAEA,aACA,iBACA,iCACA,QACA,iBACA,GAEA,8CACA,qBACA,OAEA,6BAEA,mDACA,UAQA,OAPA,GACA,uBAMA,oBACA,WACA,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,SACA,GACA,oCACA,GACA,qEAEA,CAAK,EACL,YAAwB,EACxB,EACA,ECijBA,8BACA,EAK0B,CAC1B,gBAOA,IADA,GAEA,uBAEA,CACA,CAAS,YACT,4BACA,+BACa,CACb,EAAS,EAET,EACA,CACA,qBACA,IACA,iBAKA,OAJA,QACA,gBACA,gBACA,UAEA,CACA,SACA,gBAAyB,EACzB,WADsC,MACtC,MAEA,CACA,2BACA,8CACa,EACb,kBACA,CACA,CACA,CACA,uBACA,IAEA,OADA,YACA,4BACA,mBACA,sBACA,aAEA,SACA,gBAAyB,EACzB,WADsC,MACtC,MAEA,CACA,2BACA,8CACa,EACb,kBACA,CACA,CACA,CACA,eACA,SAAc,OAAS,GAAG,gBAAkB,EAsB5C,SACA,eACA,iBAUA,2BACA,sDACA,yBACA,2DACA,wBACA,GAEA,CAQA,yBAMA,MALA,eACA,+BACA,eAGA,wBACA,aAMA,CALA,8BACA,2DAIA,iDACA,sDACA,QAIA,4CAAoD,UAAa,EAGjE,6EACA,iCAEA,OADA,WACA,GArDA,MAsDA,CAAS,EACT,+CACA,CAQA,4BAKA,GAJA,8BACA,mCAGA,8BACA,4CACA,SAEA,WAEA,kBAAgB,mBAAkC,SAyBlD,IAtGA,IAsGA,EAGA,SAEA,YACA,gBAEA,mCACA,KAiBA,IAHA,qBAGA,SACA,cACA,KACA,OAdA,GAJA,QACA,cACA,eACa,EACb,SAGA,QACA,KACA,CAaA,YACA,CACA,OACA,mBACA,eACA,CACA,EAhEkD,kCAClD,EAA6B,EAA6B,gBAAkB,WAAlB,UAAkB,EAA0C,GAgBtH,OAdA,8CACA,YAEA,mCAIA,uDAGA,oCAEA,gDAEA,CACA,CACA,CACA,cAGA,OAFA,WAEA,6BACA,CAyCA,SACA,eACA,WACA,gEACA,CACA,2CACA,ELAA,WACA,IACA,KKFiC,CLEjC,0BACA,CACA,SACA,QACA,CACA,KKHmB,ILYnB,gBACA,IACA,CKd4C,GLc5C,KACA,4DACA,wBACA,kBACA,iBAEA,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uCACA,KMxJ+C,4BAC/C,iBA0DA,6CANA,6BAOA,CACA,CAkBA,qBA9IA,MA+IA,WA/IA,EA+IA,qCA9IA,GACA,MA8IA,QAAY,GAAM,kBAClB,EAGA,GAAc,EAAI,EAAE,+BAA4C,EAFhE,CAGA,CAkBA,SACA,yBACA,iBACA,GACA,qBAEA,GACA,qBAEA,CACA,sBACA,eACA,eAEA,yCACA,gBAEA,qHACA,CACA,wBACA,iBACA,iBAEA,2CACA,kBAEA,uHACA,CACA,yBACA,kBACA,kBAEA,4CACA,mBAEA,wHACA,CACA,CAqBA,QAEA,4CAEA,sCAEA,mCAEA,sCAEA,kCAEA,oCAEA,oCACA,gDAEA,0CACA,2CACA,6DAEA,kCAEA,iCACA,gDACA,uCACA,uCAEA,kCAEA,uDACA,sCACA,mCACA,oCAEA,gDACA,0EAEA,yCACA,+CACA,6CACA,+CACA,+BAIA,wDACA,gDAEA,kDAEA,kDAEA,8DACA,uDACA,sDACA,8DACA,oDACA,oEAEA,kDAEA,8CACA,kDACA,kDACA,oDACA,0CACA,sDACA,sDACA,mCACA,EAkBA,mBACA,wBACA,wBACA,8BAA6C,KAAc,oBAAyB,EAEpF,CACA,CACA,8BAAkF,EAClF,wBACA,SACA,KACA,IACA,UACA,IAGA,GACA,sBACA,GAGA,MAAsB,EAAW,eAAiB,QAAjB,IAAiB,QAAyB,cAC3E,kCAKA,OAJA,qCACA,gBACA,wCAEA,4DAA8G,EAC9G,uCAAoD,IACpD,CAAK,CACL,CACA,yBACA,sBACA,oCAAmD,QACnD,IACA,gBACA,sBACA,IACA,UACA,EAGA,wBACA,qBACA,0BACA,yDAEA,+BACA,QAEA,EAEA,SADA,sCACA,aACA,0CACA,0CAEA,sBACA,qCAEA,uBACA,8BAEA,YACA,EACA,cACA,uBACA,KACA,gBAGA,OAEA,CACA,CACA,SACA,gBAAyB,EACzB,QAKA,GANsC,EAMtC,0BAA2F,kBAAsB,CACjH,CACA,CACA,8BAAqF,EACrF,0BAMA,MALA,4BACA,mCACA,iBACA,CAAS,EAET,CACA,CACA,qBACA,SAAoB,EAAK,EAAE,EAAK,GAAG,EAAM,SACzC,kBAGA,eAFA,GAAkB,mBAAsB,KAAK,EAAK,CAGlD,CACA,SACA,eACA,YAIA,gBACA,iCACA,0BACA,0CACa,SACb,CAAS,CACT,CACA,sBACA,wBACA,CACA,CACA,mBACA,OACA,eAEA,UACA,kBAEA,eACA,8BAEA,gBAGA,OADA,8BACA,CACA,CAqBA,uBACA,gDACA,CAkBA,uBACA,2CACA,CAIA,uBACA,2CACA,CAkBA,eACA,KAGA,IAEA,0BAEA,uBAEA,sBAEA,CACA,SAEA,CAEA,CA6CA,0BACA,MAAyB,EAAkB,GAC3C,wBACA,GAF2C,EAE3C,GACA,yDACA,oDACA,oCACA,OACA,SACA,QACA,6BACA,2BACA,6BACA,uBACA,iEACA,CACA,CACA,eACA,oBACA,CACA,eACA,wBACA,eACA,YACA,WAEA,OADA,qDACA,KAEA,IACA,MAAwB,EAAY,GACpC,MAEA,CAHoC,MAEpC,0CACA,KAEA,oBACA,CACA,SAEA,OADA,2EACA,IACA,CACA,CA4BA,4BACA,KACA,SAEA,IACA,cACA,CACA,SAMA,MALA,aAAyB,GAAa,SAQtC,CARsC,KAQT,EAAM,EACnC,cAA6B,eAA7B,GACA,QAAyB,oBAAzB,CACA,EAXsC,CASyC,GAR/E,wBACA,IAQgF,EARhF,iBAGA,CACA,CACA,CAsBA,SACA,eACA,YACA,kBAKA,kBACA,qBACA,CACA,SACA,iBAGA,kBACA,gBACA,CACA,QACA,iBAGA,kBACA,qBACA,2BAEA,CACA,eACA,MACA,MAUA,OAHA,sBAGA,WAFA,sEACA,eATA,EACA,wBAEA,OADA,qDACA,CACA,CAQA,CACA,eACA,mBAEA,OAEA,yBACA,mCACA,sBACA,CAAS,GACT,CACA,kBACA,IACA,8BACA,CACA,SAEA,0BACA,QAAwB,uBACxB,kBAEA,MACA,CACA,eACA,CACA,CAkBA,GAzB4F,GAyB5F,GACA,iBACA,iBACA,mBACA,sBACA,CACA,kBACA,yCACA,oCACA,CACA,SACA,2BACA,+BACA,sBACA,CACA,SACA,OACA,yBACA,4BACA,CACA,CACA,CAkBA,yBACA,EACA,aACA,uBACA,2BAA6E,EAAS,GACtF,qDACA,iBACA,2BACA,kEACA,mBA8CA,QACA,eAAc,GAAa,IAAiB,SAAM,mBAClD,OACA,aACA,gBACA,gCACA,oBACA,gCACA,yBACA,CACA,CAAK,EAvDL,GACA,qBAwCA,sDAxCA,GAMA,gBACA,yDAcA,gBAZA,CACA,cACA,gCACA,0BACA,oBACA,kCACA,gCACA,0BACA,eACA,2CACA,YAXA,MAYA,EAEA,CAQA,qBACA,MAAyB,EAAkB,EAC3C,aAIA,eAL2C,mBAK3C,IACA,mCACA,CAmCA,uBACA,mBAAkE,WAClE,MAAqB,EAAW,CAChC,sBADgC,KAEhC,eACA,CAAS,WACT,CAAgB,yBAAuB,SACvC,4BAAiG,EAAO,GACxG,kCAEA,OADA,sDACA,cACA,cACA,UACA,MACA,CAAS,CACT,CAAK,EAEL,OACA,2BACA,uBACA,6BAEA,CAwBA,SACA,cACA,uBACA,sBACA,wBACA,CACA,gBACA,4BACA,kCACA,CACA,4BACA,+BACA,wCACA,6CACA,4CACA,oBAzUA,YACA,YAIA,OAHA,uBACA,oCACA,oCACA,2BACA,EAoUA,WACA,0DACA,CACA,6BAEA,CADA,gEACA,sCAGA,mBACA,wCACA,kBAEA,KANA,iBAQA,oBACA,sBACA,CACA,mBACA,IAAgB,0CAAuC,cACvD,6CACA,CACA,iCACA,0BACA,yBACA,oCACA,CACA,qBACA,iBAAgB,kCAA4C,EAC5D,SAmBA,OAlBA,IACA,wCACA,SACA,CAAa,EACb,kBAEA,IACA,wCACA,SACA,CAAa,EACb,iBAEA,IACA,wCACA,SACA,CAAa,EACb,oBAEA,CACA,CACA,SACA,OACA,+BACA,6BACA,mCAEA,CACA,WACA,+BACA,iCACA,qCAEA,SACA,0CACA,CACA,kBACA,4BACA,CACA,CAkBA,iBACA,oDAAsI,UAAS,CAC/I,CACA,SACA,eACA,IAAc,gCAA6B,IAAY,SAAM,oCAE7D,4BACA,mCACA,yBACA,yBACA,WACA,YACA,uBACA,+BACA,qCACA,yBACA,uCACA,qCACA,+BACA,mCACA,+BACA,wDACA,+DACA,CACA,oBACA,gEAOA,OANA,iCACA,uBACA,mBACA,4CACA,2CAEA,CACA,CACA,oBACA,iBACA,CACA,SACA,eACA,CACA,WACA,WAGA,gDACA,+BACA,yBACA,mBACA,mCACA,+BACA,+BACA,yBACA,wDAA+E,KAC/E,gCACA,gDACA,CACA,UACA,2CAAmE,aAAW,gDAAsD,GAEpI,OADA,gCACA,CACA,CACA,aAEA,oDACA,sBACA,sBACA,gDACA,yBAEA,CACA,yBACA,oBACA,uBAIA,qBAEA,CACA,yBACA,8BACA,CACA,wBACA,6BACA,CACA,uCACA,QACA,YACA,+CACA,iDACA,MAEA,GACA,eAEA,4CACA,GACA,yCAEA,CACA,eACA,8BAKA,OAJA,oCAAoE,EAAS,GAC7E,yCAGA,mBACA,CACA,SACA,oCAA6C,kSAAsV,mDAGnY,uCAAqD,0BAErD,sDAAsE,CACtE,CACA,mBACA,4CACA,CACA,sBACA,oBACA,oDACA,0CACA,gDACA,6CACA,6CACA,qDACA,8CACA,gDACA,KAAgB,kEAA0F,EAC1G,4BACA,+BACA,0CACA,aACA,aACA,2CACA,2CACA,aACA,aACA,aACA,aACA,aACA,aACA,cACA,MACA,OACA,QACA,gBACA,cACA,cACA,WACA,cACA,WACA,kBACA,YACA,aACA,CAAS,EAOT,OANA,qBACA,yCAA8E,MAE9E,GACA,uBAEA,CACA,CAMA,4CACA,aACA,8BAEA,cACA,cACA,OACA,kBACA,aACA,CAAS,EAGT,OADA,YACA,CACA,CACA,CAkBA,eACA,mBAptCA,MAqtCA,qDAntCA,MAotCA,uBACA,GAvtCA,EAwtCA,iEAttCA,QAytCA,QACA,aACA,CACA,CAkBA,SACA,cACA,iBACA,eACA,CACA,qBACA,QACA,CACA,gBACA,iBACA,CACA,cACA,sBACA,wBACA,CACA,iBACA,uBAEA,kBAGA,CACA,qBAGA,CACA,CAyBA,mBACA,SAAc,SAA0C,IAAI,CAAG,KAAU,EAAH,CAAW,CAzBjF,IAyBiF,GAzBjF,OA2BA,EAFqD,KAErD,GACA,mBACA,mBACA,YACA,eACA,WAAgB,UAAe,UAC/B,6CACA,qDACA,iDACA,sEACA,CACA,kBACA,yDACA,CACA,uBACA,oDACA,uCACA,CACA,oBACA,iDACA,CACA,6BACA,2EACA,CACA,wBACA,wBACA,OAEA,kCAGA,GAFA,+BACA,mBACA,EACA,6BAEA,CACA,SACA,yEACA,CACA,sCACA,aACA,iBA7DA,IA6DA,KAGA,yCACA,0BACA,QAGA,CAAS,iBAET,QACA,GAxEA,IAyEA,+BAGA,OAIA,eACA,IACA,sBACA,MACA,wBACA,OACA,MAEA,IACA,KACA,CACA,CACA,UAIA,kDAEA,yBACA,WAGA,OACA,GAGA,2BAIA,kCACA,SACA,IACA,kBACA,CACA,UAEA,CAAS,IAjBT,aAmBA,CACA,CAqBA,eACA,sBACA,kEACA,cAEA,SAEA,iBAEA,8CACA,UA8BA,EA5BA,uBACA,aAEA,SACA,gBAEA,uBACA,aAEA,SAEA,mBAEA,SAEA,cAEA,SACA,eAEA,mCACA,qBACA,eAEA,SAEA,gBAKA,cADA,mCAEA,iCACA,YAGA,aACA,CACA,cAAyB,GAAK,EAC9B,cAD8B,KAC9B,OACA,CACA,cAA+B,GAAK,EACpC,cADoC,KACpC,GACA,8BACA,wBACA,uBACA,sBACA,CACA,cAA2B,GAAK,EAChC,cADgC,GAChC,OACA,CACA,cAA0B,GAAK,EAC/B,cAD+B,IAC/B,OACA,CACA,cAAyB,GAAK,EAC9B,cAD8B,GAC9B,OACA,CACA,cAA4B,GAAK,EACjC,cADiC,MACjC,OACA,CACA,cAAuB,GAAK,EAC5B,cAD4B,CAC5B,OACA,CACA,cAAqB,GAAK,EAC1B,cAD0B,YAC1B,SACA,uCACA,CAYA,cAA+B,GAAK,EAEpC,cAFoC,GAGpC,IACA,OACA,OACA,0BACA,KACA,CA+BA,wBACA,EACA,UACA,cAEA,KAA+C,KAC/C,KACA,SAFoD,KAMpD,KAAkC,GAAgB,KAAS,GAAG,EAAe,EAC7E,KACA,EAFuD,OAGvD,GACA,CACA,eACA,YACA,mBACA,CAD8B,KAC9B,GAAc,YAAgE,KAA/C,CAA8D,EAA3D,CAA8E,CAmBhH,CAnByF,CAAC,IAmB1F,GACA,MApBgH,MAoBhH,GACA,YACA,GAtB2E,CAsB3E,UAEA,kBAGA,6BACA,IACA,WAGA,IACA,CACA,SAEA,IACA,CACA,CAAS,CAET,aACA,mBACA,0BACA,WAGA,mCACA,CACA,CACA,uBACA,6BACA,OAIA,SACA,IACA,wBACA,WAEA,WACA,iBAGA,CACA,SAIA,aADA,YACA,GACA,IACA,GACA,CACA,SAEA,CAEA,sDACA,yCACa,CACb,CACA,CACA,CAyBA,wBAAoD,EACpD,+CACA,CAyBA,SACA,eACA,YAEA,8BACA,8BAEA,6CACA,6CAdA,EAeA,qBACA,8CACA,qBAEA,uCACA,oDACA,8BAEA,uCACA,oDACA,8BAEA,qCACA,qDACA,4BAEA,6CACA,6DACA,oCAEA,yCACA,yDACA,8BAGA,sCACA,wGACA,2EACA,mCAEA,oBACA,gBACA,OACA,WACA,qBAYA,OATA,wCACA,2CAEA,0EACA,0EACA,2EACA,2EACA,4EACA,oFACA,CACA,CAOA,mCACA,mDACA,+CACA,GACA,uCAEA,GACA,sCAEA,CAOA,0CAOA,EALA,8CACA,GACA,GACA,GACA,IAEA,YAAwB,WAAqB,IAC7C,cACA,8CACA,QACA,OACA,QACA,OACA,QACA,OACA,kDAEA,CAYA,kDACA,oDACA,2DAEA,oDACA,2DAEA,qDACA,6DAEA,6DACA,4EAEA,CACA,CAkBA,SACA,qBACA,WACA,gCACA,+BACA,cACA,sBACA,yBACA,kCACA,wCACA,sCACA,mCACA,uBACA,kCACA,+CAGA,yBACA,uBACA,iBACA,iCACA,iCACA,sBACA,gCACA,gCACA,iCACA,gCAIA,4BACA,uBACA,mBACA,eAA0B,sCAC1B,mBACA,iBACA,sCAEA,gCAiCA,OAhCA,GACA,oCAIA,iDACA,QACA,oBAGA,iDACA,gBAKA,sFAEA,IACA,mDACA,CACA,SAEA,CAEA,oCACA,kFACA,eAGA,yBACA,CAAS,EACT,4BAKA,wBACA,iBACA,OAEA,sDACA,wBAKA,sDAEA,6BAGA,oCACA,MACA,CAGA,oCACA,CACA,+BACA,MAEA,sDACA,IACA,KACA,8BACA,iDACA,yEACA,oCACA,kCAKA,aACA,0BACA,SACA,KAEA,CAEA,MACA,yCAEA,wBAGA,KACA,IACA,4CACA,CACA,SACA,IAGA,+EACA,QAEA,EACA,uCAGA,iCAEA,OAMA,CALA,sDACA,iDAIA,mBACA,yDACA,+BAEA,sCACA,CACA,2BAgBA,WACA,IAGA,kEACA,CACA,SAGA,iCACA,CACA,QACA,CACA,wCACA,IACA,WACA,CACA,SACA,6BACA,QAAwB,sBAGxB,wCAEA,CACA,KAN4F,EAM5F,8BACA,CACA,oBACA,kBAx8DA,WACA,iCACA,YAEA,gBACA,OAEA,6BAGA,YAEA,IACA,GA47DA,CACA,gBACA,gBACA,CACA,2BAGA,QACc,EAAkB,GAChC,KAIA,OAHA,GACA,YAHgC,IAGhC,wDAEA,0CACA,CACA,iCACA,kBASA,OANA,GACA,yDAEA,GACA,6CAEA,qBACA,qCACA,0BACA,CAAS,CACT,CACA,gBASA,OAPA,gDAEA,gEACA,kCAIA,gCACA,CACA,kBACA,4BACA,oDACA,CAAS,CACT,CACA,6BACA,oBACA,2BAGA,4CAGA,0BACA,mCACA,mCAGA,+CAGA,kBACA,6CACA,wFAA2K,GAE3K,qBACA,CACA,oCACA,qBACA,4BAGA,4CAGA,8BAEA,aADA,eAEA,sBACA,8BAGA,6CAEA,CACA,kBACA,iDAEA,mBACA,uBAAiC,EAAY,sBAC7C,CACA,0BACA,mEACA,CACA,4BACA,8CACA,CACA,wBACA,iEACA,CACA,iBACA,2BACA,oBACA,QAEA,CACA,mCACA,IACA,GACA,CAAiB,GACjB,CACA,CAAS,CACT,CACA,SACA,MACA,OACA,0BACA,kCACA,kBACA,sEACA,CACA,CACA,4BACA,wDACA,gBACA,sBACA,mBACA,CACA,6CACA,qCACA,gBACA,4BACA,4BACA,kGACA,kBACA,sDACA,CACA,uCAEA,4BACA,cAMA,CAHA,qBACA,4BAA4C,EAE5C,0EACA,kBAEA,yEACA,kBAEA,IACA,CACA,+BACA,wBACA,0DAEA,CAEA,6BACA,sBACA,0BAEA,CACA,OACA,SAAkB,uBAAuB,GAAG,mBAAmB,GAAG,UAAU,EAE5E,yBACA,kCACA,kBACA,0CAEA,CACA,wBACA,kCACA,kBACA,yCAEA,CAEA,mBACA,wBAEA,sBACA,QACA,wBACA,OAEA,gDACA,wFACA,4BACA,uBACA,kDAEA,CACA,+BACA,iBACA,aAEA,2BACA,EACA,eACA,KACA,sBACA,kBACA,4BAUA,GATA,4BAGA,YACA,GAGA,mBACA,CAAS,EACT,sBACA,2BACA,WACA,KACA,GACA,CACA,CACA,CACA,uBACA,WACA,KACA,GACA,CACA,CACA,CAMA,gCACA,wCACA,0CAEA,mCACA,2BAEA,mBACA,EACA,iDAGA,kDAEA,CACA,SAIA,OADA,0CACA,gBAEA,0BAEA,OADA,kDACA,wBAEA,iBACA,kCAGA,wBAGA,uBACA,wEACA,CACA,iBACA,uBAEA,8BACA,MAEA,OACA,sCAEA,yBACA,+CAGA,qDACA,cACA,WACA,EAAS,8CACT,GACA,2BAGA,qCAIA,OAHA,GACA,6BAEA,CACA,CACA,0BACA,MACA,oDACA,cAA4B,aAAgB,mCAQ5C,MAPA,0BAt5EA,iBACA,aAA8B,EAAQ,SACtC,cAAgC,GAAY,KAAK,EAAI,CAAV,IAAU,EAErD,EAu5EA,2CAAgE,QAA0B,GAE1F,uBAEA,CAWA,SACA,eACA,YACA,mBACA,iBNt3CA,cACA,CMq3C0C,GNr3C1C,UADA,QAEA,0BACA,EMm3C0C,mBAC1C,CACA,WAEA,OADA,6CACA,sCACA,CACA,CAsBA,eAEA,+BALA,IAMA,uCACA,wBACA,WACA,cACA,0BACA,gBACA,IACA,EACA,yBACA,kBACA,CAfA,4GAeA,cACA,CAAK,CACL,CACA,eACA,WAAgB,EAAO,EAAE,8BAAoC,CAC7D,CAMA,SAMA,eAIA,UAZA,uBAaA,cACA,CAMA,8BACA,oBACA,OACA,mDACA,uCAEA,qBACA,+CACA,qDAGA,gCACA,MACA,6BACA,8BACA,CAAiB,EACjB,SACA,2BACA,wDAEA,CACA,gBAOA,OANA,iBACA,0BAGA,wCAEA,YACA,CACA,CAAiB,EACjB,UACA,IACA,CAAiB,CACjB,CAAa,CACb,CACA,kBACA,wBACA,MACA,wBACA,aACA,kBAA4C,EAAQ,EACpD,SACA,IACA,CAAqB,EACrB,WACA,EAjEA,eAkEA,CAAqB,CACrB,CAAiB,EAGjB,kDAEA,CACA,2BACA,aACA,SACA,6BACA,aAEA,CACA,+BACA,2DACA,MACA,CACA,GAtFA,yDAsFA,GACA,UACA,QACA,CAAqB,EACrB,UACA,IACA,CAAqB,CACrB,CACA,CAAa,EACb,UACA,IACA,CAAa,CACb,CAAS,CACT,CACA,CACA,kCAEA,EADA,gBAEA,IACA,mBACA,CACA,SACA,sBACA,CACA,sBAAuC,IAWvC,OAVA,EAIA,iBAAoC,cAAgC,EAHpE,iCAAoC,EAAiB,EAKrD,iBAAgC,6BAA+D,EAC/F,iBACA,uCACA,CAAK,EACL,CACA,CAmIA,eACA,qBACA,6BACA,CAkBA,eACA,MACA,YAEA,uBACA,SACA,KAEA,CACA,CA2DA,SAEA,YAOA,EASA,GACA,kBACA,mBACA,CAMA,SACA,4BACA,CAEA,uBACA,4BACA,CAEA,oBACA,4BACA,CAEA,gCACA,4BACA,CACA,CAqBA,uBACA,2CACA,CAqBA,uBACA,6DACA,CAiCA,uBACA,8DACA,CACA,uBACA,8DACA,CA4BA,oBAEA,YAEA,EAEA,IAEA,QACA,oBACA,cACA,iBACA,gBACA,CAEA,kCACA,6BACA,CAEA,qCACA,gCACA,CAEA,SACA,OACA,kBACA,wBACA,+BACA,wBAEA,CASA,mBACA,yCACA,0DACA,+BACA,sDAEA,gCACA,4DAEA,CACA,WACA,CAEA,6BACA,MACA,0BACA,eACA,OACA,qBACA,kBACA,wBACA,4BACA,EACA,2EAKA,+BACA,WAAmD,yBAAnD,OAMA,wBANyH,EACzH,YADyH,oKAEzH,yCACA,cACA,CAIA,CAAqB,CAdrB,EACA,yCACA,cACA,CAaA,gBACA,aACA,kBACA,uBACiB,CACjB,SACA,sBACA,CACA,CAEA,0BACA,0BACA,eACA,aACA,UACA,qBACA,kBACA,uBACA,CAAiB,CACjB,iBACA,aACA,UACA,kBACA,uBACiB,CACjB,SACA,sBACA,CACA,CAEA,gCACA,kCACA,CACA,CAkBA,uBACA,wDACA,CA2BA,oBACA,cACA,oBACA,sBACA,CAEA,sBACA,0CAyBA,OAxBA,0BAEA,WACA,sBAEA,eACA,8BAGA,0BACA,kBAEA,gBACA,iCAGA,kCAEA,2BACA,6BAGA,qBAEA,CACA,CAEA,SACA,OACA,qBACA,6BACA,mBACA,iBACA,+BACA,2BACA,+BAEA,CAUA,mBACA,yCACA,YAAgB,kBAA2B,IAAc,SAAM,kCAC/D,UACA,YAEA,kBAMA,OALA,4BACA,oCACA,kBACA,gBACA,oCACA,CACA,CAEA,uBAEA,YADA,oBAEA,CAEA,oBACA,0BAEA,OADA,YACA,OACA,CAEA,gCACA,0BAEA,OADA,gBACA,OACA,CACA,eACA,OACA,WAjGA,mBAkGA,oBACA,EACA,qBACA,qCAEA,CACA,QACA,eACA,0BAEA,kBACA,kCAEA,aACA,mCAEA,6BACA,gCACA,qBAEA,WAA+B,EAAW,EAC1C,CACA,QACA,CACA,CAkBA,UAtB0C,KAsB1C,QACA,+DACA,CACA,uBACA,gEACA,CACA,uBACA,sEACA,oBACA,yDAEA,QACA,CACA,QACA,+BACA,EACA,uBAEA,6DADA,8BAAqD,KAAc,mBAAqB,GACxF,GACA,CAuBA,oBACA,eACA,uBACA,aACA,CAEA,8BACA,8BAAyC,qBAAkC,CAC3E,CAEA,+BACA,2BAAyC,mBAA6B,CACtE,CAEA,uBACA,4CACA,CAEA,oBACA,mCAA2D,EAAS,kCACpE,CAEA,gCACA,4CACA,CAEA,2BACA,mBAAgB,qDAAgE,mBAChF,KACA,CAAqB,gCAErB,CACA,cACA,MACA,CACA,CAEA,SACA,OACA,4BAcA,OAZA,yBACA,wCAEA,4BACA,8CAEA,8BACA,kDAEA,4BACA,8CAEA,CACA,CAEA,mBACA,oBACA,kBAEA,mBAAgB,qDAAgE,SAChF,GACA,GACA,GACA,EAGA,QACA,iBACA,mBACA,cACA,gBACA,CAAS,EAPT,IAQA,CACA,CAiEA,SAOA,eACA,gBACA,MAA6B,EAAkB,EAAkB,IACjE,SAD8C,CAC9C,EADiE,EACjE,2BACA,0CACA,EAtDA,YACA,UACA,mBACA,qBACA,qBACA,sBACA,cACA,oBACA,mBACA,oBACA,4BACA,+BACA,kCACA,qCACA,SACA,WACA,CACA,EAqCA,sCAEA,6BACA,cACA,iBACA,YACA,6DACA,+DACA,sDACA,CAUA,oBACA,eAnDA,GACA,MAAiB,EAAkB,EAAkB,SAErD,IAFkC,EAGN,CAHyB,CAGP,aAAnB,GAAmB,CAC9C,KAEA,EAAwB,EAAkB,EAAkB,aAAnB,GAAmB,CAI5D,OAHA,EACU,EAAkB,EAAkB,SAC9C,IAD2B,GAE3B,UACA,EAuCA,GACA,IACA,gBACA,CACA,SACA,WACA,CACA,CACA,CAgCA,SACA,cAIA,+BAoBA,uBACA,oCACA,CAuBA,+BACA,sBAEA,OADA,uBACA,yCACA,CACA,CAIA,0BAIA,4CAIA,wCAyBA,UAMA,eACA,kBAEA,8BAEA,wBACA,CAMA,sBACA,0BACA,CAWA,uBAEA,OADA,wBACA,KAKA,sBACA,6BAEA,CAwBA,oBACA,cACA,oBAEA,eAOA,YAKA,OAHA,yBACA,oBAEA,KAKA,YACA,uBAEA,CAyCA,oBAKA,6BACA,yCAEA,OADA,0DACA,iBACA,CAsBA,cACA,sDAA8D,KAAa,iBAAwB,EACnG,CAEA,eAGA,OAFA,8CAEA,6CAAyE,KAAa,wDAA4D,EAClJ,CAMA,+BACA,4CACA,CAOA,8BACA,0DAAoF,CACpF,CACA,wCAA6C,iBAA+B,EAC5E,MACA,YAEA,iBAAgB,6EAAoF,EACpG,OACA,IACA,IACA,IAGA,GAFA,YAKA,IACA,8BACA,UACA,cACA,QACA,cACA,CAAa,CACb,CACA,SACA,WACA,CACA,CACA,CAyDA,oBACA,cACA,qBACA,CAaA,qBACA,uBACA,0BACA,wCACA,aACA,CAAS,CACT,CAMA,+BACA,uCACA,CAOA,8BACA,qDAAsF,CACtF,CACA,mCAAwC,iBAA+B,EACvE,kCAGA,oBAFA,YAKA,IACA,wCACA,CACA,SACA,WACA,CACA,CACA,CAEA,0CAEA,6BA2DA,qBACA,cACA,oBACA,wBACA,CAcA,uBACA,uBACA,0BACA,sCACA,UACA,aACA,CAAS,CACT,CAMA,+BACA,uCACA,CAOA,8BACA,qDAAoF,CACpF,CACA,mCAAwC,iBAA+B,EACvE,MACA,YAEA,iBAAgB,sBAAiC,EACjD,UAEA,YAEA,IACA,yBACA,CACA,SACA,WACA,CACA,CACA,CAEA,sCAEA,2BA4DA,qBACA,cACA,mBACA,CAMA,qBACA,uBACA,0BACA,sCACA,aACA,CAAS,CACT,CAMA,+BACA,uCACA,CAOA,8BACA,qDAAoF,CACpF,CACA,mCAAwC,iBAA+B,EACvE,kCAGA,oBAFA,YAKA,IACA,wCACA,CACA,SACA,WACA,CACA,CACA,CAEA,sCAEA,2BAsOA,qBACA,cACA,oBACA,CAOA,uBACA,uBACA,0BACA,uCACA,aACA,kBACA,CAAS,CACT,CAMA,+BACA,uCACA,CAOA,8BACA,qDAAqF,CACrF,CACA,mCAAwC,iBAA+B,EACvE,MACA,YAEA,qBAAgB,sBAAqC,EACrD,UACA,YAEA,IACA,yBACA,CACA,SACA,WACA,CACA,CACA,CAEA,wCAEA,4BAsCA,UACA,eACA,iBACA,6BACA,qCACA,mCAEA,8CASA,OANA,QACA,KAHA,qCAIA,WAHA,MAIA,iBACA,eACA,CAAS,CAET,CACA,kCAGA,OAFA,uCAEA,QACA,OACA,WAHA,MAIA,iBACA,eACA,CAAS,CACT,CACA,CACA,sBACA,aACA,aAEA,kBACA,QAEA,IACA,CAiEA,iBAA+B,EAC/B,WAD4C,CAC5C,SACA,MACA,wBACA,qBACA,YAEA,yCACA,iBACA,eACA,oDACA,6CACA,eACA,CACA,CACA,uCACA,sBACA,CACA,CACA,qBAIA,MAHA,sBACA,kCACA,0BACA,UACA,WAAmC,4BAAnC,OACA,2BADiG,IACjG,SAEA,QACA,CAAK,CACL,CAkEA,4BACA,kEACA,mCACA,CA0BA,4BACA,IAAY,QAAO,EACnB,mBACA,IACA,gCACA,iCACA,oBACA,yBACA,IAAgB,OAAe,EAE/B,OADA,gCACA,uBACA,CACA,SAKA,KAHA,kCAAuE,eACvE,sBAEA,CACA,CACA,CAkBA,UAvByH,KAuBzH,aACA,eACA,kBACA,uCAIA,OAHA,GACA,mCAEA,CACA,CA+HA,SACA,iBACA,gBACA,2BACA,yDACA,+BAEA,sCACA,gBACA,4BAEA,eACA,4BAEA,sBACA,CACA,CACA,oBACA,eACA,iBACA,6BAEA,gCACA,gBACA,CACA,CACA,oBACA,eACA,eACA,CACA,gCACA,gBACA,CACA,CAoyBA,SACA,oBAAmD,EACnD,iBACA,kBACA,cACA,CACA,CA+QA,SACA,mBACA,YACA,kBACA,WACA,CACA,yBACA,2BACA,CACA,oCACA,yBACA,CACA,SAIA,OACA,oBACA,CALA,qBACA,UACA,oBAGA,iBAEA,CACA,CACA,mBACA,QACA,wCACA,0EACA,4EAEA,gEACA,oDAEA,CACA,WACA,CACA,CAkBA,SACA,mBACA,eACA,aACA,qBACA,CAEA,uBACA,WACA,+BACA,sDACA,8CACA,2DACA,4BACA,2BAEA,kBACA,8BAEA,oCAAkE,KAAqB,8CAAsE,EAE7J,wBACA,aACA,yDAEA,OADA,mCACA,CACA,sBAEA,OADA,8BACA,0CACA,SACA,sBACA,CACA,CAAS,CACT,CACA,uBAEA,2BADA,EAEA,CACA,CAoDA,SACA,eACA,YACA,wBACA,gBACA,WACA,yEAEA,CAAS,CACT,CACA,oBACA,gBACA,CACA,mBACA,8DACA,CACA,kBAEA,8BACA,qDAOA,OAJA,4CAIA,kBACA,CACA,kBACA,iCACA,+BACA,QAnCA,IAoCA,0BApCA,EAoCA,eApCA,EAoCA,CACA,UACA,iBACA,CAAa,CAtCb,4DAwCA,wDAAkE,EAAK,UAKvE,4CACA,wBACA,CACA,SACA,OACA,CACA,CACA,CACA,gBAmBA,UAqBA,UACA,iBACA,wBACA,WACA,CACA,eACA,IACA,iBACA,2BAIA,OAFA,6BACA,4BACA,mBACA,CACA,SACA,0BACA,CACA,CACA,UAEA,OADA,0CACA,iBACA,CACA,QACA,8BACA,4CACA,CACA,WAEA,OADA,2BACA,iBACA,CACA,cACA,8BACA,CACA,CA0BA,oBACA,cACA,uCACA,uDACA,kBACA,mBAGA,oBAEA,4CAjBA,MAAe,IACf,eADoB,EACpB,EACA,KAeA,WAtnJA,IAGA,qCACA,CACA,SACA,QACA,CACA,IAgnJA,4BACA,6BACA,CACA,qBAEA,0CAEA,8BACA,qBAGA,OACA,QAEA,CACA,CACA,uBAEA,WACA,iCACA,yBACA,CAAa,EACb,MACA,CACA,YAeA,GAZA,EAGA,sBAKA,mBAIA,kCAEA,8BAEA,kBACA,kBAEA,mCAIA,gCAGA,uCAEA,MAEA,CACA,WAGA,8BACA,6BAKA,yBACA,EACA,yBACA,CA1sJW,CNjxCX,GMixCe,QNhxCf,MAAe,IACf,eADoB,CACpB,sCACA,MM8wCe,4BA2sJf,gBACA,wBAKA,aA1FA,IA6FA,GAEA,CACA,qBACA,qBACA,wBACA,KACA,2BACA,oBAGA,CACA,eACA,mBACA,gCACA,iCACA,gDACA,MACA,WACA,UACA,CAAiB,EACjB,GACA,CAAa,CACb,CAAS,CAtHT,IAuHA,CACA,cACA,iBACA,8BACA,oBAEA,CACA,iBACA,yDACA,CACA,iBACA,4DACA,CACA,kBACA,yCAKA,uBACA,oBAGA,uBAGA,oBACA,0BAEA,4CAEA,wBACA,CACA,qBACA,oBACA,4BACA,4BACA,0BAGA,yCACA,sBACA,mBAEA,CAEA,gBACA,sBACA,oCACA,CACA,cACA,0BAEA,OADA,qCACA,CACA,CACA,iBACA,uBACA,0BAEA,CACA,eAyBA,qBACA,cACA,0CACA,CACA,kBAGA,CACA,qBAGA,CACA,CACA,iBAoEA,UACA,eACA,mBACA,oBACA,kDACA,CAOA,uBAIA,iDACA,KACA,SAEA,gBAEA,OADA,uBACA,CACA,CACA,iBACA,2BACA,CAWA,qBAEA,YAAgB,sBADhB,EAC2C,KAC3C,sBACA,4BACA,OAJA,EAMA,sBACA,aACA,UACA,WACA,CAAS,EACT,mCAXA,EAWA,WACA,QAvFA,4BACA,IACA,cACA,OACA,aACA,OACA,CACA,CACA,SACA,OACA,aACA,QACA,CACA,CACA,CAAK,GA6DL,EAaA,sBACA,cACA,UACA,YACA,UACA,CAAS,CACT,CAQA,gBACA,0CACA,oEAEA,qBACA,8BAEA,0BACA,CAQA,kBACA,wBACA,8BAEA,iCACA,2BAEA,0CACA,sEAEA,CACA,CAmBA,uBACA,SACA,YAAoB,IAAY,IAChC,gCAEA,UACA,CAxBA,eA8CA,UACA,eACA,cACA,qBACA,CAMA,wBACA,mBACA,kEACA,gCAEA,uBACA,CAcA,0BASA,EACA,EATA,iEACA,MACA,sCAQA,2BACA,gBACA,gBACA,sBACA,6BACA,CAAa,IACb,GACA,iBACA,aAEA,sBAGA,sBACA,UAEA,gBACA,kBACA,mBACA,CAA6B,MAC7B,KACA,YAEA,gBACA,mBACA,KACA,SACA,gBACA,gBACA,4BAEA,CACA,CACA,EACA,qBACA,gDACA,yBACA,YACA,UACA,MACA,CAAa,WACb,CAAS,eACT,GACA,4BAEA,CAAS,CACT,CACA,CAsBA,cACA,aACA,CAqBA,cACA,wCACA,sCAEA,oBACA,qDACA,YAEA,IAEA,MADA,sCACA,OAEA,SACA,WACA,CACA,CAyBA,IAAM,GAAO,yBAEb,0BACA,cAOA,UACA,eACA,cACA,CACA,YACA,2BACA,6CACA,sBACA,CAAa,EACb,2CACA,qBACA,CAAa,CACb,CAAS,CACT,CACA,CACA,iBACA,SACA,2CACA,eACA,CAKA,cACA,qBAAmC,GAlCnB,GAmChB,gBAD0C,EAAE,CAC5C,QACA,gBAFsD,EAEtD,cACA,UACA,CAAS,EACT,wCACA,eACA,IACA,wBAA4D,WAA0B,CACtF,CACA,SACA,IACA,CACA,CAAS,EACT,uCACA,eAKA,gCAOA,MALA,UACA,MA1BA,OADA,yBAA6C,KAC7C,YA2BA,KA5BoD,GA4BpD,MAKA,CAAS,CACT,CAAK,CACL,CACA,yBAKA,cAJA,cACA,OACA,OACA,CAAK,GACL,WACA,CACA,uBACA,sBACA,8BACA,+BAEA,iBAEA,cADA,oBACA,WACA,CAGA,SACA,cACA,kBACA,8BACA,kBACA,mBAGA,oBACA,qBACA,mBACA,iBACA,uCACA,8BAEA,kCACA,mDAAkE,OAAW,CAC7E,CACA,uBACA,SAGA,qBAFA,QAKA,sBACA,QACA,OACA,IACA,2BACA,iBACA,CACA,SACA,OAlCA,EAmCA,OAEA,WACA,gBACA,eAGA,CAEA,CAKA,yCACA,6DACA,CAIA,2BACA,8BA/JA,gBAiKA,kDAEA,EACA,aAFA,qBAEA,eACA,IAGA,4CACA,eAEA,CAQA,yBACA,QAGA,GADA,oCACA,0BACA,MAEA,8CAEA,uCAAgF,MAChF,GAGA,kDACA,qEACA,wCAEA,CAUA,6BAlNA,MAmNA,gBACA,0BAnNA,sGAoNA,yBAGA,IACA,0CAAiF,EAAK,CAEtF,oCACA,IACA,GACA,CACA,SAEA,CACA,CACA,qBACA,IACA,cACA,SAEA,iBAGA,OAFA,mBACA,eACA,EACA,CACA,UACA,QACA,CACA,2BACA,qBACA,IACA,SACA,QACA,CACA,oBACA,CACA,CACA,gBACA,wCACA,sCACA,qBACA,6BAEA,CACA,cACA,0CAEA,OADA,qBACA,CACA,CACA,iBACA,wCACA,oCACA,0BACA,6BAEA,CACA,cAEA,iCAEA,OADA,mBACA,aAEA,OAIA,uBAHA,SAMA,SACA,UACA,QAAqB,qBAAwB,IAC7C,SACA,yDACA,0BACA,WAGA,0CACA,gCAEA,6BACA,WAGA,QACA,CACA,qBACA,qBACA,wBACA,KACA,2BACA,IAGA,CACA,eACA,mBACA,iDA5MA,IA6MA,CACA,cACA,iBACA,8BACA,oBAEA,CACA,kBACA,wCACA,oBAEA,oBACA,0BAEA,cAEA,EAFiC,EAEjC,oBACA,CACA,qBACA,oBACA,4BACA,4BACA,0BAGA,wCACA,kBAEA,CACA,CA4kBA,6BACA,EAjoDA,EA8kCA,EAojBA,uBACA,QAGA,EASA,GAXA,0CACA,4CAGA,EADA,mBACA,CACA,aACA,EAGA,EAEA,eACA,gBACA,qBASA,OARA,yCACA,QAnpDA,EAmpDA,CACA,qBACA,qBACA,0BACA,gBACA,CACA,EAxpDA,GAkpDA,EAlpDA,6CAkpDA,EAlpDA,IAwpDiB,EACjB,8BAGA,yCACA,+DACA,iBASA,OARA,oCACA,QAnlBA,EAmlBA,CACA,kCACA,kBACA,iBACA,gBACA,CACA,EAxlBA,GAklBA,EAllBA,yCAklBA,EAllBA,IAwlBiB,EACjB,8BAEA,CACA,CACA,gBAAoB,GAAc,YAClC,0BACA,gBACA,CAAa,EACb,QACA,CACA,QACA,CACA,UACA,CACA,CAjoBA,gBAqLA,UACA,eAygBA,UAKA,eAEA,+BACA,cACA,CAgCA,uBACA,sBAA2D,EAAkB,GAC7E,CA4BA,uBACA,GA9B6E,IA8B7E,yBACA,CAKA,+BAEA,qCADA,EAEA,CAiCA,8BACA,qDAAmF,CACnF,CACA,mCAAwC,iBAA+B,EACvE,MACA,YAEA,IAAgB,gCAA8B,SAC9C,KACA,2BAEA,IACA,CACA,CA2BA,wBACA,EACA,OAEA,gDACA,yBACA,CA/BA,uBAEA,+BA+CA,qBACA,eACA,yBACA,aACA,CACA,uBACA,oCACA,CACA,oBACA,qCACA,CACA,gCACA,oCACA,CACA,oBACA,OACA,kCACA,gCACA,8BACA,8BACA,sCACA,qBACA,sBACA,EAIA,OAHA,GACA,cAEA,CACA,CACA,CACA,eACA,6CACA,CACA,eACA,SAAY,UAAa,EAEzB,OADA,yBACA,iCACA,CACA,qBACA,SAAY,UAAa,EAEzB,OADA,yBACA,iCACA,CAsBA,SACA,0BACA,YACA,gBACA,YACA,uBACA,yBACA,uBACA,mCAEA,UACA,gCACA,6BAAoC,YACpC,IACA,6DACA,yBACA,wCACA,CACA,SACA,cACA,CACA,CAAS,CACT,CACA,qBACA,gBAAgB,oDAA0D,EAC1E,MACA,eACA,MACA,CACA,OACA,eACA,aACA,YACA,mBACA,mBACA,eACA,sCAEA,IACA,yCACA,CACA,SACA,cACA,CACA,CACA,WACA,cACA,CACA,cACA,UACA,qBACA,wBACA,SACA,oBACA,sBACA,SACA,sBACA,wBACA,SACA,SACA,8BACA,CACA,CACA,eA9+PA,MA++PA,oBA/+PA,EA++PA,gCA9+PA,GACA,MA8+PA,+BACA,2BACA,CACA,cAn/PA,MAo/PA,oBAp/PA,EAo/PA,gCAn/PA,GACA,MAm/PA,8BACA,2BACA,CACA,uBACA,mBACA,2CAEA,yBACA,cACA,CACA,CAkBA,uBA+BA,yBACA,YAlmQA,gBAEA,kBADA,CACA,EAIA,MAHA,6BACA,uBAEA,iCAA4G,oBAAyB,sFAGrI,EA0lQA,QACA,cAEA,WADA,2BACA,gBACA,CAwEA,oBACA,uBACA,eACA,gBACA,qBACA,iBACA,uBACA,+BAEA,2BAEA,uBACA,2BAEA,OADA,iCACA,CACA,CACA,wBA9oQA,MA+oQA,uBA/oQA,EA+oQA,yCA9oQA,GACA,MA8oQA,UACA,uFACA,GACA,kCAQA,qDACA,cACA,CAAS,EACT,yDACA,GACA,oDAEA,CAAS,EAET,2BACA,CACA,cACA,MACA,6EACA,CACA,SACA,oDACA,CACA,UACA,iBACA,wBAEA,aACA,iCAEA,qBACA,iBACA,0BACA,CACA,uBACA,WACA,QACA,kGAMA,mCACA,iBACA,iDACA,CAAiB,MACjB,MACA,CACA,yCACA,EACA,GACA,CACA,CAGA,2BAqBA,cACA,qBACA,sBACA,SACA,oBACA,kBACA,oBACA,UACA,aACA,iBACA,CAKA,gBACA,+BACA,OACA,IAEA,YADA,4BACA,2BACA,wBACA,CACA,SACA,uBACA,CACA,0BACA,CAMA,OAHA,sBACA,mDAEA,GACA,CACA,qBACA,gCACA,4BAEA,uBAEA,mBACA,MACA,CACA,cACA,oDACA,KAEA,OADA,YACA,qBAGA,kBAEA,CACA,CACA,qBACA,WACA,CACA,uBACA,YACA,QACA,2BACA,SAEA,+BAEA,OADA,mBACA,CACA,CAOA,iBACA,kBACA,CACA,eACA,iCACA,CACA,eACA,UApFA,kBAoFA,uBACA,CAwNA,4BACA,WACA,UACA,gBACA,oBAMA,OALA,QACA,+BACA,sCACA,kCAEA,CACA,CA4BA,SACA,eACA,YACA,6BACA,uBACA,8BACA,oCACA,sCACA,CACA,oBACA,sBACA,0BACA,sDACA,gDACA,gDACA,8BAEA,CACA,sBACA,wBACA,CACA,WAEA,+BACA,SAEA,gBACA,2BACA,+BACA,KACA,yBACA,yBAEA,CAAS,EACT,4CAgDA,GACA,eACA,wBACA,sBACA,wBACA,QACA,eACA,YACA,SACA,QACA,CACA,EA3DA,KAKA,oCAEA,IACA,2BACA,OANA,CASA,CACA,oBACA,MACA,oBACA,wEACA,iBACA,0BACA,MAEA,gBAEA,CACA,wBACA,wBACA,mCACA,mCACA,CACA,uBAKA,OAJA,wCAjEA,KAmEA,6BAEA,+BACA,CACA,oBACA,gCACA,sCACA,CACA,CACA,eACA,sEACA,CACA,aAA+B,eAAa,EAC5C,qBACA,kCAA+E,YAC/E,CA8BA,wBAAmD,EACnD,WAhCiI,CAgCjI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AAoB,aAAmB,6BACvC,EACA,oBAlpSA,EAqpSA,8CAnpSA,MAopSA,EAEA,CACA,gCAOA,OANA,+BAAoC,GAGpC,aACA,6BACS,EACT,CACA,CACA,2BACA,kBACA,YASA,OARA,2BACA,sDAGA,CAAqB,OADrB,uBACqB,gBACZ,0CACT,sCAA4C,GAC5C,yBACA,CACA,CACA,kCACA,uBACA,SAA+C,QAA+B,KAC9E,MACA,6DACA,aACA,OAEA,sBACA,CAAS,0CACT,CACA,qBACA,eAIA,OAHA,kCACA,yCAEA,iCAEA,6BAEA,uBACA,CACA,CAYA,SACA,eACA,eACA,CACA,gBACA,eACA,aACA,6CACA,cACA,2CACA,SACA,8CACA,CACA,CACA,CAOA,oBACA,eACA,eACA,iBACA,CAEA,0BACA,gBACA,CAEA,uBACA,OApyGA,GAoyGA,EApyGA,gDAoyGA,GACA,UACA,cACA,gEACA,CAAS,EACT,CAEA,qBACA,OA9tEA,GA8tEA,EA9tEA,4CA8tEA,GACA,uBACA,gEACA,CAAS,EACT,CACA,CAMA,SACA,eAWA,oBACA,4BACA,CACA,CAIA,oBAOA,UAWA,mCACA,0BACA,CAUA,+BACA,gCACA,CAUA,mCACA,EAn3GA,EAq3GA,uBADA,EACA,mDACA,YAr3GA,GADA,EAo3GA,EAEA,UAr3GA,+CAq3GA,CACA,qBACA,qBACA,CAAS,GACT,4DACA,CACA,CAIA,mBACA,qBACA,mBACA,cACA,WACA,oBACA,aACA,CAEA,wBACA,yBACA,CAEA,8BACA,kBACA,CAEA,6BAEA,OADA,4CA94GA,GA+4GA,EA/4GA,gDA+4GA,GACA,UACA,cACA,oEACA,CAAS,EACT,CAEA,2BACA,qEACA,OAAuC,2BACvC,OA90EA,GA80EA,EA90EA,4CA80EA,GACA,uBACA,kCACA,sBACA,CAAS,EACT,CACA,CAQA,SAEA,2BACA,mBACA,YACA,iBACA,wBACA,kBACA,2BACA,mCACA,CAEA,gDACA,yPACA,CAEA,6BACA,OAAiB,gDACjB,CAWA,uBACA,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D,cAGA,UAAc,IAAO,GAAG,EAAE,IAC1B,EACA,cACA,IACA,MACA,IACA,CAAI,aACJ,eACA,YACA,EACA,UACA,IACA,MACA,IACA,CAAI,OACJ,MACA,0CACA,aAEA,YACA,oBACA,WACA,EAEA,MACA,EACA,YACA,eACA,qCACA,OACA,+DACA,eAEA,eAGA,WAIA,QACA,EACA,2BAAmD,EAAE,gCACrD,OACA,UAAa,EACb,SAAY,EACZ,SAAY,EACZ,WAAc,EACd,UAAa,EACb,WAAc,CACd,EACA,IAAM,EAAM,GACZ,KACA,IAFY,KAEZ,uBAEA,CAEA,SACA,eACA,gBACA,uBACA,oBAEA,aACA,4BACA,cACA,SAEA,oBAMA,OALA,yCACA,gDAEA,wBACA,yBACA,CACA,CACA,CACA,yBAAqC,GACrC,YACA,YACA,QACA,QACA,kDACA,yBACA,sBAAyD,oCAAwD,IACjH,aACA,OACA,mBACA,gCACA,MAEA,CACA,QACA,EACA,gBACA,iEACA,aACA,SACA,qDACA,YAEA,iBACA,IACA,YAAkB,WAAkB,MAIpC,EAHA,0BACA,OAGA,SACA,YAAoB,WAAmB,IAMvC,GALA,OACA,OAEA,QAEA,SADA,SACA,CACA,oEACA,SAEA,SACA,KACA,CAEA,GACA,CACA,QACA,EACA,yBAEA,GACA,cACA,OACA,oBACA,CAAG,CACH,QACA,qBACA,CAAG,CACH,SACA,sBACA,CAAG,CACH,YACA,gCACA,CACA,CACA,SACA,eACA,gEACA,cACA,CACA,QACA,+DACA,kCACA,iBACA,eACA,mBAEA,MACA,0CAAwE,IAAa,IACrF,kBAEA,kCACA,CACA,OACA,0CAA2E,IAAe,IAC1F,kBAEA,mCACA,CACA,QACA,0CAA2E,IAAe,IAC1F,kBAEA,iCACA,CACA,YACA,0CAA2E,IAAe,IAC1F,kBAEA,uDACA,CACA,wBACA,qBACA,kBAAwC,EAAO,EAAE,aAAa,EAAE,KAAQ,GACxE,kBACA,CACA,UACA,0BAEA,UAAmB,YAAY,GAAG,EAAW,GAE7C,gBACK,CACL,CACA,SAGA,MADA,CADA,mBACA,6BACA,oBACA,CACA,CACA,WAEA,SACA,cACA,iBACA,CACA,QAMA,OALA,yBACA,+CACA,kCACA,4BACA,CAAK,EACL,KAEA,SACA,sBACA,OACA,yBACA,MACA,CACA,4BACA,CACA,QACA,kDAA2F,IAAa,IACxG,oBAEA,mBACA,wCACA,YACA,WACA,YAAwB,IAAmB,IAC3C,OAEA,CAAO,EAEP,qBACA,0CACA,YACA,WACA,YAAwB,IAAmB,IAC3C,mBAEA,CAAO,CAEP,CACA,CAEA,kBACA,eACA,8DACA,mBACA,uBACA,EACA,QACA,gBACA,eACA,oCACA,gCAEA,2CACA,qCAEA,CACA,iBACA,8BACA,uBAEA,CACA,oBACA,iCACA,MACA,2BAEA,CACA,mBACA,IAGA,EAHA,4DACA,mEACA,wFAEA,kBACA,gBAEA,QACA,IACA,iBACA,aACU,QACV,sBAEA,YAIA,2BAMA,CALA,gCACA,OACA,OACA,wBAEA,aACA,2BADA,CAEA,CACA,qBACA,8DACA,SACA,EACA,mEACA,QACA,gCACA,oBACA,eACA,IACA,QAEA,sBACA,iBACA,oCACA,CACA,oBACA,8DACA,SACA,EACA,eACA,6DACA,SACA,CAAO,CAEP,mCACA,CACA,6BACA,8DACA,UACA,WACA,EACA,QACA,oBACA,eACA,IACA,IACA,QAEA,sBACA,wBACA,+CACA,EACA,SAEA,GACA,KACA,MAGA,iBACA,kCACA,CACA,0BACA,6BACA,uBAEA,yBACA,wBACA,CACA,uBACA,qCACA,CACA,uBAEA,OADA,8BACA,qBACA,CACA,qBACA,oBAEA,+BACA,gCAEA,SADA,uBACA,yCACA,CACA,SACA,iBAEA,CAEA,OACA,aAAgB,CAChB,oBACA,yBACA,CAAG,CACH,kBAIA,OAHA,cACA,yCACA,CAAK,EACL,CACA,CACA,EAEA,QACA,mBACA,eACA,gEACA,QACA,oHACA,eACA,oCACA,gCAEA,kCACA,CACA,kBACA,oBACA,CACA,UACA,8DACA,gBACA,EACA,WACA,SAEA,wBACA,sBACA,CACA,oBACA,yEACA,eACA,uEACA,mCACA,qBACA,0HACA,UACA,+CACA,iBACA,OACA,MACA,qBACA,EAEA,iBACA,gEACA,WACA,CACA,OACA,MACA,qBACA,CACA,CACA,iBAQA,GAPA,mEACA,6DAEA,wBACA,KACA,EACA,UACA,iBACA,kCACA,0EACA,mEACA,CACA,MACA,aACA,CAAM,qCACN,gBACA,uBACA,kEACA,gCACA,MACA,qDACA,EACA,CACA,OAAoB,EAAU,EAAE,EAAY,EAAE,EAAI,EAClD,UACA,eACA,UACA,SACA,uCACA,EAEA,GAAkB,EAAU,EAAE,EAAY,EAAE,EAAI,SAEhD,EACA,CACA,MACA,UACA,eACA,UACA,SACA,uCACA,EAEA,CACA,CACA,wBACA,SACA,gBACA,qBACA,qCAEA,6DACA,mDACA,iDACA,eAJA,yDAIA,uCACA,kDACA,oCACA,oFAEA,iFACA,KACA,IACA,CAAS,UAAY,GAAK,GAAG,cAAc,iDAC3C,GACA,QACA,0CACA,GAEA,CACA,CACA,MACA,uBACA,UACA,QACA,eACA,8CACA,SAA+B,EAAY,EAAE,EAAa,EAAE,EAAE,EAC9D,uBACA,KAEA,cACA,IAEA,CAAa,EACb,qBACA,CAEA,GACA,CACA,EAAM,iCACN,eACA,wCACM,CACN,SACA,KACA,gCACA,uBACA,kDACA,wDACA,UACA,CAAO,KACP,6BACA,sBAA2E,6BAA6B,yBAAiC,EAAmB,qBAA6B,EAAkC,oBAC3N,2BACA,KACA,KAEA,wBACA,KACA,KAGA,OADA,gFACA,WACA,uCACA,YAEA,GADA,wDACA,GACA,sBACA,KACA,eACA,CAAW,EACX,6MACA,CACA,SACA,qFACA,oDACA,YAA0B,WAAyB,IACnD,iBAEU,mCACV,8DAEA,6BAEA,gBACA,kBACA,gCACA,4CACY,oCACZ,+CAEA,+BACA,CACA,4BACA,mCACA,cACA,2CACA,oBAAkE,6BAA6B,QAA2D,EAA3D,aAA8B,6BAA6B,QAC1J,UAAiC,6BAA6B,OAE9D,cACA,2BAAsE,EAAO,MAC7E,CAAe,CACf,CAAa,EAEb,SAGA,CACA,oCACA,0DAAuF,EAAU,GAAG,GAAI,EACxG,6CACA,mFAAgG,EAAU,GAAG,EAAI,gBAEjH,QACA,GACA,QACA,0CACA,GAEA,CACA,CACA,6BACA,WACA,0BACA,2BACA,+CACA,KACO,qDACP,UACA,CAAO,OACD,6BAWN,CAVA,0CACA,KAEA,eACA,8BACA,kBACA,CAEA,CAAO,EACP,oIAEA,MACA,+CACA,cAEA,2CAMA,GALA,iDACA,+CACA,IACA,GACA,uEACA,GACA,+CAEA,EADA,eACA,WACA,CACA,mDACA,oDACA,0CAA4E,IAAa,IACzF,yBAEA,yBAIA,qBAHA,2DAAyE,MAAS,UAAU,KAAO,GACnG,KAGA,CAAO,KACP,0CACA,CACA,8CACA,aAUA,OATA,+CACA,sEACA,cACA,KACA,uCACA,CAAS,CACT,MACQ,SAER,CACA,CACA,WACA,IACA,EACA,EACA,EACA,EACA,EALA,4DAqEA,OA/DA,cACA,cACA,gCACA,+BACA,QACA,IACA,mBACA,+DACA,oCACA,6BACA,iFACA,0FACA,cACA,wBACA,IACA,MAAiC,KAAS,GAAG,EAAG,yEAChD,KAA8B,KAAS,GAAG,EAAG,MAC7C,yBAAmC,EAAQ,mBAAmB,aAAiB,qCAAqC,EAAO,mPAE3H,kBAkCA,EAjCA,gCACA,IACA,UACA,kCACA,6CACY,KACZ,EACA,kDACA,SAAkC,6BAA6B,MAC/D,KAAqC,6BAA6B,SAAS,6BAA6B,EAUxG,GATA,IACA,YACA,6BACA,oDAEA,GACA,aAGA,GACA,SAAoC,EAAI,EAAE,8BAA8B,EAAE,UAAgB,EAC1F,UACA,IACA,YACA,6BACA,oDAEA,GACA,YAGA,CACA,CAEA,gBACA,wBACA,IACA,4BAGA,CAAS,EACT,CAAO,CACP,CAAK,EACL,CACA,MACA,UACA,eACA,UACA,QACA,CACA,CACA,iBACA,oGACA,CACA,mBACA,uEACA,kEACA,uCACA,CACA,uBACA,gEAEA,2BACA,gBAUA,GATA,qBACA,kBAEA,6CACA,IACA,+CACA,KACA,EAEA,GAIA,aAHA,GACA,MAdA,wLAiBA,YAGA,QACA,CACA,0BACA,qBACA,eACA,yFACA,SAGA,QACA,CACA,CAEA,QACA,eACA,eACA,kDACA,qCACA,CACA,yBAEA,IADA,UACA,6BACA,0BACA,mBACA,QACA,wCACA,oCACA,CACA,2BAEA,IADA,UACA,0BACA,mBACA,oCACA,CACA,sBACA,4BACA,MACA,IACA,iCACQ,gBAIR,CAHA,8BACA,oBAEA,KACA,0BACA,gBAEA,CACA,CACA,0EACA,CACA,mBAIA,MAHA,6EACA,oCAEA,iFACA,CACA,6BAEA,SADA,GAEA,cACA,YACA,iCACA,6DACA,CAAK,EACL,gCACA,cACA,YACA,sCACA,sCACA,sCACA,WACA,uCACA,uEACA,8BAHA,QAIA,CAAS,CACT,CAAO,EAEP,0DACA,GArBA,IAsBA,CACA,sBACA,eAGA,GAFA,+BACA,cACA,0BACA,2BACA,WAKA,OAJA,wCACA,qCACA,0CACA,iBACA,KACA,CACA,wBACA,+DACA,KACA,MACA,IACA,wBACA,UAEA,wEAAgF,EAAE,GAElF,EAWA,OAVA,8CACA,kEACA,wGACA,uEACM,MACN,8BAEA,cACA,6CACA,CAAK,EACL,CACA,CACA,CAEA,OACA,OACA,MACA,MACA,MACA,OACA,OACA,EACA,GACA,8BACA,sBACA,iCACA,CAAG,CAEH,SACA,eACA,+DACA,sBACA,eACA,uCACA,wBACA,CACA,aACA,eACA,CACA,aACA,wBACA,CACA,WACA,IAUA,EAVA,4DACA,sBACA,iCACA,kBACA,cACA,MACA,CAAK,EACL,8BACA,gCAGA,IACA,0BACA,MACA,CAAO,CACP,CAAM,SACN,SAEA,OADA,mEACA,EAEA,4BACA,oDACA,mBACA,CAEA,OADA,2BACA,CACA,CACA,eACA,gEACA,oBAEA,OADA,6BACA,8CACA,CACA,yBACA,gEACA,uCAA4D,EAAI,EAAE,EAAO,EACzE,CACA,eACA,gEACA,0BAEA,CADA,6BACA,GACA,sEAAwL,qBAAqB,EAAE,oBAA4B,qBAAqB,KAAO,EAAE,EAAe,GADxR,GAGA,eACA,gEACA,2BACA,EACA,GAAgB,qBAAqB,EAAE,oBAA4B,qBAAqB,KAAO,EAAE,YAAmB,GAEpH,8CAAkD,EAAK,GACvD,0BACA,CACA,CAEA,sBACA,iEACA,6DACA,WAKA,MAJA,aAEA,SADA,cACA,aAEA,CACA,EACA,4BACA,SACA,cACA,+DACA,sCACA,eACA,6CACA,YACA,CACA,OACA,+DACA,oCACA,cACA,GACA,IACA,SACA,cACA,sBACA,SACA,gBACA,SACA,gBACA,kBACA,iBACA,iBACA,gBACA,uBACA,gBACA,uBACA,0BACA,cACA,eACA,CAAM,gBACN,yBAAsD,EACtD,YAD4D,IAC5D,eACA,uCACA,yBAAqE,EACrE,yBAAqE,EACrE,4BACA,gCACA,iDACA,sCACA,oCACA,oCACA,wBACA,gCACA,kBACA,CACA,QACA,qCACA,CACA,cACA,aACA,eACA,cACA,GAEA,aAEA,8BAAmD,YAAY,OAAO,YAAY,GAClF,6CAAmE,YAAY,EAAE,oBAAoB,OAAO,oBAAoB,EAAE,YAAY,GAC9I,2CAAiE,mBAAmB,OAAO,mBAAmB,EAC9G,CACA,yBACA,EACA,EACA,EACA,gGACA,MACA,sCACA,0EACA,iDACA,KACA,KACA,kBACA,CAAS,GACT,CACA,oCACA,mBACA,sCACA,4FACA,KACA,KACA,kBACA,CAAO,CACP,EACA,mBACA,+EACA,wHA2CA,MAnCA,CAPA,CACA,0BACA,iBACA,CAAK,EACL,kBACA,oDACA,CAAK,EACL,YAEA,IADA,IACA,oBACA,kBAEA,YADA,UAEA,yBACA,eACA,WACA,EAAY,oDACZ,UACY,MACZ,OACA,QACA,EAAY,IACZ,+CAA2D,GAAY,oBAAoB,EAAI,GAC/F,UAEU,gCACV,SAEA,qBASA,GARA,oBACA,GACA,4BACA,gCAEA,oBAGA,sBACA,KAEA,CACA,CAAK,EACL,CACA,CACA,UACA,IACA,EACA,EACA,EAHA,4DAIA,UACA,mCACA,2BACA,wBAAwC,EAAI,KAAK,IACjD,IAA4B,EAAE,KAAK,EACnC,OAEA,OADA,yBACA,YACA,gBACA,yCACA,wBAEA,IACA,gBACA,OACA,KACA,KACA,CACA,CAAQ,SAER,OADA,qEAA6E,EAAI,KACjF,GAAkB,EAAI,EAAE,EAAI,EAAE,EAAc,EAG5C,OADA,8EACA,CACA,EACA,oCACA,QAKA,CADA,GAHA,IACA,KACA,EACA,oCACA,sBACA,sBACA,SACA,+CAA8D,GAAG,cACjE,uDACA,gBACA,IACA,IACA,CAEA,GADA,qCACA,yBACA,eACA,IACA,sCAA8C,MAAU,cAAc,EAAI,GAC1E,MAEA,GACA,0CACA,KACA,4BACA,CAAS,aAET,oBACA,uBACA,CACA,QACA,CACA,CAEA,UACA,6BACA,KACA,sBACA,mBACA,4BACA,qCACA,kCACA,kCACM,qCACN,4BAGA,EADA,QAAkC,GAClC,YACA,MACA,yBACA,4CACA,UACA,gBACA,uBACA,sBACA,+BACA,CACA,CAAO,CAEP,CACA,OACA,aACA,eACA,CACA,EACA,MACA,SACA,gBACA,QACA,kGACA,IACA,KACA,2BACA,GAEA,0BACA,OAKA,OAJA,IACA,YACA,QAEA,IACA,CACA,CACA,SACA,cACA,+DACA,mCACA,eACA,cACA,iBACA,+BACA,IACA,CAAS,EACT,qBACA,CAAO,EACP,mBACA,+BACA,KACA,gBACA,CAAS,EACT,qBACA,CAAO,EACP,mBACA,iCACA,KACS,EACT,qBACA,CAAO,EACP,uBACA,qCACA,KACS,EACT,oCACA,CAAO,EACP,eACA,6BACA,IACA,CAAS,EACT,qBACA,CAAO,CACP,EACA,YACA,CACA,QACA,8DACA,gBACA,CACA,0DACA,CACA,SACA,sCACA,CACA,eACA,yCACA,CACA,cACA,gEACA,gCACA,uFACA,uCACA,wDACA,CAyBA,OAxBA,iBACA,IACA,aACA,gBACA,CAAQ,KACR,oBACA,QACA,IACA,gDACA,sCACA,uBACA,KACA,KACA,KACW,CACX,CAAU,SACV,mBACA,CACA,QACA,EAAQ,MACR,qDAA6D,EAAW,GAExE,CACA,CAAK,GAEL,CACA,CAEA,cACA,wBACA,oBACA,iBAEA,CACA,mBACA,mBACA,gEACA,QACA,eACA,aACA,gBACA,mCACA,eACA,yCACA,qBACA,6CACA,oBACA,+CACA,uDACA,cACA,cACA,mCACA,CACA,mBACA,SACA,KACA,KACA,KA4BA,OA3BA,cACA,SACA,cACA,SAAwB,EAAI,GAAG,EAAG,GAClC,4CACA,gBACU,kBAAiC,kBAC3C,0BAEA,gBACA,KACA,yBACA,yBACA,0BAEA,CAAO,EACP,YACA,CAAK,EACL,gDACA,iBACA,UACA,mCACA,SAAkB,CAClB,UACA,UACA,CAAO,EAEP,CACA,sBACA,uBACA,+BACA,+BACA,CACA,CACA,cACA,mBACA,OACA,OACA,oCACA,OACA,kDACA,WACA,CAAO,EAEP,qBACA,wBACA,SACA,uBACA,kBACA,OACA,oBACA,6BACA,kCACA,gBACA,kBACA,UACA,cACA,8BACA,CAAa,CAEb,CAAS,EACT,UACA,gBACA,qBAEA,aAGA,CAAK,EACL,sBACA,wCACA,CACA,YACA,+DACA,2EACA,yCACA,6BAA6C,EAC7C,6CACA,wBACA,MACA,KACA,SACA,QACA,OACA,UACA,CAAO,EACP,MACA,CACA,oBACA,cAEA,GADA,oBACA,4BACA,gCACA,wDACA,CACA,4BACA,gBACA,oCACA,CAAS,IACT,MACA,CACA,MACA,EACA,qCACA,iBACA,IACA,YACA,8BACA,8BAEA,SAEA,CAAQ,SACR,IACA,CACA,MACA,CACA,eACA,CACA,oBACA,gEACA,yCACA,iBAEA,OADA,mFACA,OAEA,mDACA,cACA,8BACA,oBAEA,OADA,sBACA,KAEA,qBACA,eACA,CAAK,CACL,CACA,YACA,0BAAiD,GACjD,CACA,cACA,yBACA,SACA,CAAK,GACL,CACA,WACA,gEACA,eACA,OACA,OACA,2CACA,uBAAmC,EAAO,oBAAoB,GAAI,eAAe,GAAK,WACtF,0BAA2C,EAAO,mBAAmB,GAAI,eAAe,EAAI,KAC5F,kBACA,CAAK,CACL,CACA,uBACA,gEACA,gEACA,2FACA,sCAA4C,EAAI,sBAAsB,EAAU,kPAChF,MACA,CACA,oBACA,yBACA,OACA,KACA,UACA,EACA,yCACA,cACA,IACA,KAMA,EAJA,EADA,aACA,aAEA,aAEA,0BACA,8BAEA,SAEA,CAAU,SACV,IACA,MAEA,cAEA,CACA,SACA,mCACA,CACA,CAEA,YACA,SACA,aACA,mBACA,0BACA,oBACA,cACA,iBACA,4BACA,WACA,WACA,wBACA,iBACA,gBACA,oBACA,qBACA,2BACA,eACA,iBACA,yBACA,sBACA,qBACA,+BACA,eACA,2BACA,cACA,qBACA,iBACA,cACA,yBACA,0BACA,+BACA,2BACA,qCACA,SAIA,GAHA,gCACA,+BACA,+BACA,8CACA,iBACA,2BACA,UACO,CACP,CACA,QACA,CAAG,CACH,eACA,eACA,YACA,UAAe,EACf,UAAe,EACf,oBACA,mBACA,oBACA,kBACA,4BACA,gBACA,kBACA,EACA,CAAC,CACD,MACA,uBACA,kDACA,+CACA,wCACA,qDAEA,iEACA,GAGA,SACA,MAEA,OADA,8CACA,YACA,yBACA,mBAEA,CAAG,CACH,CACA,mBACA,cACA,gEACA,yCASA,GARA,QACA,kBACA,iBACA,cACA,cACA,aAEA,QACA,oCACA,2BAEA,OADA,eACA,KAEA,gBACA,cACA,CAAO,GACP,CACA,CACA,OACA,WACA,gEACA,wCACA,wBACA,uBACA,IACA,MAEA,0BACA,QACA,iBACQ,+BACR,uBAGA,SACA,eACA,KACA,gBACA,SAEA,4BACA,mBACA,+BAEA,yBACA,sDAEA,wBACA,oDAEA,SACA,EACA,2BACA,EAFA,KAIA,8BAMA,CALA,qBACA,4CAEA,0BAIA,EADA,uBACA,uBAEA,EAEA,yBACA,uDACA,oBACA,WACA,2BACA,kBACA,0BACA,qCACA,uDACO,EACP,sGACA,iBACA,iCACA,wEAEA,mCACA,SACA,qDACA,EACA,iFACA,sCACA,kDAA+F,IAAa,IAC5G,oBAEA,cACA,CAAO,EACP,gCACA,oDACA,yFAEA,0BACA,wCACA,4CAEA,kDACA,mCACA,kDAAmG,IAAe,IAClH,oBAEA,cACA,CAAO,EACP,kCACA,oBACA,CAAO,CACP,CAGA,GAFA,8CACA,SACA,8EACA,4EACA,kDACA,CACA,kDACA,4EAEA,4EACA,YACA,mBACA,+BACA,CACA,CAAK,EACL,0EACA,YACA,mBAEA,OADA,yBACA,CACA,CACA,CAAK,EACL,UACA,OACA,cACA,uBACA,0IACA,sBACA,kEACA,sCACA,aACA,MACA,EACA,wEACA,uCACA,EAMA,OALA,gDACA,IAEA,gBAEA,CACA,CACA,iBACA,+DACA,IACA,uBAEA,GADA,4BACA,+DACA,oGACA,SACA,MACA,GACA,cAEA,IADA,8CACA,YACA,cACA,yBACA,CAAS,CACT,EACA,EAIA,KAFA,IADA,mEACA,iBAIA,yCACA,0DACA,kFACA,IACA,CAAO,CACP,EAAM,IACN,OAEA,CACA,uBACA,UAgBA,MAfA,uBACA,IACA,UAEA,uBACA,IACA,UAEA,sBACA,uBACA,SACA,8CACA,YACA,IACA,CAAK,EACL,CACA,CACA,OACA,mHACA,mHAsBA,MArBA,oBACA,yBAEA,6CACA,wBAEA,6BACA,kCAEA,uBACA,4BAEA,0BACA,sBAEA,sBACA,2BAEA,qBACA,8BAEA,KAEA,uBACA,uBACA,iCACA,YAAqB,wBAA4B,KACjD,wBACA,sCACA,2CACA,wBACA,KACA,CACA,CACA,CACA,oBACA,WACA,4BACA,UACA,gCACA,UACA,gBACA,iEACA,6BACA,2BACA,EACA,UACA,GACA,KACA,kCACA,iCACA,+BACA,sCAEA,iCAEA,qBACA,wBACA,CAAO,EACP,kBACA,wBACA,CAAO,CACP,EACA,MACA,8CACA,kEACA,IACA,eACA,KAEA,4DACA,wDAEA,yBACA,MACA,CAAO,CACP,EAYA,OAXA,yEAEM,yEACN,iDACA,gDAEA,yCAGA,KARA,2CAUA,CACA,CACA,iBACA,WACA,wBACA,EAgBA,EAfA,uBACA,kDAAmG,IAAe,IAClH,oBAEA,6DACA,EAAQ,IACR,GACA,IACA,CAEA,oBACA,sBACA,gBACA,4DACA,kCAOA,OAJA,EADA,8BACA,YAAoC,YAAkB,EAAE,EAAa,EAAE,EAAE,GAEzE,eAA2C,YAAkB,EAAE,EAAa,EAAE,EAAI,IAElF,QACA,EAQA,OAPA,KACA,QAEA,SAEA,OACA,cACA,CACA,CACA,IACA,0CAA2E,IAAe,IAC1F,kBAEA,uCACA,CACA,SACA,0CAA2E,IAAe,IAC1F,kBAEA,oCACA,CACA,uBACA,wBACA,CACA,sBACA,gEACA,uBAEA,OADA,mFACA,GAEA,2CAEA,OADA,8FACA,GAEA,sDACA,2CACA,0CACA,uCACA,cACA,8CAAgE,EAAE,GAAG,EAAE,GACvE,2BACA,EACA,eACA,yBACA,sBACA,UACA,6BACA,wGACA,qBAEA,CACA,oBACA,iBACA,iBAIA,cACA,cACA,qDACA,CAAK,EACL,uBACA,YACA,OACA,CAAK,EACL,IAXA,OACA,kBAWA,CACA,mBACA,UACA,cACA,+BACA,qFACA,UAIA,iCACA,uBACA,YACA,OACA,CAAK,EACL,IARA,OACA,kBAQA,CACA,aAEA,CADA,yFACA,GACA,4WAEA,QADA,2CACA,+EAHA,KAIA,CACA,wBACA,gEACA,yCACA,iBACA,CACA,gBACA,gEACA,2DACA,sBACA,8BACA,OACA,gBACA,KAEA,UAEA,EACA,WAcA,GAbA,uCACA,6BAGA,CADA,+BACA,YACA,aACK,EACL,YACA,kBAEA,kBACA,+CACA,EACA,GACA,kDACA,MACA,uBAEA,iCACA,MACA,UACA,EACA,GACS,EAAI,GACN,EAAI,CACX,oBACA,iCAcA,OAZA,iCACA,gCACA,kDAAiG,IAAe,IAChH,oBAEA,cACA,CAAK,EACL,YACA,uBACA,8CACA,+CACA,EACA,CACA,CACA,SACA,OACA,qBACA,iBACA,uBACA,yBACA,uCAEA,CACA,CACA,yBACA,kCAEA,iBAC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sBACE,skCACF,2BAA4B,mBAC5B,yBACE,snBACF,sCACE,iEACF,oCACE,gqBACF,uBAAwB,eACxB,qBACE,oZACF,+BAAgC,0BAChC,6BACE,qvBACF,yBAA0B,iBAC1B,uBACE,8xBACF,mBAAoB,WACpB,iBACE,8hCACF,mBAAoB,WACpB,iBACE,6aACF,6BAA8B,qBAC9B,2BACE,k9BACF,sBAAuB,cACvB,oBACE,6uEACF,mDACE,kDACF,iDACE,0rBACF,mDACE,kDACF,iDACE,opBACF,+CAAgD,8CAChD,6CACE,qrBACF,iDACE,8UACF,mDACE,mYACF,2BAA4B,mBAC5B,yBACE,6ZACF,mBAAoB,WACpB,iBACE,geACF,uCAAwC,+BACxC,qCACE,8jBACF,4CAA6C,sCAC7C,0CACE,uHACF,8CACE,uDACF,8CACE,iHACF,gDACE,6DACF,+CAAgD,gCAChD,+CACE,qKACF,8CACE,8KACF,gDACE,+qCACF,gDACE,qfACF,+CACE,qlCACF,8CACE,sUACF,iDACE,m3BACF,iDACE,sbACF,mDACE,yNACF,mDACE,mQACF,kDACE,6mBACF,kDACE,2LACF,oDACE,0UACF,sCAAuC,gCACvC,oCACE,klBACF,kBAAmB,UACnB,gBACE,g6BACF,mCAAoC,6BACpC,iCACE,mSACF,qCACE,yOACF,uCACE,qNACF,sCACE,kFACF,sCACE,qMACF,qCACE,yRACF,uCACE,ikBACF,yBAA0B,iBAC1B,uBACE,qgCACF,yCAA0C,kCAC1C,uCACE,ybACF,gCAAiC,0BACjC,8BACE,iPACF,iBAAkB,uBAClB,qBAAsB,oCACtB,qBAAsB,uBAGtB,wBACE,8QACF,8BACE,8QACF,+BACE,0HACF,cACE,6cAEF,sBAAuB,oBACvB,2BAA4B,mDAG5B,kCAAmC,sBACnC,iCAAkC,cAClC,qCAAsC,kBACtC,8BAA+B,WAC/B,oCAAqC,iBACrC,8BAA+B,WAC/B,wCAAyC,qBACzC,wCAAyC,qBACzC,oCAAqC,iBAErC,yBAA0B,cAA0B,OAAZF,GACxC,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WACxD,wBAAkC,EAAsB,SACxD,CAAU,SAEV,CACA,OACA,KACA,mBACA,iBACA,CACA,CAAO,CA2DP,CAAG,YACH,EAA2B,aAAiB,KAC5C,mBACA,MACA,uCAGA,iBACA,EAEA,CACA,KACA,YACA,CACA,CAAO,CAEP,CAAG,WAGH,EAAwB,QAAY,IAiDpC,OAhDA,YACE,WAAe,MACjB,4CACA,OAEA,8BAGA,oDAKA,OAFA,iBACA,KACA,KACA,mBACA,CACA,CAAG,MAGD,WAAe,MACjB,SACA,UACA,iBACA,gEAEA,yBACA,GACA,OACA,CAAa,EAEb,wBACA,GACA,MACA,CAAa,GAGb,wDACA,OAEA,EAGA,OADA,gCACA,KACA,kCACA,CACA,CAEA,CAAG,oBACH,CACA,KACA,iCACA,6CACA,mCACA,UACA,gBACA,CACA,ECtK6B,CAC7B,wBACA,0BACA,yBACA,iBACA,wBACA,cACA,eACA,CAAK,EACL,IACA,IACA,IACA,SACA,iBAIA,8BAGA,kCAGA,GACA,KACA,aACA,eACA,eACA,MACA,EAMA,GALA,sCACA,gCAIA,GACA,WACA,uBAEA,2BACA,4BAEA,MACA,QACA,SAGA,UAES,CAET,CAIA,4BACI,WAAe,MACnB,yBAEA,QAWA,GAVA,UAFA,GAGA,UAEA,SALA,GAMA,gBANA,GAQA,wCAEA,OAAqB,EAAS,SAE9B,kBACA,gEACA,oDACU,CACV,8CACA,MACA,yBACA,GAGA,cACA,iCACA,CAAe,EAEf,2CACA,EAAY,IACZ,mBAEA,CACA,CACA,CAAK,YAID,WAAe,MACnB,MACA,oBACA,+BACA,+BA/KO,GAAkC,kCAAkC,+BAA+B,6BAA6B,8BAA8B,0BAA0B,IAgL/L,sBAGA,gCACA,kBACA,qBACA,CAAS,GACT,CACA,WACA,eACA,CACA,CAAK,UACD,WAAe,MACnB,aACA,KACA,YACA,GACK,IACL,MAAyB,SAAa,OACtC,kBACA,cACA,kBACA,mBACA,OACA,iBACA,UACA,YACA,EAAK,oBACL,KACA,kDACA,OAEA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AAS,4BACT,QAAS,qFACT,QAAS,oBACT,QAAS,oEACT,QAAS,2DACT,QAAS,mDACT,QAAS,oBACT,QAAS,uBACT,QAAS,wDACT,QAAS,oBACT,QAAS,4CACT,QAAS,uCACT,QAAS,6BACT,QAAS,0BACT,QAAS,mBACT,QAAS,yBACT,QAAS,8CACT,QAAS,2DACT,QAAS,wCACT,QAAS,8CACT,QAAS,qBACT,QAAS,yBACT,QAAS,0BACT,QAAS,yBACT,QAAS,gCACT,QAAS,8BACT,QAAS,oBACT,QAAS,wBACT,QAAS,uBACT,QAAS,oBACT,QAAS,yBACT,QAAS,wBAGT,QAAS,yEACT,QAAS,mBACT,QAAS,yBACT,QAAS,oBACT,QAAS,8BACT,QAAS,6BACT,QAAS,wBACT,QAAS,mDACT,QAAS,6BACT,QAAS,uBACT,QAAS,sBACT,QAAS,wBACT,QAAS,wBACT,QAAS,kCACT,QAAS,uBACT,QAAS,mBACT,QAAS,6BACT,QAAS,oBACT,QAAS,oBACT,QAAS,2BACT,QAAS,uBACT,QAAS,2BACT,QAAS,uBACT,QAAS,6CACT,QAAS,sDACT,QAAS,4CACT,QAAS,8BACT,QAAS,sCACT,QAAS,uBACT,QAAS,iBACT,QAAS,sBACT,QAAS,uBACT,QAAS,8BACT,QAAS,8BACT,QAAS,8BACT,QAAS,yBACT,QAAS,8BACT,QAAS,iDACT,QAAS,oCACT,QACE,qGACF,QAAS,oBACT,QAAS,+BACT,QAAS,qDACT,QAAS,wDACT,QAAS,8BACT,QAAS,oBACT,QAAS,sCACT,QAAS,kEACT,QAAS,4CACT,QAAS,mBACT,QAAS,mBACT,QAAS,8BACT,QAAS,kDACT,QAAS,qEACT,QAAS,wEACT,QAAS,4BACT,QAAS,sBACT,QAAS,wBACT,QAAS,oBACT,QAAS,gDACT,QAAS,qCACT,QAAS,sBACT,QAAS,2CACT,QACE,+IACF,QAAS,0BACT,QAAS,iBACT,QAAS,yDACT,QAAS,oBACT,QAAS,kDACT,QAAS,sEACT,QAAS,i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AN,GAAM,CACnB,OAAW,GAAM,OAGjB,uCACA,CACA,cACA,8BACA,CACA,aACA,oCAyCA,MAtCA,IACA,UACA,MACA,IAEA,SACA,EAgCA,EAhCA,KACA,UAIA,OAHA,yDACA,OAEA,CACA,CAAO,EACP,KAEA,OACA,aAFA,EAGA,SACA,KACA,IACA,CAAa,KACb,KACA,IACA,CAAa,CACb,CACA,EAGA,OADA,KACA,CAEA,CAAM,SAIN,MADA,KACA,CACA,CACA,EAUA,aACA,MAAS,QAAW,cACpB,EACA,YAAY,IAAW,cACvB,gBACA,OAAW,IAAW,iBACtB,CACA,CAAC,EAKD,mBACA,eACA,wBAEA,OADA,gBACA,yBACA,EACA,wBAEA,OADA,gBACA,wBACA,EACA,qBACA,iBACA,0BAEA,OADA,gBACA,2BACA,EACA,0BAEA,OADA,gBACA,0BACA,EACA,IAAM,EAAM,WACZ,GADY,GACZ,SACE,EAAM,KAER,SAFQ,CAYR,YACA,EAKA,IAAM,EAAI,OACJ,EAAK,GADD,IACC,CACX,KADW,CACX,YAEA,OADA,yBACS,KAAI,UACb,EACA,mBAEA,OADA,wBACS,KAAK,YA2Cd,QAAW,EACX,iCACA,KAKA,uBACA,UACA,MACA,IACA,gBAYA,OARA,sBACA,gBACA,GACA,CAAS,IA9BT,uCAGA,kCAGA,2DA0BA,2BAEA,CAAO,EACP,CACA,EAAM,OACN,IACA,CACA,CAAG,CACH,iBACA,MAIA,OAHA,OACA,KACA,CAAK,EACL,CACA,CACA,CAAC,EAOD,cAIA,KAqKA,aACA,cACA,IACA,OACA,YACA,CAAM,EACN,OACA,WACA,CAAK,EACL,8BACA,4BAEA,CAAG,EACH,WACA,SACA,CAkDA,SAAkB,IAAP,GAAO,CAAqB,EAAO,CAA5B,EAA4B,2BAG9C,6BACA,eACA,GACA,CAAK,EACD,6BAIJ,cACA,GACA,CAAK,EAKL,4DAEA,UACA,eACA,MACA,KACA,CAAK,EACL,cACA,IACA,CAAK,CACL,UExeO,IAAM9yH,EAAa,GA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A,aACA,mBACA,eACA,cACA,gBACA,mBACA,SACA,iBACA,cACA,QACA,qBACA,4BACA,mBACA,eACA,gBACA,qBACA,EAQA,uBACA,kDACA,aAGA,CACA,EAYA,gBACA,OAAgB,gBAEhB,4CACA,iDACA,yBACA,KAGA,CAHwB,CAGxB,UACA,qBACA,QAAoB,WAAkB,IACtC,4BACA,kBAfwC,CAexC,KACA,UAnBA,uBAAyC,CAoBvB,MAClB,iBAEA,IACA,GAxBwE,CAwBxE,QAAkC,IAKlC,IAAgB,WAAkB,IAClC,UAGA,IArBA,EA0BA,IALA,OAEA,kBACA,2BAGA,SACA,iCACA,iCAEA,4CACA,aACA,kBACA,YACA,uCACA,IAIA,iDACA,KAvEA,iBAAgC,iBAChC,0CACA,CAAK,CAqEL,EAGA,qBACA,eAGA,YACA,uBAEA,OAIA,QACA,EAEA,oBAGA,QAFA,aAEA,aAAmC,KAAQ,KAE3C,IADA,EACA,OAEA,2BACA,mBACU,CACV,wCACA,oEACA,gBACA,uBAGA,WACA,OACA,eACA,MACA,+BAEA,MACA,MACc,iBACd,SAXA,GAAwB,IAaxB,CAEA,GACA,CAEA,QACA,EAEA,oBACA,MAKA,oDAKA,kBAIA,aALA,eAKA,QACA,yBAIA,KACA,MAEA,gDACA,mBACA,OAIA,SACA,CAKA,IADA,QACA,6CAEA,GADA,KACA,4DACA,mBACA,OAGA,YACA,CAQA,OAJA,GACA,iCAGA,WACA,EAEA,cACA,MACA,SAGA,sEACA,iDAGA,qEACA,qFAEA,6CAEA,OACA,yDACA,wFACA,wEACA,mEACA,UACA,wFACA,gDACA,yDACA,wFAEA,8DACA,2CACA,4HACA,mFACA,+BACA,4EACA,mGACA,CACA,EAEA,wBACA,WAEA,mBACA,6CASA,QANA,8BACA,wCAIA,iBACA,IAAoB,WAAiB,KACrC,WACA,iCACA,gBACA,OAEA,mBACA,EAGA,YACA,gCCrQA,MAAqB,EAAQ,GAAc,EAC3C,EAAY,EAAQ,KAAS,EAC7B,CAF4B,CAEd,EAAQ,KAAW,CADd,CAEnB,UADqB,QACrB,gBAEA,GACA,qBACA,aACA,CAAK,CACL,cACA,sBACA,kBACA,CAAK,CACL,mBACA,QACA,CACA,EAEA,gBACA,uBACA,gBACA,qBACA,EAEA,6BAEA,YACA,GACA,kBACA,aACA,gBACA,mBACA,cACA,UACA,iBACA,oBACA,SACA,0BAEA,WACA,0BACA,gBACA,CAAK,CACL,aACA,qBACA,EAUA,KAEA,aACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,GAOA,IALA,IA5BA,EAoFA,EAxDA,IAEA,IACA,IACA,KACA,4BAEA,eAEA,GADA,KACA,YACA,SACA,wCAEA,IAEA,CACA,IAHiC,CAGjC,cACA,KAEA,CAeA,GAbA,qBACA,SACM,kBACN,OACM,mBACN,mCACA,kBACA,KAEA,CACA,EAAS,EAGT,UACA,KACA,wCAGA,IACA,CAEA,GArEA,iBADA,EAsEA,IApEA,oBACA,qBACA,oBACA,oBAiEA,qBACA,EAEA,GADA,8BACA,mCAEA,wBAGA,SAEA,cACA,SAIA,qBAEA,MACA,oBAEA,IAAqB,0CAAgE,OAC/E,QACN,QACM,CACN,qBACA,eACA,CAIA,QAFA,iCAEA,IAAoB,WAAoB,KACxC,WACA,oDAEA,iBAIA,WACA,8BACA,sBAEA,WACA,UACA,WACA,MACA,EACA,EACA,EACA,EACA,EACA,EACA,4BACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,EACA,IAEA,CAEA,QACA,EAEA,cACA,MACA,SAGA,sEACA,iDAGA,2BACA,qEACA,qFAGA,gBACA,sBACA,kCACA,mDAEA,WAEA,sBAEA,WAKA,MAJA,4CACA,aAGA,CACA,oFACA,yDACA,UACA,wFACA,uDACA,oDACA,yDACA,4FACA,SACA,SACA,YACA,iFACA,gEACA,2CACA,oGAEA,CAEA,yBACA,IAGA,EAiBA,EApBA,IACA,MAKA,6BAEA,KADA,UACA,MACM,aAEN,GADA,UAIA,SAEA,gCACA,SAKA,EADA,sBACA,cACM,iBACN,6BAEA,UAGA,WACA,+DACA,iEAEA,uCAEA,GACA,mBAGA,QACA,eAIA,QADA,MACA,IAAoB,WAAoB,KACxC,WAEA,0BAGA,MACA,KACA,EACA,EACA,EACA,qBACA,YACA,wBACA,SACA,OACA,YACA,gBACA,SACA,YACA,mBACA,UACA,GAEA,CAzBA,IA2BA,sBACA,+BAYA,OAVA,oBACA,yBAEA,0BAGA,sBAIA,iBACA,gCC7TA,MAAc,EAAQ,KAAW,EAEjC,UAFqB,QAErB,gBACA,gBAEA,aAEA,QADA,KACA,IAAoB,MAAS,IAC7B,yDAGA,QACA,CAAC,GAED,cACA,kBACA,cACA,gBAEA,SAGA,QAFA,KAEA,IAA4B,WAAgB,IAC5C,eACA,YAIA,gBACA,CACA,CACA,EAEA,gBAEA,QADA,2CACA,IAAoB,WAAmB,IACvC,eACA,YAIA,QACA,EAoMA,WACA,gBACA,OA3IA,cACA,2CAEA,OADA,UACA,CACA,CAAK,GACL,EAuIA,QAlBA,cACA,oBACA,EAiBA,QAvDA,YAIA,QAHA,IAAmB,KAAO,IAAU,UAAa,EACjD,KAEA,IAAoB,WAAkB,IAKtC,QAJA,OACA,gBAEA,iBACA,IAAwB,WAAiB,KACzC,WACA,OACA,kDACA,QAA6B,aAAqB,EAClD,UAEA,CAKA,OAFA,KAEA,CACA,EAkCA,OAvIA,gBACA,2BACA,oBAEA,4BAAiD,EAAE,cAGnD,IACA,4BACA,CAAM,SACN,QACA,CACA,EA4HA,OA1HA,oBAGA,gBACA,SAGA,QAOA,GANA,mBACA,oCACM,oBACN,cAGA,iBACA,qCAAkD,EAAE,gBACpD,4CACA,CAAS,EAIT,QADA,KACA,IAAoB,WAAmB,KACvC,sBAEA,GACA,QACA,QACA,QACA,SACA,cACA,cACA,eACA,gCACA,CACA,eACA,QACA,CAEA,UACA,QACA,QACA,CAEA,WACA,2BACA,QACA,CAEA,sBACA,2CACA,QACA,CAEA,KAGA,UAFA,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G,qEAiDtX,KAyBA,MACA,yBACA,kBACA,6BACA,CACA,CAAG,EACH,4BACA,kBACA,iBACA,aAGA,UAEA,qBAEA,cAEA,oBAEA,kEAEA,OACA,eACA,QACA,oCACA,CAAW,CAEX,CACA,CAIA,CAAG,EACH,qBACA,iBACA,gEAGA,MADA,iBACA,iBAEA,0BAGA,aACA,yBAKA,MAHA,6CAGA,aASA,OAPA,QACA,iGAIA,aAEA,CACA,CAIA,CAAG,EACH,qBACA,oBACA,iBACA,WACA,iBAGA,MADA,iBACA,iBAEA,gFACA,CACA,CAAG,EACH,oBACA,iBACA,iBACA,qBACA,oBACA,+BAOA,MAJA,QACA,QAGA,CACA,mBACA,oBACA,iBACA,CACA,CACA,CAAG,EACH,qBACA,kBACA,sBACA,yBAEA,mBACA,EAGA,SACA,CACA,CAAG,EACH,oBACA,iBACA,sBAIA,uBACA,qBACA,sBAEA,SACA,4IAA6K,MAAM,4HAInL,MAEA,CADA,6BACA,aACA,yEAA8F,YAG9F,CACA,CAAG,EACH,mBACA,kBACA,+BAEA,aAIA,GAFA,qBAEA,WAIA,OACA,cAJA,KAKA,aAJA,SAKA,cACA,YAXA,IAYA,CACA,CAMA,CAAG,EACH,8BACA,sBAIA,4BACA,sBACA,wCACA,CAAO,GACP,CAIA,CAAG,EACH,2BACA,sBACA,iBACA,WACA,WACA,WAIA,OACA,iBACA,+DACA,CAGA,yBAKA,sCAGA,yCARA,SAWA,qBAIA,yBAHA,mBAGA,GAOA,IALA,2CACA,IACA,iBAGA,8CACA,KAKA,MAFA,sDAEA,KACA,CACA,CAAG,EACH,uBACA,sBACA,wBAEA,mBACA,0BACA,4BACA,4BACA,SACA,SAIA,QAFA,IAEkB,IAAc,KAChC,eACA,WAGA,wBAIA,wDAGA,2BACA,IACS,IACT,CAUA,MARA,uBAEA,aAIA,gCAGA,CAKA,CAAG,EACH,4BACA,kBACA,iBACA,WACA,WACA,WAIA,UACA,iBAGA,+BAMA,OAHA,wDAGA,eACA,sDAGA,YACA,CAEA,QACA,CACA,CAAG,EACH,8BACA,kBASA,QANA,MAFA,cAEA,8BACA,YACA,CAAO,EACP,IACA,KAEA,eAA+C,KAAS,KACxD,eAIA,gCAKA,WACA,IACA,KACA,CACA,CADU,EACV,iBACA,aAIA,mCACA,CACA,CAAG,EACH,uBACA,kBACA,iBACA,WACA,4BAEA,IAEA,EAIA,EADQ,mBACR,gCACQ,qBAER,KAEA,+BARA,gCACA,2BAJA,CAcA,CAUA,CAAG,EACH,wBACA,kBAKA,QAJA,oBAEA,IACA,cACA,eAA0C,IAAQ,IAClD,aACA,kCACA,MAGA,iBACA,CAQA,CAAG,EACH,qBACA,sBACA,aACA,UACA,gCACA,cAAqC,EAAE,YACvC,KACA,uCACA,gBAAuC,EAAE,OAAO,EAAE,YAClD,KACA,kCACA,cAAqC,EAAE,YACvC,KACA,SACA,cAAqC,EAAE,WACvC,CAEA,0BACA,CAMA,CAAG,EACH,qBACA,kBACA,iBACA,iBACA,sBACA,WACA,WAEA,uBACA,sBACA,qBACA,oBAEA,4BAEA,uBACA,kBACA,iBACA,gBAoBA,CApBmD,MAKnD,0CAEA,GACA,+BAIA,WACA,UAGA,aAEA,gBAGA,CACA,CAAG,EACH,sBACA,iBACA,gEACA,oBAEA,IAeA,MAbA,OACA,KACQ,WAIR,EADQ,mBACR,0BACQ,qBACR,KAEA,wBAPA,MACA,MASA,CACA,CACA,CAAG,EACH,sBACA,iBACA,iBACA,WACA,iBACA,sBACA,aACA,UACA,2BAIA,eAEA,qBACA,eACA,MAKA,2BACA,kCAGA,8CAGA,CACA,CAAG,EACH,qBACA,iBACA,gEACA,2BAGA,uBAGA,gBAGA,YASA,OANA,qBAEA,UACA,UAGA,CACA,CACA,CAAG,EACH,kBACA,iBACA,gEAYA,OAXA,mBAKA,2BAIA,2BAEA,uBACA,CAIA,CAAG,EACH,yBACA,oBACA,iBACA,WACA,WACA,WACA,iBACA,sBAGA,EADA,qBACA,uBAKA,gCAGA,0DAKA,CACA,CAAG,EACH,8BACA,sBACA,YAA0B,IAAS,IACnC,yCAEA,QACA,CAOA,CAAG,EACH,wBACA,sBACA,wBAEA,6BAGA,iCACA,SAIA,6BACA,yBACA,yBAEA,KADA,+BACA,OASA,GANA,6BARA,EAQA,MACA,MAKA,IACA,+BAEA,uBACA,kBACA,iBACA,gBAKA,CALsD,EAKtD,0CACA,eAEA,CAEA,QACA,CACA,CAAG,EACH,eACA,kBACA,YACA,eACA,UACA,aACA,aACA,cAEA,cAGA,4CAEA,gCAEA,8BACA,2BAEA,GACA,iBACA,QACA,wBACA,EAEA,MACA,MAIA,UAGA,mCAGA,oCAGA,MACA,eAAwB,sBAAiD,YACzE,mBACA,aACA,CAAS,EAET,aAEA,CACA,CAAG,EACH,aACA,kBACA,iBACA,aACA,WACA,WACA,gBAEA,UACA,OACA,0BACA,8BACA,GACA,iBACA,QACA,wBACA,EAGA,UAEA,YACA,eAA0B,sBAAiD,YAC3E,mBACA,IACA,CAAW,EACX,MACA,CACA,CACA,IACA,CACA,CAAG,EACH,gBACA,kBACA,eACA,QACA,iBACA,UACA,mBAEA,SACA,aACA,iBACA,sBACA,WACA,WACA,WACA,cAGA,yBADA,eAEA,MACA,qBAaA,GAVA,iCACA,MACQ,iBACR,MACQ,cACR,MAKA,mBACA,KACA,MACA,CAEA,QACA,4BACA,2CAEA,qCAEA,gCADA,qCAEQ,4CAIA,mDACR,2BACA,IAEA,uCACA,OARA,yBACA,IASA,oBACA,mBACA,qCAKA,iBACA,oCAGA,uBACA,CAIA,CAAG,EACH,gBACA,kBACA,eACA,mBACA,iBACA,UAGA,UACA,qCACA,OACA,mCAEA,CAEA,uBACA,CACA,CAAG,EACH,cACA,kBACA,WAIA,YACA,sBACA,eACA,mBACA,UAGA,8BACA,OACA,iCAGA,kBACA,CAAO,CACP,CACA,CAAG,EACH,aACA,iBACA,iBACA,SACA,gBACA,gBACA,eACA,mBAGA,2BAEA,MAAkC,IAClC,OACA,QACA,uBACA,yBACA,yBACA,qBACA,mBACO,QA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AAuG,0CAAyE,aAAe,mDAA0E,EAAG,qEAmBtX,KAcA,MACA,wBACA,iBACA,WAOA,GAJA,8DACA,yCAGA,GAEA,sBAAoC,aAGpC,oBACA,sBACA,4BACA,oBACA,IACA,CACA,CAGA,uCAGA,2CACA,oBACA,CAAO,sBACP,gBACO,EACP,CAIA,CAAG,EACH,2BACA,iBAEA,eAKA,oCACA,6BACA,WAGA,qBACA,kBAGA,uCACA,CACA,CAAG,EACH,4BACA,uBACA,wBACA,uBACA,GAGA,CAIA,CAAG,EACH,yBACA,iBAEA,eAEA,sBAAoC,YAGpC,wBAGA,yBACA,CAIA,CAAG,EACH,aACA,iBACA,WAEA,aACA,OACA,SACA,cACA,kBACA,aACA,kBACA,sBAEA,iCACA,8BACA,gBACA,mBACA,CACA,CAAO,8BACP,YACA,OACA,KACA,SACA,WACA,WACA,YACA,SACA,CAAO,EACP,CACA,CAAG,GAEH,CACA,CAAC,kDCpLD,qCAA6C,CAC7C,QACA,CAAC,EACD,4BAAkC,QAElC,4BAAkC,CADlC,wECDA,GAAe,CA8Bf,YACA,eACA,cAEA,4BACA,4CACA,aACA,mBACA,YACA,gBAA6C,EAC7C,iBACA,aAEA,sDAVA,uBAUA,OADA,6BAIA,IADA,mBACA,GACA,OACA,OAGA,IADA,mBACA,GACA,OACA,OAGA,IADA,qBACA,GACA,OACA,OAGA,IADA,mBACA,GACA,OACA,OAGA,IADA,mBACA,GACA,OACA,OAGA,IADA,mBACA,GACA,OACA,OAEA,qBACA,qBACA,qBACA,+BACA,oCACA,CAAG,QACH,8CACA,0DAAiK,eACjK,wBACM,EAAI,oBACV,MACA,QACA,CAAK,CACL,CAAG,SACH,8CACA,0DAAiK,eACjK,wBACM,EAAI,oBACV,MACA,QACA,CAAK,CACL,CAAG,SAsBH,MArBA,2BACA,gBAEA,iBAEA,iGAEA,EAF2G,CAE3G,mDAEA,GAFwF,MAExF,qEACA,8DACA,EAEA,EACA,oBACA,UACA,CAAO,EAEP,IAEA,CAAG,KAC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KA,aAGA,CAHwB,GAGxB,cACA,oDAEA,KAGA,qBACA,WACA,WACA,UACA,CAIA,CAiGA,WA/FA,YACA,YACA,qBACA,gBACA,kCAGA,CAH8D,CAG9D,qBAGA,UAHyD,CAGzD,GACA,SAGA,sCACA,OACA,OAEA,iCACA,OACA,OAGA,CAH0B,CAG1B,mBACA,OACA,OAmEA,MAjEA,2BAGA,iBAIA,mBAEA,GACA,SAMA,EACA,cAEA,qCACA,MACA,mCACA,cACA,uBAEA,UAES,EACT,gBACA,WACA,WACA,UACA,GAKA,IAvBA,EAuBA,aACA,kBACA,MACA,KACA,EAEA,cACA,eACA,IACA,EAKA,OAHA,6BACA,8BACA,6BACA,WACA,gCACA,iCAMA,WAN4D,CAM5D,GACA,WACA,oBAEA,EACA,CADS,CACJ,KACL,OAIA,2DACG,EAEH,KACA,UAEA,sBAEA,wCACA,0BACA,SACA,CACA,EAEA,sCACA,QACA,CAAG,EACH,2BAIA,mCACA,cACA,eACA,oBAEA,CAAG,EACH,mCACA,cACA,eACA,iBAEA,CAAG,CACH,CAAG,EAEH,MACA,WAEA,sBACA,SAEA,OADA,6BAAyD,aACzD,CACA,EAMA,gBACA,OACA,WACA,QACA,mBACA,EAEA,CAFO,EAEP,0CACA,uCAGA,gBAA0D,MAAa,EACvE,qBACA,UACA,wBACA,oCACA,CACA,CAAK,GA2CL,CACA,KA1CA,WACA,UAIA,UACA,sBACA,eACA,EAmCA,OAjCA,YACA,SAIA,iBACA,EA4BA,KA1BA,cACA,sBACA,OACA,MACA,CAEA,mBACA,gBAEA,YACA,WAEA,EAeA,QAbA,WACA,UAIA,kBACA,aACA,CAOA,CACA,EAMA,4DAEA,eAaA,cAEA,IAIA,IAJA,GACA,MACA,mBACA,CAAK,EACL,GACA,OACA,OAIA,CAJgC,CAIhC,EADA,iBACA,GACA,OACA,OAGA,IADA,eACA,GACA,OACA,OAEA,2CAoDA,OAnDA,uBAEA,OAKA,+CAIA,qBAEA,uCACA,MACA,CAIA,CAJQ,KAIR,GACA,QACA,QACA,CAAS,YACT,kBACA,CAAS,EAGT,IArEA,IAqEA,GArEA,EAqEA,MAA6D,MAAc,EAC3E,kBACA,MACA,oBACA,CACA,CAAO,EA1EP,EA0EO,oBAxEP,EADA,uBACA,IA2EA,OAFA,KAEA,IAFsB,OAGtB,eACA,QACA,CAAS,YACT,kBACA,CAAS,CACT,EACA,CAAK,8BASL,CACA,QACA,MAVA,iBAWA,oBACA,gBACA,cAXA,WACA,SACA,yHAEA,CAQA,CACA,EAEA,mCACA,cACA,iBACA,UACA,cAGA,QAAsD,CAlctD,cACA,oBAEA,IAEA,IAFA,WAlBA,KACA,oBACA,IAEA,IAFA,KACA,iBAGA,QAAgB,WAAuB,IACvC,OACA,iBACA,YAGA,QACA,EAKA,KAIA,iCACA,sCAEA,QAAkB,WAA6B,IAC/C,QACA,mBACA,iDACA,WAEA,CAEA,QACA,EA6aA,OAGA,UACA,SAEA,iCACA,aACA,cACA,YACA,SACA,kBACA,eACA,qBACA,2BACA,kBACA,CAAO,IACP,mBACA,UACA,CACA,CAAK,GACL,CACA,2BAqEA,CADA,EASG,kDAAoE,GARvE,YACA,cACA,oBACA,0CACA,gBACA,kEACA,0EACA,0EAGA,oBA7EA,YACA,cACA,cACA,cACA,WACA,WACA,YACA,UACA,wBACA,uBACA,OACA,YACA,SACA,SACA,UACA,QACA,qBACA,CACA,CAAK,gBAML,CAN0E,CAM1E,EAJA,GACA,MACA,mBACA,CAAK,EACL,GACA,OACA,OAEA,iBA6BA,OA5BA,uBAEA,OAIA,qBAEA,uCACA,MACA,CAEA,+BACA,uEACA,MACA,CAKA,CALQ,GAMR,EADA,gCAA+E,eAC/E,QAGA,CAHmD,MAGnD,WACA,GACA,EACA,CAAK,YACL,uBACA,QACA,YACA,KACA,CAAK,CACL,EAgBA,cACA,iBAEA,sCAAiD,SAAa,CAE9D,CAAC,CA1mB6D,EAAoB,EAAQ,KAAO,YCAjG,WACA,8BACA,WACA,CAAK,CACL,mCACA,WACA,CAAK,sFCuFE,KA3FA,aAGP,aACA,MAuBA,MAnBA,CAFA,sBAEA,kBACA,MAEA,IAAW,IAAQ,gDACnB,iBACA,UACA,EAKA,CALW,MAGX,iDACA,sCACA,WAEA,iDACA,qCACA,CACA,CACA,EAEA,CACA,CA3BE,OAAc,MA6BhB,kBA2DA,OAzDA,yBACA,cACA,iCAEA,EAEA,2BACA,yBACA,KAEA,sCACA,mBACA,CACA,EAEA,+BACA,MACA,OAEA,aACA,qCACA,2BACA,oBACA,gBAEA,WAEA,CAAK,CACL,EAEA,yBACA,eAEA,GACA,cAEA,EAEA,qBACA,mCACA,GACA,CAAK,CACL,EAEA,6BACA,+BACA,aAIA,8BAIA,iEACA,EAEA,CACA,CAAC,CAAC,IAAY,qhBE3Fd,cACO,aACP,QACA,CACO,cACP,GACA,mHCDO,aACP,cACA,aAAmB,OAAQ,GAAG,6BAC9B,6BACA,mCACA,kBACA,wBACA,iBAGA,kBAsJA,OApJA,uBACA,eACA,gBACA,OACA,CAAK,CACL,EAEA,0BACA,gCACA,sBAEA,EAEA,6BACA,iDACA,YACA,CAAK,CACL,EAEA,2BACA,cACA,sBACA,0BAAuC,IAAI,QAAQ,IAAI,GAGvD,iBACA,EAEA,6BACA,cACA,wBACA,sBAGA,cACA,EAEA,qBACA,IAEA,EAFA,OAGA,gCACA,oBAuBA,OArBA,IACA,eACA,eACA,iCACO,EACP,oBAEA,2FACA,CAAO,kBACP,4EACA,CAAO,mBACP,qBACA,YACA,eACA,UACA,4BACW,CAEX,CAAO,GAGP,kBACA,0BACA,CAAK,mBACL,IAEA,MAFqB,EAErB,uGACA,CAAK,kBACL,gGACA,CAAK,kBACL,qGACA,CAAK,kBAML,OALA,YACA,eACA,MACA,CAAO,EAEP,CACA,CAAK,oBAKL,OAHA,4GAEM,KAFoJ,CAEpJ,CAAS,YACf,kCACA,4FACA,CAAO,kBACP,uGACA,CAAO,kBAMP,MALA,YACA,aACA,OACA,CAAS,EAET,CACA,CAAO,CACP,CAAK,CACL,EAEA,6BACA,IACA,EADA,OA6BA,OA1BA,iBAAuB,IAAO,EAC9B,qBACA,qBAIA,wCAHA,qCAIA,CAAO,CACP,kBACA,YACA,aACA,CAAS,CACT,CAAO,CACP,mBACA,YACA,YACA,CAAS,CACT,CAAO,CACP,sBACA,YACA,eACA,CAAS,CACT,CAAO,CACP,uCACA,mCACK,EACL,sBAGA,uBACA,WAEA,oBAwBA,KACA,eACA,aACA,MAAa,OAAQ,GAAG,IACxB,6BACA,CAAO,CAEP,aACA,MAAa,OAAQ,GAAG,IACxB,WACA,CAAO,CAEP,gBACA,MAAa,OAAQ,GAAG,IACxB,WACA,CAAO,CAEP,eACA,MAAa,OAAQ,GAAG,IACxB,kBACA,YACA,WACA,YACA,iBACA,sBACO,CAEP,eACA,MAAa,OAAQ,GAAG,IACxB,YACA,WACA,iBACA,WACA,CAAO,CAEP,aACA,MAAa,OAAQ,GAAG,IACxB,YACA,cACA,8BACA,YACA,cACA,CAAO,CAEP,gBACA,MAAa,OAAQ,GAAG,WAExB,SACA,QACA,CACA,EA1EA,cACI,GAAa,kBACjB,gCACA,qBACA,CAAO,EAEP,yBACA,CAAK,CACL,EAEA,CACA,CAAC,GACM,aACP,OACA,eACA,YACA,WACA,eACA,YACA,cACA,gBACA,CACA,gEC3EO,KArGA,YACP,aACA,cACA,oBAEA,0BACA,GACA,EAEA,+BACA,GACA,CACA,CAEA,kBAoFA,OAlFA,oBACA,KACA,qBAEA,IACA,KACA,EAAM,OACN,oBAEA,mBACA,YAEA,CAEA,QACA,EAEA,uBACA,WAEA,kBACA,mBAEM,QAAiB,YACvB,aACA,CAAO,CAEP,EAMA,yBACA,WAEA,kBACA,0CAA0E,IAAa,IACvF,kBAGA,sBACA,iBACA,CAAO,CACP,CACA,EAEA,mBACA,WAEA,aACA,cAEA,UACM,QAAiB,YACvB,2BACA,sBACA,aACA,CAAW,CACX,CAAS,CACT,CAAO,CAEP,EAOA,gCACA,eACA,EAOA,qCACA,oBACA,EAEA,CAC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AAS,CACT,CAAO,CACP,sBACA,gCACK,EACL,kCACA,cAGA,uBACA,WAEA,sCACI,GAAa,kBACjB,gCACA,kBACA,CAAO,EAEP,gBACA,QACA,oBACA,QACA,CAAO,CACP,CAAK,CACL,EAEA,8BACA,qEAEA,EADA,uBACA,4FACA,aACA,OACA,OACA,kBACA,uCACA,WACA,mBACA,iBACA,oBACA,eACA,cACA,iBACA,YACA,yBACA,CACA,EAEA,wBACA,QAEA,eACA,aACA,MAAe,OAAQ,GAAG,IAC1B,uCACA,CAAS,CAET,aACA,MAAe,OAAQ,GAAG,IAC1B,WACA,CAAS,CAET,gBACA,MAAe,OAAQ,GAAG,IAC1B,WACA,CAAS,CAET,aACA,MAAe,OAAQ,GAAG,IAC1B,oBACA,kCACA,cACA,WACA,CAAS,oBACT,WACA,gBACA,CAAS,CAET,eACA,MAAe,OAAQ,GAAG,IAC1B,YACA,oCACA,qDACA,WACA,oBACA,cACA,iBACA,YACA,gBACA,CAAS,CAET,aACA,cAEA,GAAY,QAAgB,gCAC5B,MAAiB,OAAQ,GAAG,mBAG5B,MAAe,OAAQ,GAAG,IAC1B,QACA,sCACA,0BACA,wCACA,cACA,YACA,cACA,CAAS,CAET,kBACA,MAAe,OAAQ,GAAG,IAC1B,gBACA,CAAS,CAET,gBACA,MAAe,OAAQ,GAAG,WAE1B,SACA,QACA,CACA,EAEA,CACA,CAAC,cC7eM,cAGP,cACA,MAMA,MAJA,uBACA,aACA,aACA,gBACA,CACA,CAVE,OAAc,MAYhB,kBA8HA,OA5HA,wBAGA,IAFA,EAEA,aACA,0BAA4F,QAAqB,MACjH,cAeA,OAbA,IACA,MAAkB,EAAK,CACvB,EADuB,IACvB,KACA,WACA,YACA,iCACA,QACA,qCACA,YACO,EACP,aAGA,CACA,EAEA,kBACA,+BACA,+BACA,qBACA,aACA,kBACA,OACA,CAAO,EAEP,EAEA,qBACA,mCAEA,IACA,YACA,6CACA,YACA,CAAO,EAEP,OACA,oCAGA,aACA,oBACA,OACA,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GN,kFACA,SACA,kBACA,WACA,UAEA,8BAEA,iEACA,yBAEA,IACA,uBACA,mBAEA,0BACA,GAAqB,QAAgB,2BAGrC,oBACA,qBACA,CAAY,SACA,OAAS,YACrB,kBACA,OAIA,SAIA,wEAGA,gGACA,cAIA,GAFA,6EAEA,qBACA,IACA,cAEA,0BACA,GAAgC,QAAgB,2BAGhD,qBACA,CAAY,SACA,OAAS,YACrB,kBACA,CAIA,aACA,YACA,IACA,KAEA,CAiCA,OA/BA,mBACA,mBACA,oBACA,aACA,WAGA,CACA,SACA,wBACA,wBACA,oBACA,kBACA,OACA,gBACA,QACA,iBACA,iCACA,oCACA,oDACA,+FACA,aACA,8BACA,gDACA,oBACA,iBACA,gDACA,eACA,qBACA,mBAGA,EAEA,sCACA,MACA,SAGA,mBACA,wBACA,kCAEA,WAIA,yCAHA,SAOA,wCACA,uCAEA,QADA,EACA,KADA,EACA,CACA,oCACA,YACA,CAAO,EACP,oCACA,YACA,CAAO,EACP,qBACA,CAAK,CACL,EAEA,2BACA,yBAKA,GAJA,qEACA,gDACA,wCAA8C,CAEtC,OAAmB,wBAK3B,OACA,QACA,EAEA,qFACA,iBAGA,YAAgB,OAAQ,GAAG,OAC3B,EAEA,yBACA,kEAEA,0BAIA,wBACA,oBACA,sCACA,4CAEA,sBACA,gCACA,qBAEA,EAEA,4BACA,QAEA,oBACA,eACM,kBAAqC,QAAgB,WAC3D,eAGA,qBAEA,qBACA,mBAEA,EAEA,qBACA,WAEI,GAAa,kBAEjB,aACA,qEACA,2EACQ,YACR,kEACA,8EAIA,aACA,gCACA,kBACA,CAAS,EAIT,SACA,iCACA,qBACA,6BACA,CAAS,CAET,CAAK,CACL,EAEA,CACA,CAAC,CAAC,GAAY,EAMd,gBACA,MAJA,KAIA,EAJA,6CAIA,EAJA,oCAIA,gDACA,CAEA,kBACA,mBACA,kCACA,kCACA,CAEA,QACA,CAEA,oBACA,8FACA,CAEA,gBACA,mCACA,CCnhBA,MAAkD,eAAmB,CAfr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nFa,cAEb,CAAG,QAOH,CACA,6BEvBA,IASC,GACD,MACA,GADyB,CACzB,GAEA,yCAIA,QAEA,aASA,QAWA,cACA,6BACA,gBAIA,kCAGA,iBACA,SAGA,sCACA,gBACA,aACA,UACA,OAGA,MAA0B,SAE1B,UACA,kBACA,WACA,wCAEA,aACA,aACA,mBACA,oBACA,OACA,OACA,KAEA,kBACA,OACA,OACA,KAEA,oBACA,0BACA,yBACA,OACA,OACA,KAEA,YACA,YACA,kBACA,iBACA,oBACA,mBAEA,CAEA,UACA,qBACA,sBACA,qBACA,CACA,CAAS,EAET,mBACA,CAAK,CACL,EA3EA,UAIA,4DACA,kDACA,yBACA,iCACA,sBAqEA,cACA,oCAGA,OAFA,YAEA,SACA,OACA,OACA,WACA,KAmBA,OAjBA,uCACA,+BAGA,6BAEA,gCACA,iBACA,8BAEA,OACA,cACA,aACA,WAEA,CAAS,EAET,CACA,CAAK,CACL,CAIA,cACA,IACA,EADA,YAQA,OALA,GAEA,GADA,mCACA,UAGA,CACA,CAEA,cACA,oBAGA,OAFA,uBAGA,wBACA,uBACA,iBACA,CACA,CAEA,cACA,oBAGA,OAFA,uBAGA,SACA,UADA,WAEA,0BACA,6BACA,qBACA,qBACA,wBACA,iBACA,CACA,CAGA,CAAO,CAEP,+CAIA,GAAiC,EAAqB,KAEtD,aACA,EAAmB,EAAG,EAH8B,CAI/B,EAAmB,EAAG,EAAmB,CAC9D,aACA,CAAsB,EAHmB,CAAtB,GAKnB,GAJ8D,CAAtB,OAKxC,SACA,KAEA,cACA,yBACA,CAWA,MATA,YACA,uBACA,YAGA,qBACA,6BACA,CAKA,CAAO,CAEP,0CAIA,KAA0C,KAE1C,aAGA,MAAmB,EAAmB,KALuB,wBAKvB,mBACtC,oDAGA,kBACA,WACA,UACA,sBACA,wBACA,mBAEA,gBACA,EAAI,IACJ,oBACA,aAoBA,cACA,oBACA,gBAnBA,iBAIA,YACA,GACA,gBAEA,EAPA,oBASA,YACA,GACA,mBAEA,EAZA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0B,EACnF,0BACO,EACP,4BACA,QAA2C,MAAW,EACtD,MACA,CAAO,EACP,2BAEA,wFACA,iBAGA,eACA,CAAK,EAEL,4BACA,0BACA,QACA,IACA,KACA,6BAAwG,qBAAgC,EACxI,mCACS,GACT,8BAA0G,qBAAgC,EAC1I,kCACA,CAAS,GAET,qCACA,4BACA,sBACA,CAAS,EAET,YAAwB,IAAe,IACvC,mBACA,mBAGA,YAAyB,IAAiB,IAC1C,QAGA,YAA0B,uBAAgC,IAC1D,QAGA,OACA,aACA,YACA,EAEA,uBACA,6CACA,iEACA,CAEA,OACA,YACA,CACA,CAEA,iDAEA,UAA6D,qBAAgC,EAC7F,YACA,CAAO,EAEP,iDACA,6BACA,QACA,wDAUA,OARA,oBACA,qBAOA,CACA,iBACA,WANA,CACA,YACA,UACA,CAIA,CACA,CAAK,EAEL,oCACA,uFACA,WACA,IACA,2CACA,iBACA,oCACA,EAEA,aAIU,CACV,gBAEA,qBACA,IACA,oBACA,CACA,MAVA,qBACA,2BACA,CAUA,YACA,iBACA,oBACA,gBAEA,kEACA,GAEA,WAEA,qBACA,IACA,kDACA,GAGA,CAAO,CACP,CAAK,EAEL,wCAKA,QAJA,KAEA,QAA+C,mBAE/C,uBAAiD,4CAA6E,IAC9H,wCACA,UACA,KACA,CAGA,iCAAsD,0BAAsD,IAC5G,wCACA,UACA,KACA,CAGA,YACA,uBACA,OACA,yCACA,CACA,CAAS,EAET,oBACA,uBAGA,kBACA,+BACA,uBAGA,CAAK,EAEL,kCACA,8DACA,UACA,aACA,iBACA,eACA,UACA,gBAEA,CAFiD,CAEjD,qBAEA,4BACA,OACA,CAAO,qBAAgC,EACvC,iBACA,yBACA,CAAO,GACP,UACA,cAEA,MACA,uBACA,0CACA,0CACA,CAAO,CACP,qBAEA,kDACA,qCACA,QACA,+BAGA,wBAEA,yBACA,kBACA,+BAGA,GACA,8CACA,kBACA,EAzbA,cAAsD,oBAA+B,IAA8D,IAA9D,WAErF,KAA2D,oBAA+B,IAA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,8DAEA,YACA,qBACA,CAAO,CACP,CAAK,EAEL,2BACA,kBACA,+BACA,sBAGA,0BAEA,aACA,YACA,oBACA,CAAS,EACD,cACR,gCACA,YACA,qBACA,CAAW,EAIX,eACA,YACA,qBACA,CAAW,CAGX,CAAK,EAEL,+BACA,2CACA,CAAK,EAEL,gCACA,6EACA,CAAK,EAEL,gCACA,2CACA,CAAK,EAEL,iCACA,6EACA,CAAK,EAEL,iCACA,2CACA,CAAK,EAEL,gCACA,4EACA,CAAK,EAEL,2BACA,IAeA,EAcA,IA7BA,kDACA,kCACA,sBACA,CAAO,EAEP,QAA+C,mBAE/C,2TACA,uBASA,GARA,QAAiD,MAAiB,EAClE,kCACA,mCACA,iCACA,qEACA,CAAO,EAGP,6DACA,wKACA,2BACA,QAAiD,MAAe,EAChE,2BACA,kCACA,gCACA,iCACA,CAAS,EACT,mCACA,CAGA,yHACA,8BAEA,iBACA,yCACA,0CAGA,UAEA,mBACA,IACA,yBACA,GAGA,UAEA,uBACA,yBACA,IACA,qCACA,EAGA,yBACA,IACA,oCACA,GAIA,YAAoD,OAEpD,oBACA,GACA,uBACA,QACA,uBACA,gCACA,iDACA,4BACA,iDACA,iCACA,iDACA,6BACA,kDACA,iDACA,EACA,GACA,YACA,UACA,qBAYA,OATA,kBACA,GACA,sBACA,EACA,GACA,WACA,GAGA,sFACA,qBACO,uCACP,sBACO,iEACP,CAAK,EAEL,YACA,aACA,cAAgD,cAA+B,EAC/E,kCACA,qDACA,CAAK,EACL,oBACA,eACA,uBAEA,IAlwBA,EAkwBA,cAGA,OADA,cAAgD,aAChD,CACA,CA6BA,OA3zBA,EAgyBA,EACA,qBACA,kBAGA,QAFA,KAEA,8BAAgE,WAA2B,KAC3F,WAEA,yBAKA,6CAIA,qBATA,CACA,KACA,KACA,CAUA,CAEA,8FACA,CACA,CAAG,EA3zBH,cAA4C,YAAgB,WAAkB,KAAO,WAA2B,8BAAwD,kBAAgC,6BAAuD,mCAEjM,eAAoI,UAA9D,WA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ACA,iBACA,WACA,mBACA,iBACA,IACA,EACA,EACA,EAHA,IAIA,IAAgB,CAChB,KACA,iBAEA,MACA,2BAEA,KACA,MACM,MACN,QAGA,mBACA,gBAGA,GACA,aACA,eACA,iBACA,aACA,EACA,GACA,aACA,aACA,CACA,EAAI,IACJ,IAEA,KACA,MACA,EAAoC,kBAApC,IAAoC,CAC9B,WACN,MACM,SACN,UACA,WACM,OACN,MACA,EAA4D,cAA5D,OAGA,UAH4D,EAI5D,QAGA,UAA+D,MAAW,EAC1E,YACA,CAAK,GACL,UAA2D,MAAW,EACtE,YACA,CAAK,GAEL,IACA,aACA,KAGA,GACA,oBAAiG,MAAW,EAC5G,cACA,CAAO,KAGP,GAUA,GACA,aACA,eACA,mBAAqE,MAAW,EAChF,MACA,CAAS,GACT,iBACA,aACA,EACA,GACA,aACA,eACA,mBAA8D,MAAW,EACzE,MACA,CAAS,GACT,eACA,aACA,GA1BA,GACA,eACA,mBAA8D,MAAW,EACzE,MACA,CAAS,GACT,iBACA,aACA,EAuBA,OACA,QACA,WACA,CACA,EAgEA,aAAmB,CA5DnB,cAEA,IADA,QACA,mBACA,iBACA,eACA,iBACA,gBACA,aACA,aAIA,GAFA,EADA,OACA,UAEA,uBAEA,IADA,gBAGA,OAEA,OADA,QACA,OAGA,GACA,aAEI,sBAEJ,IADA,cAGA,OACA,cAGA,GACA,aAEI,sBAEJ,gCACI,0BAIJ,IAFA,UAEA,GACA,cAAqE,MAAW,EAChF,aACA,CAAO,EAEP,8BACA,KACQ,+BACR,MAEA,MACI,qBACJ,oBAGA,QACA,EAWA,YAAkB,CAPlB,uBACA,uDACA,mCACA,mCACA,EACA,EAkBA,YAAkB,CAdlB,sBAEA,CADA,+BACA,sCACA,CACA,YACA,aACA,8CACA,8CACA,4CACA,2CACA,CACA,EATA,EAUA,EAmGA,WAAiB,CA/FjB,cAEA,kBACA,cACA,aACA,iBACA,oBACA,QACA,iBACA,iBACA,gBACA,WACA,WACA,YACA,eACA,mBACA,aACA,gBACA,eACA,eACA,cACA,OACA,iBACA,cACA,MACA,KACA,MACA,+CACA,8CACA,iEACA,yDAEA,gBACA,OACA,YACA,EAGA,qBACA,sCACA,4BACA,qBACA,qBACA,sBAEA,IACA,oGACA,kBAEA,YACA,KACA,mBAKA,QACA,KACA,aAUA,EAPA,EAOA,UANA,EAGA,MAFA,MAQA,GACA,UAGA,QAAwC,MAAY,EACpD,cACA,YACA,mBAA0D,MAAW,EACrE,MACA,CAAK,EACL,CAAG,EAEH,wDAIA,mBACA,aACA,MALA,EASA,EAsFA,UAAgB,CAlFhB,cACA,iBACA,UACA,gBACA,cACA,mBACA,oBACA,eACA,iBACA,cACA,YACA,gBACA,iBACA,aAEA,MAEA,OADA,QACA,GAGA,gBACA,SAEA,GACA,YAHwE,YAIxE,GACA,aACA,WACA,UACA,eACA,cACA,EAEA,MAIA,eAHA,SAOA,oBACA,KAEA,GACA,KAIA,IADA,IACA,QAEA,UACA,WACA,SACA,SACA,aACA,qBACA,KAEA,aACA,WACA,SACA,aACA,qBACA,KAEA,SACA,GACA,CAEA,uBACA,EAAI,IAEJ,UACA,sBAA2E,MAAW,EACtF,MACA,CAAK,EACL,CAEA,QACA,EAIA,kBAMA,IALA,6CACA,iCACA,iCACA,KAEA,KACA,UACA,qBACA,6CAGA,QACA,EAEA,qBAA2B,GAE3B,oBACA,WACA,IAEA,mBACA,qBAEA,gBACA,WACA,IACA,KACA,CAEA,OAIA,QACA,EAEA,gBAAsB,GAEtB,kBACA,+DAEA,mBA4BA,wBA1BA,IADA,EACA,YAkBA,GAhBA,WADA,4DACA,kBACA,cAMA,sCAEA,OADA,IACA,EACA,MARA,wCAEA,OADA,IACA,GASA,QACA,CAAK,EAEL,GACA,SAGA,4DAEA,OADA,8BAKA,EAEA,eAAqB,GAErB,oBACA,8BACA,6BACA,CAAG,0CACH,EAEA,eAAqB,GAErB,kBACA,uEAEA,IADA,IACA,gCAEA,WAGA,kBAFA,oBAKA,OACA,UACA,cACA,mBACA,EAEA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EA,OArEA,0CAIA,eACA,+BACa,CACb,cACA,eACA,CAAS,EAKT,4BACA,4BACA,sBACA,gBAOA,8BACA,2BACA,IACA,yBAGA,4BAEA,EAKA,+BACA,uBACA,QACA,KACA,aAEA,EAKA,4BACA,8BACA,EAIA,6BACA,0BACA,EAMA,kCACA,aAAkC,QAClC,+BAAoD,WAAgB,KACpE,WACA,mBACA,CACA,EACA,CACA,CAAK,EACL,CAAC,GAKD,uFAGA,EACA,KAAqB,IAAN,GAAM,EAAoB,GAAM,aAChC,GAAM,CAErB,2CACA,KAEA,+CACA,OAGA,0BASA,EACA,yCAIA,8BAEA,YAAiC,6BAAgC,qBAA8B,UAwE/F,mEAEA,uCAIA,aAMA,aAMA,mBAMA,6BAMA,6BAMA,mBACA,uDACA,aAjGA,cACA,kBAOA,aACA,IACA,KACA,KAEA,GACA,GAEA,CAQA,aACA,IACA,CAMA,aACA,iBACA,MAEA,OA7CA,EA8CA,OAMA,IACA,MAEA,KACA,KACA,aAQA,IANA,GACA,CACA,QACA,EA4CA,wBAzCA,EA0CA,CA+JA,OAxJA,oCACA,6BACA,wBAGA,iBACA,eAEA,EAOA,uCACA,sBACA,cAEA,KACA,cAGA,4BACA,kBAEA,EAOA,+BACA,yBAIA,cAEA,EASA,wCAEA,yCACA,qCACA,CAAS,EAOT,OADA,sBAAsD,2BAAoC,EAC1F,UACA,EAOA,gCAGA,sBAMA,iEACA,+CACA,GACA,2DACA,0CACA,cACA,aACA,iBACA,UACA,CAAa,IAGb,6DACA,8BAEA,mBACA,EAOA,mCAGA,qBAGA,oEACA,kDACA,yBACA,qCAEA,2BACA,gEAEA,6BACA,6BACA,mBACA,EAQA,yCACA,uCAEA,mBACA,qBACA,CAAS,GAET,cAEA,EAMA,yBAIA,OAHA,gBACA,uBAEA,cACA,EAMA,iBACA,CACA,CAAC,GASD,gBACA,6BAA8C,WAAgB,KAC9D,WACA,2BACA,WACA,cACA,YACA,eACA,CAAS,CACT,CACA,QACA,CAAC,CAQD,cA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,EACT,2BACA,mBACA,EAMA,mCACA,kCACA,EAMA,iCACA,wCACA,EACA,CACA,CAAC,GAKD,gDAKA,EAOA,cACA,wBACA,sDAEA,qBACA,4DAGA,cADA,gBACA,MACA,aACA,EAIA,CACA,UACA,YACA,aACA,qBACA,0BACA,MACA,2CACA,CACA,CAAC,EAUD,MANA,0BACA,EAKe,KAAK,EAAC,OALrB,CAEA,8BC15BA,MAAmB,EAAQ,KAAe,EAC1C,EAAgB,EAAQ,KAAqB,CADnB,CAE1B,EAAc,EAAQ,KAAgB,CADf,CAGvB,UAFqB,SAGrB,oBACA,gBAEA,gCACA,gCACA,gCACA,4BACA,4BACA,4BAUA,gBACA,EADyC,EACzC,UAA6B,kBAA6B,IAC1D,aAIA,OAHA,cACA,cACA,SACA,CAGA,EAEA,CANqB,CAMrB,cACA,aACA,mBAEA,kBACA,aACA,EACA,UAGA,QACA,CADmB,GACnB,EACA,YACA,OACA,CAEA,CAKA,sBAIA,IAHA,EACA,EACA,EACA,GACA,mBACA,aACA,kDAEA,CAAG,CACH,gBACA,EADwB,CACxB,iDACA,MACA,aACA,MACK,KACL,MACA,aACA,MAEA,KACA,IADc,GACd,MAGA,CAAG,CACH,gBACA,oDACA,MACA,aACA,MACK,KACL,MACA,aACA,MAEA,KACA,IADc,EAtCd,IAuCA,KAGA,QACA,CAAG,CACH,kBACA,kDACA,GACA,UAEA,UACK,GACL,GACA,UAEA,WAEA,GAMA,IAAY,MAAO,aAEnB,SAEA,CACA,EACA,QACA,gCCzHA,MAAmB,EAAQ,KAAe,EAE1C,EAAe,EAAQ,KAAI,CAFD,CAI1B,UAFsB,yBAItB,wBACA,qBACA,4CACA,KAEA,CACA,gCCZA,MAAW,EAAQ,KAAe,EAClC,EAAmB,EAAQ,KAAe,CADxB,CAGlB,UAF0B,wBAG1B,iCACA,uCAEA,4CACA,kCACA,kBAEA,KACA,IACA,IAAoB,MAAS,QAAU,CACvC,CAAG,SAEH,MACA,CAGA,sBACA,uBAYA,OAXA,MACA,cACA,cAEA,EACA,EACA,SACA,CAAM,6CAIN,CACA,EAEA,iBACA,uBACA,EAEA,EACA,qBAA4C,QAAkB,EAE7D,eAAoB,2BCxCrB,4BACA,4BAGA,sBACA,IAMA,EANA,OACA,yDACA,qEAyBA,QAvBA,sBAqBA,gCACA,KACA,IAAoB,IAAiB,IACrC,cAKA,GAFA,wDAA+E,sCAAsC,GAxBrH,WACA,wBAUA,eACA,EACA,6BAXA,cACA,KACA,oCAEA,cACA,EAEA,IAOA,GAUA,aACA,kBACA,yBACA,kBACA,gBACA,CAEA,QACA,gCCjDA,MAAqB,EAAQ,KAAkB,EAE/C,mECAA,IAFA,EAEA,cACA,WACA,YAGA,cACA,IACA,wBAAkC,2BAA8C,IAChF,CAAG,UACH,EAEA,kCACA,KACA,IACA,IAAU,IACV,CAAG,SACH,MACA,CAGA,CAJgB,GAIhB,aACA,WACA,EACA,IACA,WACA,IAGA,OADA,iBACA,CADqB,CAEjB,SACJ,IAEA,iCACK,SACL,QACA,CACA,CACA,CAAE,GACF,EAEA,EAAiB,EAAQ,KAAa,IACtC,EAAe,EAAQ,IADC,IAGxB,SAFsB,cAEtB,EACA,GACA,YAAmB,oBACnB,MAGA,KAEA,oDAEA,GACA,uEACA,gBACA,8DACA,2DACA,qCACA,oBACA,qBACA,6BACA,6BACA,kDACA,+CACA,oEACA,uEACA,oBACA,qDACA,cACA,wBACA,0CACA,wBACA,0CACA,gBACA,cACA,wBACA,iEACA,iEACA,yFACA,eACA,wBACA,wDACA,2DACA,2DACA,sBACA,gBACA,yDACA,sCACA,sCACA,yFACA,cACA,kBACA,kBACA,0BACA,sBACA,kDACA,4CACA,0BACA,kCACA,kDACA,kBACA,sCACA,yFACA,gFACA,kBACA,4DACA,sBACA,kBACA,qBACA,iBACA,gBACA,2DACA,gFACA,8DACA,8DACA,sBACA,kDACA,kDACA,iDACA,EAEA,KACA,IACA,WACG,CADW,KACX,GAEH,aACA,yBACA,CAGA,oBACA,MACA,yBACA,yBAAqD,QAClD,6BACH,oBAAgD,QAC7C,kCACH,0BAAsD,QACnD,2BACH,oCACA,GACA,eAEA,EAAG,uCACH,4BACA,MACA,kBAEA,CAIA,OAFA,OAEA,CACA,EAEA,GACA,qDACA,yCACA,uDACA,uDACA,iDACA,qDACA,yDACA,0DACA,+EACA,6CACA,+CACA,uCACA,yCACA,iDACA,uDACA,uDACA,+CACA,gDACA,qEACA,iDACA,mDACA,mDACA,+BACA,uCACA,qCACA,2CACA,2CACA,wDACA,sDACA,6CACA,qDACA,kCACA,wCACA,0CACA,mDACA,2DACA,2CACA,qCACA,iEACA,2CACA,2CACA,qDACA,mDACA,iDACA,mDACA,iEACA,qDACA,qDACA,+CACA,6CACA,8CAGA,EAAW,EAAQ,KAAe,EAClC,EAAa,EAAQ,KAAK,CADR,CAElB,UADoB,QACpB,6BACA,gDACA,iDACA,+CACA,8CAGA,uGACA,aACA,CAD+B,CAC/B,YACA,eACA,UACA,oBACA,8DACG,oBACH,8DAEA,SAIA,OAHA,wBACA,8BACA,CAAE,EACF,CACA,EAGA,gBACA,IACA,EADA,IAOA,GALA,QAEA,QADA,OACA,SAGA,QACA,WAIA,GAHA,OACA,SAEA,eACA,mFAGA,OACA,QACA,OACA,OACA,CACA,CAEA,8CACA,EAEA,wBACA,oCACA,yDAEA,2CACA,yDAGA,6BACA,kGAEA,WACA,qBAEA,iBACA,SACA,UACA,KAEA,UACA,IACA,OACA,iBAGA,iBAA+B,WAAkB,MACjD,WACA,WACA,UACA,GAEA,4BACA,4BAEA,MAEA,oEASA,GAPA,sBACA,OAGA,SAGA,IAFA,aAGA,YACI,YACJ,cACA,MACA,mFAEA,MACA,CACA,qBACA,aAWA,EAVA,SASA,sCACA,MAEA,MAEK,IACL,SACA,OAGA,OACA,QAEA,CACA,CACA,QACA,yBC5VA,OACA,MACA,EAEA,SAEA,qBACA,QAAU,aAAiB,kBAAyB,iBAAkB,YACtE,mBCVA,4CACA,gGACA,4CACA,2BACA,wCACA,gGACA,4CACA,2BAEA,cADA,kCACA,2BAEA,EADA,8CACA,2BAEA,EADA,8CACA,6BACA,4BACA,4BACA,8BACA,yBACA,yBACA,2BACA,+BACA,+BACA,wBACA,yBACA,uBACA,wBACA,aACA,0DACA,+BACA,6FACA,8DAEA,mGACA,mBACA,KACA,wCAEA,6EACA,gCACA,YACA,kBACA,EACA,MAGA,gBACA,GACA,SACA,UACA,MACA,kBACA,cAEA,SAEA,wBAAqC,EAAE,eACvC,uBACA,sBACA,GADyD,IACzD,GACA,gBACA,uBACA,qDAA2G,EAAE,mBAC7G,CACA,CACA,wBACA,CAEA,MAAkB,EAAQ,KAAgB,EAC1C,UADyB,CAEzB,cA4LA,kBACA,2CACA,YACA,CAMA,cAAwB,mEAExB,cAAyB,oEAOzB,cACA,KACA,kDAEA,sBACA,SAEA,8BACA,SAEA,IAEA,OADA,UACA,EACA,CAAM,UACN,QACA,CA3NA,8BACA,YAEA,uEACA,oEAEA,GACA,4DACA,6CACA,0BAGA,0GAEA,6CACA,qCACA,iGAGA,GACA,eACA,iBACA,gBACA,gDAEA,4EAEA,iEACA,qFAEA,yBAEA,cACA,kBAEA,YACA,aAEA,uBACA,wBAGA,sBACA,gBAwSA,OACA,+BACA,iCAEA,0CADA,uCAEA,CAGA,SADA,qDACA,WACA,EAjTA,KAEA,uBACA,SACA,wBAEA,gBACA,iBACA,CACA,uBACA,oBACA,iBACA,CAEA,iCAEA,GADA,YAAwC,MACxC,8BACA,iCAGA,eAkUA,KACA,MACA,kBACA,WACM,4CAGN,YAFA,gCAIA,OACA,OACA,yBACA,CACA,EA/UA,KAEA,cACA,UACM,aACN,mBAGA,kBAKA,GAJA,GAEA,CADA,aACA,QAEA,GACA,OACA,eAKA,OAHA,mBACA,4BAEA,YACA,CACA,mBACA,CAEA,gCACA,CADuD,GACvD,WAwJA,GACA,UAAkB,cAClB,sDACA,EAAa,KACb,IACA,EA7JA,GACA,SACA,gEAAkG,oBAAgC,KAClI,CACA,SACA,kEACA,kCACA,CACA,GA2OA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,uBAEA,QAIA,6BACA,cACA,mBACA,CACA,EA+NA,SArNA,YACA,EACA,SAEA,2BACA,UAGA,QACA,EA6MA,aACA,cAAgB,GAChB,WAAc,EACd,kBAD4B,EAE5B,cArKA,IACA,YAEA,yDACA,SAKA,KAFA,OAMA,GAFA,gBAEA,gBACA,cACA,MACA,CAEA,OACA,YACA,uDACA,GAEA,CAAG,CACH,EA8IA,YA5IA,QACA,SAUA,MARA,KACA,cACA,OACA,CAAK,CACL,GAEA,2BAEA,CACA,EAiIA,YA9MA,GACA,gDACA,gBACA,wBACA,GA2MA,KAhIA,OAiIA,eA/HA,OACA,mCA+HA,UACA,SACA,mBACA,oBAxHA,YACA,gFACA,EAuHA,aArHA,IACA,gBAEA,UAEA,SACA,mBACA,OAGA,oBACA,OACA,iBASA,OAPA,YACA,cACA,eACA,CAAS,EAET,YAEA,CACA,CACA,CAEA,QACA,EAEA,aACA,EAyFA,YACA,WAtFA,GACA,uCAsFA,eACA,MACA,CAAC,CCltBD,CDktBE,QCltBF,aACA,iBAEA,wBACA,+CAEA,yBAGA,eACA,uBACA,iBACA,mBACA,oBACA,IACA,gBACA,mCAEA,CAEA,EAAK,kBACL,kBACA,OAEA,qBACA,eAEA,6BACA,mBAEA,uBACA,2BACA,+BACA,iBAEA,OAAc,EAAK,0BACnB,eACA,mBAEA,CACA,CAAC,EAED,IAAM,EAAS,YACf,KAEA,CAHe,uBAKf,iBACA,eACA,YACA,cACA,4BACA,iBACA,mBACA,kBACA,eACA,kBACA,kBAEA,aACA,MAAuB,QACvB,CAAC,EAED,6BACA,sBAAsB,EAAS,gBAAmB,EAAnB,IAAmB,GAAY,EAG9D,uBACA,oBAAmC,GAgBnC,OAdE,EAAK,QAFqC,IAErC,iBACP,2BACG,IACH,oBAGA,4BAEA,UAEA,cAEA,sBAEA,CACA,uBEtFA,cACA,OAAS,EAAK,kBAAyB,EAAK,UAC5C,CASA,cACA,OAAS,EAAK,gCACd,CAWA,yBACA,EACA,8BAGA,OADA,O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C,IANA,qBACA,kBACA,WAEA,qBAEA,KACA,wBAGA,QACA,CAEA,WAEA,QAIA,IAFA,IAEA,MACA,aACA,SACA,IACA,MACA,CAAQ,SACR,eACA,KACA,CACA,CAEA,IACA,EAAgB,GAAe,aACzB,SACN,wBACA,CAKA,IAHA,IACA,WAEA,KACA,wBAGA,QACA,CAEA,UAGA,OAAW,GADU,GADrB,EAEmB,CAFN,GAAW,kBACU,mCACf,4BACnB,CACA,CAGA,EAAK,sDAEL,8BACA,oBAAwB,GAAW,KAAa,EAChD,CADmC,MACnC,EACA,MACA,YAAyB,KACzB,CAAK,EACL,CACA,CAAC,EAED,EAAK,2CAGL,cACA,uBACA,oBAA0B,GAAW,KAAa,EAClD,CADqC,MACrC,EACA,WACA,oCACA,EAAU,EAAI,CACd,MACA,MACA,CAAO,EACP,CACA,CAEA,oBAEA,4BACA,CAAC,CCpOD,UACA,mBAKA,EAJA,wBACA,+CAKA,sCACA,GACA,CAAK,EAEL,WAGA,sBACA,wBAEA,0BAEA,aACA,kBAEA,kBACA,CAAK,EAGL,0BACA,EAEA,sBACA,eACA,GACA,CAAO,UAMP,OAJA,oBACA,gBACA,EAEA,CACA,EAEA,kBACA,WAKA,aAAyB,GAAa,OACtC,UADsC,EAEtC,CAAK,CACL,CAKA,mBACA,eACA,kBAQA,aACA,gBACA,eACA,MACA,CAEA,gBACA,wBAEA,oBAQA,eACA,oBACA,OAEA,gCACA,SACA,2BAEA,CAEA,gBACA,0BAEA,MACA,UACA,EAMA,OAJA,kBAEA,6CAEA,SAOA,gBACA,MAIA,OACA,MAJA,mBACA,GACA,CAAK,EAGL,QACA,CACA,CACA,CGpIA,QACA,aACA,uBACA,eACA,eACA,OACA,YACA,aACA,gCACA,cACA,iBACA,mBACA,gBACA,oBACA,WACA,oBACA,qBACA,UACA,aACA,gBACA,aACA,WACA,sBACA,sBACA,eACA,iBACA,oBACA,cACA,aACA,qBACA,kBACA,gCACA,mBACA,aACA,SACA,mBACA,uBACA,oBACA,e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A,kBACA,0CACA,CACA,CAAG,EACH,qBACA,kBACA,yCACA,SAGA,wBACA,4BACA,QACA,KACQ,CAER,oCAEA,iCACA,QAEA,CACA,CACA,CAAG,EACH,iCACA,yBACA,uBACA,yBAEA,qCAEA,CAEA,CAFM,CAEH,CACH,cACA,kBACA,kCACA,CACA,CAAG,EACH,0BACA,oBAOA,GALA,eACA,IACA,QAGA,cACA,uBACA,0CAGA,0DACA,EAAQ,UACR,2BACA,+CAGA,gEACA,EAAQ,IACR,0BAGA,YAEA,CAAG,EACH,oCACA,kBACA,oCAEA,MAUA,iCACA,OAGA,QACA,CACA,CACA,CAAG,EACH,mCACA,kBACA,4CAEA,KACA,YAGA,CAAG,EACH,+BACA,kBACA,2CAEA,KACA,kCAGA,yBACA,8BAEA,KACA,QAEA,EAAQ,IAMR,oCAEA,iCACA,sCAGA,CAEA,CAFM,CAEH,CACH,yBACA,iBACA,uCACA,CAEA,CAFM,CAEH,CACH,gBACA,iBACA,qCACA,CAEA,CAFM,CAEH,CACH,uBACA,iBACA,4CACA,CAEA,CAFM,CAEH,CACH,4BACA,iBACA,iDACA,CAEA,CAFM,CAEH,CACH,sBACA,iBACA,2CACA,CAEA,CAFM,CAEH,CACH,cACA,iBACA,mCACA,CAEA,CAFM,CAEH,CACH,+BACA,iBACA,oDACA,CAEA,CAAG,EACH,kCACA,iBACA,uDACA,CAEA,CAFM,CAEH,CACH,oBACA,iBACA,yCACA,CAEA,CAFM,CAEH,CACH,eACA,iBACA,oCACA,CAEA,CAFM,CAEH,CACH,WACA,kBACA,iCACA,CAEA,CAFM,CAEH,CACH,UACA,iBACA,+BACA,CACA,CAAG,EACH,0BACA,wBACA,sDACA,oCAGA,CAFM,CAEH,CACH,wCACA,kBACA,kCACA,CACA,CAAG,EACH,+BACA,iBACA,mCAEA,CAAG,GAEH,CACA,CAAC,GAID,aACA,gBACA,UAEA,4BACA,gBACA,uBACA,CAuJA,OArJA,MACA,kBACA,iBACA,wBAQA,CAPM,CAOH,CACH,yCACA,iBACA,6EACA,CAEA,CAAG,EACH,gBACA,iBACA,sBACA,wBAGA,CAFM,CAEH,CACH,uBACA,iBACA,sBACA,yBAEA,CAAG,EACH,4BACA,wBACA,kCACA,iBAGA,CAAG,EACH,sBACA,iBACA,YACA,kCAEA,CAAG,EACH,kBACA,kBACA,gCAKA,CAJM,CAIH,CACH,cACA,iBACA,WAGA,OADA,kGACA,gBACA,iBACA,CAAO,CACP,CACA,CAAG,EACH,qBACA,iBACA,4CAEA,CAAG,EACH,uCACA,kBACA,gCAKA,CAJM,CAIH,CACH,mCACA,iBACA,6IACA,CACA,CAAG,EACH,gCACA,iBACA,4CAEA,CAAG,EACH,+BACA,iBAGA,8DACA,CACA,CAAG,EACH,kCACA,iBACA,4CAEA,CAAG,EACH,iDACA,iBACA,6CAMA,CALM,CAKH,CACH,6DACA,iBACA,iKACA,CACA,CAAG,EACH,oBACA,iBACA,6CAEA,CAAG,EACH,YACA,iBACA,8CAEA,CAAG,EACH,eACA,uBAIA,0CAMA,cACA,CACA,CAAG,EACH,WACA,kBACA,sCACA,oCAEA,CACA,CAAG,EACH,UACA,wBACA,mBACA,oBACA,CACA,CAAG,GAEH,CACA,CAAC,GAED,aACA,gBACA,UAEA,eACA,eACA,CAuDA,OArDA,MACA,cACA,iBACA,uBAEA,CAAG,EACH,aACA,iBACA,uBAEA,CAAG,EACH,4BACA,iBACA,2BAEA,CAAG,EACH,mCACA,iBACA,oEACA,CACA,CAAG,EACH,6DACA,iBACA,+FACA,CACA,CAAG,EACH,8DACA,iBAMA,gGACA,CAEA,CAFM,CAEH,CACH,yBACA,iBACA,6CACA,4CAKA,CACA,CAAG,EACH,0BACA,iBACA,qCACA,CACA,CAAG,GAEH,CACA,CAAC,GAQD,gBAEA,aACA,gBACA,UAEA,YACA,eACA,CAgBA,OAdA,MACA,cACA,wBACA,2BACA,aAEA,CAAG,EACH,sBACA,iBACA,qBACA,oDACA,CACA,CAAG,GAEH,CACA,CAAC,GAED,gBACA,UACA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,eACA,MACA,kBACA,UAEA,iBACA,sCAEA,mBACA,GAsCA,qBAEA,iDAEA,kBACA,SACA,gBACA,WACA,MACA,aACA,WACA,IACA,UACA,WACA,EACA,uBACA,EACA,eAEA,GADA,EAEA,CACA,OACA,OAEA,QACA,CAuQA,qBACA,CACA,QACA,OACA,iCAA4E,CAC5E,SACA,CAAS,EAET,GAEA,gBACA,gCACA,aACA,MACA,IAAoB,WAAsB,EAC1C,iBACA,gBACA,cACA,KACA,CACA,4BACA,kBACA,KACA,CACA,MACA,MACA,MAEA,CACA,CACA,EAEA,IAaA,OACA,8BACA,sBACA,0BACA,kBACA,0BACA,CAAC,CAED,eACA,aACA,gBACA,sCACA,mCAEA,YACA,gBAGA,OAFA,iBACA,SACA,CACA,EAEA,yBAEA,qBAEA,0BAEA,MACA,MACA,SAEA,0BACA,mBACA,wDACA,EAEA,UAEA,sBAEA,yBAEA,OACA,SACA,UACA,EACA,GAAsB,qBACtB,UACA,qBACA,eACA,QACA,qCACA,gBACA,OAAqB,2BACrB,CACA,oCAEA,2CACA,+BACA,EACA,CAA4B,6BAC5B,EACA,CACA,CACA,QACA,EAEA,OACA,WACA,UACA,EACA,0BACA,0CACA,CACA,WACA,eAEA,KACA,EAEA,6BACA,SACA,8BACA,SACA,OACA,OACA,kBACA,KACA,CAEA,CAEA,qBACA,EACA,CACA,QACA,UACA,EAEA,qBACA,QAAY,wHAAgH,KAC5H,SACA,SACA,SAEA,eACA,MACA,sBACA,mCACA,mBAEA,EACA,KACA,OACA,OAEA,aACA,YACA,MACA,oBACA,QACA,4BACA,qBACA,wCACA,WACA,OACA,WACA,UACA,MACA,cAEA,EACA,KACA,6BACA,GACA,EApBA,QAoBA,WACA,UACA,kBACA,mBACA,UAAgB,aAAiB,KACjC,CAAgB,qBAChB,KACA,OACA,MACA,gBACA,UACA,MACA,oBAEA,IAEA,OADA,KACA,CAGA,CACA,2BACA,EACA,EACA,WACA,OACA,kBAUA,CACA,iCACA,+CACA,iBACA,iBACA,eACA,KACA,gBACA,EACA,UACA,qBAEA,eACA,KACA,gBACA,EACA,UACA,oBAEA,KA7BA,CACA,uBACA,SACA,YACA,cAEA,YACA,aAEA,CAqBA,YACA,uCACA,IAEA,OADA,gBACA,CAGA,CACA,WACA,IACA,6BACA,WACA,OACA,eACA,kBACA,eACA,kBACA,YACA,yBACA,IAEA,OADA,gBACA,CAGA,CACA,gBACA,IAAgB,mBAA+B,KAC/C,uBACA,MACA,eACA,UACA,MACA,mBAEA,IAEA,OADA,KACA,CAGA,CACA,MACA,SAEA,QADA,aACA,GACA,OACA,MACA,KACA,4BAEA,IAEA,OADA,aACA,CAGA,MACA,SACA,SACA,gBACA,aACA,MAEA,6BACA,IACA,GACA,KACA,mBAEA,aACA,GACA,SAGA,CACA,WACA,MACA,MACA,MAEA,IACA,QAGA,EAGA,OADA,MACA,CACA,EAgEA,gBACA,uBACA,EACA,KACA,IACA,KACA,0BAtBA,KACA,2BACA,IACA,UACA,qBAEA,QACA,EAeA,KACA,aACA,OASA,OARA,GACA,YAEA,OACA,aACA,2BAtBA,GACA,eACA,iCACA,SAGA,QACA,EAeA,KACA,mBAEA,CACA,CAkOA,cACA,SAiBA,OACA,gBACA,QACA,CAAS,CACT,KApBA,IACA,eACA,iBAEA,EAiBA,UAhBA,IACA,UACA,CACA,iBACA,oBACA,CAAa,GAYb,YATA,KACA,KASA,CACA,CAEA,sBAEA,iBACA,gBACA,aAEA,cACA,iCAEA,qBACA,iBACA,uBACA,SAEA,gBACA,WACA,kBACA,SAEA,cACA,WACA,eACA,YACA,mCACA,SACA,MACA,QAEA,CACA,CACA,QACA,CAEA,qCAEA,iBAEA,0BAEA,OACA,eACA,WACA,SAGA,QACA,EAEA,kBAA0C,EAC1C,uBACA,WACA,eACA,qBACA,oBACA,+BACA,eAEA,SACA,UAIA,QACA,CAwBA,eAvBA,kBACA,uBACA,WACA,eACA,qBACA,mBACA,MACA,SACA,yBACA,YACA,CAA4B,aAG5B,eAAkG,WAIlG,oBAIA,SACA,EACA,WAEA,qBAAgC,6BAAwC,QACxE,EACA,EACA,OACA,IACA,EACA,GACA,EACA,QACA,YACA,EACA,KACA,EAEA,eACA,kBACA,gDACA,OAEA,KACA,QAEA,KACA,gBAEA,MACA,mCAA+C,EAAO,MAEtD,KACA,gBAEA,oCACA,CAEA,mBACA,SACA,gBACA,YACA,eACA,CACA,OACA,eACA,aACA,SACA,2BACA,CACA,EAEA,WACA,EACA,KACA,SACA,KACA,WACA,eACA,QACA,EAEA,eACA,aACA,OACA,OACA,aACA,aACA,WACA,YAEA,mBACA,aACA,WACA,OACA,QACA,MACA,EAEA,mBACA,gBACA,kBACA,SACA,SACA,+BACA,MAEA,GAFqB,GAErB,OACA,OACA,OACA,OACA,EAEA,OACA,CACA,OACA,MACA,CACA,CAEA,oBACA,aAGA,gBACA,QAEA,0BACA,GAEA,iCACA,GAKA,oCAEA,QACA,gBACA,0BACA,mBACA,EA03BA,gBAA2B,EAC3B,MAAyB,QAAY,GACrC,EAAoB,QAAY,GAChC,MAAyC,UAAc,EACvD,WACA,gBACA,6BACA,eACA,gBACA,sBACA,WACA,cACA,cAAuB,CACvB,gBAAyB,CACzB,SAAkB,CAClB,iCACA,OACA,gBACK,CACL,YACA,YACA,YA94BA,IAAqC,IACrC,IAmCA,EAnCA,GACA,MACA,MAEA,GACA,cACA,WACA,6BACA,gBACA,eACA,gBACA,sBACA,WACA,gBAAyB,CACzB,cAAuB,CACvB,SAAkB,EAElB,KACA,qCACA,iCAEA,qBACA,GACA,KACA,GACA,UACA,SACA,QACA,EACA,GACA,cACA,gBACA,cACA,aACA,EAEA,IACA,GACA,WACA,eACA,iBACA,gBACA,WACA,SACA,EACA,GACA,YACA,WACA,UACA,EACA,iDACA,YACA,sBACA,yBACA,SACA,gBACA,iBACA,EACA,YACA,iBACA,iBACA,sBACA,eACA,eACA,cACA,SACA,CAAiB,CAEjB,CACA,EACA,qBACA,cACA,cACA,CAAS,EAmCT,UACA,gBACA,cACA,gBACS,CACT,EACA,cACA,aACA,MACA,0BACA,OACA,qBACA,EACA,oBACA,QACA,YACA,CACA,EACA,gBACA,SACA,KACA,GACA,MACA,EACA,UACA,YACA,YACA,yBACA,iBAEA,mBACA,qBACA,EACA,mBACA,sBACA,4BACA,EACA,GACA,eACA,MACA,CACA,MACA,2BACA,IACA,uBACA,gCACA,EACA,GACA,iBACA,MAEA,CAEA,OADA,sBACA,MACA,EACA,cACA,oBACA,aACA,MACA,cAYA,GAXA,gBACA,kBACA,eAGA,gBACA,OACA,EACA,gBACA,eAEA,gBACA,OACA,GACA,OACA,KACA,oBAAgE,GAAU,EAAI,CAC9E,gBACA,MACA,EACA,GACA,KACA,MAEA,eACA,CACA,KACA,EACA,+FACA,YACA,WAAgB,GAAS,UACzB,KACA,gBACA,YACA,GACA,gBACA,aACA,MAGA,WAEA,QACA,EACA,gBACA,QACA,CAAK,IACL,gBACA,WACA,MACA,OAAwB,QAAoB,EAC5C,MACA,0BACA,mDACA,eACA,WACA,GACA,KAGA,IACA,aACA,EACA,qBACA,6BACA,mBACA,CACA,GACA,eACA,CACA,CACA,cACA,EAYA,0BACA,aACA,mBACA,WACA,EACA,KACA,EACA,KACA,CAAwB,OACxB,EACK,MAEL,YAAoD,IACpD,aACA,IACA,MACA,WACA,IACA,YACA,eACA,EACA,eACA,GACA,EACA,UACA,8DAEA,OACA,SACA,gBACA,oDACA,4BACA,yBACA,cACA,WACA,wBAGA,yCAGA,SACA,gBAGA,cACA,YACA,eACA,OACA,QAAsC,KAAgB,CAC7B,GAIzB,CACA,gCACA,sCACA,uBACA,EACA,aACA,gBACA,WACA,KAAiC,EAAK,GAAG,EAAS,EAClD,QACA,kBACA,OACA,YACA,KAEA,UADA,SAEA,CACA,EACA,YAA+C,IAC/C,aACA,iBACA,OACA,SACA,GACA,cACA,OACA,QAA0B,KAAgB,CAC7B,EACb,4BACA,eACA,cACA,OACA,oBACA,eACA,CAAiB,GAIjB,eAEA,UADA,UAGA,sBAA0D,KAAe,EACzE,eACA,OACA,QAAsB,KAAgB,CAC7B,EACT,YACA,EACA,aACA,eACA,SACA,KACA,SAEA,UACA,EACA,EACA,MAJA,qBAKA,wCACA,aACA,aACA,gBACA,YACA,6CACA,WACA,SACA,GACA,4BACA,SAEA,eACA,iBAEA,kBACA,WAOA,GANA,GACA,eACA,OACA,YACA,QAA8B,KAAgB,CAC7B,EACjB,EAEA,OADA,eACA,GACA,mBAA2C,UAAuB,EAAe,EAIjF,GAFA,qBAA8D,KAAe,EAC7E,MACA,YACA,WAAwB,GAAS,aACjC,mBACA,oBACA,UACA,SACA,MACA,MAEA,kDACA,GACA,UACA,gBAEA,EACA,KAEA,WACA,oBAIA,IACA,WACA,cACA,WAEA,CACA,EACA,eAA6C,QAC7C,EACA,EACA,WAEA,GADA,MACA,YACA,wBACA,OACA,IACA,mBACA,CACA,MACA,EAKA,CAJA,sCACA,aACA,yBAA4E,OAAqB,EACjG,CAAa,qBACb,gBAGA,gBAcA,OAZA,cACA,UACA,yBACA,GACA,MAAoB,EAAM,CAC1B,2BAA+C,GAAU,EAAI,CAC7D,gBACA,eACA,CAAS,EACT,eACA,IACA,qCACA,CACA,EACA,OACA,OACA,KACA,eACA,EACA,YACA,EACA,KACA,OACA,gBACA,EACA,YACA,6BACA,kCACA,sCACA,wBACA,EAAK,CAQL,aACA,cAA0C,MAAQ,SAAU,KAC5D,cACA,KACA,KACA,CAAS,EACT,cACA,OACA,gBACA,UACA,CAAS,EACT,uCACA,EAMA,UAA0C,IAC1C,4BACA,kBACA,kBACA,cACA,OACA,QAEA,2BACA,gCACA,oCACA,oBACA,oBACA,OAEA,eACA,QAAsB,KAAgB,CAC7B,EACT,cACA,KACA,eAAwC,CAAI,cAA5C,EAAkE,CACzD,EACT,kBACA,EACA,UAAwC,IACxC,aACA,gBAoBA,OAnBA,OACA,QAA2B,CAC3B,IACA,iBAAqD,KAAO,QAAQ,CACpE,OACA,SACA,KACa,CACJ,EACT,eACA,YACA,eAEA,EACA,GACA,iBACA,OACA,iBACA,gBACA,CACA,MAAsC,qBAA6B,EAAI,CACvE,iBACA,CACA,sBACA,cACA,cACA,0BACA,0BACA,qBACA,EACA,EAAoB,CACpB,OACA,YACA,UACA,QACA,MACA,QACA,SACA,kBACA,oBACA,kDAGA,QACA,gBACA,GACA,iBACA,gBAGA,OACA,IACA,QACA,KACA,CACA,SACA,aACA,KACA,yBAA0F,KAC1F,CACA,KAA2C,mBAA2B,EAEtE,CAAoC,MAAe,CAEnD,CAAqB,EACrB,iBACA,KAEA,YAAiD,EACjD,IACA,gBAEA,0CACA,2BACA,gBAEA,CAAa,CAEb,EACA,2BACA,iCACA,oBACA,IACA,qCACA,wBAEA,WAIA,GAHA,cACA,eACA,CAAS,EACT,YACA,WAAoB,YAAiB,SACrC,YACA,GACA,MAEA,YAEA,mBACA,aACA,cACA,SAA0B,CACb,EACb,eAGA,GACA,SAAkC,YAAsB,IAExD,KACA,gBAEA,cACA,eACA,gBACA,+BACA,4BACA,gBACS,CACT,EA0BA,UAAqD,IACrD,WACA,OACA,WACA,EACA,EAIA,GAHA,qBACA,MAEA,eACA,wBACA,qBACA,mBACA,cACA,iBAGA,CACA,WACA,sBACA,aACA,YACA,+BACA,aACA,SACA,SACA,wBACA,MACA,UACA,KACA,CACA,CACA,CACA,CAEA,IACA,CACA,qBACA,oBACA,KACA,GACA,KACA,cACA,QAA0B,KAAW,CACxB,EACb,eACA,QAA0B,KAAW,CACxB,CACb,CACA,GACA,cACA,gBACA,cACA,cACA,YACA,QACA,EACA,aACA,oCACA,6BACA,cACA,8BACA,cACA,EACA,oBACA,UACA,wBACA,UACA,iCACA,cAEA,8BACA,cACA,uBACA,QACA,EAAwB,CACxB,4BACA,gBACA,EAAoB,CACpB,+BAAwE,CACxE,gBACA,qBACA,CAAS,CACT,EACA,kBACA,KACA,KA2BA,OACA,SACA,YACA,cACA,iBACA,gBACA,YACA,iBACA,aACA,aACA,eACA,iBA7iBA,KACA,wBACA,YACA,IACA,WACA,2BACA,gBACA,KACA,CACA,iBACA,EAoiBA,kBArtBA,yBACA,SAEA,GADA,YACA,0BACA,6BACA,YACA,CACA,MACA,8BACA,oCACA,oBACA,cACA,CACA,oBACA,GACA,qCACA,2CACA,0BACA,CACA,eACA,wBAEA,cACA,OACA,gBACA,0BACA,gBACA,kBACa,CACb,MAEA,QAEA,EAqrBA,eAzhBA,uDA0hBA,UACA,oBAtBA,wBACA,2BACA,qBACA,cACA,YACA,CAAa,CACb,CAAS,EAiBT,iBA7BA,IACA,GACA,KACA,KAEA,EAyBA,YACA,kBACA,cACA,QACA,CAAa,CACb,kBACA,QACA,CAAa,CACb,aACA,QACA,CAAa,CACb,kBACA,OACA,CAAa,CACb,qBACA,QACA,CAAa,CACb,aACA,QACA,CAAa,CACb,kBACA,OACA,CAAa,CACb,iBACA,QACA,CAAa,CACb,sBACA,OACA,CAAa,CACb,eACA,QACA,CAAa,CACb,oBACA,GACA,KACA,QACA,CACA,CAAa,CACJ,CACT,WACA,YACA,gBACA,MA7VA,YACA,oBACA,yBACA,CAAS,EACT,WA0VA,YACA,aACA,SACA,WAzMA,OAA0C,IAC1C,SACA,kBACA,cAGA,qBACA,uBAEA,eACA,qBAEA,cACA,mBACA,yBACA,aACA,MAEA,eACA,cACA,gBAEA,cAAmC,KAAe,EAElD,EAkLA,YAtXA,IACA,GACA,+BACA,cACA,oBAAiD,CACxC,CACT,EAiXA,cACA,YACA,SA7FA,OAAwC,IACxC,aACA,UACA,MACA,aACA,UACA,MACA,UACA,UACA,2BAEA,CACA,EAkFA,gBACA,CACA,EAoDA,aAAgF,MAAc,GAC9F,WACA,GAEA,wBA+BA,OA9BA,aACA,SAxpEA,GACA,MAAmB,QAAY,GAC/B,aACI,WAAe,MACnB,mBACA,mBACA,6BACA,mBACA,CAAa,EACb,WACA,kBACA,CACA,CAAK,cACL,EA2oEA,CACA,0BACA,SACA,8CACA,GAAkC,gBAAuB,CAEzD,CAAS,CACJ,EACD,WAAe,MACnB,mCACA,2CACA,oBAGA,uBAEA,CAAK,eAC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AmD,IADvB,GAE5B,aAD0D,SAC1D,0BAAkE,CAAgB,EAClF,IACI,EAAQ,OAFsE,KAEtE,sGACZ,aACU,EAAQ,KACR,EAAQ,IAAwB,CADxB,CACgC,MAAhC,MAAgC,mBAClD,iCAEA,OAAsC,KAItC,OAHA,MACA,UACA,WACA,CACA,CACA,uBAAgC,EAAQ,6IACxC,OACA,GAAO,GAAW,CAClB,gBADkB,EAClB,CACA,MAEA,CACA,cACA,YACA,CAAI,EACJ,6BACA,EAAe,EAAQ,0BACvB,0CACA,4DAA2F,EAAkB,QAC7G,QAD6G,GAC7G,uCACA,QACA,sDACA,MAAoB,cAAQ,IAC5B,UACA,cAA+B,MAAU,EAAE,EAAS,GACpD,WACA,EAAoB,YAAM,KACxB,eAAS,MACX,IACA,WACA,gBACA,CAAM,CACN,cACA,OACA,MACQ,EAAa,eACrB,eACA,CAAS,EAED,EAAc,SACtB,GADsB,MACtB,MACA,CAAS,GAGT,wBACA,KAEA,WACA,eACA,EAGA,OAFA,cACA,oBACA,KACA,aACA,wCACA,+CACA,CACA,CAAG,QACD,eAAS,MACX,cACA,IAEA,CAAG,UACH,cAIA,GAHA,MACA,SACA,UACA,GACA,OADA,QAEA,uBACA,MACM,EAAa,mBAEb,EAAc,aAEjB,CACH,6EO1FA,oBAIA,MAHA,0BACA,EAAS,cAAgB,gCAAsC,cAAkB,EACjF,cAAwB,wEACxB,IACA,EAEO,gBACP,kCACA,kFAEA,aAAkB,mBADlB,OAEA,qEACA,CAEO,iBAQP,OAPA,6BACA,iCAA+C,IAAO,IAEtD,aADA,eACA,uDAEA,QACA,GACA,qBACA,EAEO,gBACP,SACA,0EACA,YACA,4DACA,8CAA2D,WAAc,IACzE,uEACA,kBAEA,QACA,CAiKO,kBACP,mDAA2E,IAAO,KAClF,YACA,yCACA,WAGA,iDACA,CArEO,cA2GP,cAoEA,mGCvUA,MAAe,CACf,WACA,+BACA,cACA,cACA,sBACA,aACA,0BACA,iBACA,yBACA,cACA,aACA,aACA,YACA,gBACA,eACA,oBACA,aACA,eACA,WACA,sBACA,gBACA,4BACA,cACA,gBACA,aACA,kBACA,cACA,aACA,aACA,WACA,yBACA,aACA,uBACA,aACA,sCACA,YACA,aACA,YACA,mBACA,cACA,aACA,YACA,YACA,6BACA,uCACA,8BACA,WACA,iBACA,mBACA,kBACA,WACA,cACA,WACA,cACA,gBACA,UACA,gBACA,gBACA,sBACA,YACA,oBACA,aACA,cACA,aACA,cACA,wBACA,aACA,aACA,aACA,WACA,oBACA,aACA,WACA,cACA,aACA,UACA,sBACA,oCACA,mBACA,YACA,WACA,oBACA,aACA,aACA,mBACA,cACA,WACA,eACA,eACA,YACA,YACA,gBACA,uBACA,YACA,kDACA,eACA,UACA,mBACA,YACA,eACA,uCACA,cACA,aACA,WACA,aACA,eACA,aACA,YACA,iBACA,WACA,oCACA,UACA,UACA,aACA,WACA,YACA,aACA,YACA,WACA,WACA,gBACA,cACA,cACA,aACA,2BACA,iBACA,iBACA,YACA,oBACA,gBACA,UACA,aACA,iBACA,mBACA,eACA,aACA,aACA,eACA,gBACA,YACA,WACA,aACA,YACA,aACA,gBACA,gCACA,gBACA,sBACA,qBACA,UACA,aACA,cACA,WACA,8BACA,gBACA,gBACA,gBACA,WACA,eACA,cACA,YACA,YACA,cACA,gBACA,aACA,mBACA,WACA,oBACA,aACA,eACA,iBACA,YACA,WACA,WACA,UACA,iBACA,UACA,mBACA,YACA,UACA,sBACA,sBACA,iBACA,cACA,YACA,+BACA,cACA,iBACA,eACA,cACA,WACA,cACA,WACA,aACA,aACA,YACA,YACA,YACA,kBACA,qBACA,gBACA,WACA,YACA,eACA,kBACA,cACA,4BACA,cACA,kBACA,gBACA,aACA,aACA,cACA,iBACA,2BACA,iBACA,kBACA,WACA,eACA,sBACA,8BACA,UACA,iCACA,UACA,cACA,gBACA,aACA,iBACA,kBACA,aACA,WACA,YACA,yBACA,YACA,YACA,cACA,aACA,YACA,0CACA,mBACA,aACA,gBACA,mCACA,sCACA,eACA,6BAC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gCAC/D,0BACA,uCACA,qBACA,UACA,CAAG,EAYH,GAVA,KACA,iBAGA,0BACM,gDACN,0DAsCA,EAlCA,EAmCS,QAAW,4BAlCpB,QAEA,CC9EA,CD8EE,GC9EF,iBAFqB,EAGrB,cACI,SARK,CAAe,IAA0B,qBAA0C,YAQzE,IARyE,KAApE,+BAAoE,EAQzE,OACnB,CA2KA,OAhLqB,EAOP,EACd,YACA,WAT8D,IAS9D,GAOA,GANA,eACA,MACA,gBACO,EACP,qBAEA,wBACA,oEAGA,sBACA,aACA,iBAEA,KACA,OACA,OACA,qBACA,EAKA,gBACA,0CAGA,aACA,KAGA,CACA,CACA,CAAG,EACH,mBACA,kBACA,oBACA,CACA,CAAG,EACH,iBACA,iBACA,kBACA,CACA,CAAG,EACH,iBACA,iBACA,2CAEA,CAAG,EACH,mBACA,kBACA,MACA,mCAGA,iBAEA,OACA,aACA,gEAGA,mFACA,MACA,CAEA,WACA,qBACA,4BAEA,UACA,UACA,GACA,qBAGA,mBACA,MACA,gBACA,YACW,EACX,KAEA,SACA,yBACA,+DAOA,GAJA,GACA,qBAGA,0CACA,yEAGA,IACA,EADA,kBACA,SAEA,0CACA,kBACA,qCACA,OACA,MACA,CAAW,EACX,KAEA,SACA,yBACA,gEAQA,GALA,GACA,qBAIA,6BAIA,2BACA,mCAEA,6DAIA,mEACA,kCACA,KAEA,SACA,GACA,qBAGA,mBACA,WACA,CAAW,EACX,KAEA,SACA,+BACA,6DAGA,kBACA,qCACA,QACA,cAqBA,GAIA,IAHA,SACA,IAEA,aACA,eACA,yBACA,+DAOA,IAJA,6BACA,yBACA,IAEA,MACA,+BACA,GAEA,EAAM,IACN,YAGA,IACA,CAEA,QACA,EA/CA,EACA,CAAW,EACX,KAIA,SACA,2CACA,CAEA,GACA,oBAEA,CACA,CAAG,EA9K2E,SAFpD,KAAkB,YAAgB,WAAkB,KAAO,aAA2B,GAAtF,OAAsF,kBAAwD,kBAAgC,6BAAuD,mCASjP,EAPiF,aAAmG,U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,EAWA,iCAEA,GACA,uCAEA,CAGA,yEACA,CAEA,4BAEA,CAAG,EACH,YACA,iBACA,WAuCA,OArCA,eAAuB,EAAc,CACrC,WADqC,KACrC,YAMA,WACA,CAAS,CACT,kCACA,oCAEA,oDAEA,wCACA,CACA,CAAO,EACP,mBAA2B,EAAkB,CAC7C,eAD6C,CAC7C,CACA,uBACO,EACP,gBAAwB,GAAe,CACvC,WADuC,IACvC,oBACA,2CACA,uBACA,iBACA,6CACA,gCAEA,mDACA,CACA,CAAO,EACP,kBACA,4BACA,mCACA,CAAO,EACP,wBACA,KAQA,CAAG,EACH,sBACA,iBACA,+BACA,CAQA,CAAG,EACH,qBACA,iBASA,0BACA,8BAIA,CAFM,CAEH,CACH,4BACA,iBACA,4BACA,CAQA,CAAG,EACH,iBACA,iBAGA,GAFA,kBAGA,CAHsC,MAGtC,kBAEA,CAOA,CAAG,EACH,kBACA,iBAYA,OAXA,mBAaA,CAAG,EACH,kCACA,iBAiBA,6DACA,0BAEA,CAEA,CAFM,CAEH,CACH,oBACA,kBACA,WAEA,2BACA,MAMA,gCANA,EAQA,EAIA,EAIA,2BAHA,EAJA,4DARA,oEACA,WACA,CAAW,GAcX,CAEA,QACA,CACA,CAAG,EACH,8CACA,iBACA,iBACA,8BACA,iDACA,mBACA,IACA,OAMA,OAJA,GACA,QAGA,CACA,CACA,CAAG,EACH,4BACA,iBACA,uDACA,0GACA,CACA,CAAG,EACH,8BACA,iBACA,mCAEA,KACA,2BNjUO,CMiUkC,GAEzC,CACA,CAAG,EACH,UAJ0D,0BAK1D,iBACA,6BACA,iDACA,oBACA,CAIA,CAJM,CAIH,CACH,0BACA,iBACA,sBAA4B,QAAuB,wEACnD,oDACA,mCACA,uBACO,EACP,CAoBA,CAAG,EACH,qBACA,iBACA,iBACA,WACA,gBACA,YACA,8BAEA,CAF8E,EAE9E,GAIA,iCACA,EACA,QAEA,MAGA,QAEA,UADA,yCACA,EAGA,CAQA,CAAG,EACH,gBACA,iBACA,iBAC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,oCACA,WAKA,IAGA,EAFA,WACA,QACA,OACQ,GAAqD,IAAjC,GAAiC,gBAU7D,OAEA,OAZ6D,GAe7D,WAOA,IACA,QACA,UACA,YACA,iBACA,8BAGA,YACA,UACA,CAAK,EAML,0BAGA,MAFA,YAEA,OAGA,OACA,WAEA,CAIA,cACA,UACA,OACA,CACA,EE9eoD,GACpD,kBACA,UACA,mBACA,iBACA,8BACA,yBACA,mCACA,WACA,CAAa,CACb,CAAW,CACX,YACA,gBACA,iBACA,6BACA,UACA,CAAS,EACT,gBACA,YACA,UACA,GACA,cACA,QACA,SACA,EAGA,OAAmD,GAA0B,QAC7E,eAD6E,eAC7E,SAEA,QAUA,4BAEA,qBAGA,aAKA,WACA,WACA,CAAO,CACP,CAAK,EAED,GAAe,wBACnB,SADmB,QACnB,EACA,YACA,CAAO,CACP,CAAK,EAED,GAAe,uBACnB,UADmB,OACnB,EACA,YACA,CAAO,CACP,CAAK,EACD,GAAe,wBACnB,SADmB,CACnB,GACA,sBACA,GACA,IAEA,CAAK,EACD,GAAe,uBACnB,UADmB,GACnB,QACA,YACA,GACA,IAEA,CAAK,EACD,GAAe,+BACnB,EADmB,QACnB,GAEA,iCACA,MACA,gBACA,GACA,IAEA,CACA,CAAK,EACD,GAAe,8BACnB,GADmB,MACnB,GAEA,iCACA,MACA,eACA,GACA,IAEA,CACA,CAAK,EACL,WAAkC,WAAe,GACjD,IFhNO,EAQP,EAPA,EACA,EACA,EACA,EACA,EACA,EACA,EETA,IA2BA,EAuLA,UACA,UAEA,GADA,SACA,iBACA,2BACA,qCACA,uBACA,aACA,UACA,mBACA,cAGA,GACA,mCACA,WAOA,GACM,GAAkB,GAIxB,EAAiB,GAAqB,KACtC,EALwB,EAKxB,IFhJ0B,KE+IY,CACA,EACtC,EADsB,CACtB,YAAwB,GAA0B,SAClD,OF7OA,GADO,EE8O2C,CAClD,CAFkD,KAElD,EACA,IAF6B,QAE7B,EACA,WAHkD,IAGlD,EACA,YACA,aAA+B,QAAY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,GAAQ,CACpG,yBADoG,KACpG,OACA,uBACO,IACP,QACA,UACA,8BACA,4BACA,0BACA,0BACA,0BACA,+BACO,GAAiB,eAAmB,CAvB3C,EAAwC,GAAa,GAuBO,GAAQ,CAvBlB,GAAa,CAwB/D,iBACA,IAFoE,CAEpE,MACA,cACA,CAAO,MACP,iFACA,0BACA,mCACA,OACA,WACA,UACA,YACA,uBACA,qBACA,mBACA,WACA,WACA,iBACA,UAAmB,EAAU,6CAC7B,CAAO,GACP,CACA,CAAG,EAlckB,EAkclB,EACH,WAnc8D,oBAoc9D,MAMA,cACA,OAAa,GAAa,CAE1B,OACA,CAAO,CD7cQ,gBACf,KCyc0B,CDzc1B,WACA,cACA,mBACA,UACA,UACA,kBACA,qCACA,uBACA,mBACA,UACA,UACA,cACA,UACA,4BACA,gCACA,cACA,OAAW,GAAqB,QAA+B,MAAiB,EAChF,EADgC,YAChC,EACA,oCACA,UACA,CAAK,EACL,EAaA,SACA,OACA,eACA,aACA,gBACA,CAAO,EACP,aACA,UACA,mCACA,8BACA,EAeA,UACA,UAA6D,GAA2B,KACxF,EAEA,IAKA,UACA,GATwF,GASxF,OACA,gBACA,CAAK,EAGL,QACA,YACA,OACA,UAMA,eACA,aACA,gBACA,CAAS,EAET,YACA,CAEA,CAaA,uBAGA,MAIA,GACQ,GAAkB,GAE1B,EDrBS,ECqB2B,GDrBV,GCqBU,EAFV,CAG1B,CADoB,GATpB,CDZ0B,CCa1B,EA+CA,EAtCA,EAA+B,GAAqB,IACpD,cADoD,CAIpD,8BACA,cAGA,GAAwB,GAA8B,GACtD,eACA,SAFsD,CAEtD,EACA,UACA,EAAS,IAkBT,GACA,cAAiC,GAAiC,OAClE,KAKA,CAyBA,OAvBA,EAGA,IACA,IAZkE,GAYlE,EAAmI,GAA0B,QAE7J,GACA,MAGA,GACA,GAP6J,yBAO7J,MACA,GAMA,GACA,mCACA,8BACA,EAEA,QAAyC,MAA6C,EACtF,eACA,cACA,QACA,gBACA,CAAO,EACP,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A,KAKA,YAAkB,WAAsB,IAExC,GADA,WACA,aACA,cACA,KACA,CASA,OAJA,cACA,8BAGA,MAWA,6BACA,oCAKA,QAHA,4BACA,yBAEA,IAAkB,mBAAsB,IACxC,oBAGA,MACA,aACA,uBAA4C,IAAS,IACrD,kBAEA,CAEA,aAIA,0CAUA,kCAEA,OADA,oCACA,4BAWA,qCACA,kCCvKO,MACP,yBACA,KAEA,2BACA,OAGA,0BCPO,mBACP,wBACA,qBACA,YAEA,GACK,EAAI,CACT,CAEA,MAA2B,EAAU,WACrC,CADqC,CACR,EAAU,aAChC,gBACP,mBACA,sBAAmD,GACnD,WAD6D,KAC7D,QAAuD,KAGvD,SAHiE,KAGjE,CAA2B,EAAU,gBAAiB,GACtD,WADgE,KAChE,CAA6B,EAAU,kBAAmB,GAE1D,CEjBO,UFe6D,MEf7D,MACP,mBACA,SACA,mBACA,eACA,0BACA,CACA,CACO,gBAAwB,EAO/B,KAPsC,OAOtC,GACA,QACA,iBACQ,EAAqB,QAC7B,WAD6B,CAE7B,mBACA,qBAWA,eAEA,OADA,yCACA,IACA,CAIA,OAGA,OAFA,0BACA,cACA,KAKA,QAKA,MAJA,0DACA,eACA,gBAEA,KAOA,QACA,0BACA,aAKA,CAMA,SACA,uBACA,iBACA,0BACA,CAOA,UACA,MAAuB,EAAY,0BACnC,gBACA,CAMA,YACA,8BACA,CAMA,WACA,yBACA,6BACA,CAMA,UACA,gBAAgC,EAChC,SACA,MACA,iBACA,aACA,eACA,cACA,CACA,YACA,yBACA,sCACA,CACA,eACA,gBACA,iDACA,gDACA,mBAGA,EAEA,CACA,UACA,MDjIO,SAAe,GACtB,ECgImC,EDhInC,KACA,EAFsB,EAEtB,WACA,sBACA,UACA,SACA,uDAGA,QACA,ECuHmC,GACnC,wBACA,CACA,CC1IA,mFAAqG,CAAN,CAAM,GACrG,UAQO,SAAS,EAAM,GACtB,OADsB,EAEtB,GACA,MAZqG,GAY9D,CAAN,EACjC,UADuC,EACvC,GAbqG,IAatE,MACzB,KACN,CAFqC,MAErC,CACA,CAqBO,aACP,MAAgB,EAAM,kBACtB,MACA,UACA,MAAuB,EAAM,IAC7B,CAIA,KAL6B,EAzCwE,EA8C1F,CAAQ,IACnB,UChDA,SACA,IACA,sCACA,sCACA,CACA,SAGA,CACO,QCPA,cACP,gBAEA,IACA,4CAAkE,EAAO,CACzE,yBAEA,CACA,UACA,MACA,IACA,WAAuB,CAAU,4DACjC,CACA,UAEA,CCXA,cACA,MAIA,MAHA,IAAoB,EAAc,SAClC,EACA,CAAK,EACL,mBAEO,UAAsB,EAO7B,OAPsC,KAOtC,GAGA,GAFA,SACA,gBACA,8BACA,mCACA,gBAEA,GACA,iBAEA,QACA,8BACA,gCACA,WAKA,uBACA,0BACA,2BACA,kBAA6B,GDvBtB,CCuBqC,CAE5C,CACA,SAH4C,CAG5C,CACA,eACA,CAOA,SACA,WACA,CAOA,SACA,0BACA,WACA,yBACA,GACA,EACA,iCACA,OACA,gBACA,IACA,oCACA,QACA,CAAiB,GAEjB,gBACA,IACA,6BACA,QACA,CAAiB,EAEjB,MAEA,GAEA,CAMA,OACA,gBACA,cACA,yBACA,CAMA,UAeQ,EAAa,kCAdrB,IAMA,GAJA,8CACA,cAGA,iBAEA,OADA,cAA+B,6CAA+C,EAC9E,GAGA,gBACA,GAIA,6BAEA,gBACA,kCACA,0BACA,YAKA,CAMA,UACA,WACA,aAA0B,aAAe,EACzC,CACA,0BACA,IAKA,mBAEA,CAOA,SACA,iBACQ,EAAa,MACrB,KADqB,OACrB,QACA,iBACA,0BACA,CAAa,CACb,CAAS,CACT,CAMA,MACA,sCACA,iBAQA,MANA,kCACA,6BAA8C,GAAK,MAEnD,wBACA,UAEA,mBACA,CAOA,YAAqB,EAErB,OADA,iBAA8B,oCAAwC,YACtE,mBACA,CAQA,aACA,oBACA,cACA,MACA,CAAS,EACT,kBACA,qBACA,kCACA,CAAS,CACT,CAMA,SACA,qBACA,oCACA,qBACA,kCACA,CAAS,EACT,cACA,CACA,CACO,gBAAsB,EAO7B,KAPoC,OAOpC,KACA,QACQ,EAAqB,QAC7B,WAD6B,CAE7B,4BACA,WACA,sCACA,aACA,CAMA,SACA,MACA,MAAqB,EAAI,kGACzB,0BACA,mBAAoC,EAAc,GAClD,IACA,gCACA,IACA,0BAEA,aADA,qDACA,uBACA,0CACA,+CAIA,CACA,UACA,wBACA,IACA,8CAAqE,eACrE,CACA,UAEA,IACA,kCACA,CACA,UACA,4DAEA,uBACA,8CAEA,0BACA,qCAEA,0BACA,KACA,mBACA,gEAEA,mBAEA,gCACA,cAKA,uBACA,kDACA,CAAqB,IAErB,EACA,iBACA,CACA,SAIA,uBACA,eACA,CAAa,IACb,MACA,CACA,+BACA,6BACA,4BAEA,CAMA,WACA,sCACA,gBACA,CAMA,WACA,uCAIA,GADA,8BACA,EACA,IACA,gBACA,CACA,UAEA,8BACA,8BAEA,cACA,CAMA,SACA,mCACA,IACA,4BACA,6BACA,eAEA,CAMA,QACA,cACA,CACA,CAmBA,aACA,wBACA,8BACA,qBAGA,CAxBA,kBACA,cAMA,+BAEA,+BAEA,0BAEA,qCAEA,iBADiC,eAAgB,EAAU,oBAC3D,OC3XO,MACP,+DAEA,6BAGA,cAGO,EAAkB,EAAU,WAAc,CAAd,CAAwB,4BCJ3D,qCACA,oCACA,+CACO,iBAAiB,EAOxB,OAPiC,KAOjC,GACA,SACA,kCACA,CACA,WACA,iBACA,CACA,SACA,iBAEA,OAEA,iBACA,sBAEA,IACA,GACc,EAAI,gMAClB,yBACA,mCAEA,IACA,QACgB,EAIhB,IAA0B,EAAS,OAHnC,EACA,IAFqC,EAEE,KACvC,EADuC,EACT,EAAS,EAEvC,CACA,IAHuC,EAGvC,GACA,mCACA,CACA,0CACA,wBACA,CAMA,oBACA,oBACA,qBACA,wBAEA,aACA,EACA,iCACA,0CACA,SACA,CAAS,EACT,yCACA,oDACA,CACA,SACA,iBAGA,YAAwB,WAAoB,KAC5C,WACA,iBACY,EAAY,0BAmBxB,IAGA,eAKA,CACA,SACA,CACA,GAGoB,EAAQ,KAC5B,CAD4B,GAC5B,aACA,0BACA,CAAqB,mBAErB,CAAa,CACb,CACA,CACA,UACA,mBACA,gBACA,aAEA,CAMA,MACA,kCACA,iBASA,OAPA,6BACA,6BAA8C,GAAK,MAGnD,iBACA,UAEA,mBACA,CAOA,QACA,QAAiB,CACjB,CACA,CCpJO,MDkJmB,WClJF,EACxB,OADiC,GACjC,CACA,oBACA,CACA,SAEA,kCAIA,+FACA,sBACA,UACA,cACA,CAAS,EACT,UACA,oCACA,CAAS,EAET,+BACA,oDACA,MAAsC,SZ8D/B,KACP,GACA,QYhE+D,UZgE/D,EAEA,SACA,IACA,KACA,KACA,4BACA,eAEA,IADA,YACA,CACA,UACA,UACA,MAEA,aACA,kBAGA,EADA,CADA,YACA,IACA,EAEA,QACA,EAGA,CAEA,MACA,UACA,UACA,MAEA,aACA,4DACA,GACA,MACA,UACA,UACA,MAEA,aACA,+CACA,iBACA,cAEA,UAA2C,GAC3C,KACA,CACA,GAHuD,WAGvD,iBACA,GACA,KACA,CACA,UACA,MAEA,aACA,UAAuC,EAAY,oBACnD,GACA,CACA,eACA,UAAuC,GACvC,KACA,CACA,CACA,CAAS,CAJ0C,CAMnD,EYjI+D,gDAC/D,wCACA,EZMA,cYNsC,MZMtC,CACA,kBYP+D,Cf0BxD,IGlByB,QAEhC,EADA,eAGA,SAEA,aADA,sBACA,2BAEA,YAEA,oBADA,qBACA,QACA,kBACA,gBACA,KACA,CAEA,oBADA,qBACA,QACA,kBACA,2BACA,CAEA,iCACA,YAEA,aACA,YACA,CAAa,CHPb,GGnBgC,EHmBhC,qBGnBgC,EHoBhC,mCAEA,GACA,CGvBgC,EHuBhC,+BGvBgC,EHuBhC,OACA,IGxBgC,EHwBhC,OAEA,EG1BgC,EH0BhC,OACA,GACA,oBAEA,cACA,CAAK,CGJL,CACA,CAAK,EYnCL,8BACA,mCACA,WACA,EACA,OACA,YAAiC,UAAa,IAC9C,IAGA,iBACA,IACA,CAAqB,EACrB,UACA,CAAqB,CACrB,EACA,IACA,OAAiC,YACjC,iBACA,UAAoC,SAAS,eAAe,GAAE,EAE9D,4CACA,CAAa,CACb,CAAS,EACT,CACA,SACA,iBACA,YAAwB,WAAoB,KAC5C,WACA,iBACA,+BACA,GACoB,EAAQ,KAC5B,CAD4B,GAC5B,aACA,0BACA,CAAqB,mBAErB,CAAa,CACb,CACA,CACA,UACA,KACA,iDACA,CACA,CCnEO,QACP,UAAe,EAAE,aACC,EAAE,CACpB,QAAa,CACb,ECYA,IDboB,2GCamG,IAAI,GAAG,IAAI,SAAS,IAAI,kHAC/I,IACA,iIACA,CACO,eACP,gBACA,oBAEA,yCACA,eACA,oDAAwE,4BAExE,yBAAwC,MACxC,UACA,kBAUA,OARA,eACA,WACA,qDAAwE,QACxE,kEAAkF,QAClF,cAEA,qBAIA,KACA,IAAyB,YAAzB,IAAqB,IAAI,mBAOzB,MANA,mCACA,cAEA,kBACA,uBAEA,CACA,EAbA,UACA,WAaA,cACA,SAMA,OALA,sDACA,GACA,QAEA,CAAK,EACL,CACA,EArBA,WACA,CACA,CCrCO,iBAAqB,EAO5B,KAPmC,OAOnC,MAA8B,EAC9B,QACA,gBLJO,EKImB,YAC1B,KAD2C,WAC3C,IACA,wBACA,IACA,QAEA,GACA,EAAkB,GAAK,GACvB,kBACA,kDACA,cACA,SACA,mBAEA,QACA,YAA4B,GAAK,cAEzB,EAAqB,QAC7B,WAD6B,CAE7B,eACA,SACA,2DACA,qBAEA,gCAEA,cACA,YACA,6DACA,UACA,QACA,6CACA,cACA,YACA,MACA,MACA,+BACA,UACA,YACA,eACA,CACA,oBACA,qBACA,yBACA,kBACA,SACA,mBACA,WACA,mBACA,mBACA,oBACA,sBACA,mBACA,cACA,CAAa,CACb,mBAAgC,CAChC,sBACA,CAAS,IACT,eACA,iCACA,oCACA,kCACA,iBAA8B,SXrDd,CAAM,EACtB,EWoDoC,EXpDpC,KACA,eACA,uBAAsC,IAAO,KAC7C,qBACA,qDACA,CACA,QACA,EW6CoC,kBAGpC,aACA,mBACA,uBACA,sBAEA,2BACA,sCACA,gCAIA,oCACA,iBAEA,oCACA,uBAEA,EACA,oEAEA,8BACA,+BACA,gCACA,qCACA,CAAqB,CACrB,EACA,2DAGA,WACA,CAQA,mBACA,sBAAsC,iBAEtC,OfgCO,EehCa,EAEpB,MAF4B,GAE5B,GAEA,SACA,gBACA,sBAAqC,YACrC,QACA,YACA,uBACA,mBACA,eACS,gCACT,WAAmB,EAAU,MAC7B,CAMA,OACA,MACA,8BACA,0BACA,0CACA,mBAEA,+BAEA,uBACA,oDACA,CAAa,IACb,MACA,MAEA,oBAEA,2BAEA,IACA,yBACA,CACA,SACA,wBACA,YACA,MACA,CACA,SACA,oBACA,CAMA,gBACA,gBACA,oCAGA,iBAEA,EACA,oCACA,sCACA,oCACA,gDACA,CAOA,SACA,8BACA,IACA,6BACA,WACA,IAEA,SAA8B,yBAA6B,GAC3D,oBACA,OAEA,qCACA,kBACA,iCACA,IAEA,8CACA,0BACA,GAEA,6BAEA,IACA,qBACA,SAA0C,eAAiB,GAC3D,+BACA,OACA,kBACA,aACA,CAAqB,OAErB,CACA,0BAEA,oBACA,mCACA,EACA,CAAa,EACb,EACA,aACA,IAGA,KACA,IACA,UACA,OACA,CAEA,UACA,8BAEA,oBACA,IACA,mCACA,EACA,aACA,qBACA,CAEA,aACA,kBACA,CAEA,cACA,oBACA,GAEA,CAEA,WACA,2BACA,4BACA,4BACA,oBACA,uBACA,EACA,iBACA,kBACA,kBACA,qBACA,yBACA,4CACA,mBAEA,uBACA,GACA,QAEA,CAAa,MAGb,QAEA,CAMA,SAOA,GANA,uBACA,2DACA,0BACA,aAGA,6CACA,QACA,uBACA,KAAmB,IAAO,IAC1B,4BAEA,CACA,CAMA,YACA,gCACA,0BACA,4BAKA,OAJA,8BAEA,+BACA,wBACA,QACA,WACA,qCACA,KACA,YACA,wBACA,0BACA,0BACA,KACA,aACA,2BAEA,eACA,gBACA,KACA,eACA,iCACA,mCAEA,CAIA,CAOA,eACA,iCACA,cACA,+BACA,8CACA,iCACA,+BACA,6BACA,cAEA,4BAEA,uBACA,CAMA,mBACA,2CACA,6CACA,4BACA,CAAS,qCACT,qBACA,6BAEA,CAMA,UACA,8CAIA,qBACA,4BACA,2BAGA,YAEA,CAMA,QACA,+BACA,yBACA,iBACA,yBACA,gCACA,uBAGA,4BACA,0BACA,CACA,CAOA,qBAIA,IAHA,kBACA,iCACA,2BAEA,wBAEA,QACA,CAD6B,GAC7B,QAAwB,0BAA6B,KACrD,+BAIA,GAHA,GACA,IZzZA,YYyZ+B,KAAU,EZxZzC,GYwZyC,MZnZzC,GACA,YACA,uBAAoC,IAAO,IAC3C,oBACA,IACA,KAEA,OACA,KAEA,kBACA,MAGA,IACA,MAGA,QACA,EYgYyC,GZrZzC,gBYqZyC,EZrZzC,oBYqZyC,EAEzC,uBACA,mCAEA,IACA,CACA,CAF8B,MAE9B,iBAUA,aAEA,OADA,iCACA,KAEA,YAEA,OADA,iCACA,KAWA,oBASA,GARA,uBACA,IACA,UAEA,uBACA,IACA,QAEA,wDACA,MAGA,CADA,UACA,yBACA,OACA,OACA,OACA,SACA,EACA,oCACA,yBACA,GACA,qBACA,YACA,CAIA,QACA,WACA,6BACA,sBACA,EACA,OACA,sBACA,2BACA,GACA,EACA,OAEA,uBACA,2BACA,EAoBA,MAnBA,0DACA,0BACA,wBACA,uBACA,eACA,IAGA,GAEA,CAAiB,EAEjB,eACA,IAGA,KAGA,KAOA,WACA,4BACA,6BACA,iCACA,CAMA,aACA,8BACA,0BACA,+BAEA,2CAEA,2CAEA,uBAEA,oCACA,yCACA,sEACA,6DAGA,yBAEA,aAEA,+BAGA,oBACA,qBAEA,CAOA,kBACA,SACA,IACA,WACA,KAAe,IAAO,IACtB,gCACA,aAEA,QACA,CACA,CACA,YfvbO,EgBxJiB,GAAM,KD+kBJ,GC/kBI,CEF9B,IAAM,GAAqB,+BACrB,GAAM,GACZ,UADY,EACZ,0BACA,sBACA,gCAEM,GAAQ,0BACR,GAAc,yBACpB,0BACgB,6BAAR,GAAQ,WAChB,IADgB,WAChB,aACA,0BACgB,6BAAR,GAAQ,WAMT,IANS,KAMT,MACP,WAAkC,8BAAyC,KAClE,IAAc,IADoD,SACpD,MACvB,CADuB,GACvB,iBACA,CEhBA,QACA,UACA,gBACA,aACA,gBACA,cACA,iBACA,CAMa,GAAQ,GAErB,YAFqB,CAGrB,wBACA,+BACA,qBACA,iBACA,qCACA,mCACA,8BACA,CAAC,UAAgC,CAI1B,UAMP,eACA,eACA,CAOA,gBACA,oCF1BO,SE2BkB,EF3BlB,KACP,0BACA,SAEA,qBACA,uBAAwC,IAAO,IAC/C,WACA,SAGA,QACA,CACA,SACA,SAEA,aACA,6BACA,oBACA,wBAEA,eACA,sDACA,SAGA,QACA,EECyB,GACzB,qBACA,sBACA,eACA,aACA,UACA,YACA,QACiB,EAGjB,yBAKA,kBAEA,gBAmBA,MAjBA,0BACA,wBACA,uBAIA,oBACA,eAGA,YACA,UAGA,cACA,0CAEA,CACA,CAMA,kBACA,MDvFO,YACP,KCsFgD,CDtFhD,GACA,SAIA,OAHA,EACA,cAIA,OACA,MACA,SACA,GAAQ,GAAQ,IAChB,CADgB,GAChB,GAA8B,8BAE9B,OADA,UACA,CACA,CACA,qBACA,sBACA,YAAwB,WAAiB,IACzC,eAEA,QACA,CACA,6CACA,SACA,eACA,2CACA,iBAGA,QACA,CACA,QACA,EA7BA,KACA,uBACA,CADuC,OAFvC,EAGa,UACb,ECgFgD,GAChD,gCACA,YAEA,OADA,aACA,CACA,CACA,CAEA,CAL+B,KACP,GAIxB,MACA,2DACA,CAMO,iBAAsB,EAM7B,KANoC,OAMpC,GACA,QACA,cACA,CAMA,OACA,MACA,uBACA,sBACA,+DAGA,MADA,yBACA,sBACA,0BACA,uBAEA,6BAEA,mBACA,iCAKA,+BAEA,MACA,GAAiB,GAAQ,cAEzB,sBAIA,2CAGA,wBACA,sCAPA,qEAYA,+BAEA,CAOA,gBACA,QAEA,GACA,wBACA,EACA,sBACA,2CAGA,4BACA,uBACA,UACA,wCACA,uBACA,mCACA,kCAEA,wBACA,CAEA,wBACA,UACA,UAEA,MADA,aAGA,eAGA,sBACA,MAEA,UAGA,oBACA,yBACA,UACA,WACA,kBACA,0BACA,IACA,KACA,CACA,gBACA,KACA,CACA,+BACA,CAEA,kBACA,iCACA,+BACA,cAGA,8BAEA,CACA,QACA,CACA,YACA,IACA,iCACA,CACA,SACA,QACA,CACA,CACA,2BACA,UACA,eACA,YACA,mBACA,iBACA,sBACA,+BACA,cACA,oBACA,yBACA,wBACA,uBACA,sBACA,YACA,kBACA,uBACA,CACA,CAIA,UACA,qBACA,4CACA,wBAEA,CACA,CASA,SACA,eACA,cACA,gBACA,gBACA,CASA,kBAEA,GADA,qBACA,sDDrPO,ICuPP,ODvPO,ECuPqC,eDvPrC,ECuPqC,aDtP5C,OAIA,gBACA,MACA,SACA,2BAIA,GAHA,wBACA,UACA,eAEA,eAGA,EAHsC,KAGtC,4BAEA,CACA,oBACA,YAAwB,WAAiB,IACzC,oBAGA,sBACA,eACA,2CACA,iBAIA,QACA,EA/BA,UACA,qBACA,CAD+B,ECuP/B,OADA,8BACA,CACA,CACA,WACA,CAIA,yBACA,oBACA,gBAEA,CCtTO,mBAEP,OADA,UACA,WACA,UACA,CACA,CCEA,IAAM,GAAe,eACrB,IADqB,IACrB,EACA,gBACA,aACA,gBAEA,cACA,gBACA,CAAC,CAyBM,OAAM,WAAe,EAAT,KAAgB,OAInC,OACA,QAeA,kBAKA,kBAIA,sBAIA,mBAOA,eAKA,iBACA,WAwBA,aACA,cACA,UACA,WACA,WACA,mBAEA,2BAAqC,IACrC,sBACA,WACA,CAeA,mBACA,sBAOA,YACA,aACA,OACA,cACA,WACY,EAAE,kCACF,EAAE,sCACF,EAAE,oCACF,EAAE,oCACd,CAmBA,aACA,kBAYA,iBACA,iBAEA,iBACA,uBACA,eACA,CAD4B,QAC5B,qBACA,eALA,IAOA,CAIA,OACA,qBACA,CAgBA,WAGA,OAFA,qBACA,wBACA,KAmBA,aACA,GAAY,GAAe,kBAC3B,CAD2B,KAC3B,qDAGA,GADA,aACA,gEAEA,OADA,oBACA,KAEA,OACA,KAAkB,EAAU,MAC5B,EAD4B,GAC5B,CACA,EAIA,GAHA,aACA,4CAEA,kCACA,iBACA,UACA,+BACA,MACA,CACA,sBACA,0BACA,kCAYA,MAXA,4CAGA,gBACA,gCACA,gBAGA,yBAEA,cACA,KAKA,0BACA,MACA,wEACA,eACA,eACA,MACA,CAEA,gCACA,oBACA,YAA4B,yBAA4B,IACxD,2BACA,4BAGA,6CACA,CAAS,IACT,WAEA,0BACA,eACA,CACA,gBACA,cACA,CAiBA,oBACA,2BACA,aACA,WAEA,gBACA,UACA,iBACA,CAAS,CACT,CAMA,mBACA,CACA,mCACA,YAEA,OACA,oBACA,WACA,WACA,OACA,qBAAmC,aAAiB,YACpD,EACA,kBACA,sBAoBA,OAhBA,SAEA,gCACA,oBACA,GACA,OAKA,oBACA,GACA,cAGA,aACA,kBACA,CAAS,EACT,oBACA,kBACA,CAOA,kBACA,2CACA,OAEA,qBACA,kBAGA,aACA,aACA,mBACA,6BACA,CAOA,UACA,eACA,kBACA,CAMA,SACA,6BACA,cACA,0BACA,CAAa,EAGb,kCAEA,CAOA,sBACA,aACA,KAAkB,EAAU,aAC5B,UACA,eAAkC,sCAA0C,IAC5E,CACA,CAAS,CACT,CAOA,WACA,gBACA,oCAEA,CAQA,aACA,kBACA,eACA,oCACA,iBACA,CAOA,aACA,mCAEA,IADA,0CACA,CAEA,0BACA,aACA,aACA,kDAEA,CACA,CAAS,CACT,CAOA,YAEA,KADA,gBACA,EAEA,eACA,KAAiB,EAAU,UAC3B,iBACA,sCAGA,sOAEA,KACA,MAAiB,EAAU,MAC3B,EAD2B,GACV,EAAU,aAC3B,gBACA,KACA,MAAiB,EAAU,IAC3B,IAD2B,CACV,EAAU,WAC3B,cACA,KACA,MAAiB,EAAU,WAC3B,oBACA,KACA,MAAiB,EAAU,cAC3B,eACA,2BAEA,oBACA,oCAEA,CACA,CAOA,WACA,uBACA,MACA,uBAEA,eACA,kBAGA,yCAEA,CACA,aACA,iDAEA,aADA,2BAEA,gBAGA,yBACA,qDACA,gCAEA,CAMA,OACA,WACA,KACA,sBAEA,IAEA,KACA,UACA,KAAsB,EAAU,IAChC,IADgC,CAEhC,MACA,CAAa,EACb,CACA,CAOA,SACA,qBACA,wBAGA,uBAEA,aACA,qBAGA,qBACA,CAMA,eACA,UACA,gCACA,YACA,GADyB,CACzB,cACA,oBACA,6BACA,oBACA,CAMA,eACA,iDACA,sBACA,4BACA,gCACA,cACA,CAAS,EACT,mBAOA,eACA,eACA,oCACA,CAQA,UACA,YAEA,0BACA,kBAEA,sBACA,CAiBA,aAUA,OATA,gBACA,aAA0B,KAAM,EAAU,WAAa,EAGvD,eACA,gBAEA,qCAEA,IACA,CAMA,QACA,wBACA,CAUA,YAEA,OADA,sBACA,KAWA,eAEA,OADA,uBACA,KAeA,WAEA,OADA,qBACA,KAaA,SAGA,OAFA,0CACA,2BACA,KAaA,cAGA,OAFA,0CACA,8BACA,KAoBA,UACA,uBACA,YAEA,MACA,yBACA,YAA4B,WAAsB,IAClD,aACA,cACA,KACA,CAEA,MAEA,sBAEA,YAMA,eACA,8BAeA,iBAGA,OAFA,0DACA,mCACA,IACA,CAcA,sBAGA,OAFA,0DACA,sCACA,KAoBA,kBACA,+BACA,YAEA,MACA,iCACA,YAA4B,WAAsB,IAClD,aACA,cACA,KACA,CAEA,MAEA,8BAEA,YAMA,uBACA,sCASA,2BACA,iEAEA,aADA,mCAEA,oBAGA,CACA,CCt2BO,eACP,QACA,mBACA,oBACA,wBACA,+CACA,eACA,CAOA,iCACA,oDACA,gBACA,oBACA,8BACA,iCACA,CACA,6BACA,EAMA,8BACA,eACA,EAMA,gCACA,SACA,EAMA,gCACA,UACA,EAMA,mCACA,aACA,CC3DO,kBAAsB,EAC7B,KADoC,OACpC,KACA,MACA,QACA,aACA,aACA,wBACA,IACA,UAEA,UACA,0BACA,YACQ,EAAqB,QAC7B,WAD6B,MAC7B,sBACA,uDACA,iDACA,uDACA,4EACA,iBAA2B,GAAO,CAClC,GADkC,CAClC,yBACA,gCACA,iCACA,CAAS,EACT,4CACA,0BACA,WACA,gBAAuC,CACvC,4BACA,aAF6C,IAE7C,UACA,qCACA,mBACA,WACA,CACA,uBACA,kBAEA,uBACA,MAFA,mBAIA,+BACA,WACA,4BACA,6BACA,KACA,CACA,qBACA,aACA,WACA,yBACA,0BACA,iDACA,KACA,CACA,uBACA,aACA,WACA,2BACA,4BACA,oDACA,KACA,CACA,wBACA,aACA,WACA,4BACA,6BACA,iDACA,KACA,CACA,kBACA,kBAEA,gBACA,MAFA,aAGA,CAOA,uBAEA,qBACA,oBACA,2BAEA,gBAEA,CAQA,QACA,qCACA,YACA,gBAA0B,GAAM,oBAChC,kBACA,OACA,2BACA,sBAEA,MAA+B,EAAE,qBACjC,WACA,MACA,CAAS,EACT,MACA,eACA,0BACA,6BACA,EACA,KAIA,2BAEA,EAEA,EAAyB,EAAE,cAC3B,uBACA,oBAEA,yBACA,IACA,oBACA,SACA,CAAa,GACb,sBACA,UAEA,oBACA,sBACA,CAAa,CACb,CAGA,OAFA,kBACA,kBACA,KAQA,WACA,mBACA,CAMA,SAEA,eAEA,wBACA,0BAEA,kBACA,eAAuB,EAAE,kCAA0C,EAAE,kCAA0C,EAAE,oCAA4C,EAAE,oCAA4C,EAAE,mDAC7M,CAMA,SACA,yBACA,CAMA,UACA,IACA,mBACA,CACA,SACA,6BACA,CACA,CAMA,aAEQ,EAAQ,KAChB,CADgB,GAChB,yBACA,CAAS,mBACT,CAMA,WACA,4BACA,CAOA,YACA,mBAQA,OAPA,EAIA,8BACA,aAJA,MAAyB,GAAM,UAC/B,gBAKA,CACA,CAOA,YAEA,aADA,uBAGA,OADA,SACA,OACA,OAGA,aACA,CAOA,WACA,6BACA,YAAwB,WAA2B,IACnD,iCAEA,CAMA,UACA,0BACA,mBACA,sBACA,CAMA,SACA,sBACA,sBACA,6BACA,aACA,mBACA,CAMA,aACA,oBACA,CAMA,aACA,eACA,qBACA,0BACA,+BACA,yCACA,gBAEA,CAMA,YACA,0CACA,YACA,WACA,qDACA,qBACA,sCACA,0BAEA,CACA,6BACA,uBACA,8BACA,kBAEA,0DAEA,iBAEA,WACA,GACA,mBACA,cACA,wCAGA,eAEA,CAAiB,EACjB,CAAa,GACb,sBACA,UAEA,oBACA,sBACA,CAAa,CACb,CACA,CAMA,cACA,4BACA,sBACA,qBACA,gCACA,CACA,CC/VA,UACA,SAAS,GAAM,SAef,CAdA,sBACA,IACA,UAGA,MRHO,GQGe,MRHf,UACP,QAEA,4CACA,SACA,2BAEA,qBACA,oBAEA,EADA,kBACA,aAGA,UAGA,gCAEA,EADA,WACA,kBAGA,cAIA,EAAc,GAAK,IAGnB,UACA,+BACA,YAEA,iCACA,gBAGA,mBAEA,MADA,yBACA,sBASA,OAPA,qCAEA,OACA,WACA,MACA,EACA,mCACA,CACA,EQ7CsB,EADtB,UACsB,oBACtB,WACA,OACA,SACA,yBAkBA,OAjBA,YACA,2BACA,kBACA,EAGA,MAAiB,GAAO,MAGxB,OACA,WAA4B,GAAO,MAEnC,SAEA,mBACA,qBAEA,kBACA,CAGA,cAAc,GAAM,CACpB,MADoB,CACT,IACX,MAAU,IACV,GAAQ,GACR,OADc,CACD,EACb,CAAC,OADkB,yBCDZ,gBACP,SACA,0EACA,YACA,4DACA,8CAA2D,WAAc,IACzE,uEACA,kBAEA,QACA,CAEO,oBACP,mFACA,kGACA,qBAA2C,KAAQ,oDACnD,6CACA,4BA6FO,cA0GP,cAyDA,oGC3TA,cACA,EACA,cACA,UACA,kCACA,oBACA,QACA,mDAAwG,MACxG,oBACA,CACA,EACA,QAaA,YAAgB,uBAZhB,IACA,SACA,iBAUgB,QARhB,KAEA,aACA,0MAGA,SACA,CACgB,EAEhB,OADA,WACA,CACA,EACA,6BCvBA,qCAAQ,GAAmC,EAAE,OAY7C,MAZwE,YAa3B,UAC7C,aACA,qGAA2G,WAAW,mBAGtH,2BAAkD,EAAW,KAC7D,IAD6D,CAC7D,KAlBA,2BACA,QACA,YACA,WACA,6BACA,EACA,GAGA,MADE,mBAAa,IACf,EACA,EAQA,OAEA,OADA,mBACA,CACA,EACA,uEClBA,cACA,MACA,sBACA,EAEA,mBACA,yDAFA,EAIA,EACA,YACA,cACA,OACA,iBACA,uBACA,EAEA,oBACA,KACA,OAAa,6BAEb,OACA,wBACA,SACA,EAEA,OADA,gBACA,CAAW,4BACX,EA+KA,EA9KA,OAA8C,iBAE9C,EADA,YAAU,sCAAkD,EAE5D,IACA,aAA6F,UAAtC,MAAe,GAAG,CAAoB,mBACzF,SACJ,CACA,MAMA,OAL+C,GAC/C,aACA,gFAGA,SAEA,IAAU,mBAAuC,SACjD,IACA,sBACA,aACA,MACA,SACA,kBAA+C,qBAA2C,oBAAuC,QAAqB,SACtJ,WACA,uBAGA,gBACA,CACA,KACA,QAAiB,EAAM,GAAG,OAAY,EAC/B,CACP,CACA,aACA,gBACA,GAEA,CACA,EACA,eACA,QACA,KACA,QACA,GACA,EACA,oBAcA,GAbA,qBACA,oBAEA,oBACA,gBACA,mBACA,uCACA,EACA,2BACA,KAIA,uDACA,SACA,aACA,oBACiD,8BACjD,aACA,sHAEA,MAEA,OACA,CACA,CAsGA,OArGA,gBACA,MACA,eACA,aACA,+BACA,cACA,2DAEA,MACA,CACA,SACA,UACA,IACA,0BACA,eACA,WACA,MACA,CACA,iCACA,cACA;AACA;AACA;AACA,oFAAoF,iCAAiC,iBAAiB;AACtI,uBAGA,iBACA,WACA,OAEA,kDACA,KAEA,MACA,CACA,wBAEA,+BAEA,aACA,EAEA,gBACA,uBACA,YAEA,GADA,KACA,WACA,2CAEA,uCACA,cACA,eACA,8BACA,KACA,CACA,uCACA,gBACA,qBACA,eACA,KACA,8BACA,MACA,CACA,QACA,0BACA,CAAa,CACb,qBACA,qBACA,qBACA,eACA,KACA,MACA,CACA,qDACA,OAEA,CAAa,CACb,qBACA,oBAAoB,GAAkB,UACtC,yDACA,MACA,MACA,YACA,KAEA,QAEA,gBACA,KAEA,GAEA,KACA,CACA,sBACA,WACA,CACA,MACA,CACA,CAAG,EACH,CACA,EAEA,UACA,MACA,IACA,eACA,CAAI,SACJ,cACA,kEACA,EAEA,CACA,YACA,IACA,EA2DA,SACA,IACA,WACA,wBACA,SAEA,OACA,QACA,QAEA,SACA,YAEA,CACA,CAAI,SACJ,OACA,QACA,YACO,CACP,SACA,OAEA,CACA,CACA,EACA,mBACA,IAeA,EA4CA,EA3DA,GACA,4BACA,yBACA,uBACA,gBACA,UACA,eACA,KACA,KACA,CAAK,CACL,MAEA,KACA,UACA,UAEA,IACA,gBACA,CAAI,SACJ,CACA,MACA,SACA,SACA,aACA,uDAAiE,OAAa,iDAE9E,OACA,CAAO,CACP,EACA,GAGA,qBACA,WAEA,EACA,SAAyC,MAFzC,cAAuC,OAAU,EAER,kBAAiC,OAC1E,wBACA,UACA,GACA,CAAK,EACL,KACA,QAEA,QACA,EACA,aACA,mBACA,OACA,GACA,EACA,QACA,SACA,QACA,GACA,CAAK,CACL,EACA,GAGA,OACA,MACA,MACA,OACA,KACA,qBACA,oEACA,6CACA,KACA,uBAEA,CAAK,WACL,MACA,qDAWA,eAVA,aACA,iBACA,QACA,WAGA,cACA,wFAKA,CACA,CAAK,WACL,MAMA,OADA,EAJA,UACA,EACA,mBAEA,IACA,GACA,CAAK,YACL,qBACA,KACA,kBACA,CAAK,YACL,oBACA,CAAK,CACL,EA+BA,OA9BA,WACA,eACA,GACA,KACA,MAEA,cACA,kBAEA,CAAK,CACL,kBACA,6BACA,CAAK,CACL,iBACA,kBACA,kBACA,cACA,SACA,KACA,WACA,GAEA,sBACA,SACA,KACA,WACA,EAEA,EACA,IACA,IACA,EACA,mBACA,IA8CA,EA9CA,GACA,QAjMA,cACA,MACA,IACA,KACA,CAAI,SACJ,MACA,CAsBA,MArBA,CACA,YACA,MACA,SACA,SACA,KAEA,qBAEA,uCACA,qBACA,UAEA,IACA,CAAK,CACL,yBACA,EACA,0BAEA,6BACA,CAEA,EAoKA,kBACA,gBACA,UACA,eACA,KACA,KACA,CAAK,CACL,MAEA,KACA,UACA,UACA,YACA,MACA,SACA,SACA,aACA,uDAAiE,OAAa,iDAE9E,OACA,CAAO,CACP,EACA,GAGA,WACA,oBAAuC,OAAU,EACjD,yBACA,QACA,kBACK,CACL,EACA,aACA,mBACA,OACA,GACA,EACA,QACA,SACA,QACA,GACA,CAAK,CACL,EACA,GAGA,OACA,QACA,MACA,OACA,KACA,cACA,MACA,2BACA,CAAK,EACL,kFACA,6CACA,MACA,qDAWA,eAVA,aACA,iBACA,QACA,WAGA,cACA,wFAKA,CACA,CAAK,WACL,MAMA,OADA,EAJA,UACA,EACA,mBAEA,IACA,GACA,CAAK,YACL,qBACA,MACA,KACA,kBACA,CAAK,YACL,oBACA,CAAK,CACL,EAiCA,OAhCA,WACA,eACA,GACA,KACA,MAEA,WACA,aAEA,CAAK,CACL,kBACA,6BACA,CAAK,CACL,iBACA,kBACA,kBACA,cACA,SACA,KACA,WACA,GAEA,sBACA,SACA,KACA,WACA,EAEA,EACA,iBACA,IAEA,IACA,EAYA,EAXA,OACA,sDAEA,aACA,kHAGA,QAEA","sources":["webpack://_N_E/./node_modules/@emotion/sheet/dist/emotion-sheet.esm.js","webpack://_N_E/./node_modules/stylis/src/Utility.js","webpack://_N_E/./node_modules/stylis/src/Tokenizer.js","webpack://_N_E/./node_modules/stylis/src/Enum.js","webpack://_N_E/./node_modules/stylis/src/Serializer.js","webpack://_N_E/./node_modules/stylis/src/Middleware.js","webpack://_N_E/./node_modules/stylis/src/Parser.js","webpack://_N_E/./node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","webpack://_N_E/./node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","webpack://_N_E/./node_modules/@emotion/react/dist/emotion-element-5486c51c.browser.esm.js","webpack://_N_E/./node_modules/@emotion/react/dist/emotion-react.browser.esm.js","webpack://_N_E/./node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://_N_E/./node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","webpack://_N_E/./node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","webpack://_N_E/./node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","webpack://_N_E/./node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","webpack://_N_E/./node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","webpack://_N_E/./node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","webpack://_N_E/./node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","webpack://_N_E/./node_modules/@formatjs/fast-memoize/lib/index.js","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/node_modules/tslib/tslib.es6.mjs","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/lib/error.js","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/lib/types.js","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","webpack://_N_E/./node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","webpack://_N_E/./node_modules/@formatjs/icu-skeleton-parser/node_modules/tslib/tslib.es6.mjs","webpack://_N_E/./node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js","webpack://_N_E/./node_modules/@formatjs/icu-skeleton-parser/lib/number.js","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/lib/time-data.generated.js","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/lib/date-time-pattern-generator.js","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","webpack://_N_E/./node_modules/@formatjs/icu-messageformat-parser/lib/index.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/error.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/utils.js","webpack://_N_E/./node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js","webpack://_N_E/./node_modules/@mui/styled-engine/index.js","webpack://_N_E/./node_modules/@mui/system/DefaultPropsProvider/DefaultPropsProvider.js","webpack://_N_E/./node_modules/@mui/system/RtlProvider/index.js","webpack://_N_E/./node_modules/@mui/system/breakpoints/breakpoints.js","webpack://_N_E/./node_modules/@mui/system/colorManipulator/colorManipulator.js","webpack://_N_E/./node_modules/@mui/system/createStyled/createStyled.js","webpack://_N_E/./node_modules/@mui/system/createTheme/createSpacing.js","webpack://_N_E/./node_modules/@mui/system/createBreakpoints/createBreakpoints.js","webpack://_N_E/./node_modules/@mui/system/createTheme/shape.js","webpack://_N_E/./node_modules/@mui/system/createTheme/applyStyles.js","webpack://_N_E/./node_modules/@mui/system/createTheme/createTheme.js","webpack://_N_E/./node_modules/@mui/system/cssContainerQueries/cssContainerQueries.js","webpack://_N_E/./node_modules/@mui/system/merge/merge.js","webpack://_N_E/./node_modules/@mui/system/memoize/memoize.js","webpack://_N_E/./node_modules/@mui/system/spacing/spacing.js","webpack://_N_E/./node_modules/@mui/system/style/style.js","webpack://_N_E/./node_modules/@mui/system/compose/compose.js","webpack://_N_E/./node_modules/@mui/system/borders/borders.js","webpack://_N_E/./node_modules/@mui/system/cssGrid/cssGrid.js","webpack://_N_E/./node_modules/@mui/system/palette/palette.js","webpack://_N_E/./node_modules/@mui/system/sizing/sizing.js","webpack://_N_E/./node_modules/@mui/system/styleFunctionSx/defaultSxConfig.js","webpack://_N_E/./node_modules/@mui/system/styleFunctionSx/extendSxProp.js","webpack://_N_E/./node_modules/@mui/system/styleFunctionSx/styleFunctionSx.js","webpack://_N_E/./node_modules/@mui/system/styled/styled.js","webpack://_N_E/./node_modules/@mui/system/useTheme/useTheme.js","webpack://_N_E/./node_modules/@mui/system/useThemeProps/getThemeProps.js","webpack://_N_E/./node_modules/@mui/system/useThemeProps/useThemeProps.js","webpack://_N_E/./node_modules/@mui/system/useThemeWithoutDefault/useThemeWithoutDefault.js","webpack://_N_E/./node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack://_N_E/./node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","webpack://_N_E/./node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","webpack://_N_E/./node_modules/@mui/utils/esm/capitalize/capitalize.js","webpack://_N_E/./node_modules/@mui/utils/esm/clamp/clamp.js","webpack://_N_E/./node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack://_N_E/./node_modules/@mui/utils/esm/createChainedFunction/createChainedFunction.js","webpack://_N_E/./node_modules/@mui/utils/esm/debounce/debounce.js","webpack://_N_E/./node_modules/@mui/utils/esm/deepmerge/deepmerge.js","webpack://_N_E/./node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","webpack://_N_E/./node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js","webpack://_N_E/./node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack://_N_E/./node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack://_N_E/./node_modules/@mui/utils/esm/getReactNodeRef/getReactNodeRef.js","webpack://_N_E/./node_modules/@mui/utils/esm/getScrollbarSize/getScrollbarSize.js","webpack://_N_E/./node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js","webpack://_N_E/./node_modules/@mui/utils/node_modules/clsx/dist/clsx.mjs","webpack://_N_E/./node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","webpack://_N_E/./node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","webpack://_N_E/./node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","webpack://_N_E/./node_modules/@mui/utils/esm/ownerWindow/ownerWindow.js","webpack://_N_E/./node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","webpack://_N_E/./node_modules/@mui/utils/esm/resolveProps/resolveProps.js","webpack://_N_E/./node_modules/@mui/utils/esm/setRef/setRef.js","webpack://_N_E/./node_modules/@mui/utils/esm/useControlled/useControlled.js","webpack://_N_E/./node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","webpack://_N_E/./node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","webpack://_N_E/./node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack://_N_E/./node_modules/@mui/utils/esm/useId/useId.js","webpack://_N_E/./node_modules/@mui/utils/esm/useLazyRef/useLazyRef.js","webpack://_N_E/./node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","webpack://_N_E/./node_modules/@mui/utils/esm/useOnMount/useOnMount.js","webpack://_N_E/./node_modules/@mui/utils/esm/useTimeout/useTimeout.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/AdapterDayjs/AdapterDayjs.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/MonthCalendar/pickersMonthClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/MonthCalendar/PickersMonth.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/MonthCalendar/monthCalendarClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/MonthCalendar/MonthCalendar.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/YearCalendar/pickersYearClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/YearCalendar/PickersYear.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/YearCalendar/yearCalendarClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/YearCalendar/YearCalendar.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.utils.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/locales/utils/getPickersLocalization.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/locales/enUS.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useUtils.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useValueWithTimezone.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/date-utils.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/getDefaultReferenceDate.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/time-utils.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/valueManagers.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/views.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/warning.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/composeClasses/composeClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useControlled/useControlled.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/setRef/setRef.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack://_N_E/./node_modules/@sentry/core/esm/constants.js","webpack://_N_E/./node_modules/@sentry/core/esm/eventProcessors.js","webpack://_N_E/./node_modules/@sentry/core/esm/exports.js","webpack://_N_E/./node_modules/@sentry/core/esm/hub.js","webpack://_N_E/./node_modules/@sentry/core/esm/scope.js","webpack://_N_E/./node_modules/@sentry/core/esm/session.js","webpack://_N_E/./node_modules/@sentry/utils/esm/browser.js","webpack://_N_E/./node_modules/@sentry/utils/esm/env.js","webpack://_N_E/./node_modules/@sentry/utils/esm/is.js","webpack://_N_E/./node_modules/@sentry/utils/esm/logger.js","webpack://_N_E/./node_modules/@sentry/utils/esm/misc.js","webpack://_N_E/./node_modules/@sentry/utils/esm/node.js","webpack://_N_E/./node_modules/@sentry/utils/esm/object.js","webpack://_N_E/./node_modules/@sentry/utils/esm/string.js","webpack://_N_E/./node_modules/@sentry/utils/esm/syncpromise.js","webpack://_N_E/./node_modules/@sentry/utils/esm/time.js","webpack://_N_E/./node_modules/@sentry/utils/esm/worldwide.js","webpack://_N_E/./node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs","webpack://_N_E/./node_modules/dom-accessibility-api/dist/polyfills/SetLike.mjs","webpack://_N_E/./node_modules/dom-accessibility-api/dist/getRole.mjs","webpack://_N_E/./node_modules/dom-accessibility-api/dist/util.mjs","webpack://_N_E/./node_modules/dom-accessibility-api/dist/accessible-name-and-description.mjs","webpack://_N_E/./node_modules/dom-accessibility-api/dist/accessible-description.mjs","webpack://_N_E/./node_modules/dom-accessibility-api/dist/accessible-name.mjs","webpack://_N_E/./node_modules/dom-accessibility-api/dist/index.mjs","webpack://_N_E/./node_modules/@testing-library/dom/dist/@testing-library/dom.esm.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/collections.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/index.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/AsymmetricMatcher.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ConvertAnsi.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMElement.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/Immutable.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactElement.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/ReactTestComponent.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/escapeHTML.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/lib/markup.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/react-is/cjs/react-is.production.min.js","webpack://_N_E/./node_modules/@testing-library/dom/node_modules/react-is/index.js","webpack://_N_E/./node_modules/ansi-styles/index.js","webpack://_N_E/./node_modules/aria-query/lib/ariaPropsMap.js","webpack://_N_E/./node_modules/aria-query/lib/domMap.js","webpack://_N_E/./node_modules/aria-query/lib/elementRoleMap.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/commandRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/compositeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/inputRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/landmarkRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/rangeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/roletypeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/sectionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/sectionheadRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/selectRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/structureRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/widgetRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/abstract/windowRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/ariaAbstractRoles.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/ariaDpubRoles.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/ariaGraphicsRoles.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/ariaLiteralRoles.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docAbstractRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docAcknowledgmentsRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docAfterwordRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docAppendixRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docBacklinkRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docBiblioentryRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docBibliographyRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docBibliorefRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docChapterRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docColophonRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docConclusionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docCoverRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docCreditRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docCreditsRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docDedicationRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docEndnoteRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docEndnotesRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docEpigraphRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docEpilogueRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docErrataRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docExampleRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docFootnoteRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docForewordRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docGlossaryRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docGlossrefRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docIndexRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docIntroductionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docNoterefRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docNoticeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docPagebreakRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docPagelistRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docPartRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docPrefaceRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docPrologueRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docPullquoteRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docQnaRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docSubtitleRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docTipRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/dpub/docTocRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/graphics/graphicsDocumentRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/graphics/graphicsObjectRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/graphics/graphicsSymbolRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/alertRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/alertdialogRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/applicationRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/articleRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/bannerRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/blockquoteRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/buttonRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/captionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/cellRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/checkboxRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/codeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/columnheaderRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/comboboxRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/complementaryRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/contentinfoRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/definitionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/deletionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/dialogRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/directoryRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/documentRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/emphasisRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/feedRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/figureRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/formRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/genericRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/gridRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/gridcellRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/groupRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/headingRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/imgRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/insertionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/linkRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/listRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/listboxRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/listitemRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/logRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/mainRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/markRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/marqueeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/mathRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/menuRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/menubarRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/menuitemRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/menuitemcheckboxRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/menuitemradioRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/meterRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/navigationRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/noneRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/noteRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/optionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/paragraphRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/presentationRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/progressbarRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/radioRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/radiogroupRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/regionRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/rowRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/rowgroupRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/rowheaderRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/scrollbarRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/searchRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/searchboxRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/separatorRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/sliderRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/spinbuttonRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/statusRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/strongRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/subscriptRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/superscriptRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/switchRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/tabRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/tableRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/tablistRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/tabpanelRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/termRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/textboxRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/timeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/timerRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/toolbarRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/tooltipRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/treeRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/treegridRole.js","webpack://_N_E/./node_modules/aria-query/lib/etc/roles/literal/treeitemRole.js","webpack://_N_E/./node_modules/aria-query/lib/index.js","webpack://_N_E/./node_modules/aria-query/lib/roleElementMap.js","webpack://_N_E/./node_modules/aria-query/lib/rolesMap.js","webpack://_N_E/./node_modules/aria-query/lib/util/iterationDecorator.js","webpack://_N_E/./node_modules/aria-query/lib/util/iteratorProxy.js","webpack://_N_E/./node_modules/clsx/dist/clsx.m.js","webpack://_N_E/./node_modules/crypto-js/aes.js","webpack://_N_E/./node_modules/crypto-js/blowfish.js","webpack://_N_E/./node_modules/crypto-js/cipher-core.js","webpack://_N_E/./node_modules/crypto-js/core.js","webpack://_N_E/./node_modules/crypto-js/enc-base64.js","webpack://_N_E/./node_modules/crypto-js/enc-base64url.js","webpack://_N_E/./node_modules/crypto-js/enc-utf16.js","webpack://_N_E/./node_modules/crypto-js/evpkdf.js","webpack://_N_E/./node_modules/crypto-js/format-hex.js","webpack://_N_E/./node_modules/crypto-js/hmac.js","webpack://_N_E/./node_modules/crypto-js/index.js","webpack://_N_E/./node_modules/crypto-js/lib-typedarrays.js","webpack://_N_E/./node_modules/crypto-js/md5.js","webpack://_N_E/./node_modules/crypto-js/mode-cfb.js","webpack://_N_E/./node_modules/crypto-js/mode-ctr-gladman.js","webpack://_N_E/./node_modules/crypto-js/mode-ctr.js","webpack://_N_E/./node_modules/crypto-js/mode-ecb.js","webpack://_N_E/./node_modules/crypto-js/mode-ofb.js","webpack://_N_E/./node_modules/crypto-js/pad-ansix923.js","webpack://_N_E/./node_modules/crypto-js/pad-iso10126.js","webpack://_N_E/./node_modules/crypto-js/pad-iso97971.js","webpack://_N_E/./node_modules/crypto-js/pad-nopadding.js","webpack://_N_E/./node_modules/crypto-js/pad-zeropadding.js","webpack://_N_E/./node_modules/crypto-js/pbkdf2.js","webpack://_N_E/./node_modules/crypto-js/rabbit-legacy.js","webpack://_N_E/./node_modules/crypto-js/rabbit.js","webpack://_N_E/./node_modules/crypto-js/rc4.js","webpack://_N_E/./node_modules/crypto-js/ripemd160.js","webpack://_N_E/./node_modules/crypto-js/sha1.js","webpack://_N_E/./node_modules/crypto-js/sha224.js","webpack://_N_E/./node_modules/crypto-js/sha256.js","webpack://_N_E/./node_modules/crypto-js/sha3.js","webpack://_N_E/./node_modules/crypto-js/sha384.js","webpack://_N_E/./node_modules/crypto-js/sha512.js","webpack://_N_E/./node_modules/crypto-js/tripledes.js","webpack://_N_E/./node_modules/crypto-js/x64-core.js","webpack://_N_E/./node_modules/dayjs/dayjs.min.js","webpack://_N_E/./node_modules/dayjs/locale/es-us.js","webpack://_N_E/./node_modules/dayjs/plugin/customParseFormat.js","webpack://_N_E/./node_modules/dayjs/plugin/isBetween.js","webpack://_N_E/./node_modules/dayjs/plugin/localizedFormat.js","webpack://_N_E/./node_modules/dayjs/plugin/weekOfYear.js","webpack://_N_E/./node_modules/dequal/lite/index.js","webpack://_N_E/./node_modules/enquire.js/src/MediaQuery.js","webpack://_N_E/./node_modules/enquire.js/src/MediaQueryDispatch.js","webpack://_N_E/./node_modules/enquire.js/src/QueryHandler.js","webpack://_N_E/./node_modules/enquire.js/src/Util.js","webpack://_N_E/./node_modules/enquire.js/src/index.js","webpack://_N_E/./node_modules/filepond-plugin-file-encode/dist/filepond-plugin-file-encode.js","webpack://_N_E/./node_modules/filepond-plugin-file-validate-size/dist/filepond-plugin-file-validate-size.js","webpack://_N_E/./node_modules/filepond-plugin-file-validate-type/dist/filepond-plugin-file-validate-type.js","webpack://_N_E/./node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.js","webpack://_N_E/./node_modules/filepond/dist/filepond.js","webpack://_N_E/./node_modules/has-symbols/index.js","webpack://_N_E/./node_modules/has-symbols/shams.js","webpack://_N_E/./node_modules/has/node_modules/function-bind/implementation.js","webpack://_N_E/./node_modules/has/node_modules/function-bind/index.js","webpack://_N_E/./node_modules/has/src/index.js","webpack://_N_E/./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","webpack://_N_E/./node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","webpack://_N_E/./node_modules/hoist-non-react-statics/node_modules/react-is/index.js","webpack://_N_E/./node_modules/intl-messageformat/lib/src/core.js","webpack://_N_E/./node_modules/intl-messageformat/lib/src/error.js","webpack://_N_E/./node_modules/intl-messageformat/lib/src/formatters.js","webpack://_N_E/./node_modules/invariant/browser.js","webpack://_N_E/./node_modules/js-cookie/src/js.cookie.js","webpack://_N_E/./node_modules/json2mq/index.js","webpack://_N_E/./node_modules/lodash.debounce/index.js","webpack://_N_E/./node_modules/lz-string/libs/lz-string.js","webpack://_N_E/./node_modules/mixpanel-browser/dist/mixpanel.cjs.js","webpack://_N_E/?adc8","webpack://_N_E/./node_modules/@mui/icons-material/AccountBalanceOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/Archive.js","webpack://_N_E/./node_modules/@mui/icons-material/ArchiveOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/ArrowBack.js","webpack://_N_E/./node_modules/@mui/icons-material/ArrowCircleRightOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/ChevronLeft.js","webpack://_N_E/./node_modules/@mui/icons-material/Close.js","webpack://_N_E/./node_modules/@mui/icons-material/Emergency.js","webpack://_N_E/./node_modules/@mui/icons-material/EmojiEventsOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/ForumOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/HelpOutline.js","webpack://_N_E/./node_modules/@mui/icons-material/HourglassEmpty.js","webpack://_N_E/./node_modules/@mui/icons-material/KeyboardArrowDown.js","webpack://_N_E/./node_modules/@mui/icons-material/MenuBookOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/NotInterested.js","webpack://_N_E/./node_modules/@mui/icons-material/Notifications.js","webpack://_N_E/./node_modules/@mui/icons-material/PersonOutline.js","webpack://_N_E/./node_modules/@mui/icons-material/PushPinOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/SendOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/SettingsOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/Star.js","webpack://_N_E/./node_modules/@mui/icons-material/StarOutline.js","webpack://_N_E/./node_modules/@mui/icons-material/WalletOutlined.js","webpack://_N_E/./node_modules/@mui/icons-material/utils/createSvgIcon.js","webpack://_N_E/./node_modules/@mui/material/internal/svg-icons/Person.js","webpack://_N_E/./node_modules/@mui/material/Avatar/Avatar.js","webpack://_N_E/./node_modules/@mui/material/Avatar/avatarClasses.js","webpack://_N_E/./node_modules/@mui/material/Backdrop/backdropClasses.js","webpack://_N_E/./node_modules/@mui/material/Backdrop/Backdrop.js","webpack://_N_E/./node_modules/@mui/system/createBox/createBox.js","webpack://_N_E/./node_modules/@mui/material/Box/boxClasses.js","webpack://_N_E/./node_modules/@mui/material/Box/Box.js","webpack://_N_E/./node_modules/@mui/material/Button/buttonClasses.js","webpack://_N_E/./node_modules/@mui/material/ButtonGroup/ButtonGroupContext.js","webpack://_N_E/./node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.js","webpack://_N_E/./node_modules/@mui/material/Button/Button.js","webpack://_N_E/./node_modules/@mui/material/useLazyRipple/useLazyRipple.js","webpack://_N_E/./node_modules/@mui/material/ButtonBase/Ripple.js","webpack://_N_E/./node_modules/@mui/material/ButtonBase/touchRippleClasses.js","webpack://_N_E/./node_modules/@mui/material/ButtonBase/TouchRipple.js","webpack://_N_E/./node_modules/@mui/material/ButtonBase/buttonBaseClasses.js","webpack://_N_E/./node_modules/@mui/material/ButtonBase/ButtonBase.js","webpack://_N_E/./node_modules/@mui/material/internal/svg-icons/Cancel.js","webpack://_N_E/./node_modules/@mui/material/Chip/chipClasses.js","webpack://_N_E/./node_modules/@mui/material/Chip/Chip.js","webpack://_N_E/./node_modules/@mui/material/CircularProgress/circularProgressClasses.js","webpack://_N_E/./node_modules/@mui/material/CircularProgress/CircularProgress.js","webpack://_N_E/./node_modules/@mui/system/Container/createContainer.js","webpack://_N_E/./node_modules/@mui/material/Container/Container.js","webpack://_N_E/./node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js","webpack://_N_E/./node_modules/@mui/material/Dialog/Dialog.js","webpack://_N_E/./node_modules/@mui/material/Dialog/DialogContext.js","webpack://_N_E/./node_modules/@mui/material/Dialog/dialogClasses.js","webpack://_N_E/./node_modules/@mui/material/DialogContent/dialogContentClasses.js","webpack://_N_E/./node_modules/@mui/material/DialogContent/DialogContent.js","webpack://_N_E/./node_modules/@mui/material/DialogTitle/dialogTitleClasses.js","webpack://_N_E/./node_modules/@mui/material/Divider/Divider.js","webpack://_N_E/./node_modules/@mui/material/Divider/dividerClasses.js","webpack://_N_E/./node_modules/@mui/material/Fade/Fade.js","webpack://_N_E/./node_modules/@mui/material/FilledInput/filledInputClasses.js","webpack://_N_E/./node_modules/@mui/material/FilledInput/FilledInput.js","webpack://_N_E/./node_modules/@mui/material/FormControl/formControlClasses.js","webpack://_N_E/./node_modules/@mui/material/FormControl/FormControl.js","webpack://_N_E/./node_modules/@mui/material/FormControl/FormControlContext.js","webpack://_N_E/./node_modules/@mui/material/FormControl/formControlState.js","webpack://_N_E/./node_modules/@mui/material/FormControl/useFormControl.js","webpack://_N_E/./node_modules/@mui/material/Grid/GridContext.js","webpack://_N_E/./node_modules/@mui/material/Grid/gridClasses.js","webpack://_N_E/./node_modules/@mui/material/Grid/Grid.js","webpack://_N_E/./node_modules/@mui/material/Grow/Grow.js","webpack://_N_E/./node_modules/@mui/material/IconButton/iconButtonClasses.js","webpack://_N_E/./node_modules/@mui/material/IconButton/IconButton.js","webpack://_N_E/./node_modules/@mui/material/Input/inputClasses.js","webpack://_N_E/./node_modules/@mui/material/Input/Input.js","webpack://_N_E/./node_modules/@mui/material/InputAdornment/inputAdornmentClasses.js","webpack://_N_E/./node_modules/@mui/material/InputAdornment/InputAdornment.js","webpack://_N_E/./node_modules/@mui/material/TextareaAutosize/TextareaAutosize.js","webpack://_N_E/./node_modules/@mui/material/InputBase/InputBase.js","webpack://_N_E/./node_modules/@mui/material/InputBase/inputBaseClasses.js","webpack://_N_E/./node_modules/@mui/material/InputBase/utils.js","webpack://_N_E/./node_modules/@mui/material/List/listClasses.js","webpack://_N_E/./node_modules/@mui/material/List/List.js","webpack://_N_E/./node_modules/@mui/material/List/ListContext.js","webpack://_N_E/./node_modules/@mui/material/ListItem/listItemClasses.js","webpack://_N_E/./node_modules/@mui/material/ListItemButton/listItemButtonClasses.js","webpack://_N_E/./node_modules/@mui/material/ListItemSecondaryAction/listItemSecondaryActionClasses.js","webpack://_N_E/./node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.js","webpack://_N_E/./node_modules/@mui/material/ListItem/ListItem.js","webpack://_N_E/./node_modules/@mui/material/ListItemText/ListItemText.js","webpack://_N_E/./node_modules/@mui/material/ListItemText/listItemTextClasses.js","webpack://_N_E/./node_modules/@mui/material/Modal/ModalManager.js","webpack://_N_E/./node_modules/@mui/material/Modal/useModal.js","webpack://_N_E/./node_modules/@mui/material/Modal/modalClasses.js","webpack://_N_E/./node_modules/@mui/material/Modal/Modal.js","webpack://_N_E/./node_modules/@mui/material/OutlinedInput/NotchedOutline.js","webpack://_N_E/./node_modules/@mui/material/OutlinedInput/outlinedInputClasses.js","webpack://_N_E/./node_modules/@mui/material/OutlinedInput/OutlinedInput.js","webpack://_N_E/./node_modules/@mui/material/Paper/paperClasses.js","webpack://_N_E/./node_modules/@mui/material/Paper/Paper.js","webpack://_N_E/./node_modules/@mui/material/Popover/popoverClasses.js","webpack://_N_E/./node_modules/@mui/material/Popover/Popover.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getWindow.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/math.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/userAgent.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","webpack://_N_E/./node_modules/@popperjs/core/lib/enums.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/orderModifiers.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/debounce.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/mergeByName.js","webpack://_N_E/./node_modules/@popperjs/core/lib/createPopper.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/eventListeners.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/getBasePlacement.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/getVariation.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/computeOffsets.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/computeStyles.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/applyStyles.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/offset.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/contains.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/rectToClientRect.js","webpack://_N_E/./node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/expandToHashMap.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/detectOverflow.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/flip.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/getAltAxis.js","webpack://_N_E/./node_modules/@popperjs/core/lib/utils/within.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/arrow.js","webpack://_N_E/./node_modules/@popperjs/core/lib/modifiers/hide.js","webpack://_N_E/./node_modules/@popperjs/core/lib/popper.js","webpack://_N_E/./node_modules/@mui/material/Popper/popperClasses.js","webpack://_N_E/./node_modules/@mui/material/Popper/BasePopper.js","webpack://_N_E/./node_modules/@mui/material/Popper/Popper.js","webpack://_N_E/./node_modules/@mui/material/Portal/Portal.js","webpack://_N_E/./node_modules/@mui/material/utils/getScrollbarSize.js","webpack://_N_E/./node_modules/@mui/material/MenuList/MenuList.js","webpack://_N_E/./node_modules/@mui/material/Menu/menuClasses.js","webpack://_N_E/./node_modules/@mui/material/Menu/Menu.js","webpack://_N_E/./node_modules/@mui/material/NativeSelect/nativeSelectClasses.js","webpack://_N_E/./node_modules/@mui/material/NativeSelect/NativeSelectInput.js","webpack://_N_E/./node_modules/@mui/material/Select/selectClasses.js","webpack://_N_E/./node_modules/@mui/material/Select/SelectInput.js","webpack://_N_E/./node_modules/@mui/material/internal/svg-icons/ArrowDropDown.js","webpack://_N_E/./node_modules/@mui/material/Select/Select.js","webpack://_N_E/./node_modules/@mui/material/SvgIcon/svgIconClasses.js","webpack://_N_E/./node_modules/@mui/material/SvgIcon/SvgIcon.js","webpack://_N_E/./node_modules/@mui/material/FormLabel/formLabelClasses.js","webpack://_N_E/./node_modules/@mui/material/FormLabel/FormLabel.js","webpack://_N_E/./node_modules/@mui/material/InputLabel/inputLabelClasses.js","webpack://_N_E/./node_modules/@mui/material/InputLabel/InputLabel.js","webpack://_N_E/./node_modules/@mui/material/FormHelperText/formHelperTextClasses.js","webpack://_N_E/./node_modules/@mui/material/FormHelperText/FormHelperText.js","webpack://_N_E/./node_modules/@mui/material/TextField/textFieldClasses.js","webpack://_N_E/./node_modules/@mui/material/TextField/TextField.js","webpack://_N_E/./node_modules/@mui/material/Tooltip/tooltipClasses.js","webpack://_N_E/./node_modules/@mui/material/Tooltip/Tooltip.js","webpack://_N_E/./node_modules/@mui/material/Typography/Typography.js","webpack://_N_E/./node_modules/@mui/material/Typography/typographyClasses.js","webpack://_N_E/./node_modules/@mui/material/Unstable_TrapFocus/FocusTrap.js","webpack://_N_E/./node_modules/@mui/material/colors/common.js","webpack://_N_E/./node_modules/@mui/material/colors/grey.js","webpack://_N_E/./node_modules/@mui/material/colors/purple.js","webpack://_N_E/./node_modules/@mui/material/colors/red.js","webpack://_N_E/./node_modules/@mui/material/colors/orange.js","webpack://_N_E/./node_modules/@mui/material/colors/blue.js","webpack://_N_E/./node_modules/@mui/material/colors/lightBlue.js","webpack://_N_E/./node_modules/@mui/material/colors/green.js","webpack://_N_E/./node_modules/@mui/material/styles/createPalette.js","webpack://_N_E/./node_modules/@mui/system/cssVars/createGetCssVar.js","webpack://_N_E/./node_modules/@mui/system/cssVars/prepareTypographyVars.js","webpack://_N_E/./node_modules/@mui/system/cssVars/cssVarsParser.js","webpack://_N_E/./node_modules/@mui/system/cssVars/prepareCssVars.js","webpack://_N_E/./node_modules/@mui/system/cssVars/getColorSchemeSelector.js","webpack://_N_E/./node_modules/@mui/material/styles/createMixins.js","webpack://_N_E/./node_modules/@mui/material/styles/shadows.js","webpack://_N_E/./node_modules/@mui/material/styles/createTransitions.js","webpack://_N_E/./node_modules/@mui/material/styles/zIndex.js","webpack://_N_E/./node_modules/@mui/material/styles/createThemeNoVars.js","webpack://_N_E/./node_modules/@mui/material/styles/createColorScheme.js","webpack://_N_E/./node_modules/@mui/material/styles/shouldSkipGeneratingVar.js","webpack://_N_E/./node_modules/@mui/material/styles/excludeVariablesFromRoot.js","webpack://_N_E/./node_modules/@mui/material/styles/createGetSelector.js","webpack://_N_E/./node_modules/@mui/material/styles/stringifyTheme.js","webpack://_N_E/./node_modules/@mui/material/styles/createThemeWithVars.js","webpack://_N_E/./node_modules/@mui/material/styles/createTheme.js","webpack://_N_E/./node_modules/@mui/material/styles/createTypography.js","webpack://_N_E/./node_modules/@mui/material/styles/defaultTheme.js","webpack://_N_E/./node_modules/@mui/material/styles/getOverlayAlpha.js","webpack://_N_E/./node_modules/@mui/material/styles/identifier.js","webpack://_N_E/./node_modules/@mui/material/styles/rootShouldForwardProp.js","webpack://_N_E/./node_modules/@mui/material/styles/slotShouldForwardProp.js","webpack://_N_E/./node_modules/@mui/material/styles/styled.js","webpack://_N_E/./node_modules/@mui/material/styles/useTheme.js","webpack://_N_E/./node_modules/@mui/material/styles/useThemeProps.js","webpack://_N_E/./node_modules/@mui/material/transitions/utils.js","webpack://_N_E/./node_modules/@mui/material/utils/capitalize.js","webpack://_N_E/./node_modules/@mui/material/utils/createChainedFunction.js","webpack://_N_E/./node_modules/@mui/material/utils/createSvgIcon.js","webpack://_N_E/./node_modules/@mui/material/utils/debounce.js","webpack://_N_E/./node_modules/@mui/utils/esm/deprecatedPropType/deprecatedPropType.js","webpack://_N_E/./node_modules/@mui/material/utils/deprecatedPropType.js","webpack://_N_E/./node_modules/@mui/utils/esm/requirePropFactory/requirePropFactory.js","webpack://_N_E/./node_modules/@mui/material/utils/requirePropFactory.js","webpack://_N_E/./node_modules/@mui/material/utils/setRef.js","webpack://_N_E/./node_modules/@mui/utils/esm/unsupportedProp/unsupportedProp.js","webpack://_N_E/./node_modules/@mui/material/utils/unsupportedProp.js","webpack://_N_E/./node_modules/@mui/material/utils/index.js","webpack://_N_E/./node_modules/@mui/material/utils/isHostComponent.js","webpack://_N_E/./node_modules/@mui/utils/esm/isMuiElement/isMuiElement.js","webpack://_N_E/./node_modules/@mui/material/utils/isMuiElement.js","webpack://_N_E/./node_modules/@mui/material/utils/memoTheme.js","webpack://_N_E/./node_modules/@mui/material/utils/ownerDocument.js","webpack://_N_E/./node_modules/@mui/material/utils/ownerWindow.js","webpack://_N_E/./node_modules/@mui/material/utils/useControlled.js","webpack://_N_E/./node_modules/@mui/material/utils/useEnhancedEffect.js","webpack://_N_E/./node_modules/@mui/material/utils/useEventCallback.js","webpack://_N_E/./node_modules/@mui/material/utils/useForkRef.js","webpack://_N_E/./node_modules/@mui/material/utils/useId.js","webpack://_N_E/./node_modules/@mui/material/utils/useSlot.js","webpack://_N_E/./node_modules/@mui/system/GlobalStyles/GlobalStyles.js","webpack://_N_E/./node_modules/@mui/material/GlobalStyles/GlobalStyles.js","webpack://_N_E/./node_modules/@mui/material/zero-styled/index.js","webpack://_N_E/./node_modules/@sentry/utils/esm/buildPolyfills/_optionalChain.js","webpack://_N_E/./node_modules/@sentry/core/esm/utils/hasTracingEnabled.js","webpack://_N_E/./node_modules/@sentry/utils/esm/path.js","webpack://_N_E/./node_modules/@sentry/integrations/esm/rewriteframes.js","webpack://_N_E/./node_modules/@sentry/core/esm/version.js","webpack://_N_E/./node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack://_N_E/./node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack://_N_E/./node_modules/@sentry/core/esm/integration.js","webpack://_N_E/./node_modules/@sentry/core/esm/sdk.js","webpack://_N_E/./node_modules/@sentry/utils/esm/stacktrace.js","webpack://_N_E/./node_modules/@sentry/utils/esm/supports.js","webpack://_N_E/./node_modules/@sentry/utils/esm/vendor/supportsHistory.js","webpack://_N_E/./node_modules/@sentry/utils/esm/instrument.js","webpack://_N_E/./node_modules/@sentry/utils/esm/dsn.js","webpack://_N_E/./node_modules/@sentry/utils/esm/memo.js","webpack://_N_E/./node_modules/@sentry/utils/esm/normalize.js","webpack://_N_E/./node_modules/@sentry/utils/esm/envelope.js","webpack://_N_E/./node_modules/@sentry/utils/esm/error.js","webpack://_N_E/./node_modules/@sentry/core/esm/api.js","webpack://_N_E/./node_modules/@sentry/core/esm/envelope.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/dynamicSamplingContext.js","webpack://_N_E/./node_modules/@sentry/core/esm/utils/prepareEvent.js","webpack://_N_E/./node_modules/@sentry/core/esm/baseclient.js","webpack://_N_E/./node_modules/@sentry/utils/esm/clientreport.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/eventbuilder.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/helpers.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/userfeedback.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/client.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack://_N_E/./node_modules/@sentry/utils/esm/severity.js","webpack://_N_E/./node_modules/@sentry/utils/esm/url.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack://_N_E/./node_modules/@sentry/utils/esm/aggregate-errors.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/integrations/httpcontext.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/stack-parsers.js","webpack://_N_E/./node_modules/@sentry/utils/esm/promisebuffer.js","webpack://_N_E/./node_modules/@sentry/utils/esm/ratelimit.js","webpack://_N_E/./node_modules/@sentry/core/esm/transports/base.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/transports/utils.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/transports/fetch.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/transports/xhr.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/browser/esm/sdk.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/react/esm/sdk.js","webpack://_N_E/./node_modules/@sentry/utils/esm/baggage.js","webpack://_N_E/./node_modules/@sentry/utils/esm/tracing.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/span.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/transaction.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/idletransaction.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/utils.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/errors.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/sampling.js","webpack://_N_E/./node_modules/@sentry/core/esm/tracing/hubextensions.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/types.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/backgroundtab.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/bindReporter.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/generateUniqueID.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getNavigationEntry.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getActivationStart.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/initMetric.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/observe.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/onHidden.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getCLS.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/lib/getVisibilityWatcher.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getFID.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/web-vitals/getLCP.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/instrument.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/metrics/utils.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/metrics/index.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/request.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/router.js","webpack://_N_E/./node_modules/@sentry-internal/tracing/esm/browser/browsertracing.js","webpack://_N_E/./node_modules/@sentry/utils/esm/userIntegrations.js","webpack://_N_E/./node_modules/@sentry/nextjs/esm/common/getVercelEnv.js","webpack://_N_E/./node_modules/@sentry/nextjs/esm/common/metadata.js","webpack://_N_E/./node_modules/@sentry/nextjs/esm/client/performance.js","webpack://_N_E/./node_modules/@sentry/nextjs/esm/client/tunnelRoute.js","webpack://_N_E/./node_modules/@sentry/nextjs/esm/client/index.js","webpack://_N_E/./node_modules/@sentry/core/esm/utils/isSentryRequestUrl.js","webpack://_N_E/./node_modules/@sentry/utils/esm/isBrowser.js","webpack://_N_E/./node_modules/@sentry/nextjs/node_modules/@sentry/replay/esm/index.js","webpack://_N_E/./sentry.client.config.js","webpack://_N_E/./node_modules/ansi-regex/index.js","webpack://_N_E/../client/get-domain-locale.ts","webpack://_N_E/../client/image-component.tsx","webpack://_N_E/../client/link.tsx","webpack://_N_E/../client/use-intersection.tsx","webpack://_N_E/../client/use-merged-ref.ts","webpack://_N_E/../../../src/shared/lib/get-img-props.ts","webpack://_N_E/../../../src/shared/lib/image-blur-svg.ts","webpack://_N_E/../../../src/shared/lib/image-external.tsx","webpack://_N_E/../../../src/shared/lib/image-loader.ts","webpack://_N_E/./node_modules/styled-jsx/dist/index/index.js","webpack://_N_E/./node_modules/styled-jsx/style.js","webpack://_N_E/./src/components/array-credit-alerts/index.tsx","webpack://_N_E/./src/components/button/index.tsx","webpack://_N_E/./src/components/buyer-signup-form-v3/BackButtonComponent.tsx","webpack://_N_E/./src/components/co-borrower/InviteCoBorrower.tsx","webpack://_N_E/./src/components/co-borrower/co-borrower-details.tsx","webpack://_N_E/./src/components/co-borrower/disassociation-consent.tsx","webpack://_N_E/./node_modules/@mui/material/ListItemIcon/listItemIconClasses.js","webpack://_N_E/./node_modules/@mui/material/MenuItem/menuItemClasses.js","webpack://_N_E/./node_modules/@mui/material/MenuItem/MenuItem.js","webpack://_N_E/./src/components/common/LanguageSelect.tsx","webpack://_N_E/./src/components/custom-input/checkbox/index.tsx","webpack://_N_E/./src/components/custom-input/co-borrower/index.tsx","webpack://_N_E/./src/components/custom-input/address-autocomplete/index.tsx","webpack://_N_E/./node_modules/@mui/system/useMediaQuery/useMediaQuery.js","webpack://_N_E/./node_modules/@mui/base/utils/resolveComponentProps.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/pickersToolbarClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/PickersToolbar.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DatePicker/datePickerToolbarClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DatePicker/DatePickerToolbar.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/slots-migration.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DatePicker/shared.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/validation/validateDate.js","webpack://_N_E/./node_modules/@mui/base/node_modules/@mui/utils/esm/setRef/setRef.js","webpack://_N_E/./node_modules/@mui/base/node_modules/@mui/utils/esm/useForkRef/useForkRef.js","webpack://_N_E/./node_modules/@mui/base/utils/isHostComponent.js","webpack://_N_E/./node_modules/@mui/base/utils/appendOwnerState.js","webpack://_N_E/./node_modules/@mui/base/node_modules/clsx/dist/clsx.mjs","webpack://_N_E/./node_modules/@mui/base/utils/extractEventHandlers.js","webpack://_N_E/./node_modules/@mui/base/utils/omitEventHandlers.js","webpack://_N_E/./node_modules/@mui/base/utils/mergeSlotProps.js","webpack://_N_E/./node_modules/@mui/base/utils/useSlotProps.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/useId/useId.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/pickersPopperClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/utils.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/PickersPopper.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useOpenState.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useValidation.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerValue.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useViews.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerViews.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useIsLandscape.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerLayoutProps.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePicker.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/PickersLayout/pickersLayoutClasses.js","webpack://_N_E/./node_modules/@mui/material/DialogActions/dialogActionsClasses.js","webpack://_N_E/./node_modules/@mui/material/DialogActions/DialogActions.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/PickersActionBar/PickersActionBar.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/constants/dimensions.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/PickersShortcuts/PickersShortcuts.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/PickersLayout/usePickerLayout.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/PickersLayout/PickersLayout.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useDesktopPicker/useDesktopPicker.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/icons/index.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldState.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldCharacterEditing.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/validation/extractValidationProps.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/fields.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateField/useDateField.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateField/DateField.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/useIsDateDisabled.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/useCalendarState.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/pickersFadeTransitionGroupClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/PickersFadeTransitionGroup.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/PickersDay/pickersDayClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/PickersDay/PickersDay.js","webpack://_N_E/./node_modules/dom-helpers/esm/hasClass.js","webpack://_N_E/./node_modules/dom-helpers/esm/addClass.js","webpack://_N_E/./node_modules/dom-helpers/esm/removeClass.js","webpack://_N_E/./node_modules/react-transition-group/esm/CSSTransition.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/pickersSlideTransitionClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/PickersSlideTransition.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/dayCalendarClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/DayCalendar.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/date-helpers-hooks.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/pickersCalendarHeaderClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/PickersCalendarHeader.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/PickerViewRoot/PickerViewRoot.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/utils/defaultReduceAnimations.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/dateCalendarClasses.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DateCalendar/DateCalendar.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/dateViewRenderers/dateViewRenderers.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DesktopDatePicker/DesktopDatePicker.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/components/PickersModalDialog.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/internals/hooks/useMobilePicker/useMobilePicker.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/MobileDatePicker/MobileDatePicker.js","webpack://_N_E/./node_modules/@mui/x-date-pickers/DatePicker/DatePicker.js","webpack://_N_E/./src/components/custom-input/birth-date/index.tsx","webpack://_N_E/./src/components/custom-input/checkbox-options/index.tsx","webpack://_N_E/./src/components/custom-input/children-select/index.tsx","webpack://_N_E/./src/components/custom-input/city/index.tsx","webpack://_N_E/./src/components/custom-input/country/index.tsx","webpack://_N_E/./src/components/custom-input/country-phone/index.tsx","webpack://_N_E/./src/components/custom-input/currency/index.tsx","webpack://_N_E/./src/components/custom-input/email/index.tsx","webpack://_N_E/./src/components/custom-input/purchase-home-time-select/index.tsx","webpack://_N_E/./src/components/custom-input/expected-purchase-at/index.tsx","webpack://_N_E/./src/components/custom-input/gender/index.tsx","webpack://_N_E/./src/components/custom-input/hispanic-origin/index.tsx","webpack://_N_E/./src/components/custom-input/house-price-goal/index.tsx","webpack://_N_E/./src/components/custom-input/military-status/index.tsx","webpack://_N_E/./src/components/custom-input/multi-select/index.tsx","webpack://_N_E/./src/components/custom-input/name/index.tsx","webpack://_N_E/./src/components/custom-input/occupation/index.tsx","webpack://_N_E/./src/components/custom-input/password/index.tsx","webpack://_N_E/./src/components/custom-input/race/index.tsx","webpack://_N_E/./src/components/custom-input/reason-for-purchase/index.tsx","webpack://_N_E/./src/components/custom-input/select-expected-purchase-period/index.tsx","webpack://_N_E/./src/components/custom-input/ssn/index.tsx","webpack://_N_E/./src/components/custom-input/state/index.tsx","webpack://_N_E/./node_modules/@headlessui/react/dist/components/label/label.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/switch/switch.js","webpack://_N_E/./src/components/custom-input/switch/index.tsx","webpack://_N_E/./src/components/custom-input/text-area/index.tsx","webpack://_N_E/./src/components/custom-input/title/index.tsx","webpack://_N_E/./src/components/custom-input/wished-locations/index.tsx","webpack://_N_E/./src/components/custom-input/zip-code/index.tsx","webpack://_N_E/./src/components/custom-input/date/index.tsx","webpack://_N_E/./src/components/custom-input/index.tsx","webpack://_N_E/./src/components/custom-input/input/index.tsx","webpack://_N_E/./src/components/custom-input/label/index.tsx","webpack://_N_E/./src/components/custom-input/radio/index.tsx","webpack://_N_E/./src/components/custom-input/select/index.tsx","webpack://_N_E/./src/components/custom-input/time-pills/index.tsx","webpack://_N_E/./src/components/dropdown/index.tsx","webpack://_N_E/./src/components/error-message/index.tsx","webpack://_N_E/./src/components/form/index.tsx","webpack://_N_E/./src/components/buyer-plaid-oauth-page/index.tsx","webpack://_N_E/./src/components/code-input-modal/index.tsx","webpack://_N_E/./src/components/icon-button/index.tsx","webpack://_N_E/./src/components/send-code-modal/index.tsx","webpack://_N_E/./src/components/divider/index.tsx","webpack://_N_E/./src/components/input/index.tsx","webpack://_N_E/./src/components/route-protector/index.tsx","webpack://_N_E/./src/components/switch/index.tsx","webpack://_N_E/./src/components/case/index.tsx","webpack://_N_E/./src/components/form/step-components/custom-code-input/index.tsx","webpack://_N_E/./src/components/form/step-components/index.tsx","webpack://_N_E/./src/components/partners-list/index.tsx","webpack://_N_E/./src/components/buyer-signin-form/step1.tsx","webpack://_N_E/./src/components/buyer-signin-form/step2.tsx","webpack://_N_E/./src/components/buyer-signin-form/index.tsx","webpack://_N_E/./src/components/buyer-signup-form/step1.tsx","webpack://_N_E/./src/components/buyer-signup-form/step2.tsx","webpack://_N_E/./src/components/buyer-signup-form/step3.tsx","webpack://_N_E/./src/components/buyer-signup-form/index.tsx","webpack://_N_E/./src/components/suggested-skills/index.tsx","webpack://_N_E/./src/components/skill-tags/index.tsx","webpack://_N_E/./src/components/skills-combobox/index.tsx","webpack://_N_E/./src/components/skill-pills/index.tsx","webpack://_N_E/./src/components/form-wrapper/index.tsx","webpack://_N_E/./src/components/step-highlight/index.tsx","webpack://_N_E/./public/images/error.png","webpack://_N_E/./public/images/error-2.png","webpack://_N_E/./src/components/error-state/index.tsx","webpack://_N_E/./src/components/empty/index.tsx","webpack://_N_E/./src/components/suggestions/index.tsx","webpack://_N_E/./src/components/analyzing-data/index.tsx","webpack://_N_E/./src/components/thank-you/index.tsx","webpack://_N_E/./src/components/app-wrapper/use-auth-route-protector.tsx","webpack://_N_E/./node_modules/react-hubspot-tracking-code-hook/dist/react-hubspot-tracking-code-hook.esm.js","webpack://_N_E/./src/components/app-wrapper/use-hubspot-tracking.tsx","webpack://_N_E/./node_modules/react-idle-timer/dist/index.esm.js","webpack://_N_E/./src/components/app-wrapper/use-idle-logout.tsx","webpack://_N_E/./src/components/app-wrapper/use-keep-mixpanel-session-alive.tsx","webpack://_N_E/./src/components/app-wrapper/use-sync-on-login.tsx","webpack://_N_E/./src/components/app-wrapper/index.tsx","webpack://_N_E/./public/icons/dice-category-other.svg","webpack://_N_E/./public/icons/bank-fees-category.svg","webpack://_N_E/./public/icons/cash-advance-category.svg","webpack://_N_E/./public/icons/community-category.svg","webpack://_N_E/./public/icons/food-and-drink-category.svg","webpack://_N_E/./public/icons/healthcare-category.svg","webpack://_N_E/./public/icons/interest-category.svg","webpack://_N_E/./public/icons/payment-category.svg","webpack://_N_E/./public/icons/recreation-category.svg","webpack://_N_E/./public/icons/service-category.svg","webpack://_N_E/./public/icons/shops-category.svg","webpack://_N_E/./public/icons/tax-category.svg","webpack://_N_E/./public/icons/transfer-category.svg","webpack://_N_E/./public/icons/travel-category.svg","webpack://_N_E/./src/components/finances/monthly-spending/monthly-spending-item.tsx","webpack://_N_E/./src/components/finances/monthly-spending/index.tsx","webpack://_N_E/./src/components/finances/transaction-history/transaction-history-filters.tsx","webpack://_N_E/./src/iconComponents/CheckFilledIcon.tsx","webpack://_N_E/./src/components/finances/transaction-history/transaction-item.tsx","webpack://_N_E/./src/components/finances/transaction-history/index.tsx","webpack://_N_E/./src/components/finances/cash-flow/cash-flow-item.tsx","webpack://_N_E/./src/components/finances/cash-flow/index.tsx","webpack://_N_E/./node_modules/@kurkle/color/dist/color.esm.js","webpack://_N_E/./node_modules/chart.js/dist/chunks/helpers.segment.js","webpack://_N_E/./node_modules/chart.js/dist/chart.js","webpack://_N_E/./node_modules/react-chartjs-2/dist/index.js","webpack://_N_E/./src/components/finances/income-expenses-chart/index.tsx","webpack://_N_E/./src/components/finances/index.tsx","webpack://_N_E/./src/components/filter-pill/index.tsx","webpack://_N_E/./src/components/pagination/index.tsx","webpack://_N_E/./src/components/month-picker/month-modal-content.tsx","webpack://_N_E/./src/components/month-picker/index.tsx","webpack://_N_E/./src/components/index.ts","webpack://_N_E/./src/components/introduction/desktop-introduction/index.tsx","webpack://_N_E/./src/components/introduction/index.tsx","webpack://_N_E/./src/components/introduction/introduction-step/index.tsx","webpack://_N_E/./src/iconComponents/FinancialLiteracyIcon.tsx","webpack://_N_E/./src/iconComponents/MessagesIcon.tsx","webpack://_N_E/./src/components/layout/buyer-layout/menu-link/index.tsx","webpack://_N_E/./src/components/layout/buyer-layout/buyer-layout-menu/index.tsx","webpack://_N_E/./src/components/modal/feedback-modal/index.tsx","webpack://_N_E/./src/components/modal/share-modal/index.tsx","webpack://_N_E/./src/hooks/use-handle-referral-link/index.tsx","webpack://_N_E/./src/components/layout/buyer-layout/buyer-layout-profile-menu/notification-menu/index.tsx","webpack://_N_E/./src/components/layout/buyer-layout/buyer-layout-profile-menu/index.tsx","webpack://_N_E/./src/components/layout/buyer-layout/index.tsx","webpack://_N_E/./src/components/layout/header/user-logo/index.tsx","webpack://_N_E/./src/components/layout/footer/index.tsx","webpack://_N_E/./src/services/client.ts","webpack://_N_E/./src/services/index.ts","webpack://_N_E/./src/components/layout/header/index.tsx","webpack://_N_E/./src/components/layout/index.tsx","webpack://_N_E/./src/components/loading/index.tsx","webpack://_N_E/./src/components/messages/RightPanel.tsx","webpack://_N_E/./src/components/messages/StartConversation.tsx","webpack://_N_E/./src/components/messages/index.tsx","webpack://_N_E/./src/components/modal/dashboard-info-modal/index.tsx","webpack://_N_E/./src/components/modal/full-modal/index.tsx","webpack://_N_E/./src/components/modal/generic-modal/index.tsx","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-tab-direction.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-owner.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-event-listener.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/document-ready.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-on-unmount.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/focus-trap/focus-trap.js","webpack://_N_E/./node_modules/@headlessui/react/dist/internal/portal-force-root.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/portal/portal.js","webpack://_N_E/./node_modules/@headlessui/react/dist/internal/stack-context.js","webpack://_N_E/./node_modules/@headlessui/react/dist/use-sync-external-store-shim/useSyncExternalStoreShimClient.js","webpack://_N_E/./node_modules/@headlessui/react/dist/use-sync-external-store-shim/useSyncExternalStoreShimServer.js","webpack://_N_E/./node_modules/@headlessui/react/dist/use-sync-external-store-shim/index.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-store.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/store.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/document-overflow/adjust-scrollbar-padding.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/document-overflow/handle-ios-locking.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/document-overflow/prevent-scroll.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/document-overflow/overflow-store.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/document-overflow/use-document-overflow.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-inert.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-root-containers.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/dialog/dialog.js","webpack://_N_E/./src/components/modal/index.tsx","webpack://_N_E/./src/components/modal/terms-modal/index.tsx","webpack://_N_E/./node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js","webpack://_N_E/./node_modules/@mui/material/utils/areArraysEqual.js","webpack://_N_E/./node_modules/@mui/material/Slider/useSlider.js","webpack://_N_E/./node_modules/@mui/material/utils/shouldSpreadAdditionalProps.js","webpack://_N_E/./node_modules/@mui/material/Slider/sliderClasses.js","webpack://_N_E/./node_modules/@mui/material/Slider/SliderValueLabel.js","webpack://_N_E/./node_modules/@mui/material/Slider/Slider.js","webpack://_N_E/./src/components/progress/index.tsx","webpack://_N_E/./src/components/rewards/rewards-pop-up-wrapper.tsx","webpack://_N_E/./src/components/settings/settings-desktop-layout/index.tsx","webpack://_N_E/./src/components/settings/settings-feedback/index.tsx","webpack://_N_E/./src/components/settings/delete-account-modal/index.tsx","webpack://_N_E/./src/components/avatar-upload/index.tsx","webpack://_N_E/./src/components/modal/upload-picture-modal/index.tsx","webpack://_N_E/./src/components/address/index.tsx","webpack://_N_E/./src/components/co-borrower/invite-display.tsx","webpack://_N_E/./src/components/co-borrower/CoBorrowerWrapper.tsx","webpack://_N_E/./src/components/co-borrower/index.ts","webpack://_N_E/./src/components/settings/settings-content/index.tsx","webpack://_N_E/./src/components/settings/settings-profile/index.tsx","webpack://_N_E/./node_modules/@firebase/util/dist/index.esm2017.js","webpack://_N_E/./node_modules/@firebase/component/dist/esm/index.esm2017.js","webpack://_N_E/./node_modules/@firebase/logger/dist/esm/index.esm2017.js","webpack://_N_E/./node_modules/@firebase/app/node_modules/idb/build/wrap-idb-value.js","webpack://_N_E/./node_modules/@firebase/app/node_modules/idb/build/index.js","webpack://_N_E/./node_modules/@firebase/app/dist/esm/index.esm2017.js","webpack://_N_E/./node_modules/@firebase/auth/dist/esm2017/index-81415345.js","webpack://_N_E/./node_modules/@firebase/auth/dist/esm2017/index.js","webpack://_N_E/./node_modules/firebase/auth/dist/esm/index.esm.js","webpack://_N_E/./node_modules/firebase/app/dist/esm/index.esm.js","webpack://_N_E/./src/lib/firebase.ts","webpack://_N_E/./src/components/social-logins-v2/index.tsx","webpack://_N_E/./node_modules/i18next/dist/esm/i18next.js","webpack://_N_E/./src/i18n/config.js","webpack://_N_E/./src/context/LanguageContext.tsx","webpack://_N_E/./src/context/RouteContext.tsx","webpack://_N_E/./src/contexts/sidebar-context/index.tsx","webpack://_N_E/./node_modules/intro.js/intro.module.js","webpack://_N_E/./src/contexts/tour-guide/index.tsx","webpack://_N_E/./src/hooks/use-theme/index.ts","webpack://_N_E/./src/hooks/use-click-outside/index.ts","webpack://_N_E/./src/hooks/use-update-profile/index.tsx","webpack://_N_E/./src/hooks/use-array-info/index.ts","webpack://_N_E/./src/hooks/use-sync-data/index.tsx","webpack://_N_E/./src/hooks/use-is-data-ready/index.tsx","webpack://_N_E/./src/hooks/use-notification/index.ts","webpack://_N_E/./src/hooks/index.ts","webpack://_N_E/./src/hooks/use-complete-modal/index.tsx","webpack://_N_E/./src/hooks/use-auth/index.ts","webpack://_N_E/./src/hooks/use-buyer-credit-score/index.tsx","webpack://_N_E/./src/hooks/use-buyer-sign-info/index.tsx","webpack://_N_E/./src/hooks/use-calculate-score/index.tsx","webpack://_N_E/./src/hooks/use-dashboard-modal/index.tsx","webpack://_N_E/./src/hooks/use-dashboard-queries/index.tsx","webpack://_N_E/./src/hooks/use-is-mounted/index.ts","webpack://_N_E/./src/hooks/use-onboarding/index.tsx","webpack://_N_E/./src/lib/gtag.ts","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/message.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/dateTime.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/displayName.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/list.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/number.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/plural.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/relativeTime.js","webpack://_N_E/./node_modules/@formatjs/intl/lib/src/create-intl.js","webpack://_N_E/./node_modules/react-intl/lib/src/components/createIntl.js","webpack://_N_E/./node_modules/react-intl/lib/src/components/provider.js","webpack://_N_E/./src/contexts/locale-provider/locales/en.ts","webpack://_N_E/./src/contexts/locale-provider/locales/index.ts","webpack://_N_E/./src/contexts/locale-provider/index.tsx","webpack://_N_E/./src/contexts/index.ts","webpack://_N_E/./node_modules/@mui/private-theming/useTheme/ThemeContext.js","webpack://_N_E/./node_modules/@mui/private-theming/useTheme/useTheme.js","webpack://_N_E/./node_modules/@mui/private-theming/ThemeProvider/nested.js","webpack://_N_E/./node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js","webpack://_N_E/./node_modules/@mui/system/ThemeProvider/ThemeProvider.js","webpack://_N_E/./node_modules/@mui/material/styles/ThemeProviderNoVars.js","webpack://_N_E/./node_modules/@mui/system/InitColorSchemeScript/InitColorSchemeScript.js","webpack://_N_E/./node_modules/@mui/system/cssVars/useCurrentColorScheme.js","webpack://_N_E/./node_modules/@mui/system/cssVars/createCssVarsProvider.js","webpack://_N_E/./node_modules/@mui/material/InitColorSchemeScript/InitColorSchemeScript.js","webpack://_N_E/./node_modules/@mui/material/styles/ThemeProviderWithVars.js","webpack://_N_E/./node_modules/@mui/material/styles/ThemeProvider.js","webpack://_N_E/./src/styles/theme.ts","webpack://_N_E/./src/pages/_app.tsx","webpack://_N_E/./src/lib/RequestBuilder.ts","webpack://_N_E/./src/services/Api/client.ts","webpack://_N_E/./src/services/Api/controllers/auth.ts","webpack://_N_E/./src/services/Api/controllers/buyer.ts","webpack://_N_E/./src/services/Api/controllers/buyer-credit-report.ts","webpack://_N_E/./src/services/Api/controllers/buyer-debts.ts","webpack://_N_E/./src/services/Api/controllers/buyer-incomes.ts","webpack://_N_E/./src/services/Api/controllers/buyer-plaid-incomes.ts","webpack://_N_E/./src/services/Api/controllers/buyer-plaid-items.ts","webpack://_N_E/./src/services/Api/controllers/buyer-savings.ts","webpack://_N_E/./src/services/Api/controllers/buyer-recommendations.ts","webpack://_N_E/./src/services/Api/controllers/profile.ts","webpack://_N_E/./src/services/Api/controllers/resources.ts","webpack://_N_E/./src/services/Api/controllers/financial-literacy.ts","webpack://_N_E/./src/services/Api/controllers/co-borrower.ts","webpack://_N_E/./src/services/Api/controllers/messages.ts","webpack://_N_E/./src/services/Api/controllers/tracking.ts","webpack://_N_E/./src/services/Api/controllers/index.ts","webpack://_N_E/./src/services/Api/controllers/rewards.ts","webpack://_N_E/./src/services/Api/types.ts","webpack://_N_E/./src/services/Api/index.ts","webpack://_N_E/./src/services/tracking/index.ts","webpack://_N_E/./src/utils/constants.ts","webpack://_N_E/./src/utils/encryptionDecryption.ts","webpack://_N_E/./node_modules/libphonenumber-js/min/exports/getCountries.js","webpack://_N_E/./src/utils/auth.ts","webpack://_N_E/./src/utils/colors.ts","webpack://_N_E/./src/utils/isValidURL.ts","webpack://_N_E/./node_modules/@testing-library/react/dist/@testing-library/react.esm.js","webpack://_N_E/./src/utils/tests.tsx","webpack://_N_E/./src/utils/text.ts","webpack://_N_E/./src/utils/toasts.tsx","webpack://_N_E/./src/utils/index.ts","webpack://_N_E/./src/utils/numbers.ts","webpack://_N_E/./node_modules/next/dist/compiled/buffer/index.js","webpack://_N_E/./node_modules/next/dist/compiled/client-only/index.js","webpack://_N_E/./node_modules/filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css","webpack://_N_E/./node_modules/filepond/dist/filepond.min.css","webpack://_N_E/./node_modules/intro.js/introjs.css","webpack://_N_E/./node_modules/react-chat-elements/dist/main.css","webpack://_N_E/./src/styles/globals.scss","webpack://_N_E/./src/components/loading/loading.module.scss","webpack://_N_E/./node_modules/next/dist/compiled/querystring-es3/index.js","webpack://_N_E/./node_modules/next/head.js","webpack://_N_E/./node_modules/next/image.js","webpack://_N_E/./node_modules/next/link.js","webpack://_N_E/./node_modules/next/router.js","webpack://_N_E/./node_modules/next/script.js","webpack://_N_E/./node_modules/prop-types/factoryWithThrowingShims.js","webpack://_N_E/./node_modules/prop-types/index.js","webpack://_N_E/./node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://_N_E/./node_modules/qs/lib/formats.js","webpack://_N_E/./node_modules/qs/lib/index.js","webpack://_N_E/./node_modules/qs/lib/parse.js","webpack://_N_E/./node_modules/qs/lib/stringify.js","webpack://_N_E/./node_modules/qs/lib/utils.js","webpack://_N_E/./node_modules/react-currency-format/lib/currency-format.js","webpack://_N_E/./node_modules/react-currency-format/lib/utils.js","webpack://_N_E/./node_modules/react-filepond/dist/react-filepond.js","webpack://_N_E/./node_modules/react-google-autocomplete/lib/constants.js","webpack://_N_E/./node_modules/react-google-autocomplete/lib/usePlacesAutocompleteService.js","webpack://_N_E/./node_modules/react-google-autocomplete/lib/utils.js","webpack://_N_E/./node_modules/react-input-mask/index.js","webpack://_N_E/./node_modules/react-input-mask/lib/react-input-mask.production.min.js","webpack://_N_E/./node_modules/react-intl/lib/src/components/injectIntl.js","webpack://_N_E/./node_modules/react-intl/lib/src/components/useIntl.js","webpack://_N_E/./node_modules/react-intl/lib/src/utils.js","webpack://_N_E/./node_modules/react-is/cjs/react-is.production.min.js","webpack://_N_E/./node_modules/react-is/index.js","webpack://_N_E/./node_modules/react-paginate/dist/react-paginate.js","webpack://_N_E/./node_modules/react-phone-input-2/dist/lib.js","webpack://_N_E/./node_modules/react-plaid-link/dist/index.umd.js","webpack://_N_E/./node_modules/react-query/devtools/index.js","webpack://_N_E/./node_modules/react-query/es/core/focusManager.js","webpack://_N_E/./node_modules/react-query/es/core/index.js","webpack://_N_E/./node_modules/react-query/es/core/logger.js","webpack://_N_E/./node_modules/react-query/es/core/mutation.js","webpack://_N_E/./node_modules/react-query/es/core/notifyManager.js","webpack://_N_E/./node_modules/react-query/es/core/onlineManager.js","webpack://_N_E/./node_modules/react-query/es/core/query.js","webpack://_N_E/./node_modules/react-query/es/core/queryCache.js","webpack://_N_E/./node_modules/react-query/es/core/mutationCache.js","webpack://_N_E/./node_modules/react-query/es/core/infiniteQueryBehavior.js","webpack://_N_E/./node_modules/react-query/es/core/queryClient.js","webpack://_N_E/./node_modules/react-query/es/core/retryer.js","webpack://_N_E/./node_modules/react-query/es/core/subscribable.js","webpack://_N_E/./node_modules/react-query/es/core/types.js","webpack://_N_E/./node_modules/react-query/es/core/utils.js","webpack://_N_E/./node_modules/react-query/es/index.js","webpack://_N_E/./node_modules/react-query/es/react/reactBatchedUpdates.js","webpack://_N_E/./node_modules/react-query/es/react/setBatchUpdatesFn.js","webpack://_N_E/./node_modules/react-query/es/react/logger.js","webpack://_N_E/./node_modules/react-query/es/react/setLogger.js","webpack://_N_E/./node_modules/react-query/es/react/QueryClientProvider.js","webpack://_N_E/./node_modules/react-query/es/core/mutationObserver.js","webpack://_N_E/./node_modules/react-query/es/react/utils.js","webpack://_N_E/./node_modules/react-query/es/react/useMutation.js","webpack://_N_E/./node_modules/react-query/es/core/queryObserver.js","webpack://_N_E/./node_modules/react-query/es/react/QueryErrorResetBoundary.js","webpack://_N_E/./node_modules/react-query/es/react/useBaseQuery.js","webpack://_N_E/./node_modules/react-query/es/react/useQuery.js","webpack://_N_E/./node_modules/react-query/es/core/hydration.js","webpack://_N_E/./node_modules/react-query/es/react/Hydrate.js","webpack://_N_E/./node_modules/react-query/es/react/index.js","webpack://_N_E/./node_modules/react-responsive/dist/react-responsive.js","webpack://_N_E/./node_modules/react-slick/lib/arrows.js","webpack://_N_E/./node_modules/react-slick/lib/default-props.js","webpack://_N_E/./node_modules/react-slick/lib/dots.js","webpack://_N_E/./node_modules/react-slick/lib/index.js","webpack://_N_E/./node_modules/react-slick/lib/initial-state.js","webpack://_N_E/./node_modules/react-slick/lib/inner-slider.js","webpack://_N_E/./node_modules/react-slick/lib/slider.js","webpack://_N_E/./node_modules/react-slick/lib/track.js","webpack://_N_E/./node_modules/react-slick/lib/utils/innerSliderUtils.js","webpack://_N_E/./node_modules/react-transition-group/esm/config.js","webpack://_N_E/./node_modules/react-transition-group/esm/Transition.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://_N_E/./node_modules/react-transition-group/esm/utils/ChildMapping.js","webpack://_N_E/./node_modules/react-transition-group/esm/TransitionGroup.js","webpack://_N_E/./node_modules/react-transition-group/esm/TransitionGroupContext.js","webpack://_N_E/./node_modules/react-transition-group/esm/utils/reflow.js","webpack://_N_E/./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack://_N_E/./node_modules/side-channel/index.js","webpack://_N_E/./node_modules/side-channel/node_modules/call-bind/callBound.js","webpack://_N_E/./node_modules/side-channel/node_modules/call-bind/index.js","webpack://_N_E/./node_modules/side-channel/node_modules/function-bind/implementation.js","webpack://_N_E/./node_modules/side-channel/node_modules/function-bind/index.js","webpack://_N_E/./node_modules/side-channel/node_modules/get-intrinsic/index.js","webpack://_N_E/./node_modules/side-channel/node_modules/has-proto/index.js","webpack://_N_E/./node_modules/side-channel/node_modules/object-inspect/index.js","webpack://_N_E/./node_modules/string-convert/camel2hyphen.js","webpack://_N_E/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","webpack://_N_E/./node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","webpack://_N_E/./node_modules/use-sync-external-store/shim/index.js","webpack://_N_E/./node_modules/use-sync-external-store/shim/with-selector.js","webpack://_N_E/./node_modules/void-elements/index.js","webpack://_N_E/./node_modules/warning/warning.js","webpack://_N_E/ignored|/codebuild/output/src788134678/src/front-end-react/node_modules/crypto-js|crypto","webpack://_N_E/ignored|/codebuild/output/src788134678/src/front-end-react/node_modules/side-channel/node_modules/object-inspect|./util.inspect","webpack://_N_E/./node_modules/@babel/runtime/helpers/interopRequireDefault.js","webpack://_N_E/./node_modules/classnames/index.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://_N_E/./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","webpack://_N_E/./node_modules/@formatjs/intl/node_modules/tslib/tslib.es6.mjs","webpack://_N_E/./node_modules/@mui/system/node_modules/clsx/dist/clsx.mjs","webpack://_N_E/./node_modules/@swc/helpers/esm/_tagged_template_literal.js","webpack://_N_E/./node_modules/axios/lib/helpers/bind.js","webpack://_N_E/./node_modules/axios/lib/utils.js","webpack://_N_E/./node_modules/axios/lib/core/AxiosError.js","webpack://_N_E/./node_modules/axios/lib/helpers/null.js","webpack://_N_E/./node_modules/axios/lib/helpers/toFormData.js","webpack://_N_E/./node_modules/axios/lib/helpers/AxiosURLSearchParams.js","webpack://_N_E/./node_modules/axios/lib/helpers/buildURL.js","webpack://_N_E/./node_modules/axios/lib/core/InterceptorManager.js","webpack://_N_E/./node_modules/axios/lib/defaults/transitional.js","webpack://_N_E/./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","webpack://_N_E/./node_modules/axios/lib/platform/browser/classes/FormData.js","webpack://_N_E/./node_modules/axios/lib/platform/browser/classes/Blob.js","webpack://_N_E/./node_modules/axios/lib/platform/browser/index.js","webpack://_N_E/./node_modules/axios/lib/platform/common/utils.js","webpack://_N_E/./node_modules/axios/lib/platform/index.js","webpack://_N_E/./node_modules/axios/lib/helpers/toURLEncodedForm.js","webpack://_N_E/./node_modules/axios/lib/helpers/formDataToJSON.js","webpack://_N_E/./node_modules/axios/lib/defaults/index.js","webpack://_N_E/./node_modules/axios/lib/helpers/parseHeaders.js","webpack://_N_E/./node_modules/axios/lib/core/AxiosHeaders.js","webpack://_N_E/./node_modules/axios/lib/core/transformData.js","webpack://_N_E/./node_modules/axios/lib/cancel/isCancel.js","webpack://_N_E/./node_modules/axios/lib/cancel/CanceledError.js","webpack://_N_E/./node_modules/axios/lib/core/settle.js","webpack://_N_E/./node_modules/axios/lib/helpers/parseProtocol.js","webpack://_N_E/./node_modules/axios/lib/helpers/speedometer.js","webpack://_N_E/./node_modules/axios/lib/helpers/throttle.js","webpack://_N_E/./node_modules/axios/lib/helpers/progressEventReducer.js","webpack://_N_E/./node_modules/axios/lib/helpers/isURLSameOrigin.js","webpack://_N_E/./node_modules/axios/lib/helpers/cookies.js","webpack://_N_E/./node_modules/axios/lib/helpers/isAbsoluteURL.js","webpack://_N_E/./node_modules/axios/lib/helpers/combineURLs.js","webpack://_N_E/./node_modules/axios/lib/core/buildFullPath.js","webpack://_N_E/./node_modules/axios/lib/core/mergeConfig.js","webpack://_N_E/./node_modules/axios/lib/helpers/resolveConfig.js","webpack://_N_E/./node_modules/axios/lib/adapters/xhr.js","webpack://_N_E/./node_modules/axios/lib/helpers/composeSignals.js","webpack://_N_E/./node_modules/axios/lib/helpers/trackStream.js","webpack://_N_E/./node_modules/axios/lib/adapters/fetch.js","webpack://_N_E/./node_modules/axios/lib/adapters/adapters.js","webpack://_N_E/./node_modules/axios/lib/core/dispatchRequest.js","webpack://_N_E/./node_modules/axios/lib/env/data.js","webpack://_N_E/./node_modules/axios/lib/helpers/validator.js","webpack://_N_E/./node_modules/axios/lib/core/Axios.js","webpack://_N_E/./node_modules/axios/lib/cancel/CancelToken.js","webpack://_N_E/./node_modules/axios/lib/helpers/spread.js","webpack://_N_E/./node_modules/axios/lib/helpers/isAxiosError.js","webpack://_N_E/./node_modules/axios/lib/helpers/HttpStatusCode.js","webpack://_N_E/./node_modules/axios/lib/axios.js","webpack://_N_E/./node_modules/intl-messageformat/node_modules/tslib/tslib.es6.mjs","webpack://_N_E/./node_modules/libphonenumber-js/es6/isValid.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/getPossibleCountriesForNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/getIddPrefix.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/RFC3966.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/format.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/PhoneNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/constants.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/getCountries.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/applyInternationalSeparatorStyle.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/mergeArrays.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/checkNumberLength.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCode.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extractNationalNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extractNationalNumberFromPossiblyIncompleteNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/formatNationalNumberUsingFormat.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/getCountryByCallingCode.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/getCountryByNationalNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/getNumberType.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/isObject.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/matchesEntirely.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/parseDigits.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/stripIddPrefix.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/isPossible.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/tools/semver-compare.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/metadata.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/normalizeArguments.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/parseIncompletePhoneNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/ParseError.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extension/createExtensionPattern.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/isViablePhoneNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extension/extractExtension.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extractPhoneContext.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/parse.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/parsePhoneNumberWithError_.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/parsePhoneNumber_.js","webpack://_N_E/./node_modules/libphonenumber-js/metadata.min.json.js","webpack://_N_E/./node_modules/libphonenumber-js/min/exports/getCountryCallingCode.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/isValidPhoneNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/min/exports/isValidPhoneNumber.js","webpack://_N_E/./node_modules/libphonenumber-js/min/exports/withMetadataArgument.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/description/description.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/keyboard.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/get-text-value.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-text-value.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/listbox/listbox.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/once.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/transitions/utils/transition.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-transition.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-flags.js","webpack://_N_E/./node_modules/@headlessui/react/dist/components/transitions/transition.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-computed.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-controllable.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-disposables.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-event.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-id.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-is-mounted.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-latest-value.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-document-event.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-outside-click.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-server-handoff-complete.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-sync-refs.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-tracked-pointer.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-watch.js","webpack://_N_E/./node_modules/@headlessui/react/dist/hooks/use-window-event.js","webpack://_N_E/./node_modules/@headlessui/react/dist/internal/hidden.js","webpack://_N_E/./node_modules/@headlessui/react/dist/internal/open-closed.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/bugs.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/calculate-active-index.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/class-names.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/disposables.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/env.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/focus-management.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/form.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/match.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/micro-task.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/owner.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/platform.js","webpack://_N_E/./node_modules/@headlessui/react/dist/utils/render.js","webpack://_N_E/./node_modules/@mui/material/node_modules/clsx/dist/clsx.mjs","webpack://_N_E/./node_modules/react-hook-form/dist/index.esm.mjs","webpack://_N_E/./node_modules/goober/dist/goober.modern.js","webpack://_N_E/./node_modules/react-hot-toast/dist/index.mjs","webpack://_N_E/./node_modules/html-parse-stringify/dist/html-parse-stringify.module.js","webpack://_N_E/./node_modules/react-i18next/dist/es/utils.js","webpack://_N_E/./node_modules/react-i18next/dist/es/unescape.js","webpack://_N_E/./node_modules/react-i18next/dist/es/defaults.js","webpack://_N_E/./node_modules/react-i18next/dist/es/TransWithoutContext.js","webpack://_N_E/./node_modules/react-i18next/dist/es/i18nInstance.js","webpack://_N_E/./node_modules/react-i18next/dist/es/initReactI18next.js","webpack://_N_E/./node_modules/react-i18next/dist/es/context.js","webpack://_N_E/./node_modules/react-i18next/dist/es/Trans.js","webpack://_N_E/./node_modules/react-i18next/dist/es/useTranslation.js","webpack://_N_E/./node_modules/react-i18next/dist/es/withTranslation.js","webpack://_N_E/./node_modules/react-i18next/dist/es/Translation.js","webpack://_N_E/./node_modules/react-i18next/dist/es/I18nextProvider.js","webpack://_N_E/./node_modules/react-i18next/dist/es/useSSR.js","webpack://_N_E/./node_modules/react-i18next/dist/es/withSSR.js","webpack://_N_E/./node_modules/react-i18next/dist/es/index.js","webpack://_N_E/./node_modules/react-intl/node_modules/tslib/tslib.es6.mjs","webpack://_N_E/./node_modules/react-phone-number-input/locale/en.json.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/parsePhoneNumber.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/libphonenumber/formatPhoneNumber.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/PropTypes.js","webpack://_N_E/./node_modules/input-format/modules/edit.js","webpack://_N_E/./node_modules/input-format/modules/parse.js","webpack://_N_E/./node_modules/input-format/modules/helpers.js","webpack://_N_E/./node_modules/input-format/modules/closeBraces.js","webpack://_N_E/./node_modules/input-format/modules/templateFormatter.js","webpack://_N_E/./node_modules/input-format/modules/format.js","webpack://_N_E/./node_modules/input-format/modules/dom.js","webpack://_N_E/./node_modules/input-format/modules/inputControl.js","webpack://_N_E/./node_modules/input-format/modules/react/Input.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouTypeState.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouTypeFormatter.util.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouTypeFormatter.complete.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternParser.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouTypeFormatter.PatternMatcher.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouTypeFormatter.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouTypeParser.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/AsYouType.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/helpers/inputValuePrefix.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/helpers/parsePhoneNumberCharacter.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/useInputKeyDownHandler.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/InputSmart.js","webpack://_N_E/./node_modules/libphonenumber-js/es6/formatIncompletePhoneNumber.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/InputBasic.js","webpack://_N_E/./node_modules/country-flag-icons/modules/unicode.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/CountrySelect.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/Flag.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/InternationalIcon.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/helpers/isE164Number.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/helpers/countries.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/CountryIcon.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/useExternalRef.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/helpers/getInternationalPhoneNumberPrefix.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/helpers/phoneInputHelpers.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/helpers/getPhoneInputWithCountryStateUpdateFromNewProps.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/PhoneInputWithCountry.js","webpack://_N_E/./node_modules/react-phone-number-input/modules/PhoneInputWithCountryDefault.js","webpack://_N_E/./node_modules/react-phone-number-input/min/index.js","webpack://_N_E/./node_modules/engine.io-parser/build/esm/commons.js","webpack://_N_E/./node_modules/engine.io-parser/build/esm/encodePacket.browser.js","webpack://_N_E/./node_modules/engine.io-parser/build/esm/contrib/base64-arraybuffer.js","webpack://_N_E/./node_modules/engine.io-parser/build/esm/decodePacket.browser.js","webpack://_N_E/./node_modules/engine.io-parser/build/esm/index.js","webpack://_N_E/./node_modules/@socket.io/component-emitter/lib/esm/index.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/globalThis.browser.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/util.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/contrib/parseqs.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/transport.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/contrib/yeast.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/contrib/has-cors.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/transports/xmlhttprequest.browser.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/transports/polling.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/transports/websocket-constructor.browser.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/transports/websocket.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/transports/webtransport.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/transports/index.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/contrib/parseuri.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/socket.js","webpack://_N_E/./node_modules/engine.io-client/build/esm/index.js","webpack://_N_E/./node_modules/socket.io-client/build/esm/url.js","webpack://_N_E/./node_modules/socket.io-parser/build/esm/is-binary.js","webpack://_N_E/./node_modules/socket.io-parser/build/esm/binary.js","webpack://_N_E/./node_modules/socket.io-parser/build/esm/index.js","webpack://_N_E/./node_modules/socket.io-client/build/esm/on.js","webpack://_N_E/./node_modules/socket.io-client/build/esm/socket.js","webpack://_N_E/./node_modules/socket.io-client/build/esm/contrib/backo2.js","webpack://_N_E/./node_modules/socket.io-client/build/esm/manager.js","webpack://_N_E/./node_modules/socket.io-client/build/esm/index.js","webpack://_N_E/./node_modules/tslib/tslib.es6.mjs","webpack://_N_E/./node_modules/zustand/esm/vanilla.mjs","webpack://_N_E/./node_modules/zustand/esm/index.mjs","webpack://_N_E/./node_modules/zustand/esm/middleware.mjs"],"sourcesContent":["var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil â¤ï¸\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n\n return undefined;\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value,\n parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function\n /*: EmotionCache */\ncreateCache(options\n/*: Options */\n) {\n var key = options.key;\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node\n /*: HTMLStyleElement */\n ) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n /* : Node */\n\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node\n /*: HTMLStyleElement */\n ) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n /*: (\n selector: string,\n serialized: SerializedStyles,\n sheet: StyleSheet,\n shouldCache: boolean\n ) => string | void */\n\n\n var omnipresentPlugins = [compat, removeLabel];\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function\n /*: void */\n insert(selector\n /*: string */\n , serialized\n /*: SerializedStyles */\n , sheet\n /*: StyleSheet */\n , shouldCache\n /*: boolean */\n ) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache\n /*: EmotionCache */\n = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\n/* import { type EmotionCache } from '@emotion/utils' */\nvar EmotionCacheContext\n/*: React.Context<EmotionCache | null> */\n= /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache()\n/*: EmotionCache | null*/\n{\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache\n/* <Props, Ref: React.Ref<*>> */\n(func\n/*: (props: Props, cache: EmotionCache, ref: Ref) => React.Node */\n)\n/*: React.AbstractComponent<Props> */\n{\n return /*#__PURE__*/forwardRef(function (props\n /*: Props */\n , ref\n /*: Ref */\n ) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme\n/*: Object */\n, theme\n/*: Object | (Object => Object) */\n) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\n/*\ntype ThemeProviderProps = {\n theme: Object | (Object => Object),\n children: React.Node\n}\n*/\n\nvar ThemeProvider = function ThemeProvider(props\n/*: ThemeProviderProps */\n) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme\n/* <Config: {}> */\n(Component\n/*: React.AbstractComponent<Config> */\n)\n/*: React.AbstractComponent<$Diff<Config, { theme: Object }>> */\n{\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n };\n\n var WithTheme = /*#__PURE__*/React.forwardRef(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type\n/*: React.ElementType */\n, props\n/*: Object */\n) {\n\n var newProps\n /*: any */\n = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(\n/* <any, any> */\nfunction (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwn.call(props, key) && key !== 'css' && key !== typePropName && (!isDevelopment )) {\n newProps[key] = props[key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isDevelopment as i, useTheme as u, withEmotionCache as w };\n","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isDevelopment } from './emotion-element-5486c51c.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-5486c51c.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar jsx\n/*: typeof React.createElement */\n= function jsx\n/*: typeof React.createElement */\n(type\n/*: React.ElementType */\n, props\n/*: Object */\n) {\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global\n/*: React.AbstractComponent<\nGlobalProps\n> */\n= /* #__PURE__ */withEmotionCache(function (props\n/*: GlobalProps */\n, cache) {\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node\n /*: HTMLStyleElement | null*/\n = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other <Global/>s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\n/* import type { Interpolation, SerializedStyles } from '@emotion/utils' */\n\nfunction css()\n/*: SerializedStyles */\n{\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\n/*\ntype Keyframes = {|\n name: string,\n styles: string,\n anim: 1,\n toString: () => string\n|} & string\n*/\n\nvar keyframes = function\n /*: Keyframes */\nkeyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n};\n\n/*\ntype ClassNameArg =\n | string\n | boolean\n | { [key: string]: boolean }\n | Array<ClassNameArg>\n | null\n | void\n*/\n\nvar classnames = function\n /*: string */\nclassnames(args\n/*: Array<ClassNameArg> */\n) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered\n/*: Object */\n, css\n/*: (...args: Array<any>) => string */\n, className\n/*: string */\n) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n/*\ntype Props = {\n children: ({\n css: (...args: any) => string,\n cx: (...args: Array<ClassNameArg>) => string,\n theme: Object\n }) => React.Node\n} */\n\n\nvar ClassNames\n/*: React.AbstractComponent<Props>*/\n= /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;\\n{]+)\\s*(;|$)/g;\n// keyframes are stored on the SerializedStyles object as a linked list\n\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n }\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\n/* import type {\n ElementType,\n StatelessFunctionalComponent,\n AbstractComponent\n} from 'react' */\n/*\nexport type Interpolations = Array<any>\n\nexport type StyledElementType<Props> =\n | string\n | AbstractComponent<{ ...Props, className: string }, mixed>\n\nexport type StyledOptions = {\n label?: string,\n shouldForwardProp?: string => boolean,\n target?: string\n}\n\nexport type StyledComponent<Props> = StatelessFunctionalComponent<Props> & {\n defaultProps: any,\n toString: () => string,\n withComponent: (\n nextTag: StyledElementType<Props>,\n nextOptions?: StyledOptions\n ) => StyledComponent<Props>\n}\n\nexport type PrivateStyledComponent<Props> = StyledComponent<Props> & {\n __emotion_real: StyledComponent<Props>,\n __emotion_base: any,\n __emotion_styles: any,\n __emotion_forwardProp: any\n}\n*/\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key\n/*: string */\n) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag\n/*: ElementType */\n) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag\n/*: PrivateStyledComponent<any> */\n, options\n/*: StyledOptions | void */\n, isReal\n/*: boolean */\n) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName\n /*: string */\n ) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n/*\nexport type CreateStyledComponent = <Props>(\n ...args: Interpolations\n) => StyledComponent<Props>\n\nexport type CreateStyled = {\n <Props>(\n tag: StyledElementType<Props>,\n options?: StyledOptions\n ): (...args: Interpolations) => StyledComponent<Props>,\n [key: string]: CreateStyledComponent,\n bind: () => CreateStyled\n}\n*/\n\nvar isDevelopment = false;\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled\n/*: CreateStyled */\n= function createStyled\n/*: CreateStyled */\n(tag\n/*: any */\n, options\n/* ?: StyledOptions */\n) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n /* return function<Props>(): PrivateStyledComponent<Props> { */\n\n return function () {\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n styles.push.apply(styles, args);\n } else {\n\n styles.push(args[0][0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], args[0][i]);\n }\n }\n\n var Styled\n /*: PrivateStyledComponent<Props> */\n = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag\n /*: StyledElementType<Props> */\n , nextOptions\n /* ?: StyledOptions */\n ) {\n return createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n })).apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport 'react';\nimport '@emotion/is-prop-valid';\nimport '@emotion/react';\nimport '@emotion/utils';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\nvar newStyled = createStyled.bind();\ntags.forEach(function (tagName) {\n newStyled[tagName] = newStyled(tagName);\n});\n\nexport { newStyled as default };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","//\n// Main\n//\nexport function memoize(fn, options) {\n var cache = options && options.cache ? options.cache : cacheDefault;\n var serializer = options && options.serializer ? options.serializer : serializerDefault;\n var strategy = options && options.strategy ? options.strategy : strategyDefault;\n return strategy(fn, {\n cache: cache,\n serializer: serializer,\n });\n}\n//\n// Strategy\n//\nfunction isPrimitive(value) {\n return (value == null || typeof value === 'number' || typeof value === 'boolean'); // || typeof value === \"string\" 'unsafe' primitive for our needs\n}\nfunction monadic(fn, cache, serializer, arg) {\n var cacheKey = isPrimitive(arg) ? arg : serializer(arg);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.call(this, arg);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction variadic(fn, cache, serializer) {\n var args = Array.prototype.slice.call(arguments, 3);\n var cacheKey = serializer(args);\n var computedValue = cache.get(cacheKey);\n if (typeof computedValue === 'undefined') {\n computedValue = fn.apply(this, args);\n cache.set(cacheKey, computedValue);\n }\n return computedValue;\n}\nfunction assemble(fn, context, strategy, cache, serialize) {\n return strategy.bind(context, fn, cache, serialize);\n}\nfunction strategyDefault(fn, options) {\n var strategy = fn.length === 1 ? monadic : variadic;\n return assemble(fn, this, strategy, options.cache.create(), options.serializer);\n}\nfunction strategyVariadic(fn, options) {\n return assemble(fn, this, variadic, options.cache.create(), options.serializer);\n}\nfunction strategyMonadic(fn, options) {\n return assemble(fn, this, monadic, options.cache.create(), options.serializer);\n}\n//\n// Serializer\n//\nvar serializerDefault = function () {\n return JSON.stringify(arguments);\n};\n//\n// Cache\n//\nvar ObjectWithoutPrototypeCache = /** @class */ (function () {\n function ObjectWithoutPrototypeCache() {\n this.cache = Object.create(null);\n }\n ObjectWithoutPrototypeCache.prototype.get = function (key) {\n return this.cache[key];\n };\n ObjectWithoutPrototypeCache.prototype.set = function (key, value) {\n this.cache[key] = value;\n };\n return ObjectWithoutPrototypeCache;\n}());\nvar cacheDefault = {\n create: function create() {\n return new ObjectWithoutPrototypeCache();\n },\n};\nexport var strategies = {\n variadic: strategyVariadic,\n monadic: strategyMonadic,\n};\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export var ErrorKind;\n(function (ErrorKind) {\n /** Argument is unclosed (e.g. `{0`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_CLOSING_BRACE\"] = 1] = \"EXPECT_ARGUMENT_CLOSING_BRACE\";\n /** Argument is empty (e.g. `{}`). */\n ErrorKind[ErrorKind[\"EMPTY_ARGUMENT\"] = 2] = \"EMPTY_ARGUMENT\";\n /** Argument is malformed (e.g. `{foo!}``) */\n ErrorKind[ErrorKind[\"MALFORMED_ARGUMENT\"] = 3] = \"MALFORMED_ARGUMENT\";\n /** Expect an argument type (e.g. `{foo,}`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_TYPE\"] = 4] = \"EXPECT_ARGUMENT_TYPE\";\n /** Unsupported argument type (e.g. `{foo,foo}`) */\n ErrorKind[ErrorKind[\"INVALID_ARGUMENT_TYPE\"] = 5] = \"INVALID_ARGUMENT_TYPE\";\n /** Expect an argument style (e.g. `{foo, number, }`) */\n ErrorKind[ErrorKind[\"EXPECT_ARGUMENT_STYLE\"] = 6] = \"EXPECT_ARGUMENT_STYLE\";\n /** The number skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_NUMBER_SKELETON\"] = 7] = \"INVALID_NUMBER_SKELETON\";\n /** The date time skeleton is invalid. */\n ErrorKind[ErrorKind[\"INVALID_DATE_TIME_SKELETON\"] = 8] = \"INVALID_DATE_TIME_SKELETON\";\n /** Exepct a number skeleton following the `::` (e.g. `{foo, number, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_NUMBER_SKELETON\"] = 9] = \"EXPECT_NUMBER_SKELETON\";\n /** Exepct a date time skeleton following the `::` (e.g. `{foo, date, ::}`) */\n ErrorKind[ErrorKind[\"EXPECT_DATE_TIME_SKELETON\"] = 10] = \"EXPECT_DATE_TIME_SKELETON\";\n /** Unmatched apostrophes in the argument style (e.g. `{foo, number, 'test`) */\n ErrorKind[ErrorKind[\"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\"] = 11] = \"UNCLOSED_QUOTE_IN_ARGUMENT_STYLE\";\n /** Missing select argument options (e.g. `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_OPTIONS\"] = 12] = \"EXPECT_SELECT_ARGUMENT_OPTIONS\";\n /** Expecting an offset value in `plural` or `selectordinal` argument (e.g `{foo, plural, offset}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 13] = \"EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Offset value in `plural` or `selectordinal` is invalid (e.g. `{foo, plural, offset: x}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\"] = 14] = \"INVALID_PLURAL_ARGUMENT_OFFSET_VALUE\";\n /** Expecting a selector in `select` argument (e.g `{foo, select}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR\"] = 15] = \"EXPECT_SELECT_ARGUMENT_SELECTOR\";\n /** Expecting a selector in `plural` or `selectordinal` argument (e.g `{foo, plural}`) */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR\"] = 16] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR\";\n /** Expecting a message fragment after the `select` selector (e.g. `{foo, select, apple}`) */\n ErrorKind[ErrorKind[\"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\"] = 17] = \"EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\";\n /**\n * Expecting a message fragment after the `plural` or `selectordinal` selector\n * (e.g. `{foo, plural, one}`)\n */\n ErrorKind[ErrorKind[\"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\"] = 18] = \"EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT\";\n /** Selector in `plural` or `selectordinal` is malformed (e.g. `{foo, plural, =x {#}}`) */\n ErrorKind[ErrorKind[\"INVALID_PLURAL_ARGUMENT_SELECTOR\"] = 19] = \"INVALID_PLURAL_ARGUMENT_SELECTOR\";\n /**\n * Duplicate selectors in `plural` or `selectordinal` argument.\n * (e.g. {foo, plural, one {#} one {#}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\"] = 20] = \"DUPLICATE_PLURAL_ARGUMENT_SELECTOR\";\n /** Duplicate selectors in `select` argument.\n * (e.g. {foo, select, apple {apple} apple {apple}})\n */\n ErrorKind[ErrorKind[\"DUPLICATE_SELECT_ARGUMENT_SELECTOR\"] = 21] = \"DUPLICATE_SELECT_ARGUMENT_SELECTOR\";\n /** Plural or select argument option must have `other` clause. */\n ErrorKind[ErrorKind[\"MISSING_OTHER_CLAUSE\"] = 22] = \"MISSING_OTHER_CLAUSE\";\n /** The tag is malformed. (e.g. `<bold!>foo</bold!>) */\n ErrorKind[ErrorKind[\"INVALID_TAG\"] = 23] = \"INVALID_TAG\";\n /** The tag name is invalid. (e.g. `<123>foo</123>`) */\n ErrorKind[ErrorKind[\"INVALID_TAG_NAME\"] = 25] = \"INVALID_TAG_NAME\";\n /** The closing tag does not match the opening tag. (e.g. `<bold>foo</italic>`) */\n ErrorKind[ErrorKind[\"UNMATCHED_CLOSING_TAG\"] = 26] = \"UNMATCHED_CLOSING_TAG\";\n /** The opening tag has unmatched closing tag. (e.g. `<bold>foo`) */\n ErrorKind[ErrorKind[\"UNCLOSED_TAG\"] = 27] = \"UNCLOSED_TAG\";\n})(ErrorKind || (ErrorKind = {}));\n","export var TYPE;\n(function (TYPE) {\n /**\n * Raw text\n */\n TYPE[TYPE[\"literal\"] = 0] = \"literal\";\n /**\n * Variable w/o any format, e.g `var` in `this is a {var}`\n */\n TYPE[TYPE[\"argument\"] = 1] = \"argument\";\n /**\n * Variable w/ number format\n */\n TYPE[TYPE[\"number\"] = 2] = \"number\";\n /**\n * Variable w/ date format\n */\n TYPE[TYPE[\"date\"] = 3] = \"date\";\n /**\n * Variable w/ time format\n */\n TYPE[TYPE[\"time\"] = 4] = \"time\";\n /**\n * Variable w/ select format\n */\n TYPE[TYPE[\"select\"] = 5] = \"select\";\n /**\n * Variable w/ plural format\n */\n TYPE[TYPE[\"plural\"] = 6] = \"plural\";\n /**\n * Only possible within plural argument.\n * This is the `#` symbol that will be substituted with the count.\n */\n TYPE[TYPE[\"pound\"] = 7] = \"pound\";\n /**\n * XML-like tag\n */\n TYPE[TYPE[\"tag\"] = 8] = \"tag\";\n})(TYPE || (TYPE = {}));\nexport var SKELETON_TYPE;\n(function (SKELETON_TYPE) {\n SKELETON_TYPE[SKELETON_TYPE[\"number\"] = 0] = \"number\";\n SKELETON_TYPE[SKELETON_TYPE[\"dateTime\"] = 1] = \"dateTime\";\n})(SKELETON_TYPE || (SKELETON_TYPE = {}));\n/**\n * Type Guards\n */\nexport function isLiteralElement(el) {\n return el.type === TYPE.literal;\n}\nexport function isArgumentElement(el) {\n return el.type === TYPE.argument;\n}\nexport function isNumberElement(el) {\n return el.type === TYPE.number;\n}\nexport function isDateElement(el) {\n return el.type === TYPE.date;\n}\nexport function isTimeElement(el) {\n return el.type === TYPE.time;\n}\nexport function isSelectElement(el) {\n return el.type === TYPE.select;\n}\nexport function isPluralElement(el) {\n return el.type === TYPE.plural;\n}\nexport function isPoundElement(el) {\n return el.type === TYPE.pound;\n}\nexport function isTagElement(el) {\n return el.type === TYPE.tag;\n}\nexport function isNumberSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.number);\n}\nexport function isDateTimeSkeleton(el) {\n return !!(el && typeof el === 'object' && el.type === SKELETON_TYPE.dateTime);\n}\nexport function createLiteralElement(value) {\n return {\n type: TYPE.literal,\n value: value,\n };\n}\nexport function createNumberElement(value, style) {\n return {\n type: TYPE.number,\n value: value,\n style: style,\n };\n}\n","// @generated from regex-gen.ts\nexport var SPACE_SEPARATOR_REGEX = /[ \\xA0\\u1680\\u2000-\\u200A\\u202F\\u205F\\u3000]/;\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/;\n","/**\n * https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js\n * with some tweaks\n */\nvar DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;\n/**\n * Parse Date time skeleton into Intl.DateTimeFormatOptions\n * Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * @public\n * @param skeleton skeleton string\n */\nexport function parseDateTimeSkeleton(skeleton) {\n var result = {};\n skeleton.replace(DATE_TIME_REGEX, function (match) {\n var len = match.length;\n switch (match[0]) {\n // Era\n case 'G':\n result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n // Year\n case 'y':\n result.year = len === 2 ? '2-digit' : 'numeric';\n break;\n case 'Y':\n case 'u':\n case 'U':\n case 'r':\n throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');\n // Quarter\n case 'q':\n case 'Q':\n throw new RangeError('`q/Q` (quarter) patterns are not supported');\n // Month\n case 'M':\n case 'L':\n result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];\n break;\n // Week\n case 'w':\n case 'W':\n throw new RangeError('`w/W` (week) patterns are not supported');\n case 'd':\n result.day = ['numeric', '2-digit'][len - 1];\n break;\n case 'D':\n case 'F':\n case 'g':\n throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');\n // Weekday\n case 'E':\n result.weekday = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';\n break;\n case 'e':\n if (len < 4) {\n throw new RangeError('`e..eee` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n case 'c':\n if (len < 4) {\n throw new RangeError('`c..ccc` (weekday) patterns are not supported');\n }\n result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];\n break;\n // Period\n case 'a': // AM, PM\n result.hour12 = true;\n break;\n case 'b': // am, pm, noon, midnight\n case 'B': // flexible day periods\n throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');\n // Hour\n case 'h':\n result.hourCycle = 'h12';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'H':\n result.hourCycle = 'h23';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'K':\n result.hourCycle = 'h11';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'k':\n result.hourCycle = 'h24';\n result.hour = ['numeric', '2-digit'][len - 1];\n break;\n case 'j':\n case 'J':\n case 'C':\n throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');\n // Minute\n case 'm':\n result.minute = ['numeric', '2-digit'][len - 1];\n break;\n // Second\n case 's':\n result.second = ['numeric', '2-digit'][len - 1];\n break;\n case 'S':\n case 'A':\n throw new RangeError('`S/A` (second) patterns are not supported, use `s` instead');\n // Zone\n case 'z': // 1..3, 4: specific non-location format\n result.timeZoneName = len < 4 ? 'short' : 'long';\n break;\n case 'Z': // 1..3, 4, 5: The ISO8601 varios formats\n case 'O': // 1, 4: milliseconds in day short, long\n case 'v': // 1, 4: generic non-location format\n case 'V': // 1, 2, 3, 4: time zone ID or city\n case 'X': // 1, 2, 3, 4: The ISO8601 varios formats\n case 'x': // 1, 2, 3, 4: The ISO8601 varios formats\n throw new RangeError('`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead');\n }\n return '';\n });\n return result;\n}\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","// @generated from regex-gen.ts\nexport var WHITE_SPACE_REGEX = /[\\t-\\r \\x85\\u200E\\u200F\\u2028\\u2029]/i;\n","import { __assign } from \"tslib\";\nimport { WHITE_SPACE_REGEX } from './regex.generated';\nexport function parseNumberSkeletonFromString(skeleton) {\n if (skeleton.length === 0) {\n throw new Error('Number skeleton cannot be empty');\n }\n // Parse the skeleton\n var stringTokens = skeleton\n .split(WHITE_SPACE_REGEX)\n .filter(function (x) { return x.length > 0; });\n var tokens = [];\n for (var _i = 0, stringTokens_1 = stringTokens; _i < stringTokens_1.length; _i++) {\n var stringToken = stringTokens_1[_i];\n var stemAndOptions = stringToken.split('/');\n if (stemAndOptions.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n var stem = stemAndOptions[0], options = stemAndOptions.slice(1);\n for (var _a = 0, options_1 = options; _a < options_1.length; _a++) {\n var option = options_1[_a];\n if (option.length === 0) {\n throw new Error('Invalid number skeleton');\n }\n }\n tokens.push({ stem: stem, options: options });\n }\n return tokens;\n}\nfunction icuUnitToEcma(unit) {\n return unit.replace(/^(.*?)-/, '');\n}\nvar FRACTION_PRECISION_REGEX = /^\\.(?:(0+)(\\*)?|(#+)|(0+)(#+))$/g;\nvar SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\\+|#+)?[rs]?$/g;\nvar INTEGER_WIDTH_REGEX = /(\\*)(0+)|(#+)(0+)|(0+)/g;\nvar CONCISE_INTEGER_WIDTH_REGEX = /^(0+)$/;\nfunction parseSignificantPrecision(str) {\n var result = {};\n if (str[str.length - 1] === 'r') {\n result.roundingPriority = 'morePrecision';\n }\n else if (str[str.length - 1] === 's') {\n result.roundingPriority = 'lessPrecision';\n }\n str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {\n // @@@ case\n if (typeof g2 !== 'string') {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits = g1.length;\n }\n // @@@+ case\n else if (g2 === '+') {\n result.minimumSignificantDigits = g1.length;\n }\n // .### case\n else if (g1[0] === '#') {\n result.maximumSignificantDigits = g1.length;\n }\n // .@@## or .@@@ case\n else {\n result.minimumSignificantDigits = g1.length;\n result.maximumSignificantDigits =\n g1.length + (typeof g2 === 'string' ? g2.length : 0);\n }\n return '';\n });\n return result;\n}\nfunction parseSign(str) {\n switch (str) {\n case 'sign-auto':\n return {\n signDisplay: 'auto',\n };\n case 'sign-accounting':\n case '()':\n return {\n currencySign: 'accounting',\n };\n case 'sign-always':\n case '+!':\n return {\n signDisplay: 'always',\n };\n case 'sign-accounting-always':\n case '()!':\n return {\n signDisplay: 'always',\n currencySign: 'accounting',\n };\n case 'sign-except-zero':\n case '+?':\n return {\n signDisplay: 'exceptZero',\n };\n case 'sign-accounting-except-zero':\n case '()?':\n return {\n signDisplay: 'exceptZero',\n currencySign: 'accounting',\n };\n case 'sign-never':\n case '+_':\n return {\n signDisplay: 'never',\n };\n }\n}\nfunction parseConciseScientificAndEngineeringStem(stem) {\n // Engineering\n var result;\n if (stem[0] === 'E' && stem[1] === 'E') {\n result = {\n notation: 'engineering',\n };\n stem = stem.slice(2);\n }\n else if (stem[0] === 'E') {\n result = {\n notation: 'scientific',\n };\n stem = stem.slice(1);\n }\n if (result) {\n var signDisplay = stem.slice(0, 2);\n if (signDisplay === '+!') {\n result.signDisplay = 'always';\n stem = stem.slice(2);\n }\n else if (signDisplay === '+?') {\n result.signDisplay = 'exceptZero';\n stem = stem.slice(2);\n }\n if (!CONCISE_INTEGER_WIDTH_REGEX.test(stem)) {\n throw new Error('Malformed concise eng/scientific notation');\n }\n result.minimumIntegerDigits = stem.length;\n }\n return result;\n}\nfunction parseNotationOptions(opt) {\n var result = {};\n var signOpts = parseSign(opt);\n if (signOpts) {\n return signOpts;\n }\n return result;\n}\n/**\n * https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options\n */\nexport function parseNumberSkeleton(tokens) {\n var result = {};\n for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {\n var token = tokens_1[_i];\n switch (token.stem) {\n case 'percent':\n case '%':\n result.style = 'percent';\n continue;\n case '%x100':\n result.style = 'percent';\n result.scale = 100;\n continue;\n case 'currency':\n result.style = 'currency';\n result.currency = token.options[0];\n continue;\n case 'group-off':\n case ',_':\n result.useGrouping = false;\n continue;\n case 'precision-integer':\n case '.':\n result.maximumFractionDigits = 0;\n continue;\n case 'measure-unit':\n case 'unit':\n result.style = 'unit';\n result.unit = icuUnitToEcma(token.options[0]);\n continue;\n case 'compact-short':\n case 'K':\n result.notation = 'compact';\n result.compactDisplay = 'short';\n continue;\n case 'compact-long':\n case 'KK':\n result.notation = 'compact';\n result.compactDisplay = 'long';\n continue;\n case 'scientific':\n result = __assign(__assign(__assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'engineering':\n result = __assign(__assign(__assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (__assign(__assign({}, all), parseNotationOptions(opt))); }, {}));\n continue;\n case 'notation-simple':\n result.notation = 'standard';\n continue;\n // https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h\n case 'unit-width-narrow':\n result.currencyDisplay = 'narrowSymbol';\n result.unitDisplay = 'narrow';\n continue;\n case 'unit-width-short':\n result.currencyDisplay = 'code';\n result.unitDisplay = 'short';\n continue;\n case 'unit-width-full-name':\n result.currencyDisplay = 'name';\n result.unitDisplay = 'long';\n continue;\n case 'unit-width-iso-code':\n result.currencyDisplay = 'symbol';\n continue;\n case 'scale':\n result.scale = parseFloat(token.options[0]);\n continue;\n case 'rounding-mode-floor':\n result.roundingMode = 'floor';\n continue;\n case 'rounding-mode-ceiling':\n result.roundingMode = 'ceil';\n continue;\n case 'rounding-mode-down':\n result.roundingMode = 'trunc';\n continue;\n case 'rounding-mode-up':\n result.roundingMode = 'expand';\n continue;\n case 'rounding-mode-half-even':\n result.roundingMode = 'halfEven';\n continue;\n case 'rounding-mode-half-down':\n result.roundingMode = 'halfTrunc';\n continue;\n case 'rounding-mode-half-up':\n result.roundingMode = 'halfExpand';\n continue;\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n case 'integer-width':\n if (token.options.length > 1) {\n throw new RangeError('integer-width stems only accept a single optional option');\n }\n token.options[0].replace(INTEGER_WIDTH_REGEX, function (_, g1, g2, g3, g4, g5) {\n if (g1) {\n result.minimumIntegerDigits = g2.length;\n }\n else if (g3 && g4) {\n throw new Error('We currently do not support maximum integer digits');\n }\n else if (g5) {\n throw new Error('We currently do not support exact integer digits');\n }\n return '';\n });\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#integer-width\n if (CONCISE_INTEGER_WIDTH_REGEX.test(token.stem)) {\n result.minimumIntegerDigits = token.stem.length;\n continue;\n }\n if (FRACTION_PRECISION_REGEX.test(token.stem)) {\n // Precision\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#fraction-precision\n // precision-integer case\n if (token.options.length > 1) {\n throw new RangeError('Fraction-precision stems only accept a single optional option');\n }\n token.stem.replace(FRACTION_PRECISION_REGEX, function (_, g1, g2, g3, g4, g5) {\n // .000* case (before ICU67 it was .000+)\n if (g2 === '*') {\n result.minimumFractionDigits = g1.length;\n }\n // .### case\n else if (g3 && g3[0] === '#') {\n result.maximumFractionDigits = g3.length;\n }\n // .00## case\n else if (g4 && g5) {\n result.minimumFractionDigits = g4.length;\n result.maximumFractionDigits = g4.length + g5.length;\n }\n else {\n result.minimumFractionDigits = g1.length;\n result.maximumFractionDigits = g1.length;\n }\n return '';\n });\n var opt = token.options[0];\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#trailing-zero-display\n if (opt === 'w') {\n result = __assign(__assign({}, result), { trailingZeroDisplay: 'stripIfInteger' });\n }\n else if (opt) {\n result = __assign(__assign({}, result), parseSignificantPrecision(opt));\n }\n continue;\n }\n // https://unicode-org.github.io/icu/userguide/format_parse/numbers/skeletons.html#significant-digits-precision\n if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {\n result = __assign(__assign({}, result), parseSignificantPrecision(token.stem));\n continue;\n }\n var signOpts = parseSign(token.stem);\n if (signOpts) {\n result = __assign(__assign({}, result), signOpts);\n }\n var conciseScientificAndEngineeringOpts = parseConciseScientificAndEngineeringStem(token.stem);\n if (conciseScientificAndEngineeringOpts) {\n result = __assign(__assign({}, result), conciseScientificAndEngineeringOpts);\n }\n }\n return result;\n}\n","// @generated from time-data-gen.ts\n// prettier-ignore \nexport var timeData = {\n \"001\": [\n \"H\",\n \"h\"\n ],\n \"419\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AD\": [\n \"H\",\n \"hB\"\n ],\n \"AE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"AF\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"AG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"AL\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"AM\": [\n \"H\",\n \"hB\"\n ],\n \"AO\": [\n \"H\",\n \"hB\"\n ],\n \"AR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"AS\": [\n \"h\",\n \"H\"\n ],\n \"AT\": [\n \"H\",\n \"hB\"\n ],\n \"AU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"AW\": [\n \"H\",\n \"hB\"\n ],\n \"AX\": [\n \"H\"\n ],\n \"AZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BD\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"BE\": [\n \"H\",\n \"hB\"\n ],\n \"BF\": [\n \"H\",\n \"hB\"\n ],\n \"BG\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"BH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"BI\": [\n \"H\",\n \"h\"\n ],\n \"BJ\": [\n \"H\",\n \"hB\"\n ],\n \"BL\": [\n \"H\",\n \"hB\"\n ],\n \"BM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BN\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"BO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"BQ\": [\n \"H\"\n ],\n \"BR\": [\n \"H\",\n \"hB\"\n ],\n \"BS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"BT\": [\n \"h\",\n \"H\"\n ],\n \"BW\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"BY\": [\n \"H\",\n \"h\"\n ],\n \"BZ\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CA\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"CC\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CD\": [\n \"hB\",\n \"H\"\n ],\n \"CF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CG\": [\n \"H\",\n \"hB\"\n ],\n \"CH\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"CI\": [\n \"H\",\n \"hB\"\n ],\n \"CK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CL\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"CN\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"CO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CP\": [\n \"H\"\n ],\n \"CR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CU\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"CV\": [\n \"H\",\n \"hB\"\n ],\n \"CW\": [\n \"H\",\n \"hB\"\n ],\n \"CX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"CY\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"CZ\": [\n \"H\"\n ],\n \"DE\": [\n \"H\",\n \"hB\"\n ],\n \"DG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"DJ\": [\n \"h\",\n \"H\"\n ],\n \"DK\": [\n \"H\"\n ],\n \"DM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"DO\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"DZ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"EC\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"EE\": [\n \"H\",\n \"hB\"\n ],\n \"EG\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"EH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ER\": [\n \"h\",\n \"H\"\n ],\n \"ES\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"ET\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"FI\": [\n \"H\"\n ],\n \"FJ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"FM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"FO\": [\n \"H\",\n \"h\"\n ],\n \"FR\": [\n \"H\",\n \"hB\"\n ],\n \"GA\": [\n \"H\",\n \"hB\"\n ],\n \"GB\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GD\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GE\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"GF\": [\n \"H\",\n \"hB\"\n ],\n \"GG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GH\": [\n \"h\",\n \"H\"\n ],\n \"GI\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"GL\": [\n \"H\",\n \"h\"\n ],\n \"GM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GN\": [\n \"H\",\n \"hB\"\n ],\n \"GP\": [\n \"H\",\n \"hB\"\n ],\n \"GQ\": [\n \"H\",\n \"hB\",\n \"h\",\n \"hb\"\n ],\n \"GR\": [\n \"h\",\n \"H\",\n \"hb\",\n \"hB\"\n ],\n \"GT\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"GU\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"GW\": [\n \"H\",\n \"hB\"\n ],\n \"GY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"HK\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"HN\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"HR\": [\n \"H\",\n \"hB\"\n ],\n \"HU\": [\n \"H\",\n \"h\"\n ],\n \"IC\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"ID\": [\n \"H\"\n ],\n \"IE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IL\": [\n \"H\",\n \"hB\"\n ],\n \"IM\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IN\": [\n \"h\",\n \"H\"\n ],\n \"IO\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"IQ\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"IR\": [\n \"hB\",\n \"H\"\n ],\n \"IS\": [\n \"H\"\n ],\n \"IT\": [\n \"H\",\n \"hB\"\n ],\n \"JE\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"JM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"JO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"JP\": [\n \"H\",\n \"K\",\n \"h\"\n ],\n \"KE\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"KG\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KH\": [\n \"hB\",\n \"h\",\n \"H\",\n \"hb\"\n ],\n \"KI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KM\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"KN\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KP\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"KW\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"KY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"KZ\": [\n \"H\",\n \"hB\"\n ],\n \"LA\": [\n \"H\",\n \"hb\",\n \"hB\",\n \"h\"\n ],\n \"LB\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"LC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LI\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"LK\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"LR\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"LS\": [\n \"h\",\n \"H\"\n ],\n \"LT\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"LU\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"LV\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"LY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"MC\": [\n \"H\",\n \"hB\"\n ],\n \"MD\": [\n \"H\",\n \"hB\"\n ],\n \"ME\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"MF\": [\n \"H\",\n \"hB\"\n ],\n \"MG\": [\n \"H\",\n \"h\"\n ],\n \"MH\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MK\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ML\": [\n \"H\"\n ],\n \"MM\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"MN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MO\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MP\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MQ\": [\n \"H\",\n \"hB\"\n ],\n \"MR\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"MS\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"MT\": [\n \"H\",\n \"h\"\n ],\n \"MU\": [\n \"H\",\n \"h\"\n ],\n \"MV\": [\n \"H\",\n \"h\"\n ],\n \"MW\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"MX\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"MY\": [\n \"hb\",\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"MZ\": [\n \"H\",\n \"hB\"\n ],\n \"NA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NC\": [\n \"H\",\n \"hB\"\n ],\n \"NE\": [\n \"H\"\n ],\n \"NF\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NG\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NI\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"NL\": [\n \"H\",\n \"hB\"\n ],\n \"NO\": [\n \"H\",\n \"h\"\n ],\n \"NP\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"NR\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NU\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"NZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"OM\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PA\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"PG\": [\n \"h\",\n \"H\"\n ],\n \"PH\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PK\": [\n \"h\",\n \"hB\",\n \"H\"\n ],\n \"PL\": [\n \"H\",\n \"h\"\n ],\n \"PM\": [\n \"H\",\n \"hB\"\n ],\n \"PN\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"PR\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"PS\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"PT\": [\n \"H\",\n \"hB\"\n ],\n \"PW\": [\n \"h\",\n \"H\"\n ],\n \"PY\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"QA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"RE\": [\n \"H\",\n \"hB\"\n ],\n \"RO\": [\n \"H\",\n \"hB\"\n ],\n \"RS\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"RU\": [\n \"H\"\n ],\n \"RW\": [\n \"H\",\n \"h\"\n ],\n \"SA\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SB\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SC\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SD\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SE\": [\n \"H\"\n ],\n \"SG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SH\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SI\": [\n \"H\",\n \"hB\"\n ],\n \"SJ\": [\n \"H\"\n ],\n \"SK\": [\n \"H\"\n ],\n \"SL\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"SM\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SN\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"SO\": [\n \"h\",\n \"H\"\n ],\n \"SR\": [\n \"H\",\n \"hB\"\n ],\n \"SS\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ST\": [\n \"H\",\n \"hB\"\n ],\n \"SV\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"SX\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"SY\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"SZ\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"TC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TD\": [\n \"h\",\n \"H\",\n \"hB\"\n ],\n \"TF\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"TG\": [\n \"H\",\n \"hB\"\n ],\n \"TH\": [\n \"H\",\n \"h\"\n ],\n \"TJ\": [\n \"H\",\n \"h\"\n ],\n \"TL\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ],\n \"TM\": [\n \"H\",\n \"h\"\n ],\n \"TN\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"TO\": [\n \"h\",\n \"H\"\n ],\n \"TR\": [\n \"H\",\n \"hB\"\n ],\n \"TT\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"TW\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"TZ\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UA\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"UG\": [\n \"hB\",\n \"hb\",\n \"H\",\n \"h\"\n ],\n \"UM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"US\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"UY\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"UZ\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"VA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"VC\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VE\": [\n \"h\",\n \"H\",\n \"hB\",\n \"hb\"\n ],\n \"VG\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VI\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"VN\": [\n \"H\",\n \"h\"\n ],\n \"VU\": [\n \"h\",\n \"H\"\n ],\n \"WF\": [\n \"H\",\n \"hB\"\n ],\n \"WS\": [\n \"h\",\n \"H\"\n ],\n \"XK\": [\n \"H\",\n \"hB\",\n \"h\"\n ],\n \"YE\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"YT\": [\n \"H\",\n \"hB\"\n ],\n \"ZA\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"ZM\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"ZW\": [\n \"H\",\n \"h\"\n ],\n \"af-ZA\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"ar-001\": [\n \"h\",\n \"hB\",\n \"hb\",\n \"H\"\n ],\n \"ca-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"en-001\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-HK\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"en-IL\": [\n \"H\",\n \"h\",\n \"hb\",\n \"hB\"\n ],\n \"en-MY\": [\n \"h\",\n \"hb\",\n \"H\",\n \"hB\"\n ],\n \"es-BR\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-ES\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"es-GQ\": [\n \"H\",\n \"h\",\n \"hB\",\n \"hb\"\n ],\n \"fr-CA\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gl-ES\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"gu-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"hi-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"it-CH\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"it-IT\": [\n \"H\",\n \"h\",\n \"hB\"\n ],\n \"kn-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"ml-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"mr-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"pa-IN\": [\n \"hB\",\n \"hb\",\n \"h\",\n \"H\"\n ],\n \"ta-IN\": [\n \"hB\",\n \"h\",\n \"hb\",\n \"H\"\n ],\n \"te-IN\": [\n \"hB\",\n \"h\",\n \"H\"\n ],\n \"zu-ZA\": [\n \"H\",\n \"hB\",\n \"hb\",\n \"h\"\n ]\n};\n","import { timeData } from './time-data.generated';\n/**\n * Returns the best matching date time pattern if a date time skeleton\n * pattern is provided with a locale. Follows the Unicode specification:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#table-mapping-requested-time-skeletons-to-patterns\n * @param skeleton date time skeleton pattern that possibly includes j, J or C\n * @param locale\n */\nexport function getBestPattern(skeleton, locale) {\n var skeletonCopy = '';\n for (var patternPos = 0; patternPos < skeleton.length; patternPos++) {\n var patternChar = skeleton.charAt(patternPos);\n if (patternChar === 'j') {\n var extraLength = 0;\n while (patternPos + 1 < skeleton.length &&\n skeleton.charAt(patternPos + 1) === patternChar) {\n extraLength++;\n patternPos++;\n }\n var hourLen = 1 + (extraLength & 1);\n var dayPeriodLen = extraLength < 2 ? 1 : 3 + (extraLength >> 1);\n var dayPeriodChar = 'a';\n var hourChar = getDefaultHourSymbolFromLocale(locale);\n if (hourChar == 'H' || hourChar == 'k') {\n dayPeriodLen = 0;\n }\n while (dayPeriodLen-- > 0) {\n skeletonCopy += dayPeriodChar;\n }\n while (hourLen-- > 0) {\n skeletonCopy = hourChar + skeletonCopy;\n }\n }\n else if (patternChar === 'J') {\n skeletonCopy += 'H';\n }\n else {\n skeletonCopy += patternChar;\n }\n }\n return skeletonCopy;\n}\n/**\n * Maps the [hour cycle type](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/hourCycle)\n * of the given `locale` to the corresponding time pattern.\n * @param locale\n */\nfunction getDefaultHourSymbolFromLocale(locale) {\n var hourCycle = locale.hourCycle;\n if (hourCycle === undefined &&\n // @ts-ignore hourCycle(s) is not identified yet\n locale.hourCycles &&\n // @ts-ignore\n locale.hourCycles.length) {\n // @ts-ignore\n hourCycle = locale.hourCycles[0];\n }\n if (hourCycle) {\n switch (hourCycle) {\n case 'h24':\n return 'k';\n case 'h23':\n return 'H';\n case 'h12':\n return 'h';\n case 'h11':\n return 'K';\n default:\n throw new Error('Invalid hourCycle');\n }\n }\n // TODO: Once hourCycle is fully supported remove the following with data generation\n var languageTag = locale.language;\n var regionTag;\n if (languageTag !== 'root') {\n regionTag = locale.maximize().region;\n }\n var hourCycles = timeData[regionTag || ''] ||\n timeData[languageTag || ''] ||\n timeData[\"\".concat(languageTag, \"-001\")] ||\n timeData['001'];\n return hourCycles[0];\n}\n","var _a;\nimport { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { SKELETON_TYPE, TYPE, } from './types';\nimport { SPACE_SEPARATOR_REGEX } from './regex.generated';\nimport { parseNumberSkeleton, parseNumberSkeletonFromString, parseDateTimeSkeleton, } from '@formatjs/icu-skeleton-parser';\nimport { getBestPattern } from './date-time-pattern-generator';\nvar SPACE_SEPARATOR_START_REGEX = new RegExp(\"^\".concat(SPACE_SEPARATOR_REGEX.source, \"*\"));\nvar SPACE_SEPARATOR_END_REGEX = new RegExp(\"\".concat(SPACE_SEPARATOR_REGEX.source, \"*$\"));\nfunction createLocation(start, end) {\n return { start: start, end: end };\n}\n// #region Ponyfills\n// Consolidate these variables up top for easier toggling during debugging\nvar hasNativeStartsWith = !!String.prototype.startsWith && '_a'.startsWith('a', 1);\nvar hasNativeFromCodePoint = !!String.fromCodePoint;\nvar hasNativeFromEntries = !!Object.fromEntries;\nvar hasNativeCodePointAt = !!String.prototype.codePointAt;\nvar hasTrimStart = !!String.prototype.trimStart;\nvar hasTrimEnd = !!String.prototype.trimEnd;\nvar hasNativeIsSafeInteger = !!Number.isSafeInteger;\nvar isSafeInteger = hasNativeIsSafeInteger\n ? Number.isSafeInteger\n : function (n) {\n return (typeof n === 'number' &&\n isFinite(n) &&\n Math.floor(n) === n &&\n Math.abs(n) <= 0x1fffffffffffff);\n };\n// IE11 does not support y and u.\nvar REGEX_SUPPORTS_U_AND_Y = true;\ntry {\n var re = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n /**\n * legacy Edge or Xbox One browser\n * Unicode flag support: supported\n * Pattern_Syntax support: not supported\n * See https://github.com/formatjs/formatjs/issues/2822\n */\n REGEX_SUPPORTS_U_AND_Y = ((_a = re.exec('a')) === null || _a === void 0 ? void 0 : _a[0]) === 'a';\n}\ncatch (_) {\n REGEX_SUPPORTS_U_AND_Y = false;\n}\nvar startsWith = hasNativeStartsWith\n ? // Native\n function startsWith(s, search, position) {\n return s.startsWith(search, position);\n }\n : // For IE11\n function startsWith(s, search, position) {\n return s.slice(position, position + search.length) === search;\n };\nvar fromCodePoint = hasNativeFromCodePoint\n ? String.fromCodePoint\n : // IE11\n function fromCodePoint() {\n var codePoints = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n codePoints[_i] = arguments[_i];\n }\n var elements = '';\n var length = codePoints.length;\n var i = 0;\n var code;\n while (length > i) {\n code = codePoints[i++];\n if (code > 0x10ffff)\n throw RangeError(code + ' is not a valid code point');\n elements +=\n code < 0x10000\n ? String.fromCharCode(code)\n : String.fromCharCode(((code -= 0x10000) >> 10) + 0xd800, (code % 0x400) + 0xdc00);\n }\n return elements;\n };\nvar fromEntries = \n// native\nhasNativeFromEntries\n ? Object.fromEntries\n : // Ponyfill\n function fromEntries(entries) {\n var obj = {};\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var _a = entries_1[_i], k = _a[0], v = _a[1];\n obj[k] = v;\n }\n return obj;\n };\nvar codePointAt = hasNativeCodePointAt\n ? // Native\n function codePointAt(s, index) {\n return s.codePointAt(index);\n }\n : // IE 11\n function codePointAt(s, index) {\n var size = s.length;\n if (index < 0 || index >= size) {\n return undefined;\n }\n var first = s.charCodeAt(index);\n var second;\n return first < 0xd800 ||\n first > 0xdbff ||\n index + 1 === size ||\n (second = s.charCodeAt(index + 1)) < 0xdc00 ||\n second > 0xdfff\n ? first\n : ((first - 0xd800) << 10) + (second - 0xdc00) + 0x10000;\n };\nvar trimStart = hasTrimStart\n ? // Native\n function trimStart(s) {\n return s.trimStart();\n }\n : // Ponyfill\n function trimStart(s) {\n return s.replace(SPACE_SEPARATOR_START_REGEX, '');\n };\nvar trimEnd = hasTrimEnd\n ? // Native\n function trimEnd(s) {\n return s.trimEnd();\n }\n : // Ponyfill\n function trimEnd(s) {\n return s.replace(SPACE_SEPARATOR_END_REGEX, '');\n };\n// Prevent minifier to translate new RegExp to literal form that might cause syntax error on IE11.\nfunction RE(s, flag) {\n return new RegExp(s, flag);\n}\n// #endregion\nvar matchIdentifierAtIndex;\nif (REGEX_SUPPORTS_U_AND_Y) {\n // Native\n var IDENTIFIER_PREFIX_RE_1 = RE('([^\\\\p{White_Space}\\\\p{Pattern_Syntax}]*)', 'yu');\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var _a;\n IDENTIFIER_PREFIX_RE_1.lastIndex = index;\n var match = IDENTIFIER_PREFIX_RE_1.exec(s);\n return (_a = match[1]) !== null && _a !== void 0 ? _a : '';\n };\n}\nelse {\n // IE11\n matchIdentifierAtIndex = function matchIdentifierAtIndex(s, index) {\n var match = [];\n while (true) {\n var c = codePointAt(s, index);\n if (c === undefined || _isWhiteSpace(c) || _isPatternSyntax(c)) {\n break;\n }\n match.push(c);\n index += c >= 0x10000 ? 2 : 1;\n }\n return fromCodePoint.apply(void 0, match);\n };\n}\nvar Parser = /** @class */ (function () {\n function Parser(message, options) {\n if (options === void 0) { options = {}; }\n this.message = message;\n this.position = { offset: 0, line: 1, column: 1 };\n this.ignoreTag = !!options.ignoreTag;\n this.locale = options.locale;\n this.requiresOtherClause = !!options.requiresOtherClause;\n this.shouldParseSkeletons = !!options.shouldParseSkeletons;\n }\n Parser.prototype.parse = function () {\n if (this.offset() !== 0) {\n throw Error('parser can only be used once');\n }\n return this.parseMessage(0, '', false);\n };\n Parser.prototype.parseMessage = function (nestingLevel, parentArgType, expectingCloseTag) {\n var elements = [];\n while (!this.isEOF()) {\n var char = this.char();\n if (char === 123 /* `{` */) {\n var result = this.parseArgument(nestingLevel, expectingCloseTag);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else if (char === 125 /* `}` */ && nestingLevel > 0) {\n break;\n }\n else if (char === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) {\n var position = this.clonePosition();\n this.bump();\n elements.push({\n type: TYPE.pound,\n location: createLocation(position, this.clonePosition()),\n });\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n this.peek() === 47 // char code for '/'\n ) {\n if (expectingCloseTag) {\n break;\n }\n else {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(this.clonePosition(), this.clonePosition()));\n }\n }\n else if (char === 60 /* `<` */ &&\n !this.ignoreTag &&\n _isAlpha(this.peek() || 0)) {\n var result = this.parseTag(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n else {\n var result = this.parseLiteral(nestingLevel, parentArgType);\n if (result.err) {\n return result;\n }\n elements.push(result.val);\n }\n }\n return { val: elements, err: null };\n };\n /**\n * A tag name must start with an ASCII lower/upper case letter. The grammar is based on the\n * [custom element name][] except that a dash is NOT always mandatory and uppercase letters\n * are accepted:\n *\n * ```\n * tag ::= \"<\" tagName (whitespace)* \"/>\" | \"<\" tagName (whitespace)* \">\" message \"</\" tagName (whitespace)* \">\"\n * tagName ::= [a-z] (PENChar)*\n * PENChar ::=\n * \"-\" | \".\" | [0-9] | \"_\" | [a-z] | [A-Z] | #xB7 | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x37D] |\n * [#x37F-#x1FFF] | [#x200C-#x200D] | [#x203F-#x2040] | [#x2070-#x218F] | [#x2C00-#x2FEF] |\n * [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF]\n * ```\n *\n * [custom element name]: https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name\n * NOTE: We're a bit more lax here since HTML technically does not allow uppercase HTML element but we do\n * since other tag-based engines like React allow it\n */\n Parser.prototype.parseTag = function (nestingLevel, parentArgType) {\n var startPosition = this.clonePosition();\n this.bump(); // `<`\n var tagName = this.parseTagName();\n this.bumpSpace();\n if (this.bumpIf('/>')) {\n // Self closing tag\n return {\n val: {\n type: TYPE.literal,\n value: \"<\".concat(tagName, \"/>\"),\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else if (this.bumpIf('>')) {\n var childrenResult = this.parseMessage(nestingLevel + 1, parentArgType, true);\n if (childrenResult.err) {\n return childrenResult;\n }\n var children = childrenResult.val;\n // Expecting a close tag\n var endTagStartPosition = this.clonePosition();\n if (this.bumpIf('</')) {\n if (this.isEOF() || !_isAlpha(this.char())) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n var closingTagNameStartPosition = this.clonePosition();\n var closingTagName = this.parseTagName();\n if (tagName !== closingTagName) {\n return this.error(ErrorKind.UNMATCHED_CLOSING_TAG, createLocation(closingTagNameStartPosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (!this.bumpIf('>')) {\n return this.error(ErrorKind.INVALID_TAG, createLocation(endTagStartPosition, this.clonePosition()));\n }\n return {\n val: {\n type: TYPE.tag,\n value: tagName,\n children: children,\n location: createLocation(startPosition, this.clonePosition()),\n },\n err: null,\n };\n }\n else {\n return this.error(ErrorKind.UNCLOSED_TAG, createLocation(startPosition, this.clonePosition()));\n }\n }\n else {\n return this.error(ErrorKind.INVALID_TAG, createLocation(startPosition, this.clonePosition()));\n }\n };\n /**\n * This method assumes that the caller has peeked ahead for the first tag character.\n */\n Parser.prototype.parseTagName = function () {\n var startOffset = this.offset();\n this.bump(); // the first tag name character\n while (!this.isEOF() && _isPotentialElementNameChar(this.char())) {\n this.bump();\n }\n return this.message.slice(startOffset, this.offset());\n };\n Parser.prototype.parseLiteral = function (nestingLevel, parentArgType) {\n var start = this.clonePosition();\n var value = '';\n while (true) {\n var parseQuoteResult = this.tryParseQuote(parentArgType);\n if (parseQuoteResult) {\n value += parseQuoteResult;\n continue;\n }\n var parseUnquotedResult = this.tryParseUnquoted(nestingLevel, parentArgType);\n if (parseUnquotedResult) {\n value += parseUnquotedResult;\n continue;\n }\n var parseLeftAngleResult = this.tryParseLeftAngleBracket();\n if (parseLeftAngleResult) {\n value += parseLeftAngleResult;\n continue;\n }\n break;\n }\n var location = createLocation(start, this.clonePosition());\n return {\n val: { type: TYPE.literal, value: value, location: location },\n err: null,\n };\n };\n Parser.prototype.tryParseLeftAngleBracket = function () {\n if (!this.isEOF() &&\n this.char() === 60 /* `<` */ &&\n (this.ignoreTag ||\n // If at the opening tag or closing tag position, bail.\n !_isAlphaOrSlash(this.peek() || 0))) {\n this.bump(); // `<`\n return '<';\n }\n return null;\n };\n /**\n * Starting with ICU 4.8, an ASCII apostrophe only starts quoted text if it immediately precedes\n * a character that requires quoting (that is, \"only where needed\"), and works the same in\n * nested messages as on the top level of the pattern. The new behavior is otherwise compatible.\n */\n Parser.prototype.tryParseQuote = function (parentArgType) {\n if (this.isEOF() || this.char() !== 39 /* `'` */) {\n return null;\n }\n // Parse escaped char following the apostrophe, or early return if there is no escaped char.\n // Check if is valid escaped character\n switch (this.peek()) {\n case 39 /* `'` */:\n // double quote, should return as a single quote.\n this.bump();\n this.bump();\n return \"'\";\n // '{', '<', '>', '}'\n case 123:\n case 60:\n case 62:\n case 125:\n break;\n case 35: // '#'\n if (parentArgType === 'plural' || parentArgType === 'selectordinal') {\n break;\n }\n return null;\n default:\n return null;\n }\n this.bump(); // apostrophe\n var codePoints = [this.char()]; // escaped char\n this.bump();\n // read chars until the optional closing apostrophe is found\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch === 39 /* `'` */) {\n if (this.peek() === 39 /* `'` */) {\n codePoints.push(39);\n // Bump one more time because we need to skip 2 characters.\n this.bump();\n }\n else {\n // Optional closing apostrophe.\n this.bump();\n break;\n }\n }\n else {\n codePoints.push(ch);\n }\n this.bump();\n }\n return fromCodePoint.apply(void 0, codePoints);\n };\n Parser.prototype.tryParseUnquoted = function (nestingLevel, parentArgType) {\n if (this.isEOF()) {\n return null;\n }\n var ch = this.char();\n if (ch === 60 /* `<` */ ||\n ch === 123 /* `{` */ ||\n (ch === 35 /* `#` */ &&\n (parentArgType === 'plural' || parentArgType === 'selectordinal')) ||\n (ch === 125 /* `}` */ && nestingLevel > 0)) {\n return null;\n }\n else {\n this.bump();\n return fromCodePoint(ch);\n }\n };\n Parser.prototype.parseArgument = function (nestingLevel, expectingCloseTag) {\n var openingBracePosition = this.clonePosition();\n this.bump(); // `{`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n if (this.char() === 125 /* `}` */) {\n this.bump();\n return this.error(ErrorKind.EMPTY_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n // argument name\n var value = this.parseIdentifierIfPossible().value;\n if (!value) {\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n switch (this.char()) {\n // Simple argument: `{name}`\n case 125 /* `}` */: {\n this.bump(); // `}`\n return {\n val: {\n type: TYPE.argument,\n // value does not include the opening and closing braces.\n value: value,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n err: null,\n };\n }\n // Argument with options: `{name, format, ...}`\n case 44 /* `,` */: {\n this.bump(); // `,`\n this.bumpSpace();\n if (this.isEOF()) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n return this.parseArgumentOptions(nestingLevel, expectingCloseTag, value, openingBracePosition);\n }\n default:\n return this.error(ErrorKind.MALFORMED_ARGUMENT, createLocation(openingBracePosition, this.clonePosition()));\n }\n };\n /**\n * Advance the parser until the end of the identifier, if it is currently on\n * an identifier character. Return an empty string otherwise.\n */\n Parser.prototype.parseIdentifierIfPossible = function () {\n var startingPosition = this.clonePosition();\n var startOffset = this.offset();\n var value = matchIdentifierAtIndex(this.message, startOffset);\n var endOffset = startOffset + value.length;\n this.bumpTo(endOffset);\n var endPosition = this.clonePosition();\n var location = createLocation(startingPosition, endPosition);\n return { value: value, location: location };\n };\n Parser.prototype.parseArgumentOptions = function (nestingLevel, expectingCloseTag, value, openingBracePosition) {\n var _a;\n // Parse this range:\n // {name, type, style}\n // ^---^\n var typeStartPosition = this.clonePosition();\n var argType = this.parseIdentifierIfPossible().value;\n var typeEndPosition = this.clonePosition();\n switch (argType) {\n case '':\n // Expecting a style string number, date, time, plural, selectordinal, or select.\n return this.error(ErrorKind.EXPECT_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n case 'number':\n case 'date':\n case 'time': {\n // Parse this range:\n // {name, number, style}\n // ^-------^\n this.bumpSpace();\n var styleAndLocation = null;\n if (this.bumpIf(',')) {\n this.bumpSpace();\n var styleStartPosition = this.clonePosition();\n var result = this.parseSimpleArgStyleIfPossible();\n if (result.err) {\n return result;\n }\n var style = trimEnd(result.val);\n if (style.length === 0) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_STYLE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var styleLocation = createLocation(styleStartPosition, this.clonePosition());\n styleAndLocation = { style: style, styleLocation: styleLocation };\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_1 = createLocation(openingBracePosition, this.clonePosition());\n // Extract style or skeleton\n if (styleAndLocation && startsWith(styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style, '::', 0)) {\n // Skeleton starts with `::`.\n var skeleton = trimStart(styleAndLocation.style.slice(2));\n if (argType === 'number') {\n var result = this.parseNumberSkeletonFromString(skeleton, styleAndLocation.styleLocation);\n if (result.err) {\n return result;\n }\n return {\n val: { type: TYPE.number, value: value, location: location_1, style: result.val },\n err: null,\n };\n }\n else {\n if (skeleton.length === 0) {\n return this.error(ErrorKind.EXPECT_DATE_TIME_SKELETON, location_1);\n }\n var dateTimePattern = skeleton;\n // Get \"best match\" pattern only if locale is passed, if not, let it\n // pass as-is where `parseDateTimeSkeleton()` will throw an error\n // for unsupported patterns.\n if (this.locale) {\n dateTimePattern = getBestPattern(skeleton, this.locale);\n }\n var style = {\n type: SKELETON_TYPE.dateTime,\n pattern: dateTimePattern,\n location: styleAndLocation.styleLocation,\n parsedOptions: this.shouldParseSkeletons\n ? parseDateTimeSkeleton(dateTimePattern)\n : {},\n };\n var type = argType === 'date' ? TYPE.date : TYPE.time;\n return {\n val: { type: type, value: value, location: location_1, style: style },\n err: null,\n };\n }\n }\n // Regular style or no style.\n return {\n val: {\n type: argType === 'number'\n ? TYPE.number\n : argType === 'date'\n ? TYPE.date\n : TYPE.time,\n value: value,\n location: location_1,\n style: (_a = styleAndLocation === null || styleAndLocation === void 0 ? void 0 : styleAndLocation.style) !== null && _a !== void 0 ? _a : null,\n },\n err: null,\n };\n }\n case 'plural':\n case 'selectordinal':\n case 'select': {\n // Parse this range:\n // {name, plural, options}\n // ^---------^\n var typeEndPosition_1 = this.clonePosition();\n this.bumpSpace();\n if (!this.bumpIf(',')) {\n return this.error(ErrorKind.EXPECT_SELECT_ARGUMENT_OPTIONS, createLocation(typeEndPosition_1, __assign({}, typeEndPosition_1)));\n }\n this.bumpSpace();\n // Parse offset:\n // {name, plural, offset:1, options}\n // ^-----^\n //\n // or the first option:\n //\n // {name, plural, one {...} other {...}}\n // ^--^\n var identifierAndLocation = this.parseIdentifierIfPossible();\n var pluralOffset = 0;\n if (argType !== 'select' && identifierAndLocation.value === 'offset') {\n if (!this.bumpIf(':')) {\n return this.error(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n this.bumpSpace();\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, ErrorKind.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);\n if (result.err) {\n return result;\n }\n // Parse another identifier for option parsing\n this.bumpSpace();\n identifierAndLocation = this.parseIdentifierIfPossible();\n pluralOffset = result.val;\n }\n var optionsResult = this.tryParsePluralOrSelectOptions(nestingLevel, argType, expectingCloseTag, identifierAndLocation);\n if (optionsResult.err) {\n return optionsResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n var location_2 = createLocation(openingBracePosition, this.clonePosition());\n if (argType === 'select') {\n return {\n val: {\n type: TYPE.select,\n value: value,\n options: fromEntries(optionsResult.val),\n location: location_2,\n },\n err: null,\n };\n }\n else {\n return {\n val: {\n type: TYPE.plural,\n value: value,\n options: fromEntries(optionsResult.val),\n offset: pluralOffset,\n pluralType: argType === 'plural' ? 'cardinal' : 'ordinal',\n location: location_2,\n },\n err: null,\n };\n }\n }\n default:\n return this.error(ErrorKind.INVALID_ARGUMENT_TYPE, createLocation(typeStartPosition, typeEndPosition));\n }\n };\n Parser.prototype.tryParseArgumentClose = function (openingBracePosition) {\n // Parse: {value, number, ::currency/GBP }\n //\n if (this.isEOF() || this.char() !== 125 /* `}` */) {\n return this.error(ErrorKind.EXPECT_ARGUMENT_CLOSING_BRACE, createLocation(openingBracePosition, this.clonePosition()));\n }\n this.bump(); // `}`\n return { val: true, err: null };\n };\n /**\n * See: https://github.com/unicode-org/icu/blob/af7ed1f6d2298013dc303628438ec4abe1f16479/icu4c/source/common/messagepattern.cpp#L659\n */\n Parser.prototype.parseSimpleArgStyleIfPossible = function () {\n var nestedBraces = 0;\n var startPosition = this.clonePosition();\n while (!this.isEOF()) {\n var ch = this.char();\n switch (ch) {\n case 39 /* `'` */: {\n // Treat apostrophe as quoting but include it in the style part.\n // Find the end of the quoted literal text.\n this.bump();\n var apostrophePosition = this.clonePosition();\n if (!this.bumpUntil(\"'\")) {\n return this.error(ErrorKind.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, createLocation(apostrophePosition, this.clonePosition()));\n }\n this.bump();\n break;\n }\n case 123 /* `{` */: {\n nestedBraces += 1;\n this.bump();\n break;\n }\n case 125 /* `}` */: {\n if (nestedBraces > 0) {\n nestedBraces -= 1;\n }\n else {\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n }\n break;\n }\n default:\n this.bump();\n break;\n }\n }\n return {\n val: this.message.slice(startPosition.offset, this.offset()),\n err: null,\n };\n };\n Parser.prototype.parseNumberSkeletonFromString = function (skeleton, location) {\n var tokens = [];\n try {\n tokens = parseNumberSkeletonFromString(skeleton);\n }\n catch (e) {\n return this.error(ErrorKind.INVALID_NUMBER_SKELETON, location);\n }\n return {\n val: {\n type: SKELETON_TYPE.number,\n tokens: tokens,\n location: location,\n parsedOptions: this.shouldParseSkeletons\n ? parseNumberSkeleton(tokens)\n : {},\n },\n err: null,\n };\n };\n /**\n * @param nesting_level The current nesting level of messages.\n * This can be positive when parsing message fragment in select or plural argument options.\n * @param parent_arg_type The parent argument's type.\n * @param parsed_first_identifier If provided, this is the first identifier-like selector of\n * the argument. It is a by-product of a previous parsing attempt.\n * @param expecting_close_tag If true, this message is directly or indirectly nested inside\n * between a pair of opening and closing tags. The nested message will not parse beyond\n * the closing tag boundary.\n */\n Parser.prototype.tryParsePluralOrSelectOptions = function (nestingLevel, parentArgType, expectCloseTag, parsedFirstIdentifier) {\n var _a;\n var hasOtherClause = false;\n var options = [];\n var parsedSelectors = new Set();\n var selector = parsedFirstIdentifier.value, selectorLocation = parsedFirstIdentifier.location;\n // Parse:\n // one {one apple}\n // ^--^\n while (true) {\n if (selector.length === 0) {\n var startPosition = this.clonePosition();\n if (parentArgType !== 'select' && this.bumpIf('=')) {\n // Try parse `={number}` selector\n var result = this.tryParseDecimalInteger(ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, ErrorKind.INVALID_PLURAL_ARGUMENT_SELECTOR);\n if (result.err) {\n return result;\n }\n selectorLocation = createLocation(startPosition, this.clonePosition());\n selector = this.message.slice(startPosition.offset, this.offset());\n }\n else {\n break;\n }\n }\n // Duplicate selector clauses\n if (parsedSelectors.has(selector)) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.DUPLICATE_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, selectorLocation);\n }\n if (selector === 'other') {\n hasOtherClause = true;\n }\n // Parse:\n // one {one apple}\n // ^----------^\n this.bumpSpace();\n var openingBracePosition = this.clonePosition();\n if (!this.bumpIf('{')) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, createLocation(this.clonePosition(), this.clonePosition()));\n }\n var fragmentResult = this.parseMessage(nestingLevel + 1, parentArgType, expectCloseTag);\n if (fragmentResult.err) {\n return fragmentResult;\n }\n var argCloseResult = this.tryParseArgumentClose(openingBracePosition);\n if (argCloseResult.err) {\n return argCloseResult;\n }\n options.push([\n selector,\n {\n value: fragmentResult.val,\n location: createLocation(openingBracePosition, this.clonePosition()),\n },\n ]);\n // Keep track of the existing selectors\n parsedSelectors.add(selector);\n // Prep next selector clause.\n this.bumpSpace();\n (_a = this.parseIdentifierIfPossible(), selector = _a.value, selectorLocation = _a.location);\n }\n if (options.length === 0) {\n return this.error(parentArgType === 'select'\n ? ErrorKind.EXPECT_SELECT_ARGUMENT_SELECTOR\n : ErrorKind.EXPECT_PLURAL_ARGUMENT_SELECTOR, createLocation(this.clonePosition(), this.clonePosition()));\n }\n if (this.requiresOtherClause && !hasOtherClause) {\n return this.error(ErrorKind.MISSING_OTHER_CLAUSE, createLocation(this.clonePosition(), this.clonePosition()));\n }\n return { val: options, err: null };\n };\n Parser.prototype.tryParseDecimalInteger = function (expectNumberError, invalidNumberError) {\n var sign = 1;\n var startingPosition = this.clonePosition();\n if (this.bumpIf('+')) {\n }\n else if (this.bumpIf('-')) {\n sign = -1;\n }\n var hasDigits = false;\n var decimal = 0;\n while (!this.isEOF()) {\n var ch = this.char();\n if (ch >= 48 /* `0` */ && ch <= 57 /* `9` */) {\n hasDigits = true;\n decimal = decimal * 10 + (ch - 48);\n this.bump();\n }\n else {\n break;\n }\n }\n var location = createLocation(startingPosition, this.clonePosition());\n if (!hasDigits) {\n return this.error(expectNumberError, location);\n }\n decimal *= sign;\n if (!isSafeInteger(decimal)) {\n return this.error(invalidNumberError, location);\n }\n return { val: decimal, err: null };\n };\n Parser.prototype.offset = function () {\n return this.position.offset;\n };\n Parser.prototype.isEOF = function () {\n return this.offset() === this.message.length;\n };\n Parser.prototype.clonePosition = function () {\n // This is much faster than `Object.assign` or spread.\n return {\n offset: this.position.offset,\n line: this.position.line,\n column: this.position.column,\n };\n };\n /**\n * Return the code point at the current position of the parser.\n * Throws if the index is out of bound.\n */\n Parser.prototype.char = function () {\n var offset = this.position.offset;\n if (offset >= this.message.length) {\n throw Error('out of bound');\n }\n var code = codePointAt(this.message, offset);\n if (code === undefined) {\n throw Error(\"Offset \".concat(offset, \" is at invalid UTF-16 code unit boundary\"));\n }\n return code;\n };\n Parser.prototype.error = function (kind, location) {\n return {\n val: null,\n err: {\n kind: kind,\n message: this.message,\n location: location,\n },\n };\n };\n /** Bump the parser to the next UTF-16 code unit. */\n Parser.prototype.bump = function () {\n if (this.isEOF()) {\n return;\n }\n var code = this.char();\n if (code === 10 /* '\\n' */) {\n this.position.line += 1;\n this.position.column = 1;\n this.position.offset += 1;\n }\n else {\n this.position.column += 1;\n // 0 ~ 0x10000 -> unicode BMP, otherwise skip the surrogate pair.\n this.position.offset += code < 0x10000 ? 1 : 2;\n }\n };\n /**\n * If the substring starting at the current position of the parser has\n * the given prefix, then bump the parser to the character immediately\n * following the prefix and return true. Otherwise, don't bump the parser\n * and return false.\n */\n Parser.prototype.bumpIf = function (prefix) {\n if (startsWith(this.message, prefix, this.offset())) {\n for (var i = 0; i < prefix.length; i++) {\n this.bump();\n }\n return true;\n }\n return false;\n };\n /**\n * Bump the parser until the pattern character is found and return `true`.\n * Otherwise bump to the end of the file and return `false`.\n */\n Parser.prototype.bumpUntil = function (pattern) {\n var currentOffset = this.offset();\n var index = this.message.indexOf(pattern, currentOffset);\n if (index >= 0) {\n this.bumpTo(index);\n return true;\n }\n else {\n this.bumpTo(this.message.length);\n return false;\n }\n };\n /**\n * Bump the parser to the target offset.\n * If target offset is beyond the end of the input, bump the parser to the end of the input.\n */\n Parser.prototype.bumpTo = function (targetOffset) {\n if (this.offset() > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" must be greater than or equal to the current offset \").concat(this.offset()));\n }\n targetOffset = Math.min(targetOffset, this.message.length);\n while (true) {\n var offset = this.offset();\n if (offset === targetOffset) {\n break;\n }\n if (offset > targetOffset) {\n throw Error(\"targetOffset \".concat(targetOffset, \" is at invalid UTF-16 code unit boundary\"));\n }\n this.bump();\n if (this.isEOF()) {\n break;\n }\n }\n };\n /** advance the parser through all whitespace to the next non-whitespace code unit. */\n Parser.prototype.bumpSpace = function () {\n while (!this.isEOF() && _isWhiteSpace(this.char())) {\n this.bump();\n }\n };\n /**\n * Peek at the *next* Unicode codepoint in the input without advancing the parser.\n * If the input has been exhausted, then this returns null.\n */\n Parser.prototype.peek = function () {\n if (this.isEOF()) {\n return null;\n }\n var code = this.char();\n var offset = this.offset();\n var nextCode = this.message.charCodeAt(offset + (code >= 0x10000 ? 2 : 1));\n return nextCode !== null && nextCode !== void 0 ? nextCode : null;\n };\n return Parser;\n}());\nexport { Parser };\n/**\n * This check if codepoint is alphabet (lower & uppercase)\n * @param codepoint\n * @returns\n */\nfunction _isAlpha(codepoint) {\n return ((codepoint >= 97 && codepoint <= 122) ||\n (codepoint >= 65 && codepoint <= 90));\n}\nfunction _isAlphaOrSlash(codepoint) {\n return _isAlpha(codepoint) || codepoint === 47; /* '/' */\n}\n/** See `parseTag` function docs. */\nfunction _isPotentialElementNameChar(c) {\n return (c === 45 /* '-' */ ||\n c === 46 /* '.' */ ||\n (c >= 48 && c <= 57) /* 0..9 */ ||\n c === 95 /* '_' */ ||\n (c >= 97 && c <= 122) /** a..z */ ||\n (c >= 65 && c <= 90) /* A..Z */ ||\n c == 0xb7 ||\n (c >= 0xc0 && c <= 0xd6) ||\n (c >= 0xd8 && c <= 0xf6) ||\n (c >= 0xf8 && c <= 0x37d) ||\n (c >= 0x37f && c <= 0x1fff) ||\n (c >= 0x200c && c <= 0x200d) ||\n (c >= 0x203f && c <= 0x2040) ||\n (c >= 0x2070 && c <= 0x218f) ||\n (c >= 0x2c00 && c <= 0x2fef) ||\n (c >= 0x3001 && c <= 0xd7ff) ||\n (c >= 0xf900 && c <= 0xfdcf) ||\n (c >= 0xfdf0 && c <= 0xfffd) ||\n (c >= 0x10000 && c <= 0xeffff));\n}\n/**\n * Code point equivalent of regex `\\p{White_Space}`.\n * From: https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isWhiteSpace(c) {\n return ((c >= 0x0009 && c <= 0x000d) ||\n c === 0x0020 ||\n c === 0x0085 ||\n (c >= 0x200e && c <= 0x200f) ||\n c === 0x2028 ||\n c === 0x2029);\n}\n/**\n * Code point equivalent of regex `\\p{Pattern_Syntax}`.\n * See https://www.unicode.org/Public/UCD/latest/ucd/PropList.txt\n */\nfunction _isPatternSyntax(c) {\n return ((c >= 0x0021 && c <= 0x0023) ||\n c === 0x0024 ||\n (c >= 0x0025 && c <= 0x0027) ||\n c === 0x0028 ||\n c === 0x0029 ||\n c === 0x002a ||\n c === 0x002b ||\n c === 0x002c ||\n c === 0x002d ||\n (c >= 0x002e && c <= 0x002f) ||\n (c >= 0x003a && c <= 0x003b) ||\n (c >= 0x003c && c <= 0x003e) ||\n (c >= 0x003f && c <= 0x0040) ||\n c === 0x005b ||\n c === 0x005c ||\n c === 0x005d ||\n c === 0x005e ||\n c === 0x0060 ||\n c === 0x007b ||\n c === 0x007c ||\n c === 0x007d ||\n c === 0x007e ||\n c === 0x00a1 ||\n (c >= 0x00a2 && c <= 0x00a5) ||\n c === 0x00a6 ||\n c === 0x00a7 ||\n c === 0x00a9 ||\n c === 0x00ab ||\n c === 0x00ac ||\n c === 0x00ae ||\n c === 0x00b0 ||\n c === 0x00b1 ||\n c === 0x00b6 ||\n c === 0x00bb ||\n c === 0x00bf ||\n c === 0x00d7 ||\n c === 0x00f7 ||\n (c >= 0x2010 && c <= 0x2015) ||\n (c >= 0x2016 && c <= 0x2017) ||\n c === 0x2018 ||\n c === 0x2019 ||\n c === 0x201a ||\n (c >= 0x201b && c <= 0x201c) ||\n c === 0x201d ||\n c === 0x201e ||\n c === 0x201f ||\n (c >= 0x2020 && c <= 0x2027) ||\n (c >= 0x2030 && c <= 0x2038) ||\n c === 0x2039 ||\n c === 0x203a ||\n (c >= 0x203b && c <= 0x203e) ||\n (c >= 0x2041 && c <= 0x2043) ||\n c === 0x2044 ||\n c === 0x2045 ||\n c === 0x2046 ||\n (c >= 0x2047 && c <= 0x2051) ||\n c === 0x2052 ||\n c === 0x2053 ||\n (c >= 0x2055 && c <= 0x205e) ||\n (c >= 0x2190 && c <= 0x2194) ||\n (c >= 0x2195 && c <= 0x2199) ||\n (c >= 0x219a && c <= 0x219b) ||\n (c >= 0x219c && c <= 0x219f) ||\n c === 0x21a0 ||\n (c >= 0x21a1 && c <= 0x21a2) ||\n c === 0x21a3 ||\n (c >= 0x21a4 && c <= 0x21a5) ||\n c === 0x21a6 ||\n (c >= 0x21a7 && c <= 0x21ad) ||\n c === 0x21ae ||\n (c >= 0x21af && c <= 0x21cd) ||\n (c >= 0x21ce && c <= 0x21cf) ||\n (c >= 0x21d0 && c <= 0x21d1) ||\n c === 0x21d2 ||\n c === 0x21d3 ||\n c === 0x21d4 ||\n (c >= 0x21d5 && c <= 0x21f3) ||\n (c >= 0x21f4 && c <= 0x22ff) ||\n (c >= 0x2300 && c <= 0x2307) ||\n c === 0x2308 ||\n c === 0x2309 ||\n c === 0x230a ||\n c === 0x230b ||\n (c >= 0x230c && c <= 0x231f) ||\n (c >= 0x2320 && c <= 0x2321) ||\n (c >= 0x2322 && c <= 0x2328) ||\n c === 0x2329 ||\n c === 0x232a ||\n (c >= 0x232b && c <= 0x237b) ||\n c === 0x237c ||\n (c >= 0x237d && c <= 0x239a) ||\n (c >= 0x239b && c <= 0x23b3) ||\n (c >= 0x23b4 && c <= 0x23db) ||\n (c >= 0x23dc && c <= 0x23e1) ||\n (c >= 0x23e2 && c <= 0x2426) ||\n (c >= 0x2427 && c <= 0x243f) ||\n (c >= 0x2440 && c <= 0x244a) ||\n (c >= 0x244b && c <= 0x245f) ||\n (c >= 0x2500 && c <= 0x25b6) ||\n c === 0x25b7 ||\n (c >= 0x25b8 && c <= 0x25c0) ||\n c === 0x25c1 ||\n (c >= 0x25c2 && c <= 0x25f7) ||\n (c >= 0x25f8 && c <= 0x25ff) ||\n (c >= 0x2600 && c <= 0x266e) ||\n c === 0x266f ||\n (c >= 0x2670 && c <= 0x2767) ||\n c === 0x2768 ||\n c === 0x2769 ||\n c === 0x276a ||\n c === 0x276b ||\n c === 0x276c ||\n c === 0x276d ||\n c === 0x276e ||\n c === 0x276f ||\n c === 0x2770 ||\n c === 0x2771 ||\n c === 0x2772 ||\n c === 0x2773 ||\n c === 0x2774 ||\n c === 0x2775 ||\n (c >= 0x2794 && c <= 0x27bf) ||\n (c >= 0x27c0 && c <= 0x27c4) ||\n c === 0x27c5 ||\n c === 0x27c6 ||\n (c >= 0x27c7 && c <= 0x27e5) ||\n c === 0x27e6 ||\n c === 0x27e7 ||\n c === 0x27e8 ||\n c === 0x27e9 ||\n c === 0x27ea ||\n c === 0x27eb ||\n c === 0x27ec ||\n c === 0x27ed ||\n c === 0x27ee ||\n c === 0x27ef ||\n (c >= 0x27f0 && c <= 0x27ff) ||\n (c >= 0x2800 && c <= 0x28ff) ||\n (c >= 0x2900 && c <= 0x2982) ||\n c === 0x2983 ||\n c === 0x2984 ||\n c === 0x2985 ||\n c === 0x2986 ||\n c === 0x2987 ||\n c === 0x2988 ||\n c === 0x2989 ||\n c === 0x298a ||\n c === 0x298b ||\n c === 0x298c ||\n c === 0x298d ||\n c === 0x298e ||\n c === 0x298f ||\n c === 0x2990 ||\n c === 0x2991 ||\n c === 0x2992 ||\n c === 0x2993 ||\n c === 0x2994 ||\n c === 0x2995 ||\n c === 0x2996 ||\n c === 0x2997 ||\n c === 0x2998 ||\n (c >= 0x2999 && c <= 0x29d7) ||\n c === 0x29d8 ||\n c === 0x29d9 ||\n c === 0x29da ||\n c === 0x29db ||\n (c >= 0x29dc && c <= 0x29fb) ||\n c === 0x29fc ||\n c === 0x29fd ||\n (c >= 0x29fe && c <= 0x2aff) ||\n (c >= 0x2b00 && c <= 0x2b2f) ||\n (c >= 0x2b30 && c <= 0x2b44) ||\n (c >= 0x2b45 && c <= 0x2b46) ||\n (c >= 0x2b47 && c <= 0x2b4c) ||\n (c >= 0x2b4d && c <= 0x2b73) ||\n (c >= 0x2b74 && c <= 0x2b75) ||\n (c >= 0x2b76 && c <= 0x2b95) ||\n c === 0x2b96 ||\n (c >= 0x2b97 && c <= 0x2bff) ||\n (c >= 0x2e00 && c <= 0x2e01) ||\n c === 0x2e02 ||\n c === 0x2e03 ||\n c === 0x2e04 ||\n c === 0x2e05 ||\n (c >= 0x2e06 && c <= 0x2e08) ||\n c === 0x2e09 ||\n c === 0x2e0a ||\n c === 0x2e0b ||\n c === 0x2e0c ||\n c === 0x2e0d ||\n (c >= 0x2e0e && c <= 0x2e16) ||\n c === 0x2e17 ||\n (c >= 0x2e18 && c <= 0x2e19) ||\n c === 0x2e1a ||\n c === 0x2e1b ||\n c === 0x2e1c ||\n c === 0x2e1d ||\n (c >= 0x2e1e && c <= 0x2e1f) ||\n c === 0x2e20 ||\n c === 0x2e21 ||\n c === 0x2e22 ||\n c === 0x2e23 ||\n c === 0x2e24 ||\n c === 0x2e25 ||\n c === 0x2e26 ||\n c === 0x2e27 ||\n c === 0x2e28 ||\n c === 0x2e29 ||\n (c >= 0x2e2a && c <= 0x2e2e) ||\n c === 0x2e2f ||\n (c >= 0x2e30 && c <= 0x2e39) ||\n (c >= 0x2e3a && c <= 0x2e3b) ||\n (c >= 0x2e3c && c <= 0x2e3f) ||\n c === 0x2e40 ||\n c === 0x2e41 ||\n c === 0x2e42 ||\n (c >= 0x2e43 && c <= 0x2e4f) ||\n (c >= 0x2e50 && c <= 0x2e51) ||\n c === 0x2e52 ||\n (c >= 0x2e53 && c <= 0x2e7f) ||\n (c >= 0x3001 && c <= 0x3003) ||\n c === 0x3008 ||\n c === 0x3009 ||\n c === 0x300a ||\n c === 0x300b ||\n c === 0x300c ||\n c === 0x300d ||\n c === 0x300e ||\n c === 0x300f ||\n c === 0x3010 ||\n c === 0x3011 ||\n (c >= 0x3012 && c <= 0x3013) ||\n c === 0x3014 ||\n c === 0x3015 ||\n c === 0x3016 ||\n c === 0x3017 ||\n c === 0x3018 ||\n c === 0x3019 ||\n c === 0x301a ||\n c === 0x301b ||\n c === 0x301c ||\n c === 0x301d ||\n (c >= 0x301e && c <= 0x301f) ||\n c === 0x3020 ||\n c === 0x3030 ||\n c === 0xfd3e ||\n c === 0xfd3f ||\n (c >= 0xfe45 && c <= 0xfe46));\n}\n","import { __assign } from \"tslib\";\nimport { ErrorKind } from './error';\nimport { Parser } from './parser';\nimport { isDateElement, isDateTimeSkeleton, isNumberElement, isNumberSkeleton, isPluralElement, isSelectElement, isTagElement, isTimeElement, } from './types';\nfunction pruneLocation(els) {\n els.forEach(function (el) {\n delete el.location;\n if (isSelectElement(el) || isPluralElement(el)) {\n for (var k in el.options) {\n delete el.options[k].location;\n pruneLocation(el.options[k].value);\n }\n }\n else if (isNumberElement(el) && isNumberSkeleton(el.style)) {\n delete el.style.location;\n }\n else if ((isDateElement(el) || isTimeElement(el)) &&\n isDateTimeSkeleton(el.style)) {\n delete el.style.location;\n }\n else if (isTagElement(el)) {\n pruneLocation(el.children);\n }\n });\n}\nexport function parse(message, opts) {\n if (opts === void 0) { opts = {}; }\n opts = __assign({ shouldParseSkeletons: true, requiresOtherClause: true }, opts);\n var result = new Parser(message, opts).parse();\n if (result.err) {\n var error = SyntaxError(ErrorKind[result.err.kind]);\n // @ts-expect-error Assign to error object\n error.location = result.err.location;\n // @ts-expect-error Assign to error object\n error.originalMessage = result.err.message;\n throw error;\n }\n if (!(opts === null || opts === void 0 ? void 0 : opts.captureLocation)) {\n pruneLocation(result.val);\n }\n return result.val;\n}\nexport * from './types';\n// only for testing\nexport var _Parser = Parser;\n","import { __extends } from \"tslib\";\nexport var IntlErrorCode;\n(function (IntlErrorCode) {\n IntlErrorCode[\"FORMAT_ERROR\"] = \"FORMAT_ERROR\";\n IntlErrorCode[\"UNSUPPORTED_FORMATTER\"] = \"UNSUPPORTED_FORMATTER\";\n IntlErrorCode[\"INVALID_CONFIG\"] = \"INVALID_CONFIG\";\n IntlErrorCode[\"MISSING_DATA\"] = \"MISSING_DATA\";\n IntlErrorCode[\"MISSING_TRANSLATION\"] = \"MISSING_TRANSLATION\";\n})(IntlErrorCode || (IntlErrorCode = {}));\nvar IntlError = /** @class */ (function (_super) {\n __extends(IntlError, _super);\n function IntlError(code, message, exception) {\n var _this = this;\n var err = exception\n ? exception instanceof Error\n ? exception\n : new Error(String(exception))\n : undefined;\n _this = _super.call(this, \"[@formatjs/intl Error \".concat(code, \"] \").concat(message, \"\\n\").concat(err ? \"\\n\".concat(err.message, \"\\n\").concat(err.stack) : '')) || this;\n _this.code = code;\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (typeof Error.captureStackTrace === 'function') {\n // @ts-ignore just so we don't need to declare dep on @types/node\n Error.captureStackTrace(_this, IntlError);\n }\n return _this;\n }\n return IntlError;\n}(Error));\nexport { IntlError };\nvar UnsupportedFormatterError = /** @class */ (function (_super) {\n __extends(UnsupportedFormatterError, _super);\n function UnsupportedFormatterError(message, exception) {\n return _super.call(this, IntlErrorCode.UNSUPPORTED_FORMATTER, message, exception) || this;\n }\n return UnsupportedFormatterError;\n}(IntlError));\nexport { UnsupportedFormatterError };\nvar InvalidConfigError = /** @class */ (function (_super) {\n __extends(InvalidConfigError, _super);\n function InvalidConfigError(message, exception) {\n return _super.call(this, IntlErrorCode.INVALID_CONFIG, message, exception) || this;\n }\n return InvalidConfigError;\n}(IntlError));\nexport { InvalidConfigError };\nvar MissingDataError = /** @class */ (function (_super) {\n __extends(MissingDataError, _super);\n function MissingDataError(message, exception) {\n return _super.call(this, IntlErrorCode.MISSING_DATA, message, exception) || this;\n }\n return MissingDataError;\n}(IntlError));\nexport { MissingDataError };\nvar IntlFormatError = /** @class */ (function (_super) {\n __extends(IntlFormatError, _super);\n function IntlFormatError(message, locale, exception) {\n var _this = _super.call(this, IntlErrorCode.FORMAT_ERROR, \"\".concat(message, \"\\nLocale: \").concat(locale, \"\\n\"), exception) || this;\n _this.locale = locale;\n return _this;\n }\n return IntlFormatError;\n}(IntlError));\nexport { IntlFormatError };\nvar MessageFormatError = /** @class */ (function (_super) {\n __extends(MessageFormatError, _super);\n function MessageFormatError(message, locale, descriptor, exception) {\n var _this = _super.call(this, \"\".concat(message, \"\\nMessageID: \").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.id, \"\\nDefault Message: \").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.defaultMessage, \"\\nDescription: \").concat(descriptor === null || descriptor === void 0 ? void 0 : descriptor.description, \"\\n\"), locale, exception) || this;\n _this.descriptor = descriptor;\n _this.locale = locale;\n return _this;\n }\n return MessageFormatError;\n}(IntlFormatError));\nexport { MessageFormatError };\nvar MissingTranslationError = /** @class */ (function (_super) {\n __extends(MissingTranslationError, _super);\n function MissingTranslationError(descriptor, locale) {\n var _this = _super.call(this, IntlErrorCode.MISSING_TRANSLATION, \"Missing message: \\\"\".concat(descriptor.id, \"\\\" for locale \\\"\").concat(locale, \"\\\", using \").concat(descriptor.defaultMessage\n ? \"default message (\".concat(typeof descriptor.defaultMessage === 'string'\n ? descriptor.defaultMessage\n : descriptor.defaultMessage\n .map(function (e) { var _a; return (_a = e.value) !== null && _a !== void 0 ? _a : JSON.stringify(e); })\n .join(), \")\")\n : 'id', \" as fallback.\")) || this;\n _this.descriptor = descriptor;\n return _this;\n }\n return MissingTranslationError;\n}(IntlError));\nexport { MissingTranslationError };\n","import { __assign, __spreadArray } from \"tslib\";\nimport { memoize, strategies } from '@formatjs/fast-memoize';\nimport { IntlMessageFormat } from 'intl-messageformat';\nimport { UnsupportedFormatterError } from './error';\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\nexport function filterProps(props, allowlist, defaults) {\n if (defaults === void 0) { defaults = {}; }\n return allowlist.reduce(function (filtered, name) {\n if (name in props) {\n filtered[name] = props[name];\n }\n else if (name in defaults) {\n filtered[name] = defaults[name];\n }\n return filtered;\n }, {});\n}\nvar defaultErrorHandler = function (error) {\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (process.env.NODE_ENV !== 'production') {\n console.error(error);\n }\n};\nvar defaultWarnHandler = function (warning) {\n // @ts-ignore just so we don't need to declare dep on @types/node\n if (process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n};\nexport var DEFAULT_INTL_CONFIG = {\n formats: {},\n messages: {},\n timeZone: undefined,\n defaultLocale: 'en',\n defaultFormats: {},\n fallbackOnEmptyString: true,\n onError: defaultErrorHandler,\n onWarn: defaultWarnHandler,\n};\nexport function createIntlCache() {\n return {\n dateTime: {},\n number: {},\n message: {},\n relativeTime: {},\n pluralRules: {},\n list: {},\n displayNames: {},\n };\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\n/**\n * Create intl formatters and populate cache\n * @param cache explicit cache to prevent leaking memory\n */\nexport function createFormatters(cache) {\n if (cache === void 0) { cache = createIntlCache(); }\n var RelativeTimeFormat = Intl.RelativeTimeFormat;\n var ListFormat = Intl.ListFormat;\n var DisplayNames = Intl.DisplayNames;\n var getDateTimeFormat = memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n });\n var getNumberFormat = memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n });\n var getPluralRules = memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n });\n return {\n getDateTimeFormat: getDateTimeFormat,\n getNumberFormat: getNumberFormat,\n getMessageFormat: memoize(function (message, locales, overrideFormats, opts) {\n return new IntlMessageFormat(message, locales, overrideFormats, __assign({ formatters: {\n getNumberFormat: getNumberFormat,\n getDateTimeFormat: getDateTimeFormat,\n getPluralRules: getPluralRules,\n } }, (opts || {})));\n }, {\n cache: createFastMemoizeCache(cache.message),\n strategy: strategies.variadic,\n }),\n getRelativeTimeFormat: memoize(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (RelativeTimeFormat.bind.apply(RelativeTimeFormat, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.relativeTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: getPluralRules,\n getListFormat: memoize(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (ListFormat.bind.apply(ListFormat, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.list),\n strategy: strategies.variadic,\n }),\n getDisplayNames: memoize(function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new (DisplayNames.bind.apply(DisplayNames, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.displayNames),\n strategy: strategies.variadic,\n }),\n };\n}\nexport function getNamedFormat(formats, type, name, onError) {\n var formatType = formats && formats[type];\n var format;\n if (formatType) {\n format = formatType[name];\n }\n if (format) {\n return format;\n }\n onError(new UnsupportedFormatterError(\"No \".concat(type, \" format named: \").concat(name)));\n}\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;","/**\n * @mui/styled-engine v6.0.2\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/* eslint-disable no-underscore-dangle */\nimport emStyled from '@emotion/styled';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const internal_processStyles = (tag, processor) => {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n};\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from \"./StyledEngineProvider/index.js\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.js\";","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveProps from '@mui/utils/resolveProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PropsContext = /*#__PURE__*/React.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/_jsx(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object\n} : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return resolveProps(config.defaultProps, props);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return resolveProps(config, props);\n }\n return props;\n}\nexport function useDefaultProps({\n props,\n name\n}) {\n const ctx = React.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\nexport default DefaultPropsProvider;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RtlContext = /*#__PURE__*/React.createContext();\nfunction RtlProvider({\n value,\n ...props\n}) {\n return /*#__PURE__*/_jsx(RtlContext.Provider, {\n value: value ?? true,\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? RtlProvider.propTypes = {\n children: PropTypes.node,\n value: PropTypes.bool\n} : void 0;\nexport const useRtl = () => {\n const value = React.useContext(RtlContext);\n return value ?? false;\n};\nexport default RtlProvider;","import PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from \"../merge/index.js\";\nimport { isCqShorthand, getContainerQuery } from \"../cssContainerQueries/index.js\";\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nconst defaultContainerQueries = {\n containerQueries: containerName => ({\n up: key => {\n let result = typeof key === 'number' ? key : values[key] || key;\n if (typeof result === 'number') {\n result = `${result}px`;\n }\n return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`;\n }\n })\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n if (isCqShorthand(themeBreakpoints.keys, breakpoint)) {\n const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, breakpoint);\n if (containerKey) {\n acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n }\n }\n // key is breakpoint\n else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction({\n theme,\n ...props[key]\n });\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? {\n ...styleFunction.propTypes,\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n } : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n const breakpointsInOrder = breakpointsInput.keys?.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (!['rgb', 'rgba', 'hsl', 'hsla', 'color'].includes(type)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\nThe following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (!['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].includes(colorSpace)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\nThe following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.` : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.includes('hsl') && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.includes('rgb')) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.includes('hsl')) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.includes('color')) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.startsWith('#')) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.includes('rgb') || color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.includes('rgb')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","/* eslint-disable no-underscore-dangle */\nimport styledEngineStyled, { internal_processStyles as processStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.js\";\nimport styleFunctionSx from \"../styleFunctionSx/index.js\";\nexport const systemDefaultTheme = createTheme();\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nfunction resolveTheme(themeId, theme, defaultTheme) {\n return isObjectEmpty(theme) ? defaultTheme : theme[themeId] || theme;\n}\nconst PROCESSED_PROPS = Symbol('mui.processed_props');\nfunction attachTheme(props, themeId, defaultTheme) {\n if (PROCESSED_PROPS in props) {\n return props[PROCESSED_PROPS];\n }\n const processedProps = {\n ...props,\n theme: resolveTheme(themeId, props.theme, defaultTheme)\n };\n props[PROCESSED_PROPS] = processedProps;\n processedProps[PROCESSED_PROPS] = processedProps;\n return processedProps;\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (_props, styles) => styles[slot];\n}\nfunction processStyle(style, props) {\n const resolvedStyle = typeof style === 'function' ? style(props) : style;\n if (Array.isArray(resolvedStyle)) {\n return resolvedStyle.flatMap(subStyle => processStyle(subStyle, props));\n }\n if (Array.isArray(resolvedStyle?.variants)) {\n const {\n variants,\n ...otherStyles\n } = resolvedStyle;\n let result = otherStyles;\n let mergedState; // We might not need it, initalized lazily\n\n /* eslint-disable no-labels */\n variantLoop: for (let i = 0; i < variants.length; i += 1) {\n const variant = variants[i];\n if (typeof variant.props === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n if (!variant.props(mergedState)) {\n continue;\n }\n } else {\n for (const key in variant.props) {\n if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {\n continue variantLoop;\n }\n }\n }\n if (!Array.isArray(result)) {\n result = [result];\n }\n if (typeof variant.style === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n result.push(variant.style(mergedState));\n } else {\n result.push(variant.style);\n }\n }\n /* eslint-enable no-labels */\n\n return result;\n }\n return resolvedStyle;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n const systemSx = props => {\n return styleFunctionSx(attachTheme(props, themeId, defaultTheme));\n };\n systemSx.__mui_systemSx = true;\n const styled = (tag, inputOptions = {}) => {\n // Filter out the `sx` style function from the previous styled component to prevent unnecessary styles generated by the composite components.\n processStyles(tag, styles => styles.filter(style => !style?.__mui_systemSx));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),\n ...options\n } = inputOptions;\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, {\n shouldForwardProp: shouldForwardPropOption,\n label,\n ...options\n });\n const transformStyleArg = style => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof style === 'function' && style.__emotion_real !== style || isPlainObject(style)) {\n return props => processStyle(style, attachTheme(props, themeId, defaultTheme));\n }\n return style;\n };\n const muiStyledResolver = (style, ...expressions) => {\n let transformedStyle = transformStyleArg(style);\n const expressionsWithDefaultTheme = expressions ? expressions.map(transformStyleArg) : [];\n if (componentName && overridesResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme(themeId, props.theme, defaultTheme);\n if (!theme.components || !theme.components[componentName] || !theme.components[componentName].styleOverrides) {\n return null;\n }\n const styleOverrides = theme.components[componentName].styleOverrides;\n const resolvedStyleOverrides = {};\n const propsWithTheme = attachTheme(props, themeId, defaultTheme);\n\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n // eslint-disable-next-line guard-for-in\n for (const slotKey in styleOverrides) {\n resolvedStyleOverrides[slotKey] = processStyle(styleOverrides[slotKey], propsWithTheme);\n }\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsWithDefaultTheme.push(props => {\n const theme = resolveTheme(themeId, props.theme, defaultTheme);\n const themeVariants = theme?.components?.[componentName]?.variants;\n if (!themeVariants) {\n return null;\n }\n return processStyle({\n variants: themeVariants\n }, attachTheme(props, themeId, defaultTheme));\n });\n }\n if (!skipSx) {\n expressionsWithDefaultTheme.push(systemSx);\n }\n const numOfCustomFnsApplied = expressionsWithDefaultTheme.length - expressions.length;\n if (Array.isArray(style) && numOfCustomFnsApplied > 0) {\n const placeholders = new Array(numOfCustomFnsApplied).fill('');\n // If the type is array, than we need to add placeholders in the template for the overrides, variants and the sx styles.\n transformedStyle = [...style, ...placeholders];\n transformedStyle.raw = [...style.raw, ...placeholders];\n }\n const Component = defaultStyledResolver(transformedStyle, ...expressionsWithDefaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n let displayName;\n if (componentName) {\n displayName = `${componentName}${capitalize(componentSlot || '')}`;\n }\n if (displayName === undefined) {\n displayName = `Styled(${getDisplayName(tag)})`;\n }\n Component.displayName = displayName;\n }\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n return styled;\n}\nfunction isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\nfunction lowercaseFirstLetter(string) {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n}","import { createUnarySpacing } from \"../spacing/index.js\";\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8,\n// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n// Smaller components, such as icons, can align to a 4dp grid.\n// https://m2.material.io/design/layout/understanding-layout.html\ntransform = createUnarySpacing({\n spacing: spacingInput\n})) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return {\n ...acc,\n [obj.key]: obj.val\n };\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5,\n ...other\n } = breakpoints;\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return {\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit,\n ...other\n };\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n *\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * <Box sx={theme => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars) {\n if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== 'function') {\n return {};\n }\n // If CssVarsProvider is used as a provider, returns '*:where({selector}) &'\n let selector = theme.getColorSchemeSelector(key);\n if (selector.includes('data-') || selector.includes('.')) {\n // '*' is required as a workaround for Emotion issue (https://github.com/emotion-js/emotion/issues/2836)\n selector = `*:where(${selector.replace(/\\s*&$/, '')}) &`;\n }\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from \"../createBreakpoints/createBreakpoints.js\";\nimport cssContainerQueries from \"../cssContainerQueries/index.js\";\nimport shape from \"./shape.js\";\nimport createSpacing from \"./createSpacing.js\";\nimport styleFunctionSx from \"../styleFunctionSx/styleFunctionSx.js\";\nimport defaultSxConfig from \"../styleFunctionSx/defaultSxConfig.js\";\nimport applyStyles from \"./applyStyles.js\";\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {},\n ...other\n } = options;\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: {\n mode: 'light',\n ...paletteInput\n },\n spacing,\n shape: {\n ...shape,\n ...shapeInput\n }\n }, other);\n muiTheme = cssContainerQueries(muiTheme);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/**\n * For using in `sx` prop to sort the breakpoint from low to high.\n * Note: this function does not work and will not support multiple units.\n * e.g. input: { '@container (min-width:300px)': '1rem', '@container (min-width:40rem)': '2rem' }\n * output: { '@container (min-width:40rem)': '2rem', '@container (min-width:300px)': '1rem' } // since 40 < 300 eventhough 40rem > 300px\n */\nexport function sortContainerQueries(theme, css) {\n if (!theme.containerQueries) {\n return css;\n }\n const sorted = Object.keys(css).filter(key => key.startsWith('@container')).sort((a, b) => {\n const regex = /min-width:\\s*([0-9.]+)/;\n return +(a.match(regex)?.[1] || 0) - +(b.match(regex)?.[1] || 0);\n });\n if (!sorted.length) {\n return css;\n }\n return sorted.reduce((acc, key) => {\n const value = css[key];\n delete acc[key];\n acc[key] = value;\n return acc;\n }, {\n ...css\n });\n}\nexport function isCqShorthand(breakpointKeys, value) {\n return value === '@' || value.startsWith('@') && (breakpointKeys.some(key => value.startsWith(`@${key}`)) || !!value.match(/^@\\d/));\n}\nexport function getContainerQuery(theme, shorthand) {\n const matches = shorthand.match(/^@([^/]+)?\\/?(.+)?$/);\n if (!matches) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \\`@<breakpoint | number>\\` or \\`@<breakpoint | number>/<container>\\`.\nFor example, \\`@sm\\` or \\`@600\\` or \\`@40rem/sidebar\\`.` : _formatMuiErrorMessage(18, `(${shorthand})`));\n }\n return null;\n }\n const [, containerQuery, containerName] = matches;\n const value = Number.isNaN(+containerQuery) ? containerQuery || 0 : +containerQuery;\n return theme.containerQueries(containerName).up(value);\n}\nexport default function cssContainerQueries(themeInput) {\n const toContainerQuery = (mediaQuery, name) => mediaQuery.replace('@media', name ? `@container ${name}` : '@container');\n function attachCq(node, name) {\n node.up = (...args) => toContainerQuery(themeInput.breakpoints.up(...args), name);\n node.down = (...args) => toContainerQuery(themeInput.breakpoints.down(...args), name);\n node.between = (...args) => toContainerQuery(themeInput.breakpoints.between(...args), name);\n node.only = (...args) => toContainerQuery(themeInput.breakpoints.only(...args), name);\n node.not = (...args) => {\n const result = toContainerQuery(themeInput.breakpoints.not(...args), name);\n if (result.includes('not all and')) {\n // `@container` does not work with `not all and`, so need to invert the logic\n return result.replace('not all and ', '').replace('min-width:', 'width<').replace('max-width:', 'width>').replace('and', 'or');\n }\n return result;\n };\n }\n const node = {};\n const containerQueries = name => {\n attachCq(node, name);\n return node;\n };\n attachCq(containerQueries);\n return {\n ...themeInput,\n containerQueries\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport { getPath } from \"../style/index.js\";\nimport merge from \"../merge/index.js\";\nimport memoize from \"../memoize/index.js\";\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue;\n if (typeof themeSpacing === 'number' || typeof themeSpacing === 'string') {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof val !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);\n }\n }\n if (typeof themeSpacing === 'string') {\n return `calc(${val} * ${themeSpacing})`;\n }\n return themeSpacing * val;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n const abs = Math.abs(val);\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n const transformed = themeSpacing[abs];\n if (val >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n return transformer(propValue);\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (!keys.includes(prop)) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","import merge from \"../merge/index.js\";\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from \"../responsivePropType/index.js\";\nimport style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport responsivePropType from \"../responsivePropType/index.js\";\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { handleBreakpoints, values as breakpointsValues } from \"../breakpoints/index.js\";\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (props.theme?.breakpoints?.unit !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from \"../spacing/index.js\";\nimport { borderRadius, borderTransform } from \"../borders/index.js\";\nimport { gap, rowGap, columnGap } from \"../cssGrid/index.js\";\nimport { paletteTransform } from \"../palette/index.js\";\nimport { maxWidth, sizingTransform } from \"../sizing/index.js\";\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n font: {\n themeKey: 'font'\n },\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import { isPlainObject } from '@mui/utils/deepmerge';\nimport defaultSxConfig from \"./defaultSxConfig.js\";\nconst splitProps = props => {\n const result = {\n systemProps: {},\n otherProps: {}\n };\n const config = props?.theme?.unstable_sxConfig ?? defaultSxConfig;\n Object.keys(props).forEach(prop => {\n if (config[prop]) {\n result.systemProps[prop] = props[prop];\n } else {\n result.otherProps[prop] = props[prop];\n }\n });\n return result;\n};\nexport default function extendSxProp(props) {\n const {\n sx: inSx,\n ...other\n } = props;\n const {\n systemProps,\n otherProps\n } = splitProps(other);\n let finalSx;\n if (Array.isArray(inSx)) {\n finalSx = [systemProps, ...inSx];\n } else if (typeof inSx === 'function') {\n finalSx = (...args) => {\n const result = inSx(...args);\n if (!isPlainObject(result)) {\n return systemProps;\n }\n return {\n ...systemProps,\n ...result\n };\n };\n } else {\n finalSx = {\n ...systemProps,\n ...inSx\n };\n }\n return {\n ...otherProps,\n sx: finalSx\n };\n}","import capitalize from '@mui/utils/capitalize';\nimport merge from \"../merge/index.js\";\nimport { getPath, getStyleValue as getValue } from \"../style/index.js\";\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from \"../breakpoints/index.js\";\nimport { sortContainerQueries } from \"../cssContainerQueries/index.js\";\nimport defaultSxConfig from \"./defaultSxConfig.js\";\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = theme.unstable_sxConfig ?? defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","import createStyled from \"../createStyled/index.js\";\nconst styled = createStyled();\nexport default styled;","'use client';\n\nimport createTheme from \"../createTheme/index.js\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","'use client';\n\nimport getThemeProps from \"./getThemeProps.js\";\nimport useTheme from \"../useTheme/index.js\";\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n return getThemeProps({\n theme,\n name,\n props\n });\n}","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`capitalize(string)\\` expects a string argument.` : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (!isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? {\n ...target\n } : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","/**\n * WARNING: Don't import this directly.\n * Use `MuiError` from `@mui/internal-babel-macros/MuiError.macro` instead.\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code) {\n // Apply babel-plugin-transform-template-literals in loose mode\n // loose mode is safe if we're concatenating primitives\n // see https://babeljs.io/docs/en/babel-plugin-transform-template-literals#loose\n /* eslint-disable prefer-template */\n let url = 'https://mui.com/production-error/?code=' + code;\n for (let i = 1; i < arguments.length; i += 1) {\n // rest params over-transpile for this case\n // eslint-disable-next-line prefer-rest-params\n url += '&args[]=' + encodeURIComponent(arguments[i]);\n }\n return 'Minified MUI error #' + code + '; visit ' + url + ' for the full message.';\n /* eslint-enable prefer-template */\n}","import ClassNameGenerator from \"../ClassNameGenerator/index.js\";\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from \"../generateUtilityClass/index.js\";\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","import * as React from 'react';\n\n/**\n * Returns the ref of a React node handling differences between React 19 and older versions.\n * It will return null if the node is not a valid React element.\n *\n * @param element React.ReactNode\n * @returns React.Ref<any> | null\n */\nexport default function getReactNodeRef(element) {\n if (!element || ! /*#__PURE__*/React.isValidElement(element)) {\n return null;\n }\n\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n return element.props.propertyIsEnumerable('ref') ? element.props.ref :\n // @ts-expect-error element.ref is not included in the ReactElement type\n // We cannot check for it, but isValidElement is true at this point\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n element.ref;\n}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(doc) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = doc.documentElement.clientWidth;\n return Math.abs(window.innerWidth - documentWidth);\n}","/**\n * Returns a boolean indicating if the event's target has :focus-visible\n */\nexport default function isFocusVisible(element) {\n try {\n return element.matches(':focus-visible');\n } catch (error) {\n // Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped\n // Tests that rely on `:focus-visible` will still have to be skipped in jsdom\n if (process.env.NODE_ENV !== 'production' && !/jsdom/.test(window.navigator.userAgent)) {\n console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\\n'));\n }\n }\n return false;\n}","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param defaultProps\n * @param props\n * @returns resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = {\n ...props\n };\n for (const key in defaultProps) {\n if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {\n const propName = key;\n if (propName === 'components' || propName === 'slots') {\n output[propName] = {\n ...defaultProps[propName],\n ...output[propName]\n };\n } else if (propName === 'componentsProps' || propName === 'slotProps') {\n const defaultSlotProps = defaultProps[propName];\n const slotProps = props[propName];\n if (!slotProps) {\n output[propName] = defaultSlotProps || {};\n } else if (!defaultSlotProps) {\n output[propName] = slotProps;\n } else {\n output[propName] = {\n ...slotProps\n };\n for (const slotKey in defaultSlotProps) {\n if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {\n const slotPropName = slotKey;\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n }\n }\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n }\n }\n return output;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n // Object.is() is not equivalent to the === operator.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is for more details.\n if (!isControlled && !Object.is(defaultValue, defaultProp)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from \"../setRef/index.js\";\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from \"../useLazyRef/useLazyRef.js\";\nimport useOnMount from \"../useOnMount/useOnMount.js\";\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = null;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/* eslint-disable class-methods-use-this */\nimport defaultDayjs from 'dayjs';\nimport weekOfYear from 'dayjs/plugin/weekOfYear';\nimport customParseFormatPlugin from 'dayjs/plugin/customParseFormat';\nimport localizedFormatPlugin from 'dayjs/plugin/localizedFormat';\nimport isBetweenPlugin from 'dayjs/plugin/isBetween';\nimport { buildWarning } from '../internals/utils/warning';\ndefaultDayjs.extend(customParseFormatPlugin);\ndefaultDayjs.extend(localizedFormatPlugin);\ndefaultDayjs.extend(isBetweenPlugin);\nconst localeNotFoundWarning = buildWarning(['Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale', \"Or you forget to import the locale with `require('dayjs/locale/{localeUsed}')`\", 'fallback on English locale']);\nconst formatTokenMap = {\n // Year\n YY: 'year',\n YYYY: {\n sectionType: 'year',\n contentType: 'digit',\n maxLength: 4\n },\n // Month\n M: {\n sectionType: 'month',\n contentType: 'digit',\n maxLength: 2\n },\n MM: 'month',\n MMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n MMMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n // Day of the month\n D: {\n sectionType: 'day',\n contentType: 'digit',\n maxLength: 2\n },\n DD: 'day',\n Do: {\n sectionType: 'day',\n contentType: 'digit-with-letter'\n },\n // Day of the week\n d: {\n sectionType: 'weekDay',\n contentType: 'digit',\n maxLength: 2\n },\n dd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n ddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n dddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n // Meridiem\n A: 'meridiem',\n a: 'meridiem',\n // Hours\n H: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n HH: 'hours',\n h: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n hh: 'hours',\n // Minutes\n m: {\n sectionType: 'minutes',\n contentType: 'digit',\n maxLength: 2\n },\n mm: 'minutes',\n // Seconds\n s: {\n sectionType: 'seconds',\n contentType: 'digit',\n maxLength: 2\n },\n ss: 'seconds'\n};\nconst defaultFormats = {\n year: 'YYYY',\n month: 'MMMM',\n monthShort: 'MMM',\n dayOfMonth: 'D',\n weekday: 'dddd',\n weekdayShort: 'ddd',\n hours24h: 'HH',\n hours12h: 'hh',\n meridiem: 'A',\n minutes: 'mm',\n seconds: 'ss',\n fullDate: 'll',\n fullDateWithWeekday: 'dddd, LL',\n keyboardDate: 'L',\n shortDate: 'MMM D',\n normalDate: 'D MMMM',\n normalDateWithWeekday: 'ddd, MMM D',\n monthAndYear: 'MMMM YYYY',\n monthAndDate: 'MMMM D',\n fullTime: 'LT',\n fullTime12h: 'hh:mm A',\n fullTime24h: 'HH:mm',\n fullDateTime: 'lll',\n fullDateTime12h: 'll hh:mm A',\n fullDateTime24h: 'll HH:mm',\n keyboardDateTime: 'L LT',\n keyboardDateTime12h: 'L hh:mm A',\n keyboardDateTime24h: 'L HH:mm'\n};\nconst MISSING_UTC_PLUGIN = ['Missing UTC plugin', 'To be able to use UTC or timezones, you have to enable the `utc` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc'].join('\\n');\nconst MISSING_TIMEZONE_PLUGIN = ['Missing timezone plugin', 'To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone'].join('\\n');\nconst withLocale = (dayjs, locale) => !locale ? dayjs : (...args) => dayjs(...args).locale(locale);\n\n/**\n * Based on `@date-io/dayjs`\n *\n * MIT License\n *\n * Copyright (c) 2017 Dmitriy Kovalenko\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport class AdapterDayjs {\n constructor({\n locale: _locale,\n formats,\n instance\n } = {}) {\n var _this$rawDayJsInstanc;\n this.isMUIAdapter = true;\n this.isTimezoneCompatible = true;\n this.lib = 'dayjs';\n this.rawDayJsInstance = void 0;\n this.dayjs = void 0;\n this.locale = void 0;\n this.formats = void 0;\n this.escapedCharacters = {\n start: '[',\n end: ']'\n };\n this.formatTokenMap = formatTokenMap;\n this.setLocaleToValue = value => {\n const expectedLocale = this.getCurrentLocaleCode();\n if (expectedLocale === value.locale()) {\n return value;\n }\n return value.locale(expectedLocale);\n };\n this.hasUTCPlugin = () => typeof defaultDayjs.utc !== 'undefined';\n this.hasTimezonePlugin = () => typeof defaultDayjs.tz !== 'undefined';\n this.isSame = (value, comparing, comparisonTemplate) => {\n const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));\n return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);\n };\n /**\n * Replace \"default\" by undefined before passing it to `dayjs\n */\n this.cleanTimezone = timezone => timezone === 'default' ? undefined : timezone;\n this.createSystemDate = value => {\n // TODO v7: Stop using `this.rawDayJsInstance` (drop the `instance` param on the adapters)\n /* istanbul ignore next */\n if (this.rawDayJsInstance) {\n return this.rawDayJsInstance(value);\n }\n if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {\n const timezone = defaultDayjs.tz.guess();\n\n // We can't change the system timezone in the tests\n /* istanbul ignore next */\n if (timezone !== 'UTC') {\n return defaultDayjs.tz(value, timezone);\n }\n return defaultDayjs(value);\n }\n return defaultDayjs(value);\n };\n this.createUTCDate = value => {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return defaultDayjs.utc(value);\n };\n this.createTZDate = (value, timezone) => {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n\n /* istanbul ignore next */\n if (!this.hasTimezonePlugin()) {\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n const keepLocalTime = value !== undefined && !value.endsWith('Z');\n return defaultDayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime);\n };\n this.getLocaleFormats = () => {\n const locales = defaultDayjs.Ls;\n const locale = this.locale || 'en';\n let localeObject = locales[locale];\n if (localeObject === undefined) {\n localeNotFoundWarning();\n localeObject = locales.en;\n }\n return localeObject.formats;\n };\n this.date = value => {\n if (value === null) {\n return null;\n }\n return this.dayjs(value);\n };\n this.dateWithTimezone = (value, timezone) => {\n if (value === null) {\n return null;\n }\n let parsedValue;\n if (timezone === 'UTC') {\n parsedValue = this.createUTCDate(value);\n } else if (timezone === 'system' || timezone === 'default' && !this.hasTimezonePlugin()) {\n parsedValue = this.createSystemDate(value);\n } else {\n parsedValue = this.createTZDate(value, timezone);\n }\n if (this.locale === undefined) {\n return parsedValue;\n }\n return parsedValue.locale(this.locale);\n };\n this.getTimezone = value => {\n if (this.hasUTCPlugin() && value.isUTC()) {\n return 'UTC';\n }\n if (this.hasTimezonePlugin()) {\n var _value$$x;\n // @ts-ignore\n const zone = (_value$$x = value.$x) == null ? void 0 : _value$$x.$timezone;\n return zone != null ? zone : 'system';\n }\n return 'system';\n };\n this.setTimezone = (value, timezone) => {\n if (this.getTimezone(value) === timezone) {\n return value;\n }\n if (timezone === 'UTC') {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return value.utc();\n }\n\n // We know that we have the UTC plugin.\n // Otherwise, the value timezone would always equal \"system\".\n // And it would be caught by the first \"if\" of this method.\n if (timezone === 'system') {\n return value.local();\n }\n if (!this.hasTimezonePlugin()) {\n if (timezone === 'default') {\n return value;\n }\n\n /* istanbul ignore next */\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n return defaultDayjs.tz(value, this.cleanTimezone(timezone));\n };\n this.toJsDate = value => {\n return value.toDate();\n };\n this.parseISO = isoString => {\n return this.dayjs(isoString);\n };\n this.toISO = value => {\n return value.toISOString();\n };\n this.parse = (value, format) => {\n if (value === '') {\n return null;\n }\n return this.dayjs(value, format, this.locale, true);\n };\n this.getCurrentLocaleCode = () => {\n return this.locale || 'en';\n };\n this.is12HourCycleInCurrentLocale = () => {\n /* istanbul ignore next */\n return /A|a/.test(this.getLocaleFormats().LT || '');\n };\n this.expandFormat = format => {\n const localeFormats = this.getLocaleFormats();\n\n // @see https://github.com/iamkun/dayjs/blob/dev/src/plugin/localizedFormat/index.js\n const t = formatBis => formatBis.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));\n return format.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {\n const B = b && b.toUpperCase();\n return a || localeFormats[b] || t(localeFormats[B]);\n });\n };\n this.getFormatHelperText = format => {\n return this.expandFormat(format).replace(/a/gi, '(a|p)m').toLocaleLowerCase();\n };\n this.isNull = value => {\n return value === null;\n };\n this.isValid = value => {\n return this.dayjs(value).isValid();\n };\n this.format = (value, formatKey) => {\n return this.formatByString(value, this.formats[formatKey]);\n };\n this.formatByString = (value, formatString) => {\n return this.dayjs(value).format(formatString);\n };\n this.formatNumber = numberToFormat => {\n return numberToFormat;\n };\n this.getDiff = (value, comparing, unit) => {\n return value.diff(comparing, unit);\n };\n this.isEqual = (value, comparing) => {\n if (value === null && comparing === null) {\n return true;\n }\n return this.dayjs(value).toDate().getTime() === this.dayjs(comparing).toDate().getTime();\n };\n this.isSameYear = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY');\n };\n this.isSameMonth = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM');\n };\n this.isSameDay = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM-DD');\n };\n this.isSameHour = (value, comparing) => {\n return value.isSame(comparing, 'hour');\n };\n this.isAfter = (value, comparing) => {\n return value > comparing;\n };\n this.isAfterYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();\n };\n this.isAfterDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();\n };\n this.isBefore = (value, comparing) => {\n return value < comparing;\n };\n this.isBeforeYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();\n };\n this.isBeforeDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();\n };\n this.isWithinRange = (value, [start, end]) => {\n return value >= start && value <= end;\n };\n this.startOfYear = value => {\n return value.startOf('year');\n };\n this.startOfMonth = value => {\n return value.startOf('month');\n };\n this.startOfWeek = value => {\n return value.startOf('week');\n };\n this.startOfDay = value => {\n return value.startOf('day');\n };\n this.endOfYear = value => {\n return value.endOf('year');\n };\n this.endOfMonth = value => {\n return value.endOf('month');\n };\n this.endOfWeek = value => {\n return value.endOf('week');\n };\n this.endOfDay = value => {\n return value.endOf('day');\n };\n this.addYears = (value, amount) => {\n return amount < 0 ? value.subtract(Math.abs(amount), 'year') : value.add(amount, 'year');\n };\n this.addMonths = (value, amount) => {\n return amount < 0 ? value.subtract(Math.abs(amount), 'month') : value.add(amount, 'month');\n };\n this.addWeeks = (value, amount) => {\n return amount < 0 ? value.subtract(Math.abs(amount), 'week') : value.add(amount, 'week');\n };\n this.addDays = (value, amount) => {\n return amount < 0 ? value.subtract(Math.abs(amount), 'day') : value.add(amount, 'day');\n };\n this.addHours = (value, amount) => {\n return amount < 0 ? value.subtract(Math.abs(amount), 'hour') : value.add(amount, 'hour');\n };\n this.addMinutes = (value, amount) => {\n return amount < 0 ? value.subtract(Math.abs(amount), 'minute') : value.add(amount, 'minute');\n };\n this.addSeconds = (value, amount) => {\n return amount < 0 ? value.subtract(Math.abs(amount), 'second') : value.add(amount, 'second');\n };\n this.getYear = value => {\n return value.year();\n };\n this.getMonth = value => {\n return value.month();\n };\n this.getDate = value => {\n return value.date();\n };\n this.getHours = value => {\n return value.hour();\n };\n this.getMinutes = value => {\n return value.minute();\n };\n this.getSeconds = value => {\n return value.second();\n };\n this.getMilliseconds = value => {\n return value.millisecond();\n };\n this.setYear = (value, year) => {\n return value.set('year', year);\n };\n this.setMonth = (value, month) => {\n return value.set('month', month);\n };\n this.setDate = (value, date) => {\n return value.set('date', date);\n };\n this.setHours = (value, hours) => {\n return value.set('hour', hours);\n };\n this.setMinutes = (value, minutes) => {\n return value.set('minute', minutes);\n };\n this.setSeconds = (value, seconds) => {\n return value.set('second', seconds);\n };\n this.setMilliseconds = (value, milliseconds) => {\n return value.set('millisecond', milliseconds);\n };\n this.getDaysInMonth = value => {\n return value.daysInMonth();\n };\n this.getNextMonth = value => {\n return value.add(1, 'month');\n };\n this.getPreviousMonth = value => {\n return value.subtract(1, 'month');\n };\n this.getMonthArray = value => {\n const firstMonth = value.startOf('year');\n const monthArray = [firstMonth];\n while (monthArray.length < 12) {\n const prevMonth = monthArray[monthArray.length - 1];\n monthArray.push(this.addMonths(prevMonth, 1));\n }\n return monthArray;\n };\n this.mergeDateAndTime = (dateParam, timeParam) => {\n return dateParam.hour(timeParam.hour()).minute(timeParam.minute()).second(timeParam.second());\n };\n this.getWeekdays = () => {\n const start = this.dayjs().startOf('week');\n return [0, 1, 2, 3, 4, 5, 6].map(diff => this.formatByString(start.add(diff, 'day'), 'dd'));\n };\n this.getWeekArray = value => {\n const timezone = this.getTimezone(value);\n const cleanValue = this.setLocaleToValue(value);\n const start = cleanValue.startOf('month').startOf('week');\n const end = cleanValue.endOf('month').endOf('week');\n let count = 0;\n let current = start;\n const nestedWeeks = [];\n while (current < end) {\n const weekNumber = Math.floor(count / 7);\n nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];\n nestedWeeks[weekNumber].push(current);\n current = current.add(1, 'day');\n\n // If the new day does not have the same offset as the old one (when switching to summer day time for example),\n // Then dayjs will not automatically adjust the offset (moment does)\n // We have to parse again the value to make sure the `fixOffset` method is applied\n // See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72\n if (this.hasTimezonePlugin() && timezone !== 'UTC' && timezone !== 'system') {\n current = current.tz(this.cleanTimezone(timezone), true);\n }\n count += 1;\n }\n return nestedWeeks;\n };\n this.getWeekNumber = value => {\n return value.week();\n };\n this.getYearRange = (start, end) => {\n const startDate = start.startOf('year');\n const endDate = end.endOf('year');\n const years = [];\n let current = startDate;\n while (current < endDate) {\n years.push(current);\n current = current.add(1, 'year');\n }\n return years;\n };\n this.getMeridiemText = ampm => {\n return ampm === 'am' ? 'AM' : 'PM';\n };\n this.rawDayJsInstance = instance;\n this.dayjs = withLocale((_this$rawDayJsInstanc = this.rawDayJsInstance) != null ? _this$rawDayJsInstanc : defaultDayjs, _locale);\n this.locale = _locale;\n this.formats = _extends({}, defaultFormats, formats);\n defaultDayjs.extend(weekOfYear);\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"localeText\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MuiPickersAdapterContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n MuiPickersAdapterContext.displayName = 'MuiPickersAdapterContext';\n}\n/**\n * @ignore - do not document.\n */\nexport const LocalizationProvider = function LocalizationProvider(inProps) {\n var _React$useContext;\n const {\n localeText: inLocaleText\n } = inProps,\n otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded);\n const {\n utils: parentUtils,\n localeText: parentLocaleText\n } = (_React$useContext = React.useContext(MuiPickersAdapterContext)) != null ? _React$useContext : {\n utils: undefined,\n localeText: undefined\n };\n const props = useThemeProps({\n // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,\n // We will then merge this theme value with our value manually\n props: otherInProps,\n name: 'MuiLocalizationProvider'\n });\n const {\n children,\n dateAdapter: DateAdapter,\n dateFormats,\n dateLibInstance,\n adapterLocale,\n localeText: themeLocaleText\n } = props;\n const localeText = React.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);\n const utils = React.useMemo(() => {\n if (!DateAdapter) {\n if (parentUtils) {\n return parentUtils;\n }\n return null;\n }\n const adapter = new DateAdapter({\n locale: adapterLocale,\n formats: dateFormats,\n instance: dateLibInstance\n });\n if (!adapter.isMUIAdapter) {\n throw new Error(['MUI: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', \"For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`\", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation'].join(`\\n`));\n }\n return adapter;\n }, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentUtils]);\n const defaultDates = React.useMemo(() => {\n if (!utils) {\n return null;\n }\n return {\n minDate: utils.date('1900-01-01T00:00:00.000'),\n maxDate: utils.date('2099-12-31T00:00:00.000')\n };\n }, [utils]);\n const contextValue = React.useMemo(() => {\n return {\n utils,\n defaultDates,\n localeText\n };\n }, [defaultDates, utils, localeText]);\n return /*#__PURE__*/_jsx(MuiPickersAdapterContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nprocess.env.NODE_ENV !== \"production\" ? LocalizationProvider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Locale for the date library you are using\n */\n adapterLocale: PropTypes.any,\n children: PropTypes.node,\n /**\n * Date library adapter class function.\n * @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#setup-your-date-library-adapter date adapter setup section} for more details.\n */\n dateAdapter: PropTypes.func,\n /**\n * Formats that are used for any child pickers\n */\n dateFormats: PropTypes.shape({\n dayOfMonth: PropTypes.string,\n fullDate: PropTypes.string,\n fullDateTime: PropTypes.string,\n fullDateTime12h: PropTypes.string,\n fullDateTime24h: PropTypes.string,\n fullDateWithWeekday: PropTypes.string,\n fullTime: PropTypes.string,\n fullTime12h: PropTypes.string,\n fullTime24h: PropTypes.string,\n hours12h: PropTypes.string,\n hours24h: PropTypes.string,\n keyboardDate: PropTypes.string,\n keyboardDateTime: PropTypes.string,\n keyboardDateTime12h: PropTypes.string,\n keyboardDateTime24h: PropTypes.string,\n meridiem: PropTypes.string,\n minutes: PropTypes.string,\n month: PropTypes.string,\n monthAndDate: PropTypes.string,\n monthAndYear: PropTypes.string,\n monthShort: PropTypes.string,\n normalDate: PropTypes.string,\n normalDateWithWeekday: PropTypes.string,\n seconds: PropTypes.string,\n shortDate: PropTypes.string,\n weekday: PropTypes.string,\n weekdayShort: PropTypes.string,\n year: PropTypes.string\n }),\n /**\n * Date library instance you are using, if it has some global overrides\n * ```jsx\n * dateLibInstance={momentTimeZone}\n * ```\n */\n dateLibInstance: PropTypes.any,\n /**\n * Locale for components texts\n */\n localeText: PropTypes.object\n} : void 0;","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersMonthUtilityClass(slot) {\n return generateUtilityClass('MuiPickersMonth', slot);\n}\nexport const pickersMonthClasses = generateUtilityClasses('MuiPickersMonth', ['root', 'monthButton', 'disabled', 'selected']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"children\", \"disabled\", \"selected\", \"value\", \"tabIndex\", \"onClick\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"aria-current\", \"monthsPerRow\"];\nimport * as React from 'react';\nimport { styled, alpha, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { getPickersMonthUtilityClass, pickersMonthClasses } from './pickersMonthClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n monthButton: ['monthButton', disabled && 'disabled', selected && 'selected']\n };\n return composeClasses(slots, getPickersMonthUtilityClass, classes);\n};\nconst PickersMonthRoot = styled('div', {\n name: 'MuiPickersMonth',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root]\n})(({\n ownerState\n}) => ({\n flexBasis: ownerState.monthsPerRow === 3 ? '33.3%' : '25%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n}));\nconst PickersMonthButton = styled('button', {\n name: 'MuiPickersMonth',\n slot: 'MonthButton',\n overridesResolver: (_, styles) => [styles.monthButton, {\n [`&.${pickersMonthClasses.disabled}`]: styles.disabled\n }, {\n [`&.${pickersMonthClasses.selected}`]: styles.selected\n }]\n})(({\n theme\n}) => _extends({\n color: 'unset',\n backgroundColor: 'transparent',\n border: 0,\n outline: 0\n}, theme.typography.subtitle1, {\n margin: '8px 0',\n height: 36,\n width: 72,\n borderRadius: 18,\n cursor: 'pointer',\n '&:focus': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n '&:disabled': {\n cursor: 'auto',\n pointerEvents: 'none'\n },\n [`&.${pickersMonthClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.secondary\n },\n [`&.${pickersMonthClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n '&:focus, &:hover': {\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n }\n}));\n\n/**\n * @ignore - do not document.\n */\nexport const PickersMonth = /*#__PURE__*/React.memo(function PickersMonth(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersMonth'\n });\n const {\n autoFocus,\n children,\n disabled,\n value,\n tabIndex,\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n 'aria-current': ariaCurrent\n // We don't want to forward this prop to the root element\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ref = React.useRef(null);\n const classes = useUtilityClasses(props);\n useEnhancedEffect(() => {\n if (autoFocus) {\n var _ref$current;\n (_ref$current = ref.current) == null ? void 0 : _ref$current.focus();\n }\n }, [autoFocus]);\n return /*#__PURE__*/_jsx(PickersMonthRoot, _extends({\n className: classes.root,\n ownerState: props\n }, other, {\n children: /*#__PURE__*/_jsx(PickersMonthButton, {\n ref: ref,\n disabled: disabled,\n type: \"button\",\n tabIndex: disabled ? -1 : tabIndex,\n \"aria-current\": ariaCurrent,\n onClick: event => onClick(event, value),\n onKeyDown: event => onKeyDown(event, value),\n onFocus: event => onFocus(event, value),\n onBlur: event => onBlur(event, value),\n className: classes.monthButton,\n ownerState: props,\n children: children\n })\n }));\n});","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getMonthCalendarUtilityClass(slot) {\n return generateUtilityClass('MuiMonthCalendar', slot);\n}\nexport const monthCalendarClasses = generateUtilityClasses('MuiMonthCalendar', ['root']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"value\", \"defaultValue\", \"referenceDate\", \"disabled\", \"disableFuture\", \"disablePast\", \"maxDate\", \"minDate\", \"onChange\", \"shouldDisableMonth\", \"readOnly\", \"disableHighlightToday\", \"autoFocus\", \"onMonthFocus\", \"hasFocus\", \"onFocusedViewChange\", \"monthsPerRow\", \"timezone\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { useTheme } from '@mui/system';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_useControlled as useControlled, unstable_composeClasses as composeClasses, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { PickersMonth } from './PickersMonth';\nimport { useUtils, useNow, useDefaultDates } from '../internals/hooks/useUtils';\nimport { getMonthCalendarUtilityClass } from './monthCalendarClasses';\nimport { applyDefaultDate, getMonthsInYear } from '../internals/utils/date-utils';\nimport { singleItemValueManager } from '../internals/utils/valueManagers';\nimport { SECTION_TYPE_GRANULARITY } from '../internals/utils/getDefaultReferenceDate';\nimport { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getMonthCalendarUtilityClass, classes);\n};\nexport function useMonthCalendarDefaultizedProps(props, name) {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const themeProps = useThemeProps({\n props,\n name\n });\n return _extends({\n disableFuture: false,\n disablePast: false\n }, themeProps, {\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)\n });\n}\nconst MonthCalendarRoot = styled('div', {\n name: 'MuiMonthCalendar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'stretch',\n padding: '0 4px',\n width: 320\n});\nexport const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalendar(inProps, ref) {\n const props = useMonthCalendarDefaultizedProps(inProps, 'MuiMonthCalendar');\n const {\n className,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disabled,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n onChange,\n shouldDisableMonth,\n readOnly,\n disableHighlightToday,\n autoFocus = false,\n onMonthFocus,\n hasFocus,\n onFocusedViewChange,\n monthsPerRow = 3,\n timezone: timezoneProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValueWithTimezone({\n name: 'MonthCalendar',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n onChange: onChange,\n valueManager: singleItemValueManager\n });\n const now = useNow(timezone);\n const theme = useTheme();\n const utils = useUtils();\n const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({\n value,\n utils,\n props,\n timezone,\n referenceDate: referenceDateProp,\n granularity: SECTION_TYPE_GRANULARITY.month\n }), [] // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const todayMonth = React.useMemo(() => utils.getMonth(now), [utils, now]);\n const selectedMonth = React.useMemo(() => {\n if (value != null) {\n return utils.getMonth(value);\n }\n if (disableHighlightToday) {\n return null;\n }\n return utils.getMonth(referenceDate);\n }, [value, utils, disableHighlightToday, referenceDate]);\n const [focusedMonth, setFocusedMonth] = React.useState(() => selectedMonth || todayMonth);\n const [internalHasFocus, setInternalHasFocus] = useControlled({\n name: 'MonthCalendar',\n state: 'hasFocus',\n controlled: hasFocus,\n default: autoFocus != null ? autoFocus : false\n });\n const changeHasFocus = useEventCallback(newHasFocus => {\n setInternalHasFocus(newHasFocus);\n if (onFocusedViewChange) {\n onFocusedViewChange(newHasFocus);\n }\n });\n const isMonthDisabled = React.useCallback(dateToValidate => {\n const firstEnabledMonth = utils.startOfMonth(disablePast && utils.isAfter(now, minDate) ? now : minDate);\n const lastEnabledMonth = utils.startOfMonth(disableFuture && utils.isBefore(now, maxDate) ? now : maxDate);\n const monthToValidate = utils.startOfMonth(dateToValidate);\n if (utils.isBefore(monthToValidate, firstEnabledMonth)) {\n return true;\n }\n if (utils.isAfter(monthToValidate, lastEnabledMonth)) {\n return true;\n }\n if (!shouldDisableMonth) {\n return false;\n }\n return shouldDisableMonth(monthToValidate);\n }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableMonth, utils]);\n const handleMonthSelection = useEventCallback((event, month) => {\n if (readOnly) {\n return;\n }\n const newDate = utils.setMonth(value != null ? value : referenceDate, month);\n handleValueChange(newDate);\n });\n const focusMonth = useEventCallback(month => {\n if (!isMonthDisabled(utils.setMonth(value != null ? value : referenceDate, month))) {\n setFocusedMonth(month);\n changeHasFocus(true);\n if (onMonthFocus) {\n onMonthFocus(month);\n }\n }\n });\n React.useEffect(() => {\n setFocusedMonth(prevFocusedMonth => selectedMonth !== null && prevFocusedMonth !== selectedMonth ? selectedMonth : prevFocusedMonth);\n }, [selectedMonth]);\n const handleKeyDown = useEventCallback((event, month) => {\n const monthsInYear = 12;\n const monthsInRow = 3;\n switch (event.key) {\n case 'ArrowUp':\n focusMonth((monthsInYear + month - monthsInRow) % monthsInYear);\n event.preventDefault();\n break;\n case 'ArrowDown':\n focusMonth((monthsInYear + month + monthsInRow) % monthsInYear);\n event.preventDefault();\n break;\n case 'ArrowLeft':\n focusMonth((monthsInYear + month + (theme.direction === 'ltr' ? -1 : 1)) % monthsInYear);\n event.preventDefault();\n break;\n case 'ArrowRight':\n focusMonth((monthsInYear + month + (theme.direction === 'ltr' ? 1 : -1)) % monthsInYear);\n event.preventDefault();\n break;\n default:\n break;\n }\n });\n const handleMonthFocus = useEventCallback((event, month) => {\n focusMonth(month);\n });\n const handleMonthBlur = useEventCallback((event, month) => {\n if (focusedMonth === month) {\n changeHasFocus(false);\n }\n });\n return /*#__PURE__*/_jsx(MonthCalendarRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: getMonthsInYear(utils, value != null ? value : referenceDate).map(month => {\n const monthNumber = utils.getMonth(month);\n const monthText = utils.format(month, 'monthShort');\n const isSelected = monthNumber === selectedMonth;\n const isDisabled = disabled || isMonthDisabled(month);\n return /*#__PURE__*/_jsx(PickersMonth, {\n selected: isSelected,\n value: monthNumber,\n onClick: handleMonthSelection,\n onKeyDown: handleKeyDown,\n autoFocus: internalHasFocus && monthNumber === focusedMonth,\n disabled: isDisabled,\n tabIndex: monthNumber === focusedMonth ? 0 : -1,\n onFocus: handleMonthFocus,\n onBlur: handleMonthBlur,\n \"aria-current\": todayMonth === monthNumber ? 'date' : undefined,\n monthsPerRow: monthsPerRow,\n children: monthText\n }, monthText);\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MonthCalendar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * className applied to the root element.\n */\n className: PropTypes.string,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true` picker is disabled\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n hasFocus: PropTypes.bool,\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any,\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Callback fired when the value changes.\n * @template TDate\n * @param {TDate} value The new value.\n */\n onChange: PropTypes.func,\n onFocusedViewChange: PropTypes.func,\n onMonthFocus: PropTypes.func,\n /**\n * If `true` picker is readonly\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid month using the validation props, except callbacks such as `shouldDisableMonth`.\n */\n referenceDate: PropTypes.any,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.any\n} : void 0;","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersYearUtilityClass(slot) {\n return generateUtilityClass('MuiPickersYear', slot);\n}\nexport const pickersYearClasses = generateUtilityClasses('MuiPickersYear', ['root', 'yearButton', 'selected', 'disabled']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"children\", \"disabled\", \"selected\", \"value\", \"tabIndex\", \"onClick\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"aria-current\", \"yearsPerRow\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { alpha, styled, useThemeProps } from '@mui/material/styles';\nimport { getPickersYearUtilityClass, pickersYearClasses } from './pickersYearClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n yearButton: ['yearButton', disabled && 'disabled', selected && 'selected']\n };\n return composeClasses(slots, getPickersYearUtilityClass, classes);\n};\nconst PickersYearRoot = styled('div', {\n name: 'MuiPickersYear',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root]\n})(({\n ownerState\n}) => ({\n flexBasis: ownerState.yearsPerRow === 3 ? '33.3%' : '25%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center'\n}));\nconst PickersYearButton = styled('button', {\n name: 'MuiPickersYear',\n slot: 'YearButton',\n overridesResolver: (_, styles) => [styles.yearButton, {\n [`&.${pickersYearClasses.disabled}`]: styles.disabled\n }, {\n [`&.${pickersYearClasses.selected}`]: styles.selected\n }]\n})(({\n theme\n}) => _extends({\n color: 'unset',\n backgroundColor: 'transparent',\n border: 0,\n outline: 0\n}, theme.typography.subtitle1, {\n margin: '8px 0',\n height: 36,\n width: 72,\n borderRadius: 18,\n cursor: 'pointer',\n '&:focus': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.action.active, theme.palette.action.focusOpacity)\n },\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n '&:disabled': {\n cursor: 'auto',\n pointerEvents: 'none'\n },\n [`&.${pickersYearClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.secondary\n },\n [`&.${pickersYearClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n '&:focus, &:hover': {\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n }\n}));\n\n/**\n * @ignore - internal component.\n */\nexport const PickersYear = /*#__PURE__*/React.memo(function PickersYear(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersYear'\n });\n const {\n autoFocus,\n className,\n children,\n disabled,\n value,\n tabIndex,\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n 'aria-current': ariaCurrent\n // We don't want to forward this prop to the root element\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ref = React.useRef(null);\n const classes = useUtilityClasses(props);\n\n // We can't forward the `autoFocus` to the button because it is a native button, not a MUI Button\n React.useEffect(() => {\n if (autoFocus) {\n // `ref.current` being `null` would be a bug in MUI.\n ref.current.focus();\n }\n }, [autoFocus]);\n return /*#__PURE__*/_jsx(PickersYearRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: props\n }, other, {\n children: /*#__PURE__*/_jsx(PickersYearButton, {\n ref: ref,\n disabled: disabled,\n type: \"button\",\n tabIndex: disabled ? -1 : tabIndex,\n \"aria-current\": ariaCurrent,\n onClick: event => onClick(event, value),\n onKeyDown: event => onKeyDown(event, value),\n onFocus: event => onFocus(event, value),\n onBlur: event => onBlur(event, value),\n className: classes.yearButton,\n ownerState: props,\n children: children\n })\n }));\n});","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getYearCalendarUtilityClass(slot) {\n return generateUtilityClass('MuiYearCalendar', slot);\n}\nexport const yearCalendarClasses = generateUtilityClasses('MuiYearCalendar', ['root']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"value\", \"defaultValue\", \"referenceDate\", \"disabled\", \"disableFuture\", \"disablePast\", \"maxDate\", \"minDate\", \"onChange\", \"readOnly\", \"shouldDisableYear\", \"disableHighlightToday\", \"onYearFocus\", \"hasFocus\", \"onFocusedViewChange\", \"yearsPerRow\", \"timezone\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { useTheme } from '@mui/system';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_useControlled as useControlled, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { PickersYear } from './PickersYear';\nimport { useUtils, useNow, useDefaultDates } from '../internals/hooks/useUtils';\nimport { getYearCalendarUtilityClass } from './yearCalendarClasses';\nimport { applyDefaultDate } from '../internals/utils/date-utils';\nimport { singleItemValueManager } from '../internals/utils/valueManagers';\nimport { SECTION_TYPE_GRANULARITY } from '../internals/utils/getDefaultReferenceDate';\nimport { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getYearCalendarUtilityClass, classes);\n};\nfunction useYearCalendarDefaultizedProps(props, name) {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const themeProps = useThemeProps({\n props,\n name\n });\n return _extends({\n disablePast: false,\n disableFuture: false\n }, themeProps, {\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)\n });\n}\nconst YearCalendarRoot = styled('div', {\n name: 'MuiYearCalendar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n overflowY: 'auto',\n height: '100%',\n padding: '0 4px',\n width: 320,\n maxHeight: 304\n});\nexport const YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(inProps, ref) {\n const props = useYearCalendarDefaultizedProps(inProps, 'MuiYearCalendar');\n const {\n autoFocus,\n className,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disabled,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n onChange,\n readOnly,\n shouldDisableYear,\n disableHighlightToday,\n onYearFocus,\n hasFocus,\n onFocusedViewChange,\n yearsPerRow = 3,\n timezone: timezoneProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValueWithTimezone({\n name: 'YearCalendar',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n onChange: onChange,\n valueManager: singleItemValueManager\n });\n const now = useNow(timezone);\n const theme = useTheme();\n const utils = useUtils();\n const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({\n value,\n utils,\n props,\n timezone,\n referenceDate: referenceDateProp,\n granularity: SECTION_TYPE_GRANULARITY.year\n }), [] // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const todayYear = React.useMemo(() => utils.getYear(now), [utils, now]);\n const selectedYear = React.useMemo(() => {\n if (value != null) {\n return utils.getYear(value);\n }\n if (disableHighlightToday) {\n return null;\n }\n return utils.getYear(referenceDate);\n }, [value, utils, disableHighlightToday, referenceDate]);\n const [focusedYear, setFocusedYear] = React.useState(() => selectedYear || todayYear);\n const [internalHasFocus, setInternalHasFocus] = useControlled({\n name: 'YearCalendar',\n state: 'hasFocus',\n controlled: hasFocus,\n default: autoFocus != null ? autoFocus : false\n });\n const changeHasFocus = useEventCallback(newHasFocus => {\n setInternalHasFocus(newHasFocus);\n if (onFocusedViewChange) {\n onFocusedViewChange(newHasFocus);\n }\n });\n const isYearDisabled = React.useCallback(dateToValidate => {\n if (disablePast && utils.isBeforeYear(dateToValidate, now)) {\n return true;\n }\n if (disableFuture && utils.isAfterYear(dateToValidate, now)) {\n return true;\n }\n if (minDate && utils.isBeforeYear(dateToValidate, minDate)) {\n return true;\n }\n if (maxDate && utils.isAfterYear(dateToValidate, maxDate)) {\n return true;\n }\n if (!shouldDisableYear) {\n return false;\n }\n const yearToValidate = utils.startOfYear(dateToValidate);\n return shouldDisableYear(yearToValidate);\n }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableYear, utils]);\n const handleYearSelection = useEventCallback((event, year) => {\n if (readOnly) {\n return;\n }\n const newDate = utils.setYear(value != null ? value : referenceDate, year);\n handleValueChange(newDate);\n });\n const focusYear = useEventCallback(year => {\n if (!isYearDisabled(utils.setYear(value != null ? value : referenceDate, year))) {\n setFocusedYear(year);\n changeHasFocus(true);\n onYearFocus == null ? void 0 : onYearFocus(year);\n }\n });\n React.useEffect(() => {\n setFocusedYear(prevFocusedYear => selectedYear !== null && prevFocusedYear !== selectedYear ? selectedYear : prevFocusedYear);\n }, [selectedYear]);\n const handleKeyDown = useEventCallback((event, year) => {\n switch (event.key) {\n case 'ArrowUp':\n focusYear(year - yearsPerRow);\n event.preventDefault();\n break;\n case 'ArrowDown':\n focusYear(year + yearsPerRow);\n event.preventDefault();\n break;\n case 'ArrowLeft':\n focusYear(year + (theme.direction === 'ltr' ? -1 : 1));\n event.preventDefault();\n break;\n case 'ArrowRight':\n focusYear(year + (theme.direction === 'ltr' ? 1 : -1));\n event.preventDefault();\n break;\n default:\n break;\n }\n });\n const handleYearFocus = useEventCallback((event, year) => {\n focusYear(year);\n });\n const handleYearBlur = useEventCallback((event, year) => {\n if (focusedYear === year) {\n changeHasFocus(false);\n }\n });\n const scrollerRef = React.useRef(null);\n const handleRef = useForkRef(ref, scrollerRef);\n React.useEffect(() => {\n if (autoFocus || scrollerRef.current === null) {\n return;\n }\n const tabbableButton = scrollerRef.current.querySelector('[tabindex=\"0\"]');\n if (!tabbableButton) {\n return;\n }\n\n // Taken from useScroll in x-data-grid, but vertically centered\n const offsetHeight = tabbableButton.offsetHeight;\n const offsetTop = tabbableButton.offsetTop;\n const clientHeight = scrollerRef.current.clientHeight;\n const scrollTop = scrollerRef.current.scrollTop;\n const elementBottom = offsetTop + offsetHeight;\n if (offsetHeight > clientHeight || offsetTop < scrollTop) {\n // Button already visible\n return;\n }\n scrollerRef.current.scrollTop = elementBottom - clientHeight / 2 - offsetHeight / 2;\n }, [autoFocus]);\n return /*#__PURE__*/_jsx(YearCalendarRoot, _extends({\n ref: handleRef,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: utils.getYearRange(minDate, maxDate).map(year => {\n const yearNumber = utils.getYear(year);\n const isSelected = yearNumber === selectedYear;\n const isDisabled = disabled || isYearDisabled(year);\n return /*#__PURE__*/_jsx(PickersYear, {\n selected: isSelected,\n value: yearNumber,\n onClick: handleYearSelection,\n onKeyDown: handleKeyDown,\n autoFocus: internalHasFocus && yearNumber === focusedYear,\n disabled: isDisabled,\n tabIndex: yearNumber === focusedYear ? 0 : -1,\n onFocus: handleYearFocus,\n onBlur: handleYearBlur,\n \"aria-current\": todayYear === yearNumber ? 'date' : undefined,\n yearsPerRow: yearsPerRow,\n children: utils.format(year, 'year')\n }, utils.format(year, 'year'));\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? YearCalendar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * className applied to the root element.\n */\n className: PropTypes.string,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true` picker is disabled\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n hasFocus: PropTypes.bool,\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any,\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any,\n /**\n * Callback fired when the value changes.\n * @template TDate\n * @param {TDate} value The new value.\n */\n onChange: PropTypes.func,\n onFocusedViewChange: PropTypes.func,\n onYearFocus: PropTypes.func,\n /**\n * If `true` picker is readonly\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid year using the validation props, except callbacks such as `shouldDisableYear`.\n */\n referenceDate: PropTypes.any,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.any,\n /**\n * Years rendered per row.\n * @default 3\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getMonthsInYear } from '../../utils/date-utils';\nexport const getDateSectionConfigFromFormatToken = (utils, formatToken) => {\n const config = utils.formatTokenMap[formatToken];\n if (config == null) {\n throw new Error([`MUI: The token \"${formatToken}\" is not supported by the Date and Time Pickers.`, 'Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.'].join('\\n'));\n }\n if (typeof config === 'string') {\n return {\n type: config,\n contentType: config === 'meridiem' ? 'letter' : 'digit',\n maxLength: undefined\n };\n }\n return {\n type: config.sectionType,\n contentType: config.contentType,\n maxLength: config.maxLength\n };\n};\nconst getDeltaFromKeyCode = keyCode => {\n switch (keyCode) {\n case 'ArrowUp':\n return 1;\n case 'ArrowDown':\n return -1;\n case 'PageUp':\n return 5;\n case 'PageDown':\n return -5;\n default:\n return 0;\n }\n};\nexport const getDaysInWeekStr = (utils, timezone, format) => {\n const elements = [];\n const now = utils.dateWithTimezone(undefined, timezone);\n const startDate = utils.startOfWeek(now);\n const endDate = utils.endOfWeek(now);\n let current = startDate;\n while (utils.isBefore(current, endDate)) {\n elements.push(current);\n current = utils.addDays(current, 1);\n }\n return elements.map(weekDay => utils.formatByString(weekDay, format));\n};\nexport const getLetterEditingOptions = (utils, timezone, sectionType, format) => {\n switch (sectionType) {\n case 'month':\n {\n return getMonthsInYear(utils, utils.dateWithTimezone(undefined, timezone)).map(month => utils.formatByString(month, format));\n }\n case 'weekDay':\n {\n return getDaysInWeekStr(utils, timezone, format);\n }\n case 'meridiem':\n {\n const now = utils.dateWithTimezone(undefined, timezone);\n return [utils.startOfDay(now), utils.endOfDay(now)].map(date => utils.formatByString(date, format));\n }\n default:\n {\n return [];\n }\n }\n};\nexport const cleanLeadingZeros = (utils, valueStr, size) => {\n let cleanValueStr = valueStr;\n\n // Remove the leading zeros\n cleanValueStr = Number(cleanValueStr).toString();\n\n // Add enough leading zeros to fill the section\n while (cleanValueStr.length < size) {\n cleanValueStr = `0${cleanValueStr}`;\n }\n return cleanValueStr;\n};\nexport const cleanDigitSectionValue = (utils, timezone, value, sectionBoundaries, section) => {\n if (process.env.NODE_ENV !== 'production') {\n if (section.type !== 'day' && section.contentType === 'digit-with-letter') {\n throw new Error([`MUI: The token \"${section.format}\" is a digit format with letter in it.'\n This type of format is only supported for 'day' sections`].join('\\n'));\n }\n }\n if (section.type === 'day' && section.contentType === 'digit-with-letter') {\n const date = utils.setDate(sectionBoundaries.longestMonth, value);\n return utils.formatByString(date, section.format);\n }\n\n // queryValue without leading `0` (`01` => `1`)\n const valueStr = value.toString();\n if (section.hasLeadingZerosInInput) {\n return cleanLeadingZeros(utils, valueStr, section.maxLength);\n }\n return valueStr;\n};\nexport const adjustSectionValue = (utils, timezone, section, keyCode, sectionsValueBoundaries, activeDate, stepsAttribues) => {\n const delta = getDeltaFromKeyCode(keyCode);\n const isStart = keyCode === 'Home';\n const isEnd = keyCode === 'End';\n const shouldSetAbsolute = section.value === '' || isStart || isEnd;\n const adjustDigitSection = () => {\n const sectionBoundaries = sectionsValueBoundaries[section.type]({\n currentDate: activeDate,\n format: section.format,\n contentType: section.contentType\n });\n const getCleanValue = value => cleanDigitSectionValue(utils, timezone, value, sectionBoundaries, section);\n const step = section.type === 'minutes' && stepsAttribues != null && stepsAttribues.minutesStep ? stepsAttribues.minutesStep : 1;\n const currentSectionValue = parseInt(section.value, 10);\n let newSectionValueNumber = currentSectionValue + delta * step;\n if (shouldSetAbsolute) {\n if (section.type === 'year' && !isEnd && !isStart) {\n return utils.formatByString(utils.dateWithTimezone(undefined, timezone), section.format);\n }\n if (delta > 0 || isStart) {\n newSectionValueNumber = sectionBoundaries.minimum;\n } else {\n newSectionValueNumber = sectionBoundaries.maximum;\n }\n }\n if (newSectionValueNumber % step !== 0) {\n if (delta < 0 || isStart) {\n newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)\n }\n\n if (delta > 0 || isEnd) {\n newSectionValueNumber -= newSectionValueNumber % step;\n }\n }\n if (newSectionValueNumber > sectionBoundaries.maximum) {\n return getCleanValue(sectionBoundaries.minimum + (newSectionValueNumber - sectionBoundaries.maximum - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));\n }\n if (newSectionValueNumber < sectionBoundaries.minimum) {\n return getCleanValue(sectionBoundaries.maximum - (sectionBoundaries.minimum - newSectionValueNumber - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));\n }\n return getCleanValue(newSectionValueNumber);\n };\n const adjustLetterSection = () => {\n const options = getLetterEditingOptions(utils, timezone, section.type, section.format);\n if (options.length === 0) {\n return section.value;\n }\n if (shouldSetAbsolute) {\n if (delta > 0 || isStart) {\n return options[0];\n }\n return options[options.length - 1];\n }\n const currentOptionIndex = options.indexOf(section.value);\n const newOptionIndex = (currentOptionIndex + options.length + delta) % options.length;\n return options[newOptionIndex];\n };\n if (section.contentType === 'digit' || section.contentType === 'digit-with-letter') {\n return adjustDigitSection();\n }\n return adjustLetterSection();\n};\nexport const getSectionVisibleValue = (section, target) => {\n let value = section.value || section.placeholder;\n const hasLeadingZeros = target === 'non-input' ? section.hasLeadingZerosInFormat : section.hasLeadingZerosInInput;\n if (target === 'non-input' && section.hasLeadingZerosInInput && !section.hasLeadingZerosInFormat) {\n value = Number(value).toString();\n }\n\n // In the input, we add an empty character at the end of each section without leading zeros.\n // This makes sure that `onChange` will always be fired.\n // Otherwise, when your input value equals `1/dd/yyyy` (format `M/DD/YYYY` on DayJs),\n // If you press `1`, on the first section, the new value is also `1/dd/yyyy`,\n // So the browser will not fire the input `onChange`.\n const shouldAddInvisibleSpace = ['input-rtl', 'input-ltr'].includes(target) && section.contentType === 'digit' && !hasLeadingZeros && value.length === 1;\n if (shouldAddInvisibleSpace) {\n value = `${value}\\u200e`;\n }\n if (target === 'input-rtl') {\n value = `\\u2068${value}\\u2069`;\n }\n return value;\n};\nexport const cleanString = dirtyString => dirtyString.replace(/[\\u2066\\u2067\\u2068\\u2069]/g, '');\nexport const addPositionPropertiesToSections = (sections, isRTL) => {\n let position = 0;\n let positionInInput = isRTL ? 1 : 0;\n const newSections = [];\n for (let i = 0; i < sections.length; i += 1) {\n const section = sections[i];\n const renderedValue = getSectionVisibleValue(section, isRTL ? 'input-rtl' : 'input-ltr');\n const sectionStr = `${section.startSeparator}${renderedValue}${section.endSeparator}`;\n const sectionLength = cleanString(sectionStr).length;\n const sectionLengthInInput = sectionStr.length;\n\n // The ...InInput values consider the unicode characters but do include them in their indexes\n const cleanedValue = cleanString(renderedValue);\n const startInInput = positionInInput + renderedValue.indexOf(cleanedValue[0]) + section.startSeparator.length;\n const endInInput = startInInput + cleanedValue.length;\n newSections.push(_extends({}, section, {\n start: position,\n end: position + sectionLength,\n startInInput,\n endInInput\n }));\n position += sectionLength;\n // Move position to the end of string associated to the current section\n positionInInput += sectionLengthInInput;\n }\n return newSections;\n};\nconst getSectionPlaceholder = (utils, timezone, localeText, sectionConfig, currentTokenValue) => {\n switch (sectionConfig.type) {\n case 'year':\n {\n return localeText.fieldYearPlaceholder({\n digitAmount: utils.formatByString(utils.dateWithTimezone(undefined, timezone), currentTokenValue).length\n });\n }\n case 'month':\n {\n return localeText.fieldMonthPlaceholder({\n contentType: sectionConfig.contentType\n });\n }\n case 'day':\n {\n return localeText.fieldDayPlaceholder();\n }\n case 'weekDay':\n {\n return localeText.fieldWeekDayPlaceholder({\n contentType: sectionConfig.contentType\n });\n }\n case 'hours':\n {\n return localeText.fieldHoursPlaceholder();\n }\n case 'minutes':\n {\n return localeText.fieldMinutesPlaceholder();\n }\n case 'seconds':\n {\n return localeText.fieldSecondsPlaceholder();\n }\n case 'meridiem':\n {\n return localeText.fieldMeridiemPlaceholder();\n }\n default:\n {\n return currentTokenValue;\n }\n }\n};\nexport const changeSectionValueFormat = (utils, valueStr, currentFormat, newFormat) => {\n if (process.env.NODE_ENV !== 'production') {\n if (getDateSectionConfigFromFormatToken(utils, currentFormat).type === 'weekDay') {\n throw new Error(\"changeSectionValueFormat doesn't support week day formats\");\n }\n }\n return utils.formatByString(utils.parse(valueStr, currentFormat), newFormat);\n};\nconst isFourDigitYearFormat = (utils, timezone, format) => utils.formatByString(utils.dateWithTimezone(undefined, timezone), format).length === 4;\nexport const doesSectionFormatHaveLeadingZeros = (utils, timezone, contentType, sectionType, format) => {\n if (contentType !== 'digit') {\n return false;\n }\n const now = utils.dateWithTimezone(undefined, timezone);\n switch (sectionType) {\n // We can't use `changeSectionValueFormat`, because `utils.parse('1', 'YYYY')` returns `1971` instead of `1`.\n case 'year':\n {\n if (isFourDigitYearFormat(utils, timezone, format)) {\n const formatted0001 = utils.formatByString(utils.setYear(now, 1), format);\n return formatted0001 === '0001';\n }\n const formatted2001 = utils.formatByString(utils.setYear(now, 2001), format);\n return formatted2001 === '01';\n }\n case 'month':\n {\n return utils.formatByString(utils.startOfYear(now), format).length > 1;\n }\n case 'day':\n {\n return utils.formatByString(utils.startOfMonth(now), format).length > 1;\n }\n case 'weekDay':\n {\n return utils.formatByString(utils.startOfWeek(now), format).length > 1;\n }\n case 'hours':\n {\n return utils.formatByString(utils.setHours(now, 1), format).length > 1;\n }\n case 'minutes':\n {\n return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;\n }\n case 'seconds':\n {\n return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;\n }\n default:\n {\n throw new Error('Invalid section type');\n }\n }\n};\nconst getEscapedPartsFromFormat = (utils, format) => {\n const escapedParts = [];\n const {\n start: startChar,\n end: endChar\n } = utils.escapedCharacters;\n const regExp = new RegExp(`(\\\\${startChar}[^\\\\${endChar}]*\\\\${endChar})+`, 'g');\n let match = null;\n // eslint-disable-next-line no-cond-assign\n while (match = regExp.exec(format)) {\n escapedParts.push({\n start: match.index,\n end: regExp.lastIndex - 1\n });\n }\n return escapedParts;\n};\nexport const splitFormatIntoSections = (utils, timezone, localeText, format, date, formatDensity, shouldRespectLeadingZeros, isRTL) => {\n let startSeparator = '';\n const sections = [];\n const now = utils.date();\n const commitToken = token => {\n if (token === '') {\n return null;\n }\n const sectionConfig = getDateSectionConfigFromFormatToken(utils, token);\n const hasLeadingZerosInFormat = doesSectionFormatHaveLeadingZeros(utils, timezone, sectionConfig.contentType, sectionConfig.type, token);\n const hasLeadingZerosInInput = shouldRespectLeadingZeros ? hasLeadingZerosInFormat : sectionConfig.contentType === 'digit';\n const isValidDate = date != null && utils.isValid(date);\n let sectionValue = isValidDate ? utils.formatByString(date, token) : '';\n let maxLength = null;\n if (hasLeadingZerosInInput) {\n if (hasLeadingZerosInFormat) {\n maxLength = sectionValue === '' ? utils.formatByString(now, token).length : sectionValue.length;\n } else {\n if (sectionConfig.maxLength == null) {\n throw new Error(`MUI: The token ${token} should have a 'maxDigitNumber' property on it's adapter`);\n }\n maxLength = sectionConfig.maxLength;\n if (isValidDate) {\n sectionValue = cleanLeadingZeros(utils, sectionValue, maxLength);\n }\n }\n }\n sections.push(_extends({}, sectionConfig, {\n format: token,\n maxLength,\n value: sectionValue,\n placeholder: getSectionPlaceholder(utils, timezone, localeText, sectionConfig, token),\n hasLeadingZeros: hasLeadingZerosInFormat,\n hasLeadingZerosInFormat,\n hasLeadingZerosInInput,\n startSeparator: sections.length === 0 ? startSeparator : '',\n endSeparator: '',\n modified: false\n }));\n return null;\n };\n\n // Expand the provided format\n let formatExpansionOverflow = 10;\n let prevFormat = format;\n let nextFormat = utils.expandFormat(format);\n while (nextFormat !== prevFormat) {\n prevFormat = nextFormat;\n nextFormat = utils.expandFormat(prevFormat);\n formatExpansionOverflow -= 1;\n if (formatExpansionOverflow < 0) {\n throw new Error('MUI: The format expansion seems to be enter in an infinite loop. Please open an issue with the format passed to the picker component');\n }\n }\n const expandedFormat = nextFormat;\n\n // Get start/end indexes of escaped sections\n const escapedParts = getEscapedPartsFromFormat(utils, expandedFormat);\n\n // This RegExp test if the beginning of a string correspond to a supported token\n const isTokenStartRegExp = new RegExp(`^(${Object.keys(utils.formatTokenMap).join('|')})`);\n let currentTokenValue = '';\n for (let i = 0; i < expandedFormat.length; i += 1) {\n const escapedPartOfCurrentChar = escapedParts.find(escapeIndex => escapeIndex.start <= i && escapeIndex.end >= i);\n const char = expandedFormat[i];\n const isEscapedChar = escapedPartOfCurrentChar != null;\n const potentialToken = `${currentTokenValue}${expandedFormat.slice(i)}`;\n if (!isEscapedChar && char.match(/([A-Za-z]+)/) && isTokenStartRegExp.test(potentialToken)) {\n currentTokenValue += char;\n } else {\n // If we are on the opening or closing character of an escaped part of the format,\n // Then we ignore this character.\n const isEscapeBoundary = isEscapedChar && (escapedPartOfCurrentChar == null ? void 0 : escapedPartOfCurrentChar.start) === i || (escapedPartOfCurrentChar == null ? void 0 : escapedPartOfCurrentChar.end) === i;\n if (!isEscapeBoundary) {\n commitToken(currentTokenValue);\n currentTokenValue = '';\n if (sections.length === 0) {\n startSeparator += char;\n } else {\n sections[sections.length - 1].endSeparator += char;\n }\n }\n }\n }\n commitToken(currentTokenValue);\n return sections.map(section => {\n const cleanSeparator = separator => {\n let cleanedSeparator = separator;\n if (isRTL && cleanedSeparator !== null && cleanedSeparator.includes(' ')) {\n cleanedSeparator = `\\u2069${cleanedSeparator}\\u2066`;\n }\n if (formatDensity === 'spacious' && ['/', '.', '-'].includes(cleanedSeparator)) {\n cleanedSeparator = ` ${cleanedSeparator} `;\n }\n return cleanedSeparator;\n };\n section.startSeparator = cleanSeparator(section.startSeparator);\n section.endSeparator = cleanSeparator(section.endSeparator);\n return section;\n });\n};\n\n/**\n * Some date libraries like `dayjs` don't support parsing from date with escaped characters.\n * To make sure that the parsing works, we are building a format and a date without any separator.\n */\nexport const getDateFromDateSections = (utils, sections) => {\n // If we have both a day and a weekDay section,\n // Then we skip the weekDay in the parsing because libraries like dayjs can't parse complicated formats containing a weekDay.\n // dayjs(dayjs().format('dddd MMMM D YYYY'), 'dddd MMMM D YYYY')) // returns `Invalid Date` even if the format is valid.\n const shouldSkipWeekDays = sections.some(section => section.type === 'day');\n const sectionFormats = [];\n const sectionValues = [];\n for (let i = 0; i < sections.length; i += 1) {\n const section = sections[i];\n const shouldSkip = shouldSkipWeekDays && section.type === 'weekDay';\n if (!shouldSkip) {\n sectionFormats.push(section.format);\n sectionValues.push(getSectionVisibleValue(section, 'non-input'));\n }\n }\n const formatWithoutSeparator = sectionFormats.join(' ');\n const dateWithoutSeparatorStr = sectionValues.join(' ');\n return utils.parse(dateWithoutSeparatorStr, formatWithoutSeparator);\n};\nexport const createDateStrForInputFromSections = (sections, isRTL) => {\n const formattedSections = sections.map(section => {\n const dateValue = getSectionVisibleValue(section, isRTL ? 'input-rtl' : 'input-ltr');\n return `${section.startSeparator}${dateValue}${section.endSeparator}`;\n });\n const dateStr = formattedSections.join('');\n if (!isRTL) {\n return dateStr;\n }\n\n // \\u2066: start left-to-right isolation\n // \\u2067: start right-to-left isolation\n // \\u2068: start first strong character isolation\n // \\u2069: pop isolation\n // wrap into an isolated group such that separators can split the string in smaller ones by adding \\u2069\\u2068\n return `\\u2066${dateStr}\\u2069`;\n};\nexport const getSectionsBoundaries = (utils, timezone) => {\n const today = utils.dateWithTimezone(undefined, timezone);\n const endOfYear = utils.endOfYear(today);\n const {\n maxDaysInMonth,\n longestMonth\n } = getMonthsInYear(utils, today).reduce((acc, month) => {\n const daysInMonth = utils.getDaysInMonth(month);\n if (daysInMonth > acc.maxDaysInMonth) {\n return {\n maxDaysInMonth: daysInMonth,\n longestMonth: month\n };\n }\n return acc;\n }, {\n maxDaysInMonth: 0,\n longestMonth: null\n });\n return {\n year: ({\n format\n }) => ({\n minimum: 0,\n maximum: isFourDigitYearFormat(utils, timezone, format) ? 9999 : 99\n }),\n month: () => ({\n minimum: 1,\n // Assumption: All years have the same amount of months\n maximum: utils.getMonth(endOfYear) + 1\n }),\n day: ({\n currentDate\n }) => ({\n minimum: 1,\n maximum: currentDate != null && utils.isValid(currentDate) ? utils.getDaysInMonth(currentDate) : maxDaysInMonth,\n longestMonth: longestMonth\n }),\n weekDay: ({\n format,\n contentType\n }) => {\n if (contentType === 'digit') {\n const daysInWeek = getDaysInWeekStr(utils, timezone, format).map(Number);\n return {\n minimum: Math.min(...daysInWeek),\n maximum: Math.max(...daysInWeek)\n };\n }\n return {\n minimum: 1,\n maximum: 7\n };\n },\n hours: ({\n format\n }) => {\n const lastHourInDay = utils.getHours(endOfYear);\n const hasMeridiem = utils.formatByString(utils.endOfDay(today), format) !== lastHourInDay.toString();\n if (hasMeridiem) {\n return {\n minimum: 1,\n maximum: Number(utils.formatByString(utils.startOfDay(today), format))\n };\n }\n return {\n minimum: 0,\n maximum: lastHourInDay\n };\n },\n minutes: () => ({\n minimum: 0,\n // Assumption: All years have the same amount of minutes\n maximum: utils.getMinutes(endOfYear)\n }),\n seconds: () => ({\n minimum: 0,\n // Assumption: All years have the same amount of seconds\n maximum: utils.getSeconds(endOfYear)\n }),\n meridiem: () => ({\n minimum: 0,\n maximum: 0\n })\n };\n};\nlet warnedOnceInvalidSection = false;\nexport const validateSections = (sections, valueType) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnceInvalidSection) {\n const supportedSections = [];\n if (['date', 'date-time'].includes(valueType)) {\n supportedSections.push('weekDay', 'day', 'month', 'year');\n }\n if (['time', 'date-time'].includes(valueType)) {\n supportedSections.push('hours', 'minutes', 'seconds', 'meridiem');\n }\n const invalidSection = sections.find(section => !supportedSections.includes(section.type));\n if (invalidSection) {\n console.warn(`MUI: The field component you are using is not compatible with the \"${invalidSection.type} date section.`, `The supported date sections are [\"${supportedSections.join('\", \"')}\"]\\`.`);\n warnedOnceInvalidSection = true;\n }\n }\n }\n};\nconst transferDateSectionValue = (utils, timezone, section, dateToTransferFrom, dateToTransferTo) => {\n switch (section.type) {\n case 'year':\n {\n return utils.setYear(dateToTransferTo, utils.getYear(dateToTransferFrom));\n }\n case 'month':\n {\n return utils.setMonth(dateToTransferTo, utils.getMonth(dateToTransferFrom));\n }\n case 'weekDay':\n {\n const formattedDaysInWeek = getDaysInWeekStr(utils, timezone, section.format);\n const dayInWeekStrOfActiveDate = utils.formatByString(dateToTransferFrom, section.format);\n const dayInWeekOfActiveDate = formattedDaysInWeek.indexOf(dayInWeekStrOfActiveDate);\n const dayInWeekOfNewSectionValue = formattedDaysInWeek.indexOf(section.value);\n const diff = dayInWeekOfNewSectionValue - dayInWeekOfActiveDate;\n return utils.addDays(dateToTransferFrom, diff);\n }\n case 'day':\n {\n return utils.setDate(dateToTransferTo, utils.getDate(dateToTransferFrom));\n }\n case 'meridiem':\n {\n const isAM = utils.getHours(dateToTransferFrom) < 12;\n const mergedDateHours = utils.getHours(dateToTransferTo);\n if (isAM && mergedDateHours >= 12) {\n return utils.addHours(dateToTransferTo, -12);\n }\n if (!isAM && mergedDateHours < 12) {\n return utils.addHours(dateToTransferTo, 12);\n }\n return dateToTransferTo;\n }\n case 'hours':\n {\n return utils.setHours(dateToTransferTo, utils.getHours(dateToTransferFrom));\n }\n case 'minutes':\n {\n return utils.setMinutes(dateToTransferTo, utils.getMinutes(dateToTransferFrom));\n }\n case 'seconds':\n {\n return utils.setSeconds(dateToTransferTo, utils.getSeconds(dateToTransferFrom));\n }\n default:\n {\n return dateToTransferTo;\n }\n }\n};\nconst reliableSectionModificationOrder = {\n year: 1,\n month: 2,\n day: 3,\n weekDay: 4,\n hours: 5,\n minutes: 6,\n seconds: 7,\n meridiem: 8\n};\nexport const mergeDateIntoReferenceDate = (utils, timezone, dateToTransferFrom, sections, referenceDate, shouldLimitToEditedSections) =>\n// cloning sections before sort to avoid mutating it\n[...sections].sort((a, b) => reliableSectionModificationOrder[a.type] - reliableSectionModificationOrder[b.type]).reduce((mergedDate, section) => {\n if (!shouldLimitToEditedSections || section.modified) {\n return transferDateSectionValue(utils, timezone, section, dateToTransferFrom, mergedDate);\n }\n return mergedDate;\n}, referenceDate);\nexport const isAndroid = () => navigator.userAgent.toLowerCase().indexOf('android') > -1;\nexport const clampDaySectionIfPossible = (utils, timezone, sections, sectionsValueBoundaries) => {\n // We can only clamp the day value if:\n // 1. if all the sections are filled (except the week day section which can be empty)\n // 2. there is a day section\n const canClamp = sections.every(section => section.type === 'weekDay' || section.value !== '') && sections.some(section => section.type === 'day');\n if (!canClamp) {\n return null;\n }\n\n // We try to generate a valid date representing the start of the month of the invalid date typed by the user.\n const sectionsForStartOfMonth = sections.map(section => {\n if (section.type !== 'day') {\n return section;\n }\n const dayBoundaries = sectionsValueBoundaries.day({\n currentDate: null,\n format: section.format,\n contentType: section.contentType\n });\n return _extends({}, section, {\n value: cleanDigitSectionValue(utils, timezone, dayBoundaries.minimum, dayBoundaries, section)\n });\n });\n const startOfMonth = getDateFromDateSections(utils, sectionsForStartOfMonth);\n\n // Even the start of the month is invalid, we probably have other invalid sections, the clamping failed.\n if (startOfMonth == null || !utils.isValid(startOfMonth)) {\n return null;\n }\n\n // The only invalid section was the day of the month, we replace its value with the maximum boundary for the correct month.\n return sections.map(section => {\n if (section.type !== 'day') {\n return section;\n }\n const dayBoundaries = sectionsValueBoundaries.day({\n currentDate: startOfMonth,\n format: section.format,\n contentType: section.contentType\n });\n if (Number(section.value) <= dayBoundaries.maximum) {\n return section;\n }\n return _extends({}, section, {\n value: dayBoundaries.maximum.toString()\n });\n });\n};\nexport const getSectionOrder = (sections, isRTL) => {\n const neighbors = {};\n if (!isRTL) {\n sections.forEach((_, index) => {\n const leftIndex = index === 0 ? null : index - 1;\n const rightIndex = index === sections.length - 1 ? null : index + 1;\n neighbors[index] = {\n leftIndex,\n rightIndex\n };\n });\n return {\n neighbors,\n startIndex: 0,\n endIndex: sections.length - 1\n };\n }\n const rtl2ltr = {};\n const ltr2rtl = {};\n let groupedSectionsStart = 0;\n let groupedSectionsEnd = 0;\n let RTLIndex = sections.length - 1;\n while (RTLIndex >= 0) {\n groupedSectionsEnd = sections.findIndex(\n // eslint-disable-next-line @typescript-eslint/no-loop-func\n (section, index) => {\n var _section$endSeparator;\n return index >= groupedSectionsStart && ((_section$endSeparator = section.endSeparator) == null ? void 0 : _section$endSeparator.includes(' ')) &&\n // Special case where the spaces were not there in the initial input\n section.endSeparator !== ' / ';\n });\n if (groupedSectionsEnd === -1) {\n groupedSectionsEnd = sections.length - 1;\n }\n for (let i = groupedSectionsEnd; i >= groupedSectionsStart; i -= 1) {\n ltr2rtl[i] = RTLIndex;\n rtl2ltr[RTLIndex] = i;\n RTLIndex -= 1;\n }\n groupedSectionsStart = groupedSectionsEnd + 1;\n }\n sections.forEach((_, index) => {\n const rtlIndex = ltr2rtl[index];\n const leftIndex = rtlIndex === 0 ? null : rtl2ltr[rtlIndex - 1];\n const rightIndex = rtlIndex === sections.length - 1 ? null : rtl2ltr[rtlIndex + 1];\n neighbors[index] = {\n leftIndex,\n rightIndex\n };\n });\n return {\n neighbors,\n startIndex: rtl2ltr[0],\n endIndex: rtl2ltr[sections.length - 1]\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport const getPickersLocalization = pickersTranslations => {\n return {\n components: {\n MuiLocalizationProvider: {\n defaultProps: {\n localeText: _extends({}, pickersTranslations)\n }\n }\n }\n };\n};","import { getPickersLocalization } from './utils/getPickersLocalization';\n\n// This object is not Partial<PickersLocaleText> because it is the default values\n\nconst enUSPickers = {\n // Calendar navigation\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n // View navigation\n openPreviousView: 'open previous view',\n openNextView: 'open next view',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',\n // DateRange placeholders\n start: 'Start',\n end: 'End',\n // Action bar\n cancelButtonLabel: 'Cancel',\n clearButtonLabel: 'Clear',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Today',\n // Toolbar titles\n datePickerToolbarTitle: 'Select date',\n dateTimePickerToolbarTitle: 'Select date & time',\n timePickerToolbarTitle: 'Select time',\n dateRangePickerToolbarTitle: 'Select date range',\n // Clock labels\n clockLabelText: (view, time, adapter) => `Select ${view}. ${time === null ? 'No time selected' : `Selected time is ${adapter.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} hours`,\n minutesClockNumberText: minutes => `${minutes} minutes`,\n secondsClockNumberText: seconds => `${seconds} seconds`,\n // Digital clock labels\n selectViewText: view => `Select ${view}`,\n // Calendar labels\n calendarWeekNumberHeaderLabel: 'Week number',\n calendarWeekNumberHeaderText: '#',\n calendarWeekNumberAriaLabelText: weekNumber => `Week ${weekNumber}`,\n calendarWeekNumberText: weekNumber => `${weekNumber}`,\n // Open picker labels\n openDatePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Choose date, selected date is ${utils.format(value, 'fullDate')}` : 'Choose date',\n openTimePickerDialogue: (value, utils) => value !== null && utils.isValid(value) ? `Choose time, selected time is ${utils.format(value, 'fullTime')}` : 'Choose time',\n // Table labels\n timeTableLabel: 'pick time',\n dateTableLabel: 'pick date',\n // Field section placeholders\n fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),\n fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',\n fieldDayPlaceholder: () => 'DD',\n fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',\n fieldHoursPlaceholder: () => 'hh',\n fieldMinutesPlaceholder: () => 'mm',\n fieldSecondsPlaceholder: () => 'ss',\n fieldMeridiemPlaceholder: () => 'aa'\n};\nexport const DEFAULT_LOCALE = enUSPickers;\nexport const enUS = getPickersLocalization(enUSPickers);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { MuiPickersAdapterContext } from '../../LocalizationProvider/LocalizationProvider';\nimport { DEFAULT_LOCALE } from '../../locales/enUS';\nexport const useLocalizationContext = () => {\n const localization = React.useContext(MuiPickersAdapterContext);\n if (localization === null) {\n throw new Error(['MUI: Can not find the date and time pickers localization context.', 'It looks like you forgot to wrap your component in LocalizationProvider.', 'This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package'].join('\\n'));\n }\n if (localization.utils === null) {\n throw new Error(['MUI: Can not find the date and time pickers adapter from its localization context.', 'It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.'].join('\\n'));\n }\n const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, localization.localeText), [localization.localeText]);\n return React.useMemo(() => _extends({}, localization, {\n localeText\n }), [localization, localeText]);\n};\nexport const useUtils = () => useLocalizationContext().utils;\nexport const useDefaultDates = () => useLocalizationContext().defaultDates;\nexport const useLocaleText = () => useLocalizationContext().localeText;\nexport const useNow = timezone => {\n const utils = useUtils();\n const now = React.useRef();\n if (now.current === undefined) {\n now.current = utils.dateWithTimezone(undefined, timezone);\n }\n return now.current;\n};","import * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useControlled from '@mui/utils/useControlled';\nimport { useUtils } from './useUtils';\n/**\n * Hooks making sure that:\n * - The value returned by `onChange` always have the timezone of `props.value` or `props.defaultValue` if defined\n * - The value rendered is always the one from `props.timezone` if defined\n */\nexport const useValueWithTimezone = ({\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n onChange,\n valueManager\n}) => {\n var _ref, _ref2;\n const utils = useUtils();\n const firstDefaultValue = React.useRef(defaultValue);\n const inputValue = (_ref = valueProp != null ? valueProp : firstDefaultValue.current) != null ? _ref : valueManager.emptyValue;\n const inputTimezone = React.useMemo(() => valueManager.getTimezone(utils, inputValue), [utils, valueManager, inputValue]);\n const setInputTimezone = useEventCallback(newValue => {\n if (inputTimezone == null) {\n return newValue;\n }\n return valueManager.setTimezone(utils, inputTimezone, newValue);\n });\n const timezoneToRender = (_ref2 = timezoneProp != null ? timezoneProp : inputTimezone) != null ? _ref2 : 'default';\n const valueWithTimezoneToRender = React.useMemo(() => valueManager.setTimezone(utils, timezoneToRender, inputValue), [valueManager, utils, timezoneToRender, inputValue]);\n const handleValueChange = useEventCallback((newValue, ...otherParams) => {\n const newValueWithInputTimezone = setInputTimezone(newValue);\n onChange == null ? void 0 : onChange(newValueWithInputTimezone, ...otherParams);\n });\n return {\n value: valueWithTimezoneToRender,\n handleValueChange,\n timezone: timezoneToRender\n };\n};\n\n/**\n * Wrapper around `useControlled` and `useValueWithTimezone`\n */\nexport const useControlledValueWithTimezone = ({\n name,\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n onChange: onChangeProp,\n valueManager\n}) => {\n const [valueWithInputTimezone, setValue] = useControlled({\n name,\n state: 'value',\n controlled: valueProp,\n default: defaultValue != null ? defaultValue : valueManager.emptyValue\n });\n const onChange = useEventCallback((newValue, ...otherParams) => {\n setValue(newValue);\n onChangeProp == null ? void 0 : onChangeProp(newValue, ...otherParams);\n });\n return useValueWithTimezone({\n timezone: timezoneProp,\n value: valueWithInputTimezone,\n defaultValue: undefined,\n onChange,\n valueManager\n });\n};","import { areViewsEqual } from './views';\nexport const findClosestEnabledDate = ({\n date,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n isDateDisabled,\n utils,\n timezone\n}) => {\n const today = utils.startOfDay(utils.dateWithTimezone(undefined, timezone));\n if (disablePast && utils.isBefore(minDate, today)) {\n minDate = today;\n }\n if (disableFuture && utils.isAfter(maxDate, today)) {\n maxDate = today;\n }\n let forward = date;\n let backward = date;\n if (utils.isBefore(date, minDate)) {\n forward = minDate;\n backward = null;\n }\n if (utils.isAfter(date, maxDate)) {\n if (backward) {\n backward = maxDate;\n }\n forward = null;\n }\n while (forward || backward) {\n if (forward && utils.isAfter(forward, maxDate)) {\n forward = null;\n }\n if (backward && utils.isBefore(backward, minDate)) {\n backward = null;\n }\n if (forward) {\n if (!isDateDisabled(forward)) {\n return forward;\n }\n forward = utils.addDays(forward, 1);\n }\n if (backward) {\n if (!isDateDisabled(backward)) {\n return backward;\n }\n backward = utils.addDays(backward, -1);\n }\n }\n return null;\n};\nexport const replaceInvalidDateByNull = (utils, value) => value == null || !utils.isValid(value) ? null : value;\nexport const applyDefaultDate = (utils, value, defaultValue) => {\n if (value == null || !utils.isValid(value)) {\n return defaultValue;\n }\n return value;\n};\nexport const areDatesEqual = (utils, a, b) => {\n if (!utils.isValid(a) && a != null && !utils.isValid(b) && b != null) {\n return true;\n }\n return utils.isEqual(a, b);\n};\nexport const getMonthsInYear = (utils, year) => {\n const firstMonth = utils.startOfYear(year);\n const months = [firstMonth];\n while (months.length < 12) {\n const prevMonth = months[months.length - 1];\n months.push(utils.addMonths(prevMonth, 1));\n }\n return months;\n};\nexport const mergeDateAndTime = (utils, dateParam, timeParam) => {\n let mergedDate = dateParam;\n mergedDate = utils.setHours(mergedDate, utils.getHours(timeParam));\n mergedDate = utils.setMinutes(mergedDate, utils.getMinutes(timeParam));\n mergedDate = utils.setSeconds(mergedDate, utils.getSeconds(timeParam));\n return mergedDate;\n};\nexport const getTodayDate = (utils, timezone, valueType) => valueType === 'date' ? utils.startOfDay(utils.dateWithTimezone(undefined, timezone)) : utils.dateWithTimezone(undefined, timezone);\nconst dateViews = ['year', 'month', 'day'];\nexport const isDatePickerView = view => dateViews.includes(view);\nexport const resolveDateFormat = (utils, {\n format,\n views\n}, isInToolbar) => {\n if (format != null) {\n return format;\n }\n const formats = utils.formats;\n if (areViewsEqual(views, ['year'])) {\n return formats.year;\n }\n if (areViewsEqual(views, ['month'])) {\n return formats.month;\n }\n if (areViewsEqual(views, ['day'])) {\n return formats.dayOfMonth;\n }\n if (areViewsEqual(views, ['month', 'year'])) {\n return `${formats.month} ${formats.year}`;\n }\n if (areViewsEqual(views, ['day', 'month'])) {\n return `${formats.month} ${formats.dayOfMonth}`;\n }\n if (isInToolbar) {\n // Little localization hack (Google is doing the same for android native pickers):\n // For english localization it is convenient to include weekday into the date \"Mon, Jun 1\".\n // For other locales using strings like \"June 1\", without weekday.\n return /en/.test(utils.getCurrentLocaleCode()) ? formats.normalDateWithWeekday : formats.normalDate;\n }\n return formats.keyboardDate;\n};","import { createIsAfterIgnoreDatePart } from './time-utils';\nimport { mergeDateAndTime, getTodayDate } from './date-utils';\nexport const SECTION_TYPE_GRANULARITY = {\n year: 1,\n month: 2,\n day: 3,\n hours: 4,\n minutes: 5,\n seconds: 6,\n milliseconds: 7\n};\nexport const getSectionTypeGranularity = sections => Math.max(...sections.map(section => {\n var _SECTION_TYPE_GRANULA;\n return (_SECTION_TYPE_GRANULA = SECTION_TYPE_GRANULARITY[section.type]) != null ? _SECTION_TYPE_GRANULA : 1;\n}));\nexport const getViewsGranularity = views => Math.max(...views.map(view => {\n var _SECTION_TYPE_GRANULA2;\n return (_SECTION_TYPE_GRANULA2 = SECTION_TYPE_GRANULARITY[view]) != null ? _SECTION_TYPE_GRANULA2 : 1;\n}));\nconst roundDate = (utils, granularity, date) => {\n if (granularity === SECTION_TYPE_GRANULARITY.year) {\n return utils.startOfYear(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.month) {\n return utils.startOfMonth(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.day) {\n return utils.startOfDay(date);\n }\n\n // We don't have startOfHour / startOfMinute / startOfSecond\n let roundedDate = date;\n if (granularity < SECTION_TYPE_GRANULARITY.minutes) {\n roundedDate = utils.setMinutes(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.seconds) {\n roundedDate = utils.setSeconds(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.milliseconds) {\n roundedDate = utils.setMilliseconds(roundedDate, 0);\n }\n return roundedDate;\n};\nexport const getDefaultReferenceDate = ({\n props,\n utils,\n granularity,\n timezone,\n getTodayDate: inGetTodayDate\n}) => {\n var _props$disableIgnorin;\n let referenceDate = inGetTodayDate ? inGetTodayDate() : roundDate(utils, granularity, getTodayDate(utils, timezone));\n if (props.minDate != null && utils.isAfterDay(props.minDate, referenceDate)) {\n referenceDate = roundDate(utils, granularity, props.minDate);\n }\n if (props.maxDate != null && utils.isBeforeDay(props.maxDate, referenceDate)) {\n referenceDate = roundDate(utils, granularity, props.maxDate);\n }\n const isAfter = createIsAfterIgnoreDatePart((_props$disableIgnorin = props.disableIgnoringDatePartForTimeValidation) != null ? _props$disableIgnorin : false, utils);\n if (props.minTime != null && isAfter(props.minTime, referenceDate)) {\n referenceDate = roundDate(utils, granularity, props.disableIgnoringDatePartForTimeValidation ? props.minTime : mergeDateAndTime(utils, referenceDate, props.minTime));\n }\n if (props.maxTime != null && isAfter(referenceDate, props.maxTime)) {\n referenceDate = roundDate(utils, granularity, props.disableIgnoringDatePartForTimeValidation ? props.maxTime : mergeDateAndTime(utils, referenceDate, props.maxTime));\n }\n return referenceDate;\n};","import { areViewsEqual } from './views';\nconst timeViews = ['hours', 'minutes', 'seconds'];\nexport const isTimeView = view => timeViews.includes(view);\nexport const isInternalTimeView = view => timeViews.includes(view) || view === 'meridiem';\nexport const getMeridiem = (date, utils) => {\n if (!date) {\n return null;\n }\n return utils.getHours(date) >= 12 ? 'pm' : 'am';\n};\nexport const convertValueToMeridiem = (value, meridiem, ampm) => {\n if (ampm) {\n const currentMeridiem = value >= 12 ? 'pm' : 'am';\n if (currentMeridiem !== meridiem) {\n return meridiem === 'am' ? value - 12 : value + 12;\n }\n }\n return value;\n};\nexport const convertToMeridiem = (time, meridiem, ampm, utils) => {\n const newHoursAmount = convertValueToMeridiem(utils.getHours(time), meridiem, ampm);\n return utils.setHours(time, newHoursAmount);\n};\nexport const getSecondsInDay = (date, utils) => {\n return utils.getHours(date) * 3600 + utils.getMinutes(date) * 60 + utils.getSeconds(date);\n};\nexport const createIsAfterIgnoreDatePart = (disableIgnoringDatePartForTimeValidation, utils) => (dateLeft, dateRight) => {\n if (disableIgnoringDatePartForTimeValidation) {\n return utils.isAfter(dateLeft, dateRight);\n }\n return getSecondsInDay(dateLeft, utils) > getSecondsInDay(dateRight, utils);\n};\nexport const resolveTimeFormat = (utils, {\n format,\n views,\n ampm\n}) => {\n if (format != null) {\n return format;\n }\n const formats = utils.formats;\n if (areViewsEqual(views, ['hours'])) {\n return ampm ? `${formats.hours12h} ${formats.meridiem}` : formats.hours24h;\n }\n if (areViewsEqual(views, ['minutes'])) {\n return formats.minutes;\n }\n if (areViewsEqual(views, ['seconds'])) {\n return formats.seconds;\n }\n if (areViewsEqual(views, ['minutes', 'seconds'])) {\n return `${formats.minutes}:${formats.seconds}`;\n }\n if (areViewsEqual(views, ['hours', 'minutes', 'seconds'])) {\n return ampm ? `${formats.hours12h}:${formats.minutes}:${formats.seconds} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}:${formats.seconds}`;\n }\n return ampm ? `${formats.hours12h}:${formats.minutes} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}`;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"value\", \"referenceDate\"];\nimport { areDatesEqual, getTodayDate, replaceInvalidDateByNull } from './date-utils';\nimport { getDefaultReferenceDate } from './getDefaultReferenceDate';\nimport { addPositionPropertiesToSections, createDateStrForInputFromSections } from '../hooks/useField/useField.utils';\nexport const singleItemValueManager = {\n emptyValue: null,\n getTodayValue: getTodayDate,\n getInitialReferenceValue: _ref => {\n let {\n value,\n referenceDate\n } = _ref,\n params = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (value != null && params.utils.isValid(value)) {\n return value;\n }\n if (referenceDate != null) {\n return referenceDate;\n }\n return getDefaultReferenceDate(params);\n },\n cleanValue: replaceInvalidDateByNull,\n areValuesEqual: areDatesEqual,\n isSameError: (a, b) => a === b,\n hasError: error => error != null,\n defaultErrorState: null,\n getTimezone: (utils, value) => value == null ? null : utils.getTimezone(value),\n setTimezone: (utils, timezone, value) => value == null ? null : utils.setTimezone(value, timezone)\n};\nexport const singleItemFieldValueManager = {\n updateReferenceValue: (utils, value, prevReferenceValue) => value == null || !utils.isValid(value) ? prevReferenceValue : value,\n getSectionsFromValue: (utils, date, prevSections, isRTL, getSectionsFromDate) => {\n const shouldReUsePrevDateSections = !utils.isValid(date) && !!prevSections;\n if (shouldReUsePrevDateSections) {\n return prevSections;\n }\n return addPositionPropertiesToSections(getSectionsFromDate(date), isRTL);\n },\n getValueStrFromSections: createDateStrForInputFromSections,\n getActiveDateManager: (utils, state) => ({\n date: state.value,\n referenceDate: state.referenceValue,\n getSections: sections => sections,\n getNewValuesFromNewActiveDate: newActiveDate => ({\n value: newActiveDate,\n referenceValue: newActiveDate == null || !utils.isValid(newActiveDate) ? state.referenceValue : newActiveDate\n })\n }),\n parseValueStr: (valueStr, referenceValue, parseDate) => parseDate(valueStr.trim(), referenceValue)\n};","export const areViewsEqual = (views, expectedViews) => {\n if (views.length !== expectedViews.length) {\n return false;\n }\n return expectedViews.every(expectedView => views.includes(expectedView));\n};\nexport const applyDefaultViewProps = ({\n openTo,\n defaultOpenTo,\n views,\n defaultViews\n}) => {\n const viewsWithDefault = views != null ? views : defaultViews;\n let openToWithDefault;\n if (openTo != null) {\n openToWithDefault = openTo;\n } else if (viewsWithDefault.includes(defaultOpenTo)) {\n openToWithDefault = defaultOpenTo;\n } else if (viewsWithDefault.length > 0) {\n openToWithDefault = viewsWithDefault[0];\n } else {\n throw new Error('MUI: The `views` prop must contain at least one view');\n }\n return {\n views: viewsWithDefault,\n openTo: openToWithDefault\n };\n};","export const buildDeprecatedPropsWarning = message => {\n let alreadyWarned = false;\n if (process.env.NODE_ENV === 'production') {\n return () => {};\n }\n const cleanMessage = Array.isArray(message) ? message.join('\\n') : message;\n return deprecatedProps => {\n const deprecatedKeys = Object.entries(deprecatedProps).filter(([, value]) => value !== undefined).map(([key]) => `- ${key}`);\n if (!alreadyWarned && deprecatedKeys.length > 0) {\n alreadyWarned = true;\n console.warn([cleanMessage, 'deprecated props observed:', ...deprecatedKeys].join('\\n'));\n }\n };\n};\nexport const buildWarning = (message, gravity = 'warning') => {\n let alreadyWarned = false;\n const cleanMessage = Array.isArray(message) ? message.join('\\n') : message;\n return () => {\n if (!alreadyWarned) {\n alreadyWarned = true;\n if (gravity === 'error') {\n console.error(cleanMessage);\n } else {\n console.warn(cleanMessage);\n }\n }\n };\n};","export default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n Object.keys(slots).forEach(\n // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.\n // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208\n slot => {\n output[slot] = slots[slot].reduce((acc, key) => {\n if (key) {\n const utilityClass = getUtilityClass(key);\n if (utilityClass !== '') {\n acc.push(utilityClass);\n }\n if (classes && classes[key]) {\n acc.push(classes[key]);\n }\n }\n return acc;\n }, []).join(' ');\n });\n return output;\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","import ClassNameGenerator from '../ClassNameGenerator';\nexport const globalStateClasses = {\n active: 'active',\n checked: 'checked',\n completed: 'completed',\n disabled: 'disabled',\n error: 'error',\n expanded: 'expanded',\n focused: 'focused',\n focusVisible: 'focusVisible',\n open: 'open',\n readOnly: 'readOnly',\n required: 'required',\n selected: 'selected'\n};\nexport default function generateUtilityClass(componentName, slot, globalStatePrefix = 'Mui') {\n const globalStateClass = globalStateClasses[slot];\n return globalStateClass ? `${globalStatePrefix}-${globalStateClass}` : `${ClassNameGenerator.generate(componentName)}-${slot}`;\n}\nexport function isGlobalState(slot) {\n return globalStateClasses[slot] !== undefined;\n}","import generateUtilityClass from '../generateUtilityClass';\nexport default function generateUtilityClasses(componentName, slots, globalStatePrefix = 'Mui') {\n const result = {};\n slots.forEach(slot => {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","'use client';\n\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n if (!isControlled && !Object.is(defaultValue, defaultProp)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '../useEnhancedEffect';\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","const DEFAULT_ENVIRONMENT = 'production';\n\nexport { DEFAULT_ENVIRONMENT };\n//# sourceMappingURL=constants.js.map\n","import { getGlobalSingleton, SyncPromise, logger, isThenable } from '@sentry/utils';\n\n/**\n * Returns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n return getGlobalSingleton('globalEventProcessors', () => []);\n}\n\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nfunction addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n\n/**\n * Process an array of event processors, returning the processed event (or `null` if the event was dropped).\n */\nfunction notifyEventProcessors(\n processors,\n event,\n hint,\n index = 0,\n) {\n return new SyncPromise((resolve, reject) => {\n const processor = processors[index];\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n } else {\n const result = processor({ ...event }, hint) ;\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n processor.id &&\n result === null &&\n logger.log(`Event processor \"${processor.id}\" dropped event`);\n\n if (isThenable(result)) {\n void result\n .then(final => notifyEventProcessors(processors, final, hint, index + 1).then(resolve))\n .then(null, reject);\n } else {\n void notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n}\n\nexport { addGlobalEventProcessor, getGlobalEventProcessors, notifyEventProcessors };\n//# sourceMappingURL=eventProcessors.js.map\n","import { logger, uuid4, timestampInSeconds, isThenable } from '@sentry/utils';\nimport { getCurrentHub } from './hub.js';\n\n// Note: All functions in this file are typed with a return value of `ReturnType<Hub[HUB_FUNCTION]>`,\n// where HUB_FUNCTION is some method on the Hub class.\n//\n// This is done to make sure the top level SDK methods stay in sync with the hub methods.\n// Although every method here has an explicit return type, some of them (that map to void returns) do not\n// contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.\n\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @param captureContext Additional scope data to apply to exception event.\n * @returns The generated eventId.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nfunction captureException(exception, captureContext) {\n return getCurrentHub().captureException(exception, { captureContext });\n}\n\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param Severity Define the level of the message.\n * @returns The generated eventId.\n */\nfunction captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n captureContext,\n) {\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arity of the `captureMessage(message, level)` method.\n const level = typeof captureContext === 'string' ? captureContext : undefined;\n const context = typeof captureContext !== 'string' ? { captureContext } : undefined;\n return getCurrentHub().captureMessage(message, level, context);\n}\n\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nfunction captureEvent(event, hint) {\n return getCurrentHub().captureEvent(event, hint);\n}\n\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nfunction configureScope(callback) {\n getCurrentHub().configureScope(callback);\n}\n\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nfunction addBreadcrumb(breadcrumb) {\n getCurrentHub().addBreadcrumb(breadcrumb);\n}\n\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setContext(name, context) {\n getCurrentHub().setContext(name, context);\n}\n\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nfunction setExtras(extras) {\n getCurrentHub().setExtras(extras);\n}\n\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nfunction setExtra(key, extra) {\n getCurrentHub().setExtra(key, extra);\n}\n\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nfunction setTags(tags) {\n getCurrentHub().setTags(tags);\n}\n\n/**\n * Set key:value that will be sent as tags data with the event.\n *\n * Can also be used to unset a tag, by passing `undefined`.\n *\n * @param key String key of tag\n * @param value Value of tag\n */\nfunction setTag(key, value) {\n getCurrentHub().setTag(key, value);\n}\n\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nfunction setUser(user) {\n getCurrentHub().setUser(user);\n}\n\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nfunction withScope(callback) {\n getCurrentHub().withScope(callback);\n}\n\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a\n * new child span within the transaction or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its\n * finished child spans will be sent to Sentry.\n *\n * NOTE: This function should only be used for *manual* instrumentation. Auto-instrumentation should call\n * `startTransaction` directly on the hub.\n *\n * @param context Properties of the new `Transaction`.\n * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent\n * default values). See {@link Options.tracesSampler}.\n *\n * @returns The transaction which was just started\n */\nfunction startTransaction(\n context,\n customSamplingContext,\n) {\n return getCurrentHub().startTransaction({ ...context }, customSamplingContext);\n}\n\n/**\n * Create a cron monitor check in and send it to Sentry.\n *\n * @param checkIn An object that describes a check in.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction captureCheckIn(checkIn, upsertMonitorConfig) {\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n if (!client) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. No client defined.');\n } else if (!client.captureCheckIn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot capture check-in. Client does not support sending check-ins.');\n } else {\n return client.captureCheckIn(checkIn, upsertMonitorConfig, scope);\n }\n\n return uuid4();\n}\n\n/**\n * Wraps a callback with a cron monitor check in. The check in will be sent to Sentry when the callback finishes.\n *\n * @param monitorSlug The distinct slug of the monitor.\n * @param upsertMonitorConfig An optional object that describes a monitor config. Use this if you want\n * to create a monitor automatically when sending a check in.\n */\nfunction withMonitor(\n monitorSlug,\n callback,\n upsertMonitorConfig,\n) {\n const checkInId = captureCheckIn({ monitorSlug, status: 'in_progress' }, upsertMonitorConfig);\n const now = timestampInSeconds();\n\n function finishCheckIn(status) {\n captureCheckIn({ monitorSlug, status, checkInId, duration: timestampInSeconds() - now });\n }\n\n let maybePromiseResult;\n try {\n maybePromiseResult = callback();\n } catch (e) {\n finishCheckIn('error');\n throw e;\n }\n\n if (isThenable(maybePromiseResult)) {\n Promise.resolve(maybePromiseResult).then(\n () => {\n finishCheckIn('ok');\n },\n () => {\n finishCheckIn('error');\n },\n );\n } else {\n finishCheckIn('ok');\n }\n\n return maybePromiseResult;\n}\n\n/**\n * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function flush(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nasync function close(timeout) {\n const client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return Promise.resolve(false);\n}\n\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nfunction lastEventId() {\n return getCurrentHub().lastEventId();\n}\n\nexport { addBreadcrumb, captureCheckIn, captureEvent, captureException, captureMessage, close, configureScope, flush, lastEventId, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withMonitor, withScope };\n//# sourceMappingURL=exports.js.map\n","import { uuid4, dateTimestampInSeconds, consoleSandbox, logger, GLOBAL_OBJ, getGlobalSingleton } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from './constants.js';\nimport { Scope } from './scope.js';\nimport { closeSession, makeSession, updateSession } from './session.js';\n\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be increased when the global interface\n * changes and new methods are introduced.\n *\n * @hidden\n */\nconst API_VERSION = 4;\n\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nconst DEFAULT_BREADCRUMBS = 100;\n\n/**\n * @inheritDoc\n */\nclass Hub {\n /** Is a {@link Layer}[] containing the client and scope */\n\n /** Contains the last event id of a captured event. */\n\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n constructor(client, scope = new Scope(), _version = API_VERSION) {this._version = _version;\n this._stack = [{ scope }];\n if (client) {\n this.bindClient(client);\n }\n }\n\n /**\n * @inheritDoc\n */\n isOlderThan(version) {\n return this._version < version;\n }\n\n /**\n * @inheritDoc\n */\n bindClient(client) {\n const top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n }\n\n /**\n * @inheritDoc\n */\n pushScope() {\n // We want to clone the content of prev scope\n const scope = Scope.clone(this.getScope());\n this.getStack().push({\n client: this.getClient(),\n scope,\n });\n return scope;\n }\n\n /**\n * @inheritDoc\n */\n popScope() {\n if (this.getStack().length <= 1) return false;\n return !!this.getStack().pop();\n }\n\n /**\n * @inheritDoc\n */\n withScope(callback) {\n const scope = this.pushScope();\n try {\n callback(scope);\n } finally {\n this.popScope();\n }\n }\n\n /**\n * @inheritDoc\n */\n getClient() {\n return this.getStackTop().client ;\n }\n\n /** Returns the scope of the top stack. */\n getScope() {\n return this.getStackTop().scope;\n }\n\n /** Returns the scope stack for domains or the process. */\n getStack() {\n return this._stack;\n }\n\n /** Returns the topmost scope layer in the order domain > local > process. */\n getStackTop() {\n return this._stack[this._stack.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n captureException(exception, hint) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error('Sentry syntheticException');\n this._withClient((client, scope) => {\n client.captureException(\n exception,\n {\n originalException: exception,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n ) {\n const eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : uuid4());\n const syntheticException = new Error(message);\n this._withClient((client, scope) => {\n client.captureMessage(\n message,\n level,\n {\n originalException: message,\n syntheticException,\n ...hint,\n event_id: eventId,\n },\n scope,\n );\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint) {\n const eventId = hint && hint.event_id ? hint.event_id : uuid4();\n if (!event.type) {\n this._lastEventId = eventId;\n }\n\n this._withClient((client, scope) => {\n client.captureEvent(event, { ...hint, event_id: eventId }, scope);\n });\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n lastEventId() {\n return this._lastEventId;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, hint) {\n const { scope, client } = this.getStackTop();\n\n if (!client) return;\n\n const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =\n (client.getOptions && client.getOptions()) || {};\n\n if (maxBreadcrumbs <= 0) return;\n\n const timestamp = dateTimestampInSeconds();\n const mergedBreadcrumb = { timestamp, ...breadcrumb };\n const finalBreadcrumb = beforeBreadcrumb\n ? (consoleSandbox(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )\n : mergedBreadcrumb;\n\n if (finalBreadcrumb === null) return;\n\n if (client.emit) {\n client.emit('beforeAddBreadcrumb', finalBreadcrumb, hint);\n }\n\n scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this.getScope().setUser(user);\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this.getScope().setTags(tags);\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this.getScope().setExtras(extras);\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this.getScope().setTag(key, value);\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this.getScope().setExtra(key, extra);\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n setContext(name, context) {\n this.getScope().setContext(name, context);\n }\n\n /**\n * @inheritDoc\n */\n configureScope(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(scope);\n }\n }\n\n /**\n * @inheritDoc\n */\n run(callback) {\n const oldHub = makeMain(this);\n try {\n callback(this);\n } finally {\n makeMain(oldHub);\n }\n }\n\n /**\n * @inheritDoc\n */\n getIntegration(integration) {\n const client = this.getClient();\n if (!client) return null;\n try {\n return client.getIntegration(integration);\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n startTransaction(context, customSamplingContext) {\n const result = this._callExtensionMethod('startTransaction', context, customSamplingContext);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && !result) {\n const client = this.getClient();\n if (!client) {\n // eslint-disable-next-line no-console\n console.warn(\n \"Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'\",\n );\n } else {\n // eslint-disable-next-line no-console\n console.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n`);\n }\n }\n\n return result;\n }\n\n /**\n * @inheritDoc\n */\n traceHeaders() {\n return this._callExtensionMethod('traceHeaders');\n }\n\n /**\n * @inheritDoc\n */\n captureSession(endSession = false) {\n // both send the update and pull the session from the scope\n if (endSession) {\n return this.endSession();\n }\n\n // only send the update\n this._sendSessionUpdate();\n }\n\n /**\n * @inheritDoc\n */\n endSession() {\n const layer = this.getStackTop();\n const scope = layer.scope;\n const session = scope.getSession();\n if (session) {\n closeSession(session);\n }\n this._sendSessionUpdate();\n\n // the session is over; take it off of the scope\n scope.setSession();\n }\n\n /**\n * @inheritDoc\n */\n startSession(context) {\n const { scope, client } = this.getStackTop();\n const { release, environment = DEFAULT_ENVIRONMENT } = (client && client.getOptions()) || {};\n\n // Will fetch userAgent if called from browser sdk\n const { userAgent } = GLOBAL_OBJ.navigator || {};\n\n const session = makeSession({\n release,\n environment,\n user: scope.getUser(),\n ...(userAgent && { userAgent }),\n ...context,\n });\n\n // End existing session if there's one\n const currentSession = scope.getSession && scope.getSession();\n if (currentSession && currentSession.status === 'ok') {\n updateSession(currentSession, { status: 'exited' });\n }\n this.endSession();\n\n // Afterwards we set the new session on the scope\n scope.setSession(session);\n\n return session;\n }\n\n /**\n * Returns if default PII should be sent to Sentry and propagated in ourgoing requests\n * when Tracing is used.\n */\n shouldSendDefaultPii() {\n const client = this.getClient();\n const options = client && client.getOptions();\n return Boolean(options && options.sendDefaultPii);\n }\n\n /**\n * Sends the current Session on the scope\n */\n _sendSessionUpdate() {\n const { scope, client } = this.getStackTop();\n\n const session = scope.getSession();\n if (session && client && client.captureSession) {\n client.captureSession(session);\n }\n }\n\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n _withClient(callback) {\n const { scope, client } = this.getStackTop();\n if (client) {\n callback(client, scope);\n }\n }\n\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _callExtensionMethod(method, ...args) {\n const carrier = getMainCarrier();\n const sentry = carrier.__SENTRY__;\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Extension method ${method} couldn't be found, doing nothing.`);\n }\n}\n\n/**\n * Returns the global shim registry.\n *\n * FIXME: This function is problematic, because despite always returning a valid Carrier,\n * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check\n * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.\n **/\nfunction getMainCarrier() {\n GLOBAL_OBJ.__SENTRY__ = GLOBAL_OBJ.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return GLOBAL_OBJ;\n}\n\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nfunction makeMain(hub) {\n const registry = getMainCarrier();\n const oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nfunction getCurrentHub() {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n const hub = registry.__SENTRY__.acs.getCurrentHub();\n\n if (hub) {\n return hub;\n }\n }\n\n // Return hub that lives on a global object\n return getGlobalHub(registry);\n}\n\nfunction getGlobalHub(registry = getMainCarrier()) {\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * If the carrier does not contain a hub, a new hub is created with the global hub client and scope.\n */\nfunction ensureHubOnCarrier(carrier, parent = getGlobalHub()) {\n // If there's no hub on current domain, or it's an old API, assign a new one\n if (!hasHubOnCarrier(carrier) || getHubFromCarrier(carrier).isOlderThan(API_VERSION)) {\n const globalHubTopStack = parent.getStackTop();\n setHubOnCarrier(carrier, new Hub(globalHubTopStack.client, Scope.clone(globalHubTopStack.scope)));\n }\n}\n\n/**\n * @private Private API with no semver guarantees!\n *\n * Sets the global async context strategy\n */\nfunction setAsyncContextStrategy(strategy) {\n // Get main carrier (global for every environment)\n const registry = getMainCarrier();\n registry.__SENTRY__ = registry.__SENTRY__ || {};\n registry.__SENTRY__.acs = strategy;\n}\n\n/**\n * Runs the supplied callback in its own async context. Async Context strategies are defined per SDK.\n *\n * @param callback The callback to run in its own async context\n * @param options Options to pass to the async context strategy\n * @returns The result of the callback\n */\nfunction runWithAsyncContext(callback, options = {}) {\n const registry = getMainCarrier();\n\n if (registry.__SENTRY__ && registry.__SENTRY__.acs) {\n return registry.__SENTRY__.acs.runWithAsyncContext(callback, options);\n }\n\n // if there was no strategy, fallback to just calling the callback\n return callback();\n}\n\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);\n}\n\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nfunction getHubFromCarrier(carrier) {\n return getGlobalSingleton('hub', () => new Hub(), carrier);\n}\n\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n * @returns A boolean indicating success or failure\n */\nfunction setHubOnCarrier(carrier, hub) {\n if (!carrier) return false;\n const __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});\n __SENTRY__.hub = hub;\n return true;\n}\n\nexport { API_VERSION, Hub, ensureHubOnCarrier, getCurrentHub, getHubFromCarrier, getMainCarrier, makeMain, runWithAsyncContext, setAsyncContextStrategy, setHubOnCarrier };\n//# sourceMappingURL=hub.js.map\n","import { isPlainObject, dateTimestampInSeconds, arrayify, uuid4 } from '@sentry/utils';\nimport { notifyEventProcessors, getGlobalEventProcessors } from './eventProcessors.js';\nimport { updateSession } from './session.js';\n\n/**\n * Default value for maximum number of breadcrumbs added to an event.\n */\nconst DEFAULT_MAX_BREADCRUMBS = 100;\n\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nclass Scope {\n /** Flag if notifying is happening. */\n\n /** Callback for client to receive scope changes. */\n\n /** Callback list that will be called after {@link applyToEvent}. */\n\n /** Array of breadcrumbs. */\n\n /** User */\n\n /** Tags */\n\n /** Extra */\n\n /** Contexts */\n\n /** Attachments */\n\n /** Propagation Context for distributed tracing */\n\n /**\n * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get\n * sent to Sentry\n */\n\n /** Fingerprint */\n\n /** Severity */\n // eslint-disable-next-line deprecation/deprecation\n\n /** Transaction Name */\n\n /** Span */\n\n /** Session */\n\n /** Request Mode Session Status */\n\n // NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.\n\n constructor() {\n this._notifyingListeners = false;\n this._scopeListeners = [];\n this._eventProcessors = [];\n this._breadcrumbs = [];\n this._attachments = [];\n this._user = {};\n this._tags = {};\n this._extra = {};\n this._contexts = {};\n this._sdkProcessingMetadata = {};\n this._propagationContext = generatePropagationContext();\n }\n\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n static clone(scope) {\n const newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = [...scope._breadcrumbs];\n newScope._tags = { ...scope._tags };\n newScope._extra = { ...scope._extra };\n newScope._contexts = { ...scope._contexts };\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._session = scope._session;\n newScope._transactionName = scope._transactionName;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = [...scope._eventProcessors];\n newScope._requestSession = scope._requestSession;\n newScope._attachments = [...scope._attachments];\n newScope._sdkProcessingMetadata = { ...scope._sdkProcessingMetadata };\n newScope._propagationContext = { ...scope._propagationContext };\n }\n return newScope;\n }\n\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n addScopeListener(callback) {\n this._scopeListeners.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n addEventProcessor(callback) {\n this._eventProcessors.push(callback);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setUser(user) {\n this._user = user || {};\n if (this._session) {\n updateSession(this._session, { user });\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getUser() {\n return this._user;\n }\n\n /**\n * @inheritDoc\n */\n getRequestSession() {\n return this._requestSession;\n }\n\n /**\n * @inheritDoc\n */\n setRequestSession(requestSession) {\n this._requestSession = requestSession;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTags(tags) {\n this._tags = {\n ...this._tags,\n ...tags,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this._tags = { ...this._tags, [key]: value };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtras(extras) {\n this._extra = {\n ...this._extra,\n ...extras,\n };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setExtra(key, extra) {\n this._extra = { ...this._extra, [key]: extra };\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setFingerprint(fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setLevel(\n // eslint-disable-next-line deprecation/deprecation\n level,\n ) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setTransactionName(name) {\n this._transactionName = name;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setSpan(span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSpan() {\n return this._span;\n }\n\n /**\n * @inheritDoc\n */\n getTransaction() {\n // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will\n // have a pointer to the currently-active transaction.\n const span = this.getSpan();\n return span && span.transaction;\n }\n\n /**\n * @inheritDoc\n */\n setSession(session) {\n if (!session) {\n delete this._session;\n } else {\n this._session = session;\n }\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getSession() {\n return this._session;\n }\n\n /**\n * @inheritDoc\n */\n update(captureContext) {\n if (!captureContext) {\n return this;\n }\n\n if (typeof captureContext === 'function') {\n const updatedScope = (captureContext )(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n\n if (captureContext instanceof Scope) {\n this._tags = { ...this._tags, ...captureContext._tags };\n this._extra = { ...this._extra, ...captureContext._extra };\n this._contexts = { ...this._contexts, ...captureContext._contexts };\n if (captureContext._user && Object.keys(captureContext._user).length) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n if (captureContext._requestSession) {\n this._requestSession = captureContext._requestSession;\n }\n if (captureContext._propagationContext) {\n this._propagationContext = captureContext._propagationContext;\n }\n } else if (isPlainObject(captureContext)) {\n // eslint-disable-next-line no-param-reassign\n captureContext = captureContext ;\n this._tags = { ...this._tags, ...captureContext.tags };\n this._extra = { ...this._extra, ...captureContext.extra };\n this._contexts = { ...this._contexts, ...captureContext.contexts };\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n if (captureContext.requestSession) {\n this._requestSession = captureContext.requestSession;\n }\n if (captureContext.propagationContext) {\n this._propagationContext = captureContext.propagationContext;\n }\n }\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n clear() {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transactionName = undefined;\n this._fingerprint = undefined;\n this._requestSession = undefined;\n this._span = undefined;\n this._session = undefined;\n this._notifyScopeListeners();\n this._attachments = [];\n this._propagationContext = generatePropagationContext();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addBreadcrumb(breadcrumb, maxBreadcrumbs) {\n const maxCrumbs = typeof maxBreadcrumbs === 'number' ? maxBreadcrumbs : DEFAULT_MAX_BREADCRUMBS;\n\n // No data has been changed, so don't notify scope listeners\n if (maxCrumbs <= 0) {\n return this;\n }\n\n const mergedBreadcrumb = {\n timestamp: dateTimestampInSeconds(),\n ...breadcrumb,\n };\n\n const breadcrumbs = this._breadcrumbs;\n breadcrumbs.push(mergedBreadcrumb);\n this._breadcrumbs = breadcrumbs.length > maxCrumbs ? breadcrumbs.slice(-maxCrumbs) : breadcrumbs;\n\n this._notifyScopeListeners();\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getLastBreadcrumb() {\n return this._breadcrumbs[this._breadcrumbs.length - 1];\n }\n\n /**\n * @inheritDoc\n */\n clearBreadcrumbs() {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n }\n\n /**\n * @inheritDoc\n */\n addAttachment(attachment) {\n this._attachments.push(attachment);\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getAttachments() {\n return this._attachments;\n }\n\n /**\n * @inheritDoc\n */\n clearAttachments() {\n this._attachments = [];\n return this;\n }\n\n /**\n * Applies data from the scope to the event and runs all event processors on it.\n *\n * @param event Event\n * @param hint Object containing additional information about the original exception, for use by the event processors.\n * @hidden\n */\n applyToEvent(\n event,\n hint = {},\n additionalEventProcessors,\n ) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = { ...this._extra, ...event.extra };\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = { ...this._tags, ...event.tags };\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = { ...this._user, ...event.user };\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = { ...this._contexts, ...event.contexts };\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transactionName) {\n event.transaction = this._transactionName;\n }\n\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relies on that.\n if (this._span) {\n event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };\n const transaction = this._span.transaction;\n if (transaction) {\n event.sdkProcessingMetadata = {\n dynamicSamplingContext: transaction.getDynamicSamplingContext(),\n ...event.sdkProcessingMetadata,\n };\n const transactionName = transaction.name;\n if (transactionName) {\n event.tags = { transaction: transactionName, ...event.tags };\n }\n }\n }\n\n this._applyFingerprint(event);\n\n const scopeBreadcrumbs = this._getBreadcrumbs();\n const breadcrumbs = [...(event.breadcrumbs || []), ...scopeBreadcrumbs];\n event.breadcrumbs = breadcrumbs.length > 0 ? breadcrumbs : undefined;\n\n event.sdkProcessingMetadata = {\n ...event.sdkProcessingMetadata,\n ...this._sdkProcessingMetadata,\n propagationContext: this._propagationContext,\n };\n\n // TODO (v8): Update this order to be: Global > Client > Scope\n return notifyEventProcessors(\n [...(additionalEventProcessors || []), ...getGlobalEventProcessors(), ...this._eventProcessors],\n event,\n hint,\n );\n }\n\n /**\n * Add data which will be accessible during event processing but won't get sent to Sentry\n */\n setSDKProcessingMetadata(newData) {\n this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setPropagationContext(context) {\n this._propagationContext = context;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getPropagationContext() {\n return this._propagationContext;\n }\n\n /**\n * Get the breadcrumbs for this scope.\n */\n _getBreadcrumbs() {\n return this._breadcrumbs;\n }\n\n /**\n * This will be called on every set call.\n */\n _notifyScopeListeners() {\n // We need this check for this._notifyingListeners to be able to work on scope during updates\n // If this check is not here we'll produce endless recursion when something is done with the scope\n // during the callback.\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n this._scopeListeners.forEach(callback => {\n callback(this);\n });\n this._notifyingListeners = false;\n }\n }\n\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n _applyFingerprint(event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint ? arrayify(event.fingerprint) : [];\n\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n }\n}\n\nfunction generatePropagationContext() {\n return {\n traceId: uuid4(),\n spanId: uuid4().substring(16),\n };\n}\n\nexport { Scope };\n//# sourceMappingURL=scope.js.map\n","import { timestampInSeconds, uuid4, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Creates a new `Session` object by setting certain default parameters. If optional @param context\n * is passed, the passed properties are applied to the session object.\n *\n * @param context (optional) additional properties to be applied to the returned session object\n *\n * @returns a new `Session` object\n */\nfunction makeSession(context) {\n // Both timestamp and started are in seconds since the UNIX epoch.\n const startingTime = timestampInSeconds();\n\n const session = {\n sid: uuid4(),\n init: true,\n timestamp: startingTime,\n started: startingTime,\n duration: 0,\n status: 'ok',\n errors: 0,\n ignoreDuration: false,\n toJSON: () => sessionToJSON(session),\n };\n\n if (context) {\n updateSession(session, context);\n }\n\n return session;\n}\n\n/**\n * Updates a session object with the properties passed in the context.\n *\n * Note that this function mutates the passed object and returns void.\n * (Had to do this instead of returning a new and updated session because closing and sending a session\n * makes an update to the session after it was passed to the sending logic.\n * @see BaseClient.captureSession )\n *\n * @param session the `Session` to update\n * @param context the `SessionContext` holding the properties that should be updated in @param session\n */\n// eslint-disable-next-line complexity\nfunction updateSession(session, context = {}) {\n if (context.user) {\n if (!session.ipAddress && context.user.ip_address) {\n session.ipAddress = context.user.ip_address;\n }\n\n if (!session.did && !context.did) {\n session.did = context.user.id || context.user.email || context.user.username;\n }\n }\n\n session.timestamp = context.timestamp || timestampInSeconds();\n\n if (context.abnormal_mechanism) {\n session.abnormal_mechanism = context.abnormal_mechanism;\n }\n\n if (context.ignoreDuration) {\n session.ignoreDuration = context.ignoreDuration;\n }\n if (context.sid) {\n // Good enough uuid validation. — Kamil\n session.sid = context.sid.length === 32 ? context.sid : uuid4();\n }\n if (context.init !== undefined) {\n session.init = context.init;\n }\n if (!session.did && context.did) {\n session.did = `${context.did}`;\n }\n if (typeof context.started === 'number') {\n session.started = context.started;\n }\n if (session.ignoreDuration) {\n session.duration = undefined;\n } else if (typeof context.duration === 'number') {\n session.duration = context.duration;\n } else {\n const duration = session.timestamp - session.started;\n session.duration = duration >= 0 ? duration : 0;\n }\n if (context.release) {\n session.release = context.release;\n }\n if (context.environment) {\n session.environment = context.environment;\n }\n if (!session.ipAddress && context.ipAddress) {\n session.ipAddress = context.ipAddress;\n }\n if (!session.userAgent && context.userAgent) {\n session.userAgent = context.userAgent;\n }\n if (typeof context.errors === 'number') {\n session.errors = context.errors;\n }\n if (context.status) {\n session.status = context.status;\n }\n}\n\n/**\n * Closes a session by setting its status and updating the session object with it.\n * Internally calls `updateSession` to update the passed session object.\n *\n * Note that this function mutates the passed session (@see updateSession for explanation).\n *\n * @param session the `Session` object to be closed\n * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,\n * this function will keep the previously set status, unless it was `'ok'` in which case\n * it is changed to `'exited'`.\n */\nfunction closeSession(session, status) {\n let context = {};\n if (status) {\n context = { status };\n } else if (session.status === 'ok') {\n context = { status: 'exited' };\n }\n\n updateSession(session, context);\n}\n\n/**\n * Serializes a passed session object to a JSON object with a slightly different structure.\n * This is necessary because the Sentry backend requires a slightly different schema of a session\n * than the one the JS SDKs use internally.\n *\n * @param session the session to be converted\n *\n * @returns a JSON object of the passed session\n */\nfunction sessionToJSON(session) {\n return dropUndefinedKeys({\n sid: `${session.sid}`,\n init: session.init,\n // Make sure that sec is converted to ms for date constructor\n started: new Date(session.started * 1000).toISOString(),\n timestamp: new Date(session.timestamp * 1000).toISOString(),\n status: session.status,\n errors: session.errors,\n did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,\n duration: session.duration,\n abnormal_mechanism: session.abnormal_mechanism,\n attrs: {\n release: session.release,\n environment: session.environment,\n ip_address: session.ipAddress,\n user_agent: session.userAgent,\n },\n });\n}\n\nexport { closeSession, makeSession, updateSession };\n//# sourceMappingURL=session.js.map\n","import { isString } from './is.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst DEFAULT_MAX_STRING_LENGTH = 80;\n\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction htmlTreeAsString(\n elem,\n options = {},\n) {\n\n if (!elem) {\n return '<unknown>';\n }\n\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n let currentElem = elem ;\n const MAX_TRAVERSE_HEIGHT = 5;\n const out = [];\n let height = 0;\n let len = 0;\n const separator = ' > ';\n const sepLength = separator.length;\n let nextStr;\n const keyAttrs = Array.isArray(options) ? options : options.keyAttrs;\n const maxStringLength = (!Array.isArray(options) && options.maxStringLength) || DEFAULT_MAX_STRING_LENGTH;\n\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem, keyAttrs);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds maxStringLength\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= maxStringLength)) {\n break;\n }\n\n out.push(nextStr);\n\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n\n return out.reverse().join(separator);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el, keyAttrs) {\n const elem = el\n\n;\n\n const out = [];\n let className;\n let classes;\n let key;\n let attr;\n let i;\n\n if (!elem || !elem.tagName) {\n return '';\n }\n\n out.push(elem.tagName.toLowerCase());\n\n // Pairs of attribute keys defined in `serializeAttribute` and their values on element.\n const keyAttrPairs =\n keyAttrs && keyAttrs.length\n ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])\n : null;\n\n if (keyAttrPairs && keyAttrPairs.length) {\n keyAttrPairs.forEach(keyAttrPair => {\n out.push(`[${keyAttrPair[0]}=\"${keyAttrPair[1]}\"]`);\n });\n } else {\n if (elem.id) {\n out.push(`#${elem.id}`);\n }\n\n // eslint-disable-next-line prefer-const\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(`.${classes[i]}`);\n }\n }\n }\n const allowedAttrs = ['aria-label', 'type', 'name', 'title', 'alt'];\n for (i = 0; i < allowedAttrs.length; i++) {\n key = allowedAttrs[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(`[${key}=\"${attr}\"]`);\n }\n }\n return out.join('');\n}\n\n/**\n * A safe form of location.href\n */\nfunction getLocationHref() {\n try {\n return WINDOW.document.location.href;\n } catch (oO) {\n return '';\n }\n}\n\n/**\n * Gets a DOM element by using document.querySelector.\n *\n * This wrapper will first check for the existance of the function before\n * actually calling it so that we don't have to take care of this check,\n * every time we want to access the DOM.\n *\n * Reason: DOM/querySelector is not available in all environments.\n *\n * We have to cast to any because utils can be consumed by a variety of environments,\n * and we don't want to break TS users. If you know what element will be selected by\n * `document.querySelector`, specify it as part of the generic call. For example,\n * `const element = getDomElement<Element>('selector');`\n *\n * @param selector the selector string passed on to document.querySelector\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction getDomElement(selector) {\n if (WINDOW.document && WINDOW.document.querySelector) {\n return WINDOW.document.querySelector(selector) ;\n }\n return null;\n}\n\nexport { getDomElement, getLocationHref, htmlTreeAsString };\n//# sourceMappingURL=browser.js.map\n","/*\n * This module exists for optimizations in the build process through rollup and terser. We define some global\n * constants, which can be overridden during build. By guarding certain pieces of code with functions that return these\n * constants, we can control whether or not they appear in the final bundle. (Any code guarded by a false condition will\n * never run, and will hence be dropped during treeshaking.) The two primary uses for this are stripping out calls to\n * `logger` and preventing node-related code from appearing in browser bundles.\n *\n * Attention:\n * This file should not be used to define constants/flags that are intended to be used for tree-shaking conducted by\n * users. These flags should live in their respective packages, as we identified user tooling (specifically webpack)\n * having issues tree-shaking these constants across package boundaries.\n * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want\n * users to be able to shake away expressions that it guards.\n */\n\n/**\n * Figures out if we're building a browser bundle.\n *\n * @returns true if this is a browser bundle build.\n */\nfunction isBrowserBundle() {\n return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;\n}\n\n/**\n * Get source of SDK.\n */\nfunction getSDKSource() {\n // @ts-expect-error \"npm\" is injected by rollup during build process\n return \"npm\";\n}\n\nexport { getSDKSource, isBrowserBundle };\n//# sourceMappingURL=env.js.map\n","// eslint-disable-next-line @typescript-eslint/unbound-method\nconst objectToString = Object.prototype.toString;\n\n/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isError(wat) {\n switch (objectToString.call(wat)) {\n case '[object Error]':\n case '[object Exception]':\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value is an instance of the given built-in class.\n *\n * @param wat The value to be checked\n * @param className\n * @returns A boolean representing the result.\n */\nfunction isBuiltin(wat, className) {\n return objectToString.call(wat) === `[object ${className}]`;\n}\n\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isErrorEvent(wat) {\n return isBuiltin(wat, 'ErrorEvent');\n}\n\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMError(wat) {\n return isBuiltin(wat, 'DOMError');\n}\n\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isDOMException(wat) {\n return isBuiltin(wat, 'DOMException');\n}\n\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isString(wat) {\n return isBuiltin(wat, 'String');\n}\n\n/**\n * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isPlainObject(wat) {\n return isBuiltin(wat, 'Object');\n}\n\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isEvent(wat) {\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isElement(wat) {\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isRegExp(wat) {\n return isBuiltin(wat, 'RegExp');\n}\n\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nfunction isThenable(wat) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n}\n\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isSyntheticEvent(wat) {\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n\n/**\n * Checks whether given value is NaN\n * {@link isNaN}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isNaN(wat) {\n return typeof wat === 'number' && wat !== wat;\n}\n\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nfunction isInstanceOf(wat, base) {\n try {\n return wat instanceof base;\n } catch (_e) {\n return false;\n }\n}\n\n/**\n * Checks whether given value's type is a Vue ViewModel.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nfunction isVueViewModel(wat) {\n // Not using Object.prototype.toString because in Vue 3 it would read the instance's Symbol(Symbol.toStringTag) property.\n return !!(typeof wat === 'object' && wat !== null && ((wat ).__isVue || (wat )._isVue));\n}\n\nexport { isDOMError, isDOMException, isElement, isError, isErrorEvent, isEvent, isInstanceOf, isNaN, isPlainObject, isPrimitive, isRegExp, isString, isSyntheticEvent, isThenable, isVueViewModel };\n//# sourceMappingURL=is.js.map\n","import { GLOBAL_OBJ } from './worldwide.js';\n\n/** Prefix for logging strings */\nconst PREFIX = 'Sentry Logger ';\n\nconst CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;\n\n/** This may be mutated by the console instrumentation. */\nconst originalConsoleMethods\n\n = {};\n\n/** JSDoc */\n\n/**\n * Temporarily disable sentry console instrumentations.\n *\n * @param callback The function to run against the original `console` messages\n * @returns The results of the callback\n */\nfunction consoleSandbox(callback) {\n if (!('console' in GLOBAL_OBJ)) {\n return callback();\n }\n\n const console = GLOBAL_OBJ.console ;\n const wrappedFuncs = {};\n\n const wrappedLevels = Object.keys(originalConsoleMethods) ;\n\n // Restore all wrapped console methods\n wrappedLevels.forEach(level => {\n const originalConsoleMethod = originalConsoleMethods[level] ;\n wrappedFuncs[level] = console[level] ;\n console[level] = originalConsoleMethod;\n });\n\n try {\n return callback();\n } finally {\n // Revert restoration to wrapped state\n wrappedLevels.forEach(level => {\n console[level] = wrappedFuncs[level] ;\n });\n }\n}\n\nfunction makeLogger() {\n let enabled = false;\n const logger = {\n enable: () => {\n enabled = true;\n },\n disable: () => {\n enabled = false;\n },\n isEnabled: () => enabled,\n };\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n CONSOLE_LEVELS.forEach(name => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n logger[name] = (...args) => {\n if (enabled) {\n consoleSandbox(() => {\n GLOBAL_OBJ.console[name](`${PREFIX}[${name}]:`, ...args);\n });\n }\n };\n });\n } else {\n CONSOLE_LEVELS.forEach(name => {\n logger[name] = () => undefined;\n });\n }\n\n return logger ;\n}\n\nconst logger = makeLogger();\n\nexport { CONSOLE_LEVELS, consoleSandbox, logger, originalConsoleMethods };\n//# sourceMappingURL=logger.js.map\n","import { addNonEnumerableProperty } from './object.js';\nimport { snipLine } from './string.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nfunction uuid4() {\n const gbl = GLOBAL_OBJ ;\n const crypto = gbl.crypto || gbl.msCrypto;\n\n let getRandomByte = () => Math.random() * 16;\n try {\n if (crypto && crypto.randomUUID) {\n return crypto.randomUUID().replace(/-/g, '');\n }\n if (crypto && crypto.getRandomValues) {\n getRandomByte = () => crypto.getRandomValues(new Uint8Array(1))[0];\n }\n } catch (_) {\n // some runtimes can crash invoking crypto\n // https://github.com/getsentry/sentry-javascript/issues/8935\n }\n\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n // Concatenating the following numbers as strings results in '10000000100040008000100000000000'\n return (([1e7] ) + 1e3 + 4e3 + 8e3 + 1e11).replace(/[018]/g, c =>\n // eslint-disable-next-line no-bitwise\n ((c ) ^ ((getRandomByte() & 15) >> ((c ) / 4))).toString(16),\n );\n}\n\nfunction getFirstException(event) {\n return event.exception && event.exception.values ? event.exception.values[0] : undefined;\n}\n\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nfunction getEventDescription(event) {\n const { message, event_id: eventId } = event;\n if (message) {\n return message;\n }\n\n const firstException = getFirstException(event);\n if (firstException) {\n if (firstException.type && firstException.value) {\n return `${firstException.type}: ${firstException.value}`;\n }\n return firstException.type || firstException.value || eventId || '<unknown>';\n }\n return eventId || '<unknown>';\n}\n\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nfunction addExceptionTypeValue(event, value, type) {\n const exception = (event.exception = event.exception || {});\n const values = (exception.values = exception.values || []);\n const firstException = (values[0] = values[0] || {});\n if (!firstException.value) {\n firstException.value = value || '';\n }\n if (!firstException.type) {\n firstException.type = type || 'Error';\n }\n}\n\n/**\n * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.\n *\n * @param event The event to modify.\n * @param newMechanism Mechanism data to add to the event.\n * @hidden\n */\nfunction addExceptionMechanism(event, newMechanism) {\n const firstException = getFirstException(event);\n if (!firstException) {\n return;\n }\n\n const defaultMechanism = { type: 'generic', handled: true };\n const currentMechanism = firstException.mechanism;\n firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };\n\n if (newMechanism && 'data' in newMechanism) {\n const mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };\n firstException.mechanism.data = mergedData;\n }\n}\n\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nconst SEMVER_REGEXP =\n /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n\n/**\n * Represents Semantic Versioning object\n */\n\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nfunction parseSemver(input) {\n const match = input.match(SEMVER_REGEXP) || [];\n const major = parseInt(match[1], 10);\n const minor = parseInt(match[2], 10);\n const patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\n\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nfunction addContextToFrame(lines, frame, linesOfContext = 5) {\n // When there is no line number in the frame, attaching context is nonsensical and will even break grouping\n if (frame.lineno === undefined) {\n return;\n }\n\n const maxLines = lines.length;\n const sourceLine = Math.max(Math.min(maxLines - 1, frame.lineno - 1), 0);\n\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map((line) => snipLine(line, 0));\n\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map((line) => snipLine(line, 0));\n}\n\n/**\n * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object\n * in question), and marks it captured if not.\n *\n * This is useful because it's possible for an error to get captured by more than one mechanism. After we intercept and\n * record an error, we rethrow it (assuming we've intercepted it before it's reached the top-level global handlers), so\n * that we don't interfere with whatever effects the error might have had were the SDK not there. At that point, because\n * the error has been rethrown, it's possible for it to bubble up to some other code we've instrumented. If it's not\n * caught after that, it will bubble all the way up to the global handlers (which of course we also instrument). This\n * function helps us ensure that even if we encounter the same error more than once, we only record it the first time we\n * see it.\n *\n * Note: It will ignore primitives (always return `false` and not mark them as seen), as properties can't be set on\n * them. {@link: Object.objectify} can be used on exceptions to convert any that are primitives into their equivalent\n * object wrapper forms so that this check will always work. However, because we need to flag the exact object which\n * will get rethrown, and because that rethrowing happens outside of the event processing pipeline, the objectification\n * must be done before the exception captured.\n *\n * @param A thrown exception to check or flag as having been seen\n * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)\n */\nfunction checkOrSetAlreadyCaught(exception) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (exception && (exception ).__sentry_captured__) {\n return true;\n }\n\n try {\n // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the\n // `ExtraErrorData` integration\n addNonEnumerableProperty(exception , '__sentry_captured__', true);\n } catch (err) {\n // `exception` is a primitive, so we can't mark it seen\n }\n\n return false;\n}\n\n/**\n * Checks whether the given input is already an array, and if it isn't, wraps it in one.\n *\n * @param maybeArray Input to turn into an array, if necessary\n * @returns The input, if already an array, or an array with the input as the only element, if not\n */\nfunction arrayify(maybeArray) {\n return Array.isArray(maybeArray) ? maybeArray : [maybeArray];\n}\n\nexport { addContextToFrame, addExceptionMechanism, addExceptionTypeValue, arrayify, checkOrSetAlreadyCaught, getEventDescription, parseSemver, uuid4 };\n//# sourceMappingURL=misc.js.map\n","import { isBrowserBundle } from './env.js';\n\n/**\n * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,\n * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.\n */\n\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nfunction isNodeEnv() {\n // explicitly check for browser bundles as those can be optimized statically\n // by terser/rollup.\n return (\n !isBrowserBundle() &&\n Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'\n );\n}\n\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\nfunction dynamicRequire(mod, request) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return mod.require(request);\n}\n\n/**\n * Helper for dynamically loading module that should work with linked dependencies.\n * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`\n * However it's _not possible_ to do that with Webpack, as it has to know all the dependencies during\n * build time. `require.resolve` is also not available in any other way, so we cannot create,\n * a fake helper like we do with `dynamicRequire`.\n *\n * We always prefer to use local package, thus the value is not returned early from each `try/catch` block.\n * That is to mimic the behavior of `require.resolve` exactly.\n *\n * @param moduleName module name to require\n * @returns possibly required module\n */\nfunction loadModule(moduleName) {\n let mod;\n\n try {\n mod = dynamicRequire(module, moduleName);\n } catch (e) {\n // no-empty\n }\n\n try {\n const { cwd } = dynamicRequire(module, 'process');\n mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ;\n } catch (e) {\n // no-empty\n }\n\n return mod;\n}\n\nexport { dynamicRequire, isNodeEnv, loadModule };\n//# sourceMappingURL=node.js.map\n","import { htmlTreeAsString } from './browser.js';\nimport { isError, isEvent, isInstanceOf, isElement, isPlainObject, isPrimitive } from './is.js';\nimport { logger } from './logger.js';\nimport { truncate } from './string.js';\n\n/**\n * Replace a method in an object with a wrapped version of itself.\n *\n * @param source An object that contains a method to be wrapped.\n * @param name The name of the method to be wrapped.\n * @param replacementFactory A higher-order function that takes the original version of the given method and returns a\n * wrapped version. Note: The function returned by `replacementFactory` needs to be a non-arrow function, in order to\n * preserve the correct value of `this`, and the original method must be called using `origMethod.call(this, <other\n * args>)` or `origMethod.apply(this, [<other args>])` (rather than being called directly), again to preserve `this`.\n * @returns void\n */\nfunction fill(source, name, replacementFactory) {\n if (!(name in source)) {\n return;\n }\n\n const original = source[name] ;\n const wrapped = replacementFactory(original) ;\n\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n if (typeof wrapped === 'function') {\n markFunctionWrapped(wrapped, original);\n }\n\n source[name] = wrapped;\n}\n\n/**\n * Defines a non-enumerable property on the given object.\n *\n * @param obj The object on which to set the property\n * @param name The name of the property to be set\n * @param value The value to which to set the property\n */\nfunction addNonEnumerableProperty(obj, name, value) {\n try {\n Object.defineProperty(obj, name, {\n // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it\n value: value,\n writable: true,\n configurable: true,\n });\n } catch (o_O) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Failed to add non-enumerable property \"${name}\" to object`, obj);\n }\n}\n\n/**\n * Remembers the original function on the wrapped function and\n * patches up the prototype.\n *\n * @param wrapped the wrapper function\n * @param original the original function that gets wrapped\n */\nfunction markFunctionWrapped(wrapped, original) {\n try {\n const proto = original.prototype || {};\n wrapped.prototype = original.prototype = proto;\n addNonEnumerableProperty(wrapped, '__sentry_original__', original);\n } catch (o_O) {} // eslint-disable-line no-empty\n}\n\n/**\n * This extracts the original function if available. See\n * `markFunctionWrapped` for more information.\n *\n * @param func the function to unwrap\n * @returns the unwrapped version of the function if available.\n */\nfunction getOriginalFunction(func) {\n return func.__sentry_original__;\n}\n\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nfunction urlEncode(object) {\n return Object.keys(object)\n .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)\n .join('&');\n}\n\n/**\n * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their\n * non-enumerable properties attached.\n *\n * @param value Initial source that we have to transform in order for it to be usable by the serializer\n * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor\n * an Error.\n */\nfunction convertToPlainObject(value)\n\n {\n if (isError(value)) {\n return {\n message: value.message,\n name: value.name,\n stack: value.stack,\n ...getOwnProperties(value),\n };\n } else if (isEvent(value)) {\n const newObj\n\n = {\n type: value.type,\n target: serializeEventTarget(value.target),\n currentTarget: serializeEventTarget(value.currentTarget),\n ...getOwnProperties(value),\n };\n\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n newObj.detail = value.detail;\n }\n\n return newObj;\n } else {\n return value;\n }\n}\n\n/** Creates a string representation of the target of an `Event` object */\nfunction serializeEventTarget(target) {\n try {\n return isElement(target) ? htmlTreeAsString(target) : Object.prototype.toString.call(target);\n } catch (_oO) {\n return '<unknown>';\n }\n}\n\n/** Filters out all but an object's own properties */\nfunction getOwnProperties(obj) {\n if (typeof obj === 'object' && obj !== null) {\n const extractedProps = {};\n for (const property in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, property)) {\n extractedProps[property] = (obj )[property];\n }\n }\n return extractedProps;\n } else {\n return {};\n }\n}\n\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nfunction extractExceptionKeysForMessage(exception, maxLength = 40) {\n const keys = Object.keys(convertToPlainObject(exception));\n keys.sort();\n\n if (!keys.length) {\n return '[object has no keys]';\n }\n\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n\n for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n const serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n\n return '';\n}\n\n/**\n * Given any object, return a new object having removed all fields whose value was `undefined`.\n * Works recursively on objects and arrays.\n *\n * Attention: This function keeps circular references in the returned object.\n */\nfunction dropUndefinedKeys(inputValue) {\n // This map keeps track of what already visited nodes map to.\n // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular\n // references as the input object.\n const memoizationMap = new Map();\n\n // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API\n return _dropUndefinedKeys(inputValue, memoizationMap);\n}\n\nfunction _dropUndefinedKeys(inputValue, memoizationMap) {\n if (isPlainObject(inputValue)) {\n // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = {};\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n for (const key of Object.keys(inputValue)) {\n if (typeof inputValue[key] !== 'undefined') {\n returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);\n }\n }\n\n return returnValue ;\n }\n\n if (Array.isArray(inputValue)) {\n // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object\n const memoVal = memoizationMap.get(inputValue);\n if (memoVal !== undefined) {\n return memoVal ;\n }\n\n const returnValue = [];\n // Store the mapping of this value in case we visit it again, in case of circular data\n memoizationMap.set(inputValue, returnValue);\n\n inputValue.forEach((item) => {\n returnValue.push(_dropUndefinedKeys(item, memoizationMap));\n });\n\n return returnValue ;\n }\n\n return inputValue;\n}\n\n/**\n * Ensure that something is an object.\n *\n * Turns `undefined` and `null` into `String`s and all other primitives into instances of their respective wrapper\n * classes (String, Boolean, Number, etc.). Acts as the identity function on non-primitives.\n *\n * @param wat The subject of the objectification\n * @returns A version of `wat` which can safely be used with `Object` class methods\n */\nfunction objectify(wat) {\n let objectified;\n switch (true) {\n case wat === undefined || wat === null:\n objectified = new String(wat);\n break;\n\n // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason\n // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as\n // an object in order to wrap it.\n case typeof wat === 'symbol' || typeof wat === 'bigint':\n objectified = Object(wat);\n break;\n\n // this will catch the remaining primitives: `String`, `Number`, and `Boolean`\n case isPrimitive(wat):\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n objectified = new (wat ).constructor(wat);\n break;\n\n // by process of elimination, at this point we know that `wat` must already be an object\n default:\n objectified = wat;\n break;\n }\n return objectified;\n}\n\nexport { addNonEnumerableProperty, convertToPlainObject, dropUndefinedKeys, extractExceptionKeysForMessage, fill, getOriginalFunction, markFunctionWrapped, objectify, urlEncode };\n//# sourceMappingURL=object.js.map\n","import { isVueViewModel, isString, isRegExp } from './is.js';\n\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string (0 = unlimited)\n * @returns string Encoded\n */\nfunction truncate(str, max = 0) {\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : `${str.slice(0, max)}...`;\n}\n\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nfunction snipLine(line, colno) {\n let newLine = line;\n const lineLength = newLine.length;\n if (lineLength <= 150) {\n return newLine;\n }\n if (colno > lineLength) {\n // eslint-disable-next-line no-param-reassign\n colno = lineLength;\n }\n\n let start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n\n let end = Math.min(start + 140, lineLength);\n if (end > lineLength - 5) {\n end = lineLength;\n }\n if (end === lineLength) {\n start = Math.max(end - 140, 0);\n }\n\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = `'{snip} ${newLine}`;\n }\n if (end < lineLength) {\n newLine += ' {snip}';\n }\n\n return newLine;\n}\n\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n\n const output = [];\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < input.length; i++) {\n const value = input[i];\n try {\n // This is a hack to fix a Vue3-specific bug that causes an infinite loop of\n // console warnings. This happens when a Vue template is rendered with\n // an undeclared variable, which we try to stringify, ultimately causing\n // Vue to issue another warning which repeats indefinitely.\n // see: https://github.com/getsentry/sentry-javascript/pull/8981\n if (isVueViewModel(value)) {\n output.push('[VueViewModel]');\n } else {\n output.push(String(value));\n }\n } catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n\n return output.join(delimiter);\n}\n\n/**\n * Checks if the given value matches a regex or string\n *\n * @param value The string to test\n * @param pattern Either a regex or a string against which `value` will be matched\n * @param requireExactStringMatch If true, `value` must match `pattern` exactly. If false, `value` will match\n * `pattern` if it contains `pattern`. Only applies to string-type patterns.\n */\nfunction isMatchingPattern(\n value,\n pattern,\n requireExactStringMatch = false,\n) {\n if (!isString(value)) {\n return false;\n }\n\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (isString(pattern)) {\n return requireExactStringMatch ? value === pattern : value.includes(pattern);\n }\n\n return false;\n}\n\n/**\n * Test the given string against an array of strings and regexes. By default, string matching is done on a\n * substring-inclusion basis rather than a strict equality basis\n *\n * @param testString The string to test\n * @param patterns The patterns against which to test the string\n * @param requireExactStringMatch If true, `testString` must match one of the given string patterns exactly in order to\n * count. If false, `testString` will match a string pattern if it contains that pattern.\n * @returns\n */\nfunction stringMatchesSomePattern(\n testString,\n patterns = [],\n requireExactStringMatch = false,\n) {\n return patterns.some(pattern => isMatchingPattern(testString, pattern, requireExactStringMatch));\n}\n\nexport { isMatchingPattern, safeJoin, snipLine, stringMatchesSomePattern, truncate };\n//# sourceMappingURL=string.js.map\n","import { isThenable } from './is.js';\n\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n\n/** SyncPromise internal states */\nvar States; (function (States) {\n /** Pending */\n const PENDING = 0; States[States[\"PENDING\"] = PENDING] = \"PENDING\";\n /** Resolved / OK */\n const RESOLVED = 1; States[States[\"RESOLVED\"] = RESOLVED] = \"RESOLVED\";\n /** Rejected / Error */\n const REJECTED = 2; States[States[\"REJECTED\"] = REJECTED] = \"REJECTED\";\n})(States || (States = {}));\n\n// Overloads so we can call resolvedSyncPromise without arguments and generic argument\n\n/**\n * Creates a resolved sync promise.\n *\n * @param value the value to resolve the promise with\n * @returns the resolved sync promise\n */\nfunction resolvedSyncPromise(value) {\n return new SyncPromise(resolve => {\n resolve(value);\n });\n}\n\n/**\n * Creates a rejected sync promise.\n *\n * @param value the value to reject the promise with\n * @returns the rejected sync promise\n */\nfunction rejectedSyncPromise(reason) {\n return new SyncPromise((_, reject) => {\n reject(reason);\n });\n}\n\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nclass SyncPromise {\n\n constructor(\n executor,\n ) {SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);\n this._state = States.PENDING;\n this._handlers = [];\n\n try {\n executor(this._resolve, this._reject);\n } catch (e) {\n this._reject(e);\n }\n }\n\n /** JSDoc */\n then(\n onfulfilled,\n onrejected,\n ) {\n return new SyncPromise((resolve, reject) => {\n this._handlers.push([\n false,\n result => {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result );\n } else {\n try {\n resolve(onfulfilled(result));\n } catch (e) {\n reject(e);\n }\n }\n },\n reason => {\n if (!onrejected) {\n reject(reason);\n } else {\n try {\n resolve(onrejected(reason));\n } catch (e) {\n reject(e);\n }\n }\n },\n ]);\n this._executeHandlers();\n });\n }\n\n /** JSDoc */\n catch(\n onrejected,\n ) {\n return this.then(val => val, onrejected);\n }\n\n /** JSDoc */\n finally(onfinally) {\n return new SyncPromise((resolve, reject) => {\n let val;\n let isRejected;\n\n return this.then(\n value => {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n },\n reason => {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n },\n ).then(() => {\n if (isRejected) {\n reject(val);\n return;\n }\n\n resolve(val );\n });\n });\n }\n\n /** JSDoc */\n __init() {this._resolve = (value) => {\n this._setResult(States.RESOLVED, value);\n };}\n\n /** JSDoc */\n __init2() {this._reject = (reason) => {\n this._setResult(States.REJECTED, reason);\n };}\n\n /** JSDoc */\n __init3() {this._setResult = (state, value) => {\n if (this._state !== States.PENDING) {\n return;\n }\n\n if (isThenable(value)) {\n void (value ).then(this._resolve, this._reject);\n return;\n }\n\n this._state = state;\n this._value = value;\n\n this._executeHandlers();\n };}\n\n /** JSDoc */\n __init4() {this._executeHandlers = () => {\n if (this._state === States.PENDING) {\n return;\n }\n\n const cachedHandlers = this._handlers.slice();\n this._handlers = [];\n\n cachedHandlers.forEach(handler => {\n if (handler[0]) {\n return;\n }\n\n if (this._state === States.RESOLVED) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n handler[1](this._value );\n }\n\n if (this._state === States.REJECTED) {\n handler[2](this._value);\n }\n\n handler[0] = true;\n });\n };}\n}\n\nexport { SyncPromise, rejectedSyncPromise, resolvedSyncPromise };\n//# sourceMappingURL=syncpromise.js.map\n","import { isNodeEnv, dynamicRequire } from './node.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * An object that can return the current timestamp in seconds since the UNIX epoch.\n */\n\n/**\n * A TimestampSource implementation for environments that do not support the Performance Web API natively.\n *\n * Note that this TimestampSource does not use a monotonic clock. A call to `nowSeconds` may return a timestamp earlier\n * than a previously returned value. We do not try to emulate a monotonic behavior in order to facilitate debugging. It\n * is more obvious to explain \"why does my span have negative duration\" than \"why my spans have zero duration\".\n */\nconst dateTimestampSource = {\n nowSeconds: () => Date.now() / 1000,\n};\n\n/**\n * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}\n * for accessing a high-resolution monotonic clock.\n */\n\n/**\n * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not\n * support the API.\n *\n * Wrapping the native API works around differences in behavior from different browsers.\n */\nfunction getBrowserPerformance() {\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n return undefined;\n }\n\n // Replace performance.timeOrigin with our own timeOrigin based on Date.now().\n //\n // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +\n // performance.now() gives a date arbitrarily in the past.\n //\n // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is\n // undefined.\n //\n // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to\n // interact with data coming out of performance entries.\n //\n // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that\n // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes\n // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have\n // observed skews that can be as long as days, weeks or months.\n //\n // See https://github.com/getsentry/sentry-javascript/issues/2590.\n //\n // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload\n // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation\n // transactions of long-lived web pages.\n const timeOrigin = Date.now() - performance.now();\n\n return {\n now: () => performance.now(),\n timeOrigin,\n };\n}\n\n/**\n * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't\n * implement the API.\n */\nfunction getNodePerformance() {\n try {\n const perfHooks = dynamicRequire(module, 'perf_hooks') ;\n return perfHooks.performance;\n } catch (_) {\n return undefined;\n }\n}\n\n/**\n * The Performance API implementation for the current platform, if available.\n */\nconst platformPerformance = isNodeEnv() ? getNodePerformance() : getBrowserPerformance();\n\nconst timestampSource =\n platformPerformance === undefined\n ? dateTimestampSource\n : {\n nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000,\n };\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using the Date API.\n */\nconst dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);\n\n/**\n * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the\n * availability of the Performance API.\n *\n * See `usingPerformanceAPI` to test whether the Performance API is used.\n *\n * BUG: Note that because of how browsers implement the Performance API, the clock might stop when the computer is\n * asleep. This creates a skew between `dateTimestampInSeconds` and `timestampInSeconds`. The\n * skew can grow to arbitrary amounts like days, weeks or months.\n * See https://github.com/getsentry/sentry-javascript/issues/2590.\n */\nconst timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);\n\n/**\n * Re-exported with an old name for backwards-compatibility.\n * TODO (v8): Remove this\n *\n * @deprecated Use `timestampInSeconds` instead.\n */\nconst timestampWithMs = timestampInSeconds;\n\n/**\n * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.\n */\nconst usingPerformanceAPI = platformPerformance !== undefined;\n\n/**\n * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.\n */\nlet _browserPerformanceTimeOriginMode;\n\n/**\n * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the\n * performance API is available.\n */\nconst browserPerformanceTimeOrigin = (() => {\n // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or\n // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin\n // data as reliable if they are within a reasonable threshold of the current time.\n\n const { performance } = WINDOW;\n if (!performance || !performance.now) {\n _browserPerformanceTimeOriginMode = 'none';\n return undefined;\n }\n\n const threshold = 3600 * 1000;\n const performanceNow = performance.now();\n const dateNow = Date.now();\n\n // if timeOrigin isn't available set delta to threshold so it isn't used\n const timeOriginDelta = performance.timeOrigin\n ? Math.abs(performance.timeOrigin + performanceNow - dateNow)\n : threshold;\n const timeOriginIsReliable = timeOriginDelta < threshold;\n\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always\n // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the\n // Date API.\n // eslint-disable-next-line deprecation/deprecation\n const navigationStart = performance.timing && performance.timing.navigationStart;\n const hasNavigationStart = typeof navigationStart === 'number';\n // if navigationStart isn't available set delta to threshold so it isn't used\n const navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;\n const navigationStartIsReliable = navigationStartDelta < threshold;\n\n if (timeOriginIsReliable || navigationStartIsReliable) {\n // Use the more reliable time origin\n if (timeOriginDelta <= navigationStartDelta) {\n _browserPerformanceTimeOriginMode = 'timeOrigin';\n return performance.timeOrigin;\n } else {\n _browserPerformanceTimeOriginMode = 'navigationStart';\n return navigationStart;\n }\n }\n\n // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.\n _browserPerformanceTimeOriginMode = 'dateNow';\n return dateNow;\n})();\n\nexport { _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, dateTimestampInSeconds, timestampInSeconds, timestampWithMs, usingPerformanceAPI };\n//# sourceMappingURL=time.js.map\n","/** Internal global with common properties and Sentry extensions */\n\n// The code below for 'isGlobalObj' and 'GLOBAL_OBJ' was copied from core-js before modification\n// https://github.com/zloirock/core-js/blob/1b944df55282cdc99c90db5f49eb0b6eda2cc0a3/packages/core-js/internals/global.js\n// core-js has the following licence:\n//\n// Copyright (c) 2014-2022 Denis Pushkarev\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the \"Software\"), to deal\n// in the Software without restriction, including without limitation the rights\n// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n// copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n// THE SOFTWARE.\n\n/** Returns 'obj' if it's the global object, otherwise returns undefined */\nfunction isGlobalObj(obj) {\n return obj && obj.Math == Math ? obj : undefined;\n}\n\n/** Get's the global object for the current JavaScript runtime */\nconst GLOBAL_OBJ =\n (typeof globalThis == 'object' && isGlobalObj(globalThis)) ||\n // eslint-disable-next-line no-restricted-globals\n (typeof window == 'object' && isGlobalObj(window)) ||\n (typeof self == 'object' && isGlobalObj(self)) ||\n (typeof global == 'object' && isGlobalObj(global)) ||\n (function () {\n return this;\n })() ||\n {};\n\n/**\n * @deprecated Use GLOBAL_OBJ instead or WINDOW from @sentry/browser. This will be removed in v8\n */\nfunction getGlobalObject() {\n return GLOBAL_OBJ ;\n}\n\n/**\n * Returns a global singleton contained in the global `__SENTRY__` object.\n *\n * If the singleton doesn't already exist in `__SENTRY__`, it will be created using the given factory\n * function and added to the `__SENTRY__` object.\n *\n * @param name name of the global singleton on __SENTRY__\n * @param creator creator Factory function to create the singleton if it doesn't already exist on `__SENTRY__`\n * @param obj (Optional) The global object on which to look for `__SENTRY__`, if not `GLOBAL_OBJ`'s return value\n * @returns the singleton\n */\nfunction getGlobalSingleton(name, creator, obj) {\n const gbl = (obj || GLOBAL_OBJ) ;\n const __SENTRY__ = (gbl.__SENTRY__ = gbl.__SENTRY__ || {});\n const singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());\n return singleton;\n}\n\nexport { GLOBAL_OBJ, getGlobalObject, getGlobalSingleton };\n//# sourceMappingURL=worldwide.js.map\n","/**\n * @source {https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Polyfill}\n * but without thisArg (too hard to type, no need to `this`)\n */\nvar toStr = Object.prototype.toString;\nfunction isCallable(fn) {\n return typeof fn === \"function\" || toStr.call(fn) === \"[object Function]\";\n}\nfunction toInteger(value) {\n var number = Number(value);\n if (isNaN(number)) {\n return 0;\n }\n if (number === 0 || !isFinite(number)) {\n return number;\n }\n return (number > 0 ? 1 : -1) * Math.floor(Math.abs(number));\n}\nvar maxSafeInteger = Math.pow(2, 53) - 1;\nfunction toLength(value) {\n var len = toInteger(value);\n return Math.min(Math.max(len, 0), maxSafeInteger);\n}\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n */\n\n/**\n * Creates an array from an iterable object.\n * @param iterable An iterable object to convert to an array.\n * @param mapfn A mapping function to call on every element of the array.\n * @param thisArg Value of 'this' used to invoke the mapfn.\n */\nexport default function arrayFrom(arrayLike, mapFn) {\n // 1. Let C be the this value.\n // edit(@eps1lon): we're not calling it as Array.from\n var C = Array;\n\n // 2. Let items be ToObject(arrayLike).\n var items = Object(arrayLike);\n\n // 3. ReturnIfAbrupt(items).\n if (arrayLike == null) {\n throw new TypeError(\"Array.from requires an array-like object - not null or undefined\");\n }\n\n // 4. If mapfn is undefined, then let mapping be false.\n // const mapFn = arguments.length > 1 ? arguments[1] : void undefined;\n\n if (typeof mapFn !== \"undefined\") {\n // 5. else\n // 5. a If IsCallable(mapfn) is false, throw a TypeError exception.\n if (!isCallable(mapFn)) {\n throw new TypeError(\"Array.from: when provided, the second argument must be a function\");\n }\n }\n\n // 10. Let lenValue be Get(items, \"length\").\n // 11. Let len be ToLength(lenValue).\n var len = toLength(items.length);\n\n // 13. If IsConstructor(C) is true, then\n // 13. a. Let A be the result of calling the [[Construct]] internal method\n // of C with an argument list containing the single item len.\n // 14. a. Else, Let A be ArrayCreate(len).\n var A = isCallable(C) ? Object(new C(len)) : new Array(len);\n\n // 16. Let k be 0.\n var k = 0;\n // 17. Repeat, while k < len… (also steps a - h)\n var kValue;\n while (k < len) {\n kValue = items[k];\n if (mapFn) {\n A[k] = mapFn(kValue, k);\n } else {\n A[k] = kValue;\n }\n k += 1;\n }\n // 18. Let putStatus be Put(A, \"length\", len, true).\n A.length = len;\n // 20. Return A.\n return A;\n}\n//# sourceMappingURL=array.from.mjs.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\n// for environments without Set we fallback to arrays with unique members\nvar SetLike = /*#__PURE__*/function () {\n function SetLike() {\n var items = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n _classCallCheck(this, SetLike);\n _defineProperty(this, \"items\", void 0);\n this.items = items;\n }\n _createClass(SetLike, [{\n key: \"add\",\n value: function add(value) {\n if (this.has(value) === false) {\n this.items.push(value);\n }\n return this;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.items = [];\n }\n }, {\n key: \"delete\",\n value: function _delete(value) {\n var previousLength = this.items.length;\n this.items = this.items.filter(function (item) {\n return item !== value;\n });\n return previousLength !== this.items.length;\n }\n }, {\n key: \"forEach\",\n value: function forEach(callbackfn) {\n var _this = this;\n this.items.forEach(function (item) {\n callbackfn(item, item, _this);\n });\n }\n }, {\n key: \"has\",\n value: function has(value) {\n return this.items.indexOf(value) !== -1;\n }\n }, {\n key: \"size\",\n get: function get() {\n return this.items.length;\n }\n }]);\n return SetLike;\n}();\nexport default typeof Set === \"undefined\" ? Set : SetLike;\n//# sourceMappingURL=SetLike.mjs.map","// https://w3c.github.io/html-aria/#document-conformance-requirements-for-use-of-aria-attributes-in-html\n\n/**\n * Safe Element.localName for all supported environments\n * @param element\n */\nexport function getLocalName(element) {\n var _element$localName;\n return (// eslint-disable-next-line no-restricted-properties -- actual guard for environments without localName\n (_element$localName = element.localName) !== null && _element$localName !== void 0 ? _element$localName :\n // eslint-disable-next-line no-restricted-properties -- required for the fallback\n element.tagName.toLowerCase()\n );\n}\nvar localNameToRoleMappings = {\n article: \"article\",\n aside: \"complementary\",\n button: \"button\",\n datalist: \"listbox\",\n dd: \"definition\",\n details: \"group\",\n dialog: \"dialog\",\n dt: \"term\",\n fieldset: \"group\",\n figure: \"figure\",\n // WARNING: Only with an accessible name\n form: \"form\",\n footer: \"contentinfo\",\n h1: \"heading\",\n h2: \"heading\",\n h3: \"heading\",\n h4: \"heading\",\n h5: \"heading\",\n h6: \"heading\",\n header: \"banner\",\n hr: \"separator\",\n html: \"document\",\n legend: \"legend\",\n li: \"listitem\",\n math: \"math\",\n main: \"main\",\n menu: \"list\",\n nav: \"navigation\",\n ol: \"list\",\n optgroup: \"group\",\n // WARNING: Only in certain context\n option: \"option\",\n output: \"status\",\n progress: \"progressbar\",\n // WARNING: Only with an accessible name\n section: \"region\",\n summary: \"button\",\n table: \"table\",\n tbody: \"rowgroup\",\n textarea: \"textbox\",\n tfoot: \"rowgroup\",\n // WARNING: Only in certain context\n td: \"cell\",\n th: \"columnheader\",\n thead: \"rowgroup\",\n tr: \"row\",\n ul: \"list\"\n};\nvar prohibitedAttributes = {\n caption: new Set([\"aria-label\", \"aria-labelledby\"]),\n code: new Set([\"aria-label\", \"aria-labelledby\"]),\n deletion: new Set([\"aria-label\", \"aria-labelledby\"]),\n emphasis: new Set([\"aria-label\", \"aria-labelledby\"]),\n generic: new Set([\"aria-label\", \"aria-labelledby\", \"aria-roledescription\"]),\n insertion: new Set([\"aria-label\", \"aria-labelledby\"]),\n paragraph: new Set([\"aria-label\", \"aria-labelledby\"]),\n presentation: new Set([\"aria-label\", \"aria-labelledby\"]),\n strong: new Set([\"aria-label\", \"aria-labelledby\"]),\n subscript: new Set([\"aria-label\", \"aria-labelledby\"]),\n superscript: new Set([\"aria-label\", \"aria-labelledby\"])\n};\n\n/**\n *\n * @param element\n * @param role The role used for this element. This is specified to control whether you want to use the implicit or explicit role.\n */\nfunction hasGlobalAriaAttributes(element, role) {\n // https://rawgit.com/w3c/aria/stable/#global_states\n // commented attributes are deprecated\n return [\"aria-atomic\", \"aria-busy\", \"aria-controls\", \"aria-current\", \"aria-describedby\", \"aria-details\",\n // \"disabled\",\n \"aria-dropeffect\",\n // \"errormessage\",\n \"aria-flowto\", \"aria-grabbed\",\n // \"haspopup\",\n \"aria-hidden\",\n // \"invalid\",\n \"aria-keyshortcuts\", \"aria-label\", \"aria-labelledby\", \"aria-live\", \"aria-owns\", \"aria-relevant\", \"aria-roledescription\"].some(function (attributeName) {\n var _prohibitedAttributes;\n return element.hasAttribute(attributeName) && !((_prohibitedAttributes = prohibitedAttributes[role]) !== null && _prohibitedAttributes !== void 0 && _prohibitedAttributes.has(attributeName));\n });\n}\nfunction ignorePresentationalRole(element, implicitRole) {\n // https://rawgit.com/w3c/aria/stable/#conflict_resolution_presentation_none\n return hasGlobalAriaAttributes(element, implicitRole);\n}\nexport default function getRole(element) {\n var explicitRole = getExplicitRole(element);\n if (explicitRole === null || explicitRole === \"presentation\") {\n var implicitRole = getImplicitRole(element);\n if (explicitRole !== \"presentation\" || ignorePresentationalRole(element, implicitRole || \"\")) {\n return implicitRole;\n }\n }\n return explicitRole;\n}\nfunction getImplicitRole(element) {\n var mappedByTag = localNameToRoleMappings[getLocalName(element)];\n if (mappedByTag !== undefined) {\n return mappedByTag;\n }\n switch (getLocalName(element)) {\n case \"a\":\n case \"area\":\n case \"link\":\n if (element.hasAttribute(\"href\")) {\n return \"link\";\n }\n break;\n case \"img\":\n if (element.getAttribute(\"alt\") === \"\" && !ignorePresentationalRole(element, \"img\")) {\n return \"presentation\";\n }\n return \"img\";\n case \"input\":\n {\n var _ref = element,\n type = _ref.type;\n switch (type) {\n case \"button\":\n case \"image\":\n case \"reset\":\n case \"submit\":\n return \"button\";\n case \"checkbox\":\n case \"radio\":\n return type;\n case \"range\":\n return \"slider\";\n case \"email\":\n case \"tel\":\n case \"text\":\n case \"url\":\n if (element.hasAttribute(\"list\")) {\n return \"combobox\";\n }\n return \"textbox\";\n case \"search\":\n if (element.hasAttribute(\"list\")) {\n return \"combobox\";\n }\n return \"searchbox\";\n case \"number\":\n return \"spinbutton\";\n default:\n return null;\n }\n }\n case \"select\":\n if (element.hasAttribute(\"multiple\") || element.size > 1) {\n return \"listbox\";\n }\n return \"combobox\";\n }\n return null;\n}\nfunction getExplicitRole(element) {\n var role = element.getAttribute(\"role\");\n if (role !== null) {\n var explicitRole = role.trim().split(\" \")[0];\n // String.prototype.split(sep, limit) will always return an array with at least one member\n // as long as limit is either undefined or > 0\n if (explicitRole.length > 0) {\n return explicitRole;\n }\n }\n return null;\n}\n//# sourceMappingURL=getRole.mjs.map","export { getLocalName } from \"./getRole.mjs\";\nimport getRole, { getLocalName } from \"./getRole.mjs\";\nexport function isElement(node) {\n return node !== null && node.nodeType === node.ELEMENT_NODE;\n}\nexport function isHTMLTableCaptionElement(node) {\n return isElement(node) && getLocalName(node) === \"caption\";\n}\nexport function isHTMLInputElement(node) {\n return isElement(node) && getLocalName(node) === \"input\";\n}\nexport function isHTMLOptGroupElement(node) {\n return isElement(node) && getLocalName(node) === \"optgroup\";\n}\nexport function isHTMLSelectElement(node) {\n return isElement(node) && getLocalName(node) === \"select\";\n}\nexport function isHTMLTableElement(node) {\n return isElement(node) && getLocalName(node) === \"table\";\n}\nexport function isHTMLTextAreaElement(node) {\n return isElement(node) && getLocalName(node) === \"textarea\";\n}\nexport function safeWindow(node) {\n var _ref = node.ownerDocument === null ? node : node.ownerDocument,\n defaultView = _ref.defaultView;\n if (defaultView === null) {\n throw new TypeError(\"no window available\");\n }\n return defaultView;\n}\nexport function isHTMLFieldSetElement(node) {\n return isElement(node) && getLocalName(node) === \"fieldset\";\n}\nexport function isHTMLLegendElement(node) {\n return isElement(node) && getLocalName(node) === \"legend\";\n}\nexport function isHTMLSlotElement(node) {\n return isElement(node) && getLocalName(node) === \"slot\";\n}\nexport function isSVGElement(node) {\n return isElement(node) && node.ownerSVGElement !== undefined;\n}\nexport function isSVGSVGElement(node) {\n return isElement(node) && getLocalName(node) === \"svg\";\n}\nexport function isSVGTitleElement(node) {\n return isSVGElement(node) && getLocalName(node) === \"title\";\n}\n\n/**\n *\n * @param {Node} node -\n * @param {string} attributeName -\n * @returns {Element[]} -\n */\nexport function queryIdRefs(node, attributeName) {\n if (isElement(node) && node.hasAttribute(attributeName)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute check\n var ids = node.getAttribute(attributeName).split(\" \");\n\n // Browsers that don't support shadow DOM won't have getRootNode\n var root = node.getRootNode ? node.getRootNode() : node.ownerDocument;\n return ids.map(function (id) {\n return root.getElementById(id);\n }).filter(function (element) {\n return element !== null;\n }\n // TODO: why does this not narrow?\n );\n }\n\n return [];\n}\nexport function hasAnyConcreteRoles(node, roles) {\n if (isElement(node)) {\n return roles.indexOf(getRole(node)) !== -1;\n }\n return false;\n}\n//# sourceMappingURL=util.mjs.map","/**\n * implements https://w3c.github.io/accname/\n */\nimport ArrayFrom from \"./polyfills/array.from.mjs\";\nimport SetLike from \"./polyfills/SetLike.mjs\";\nimport { hasAnyConcreteRoles, isElement, isHTMLTableCaptionElement, isHTMLInputElement, isHTMLSelectElement, isHTMLTextAreaElement, safeWindow, isHTMLFieldSetElement, isHTMLLegendElement, isHTMLOptGroupElement, isHTMLTableElement, isHTMLSlotElement, isSVGSVGElement, isSVGTitleElement, queryIdRefs, getLocalName } from \"./util.mjs\";\n\n/**\n * A string of characters where all carriage returns, newlines, tabs, and form-feeds are replaced with a single space, and multiple spaces are reduced to a single space. The string contains only character data; it does not contain any markup.\n */\n\n/**\n *\n * @param {string} string -\n * @returns {FlatString} -\n */\nfunction asFlatString(s) {\n return s.trim().replace(/\\s\\s+/g, \" \");\n}\n\n/**\n *\n * @param node -\n * @param options - These are not optional to prevent accidentally calling it without options in `computeAccessibleName`\n * @returns {boolean} -\n */\nfunction isHidden(node, getComputedStyleImplementation) {\n if (!isElement(node)) {\n return false;\n }\n if (node.hasAttribute(\"hidden\") || node.getAttribute(\"aria-hidden\") === \"true\") {\n return true;\n }\n var style = getComputedStyleImplementation(node);\n return style.getPropertyValue(\"display\") === \"none\" || style.getPropertyValue(\"visibility\") === \"hidden\";\n}\n\n/**\n * @param {Node} node -\n * @returns {boolean} - As defined in step 2E of https://w3c.github.io/accname/#mapping_additional_nd_te\n */\nfunction isControl(node) {\n return hasAnyConcreteRoles(node, [\"button\", \"combobox\", \"listbox\", \"textbox\"]) || hasAbstractRole(node, \"range\");\n}\nfunction hasAbstractRole(node, role) {\n if (!isElement(node)) {\n return false;\n }\n switch (role) {\n case \"range\":\n return hasAnyConcreteRoles(node, [\"meter\", \"progressbar\", \"scrollbar\", \"slider\", \"spinbutton\"]);\n default:\n throw new TypeError(\"No knowledge about abstract role '\".concat(role, \"'. This is likely a bug :(\"));\n }\n}\n\n/**\n * element.querySelectorAll but also considers owned tree\n * @param element\n * @param selectors\n */\nfunction querySelectorAllSubtree(element, selectors) {\n var elements = ArrayFrom(element.querySelectorAll(selectors));\n queryIdRefs(element, \"aria-owns\").forEach(function (root) {\n // babel transpiles this assuming an iterator\n elements.push.apply(elements, ArrayFrom(root.querySelectorAll(selectors)));\n });\n return elements;\n}\nfunction querySelectedOptions(listbox) {\n if (isHTMLSelectElement(listbox)) {\n // IE11 polyfill\n return listbox.selectedOptions || querySelectorAllSubtree(listbox, \"[selected]\");\n }\n return querySelectorAllSubtree(listbox, '[aria-selected=\"true\"]');\n}\nfunction isMarkedPresentational(node) {\n return hasAnyConcreteRoles(node, [\"none\", \"presentation\"]);\n}\n\n/**\n * Elements specifically listed in html-aam\n *\n * We don't need this for `label` or `legend` elements.\n * Their implicit roles already allow \"naming from content\".\n *\n * sources:\n *\n * - https://w3c.github.io/html-aam/#table-element\n */\nfunction isNativeHostLanguageTextAlternativeElement(node) {\n return isHTMLTableCaptionElement(node);\n}\n\n/**\n * https://w3c.github.io/aria/#namefromcontent\n */\nfunction allowsNameFromContent(node) {\n return hasAnyConcreteRoles(node, [\"button\", \"cell\", \"checkbox\", \"columnheader\", \"gridcell\", \"heading\", \"label\", \"legend\", \"link\", \"menuitem\", \"menuitemcheckbox\", \"menuitemradio\", \"option\", \"radio\", \"row\", \"rowheader\", \"switch\", \"tab\", \"tooltip\", \"treeitem\"]);\n}\n\n/**\n * TODO https://github.com/eps1lon/dom-accessibility-api/issues/100\n */\nfunction isDescendantOfNativeHostLanguageTextAlternativeElement(\n// eslint-disable-next-line @typescript-eslint/no-unused-vars -- not implemented yet\nnode) {\n return false;\n}\nfunction getValueOfTextbox(element) {\n if (isHTMLInputElement(element) || isHTMLTextAreaElement(element)) {\n return element.value;\n }\n // https://github.com/eps1lon/dom-accessibility-api/issues/4\n return element.textContent || \"\";\n}\nfunction getTextualContent(declaration) {\n var content = declaration.getPropertyValue(\"content\");\n if (/^[\"'].*[\"']$/.test(content)) {\n return content.slice(1, -1);\n }\n return \"\";\n}\n\n/**\n * https://html.spec.whatwg.org/multipage/forms.html#category-label\n * TODO: form-associated custom elements\n * @param element\n */\nfunction isLabelableElement(element) {\n var localName = getLocalName(element);\n return localName === \"button\" || localName === \"input\" && element.getAttribute(\"type\") !== \"hidden\" || localName === \"meter\" || localName === \"output\" || localName === \"progress\" || localName === \"select\" || localName === \"textarea\";\n}\n\n/**\n * > [...], then the first such descendant in tree order is the label element's labeled control.\n * -- https://html.spec.whatwg.org/multipage/forms.html#labeled-control\n * @param element\n */\nfunction findLabelableElement(element) {\n if (isLabelableElement(element)) {\n return element;\n }\n var labelableElement = null;\n element.childNodes.forEach(function (childNode) {\n if (labelableElement === null && isElement(childNode)) {\n var descendantLabelableElement = findLabelableElement(childNode);\n if (descendantLabelableElement !== null) {\n labelableElement = descendantLabelableElement;\n }\n }\n });\n return labelableElement;\n}\n\n/**\n * Polyfill of HTMLLabelElement.control\n * https://html.spec.whatwg.org/multipage/forms.html#labeled-control\n * @param label\n */\nfunction getControlOfLabel(label) {\n if (label.control !== undefined) {\n return label.control;\n }\n var htmlFor = label.getAttribute(\"for\");\n if (htmlFor !== null) {\n return label.ownerDocument.getElementById(htmlFor);\n }\n return findLabelableElement(label);\n}\n\n/**\n * Polyfill of HTMLInputElement.labels\n * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/labels\n * @param element\n */\nfunction getLabels(element) {\n var labelsProperty = element.labels;\n if (labelsProperty === null) {\n return labelsProperty;\n }\n if (labelsProperty !== undefined) {\n return ArrayFrom(labelsProperty);\n }\n\n // polyfill\n if (!isLabelableElement(element)) {\n return null;\n }\n var document = element.ownerDocument;\n return ArrayFrom(document.querySelectorAll(\"label\")).filter(function (label) {\n return getControlOfLabel(label) === element;\n });\n}\n\n/**\n * Gets the contents of a slot used for computing the accname\n * @param slot\n */\nfunction getSlotContents(slot) {\n // Computing the accessible name for elements containing slots is not\n // currently defined in the spec. This implementation reflects the\n // behavior of NVDA 2020.2/Firefox 81 and iOS VoiceOver/Safari 13.6.\n var assignedNodes = slot.assignedNodes();\n if (assignedNodes.length === 0) {\n // if no nodes are assigned to the slot, it displays the default content\n return ArrayFrom(slot.childNodes);\n }\n return assignedNodes;\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_te\n * @param root\n * @param options\n * @returns\n */\nexport function computeTextAlternative(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var consultedNodes = new SetLike();\n var window = safeWindow(root);\n var _options$compute = options.compute,\n compute = _options$compute === void 0 ? \"name\" : _options$compute,\n _options$computedStyl = options.computedStyleSupportsPseudoElements,\n computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== undefined : _options$computedStyl,\n _options$getComputedS = options.getComputedStyle,\n getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS,\n _options$hidden = options.hidden,\n hidden = _options$hidden === void 0 ? false : _options$hidden;\n\n // 2F.i\n function computeMiscTextAlternative(node, context) {\n var accumulatedText = \"\";\n if (isElement(node) && computedStyleSupportsPseudoElements) {\n var pseudoBefore = getComputedStyle(node, \"::before\");\n var beforeContent = getTextualContent(pseudoBefore);\n accumulatedText = \"\".concat(beforeContent, \" \").concat(accumulatedText);\n }\n\n // FIXME: Including aria-owns is not defined in the spec\n // But it is required in the web-platform-test\n var childNodes = isHTMLSlotElement(node) ? getSlotContents(node) : ArrayFrom(node.childNodes).concat(queryIdRefs(node, \"aria-owns\"));\n childNodes.forEach(function (child) {\n var result = computeTextAlternative(child, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false,\n recursion: true\n });\n // TODO: Unclear why display affects delimiter\n // see https://github.com/w3c/accname/issues/3\n var display = isElement(child) ? getComputedStyle(child).getPropertyValue(\"display\") : \"inline\";\n var separator = display !== \"inline\" ? \" \" : \"\";\n // trailing separator for wpt tests\n accumulatedText += \"\".concat(separator).concat(result).concat(separator);\n });\n if (isElement(node) && computedStyleSupportsPseudoElements) {\n var pseudoAfter = getComputedStyle(node, \"::after\");\n var afterContent = getTextualContent(pseudoAfter);\n accumulatedText = \"\".concat(accumulatedText, \" \").concat(afterContent);\n }\n return accumulatedText.trim();\n }\n\n /**\n *\n * @param element\n * @param attributeName\n * @returns A string non-empty string or `null`\n */\n function useAttribute(element, attributeName) {\n var attribute = element.getAttributeNode(attributeName);\n if (attribute !== null && !consultedNodes.has(attribute) && attribute.value.trim() !== \"\") {\n consultedNodes.add(attribute);\n return attribute.value;\n }\n return null;\n }\n function computeTooltipAttributeValue(node) {\n if (!isElement(node)) {\n return null;\n }\n return useAttribute(node, \"title\");\n }\n function computeElementTextAlternative(node) {\n if (!isElement(node)) {\n return null;\n }\n\n // https://w3c.github.io/html-aam/#fieldset-and-legend-elements\n if (isHTMLFieldSetElement(node)) {\n consultedNodes.add(node);\n var children = ArrayFrom(node.childNodes);\n for (var i = 0; i < children.length; i += 1) {\n var child = children[i];\n if (isHTMLLegendElement(child)) {\n return computeTextAlternative(child, {\n isEmbeddedInLabel: false,\n isReferenced: false,\n recursion: false\n });\n }\n }\n } else if (isHTMLTableElement(node)) {\n // https://w3c.github.io/html-aam/#table-element\n consultedNodes.add(node);\n var _children = ArrayFrom(node.childNodes);\n for (var _i = 0; _i < _children.length; _i += 1) {\n var _child = _children[_i];\n if (isHTMLTableCaptionElement(_child)) {\n return computeTextAlternative(_child, {\n isEmbeddedInLabel: false,\n isReferenced: false,\n recursion: false\n });\n }\n }\n } else if (isSVGSVGElement(node)) {\n // https://www.w3.org/TR/svg-aam-1.0/\n consultedNodes.add(node);\n var _children2 = ArrayFrom(node.childNodes);\n for (var _i2 = 0; _i2 < _children2.length; _i2 += 1) {\n var _child2 = _children2[_i2];\n if (isSVGTitleElement(_child2)) {\n return _child2.textContent;\n }\n }\n return null;\n } else if (getLocalName(node) === \"img\" || getLocalName(node) === \"area\") {\n // https://w3c.github.io/html-aam/#area-element\n // https://w3c.github.io/html-aam/#img-element\n var nameFromAlt = useAttribute(node, \"alt\");\n if (nameFromAlt !== null) {\n return nameFromAlt;\n }\n } else if (isHTMLOptGroupElement(node)) {\n var nameFromLabel = useAttribute(node, \"label\");\n if (nameFromLabel !== null) {\n return nameFromLabel;\n }\n }\n if (isHTMLInputElement(node) && (node.type === \"button\" || node.type === \"submit\" || node.type === \"reset\")) {\n // https://w3c.github.io/html-aam/#input-type-text-input-type-password-input-type-search-input-type-tel-input-type-email-input-type-url-and-textarea-element-accessible-description-computation\n var nameFromValue = useAttribute(node, \"value\");\n if (nameFromValue !== null) {\n return nameFromValue;\n }\n\n // TODO: l10n\n if (node.type === \"submit\") {\n return \"Submit\";\n }\n // TODO: l10n\n if (node.type === \"reset\") {\n return \"Reset\";\n }\n }\n var labels = getLabels(node);\n if (labels !== null && labels.length !== 0) {\n consultedNodes.add(node);\n return ArrayFrom(labels).map(function (element) {\n return computeTextAlternative(element, {\n isEmbeddedInLabel: true,\n isReferenced: false,\n recursion: true\n });\n }).filter(function (label) {\n return label.length > 0;\n }).join(\" \");\n }\n\n // https://w3c.github.io/html-aam/#input-type-image-accessible-name-computation\n // TODO: wpt test consider label elements but html-aam does not mention them\n // We follow existing implementations over spec\n if (isHTMLInputElement(node) && node.type === \"image\") {\n var _nameFromAlt = useAttribute(node, \"alt\");\n if (_nameFromAlt !== null) {\n return _nameFromAlt;\n }\n var nameFromTitle = useAttribute(node, \"title\");\n if (nameFromTitle !== null) {\n return nameFromTitle;\n }\n\n // TODO: l10n\n return \"Submit Query\";\n }\n if (hasAnyConcreteRoles(node, [\"button\"])) {\n // https://www.w3.org/TR/html-aam-1.0/#button-element\n var nameFromSubTree = computeMiscTextAlternative(node, {\n isEmbeddedInLabel: false,\n isReferenced: false\n });\n if (nameFromSubTree !== \"\") {\n return nameFromSubTree;\n }\n }\n return null;\n }\n function computeTextAlternative(current, context) {\n if (consultedNodes.has(current)) {\n return \"\";\n }\n\n // 2A\n if (!hidden && isHidden(current, getComputedStyle) && !context.isReferenced) {\n consultedNodes.add(current);\n return \"\";\n }\n\n // 2B\n var labelAttributeNode = isElement(current) ? current.getAttributeNode(\"aria-labelledby\") : null;\n // TODO: Do we generally need to block query IdRefs of attributes we have already consulted?\n var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs(current, \"aria-labelledby\") : [];\n if (compute === \"name\" && !context.isReferenced && labelElements.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- Can't be null here otherwise labelElements would be empty\n consultedNodes.add(labelAttributeNode);\n return labelElements.map(function (element) {\n // TODO: Chrome will consider repeated values i.e. use a node multiple times while we'll bail out in computeTextAlternative.\n return computeTextAlternative(element, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: true,\n // this isn't recursion as specified, otherwise we would skip\n // `aria-label` in\n // <input id=\"myself\" aria-label=\"foo\" aria-labelledby=\"myself\"\n recursion: false\n });\n }).join(\" \");\n }\n\n // 2C\n // Changed from the spec in anticipation of https://github.com/w3c/accname/issues/64\n // spec says we should only consider skipping if we have a non-empty label\n var skipToStep2E = context.recursion && isControl(current) && compute === \"name\";\n if (!skipToStep2E) {\n var ariaLabel = (isElement(current) && current.getAttribute(\"aria-label\") || \"\").trim();\n if (ariaLabel !== \"\" && compute === \"name\") {\n consultedNodes.add(current);\n return ariaLabel;\n }\n\n // 2D\n if (!isMarkedPresentational(current)) {\n var elementTextAlternative = computeElementTextAlternative(current);\n if (elementTextAlternative !== null) {\n consultedNodes.add(current);\n return elementTextAlternative;\n }\n }\n }\n\n // special casing, cheating to make tests pass\n // https://github.com/w3c/accname/issues/67\n if (hasAnyConcreteRoles(current, [\"menu\"])) {\n consultedNodes.add(current);\n return \"\";\n }\n\n // 2E\n if (skipToStep2E || context.isEmbeddedInLabel || context.isReferenced) {\n if (hasAnyConcreteRoles(current, [\"combobox\", \"listbox\"])) {\n consultedNodes.add(current);\n var selectedOptions = querySelectedOptions(current);\n if (selectedOptions.length === 0) {\n // defined per test `name_heading_combobox`\n return isHTMLInputElement(current) ? current.value : \"\";\n }\n return ArrayFrom(selectedOptions).map(function (selectedOption) {\n return computeTextAlternative(selectedOption, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false,\n recursion: true\n });\n }).join(\" \");\n }\n if (hasAbstractRole(current, \"range\")) {\n consultedNodes.add(current);\n if (current.hasAttribute(\"aria-valuetext\")) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard\n return current.getAttribute(\"aria-valuetext\");\n }\n if (current.hasAttribute(\"aria-valuenow\")) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- safe due to hasAttribute guard\n return current.getAttribute(\"aria-valuenow\");\n }\n // Otherwise, use the value as specified by a host language attribute.\n return current.getAttribute(\"value\") || \"\";\n }\n if (hasAnyConcreteRoles(current, [\"textbox\"])) {\n consultedNodes.add(current);\n return getValueOfTextbox(current);\n }\n }\n\n // 2F: https://w3c.github.io/accname/#step2F\n if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {\n var accumulatedText2F = computeMiscTextAlternative(current, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false\n });\n if (accumulatedText2F !== \"\") {\n consultedNodes.add(current);\n return accumulatedText2F;\n }\n }\n if (current.nodeType === current.TEXT_NODE) {\n consultedNodes.add(current);\n return current.textContent || \"\";\n }\n if (context.recursion) {\n consultedNodes.add(current);\n return computeMiscTextAlternative(current, {\n isEmbeddedInLabel: context.isEmbeddedInLabel,\n isReferenced: false\n });\n }\n var tooltipAttributeValue = computeTooltipAttributeValue(current);\n if (tooltipAttributeValue !== null) {\n consultedNodes.add(current);\n return tooltipAttributeValue;\n }\n\n // TODO should this be reachable?\n consultedNodes.add(current);\n return \"\";\n }\n return asFlatString(computeTextAlternative(root, {\n isEmbeddedInLabel: false,\n // by spec computeAccessibleDescription starts with the referenced elements as roots\n isReferenced: compute === \"description\",\n recursion: false\n }));\n}\n//# sourceMappingURL=accessible-name-and-description.mjs.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { computeTextAlternative } from \"./accessible-name-and-description.mjs\";\nimport { queryIdRefs } from \"./util.mjs\";\n\n/**\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleDescription(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var description = queryIdRefs(root, \"aria-describedby\").map(function (element) {\n return computeTextAlternative(element, _objectSpread(_objectSpread({}, options), {}, {\n compute: \"description\"\n }));\n }).join(\" \");\n\n // TODO: Technically we need to make sure that node wasn't used for the accessible name\n // This causes `description_1.0_combobox-focusable-manual` to fail\n //\n // https://www.w3.org/TR/html-aam-1.0/#accessible-name-and-description-computation\n // says for so many elements to use the `title` that we assume all elements are considered\n if (description === \"\") {\n var title = root.getAttribute(\"title\");\n description = title === null ? \"\" : title;\n }\n return description;\n}\n//# sourceMappingURL=accessible-description.mjs.map","import { computeTextAlternative } from \"./accessible-name-and-description.mjs\";\nimport { hasAnyConcreteRoles } from \"./util.mjs\";\n\n/**\n * https://w3c.github.io/aria/#namefromprohibited\n */\nfunction prohibitsNaming(node) {\n return hasAnyConcreteRoles(node, [\"caption\", \"code\", \"deletion\", \"emphasis\", \"generic\", \"insertion\", \"paragraph\", \"presentation\", \"strong\", \"subscript\", \"superscript\"]);\n}\n\n/**\n * implements https://w3c.github.io/accname/#mapping_additional_nd_name\n * @param root\n * @param options\n * @returns\n */\nexport function computeAccessibleName(root) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (prohibitsNaming(root)) {\n return \"\";\n }\n return computeTextAlternative(root, options);\n}\n//# sourceMappingURL=accessible-name.mjs.map","export { computeAccessibleDescription } from \"./accessible-description.mjs\";\nexport { computeAccessibleName } from \"./accessible-name.mjs\";\nexport { default as getRole } from \"./getRole.mjs\";\nexport * from \"./is-inaccessible.mjs\";\n//# sourceMappingURL=index.mjs.map","import * as prettyFormat from 'pretty-format';\nexport { prettyFormat };\nimport { computeAccessibleName, computeAccessibleDescription } from 'dom-accessibility-api';\nimport { elementRoles, roles, roleElements } from 'aria-query';\nimport lzString from 'lz-string';\n\n/**\n * Source: https://github.com/facebook/jest/blob/e7bb6a1e26ffab90611b2593912df15b69315611/packages/pretty-format/src/plugins/DOMElement.ts\n */\n/* eslint-disable -- trying to stay as close to the original as possible */\n/* istanbul ignore file */\n\nfunction escapeHTML(str) {\n return str.replace(/</g, '<').replace(/>/g, '>');\n}\n// Return empty string if keys is empty.\nconst printProps = (keys, props, config, indentation, depth, refs, printer) => {\n const indentationNext = indentation + config.indent;\n const colors = config.colors;\n return keys.map(key => {\n const value = props[key];\n let printed = printer(value, config, indentationNext, depth, refs);\n if (typeof value !== 'string') {\n if (printed.indexOf('\\n') !== -1) {\n printed = config.spacingOuter + indentationNext + printed + config.spacingOuter + indentation;\n }\n printed = '{' + printed + '}';\n }\n return config.spacingInner + indentation + colors.prop.open + key + colors.prop.close + '=' + colors.value.open + printed + colors.value.close;\n }).join('');\n};\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants\nconst NodeTypeTextNode = 3;\n\n// Return empty string if children is empty.\nconst printChildren = (children, config, indentation, depth, refs, printer) => children.map(child => {\n const printedChild = typeof child === 'string' ? printText(child, config) : printer(child, config, indentation, depth, refs);\n if (printedChild === '' && typeof child === 'object' && child !== null && child.nodeType !== NodeTypeTextNode) {\n // A plugin serialized this Node to '' meaning we should ignore it.\n return '';\n }\n return config.spacingOuter + indentation + printedChild;\n}).join('');\nconst printText = (text, config) => {\n const contentColor = config.colors.content;\n return contentColor.open + escapeHTML(text) + contentColor.close;\n};\nconst printComment = (comment, config) => {\n const commentColor = config.colors.comment;\n return commentColor.open + '<!--' + escapeHTML(comment) + '-->' + commentColor.close;\n};\n\n// Separate the functions to format props, children, and element,\n// so a plugin could override a particular function, if needed.\n// Too bad, so sad: the traditional (but unnecessary) space\n// in a self-closing tagColor requires a second test of printedProps.\nconst printElement = (type, printedProps, printedChildren, config, indentation) => {\n const tagColor = config.colors.tag;\n return tagColor.open + '<' + type + (printedProps && tagColor.close + printedProps + config.spacingOuter + indentation + tagColor.open) + (printedChildren ? '>' + tagColor.close + printedChildren + config.spacingOuter + indentation + tagColor.open + '</' + type : (printedProps && !config.min ? '' : ' ') + '/') + '>' + tagColor.close;\n};\nconst printElementAsLeaf = (type, config) => {\n const tagColor = config.colors.tag;\n return tagColor.open + '<' + type + tagColor.close + ' …' + tagColor.open + ' />' + tagColor.close;\n};\nconst ELEMENT_NODE$1 = 1;\nconst TEXT_NODE$1 = 3;\nconst COMMENT_NODE$1 = 8;\nconst FRAGMENT_NODE = 11;\nconst ELEMENT_REGEXP = /^((HTML|SVG)\\w*)?Element$/;\nconst isCustomElement = val => {\n const {\n tagName\n } = val;\n return Boolean(typeof tagName === 'string' && tagName.includes('-') || typeof val.hasAttribute === 'function' && val.hasAttribute('is'));\n};\nconst testNode = val => {\n const constructorName = val.constructor.name;\n const {\n nodeType\n } = val;\n return nodeType === ELEMENT_NODE$1 && (ELEMENT_REGEXP.test(constructorName) || isCustomElement(val)) || nodeType === TEXT_NODE$1 && constructorName === 'Text' || nodeType === COMMENT_NODE$1 && constructorName === 'Comment' || nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment';\n};\nfunction nodeIsText(node) {\n return node.nodeType === TEXT_NODE$1;\n}\nfunction nodeIsComment(node) {\n return node.nodeType === COMMENT_NODE$1;\n}\nfunction nodeIsFragment(node) {\n return node.nodeType === FRAGMENT_NODE;\n}\nfunction createDOMElementFilter(filterNode) {\n return {\n test: val => {\n var _val$constructor2;\n return ((val == null || (_val$constructor2 = val.constructor) == null ? void 0 : _val$constructor2.name) || isCustomElement(val)) && testNode(val);\n },\n serialize: (node, config, indentation, depth, refs, printer) => {\n if (nodeIsText(node)) {\n return printText(node.data, config);\n }\n if (nodeIsComment(node)) {\n return printComment(node.data, config);\n }\n const type = nodeIsFragment(node) ? \"DocumentFragment\" : node.tagName.toLowerCase();\n if (++depth > config.maxDepth) {\n return printElementAsLeaf(type, config);\n }\n return printElement(type, printProps(nodeIsFragment(node) ? [] : Array.from(node.attributes).map(attr => attr.name).sort(), nodeIsFragment(node) ? {} : Array.from(node.attributes).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {}), config, indentation + config.indent, depth, refs, printer), printChildren(Array.prototype.slice.call(node.childNodes || node.children).filter(filterNode), config, indentation + config.indent, depth, refs, printer), config, indentation);\n }\n };\n}\n\n// We try to load node dependencies\nlet chalk = null;\nlet readFileSync = null;\nlet codeFrameColumns = null;\ntry {\n const nodeRequire = module && module.require;\n readFileSync = nodeRequire.call(module, 'fs').readFileSync;\n codeFrameColumns = nodeRequire.call(module, '@babel/code-frame').codeFrameColumns;\n chalk = nodeRequire.call(module, 'chalk');\n} catch {\n // We're in a browser environment\n}\n\n// frame has the form \"at myMethod (location/to/my/file.js:10:2)\"\nfunction getCodeFrame(frame) {\n const locationStart = frame.indexOf('(') + 1;\n const locationEnd = frame.indexOf(')');\n const frameLocation = frame.slice(locationStart, locationEnd);\n const frameLocationElements = frameLocation.split(':');\n const [filename, line, column] = [frameLocationElements[0], parseInt(frameLocationElements[1], 10), parseInt(frameLocationElements[2], 10)];\n let rawFileContents = '';\n try {\n rawFileContents = readFileSync(filename, 'utf-8');\n } catch {\n return '';\n }\n const codeFrame = codeFrameColumns(rawFileContents, {\n start: {\n line,\n column\n }\n }, {\n highlightCode: true,\n linesBelow: 0\n });\n return chalk.dim(frameLocation) + \"\\n\" + codeFrame + \"\\n\";\n}\nfunction getUserCodeFrame() {\n // If we couldn't load dependencies, we can't generate the user trace\n /* istanbul ignore next */\n if (!readFileSync || !codeFrameColumns) {\n return '';\n }\n const err = new Error();\n const firstClientCodeFrame = err.stack.split('\\n').slice(1) // Remove first line which has the form \"Error: TypeError\"\n .find(frame => !frame.includes('node_modules/')); // Ignore frames from 3rd party libraries\n\n return getCodeFrame(firstClientCodeFrame);\n}\n\n// Constant node.nodeType for text nodes, see:\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#Node_type_constants\nconst TEXT_NODE = 3;\nfunction jestFakeTimersAreEnabled() {\n /* istanbul ignore else */\n // eslint-disable-next-line\n if (typeof jest !== 'undefined' && jest !== null) {\n return (\n // legacy timers\n setTimeout._isMockFunction === true ||\n // modern timers\n // eslint-disable-next-line prefer-object-has-own -- not supported by our support matrix\n Object.prototype.hasOwnProperty.call(setTimeout, 'clock')\n );\n }\n // istanbul ignore next\n return false;\n}\nfunction getDocument() {\n /* istanbul ignore if */\n if (typeof window === 'undefined') {\n throw new Error('Could not find default container');\n }\n return window.document;\n}\nfunction getWindowFromNode(node) {\n if (node.defaultView) {\n // node is document\n return node.defaultView;\n } else if (node.ownerDocument && node.ownerDocument.defaultView) {\n // node is a DOM node\n return node.ownerDocument.defaultView;\n } else if (node.window) {\n // node is window\n return node.window;\n } else if (node.ownerDocument && node.ownerDocument.defaultView === null) {\n throw new Error(\"It looks like the window object is not available for the provided node.\");\n } else if (node.then instanceof Function) {\n throw new Error(\"It looks like you passed a Promise object instead of a DOM node. Did you do something like `fireEvent.click(screen.findBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`, or await the findBy query `fireEvent.click(await screen.findBy...`?\");\n } else if (Array.isArray(node)) {\n throw new Error(\"It looks like you passed an Array instead of a DOM node. Did you do something like `fireEvent.click(screen.getAllBy...` when you meant to use a `getBy` query `fireEvent.click(screen.getBy...`?\");\n } else if (typeof node.debug === 'function' && typeof node.logTestingPlaygroundURL === 'function') {\n throw new Error(\"It looks like you passed a `screen` object. Did you do something like `fireEvent.click(screen, ...` when you meant to use a query, e.g. `fireEvent.click(screen.getBy..., `?\");\n } else {\n // The user passed something unusual to a calling function\n throw new Error(\"The given node is not an Element, the node type is: \" + typeof node + \".\");\n }\n}\nfunction checkContainerType(container) {\n if (!container || !(typeof container.querySelector === 'function') || !(typeof container.querySelectorAll === 'function')) {\n throw new TypeError(\"Expected container to be an Element, a Document or a DocumentFragment but got \" + getTypeName(container) + \".\");\n }\n function getTypeName(object) {\n if (typeof object === 'object') {\n return object === null ? 'null' : object.constructor.name;\n }\n return typeof object;\n }\n}\n\nconst shouldHighlight = () => {\n if (typeof process === 'undefined') {\n // Don't colorize in non-node environments (e.g. Browsers)\n return false;\n }\n let colors;\n // Try to safely parse env COLORS: We will default behavior if any step fails.\n try {\n var _process$env;\n const colorsJSON = (_process$env = process.env) == null ? void 0 : _process$env.COLORS;\n if (colorsJSON) {\n colors = JSON.parse(colorsJSON);\n }\n } catch {\n // If this throws, process.env?.COLORS wasn't parsable. Since we only\n // care about `true` or `false`, we can safely ignore the error.\n }\n if (typeof colors === 'boolean') {\n // If `colors` is set explicitly (both `true` and `false`), use that value.\n return colors;\n } else {\n // If `colors` is not set, colorize if we're in node.\n return process.versions !== undefined && process.versions.node !== undefined;\n }\n};\nconst {\n DOMCollection\n} = prettyFormat.plugins;\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeType#node_type_constants\nconst ELEMENT_NODE = 1;\nconst COMMENT_NODE = 8;\n\n// https://github.com/facebook/jest/blob/615084195ae1ae61ddd56162c62bbdda17587569/packages/pretty-format/src/plugins/DOMElement.ts#L50\nfunction filterCommentsAndDefaultIgnoreTagsTags(value) {\n return value.nodeType !== COMMENT_NODE && (value.nodeType !== ELEMENT_NODE || !value.matches(getConfig().defaultIgnore));\n}\nfunction prettyDOM(dom, maxLength, options) {\n if (options === void 0) {\n options = {};\n }\n if (!dom) {\n dom = getDocument().body;\n }\n if (typeof maxLength !== 'number') {\n maxLength = typeof process !== 'undefined' && typeof process.env !== 'undefined' && process.env.DEBUG_PRINT_LIMIT || 7000;\n }\n if (maxLength === 0) {\n return '';\n }\n if (dom.documentElement) {\n dom = dom.documentElement;\n }\n let domTypeName = typeof dom;\n if (domTypeName === 'object') {\n domTypeName = dom.constructor.name;\n } else {\n // To don't fall with `in` operator\n dom = {};\n }\n if (!('outerHTML' in dom)) {\n throw new TypeError(\"Expected an element or document but got \" + domTypeName);\n }\n const {\n filterNode = filterCommentsAndDefaultIgnoreTagsTags,\n ...prettyFormatOptions\n } = options;\n const debugContent = prettyFormat.format(dom, {\n plugins: [createDOMElementFilter(filterNode), DOMCollection],\n printFunctionName: false,\n highlight: shouldHighlight(),\n ...prettyFormatOptions\n });\n return maxLength !== undefined && dom.outerHTML.length > maxLength ? debugContent.slice(0, maxLength) + \"...\" : debugContent;\n}\nconst logDOM = function () {\n const userCodeFrame = getUserCodeFrame();\n if (userCodeFrame) {\n console.log(prettyDOM(...arguments) + \"\\n\\n\" + userCodeFrame);\n } else {\n console.log(prettyDOM(...arguments));\n }\n};\n\n// It would be cleaner for this to live inside './queries', but\n// other parts of the code assume that all exports from\n// './queries' are query functions.\nlet config = {\n testIdAttribute: 'data-testid',\n asyncUtilTimeout: 1000,\n // asyncWrapper and advanceTimersWrapper is to support React's async `act` function.\n // forcing react-testing-library to wrap all async functions would've been\n // a total nightmare (consider wrapping every findBy* query and then also\n // updating `within` so those would be wrapped too. Total nightmare).\n // so we have this config option that's really only intended for\n // react-testing-library to use. For that reason, this feature will remain\n // undocumented.\n asyncWrapper: cb => cb(),\n unstable_advanceTimersWrapper: cb => cb(),\n eventWrapper: cb => cb(),\n // default value for the `hidden` option in `ByRole` queries\n defaultHidden: false,\n // default value for the `ignore` option in `ByText` queries\n defaultIgnore: 'script, style',\n // showOriginalStackTrace flag to show the full error stack traces for async errors\n showOriginalStackTrace: false,\n // throw errors w/ suggestions for better queries. Opt in so off by default.\n throwSuggestions: false,\n // called when getBy* queries fail. (message, container) => Error\n getElementError(message, container) {\n const prettifiedDOM = prettyDOM(container);\n const error = new Error([message, \"Ignored nodes: comments, \" + config.defaultIgnore + \"\\n\" + prettifiedDOM].filter(Boolean).join('\\n\\n'));\n error.name = 'TestingLibraryElementError';\n return error;\n },\n _disableExpensiveErrorDiagnostics: false,\n computedStyleSupportsPseudoElements: false\n};\nfunction runWithExpensiveErrorDiagnosticsDisabled(callback) {\n try {\n config._disableExpensiveErrorDiagnostics = true;\n return callback();\n } finally {\n config._disableExpensiveErrorDiagnostics = false;\n }\n}\nfunction configure(newConfig) {\n if (typeof newConfig === 'function') {\n // Pass the existing config out to the provided function\n // and accept a delta in return\n newConfig = newConfig(config);\n }\n\n // Merge the incoming config delta\n config = {\n ...config,\n ...newConfig\n };\n}\nfunction getConfig() {\n return config;\n}\n\nconst labelledNodeNames = ['button', 'meter', 'output', 'progress', 'select', 'textarea', 'input'];\nfunction getTextContent(node) {\n if (labelledNodeNames.includes(node.nodeName.toLowerCase())) {\n return '';\n }\n if (node.nodeType === TEXT_NODE) return node.textContent;\n return Array.from(node.childNodes).map(childNode => getTextContent(childNode)).join('');\n}\nfunction getLabelContent(element) {\n let textContent;\n if (element.tagName.toLowerCase() === 'label') {\n textContent = getTextContent(element);\n } else {\n textContent = element.value || element.textContent;\n }\n return textContent;\n}\n\n// Based on https://github.com/eps1lon/dom-accessibility-api/pull/352\nfunction getRealLabels(element) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- types are not aware of older browsers that don't implement `labels`\n if (element.labels !== undefined) {\n var _labels;\n return (_labels = element.labels) != null ? _labels : [];\n }\n if (!isLabelable(element)) return [];\n const labels = element.ownerDocument.querySelectorAll('label');\n return Array.from(labels).filter(label => label.control === element);\n}\nfunction isLabelable(element) {\n return /BUTTON|METER|OUTPUT|PROGRESS|SELECT|TEXTAREA/.test(element.tagName) || element.tagName === 'INPUT' && element.getAttribute('type') !== 'hidden';\n}\nfunction getLabels(container, element, _temp) {\n let {\n selector = '*'\n } = _temp === void 0 ? {} : _temp;\n const ariaLabelledBy = element.getAttribute('aria-labelledby');\n const labelsId = ariaLabelledBy ? ariaLabelledBy.split(' ') : [];\n return labelsId.length ? labelsId.map(labelId => {\n const labellingElement = container.querySelector(\"[id=\\\"\" + labelId + \"\\\"]\");\n return labellingElement ? {\n content: getLabelContent(labellingElement),\n formControl: null\n } : {\n content: '',\n formControl: null\n };\n }) : Array.from(getRealLabels(element)).map(label => {\n const textToMatch = getLabelContent(label);\n const formControlSelector = 'button, input, meter, output, progress, select, textarea';\n const labelledFormControl = Array.from(label.querySelectorAll(formControlSelector)).filter(formControlElement => formControlElement.matches(selector))[0];\n return {\n content: textToMatch,\n formControl: labelledFormControl\n };\n });\n}\n\nfunction assertNotNullOrUndefined(matcher) {\n if (matcher === null || matcher === undefined) {\n throw new Error( // eslint-disable-next-line @typescript-eslint/restrict-template-expressions -- implicitly converting `T` to `string`\n \"It looks like \" + matcher + \" was passed instead of a matcher. Did you do something like getByText(\" + matcher + \")?\");\n }\n}\nfunction fuzzyMatches(textToMatch, node, matcher, normalizer) {\n if (typeof textToMatch !== 'string') {\n return false;\n }\n assertNotNullOrUndefined(matcher);\n const normalizedText = normalizer(textToMatch);\n if (typeof matcher === 'string' || typeof matcher === 'number') {\n return normalizedText.toLowerCase().includes(matcher.toString().toLowerCase());\n } else if (typeof matcher === 'function') {\n return matcher(normalizedText, node);\n } else {\n return matchRegExp(matcher, normalizedText);\n }\n}\nfunction matches(textToMatch, node, matcher, normalizer) {\n if (typeof textToMatch !== 'string') {\n return false;\n }\n assertNotNullOrUndefined(matcher);\n const normalizedText = normalizer(textToMatch);\n if (matcher instanceof Function) {\n return matcher(normalizedText, node);\n } else if (matcher instanceof RegExp) {\n return matchRegExp(matcher, normalizedText);\n } else {\n return normalizedText === String(matcher);\n }\n}\nfunction getDefaultNormalizer(_temp) {\n let {\n trim = true,\n collapseWhitespace = true\n } = _temp === void 0 ? {} : _temp;\n return text => {\n let normalizedText = text;\n normalizedText = trim ? normalizedText.trim() : normalizedText;\n normalizedText = collapseWhitespace ? normalizedText.replace(/\\s+/g, ' ') : normalizedText;\n return normalizedText;\n };\n}\n\n/**\n * Constructs a normalizer to pass to functions in matches.js\n * @param {boolean|undefined} trim The user-specified value for `trim`, without\n * any defaulting having been applied\n * @param {boolean|undefined} collapseWhitespace The user-specified value for\n * `collapseWhitespace`, without any defaulting having been applied\n * @param {Function|undefined} normalizer The user-specified normalizer\n * @returns {Function} A normalizer\n */\n\nfunction makeNormalizer(_ref) {\n let {\n trim,\n collapseWhitespace,\n normalizer\n } = _ref;\n if (!normalizer) {\n // No custom normalizer specified. Just use default.\n return getDefaultNormalizer({\n trim,\n collapseWhitespace\n });\n }\n if (typeof trim !== 'undefined' || typeof collapseWhitespace !== 'undefined') {\n // They've also specified a value for trim or collapseWhitespace\n throw new Error('trim and collapseWhitespace are not supported with a normalizer. ' + 'If you want to use the default trim and collapseWhitespace logic in your normalizer, ' + 'use \"getDefaultNormalizer({trim, collapseWhitespace})\" and compose that into your normalizer');\n }\n return normalizer;\n}\nfunction matchRegExp(matcher, text) {\n const match = matcher.test(text);\n if (matcher.global && matcher.lastIndex !== 0) {\n console.warn(\"To match all elements we had to reset the lastIndex of the RegExp because the global flag is enabled. We encourage to remove the global flag from the RegExp.\");\n matcher.lastIndex = 0;\n }\n return match;\n}\n\nfunction getNodeText(node) {\n if (node.matches('input[type=submit], input[type=button], input[type=reset]')) {\n return node.value;\n }\n return Array.from(node.childNodes).filter(child => child.nodeType === TEXT_NODE && Boolean(child.textContent)).map(c => c.textContent).join('');\n}\n\nconst elementRoleList = buildElementRoleList(elementRoles);\n\n/**\n * @param {Element} element -\n * @returns {boolean} - `true` if `element` and its subtree are inaccessible\n */\nfunction isSubtreeInaccessible(element) {\n if (element.hidden === true) {\n return true;\n }\n if (element.getAttribute('aria-hidden') === 'true') {\n return true;\n }\n const window = element.ownerDocument.defaultView;\n if (window.getComputedStyle(element).display === 'none') {\n return true;\n }\n return false;\n}\n\n/**\n * Partial implementation https://www.w3.org/TR/wai-aria-1.2/#tree_exclusion\n * which should only be used for elements with a non-presentational role i.e.\n * `role=\"none\"` and `role=\"presentation\"` will not be excluded.\n *\n * Implements aria-hidden semantics (i.e. parent overrides child)\n * Ignores \"Child Presentational: True\" characteristics\n *\n * @param {Element} element -\n * @param {object} [options] -\n * @param {function (element: Element): boolean} options.isSubtreeInaccessible -\n * can be used to return cached results from previous isSubtreeInaccessible calls\n * @returns {boolean} true if excluded, otherwise false\n */\nfunction isInaccessible(element, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n isSubtreeInaccessible: isSubtreeInaccessibleImpl = isSubtreeInaccessible\n } = options;\n const window = element.ownerDocument.defaultView;\n // since visibility is inherited we can exit early\n if (window.getComputedStyle(element).visibility === 'hidden') {\n return true;\n }\n let currentElement = element;\n while (currentElement) {\n if (isSubtreeInaccessibleImpl(currentElement)) {\n return true;\n }\n currentElement = currentElement.parentElement;\n }\n return false;\n}\nfunction getImplicitAriaRoles(currentNode) {\n // eslint bug here:\n // eslint-disable-next-line no-unused-vars\n for (const {\n match,\n roles\n } of elementRoleList) {\n if (match(currentNode)) {\n return [...roles];\n }\n }\n return [];\n}\nfunction buildElementRoleList(elementRolesMap) {\n function makeElementSelector(_ref) {\n let {\n name,\n attributes\n } = _ref;\n return \"\" + name + attributes.map(_ref2 => {\n let {\n name: attributeName,\n value,\n constraints = []\n } = _ref2;\n const shouldNotExist = constraints.indexOf('undefined') !== -1;\n const shouldBeNonEmpty = constraints.indexOf('set') !== -1;\n const hasExplicitValue = typeof value !== 'undefined';\n if (hasExplicitValue) {\n return \"[\" + attributeName + \"=\\\"\" + value + \"\\\"]\";\n } else if (shouldNotExist) {\n return \":not([\" + attributeName + \"])\";\n } else if (shouldBeNonEmpty) {\n return \"[\" + attributeName + \"]:not([\" + attributeName + \"=\\\"\\\"])\";\n }\n return \"[\" + attributeName + \"]\";\n }).join('');\n }\n function getSelectorSpecificity(_ref3) {\n let {\n attributes = []\n } = _ref3;\n return attributes.length;\n }\n function bySelectorSpecificity(_ref4, _ref5) {\n let {\n specificity: leftSpecificity\n } = _ref4;\n let {\n specificity: rightSpecificity\n } = _ref5;\n return rightSpecificity - leftSpecificity;\n }\n function match(element) {\n let {\n attributes = []\n } = element;\n\n // https://github.com/testing-library/dom-testing-library/issues/814\n const typeTextIndex = attributes.findIndex(attribute => attribute.value && attribute.name === 'type' && attribute.value === 'text');\n if (typeTextIndex >= 0) {\n // not using splice to not mutate the attributes array\n attributes = [...attributes.slice(0, typeTextIndex), ...attributes.slice(typeTextIndex + 1)];\n }\n const selector = makeElementSelector({\n ...element,\n attributes\n });\n return node => {\n if (typeTextIndex >= 0 && node.type !== 'text') {\n return false;\n }\n return node.matches(selector);\n };\n }\n let result = [];\n\n // eslint bug here:\n // eslint-disable-next-line no-unused-vars\n for (const [element, roles] of elementRolesMap.entries()) {\n result = [...result, {\n match: match(element),\n roles: Array.from(roles),\n specificity: getSelectorSpecificity(element)\n }];\n }\n return result.sort(bySelectorSpecificity);\n}\nfunction getRoles(container, _temp) {\n let {\n hidden = false\n } = _temp === void 0 ? {} : _temp;\n function flattenDOM(node) {\n return [node, ...Array.from(node.children).reduce((acc, child) => [...acc, ...flattenDOM(child)], [])];\n }\n return flattenDOM(container).filter(element => {\n return hidden === false ? isInaccessible(element) === false : true;\n }).reduce((acc, node) => {\n let roles = [];\n // TODO: This violates html-aria which does not allow any role on every element\n if (node.hasAttribute('role')) {\n roles = node.getAttribute('role').split(' ').slice(0, 1);\n } else {\n roles = getImplicitAriaRoles(node);\n }\n return roles.reduce((rolesAcc, role) => Array.isArray(rolesAcc[role]) ? {\n ...rolesAcc,\n [role]: [...rolesAcc[role], node]\n } : {\n ...rolesAcc,\n [role]: [node]\n }, acc);\n }, {});\n}\nfunction prettyRoles(dom, _ref6) {\n let {\n hidden,\n includeDescription\n } = _ref6;\n const roles = getRoles(dom, {\n hidden\n });\n // We prefer to skip generic role, we don't recommend it\n return Object.entries(roles).filter(_ref7 => {\n let [role] = _ref7;\n return role !== 'generic';\n }).map(_ref8 => {\n let [role, elements] = _ref8;\n const delimiterBar = '-'.repeat(50);\n const elementsString = elements.map(el => {\n const nameString = \"Name \\\"\" + computeAccessibleName(el, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }) + \"\\\":\\n\";\n const domString = prettyDOM(el.cloneNode(false));\n if (includeDescription) {\n const descriptionString = \"Description \\\"\" + computeAccessibleDescription(el, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }) + \"\\\":\\n\";\n return \"\" + nameString + descriptionString + domString;\n }\n return \"\" + nameString + domString;\n }).join('\\n\\n');\n return role + \":\\n\\n\" + elementsString + \"\\n\\n\" + delimiterBar;\n }).join('\\n');\n}\nconst logRoles = function (dom, _temp2) {\n let {\n hidden = false\n } = _temp2 === void 0 ? {} : _temp2;\n return console.log(prettyRoles(dom, {\n hidden\n }));\n};\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)selected, undefined if not selectable\n */\nfunction computeAriaSelected(element) {\n // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings\n // https://www.w3.org/TR/html-aam-1.0/#details-id-97\n if (element.tagName === 'OPTION') {\n return element.selected;\n }\n\n // explicit value\n return checkBooleanAttribute(element, 'aria-selected');\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean} -\n */\nfunction computeAriaBusy(element) {\n // https://www.w3.org/TR/wai-aria-1.1/#aria-busy\n return element.getAttribute('aria-busy') === 'true';\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)checked, undefined if not checked-able\n */\nfunction computeAriaChecked(element) {\n // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings\n // https://www.w3.org/TR/html-aam-1.0/#details-id-56\n // https://www.w3.org/TR/html-aam-1.0/#details-id-67\n if ('indeterminate' in element && element.indeterminate) {\n return undefined;\n }\n if ('checked' in element) {\n return element.checked;\n }\n\n // explicit value\n return checkBooleanAttribute(element, 'aria-checked');\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)pressed, undefined if not press-able\n */\nfunction computeAriaPressed(element) {\n // https://www.w3.org/TR/wai-aria-1.1/#aria-pressed\n return checkBooleanAttribute(element, 'aria-pressed');\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | string | null} -\n */\nfunction computeAriaCurrent(element) {\n var _ref9, _checkBooleanAttribut;\n // https://www.w3.org/TR/wai-aria-1.1/#aria-current\n return (_ref9 = (_checkBooleanAttribut = checkBooleanAttribute(element, 'aria-current')) != null ? _checkBooleanAttribut : element.getAttribute('aria-current')) != null ? _ref9 : false;\n}\n\n/**\n * @param {Element} element -\n * @returns {boolean | undefined} - false/true if (not)expanded, undefined if not expand-able\n */\nfunction computeAriaExpanded(element) {\n // https://www.w3.org/TR/wai-aria-1.1/#aria-expanded\n return checkBooleanAttribute(element, 'aria-expanded');\n}\nfunction checkBooleanAttribute(element, attribute) {\n const attributeValue = element.getAttribute(attribute);\n if (attributeValue === 'true') {\n return true;\n }\n if (attributeValue === 'false') {\n return false;\n }\n return undefined;\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} - number if implicit heading or aria-level present, otherwise undefined\n */\nfunction computeHeadingLevel(element) {\n // https://w3c.github.io/html-aam/#el-h1-h6\n // https://w3c.github.io/html-aam/#el-h1-h6\n const implicitHeadingLevels = {\n H1: 1,\n H2: 2,\n H3: 3,\n H4: 4,\n H5: 5,\n H6: 6\n };\n // explicit aria-level value\n // https://www.w3.org/TR/wai-aria-1.2/#aria-level\n const ariaLevelAttribute = element.getAttribute('aria-level') && Number(element.getAttribute('aria-level'));\n return ariaLevelAttribute || implicitHeadingLevels[element.tagName];\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} -\n */\nfunction computeAriaValueNow(element) {\n const valueNow = element.getAttribute('aria-valuenow');\n return valueNow === null ? undefined : +valueNow;\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} -\n */\nfunction computeAriaValueMax(element) {\n const valueMax = element.getAttribute('aria-valuemax');\n return valueMax === null ? undefined : +valueMax;\n}\n\n/**\n * @param {Element} element -\n * @returns {number | undefined} -\n */\nfunction computeAriaValueMin(element) {\n const valueMin = element.getAttribute('aria-valuemin');\n return valueMin === null ? undefined : +valueMin;\n}\n\n/**\n * @param {Element} element -\n * @returns {string | undefined} -\n */\nfunction computeAriaValueText(element) {\n const valueText = element.getAttribute('aria-valuetext');\n return valueText === null ? undefined : valueText;\n}\n\nconst normalize = getDefaultNormalizer();\nfunction escapeRegExp(string) {\n return string.replace(/[.*+\\-?^${}()|[\\]\\\\]/g, '\\\\$&'); // $& means the whole matched string\n}\nfunction getRegExpMatcher(string) {\n return new RegExp(escapeRegExp(string.toLowerCase()), 'i');\n}\nfunction makeSuggestion(queryName, element, content, _ref) {\n let {\n variant,\n name\n } = _ref;\n let warning = '';\n const queryOptions = {};\n const queryArgs = [['Role', 'TestId'].includes(queryName) ? content : getRegExpMatcher(content)];\n if (name) {\n queryOptions.name = getRegExpMatcher(name);\n }\n if (queryName === 'Role' && isInaccessible(element)) {\n queryOptions.hidden = true;\n warning = \"Element is inaccessible. This means that the element and all its children are invisible to screen readers.\\n If you are using the aria-hidden prop, make sure this is the right choice for your case.\\n \";\n }\n if (Object.keys(queryOptions).length > 0) {\n queryArgs.push(queryOptions);\n }\n const queryMethod = variant + \"By\" + queryName;\n return {\n queryName,\n queryMethod,\n queryArgs,\n variant,\n warning,\n toString() {\n if (warning) {\n console.warn(warning);\n }\n let [text, options] = queryArgs;\n text = typeof text === 'string' ? \"'\" + text + \"'\" : text;\n options = options ? \", { \" + Object.entries(options).map(_ref2 => {\n let [k, v] = _ref2;\n return k + \": \" + v;\n }).join(', ') + \" }\" : '';\n return queryMethod + \"(\" + text + options + \")\";\n }\n };\n}\nfunction canSuggest(currentMethod, requestedMethod, data) {\n return data && (!requestedMethod || requestedMethod.toLowerCase() === currentMethod.toLowerCase());\n}\nfunction getSuggestedQuery(element, variant, method) {\n var _element$getAttribute, _getImplicitAriaRoles;\n if (variant === void 0) {\n variant = 'get';\n }\n // don't create suggestions for script and style elements\n if (element.matches(getConfig().defaultIgnore)) {\n return undefined;\n }\n\n //We prefer to suggest something else if the role is generic\n const role = (_element$getAttribute = element.getAttribute('role')) != null ? _element$getAttribute : (_getImplicitAriaRoles = getImplicitAriaRoles(element)) == null ? void 0 : _getImplicitAriaRoles[0];\n if (role !== 'generic' && canSuggest('Role', method, role)) {\n return makeSuggestion('Role', element, role, {\n variant,\n name: computeAccessibleName(element, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n })\n });\n }\n const labelText = getLabels(document, element).map(label => label.content).join(' ');\n if (canSuggest('LabelText', method, labelText)) {\n return makeSuggestion('LabelText', element, labelText, {\n variant\n });\n }\n const placeholderText = element.getAttribute('placeholder');\n if (canSuggest('PlaceholderText', method, placeholderText)) {\n return makeSuggestion('PlaceholderText', element, placeholderText, {\n variant\n });\n }\n const textContent = normalize(getNodeText(element));\n if (canSuggest('Text', method, textContent)) {\n return makeSuggestion('Text', element, textContent, {\n variant\n });\n }\n if (canSuggest('DisplayValue', method, element.value)) {\n return makeSuggestion('DisplayValue', element, normalize(element.value), {\n variant\n });\n }\n const alt = element.getAttribute('alt');\n if (canSuggest('AltText', method, alt)) {\n return makeSuggestion('AltText', element, alt, {\n variant\n });\n }\n const title = element.getAttribute('title');\n if (canSuggest('Title', method, title)) {\n return makeSuggestion('Title', element, title, {\n variant\n });\n }\n const testId = element.getAttribute(getConfig().testIdAttribute);\n if (canSuggest('TestId', method, testId)) {\n return makeSuggestion('TestId', element, testId, {\n variant\n });\n }\n return undefined;\n}\n\n// This is so the stack trace the developer sees is one that's\n// closer to their code (because async stack traces are hard to follow).\nfunction copyStackTrace(target, source) {\n target.stack = source.stack.replace(source.message, target.message);\n}\nfunction waitFor(callback, _ref) {\n let {\n container = getDocument(),\n timeout = getConfig().asyncUtilTimeout,\n showOriginalStackTrace = getConfig().showOriginalStackTrace,\n stackTraceError,\n interval = 50,\n onTimeout = error => {\n Object.defineProperty(error, 'message', {\n value: getConfig().getElementError(error.message, container).message\n });\n return error;\n },\n mutationObserverOptions = {\n subtree: true,\n childList: true,\n attributes: true,\n characterData: true\n }\n } = _ref;\n if (typeof callback !== 'function') {\n throw new TypeError('Received `callback` arg must be a function');\n }\n return new Promise(async (resolve, reject) => {\n let lastError, intervalId, observer;\n let finished = false;\n let promiseStatus = 'idle';\n const overallTimeoutTimer = setTimeout(handleTimeout, timeout);\n const usingJestFakeTimers = jestFakeTimersAreEnabled();\n if (usingJestFakeTimers) {\n const {\n unstable_advanceTimersWrapper: advanceTimersWrapper\n } = getConfig();\n checkCallback();\n // this is a dangerous rule to disable because it could lead to an\n // infinite loop. However, eslint isn't smart enough to know that we're\n // setting finished inside `onDone` which will be called when we're done\n // waiting or when we've timed out.\n // eslint-disable-next-line no-unmodified-loop-condition\n while (!finished) {\n if (!jestFakeTimersAreEnabled()) {\n const error = new Error(\"Changed from using fake timers to real timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to real timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830\");\n if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);\n reject(error);\n return;\n }\n\n // In this rare case, we *need* to wait for in-flight promises\n // to resolve before continuing. We don't need to take advantage\n // of parallelization so we're fine.\n // https://stackoverflow.com/a/59243586/971592\n // eslint-disable-next-line no-await-in-loop\n await advanceTimersWrapper(async () => {\n // we *could* (maybe should?) use `advanceTimersToNextTimer` but it's\n // possible that could make this loop go on forever if someone is using\n // third party code that's setting up recursive timers so rapidly that\n // the user's timer's don't get a chance to resolve. So we'll advance\n // by an interval instead. (We have a test for this case).\n jest.advanceTimersByTime(interval);\n });\n\n // Could have timed-out\n if (finished) {\n break;\n }\n // It's really important that checkCallback is run *before* we flush\n // in-flight promises. To be honest, I'm not sure why, and I can't quite\n // think of a way to reproduce the problem in a test, but I spent\n // an entire day banging my head against a wall on this.\n checkCallback();\n }\n } else {\n try {\n checkContainerType(container);\n } catch (e) {\n reject(e);\n return;\n }\n intervalId = setInterval(checkRealTimersCallback, interval);\n const {\n MutationObserver\n } = getWindowFromNode(container);\n observer = new MutationObserver(checkRealTimersCallback);\n observer.observe(container, mutationObserverOptions);\n checkCallback();\n }\n function onDone(error, result) {\n finished = true;\n clearTimeout(overallTimeoutTimer);\n if (!usingJestFakeTimers) {\n clearInterval(intervalId);\n observer.disconnect();\n }\n if (error) {\n reject(error);\n } else {\n resolve(result);\n }\n }\n function checkRealTimersCallback() {\n if (jestFakeTimersAreEnabled()) {\n const error = new Error(\"Changed from using real timers to fake timers while using waitFor. This is not allowed and will result in very strange behavior. Please ensure you're awaiting all async things your test is doing before changing to fake timers. For more info, please go to https://github.com/testing-library/dom-testing-library/issues/830\");\n if (!showOriginalStackTrace) copyStackTrace(error, stackTraceError);\n return reject(error);\n } else {\n return checkCallback();\n }\n }\n function checkCallback() {\n if (promiseStatus === 'pending') return;\n try {\n const result = runWithExpensiveErrorDiagnosticsDisabled(callback);\n if (typeof (result == null ? void 0 : result.then) === 'function') {\n promiseStatus = 'pending';\n result.then(resolvedValue => {\n promiseStatus = 'resolved';\n onDone(null, resolvedValue);\n }, rejectedValue => {\n promiseStatus = 'rejected';\n lastError = rejectedValue;\n });\n } else {\n onDone(null, result);\n }\n // If `callback` throws, wait for the next mutation, interval, or timeout.\n } catch (error) {\n // Save the most recent callback error to reject the promise with it in the event of a timeout\n lastError = error;\n }\n }\n function handleTimeout() {\n let error;\n if (lastError) {\n error = lastError;\n if (!showOriginalStackTrace && error.name === 'TestingLibraryElementError') {\n copyStackTrace(error, stackTraceError);\n }\n } else {\n error = new Error('Timed out in waitFor.');\n if (!showOriginalStackTrace) {\n copyStackTrace(error, stackTraceError);\n }\n }\n onDone(onTimeout(error), null);\n }\n });\n}\nfunction waitForWrapper(callback, options) {\n // create the error here so its stack trace is as close to the\n // calling code as possible\n const stackTraceError = new Error('STACK_TRACE_MESSAGE');\n return getConfig().asyncWrapper(() => waitFor(callback, {\n stackTraceError,\n ...options\n }));\n}\n\n/*\neslint\n max-lines-per-function: [\"error\", {\"max\": 200}],\n*/\n\nfunction getElementError(message, container) {\n return getConfig().getElementError(message, container);\n}\nfunction getMultipleElementsFoundError(message, container) {\n return getElementError(message + \"\\n\\n(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).\", container);\n}\nfunction queryAllByAttribute(attribute, container, text, _temp) {\n let {\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n return Array.from(container.querySelectorAll(\"[\" + attribute + \"]\")).filter(node => matcher(node.getAttribute(attribute), node, text, matchNormalizer));\n}\nfunction queryByAttribute(attribute, container, text, options) {\n const els = queryAllByAttribute(attribute, container, text, options);\n if (els.length > 1) {\n throw getMultipleElementsFoundError(\"Found multiple elements by [\" + attribute + \"=\" + text + \"]\", container);\n }\n return els[0] || null;\n}\n\n// this accepts a query function and returns a function which throws an error\n// if more than one elements is returned, otherwise it returns the first\n// element or null\nfunction makeSingleQuery(allQuery, getMultipleError) {\n return function (container) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n const els = allQuery(container, ...args);\n if (els.length > 1) {\n const elementStrings = els.map(element => getElementError(null, element).message).join('\\n\\n');\n throw getMultipleElementsFoundError(getMultipleError(container, ...args) + \"\\n\\nHere are the matching elements:\\n\\n\" + elementStrings, container);\n }\n return els[0] || null;\n };\n}\nfunction getSuggestionError(suggestion, container) {\n return getConfig().getElementError(\"A better query is available, try this:\\n\" + suggestion.toString() + \"\\n\", container);\n}\n\n// this accepts a query function and returns a function which throws an error\n// if an empty list of elements is returned\nfunction makeGetAllQuery(allQuery, getMissingError) {\n return function (container) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n const els = allQuery(container, ...args);\n if (!els.length) {\n throw getConfig().getElementError(getMissingError(container, ...args), container);\n }\n return els;\n };\n}\n\n// this accepts a getter query function and returns a function which calls\n// waitFor and passing a function which invokes the getter.\nfunction makeFindQuery(getter) {\n return (container, text, options, waitForOptions) => {\n return waitForWrapper(() => {\n return getter(container, text, options);\n }, {\n container,\n ...waitForOptions\n });\n };\n}\nconst wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => function (container) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n const element = query(container, ...args);\n const [{\n suggest = getConfig().throwSuggestions\n } = {}] = args.slice(-1);\n if (element && suggest) {\n const suggestion = getSuggestedQuery(element, variant);\n if (suggestion && !queryAllByName.endsWith(suggestion.queryName)) {\n throw getSuggestionError(suggestion.toString(), container);\n }\n }\n return element;\n};\nconst wrapAllByQueryWithSuggestion = (query, queryAllByName, variant) => function (container) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n const els = query(container, ...args);\n const [{\n suggest = getConfig().throwSuggestions\n } = {}] = args.slice(-1);\n if (els.length && suggest) {\n // get a unique list of all suggestion messages. We are only going to make a suggestion if\n // all the suggestions are the same\n const uniqueSuggestionMessages = [...new Set(els.map(element => {\n var _getSuggestedQuery;\n return (_getSuggestedQuery = getSuggestedQuery(element, variant)) == null ? void 0 : _getSuggestedQuery.toString();\n }))];\n if (\n // only want to suggest if all the els have the same suggestion.\n uniqueSuggestionMessages.length === 1 && !queryAllByName.endsWith(\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Can this be null at runtime?\n getSuggestedQuery(els[0], variant).queryName)) {\n throw getSuggestionError(uniqueSuggestionMessages[0], container);\n }\n }\n return els;\n};\n\n// TODO: This deviates from the published declarations\n// However, the implementation always required a dyadic (after `container`) not variadic `queryAllBy` considering the implementation of `makeFindQuery`\n// This is at least statically true and can be verified by accepting `QueryMethod<Arguments, HTMLElement[]>`\nfunction buildQueries(queryAllBy, getMultipleError, getMissingError) {\n const queryBy = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllBy, getMultipleError), queryAllBy.name, 'query');\n const getAllBy = makeGetAllQuery(queryAllBy, getMissingError);\n const getBy = makeSingleQuery(getAllBy, getMultipleError);\n const getByWithSuggestions = wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'get');\n const getAllWithSuggestions = wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name.replace('query', 'get'), 'getAll');\n const findAllBy = makeFindQuery(wrapAllByQueryWithSuggestion(getAllBy, queryAllBy.name, 'findAll'));\n const findBy = makeFindQuery(wrapSingleQueryWithSuggestion(getBy, queryAllBy.name, 'find'));\n return [queryBy, getAllWithSuggestions, getByWithSuggestions, findAllBy, findBy];\n}\n\nvar queryHelpers = /*#__PURE__*/Object.freeze({\n __proto__: null,\n getElementError: getElementError,\n wrapAllByQueryWithSuggestion: wrapAllByQueryWithSuggestion,\n wrapSingleQueryWithSuggestion: wrapSingleQueryWithSuggestion,\n getMultipleElementsFoundError: getMultipleElementsFoundError,\n queryAllByAttribute: queryAllByAttribute,\n queryByAttribute: queryByAttribute,\n makeSingleQuery: makeSingleQuery,\n makeGetAllQuery: makeGetAllQuery,\n makeFindQuery: makeFindQuery,\n buildQueries: buildQueries\n});\n\nfunction queryAllLabels(container) {\n return Array.from(container.querySelectorAll('label,input')).map(node => {\n return {\n node,\n textToMatch: getLabelContent(node)\n };\n }).filter(_ref => {\n let {\n textToMatch\n } = _ref;\n return textToMatch !== null;\n });\n}\nconst queryAllLabelsByText = function (container, text, _temp) {\n let {\n exact = true,\n trim,\n collapseWhitespace,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n const textToMatchByLabels = queryAllLabels(container);\n return textToMatchByLabels.filter(_ref2 => {\n let {\n node,\n textToMatch\n } = _ref2;\n return matcher(textToMatch, node, text, matchNormalizer);\n }).map(_ref3 => {\n let {\n node\n } = _ref3;\n return node;\n });\n};\nconst queryAllByLabelText = function (container, text, _temp2) {\n let {\n selector = '*',\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp2 === void 0 ? {} : _temp2;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n const matchingLabelledElements = Array.from(container.querySelectorAll('*')).filter(element => {\n return getRealLabels(element).length || element.hasAttribute('aria-labelledby');\n }).reduce((labelledElements, labelledElement) => {\n const labelList = getLabels(container, labelledElement, {\n selector\n });\n labelList.filter(label => Boolean(label.formControl)).forEach(label => {\n if (matcher(label.content, label.formControl, text, matchNormalizer) && label.formControl) {\n labelledElements.push(label.formControl);\n }\n });\n const labelsValue = labelList.filter(label => Boolean(label.content)).map(label => label.content);\n if (matcher(labelsValue.join(' '), labelledElement, text, matchNormalizer)) {\n labelledElements.push(labelledElement);\n }\n if (labelsValue.length > 1) {\n labelsValue.forEach((labelValue, index) => {\n if (matcher(labelValue, labelledElement, text, matchNormalizer)) {\n labelledElements.push(labelledElement);\n }\n const labelsFiltered = [...labelsValue];\n labelsFiltered.splice(index, 1);\n if (labelsFiltered.length > 1) {\n if (matcher(labelsFiltered.join(' '), labelledElement, text, matchNormalizer)) {\n labelledElements.push(labelledElement);\n }\n }\n });\n }\n return labelledElements;\n }, []).concat(queryAllByAttribute('aria-label', container, text, {\n exact,\n normalizer: matchNormalizer\n }));\n return Array.from(new Set(matchingLabelledElements)).filter(element => element.matches(selector));\n};\n\n// the getAll* query would normally look like this:\n// const getAllByLabelText = makeGetAllQuery(\n// queryAllByLabelText,\n// (c, text) => `Unable to find a label with the text of: ${text}`,\n// )\n// however, we can give a more helpful error message than the generic one,\n// so we're writing this one out by hand.\nconst getAllByLabelText = function (container, text) {\n for (var _len = arguments.length, rest = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n rest[_key - 2] = arguments[_key];\n }\n const els = queryAllByLabelText(container, text, ...rest);\n if (!els.length) {\n const labels = queryAllLabelsByText(container, text, ...rest);\n if (labels.length) {\n const tagNames = labels.map(label => getTagNameOfElementAssociatedWithLabelViaFor(container, label)).filter(tagName => !!tagName);\n if (tagNames.length) {\n throw getConfig().getElementError(tagNames.map(tagName => \"Found a label with the text of: \" + text + \", however the element associated with this label (<\" + tagName + \" />) is non-labellable [https://html.spec.whatwg.org/multipage/forms.html#category-label]. If you really need to label a <\" + tagName + \" />, you can use aria-label or aria-labelledby instead.\").join('\\n\\n'), container);\n } else {\n throw getConfig().getElementError(\"Found a label with the text of: \" + text + \", however no form control was found associated to that label. Make sure you're using the \\\"for\\\" attribute or \\\"aria-labelledby\\\" attribute correctly.\", container);\n }\n } else {\n throw getConfig().getElementError(\"Unable to find a label with the text of: \" + text, container);\n }\n }\n return els;\n};\nfunction getTagNameOfElementAssociatedWithLabelViaFor(container, label) {\n const htmlFor = label.getAttribute('for');\n if (!htmlFor) {\n return null;\n }\n const element = container.querySelector(\"[id=\\\"\" + htmlFor + \"\\\"]\");\n return element ? element.tagName.toLowerCase() : null;\n}\n\n// the reason mentioned above is the same reason we're not using buildQueries\nconst getMultipleError$7 = (c, text) => \"Found multiple elements with the text of: \" + text;\nconst queryByLabelText = wrapSingleQueryWithSuggestion(makeSingleQuery(queryAllByLabelText, getMultipleError$7), queryAllByLabelText.name, 'query');\nconst getByLabelText = makeSingleQuery(getAllByLabelText, getMultipleError$7);\nconst findAllByLabelText = makeFindQuery(wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'findAll'));\nconst findByLabelText = makeFindQuery(wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'find'));\nconst getAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(getAllByLabelText, getAllByLabelText.name, 'getAll');\nconst getByLabelTextWithSuggestions = wrapSingleQueryWithSuggestion(getByLabelText, getAllByLabelText.name, 'get');\nconst queryAllByLabelTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByLabelText, queryAllByLabelText.name, 'queryAll');\n\nconst queryAllByPlaceholderText = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n checkContainerType(args[0]);\n return queryAllByAttribute('placeholder', ...args);\n};\nconst getMultipleError$6 = (c, text) => \"Found multiple elements with the placeholder text of: \" + text;\nconst getMissingError$6 = (c, text) => \"Unable to find an element with the placeholder text of: \" + text;\nconst queryAllByPlaceholderTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByPlaceholderText, queryAllByPlaceholderText.name, 'queryAll');\nconst [queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText] = buildQueries(queryAllByPlaceholderText, getMultipleError$6, getMissingError$6);\n\nconst queryAllByText = function (container, text, _temp) {\n let {\n selector = '*',\n exact = true,\n collapseWhitespace,\n trim,\n ignore = getConfig().defaultIgnore,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n let baseArray = [];\n if (typeof container.matches === 'function' && container.matches(selector)) {\n baseArray = [container];\n }\n return [...baseArray, ...Array.from(container.querySelectorAll(selector))]\n // TODO: `matches` according lib.dom.d.ts can get only `string` but according our code it can handle also boolean :)\n .filter(node => !ignore || !node.matches(ignore)).filter(node => matcher(getNodeText(node), node, text, matchNormalizer));\n};\nconst getMultipleError$5 = (c, text) => \"Found multiple elements with the text: \" + text;\nconst getMissingError$5 = function (c, text, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n collapseWhitespace,\n trim,\n normalizer,\n selector\n } = options;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n const normalizedText = matchNormalizer(text.toString());\n const isNormalizedDifferent = normalizedText !== text.toString();\n const isCustomSelector = (selector != null ? selector : '*') !== '*';\n return \"Unable to find an element with the text: \" + (isNormalizedDifferent ? normalizedText + \" (normalized from '\" + text + \"')\" : text) + (isCustomSelector ? \", which matches selector '\" + selector + \"'\" : '') + \". This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.\";\n};\nconst queryAllByTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByText, queryAllByText.name, 'queryAll');\nconst [queryByText, getAllByText, getByText, findAllByText, findByText] = buildQueries(queryAllByText, getMultipleError$5, getMissingError$5);\n\nconst queryAllByDisplayValue = function (container, value, _temp) {\n let {\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n return Array.from(container.querySelectorAll(\"input,textarea,select\")).filter(node => {\n if (node.tagName === 'SELECT') {\n const selectedOptions = Array.from(node.options).filter(option => option.selected);\n return selectedOptions.some(optionNode => matcher(getNodeText(optionNode), optionNode, value, matchNormalizer));\n } else {\n return matcher(node.value, node, value, matchNormalizer);\n }\n });\n};\nconst getMultipleError$4 = (c, value) => \"Found multiple elements with the display value: \" + value + \".\";\nconst getMissingError$4 = (c, value) => \"Unable to find an element with the display value: \" + value + \".\";\nconst queryAllByDisplayValueWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByDisplayValue, queryAllByDisplayValue.name, 'queryAll');\nconst [queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue] = buildQueries(queryAllByDisplayValue, getMultipleError$4, getMissingError$4);\n\n// Valid tags are img, input, area and custom elements\nconst VALID_TAG_REGEXP = /^(img|input|area|.+-.+)$/i;\nconst queryAllByAltText = function (container, alt, options) {\n if (options === void 0) {\n options = {};\n }\n checkContainerType(container);\n return queryAllByAttribute('alt', container, alt, options).filter(node => VALID_TAG_REGEXP.test(node.tagName));\n};\nconst getMultipleError$3 = (c, alt) => \"Found multiple elements with the alt text: \" + alt;\nconst getMissingError$3 = (c, alt) => \"Unable to find an element with the alt text: \" + alt;\nconst queryAllByAltTextWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByAltText, queryAllByAltText.name, 'queryAll');\nconst [queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText] = buildQueries(queryAllByAltText, getMultipleError$3, getMissingError$3);\n\nconst isSvgTitle = node => {\n var _node$parentElement;\n return node.tagName.toLowerCase() === 'title' && ((_node$parentElement = node.parentElement) == null ? void 0 : _node$parentElement.tagName.toLowerCase()) === 'svg';\n};\nconst queryAllByTitle = function (container, text, _temp) {\n let {\n exact = true,\n collapseWhitespace,\n trim,\n normalizer\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n const matcher = exact ? matches : fuzzyMatches;\n const matchNormalizer = makeNormalizer({\n collapseWhitespace,\n trim,\n normalizer\n });\n return Array.from(container.querySelectorAll('[title], svg > title')).filter(node => matcher(node.getAttribute('title'), node, text, matchNormalizer) || isSvgTitle(node) && matcher(getNodeText(node), node, text, matchNormalizer));\n};\nconst getMultipleError$2 = (c, title) => \"Found multiple elements with the title: \" + title + \".\";\nconst getMissingError$2 = (c, title) => \"Unable to find an element with the title: \" + title + \".\";\nconst queryAllByTitleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTitle, queryAllByTitle.name, 'queryAll');\nconst [queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle] = buildQueries(queryAllByTitle, getMultipleError$2, getMissingError$2);\n\n/* eslint-disable complexity */\nconst queryAllByRole = function (container, role, _temp) {\n let {\n hidden = getConfig().defaultHidden,\n name,\n description,\n queryFallbacks = false,\n selected,\n busy,\n checked,\n pressed,\n current,\n level,\n expanded,\n value: {\n now: valueNow,\n min: valueMin,\n max: valueMax,\n text: valueText\n } = {}\n } = _temp === void 0 ? {} : _temp;\n checkContainerType(container);\n if (selected !== undefined) {\n var _allRoles$get;\n // guard against unknown roles\n if (((_allRoles$get = roles.get(role)) == null ? void 0 : _allRoles$get.props['aria-selected']) === undefined) {\n throw new Error(\"\\\"aria-selected\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (busy !== undefined) {\n var _allRoles$get2;\n // guard against unknown roles\n if (((_allRoles$get2 = roles.get(role)) == null ? void 0 : _allRoles$get2.props['aria-busy']) === undefined) {\n throw new Error(\"\\\"aria-busy\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (checked !== undefined) {\n var _allRoles$get3;\n // guard against unknown roles\n if (((_allRoles$get3 = roles.get(role)) == null ? void 0 : _allRoles$get3.props['aria-checked']) === undefined) {\n throw new Error(\"\\\"aria-checked\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (pressed !== undefined) {\n var _allRoles$get4;\n // guard against unknown roles\n if (((_allRoles$get4 = roles.get(role)) == null ? void 0 : _allRoles$get4.props['aria-pressed']) === undefined) {\n throw new Error(\"\\\"aria-pressed\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (current !== undefined) {\n var _allRoles$get5;\n /* istanbul ignore next */\n // guard against unknown roles\n // All currently released ARIA versions support `aria-current` on all roles.\n // Leaving this for symmetry and forward compatibility\n if (((_allRoles$get5 = roles.get(role)) == null ? void 0 : _allRoles$get5.props['aria-current']) === undefined) {\n throw new Error(\"\\\"aria-current\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (level !== undefined) {\n // guard against using `level` option with any role other than `heading`\n if (role !== 'heading') {\n throw new Error(\"Role \\\"\" + role + \"\\\" cannot have \\\"level\\\" property.\");\n }\n }\n if (valueNow !== undefined) {\n var _allRoles$get6;\n // guard against unknown roles\n if (((_allRoles$get6 = roles.get(role)) == null ? void 0 : _allRoles$get6.props['aria-valuenow']) === undefined) {\n throw new Error(\"\\\"aria-valuenow\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (valueMax !== undefined) {\n var _allRoles$get7;\n // guard against unknown roles\n if (((_allRoles$get7 = roles.get(role)) == null ? void 0 : _allRoles$get7.props['aria-valuemax']) === undefined) {\n throw new Error(\"\\\"aria-valuemax\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (valueMin !== undefined) {\n var _allRoles$get8;\n // guard against unknown roles\n if (((_allRoles$get8 = roles.get(role)) == null ? void 0 : _allRoles$get8.props['aria-valuemin']) === undefined) {\n throw new Error(\"\\\"aria-valuemin\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (valueText !== undefined) {\n var _allRoles$get9;\n // guard against unknown roles\n if (((_allRoles$get9 = roles.get(role)) == null ? void 0 : _allRoles$get9.props['aria-valuetext']) === undefined) {\n throw new Error(\"\\\"aria-valuetext\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n if (expanded !== undefined) {\n var _allRoles$get10;\n // guard against unknown roles\n if (((_allRoles$get10 = roles.get(role)) == null ? void 0 : _allRoles$get10.props['aria-expanded']) === undefined) {\n throw new Error(\"\\\"aria-expanded\\\" is not supported on role \\\"\" + role + \"\\\".\");\n }\n }\n const subtreeIsInaccessibleCache = new WeakMap();\n function cachedIsSubtreeInaccessible(element) {\n if (!subtreeIsInaccessibleCache.has(element)) {\n subtreeIsInaccessibleCache.set(element, isSubtreeInaccessible(element));\n }\n return subtreeIsInaccessibleCache.get(element);\n }\n return Array.from(container.querySelectorAll(\n // Only query elements that can be matched by the following filters\n makeRoleSelector(role))).filter(node => {\n const isRoleSpecifiedExplicitly = node.hasAttribute('role');\n if (isRoleSpecifiedExplicitly) {\n const roleValue = node.getAttribute('role');\n if (queryFallbacks) {\n return roleValue.split(' ').filter(Boolean).some(roleAttributeToken => roleAttributeToken === role);\n }\n // other wise only send the first token to match\n const [firstRoleAttributeToken] = roleValue.split(' ');\n return firstRoleAttributeToken === role;\n }\n const implicitRoles = getImplicitAriaRoles(node);\n return implicitRoles.some(implicitRole => {\n return implicitRole === role;\n });\n }).filter(element => {\n if (selected !== undefined) {\n return selected === computeAriaSelected(element);\n }\n if (busy !== undefined) {\n return busy === computeAriaBusy(element);\n }\n if (checked !== undefined) {\n return checked === computeAriaChecked(element);\n }\n if (pressed !== undefined) {\n return pressed === computeAriaPressed(element);\n }\n if (current !== undefined) {\n return current === computeAriaCurrent(element);\n }\n if (expanded !== undefined) {\n return expanded === computeAriaExpanded(element);\n }\n if (level !== undefined) {\n return level === computeHeadingLevel(element);\n }\n if (valueNow !== undefined || valueMax !== undefined || valueMin !== undefined || valueText !== undefined) {\n let valueMatches = true;\n if (valueNow !== undefined) {\n valueMatches && (valueMatches = valueNow === computeAriaValueNow(element));\n }\n if (valueMax !== undefined) {\n valueMatches && (valueMatches = valueMax === computeAriaValueMax(element));\n }\n if (valueMin !== undefined) {\n valueMatches && (valueMatches = valueMin === computeAriaValueMin(element));\n }\n if (valueText !== undefined) {\n var _computeAriaValueText;\n valueMatches && (valueMatches = matches((_computeAriaValueText = computeAriaValueText(element)) != null ? _computeAriaValueText : null, element, valueText, text => text));\n }\n return valueMatches;\n }\n // don't care if aria attributes are unspecified\n return true;\n }).filter(element => {\n if (name === undefined) {\n // Don't care\n return true;\n }\n return matches(computeAccessibleName(element, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }), element, name, text => text);\n }).filter(element => {\n if (description === undefined) {\n // Don't care\n return true;\n }\n return matches(computeAccessibleDescription(element, {\n computedStyleSupportsPseudoElements: getConfig().computedStyleSupportsPseudoElements\n }), element, description, text => text);\n }).filter(element => {\n return hidden === false ? isInaccessible(element, {\n isSubtreeInaccessible: cachedIsSubtreeInaccessible\n }) === false : true;\n });\n};\nfunction makeRoleSelector(role) {\n var _roleElements$get;\n const explicitRoleSelector = \"*[role~=\\\"\" + role + \"\\\"]\";\n const roleRelations = (_roleElements$get = roleElements.get(role)) != null ? _roleElements$get : new Set();\n const implicitRoleSelectors = new Set(Array.from(roleRelations).map(_ref => {\n let {\n name\n } = _ref;\n return name;\n }));\n\n // Current transpilation config sometimes assumes `...` is always applied to arrays.\n // `...` is equivalent to `Array.prototype.concat` for arrays.\n // If you replace this code with `[explicitRoleSelector, ...implicitRoleSelectors]`, make sure every transpilation target retains the `...` in favor of `Array.prototype.concat`.\n return [explicitRoleSelector].concat(Array.from(implicitRoleSelectors)).join(',');\n}\nconst getNameHint = name => {\n let nameHint = '';\n if (name === undefined) {\n nameHint = '';\n } else if (typeof name === 'string') {\n nameHint = \" and name \\\"\" + name + \"\\\"\";\n } else {\n nameHint = \" and name `\" + name + \"`\";\n }\n return nameHint;\n};\nconst getMultipleError$1 = function (c, role, _temp2) {\n let {\n name\n } = _temp2 === void 0 ? {} : _temp2;\n return \"Found multiple elements with the role \\\"\" + role + \"\\\"\" + getNameHint(name);\n};\nconst getMissingError$1 = function (container, role, _temp3) {\n let {\n hidden = getConfig().defaultHidden,\n name,\n description\n } = _temp3 === void 0 ? {} : _temp3;\n if (getConfig()._disableExpensiveErrorDiagnostics) {\n return \"Unable to find role=\\\"\" + role + \"\\\"\" + getNameHint(name);\n }\n let roles = '';\n Array.from(container.children).forEach(childElement => {\n roles += prettyRoles(childElement, {\n hidden,\n includeDescription: description !== undefined\n });\n });\n let roleMessage;\n if (roles.length === 0) {\n if (hidden === false) {\n roleMessage = 'There are no accessible roles. But there might be some inaccessible roles. ' + 'If you wish to access them, then set the `hidden` option to `true`. ' + 'Learn more about this here: https://testing-library.com/docs/dom-testing-library/api-queries#byrole';\n } else {\n roleMessage = 'There are no available roles.';\n }\n } else {\n roleMessage = (\"\\nHere are the \" + (hidden === false ? 'accessible' : 'available') + \" roles:\\n\\n \" + roles.replace(/\\n/g, '\\n ').replace(/\\n\\s\\s\\n/g, '\\n\\n') + \"\\n\").trim();\n }\n let nameHint = '';\n if (name === undefined) {\n nameHint = '';\n } else if (typeof name === 'string') {\n nameHint = \" and name \\\"\" + name + \"\\\"\";\n } else {\n nameHint = \" and name `\" + name + \"`\";\n }\n let descriptionHint = '';\n if (description === undefined) {\n descriptionHint = '';\n } else if (typeof description === 'string') {\n descriptionHint = \" and description \\\"\" + description + \"\\\"\";\n } else {\n descriptionHint = \" and description `\" + description + \"`\";\n }\n return (\"\\nUnable to find an \" + (hidden === false ? 'accessible ' : '') + \"element with the role \\\"\" + role + \"\\\"\" + nameHint + descriptionHint + \"\\n\\n\" + roleMessage).trim();\n};\nconst queryAllByRoleWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByRole, queryAllByRole.name, 'queryAll');\nconst [queryByRole, getAllByRole, getByRole, findAllByRole, findByRole] = buildQueries(queryAllByRole, getMultipleError$1, getMissingError$1);\n\nconst getTestIdAttribute = () => getConfig().testIdAttribute;\nconst queryAllByTestId = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n checkContainerType(args[0]);\n return queryAllByAttribute(getTestIdAttribute(), ...args);\n};\nconst getMultipleError = (c, id) => \"Found multiple elements by: [\" + getTestIdAttribute() + \"=\\\"\" + id + \"\\\"]\";\nconst getMissingError = (c, id) => \"Unable to find an element by: [\" + getTestIdAttribute() + \"=\\\"\" + id + \"\\\"]\";\nconst queryAllByTestIdWithSuggestions = wrapAllByQueryWithSuggestion(queryAllByTestId, queryAllByTestId.name, 'queryAll');\nconst [queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId] = buildQueries(queryAllByTestId, getMultipleError, getMissingError);\n\nvar queries = /*#__PURE__*/Object.freeze({\n __proto__: null,\n queryAllByLabelText: queryAllByLabelTextWithSuggestions,\n queryByLabelText: queryByLabelText,\n getAllByLabelText: getAllByLabelTextWithSuggestions,\n getByLabelText: getByLabelTextWithSuggestions,\n findAllByLabelText: findAllByLabelText,\n findByLabelText: findByLabelText,\n queryByPlaceholderText: queryByPlaceholderText,\n queryAllByPlaceholderText: queryAllByPlaceholderTextWithSuggestions,\n getByPlaceholderText: getByPlaceholderText,\n getAllByPlaceholderText: getAllByPlaceholderText,\n findAllByPlaceholderText: findAllByPlaceholderText,\n findByPlaceholderText: findByPlaceholderText,\n queryByText: queryByText,\n queryAllByText: queryAllByTextWithSuggestions,\n getByText: getByText,\n getAllByText: getAllByText,\n findAllByText: findAllByText,\n findByText: findByText,\n queryByDisplayValue: queryByDisplayValue,\n queryAllByDisplayValue: queryAllByDisplayValueWithSuggestions,\n getByDisplayValue: getByDisplayValue,\n getAllByDisplayValue: getAllByDisplayValue,\n findAllByDisplayValue: findAllByDisplayValue,\n findByDisplayValue: findByDisplayValue,\n queryByAltText: queryByAltText,\n queryAllByAltText: queryAllByAltTextWithSuggestions,\n getByAltText: getByAltText,\n getAllByAltText: getAllByAltText,\n findAllByAltText: findAllByAltText,\n findByAltText: findByAltText,\n queryByTitle: queryByTitle,\n queryAllByTitle: queryAllByTitleWithSuggestions,\n getByTitle: getByTitle,\n getAllByTitle: getAllByTitle,\n findAllByTitle: findAllByTitle,\n findByTitle: findByTitle,\n queryByRole: queryByRole,\n queryAllByRole: queryAllByRoleWithSuggestions,\n getAllByRole: getAllByRole,\n getByRole: getByRole,\n findAllByRole: findAllByRole,\n findByRole: findByRole,\n queryByTestId: queryByTestId,\n queryAllByTestId: queryAllByTestIdWithSuggestions,\n getByTestId: getByTestId,\n getAllByTestId: getAllByTestId,\n findAllByTestId: findAllByTestId,\n findByTestId: findByTestId\n});\n\n/**\n * @typedef {{[key: string]: Function}} FuncMap\n */\n\n/**\n * @param {HTMLElement} element container\n * @param {FuncMap} queries object of functions\n * @param {Object} initialValue for reducer\n * @returns {FuncMap} returns object of functions bound to container\n */\nfunction getQueriesForElement(element, queries$1, initialValue) {\n if (queries$1 === void 0) {\n queries$1 = queries;\n }\n if (initialValue === void 0) {\n initialValue = {};\n }\n return Object.keys(queries$1).reduce((helpers, key) => {\n const fn = queries$1[key];\n helpers[key] = fn.bind(null, element);\n return helpers;\n }, initialValue);\n}\n\nconst isRemoved = result => !result || Array.isArray(result) && !result.length;\n\n// Check if the element is not present.\n// As the name implies, waitForElementToBeRemoved should check `present` --> `removed`\nfunction initialCheck(elements) {\n if (isRemoved(elements)) {\n throw new Error('The element(s) given to waitForElementToBeRemoved are already removed. waitForElementToBeRemoved requires that the element(s) exist(s) before waiting for removal.');\n }\n}\nasync function waitForElementToBeRemoved(callback, options) {\n // created here so we get a nice stacktrace\n const timeoutError = new Error('Timed out in waitForElementToBeRemoved.');\n if (typeof callback !== 'function') {\n initialCheck(callback);\n const elements = Array.isArray(callback) ? callback : [callback];\n const getRemainingElements = elements.map(element => {\n let parent = element.parentElement;\n if (parent === null) return () => null;\n while (parent.parentElement) parent = parent.parentElement;\n return () => parent.contains(element) ? element : null;\n });\n callback = () => getRemainingElements.map(c => c()).filter(Boolean);\n }\n initialCheck(callback());\n return waitForWrapper(() => {\n let result;\n try {\n result = callback();\n } catch (error) {\n if (error.name === 'TestingLibraryElementError') {\n return undefined;\n }\n throw error;\n }\n if (!isRemoved(result)) {\n throw timeoutError;\n }\n return undefined;\n }, options);\n}\n\n/*\neslint\n require-await: \"off\"\n*/\n\nconst eventMap = {\n // Clipboard Events\n copy: {\n EventType: 'ClipboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n cut: {\n EventType: 'ClipboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n paste: {\n EventType: 'ClipboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Composition Events\n compositionEnd: {\n EventType: 'CompositionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n compositionStart: {\n EventType: 'CompositionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n compositionUpdate: {\n EventType: 'CompositionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Keyboard Events\n keyDown: {\n EventType: 'KeyboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n charCode: 0,\n composed: true\n }\n },\n keyPress: {\n EventType: 'KeyboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n charCode: 0,\n composed: true\n }\n },\n keyUp: {\n EventType: 'KeyboardEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n charCode: 0,\n composed: true\n }\n },\n // Focus Events\n focus: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n blur: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n focusIn: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n focusOut: {\n EventType: 'FocusEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n // Form Events\n change: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n input: {\n EventType: 'InputEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n invalid: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: true\n }\n },\n submit: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n },\n reset: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n },\n // Mouse Events\n click: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n button: 0,\n composed: true\n }\n },\n contextMenu: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dblClick: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n drag: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dragEnd: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n dragEnter: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dragExit: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n dragLeave: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n dragOver: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n dragStart: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n drop: {\n EventType: 'DragEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseDown: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseEnter: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n mouseLeave: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false,\n composed: true\n }\n },\n mouseMove: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseOut: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseOver: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n mouseUp: {\n EventType: 'MouseEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Selection Events\n select: {\n EventType: 'Event',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // Touch Events\n touchCancel: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n touchEnd: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n touchMove: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n touchStart: {\n EventType: 'TouchEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // UI Events\n resize: {\n EventType: 'UIEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n scroll: {\n EventType: 'UIEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n // Wheel Events\n wheel: {\n EventType: 'WheelEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n // Media Events\n abort: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n canPlay: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n canPlayThrough: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n durationChange: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n emptied: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n encrypted: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n ended: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n loadedData: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n loadedMetadata: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n loadStart: {\n EventType: 'ProgressEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n pause: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n play: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n playing: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n progress: {\n EventType: 'ProgressEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n rateChange: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n seeked: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n seeking: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n stalled: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n suspend: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n timeUpdate: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n volumeChange: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n waiting: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n // Events\n load: {\n // TODO: load events can be UIEvent or Event depending on what generated them\n // This is where this abstraction breaks down.\n // But the common targets are <img />, <script /> and window.\n // Neither of these targets receive a UIEvent\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n error: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n // Animation Events\n animationStart: {\n EventType: 'AnimationEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n animationEnd: {\n EventType: 'AnimationEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n animationIteration: {\n EventType: 'AnimationEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // Transition Events\n transitionCancel: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n transitionEnd: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n },\n transitionRun: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n transitionStart: {\n EventType: 'TransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // pointer events\n pointerOver: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerEnter: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n pointerDown: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerMove: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerUp: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerCancel: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n pointerOut: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true,\n composed: true\n }\n },\n pointerLeave: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n gotPointerCapture: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n lostPointerCapture: {\n EventType: 'PointerEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false,\n composed: true\n }\n },\n // history events\n popState: {\n EventType: 'PopStateEvent',\n defaultInit: {\n bubbles: true,\n cancelable: false\n }\n },\n // window events\n offline: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n online: {\n EventType: 'Event',\n defaultInit: {\n bubbles: false,\n cancelable: false\n }\n },\n pageHide: {\n EventType: 'PageTransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n },\n pageShow: {\n EventType: 'PageTransitionEvent',\n defaultInit: {\n bubbles: true,\n cancelable: true\n }\n }\n};\nconst eventAliasMap = {\n doubleClick: 'dblClick'\n};\n\nfunction fireEvent(element, event) {\n return getConfig().eventWrapper(() => {\n if (!event) {\n throw new Error(\"Unable to fire an event - please provide an event object.\");\n }\n if (!element) {\n throw new Error(\"Unable to fire a \\\"\" + event.type + \"\\\" event - please provide a DOM element.\");\n }\n return element.dispatchEvent(event);\n });\n}\nfunction createEvent(eventName, node, init, _temp) {\n let {\n EventType = 'Event',\n defaultInit = {}\n } = _temp === void 0 ? {} : _temp;\n if (!node) {\n throw new Error(\"Unable to fire a \\\"\" + eventName + \"\\\" event - please provide a DOM element.\");\n }\n const eventInit = {\n ...defaultInit,\n ...init\n };\n const {\n target: {\n value,\n files,\n ...targetProperties\n } = {}\n } = eventInit;\n if (value !== undefined) {\n setNativeValue(node, value);\n }\n if (files !== undefined) {\n // input.files is a read-only property so this is not allowed:\n // input.files = [file]\n // so we have to use this workaround to set the property\n Object.defineProperty(node, 'files', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: files\n });\n }\n Object.assign(node, targetProperties);\n const window = getWindowFromNode(node);\n const EventConstructor = window[EventType] || window.Event;\n let event;\n /* istanbul ignore else */\n if (typeof EventConstructor === 'function') {\n event = new EventConstructor(eventName, eventInit);\n } else {\n // IE11 polyfill from https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill\n event = window.document.createEvent(EventType);\n const {\n bubbles,\n cancelable,\n detail,\n ...otherInit\n } = eventInit;\n event.initEvent(eventName, bubbles, cancelable, detail);\n Object.keys(otherInit).forEach(eventKey => {\n event[eventKey] = otherInit[eventKey];\n });\n }\n\n // DataTransfer is not supported in jsdom: https://github.com/jsdom/jsdom/issues/1568\n const dataTransferProperties = ['dataTransfer', 'clipboardData'];\n dataTransferProperties.forEach(dataTransferKey => {\n const dataTransferValue = eventInit[dataTransferKey];\n if (typeof dataTransferValue === 'object') {\n /* istanbul ignore if */\n if (typeof window.DataTransfer === 'function') {\n Object.defineProperty(event, dataTransferKey, {\n value: Object.getOwnPropertyNames(dataTransferValue).reduce((acc, propName) => {\n Object.defineProperty(acc, propName, {\n value: dataTransferValue[propName]\n });\n return acc;\n }, new window.DataTransfer())\n });\n } else {\n Object.defineProperty(event, dataTransferKey, {\n value: dataTransferValue\n });\n }\n }\n });\n return event;\n}\nObject.keys(eventMap).forEach(key => {\n const {\n EventType,\n defaultInit\n } = eventMap[key];\n const eventName = key.toLowerCase();\n createEvent[key] = (node, init) => createEvent(eventName, node, init, {\n EventType,\n defaultInit\n });\n fireEvent[key] = (node, init) => fireEvent(node, createEvent[key](node, init));\n});\n\n// function written after some investigation here:\n// https://github.com/facebook/react/issues/10135#issuecomment-401496776\nfunction setNativeValue(element, value) {\n const {\n set: valueSetter\n } = Object.getOwnPropertyDescriptor(element, 'value') || {};\n const prototype = Object.getPrototypeOf(element);\n const {\n set: prototypeValueSetter\n } = Object.getOwnPropertyDescriptor(prototype, 'value') || {};\n if (prototypeValueSetter && valueSetter !== prototypeValueSetter) {\n prototypeValueSetter.call(element, value);\n } else {\n /* istanbul ignore if */\n // eslint-disable-next-line no-lonely-if -- Can't be ignored by istanbul otherwise\n if (valueSetter) {\n valueSetter.call(element, value);\n } else {\n throw new Error('The given element does not have a value setter');\n }\n }\n}\nObject.keys(eventAliasMap).forEach(aliasKey => {\n const key = eventAliasMap[aliasKey];\n fireEvent[aliasKey] = function () {\n return fireEvent[key](...arguments);\n };\n});\n\n/* eslint complexity:[\"error\", 9] */\n\n// WARNING: `lz-string` only has a default export but statically we assume named exports are allowed\nfunction unindent(string) {\n // remove white spaces first, to save a few bytes.\n // testing-playground will reformat on load any ways.\n return string.replace(/[ \\t]*[\\n][ \\t]*/g, '\\n');\n}\nfunction encode(value) {\n return lzString.compressToEncodedURIComponent(unindent(value));\n}\nfunction getPlaygroundUrl(markup) {\n return \"https://testing-playground.com/#markup=\" + encode(markup);\n}\nconst debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach(el => logDOM(el, maxLength, options)) : logDOM(element, maxLength, options);\nconst logTestingPlaygroundURL = function (element) {\n if (element === void 0) {\n element = getDocument().body;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!element || !('innerHTML' in element)) {\n console.log(\"The element you're providing isn't a valid DOM element.\");\n return;\n }\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!element.innerHTML) {\n console.log(\"The provided element doesn't have any children.\");\n return;\n }\n const playgroundUrl = getPlaygroundUrl(element.innerHTML);\n console.log(\"Open this URL in your browser\\n\\n\" + playgroundUrl);\n return playgroundUrl;\n};\nconst initialValue = {\n debug,\n logTestingPlaygroundURL\n};\nconst screen = typeof document !== 'undefined' && document.body // eslint-disable-line @typescript-eslint/no-unnecessary-condition\n? getQueriesForElement(document.body, queries, initialValue) : Object.keys(queries).reduce((helpers, key) => {\n // `key` is for all intents and purposes the type of keyof `helpers`, which itself is the type of `initialValue` plus incoming properties from `queries`\n // if `Object.keys(something)` returned Array<keyof typeof something> this explicit type assertion would not be necessary\n // see https://stackoverflow.com/questions/55012174/why-doesnt-object-keys-return-a-keyof-type-in-typescript\n helpers[key] = () => {\n throw new TypeError('For queries bound to document.body a global document has to be available... Learn more: https://testing-library.com/s/screen-global-error');\n };\n return helpers;\n}, initialValue);\n\nexport { buildQueries, configure, createEvent, findAllByAltText, findAllByDisplayValue, findAllByLabelText, findAllByPlaceholderText, findAllByRole, findAllByTestId, findAllByText, findAllByTitle, findByAltText, findByDisplayValue, findByLabelText, findByPlaceholderText, findByRole, findByTestId, findByText, findByTitle, fireEvent, getAllByAltText, getAllByDisplayValue, getAllByLabelTextWithSuggestions as getAllByLabelText, getAllByPlaceholderText, getAllByRole, getAllByTestId, getAllByText, getAllByTitle, getByAltText, getByDisplayValue, getByLabelTextWithSuggestions as getByLabelText, getByPlaceholderText, getByRole, getByTestId, getByText, getByTitle, getConfig, getDefaultNormalizer, getElementError, getMultipleElementsFoundError, getNodeText, getQueriesForElement, getRoles, getSuggestedQuery, isInaccessible, logDOM, logRoles, makeFindQuery, makeGetAllQuery, makeSingleQuery, prettyDOM, queries, queryAllByAltTextWithSuggestions as queryAllByAltText, queryAllByAttribute, queryAllByDisplayValueWithSuggestions as queryAllByDisplayValue, queryAllByLabelTextWithSuggestions as queryAllByLabelText, queryAllByPlaceholderTextWithSuggestions as queryAllByPlaceholderText, queryAllByRoleWithSuggestions as queryAllByRole, queryAllByTestIdWithSuggestions as queryAllByTestId, queryAllByTextWithSuggestions as queryAllByText, queryAllByTitleWithSuggestions as queryAllByTitle, queryByAltText, queryByAttribute, queryByDisplayValue, queryByLabelText, queryByPlaceholderText, queryByRole, queryByTestId, queryByText, queryByTitle, queryHelpers, screen, waitForWrapper as waitFor, waitForElementToBeRemoved, getQueriesForElement as within, wrapAllByQueryWithSuggestion, wrapSingleQueryWithSuggestion };\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printIteratorEntries = printIteratorEntries;\nexports.printIteratorValues = printIteratorValues;\nexports.printListItems = printListItems;\nexports.printObjectProperties = printObjectProperties;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst getKeysOfEnumerableProperties = (object, compareKeys) => {\n const keys = Object.keys(object).sort(compareKeys);\n\n if (Object.getOwnPropertySymbols) {\n Object.getOwnPropertySymbols(object).forEach(symbol => {\n if (Object.getOwnPropertyDescriptor(object, symbol).enumerable) {\n keys.push(symbol);\n }\n });\n }\n\n return keys;\n};\n/**\n * Return entries (for example, of a map)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printIteratorEntries(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer, // Too bad, so sad that separator for ECMAScript Map has been ' => '\n // What a distracting diff if you change a data structure to/from\n // ECMAScript Object or Immutable.Map/OrderedMap which use the default.\n separator = ': '\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n const name = printer(\n current.value[0],\n config,\n indentationNext,\n depth,\n refs\n );\n const value = printer(\n current.value[1],\n config,\n indentationNext,\n depth,\n refs\n );\n result += indentationNext + name + separator + value;\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return values (for example, of a set)\n * with spacing, indentation, and comma\n * without surrounding punctuation (braces or brackets)\n */\n\nfunction printIteratorValues(\n iterator,\n config,\n indentation,\n depth,\n refs,\n printer\n) {\n let result = '';\n let current = iterator.next();\n\n if (!current.done) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n while (!current.done) {\n result +=\n indentationNext +\n printer(current.value, config, indentationNext, depth, refs);\n current = iterator.next();\n\n if (!current.done) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return items (for example, of an array)\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, brackets)\n **/\n\nfunction printListItems(list, config, indentation, depth, refs, printer) {\n let result = '';\n\n if (list.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < list.length; i++) {\n result += indentationNext;\n\n if (i in list) {\n result += printer(list[i], config, indentationNext, depth, refs);\n }\n\n if (i < list.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n/**\n * Return properties of an object\n * with spacing, indentation, and comma\n * without surrounding punctuation (for example, braces)\n */\n\nfunction printObjectProperties(val, config, indentation, depth, refs, printer) {\n let result = '';\n const keys = getKeysOfEnumerableProperties(val, config.compareKeys);\n\n if (keys.length) {\n result += config.spacingOuter;\n const indentationNext = indentation + config.indent;\n\n for (let i = 0; i < keys.length; i++) {\n const key = keys[i];\n const name = printer(key, config, indentationNext, depth, refs);\n const value = printer(val[key], config, indentationNext, depth, refs);\n result += indentationNext + name + ': ' + value;\n\n if (i < keys.length - 1) {\n result += ',' + config.spacingInner;\n } else if (!config.min) {\n result += ',';\n }\n }\n\n result += config.spacingOuter + indentation;\n }\n\n return result;\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = exports.DEFAULT_OPTIONS = void 0;\nexports.format = format;\nexports.plugins = void 0;\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nvar _collections = require('./collections');\n\nvar _AsymmetricMatcher = _interopRequireDefault(\n require('./plugins/AsymmetricMatcher')\n);\n\nvar _ConvertAnsi = _interopRequireDefault(require('./plugins/ConvertAnsi'));\n\nvar _DOMCollection = _interopRequireDefault(require('./plugins/DOMCollection'));\n\nvar _DOMElement = _interopRequireDefault(require('./plugins/DOMElement'));\n\nvar _Immutable = _interopRequireDefault(require('./plugins/Immutable'));\n\nvar _ReactElement = _interopRequireDefault(require('./plugins/ReactElement'));\n\nvar _ReactTestComponent = _interopRequireDefault(\n require('./plugins/ReactTestComponent')\n);\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-disable local/ban-types-eventually */\nconst toString = Object.prototype.toString;\nconst toISOString = Date.prototype.toISOString;\nconst errorToString = Error.prototype.toString;\nconst regExpToString = RegExp.prototype.toString;\n/**\n * Explicitly comparing typeof constructor to function avoids undefined as name\n * when mock identity-obj-proxy returns the key as the value for any key.\n */\n\nconst getConstructorName = val =>\n (typeof val.constructor === 'function' && val.constructor.name) || 'Object';\n/* global window */\n\n/** Is val is equal to global window object? Works even if it does not exist :) */\n\nconst isWindow = val => typeof window !== 'undefined' && val === window;\n\nconst SYMBOL_REGEXP = /^Symbol\\((.*)\\)(.*)$/;\nconst NEWLINE_REGEXP = /\\n/gi;\n\nclass PrettyFormatPluginError extends Error {\n constructor(message, stack) {\n super(message);\n this.stack = stack;\n this.name = this.constructor.name;\n }\n}\n\nfunction isToStringedArrayType(toStringed) {\n return (\n toStringed === '[object Array]' ||\n toStringed === '[object ArrayBuffer]' ||\n toStringed === '[object DataView]' ||\n toStringed === '[object Float32Array]' ||\n toStringed === '[object Float64Array]' ||\n toStringed === '[object Int8Array]' ||\n toStringed === '[object Int16Array]' ||\n toStringed === '[object Int32Array]' ||\n toStringed === '[object Uint8Array]' ||\n toStringed === '[object Uint8ClampedArray]' ||\n toStringed === '[object Uint16Array]' ||\n toStringed === '[object Uint32Array]'\n );\n}\n\nfunction printNumber(val) {\n return Object.is(val, -0) ? '-0' : String(val);\n}\n\nfunction printBigInt(val) {\n return String(`${val}n`);\n}\n\nfunction printFunction(val, printFunctionName) {\n if (!printFunctionName) {\n return '[Function]';\n }\n\n return '[Function ' + (val.name || 'anonymous') + ']';\n}\n\nfunction printSymbol(val) {\n return String(val).replace(SYMBOL_REGEXP, 'Symbol($1)');\n}\n\nfunction printError(val) {\n return '[' + errorToString.call(val) + ']';\n}\n/**\n * The first port of call for printing an object, handles most of the\n * data-types in JS.\n */\n\nfunction printBasicValue(val, printFunctionName, escapeRegex, escapeString) {\n if (val === true || val === false) {\n return '' + val;\n }\n\n if (val === undefined) {\n return 'undefined';\n }\n\n if (val === null) {\n return 'null';\n }\n\n const typeOf = typeof val;\n\n if (typeOf === 'number') {\n return printNumber(val);\n }\n\n if (typeOf === 'bigint') {\n return printBigInt(val);\n }\n\n if (typeOf === 'string') {\n if (escapeString) {\n return '\"' + val.replace(/\"|\\\\/g, '\\\\$&') + '\"';\n }\n\n return '\"' + val + '\"';\n }\n\n if (typeOf === 'function') {\n return printFunction(val, printFunctionName);\n }\n\n if (typeOf === 'symbol') {\n return printSymbol(val);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object WeakMap]') {\n return 'WeakMap {}';\n }\n\n if (toStringed === '[object WeakSet]') {\n return 'WeakSet {}';\n }\n\n if (\n toStringed === '[object Function]' ||\n toStringed === '[object GeneratorFunction]'\n ) {\n return printFunction(val, printFunctionName);\n }\n\n if (toStringed === '[object Symbol]') {\n return printSymbol(val);\n }\n\n if (toStringed === '[object Date]') {\n return isNaN(+val) ? 'Date { NaN }' : toISOString.call(val);\n }\n\n if (toStringed === '[object Error]') {\n return printError(val);\n }\n\n if (toStringed === '[object RegExp]') {\n if (escapeRegex) {\n // https://github.com/benjamingr/RegExp.escape/blob/main/polyfill.js\n return regExpToString.call(val).replace(/[\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\n }\n\n return regExpToString.call(val);\n }\n\n if (val instanceof Error) {\n return printError(val);\n }\n\n return null;\n}\n/**\n * Handles more complex objects ( such as objects with circular references.\n * maps and sets etc )\n */\n\nfunction printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n) {\n if (refs.indexOf(val) !== -1) {\n return '[Circular]';\n }\n\n refs = refs.slice();\n refs.push(val);\n const hitMaxDepth = ++depth > config.maxDepth;\n const min = config.min;\n\n if (\n config.callToJSON &&\n !hitMaxDepth &&\n val.toJSON &&\n typeof val.toJSON === 'function' &&\n !hasCalledToJSON\n ) {\n return printer(val.toJSON(), config, indentation, depth, refs, true);\n }\n\n const toStringed = toString.call(val);\n\n if (toStringed === '[object Arguments]') {\n return hitMaxDepth\n ? '[Arguments]'\n : (min ? '' : 'Arguments ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (isToStringedArrayType(toStringed)) {\n return hitMaxDepth\n ? '[' + val.constructor.name + ']'\n : (min\n ? ''\n : !config.printBasicPrototype && val.constructor.name === 'Array'\n ? ''\n : val.constructor.name + ' ') +\n '[' +\n (0, _collections.printListItems)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n }\n\n if (toStringed === '[object Map]') {\n return hitMaxDepth\n ? '[Map]'\n : 'Map {' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer,\n ' => '\n ) +\n '}';\n }\n\n if (toStringed === '[object Set]') {\n return hitMaxDepth\n ? '[Set]'\n : 'Set {' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n } // Avoid failure to serialize global window object in jsdom test environment.\n // For example, not even relevant if window is prop of React element.\n\n return hitMaxDepth || isWindow(val)\n ? '[' + getConstructorName(val) + ']'\n : (min\n ? ''\n : !config.printBasicPrototype && getConstructorName(val) === 'Object'\n ? ''\n : getConstructorName(val) + ' ') +\n '{' +\n (0, _collections.printObjectProperties)(\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n}\n\nfunction isNewPlugin(plugin) {\n return plugin.serialize != null;\n}\n\nfunction printPlugin(plugin, val, config, indentation, depth, refs) {\n let printed;\n\n try {\n printed = isNewPlugin(plugin)\n ? plugin.serialize(val, config, indentation, depth, refs, printer)\n : plugin.print(\n val,\n valChild => printer(valChild, config, indentation, depth, refs),\n str => {\n const indentationNext = indentation + config.indent;\n return (\n indentationNext +\n str.replace(NEWLINE_REGEXP, '\\n' + indentationNext)\n );\n },\n {\n edgeSpacing: config.spacingOuter,\n min: config.min,\n spacing: config.spacingInner\n },\n config.colors\n );\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n\n if (typeof printed !== 'string') {\n throw new Error(\n `pretty-format: Plugin must return type \"string\" but instead returned \"${typeof printed}\".`\n );\n }\n\n return printed;\n}\n\nfunction findPlugin(plugins, val) {\n for (let p = 0; p < plugins.length; p++) {\n try {\n if (plugins[p].test(val)) {\n return plugins[p];\n }\n } catch (error) {\n throw new PrettyFormatPluginError(error.message, error.stack);\n }\n }\n\n return null;\n}\n\nfunction printer(val, config, indentation, depth, refs, hasCalledToJSON) {\n const plugin = findPlugin(config.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, config, indentation, depth, refs);\n }\n\n const basicResult = printBasicValue(\n val,\n config.printFunctionName,\n config.escapeRegex,\n config.escapeString\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(\n val,\n config,\n indentation,\n depth,\n refs,\n hasCalledToJSON\n );\n}\n\nconst DEFAULT_THEME = {\n comment: 'gray',\n content: 'reset',\n prop: 'yellow',\n tag: 'cyan',\n value: 'green'\n};\nconst DEFAULT_THEME_KEYS = Object.keys(DEFAULT_THEME);\nconst DEFAULT_OPTIONS = {\n callToJSON: true,\n compareKeys: undefined,\n escapeRegex: false,\n escapeString: true,\n highlight: false,\n indent: 2,\n maxDepth: Infinity,\n min: false,\n plugins: [],\n printBasicPrototype: true,\n printFunctionName: true,\n theme: DEFAULT_THEME\n};\nexports.DEFAULT_OPTIONS = DEFAULT_OPTIONS;\n\nfunction validateOptions(options) {\n Object.keys(options).forEach(key => {\n if (!DEFAULT_OPTIONS.hasOwnProperty(key)) {\n throw new Error(`pretty-format: Unknown option \"${key}\".`);\n }\n });\n\n if (options.min && options.indent !== undefined && options.indent !== 0) {\n throw new Error(\n 'pretty-format: Options \"min\" and \"indent\" cannot be used together.'\n );\n }\n\n if (options.theme !== undefined) {\n if (options.theme === null) {\n throw new Error('pretty-format: Option \"theme\" must not be null.');\n }\n\n if (typeof options.theme !== 'object') {\n throw new Error(\n `pretty-format: Option \"theme\" must be of type \"object\" but instead received \"${typeof options.theme}\".`\n );\n }\n }\n}\n\nconst getColorsHighlight = options =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n const value =\n options.theme && options.theme[key] !== undefined\n ? options.theme[key]\n : DEFAULT_THEME[key];\n const color = value && _ansiStyles.default[value];\n\n if (\n color &&\n typeof color.close === 'string' &&\n typeof color.open === 'string'\n ) {\n colors[key] = color;\n } else {\n throw new Error(\n `pretty-format: Option \"theme\" has a key \"${key}\" whose value \"${value}\" is undefined in ansi-styles.`\n );\n }\n\n return colors;\n }, Object.create(null));\n\nconst getColorsEmpty = () =>\n DEFAULT_THEME_KEYS.reduce((colors, key) => {\n colors[key] = {\n close: '',\n open: ''\n };\n return colors;\n }, Object.create(null));\n\nconst getPrintFunctionName = options =>\n options && options.printFunctionName !== undefined\n ? options.printFunctionName\n : DEFAULT_OPTIONS.printFunctionName;\n\nconst getEscapeRegex = options =>\n options && options.escapeRegex !== undefined\n ? options.escapeRegex\n : DEFAULT_OPTIONS.escapeRegex;\n\nconst getEscapeString = options =>\n options && options.escapeString !== undefined\n ? options.escapeString\n : DEFAULT_OPTIONS.escapeString;\n\nconst getConfig = options => {\n var _options$printBasicPr;\n\n return {\n callToJSON:\n options && options.callToJSON !== undefined\n ? options.callToJSON\n : DEFAULT_OPTIONS.callToJSON,\n colors:\n options && options.highlight\n ? getColorsHighlight(options)\n : getColorsEmpty(),\n compareKeys:\n options && typeof options.compareKeys === 'function'\n ? options.compareKeys\n : DEFAULT_OPTIONS.compareKeys,\n escapeRegex: getEscapeRegex(options),\n escapeString: getEscapeString(options),\n indent:\n options && options.min\n ? ''\n : createIndent(\n options && options.indent !== undefined\n ? options.indent\n : DEFAULT_OPTIONS.indent\n ),\n maxDepth:\n options && options.maxDepth !== undefined\n ? options.maxDepth\n : DEFAULT_OPTIONS.maxDepth,\n min:\n options && options.min !== undefined ? options.min : DEFAULT_OPTIONS.min,\n plugins:\n options && options.plugins !== undefined\n ? options.plugins\n : DEFAULT_OPTIONS.plugins,\n printBasicPrototype:\n (_options$printBasicPr =\n options === null || options === void 0\n ? void 0\n : options.printBasicPrototype) !== null &&\n _options$printBasicPr !== void 0\n ? _options$printBasicPr\n : true,\n printFunctionName: getPrintFunctionName(options),\n spacingInner: options && options.min ? ' ' : '\\n',\n spacingOuter: options && options.min ? '' : '\\n'\n };\n};\n\nfunction createIndent(indent) {\n return new Array(indent + 1).join(' ');\n}\n/**\n * Returns a presentation string of your `val` object\n * @param val any potential JavaScript object\n * @param options Custom settings\n */\n\nfunction format(val, options) {\n if (options) {\n validateOptions(options);\n\n if (options.plugins) {\n const plugin = findPlugin(options.plugins, val);\n\n if (plugin !== null) {\n return printPlugin(plugin, val, getConfig(options), '', 0, []);\n }\n }\n }\n\n const basicResult = printBasicValue(\n val,\n getPrintFunctionName(options),\n getEscapeRegex(options),\n getEscapeString(options)\n );\n\n if (basicResult !== null) {\n return basicResult;\n }\n\n return printComplexValue(val, getConfig(options), '', 0, []);\n}\n\nconst plugins = {\n AsymmetricMatcher: _AsymmetricMatcher.default,\n ConvertAnsi: _ConvertAnsi.default,\n DOMCollection: _DOMCollection.default,\n DOMElement: _DOMElement.default,\n Immutable: _Immutable.default,\n ReactElement: _ReactElement.default,\n ReactTestComponent: _ReactTestComponent.default\n};\nexports.plugins = plugins;\nvar _default = format;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _collections = require('../collections');\n\nvar global = (function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n } else if (typeof global !== 'undefined') {\n return global;\n } else if (typeof self !== 'undefined') {\n return self;\n } else if (typeof window !== 'undefined') {\n return window;\n } else {\n return Function('return this')();\n }\n})();\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst asymmetricMatcher =\n typeof Symbol === 'function' && Symbol.for\n ? Symbol.for('jest.asymmetricMatcher')\n : 0x1357a5;\nconst SPACE = ' ';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n const stringedValue = val.toString();\n\n if (\n stringedValue === 'ArrayContaining' ||\n stringedValue === 'ArrayNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '[' +\n (0, _collections.printListItems)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']'\n );\n }\n\n if (\n stringedValue === 'ObjectContaining' ||\n stringedValue === 'ObjectNotContaining'\n ) {\n if (++depth > config.maxDepth) {\n return '[' + stringedValue + ']';\n }\n\n return (\n stringedValue +\n SPACE +\n '{' +\n (0, _collections.printObjectProperties)(\n val.sample,\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n );\n }\n\n if (\n stringedValue === 'StringMatching' ||\n stringedValue === 'StringNotMatching'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n if (\n stringedValue === 'StringContaining' ||\n stringedValue === 'StringNotContaining'\n ) {\n return (\n stringedValue +\n SPACE +\n printer(val.sample, config, indentation, depth, refs)\n );\n }\n\n return val.toAsymmetricMatcher();\n};\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === asymmetricMatcher;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _ansiRegex = _interopRequireDefault(require('ansi-regex'));\n\nvar _ansiStyles = _interopRequireDefault(require('ansi-styles'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst toHumanReadableAnsi = text =>\n text.replace((0, _ansiRegex.default)(), match => {\n switch (match) {\n case _ansiStyles.default.red.close:\n case _ansiStyles.default.green.close:\n case _ansiStyles.default.cyan.close:\n case _ansiStyles.default.gray.close:\n case _ansiStyles.default.white.close:\n case _ansiStyles.default.yellow.close:\n case _ansiStyles.default.bgRed.close:\n case _ansiStyles.default.bgGreen.close:\n case _ansiStyles.default.bgYellow.close:\n case _ansiStyles.default.inverse.close:\n case _ansiStyles.default.dim.close:\n case _ansiStyles.default.bold.close:\n case _ansiStyles.default.reset.open:\n case _ansiStyles.default.reset.close:\n return '</>';\n\n case _ansiStyles.default.red.open:\n return '<red>';\n\n case _ansiStyles.default.green.open:\n return '<green>';\n\n case _ansiStyles.default.cyan.open:\n return '<cyan>';\n\n case _ansiStyles.default.gray.open:\n return '<gray>';\n\n case _ansiStyles.default.white.open:\n return '<white>';\n\n case _ansiStyles.default.yellow.open:\n return '<yellow>';\n\n case _ansiStyles.default.bgRed.open:\n return '<bgRed>';\n\n case _ansiStyles.default.bgGreen.open:\n return '<bgGreen>';\n\n case _ansiStyles.default.bgYellow.open:\n return '<bgYellow>';\n\n case _ansiStyles.default.inverse.open:\n return '<inverse>';\n\n case _ansiStyles.default.dim.open:\n return '<dim>';\n\n case _ansiStyles.default.bold.open:\n return '<bold>';\n\n default:\n return '';\n }\n });\n\nconst test = val =>\n typeof val === 'string' && !!val.match((0, _ansiRegex.default)());\n\nexports.test = test;\n\nconst serialize = (val, config, indentation, depth, refs, printer) =>\n printer(toHumanReadableAnsi(val), config, indentation, depth, refs);\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/* eslint-disable local/ban-types-eventually */\nconst SPACE = ' ';\nconst OBJECT_NAMES = ['DOMStringMap', 'NamedNodeMap'];\nconst ARRAY_REGEXP = /^(HTML\\w*Collection|NodeList)$/;\n\nconst testName = name =>\n OBJECT_NAMES.indexOf(name) !== -1 || ARRAY_REGEXP.test(name);\n\nconst test = val =>\n val &&\n val.constructor &&\n !!val.constructor.name &&\n testName(val.constructor.name);\n\nexports.test = test;\n\nconst isNamedNodeMap = collection =>\n collection.constructor.name === 'NamedNodeMap';\n\nconst serialize = (collection, config, indentation, depth, refs, printer) => {\n const name = collection.constructor.name;\n\n if (++depth > config.maxDepth) {\n return '[' + name + ']';\n }\n\n return (\n (config.min ? '' : name + SPACE) +\n (OBJECT_NAMES.indexOf(name) !== -1\n ? '{' +\n (0, _collections.printObjectProperties)(\n isNamedNodeMap(collection)\n ? Array.from(collection).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {})\n : {...collection},\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'\n : '[' +\n (0, _collections.printListItems)(\n Array.from(collection),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']')\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _markup = require('./lib/markup');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nconst ELEMENT_NODE = 1;\nconst TEXT_NODE = 3;\nconst COMMENT_NODE = 8;\nconst FRAGMENT_NODE = 11;\nconst ELEMENT_REGEXP = /^((HTML|SVG)\\w*)?Element$/;\n\nconst testHasAttribute = val => {\n try {\n return typeof val.hasAttribute === 'function' && val.hasAttribute('is');\n } catch {\n return false;\n }\n};\n\nconst testNode = val => {\n const constructorName = val.constructor.name;\n const {nodeType, tagName} = val;\n const isCustomElement =\n (typeof tagName === 'string' && tagName.includes('-')) ||\n testHasAttribute(val);\n return (\n (nodeType === ELEMENT_NODE &&\n (ELEMENT_REGEXP.test(constructorName) || isCustomElement)) ||\n (nodeType === TEXT_NODE && constructorName === 'Text') ||\n (nodeType === COMMENT_NODE && constructorName === 'Comment') ||\n (nodeType === FRAGMENT_NODE && constructorName === 'DocumentFragment')\n );\n};\n\nconst test = val => {\n var _val$constructor;\n\n return (\n (val === null || val === void 0\n ? void 0\n : (_val$constructor = val.constructor) === null ||\n _val$constructor === void 0\n ? void 0\n : _val$constructor.name) && testNode(val)\n );\n};\n\nexports.test = test;\n\nfunction nodeIsText(node) {\n return node.nodeType === TEXT_NODE;\n}\n\nfunction nodeIsComment(node) {\n return node.nodeType === COMMENT_NODE;\n}\n\nfunction nodeIsFragment(node) {\n return node.nodeType === FRAGMENT_NODE;\n}\n\nconst serialize = (node, config, indentation, depth, refs, printer) => {\n if (nodeIsText(node)) {\n return (0, _markup.printText)(node.data, config);\n }\n\n if (nodeIsComment(node)) {\n return (0, _markup.printComment)(node.data, config);\n }\n\n const type = nodeIsFragment(node)\n ? 'DocumentFragment'\n : node.tagName.toLowerCase();\n\n if (++depth > config.maxDepth) {\n return (0, _markup.printElementAsLeaf)(type, config);\n }\n\n return (0, _markup.printElement)(\n type,\n (0, _markup.printProps)(\n nodeIsFragment(node)\n ? []\n : Array.from(node.attributes)\n .map(attr => attr.name)\n .sort(),\n nodeIsFragment(node)\n ? {}\n : Array.from(node.attributes).reduce((props, attribute) => {\n props[attribute.name] = attribute.value;\n return props;\n }, {}),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n Array.prototype.slice.call(node.childNodes || node.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n};\n\nexports.serialize = serialize;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _collections = require('../collections');\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// SENTINEL constants are from https://github.com/facebook/immutable-js\nconst IS_ITERABLE_SENTINEL = '@@__IMMUTABLE_ITERABLE__@@';\nconst IS_LIST_SENTINEL = '@@__IMMUTABLE_LIST__@@';\nconst IS_KEYED_SENTINEL = '@@__IMMUTABLE_KEYED__@@';\nconst IS_MAP_SENTINEL = '@@__IMMUTABLE_MAP__@@';\nconst IS_ORDERED_SENTINEL = '@@__IMMUTABLE_ORDERED__@@';\nconst IS_RECORD_SENTINEL = '@@__IMMUTABLE_RECORD__@@'; // immutable v4\n\nconst IS_SEQ_SENTINEL = '@@__IMMUTABLE_SEQ__@@';\nconst IS_SET_SENTINEL = '@@__IMMUTABLE_SET__@@';\nconst IS_STACK_SENTINEL = '@@__IMMUTABLE_STACK__@@';\n\nconst getImmutableName = name => 'Immutable.' + name;\n\nconst printAsLeaf = name => '[' + name + ']';\n\nconst SPACE = ' ';\nconst LAZY = '…'; // Seq is lazy if it calls a method like filter\n\nconst printImmutableEntries = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}'; // Record has an entries method because it is a collection in immutable v3.\n// Return an iterator for Immutable Record from version v3 or v4.\n\nfunction getRecordEntries(val) {\n let i = 0;\n return {\n next() {\n if (i < val._keys.length) {\n const key = val._keys[i++];\n return {\n done: false,\n value: [key, val.get(key)]\n };\n }\n\n return {\n done: true,\n value: undefined\n };\n }\n };\n}\n\nconst printImmutableRecord = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer\n) => {\n // _name property is defined only for an Immutable Record instance\n // which was constructed with a second optional descriptive name arg\n const name = getImmutableName(val._name || 'Record');\n return ++depth > config.maxDepth\n ? printAsLeaf(name)\n : name +\n SPACE +\n '{' +\n (0, _collections.printIteratorEntries)(\n getRecordEntries(val),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n '}';\n};\n\nconst printImmutableSeq = (val, config, indentation, depth, refs, printer) => {\n const name = getImmutableName('Seq');\n\n if (++depth > config.maxDepth) {\n return printAsLeaf(name);\n }\n\n if (val[IS_KEYED_SENTINEL]) {\n return (\n name +\n SPACE +\n '{' + // from Immutable collection of entries or from ECMAScript object\n (val._iter || val._object\n ? (0, _collections.printIteratorEntries)(\n val.entries(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n '}'\n );\n }\n\n return (\n name +\n SPACE +\n '[' +\n (val._iter || // from Immutable collection of values\n val._array || // from ECMAScript array\n val._collection || // from ECMAScript collection in immutable v4\n val._iterable // from ECMAScript collection in immutable v3\n ? (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n )\n : LAZY) +\n ']'\n );\n};\n\nconst printImmutableValues = (\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n type\n) =>\n ++depth > config.maxDepth\n ? printAsLeaf(getImmutableName(type))\n : getImmutableName(type) +\n SPACE +\n '[' +\n (0, _collections.printIteratorValues)(\n val.values(),\n config,\n indentation,\n depth,\n refs,\n printer\n ) +\n ']';\n\nconst serialize = (val, config, indentation, depth, refs, printer) => {\n if (val[IS_MAP_SENTINEL]) {\n return printImmutableEntries(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedMap' : 'Map'\n );\n }\n\n if (val[IS_LIST_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'List'\n );\n }\n\n if (val[IS_SET_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n val[IS_ORDERED_SENTINEL] ? 'OrderedSet' : 'Set'\n );\n }\n\n if (val[IS_STACK_SENTINEL]) {\n return printImmutableValues(\n val,\n config,\n indentation,\n depth,\n refs,\n printer,\n 'Stack'\n );\n }\n\n if (val[IS_SEQ_SENTINEL]) {\n return printImmutableSeq(val, config, indentation, depth, refs, printer);\n } // For compatibility with immutable v3 and v4, let record be the default.\n\n return printImmutableRecord(val, config, indentation, depth, refs, printer);\n}; // Explicitly comparing sentinel properties to true avoids false positive\n// when mock identity-obj-proxy returns the key as the value for any key.\n\nexports.serialize = serialize;\n\nconst test = val =>\n val &&\n (val[IS_ITERABLE_SENTINEL] === true || val[IS_RECORD_SENTINEL] === true);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar ReactIs = _interopRequireWildcard(require('react-is'));\n\nvar _markup = require('./lib/markup');\n\nfunction _getRequireWildcardCache(nodeInterop) {\n if (typeof WeakMap !== 'function') return null;\n var cacheBabelInterop = new WeakMap();\n var cacheNodeInterop = new WeakMap();\n return (_getRequireWildcardCache = function (nodeInterop) {\n return nodeInterop ? cacheNodeInterop : cacheBabelInterop;\n })(nodeInterop);\n}\n\nfunction _interopRequireWildcard(obj, nodeInterop) {\n if (!nodeInterop && obj && obj.__esModule) {\n return obj;\n }\n if (obj === null || (typeof obj !== 'object' && typeof obj !== 'function')) {\n return {default: obj};\n }\n var cache = _getRequireWildcardCache(nodeInterop);\n if (cache && cache.has(obj)) {\n return cache.get(obj);\n }\n var newObj = {};\n var hasPropertyDescriptor =\n Object.defineProperty && Object.getOwnPropertyDescriptor;\n for (var key in obj) {\n if (key !== 'default' && Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = hasPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : null;\n if (desc && (desc.get || desc.set)) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n if (cache) {\n cache.set(obj, newObj);\n }\n return newObj;\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Given element.props.children, or subtree during recursive traversal,\n// return flattened array of children.\nconst getChildren = (arg, children = []) => {\n if (Array.isArray(arg)) {\n arg.forEach(item => {\n getChildren(item, children);\n });\n } else if (arg != null && arg !== false) {\n children.push(arg);\n }\n\n return children;\n};\n\nconst getType = element => {\n const type = element.type;\n\n if (typeof type === 'string') {\n return type;\n }\n\n if (typeof type === 'function') {\n return type.displayName || type.name || 'Unknown';\n }\n\n if (ReactIs.isFragment(element)) {\n return 'React.Fragment';\n }\n\n if (ReactIs.isSuspense(element)) {\n return 'React.Suspense';\n }\n\n if (typeof type === 'object' && type !== null) {\n if (ReactIs.isContextProvider(element)) {\n return 'Context.Provider';\n }\n\n if (ReactIs.isContextConsumer(element)) {\n return 'Context.Consumer';\n }\n\n if (ReactIs.isForwardRef(element)) {\n if (type.displayName) {\n return type.displayName;\n }\n\n const functionName = type.render.displayName || type.render.name || '';\n return functionName !== ''\n ? 'ForwardRef(' + functionName + ')'\n : 'ForwardRef';\n }\n\n if (ReactIs.isMemo(element)) {\n const functionName =\n type.displayName || type.type.displayName || type.type.name || '';\n return functionName !== '' ? 'Memo(' + functionName + ')' : 'Memo';\n }\n }\n\n return 'UNDEFINED';\n};\n\nconst getPropKeys = element => {\n const {props} = element;\n return Object.keys(props)\n .filter(key => key !== 'children' && props[key] !== undefined)\n .sort();\n};\n\nconst serialize = (element, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(getType(element), config)\n : (0, _markup.printElement)(\n getType(element),\n (0, _markup.printProps)(\n getPropKeys(element),\n element.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n (0, _markup.printChildren)(\n getChildren(element.props.children),\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n ),\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val != null && ReactIs.isElement(val);\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.test = exports.serialize = exports.default = void 0;\n\nvar _markup = require('./lib/markup');\n\nvar global = (function () {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n } else if (typeof global !== 'undefined') {\n return global;\n } else if (typeof self !== 'undefined') {\n return self;\n } else if (typeof window !== 'undefined') {\n return window;\n } else {\n return Function('return this')();\n }\n})();\n\nvar Symbol = global['jest-symbol-do-not-touch'] || global.Symbol;\nconst testSymbol =\n typeof Symbol === 'function' && Symbol.for\n ? Symbol.for('react.test.json')\n : 0xea71357;\n\nconst getPropKeys = object => {\n const {props} = object;\n return props\n ? Object.keys(props)\n .filter(key => props[key] !== undefined)\n .sort()\n : [];\n};\n\nconst serialize = (object, config, indentation, depth, refs, printer) =>\n ++depth > config.maxDepth\n ? (0, _markup.printElementAsLeaf)(object.type, config)\n : (0, _markup.printElement)(\n object.type,\n object.props\n ? (0, _markup.printProps)(\n getPropKeys(object),\n object.props,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n object.children\n ? (0, _markup.printChildren)(\n object.children,\n config,\n indentation + config.indent,\n depth,\n refs,\n printer\n )\n : '',\n config,\n indentation\n );\n\nexports.serialize = serialize;\n\nconst test = val => val && val.$$typeof === testSymbol;\n\nexports.test = test;\nconst plugin = {\n serialize,\n test\n};\nvar _default = plugin;\nexports.default = _default;\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.default = escapeHTML;\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nfunction escapeHTML(str) {\n return str.replace(/</g, '<').replace(/>/g, '>');\n}\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', {\n value: true\n});\nexports.printText =\n exports.printProps =\n exports.printElementAsLeaf =\n exports.printElement =\n exports.printComment =\n exports.printChildren =\n void 0;\n\nvar _escapeHTML = _interopRequireDefault(require('./escapeHTML'));\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {default: obj};\n}\n\n/**\n * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n// Return empty string if keys is empty.\nconst printProps = (keys, props, config, indentation, depth, refs, printer) => {\n const indentationNext = indentation + config.indent;\n const colors = config.colors;\n return keys\n .map(key => {\n const value = props[key];\n let printed = printer(value, config, indentationNext, depth, refs);\n\n if (typeof value !== 'string') {\n if (printed.indexOf('\\n') !== -1) {\n printed =\n config.spacingOuter +\n indentationNext +\n printed +\n config.spacingOuter +\n indentation;\n }\n\n printed = '{' + printed + '}';\n }\n\n return (\n config.spacingInner +\n indentation +\n colors.prop.open +\n key +\n colors.prop.close +\n '=' +\n colors.value.open +\n printed +\n colors.value.close\n );\n })\n .join('');\n}; // Return empty string if children is empty.\n\nexports.printProps = printProps;\n\nconst printChildren = (children, config, indentation, depth, refs, printer) =>\n children\n .map(\n child =>\n config.spacingOuter +\n indentation +\n (typeof child === 'string'\n ? printText(child, config)\n : printer(child, config, indentation, depth, refs))\n )\n .join('');\n\nexports.printChildren = printChildren;\n\nconst printText = (text, config) => {\n const contentColor = config.colors.content;\n return (\n contentColor.open + (0, _escapeHTML.default)(text) + contentColor.close\n );\n};\n\nexports.printText = printText;\n\nconst printComment = (comment, config) => {\n const commentColor = config.colors.comment;\n return (\n commentColor.open +\n '<!--' +\n (0, _escapeHTML.default)(comment) +\n '-->' +\n commentColor.close\n );\n}; // Separate the functions to format props, children, and element,\n// so a plugin could override a particular function, if needed.\n// Too bad, so sad: the traditional (but unnecessary) space\n// in a self-closing tagColor requires a second test of printedProps.\n\nexports.printComment = printComment;\n\nconst printElement = (\n type,\n printedProps,\n printedChildren,\n config,\n indentation\n) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n (printedProps &&\n tagColor.close +\n printedProps +\n config.spacingOuter +\n indentation +\n tagColor.open) +\n (printedChildren\n ? '>' +\n tagColor.close +\n printedChildren +\n config.spacingOuter +\n indentation +\n tagColor.open +\n '</' +\n type\n : (printedProps && !config.min ? '' : ' ') + '/') +\n '>' +\n tagColor.close\n );\n};\n\nexports.printElement = printElement;\n\nconst printElementAsLeaf = (type, config) => {\n const tagColor = config.colors.tag;\n return (\n tagColor.open +\n '<' +\n type +\n tagColor.close +\n ' …' +\n tagColor.open +\n ' />' +\n tagColor.close\n );\n};\n\nexports.printElementAsLeaf = printElementAsLeaf;\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nconst ANSI_BACKGROUND_OFFSET = 10;\n\nconst wrapAnsi256 = (offset = 0) => code => `\\u001B[${38 + offset};5;${code}m`;\n\nconst wrapAnsi16m = (offset = 0) => (red, green, blue) => `\\u001B[${38 + offset};2;${red};${green};${blue}m`;\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\toverline: [53, 55],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tstyles.color.ansi256 = wrapAnsi256();\n\tstyles.color.ansi16m = wrapAnsi16m();\n\tstyles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET);\n\tstyles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET);\n\n\t// From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js\n\tObject.defineProperties(styles, {\n\t\trgbToAnsi256: {\n\t\t\tvalue: (red, green, blue) => {\n\t\t\t\t// We use the extended greyscale palette here, with the exception of\n\t\t\t\t// black and white. normal palette only has 4 greyscale shades.\n\t\t\t\tif (red === green && green === blue) {\n\t\t\t\t\tif (red < 8) {\n\t\t\t\t\t\treturn 16;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (red > 248) {\n\t\t\t\t\t\treturn 231;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn Math.round(((red - 8) / 247) * 24) + 232;\n\t\t\t\t}\n\n\t\t\t\treturn 16 +\n\t\t\t\t\t(36 * Math.round(red / 255 * 5)) +\n\t\t\t\t\t(6 * Math.round(green / 255 * 5)) +\n\t\t\t\t\tMath.round(blue / 255 * 5);\n\t\t\t},\n\t\t\tenumerable: false\n\t\t},\n\t\thexToRgb: {\n\t\t\tvalue: hex => {\n\t\t\t\tconst matches = /(?<colorString>[a-f\\d]{6}|[a-f\\d]{3})/i.exec(hex.toString(16));\n\t\t\t\tif (!matches) {\n\t\t\t\t\treturn [0, 0, 0];\n\t\t\t\t}\n\n\t\t\t\tlet {colorString} = matches.groups;\n\n\t\t\t\tif (colorString.length === 3) {\n\t\t\t\t\tcolorString = colorString.split('').map(character => character + character).join('');\n\t\t\t\t}\n\n\t\t\t\tconst integer = Number.parseInt(colorString, 16);\n\n\t\t\t\treturn [\n\t\t\t\t\t(integer >> 16) & 0xFF,\n\t\t\t\t\t(integer >> 8) & 0xFF,\n\t\t\t\t\tinteger & 0xFF\n\t\t\t\t];\n\t\t\t},\n\t\t\tenumerable: false\n\t\t},\n\t\thexToAnsi256: {\n\t\t\tvalue: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)),\n\t\t\tenumerable: false\n\t\t}\n\t});\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar properties = [['aria-activedescendant', {\n 'type': 'id'\n}], ['aria-atomic', {\n 'type': 'boolean'\n}], ['aria-autocomplete', {\n 'type': 'token',\n 'values': ['inline', 'list', 'both', 'none']\n}], ['aria-braillelabel', {\n 'type': 'string'\n}], ['aria-brailleroledescription', {\n 'type': 'string'\n}], ['aria-busy', {\n 'type': 'boolean'\n}], ['aria-checked', {\n 'type': 'tristate'\n}], ['aria-colcount', {\n type: 'integer'\n}], ['aria-colindex', {\n type: 'integer'\n}], ['aria-colspan', {\n type: 'integer'\n}], ['aria-controls', {\n 'type': 'idlist'\n}], ['aria-current', {\n type: 'token',\n values: ['page', 'step', 'location', 'date', 'time', true, false]\n}], ['aria-describedby', {\n 'type': 'idlist'\n}], ['aria-description', {\n 'type': 'string'\n}], ['aria-details', {\n 'type': 'id'\n}], ['aria-disabled', {\n 'type': 'boolean'\n}], ['aria-dropeffect', {\n 'type': 'tokenlist',\n 'values': ['copy', 'execute', 'link', 'move', 'none', 'popup']\n}], ['aria-errormessage', {\n 'type': 'id'\n}], ['aria-expanded', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-flowto', {\n 'type': 'idlist'\n}], ['aria-grabbed', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-haspopup', {\n 'type': 'token',\n 'values': [false, true, 'menu', 'listbox', 'tree', 'grid', 'dialog']\n}], ['aria-hidden', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-invalid', {\n 'type': 'token',\n 'values': ['grammar', false, 'spelling', true]\n}], ['aria-keyshortcuts', {\n type: 'string'\n}], ['aria-label', {\n 'type': 'string'\n}], ['aria-labelledby', {\n 'type': 'idlist'\n}], ['aria-level', {\n 'type': 'integer'\n}], ['aria-live', {\n 'type': 'token',\n 'values': ['assertive', 'off', 'polite']\n}], ['aria-modal', {\n type: 'boolean'\n}], ['aria-multiline', {\n 'type': 'boolean'\n}], ['aria-multiselectable', {\n 'type': 'boolean'\n}], ['aria-orientation', {\n 'type': 'token',\n 'values': ['vertical', 'undefined', 'horizontal']\n}], ['aria-owns', {\n 'type': 'idlist'\n}], ['aria-placeholder', {\n type: 'string'\n}], ['aria-posinset', {\n 'type': 'integer'\n}], ['aria-pressed', {\n 'type': 'tristate'\n}], ['aria-readonly', {\n 'type': 'boolean'\n}], ['aria-relevant', {\n 'type': 'tokenlist',\n 'values': ['additions', 'all', 'removals', 'text']\n}], ['aria-required', {\n 'type': 'boolean'\n}], ['aria-roledescription', {\n type: 'string'\n}], ['aria-rowcount', {\n type: 'integer'\n}], ['aria-rowindex', {\n type: 'integer'\n}], ['aria-rowspan', {\n type: 'integer'\n}], ['aria-selected', {\n 'type': 'boolean',\n 'allowundefined': true\n}], ['aria-setsize', {\n 'type': 'integer'\n}], ['aria-sort', {\n 'type': 'token',\n 'values': ['ascending', 'descending', 'none', 'other']\n}], ['aria-valuemax', {\n 'type': 'number'\n}], ['aria-valuemin', {\n 'type': 'number'\n}], ['aria-valuenow', {\n 'type': 'number'\n}], ['aria-valuetext', {\n 'type': 'string'\n}]];\nvar ariaPropsMap = {\n entries: function entries() {\n return properties;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(properties),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, key, properties);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = properties.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!ariaPropsMap.get(key);\n },\n keys: function keys() {\n return properties.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return properties.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(ariaPropsMap, ariaPropsMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar dom = [['a', {\n reserved: false\n}], ['abbr', {\n reserved: false\n}], ['acronym', {\n reserved: false\n}], ['address', {\n reserved: false\n}], ['applet', {\n reserved: false\n}], ['area', {\n reserved: false\n}], ['article', {\n reserved: false\n}], ['aside', {\n reserved: false\n}], ['audio', {\n reserved: false\n}], ['b', {\n reserved: false\n}], ['base', {\n reserved: true\n}], ['bdi', {\n reserved: false\n}], ['bdo', {\n reserved: false\n}], ['big', {\n reserved: false\n}], ['blink', {\n reserved: false\n}], ['blockquote', {\n reserved: false\n}], ['body', {\n reserved: false\n}], ['br', {\n reserved: false\n}], ['button', {\n reserved: false\n}], ['canvas', {\n reserved: false\n}], ['caption', {\n reserved: false\n}], ['center', {\n reserved: false\n}], ['cite', {\n reserved: false\n}], ['code', {\n reserved: false\n}], ['col', {\n reserved: true\n}], ['colgroup', {\n reserved: true\n}], ['content', {\n reserved: false\n}], ['data', {\n reserved: false\n}], ['datalist', {\n reserved: false\n}], ['dd', {\n reserved: false\n}], ['del', {\n reserved: false\n}], ['details', {\n reserved: false\n}], ['dfn', {\n reserved: false\n}], ['dialog', {\n reserved: false\n}], ['dir', {\n reserved: false\n}], ['div', {\n reserved: false\n}], ['dl', {\n reserved: false\n}], ['dt', {\n reserved: false\n}], ['em', {\n reserved: false\n}], ['embed', {\n reserved: false\n}], ['fieldset', {\n reserved: false\n}], ['figcaption', {\n reserved: false\n}], ['figure', {\n reserved: false\n}], ['font', {\n reserved: false\n}], ['footer', {\n reserved: false\n}], ['form', {\n reserved: false\n}], ['frame', {\n reserved: false\n}], ['frameset', {\n reserved: false\n}], ['h1', {\n reserved: false\n}], ['h2', {\n reserved: false\n}], ['h3', {\n reserved: false\n}], ['h4', {\n reserved: false\n}], ['h5', {\n reserved: false\n}], ['h6', {\n reserved: false\n}], ['head', {\n reserved: true\n}], ['header', {\n reserved: false\n}], ['hgroup', {\n reserved: false\n}], ['hr', {\n reserved: false\n}], ['html', {\n reserved: true\n}], ['i', {\n reserved: false\n}], ['iframe', {\n reserved: false\n}], ['img', {\n reserved: false\n}], ['input', {\n reserved: false\n}], ['ins', {\n reserved: false\n}], ['kbd', {\n reserved: false\n}], ['keygen', {\n reserved: false\n}], ['label', {\n reserved: false\n}], ['legend', {\n reserved: false\n}], ['li', {\n reserved: false\n}], ['link', {\n reserved: true\n}], ['main', {\n reserved: false\n}], ['map', {\n reserved: false\n}], ['mark', {\n reserved: false\n}], ['marquee', {\n reserved: false\n}], ['menu', {\n reserved: false\n}], ['menuitem', {\n reserved: false\n}], ['meta', {\n reserved: true\n}], ['meter', {\n reserved: false\n}], ['nav', {\n reserved: false\n}], ['noembed', {\n reserved: true\n}], ['noscript', {\n reserved: true\n}], ['object', {\n reserved: false\n}], ['ol', {\n reserved: false\n}], ['optgroup', {\n reserved: false\n}], ['option', {\n reserved: false\n}], ['output', {\n reserved: false\n}], ['p', {\n reserved: false\n}], ['param', {\n reserved: true\n}], ['picture', {\n reserved: true\n}], ['pre', {\n reserved: false\n}], ['progress', {\n reserved: false\n}], ['q', {\n reserved: false\n}], ['rp', {\n reserved: false\n}], ['rt', {\n reserved: false\n}], ['rtc', {\n reserved: false\n}], ['ruby', {\n reserved: false\n}], ['s', {\n reserved: false\n}], ['samp', {\n reserved: false\n}], ['script', {\n reserved: true\n}], ['section', {\n reserved: false\n}], ['select', {\n reserved: false\n}], ['small', {\n reserved: false\n}], ['source', {\n reserved: true\n}], ['spacer', {\n reserved: false\n}], ['span', {\n reserved: false\n}], ['strike', {\n reserved: false\n}], ['strong', {\n reserved: false\n}], ['style', {\n reserved: true\n}], ['sub', {\n reserved: false\n}], ['summary', {\n reserved: false\n}], ['sup', {\n reserved: false\n}], ['table', {\n reserved: false\n}], ['tbody', {\n reserved: false\n}], ['td', {\n reserved: false\n}], ['textarea', {\n reserved: false\n}], ['tfoot', {\n reserved: false\n}], ['th', {\n reserved: false\n}], ['thead', {\n reserved: false\n}], ['time', {\n reserved: false\n}], ['title', {\n reserved: true\n}], ['tr', {\n reserved: false\n}], ['track', {\n reserved: true\n}], ['tt', {\n reserved: false\n}], ['u', {\n reserved: false\n}], ['ul', {\n reserved: false\n}], ['var', {\n reserved: false\n}], ['video', {\n reserved: false\n}], ['wbr', {\n reserved: false\n}], ['xmp', {\n reserved: false\n}]];\nvar domMap = {\n entries: function entries() {\n return dom;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(dom),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, key, dom);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = dom.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!domMap.get(key);\n },\n keys: function keys() {\n return dom.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return dom.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(domMap, domMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _lite = require(\"dequal/lite\");\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar elementRoles = [];\nvar keys = _rolesMap.default.keys();\nfor (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var role = _rolesMap.default.get(key);\n if (role) {\n var concepts = [].concat(role.baseConcepts, role.relatedConcepts);\n for (var k = 0; k < concepts.length; k++) {\n var relation = concepts[k];\n if (relation.module === 'HTML') {\n (function () {\n var concept = relation.concept;\n if (concept) {\n var elementRoleRelation = elementRoles.find(function (relation) {\n return (0, _lite.dequal)(relation, concept);\n });\n var roles;\n if (elementRoleRelation) {\n roles = elementRoleRelation[1];\n } else {\n roles = [];\n }\n var isUnique = true;\n for (var _i = 0; _i < roles.length; _i++) {\n if (roles[_i] === key) {\n isUnique = false;\n break;\n }\n }\n if (isUnique) {\n roles.push(key);\n }\n elementRoles.push([concept, roles]);\n }\n })();\n }\n }\n }\n}\nvar elementRoleMap = {\n entries: function entries() {\n return elementRoles;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(elementRoles),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n _key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, _key, elementRoles);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = elementRoles.find(function (tuple) {\n return key.name === tuple[0].name && (0, _lite.dequal)(key.attributes, tuple[0].attributes);\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!elementRoleMap.get(key);\n },\n keys: function keys() {\n return elementRoles.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return elementRoles.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(elementRoleMap, elementRoleMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar commandRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget']]\n};\nvar _default = commandRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar compositeRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-disabled': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget']]\n};\nvar _default = compositeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar inputRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null\n },\n relatedConcepts: [{\n concept: {\n name: 'input'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget']]\n};\nvar _default = inputRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar landmarkRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = landmarkRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rangeRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-valuemax': null,\n 'aria-valuemin': null,\n 'aria-valuenow': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = rangeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar roletypeRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {\n 'aria-atomic': null,\n 'aria-busy': null,\n 'aria-controls': null,\n 'aria-current': null,\n 'aria-describedby': null,\n 'aria-details': null,\n 'aria-dropeffect': null,\n 'aria-flowto': null,\n 'aria-grabbed': null,\n 'aria-hidden': null,\n 'aria-keyshortcuts': null,\n 'aria-label': null,\n 'aria-labelledby': null,\n 'aria-live': null,\n 'aria-owns': null,\n 'aria-relevant': null,\n 'aria-roledescription': null\n },\n relatedConcepts: [{\n concept: {\n name: 'role'\n },\n module: 'XHTML'\n }, {\n concept: {\n name: 'type'\n },\n module: 'Dublin Core'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: []\n};\nvar _default = roletypeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar sectionRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'frontmatter'\n },\n module: 'DTB'\n }, {\n concept: {\n name: 'level'\n },\n module: 'DTB'\n }, {\n concept: {\n name: 'level'\n },\n module: 'SMIL'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = sectionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar sectionheadRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = sectionheadRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar selectRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite'], ['roletype', 'structure', 'section', 'group']]\n};\nvar _default = selectRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar structureRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype']]\n};\nvar _default = structureRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar widgetRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype']]\n};\nvar _default = widgetRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar windowRole = {\n abstract: true,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-modal': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype']]\n};\nvar _default = windowRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _commandRole = _interopRequireDefault(require(\"./abstract/commandRole\"));\nvar _compositeRole = _interopRequireDefault(require(\"./abstract/compositeRole\"));\nvar _inputRole = _interopRequireDefault(require(\"./abstract/inputRole\"));\nvar _landmarkRole = _interopRequireDefault(require(\"./abstract/landmarkRole\"));\nvar _rangeRole = _interopRequireDefault(require(\"./abstract/rangeRole\"));\nvar _roletypeRole = _interopRequireDefault(require(\"./abstract/roletypeRole\"));\nvar _sectionRole = _interopRequireDefault(require(\"./abstract/sectionRole\"));\nvar _sectionheadRole = _interopRequireDefault(require(\"./abstract/sectionheadRole\"));\nvar _selectRole = _interopRequireDefault(require(\"./abstract/selectRole\"));\nvar _structureRole = _interopRequireDefault(require(\"./abstract/structureRole\"));\nvar _widgetRole = _interopRequireDefault(require(\"./abstract/widgetRole\"));\nvar _windowRole = _interopRequireDefault(require(\"./abstract/windowRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaAbstractRoles = [['command', _commandRole.default], ['composite', _compositeRole.default], ['input', _inputRole.default], ['landmark', _landmarkRole.default], ['range', _rangeRole.default], ['roletype', _roletypeRole.default], ['section', _sectionRole.default], ['sectionhead', _sectionheadRole.default], ['select', _selectRole.default], ['structure', _structureRole.default], ['widget', _widgetRole.default], ['window', _windowRole.default]];\nvar _default = ariaAbstractRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _docAbstractRole = _interopRequireDefault(require(\"./dpub/docAbstractRole\"));\nvar _docAcknowledgmentsRole = _interopRequireDefault(require(\"./dpub/docAcknowledgmentsRole\"));\nvar _docAfterwordRole = _interopRequireDefault(require(\"./dpub/docAfterwordRole\"));\nvar _docAppendixRole = _interopRequireDefault(require(\"./dpub/docAppendixRole\"));\nvar _docBacklinkRole = _interopRequireDefault(require(\"./dpub/docBacklinkRole\"));\nvar _docBiblioentryRole = _interopRequireDefault(require(\"./dpub/docBiblioentryRole\"));\nvar _docBibliographyRole = _interopRequireDefault(require(\"./dpub/docBibliographyRole\"));\nvar _docBibliorefRole = _interopRequireDefault(require(\"./dpub/docBibliorefRole\"));\nvar _docChapterRole = _interopRequireDefault(require(\"./dpub/docChapterRole\"));\nvar _docColophonRole = _interopRequireDefault(require(\"./dpub/docColophonRole\"));\nvar _docConclusionRole = _interopRequireDefault(require(\"./dpub/docConclusionRole\"));\nvar _docCoverRole = _interopRequireDefault(require(\"./dpub/docCoverRole\"));\nvar _docCreditRole = _interopRequireDefault(require(\"./dpub/docCreditRole\"));\nvar _docCreditsRole = _interopRequireDefault(require(\"./dpub/docCreditsRole\"));\nvar _docDedicationRole = _interopRequireDefault(require(\"./dpub/docDedicationRole\"));\nvar _docEndnoteRole = _interopRequireDefault(require(\"./dpub/docEndnoteRole\"));\nvar _docEndnotesRole = _interopRequireDefault(require(\"./dpub/docEndnotesRole\"));\nvar _docEpigraphRole = _interopRequireDefault(require(\"./dpub/docEpigraphRole\"));\nvar _docEpilogueRole = _interopRequireDefault(require(\"./dpub/docEpilogueRole\"));\nvar _docErrataRole = _interopRequireDefault(require(\"./dpub/docErrataRole\"));\nvar _docExampleRole = _interopRequireDefault(require(\"./dpub/docExampleRole\"));\nvar _docFootnoteRole = _interopRequireDefault(require(\"./dpub/docFootnoteRole\"));\nvar _docForewordRole = _interopRequireDefault(require(\"./dpub/docForewordRole\"));\nvar _docGlossaryRole = _interopRequireDefault(require(\"./dpub/docGlossaryRole\"));\nvar _docGlossrefRole = _interopRequireDefault(require(\"./dpub/docGlossrefRole\"));\nvar _docIndexRole = _interopRequireDefault(require(\"./dpub/docIndexRole\"));\nvar _docIntroductionRole = _interopRequireDefault(require(\"./dpub/docIntroductionRole\"));\nvar _docNoterefRole = _interopRequireDefault(require(\"./dpub/docNoterefRole\"));\nvar _docNoticeRole = _interopRequireDefault(require(\"./dpub/docNoticeRole\"));\nvar _docPagebreakRole = _interopRequireDefault(require(\"./dpub/docPagebreakRole\"));\nvar _docPagelistRole = _interopRequireDefault(require(\"./dpub/docPagelistRole\"));\nvar _docPartRole = _interopRequireDefault(require(\"./dpub/docPartRole\"));\nvar _docPrefaceRole = _interopRequireDefault(require(\"./dpub/docPrefaceRole\"));\nvar _docPrologueRole = _interopRequireDefault(require(\"./dpub/docPrologueRole\"));\nvar _docPullquoteRole = _interopRequireDefault(require(\"./dpub/docPullquoteRole\"));\nvar _docQnaRole = _interopRequireDefault(require(\"./dpub/docQnaRole\"));\nvar _docSubtitleRole = _interopRequireDefault(require(\"./dpub/docSubtitleRole\"));\nvar _docTipRole = _interopRequireDefault(require(\"./dpub/docTipRole\"));\nvar _docTocRole = _interopRequireDefault(require(\"./dpub/docTocRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaDpubRoles = [['doc-abstract', _docAbstractRole.default], ['doc-acknowledgments', _docAcknowledgmentsRole.default], ['doc-afterword', _docAfterwordRole.default], ['doc-appendix', _docAppendixRole.default], ['doc-backlink', _docBacklinkRole.default], ['doc-biblioentry', _docBiblioentryRole.default], ['doc-bibliography', _docBibliographyRole.default], ['doc-biblioref', _docBibliorefRole.default], ['doc-chapter', _docChapterRole.default], ['doc-colophon', _docColophonRole.default], ['doc-conclusion', _docConclusionRole.default], ['doc-cover', _docCoverRole.default], ['doc-credit', _docCreditRole.default], ['doc-credits', _docCreditsRole.default], ['doc-dedication', _docDedicationRole.default], ['doc-endnote', _docEndnoteRole.default], ['doc-endnotes', _docEndnotesRole.default], ['doc-epigraph', _docEpigraphRole.default], ['doc-epilogue', _docEpilogueRole.default], ['doc-errata', _docErrataRole.default], ['doc-example', _docExampleRole.default], ['doc-footnote', _docFootnoteRole.default], ['doc-foreword', _docForewordRole.default], ['doc-glossary', _docGlossaryRole.default], ['doc-glossref', _docGlossrefRole.default], ['doc-index', _docIndexRole.default], ['doc-introduction', _docIntroductionRole.default], ['doc-noteref', _docNoterefRole.default], ['doc-notice', _docNoticeRole.default], ['doc-pagebreak', _docPagebreakRole.default], ['doc-pagelist', _docPagelistRole.default], ['doc-part', _docPartRole.default], ['doc-preface', _docPrefaceRole.default], ['doc-prologue', _docPrologueRole.default], ['doc-pullquote', _docPullquoteRole.default], ['doc-qna', _docQnaRole.default], ['doc-subtitle', _docSubtitleRole.default], ['doc-tip', _docTipRole.default], ['doc-toc', _docTocRole.default]];\nvar _default = ariaDpubRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _graphicsDocumentRole = _interopRequireDefault(require(\"./graphics/graphicsDocumentRole\"));\nvar _graphicsObjectRole = _interopRequireDefault(require(\"./graphics/graphicsObjectRole\"));\nvar _graphicsSymbolRole = _interopRequireDefault(require(\"./graphics/graphicsSymbolRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaGraphicsRoles = [['graphics-document', _graphicsDocumentRole.default], ['graphics-object', _graphicsObjectRole.default], ['graphics-symbol', _graphicsSymbolRole.default]];\nvar _default = ariaGraphicsRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _alertRole = _interopRequireDefault(require(\"./literal/alertRole\"));\nvar _alertdialogRole = _interopRequireDefault(require(\"./literal/alertdialogRole\"));\nvar _applicationRole = _interopRequireDefault(require(\"./literal/applicationRole\"));\nvar _articleRole = _interopRequireDefault(require(\"./literal/articleRole\"));\nvar _bannerRole = _interopRequireDefault(require(\"./literal/bannerRole\"));\nvar _blockquoteRole = _interopRequireDefault(require(\"./literal/blockquoteRole\"));\nvar _buttonRole = _interopRequireDefault(require(\"./literal/buttonRole\"));\nvar _captionRole = _interopRequireDefault(require(\"./literal/captionRole\"));\nvar _cellRole = _interopRequireDefault(require(\"./literal/cellRole\"));\nvar _checkboxRole = _interopRequireDefault(require(\"./literal/checkboxRole\"));\nvar _codeRole = _interopRequireDefault(require(\"./literal/codeRole\"));\nvar _columnheaderRole = _interopRequireDefault(require(\"./literal/columnheaderRole\"));\nvar _comboboxRole = _interopRequireDefault(require(\"./literal/comboboxRole\"));\nvar _complementaryRole = _interopRequireDefault(require(\"./literal/complementaryRole\"));\nvar _contentinfoRole = _interopRequireDefault(require(\"./literal/contentinfoRole\"));\nvar _definitionRole = _interopRequireDefault(require(\"./literal/definitionRole\"));\nvar _deletionRole = _interopRequireDefault(require(\"./literal/deletionRole\"));\nvar _dialogRole = _interopRequireDefault(require(\"./literal/dialogRole\"));\nvar _directoryRole = _interopRequireDefault(require(\"./literal/directoryRole\"));\nvar _documentRole = _interopRequireDefault(require(\"./literal/documentRole\"));\nvar _emphasisRole = _interopRequireDefault(require(\"./literal/emphasisRole\"));\nvar _feedRole = _interopRequireDefault(require(\"./literal/feedRole\"));\nvar _figureRole = _interopRequireDefault(require(\"./literal/figureRole\"));\nvar _formRole = _interopRequireDefault(require(\"./literal/formRole\"));\nvar _genericRole = _interopRequireDefault(require(\"./literal/genericRole\"));\nvar _gridRole = _interopRequireDefault(require(\"./literal/gridRole\"));\nvar _gridcellRole = _interopRequireDefault(require(\"./literal/gridcellRole\"));\nvar _groupRole = _interopRequireDefault(require(\"./literal/groupRole\"));\nvar _headingRole = _interopRequireDefault(require(\"./literal/headingRole\"));\nvar _imgRole = _interopRequireDefault(require(\"./literal/imgRole\"));\nvar _insertionRole = _interopRequireDefault(require(\"./literal/insertionRole\"));\nvar _linkRole = _interopRequireDefault(require(\"./literal/linkRole\"));\nvar _listRole = _interopRequireDefault(require(\"./literal/listRole\"));\nvar _listboxRole = _interopRequireDefault(require(\"./literal/listboxRole\"));\nvar _listitemRole = _interopRequireDefault(require(\"./literal/listitemRole\"));\nvar _logRole = _interopRequireDefault(require(\"./literal/logRole\"));\nvar _mainRole = _interopRequireDefault(require(\"./literal/mainRole\"));\nvar _markRole = _interopRequireDefault(require(\"./literal/markRole\"));\nvar _marqueeRole = _interopRequireDefault(require(\"./literal/marqueeRole\"));\nvar _mathRole = _interopRequireDefault(require(\"./literal/mathRole\"));\nvar _menuRole = _interopRequireDefault(require(\"./literal/menuRole\"));\nvar _menubarRole = _interopRequireDefault(require(\"./literal/menubarRole\"));\nvar _menuitemRole = _interopRequireDefault(require(\"./literal/menuitemRole\"));\nvar _menuitemcheckboxRole = _interopRequireDefault(require(\"./literal/menuitemcheckboxRole\"));\nvar _menuitemradioRole = _interopRequireDefault(require(\"./literal/menuitemradioRole\"));\nvar _meterRole = _interopRequireDefault(require(\"./literal/meterRole\"));\nvar _navigationRole = _interopRequireDefault(require(\"./literal/navigationRole\"));\nvar _noneRole = _interopRequireDefault(require(\"./literal/noneRole\"));\nvar _noteRole = _interopRequireDefault(require(\"./literal/noteRole\"));\nvar _optionRole = _interopRequireDefault(require(\"./literal/optionRole\"));\nvar _paragraphRole = _interopRequireDefault(require(\"./literal/paragraphRole\"));\nvar _presentationRole = _interopRequireDefault(require(\"./literal/presentationRole\"));\nvar _progressbarRole = _interopRequireDefault(require(\"./literal/progressbarRole\"));\nvar _radioRole = _interopRequireDefault(require(\"./literal/radioRole\"));\nvar _radiogroupRole = _interopRequireDefault(require(\"./literal/radiogroupRole\"));\nvar _regionRole = _interopRequireDefault(require(\"./literal/regionRole\"));\nvar _rowRole = _interopRequireDefault(require(\"./literal/rowRole\"));\nvar _rowgroupRole = _interopRequireDefault(require(\"./literal/rowgroupRole\"));\nvar _rowheaderRole = _interopRequireDefault(require(\"./literal/rowheaderRole\"));\nvar _scrollbarRole = _interopRequireDefault(require(\"./literal/scrollbarRole\"));\nvar _searchRole = _interopRequireDefault(require(\"./literal/searchRole\"));\nvar _searchboxRole = _interopRequireDefault(require(\"./literal/searchboxRole\"));\nvar _separatorRole = _interopRequireDefault(require(\"./literal/separatorRole\"));\nvar _sliderRole = _interopRequireDefault(require(\"./literal/sliderRole\"));\nvar _spinbuttonRole = _interopRequireDefault(require(\"./literal/spinbuttonRole\"));\nvar _statusRole = _interopRequireDefault(require(\"./literal/statusRole\"));\nvar _strongRole = _interopRequireDefault(require(\"./literal/strongRole\"));\nvar _subscriptRole = _interopRequireDefault(require(\"./literal/subscriptRole\"));\nvar _superscriptRole = _interopRequireDefault(require(\"./literal/superscriptRole\"));\nvar _switchRole = _interopRequireDefault(require(\"./literal/switchRole\"));\nvar _tabRole = _interopRequireDefault(require(\"./literal/tabRole\"));\nvar _tableRole = _interopRequireDefault(require(\"./literal/tableRole\"));\nvar _tablistRole = _interopRequireDefault(require(\"./literal/tablistRole\"));\nvar _tabpanelRole = _interopRequireDefault(require(\"./literal/tabpanelRole\"));\nvar _termRole = _interopRequireDefault(require(\"./literal/termRole\"));\nvar _textboxRole = _interopRequireDefault(require(\"./literal/textboxRole\"));\nvar _timeRole = _interopRequireDefault(require(\"./literal/timeRole\"));\nvar _timerRole = _interopRequireDefault(require(\"./literal/timerRole\"));\nvar _toolbarRole = _interopRequireDefault(require(\"./literal/toolbarRole\"));\nvar _tooltipRole = _interopRequireDefault(require(\"./literal/tooltipRole\"));\nvar _treeRole = _interopRequireDefault(require(\"./literal/treeRole\"));\nvar _treegridRole = _interopRequireDefault(require(\"./literal/treegridRole\"));\nvar _treeitemRole = _interopRequireDefault(require(\"./literal/treeitemRole\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar ariaLiteralRoles = [['alert', _alertRole.default], ['alertdialog', _alertdialogRole.default], ['application', _applicationRole.default], ['article', _articleRole.default], ['banner', _bannerRole.default], ['blockquote', _blockquoteRole.default], ['button', _buttonRole.default], ['caption', _captionRole.default], ['cell', _cellRole.default], ['checkbox', _checkboxRole.default], ['code', _codeRole.default], ['columnheader', _columnheaderRole.default], ['combobox', _comboboxRole.default], ['complementary', _complementaryRole.default], ['contentinfo', _contentinfoRole.default], ['definition', _definitionRole.default], ['deletion', _deletionRole.default], ['dialog', _dialogRole.default], ['directory', _directoryRole.default], ['document', _documentRole.default], ['emphasis', _emphasisRole.default], ['feed', _feedRole.default], ['figure', _figureRole.default], ['form', _formRole.default], ['generic', _genericRole.default], ['grid', _gridRole.default], ['gridcell', _gridcellRole.default], ['group', _groupRole.default], ['heading', _headingRole.default], ['img', _imgRole.default], ['insertion', _insertionRole.default], ['link', _linkRole.default], ['list', _listRole.default], ['listbox', _listboxRole.default], ['listitem', _listitemRole.default], ['log', _logRole.default], ['main', _mainRole.default], ['mark', _markRole.default], ['marquee', _marqueeRole.default], ['math', _mathRole.default], ['menu', _menuRole.default], ['menubar', _menubarRole.default], ['menuitem', _menuitemRole.default], ['menuitemcheckbox', _menuitemcheckboxRole.default], ['menuitemradio', _menuitemradioRole.default], ['meter', _meterRole.default], ['navigation', _navigationRole.default], ['none', _noneRole.default], ['note', _noteRole.default], ['option', _optionRole.default], ['paragraph', _paragraphRole.default], ['presentation', _presentationRole.default], ['progressbar', _progressbarRole.default], ['radio', _radioRole.default], ['radiogroup', _radiogroupRole.default], ['region', _regionRole.default], ['row', _rowRole.default], ['rowgroup', _rowgroupRole.default], ['rowheader', _rowheaderRole.default], ['scrollbar', _scrollbarRole.default], ['search', _searchRole.default], ['searchbox', _searchboxRole.default], ['separator', _separatorRole.default], ['slider', _sliderRole.default], ['spinbutton', _spinbuttonRole.default], ['status', _statusRole.default], ['strong', _strongRole.default], ['subscript', _subscriptRole.default], ['superscript', _superscriptRole.default], ['switch', _switchRole.default], ['tab', _tabRole.default], ['table', _tableRole.default], ['tablist', _tablistRole.default], ['tabpanel', _tabpanelRole.default], ['term', _termRole.default], ['textbox', _textboxRole.default], ['time', _timeRole.default], ['timer', _timerRole.default], ['toolbar', _toolbarRole.default], ['tooltip', _tooltipRole.default], ['tree', _treeRole.default], ['treegrid', _treegridRole.default], ['treeitem', _treeitemRole.default]];\nvar _default = ariaLiteralRoles;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAbstractRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'abstract [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docAbstractRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAcknowledgmentsRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'acknowledgments [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docAcknowledgmentsRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAfterwordRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'afterword [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docAfterwordRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docAppendixRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'appendix [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docAppendixRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBacklinkRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'referrer [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docBacklinkRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBiblioentryRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'EPUB biblioentry [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: ['doc-bibliography'],\n requiredContextRole: ['doc-bibliography'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'listitem']]\n};\nvar _default = docBiblioentryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBibliographyRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'bibliography [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['doc-biblioentry']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docBibliographyRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docBibliorefRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'biblioref [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docBibliorefRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docChapterRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'chapter [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docChapterRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docColophonRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'colophon [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docColophonRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docConclusionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'conclusion [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docConclusionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docCoverRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'cover [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'img']]\n};\nvar _default = docCoverRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docCreditRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'credit [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docCreditRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docCreditsRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'credits [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docCreditsRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docDedicationRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'dedication [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docDedicationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEndnoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'rearnote [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: ['doc-endnotes'],\n requiredContextRole: ['doc-endnotes'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'listitem']]\n};\nvar _default = docEndnoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEndnotesRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'rearnotes [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['doc-endnote']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docEndnotesRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEpigraphRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'epigraph [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docEpigraphRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docEpilogueRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'epilogue [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docEpilogueRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docErrataRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'errata [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docErrataRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docExampleRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docExampleRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docFootnoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'footnote [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docFootnoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docForewordRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'foreword [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docForewordRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docGlossaryRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'glossary [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['definition'], ['term']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docGlossaryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docGlossrefRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'glossref [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docGlossrefRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docIndexRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'index [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]\n};\nvar _default = docIndexRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docIntroductionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'introduction [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docIntroductionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docNoterefRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'noteref [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command', 'link']]\n};\nvar _default = docNoterefRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docNoticeRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'notice [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'note']]\n};\nvar _default = docNoticeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPagebreakRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'pagebreak [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'separator']]\n};\nvar _default = docPagebreakRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPagelistRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'page-list [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]\n};\nvar _default = docPagelistRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPartRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'part [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docPartRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPrefaceRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'preface [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docPrefaceRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPrologueRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'prologue [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = docPrologueRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docPullquoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'pullquote [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['none']]\n};\nvar _default = docPullquoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docQnaRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'qna [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = docQnaRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docSubtitleRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'subtitle [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'sectionhead']]\n};\nvar _default = docSubtitleRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docTipRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'help [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'note']]\n};\nvar _default = docTipRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar docTocRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'toc [EPUB-SSV]'\n },\n module: 'EPUB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark', 'navigation']]\n};\nvar _default = docTocRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar graphicsDocumentRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n module: 'GRAPHICS',\n concept: {\n name: 'graphics-object'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'img'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'article'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'document']]\n};\nvar _default = graphicsDocumentRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar graphicsObjectRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n module: 'GRAPHICS',\n concept: {\n name: 'graphics-document'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'group'\n }\n }, {\n module: 'ARIA',\n concept: {\n name: 'img'\n }\n }, {\n module: 'GRAPHICS',\n concept: {\n name: 'graphics-symbol'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'group']]\n};\nvar _default = graphicsObjectRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar graphicsSymbolRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'img']]\n};\nvar _default = graphicsSymbolRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar alertRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-atomic': 'true',\n 'aria-live': 'assertive'\n },\n relatedConcepts: [{\n concept: {\n name: 'alert'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = alertRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar alertdialogRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'alert'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'alert'], ['roletype', 'window', 'dialog']]\n};\nvar _default = alertdialogRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar applicationRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null\n },\n relatedConcepts: [{\n concept: {\n name: 'Device Independence Delivery Unit'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = applicationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar articleRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n name: 'article'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'document']]\n};\nvar _default = articleRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar bannerRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n constraints: ['scoped to the body element'],\n name: 'header'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = bannerRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar blockquoteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'blockquote'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = blockquoteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar buttonRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-pressed': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'button'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'type',\n value: 'image'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'type',\n value: 'reset'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'type',\n value: 'submit'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'button'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'trigger'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command']]\n};\nvar _default = buttonRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar captionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'caption'\n },\n module: 'HTML'\n }],\n requireContextRole: ['figure', 'grid', 'table'],\n requiredContextRole: ['figure', 'grid', 'table'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = captionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar cellRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-colindex': null,\n 'aria-colspan': null,\n 'aria-rowindex': null,\n 'aria-rowspan': null\n },\n relatedConcepts: [{\n concept: {\n constraints: ['ancestor table element has table role'],\n name: 'td'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row'],\n requiredContextRole: ['row'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = cellRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar checkboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-checked': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'checkbox'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'option'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = checkboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar codeRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'code'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = codeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar columnheaderRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-sort': null\n },\n relatedConcepts: [{\n concept: {\n name: 'th'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'scope',\n value: 'col'\n }],\n name: 'th'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'scope',\n value: 'colgroup'\n }],\n name: 'th'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row'],\n requiredContextRole: ['row'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'structure', 'section', 'cell', 'gridcell'], ['roletype', 'widget', 'gridcell'], ['roletype', 'structure', 'sectionhead']]\n};\nvar _default = columnheaderRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar comboboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-autocomplete': null,\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-expanded': 'false',\n 'aria-haspopup': 'listbox'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'email'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'search'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'tel'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'text'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'url'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'list'\n }, {\n name: 'type',\n value: 'url'\n }],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'multiple'\n }, {\n constraints: ['undefined'],\n name: 'size'\n }],\n constraints: ['the multiple attribute is not set and the size attribute does not have a value greater than 1'],\n name: 'select'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'select'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-controls': null,\n 'aria-expanded': 'false'\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = comboboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar complementaryRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'aside'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-label'\n }],\n constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'aside'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-labelledby'\n }],\n constraints: ['scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'aside'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = complementaryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar contentinfoRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n constraints: ['scoped to the body element'],\n name: 'footer'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = contentinfoRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar definitionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'dd'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = definitionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar deletionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'del'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = deletionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar dialogRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'dialog'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'window']]\n};\nvar _default = dialogRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar directoryRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n module: 'DAISY Guide'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'list']]\n};\nvar _default = directoryRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar documentRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'Device Independence Delivery Unit'\n }\n }, {\n concept: {\n name: 'html'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = documentRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar emphasisRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'em'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = emphasisRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar feedRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['article']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'list']]\n};\nvar _default = feedRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar figureRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'figure'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = figureRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar formRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-label'\n }],\n name: 'form'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-labelledby'\n }],\n name: 'form'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'name'\n }],\n name: 'form'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = formRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar genericRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'a'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'area'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'aside'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'b'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'bdo'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'body'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'data'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'div'\n },\n module: 'HTML'\n }, {\n concept: {\n constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'footer'\n },\n module: 'HTML'\n }, {\n concept: {\n constraints: ['scoped to the main element', 'scoped to a sectioning content element', 'scoped to a sectioning root element other than body'],\n name: 'header'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'hgroup'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'i'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'pre'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'q'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'samp'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'section'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'small'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'span'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'u'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = genericRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar gridRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-multiselectable': null,\n 'aria-readonly': null\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['row'], ['row', 'rowgroup']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite'], ['roletype', 'structure', 'section', 'table']]\n};\nvar _default = gridRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar gridcellRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-selected': null\n },\n relatedConcepts: [{\n concept: {\n constraints: ['ancestor table element has grid role', 'ancestor table element has treegrid role'],\n name: 'td'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row'],\n requiredContextRole: ['row'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'widget']]\n};\nvar _default = gridcellRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar groupRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-disabled': null\n },\n relatedConcepts: [{\n concept: {\n name: 'details'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'fieldset'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'optgroup'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'address'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = groupRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar headingRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-level': '2'\n },\n relatedConcepts: [{\n concept: {\n name: 'h1'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h2'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h3'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h4'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h5'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'h6'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-level': '2'\n },\n superClass: [['roletype', 'structure', 'sectionhead']]\n};\nvar _default = headingRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar imgRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'alt'\n }],\n name: 'img'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'alt'\n }],\n name: 'img'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'imggroup'\n },\n module: 'DTB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = imgRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar insertionRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'ins'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = insertionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar linkRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'href'\n }],\n name: 'a'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'href'\n }],\n name: 'area'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command']]\n};\nvar _default = linkRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar listRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'menu'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'ol'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'ul'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['listitem']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = listRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar listboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-expanded': null,\n 'aria-invalid': null,\n 'aria-multiselectable': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-orientation': 'vertical'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['>1'],\n name: 'size'\n }],\n constraints: ['the size attribute value is greater than 1'],\n name: 'select'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'multiple'\n }],\n name: 'select'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'datalist'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'list'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'select'\n },\n module: 'XForms'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['option', 'group'], ['option']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = listboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar listitemRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-level': null,\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n constraints: ['direct descendant of ol', 'direct descendant of ul', 'direct descendant of menu'],\n name: 'li'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'item'\n },\n module: 'XForms'\n }],\n requireContextRole: ['directory', 'list'],\n requiredContextRole: ['directory', 'list'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = listitemRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar logRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-live': 'polite'\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = logRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar mainRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'main'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = mainRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar markRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: [],\n props: {\n 'aria-braillelabel': null,\n 'aria-brailleroledescription': null,\n 'aria-description': null\n },\n relatedConcepts: [{\n concept: {\n name: 'mark'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = markRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar marqueeRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = marqueeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar mathRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'math'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = mathRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': 'vertical'\n },\n relatedConcepts: [{\n concept: {\n name: 'MENU'\n },\n module: 'JAPI'\n }, {\n concept: {\n name: 'list'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'select'\n },\n module: 'XForms'\n }, {\n concept: {\n name: 'sidebar'\n },\n module: 'DTB'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = menuRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menubarRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': 'horizontal'\n },\n relatedConcepts: [{\n concept: {\n name: 'toolbar'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['menuitem', 'group'], ['menuitemradio', 'group'], ['menuitemcheckbox', 'group'], ['menuitem'], ['menuitemcheckbox'], ['menuitemradio']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select', 'menu'], ['roletype', 'structure', 'section', 'group', 'select', 'menu']]\n};\nvar _default = menubarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuitemRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n name: 'MENU_ITEM'\n },\n module: 'JAPI'\n }, {\n concept: {\n name: 'listitem'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'option'\n },\n module: 'ARIA'\n }],\n requireContextRole: ['group', 'menu', 'menubar'],\n requiredContextRole: ['group', 'menu', 'menubar'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'command']]\n};\nvar _default = menuitemRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuitemcheckboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'menuitem'\n },\n module: 'ARIA'\n }],\n requireContextRole: ['group', 'menu', 'menubar'],\n requiredContextRole: ['group', 'menu', 'menubar'],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input', 'checkbox'], ['roletype', 'widget', 'command', 'menuitem']]\n};\nvar _default = menuitemcheckboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar menuitemradioRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'menuitem'\n },\n module: 'ARIA'\n }],\n requireContextRole: ['group', 'menu', 'menubar'],\n requiredContextRole: ['group', 'menu', 'menubar'],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input', 'checkbox', 'menuitemcheckbox'], ['roletype', 'widget', 'command', 'menuitem', 'menuitemcheckbox'], ['roletype', 'widget', 'input', 'radio']]\n};\nvar _default = menuitemradioRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar meterRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-valuetext': null,\n 'aria-valuemax': '100',\n 'aria-valuemin': '0'\n },\n relatedConcepts: [{\n concept: {\n name: 'meter'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-valuenow': null\n },\n superClass: [['roletype', 'structure', 'range']]\n};\nvar _default = meterRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar navigationRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'nav'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = navigationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar noneRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: [],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: []\n};\nvar _default = noneRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar noteRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = noteRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar optionRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-checked': null,\n 'aria-posinset': null,\n 'aria-setsize': null,\n 'aria-selected': 'false'\n },\n relatedConcepts: [{\n concept: {\n name: 'item'\n },\n module: 'XForms'\n }, {\n concept: {\n name: 'listitem'\n },\n module: 'ARIA'\n }, {\n concept: {\n name: 'option'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-selected': 'false'\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = optionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar paragraphRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'p'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = paragraphRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar presentationRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'alt',\n value: ''\n }],\n name: 'img'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = presentationRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar progressbarRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-valuetext': null\n },\n relatedConcepts: [{\n concept: {\n name: 'progress'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'status'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'range'], ['roletype', 'widget']]\n};\nvar _default = progressbarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar radioRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-checked': null,\n 'aria-posinset': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'radio'\n }],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = radioRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar radiogroupRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null\n },\n relatedConcepts: [{\n concept: {\n name: 'list'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['radio']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = radiogroupRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar regionRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-label'\n }],\n name: 'section'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['set'],\n name: 'aria-labelledby'\n }],\n name: 'section'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'Device Independence Glossart perceivable unit'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = regionRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rowRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-colindex': null,\n 'aria-expanded': null,\n 'aria-level': null,\n 'aria-posinset': null,\n 'aria-rowindex': null,\n 'aria-selected': null,\n 'aria-setsize': null\n },\n relatedConcepts: [{\n concept: {\n name: 'tr'\n },\n module: 'HTML'\n }],\n requireContextRole: ['grid', 'rowgroup', 'table', 'treegrid'],\n requiredContextRole: ['grid', 'rowgroup', 'table', 'treegrid'],\n requiredOwnedElements: [['cell'], ['columnheader'], ['gridcell'], ['rowheader']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'group'], ['roletype', 'widget']]\n};\nvar _default = rowRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rowgroupRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'tbody'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'tfoot'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'thead'\n },\n module: 'HTML'\n }],\n requireContextRole: ['grid', 'table', 'treegrid'],\n requiredContextRole: ['grid', 'table', 'treegrid'],\n requiredOwnedElements: [['row']],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = rowgroupRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar rowheaderRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-sort': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'scope',\n value: 'row'\n }],\n name: 'th'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n name: 'scope',\n value: 'rowgroup'\n }],\n name: 'th'\n },\n module: 'HTML'\n }],\n requireContextRole: ['row', 'rowgroup'],\n requiredContextRole: ['row', 'rowgroup'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'cell'], ['roletype', 'structure', 'section', 'cell', 'gridcell'], ['roletype', 'widget', 'gridcell'], ['roletype', 'structure', 'sectionhead']]\n};\nvar _default = rowheaderRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar scrollbarRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-valuetext': null,\n 'aria-orientation': 'vertical',\n 'aria-valuemax': '100',\n 'aria-valuemin': '0'\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-controls': null,\n 'aria-valuenow': null\n },\n superClass: [['roletype', 'structure', 'range'], ['roletype', 'widget']]\n};\nvar _default = scrollbarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar searchRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'landmark']]\n};\nvar _default = searchRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar searchboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'search'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'input', 'textbox']]\n};\nvar _default = searchboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar separatorRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-orientation': 'horizontal',\n 'aria-valuemax': '100',\n 'aria-valuemin': '0',\n 'aria-valuenow': null,\n 'aria-valuetext': null\n },\n relatedConcepts: [{\n concept: {\n name: 'hr'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure']]\n};\nvar _default = separatorRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar sliderRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-haspopup': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-valuetext': null,\n 'aria-orientation': 'horizontal',\n 'aria-valuemax': '100',\n 'aria-valuemin': '0'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'range'\n }],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-valuenow': null\n },\n superClass: [['roletype', 'widget', 'input'], ['roletype', 'structure', 'range']]\n};\nvar _default = sliderRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar spinbuttonRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-readonly': null,\n 'aria-required': null,\n 'aria-valuetext': null,\n 'aria-valuenow': '0'\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n name: 'type',\n value: 'number'\n }],\n name: 'input'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite'], ['roletype', 'widget', 'input'], ['roletype', 'structure', 'range']]\n};\nvar _default = spinbuttonRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar statusRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-atomic': 'true',\n 'aria-live': 'polite'\n },\n relatedConcepts: [{\n concept: {\n name: 'output'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = statusRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar strongRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'strong'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = strongRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar subscriptRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'sub'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = subscriptRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar superscriptRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['prohibited'],\n prohibitedProps: ['aria-label', 'aria-labelledby'],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'sup'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = superscriptRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar switchRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'button'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-checked': null\n },\n superClass: [['roletype', 'widget', 'input', 'checkbox']]\n};\nvar _default = switchRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tabRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: true,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-disabled': null,\n 'aria-expanded': null,\n 'aria-haspopup': null,\n 'aria-posinset': null,\n 'aria-setsize': null,\n 'aria-selected': 'false'\n },\n relatedConcepts: [],\n requireContextRole: ['tablist'],\n requiredContextRole: ['tablist'],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'sectionhead'], ['roletype', 'widget']]\n};\nvar _default = tabRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tableRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-colcount': null,\n 'aria-rowcount': null\n },\n relatedConcepts: [{\n concept: {\n name: 'table'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['row'], ['row', 'rowgroup']],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = tableRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tablistRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-level': null,\n 'aria-multiselectable': null,\n 'aria-orientation': 'horizontal'\n },\n relatedConcepts: [{\n module: 'DAISY',\n concept: {\n name: 'guide'\n }\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['tab']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite']]\n};\nvar _default = tablistRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tabpanelRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = tabpanelRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar termRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'dfn'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'dt'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = termRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar textboxRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-activedescendant': null,\n 'aria-autocomplete': null,\n 'aria-errormessage': null,\n 'aria-haspopup': null,\n 'aria-invalid': null,\n 'aria-multiline': null,\n 'aria-placeholder': null,\n 'aria-readonly': null,\n 'aria-required': null\n },\n relatedConcepts: [{\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'type'\n }, {\n constraints: ['undefined'],\n name: 'list'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'email'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'tel'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'text'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n attributes: [{\n constraints: ['undefined'],\n name: 'list'\n }, {\n name: 'type',\n value: 'url'\n }],\n constraints: ['the list attribute is not set'],\n name: 'input'\n },\n module: 'HTML'\n }, {\n concept: {\n name: 'input'\n },\n module: 'XForms'\n }, {\n concept: {\n name: 'textarea'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'input']]\n};\nvar _default = textboxRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar timeRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [{\n concept: {\n name: 'time'\n },\n module: 'HTML'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = timeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar timerRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'status']]\n};\nvar _default = timerRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar toolbarRole = {\n abstract: false,\n accessibleNameRequired: false,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-orientation': 'horizontal'\n },\n relatedConcepts: [{\n concept: {\n name: 'menubar'\n },\n module: 'ARIA'\n }],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section', 'group']]\n};\nvar _default = toolbarRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar tooltipRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [],\n requiredProps: {},\n superClass: [['roletype', 'structure', 'section']]\n};\nvar _default = tooltipRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar treeRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {\n 'aria-errormessage': null,\n 'aria-invalid': null,\n 'aria-multiselectable': null,\n 'aria-required': null,\n 'aria-orientation': 'vertical'\n },\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['treeitem', 'group'], ['treeitem']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'select'], ['roletype', 'structure', 'section', 'group', 'select']]\n};\nvar _default = treeRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar treegridRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author'],\n prohibitedProps: [],\n props: {},\n relatedConcepts: [],\n requireContextRole: [],\n requiredContextRole: [],\n requiredOwnedElements: [['row'], ['row', 'rowgroup']],\n requiredProps: {},\n superClass: [['roletype', 'widget', 'composite', 'grid'], ['roletype', 'structure', 'section', 'table', 'grid'], ['roletype', 'widget', 'composite', 'select', 'tree'], ['roletype', 'structure', 'section', 'group', 'select', 'tree']]\n};\nvar _default = treegridRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar treeitemRole = {\n abstract: false,\n accessibleNameRequired: true,\n baseConcepts: [],\n childrenPresentational: false,\n nameFrom: ['author', 'contents'],\n prohibitedProps: [],\n props: {\n 'aria-expanded': null,\n 'aria-haspopup': null\n },\n relatedConcepts: [],\n requireContextRole: ['group', 'tree'],\n requiredContextRole: ['group', 'tree'],\n requiredOwnedElements: [],\n requiredProps: {\n 'aria-selected': null\n },\n superClass: [['roletype', 'structure', 'section', 'listitem'], ['roletype', 'widget', 'input', 'option']]\n};\nvar _default = treeitemRole;\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.roles = exports.roleElements = exports.elementRoles = exports.dom = exports.aria = void 0;\nvar _ariaPropsMap = _interopRequireDefault(require(\"./ariaPropsMap\"));\nvar _domMap = _interopRequireDefault(require(\"./domMap\"));\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\nvar _elementRoleMap = _interopRequireDefault(require(\"./elementRoleMap\"));\nvar _roleElementMap = _interopRequireDefault(require(\"./roleElementMap\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar aria = _ariaPropsMap.default;\nexports.aria = aria;\nvar dom = _domMap.default;\nexports.dom = dom;\nvar roles = _rolesMap.default;\nexports.roles = roles;\nvar elementRoles = _elementRoleMap.default;\nexports.elementRoles = elementRoles;\nvar roleElements = _roleElementMap.default;\nexports.roleElements = roleElements;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nvar _rolesMap = _interopRequireDefault(require(\"./rolesMap\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nvar roleElement = [];\nvar keys = _rolesMap.default.keys();\nfor (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var role = _rolesMap.default.get(key);\n var relationConcepts = [];\n if (role) {\n var concepts = [].concat(role.baseConcepts, role.relatedConcepts);\n for (var k = 0; k < concepts.length; k++) {\n var relation = concepts[k];\n if (relation.module === 'HTML') {\n var concept = relation.concept;\n if (concept != null) {\n relationConcepts.push(concept);\n }\n }\n }\n if (relationConcepts.length > 0) {\n roleElement.push([key, relationConcepts]);\n }\n }\n}\nvar roleElementMap = {\n entries: function entries() {\n return roleElement;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator = _createForOfIteratorHelper(roleElement),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _step$value = _slicedToArray(_step.value, 2),\n _key = _step$value[0],\n values = _step$value[1];\n fn.call(thisArg, values, _key, roleElement);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n },\n get: function get(key) {\n var item = roleElement.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!roleElementMap.get(key);\n },\n keys: function keys() {\n return roleElement.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n key = _ref2[0];\n return key;\n });\n },\n values: function values() {\n return roleElement.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 2),\n values = _ref4[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(roleElementMap, roleElementMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _ariaAbstractRoles = _interopRequireDefault(require(\"./etc/roles/ariaAbstractRoles\"));\nvar _ariaLiteralRoles = _interopRequireDefault(require(\"./etc/roles/ariaLiteralRoles\"));\nvar _ariaDpubRoles = _interopRequireDefault(require(\"./etc/roles/ariaDpubRoles\"));\nvar _ariaGraphicsRoles = _interopRequireDefault(require(\"./etc/roles/ariaGraphicsRoles\"));\nvar _iterationDecorator = _interopRequireDefault(require(\"./util/iterationDecorator\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nvar roles = [].concat(_ariaAbstractRoles.default, _ariaLiteralRoles.default, _ariaDpubRoles.default, _ariaGraphicsRoles.default);\nroles.forEach(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n roleDefinition = _ref2[1];\n // Conglomerate the properties\n var _iterator = _createForOfIteratorHelper(roleDefinition.superClass),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var superClassIter = _step.value;\n var _iterator2 = _createForOfIteratorHelper(superClassIter),\n _step2;\n try {\n var _loop = function _loop() {\n var superClassName = _step2.value;\n var superClassRoleTuple = roles.find(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n name = _ref4[0];\n return name === superClassName;\n });\n if (superClassRoleTuple) {\n var superClassDefinition = superClassRoleTuple[1];\n for (var _i2 = 0, _Object$keys = Object.keys(superClassDefinition.props); _i2 < _Object$keys.length; _i2++) {\n var prop = _Object$keys[_i2];\n if (\n // $FlowIssue Accessing the hasOwnProperty on the Object prototype is fine.\n !Object.prototype.hasOwnProperty.call(roleDefinition.props, prop)) {\n Object.assign(roleDefinition.props, _defineProperty({}, prop, superClassDefinition.props[prop]));\n }\n }\n }\n };\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n _loop();\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n});\nvar rolesMap = {\n entries: function entries() {\n return roles;\n },\n forEach: function forEach(fn) {\n var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var _iterator3 = _createForOfIteratorHelper(roles),\n _step3;\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var _step3$value = _slicedToArray(_step3.value, 2),\n key = _step3$value[0],\n values = _step3$value[1];\n fn.call(thisArg, values, key, roles);\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n },\n get: function get(key) {\n var item = roles.find(function (tuple) {\n return tuple[0] === key ? true : false;\n });\n return item && item[1];\n },\n has: function has(key) {\n return !!rolesMap.get(key);\n },\n keys: function keys() {\n return roles.map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 1),\n key = _ref6[0];\n return key;\n });\n },\n values: function values() {\n return roles.map(function (_ref7) {\n var _ref8 = _slicedToArray(_ref7, 2),\n values = _ref8[1];\n return values;\n });\n }\n};\nvar _default = (0, _iterationDecorator.default)(rolesMap, rolesMap.entries());\nexports.default = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = iterationDecorator;\nvar _iteratorProxy = _interopRequireDefault(require(\"./iteratorProxy\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction iterationDecorator(collection, entries) {\n if (typeof Symbol === 'function' && _typeof(Symbol.iterator) === 'symbol') {\n Object.defineProperty(collection, Symbol.iterator, {\n value: _iteratorProxy.default.bind(entries)\n });\n }\n return collection;\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\n// eslint-disable-next-line no-unused-vars\nfunction iteratorProxy() {\n var values = this;\n var index = 0;\n var iter = {\n '@@iterator': function iterator() {\n return iter;\n },\n next: function next() {\n if (index < values.length) {\n var value = values[index];\n index = index + 1;\n return {\n done: false,\n value: value\n };\n } else {\n return {\n done: true\n };\n }\n }\n };\n return iter;\n}\nvar _default = iteratorProxy;\nexports.default = _default;","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f);else for(t in e)e[t]&&(n&&(n+=\" \"),n+=t);return n}export function clsx(){for(var e,t,f=0,n=\"\";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Lookup tables\n\t var SBOX = [];\n\t var INV_SBOX = [];\n\t var SUB_MIX_0 = [];\n\t var SUB_MIX_1 = [];\n\t var SUB_MIX_2 = [];\n\t var SUB_MIX_3 = [];\n\t var INV_SUB_MIX_0 = [];\n\t var INV_SUB_MIX_1 = [];\n\t var INV_SUB_MIX_2 = [];\n\t var INV_SUB_MIX_3 = [];\n\n\t // Compute lookup tables\n\t (function () {\n\t // Compute double table\n\t var d = [];\n\t for (var i = 0; i < 256; i++) {\n\t if (i < 128) {\n\t d[i] = i << 1;\n\t } else {\n\t d[i] = (i << 1) ^ 0x11b;\n\t }\n\t }\n\n\t // Walk GF(2^8)\n\t var x = 0;\n\t var xi = 0;\n\t for (var i = 0; i < 256; i++) {\n\t // Compute sbox\n\t var sx = xi ^ (xi << 1) ^ (xi << 2) ^ (xi << 3) ^ (xi << 4);\n\t sx = (sx >>> 8) ^ (sx & 0xff) ^ 0x63;\n\t SBOX[x] = sx;\n\t INV_SBOX[sx] = x;\n\n\t // Compute multiplication\n\t var x2 = d[x];\n\t var x4 = d[x2];\n\t var x8 = d[x4];\n\n\t // Compute sub bytes, mix columns tables\n\t var t = (d[sx] * 0x101) ^ (sx * 0x1010100);\n\t SUB_MIX_0[x] = (t << 24) | (t >>> 8);\n\t SUB_MIX_1[x] = (t << 16) | (t >>> 16);\n\t SUB_MIX_2[x] = (t << 8) | (t >>> 24);\n\t SUB_MIX_3[x] = t;\n\n\t // Compute inv sub bytes, inv mix columns tables\n\t var t = (x8 * 0x1010101) ^ (x4 * 0x10001) ^ (x2 * 0x101) ^ (x * 0x1010100);\n\t INV_SUB_MIX_0[sx] = (t << 24) | (t >>> 8);\n\t INV_SUB_MIX_1[sx] = (t << 16) | (t >>> 16);\n\t INV_SUB_MIX_2[sx] = (t << 8) | (t >>> 24);\n\t INV_SUB_MIX_3[sx] = t;\n\n\t // Compute next counter\n\t if (!x) {\n\t x = xi = 1;\n\t } else {\n\t x = x2 ^ d[d[d[x8 ^ x2]]];\n\t xi ^= d[d[xi]];\n\t }\n\t }\n\t }());\n\n\t // Precomputed Rcon lookup\n\t var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];\n\n\t /**\n\t * AES block cipher algorithm.\n\t */\n\t var AES = C_algo.AES = BlockCipher.extend({\n\t _doReset: function () {\n\t var t;\n\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._nRounds && this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t // Compute number of rounds\n\t var nRounds = this._nRounds = keySize + 6;\n\n\t // Compute number of key schedule rows\n\t var ksRows = (nRounds + 1) * 4;\n\n\t // Compute key schedule\n\t var keySchedule = this._keySchedule = [];\n\t for (var ksRow = 0; ksRow < ksRows; ksRow++) {\n\t if (ksRow < keySize) {\n\t keySchedule[ksRow] = keyWords[ksRow];\n\t } else {\n\t t = keySchedule[ksRow - 1];\n\n\t if (!(ksRow % keySize)) {\n\t // Rot word\n\t t = (t << 8) | (t >>> 24);\n\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\n\t // Mix Rcon\n\t t ^= RCON[(ksRow / keySize) | 0] << 24;\n\t } else if (keySize > 6 && ksRow % keySize == 4) {\n\t // Sub word\n\t t = (SBOX[t >>> 24] << 24) | (SBOX[(t >>> 16) & 0xff] << 16) | (SBOX[(t >>> 8) & 0xff] << 8) | SBOX[t & 0xff];\n\t }\n\n\t keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;\n\t }\n\t }\n\n\t // Compute inv key schedule\n\t var invKeySchedule = this._invKeySchedule = [];\n\t for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {\n\t var ksRow = ksRows - invKsRow;\n\n\t if (invKsRow % 4) {\n\t var t = keySchedule[ksRow];\n\t } else {\n\t var t = keySchedule[ksRow - 4];\n\t }\n\n\t if (invKsRow < 4 || ksRow <= 4) {\n\t invKeySchedule[invKsRow] = t;\n\t } else {\n\t invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^\n\t INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];\n\t }\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t // Swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\n\t this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX);\n\n\t // Inv swap 2nd and 4th rows\n\t var t = M[offset + 1];\n\t M[offset + 1] = M[offset + 3];\n\t M[offset + 3] = t;\n\t },\n\n\t _doCryptBlock: function (M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {\n\t // Shortcut\n\t var nRounds = this._nRounds;\n\n\t // Get input, add round key\n\t var s0 = M[offset] ^ keySchedule[0];\n\t var s1 = M[offset + 1] ^ keySchedule[1];\n\t var s2 = M[offset + 2] ^ keySchedule[2];\n\t var s3 = M[offset + 3] ^ keySchedule[3];\n\n\t // Key schedule row counter\n\t var ksRow = 4;\n\n\t // Rounds\n\t for (var round = 1; round < nRounds; round++) {\n\t // Shift rows, sub bytes, mix columns, add round key\n\t var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[(s1 >>> 16) & 0xff] ^ SUB_MIX_2[(s2 >>> 8) & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];\n\t var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[(s2 >>> 16) & 0xff] ^ SUB_MIX_2[(s3 >>> 8) & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];\n\t var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[(s3 >>> 16) & 0xff] ^ SUB_MIX_2[(s0 >>> 8) & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];\n\t var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[(s0 >>> 16) & 0xff] ^ SUB_MIX_2[(s1 >>> 8) & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++];\n\n\t // Update state\n\t s0 = t0;\n\t s1 = t1;\n\t s2 = t2;\n\t s3 = t3;\n\t }\n\n\t // Shift rows, sub bytes, add round key\n\t var t0 = ((SBOX[s0 >>> 24] << 24) | (SBOX[(s1 >>> 16) & 0xff] << 16) | (SBOX[(s2 >>> 8) & 0xff] << 8) | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];\n\t var t1 = ((SBOX[s1 >>> 24] << 24) | (SBOX[(s2 >>> 16) & 0xff] << 16) | (SBOX[(s3 >>> 8) & 0xff] << 8) | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];\n\t var t2 = ((SBOX[s2 >>> 24] << 24) | (SBOX[(s3 >>> 16) & 0xff] << 16) | (SBOX[(s0 >>> 8) & 0xff] << 8) | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];\n\t var t3 = ((SBOX[s3 >>> 24] << 24) | (SBOX[(s0 >>> 16) & 0xff] << 16) | (SBOX[(s1 >>> 8) & 0xff] << 8) | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++];\n\n\t // Set output\n\t M[offset] = t0;\n\t M[offset + 1] = t1;\n\t M[offset + 2] = t2;\n\t M[offset + 3] = t3;\n\t },\n\n\t keySize: 256/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.AES = BlockCipher._createHelper(AES);\n\t}());\n\n\n\treturn CryptoJS.AES;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t const N = 16;\n\n\t //Origin pbox and sbox, derived from PI\n\t const ORIG_P = [\n\t 0x243F6A88, 0x85A308D3, 0x13198A2E, 0x03707344,\n\t 0xA4093822, 0x299F31D0, 0x082EFA98, 0xEC4E6C89,\n\t 0x452821E6, 0x38D01377, 0xBE5466CF, 0x34E90C6C,\n\t 0xC0AC29B7, 0xC97C50DD, 0x3F84D5B5, 0xB5470917,\n\t 0x9216D5D9, 0x8979FB1B\n\t ];\n\n\t const ORIG_S = [\n\t [ 0xD1310BA6, 0x98DFB5AC, 0x2FFD72DB, 0xD01ADFB7,\n\t 0xB8E1AFED, 0x6A267E96, 0xBA7C9045, 0xF12C7F99,\n\t 0x24A19947, 0xB3916CF7, 0x0801F2E2, 0x858EFC16,\n\t 0x636920D8, 0x71574E69, 0xA458FEA3, 0xF4933D7E,\n\t 0x0D95748F, 0x728EB658, 0x718BCD58, 0x82154AEE,\n\t 0x7B54A41D, 0xC25A59B5, 0x9C30D539, 0x2AF26013,\n\t 0xC5D1B023, 0x286085F0, 0xCA417918, 0xB8DB38EF,\n\t 0x8E79DCB0, 0x603A180E, 0x6C9E0E8B, 0xB01E8A3E,\n\t 0xD71577C1, 0xBD314B27, 0x78AF2FDA, 0x55605C60,\n\t 0xE65525F3, 0xAA55AB94, 0x57489862, 0x63E81440,\n\t 0x55CA396A, 0x2AAB10B6, 0xB4CC5C34, 0x1141E8CE,\n\t 0xA15486AF, 0x7C72E993, 0xB3EE1411, 0x636FBC2A,\n\t 0x2BA9C55D, 0x741831F6, 0xCE5C3E16, 0x9B87931E,\n\t 0xAFD6BA33, 0x6C24CF5C, 0x7A325381, 0x28958677,\n\t 0x3B8F4898, 0x6B4BB9AF, 0xC4BFE81B, 0x66282193,\n\t 0x61D809CC, 0xFB21A991, 0x487CAC60, 0x5DEC8032,\n\t 0xEF845D5D, 0xE98575B1, 0xDC262302, 0xEB651B88,\n\t 0x23893E81, 0xD396ACC5, 0x0F6D6FF3, 0x83F44239,\n\t 0x2E0B4482, 0xA4842004, 0x69C8F04A, 0x9E1F9B5E,\n\t 0x21C66842, 0xF6E96C9A, 0x670C9C61, 0xABD388F0,\n\t 0x6A51A0D2, 0xD8542F68, 0x960FA728, 0xAB5133A3,\n\t 0x6EEF0B6C, 0x137A3BE4, 0xBA3BF050, 0x7EFB2A98,\n\t 0xA1F1651D, 0x39AF0176, 0x66CA593E, 0x82430E88,\n\t 0x8CEE8619, 0x456F9FB4, 0x7D84A5C3, 0x3B8B5EBE,\n\t 0xE06F75D8, 0x85C12073, 0x401A449F, 0x56C16AA6,\n\t 0x4ED3AA62, 0x363F7706, 0x1BFEDF72, 0x429B023D,\n\t 0x37D0D724, 0xD00A1248, 0xDB0FEAD3, 0x49F1C09B,\n\t 0x075372C9, 0x80991B7B, 0x25D479D8, 0xF6E8DEF7,\n\t 0xE3FE501A, 0xB6794C3B, 0x976CE0BD, 0x04C006BA,\n\t 0xC1A94FB6, 0x409F60C4, 0x5E5C9EC2, 0x196A2463,\n\t 0x68FB6FAF, 0x3E6C53B5, 0x1339B2EB, 0x3B52EC6F,\n\t 0x6DFC511F, 0x9B30952C, 0xCC814544, 0xAF5EBD09,\n\t 0xBEE3D004, 0xDE334AFD, 0x660F2807, 0x192E4BB3,\n\t 0xC0CBA857, 0x45C8740F, 0xD20B5F39, 0xB9D3FBDB,\n\t 0x5579C0BD, 0x1A60320A, 0xD6A100C6, 0x402C7279,\n\t 0x679F25FE, 0xFB1FA3CC, 0x8EA5E9F8, 0xDB3222F8,\n\t 0x3C7516DF, 0xFD616B15, 0x2F501EC8, 0xAD0552AB,\n\t 0x323DB5FA, 0xFD238760, 0x53317B48, 0x3E00DF82,\n\t 0x9E5C57BB, 0xCA6F8CA0, 0x1A87562E, 0xDF1769DB,\n\t 0xD542A8F6, 0x287EFFC3, 0xAC6732C6, 0x8C4F5573,\n\t 0x695B27B0, 0xBBCA58C8, 0xE1FFA35D, 0xB8F011A0,\n\t 0x10FA3D98, 0xFD2183B8, 0x4AFCB56C, 0x2DD1D35B,\n\t 0x9A53E479, 0xB6F84565, 0xD28E49BC, 0x4BFB9790,\n\t 0xE1DDF2DA, 0xA4CB7E33, 0x62FB1341, 0xCEE4C6E8,\n\t 0xEF20CADA, 0x36774C01, 0xD07E9EFE, 0x2BF11FB4,\n\t 0x95DBDA4D, 0xAE909198, 0xEAAD8E71, 0x6B93D5A0,\n\t 0xD08ED1D0, 0xAFC725E0, 0x8E3C5B2F, 0x8E7594B7,\n\t 0x8FF6E2FB, 0xF2122B64, 0x8888B812, 0x900DF01C,\n\t 0x4FAD5EA0, 0x688FC31C, 0xD1CFF191, 0xB3A8C1AD,\n\t 0x2F2F2218, 0xBE0E1777, 0xEA752DFE, 0x8B021FA1,\n\t 0xE5A0CC0F, 0xB56F74E8, 0x18ACF3D6, 0xCE89E299,\n\t 0xB4A84FE0, 0xFD13E0B7, 0x7CC43B81, 0xD2ADA8D9,\n\t 0x165FA266, 0x80957705, 0x93CC7314, 0x211A1477,\n\t 0xE6AD2065, 0x77B5FA86, 0xC75442F5, 0xFB9D35CF,\n\t 0xEBCDAF0C, 0x7B3E89A0, 0xD6411BD3, 0xAE1E7E49,\n\t 0x00250E2D, 0x2071B35E, 0x226800BB, 0x57B8E0AF,\n\t 0x2464369B, 0xF009B91E, 0x5563911D, 0x59DFA6AA,\n\t 0x78C14389, 0xD95A537F, 0x207D5BA2, 0x02E5B9C5,\n\t 0x83260376, 0x6295CFA9, 0x11C81968, 0x4E734A41,\n\t 0xB3472DCA, 0x7B14A94A, 0x1B510052, 0x9A532915,\n\t 0xD60F573F, 0xBC9BC6E4, 0x2B60A476, 0x81E67400,\n\t 0x08BA6FB5, 0x571BE91F, 0xF296EC6B, 0x2A0DD915,\n\t 0xB6636521, 0xE7B9F9B6, 0xFF34052E, 0xC5855664,\n\t 0x53B02D5D, 0xA99F8FA1, 0x08BA4799, 0x6E85076A ],\n\t [ 0x4B7A70E9, 0xB5B32944, 0xDB75092E, 0xC4192623,\n\t 0xAD6EA6B0, 0x49A7DF7D, 0x9CEE60B8, 0x8FEDB266,\n\t 0xECAA8C71, 0x699A17FF, 0x5664526C, 0xC2B19EE1,\n\t 0x193602A5, 0x75094C29, 0xA0591340, 0xE4183A3E,\n\t 0x3F54989A, 0x5B429D65, 0x6B8FE4D6, 0x99F73FD6,\n\t 0xA1D29C07, 0xEFE830F5, 0x4D2D38E6, 0xF0255DC1,\n\t 0x4CDD2086, 0x8470EB26, 0x6382E9C6, 0x021ECC5E,\n\t 0x09686B3F, 0x3EBAEFC9, 0x3C971814, 0x6B6A70A1,\n\t 0x687F3584, 0x52A0E286, 0xB79C5305, 0xAA500737,\n\t 0x3E07841C, 0x7FDEAE5C, 0x8E7D44EC, 0x5716F2B8,\n\t 0xB03ADA37, 0xF0500C0D, 0xF01C1F04, 0x0200B3FF,\n\t 0xAE0CF51A, 0x3CB574B2, 0x25837A58, 0xDC0921BD,\n\t 0xD19113F9, 0x7CA92FF6, 0x94324773, 0x22F54701,\n\t 0x3AE5E581, 0x37C2DADC, 0xC8B57634, 0x9AF3DDA7,\n\t 0xA9446146, 0x0FD0030E, 0xECC8C73E, 0xA4751E41,\n\t 0xE238CD99, 0x3BEA0E2F, 0x3280BBA1, 0x183EB331,\n\t 0x4E548B38, 0x4F6DB908, 0x6F420D03, 0xF60A04BF,\n\t 0x2CB81290, 0x24977C79, 0x5679B072, 0xBCAF89AF,\n\t 0xDE9A771F, 0xD9930810, 0xB38BAE12, 0xDCCF3F2E,\n\t 0x5512721F, 0x2E6B7124, 0x501ADDE6, 0x9F84CD87,\n\t 0x7A584718, 0x7408DA17, 0xBC9F9ABC, 0xE94B7D8C,\n\t 0xEC7AEC3A, 0xDB851DFA, 0x63094366, 0xC464C3D2,\n\t 0xEF1C1847, 0x3215D908, 0xDD433B37, 0x24C2BA16,\n\t 0x12A14D43, 0x2A65C451, 0x50940002, 0x133AE4DD,\n\t 0x71DFF89E, 0x10314E55, 0x81AC77D6, 0x5F11199B,\n\t 0x043556F1, 0xD7A3C76B, 0x3C11183B, 0x5924A509,\n\t 0xF28FE6ED, 0x97F1FBFA, 0x9EBABF2C, 0x1E153C6E,\n\t 0x86E34570, 0xEAE96FB1, 0x860E5E0A, 0x5A3E2AB3,\n\t 0x771FE71C, 0x4E3D06FA, 0x2965DCB9, 0x99E71D0F,\n\t 0x803E89D6, 0x5266C825, 0x2E4CC978, 0x9C10B36A,\n\t 0xC6150EBA, 0x94E2EA78, 0xA5FC3C53, 0x1E0A2DF4,\n\t 0xF2F74EA7, 0x361D2B3D, 0x1939260F, 0x19C27960,\n\t 0x5223A708, 0xF71312B6, 0xEBADFE6E, 0xEAC31F66,\n\t 0xE3BC4595, 0xA67BC883, 0xB17F37D1, 0x018CFF28,\n\t 0xC332DDEF, 0xBE6C5AA5, 0x65582185, 0x68AB9802,\n\t 0xEECEA50F, 0xDB2F953B, 0x2AEF7DAD, 0x5B6E2F84,\n\t 0x1521B628, 0x29076170, 0xECDD4775, 0x619F1510,\n\t 0x13CCA830, 0xEB61BD96, 0x0334FE1E, 0xAA0363CF,\n\t 0xB5735C90, 0x4C70A239, 0xD59E9E0B, 0xCBAADE14,\n\t 0xEECC86BC, 0x60622CA7, 0x9CAB5CAB, 0xB2F3846E,\n\t 0x648B1EAF, 0x19BDF0CA, 0xA02369B9, 0x655ABB50,\n\t 0x40685A32, 0x3C2AB4B3, 0x319EE9D5, 0xC021B8F7,\n\t 0x9B540B19, 0x875FA099, 0x95F7997E, 0x623D7DA8,\n\t 0xF837889A, 0x97E32D77, 0x11ED935F, 0x16681281,\n\t 0x0E358829, 0xC7E61FD6, 0x96DEDFA1, 0x7858BA99,\n\t 0x57F584A5, 0x1B227263, 0x9B83C3FF, 0x1AC24696,\n\t 0xCDB30AEB, 0x532E3054, 0x8FD948E4, 0x6DBC3128,\n\t 0x58EBF2EF, 0x34C6FFEA, 0xFE28ED61, 0xEE7C3C73,\n\t 0x5D4A14D9, 0xE864B7E3, 0x42105D14, 0x203E13E0,\n\t 0x45EEE2B6, 0xA3AAABEA, 0xDB6C4F15, 0xFACB4FD0,\n\t 0xC742F442, 0xEF6ABBB5, 0x654F3B1D, 0x41CD2105,\n\t 0xD81E799E, 0x86854DC7, 0xE44B476A, 0x3D816250,\n\t 0xCF62A1F2, 0x5B8D2646, 0xFC8883A0, 0xC1C7B6A3,\n\t 0x7F1524C3, 0x69CB7492, 0x47848A0B, 0x5692B285,\n\t 0x095BBF00, 0xAD19489D, 0x1462B174, 0x23820E00,\n\t 0x58428D2A, 0x0C55F5EA, 0x1DADF43E, 0x233F7061,\n\t 0x3372F092, 0x8D937E41, 0xD65FECF1, 0x6C223BDB,\n\t 0x7CDE3759, 0xCBEE7460, 0x4085F2A7, 0xCE77326E,\n\t 0xA6078084, 0x19F8509E, 0xE8EFD855, 0x61D99735,\n\t 0xA969A7AA, 0xC50C06C2, 0x5A04ABFC, 0x800BCADC,\n\t 0x9E447A2E, 0xC3453484, 0xFDD56705, 0x0E1E9EC9,\n\t 0xDB73DBD3, 0x105588CD, 0x675FDA79, 0xE3674340,\n\t 0xC5C43465, 0x713E38D8, 0x3D28F89E, 0xF16DFF20,\n\t 0x153E21E7, 0x8FB03D4A, 0xE6E39F2B, 0xDB83ADF7 ],\n\t [ 0xE93D5A68, 0x948140F7, 0xF64C261C, 0x94692934,\n\t 0x411520F7, 0x7602D4F7, 0xBCF46B2E, 0xD4A20068,\n\t 0xD4082471, 0x3320F46A, 0x43B7D4B7, 0x500061AF,\n\t 0x1E39F62E, 0x97244546, 0x14214F74, 0xBF8B8840,\n\t 0x4D95FC1D, 0x96B591AF, 0x70F4DDD3, 0x66A02F45,\n\t 0xBFBC09EC, 0x03BD9785, 0x7FAC6DD0, 0x31CB8504,\n\t 0x96EB27B3, 0x55FD3941, 0xDA2547E6, 0xABCA0A9A,\n\t 0x28507825, 0x530429F4, 0x0A2C86DA, 0xE9B66DFB,\n\t 0x68DC1462, 0xD7486900, 0x680EC0A4, 0x27A18DEE,\n\t 0x4F3FFEA2, 0xE887AD8C, 0xB58CE006, 0x7AF4D6B6,\n\t 0xAACE1E7C, 0xD3375FEC, 0xCE78A399, 0x406B2A42,\n\t 0x20FE9E35, 0xD9F385B9, 0xEE39D7AB, 0x3B124E8B,\n\t 0x1DC9FAF7, 0x4B6D1856, 0x26A36631, 0xEAE397B2,\n\t 0x3A6EFA74, 0xDD5B4332, 0x6841E7F7, 0xCA7820FB,\n\t 0xFB0AF54E, 0xD8FEB397, 0x454056AC, 0xBA489527,\n\t 0x55533A3A, 0x20838D87, 0xFE6BA9B7, 0xD096954B,\n\t 0x55A867BC, 0xA1159A58, 0xCCA92963, 0x99E1DB33,\n\t 0xA62A4A56, 0x3F3125F9, 0x5EF47E1C, 0x9029317C,\n\t 0xFDF8E802, 0x04272F70, 0x80BB155C, 0x05282CE3,\n\t 0x95C11548, 0xE4C66D22, 0x48C1133F, 0xC70F86DC,\n\t 0x07F9C9EE, 0x41041F0F, 0x404779A4, 0x5D886E17,\n\t 0x325F51EB, 0xD59BC0D1, 0xF2BCC18F, 0x41113564,\n\t 0x257B7834, 0x602A9C60, 0xDFF8E8A3, 0x1F636C1B,\n\t 0x0E12B4C2, 0x02E1329E, 0xAF664FD1, 0xCAD18115,\n\t 0x6B2395E0, 0x333E92E1, 0x3B240B62, 0xEEBEB922,\n\t 0x85B2A20E, 0xE6BA0D99, 0xDE720C8C, 0x2DA2F728,\n\t 0xD0127845, 0x95B794FD, 0x647D0862, 0xE7CCF5F0,\n\t 0x5449A36F, 0x877D48FA, 0xC39DFD27, 0xF33E8D1E,\n\t 0x0A476341, 0x992EFF74, 0x3A6F6EAB, 0xF4F8FD37,\n\t 0xA812DC60, 0xA1EBDDF8, 0x991BE14C, 0xDB6E6B0D,\n\t 0xC67B5510, 0x6D672C37, 0x2765D43B, 0xDCD0E804,\n\t 0xF1290DC7, 0xCC00FFA3, 0xB5390F92, 0x690FED0B,\n\t 0x667B9FFB, 0xCEDB7D9C, 0xA091CF0B, 0xD9155EA3,\n\t 0xBB132F88, 0x515BAD24, 0x7B9479BF, 0x763BD6EB,\n\t 0x37392EB3, 0xCC115979, 0x8026E297, 0xF42E312D,\n\t 0x6842ADA7, 0xC66A2B3B, 0x12754CCC, 0x782EF11C,\n\t 0x6A124237, 0xB79251E7, 0x06A1BBE6, 0x4BFB6350,\n\t 0x1A6B1018, 0x11CAEDFA, 0x3D25BDD8, 0xE2E1C3C9,\n\t 0x44421659, 0x0A121386, 0xD90CEC6E, 0xD5ABEA2A,\n\t 0x64AF674E, 0xDA86A85F, 0xBEBFE988, 0x64E4C3FE,\n\t 0x9DBC8057, 0xF0F7C086, 0x60787BF8, 0x6003604D,\n\t 0xD1FD8346, 0xF6381FB0, 0x7745AE04, 0xD736FCCC,\n\t 0x83426B33, 0xF01EAB71, 0xB0804187, 0x3C005E5F,\n\t 0x77A057BE, 0xBDE8AE24, 0x55464299, 0xBF582E61,\n\t 0x4E58F48F, 0xF2DDFDA2, 0xF474EF38, 0x8789BDC2,\n\t 0x5366F9C3, 0xC8B38E74, 0xB475F255, 0x46FCD9B9,\n\t 0x7AEB2661, 0x8B1DDF84, 0x846A0E79, 0x915F95E2,\n\t 0x466E598E, 0x20B45770, 0x8CD55591, 0xC902DE4C,\n\t 0xB90BACE1, 0xBB8205D0, 0x11A86248, 0x7574A99E,\n\t 0xB77F19B6, 0xE0A9DC09, 0x662D09A1, 0xC4324633,\n\t 0xE85A1F02, 0x09F0BE8C, 0x4A99A025, 0x1D6EFE10,\n\t 0x1AB93D1D, 0x0BA5A4DF, 0xA186F20F, 0x2868F169,\n\t 0xDCB7DA83, 0x573906FE, 0xA1E2CE9B, 0x4FCD7F52,\n\t 0x50115E01, 0xA70683FA, 0xA002B5C4, 0x0DE6D027,\n\t 0x9AF88C27, 0x773F8641, 0xC3604C06, 0x61A806B5,\n\t 0xF0177A28, 0xC0F586E0, 0x006058AA, 0x30DC7D62,\n\t 0x11E69ED7, 0x2338EA63, 0x53C2DD94, 0xC2C21634,\n\t 0xBBCBEE56, 0x90BCB6DE, 0xEBFC7DA1, 0xCE591D76,\n\t 0x6F05E409, 0x4B7C0188, 0x39720A3D, 0x7C927C24,\n\t 0x86E3725F, 0x724D9DB9, 0x1AC15BB4, 0xD39EB8FC,\n\t 0xED545578, 0x08FCA5B5, 0xD83D7CD3, 0x4DAD0FC4,\n\t 0x1E50EF5E, 0xB161E6F8, 0xA28514D9, 0x6C51133C,\n\t 0x6FD5C7E7, 0x56E14EC4, 0x362ABFCE, 0xDDC6C837,\n\t 0xD79A3234, 0x92638212, 0x670EFA8E, 0x406000E0 ],\n\t [ 0x3A39CE37, 0xD3FAF5CF, 0xABC27737, 0x5AC52D1B,\n\t 0x5CB0679E, 0x4FA33742, 0xD3822740, 0x99BC9BBE,\n\t 0xD5118E9D, 0xBF0F7315, 0xD62D1C7E, 0xC700C47B,\n\t 0xB78C1B6B, 0x21A19045, 0xB26EB1BE, 0x6A366EB4,\n\t 0x5748AB2F, 0xBC946E79, 0xC6A376D2, 0x6549C2C8,\n\t 0x530FF8EE, 0x468DDE7D, 0xD5730A1D, 0x4CD04DC6,\n\t 0x2939BBDB, 0xA9BA4650, 0xAC9526E8, 0xBE5EE304,\n\t 0xA1FAD5F0, 0x6A2D519A, 0x63EF8CE2, 0x9A86EE22,\n\t 0xC089C2B8, 0x43242EF6, 0xA51E03AA, 0x9CF2D0A4,\n\t 0x83C061BA, 0x9BE96A4D, 0x8FE51550, 0xBA645BD6,\n\t 0x2826A2F9, 0xA73A3AE1, 0x4BA99586, 0xEF5562E9,\n\t 0xC72FEFD3, 0xF752F7DA, 0x3F046F69, 0x77FA0A59,\n\t 0x80E4A915, 0x87B08601, 0x9B09E6AD, 0x3B3EE593,\n\t 0xE990FD5A, 0x9E34D797, 0x2CF0B7D9, 0x022B8B51,\n\t 0x96D5AC3A, 0x017DA67D, 0xD1CF3ED6, 0x7C7D2D28,\n\t 0x1F9F25CF, 0xADF2B89B, 0x5AD6B472, 0x5A88F54C,\n\t 0xE029AC71, 0xE019A5E6, 0x47B0ACFD, 0xED93FA9B,\n\t 0xE8D3C48D, 0x283B57CC, 0xF8D56629, 0x79132E28,\n\t 0x785F0191, 0xED756055, 0xF7960E44, 0xE3D35E8C,\n\t 0x15056DD4, 0x88F46DBA, 0x03A16125, 0x0564F0BD,\n\t 0xC3EB9E15, 0x3C9057A2, 0x97271AEC, 0xA93A072A,\n\t 0x1B3F6D9B, 0x1E6321F5, 0xF59C66FB, 0x26DCF319,\n\t 0x7533D928, 0xB155FDF5, 0x03563482, 0x8ABA3CBB,\n\t 0x28517711, 0xC20AD9F8, 0xABCC5167, 0xCCAD925F,\n\t 0x4DE81751, 0x3830DC8E, 0x379D5862, 0x9320F991,\n\t 0xEA7A90C2, 0xFB3E7BCE, 0x5121CE64, 0x774FBE32,\n\t 0xA8B6E37E, 0xC3293D46, 0x48DE5369, 0x6413E680,\n\t 0xA2AE0810, 0xDD6DB224, 0x69852DFD, 0x09072166,\n\t 0xB39A460A, 0x6445C0DD, 0x586CDECF, 0x1C20C8AE,\n\t 0x5BBEF7DD, 0x1B588D40, 0xCCD2017F, 0x6BB4E3BB,\n\t 0xDDA26A7E, 0x3A59FF45, 0x3E350A44, 0xBCB4CDD5,\n\t 0x72EACEA8, 0xFA6484BB, 0x8D6612AE, 0xBF3C6F47,\n\t 0xD29BE463, 0x542F5D9E, 0xAEC2771B, 0xF64E6370,\n\t 0x740E0D8D, 0xE75B1357, 0xF8721671, 0xAF537D5D,\n\t 0x4040CB08, 0x4EB4E2CC, 0x34D2466A, 0x0115AF84,\n\t 0xE1B00428, 0x95983A1D, 0x06B89FB4, 0xCE6EA048,\n\t 0x6F3F3B82, 0x3520AB82, 0x011A1D4B, 0x277227F8,\n\t 0x611560B1, 0xE7933FDC, 0xBB3A792B, 0x344525BD,\n\t 0xA08839E1, 0x51CE794B, 0x2F32C9B7, 0xA01FBAC9,\n\t 0xE01CC87E, 0xBCC7D1F6, 0xCF0111C3, 0xA1E8AAC7,\n\t 0x1A908749, 0xD44FBD9A, 0xD0DADECB, 0xD50ADA38,\n\t 0x0339C32A, 0xC6913667, 0x8DF9317C, 0xE0B12B4F,\n\t 0xF79E59B7, 0x43F5BB3A, 0xF2D519FF, 0x27D9459C,\n\t 0xBF97222C, 0x15E6FC2A, 0x0F91FC71, 0x9B941525,\n\t 0xFAE59361, 0xCEB69CEB, 0xC2A86459, 0x12BAA8D1,\n\t 0xB6C1075E, 0xE3056A0C, 0x10D25065, 0xCB03A442,\n\t 0xE0EC6E0E, 0x1698DB3B, 0x4C98A0BE, 0x3278E964,\n\t 0x9F1F9532, 0xE0D392DF, 0xD3A0342B, 0x8971F21E,\n\t 0x1B0A7441, 0x4BA3348C, 0xC5BE7120, 0xC37632D8,\n\t 0xDF359F8D, 0x9B992F2E, 0xE60B6F47, 0x0FE3F11D,\n\t 0xE54CDA54, 0x1EDAD891, 0xCE6279CF, 0xCD3E7E6F,\n\t 0x1618B166, 0xFD2C1D05, 0x848FD2C5, 0xF6FB2299,\n\t 0xF523F357, 0xA6327623, 0x93A83531, 0x56CCCD02,\n\t 0xACF08162, 0x5A75EBB5, 0x6E163697, 0x88D273CC,\n\t 0xDE966292, 0x81B949D0, 0x4C50901B, 0x71C65614,\n\t 0xE6C6C7BD, 0x327A140A, 0x45E1D006, 0xC3F27B9A,\n\t 0xC9AA53FD, 0x62A80F00, 0xBB25BFE2, 0x35BDD2F6,\n\t 0x71126905, 0xB2040222, 0xB6CBCF7C, 0xCD769C2B,\n\t 0x53113EC0, 0x1640E3D3, 0x38ABBD60, 0x2547ADF0,\n\t 0xBA38209C, 0xF746CE76, 0x77AFA1C5, 0x20756060,\n\t 0x85CBFE4E, 0x8AE88DD8, 0x7AAAF9B0, 0x4CF9AA7E,\n\t 0x1948C25C, 0x02FB8A8C, 0x01C36AE4, 0xD6EBE1F9,\n\t 0x90D4F869, 0xA65CDEA0, 0x3F09252D, 0xC208E69F,\n\t 0xB74E6132, 0xCE77E25B, 0x578FDFE3, 0x3AC372E6 ]\n\t ];\n\n\t var BLOWFISH_CTX = {\n\t pbox: [],\n\t sbox: []\n\t }\n\n\t function F(ctx, x){\n\t let a = (x >> 24) & 0xFF;\n\t let b = (x >> 16) & 0xFF;\n\t let c = (x >> 8) & 0xFF;\n\t let d = x & 0xFF;\n\n\t let y = ctx.sbox[0][a] + ctx.sbox[1][b];\n\t y = y ^ ctx.sbox[2][c];\n\t y = y + ctx.sbox[3][d];\n\n\t return y;\n\t }\n\n\t function BlowFish_Encrypt(ctx, left, right){\n\t let Xl = left;\n\t let Xr = right;\n\t let temp;\n\n\t for(let i = 0; i < N; ++i){\n\t Xl = Xl ^ ctx.pbox[i];\n\t Xr = F(ctx, Xl) ^ Xr;\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\t }\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\n\t Xr = Xr ^ ctx.pbox[N];\n\t Xl = Xl ^ ctx.pbox[N + 1];\n\n\t return {left: Xl, right: Xr};\n\t }\n\n\t function BlowFish_Decrypt(ctx, left, right){\n\t let Xl = left;\n\t let Xr = right;\n\t let temp;\n\n\t for(let i = N + 1; i > 1; --i){\n\t Xl = Xl ^ ctx.pbox[i];\n\t Xr = F(ctx, Xl) ^ Xr;\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\t }\n\n\t temp = Xl;\n\t Xl = Xr;\n\t Xr = temp;\n\n\t Xr = Xr ^ ctx.pbox[1];\n\t Xl = Xl ^ ctx.pbox[0];\n\n\t return {left: Xl, right: Xr};\n\t }\n\n\t /**\n\t * Initialization ctx's pbox and sbox.\n\t *\n\t * @param {Object} ctx The object has pbox and sbox.\n\t * @param {Array} key An array of 32-bit words.\n\t * @param {int} keysize The length of the key.\n\t *\n\t * @example\n\t *\n\t * BlowFishInit(BLOWFISH_CTX, key, 128/32);\n\t */\n\t function BlowFishInit(ctx, key, keysize)\n\t {\n\t for(let Row = 0; Row < 4; Row++)\n\t {\n\t ctx.sbox[Row] = [];\n\t for(let Col = 0; Col < 256; Col++)\n\t {\n\t ctx.sbox[Row][Col] = ORIG_S[Row][Col];\n\t }\n\t }\n\n\t let keyIndex = 0;\n\t for(let index = 0; index < N + 2; index++)\n\t {\n\t ctx.pbox[index] = ORIG_P[index] ^ key[keyIndex];\n\t keyIndex++;\n\t if(keyIndex >= keysize)\n\t {\n\t keyIndex = 0;\n\t }\n\t }\n\n\t let Data1 = 0;\n\t let Data2 = 0;\n\t let res = 0;\n\t for(let i = 0; i < N + 2; i += 2)\n\t {\n\t res = BlowFish_Encrypt(ctx, Data1, Data2);\n\t Data1 = res.left;\n\t Data2 = res.right;\n\t ctx.pbox[i] = Data1;\n\t ctx.pbox[i + 1] = Data2;\n\t }\n\n\t for(let i = 0; i < 4; i++)\n\t {\n\t for(let j = 0; j < 256; j += 2)\n\t {\n\t res = BlowFish_Encrypt(ctx, Data1, Data2);\n\t Data1 = res.left;\n\t Data2 = res.right;\n\t ctx.sbox[i][j] = Data1;\n\t ctx.sbox[i][j + 1] = Data2;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t /**\n\t * Blowfish block cipher algorithm.\n\t */\n\t var Blowfish = C_algo.Blowfish = BlockCipher.extend({\n\t _doReset: function () {\n\t // Skip reset of nRounds has been set before and key did not change\n\t if (this._keyPriorReset === this._key) {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var key = this._keyPriorReset = this._key;\n\t var keyWords = key.words;\n\t var keySize = key.sigBytes / 4;\n\n\t //Initialization pbox and sbox\n\t BlowFishInit(BLOWFISH_CTX, keyWords, keySize);\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t var res = BlowFish_Encrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);\n\t M[offset] = res.left;\n\t M[offset + 1] = res.right;\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t var res = BlowFish_Decrypt(BLOWFISH_CTX, M[offset], M[offset + 1]);\n\t M[offset] = res.left;\n\t M[offset + 1] = res.right;\n\t },\n\n\t blockSize: 64/32,\n\n\t keySize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Blowfish.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Blowfish.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Blowfish = BlockCipher._createHelper(Blowfish);\n\t}());\n\n\n\treturn CryptoJS.Blowfish;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./evpkdf\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./evpkdf\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher core components.\n\t */\n\tCryptoJS.lib.Cipher || (function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var Base64 = C_enc.Base64;\n\t var C_algo = C.algo;\n\t var EvpKDF = C_algo.EvpKDF;\n\n\t /**\n\t * Abstract base cipher template.\n\t *\n\t * @property {number} keySize This cipher's key size. Default: 4 (128 bits)\n\t * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)\n\t * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.\n\t * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.\n\t */\n\t var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {WordArray} iv The IV to use for this operation.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Creates this cipher in encryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createEncryptor: function (key, cfg) {\n\t return this.create(this._ENC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Creates this cipher in decryption mode.\n\t *\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {Cipher} A cipher instance.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });\n\t */\n\t createDecryptor: function (key, cfg) {\n\t return this.create(this._DEC_XFORM_MODE, key, cfg);\n\t },\n\n\t /**\n\t * Initializes a newly created cipher.\n\t *\n\t * @param {number} xformMode Either the encryption or decryption transormation mode constant.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @example\n\t *\n\t * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });\n\t */\n\t init: function (xformMode, key, cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Store transform mode and key\n\t this._xformMode = xformMode;\n\t this._key = key;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this cipher to its initial state.\n\t *\n\t * @example\n\t *\n\t * cipher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-cipher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Adds data to be encrypted or decrypted.\n\t *\n\t * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.process('data');\n\t * var encrypted = cipher.process(wordArray);\n\t */\n\t process: function (dataUpdate) {\n\t // Append\n\t this._append(dataUpdate);\n\n\t // Process available blocks\n\t return this._process();\n\t },\n\n\t /**\n\t * Finalizes the encryption or decryption process.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.\n\t *\n\t * @return {WordArray} The data after final processing.\n\t *\n\t * @example\n\t *\n\t * var encrypted = cipher.finalize();\n\t * var encrypted = cipher.finalize('data');\n\t * var encrypted = cipher.finalize(wordArray);\n\t */\n\t finalize: function (dataUpdate) {\n\t // Final data update\n\t if (dataUpdate) {\n\t this._append(dataUpdate);\n\t }\n\n\t // Perform concrete-cipher logic\n\t var finalProcessedData = this._doFinalize();\n\n\t return finalProcessedData;\n\t },\n\n\t keySize: 128/32,\n\n\t ivSize: 128/32,\n\n\t _ENC_XFORM_MODE: 1,\n\n\t _DEC_XFORM_MODE: 2,\n\n\t /**\n\t * Creates shortcut functions to a cipher's object interface.\n\t *\n\t * @param {Cipher} cipher The cipher to create a helper for.\n\t *\n\t * @return {Object} An object with encrypt and decrypt shortcut functions.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);\n\t */\n\t _createHelper: (function () {\n\t function selectCipherStrategy(key) {\n\t if (typeof key == 'string') {\n\t return PasswordBasedCipher;\n\t } else {\n\t return SerializableCipher;\n\t }\n\t }\n\n\t return function (cipher) {\n\t return {\n\t encrypt: function (message, key, cfg) {\n\t return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);\n\t },\n\n\t decrypt: function (ciphertext, key, cfg) {\n\t return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);\n\t }\n\t };\n\t };\n\t }())\n\t });\n\n\t /**\n\t * Abstract base stream cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)\n\t */\n\t var StreamCipher = C_lib.StreamCipher = Cipher.extend({\n\t _doFinalize: function () {\n\t // Process partial blocks\n\t var finalProcessedBlocks = this._process(!!'flush');\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 1\n\t });\n\n\t /**\n\t * Mode namespace.\n\t */\n\t var C_mode = C.mode = {};\n\n\t /**\n\t * Abstract base block cipher mode template.\n\t */\n\t var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({\n\t /**\n\t * Creates this mode for encryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);\n\t */\n\t createEncryptor: function (cipher, iv) {\n\t return this.Encryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Creates this mode for decryption.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);\n\t */\n\t createDecryptor: function (cipher, iv) {\n\t return this.Decryptor.create(cipher, iv);\n\t },\n\n\t /**\n\t * Initializes a newly created mode.\n\t *\n\t * @param {Cipher} cipher A block cipher instance.\n\t * @param {Array} iv The IV words.\n\t *\n\t * @example\n\t *\n\t * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);\n\t */\n\t init: function (cipher, iv) {\n\t this._cipher = cipher;\n\t this._iv = iv;\n\t }\n\t });\n\n\t /**\n\t * Cipher Block Chaining mode.\n\t */\n\t var CBC = C_mode.CBC = (function () {\n\t /**\n\t * Abstract base CBC mode.\n\t */\n\t var CBC = BlockCipherMode.extend();\n\n\t /**\n\t * CBC encryptor.\n\t */\n\t CBC.Encryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // XOR and encrypt\n\t xorBlock.call(this, words, offset, blockSize);\n\t cipher.encryptBlock(words, offset);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t /**\n\t * CBC decryptor.\n\t */\n\t CBC.Decryptor = CBC.extend({\n\t /**\n\t * Processes the data block at offset.\n\t *\n\t * @param {Array} words The data words to operate on.\n\t * @param {number} offset The offset where the block starts.\n\t *\n\t * @example\n\t *\n\t * mode.processBlock(data.words, offset);\n\t */\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t // Decrypt and XOR\n\t cipher.decryptBlock(words, offset);\n\t xorBlock.call(this, words, offset, blockSize);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function xorBlock(words, offset, blockSize) {\n\t var block;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Choose mixing block\n\t if (iv) {\n\t block = iv;\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t block = this._prevBlock;\n\t }\n\n\t // XOR blocks\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= block[i];\n\t }\n\t }\n\n\t return CBC;\n\t }());\n\n\t /**\n\t * Padding namespace.\n\t */\n\t var C_pad = C.pad = {};\n\n\t /**\n\t * PKCS #5/7 padding strategy.\n\t */\n\t var Pkcs7 = C_pad.Pkcs7 = {\n\t /**\n\t * Pads data using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to pad.\n\t * @param {number} blockSize The multiple that the data should be padded to.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.pad(wordArray, 4);\n\t */\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Create padding word\n\t var paddingWord = (nPaddingBytes << 24) | (nPaddingBytes << 16) | (nPaddingBytes << 8) | nPaddingBytes;\n\n\t // Create padding\n\t var paddingWords = [];\n\t for (var i = 0; i < nPaddingBytes; i += 4) {\n\t paddingWords.push(paddingWord);\n\t }\n\t var padding = WordArray.create(paddingWords, nPaddingBytes);\n\n\t // Add padding\n\t data.concat(padding);\n\t },\n\n\t /**\n\t * Unpads data that had been padded using the algorithm defined in PKCS #5/7.\n\t *\n\t * @param {WordArray} data The data to unpad.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * CryptoJS.pad.Pkcs7.unpad(wordArray);\n\t */\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t };\n\n\t /**\n\t * Abstract base block cipher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)\n\t */\n\t var BlockCipher = C_lib.BlockCipher = Cipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Mode} mode The block mode to use. Default: CBC\n\t * @property {Padding} padding The padding strategy to use. Default: Pkcs7\n\t */\n\t cfg: Cipher.cfg.extend({\n\t mode: CBC,\n\t padding: Pkcs7\n\t }),\n\n\t reset: function () {\n\t var modeCreator;\n\n\t // Reset cipher\n\t Cipher.reset.call(this);\n\n\t // Shortcuts\n\t var cfg = this.cfg;\n\t var iv = cfg.iv;\n\t var mode = cfg.mode;\n\n\t // Reset block mode\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t modeCreator = mode.createEncryptor;\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t modeCreator = mode.createDecryptor;\n\t // Keep at least one block in the buffer for unpadding\n\t this._minBufferSize = 1;\n\t }\n\n\t if (this._mode && this._mode.__creator == modeCreator) {\n\t this._mode.init(this, iv && iv.words);\n\t } else {\n\t this._mode = modeCreator.call(mode, this, iv && iv.words);\n\t this._mode.__creator = modeCreator;\n\t }\n\t },\n\n\t _doProcessBlock: function (words, offset) {\n\t this._mode.processBlock(words, offset);\n\t },\n\n\t _doFinalize: function () {\n\t var finalProcessedBlocks;\n\n\t // Shortcut\n\t var padding = this.cfg.padding;\n\n\t // Finalize\n\t if (this._xformMode == this._ENC_XFORM_MODE) {\n\t // Pad data\n\t padding.pad(this._data, this.blockSize);\n\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\t } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {\n\t // Process final blocks\n\t finalProcessedBlocks = this._process(!!'flush');\n\n\t // Unpad data\n\t padding.unpad(finalProcessedBlocks);\n\t }\n\n\t return finalProcessedBlocks;\n\t },\n\n\t blockSize: 128/32\n\t });\n\n\t /**\n\t * A collection of cipher parameters.\n\t *\n\t * @property {WordArray} ciphertext The raw ciphertext.\n\t * @property {WordArray} key The key to this ciphertext.\n\t * @property {WordArray} iv The IV used in the ciphering operation.\n\t * @property {WordArray} salt The salt used with a key derivation function.\n\t * @property {Cipher} algorithm The cipher algorithm.\n\t * @property {Mode} mode The block mode used in the ciphering operation.\n\t * @property {Padding} padding The padding scheme used in the ciphering operation.\n\t * @property {number} blockSize The block size of the cipher.\n\t * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.\n\t */\n\t var CipherParams = C_lib.CipherParams = Base.extend({\n\t /**\n\t * Initializes a newly created cipher params object.\n\t *\n\t * @param {Object} cipherParams An object with any of the possible cipher parameters.\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.lib.CipherParams.create({\n\t * ciphertext: ciphertextWordArray,\n\t * key: keyWordArray,\n\t * iv: ivWordArray,\n\t * salt: saltWordArray,\n\t * algorithm: CryptoJS.algo.AES,\n\t * mode: CryptoJS.mode.CBC,\n\t * padding: CryptoJS.pad.PKCS7,\n\t * blockSize: 4,\n\t * formatter: CryptoJS.format.OpenSSL\n\t * });\n\t */\n\t init: function (cipherParams) {\n\t this.mixIn(cipherParams);\n\t },\n\n\t /**\n\t * Converts this cipher params object to a string.\n\t *\n\t * @param {Format} formatter (Optional) The formatting strategy to use.\n\t *\n\t * @return {string} The stringified cipher params.\n\t *\n\t * @throws Error If neither the formatter nor the default formatter is set.\n\t *\n\t * @example\n\t *\n\t * var string = cipherParams + '';\n\t * var string = cipherParams.toString();\n\t * var string = cipherParams.toString(CryptoJS.format.OpenSSL);\n\t */\n\t toString: function (formatter) {\n\t return (formatter || this.formatter).stringify(this);\n\t }\n\t });\n\n\t /**\n\t * Format namespace.\n\t */\n\t var C_format = C.format = {};\n\n\t /**\n\t * OpenSSL formatting strategy.\n\t */\n\t var OpenSSLFormatter = C_format.OpenSSL = {\n\t /**\n\t * Converts a cipher params object to an OpenSSL-compatible string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The OpenSSL-compatible string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t var wordArray;\n\n\t // Shortcuts\n\t var ciphertext = cipherParams.ciphertext;\n\t var salt = cipherParams.salt;\n\n\t // Format\n\t if (salt) {\n\t wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);\n\t } else {\n\t wordArray = ciphertext;\n\t }\n\n\t return wordArray.toString(Base64);\n\t },\n\n\t /**\n\t * Converts an OpenSSL-compatible string to a cipher params object.\n\t *\n\t * @param {string} openSSLStr The OpenSSL-compatible string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);\n\t */\n\t parse: function (openSSLStr) {\n\t var salt;\n\n\t // Parse base64\n\t var ciphertext = Base64.parse(openSSLStr);\n\n\t // Shortcut\n\t var ciphertextWords = ciphertext.words;\n\n\t // Test for salt\n\t if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {\n\t // Extract salt\n\t salt = WordArray.create(ciphertextWords.slice(2, 4));\n\n\t // Remove salt from ciphertext\n\t ciphertextWords.splice(0, 4);\n\t ciphertext.sigBytes -= 16;\n\t }\n\n\t return CipherParams.create({ ciphertext: ciphertext, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A cipher wrapper that returns ciphertext as a serializable cipher params object.\n\t */\n\t var SerializableCipher = C_lib.SerializableCipher = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL\n\t */\n\t cfg: Base.extend({\n\t format: OpenSSLFormatter\n\t }),\n\n\t /**\n\t * Encrypts a message.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Encrypt\n\t var encryptor = cipher.createEncryptor(key, cfg);\n\t var ciphertext = encryptor.finalize(message);\n\n\t // Shortcut\n\t var cipherCfg = encryptor.cfg;\n\n\t // Create and return serializable cipher params\n\t return CipherParams.create({\n\t ciphertext: ciphertext,\n\t key: key,\n\t iv: cipherCfg.iv,\n\t algorithm: cipher,\n\t mode: cipherCfg.mode,\n\t padding: cipherCfg.padding,\n\t blockSize: cipher.blockSize,\n\t formatter: cfg.format\n\t });\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {WordArray} key The key.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, key, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Decrypt\n\t var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);\n\n\t return plaintext;\n\t },\n\n\t /**\n\t * Converts serialized ciphertext to CipherParams,\n\t * else assumed CipherParams already and returns ciphertext unchanged.\n\t *\n\t * @param {CipherParams|string} ciphertext The ciphertext.\n\t * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.\n\t *\n\t * @return {CipherParams} The unserialized ciphertext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);\n\t */\n\t _parse: function (ciphertext, format) {\n\t if (typeof ciphertext == 'string') {\n\t return format.parse(ciphertext, this);\n\t } else {\n\t return ciphertext;\n\t }\n\t }\n\t });\n\n\t /**\n\t * Key derivation function namespace.\n\t */\n\t var C_kdf = C.kdf = {};\n\n\t /**\n\t * OpenSSL key derivation function.\n\t */\n\t var OpenSSLKdf = C_kdf.OpenSSL = {\n\t /**\n\t * Derives a key and IV from a password.\n\t *\n\t * @param {string} password The password to derive from.\n\t * @param {number} keySize The size in words of the key to generate.\n\t * @param {number} ivSize The size in words of the IV to generate.\n\t * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.\n\t *\n\t * @return {CipherParams} A cipher params object with the key, IV, and salt.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);\n\t * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');\n\t */\n\t execute: function (password, keySize, ivSize, salt, hasher) {\n\t // Generate random salt\n\t if (!salt) {\n\t salt = WordArray.random(64/8);\n\t }\n\n\t // Derive key and IV\n\t if (!hasher) {\n\t var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt);\n\t } else {\n\t var key = EvpKDF.create({ keySize: keySize + ivSize, hasher: hasher }).compute(password, salt);\n\t }\n\n\n\t // Separate key and IV\n\t var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);\n\t key.sigBytes = keySize * 4;\n\n\t // Return params\n\t return CipherParams.create({ key: key, iv: iv, salt: salt });\n\t }\n\t };\n\n\t /**\n\t * A serializable cipher wrapper that derives the key from a password,\n\t * and returns ciphertext as a serializable cipher params object.\n\t */\n\t var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL\n\t */\n\t cfg: SerializableCipher.cfg.extend({\n\t kdf: OpenSSLKdf\n\t }),\n\n\t /**\n\t * Encrypts a message using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {WordArray|string} message The message to encrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {CipherParams} A cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');\n\t * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t encrypt: function (cipher, message, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, cfg.salt, cfg.hasher);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Encrypt\n\t var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg);\n\n\t // Mix in derived params\n\t ciphertext.mixIn(derivedParams);\n\n\t return ciphertext;\n\t },\n\n\t /**\n\t * Decrypts serialized ciphertext using a password.\n\t *\n\t * @param {Cipher} cipher The cipher algorithm to use.\n\t * @param {CipherParams|string} ciphertext The ciphertext to decrypt.\n\t * @param {string} password The password.\n\t * @param {Object} cfg (Optional) The configuration options to use for this operation.\n\t *\n\t * @return {WordArray} The plaintext.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });\n\t * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });\n\t */\n\t decrypt: function (cipher, ciphertext, password, cfg) {\n\t // Apply config defaults\n\t cfg = this.cfg.extend(cfg);\n\n\t // Convert string to CipherParams\n\t ciphertext = this._parse(ciphertext, cfg.format);\n\n\t // Derive key and other params\n\t var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt, cfg.hasher);\n\n\t // Add IV to config\n\t cfg.iv = derivedParams.iv;\n\n\t // Decrypt\n\t var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);\n\n\t return plaintext;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory();\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory();\n\t}\n}(this, function () {\n\n\t/*globals window, global, require*/\n\n\t/**\n\t * CryptoJS core components.\n\t */\n\tvar CryptoJS = CryptoJS || (function (Math, undefined) {\n\n\t var crypto;\n\n\t // Native crypto from window (Browser)\n\t if (typeof window !== 'undefined' && window.crypto) {\n\t crypto = window.crypto;\n\t }\n\n\t // Native crypto in web worker (Browser)\n\t if (typeof self !== 'undefined' && self.crypto) {\n\t crypto = self.crypto;\n\t }\n\n\t // Native crypto from worker\n\t if (typeof globalThis !== 'undefined' && globalThis.crypto) {\n\t crypto = globalThis.crypto;\n\t }\n\n\t // Native (experimental IE 11) crypto from window (Browser)\n\t if (!crypto && typeof window !== 'undefined' && window.msCrypto) {\n\t crypto = window.msCrypto;\n\t }\n\n\t // Native crypto from global (NodeJS)\n\t if (!crypto && typeof global !== 'undefined' && global.crypto) {\n\t crypto = global.crypto;\n\t }\n\n\t // Native crypto import via require (NodeJS)\n\t if (!crypto && typeof require === 'function') {\n\t try {\n\t crypto = require('crypto');\n\t } catch (err) {}\n\t }\n\n\t /*\n\t * Cryptographically secure pseudorandom number generator\n\t *\n\t * As Math.random() is cryptographically not safe to use\n\t */\n\t var cryptoSecureRandomInt = function () {\n\t if (crypto) {\n\t // Use getRandomValues method (Browser)\n\t if (typeof crypto.getRandomValues === 'function') {\n\t try {\n\t return crypto.getRandomValues(new Uint32Array(1))[0];\n\t } catch (err) {}\n\t }\n\n\t // Use randomBytes method (NodeJS)\n\t if (typeof crypto.randomBytes === 'function') {\n\t try {\n\t return crypto.randomBytes(4).readInt32LE();\n\t } catch (err) {}\n\t }\n\t }\n\n\t throw new Error('Native crypto module could not be used to get secure random number.');\n\t };\n\n\t /*\n\t * Local polyfill of Object.create\n\n\t */\n\t var create = Object.create || (function () {\n\t function F() {}\n\n\t return function (obj) {\n\t var subtype;\n\n\t F.prototype = obj;\n\n\t subtype = new F();\n\n\t F.prototype = null;\n\n\t return subtype;\n\t };\n\t }());\n\n\t /**\n\t * CryptoJS namespace.\n\t */\n\t var C = {};\n\n\t /**\n\t * Library namespace.\n\t */\n\t var C_lib = C.lib = {};\n\n\t /**\n\t * Base object for prototypal inheritance.\n\t */\n\t var Base = C_lib.Base = (function () {\n\n\n\t return {\n\t /**\n\t * Creates a new object that inherits from this object.\n\t *\n\t * @param {Object} overrides Properties to copy into the new object.\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * field: 'value',\n\t *\n\t * method: function () {\n\t * }\n\t * });\n\t */\n\t extend: function (overrides) {\n\t // Spawn\n\t var subtype = create(this);\n\n\t // Augment\n\t if (overrides) {\n\t subtype.mixIn(overrides);\n\t }\n\n\t // Create default initializer\n\t if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {\n\t subtype.init = function () {\n\t subtype.$super.init.apply(this, arguments);\n\t };\n\t }\n\n\t // Initializer's prototype is the subtype object\n\t subtype.init.prototype = subtype;\n\n\t // Reference supertype\n\t subtype.$super = this;\n\n\t return subtype;\n\t },\n\n\t /**\n\t * Extends this object and runs the init method.\n\t * Arguments to create() will be passed to init().\n\t *\n\t * @return {Object} The new object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var instance = MyType.create();\n\t */\n\t create: function () {\n\t var instance = this.extend();\n\t instance.init.apply(instance, arguments);\n\n\t return instance;\n\t },\n\n\t /**\n\t * Initializes a newly created object.\n\t * Override this method to add some logic when your objects are created.\n\t *\n\t * @example\n\t *\n\t * var MyType = CryptoJS.lib.Base.extend({\n\t * init: function () {\n\t * // ...\n\t * }\n\t * });\n\t */\n\t init: function () {\n\t },\n\n\t /**\n\t * Copies properties into this object.\n\t *\n\t * @param {Object} properties The properties to mix in.\n\t *\n\t * @example\n\t *\n\t * MyType.mixIn({\n\t * field: 'value'\n\t * });\n\t */\n\t mixIn: function (properties) {\n\t for (var propertyName in properties) {\n\t if (properties.hasOwnProperty(propertyName)) {\n\t this[propertyName] = properties[propertyName];\n\t }\n\t }\n\n\t // IE won't copy toString using the loop above\n\t if (properties.hasOwnProperty('toString')) {\n\t this.toString = properties.toString;\n\t }\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = instance.clone();\n\t */\n\t clone: function () {\n\t return this.init.prototype.extend(this);\n\t }\n\t };\n\t }());\n\n\t /**\n\t * An array of 32-bit words.\n\t *\n\t * @property {Array} words The array of 32-bit words.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var WordArray = C_lib.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of 32-bit words.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.create();\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);\n\t * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 4;\n\t }\n\t },\n\n\t /**\n\t * Converts this word array to a string.\n\t *\n\t * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex\n\t *\n\t * @return {string} The stringified word array.\n\t *\n\t * @example\n\t *\n\t * var string = wordArray + '';\n\t * var string = wordArray.toString();\n\t * var string = wordArray.toString(CryptoJS.enc.Utf8);\n\t */\n\t toString: function (encoder) {\n\t return (encoder || Hex).stringify(this);\n\t },\n\n\t /**\n\t * Concatenates a word array to this word array.\n\t *\n\t * @param {WordArray} wordArray The word array to append.\n\t *\n\t * @return {WordArray} This word array.\n\t *\n\t * @example\n\t *\n\t * wordArray1.concat(wordArray2);\n\t */\n\t concat: function (wordArray) {\n\t // Shortcuts\n\t var thisWords = this.words;\n\t var thatWords = wordArray.words;\n\t var thisSigBytes = this.sigBytes;\n\t var thatSigBytes = wordArray.sigBytes;\n\n\t // Clamp excess bits\n\t this.clamp();\n\n\t // Concat\n\t if (thisSigBytes % 4) {\n\t // Copy one byte at a time\n\t for (var i = 0; i < thatSigBytes; i++) {\n\t var thatByte = (thatWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t thisWords[(thisSigBytes + i) >>> 2] |= thatByte << (24 - ((thisSigBytes + i) % 4) * 8);\n\t }\n\t } else {\n\t // Copy one word at a time\n\t for (var j = 0; j < thatSigBytes; j += 4) {\n\t thisWords[(thisSigBytes + j) >>> 2] = thatWords[j >>> 2];\n\t }\n\t }\n\t this.sigBytes += thatSigBytes;\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Removes insignificant bits.\n\t *\n\t * @example\n\t *\n\t * wordArray.clamp();\n\t */\n\t clamp: function () {\n\t // Shortcuts\n\t var words = this.words;\n\t var sigBytes = this.sigBytes;\n\n\t // Clamp\n\t words[sigBytes >>> 2] &= 0xffffffff << (32 - (sigBytes % 4) * 8);\n\t words.length = Math.ceil(sigBytes / 4);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = wordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone.words = this.words.slice(0);\n\n\t return clone;\n\t },\n\n\t /**\n\t * Creates a word array filled with random bytes.\n\t *\n\t * @param {number} nBytes The number of random bytes to generate.\n\t *\n\t * @return {WordArray} The random word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.lib.WordArray.random(16);\n\t */\n\t random: function (nBytes) {\n\t var words = [];\n\n\t for (var i = 0; i < nBytes; i += 4) {\n\t words.push(cryptoSecureRandomInt());\n\t }\n\n\t return new WordArray.init(words, nBytes);\n\t }\n\t });\n\n\t /**\n\t * Encoder namespace.\n\t */\n\t var C_enc = C.enc = {};\n\n\t /**\n\t * Hex encoding strategy.\n\t */\n\t var Hex = C_enc.Hex = {\n\t /**\n\t * Converts a word array to a hex string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The hex string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.enc.Hex.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var hexChars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t hexChars.push((bite >>> 4).toString(16));\n\t hexChars.push((bite & 0x0f).toString(16));\n\t }\n\n\t return hexChars.join('');\n\t },\n\n\t /**\n\t * Converts a hex string to a word array.\n\t *\n\t * @param {string} hexStr The hex string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Hex.parse(hexString);\n\t */\n\t parse: function (hexStr) {\n\t // Shortcut\n\t var hexStrLength = hexStr.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < hexStrLength; i += 2) {\n\t words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << (24 - (i % 8) * 4);\n\t }\n\n\t return new WordArray.init(words, hexStrLength / 2);\n\t }\n\t };\n\n\t /**\n\t * Latin1 encoding strategy.\n\t */\n\t var Latin1 = C_enc.Latin1 = {\n\t /**\n\t * Converts a word array to a Latin1 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Latin1 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var latin1Chars = [];\n\t for (var i = 0; i < sigBytes; i++) {\n\t var bite = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t latin1Chars.push(String.fromCharCode(bite));\n\t }\n\n\t return latin1Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Latin1 string to a word array.\n\t *\n\t * @param {string} latin1Str The Latin1 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);\n\t */\n\t parse: function (latin1Str) {\n\t // Shortcut\n\t var latin1StrLength = latin1Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < latin1StrLength; i++) {\n\t words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << (24 - (i % 4) * 8);\n\t }\n\n\t return new WordArray.init(words, latin1StrLength);\n\t }\n\t };\n\n\t /**\n\t * UTF-8 encoding strategy.\n\t */\n\t var Utf8 = C_enc.Utf8 = {\n\t /**\n\t * Converts a word array to a UTF-8 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-8 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t try {\n\t return decodeURIComponent(escape(Latin1.stringify(wordArray)));\n\t } catch (e) {\n\t throw new Error('Malformed UTF-8 data');\n\t }\n\t },\n\n\t /**\n\t * Converts a UTF-8 string to a word array.\n\t *\n\t * @param {string} utf8Str The UTF-8 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);\n\t */\n\t parse: function (utf8Str) {\n\t return Latin1.parse(unescape(encodeURIComponent(utf8Str)));\n\t }\n\t };\n\n\t /**\n\t * Abstract buffered block algorithm template.\n\t *\n\t * The property blockSize must be implemented in a concrete subtype.\n\t *\n\t * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0\n\t */\n\t var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({\n\t /**\n\t * Resets this block algorithm's data buffer to its initial state.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm.reset();\n\t */\n\t reset: function () {\n\t // Initial values\n\t this._data = new WordArray.init();\n\t this._nDataBytes = 0;\n\t },\n\n\t /**\n\t * Adds new data to this block algorithm's buffer.\n\t *\n\t * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.\n\t *\n\t * @example\n\t *\n\t * bufferedBlockAlgorithm._append('data');\n\t * bufferedBlockAlgorithm._append(wordArray);\n\t */\n\t _append: function (data) {\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof data == 'string') {\n\t data = Utf8.parse(data);\n\t }\n\n\t // Append\n\t this._data.concat(data);\n\t this._nDataBytes += data.sigBytes;\n\t },\n\n\t /**\n\t * Processes available data blocks.\n\t *\n\t * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.\n\t *\n\t * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.\n\t *\n\t * @return {WordArray} The processed data.\n\t *\n\t * @example\n\t *\n\t * var processedData = bufferedBlockAlgorithm._process();\n\t * var processedData = bufferedBlockAlgorithm._process(!!'flush');\n\t */\n\t _process: function (doFlush) {\n\t var processedWords;\n\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var dataSigBytes = data.sigBytes;\n\t var blockSize = this.blockSize;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count blocks ready\n\t var nBlocksReady = dataSigBytes / blockSizeBytes;\n\t if (doFlush) {\n\t // Round up to include partial blocks\n\t nBlocksReady = Math.ceil(nBlocksReady);\n\t } else {\n\t // Round down to include only full blocks,\n\t // less the number of blocks that must remain in the buffer\n\t nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);\n\t }\n\n\t // Count words ready\n\t var nWordsReady = nBlocksReady * blockSize;\n\n\t // Count bytes ready\n\t var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes);\n\n\t // Process blocks\n\t if (nWordsReady) {\n\t for (var offset = 0; offset < nWordsReady; offset += blockSize) {\n\t // Perform concrete-algorithm logic\n\t this._doProcessBlock(dataWords, offset);\n\t }\n\n\t // Remove processed words\n\t processedWords = dataWords.splice(0, nWordsReady);\n\t data.sigBytes -= nBytesReady;\n\t }\n\n\t // Return processed words\n\t return new WordArray.init(processedWords, nBytesReady);\n\t },\n\n\t /**\n\t * Creates a copy of this object.\n\t *\n\t * @return {Object} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = bufferedBlockAlgorithm.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\t clone._data = this._data.clone();\n\n\t return clone;\n\t },\n\n\t _minBufferSize: 0\n\t });\n\n\t /**\n\t * Abstract hasher template.\n\t *\n\t * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)\n\t */\n\t var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({\n\t /**\n\t * Configuration options.\n\t */\n\t cfg: Base.extend(),\n\n\t /**\n\t * Initializes a newly created hasher.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for this hash computation.\n\t *\n\t * @example\n\t *\n\t * var hasher = CryptoJS.algo.SHA256.create();\n\t */\n\t init: function (cfg) {\n\t // Apply config defaults\n\t this.cfg = this.cfg.extend(cfg);\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this hasher to its initial state.\n\t *\n\t * @example\n\t *\n\t * hasher.reset();\n\t */\n\t reset: function () {\n\t // Reset data buffer\n\t BufferedBlockAlgorithm.reset.call(this);\n\n\t // Perform concrete-hasher logic\n\t this._doReset();\n\t },\n\n\t /**\n\t * Updates this hasher with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {Hasher} This hasher.\n\t *\n\t * @example\n\t *\n\t * hasher.update('message');\n\t * hasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t // Append\n\t this._append(messageUpdate);\n\n\t // Update the hash\n\t this._process();\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the hash computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @example\n\t *\n\t * var hash = hasher.finalize();\n\t * var hash = hasher.finalize('message');\n\t * var hash = hasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Final message update\n\t if (messageUpdate) {\n\t this._append(messageUpdate);\n\t }\n\n\t // Perform concrete-hasher logic\n\t var hash = this._doFinalize();\n\n\t return hash;\n\t },\n\n\t blockSize: 512/32,\n\n\t /**\n\t * Creates a shortcut function to a hasher's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to create a helper for.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHelper: function (hasher) {\n\t return function (message, cfg) {\n\t return new hasher.init(cfg).finalize(message);\n\t };\n\t },\n\n\t /**\n\t * Creates a shortcut function to the HMAC's object interface.\n\t *\n\t * @param {Hasher} hasher The hasher to use in this HMAC helper.\n\t *\n\t * @return {Function} The shortcut function.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);\n\t */\n\t _createHmacHelper: function (hasher) {\n\t return function (message, key) {\n\t return new C_algo.HMAC.init(hasher, key).finalize(message);\n\t };\n\t }\n\t });\n\n\t /**\n\t * Algorithm namespace.\n\t */\n\t var C_algo = C.algo = {};\n\n\t return C;\n\t}(Math));\n\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64 encoding strategy.\n\t */\n\t var Base64 = C_enc.Base64 = {\n\t /**\n\t * Converts a word array to a Base64 string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The Base64 string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64 string to a word array.\n\t *\n\t * @param {string} base64Str The Base64 string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64.parse(base64String);\n\t */\n\t parse: function (base64Str) {\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * Base64url encoding strategy.\n\t */\n\t var Base64url = C_enc.Base64url = {\n\t /**\n\t * Converts a word array to a Base64url string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {string} The Base64url string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);\n\t */\n\t stringify: function (wordArray, urlSafe) {\n\t if (urlSafe === undefined) {\n\t urlSafe = true\n\t }\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\t var map = urlSafe ? this._safe_map : this._map;\n\n\t // Clamp excess bits\n\t wordArray.clamp();\n\n\t // Convert\n\t var base64Chars = [];\n\t for (var i = 0; i < sigBytes; i += 3) {\n\t var byte1 = (words[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff;\n\t var byte2 = (words[(i + 1) >>> 2] >>> (24 - ((i + 1) % 4) * 8)) & 0xff;\n\t var byte3 = (words[(i + 2) >>> 2] >>> (24 - ((i + 2) % 4) * 8)) & 0xff;\n\n\t var triplet = (byte1 << 16) | (byte2 << 8) | byte3;\n\n\t for (var j = 0; (j < 4) && (i + j * 0.75 < sigBytes); j++) {\n\t base64Chars.push(map.charAt((triplet >>> (6 * (3 - j))) & 0x3f));\n\t }\n\t }\n\n\t // Add padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t while (base64Chars.length % 4) {\n\t base64Chars.push(paddingChar);\n\t }\n\t }\n\n\t return base64Chars.join('');\n\t },\n\n\t /**\n\t * Converts a Base64url string to a word array.\n\t *\n\t * @param {string} base64Str The Base64url string.\n\t *\n\t * @param {boolean} urlSafe Whether to use url safe\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Base64url.parse(base64String);\n\t */\n\t parse: function (base64Str, urlSafe) {\n\t if (urlSafe === undefined) {\n\t urlSafe = true\n\t }\n\n\t // Shortcuts\n\t var base64StrLength = base64Str.length;\n\t var map = urlSafe ? this._safe_map : this._map;\n\t var reverseMap = this._reverseMap;\n\n\t if (!reverseMap) {\n\t reverseMap = this._reverseMap = [];\n\t for (var j = 0; j < map.length; j++) {\n\t reverseMap[map.charCodeAt(j)] = j;\n\t }\n\t }\n\n\t // Ignore padding\n\t var paddingChar = map.charAt(64);\n\t if (paddingChar) {\n\t var paddingIndex = base64Str.indexOf(paddingChar);\n\t if (paddingIndex !== -1) {\n\t base64StrLength = paddingIndex;\n\t }\n\t }\n\n\t // Convert\n\t return parseLoop(base64Str, base64StrLength, reverseMap);\n\n\t },\n\n\t _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',\n\t _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_',\n\t };\n\n\t function parseLoop(base64Str, base64StrLength, reverseMap) {\n\t var words = [];\n\t var nBytes = 0;\n\t for (var i = 0; i < base64StrLength; i++) {\n\t if (i % 4) {\n\t var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << ((i % 4) * 2);\n\t var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> (6 - (i % 4) * 2);\n\t var bitsCombined = bits1 | bits2;\n\t words[nBytes >>> 2] |= bitsCombined << (24 - (nBytes % 4) * 8);\n\t nBytes++;\n\t }\n\t }\n\t return WordArray.create(words, nBytes);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Base64url;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_enc = C.enc;\n\n\t /**\n\t * UTF-16 BE encoding strategy.\n\t */\n\t var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {\n\t /**\n\t * Converts a word array to a UTF-16 BE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 BE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = (words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff;\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 BE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 BE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= utf16Str.charCodeAt(i) << (16 - (i % 2) * 16);\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t /**\n\t * UTF-16 LE encoding strategy.\n\t */\n\t C_enc.Utf16LE = {\n\t /**\n\t * Converts a word array to a UTF-16 LE string.\n\t *\n\t * @param {WordArray} wordArray The word array.\n\t *\n\t * @return {string} The UTF-16 LE string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);\n\t */\n\t stringify: function (wordArray) {\n\t // Shortcuts\n\t var words = wordArray.words;\n\t var sigBytes = wordArray.sigBytes;\n\n\t // Convert\n\t var utf16Chars = [];\n\t for (var i = 0; i < sigBytes; i += 2) {\n\t var codePoint = swapEndian((words[i >>> 2] >>> (16 - (i % 4) * 8)) & 0xffff);\n\t utf16Chars.push(String.fromCharCode(codePoint));\n\t }\n\n\t return utf16Chars.join('');\n\t },\n\n\t /**\n\t * Converts a UTF-16 LE string to a word array.\n\t *\n\t * @param {string} utf16Str The UTF-16 LE string.\n\t *\n\t * @return {WordArray} The word array.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);\n\t */\n\t parse: function (utf16Str) {\n\t // Shortcut\n\t var utf16StrLength = utf16Str.length;\n\n\t // Convert\n\t var words = [];\n\t for (var i = 0; i < utf16StrLength; i++) {\n\t words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << (16 - (i % 2) * 16));\n\t }\n\n\t return WordArray.create(words, utf16StrLength * 2);\n\t }\n\t };\n\n\t function swapEndian(word) {\n\t return ((word << 8) & 0xff00ff00) | ((word >>> 8) & 0x00ff00ff);\n\t }\n\t}());\n\n\n\treturn CryptoJS.enc.Utf16;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha1\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha1\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var MD5 = C_algo.MD5;\n\n\t /**\n\t * This key derivation function is meant to conform with EVP_BytesToKey.\n\t * www.openssl.org/docs/crypto/EVP_BytesToKey.html\n\t */\n\t var EvpKDF = C_algo.EvpKDF = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hash algorithm to use. Default: MD5\n\t * @property {number} iterations The number of iterations to perform. Default: 1\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: MD5,\n\t iterations: 1\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.EvpKDF.create();\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t var block;\n\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init hasher\n\t var hasher = cfg.hasher.create();\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t if (block) {\n\t hasher.update(block);\n\t }\n\t block = hasher.update(password).finalize(salt);\n\t hasher.reset();\n\n\t // Iterations\n\t for (var i = 1; i < iterations; i++) {\n\t block = hasher.finalize(block);\n\t hasher.reset();\n\t }\n\n\t derivedKey.concat(block);\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Derives a key from a password.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.EvpKDF(password, salt);\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.EvpKDF = function (password, salt, cfg) {\n\t return EvpKDF.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.EvpKDF;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var CipherParams = C_lib.CipherParams;\n\t var C_enc = C.enc;\n\t var Hex = C_enc.Hex;\n\t var C_format = C.format;\n\n\t var HexFormatter = C_format.Hex = {\n\t /**\n\t * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.\n\t *\n\t * @param {CipherParams} cipherParams The cipher params object.\n\t *\n\t * @return {string} The hexadecimally encoded string.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hexString = CryptoJS.format.Hex.stringify(cipherParams);\n\t */\n\t stringify: function (cipherParams) {\n\t return cipherParams.ciphertext.toString(Hex);\n\t },\n\n\t /**\n\t * Converts a hexadecimally encoded ciphertext string to a cipher params object.\n\t *\n\t * @param {string} input The hexadecimally encoded string.\n\t *\n\t * @return {CipherParams} The cipher params object.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var cipherParams = CryptoJS.format.Hex.parse(hexString);\n\t */\n\t parse: function (input) {\n\t var ciphertext = Hex.parse(input);\n\t return CipherParams.create({ ciphertext: ciphertext });\n\t }\n\t };\n\t}());\n\n\n\treturn CryptoJS.format.Hex;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var C_enc = C.enc;\n\t var Utf8 = C_enc.Utf8;\n\t var C_algo = C.algo;\n\n\t /**\n\t * HMAC algorithm.\n\t */\n\t var HMAC = C_algo.HMAC = Base.extend({\n\t /**\n\t * Initializes a newly created HMAC.\n\t *\n\t * @param {Hasher} hasher The hash algorithm to use.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @example\n\t *\n\t * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);\n\t */\n\t init: function (hasher, key) {\n\t // Init hasher\n\t hasher = this._hasher = new hasher.init();\n\n\t // Convert string to WordArray, else assume WordArray already\n\t if (typeof key == 'string') {\n\t key = Utf8.parse(key);\n\t }\n\n\t // Shortcuts\n\t var hasherBlockSize = hasher.blockSize;\n\t var hasherBlockSizeBytes = hasherBlockSize * 4;\n\n\t // Allow arbitrary length keys\n\t if (key.sigBytes > hasherBlockSizeBytes) {\n\t key = hasher.finalize(key);\n\t }\n\n\t // Clamp excess bits\n\t key.clamp();\n\n\t // Clone key for inner and outer pads\n\t var oKey = this._oKey = key.clone();\n\t var iKey = this._iKey = key.clone();\n\n\t // Shortcuts\n\t var oKeyWords = oKey.words;\n\t var iKeyWords = iKey.words;\n\n\t // XOR keys with pad constants\n\t for (var i = 0; i < hasherBlockSize; i++) {\n\t oKeyWords[i] ^= 0x5c5c5c5c;\n\t iKeyWords[i] ^= 0x36363636;\n\t }\n\t oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes;\n\n\t // Set initial values\n\t this.reset();\n\t },\n\n\t /**\n\t * Resets this HMAC to its initial state.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.reset();\n\t */\n\t reset: function () {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Reset\n\t hasher.reset();\n\t hasher.update(this._iKey);\n\t },\n\n\t /**\n\t * Updates this HMAC with a message.\n\t *\n\t * @param {WordArray|string} messageUpdate The message to append.\n\t *\n\t * @return {HMAC} This HMAC instance.\n\t *\n\t * @example\n\t *\n\t * hmacHasher.update('message');\n\t * hmacHasher.update(wordArray);\n\t */\n\t update: function (messageUpdate) {\n\t this._hasher.update(messageUpdate);\n\n\t // Chainable\n\t return this;\n\t },\n\n\t /**\n\t * Finalizes the HMAC computation.\n\t * Note that the finalize operation is effectively a destructive, read-once operation.\n\t *\n\t * @param {WordArray|string} messageUpdate (Optional) A final message update.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @example\n\t *\n\t * var hmac = hmacHasher.finalize();\n\t * var hmac = hmacHasher.finalize('message');\n\t * var hmac = hmacHasher.finalize(wordArray);\n\t */\n\t finalize: function (messageUpdate) {\n\t // Shortcut\n\t var hasher = this._hasher;\n\n\t // Compute HMAC\n\t var innerHash = hasher.finalize(messageUpdate);\n\t hasher.reset();\n\t var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));\n\n\t return hmac;\n\t }\n\t });\n\t}());\n\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./lib-typedarrays\"), require(\"./enc-utf16\"), require(\"./enc-base64\"), require(\"./enc-base64url\"), require(\"./md5\"), require(\"./sha1\"), require(\"./sha256\"), require(\"./sha224\"), require(\"./sha512\"), require(\"./sha384\"), require(\"./sha3\"), require(\"./ripemd160\"), require(\"./hmac\"), require(\"./pbkdf2\"), require(\"./evpkdf\"), require(\"./cipher-core\"), require(\"./mode-cfb\"), require(\"./mode-ctr\"), require(\"./mode-ctr-gladman\"), require(\"./mode-ofb\"), require(\"./mode-ecb\"), require(\"./pad-ansix923\"), require(\"./pad-iso10126\"), require(\"./pad-iso97971\"), require(\"./pad-zeropadding\"), require(\"./pad-nopadding\"), require(\"./format-hex\"), require(\"./aes\"), require(\"./tripledes\"), require(\"./rc4\"), require(\"./rabbit\"), require(\"./rabbit-legacy\"), require(\"./blowfish\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./lib-typedarrays\", \"./enc-utf16\", \"./enc-base64\", \"./enc-base64url\", \"./md5\", \"./sha1\", \"./sha256\", \"./sha224\", \"./sha512\", \"./sha384\", \"./sha3\", \"./ripemd160\", \"./hmac\", \"./pbkdf2\", \"./evpkdf\", \"./cipher-core\", \"./mode-cfb\", \"./mode-ctr\", \"./mode-ctr-gladman\", \"./mode-ofb\", \"./mode-ecb\", \"./pad-ansix923\", \"./pad-iso10126\", \"./pad-iso97971\", \"./pad-zeropadding\", \"./pad-nopadding\", \"./format-hex\", \"./aes\", \"./tripledes\", \"./rc4\", \"./rabbit\", \"./rabbit-legacy\", \"./blowfish\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\troot.CryptoJS = factory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\treturn CryptoJS;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Check if typed arrays are supported\n\t if (typeof ArrayBuffer != 'function') {\n\t return;\n\t }\n\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\n\t // Reference original init\n\t var superInit = WordArray.init;\n\n\t // Augment WordArray.init to handle typed arrays\n\t var subInit = WordArray.init = function (typedArray) {\n\t // Convert buffers to uint8\n\t if (typedArray instanceof ArrayBuffer) {\n\t typedArray = new Uint8Array(typedArray);\n\t }\n\n\t // Convert other array views to uint8\n\t if (\n\t typedArray instanceof Int8Array ||\n\t (typeof Uint8ClampedArray !== \"undefined\" && typedArray instanceof Uint8ClampedArray) ||\n\t typedArray instanceof Int16Array ||\n\t typedArray instanceof Uint16Array ||\n\t typedArray instanceof Int32Array ||\n\t typedArray instanceof Uint32Array ||\n\t typedArray instanceof Float32Array ||\n\t typedArray instanceof Float64Array\n\t ) {\n\t typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);\n\t }\n\n\t // Handle Uint8Array\n\t if (typedArray instanceof Uint8Array) {\n\t // Shortcut\n\t var typedArrayByteLength = typedArray.byteLength;\n\n\t // Extract bytes\n\t var words = [];\n\t for (var i = 0; i < typedArrayByteLength; i++) {\n\t words[i >>> 2] |= typedArray[i] << (24 - (i % 4) * 8);\n\t }\n\n\t // Initialize this word array\n\t superInit.call(this, words, typedArrayByteLength);\n\t } else {\n\t // Else call normal init\n\t superInit.apply(this, arguments);\n\t }\n\t };\n\n\t subInit.prototype = WordArray;\n\t}());\n\n\n\treturn CryptoJS.lib.WordArray;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var T = [];\n\n\t // Compute constants\n\t (function () {\n\t for (var i = 0; i < 64; i++) {\n\t T[i] = (Math.abs(Math.sin(i + 1)) * 0x100000000) | 0;\n\t }\n\t }());\n\n\t /**\n\t * MD5 hash algorithm.\n\t */\n\t var MD5 = C_algo.MD5 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var M_offset_0 = M[offset + 0];\n\t var M_offset_1 = M[offset + 1];\n\t var M_offset_2 = M[offset + 2];\n\t var M_offset_3 = M[offset + 3];\n\t var M_offset_4 = M[offset + 4];\n\t var M_offset_5 = M[offset + 5];\n\t var M_offset_6 = M[offset + 6];\n\t var M_offset_7 = M[offset + 7];\n\t var M_offset_8 = M[offset + 8];\n\t var M_offset_9 = M[offset + 9];\n\t var M_offset_10 = M[offset + 10];\n\t var M_offset_11 = M[offset + 11];\n\t var M_offset_12 = M[offset + 12];\n\t var M_offset_13 = M[offset + 13];\n\t var M_offset_14 = M[offset + 14];\n\t var M_offset_15 = M[offset + 15];\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\n\t // Computation\n\t a = FF(a, b, c, d, M_offset_0, 7, T[0]);\n\t d = FF(d, a, b, c, M_offset_1, 12, T[1]);\n\t c = FF(c, d, a, b, M_offset_2, 17, T[2]);\n\t b = FF(b, c, d, a, M_offset_3, 22, T[3]);\n\t a = FF(a, b, c, d, M_offset_4, 7, T[4]);\n\t d = FF(d, a, b, c, M_offset_5, 12, T[5]);\n\t c = FF(c, d, a, b, M_offset_6, 17, T[6]);\n\t b = FF(b, c, d, a, M_offset_7, 22, T[7]);\n\t a = FF(a, b, c, d, M_offset_8, 7, T[8]);\n\t d = FF(d, a, b, c, M_offset_9, 12, T[9]);\n\t c = FF(c, d, a, b, M_offset_10, 17, T[10]);\n\t b = FF(b, c, d, a, M_offset_11, 22, T[11]);\n\t a = FF(a, b, c, d, M_offset_12, 7, T[12]);\n\t d = FF(d, a, b, c, M_offset_13, 12, T[13]);\n\t c = FF(c, d, a, b, M_offset_14, 17, T[14]);\n\t b = FF(b, c, d, a, M_offset_15, 22, T[15]);\n\n\t a = GG(a, b, c, d, M_offset_1, 5, T[16]);\n\t d = GG(d, a, b, c, M_offset_6, 9, T[17]);\n\t c = GG(c, d, a, b, M_offset_11, 14, T[18]);\n\t b = GG(b, c, d, a, M_offset_0, 20, T[19]);\n\t a = GG(a, b, c, d, M_offset_5, 5, T[20]);\n\t d = GG(d, a, b, c, M_offset_10, 9, T[21]);\n\t c = GG(c, d, a, b, M_offset_15, 14, T[22]);\n\t b = GG(b, c, d, a, M_offset_4, 20, T[23]);\n\t a = GG(a, b, c, d, M_offset_9, 5, T[24]);\n\t d = GG(d, a, b, c, M_offset_14, 9, T[25]);\n\t c = GG(c, d, a, b, M_offset_3, 14, T[26]);\n\t b = GG(b, c, d, a, M_offset_8, 20, T[27]);\n\t a = GG(a, b, c, d, M_offset_13, 5, T[28]);\n\t d = GG(d, a, b, c, M_offset_2, 9, T[29]);\n\t c = GG(c, d, a, b, M_offset_7, 14, T[30]);\n\t b = GG(b, c, d, a, M_offset_12, 20, T[31]);\n\n\t a = HH(a, b, c, d, M_offset_5, 4, T[32]);\n\t d = HH(d, a, b, c, M_offset_8, 11, T[33]);\n\t c = HH(c, d, a, b, M_offset_11, 16, T[34]);\n\t b = HH(b, c, d, a, M_offset_14, 23, T[35]);\n\t a = HH(a, b, c, d, M_offset_1, 4, T[36]);\n\t d = HH(d, a, b, c, M_offset_4, 11, T[37]);\n\t c = HH(c, d, a, b, M_offset_7, 16, T[38]);\n\t b = HH(b, c, d, a, M_offset_10, 23, T[39]);\n\t a = HH(a, b, c, d, M_offset_13, 4, T[40]);\n\t d = HH(d, a, b, c, M_offset_0, 11, T[41]);\n\t c = HH(c, d, a, b, M_offset_3, 16, T[42]);\n\t b = HH(b, c, d, a, M_offset_6, 23, T[43]);\n\t a = HH(a, b, c, d, M_offset_9, 4, T[44]);\n\t d = HH(d, a, b, c, M_offset_12, 11, T[45]);\n\t c = HH(c, d, a, b, M_offset_15, 16, T[46]);\n\t b = HH(b, c, d, a, M_offset_2, 23, T[47]);\n\n\t a = II(a, b, c, d, M_offset_0, 6, T[48]);\n\t d = II(d, a, b, c, M_offset_7, 10, T[49]);\n\t c = II(c, d, a, b, M_offset_14, 15, T[50]);\n\t b = II(b, c, d, a, M_offset_5, 21, T[51]);\n\t a = II(a, b, c, d, M_offset_12, 6, T[52]);\n\t d = II(d, a, b, c, M_offset_3, 10, T[53]);\n\t c = II(c, d, a, b, M_offset_10, 15, T[54]);\n\t b = II(b, c, d, a, M_offset_1, 21, T[55]);\n\t a = II(a, b, c, d, M_offset_8, 6, T[56]);\n\t d = II(d, a, b, c, M_offset_15, 10, T[57]);\n\t c = II(c, d, a, b, M_offset_6, 15, T[58]);\n\t b = II(b, c, d, a, M_offset_13, 21, T[59]);\n\t a = II(a, b, c, d, M_offset_4, 6, T[60]);\n\t d = II(d, a, b, c, M_offset_11, 10, T[61]);\n\t c = II(c, d, a, b, M_offset_2, 15, T[62]);\n\t b = II(b, c, d, a, M_offset_9, 21, T[63]);\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\n\t var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);\n\t var nBitsTotalL = nBitsTotal;\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (\n\t (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)\n\t );\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)\n\t );\n\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t function FF(a, b, c, d, x, s, t) {\n\t var n = a + ((b & c) | (~b & d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function GG(a, b, c, d, x, s, t) {\n\t var n = a + ((b & d) | (c & ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function HH(a, b, c, d, x, s, t) {\n\t var n = a + (b ^ c ^ d) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t function II(a, b, c, d, x, s, t) {\n\t var n = a + (c ^ (b | ~d)) + x + t;\n\t return ((n << s) | (n >>> (32 - s))) + b;\n\t }\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.MD5('message');\n\t * var hash = CryptoJS.MD5(wordArray);\n\t */\n\t C.MD5 = Hasher._createHelper(MD5);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacMD5(message, key);\n\t */\n\t C.HmacMD5 = Hasher._createHmacHelper(MD5);\n\t}(Math));\n\n\n\treturn CryptoJS.MD5;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Cipher Feedback block mode.\n\t */\n\tCryptoJS.mode.CFB = (function () {\n\t var CFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t CFB.Encryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // Remember this block to use with next block\n\t this._prevBlock = words.slice(offset, offset + blockSize);\n\t }\n\t });\n\n\t CFB.Decryptor = CFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher;\n\t var blockSize = cipher.blockSize;\n\n\t // Remember this block to use with next block\n\t var thisBlock = words.slice(offset, offset + blockSize);\n\n\t generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher);\n\n\t // This block becomes the previous block\n\t this._prevBlock = thisBlock;\n\t }\n\t });\n\n\t function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {\n\t var keystream;\n\n\t // Shortcut\n\t var iv = this._iv;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t } else {\n\t keystream = this._prevBlock;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\n\t return CFB;\n\t}());\n\n\n\treturn CryptoJS.mode.CFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t * Counter block mode compatible with Dr Brian Gladman fileenc.c\n\t * derived from CryptoJS.mode.CTR\n\t * Jan Hruby jhruby.web@gmail.com\n\t */\n\tCryptoJS.mode.CTRGladman = (function () {\n\t var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();\n\n\t\tfunction incWord(word)\n\t\t{\n\t\t\tif (((word >> 24) & 0xff) === 0xff) { //overflow\n\t\t\tvar b1 = (word >> 16)&0xff;\n\t\t\tvar b2 = (word >> 8)&0xff;\n\t\t\tvar b3 = word & 0xff;\n\n\t\t\tif (b1 === 0xff) // overflow b1\n\t\t\t{\n\t\t\tb1 = 0;\n\t\t\tif (b2 === 0xff)\n\t\t\t{\n\t\t\t\tb2 = 0;\n\t\t\t\tif (b3 === 0xff)\n\t\t\t\t{\n\t\t\t\t\tb3 = 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t++b3;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t++b2;\n\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t++b1;\n\t\t\t}\n\n\t\t\tword = 0;\n\t\t\tword += (b1 << 16);\n\t\t\tword += (b2 << 8);\n\t\t\tword += b3;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\tword += (0x01 << 24);\n\t\t\t}\n\t\t\treturn word;\n\t\t}\n\n\t\tfunction incCounter(counter)\n\t\t{\n\t\t\tif ((counter[0] = incWord(counter[0])) === 0)\n\t\t\t{\n\t\t\t\t// encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8\n\t\t\t\tcounter[1] = incWord(counter[1]);\n\t\t\t}\n\t\t\treturn counter;\n\t\t}\n\n\t var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\n\t\t\t\tincCounter(counter);\n\n\t\t\t\tvar keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTRGladman.Decryptor = Encryptor;\n\n\t return CTRGladman;\n\t}());\n\n\n\n\n\treturn CryptoJS.mode.CTRGladman;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Counter block mode.\n\t */\n\tCryptoJS.mode.CTR = (function () {\n\t var CTR = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = CTR.Encryptor = CTR.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var counter = this._counter;\n\n\t // Generate keystream\n\t if (iv) {\n\t counter = this._counter = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t var keystream = counter.slice(0);\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Increment counter\n\t counter[blockSize - 1] = (counter[blockSize - 1] + 1) | 0\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t CTR.Decryptor = Encryptor;\n\n\t return CTR;\n\t}());\n\n\n\treturn CryptoJS.mode.CTR;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Electronic Codebook block mode.\n\t */\n\tCryptoJS.mode.ECB = (function () {\n\t var ECB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t ECB.Encryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.encryptBlock(words, offset);\n\t }\n\t });\n\n\t ECB.Decryptor = ECB.extend({\n\t processBlock: function (words, offset) {\n\t this._cipher.decryptBlock(words, offset);\n\t }\n\t });\n\n\t return ECB;\n\t}());\n\n\n\treturn CryptoJS.mode.ECB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Output Feedback block mode.\n\t */\n\tCryptoJS.mode.OFB = (function () {\n\t var OFB = CryptoJS.lib.BlockCipherMode.extend();\n\n\t var Encryptor = OFB.Encryptor = OFB.extend({\n\t processBlock: function (words, offset) {\n\t // Shortcuts\n\t var cipher = this._cipher\n\t var blockSize = cipher.blockSize;\n\t var iv = this._iv;\n\t var keystream = this._keystream;\n\n\t // Generate keystream\n\t if (iv) {\n\t keystream = this._keystream = iv.slice(0);\n\n\t // Remove IV for subsequent blocks\n\t this._iv = undefined;\n\t }\n\t cipher.encryptBlock(keystream, 0);\n\n\t // Encrypt\n\t for (var i = 0; i < blockSize; i++) {\n\t words[offset + i] ^= keystream[i];\n\t }\n\t }\n\t });\n\n\t OFB.Decryptor = Encryptor;\n\n\t return OFB;\n\t}());\n\n\n\treturn CryptoJS.mode.OFB;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ANSI X.923 padding strategy.\n\t */\n\tCryptoJS.pad.AnsiX923 = {\n\t pad: function (data, blockSize) {\n\t // Shortcuts\n\t var dataSigBytes = data.sigBytes;\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;\n\n\t // Compute last byte position\n\t var lastBytePos = dataSigBytes + nPaddingBytes - 1;\n\n\t // Pad\n\t data.clamp();\n\t data.words[lastBytePos >>> 2] |= nPaddingBytes << (24 - (lastBytePos % 4) * 8);\n\t data.sigBytes += nPaddingBytes;\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Ansix923;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO 10126 padding strategy.\n\t */\n\tCryptoJS.pad.Iso10126 = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Count padding bytes\n\t var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;\n\n\t // Pad\n\t data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).\n\t concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));\n\t },\n\n\t unpad: function (data) {\n\t // Get number of padding bytes from last byte\n\t var nPaddingBytes = data.words[(data.sigBytes - 1) >>> 2] & 0xff;\n\n\t // Remove padding\n\t data.sigBytes -= nPaddingBytes;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso10126;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * ISO/IEC 9797-1 Padding Method 2.\n\t */\n\tCryptoJS.pad.Iso97971 = {\n\t pad: function (data, blockSize) {\n\t // Add 0x80 byte\n\t data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1));\n\n\t // Zero pad the rest\n\t CryptoJS.pad.ZeroPadding.pad(data, blockSize);\n\t },\n\n\t unpad: function (data) {\n\t // Remove zero padding\n\t CryptoJS.pad.ZeroPadding.unpad(data);\n\n\t // Remove one more byte -- the 0x80 byte\n\t data.sigBytes--;\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.Iso97971;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * A noop padding strategy.\n\t */\n\tCryptoJS.pad.NoPadding = {\n\t pad: function () {\n\t },\n\n\t unpad: function () {\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.NoPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/**\n\t * Zero padding strategy.\n\t */\n\tCryptoJS.pad.ZeroPadding = {\n\t pad: function (data, blockSize) {\n\t // Shortcut\n\t var blockSizeBytes = blockSize * 4;\n\n\t // Pad\n\t data.clamp();\n\t data.sigBytes += blockSizeBytes - ((data.sigBytes % blockSizeBytes) || blockSizeBytes);\n\t },\n\n\t unpad: function (data) {\n\t // Shortcut\n\t var dataWords = data.words;\n\n\t // Unpad\n\t var i = data.sigBytes - 1;\n\t for (var i = data.sigBytes - 1; i >= 0; i--) {\n\t if (((dataWords[i >>> 2] >>> (24 - (i % 4) * 8)) & 0xff)) {\n\t data.sigBytes = i + 1;\n\t break;\n\t }\n\t }\n\t }\n\t};\n\n\n\treturn CryptoJS.pad.ZeroPadding;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"), require(\"./hmac\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\", \"./hmac\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\t var HMAC = C_algo.HMAC;\n\n\t /**\n\t * Password-Based Key Derivation Function 2 algorithm.\n\t */\n\t var PBKDF2 = C_algo.PBKDF2 = Base.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)\n\t * @property {Hasher} hasher The hasher to use. Default: SHA256\n\t * @property {number} iterations The number of iterations to perform. Default: 250000\n\t */\n\t cfg: Base.extend({\n\t keySize: 128/32,\n\t hasher: SHA256,\n\t iterations: 250000\n\t }),\n\n\t /**\n\t * Initializes a newly created key derivation function.\n\t *\n\t * @param {Object} cfg (Optional) The configuration options to use for the derivation.\n\t *\n\t * @example\n\t *\n\t * var kdf = CryptoJS.algo.PBKDF2.create();\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });\n\t * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });\n\t */\n\t init: function (cfg) {\n\t this.cfg = this.cfg.extend(cfg);\n\t },\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @example\n\t *\n\t * var key = kdf.compute(password, salt);\n\t */\n\t compute: function (password, salt) {\n\t // Shortcut\n\t var cfg = this.cfg;\n\n\t // Init HMAC\n\t var hmac = HMAC.create(cfg.hasher, password);\n\n\t // Initial values\n\t var derivedKey = WordArray.create();\n\t var blockIndex = WordArray.create([0x00000001]);\n\n\t // Shortcuts\n\t var derivedKeyWords = derivedKey.words;\n\t var blockIndexWords = blockIndex.words;\n\t var keySize = cfg.keySize;\n\t var iterations = cfg.iterations;\n\n\t // Generate key\n\t while (derivedKeyWords.length < keySize) {\n\t var block = hmac.update(salt).finalize(blockIndex);\n\t hmac.reset();\n\n\t // Shortcuts\n\t var blockWords = block.words;\n\t var blockWordsLength = blockWords.length;\n\n\t // Iterations\n\t var intermediate = block;\n\t for (var i = 1; i < iterations; i++) {\n\t intermediate = hmac.finalize(intermediate);\n\t hmac.reset();\n\n\t // Shortcut\n\t var intermediateWords = intermediate.words;\n\n\t // XOR intermediate with block\n\t for (var j = 0; j < blockWordsLength; j++) {\n\t blockWords[j] ^= intermediateWords[j];\n\t }\n\t }\n\n\t derivedKey.concat(block);\n\t blockIndexWords[0]++;\n\t }\n\t derivedKey.sigBytes = keySize * 4;\n\n\t return derivedKey;\n\t }\n\t });\n\n\t /**\n\t * Computes the Password-Based Key Derivation Function 2.\n\t *\n\t * @param {WordArray|string} password The password.\n\t * @param {WordArray|string} salt A salt.\n\t * @param {Object} cfg (Optional) The configuration options to use for this computation.\n\t *\n\t * @return {WordArray} The derived key.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var key = CryptoJS.PBKDF2(password, salt);\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });\n\t * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });\n\t */\n\t C.PBKDF2 = function (password, salt, cfg) {\n\t return PBKDF2.create(cfg).compute(password, salt);\n\t };\n\t}());\n\n\n\treturn CryptoJS.PBKDF2;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm.\n\t *\n\t * This is a legacy version that neglected to convert the key to little-endian.\n\t * This error doesn't affect the cipher's security,\n\t * but it does affect its compatibility with other implementations.\n\t */\n\t var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);\n\t}());\n\n\n\treturn CryptoJS.RabbitLegacy;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t // Reusable objects\n\t var S = [];\n\t var C_ = [];\n\t var G = [];\n\n\t /**\n\t * Rabbit stream cipher algorithm\n\t */\n\t var Rabbit = C_algo.Rabbit = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var K = this._key.words;\n\t var iv = this.cfg.iv;\n\n\t // Swap endian\n\t for (var i = 0; i < 4; i++) {\n\t K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |\n\t (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Generate initial state values\n\t var X = this._X = [\n\t K[0], (K[3] << 16) | (K[2] >>> 16),\n\t K[1], (K[0] << 16) | (K[3] >>> 16),\n\t K[2], (K[1] << 16) | (K[0] >>> 16),\n\t K[3], (K[2] << 16) | (K[1] >>> 16)\n\t ];\n\n\t // Generate initial counter values\n\t var C = this._C = [\n\t (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),\n\t (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),\n\t (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),\n\t (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)\n\t ];\n\n\t // Carry bit\n\t this._b = 0;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\n\t // Modify the counters\n\t for (var i = 0; i < 8; i++) {\n\t C[i] ^= X[(i + 4) & 7];\n\t }\n\n\t // IV setup\n\t if (iv) {\n\t // Shortcuts\n\t var IV = iv.words;\n\t var IV_0 = IV[0];\n\t var IV_1 = IV[1];\n\n\t // Generate four subvectors\n\t var i0 = (((IV_0 << 8) | (IV_0 >>> 24)) & 0x00ff00ff) | (((IV_0 << 24) | (IV_0 >>> 8)) & 0xff00ff00);\n\t var i2 = (((IV_1 << 8) | (IV_1 >>> 24)) & 0x00ff00ff) | (((IV_1 << 24) | (IV_1 >>> 8)) & 0xff00ff00);\n\t var i1 = (i0 >>> 16) | (i2 & 0xffff0000);\n\t var i3 = (i2 << 16) | (i0 & 0x0000ffff);\n\n\t // Modify counter values\n\t C[0] ^= i0;\n\t C[1] ^= i1;\n\t C[2] ^= i2;\n\t C[3] ^= i3;\n\t C[4] ^= i0;\n\t C[5] ^= i1;\n\t C[6] ^= i2;\n\t C[7] ^= i3;\n\n\t // Iterate the system four times\n\t for (var i = 0; i < 4; i++) {\n\t nextState.call(this);\n\t }\n\t }\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var X = this._X;\n\n\t // Iterate the system\n\t nextState.call(this);\n\n\t // Generate four keystream words\n\t S[0] = X[0] ^ (X[5] >>> 16) ^ (X[3] << 16);\n\t S[1] = X[2] ^ (X[7] >>> 16) ^ (X[5] << 16);\n\t S[2] = X[4] ^ (X[1] >>> 16) ^ (X[7] << 16);\n\t S[3] = X[6] ^ (X[3] >>> 16) ^ (X[1] << 16);\n\n\t for (var i = 0; i < 4; i++) {\n\t // Swap endian\n\t S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |\n\t (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);\n\n\t // Encrypt\n\t M[offset + i] ^= S[i];\n\t }\n\t },\n\n\t blockSize: 128/32,\n\n\t ivSize: 64/32\n\t });\n\n\t function nextState() {\n\t // Shortcuts\n\t var X = this._X;\n\t var C = this._C;\n\n\t // Save old counter values\n\t for (var i = 0; i < 8; i++) {\n\t C_[i] = C[i];\n\t }\n\n\t // Calculate new counter values\n\t C[0] = (C[0] + 0x4d34d34d + this._b) | 0;\n\t C[1] = (C[1] + 0xd34d34d3 + ((C[0] >>> 0) < (C_[0] >>> 0) ? 1 : 0)) | 0;\n\t C[2] = (C[2] + 0x34d34d34 + ((C[1] >>> 0) < (C_[1] >>> 0) ? 1 : 0)) | 0;\n\t C[3] = (C[3] + 0x4d34d34d + ((C[2] >>> 0) < (C_[2] >>> 0) ? 1 : 0)) | 0;\n\t C[4] = (C[4] + 0xd34d34d3 + ((C[3] >>> 0) < (C_[3] >>> 0) ? 1 : 0)) | 0;\n\t C[5] = (C[5] + 0x34d34d34 + ((C[4] >>> 0) < (C_[4] >>> 0) ? 1 : 0)) | 0;\n\t C[6] = (C[6] + 0x4d34d34d + ((C[5] >>> 0) < (C_[5] >>> 0) ? 1 : 0)) | 0;\n\t C[7] = (C[7] + 0xd34d34d3 + ((C[6] >>> 0) < (C_[6] >>> 0) ? 1 : 0)) | 0;\n\t this._b = (C[7] >>> 0) < (C_[7] >>> 0) ? 1 : 0;\n\n\t // Calculate the g-values\n\t for (var i = 0; i < 8; i++) {\n\t var gx = X[i] + C[i];\n\n\t // Construct high and low argument for squaring\n\t var ga = gx & 0xffff;\n\t var gb = gx >>> 16;\n\n\t // Calculate high and low result of squaring\n\t var gh = ((((ga * ga) >>> 17) + ga * gb) >>> 15) + gb * gb;\n\t var gl = (((gx & 0xffff0000) * gx) | 0) + (((gx & 0x0000ffff) * gx) | 0);\n\n\t // High XOR low\n\t G[i] = gh ^ gl;\n\t }\n\n\t // Calculate new state values\n\t X[0] = (G[0] + ((G[7] << 16) | (G[7] >>> 16)) + ((G[6] << 16) | (G[6] >>> 16))) | 0;\n\t X[1] = (G[1] + ((G[0] << 8) | (G[0] >>> 24)) + G[7]) | 0;\n\t X[2] = (G[2] + ((G[1] << 16) | (G[1] >>> 16)) + ((G[0] << 16) | (G[0] >>> 16))) | 0;\n\t X[3] = (G[3] + ((G[2] << 8) | (G[2] >>> 24)) + G[1]) | 0;\n\t X[4] = (G[4] + ((G[3] << 16) | (G[3] >>> 16)) + ((G[2] << 16) | (G[2] >>> 16))) | 0;\n\t X[5] = (G[5] + ((G[4] << 8) | (G[4] >>> 24)) + G[3]) | 0;\n\t X[6] = (G[6] + ((G[5] << 16) | (G[5] >>> 16)) + ((G[4] << 16) | (G[4] >>> 16))) | 0;\n\t X[7] = (G[7] + ((G[6] << 8) | (G[6] >>> 24)) + G[5]) | 0;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);\n\t */\n\t C.Rabbit = StreamCipher._createHelper(Rabbit);\n\t}());\n\n\n\treturn CryptoJS.Rabbit;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var StreamCipher = C_lib.StreamCipher;\n\t var C_algo = C.algo;\n\n\t /**\n\t * RC4 stream cipher algorithm.\n\t */\n\t var RC4 = C_algo.RC4 = StreamCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t var keySigBytes = key.sigBytes;\n\n\t // Init sbox\n\t var S = this._S = [];\n\t for (var i = 0; i < 256; i++) {\n\t S[i] = i;\n\t }\n\n\t // Key setup\n\t for (var i = 0, j = 0; i < 256; i++) {\n\t var keyByteIndex = i % keySigBytes;\n\t var keyByte = (keyWords[keyByteIndex >>> 2] >>> (24 - (keyByteIndex % 4) * 8)) & 0xff;\n\n\t j = (j + S[i] + keyByte) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\t }\n\n\t // Counters\n\t this._i = this._j = 0;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t M[offset] ^= generateKeystreamWord.call(this);\n\t },\n\n\t keySize: 256/32,\n\n\t ivSize: 0\n\t });\n\n\t function generateKeystreamWord() {\n\t // Shortcuts\n\t var S = this._S;\n\t var i = this._i;\n\t var j = this._j;\n\n\t // Generate keystream word\n\t var keystreamWord = 0;\n\t for (var n = 0; n < 4; n++) {\n\t i = (i + 1) % 256;\n\t j = (j + S[i]) % 256;\n\n\t // Swap\n\t var t = S[i];\n\t S[i] = S[j];\n\t S[j] = t;\n\n\t keystreamWord |= S[(S[i] + S[j]) % 256] << (24 - n * 8);\n\t }\n\n\t // Update counters\n\t this._i = i;\n\t this._j = j;\n\n\t return keystreamWord;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4 = StreamCipher._createHelper(RC4);\n\n\t /**\n\t * Modified RC4 stream cipher algorithm.\n\t */\n\t var RC4Drop = C_algo.RC4Drop = RC4.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} drop The number of keystream words to drop. Default 192\n\t */\n\t cfg: RC4.cfg.extend({\n\t drop: 192\n\t }),\n\n\t _doReset: function () {\n\t RC4._doReset.call(this);\n\n\t // Drop\n\t for (var i = this.cfg.drop; i > 0; i--) {\n\t generateKeystreamWord.call(this);\n\t }\n\t }\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);\n\t */\n\t C.RC4Drop = StreamCipher._createHelper(RC4Drop);\n\t}());\n\n\n\treturn CryptoJS.RC4;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t/** @preserve\n\t(c) 2012 by Cédric Mesnil. All rights reserved.\n\n\tRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n\n\t - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n\t - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n\n\tTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\t*/\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Constants table\n\t var _zl = WordArray.create([\n\t 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,\n\t 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,\n\t 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,\n\t 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,\n\t 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);\n\t var _zr = WordArray.create([\n\t 5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,\n\t 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,\n\t 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,\n\t 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,\n\t 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);\n\t var _sl = WordArray.create([\n\t 11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,\n\t 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,\n\t 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,\n\t 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,\n\t 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6 ]);\n\t var _sr = WordArray.create([\n\t 8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,\n\t 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,\n\t 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,\n\t 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,\n\t 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11 ]);\n\n\t var _hl = WordArray.create([ 0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);\n\t var _hr = WordArray.create([ 0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);\n\n\t /**\n\t * RIPEMD160 hash algorithm.\n\t */\n\t var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\n\t // Swap endian\n\t for (var i = 0; i < 16; i++) {\n\t // Shortcuts\n\t var offset_i = offset + i;\n\t var M_offset_i = M[offset_i];\n\n\t // Swap\n\t M[offset_i] = (\n\t (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |\n\t (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)\n\t );\n\t }\n\t // Shortcut\n\t var H = this._hash.words;\n\t var hl = _hl.words;\n\t var hr = _hr.words;\n\t var zl = _zl.words;\n\t var zr = _zr.words;\n\t var sl = _sl.words;\n\t var sr = _sr.words;\n\n\t // Working variables\n\t var al, bl, cl, dl, el;\n\t var ar, br, cr, dr, er;\n\n\t ar = al = H[0];\n\t br = bl = H[1];\n\t cr = cl = H[2];\n\t dr = dl = H[3];\n\t er = el = H[4];\n\t // Computation\n\t var t;\n\t for (var i = 0; i < 80; i += 1) {\n\t t = (al + M[offset+zl[i]])|0;\n\t if (i<16){\n\t\t t += f1(bl,cl,dl) + hl[0];\n\t } else if (i<32) {\n\t\t t += f2(bl,cl,dl) + hl[1];\n\t } else if (i<48) {\n\t\t t += f3(bl,cl,dl) + hl[2];\n\t } else if (i<64) {\n\t\t t += f4(bl,cl,dl) + hl[3];\n\t } else {// if (i<80) {\n\t\t t += f5(bl,cl,dl) + hl[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sl[i]);\n\t t = (t+el)|0;\n\t al = el;\n\t el = dl;\n\t dl = rotl(cl, 10);\n\t cl = bl;\n\t bl = t;\n\n\t t = (ar + M[offset+zr[i]])|0;\n\t if (i<16){\n\t\t t += f5(br,cr,dr) + hr[0];\n\t } else if (i<32) {\n\t\t t += f4(br,cr,dr) + hr[1];\n\t } else if (i<48) {\n\t\t t += f3(br,cr,dr) + hr[2];\n\t } else if (i<64) {\n\t\t t += f2(br,cr,dr) + hr[3];\n\t } else {// if (i<80) {\n\t\t t += f1(br,cr,dr) + hr[4];\n\t }\n\t t = t|0;\n\t t = rotl(t,sr[i]) ;\n\t t = (t+er)|0;\n\t ar = er;\n\t er = dr;\n\t dr = rotl(cr, 10);\n\t cr = br;\n\t br = t;\n\t }\n\t // Intermediate hash value\n\t t = (H[1] + cl + dr)|0;\n\t H[1] = (H[2] + dl + er)|0;\n\t H[2] = (H[3] + el + ar)|0;\n\t H[3] = (H[4] + al + br)|0;\n\t H[4] = (H[0] + bl + cr)|0;\n\t H[0] = t;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (\n\t (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |\n\t (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)\n\t );\n\t data.sigBytes = (dataWords.length + 1) * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var hash = this._hash;\n\t var H = hash.words;\n\n\t // Swap endian\n\t for (var i = 0; i < 5; i++) {\n\t // Shortcut\n\t var H_i = H[i];\n\n\t // Swap\n\t H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |\n\t (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);\n\t }\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\n\t function f1(x, y, z) {\n\t return ((x) ^ (y) ^ (z));\n\n\t }\n\n\t function f2(x, y, z) {\n\t return (((x)&(y)) | ((~x)&(z)));\n\t }\n\n\t function f3(x, y, z) {\n\t return (((x) | (~(y))) ^ (z));\n\t }\n\n\t function f4(x, y, z) {\n\t return (((x) & (z)) | ((y)&(~(z))));\n\t }\n\n\t function f5(x, y, z) {\n\t return ((x) ^ ((y) |(~(z))));\n\n\t }\n\n\t function rotl(x,n) {\n\t return (x<<n) | (x>>>(32-n));\n\t }\n\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.RIPEMD160('message');\n\t * var hash = CryptoJS.RIPEMD160(wordArray);\n\t */\n\t C.RIPEMD160 = Hasher._createHelper(RIPEMD160);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacRIPEMD160(message, key);\n\t */\n\t C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);\n\t}(Math));\n\n\n\treturn CryptoJS.RIPEMD160;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-1 hash algorithm.\n\t */\n\t var SHA1 = C_algo.SHA1 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0x67452301, 0xefcdab89,\n\t 0x98badcfe, 0x10325476,\n\t 0xc3d2e1f0\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\n\t // Computation\n\t for (var i = 0; i < 80; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\n\t W[i] = (n << 1) | (n >>> 31);\n\t }\n\n\t var t = ((a << 5) | (a >>> 27)) + e + W[i];\n\t if (i < 20) {\n\t t += ((b & c) | (~b & d)) + 0x5a827999;\n\t } else if (i < 40) {\n\t t += (b ^ c ^ d) + 0x6ed9eba1;\n\t } else if (i < 60) {\n\t t += ((b & c) | (b & d) | (c & d)) - 0x70e44324;\n\t } else /* if (i < 80) */ {\n\t t += (b ^ c ^ d) - 0x359d3e2a;\n\t }\n\n\t e = d;\n\t d = c;\n\t c = (b << 30) | (b >>> 2);\n\t b = a;\n\t a = t;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA1('message');\n\t * var hash = CryptoJS.SHA1(wordArray);\n\t */\n\t C.SHA1 = Hasher._createHelper(SHA1);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA1(message, key);\n\t */\n\t C.HmacSHA1 = Hasher._createHmacHelper(SHA1);\n\t}());\n\n\n\treturn CryptoJS.SHA1;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./sha256\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./sha256\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var C_algo = C.algo;\n\t var SHA256 = C_algo.SHA256;\n\n\t /**\n\t * SHA-224 hash algorithm.\n\t */\n\t var SHA224 = C_algo.SHA224 = SHA256.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init([\n\t 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,\n\t 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA256._doFinalize.call(this);\n\n\t hash.sigBytes -= 4;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA224('message');\n\t * var hash = CryptoJS.SHA224(wordArray);\n\t */\n\t C.SHA224 = SHA256._createHelper(SHA224);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA224(message, key);\n\t */\n\t C.HmacSHA224 = SHA256._createHmacHelper(SHA224);\n\t}());\n\n\n\treturn CryptoJS.SHA224;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_algo = C.algo;\n\n\t // Initialization and round constants tables\n\t var H = [];\n\t var K = [];\n\n\t // Compute constants\n\t (function () {\n\t function isPrime(n) {\n\t var sqrtN = Math.sqrt(n);\n\t for (var factor = 2; factor <= sqrtN; factor++) {\n\t if (!(n % factor)) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t }\n\n\t function getFractionalBits(n) {\n\t return ((n - (n | 0)) * 0x100000000) | 0;\n\t }\n\n\t var n = 2;\n\t var nPrime = 0;\n\t while (nPrime < 64) {\n\t if (isPrime(n)) {\n\t if (nPrime < 8) {\n\t H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));\n\t }\n\t K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));\n\n\t nPrime++;\n\t }\n\n\t n++;\n\t }\n\t }());\n\n\t // Reusable object\n\t var W = [];\n\n\t /**\n\t * SHA-256 hash algorithm.\n\t */\n\t var SHA256 = C_algo.SHA256 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new WordArray.init(H.slice(0));\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcut\n\t var H = this._hash.words;\n\n\t // Working variables\n\t var a = H[0];\n\t var b = H[1];\n\t var c = H[2];\n\t var d = H[3];\n\t var e = H[4];\n\t var f = H[5];\n\t var g = H[6];\n\t var h = H[7];\n\n\t // Computation\n\t for (var i = 0; i < 64; i++) {\n\t if (i < 16) {\n\t W[i] = M[offset + i] | 0;\n\t } else {\n\t var gamma0x = W[i - 15];\n\t var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^\n\t ((gamma0x << 14) | (gamma0x >>> 18)) ^\n\t (gamma0x >>> 3);\n\n\t var gamma1x = W[i - 2];\n\t var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^\n\t ((gamma1x << 13) | (gamma1x >>> 19)) ^\n\t (gamma1x >>> 10);\n\n\t W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];\n\t }\n\n\t var ch = (e & f) ^ (~e & g);\n\t var maj = (a & b) ^ (a & c) ^ (b & c);\n\n\t var sigma0 = ((a << 30) | (a >>> 2)) ^ ((a << 19) | (a >>> 13)) ^ ((a << 10) | (a >>> 22));\n\t var sigma1 = ((e << 26) | (e >>> 6)) ^ ((e << 21) | (e >>> 11)) ^ ((e << 7) | (e >>> 25));\n\n\t var t1 = h + sigma1 + ch + K[i] + W[i];\n\t var t2 = sigma0 + maj;\n\n\t h = g;\n\t g = f;\n\t f = e;\n\t e = (d + t1) | 0;\n\t d = c;\n\t c = b;\n\t b = a;\n\t a = (t1 + t2) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H[0] = (H[0] + a) | 0;\n\t H[1] = (H[1] + b) | 0;\n\t H[2] = (H[2] + c) | 0;\n\t H[3] = (H[3] + d) | 0;\n\t H[4] = (H[4] + e) | 0;\n\t H[5] = (H[5] + f) | 0;\n\t H[6] = (H[6] + g) | 0;\n\t H[7] = (H[7] + h) | 0;\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Return final computed hash\n\t return this._hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA256('message');\n\t * var hash = CryptoJS.SHA256(wordArray);\n\t */\n\t C.SHA256 = Hasher._createHelper(SHA256);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA256(message, key);\n\t */\n\t C.HmacSHA256 = Hasher._createHmacHelper(SHA256);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA256;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (Math) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var C_algo = C.algo;\n\n\t // Constants tables\n\t var RHO_OFFSETS = [];\n\t var PI_INDEXES = [];\n\t var ROUND_CONSTANTS = [];\n\n\t // Compute Constants\n\t (function () {\n\t // Compute rho offset constants\n\t var x = 1, y = 0;\n\t for (var t = 0; t < 24; t++) {\n\t RHO_OFFSETS[x + 5 * y] = ((t + 1) * (t + 2) / 2) % 64;\n\n\t var newX = y % 5;\n\t var newY = (2 * x + 3 * y) % 5;\n\t x = newX;\n\t y = newY;\n\t }\n\n\t // Compute pi index constants\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t PI_INDEXES[x + 5 * y] = y + ((2 * x + 3 * y) % 5) * 5;\n\t }\n\t }\n\n\t // Compute round constants\n\t var LFSR = 0x01;\n\t for (var i = 0; i < 24; i++) {\n\t var roundConstantMsw = 0;\n\t var roundConstantLsw = 0;\n\n\t for (var j = 0; j < 7; j++) {\n\t if (LFSR & 0x01) {\n\t var bitPosition = (1 << j) - 1;\n\t if (bitPosition < 32) {\n\t roundConstantLsw ^= 1 << bitPosition;\n\t } else /* if (bitPosition >= 32) */ {\n\t roundConstantMsw ^= 1 << (bitPosition - 32);\n\t }\n\t }\n\n\t // Compute next LFSR\n\t if (LFSR & 0x80) {\n\t // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1\n\t LFSR = (LFSR << 1) ^ 0x71;\n\t } else {\n\t LFSR <<= 1;\n\t }\n\t }\n\n\t ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);\n\t }\n\t }());\n\n\t // Reusable objects for temporary values\n\t var T = [];\n\t (function () {\n\t for (var i = 0; i < 25; i++) {\n\t T[i] = X64Word.create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-3 hash algorithm.\n\t */\n\t var SHA3 = C_algo.SHA3 = Hasher.extend({\n\t /**\n\t * Configuration options.\n\t *\n\t * @property {number} outputLength\n\t * The desired number of bits in the output hash.\n\t * Only values permitted are: 224, 256, 384, 512.\n\t * Default: 512\n\t */\n\t cfg: Hasher.cfg.extend({\n\t outputLength: 512\n\t }),\n\n\t _doReset: function () {\n\t var state = this._state = []\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = new X64Word.init();\n\t }\n\n\t this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var state = this._state;\n\t var nBlockSizeLanes = this.blockSize / 2;\n\n\t // Absorb\n\t for (var i = 0; i < nBlockSizeLanes; i++) {\n\t // Shortcuts\n\t var M2i = M[offset + 2 * i];\n\t var M2i1 = M[offset + 2 * i + 1];\n\n\t // Swap endian\n\t M2i = (\n\t (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |\n\t (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)\n\t );\n\t M2i1 = (\n\t (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |\n\t (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Absorb message into state\n\t var lane = state[i];\n\t lane.high ^= M2i1;\n\t lane.low ^= M2i;\n\t }\n\n\t // Rounds\n\t for (var round = 0; round < 24; round++) {\n\t // Theta\n\t for (var x = 0; x < 5; x++) {\n\t // Mix column lanes\n\t var tMsw = 0, tLsw = 0;\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t tMsw ^= lane.high;\n\t tLsw ^= lane.low;\n\t }\n\n\t // Temporary values\n\t var Tx = T[x];\n\t Tx.high = tMsw;\n\t Tx.low = tLsw;\n\t }\n\t for (var x = 0; x < 5; x++) {\n\t // Shortcuts\n\t var Tx4 = T[(x + 4) % 5];\n\t var Tx1 = T[(x + 1) % 5];\n\t var Tx1Msw = Tx1.high;\n\t var Tx1Lsw = Tx1.low;\n\n\t // Mix surrounding columns\n\t var tMsw = Tx4.high ^ ((Tx1Msw << 1) | (Tx1Lsw >>> 31));\n\t var tLsw = Tx4.low ^ ((Tx1Lsw << 1) | (Tx1Msw >>> 31));\n\t for (var y = 0; y < 5; y++) {\n\t var lane = state[x + 5 * y];\n\t lane.high ^= tMsw;\n\t lane.low ^= tLsw;\n\t }\n\t }\n\n\t // Rho Pi\n\t for (var laneIndex = 1; laneIndex < 25; laneIndex++) {\n\t var tMsw;\n\t var tLsw;\n\n\t // Shortcuts\n\t var lane = state[laneIndex];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\t var rhoOffset = RHO_OFFSETS[laneIndex];\n\n\t // Rotate lanes\n\t if (rhoOffset < 32) {\n\t tMsw = (laneMsw << rhoOffset) | (laneLsw >>> (32 - rhoOffset));\n\t tLsw = (laneLsw << rhoOffset) | (laneMsw >>> (32 - rhoOffset));\n\t } else /* if (rhoOffset >= 32) */ {\n\t tMsw = (laneLsw << (rhoOffset - 32)) | (laneMsw >>> (64 - rhoOffset));\n\t tLsw = (laneMsw << (rhoOffset - 32)) | (laneLsw >>> (64 - rhoOffset));\n\t }\n\n\t // Transpose lanes\n\t var TPiLane = T[PI_INDEXES[laneIndex]];\n\t TPiLane.high = tMsw;\n\t TPiLane.low = tLsw;\n\t }\n\n\t // Rho pi at x = y = 0\n\t var T0 = T[0];\n\t var state0 = state[0];\n\t T0.high = state0.high;\n\t T0.low = state0.low;\n\n\t // Chi\n\t for (var x = 0; x < 5; x++) {\n\t for (var y = 0; y < 5; y++) {\n\t // Shortcuts\n\t var laneIndex = x + 5 * y;\n\t var lane = state[laneIndex];\n\t var TLane = T[laneIndex];\n\t var Tx1Lane = T[((x + 1) % 5) + 5 * y];\n\t var Tx2Lane = T[((x + 2) % 5) + 5 * y];\n\n\t // Mix rows\n\t lane.high = TLane.high ^ (~Tx1Lane.high & Tx2Lane.high);\n\t lane.low = TLane.low ^ (~Tx1Lane.low & Tx2Lane.low);\n\t }\n\t }\n\n\t // Iota\n\t var lane = state[0];\n\t var roundConstant = ROUND_CONSTANTS[round];\n\t lane.high ^= roundConstant.high;\n\t lane.low ^= roundConstant.low;\n\t }\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\t var blockSizeBits = this.blockSize * 32;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x1 << (24 - nBitsLeft % 32);\n\t dataWords[((Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits) >>> 5) - 1] |= 0x80;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Shortcuts\n\t var state = this._state;\n\t var outputLengthBytes = this.cfg.outputLength / 8;\n\t var outputLengthLanes = outputLengthBytes / 8;\n\n\t // Squeeze\n\t var hashWords = [];\n\t for (var i = 0; i < outputLengthLanes; i++) {\n\t // Shortcuts\n\t var lane = state[i];\n\t var laneMsw = lane.high;\n\t var laneLsw = lane.low;\n\n\t // Swap endian\n\t laneMsw = (\n\t (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |\n\t (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)\n\t );\n\t laneLsw = (\n\t (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |\n\t (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)\n\t );\n\n\t // Squeeze state to retrieve hash\n\t hashWords.push(laneLsw);\n\t hashWords.push(laneMsw);\n\t }\n\n\t // Return final computed hash\n\t return new WordArray.init(hashWords, outputLengthBytes);\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\n\t var state = clone._state = this._state.slice(0);\n\t for (var i = 0; i < 25; i++) {\n\t state[i] = state[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA3('message');\n\t * var hash = CryptoJS.SHA3(wordArray);\n\t */\n\t C.SHA3 = Hasher._createHelper(SHA3);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA3(message, key);\n\t */\n\t C.HmacSHA3 = Hasher._createHmacHelper(SHA3);\n\t}(Math));\n\n\n\treturn CryptoJS.SHA3;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"), require(\"./sha512\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\", \"./sha512\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\t var SHA512 = C_algo.SHA512;\n\n\t /**\n\t * SHA-384 hash algorithm.\n\t */\n\t var SHA384 = C_algo.SHA384 = SHA512.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),\n\t new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),\n\t new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),\n\t new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)\n\t ]);\n\t },\n\n\t _doFinalize: function () {\n\t var hash = SHA512._doFinalize.call(this);\n\n\t hash.sigBytes -= 16;\n\n\t return hash;\n\t }\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA384('message');\n\t * var hash = CryptoJS.SHA384(wordArray);\n\t */\n\t C.SHA384 = SHA512._createHelper(SHA384);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA384(message, key);\n\t */\n\t C.HmacSHA384 = SHA512._createHmacHelper(SHA384);\n\t}());\n\n\n\treturn CryptoJS.SHA384;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./x64-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./x64-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Hasher = C_lib.Hasher;\n\t var C_x64 = C.x64;\n\t var X64Word = C_x64.Word;\n\t var X64WordArray = C_x64.WordArray;\n\t var C_algo = C.algo;\n\n\t function X64Word_create() {\n\t return X64Word.create.apply(X64Word, arguments);\n\t }\n\n\t // Constants\n\t var K = [\n\t X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd),\n\t X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc),\n\t X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019),\n\t X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118),\n\t X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe),\n\t X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2),\n\t X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1),\n\t X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694),\n\t X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3),\n\t X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65),\n\t X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483),\n\t X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5),\n\t X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210),\n\t X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4),\n\t X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725),\n\t X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70),\n\t X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926),\n\t X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df),\n\t X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8),\n\t X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b),\n\t X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001),\n\t X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30),\n\t X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910),\n\t X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8),\n\t X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53),\n\t X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8),\n\t X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb),\n\t X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3),\n\t X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60),\n\t X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec),\n\t X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9),\n\t X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b),\n\t X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207),\n\t X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178),\n\t X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6),\n\t X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b),\n\t X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),\n\t X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),\n\t X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),\n\t X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)\n\t ];\n\n\t // Reusable objects\n\t var W = [];\n\t (function () {\n\t for (var i = 0; i < 80; i++) {\n\t W[i] = X64Word_create();\n\t }\n\t }());\n\n\t /**\n\t * SHA-512 hash algorithm.\n\t */\n\t var SHA512 = C_algo.SHA512 = Hasher.extend({\n\t _doReset: function () {\n\t this._hash = new X64WordArray.init([\n\t new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),\n\t new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),\n\t new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),\n\t new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)\n\t ]);\n\t },\n\n\t _doProcessBlock: function (M, offset) {\n\t // Shortcuts\n\t var H = this._hash.words;\n\n\t var H0 = H[0];\n\t var H1 = H[1];\n\t var H2 = H[2];\n\t var H3 = H[3];\n\t var H4 = H[4];\n\t var H5 = H[5];\n\t var H6 = H[6];\n\t var H7 = H[7];\n\n\t var H0h = H0.high;\n\t var H0l = H0.low;\n\t var H1h = H1.high;\n\t var H1l = H1.low;\n\t var H2h = H2.high;\n\t var H2l = H2.low;\n\t var H3h = H3.high;\n\t var H3l = H3.low;\n\t var H4h = H4.high;\n\t var H4l = H4.low;\n\t var H5h = H5.high;\n\t var H5l = H5.low;\n\t var H6h = H6.high;\n\t var H6l = H6.low;\n\t var H7h = H7.high;\n\t var H7l = H7.low;\n\n\t // Working variables\n\t var ah = H0h;\n\t var al = H0l;\n\t var bh = H1h;\n\t var bl = H1l;\n\t var ch = H2h;\n\t var cl = H2l;\n\t var dh = H3h;\n\t var dl = H3l;\n\t var eh = H4h;\n\t var el = H4l;\n\t var fh = H5h;\n\t var fl = H5l;\n\t var gh = H6h;\n\t var gl = H6l;\n\t var hh = H7h;\n\t var hl = H7l;\n\n\t // Rounds\n\t for (var i = 0; i < 80; i++) {\n\t var Wil;\n\t var Wih;\n\n\t // Shortcut\n\t var Wi = W[i];\n\n\t // Extend message\n\t if (i < 16) {\n\t Wih = Wi.high = M[offset + i * 2] | 0;\n\t Wil = Wi.low = M[offset + i * 2 + 1] | 0;\n\t } else {\n\t // Gamma0\n\t var gamma0x = W[i - 15];\n\t var gamma0xh = gamma0x.high;\n\t var gamma0xl = gamma0x.low;\n\t var gamma0h = ((gamma0xh >>> 1) | (gamma0xl << 31)) ^ ((gamma0xh >>> 8) | (gamma0xl << 24)) ^ (gamma0xh >>> 7);\n\t var gamma0l = ((gamma0xl >>> 1) | (gamma0xh << 31)) ^ ((gamma0xl >>> 8) | (gamma0xh << 24)) ^ ((gamma0xl >>> 7) | (gamma0xh << 25));\n\n\t // Gamma1\n\t var gamma1x = W[i - 2];\n\t var gamma1xh = gamma1x.high;\n\t var gamma1xl = gamma1x.low;\n\t var gamma1h = ((gamma1xh >>> 19) | (gamma1xl << 13)) ^ ((gamma1xh << 3) | (gamma1xl >>> 29)) ^ (gamma1xh >>> 6);\n\t var gamma1l = ((gamma1xl >>> 19) | (gamma1xh << 13)) ^ ((gamma1xl << 3) | (gamma1xh >>> 29)) ^ ((gamma1xl >>> 6) | (gamma1xh << 26));\n\n\t // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]\n\t var Wi7 = W[i - 7];\n\t var Wi7h = Wi7.high;\n\t var Wi7l = Wi7.low;\n\n\t var Wi16 = W[i - 16];\n\t var Wi16h = Wi16.high;\n\t var Wi16l = Wi16.low;\n\n\t Wil = gamma0l + Wi7l;\n\t Wih = gamma0h + Wi7h + ((Wil >>> 0) < (gamma0l >>> 0) ? 1 : 0);\n\t Wil = Wil + gamma1l;\n\t Wih = Wih + gamma1h + ((Wil >>> 0) < (gamma1l >>> 0) ? 1 : 0);\n\t Wil = Wil + Wi16l;\n\t Wih = Wih + Wi16h + ((Wil >>> 0) < (Wi16l >>> 0) ? 1 : 0);\n\n\t Wi.high = Wih;\n\t Wi.low = Wil;\n\t }\n\n\t var chh = (eh & fh) ^ (~eh & gh);\n\t var chl = (el & fl) ^ (~el & gl);\n\t var majh = (ah & bh) ^ (ah & ch) ^ (bh & ch);\n\t var majl = (al & bl) ^ (al & cl) ^ (bl & cl);\n\n\t var sigma0h = ((ah >>> 28) | (al << 4)) ^ ((ah << 30) | (al >>> 2)) ^ ((ah << 25) | (al >>> 7));\n\t var sigma0l = ((al >>> 28) | (ah << 4)) ^ ((al << 30) | (ah >>> 2)) ^ ((al << 25) | (ah >>> 7));\n\t var sigma1h = ((eh >>> 14) | (el << 18)) ^ ((eh >>> 18) | (el << 14)) ^ ((eh << 23) | (el >>> 9));\n\t var sigma1l = ((el >>> 14) | (eh << 18)) ^ ((el >>> 18) | (eh << 14)) ^ ((el << 23) | (eh >>> 9));\n\n\t // t1 = h + sigma1 + ch + K[i] + W[i]\n\t var Ki = K[i];\n\t var Kih = Ki.high;\n\t var Kil = Ki.low;\n\n\t var t1l = hl + sigma1l;\n\t var t1h = hh + sigma1h + ((t1l >>> 0) < (hl >>> 0) ? 1 : 0);\n\t var t1l = t1l + chl;\n\t var t1h = t1h + chh + ((t1l >>> 0) < (chl >>> 0) ? 1 : 0);\n\t var t1l = t1l + Kil;\n\t var t1h = t1h + Kih + ((t1l >>> 0) < (Kil >>> 0) ? 1 : 0);\n\t var t1l = t1l + Wil;\n\t var t1h = t1h + Wih + ((t1l >>> 0) < (Wil >>> 0) ? 1 : 0);\n\n\t // t2 = sigma0 + maj\n\t var t2l = sigma0l + majl;\n\t var t2h = sigma0h + majh + ((t2l >>> 0) < (sigma0l >>> 0) ? 1 : 0);\n\n\t // Update working variables\n\t hh = gh;\n\t hl = gl;\n\t gh = fh;\n\t gl = fl;\n\t fh = eh;\n\t fl = el;\n\t el = (dl + t1l) | 0;\n\t eh = (dh + t1h + ((el >>> 0) < (dl >>> 0) ? 1 : 0)) | 0;\n\t dh = ch;\n\t dl = cl;\n\t ch = bh;\n\t cl = bl;\n\t bh = ah;\n\t bl = al;\n\t al = (t1l + t2l) | 0;\n\t ah = (t1h + t2h + ((al >>> 0) < (t1l >>> 0) ? 1 : 0)) | 0;\n\t }\n\n\t // Intermediate hash value\n\t H0l = H0.low = (H0l + al);\n\t H0.high = (H0h + ah + ((H0l >>> 0) < (al >>> 0) ? 1 : 0));\n\t H1l = H1.low = (H1l + bl);\n\t H1.high = (H1h + bh + ((H1l >>> 0) < (bl >>> 0) ? 1 : 0));\n\t H2l = H2.low = (H2l + cl);\n\t H2.high = (H2h + ch + ((H2l >>> 0) < (cl >>> 0) ? 1 : 0));\n\t H3l = H3.low = (H3l + dl);\n\t H3.high = (H3h + dh + ((H3l >>> 0) < (dl >>> 0) ? 1 : 0));\n\t H4l = H4.low = (H4l + el);\n\t H4.high = (H4h + eh + ((H4l >>> 0) < (el >>> 0) ? 1 : 0));\n\t H5l = H5.low = (H5l + fl);\n\t H5.high = (H5h + fh + ((H5l >>> 0) < (fl >>> 0) ? 1 : 0));\n\t H6l = H6.low = (H6l + gl);\n\t H6.high = (H6h + gh + ((H6l >>> 0) < (gl >>> 0) ? 1 : 0));\n\t H7l = H7.low = (H7l + hl);\n\t H7.high = (H7h + hh + ((H7l >>> 0) < (hl >>> 0) ? 1 : 0));\n\t },\n\n\t _doFinalize: function () {\n\t // Shortcuts\n\t var data = this._data;\n\t var dataWords = data.words;\n\n\t var nBitsTotal = this._nDataBytes * 8;\n\t var nBitsLeft = data.sigBytes * 8;\n\n\t // Add padding\n\t dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);\n\t dataWords[(((nBitsLeft + 128) >>> 10) << 5) + 31] = nBitsTotal;\n\t data.sigBytes = dataWords.length * 4;\n\n\t // Hash final blocks\n\t this._process();\n\n\t // Convert hash to 32-bit word array before returning\n\t var hash = this._hash.toX32();\n\n\t // Return final computed hash\n\t return hash;\n\t },\n\n\t clone: function () {\n\t var clone = Hasher.clone.call(this);\n\t clone._hash = this._hash.clone();\n\n\t return clone;\n\t },\n\n\t blockSize: 1024/32\n\t });\n\n\t /**\n\t * Shortcut function to the hasher's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t *\n\t * @return {WordArray} The hash.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hash = CryptoJS.SHA512('message');\n\t * var hash = CryptoJS.SHA512(wordArray);\n\t */\n\t C.SHA512 = Hasher._createHelper(SHA512);\n\n\t /**\n\t * Shortcut function to the HMAC's object interface.\n\t *\n\t * @param {WordArray|string} message The message to hash.\n\t * @param {WordArray|string} key The secret key.\n\t *\n\t * @return {WordArray} The HMAC.\n\t *\n\t * @static\n\t *\n\t * @example\n\t *\n\t * var hmac = CryptoJS.HmacSHA512(message, key);\n\t */\n\t C.HmacSHA512 = Hasher._createHmacHelper(SHA512);\n\t}());\n\n\n\treturn CryptoJS.SHA512;\n\n}));",";(function (root, factory, undef) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"), require(\"./enc-base64\"), require(\"./md5\"), require(\"./evpkdf\"), require(\"./cipher-core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\", \"./enc-base64\", \"./md5\", \"./evpkdf\", \"./cipher-core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function () {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var WordArray = C_lib.WordArray;\n\t var BlockCipher = C_lib.BlockCipher;\n\t var C_algo = C.algo;\n\n\t // Permuted Choice 1 constants\n\t var PC1 = [\n\t 57, 49, 41, 33, 25, 17, 9, 1,\n\t 58, 50, 42, 34, 26, 18, 10, 2,\n\t 59, 51, 43, 35, 27, 19, 11, 3,\n\t 60, 52, 44, 36, 63, 55, 47, 39,\n\t 31, 23, 15, 7, 62, 54, 46, 38,\n\t 30, 22, 14, 6, 61, 53, 45, 37,\n\t 29, 21, 13, 5, 28, 20, 12, 4\n\t ];\n\n\t // Permuted Choice 2 constants\n\t var PC2 = [\n\t 14, 17, 11, 24, 1, 5,\n\t 3, 28, 15, 6, 21, 10,\n\t 23, 19, 12, 4, 26, 8,\n\t 16, 7, 27, 20, 13, 2,\n\t 41, 52, 31, 37, 47, 55,\n\t 30, 40, 51, 45, 33, 48,\n\t 44, 49, 39, 56, 34, 53,\n\t 46, 42, 50, 36, 29, 32\n\t ];\n\n\t // Cumulative bit shift constants\n\t var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];\n\n\t // SBOXes and round permutation constants\n\t var SBOX_P = [\n\t {\n\t 0x0: 0x808200,\n\t 0x10000000: 0x8000,\n\t 0x20000000: 0x808002,\n\t 0x30000000: 0x2,\n\t 0x40000000: 0x200,\n\t 0x50000000: 0x808202,\n\t 0x60000000: 0x800202,\n\t 0x70000000: 0x800000,\n\t 0x80000000: 0x202,\n\t 0x90000000: 0x800200,\n\t 0xa0000000: 0x8200,\n\t 0xb0000000: 0x808000,\n\t 0xc0000000: 0x8002,\n\t 0xd0000000: 0x800002,\n\t 0xe0000000: 0x0,\n\t 0xf0000000: 0x8202,\n\t 0x8000000: 0x0,\n\t 0x18000000: 0x808202,\n\t 0x28000000: 0x8202,\n\t 0x38000000: 0x8000,\n\t 0x48000000: 0x808200,\n\t 0x58000000: 0x200,\n\t 0x68000000: 0x808002,\n\t 0x78000000: 0x2,\n\t 0x88000000: 0x800200,\n\t 0x98000000: 0x8200,\n\t 0xa8000000: 0x808000,\n\t 0xb8000000: 0x800202,\n\t 0xc8000000: 0x800002,\n\t 0xd8000000: 0x8002,\n\t 0xe8000000: 0x202,\n\t 0xf8000000: 0x800000,\n\t 0x1: 0x8000,\n\t 0x10000001: 0x2,\n\t 0x20000001: 0x808200,\n\t 0x30000001: 0x800000,\n\t 0x40000001: 0x808002,\n\t 0x50000001: 0x8200,\n\t 0x60000001: 0x200,\n\t 0x70000001: 0x800202,\n\t 0x80000001: 0x808202,\n\t 0x90000001: 0x808000,\n\t 0xa0000001: 0x800002,\n\t 0xb0000001: 0x8202,\n\t 0xc0000001: 0x202,\n\t 0xd0000001: 0x800200,\n\t 0xe0000001: 0x8002,\n\t 0xf0000001: 0x0,\n\t 0x8000001: 0x808202,\n\t 0x18000001: 0x808000,\n\t 0x28000001: 0x800000,\n\t 0x38000001: 0x200,\n\t 0x48000001: 0x8000,\n\t 0x58000001: 0x800002,\n\t 0x68000001: 0x2,\n\t 0x78000001: 0x8202,\n\t 0x88000001: 0x8002,\n\t 0x98000001: 0x800202,\n\t 0xa8000001: 0x202,\n\t 0xb8000001: 0x808200,\n\t 0xc8000001: 0x800200,\n\t 0xd8000001: 0x0,\n\t 0xe8000001: 0x8200,\n\t 0xf8000001: 0x808002\n\t },\n\t {\n\t 0x0: 0x40084010,\n\t 0x1000000: 0x4000,\n\t 0x2000000: 0x80000,\n\t 0x3000000: 0x40080010,\n\t 0x4000000: 0x40000010,\n\t 0x5000000: 0x40084000,\n\t 0x6000000: 0x40004000,\n\t 0x7000000: 0x10,\n\t 0x8000000: 0x84000,\n\t 0x9000000: 0x40004010,\n\t 0xa000000: 0x40000000,\n\t 0xb000000: 0x84010,\n\t 0xc000000: 0x80010,\n\t 0xd000000: 0x0,\n\t 0xe000000: 0x4010,\n\t 0xf000000: 0x40080000,\n\t 0x800000: 0x40004000,\n\t 0x1800000: 0x84010,\n\t 0x2800000: 0x10,\n\t 0x3800000: 0x40004010,\n\t 0x4800000: 0x40084010,\n\t 0x5800000: 0x40000000,\n\t 0x6800000: 0x80000,\n\t 0x7800000: 0x40080010,\n\t 0x8800000: 0x80010,\n\t 0x9800000: 0x0,\n\t 0xa800000: 0x4000,\n\t 0xb800000: 0x40080000,\n\t 0xc800000: 0x40000010,\n\t 0xd800000: 0x84000,\n\t 0xe800000: 0x40084000,\n\t 0xf800000: 0x4010,\n\t 0x10000000: 0x0,\n\t 0x11000000: 0x40080010,\n\t 0x12000000: 0x40004010,\n\t 0x13000000: 0x40084000,\n\t 0x14000000: 0x40080000,\n\t 0x15000000: 0x10,\n\t 0x16000000: 0x84010,\n\t 0x17000000: 0x4000,\n\t 0x18000000: 0x4010,\n\t 0x19000000: 0x80000,\n\t 0x1a000000: 0x80010,\n\t 0x1b000000: 0x40000010,\n\t 0x1c000000: 0x84000,\n\t 0x1d000000: 0x40004000,\n\t 0x1e000000: 0x40000000,\n\t 0x1f000000: 0x40084010,\n\t 0x10800000: 0x84010,\n\t 0x11800000: 0x80000,\n\t 0x12800000: 0x40080000,\n\t 0x13800000: 0x4000,\n\t 0x14800000: 0x40004000,\n\t 0x15800000: 0x40084010,\n\t 0x16800000: 0x10,\n\t 0x17800000: 0x40000000,\n\t 0x18800000: 0x40084000,\n\t 0x19800000: 0x40000010,\n\t 0x1a800000: 0x40004010,\n\t 0x1b800000: 0x80010,\n\t 0x1c800000: 0x0,\n\t 0x1d800000: 0x4010,\n\t 0x1e800000: 0x40080010,\n\t 0x1f800000: 0x84000\n\t },\n\t {\n\t 0x0: 0x104,\n\t 0x100000: 0x0,\n\t 0x200000: 0x4000100,\n\t 0x300000: 0x10104,\n\t 0x400000: 0x10004,\n\t 0x500000: 0x4000004,\n\t 0x600000: 0x4010104,\n\t 0x700000: 0x4010000,\n\t 0x800000: 0x4000000,\n\t 0x900000: 0x4010100,\n\t 0xa00000: 0x10100,\n\t 0xb00000: 0x4010004,\n\t 0xc00000: 0x4000104,\n\t 0xd00000: 0x10000,\n\t 0xe00000: 0x4,\n\t 0xf00000: 0x100,\n\t 0x80000: 0x4010100,\n\t 0x180000: 0x4010004,\n\t 0x280000: 0x0,\n\t 0x380000: 0x4000100,\n\t 0x480000: 0x4000004,\n\t 0x580000: 0x10000,\n\t 0x680000: 0x10004,\n\t 0x780000: 0x104,\n\t 0x880000: 0x4,\n\t 0x980000: 0x100,\n\t 0xa80000: 0x4010000,\n\t 0xb80000: 0x10104,\n\t 0xc80000: 0x10100,\n\t 0xd80000: 0x4000104,\n\t 0xe80000: 0x4010104,\n\t 0xf80000: 0x4000000,\n\t 0x1000000: 0x4010100,\n\t 0x1100000: 0x10004,\n\t 0x1200000: 0x10000,\n\t 0x1300000: 0x4000100,\n\t 0x1400000: 0x100,\n\t 0x1500000: 0x4010104,\n\t 0x1600000: 0x4000004,\n\t 0x1700000: 0x0,\n\t 0x1800000: 0x4000104,\n\t 0x1900000: 0x4000000,\n\t 0x1a00000: 0x4,\n\t 0x1b00000: 0x10100,\n\t 0x1c00000: 0x4010000,\n\t 0x1d00000: 0x104,\n\t 0x1e00000: 0x10104,\n\t 0x1f00000: 0x4010004,\n\t 0x1080000: 0x4000000,\n\t 0x1180000: 0x104,\n\t 0x1280000: 0x4010100,\n\t 0x1380000: 0x0,\n\t 0x1480000: 0x10004,\n\t 0x1580000: 0x4000100,\n\t 0x1680000: 0x100,\n\t 0x1780000: 0x4010004,\n\t 0x1880000: 0x10000,\n\t 0x1980000: 0x4010104,\n\t 0x1a80000: 0x10104,\n\t 0x1b80000: 0x4000004,\n\t 0x1c80000: 0x4000104,\n\t 0x1d80000: 0x4010000,\n\t 0x1e80000: 0x4,\n\t 0x1f80000: 0x10100\n\t },\n\t {\n\t 0x0: 0x80401000,\n\t 0x10000: 0x80001040,\n\t 0x20000: 0x401040,\n\t 0x30000: 0x80400000,\n\t 0x40000: 0x0,\n\t 0x50000: 0x401000,\n\t 0x60000: 0x80000040,\n\t 0x70000: 0x400040,\n\t 0x80000: 0x80000000,\n\t 0x90000: 0x400000,\n\t 0xa0000: 0x40,\n\t 0xb0000: 0x80001000,\n\t 0xc0000: 0x80400040,\n\t 0xd0000: 0x1040,\n\t 0xe0000: 0x1000,\n\t 0xf0000: 0x80401040,\n\t 0x8000: 0x80001040,\n\t 0x18000: 0x40,\n\t 0x28000: 0x80400040,\n\t 0x38000: 0x80001000,\n\t 0x48000: 0x401000,\n\t 0x58000: 0x80401040,\n\t 0x68000: 0x0,\n\t 0x78000: 0x80400000,\n\t 0x88000: 0x1000,\n\t 0x98000: 0x80401000,\n\t 0xa8000: 0x400000,\n\t 0xb8000: 0x1040,\n\t 0xc8000: 0x80000000,\n\t 0xd8000: 0x400040,\n\t 0xe8000: 0x401040,\n\t 0xf8000: 0x80000040,\n\t 0x100000: 0x400040,\n\t 0x110000: 0x401000,\n\t 0x120000: 0x80000040,\n\t 0x130000: 0x0,\n\t 0x140000: 0x1040,\n\t 0x150000: 0x80400040,\n\t 0x160000: 0x80401000,\n\t 0x170000: 0x80001040,\n\t 0x180000: 0x80401040,\n\t 0x190000: 0x80000000,\n\t 0x1a0000: 0x80400000,\n\t 0x1b0000: 0x401040,\n\t 0x1c0000: 0x80001000,\n\t 0x1d0000: 0x400000,\n\t 0x1e0000: 0x40,\n\t 0x1f0000: 0x1000,\n\t 0x108000: 0x80400000,\n\t 0x118000: 0x80401040,\n\t 0x128000: 0x0,\n\t 0x138000: 0x401000,\n\t 0x148000: 0x400040,\n\t 0x158000: 0x80000000,\n\t 0x168000: 0x80001040,\n\t 0x178000: 0x40,\n\t 0x188000: 0x80000040,\n\t 0x198000: 0x1000,\n\t 0x1a8000: 0x80001000,\n\t 0x1b8000: 0x80400040,\n\t 0x1c8000: 0x1040,\n\t 0x1d8000: 0x80401000,\n\t 0x1e8000: 0x400000,\n\t 0x1f8000: 0x401040\n\t },\n\t {\n\t 0x0: 0x80,\n\t 0x1000: 0x1040000,\n\t 0x2000: 0x40000,\n\t 0x3000: 0x20000000,\n\t 0x4000: 0x20040080,\n\t 0x5000: 0x1000080,\n\t 0x6000: 0x21000080,\n\t 0x7000: 0x40080,\n\t 0x8000: 0x1000000,\n\t 0x9000: 0x20040000,\n\t 0xa000: 0x20000080,\n\t 0xb000: 0x21040080,\n\t 0xc000: 0x21040000,\n\t 0xd000: 0x0,\n\t 0xe000: 0x1040080,\n\t 0xf000: 0x21000000,\n\t 0x800: 0x1040080,\n\t 0x1800: 0x21000080,\n\t 0x2800: 0x80,\n\t 0x3800: 0x1040000,\n\t 0x4800: 0x40000,\n\t 0x5800: 0x20040080,\n\t 0x6800: 0x21040000,\n\t 0x7800: 0x20000000,\n\t 0x8800: 0x20040000,\n\t 0x9800: 0x0,\n\t 0xa800: 0x21040080,\n\t 0xb800: 0x1000080,\n\t 0xc800: 0x20000080,\n\t 0xd800: 0x21000000,\n\t 0xe800: 0x1000000,\n\t 0xf800: 0x40080,\n\t 0x10000: 0x40000,\n\t 0x11000: 0x80,\n\t 0x12000: 0x20000000,\n\t 0x13000: 0x21000080,\n\t 0x14000: 0x1000080,\n\t 0x15000: 0x21040000,\n\t 0x16000: 0x20040080,\n\t 0x17000: 0x1000000,\n\t 0x18000: 0x21040080,\n\t 0x19000: 0x21000000,\n\t 0x1a000: 0x1040000,\n\t 0x1b000: 0x20040000,\n\t 0x1c000: 0x40080,\n\t 0x1d000: 0x20000080,\n\t 0x1e000: 0x0,\n\t 0x1f000: 0x1040080,\n\t 0x10800: 0x21000080,\n\t 0x11800: 0x1000000,\n\t 0x12800: 0x1040000,\n\t 0x13800: 0x20040080,\n\t 0x14800: 0x20000000,\n\t 0x15800: 0x1040080,\n\t 0x16800: 0x80,\n\t 0x17800: 0x21040000,\n\t 0x18800: 0x40080,\n\t 0x19800: 0x21040080,\n\t 0x1a800: 0x0,\n\t 0x1b800: 0x21000000,\n\t 0x1c800: 0x1000080,\n\t 0x1d800: 0x40000,\n\t 0x1e800: 0x20040000,\n\t 0x1f800: 0x20000080\n\t },\n\t {\n\t 0x0: 0x10000008,\n\t 0x100: 0x2000,\n\t 0x200: 0x10200000,\n\t 0x300: 0x10202008,\n\t 0x400: 0x10002000,\n\t 0x500: 0x200000,\n\t 0x600: 0x200008,\n\t 0x700: 0x10000000,\n\t 0x800: 0x0,\n\t 0x900: 0x10002008,\n\t 0xa00: 0x202000,\n\t 0xb00: 0x8,\n\t 0xc00: 0x10200008,\n\t 0xd00: 0x202008,\n\t 0xe00: 0x2008,\n\t 0xf00: 0x10202000,\n\t 0x80: 0x10200000,\n\t 0x180: 0x10202008,\n\t 0x280: 0x8,\n\t 0x380: 0x200000,\n\t 0x480: 0x202008,\n\t 0x580: 0x10000008,\n\t 0x680: 0x10002000,\n\t 0x780: 0x2008,\n\t 0x880: 0x200008,\n\t 0x980: 0x2000,\n\t 0xa80: 0x10002008,\n\t 0xb80: 0x10200008,\n\t 0xc80: 0x0,\n\t 0xd80: 0x10202000,\n\t 0xe80: 0x202000,\n\t 0xf80: 0x10000000,\n\t 0x1000: 0x10002000,\n\t 0x1100: 0x10200008,\n\t 0x1200: 0x10202008,\n\t 0x1300: 0x2008,\n\t 0x1400: 0x200000,\n\t 0x1500: 0x10000000,\n\t 0x1600: 0x10000008,\n\t 0x1700: 0x202000,\n\t 0x1800: 0x202008,\n\t 0x1900: 0x0,\n\t 0x1a00: 0x8,\n\t 0x1b00: 0x10200000,\n\t 0x1c00: 0x2000,\n\t 0x1d00: 0x10002008,\n\t 0x1e00: 0x10202000,\n\t 0x1f00: 0x200008,\n\t 0x1080: 0x8,\n\t 0x1180: 0x202000,\n\t 0x1280: 0x200000,\n\t 0x1380: 0x10000008,\n\t 0x1480: 0x10002000,\n\t 0x1580: 0x2008,\n\t 0x1680: 0x10202008,\n\t 0x1780: 0x10200000,\n\t 0x1880: 0x10202000,\n\t 0x1980: 0x10200008,\n\t 0x1a80: 0x2000,\n\t 0x1b80: 0x202008,\n\t 0x1c80: 0x200008,\n\t 0x1d80: 0x0,\n\t 0x1e80: 0x10000000,\n\t 0x1f80: 0x10002008\n\t },\n\t {\n\t 0x0: 0x100000,\n\t 0x10: 0x2000401,\n\t 0x20: 0x400,\n\t 0x30: 0x100401,\n\t 0x40: 0x2100401,\n\t 0x50: 0x0,\n\t 0x60: 0x1,\n\t 0x70: 0x2100001,\n\t 0x80: 0x2000400,\n\t 0x90: 0x100001,\n\t 0xa0: 0x2000001,\n\t 0xb0: 0x2100400,\n\t 0xc0: 0x2100000,\n\t 0xd0: 0x401,\n\t 0xe0: 0x100400,\n\t 0xf0: 0x2000000,\n\t 0x8: 0x2100001,\n\t 0x18: 0x0,\n\t 0x28: 0x2000401,\n\t 0x38: 0x2100400,\n\t 0x48: 0x100000,\n\t 0x58: 0x2000001,\n\t 0x68: 0x2000000,\n\t 0x78: 0x401,\n\t 0x88: 0x100401,\n\t 0x98: 0x2000400,\n\t 0xa8: 0x2100000,\n\t 0xb8: 0x100001,\n\t 0xc8: 0x400,\n\t 0xd8: 0x2100401,\n\t 0xe8: 0x1,\n\t 0xf8: 0x100400,\n\t 0x100: 0x2000000,\n\t 0x110: 0x100000,\n\t 0x120: 0x2000401,\n\t 0x130: 0x2100001,\n\t 0x140: 0x100001,\n\t 0x150: 0x2000400,\n\t 0x160: 0x2100400,\n\t 0x170: 0x100401,\n\t 0x180: 0x401,\n\t 0x190: 0x2100401,\n\t 0x1a0: 0x100400,\n\t 0x1b0: 0x1,\n\t 0x1c0: 0x0,\n\t 0x1d0: 0x2100000,\n\t 0x1e0: 0x2000001,\n\t 0x1f0: 0x400,\n\t 0x108: 0x100400,\n\t 0x118: 0x2000401,\n\t 0x128: 0x2100001,\n\t 0x138: 0x1,\n\t 0x148: 0x2000000,\n\t 0x158: 0x100000,\n\t 0x168: 0x401,\n\t 0x178: 0x2100400,\n\t 0x188: 0x2000001,\n\t 0x198: 0x2100000,\n\t 0x1a8: 0x0,\n\t 0x1b8: 0x2100401,\n\t 0x1c8: 0x100401,\n\t 0x1d8: 0x400,\n\t 0x1e8: 0x2000400,\n\t 0x1f8: 0x100001\n\t },\n\t {\n\t 0x0: 0x8000820,\n\t 0x1: 0x20000,\n\t 0x2: 0x8000000,\n\t 0x3: 0x20,\n\t 0x4: 0x20020,\n\t 0x5: 0x8020820,\n\t 0x6: 0x8020800,\n\t 0x7: 0x800,\n\t 0x8: 0x8020000,\n\t 0x9: 0x8000800,\n\t 0xa: 0x20800,\n\t 0xb: 0x8020020,\n\t 0xc: 0x820,\n\t 0xd: 0x0,\n\t 0xe: 0x8000020,\n\t 0xf: 0x20820,\n\t 0x80000000: 0x800,\n\t 0x80000001: 0x8020820,\n\t 0x80000002: 0x8000820,\n\t 0x80000003: 0x8000000,\n\t 0x80000004: 0x8020000,\n\t 0x80000005: 0x20800,\n\t 0x80000006: 0x20820,\n\t 0x80000007: 0x20,\n\t 0x80000008: 0x8000020,\n\t 0x80000009: 0x820,\n\t 0x8000000a: 0x20020,\n\t 0x8000000b: 0x8020800,\n\t 0x8000000c: 0x0,\n\t 0x8000000d: 0x8020020,\n\t 0x8000000e: 0x8000800,\n\t 0x8000000f: 0x20000,\n\t 0x10: 0x20820,\n\t 0x11: 0x8020800,\n\t 0x12: 0x20,\n\t 0x13: 0x800,\n\t 0x14: 0x8000800,\n\t 0x15: 0x8000020,\n\t 0x16: 0x8020020,\n\t 0x17: 0x20000,\n\t 0x18: 0x0,\n\t 0x19: 0x20020,\n\t 0x1a: 0x8020000,\n\t 0x1b: 0x8000820,\n\t 0x1c: 0x8020820,\n\t 0x1d: 0x20800,\n\t 0x1e: 0x820,\n\t 0x1f: 0x8000000,\n\t 0x80000010: 0x20000,\n\t 0x80000011: 0x800,\n\t 0x80000012: 0x8020020,\n\t 0x80000013: 0x20820,\n\t 0x80000014: 0x20,\n\t 0x80000015: 0x8020000,\n\t 0x80000016: 0x8000000,\n\t 0x80000017: 0x8000820,\n\t 0x80000018: 0x8020820,\n\t 0x80000019: 0x8000020,\n\t 0x8000001a: 0x8000800,\n\t 0x8000001b: 0x0,\n\t 0x8000001c: 0x20800,\n\t 0x8000001d: 0x820,\n\t 0x8000001e: 0x20020,\n\t 0x8000001f: 0x8020800\n\t }\n\t ];\n\n\t // Masks that select the SBOX input\n\t var SBOX_MASK = [\n\t 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,\n\t 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f\n\t ];\n\n\t /**\n\t * DES block cipher algorithm.\n\t */\n\t var DES = C_algo.DES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\n\t // Select 56 bits according to PC1\n\t var keyBits = [];\n\t for (var i = 0; i < 56; i++) {\n\t var keyBitPos = PC1[i] - 1;\n\t keyBits[i] = (keyWords[keyBitPos >>> 5] >>> (31 - keyBitPos % 32)) & 1;\n\t }\n\n\t // Assemble 16 subkeys\n\t var subKeys = this._subKeys = [];\n\t for (var nSubKey = 0; nSubKey < 16; nSubKey++) {\n\t // Create subkey\n\t var subKey = subKeys[nSubKey] = [];\n\n\t // Shortcut\n\t var bitShift = BIT_SHIFTS[nSubKey];\n\n\t // Select 48 bits according to PC2\n\t for (var i = 0; i < 24; i++) {\n\t // Select from the left 28 key bits\n\t subKey[(i / 6) | 0] |= keyBits[((PC2[i] - 1) + bitShift) % 28] << (31 - i % 6);\n\n\t // Select from the right 28 key bits\n\t subKey[4 + ((i / 6) | 0)] |= keyBits[28 + (((PC2[i + 24] - 1) + bitShift) % 28)] << (31 - i % 6);\n\t }\n\n\t // Since each subkey is applied to an expanded 32-bit input,\n\t // the subkey can be broken into 8 values scaled to 32-bits,\n\t // which allows the key to be used without expansion\n\t subKey[0] = (subKey[0] << 1) | (subKey[0] >>> 31);\n\t for (var i = 1; i < 7; i++) {\n\t subKey[i] = subKey[i] >>> ((i - 1) * 4 + 3);\n\t }\n\t subKey[7] = (subKey[7] << 5) | (subKey[7] >>> 27);\n\t }\n\n\t // Compute inverse subkeys\n\t var invSubKeys = this._invSubKeys = [];\n\t for (var i = 0; i < 16; i++) {\n\t invSubKeys[i] = subKeys[15 - i];\n\t }\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._subKeys);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._doCryptBlock(M, offset, this._invSubKeys);\n\t },\n\n\t _doCryptBlock: function (M, offset, subKeys) {\n\t // Get input\n\t this._lBlock = M[offset];\n\t this._rBlock = M[offset + 1];\n\n\t // Initial permutation\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeLR.call(this, 1, 0x55555555);\n\n\t // Rounds\n\t for (var round = 0; round < 16; round++) {\n\t // Shortcuts\n\t var subKey = subKeys[round];\n\t var lBlock = this._lBlock;\n\t var rBlock = this._rBlock;\n\n\t // Feistel function\n\t var f = 0;\n\t for (var i = 0; i < 8; i++) {\n\t f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];\n\t }\n\t this._lBlock = rBlock;\n\t this._rBlock = lBlock ^ f;\n\t }\n\n\t // Undo swap from last round\n\t var t = this._lBlock;\n\t this._lBlock = this._rBlock;\n\t this._rBlock = t;\n\n\t // Final permutation\n\t exchangeLR.call(this, 1, 0x55555555);\n\t exchangeRL.call(this, 8, 0x00ff00ff);\n\t exchangeRL.call(this, 2, 0x33333333);\n\t exchangeLR.call(this, 16, 0x0000ffff);\n\t exchangeLR.call(this, 4, 0x0f0f0f0f);\n\n\t // Set output\n\t M[offset] = this._lBlock;\n\t M[offset + 1] = this._rBlock;\n\t },\n\n\t keySize: 64/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t // Swap bits across the left and right words\n\t function exchangeLR(offset, mask) {\n\t var t = ((this._lBlock >>> offset) ^ this._rBlock) & mask;\n\t this._rBlock ^= t;\n\t this._lBlock ^= t << offset;\n\t }\n\n\t function exchangeRL(offset, mask) {\n\t var t = ((this._rBlock >>> offset) ^ this._lBlock) & mask;\n\t this._lBlock ^= t;\n\t this._rBlock ^= t << offset;\n\t }\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.DES = BlockCipher._createHelper(DES);\n\n\t /**\n\t * Triple-DES block cipher algorithm.\n\t */\n\t var TripleDES = C_algo.TripleDES = BlockCipher.extend({\n\t _doReset: function () {\n\t // Shortcuts\n\t var key = this._key;\n\t var keyWords = key.words;\n\t // Make sure the key length is valid (64, 128 or >= 192 bit)\n\t if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {\n\t throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');\n\t }\n\n\t // Extend the key according to the keying options defined in 3DES standard\n\t var key1 = keyWords.slice(0, 2);\n\t var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);\n\t var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6);\n\n\t // Create DES instances\n\t this._des1 = DES.createEncryptor(WordArray.create(key1));\n\t this._des2 = DES.createEncryptor(WordArray.create(key2));\n\t this._des3 = DES.createEncryptor(WordArray.create(key3));\n\t },\n\n\t encryptBlock: function (M, offset) {\n\t this._des1.encryptBlock(M, offset);\n\t this._des2.decryptBlock(M, offset);\n\t this._des3.encryptBlock(M, offset);\n\t },\n\n\t decryptBlock: function (M, offset) {\n\t this._des3.decryptBlock(M, offset);\n\t this._des2.encryptBlock(M, offset);\n\t this._des1.decryptBlock(M, offset);\n\t },\n\n\t keySize: 192/32,\n\n\t ivSize: 64/32,\n\n\t blockSize: 64/32\n\t });\n\n\t /**\n\t * Shortcut functions to the cipher's object interface.\n\t *\n\t * @example\n\t *\n\t * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);\n\t * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);\n\t */\n\t C.TripleDES = BlockCipher._createHelper(TripleDES);\n\t}());\n\n\n\treturn CryptoJS.TripleDES;\n\n}));",";(function (root, factory) {\n\tif (typeof exports === \"object\") {\n\t\t// CommonJS\n\t\tmodule.exports = exports = factory(require(\"./core\"));\n\t}\n\telse if (typeof define === \"function\" && define.amd) {\n\t\t// AMD\n\t\tdefine([\"./core\"], factory);\n\t}\n\telse {\n\t\t// Global (browser)\n\t\tfactory(root.CryptoJS);\n\t}\n}(this, function (CryptoJS) {\n\n\t(function (undefined) {\n\t // Shortcuts\n\t var C = CryptoJS;\n\t var C_lib = C.lib;\n\t var Base = C_lib.Base;\n\t var X32WordArray = C_lib.WordArray;\n\n\t /**\n\t * x64 namespace.\n\t */\n\t var C_x64 = C.x64 = {};\n\n\t /**\n\t * A 64-bit word.\n\t */\n\t var X64Word = C_x64.Word = Base.extend({\n\t /**\n\t * Initializes a newly created 64-bit word.\n\t *\n\t * @param {number} high The high 32 bits.\n\t * @param {number} low The low 32 bits.\n\t *\n\t * @example\n\t *\n\t * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);\n\t */\n\t init: function (high, low) {\n\t this.high = high;\n\t this.low = low;\n\t }\n\n\t /**\n\t * Bitwise NOTs this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after negating.\n\t *\n\t * @example\n\t *\n\t * var negated = x64Word.not();\n\t */\n\t // not: function () {\n\t // var high = ~this.high;\n\t // var low = ~this.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ANDs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to AND with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ANDing.\n\t *\n\t * @example\n\t *\n\t * var anded = x64Word.and(anotherX64Word);\n\t */\n\t // and: function (word) {\n\t // var high = this.high & word.high;\n\t // var low = this.low & word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise ORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to OR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after ORing.\n\t *\n\t * @example\n\t *\n\t * var ored = x64Word.or(anotherX64Word);\n\t */\n\t // or: function (word) {\n\t // var high = this.high | word.high;\n\t // var low = this.low | word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Bitwise XORs this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to XOR with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after XORing.\n\t *\n\t * @example\n\t *\n\t * var xored = x64Word.xor(anotherX64Word);\n\t */\n\t // xor: function (word) {\n\t // var high = this.high ^ word.high;\n\t // var low = this.low ^ word.low;\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftL(25);\n\t */\n\t // shiftL: function (n) {\n\t // if (n < 32) {\n\t // var high = (this.high << n) | (this.low >>> (32 - n));\n\t // var low = this.low << n;\n\t // } else {\n\t // var high = this.low << (n - 32);\n\t // var low = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Shifts this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to shift.\n\t *\n\t * @return {X64Word} A new x64-Word object after shifting.\n\t *\n\t * @example\n\t *\n\t * var shifted = x64Word.shiftR(7);\n\t */\n\t // shiftR: function (n) {\n\t // if (n < 32) {\n\t // var low = (this.low >>> n) | (this.high << (32 - n));\n\t // var high = this.high >>> n;\n\t // } else {\n\t // var low = this.high >>> (n - 32);\n\t // var high = 0;\n\t // }\n\n\t // return X64Word.create(high, low);\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the left.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotL(25);\n\t */\n\t // rotL: function (n) {\n\t // return this.shiftL(n).or(this.shiftR(64 - n));\n\t // },\n\n\t /**\n\t * Rotates this word n bits to the right.\n\t *\n\t * @param {number} n The number of bits to rotate.\n\t *\n\t * @return {X64Word} A new x64-Word object after rotating.\n\t *\n\t * @example\n\t *\n\t * var rotated = x64Word.rotR(7);\n\t */\n\t // rotR: function (n) {\n\t // return this.shiftR(n).or(this.shiftL(64 - n));\n\t // },\n\n\t /**\n\t * Adds this word with the passed word.\n\t *\n\t * @param {X64Word} word The x64-Word to add with this word.\n\t *\n\t * @return {X64Word} A new x64-Word object after adding.\n\t *\n\t * @example\n\t *\n\t * var added = x64Word.add(anotherX64Word);\n\t */\n\t // add: function (word) {\n\t // var low = (this.low + word.low) | 0;\n\t // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;\n\t // var high = (this.high + word.high + carry) | 0;\n\n\t // return X64Word.create(high, low);\n\t // }\n\t });\n\n\t /**\n\t * An array of 64-bit words.\n\t *\n\t * @property {Array} words The array of CryptoJS.x64.Word objects.\n\t * @property {number} sigBytes The number of significant bytes in this word array.\n\t */\n\t var X64WordArray = C_x64.WordArray = Base.extend({\n\t /**\n\t * Initializes a newly created word array.\n\t *\n\t * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.\n\t * @param {number} sigBytes (Optional) The number of significant bytes in the words.\n\t *\n\t * @example\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create();\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ]);\n\t *\n\t * var wordArray = CryptoJS.x64.WordArray.create([\n\t * CryptoJS.x64.Word.create(0x00010203, 0x04050607),\n\t * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)\n\t * ], 10);\n\t */\n\t init: function (words, sigBytes) {\n\t words = this.words = words || [];\n\n\t if (sigBytes != undefined) {\n\t this.sigBytes = sigBytes;\n\t } else {\n\t this.sigBytes = words.length * 8;\n\t }\n\t },\n\n\t /**\n\t * Converts this 64-bit word array to a 32-bit word array.\n\t *\n\t * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.\n\t *\n\t * @example\n\t *\n\t * var x32WordArray = x64WordArray.toX32();\n\t */\n\t toX32: function () {\n\t // Shortcuts\n\t var x64Words = this.words;\n\t var x64WordsLength = x64Words.length;\n\n\t // Convert\n\t var x32Words = [];\n\t for (var i = 0; i < x64WordsLength; i++) {\n\t var x64Word = x64Words[i];\n\t x32Words.push(x64Word.high);\n\t x32Words.push(x64Word.low);\n\t }\n\n\t return X32WordArray.create(x32Words, this.sigBytes);\n\t },\n\n\t /**\n\t * Creates a copy of this word array.\n\t *\n\t * @return {X64WordArray} The clone.\n\t *\n\t * @example\n\t *\n\t * var clone = x64WordArray.clone();\n\t */\n\t clone: function () {\n\t var clone = Base.clone.call(this);\n\n\t // Clone \"words\" array\n\t var words = clone.words = this.words.slice(0);\n\n\t // Clone each X64Word object\n\t var wordsLength = words.length;\n\t for (var i = 0; i < wordsLength; i++) {\n\t words[i] = words[i].clone();\n\t }\n\n\t return clone;\n\t }\n\t });\n\t}());\n\n\n\treturn CryptoJS;\n\n}));","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof b},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new b(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var b=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,f=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=O.p(f),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return O.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return O.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return O.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return O.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return O.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return O.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return O.s(e.$s,2,\"0\");case\"SSS\":return O.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=O.p(d),m=w(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return O.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:O.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),_=b.prototype;return w.prototype=_,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){_[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,b,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));","!function(e,s){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=s(require(\"dayjs\")):\"function\"==typeof define&&define.amd?define([\"dayjs\"],s):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_locale_es_us=s(e.dayjs)}(this,(function(e){\"use strict\";function s(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var o=s(e),d={name:\"es-us\",weekdays:\"domingo_lunes_martes_miércoles_jueves_viernes_sábado\".split(\"_\"),weekdaysShort:\"dom._lun._mar._mié._jue._vie._sáb.\".split(\"_\"),weekdaysMin:\"do_lu_ma_mi_ju_vi_sá\".split(\"_\"),months:\"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre\".split(\"_\"),monthsShort:\"ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic\".split(\"_\"),relativeTime:{future:\"en %s\",past:\"hace %s\",s:\"unos segundos\",m:\"un minuto\",mm:\"%d minutos\",h:\"una hora\",hh:\"%d horas\",d:\"un dÃa\",dd:\"%d dÃas\",M:\"un mes\",MM:\"%d meses\",y:\"un año\",yy:\"%d años\"},ordinal:function(e){return e+\"º\"},formats:{LT:\"h:mm A\",LTS:\"h:mm:ss A\",L:\"MM/DD/YYYY\",LL:\"D [de] MMMM [de] YYYY\",LLL:\"D [de] MMMM [de] YYYY h:mm A\",LLLL:\"dddd, D [de] MMMM [de] YYYY h:mm A\"}};return o.default.locale(d,null,!0),d}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d\\d/,r=/\\d\\d?/,i=/\\d*[^-_:/,()\\s\\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[r,a(\"seconds\")],ss:[r,a(\"seconds\")],m:[r,a(\"minutes\")],mm:[r,a(\"minutes\")],H:[r,a(\"hours\")],h:[r,a(\"hours\")],HH:[r,a(\"hours\")],hh:[r,a(\"hours\")],D:[r,a(\"day\")],DD:[n,a(\"day\")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],M:[r,a(\"month\")],MM:[n,a(\"month\")],MMM:[i,function(e){var t=h(\"months\"),n=(h(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,a(\"year\")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\\d{4}/,a(\"year\")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f<a;f+=1){var h=s[f],u=d[h],c=u&&u[0],l=u&&u[1];s[f]=l?{regex:c,parser:l}:h.replace(/^\\[|\\]$/g,\"\")}return function(e){for(var t={},n=0,r=0;n<a;n+=1){var i=s[n];if(\"string\"==typeof i)r+=i.length;else{var o=i.regex,f=i.parser,h=e.slice(r),u=o.exec(h)[0];f.call(t,u),e=e.replace(u,\"\")}}return function(e){var t=e.afternoon;if(void 0!==t){var n=e.hours;t?n<12&&(e.hours+=12):12===n&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,s=e.args;this.$u=r;var a=s[1];if(\"string\"==typeof a){var f=!0===s[2],h=!0===s[3],u=f||h,d=s[2];h&&(d=s[2]),o=this.$locale(),!f&&d&&(o=n.Ls[d]),this.$d=function(e,t,n){try{if([\"x\",\"X\"].indexOf(t)>-1)return new Date((\"X\"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date(\"\")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){\"use strict\";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r=\"(\"===(f=f||\"()\")[0],u=\")\"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";var e={LTS:\"h:mm:ss A\",LT:\"h:mm A\",L:\"MM/DD/YYYY\",LL:\"MMMM D, YYYY\",LLL:\"MMMM D, YYYY h:mm A\",LLLL:\"dddd, MMMM D, YYYY h:mm A\"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t=\"YYYY-MM-DDTHH:mm:ssZ\");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_weekOfYear=t()}(this,(function(){\"use strict\";var e=\"week\",t=\"year\";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),\"day\");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));","var has = Object.prototype.hasOwnProperty;\n\nfunction dequal(foo, bar) {\n\tvar ctor, len;\n\tif (foo === bar) return true;\n\n\tif (foo && bar && (ctor=foo.constructor) === bar.constructor) {\n\t\tif (ctor === Date) return foo.getTime() === bar.getTime();\n\t\tif (ctor === RegExp) return foo.toString() === bar.toString();\n\n\t\tif (ctor === Array) {\n\t\t\tif ((len=foo.length) === bar.length) {\n\t\t\t\twhile (len-- && dequal(foo[len], bar[len]));\n\t\t\t}\n\t\t\treturn len === -1;\n\t\t}\n\n\t\tif (!ctor || typeof foo === 'object') {\n\t\t\tlen = 0;\n\t\t\tfor (ctor in foo) {\n\t\t\t\tif (has.call(foo, ctor) && ++len && !has.call(bar, ctor)) return false;\n\t\t\t\tif (!(ctor in bar) || !dequal(foo[ctor], bar[ctor])) return false;\n\t\t\t}\n\t\t\treturn Object.keys(bar).length === len;\n\t\t}\n\t}\n\n\treturn foo !== foo && bar !== bar;\n}\n\nexports.dequal = dequal;","var QueryHandler = require('./QueryHandler');\nvar each = require('./Util').each;\n\n/**\n * Represents a single media query, manages it's state and registered handlers for this query\n *\n * @constructor\n * @param {string} query the media query string\n * @param {boolean} [isUnconditional=false] whether the media query should run regardless of whether the conditions are met. Primarily for helping older browsers deal with mobile-first design\n */\nfunction MediaQuery(query, isUnconditional) {\n this.query = query;\n this.isUnconditional = isUnconditional;\n this.handlers = [];\n this.mql = window.matchMedia(query);\n\n var self = this;\n this.listener = function(mql) {\n // Chrome passes an MediaQueryListEvent object, while other browsers pass MediaQueryList directly\n self.mql = mql.currentTarget || mql;\n self.assess();\n };\n this.mql.addListener(this.listener);\n}\n\nMediaQuery.prototype = {\n\n constuctor : MediaQuery,\n\n /**\n * add a handler for this query, triggering if already active\n *\n * @param {object} handler\n * @param {function} handler.match callback for when query is activated\n * @param {function} [handler.unmatch] callback for when query is deactivated\n * @param {function} [handler.setup] callback for immediate execution when a query handler is registered\n * @param {boolean} [handler.deferSetup=false] should the setup callback be deferred until the first time the handler is matched?\n */\n addHandler : function(handler) {\n var qh = new QueryHandler(handler);\n this.handlers.push(qh);\n\n this.matches() && qh.on();\n },\n\n /**\n * removes the given handler from the collection, and calls it's destroy methods\n *\n * @param {object || function} handler the handler to remove\n */\n removeHandler : function(handler) {\n var handlers = this.handlers;\n each(handlers, function(h, i) {\n if(h.equals(handler)) {\n h.destroy();\n return !handlers.splice(i,1); //remove from array and exit each early\n }\n });\n },\n\n /**\n * Determine whether the media query should be considered a match\n *\n * @return {Boolean} true if media query can be considered a match, false otherwise\n */\n matches : function() {\n return this.mql.matches || this.isUnconditional;\n },\n\n /**\n * Clears all handlers and unbinds events\n */\n clear : function() {\n each(this.handlers, function(handler) {\n handler.destroy();\n });\n this.mql.removeListener(this.listener);\n this.handlers.length = 0; //clear array\n },\n\n /*\n * Assesses the query, turning on all handlers if it matches, turning them off if it doesn't match\n */\n assess : function() {\n var action = this.matches() ? 'on' : 'off';\n\n each(this.handlers, function(handler) {\n handler[action]();\n });\n }\n};\n\nmodule.exports = MediaQuery;\n","var MediaQuery = require('./MediaQuery');\nvar Util = require('./Util');\nvar each = Util.each;\nvar isFunction = Util.isFunction;\nvar isArray = Util.isArray;\n\n/**\n * Allows for registration of query handlers.\n * Manages the query handler's state and is responsible for wiring up browser events\n *\n * @constructor\n */\nfunction MediaQueryDispatch () {\n if(!window.matchMedia) {\n throw new Error('matchMedia not present, legacy browsers require a polyfill');\n }\n\n this.queries = {};\n this.browserIsIncapable = !window.matchMedia('only all').matches;\n}\n\nMediaQueryDispatch.prototype = {\n\n constructor : MediaQueryDispatch,\n\n /**\n * Registers a handler for the given media query\n *\n * @param {string} q the media query\n * @param {object || Array || Function} options either a single query handler object, a function, or an array of query handlers\n * @param {function} options.match fired when query matched\n * @param {function} [options.unmatch] fired when a query is no longer matched\n * @param {function} [options.setup] fired when handler first triggered\n * @param {boolean} [options.deferSetup=false] whether setup should be run immediately or deferred until query is first matched\n * @param {boolean} [shouldDegrade=false] whether this particular media query should always run on incapable browsers\n */\n register : function(q, options, shouldDegrade) {\n var queries = this.queries,\n isUnconditional = shouldDegrade && this.browserIsIncapable;\n\n if(!queries[q]) {\n queries[q] = new MediaQuery(q, isUnconditional);\n }\n\n //normalise to object in an array\n if(isFunction(options)) {\n options = { match : options };\n }\n if(!isArray(options)) {\n options = [options];\n }\n each(options, function(handler) {\n if (isFunction(handler)) {\n handler = { match : handler };\n }\n queries[q].addHandler(handler);\n });\n\n return this;\n },\n\n /**\n * unregisters a query and all it's handlers, or a specific handler for a query\n *\n * @param {string} q the media query to target\n * @param {object || function} [handler] specific handler to unregister\n */\n unregister : function(q, handler) {\n var query = this.queries[q];\n\n if(query) {\n if(handler) {\n query.removeHandler(handler);\n }\n else {\n query.clear();\n delete this.queries[q];\n }\n }\n\n return this;\n }\n};\n\nmodule.exports = MediaQueryDispatch;\n","/**\n * Delegate to handle a media query being matched and unmatched.\n *\n * @param {object} options\n * @param {function} options.match callback for when the media query is matched\n * @param {function} [options.unmatch] callback for when the media query is unmatched\n * @param {function} [options.setup] one-time callback triggered the first time a query is matched\n * @param {boolean} [options.deferSetup=false] should the setup callback be run immediately, rather than first time query is matched?\n * @constructor\n */\nfunction QueryHandler(options) {\n this.options = options;\n !options.deferSetup && this.setup();\n}\n\nQueryHandler.prototype = {\n\n constructor : QueryHandler,\n\n /**\n * coordinates setup of the handler\n *\n * @function\n */\n setup : function() {\n if(this.options.setup) {\n this.options.setup();\n }\n this.initialised = true;\n },\n\n /**\n * coordinates setup and triggering of the handler\n *\n * @function\n */\n on : function() {\n !this.initialised && this.setup();\n this.options.match && this.options.match();\n },\n\n /**\n * coordinates the unmatch event for the handler\n *\n * @function\n */\n off : function() {\n this.options.unmatch && this.options.unmatch();\n },\n\n /**\n * called when a handler is to be destroyed.\n * delegates to the destroy or unmatch callbacks, depending on availability.\n *\n * @function\n */\n destroy : function() {\n this.options.destroy ? this.options.destroy() : this.off();\n },\n\n /**\n * determines equality by reference.\n * if object is supplied compare options, if function, compare match callback\n *\n * @function\n * @param {object || function} [target] the target for comparison\n */\n equals : function(target) {\n return this.options === target || this.options.match === target;\n }\n\n};\n\nmodule.exports = QueryHandler;\n","/**\n * Helper function for iterating over a collection\n *\n * @param collection\n * @param fn\n */\nfunction each(collection, fn) {\n var i = 0,\n length = collection.length,\n cont;\n\n for(i; i < length; i++) {\n cont = fn(collection[i], i);\n if(cont === false) {\n break; //allow early exit\n }\n }\n}\n\n/**\n * Helper function for determining whether target object is an array\n *\n * @param target the object under test\n * @return {Boolean} true if array, false otherwise\n */\nfunction isArray(target) {\n return Object.prototype.toString.apply(target) === '[object Array]';\n}\n\n/**\n * Helper function for determining whether target object is a function\n *\n * @param target the object under test\n * @return {Boolean} true if function, false otherwise\n */\nfunction isFunction(target) {\n return typeof target === 'function';\n}\n\nmodule.exports = {\n isFunction : isFunction,\n isArray : isArray,\n each : each\n};\n","var MediaQueryDispatch = require('./MediaQueryDispatch');\nmodule.exports = new MediaQueryDispatch();\n","/*!\n * FilePondPluginFileEncode 2.1.10\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n\n(function(global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n ? (module.exports = factory())\n : typeof define === 'function' && define.amd\n ? define(factory)\n : ((global = global || self),\n (global.FilePondPluginFileEncode = factory()));\n})(this, function() {\n 'use strict';\n\n var DataURIWorker = function DataURIWorker() {\n // route messages\n self.onmessage = function(e) {\n convert(e.data.message, function(response) {\n self.postMessage({ id: e.data.id, message: response });\n });\n };\n\n // convert file to data uri\n var convert = function convert(options, cb) {\n var file = options.file;\n\n var reader = new FileReader();\n reader.onloadend = function() {\n cb(reader.result.replace('data:', '').replace(/^.+,/, ''));\n };\n reader.readAsDataURL(file);\n };\n };\n\n var plugin = function plugin(_ref) {\n var addFilter = _ref.addFilter,\n utils = _ref.utils;\n\n // get quick reference to Type utils\n var Type = utils.Type,\n createWorker = utils.createWorker,\n createRoute = utils.createRoute,\n isFile = utils.isFile;\n\n var encode = function encode(_ref2) {\n var name = _ref2.name,\n file = _ref2.file;\n return new Promise(function(resolve) {\n var worker = createWorker(DataURIWorker);\n worker.post({ file: file }, function(data) {\n resolve({ name: name, data: data });\n worker.terminate();\n });\n });\n };\n\n // holds base64 strings till can be moved to item\n var base64Cache = [];\n addFilter('DID_CREATE_ITEM', function(item, _ref3) {\n var query = _ref3.query;\n\n if (!query('GET_ALLOW_FILE_ENCODE')) return;\n\n item.extend('getFileEncodeBase64String', function() {\n return base64Cache[item.id] && base64Cache[item.id].data;\n });\n item.extend('getFileEncodeDataURL', function() {\n return 'data:'\n .concat(item.fileType, ';base64,')\n .concat(base64Cache[item.id].data);\n });\n });\n\n addFilter('SHOULD_PREPARE_OUTPUT', function(shouldPrepareOutput, _ref4) {\n var query = _ref4.query;\n return new Promise(function(resolve) {\n resolve(query('GET_ALLOW_FILE_ENCODE'));\n });\n });\n\n addFilter('COMPLETE_PREPARE_OUTPUT', function(file, _ref5) {\n var item = _ref5.item,\n query = _ref5.query;\n return new Promise(function(resolve) {\n // if it's not a file or a list of files, continue\n if (\n !query('GET_ALLOW_FILE_ENCODE') ||\n (!isFile(file) && !Array.isArray(file))\n ) {\n return resolve(file);\n }\n\n // store metadata settings for this cache\n base64Cache[item.id] = {\n metadata: item.getMetadata(),\n data: null\n };\n\n // wait for all file items to be encoded\n Promise.all(\n (file instanceof Blob ? [{ name: null, file: file }] : file).map(\n encode\n )\n ).then(function(dataItems) {\n base64Cache[item.id].data =\n file instanceof Blob ? dataItems[0].data : dataItems;\n resolve(file);\n });\n });\n });\n\n // called for each view that is created right after the 'create' method\n addFilter('CREATE_VIEW', function(viewAPI) {\n // get reference to created view\n var is = viewAPI.is,\n view = viewAPI.view,\n query = viewAPI.query;\n\n // only hook up to item view\n if (!is('file-wrapper') || !query('GET_ALLOW_FILE_ENCODE')) {\n return;\n }\n\n view.registerWriter(\n createRoute({\n DID_PREPARE_OUTPUT: function DID_PREPARE_OUTPUT(_ref6) {\n var root = _ref6.root,\n action = _ref6.action;\n\n // only do this if is not uploading async\n if (query('IS_ASYNC')) {\n return;\n }\n\n var item = query('GET_ITEM', action.id);\n if (!item) return;\n\n // extract base64 string\n var cache = base64Cache[item.id];\n var metadata = cache.metadata;\n var data = cache.data;\n\n // create JSON string from encoded data\n var value = JSON.stringify({\n id: item.id,\n name: item.file.name,\n type: item.file.type,\n size: item.file.size,\n metadata: metadata,\n data: data\n });\n\n // for filepond < 4.13.0\n if (root.ref.data) {\n root.ref.data.value = value;\n }\n // newer versions\n else {\n root.dispatch('DID_DEFINE_VALUE', {\n id: item.id,\n value: value\n });\n }\n },\n DID_REMOVE_ITEM: function DID_REMOVE_ITEM(_ref7) {\n var action = _ref7.action;\n var item = query('GET_ITEM', action.id);\n if (!item) return;\n delete base64Cache[item.id];\n }\n })\n );\n });\n\n return {\n options: {\n // Enable or disable file encoding\n allowFileEncode: [true, Type.BOOLEAN]\n }\n };\n };\n\n // fire pluginloaded event if running in browser, this allows registering the plugin when using async script tags\n var isBrowser =\n typeof window !== 'undefined' && typeof window.document !== 'undefined';\n if (isBrowser) {\n document.dispatchEvent(\n new CustomEvent('FilePond:pluginloaded', { detail: plugin })\n );\n }\n\n return plugin;\n});\n","/*!\n * FilePondPluginFileValidateSize 2.2.8\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n\n(function(global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n ? (module.exports = factory())\n : typeof define === 'function' && define.amd\n ? define(factory)\n : ((global = global || self), (global.FilePondPluginFileValidateSize = factory()));\n})(this, function() {\n 'use strict';\n\n var plugin = function plugin(_ref) {\n var addFilter = _ref.addFilter,\n utils = _ref.utils;\n // get quick reference to Type utils\n var Type = utils.Type,\n replaceInString = utils.replaceInString,\n toNaturalFileSize = utils.toNaturalFileSize;\n\n // filtering if an item is allowed in hopper\n addFilter('ALLOW_HOPPER_ITEM', function(file, _ref2) {\n var query = _ref2.query;\n if (!query('GET_ALLOW_FILE_SIZE_VALIDATION')) {\n return true;\n }\n\n var sizeMax = query('GET_MAX_FILE_SIZE');\n if (sizeMax !== null && file.size > sizeMax) {\n return false;\n }\n\n var sizeMin = query('GET_MIN_FILE_SIZE');\n if (sizeMin !== null && file.size < sizeMin) {\n return false;\n }\n\n return true;\n });\n\n // called for each file that is loaded\n // right before it is set to the item state\n // should return a promise\n addFilter('LOAD_FILE', function(file, _ref3) {\n var query = _ref3.query;\n return new Promise(function(resolve, reject) {\n // if not allowed, all fine, exit\n if (!query('GET_ALLOW_FILE_SIZE_VALIDATION')) {\n return resolve(file);\n }\n\n // check if file should be filtered\n var fileFilter = query('GET_FILE_VALIDATE_SIZE_FILTER');\n if (fileFilter && !fileFilter(file)) {\n return resolve(file);\n }\n\n // reject or resolve based on file size\n var sizeMax = query('GET_MAX_FILE_SIZE');\n if (sizeMax !== null && file.size > sizeMax) {\n reject({\n status: {\n main: query('GET_LABEL_MAX_FILE_SIZE_EXCEEDED'),\n sub: replaceInString(query('GET_LABEL_MAX_FILE_SIZE'), {\n filesize: toNaturalFileSize(\n sizeMax,\n '.',\n query('GET_FILE_SIZE_BASE'),\n query('GET_FILE_SIZE_LABELS', query)\n ),\n }),\n },\n });\n\n return;\n }\n\n // reject or resolve based on file size\n var sizeMin = query('GET_MIN_FILE_SIZE');\n if (sizeMin !== null && file.size < sizeMin) {\n reject({\n status: {\n main: query('GET_LABEL_MIN_FILE_SIZE_EXCEEDED'),\n sub: replaceInString(query('GET_LABEL_MIN_FILE_SIZE'), {\n filesize: toNaturalFileSize(\n sizeMin,\n '.',\n query('GET_FILE_SIZE_BASE'),\n query('GET_FILE_SIZE_LABELS', query)\n ),\n }),\n },\n });\n\n return;\n }\n\n // returns the current option value\n var totalSizeMax = query('GET_MAX_TOTAL_FILE_SIZE');\n if (totalSizeMax !== null) {\n // get the current total file size\n var currentTotalSize = query('GET_ACTIVE_ITEMS').reduce(function(total, item) {\n return total + item.fileSize;\n }, 0);\n\n // get the size of the new file\n if (currentTotalSize > totalSizeMax) {\n reject({\n status: {\n main: query('GET_LABEL_MAX_TOTAL_FILE_SIZE_EXCEEDED'),\n sub: replaceInString(query('GET_LABEL_MAX_TOTAL_FILE_SIZE'), {\n filesize: toNaturalFileSize(\n totalSizeMax,\n '.',\n query('GET_FILE_SIZE_BASE'),\n query('GET_FILE_SIZE_LABELS', query)\n ),\n }),\n },\n });\n\n return;\n }\n }\n\n // file is fine, let's pass it back\n resolve(file);\n });\n });\n\n return {\n options: {\n // Enable or disable file type validation\n allowFileSizeValidation: [true, Type.BOOLEAN],\n\n // Max individual file size in bytes\n maxFileSize: [null, Type.INT],\n\n // Min individual file size in bytes\n minFileSize: [null, Type.INT],\n\n // Max total file size in bytes\n maxTotalFileSize: [null, Type.INT],\n\n // Filter the files that need to be validated for size\n fileValidateSizeFilter: [null, Type.FUNCTION],\n\n // error labels\n labelMinFileSizeExceeded: ['File is too small', Type.STRING],\n labelMinFileSize: ['Minimum file size is {filesize}', Type.STRING],\n\n labelMaxFileSizeExceeded: ['File is too large', Type.STRING],\n labelMaxFileSize: ['Maximum file size is {filesize}', Type.STRING],\n\n labelMaxTotalFileSizeExceeded: ['Maximum total size exceeded', Type.STRING],\n labelMaxTotalFileSize: ['Maximum total file size is {filesize}', Type.STRING],\n },\n };\n };\n\n // fire pluginloaded event if running in browser, this allows registering the plugin when using async script tags\n var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n if (isBrowser) {\n document.dispatchEvent(new CustomEvent('FilePond:pluginloaded', { detail: plugin }));\n }\n\n return plugin;\n});\n","/*!\n * FilePondPluginFileValidateType 1.2.8\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n\n(function(global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n ? (module.exports = factory())\n : typeof define === 'function' && define.amd\n ? define(factory)\n : ((global = global || self),\n (global.FilePondPluginFileValidateType = factory()));\n})(this, function() {\n 'use strict';\n\n var plugin = function plugin(_ref) {\n var addFilter = _ref.addFilter,\n utils = _ref.utils;\n // get quick reference to Type utils\n var Type = utils.Type,\n isString = utils.isString,\n replaceInString = utils.replaceInString,\n guesstimateMimeType = utils.guesstimateMimeType,\n getExtensionFromFilename = utils.getExtensionFromFilename,\n getFilenameFromURL = utils.getFilenameFromURL;\n\n var mimeTypeMatchesWildCard = function mimeTypeMatchesWildCard(\n mimeType,\n wildcard\n ) {\n var mimeTypeGroup = (/^[^/]+/.exec(mimeType) || []).pop(); // image/png -> image\n var wildcardGroup = wildcard.slice(0, -2); // image/* -> image\n return mimeTypeGroup === wildcardGroup;\n };\n\n var isValidMimeType = function isValidMimeType(\n acceptedTypes,\n userInputType\n ) {\n return acceptedTypes.some(function(acceptedType) {\n // accepted is wildcard mime type\n if (/\\*$/.test(acceptedType)) {\n return mimeTypeMatchesWildCard(userInputType, acceptedType);\n }\n\n // is normal mime type\n return acceptedType === userInputType;\n });\n };\n\n var getItemType = function getItemType(item) {\n // if the item is a url we guess the mime type by the extension\n var type = '';\n if (isString(item)) {\n var filename = getFilenameFromURL(item);\n var extension = getExtensionFromFilename(filename);\n if (extension) {\n type = guesstimateMimeType(extension);\n }\n } else {\n type = item.type;\n }\n\n return type;\n };\n\n var validateFile = function validateFile(\n item,\n acceptedFileTypes,\n typeDetector\n ) {\n // no types defined, everything is allowed \\o/\n if (acceptedFileTypes.length === 0) {\n return true;\n }\n\n // gets the item type\n var type = getItemType(item);\n\n // no type detector, test now\n if (!typeDetector) {\n return isValidMimeType(acceptedFileTypes, type);\n }\n\n // use type detector\n return new Promise(function(resolve, reject) {\n typeDetector(item, type)\n .then(function(detectedType) {\n if (isValidMimeType(acceptedFileTypes, detectedType)) {\n resolve();\n } else {\n reject();\n }\n })\n .catch(reject);\n });\n };\n\n var applyMimeTypeMap = function applyMimeTypeMap(map) {\n return function(acceptedFileType) {\n return map[acceptedFileType] === null\n ? false\n : map[acceptedFileType] || acceptedFileType;\n };\n };\n\n // setup attribute mapping for accept\n addFilter('SET_ATTRIBUTE_TO_OPTION_MAP', function(map) {\n return Object.assign(map, {\n accept: 'acceptedFileTypes'\n });\n });\n\n // filtering if an item is allowed in hopper\n addFilter('ALLOW_HOPPER_ITEM', function(file, _ref2) {\n var query = _ref2.query;\n // if we are not doing file type validation exit\n if (!query('GET_ALLOW_FILE_TYPE_VALIDATION')) {\n return true;\n }\n\n // we validate the file against the accepted file types\n return validateFile(file, query('GET_ACCEPTED_FILE_TYPES'));\n });\n\n // called for each file that is loaded\n // right before it is set to the item state\n // should return a promise\n addFilter('LOAD_FILE', function(file, _ref3) {\n var query = _ref3.query;\n return new Promise(function(resolve, reject) {\n if (!query('GET_ALLOW_FILE_TYPE_VALIDATION')) {\n resolve(file);\n return;\n }\n\n var acceptedFileTypes = query('GET_ACCEPTED_FILE_TYPES');\n\n // custom type detector method\n var typeDetector = query('GET_FILE_VALIDATE_TYPE_DETECT_TYPE');\n\n // if invalid, exit here\n var validationResult = validateFile(\n file,\n acceptedFileTypes,\n typeDetector\n );\n\n var handleRejection = function handleRejection() {\n var acceptedFileTypesMapped = acceptedFileTypes\n .map(\n applyMimeTypeMap(\n query('GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES_MAP')\n )\n )\n .filter(function(label) {\n return label !== false;\n });\n\n var acceptedFileTypesMapped_unique = acceptedFileTypesMapped.filter(\n function(item, index) {\n return acceptedFileTypesMapped.indexOf(item) === index;\n }\n );\n\n reject({\n status: {\n main: query('GET_LABEL_FILE_TYPE_NOT_ALLOWED'),\n sub: replaceInString(\n query('GET_FILE_VALIDATE_TYPE_LABEL_EXPECTED_TYPES'),\n {\n allTypes: acceptedFileTypesMapped_unique.join(', '),\n allButLastType: acceptedFileTypesMapped_unique\n .slice(0, -1)\n .join(', '),\n lastType:\n acceptedFileTypesMapped_unique[\n acceptedFileTypesMapped.length - 1\n ]\n }\n )\n }\n });\n };\n\n // has returned new filename immidiately\n if (typeof validationResult === 'boolean') {\n if (!validationResult) {\n return handleRejection();\n }\n return resolve(file);\n }\n\n // is promise\n validationResult\n .then(function() {\n resolve(file);\n })\n .catch(handleRejection);\n });\n });\n\n // expose plugin\n return {\n // default options\n options: {\n // Enable or disable file type validation\n allowFileTypeValidation: [true, Type.BOOLEAN],\n\n // What file types to accept\n acceptedFileTypes: [[], Type.ARRAY],\n // - must be comma separated\n // - mime types: image/png, image/jpeg, image/gif\n // - extensions: .png, .jpg, .jpeg ( not enabled yet )\n // - wildcards: image/*\n\n // label to show when a type is not allowed\n labelFileTypeNotAllowed: ['File is of invalid type', Type.STRING],\n\n // nicer label\n fileValidateTypeLabelExpectedTypes: [\n 'Expects {allButLastType} or {lastType}',\n Type.STRING\n ],\n\n // map mime types to extensions\n fileValidateTypeLabelExpectedTypesMap: [{}, Type.OBJECT],\n\n // Custom function to detect type of file\n fileValidateTypeDetectType: [null, Type.FUNCTION]\n }\n };\n };\n\n // fire pluginloaded event if running in browser, this allows registering the plugin when using async script tags\n var isBrowser =\n typeof window !== 'undefined' && typeof window.document !== 'undefined';\n if (isBrowser) {\n document.dispatchEvent(\n new CustomEvent('FilePond:pluginloaded', { detail: plugin })\n );\n }\n\n return plugin;\n});\n","/*!\n * FilePondPluginImagePreview 4.6.11\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n\n(function(global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n ? (module.exports = factory())\n : typeof define === 'function' && define.amd\n ? define(factory)\n : ((global = global || self),\n (global.FilePondPluginImagePreview = factory()));\n})(this, function() {\n 'use strict';\n\n // test if file is of type image and can be viewed in canvas\n var isPreviewableImage = function isPreviewableImage(file) {\n return /^image/.test(file.type);\n };\n\n function _typeof(obj) {\n if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {\n _typeof = function(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function(obj) {\n return obj &&\n typeof Symbol === 'function' &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? 'symbol'\n : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n var REACT_ELEMENT_TYPE;\n\n function _jsx(type, props, key, children) {\n if (!REACT_ELEMENT_TYPE) {\n REACT_ELEMENT_TYPE =\n (typeof Symbol === 'function' &&\n Symbol.for &&\n Symbol.for('react.element')) ||\n 0xeac7;\n }\n\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n props = {\n children: void 0\n };\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = new Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null\n };\n }\n\n function _asyncIterator(iterable) {\n var method;\n\n if (typeof Symbol === 'function') {\n if (Symbol.asyncIterator) {\n method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n\n if (Symbol.iterator) {\n method = iterable[Symbol.iterator];\n if (method != null) return method.call(iterable);\n }\n }\n\n throw new TypeError('Object is not async iterable');\n }\n\n function _AwaitValue(value) {\n this.wrapped = value;\n }\n\n function _AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function(resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg);\n var value = result.value;\n var wrappedAwait = value instanceof _AwaitValue;\n Promise.resolve(wrappedAwait ? value.wrapped : value).then(\n function(arg) {\n if (wrappedAwait) {\n resume('next', arg);\n return;\n }\n\n settle(result.done ? 'return' : 'normal', arg);\n },\n function(err) {\n resume('throw', err);\n }\n );\n } catch (err) {\n settle('throw', err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case 'return':\n front.resolve({\n value: value,\n done: true\n });\n break;\n\n case 'throw':\n front.reject(value);\n break;\n\n default:\n front.resolve({\n value: value,\n done: false\n });\n break;\n }\n\n front = front.next;\n\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n if (typeof gen.return !== 'function') {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === 'function' && Symbol.asyncIterator) {\n _AsyncGenerator.prototype[Symbol.asyncIterator] = function() {\n return this;\n };\n }\n\n _AsyncGenerator.prototype.next = function(arg) {\n return this._invoke('next', arg);\n };\n\n _AsyncGenerator.prototype.throw = function(arg) {\n return this._invoke('throw', arg);\n };\n\n _AsyncGenerator.prototype.return = function(arg) {\n return this._invoke('return', arg);\n };\n\n function _wrapAsyncGenerator(fn) {\n return function() {\n return new _AsyncGenerator(fn.apply(this, arguments));\n };\n }\n\n function _awaitAsyncGenerator(value) {\n return new _AwaitValue(value);\n }\n\n function _asyncGeneratorDelegate(inner, awaitWrap) {\n var iter = {},\n waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function(resolve) {\n resolve(inner[key](value));\n });\n return {\n done: false,\n value: awaitWrap(value)\n };\n }\n\n if (typeof Symbol === 'function' && Symbol.iterator) {\n iter[Symbol.iterator] = function() {\n return this;\n };\n }\n\n iter.next = function(value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n\n return pump('next', value);\n };\n\n if (typeof inner.throw === 'function') {\n iter.throw = function(value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n\n return pump('throw', value);\n };\n }\n\n if (typeof inner.return === 'function') {\n iter.return = function(value) {\n return pump('return', value);\n };\n }\n\n return iter;\n }\n\n function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n }\n\n function _asyncToGenerator(fn) {\n return function() {\n var self = this,\n args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(\n gen,\n resolve,\n reject,\n _next,\n _throw,\n 'next',\n value\n );\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err);\n }\n\n _next(undefined);\n });\n };\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _defineEnumerableProperties(obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ('value' in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n if (Object.getOwnPropertySymbols) {\n var objectSymbols = Object.getOwnPropertySymbols(descs);\n\n for (var i = 0; i < objectSymbols.length; i++) {\n var sym = objectSymbols[i];\n var desc = descs[sym];\n desc.configurable = desc.enumerable = true;\n if ('value' in desc) desc.writable = true;\n Object.defineProperty(obj, sym, desc);\n }\n }\n\n return obj;\n }\n\n function _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _extends() {\n _extends =\n Object.assign ||\n function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n\n function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(\n Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n })\n );\n }\n\n ownKeys.forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function');\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf\n ? Object.getPrototypeOf\n : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf =\n Object.setPrototypeOf ||\n function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function isNativeReflectConstruct() {\n if (typeof Reflect === 'undefined' || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === 'function') return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf('[native code]') !== -1;\n }\n\n function _wrapNativeSuper(Class) {\n var _cache = typeof Map === 'function' ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n\n if (typeof Class !== 'function') {\n throw new TypeError(\n 'Super expression must either be null or a function'\n );\n }\n\n if (typeof _cache !== 'undefined') {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n }\n\n function _instanceof(left, right) {\n if (\n right != null &&\n typeof Symbol !== 'undefined' &&\n right[Symbol.hasInstance]\n ) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n }\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule\n ? obj\n : {\n default: obj\n };\n }\n\n function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc =\n Object.defineProperty && Object.getOwnPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : {};\n\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n }\n\n function _newArrowCheck(innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError('Cannot instantiate an arrow function');\n }\n }\n\n function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError('Cannot destructure undefined');\n }\n\n function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n }\n\n function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\n \"this hasn't been initialised - super() hasn't been called\"\n );\n }\n\n return self;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (typeof call === 'object' || typeof call === 'function')) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n }\n\n function _get(target, property, receiver) {\n if (typeof Reflect !== 'undefined' && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n }\n\n function set(target, property, value, receiver) {\n if (typeof Reflect !== 'undefined' && Reflect.set) {\n set = Reflect.set;\n } else {\n set = function set(target, property, value, receiver) {\n var base = _superPropBase(target, property);\n\n var desc;\n\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n } else if (!desc.writable) {\n return false;\n }\n }\n\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n\n if (desc) {\n if (!desc.writable) {\n return false;\n }\n\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n _defineProperty(receiver, property, value);\n }\n\n return true;\n };\n }\n\n return set(target, property, value, receiver);\n }\n\n function _set(target, property, value, receiver, isStrict) {\n var s = set(target, property, value, receiver || target);\n\n if (!s && isStrict) {\n throw new Error('failed to set property');\n }\n\n return value;\n }\n\n function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(\n Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n })\n );\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n strings.raw = raw;\n return strings;\n }\n\n function _temporalRef(val, name) {\n if (val === _temporalUndefined) {\n throw new ReferenceError(name + ' is not defined - temporal dead zone');\n } else {\n return val;\n }\n }\n\n function _readOnlyError(name) {\n throw new Error('\"' + name + '\" is read-only');\n }\n\n function _classNameTDZError(name) {\n throw new Error(\n 'Class \"' + name + '\" cannot be referenced in computed property keys.'\n );\n }\n\n var _temporalUndefined = {};\n\n function _slicedToArray(arr, i) {\n return (\n _arrayWithHoles(arr) ||\n _iterableToArrayLimit(arr, i) ||\n _nonIterableRest()\n );\n }\n\n function _slicedToArrayLoose(arr, i) {\n return (\n _arrayWithHoles(arr) ||\n _iterableToArrayLimitLoose(arr, i) ||\n _nonIterableRest()\n );\n }\n\n function _toArray(arr) {\n return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();\n }\n\n function _toConsumableArray(arr) {\n return (\n _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread()\n );\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++)\n arr2[i] = arr[i];\n\n return arr2;\n }\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArray(iter) {\n if (\n Symbol.iterator in Object(iter) ||\n Object.prototype.toString.call(iter) === '[object Arguments]'\n )\n return Array.from(iter);\n }\n\n function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (\n var _i = arr[Symbol.iterator](), _s;\n !(_n = (_s = _i.next()).done);\n _n = true\n ) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i['return'] != null) _i['return']();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _iterableToArrayLimitLoose(arr, i) {\n var _arr = [];\n\n for (\n var _iterator = arr[Symbol.iterator](), _step;\n !(_step = _iterator.next()).done;\n\n ) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n }\n\n function _nonIterableSpread() {\n throw new TypeError('Invalid attempt to spread non-iterable instance');\n }\n\n function _nonIterableRest() {\n throw new TypeError('Invalid attempt to destructure non-iterable instance');\n }\n\n function _skipFirstGeneratorNext(fn) {\n return function() {\n var it = fn.apply(this, arguments);\n it.next();\n return it;\n };\n }\n\n function _toPrimitive(input, hint) {\n if (typeof input !== 'object' || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n\n if (prim !== undefined) {\n var res = prim.call(input, hint || 'default');\n if (typeof res !== 'object') return res;\n throw new TypeError('@@toPrimitive must return a primitive value.');\n }\n\n return (hint === 'string' ? String : Number)(input);\n }\n\n function _toPropertyKey(arg) {\n var key = _toPrimitive(arg, 'string');\n\n return typeof key === 'symbol' ? key : String(key);\n }\n\n function _initializerWarningHelper(descriptor, context) {\n throw new Error(\n 'Decorating class property failed. Please ensure that ' +\n 'proposal-class-properties is enabled and set to use loose mode. ' +\n 'To use proposal-class-properties in spec mode with decorators, wait for ' +\n 'the next major version of decorators in stage 2.'\n );\n }\n\n function _initializerDefineProperty(target, property, descriptor, context) {\n if (!descriptor) return;\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer\n ? descriptor.initializer.call(context)\n : void 0\n });\n }\n\n function _applyDecoratedDescriptor(\n target,\n property,\n decorators,\n descriptor,\n context\n ) {\n var desc = {};\n Object.keys(descriptor).forEach(function(key) {\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n\n if ('value' in desc || desc.initializer) {\n desc.writable = true;\n }\n\n desc = decorators\n .slice()\n .reverse()\n .reduce(function(desc, decorator) {\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0) {\n Object.defineProperty(target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n\n var id = 0;\n\n function _classPrivateFieldLooseKey(name) {\n return '__private_' + id++ + '_' + name;\n }\n\n function _classPrivateFieldLooseBase(receiver, privateKey) {\n if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {\n throw new TypeError('attempted to use private field on non-instance');\n }\n\n return receiver;\n }\n\n function _classPrivateFieldGet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError('attempted to get private field on non-instance');\n }\n\n var descriptor = privateMap.get(receiver);\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n }\n\n function _classPrivateFieldSet(receiver, privateMap, value) {\n if (!privateMap.has(receiver)) {\n throw new TypeError('attempted to set private field on non-instance');\n }\n\n var descriptor = privateMap.get(receiver);\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError('attempted to set read only private field');\n }\n\n descriptor.value = value;\n }\n\n return value;\n }\n\n function _classStaticPrivateFieldSpecGet(\n receiver,\n classConstructor,\n descriptor\n ) {\n if (receiver !== classConstructor) {\n throw new TypeError('Private static access of wrong provenance');\n }\n\n return descriptor.value;\n }\n\n function _classStaticPrivateFieldSpecSet(\n receiver,\n classConstructor,\n descriptor,\n value\n ) {\n if (receiver !== classConstructor) {\n throw new TypeError('Private static access of wrong provenance');\n }\n\n if (!descriptor.writable) {\n throw new TypeError('attempted to set read only private field');\n }\n\n descriptor.value = value;\n return value;\n }\n\n function _classStaticPrivateMethodGet(receiver, classConstructor, method) {\n if (receiver !== classConstructor) {\n throw new TypeError('Private static access of wrong provenance');\n }\n\n return method;\n }\n\n function _classStaticPrivateMethodSet() {\n throw new TypeError('attempted to set read only static private field');\n }\n\n function _decorate(decorators, factory, superClass, mixins) {\n var api = _getDecoratorsApi();\n\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n api = mixins[i](api);\n }\n }\n\n var r = factory(function initialize(O) {\n api.initializeInstanceElements(O, decorated.elements);\n }, superClass);\n var decorated = api.decorateClass(\n _coalesceClassElements(r.d.map(_createElementDescriptor)),\n decorators\n );\n api.initializeClassElements(r.F, decorated.elements);\n return api.runClassFinishers(r.F, decorated.finishers);\n }\n\n function _getDecoratorsApi() {\n _getDecoratorsApi = function() {\n return api;\n };\n\n var api = {\n elementsDefinitionOrder: [['method'], ['field']],\n initializeInstanceElements: function(O, elements) {\n ['method', 'field'].forEach(function(kind) {\n elements.forEach(function(element) {\n if (element.kind === kind && element.placement === 'own') {\n this.defineClassElement(O, element);\n }\n }, this);\n }, this);\n },\n initializeClassElements: function(F, elements) {\n var proto = F.prototype;\n ['method', 'field'].forEach(function(kind) {\n elements.forEach(function(element) {\n var placement = element.placement;\n\n if (\n element.kind === kind &&\n (placement === 'static' || placement === 'prototype')\n ) {\n var receiver = placement === 'static' ? F : proto;\n this.defineClassElement(receiver, element);\n }\n }, this);\n }, this);\n },\n defineClassElement: function(receiver, element) {\n var descriptor = element.descriptor;\n\n if (element.kind === 'field') {\n var initializer = element.initializer;\n descriptor = {\n enumerable: descriptor.enumerable,\n writable: descriptor.writable,\n configurable: descriptor.configurable,\n value: initializer === void 0 ? void 0 : initializer.call(receiver)\n };\n }\n\n Object.defineProperty(receiver, element.key, descriptor);\n },\n decorateClass: function(elements, decorators) {\n var newElements = [];\n var finishers = [];\n var placements = {\n static: [],\n prototype: [],\n own: []\n };\n elements.forEach(function(element) {\n this.addElementPlacement(element, placements);\n }, this);\n elements.forEach(function(element) {\n if (!_hasDecorators(element)) return newElements.push(element);\n var elementFinishersExtras = this.decorateElement(\n element,\n placements\n );\n newElements.push(elementFinishersExtras.element);\n newElements.push.apply(newElements, elementFinishersExtras.extras);\n finishers.push.apply(finishers, elementFinishersExtras.finishers);\n }, this);\n\n if (!decorators) {\n return {\n elements: newElements,\n finishers: finishers\n };\n }\n\n var result = this.decorateConstructor(newElements, decorators);\n finishers.push.apply(finishers, result.finishers);\n result.finishers = finishers;\n return result;\n },\n addElementPlacement: function(element, placements, silent) {\n var keys = placements[element.placement];\n\n if (!silent && keys.indexOf(element.key) !== -1) {\n throw new TypeError('Duplicated element (' + element.key + ')');\n }\n\n keys.push(element.key);\n },\n decorateElement: function(element, placements) {\n var extras = [];\n var finishers = [];\n\n for (\n var decorators = element.decorators, i = decorators.length - 1;\n i >= 0;\n i--\n ) {\n var keys = placements[element.placement];\n keys.splice(keys.indexOf(element.key), 1);\n var elementObject = this.fromElementDescriptor(element);\n var elementFinisherExtras = this.toElementFinisherExtras(\n (0, decorators[i])(elementObject) || elementObject\n );\n element = elementFinisherExtras.element;\n this.addElementPlacement(element, placements);\n\n if (elementFinisherExtras.finisher) {\n finishers.push(elementFinisherExtras.finisher);\n }\n\n var newExtras = elementFinisherExtras.extras;\n\n if (newExtras) {\n for (var j = 0; j < newExtras.length; j++) {\n this.addElementPlacement(newExtras[j], placements);\n }\n\n extras.push.apply(extras, newExtras);\n }\n }\n\n return {\n element: element,\n finishers: finishers,\n extras: extras\n };\n },\n decorateConstructor: function(elements, decorators) {\n var finishers = [];\n\n for (var i = decorators.length - 1; i >= 0; i--) {\n var obj = this.fromClassDescriptor(elements);\n var elementsAndFinisher = this.toClassDescriptor(\n (0, decorators[i])(obj) || obj\n );\n\n if (elementsAndFinisher.finisher !== undefined) {\n finishers.push(elementsAndFinisher.finisher);\n }\n\n if (elementsAndFinisher.elements !== undefined) {\n elements = elementsAndFinisher.elements;\n\n for (var j = 0; j < elements.length - 1; j++) {\n for (var k = j + 1; k < elements.length; k++) {\n if (\n elements[j].key === elements[k].key &&\n elements[j].placement === elements[k].placement\n ) {\n throw new TypeError(\n 'Duplicated element (' + elements[j].key + ')'\n );\n }\n }\n }\n }\n }\n\n return {\n elements: elements,\n finishers: finishers\n };\n },\n fromElementDescriptor: function(element) {\n var obj = {\n kind: element.kind,\n key: element.key,\n placement: element.placement,\n descriptor: element.descriptor\n };\n var desc = {\n value: 'Descriptor',\n configurable: true\n };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n if (element.kind === 'field') obj.initializer = element.initializer;\n return obj;\n },\n toElementDescriptors: function(elementObjects) {\n if (elementObjects === undefined) return;\n return _toArray(elementObjects).map(function(elementObject) {\n var element = this.toElementDescriptor(elementObject);\n this.disallowProperty(\n elementObject,\n 'finisher',\n 'An element descriptor'\n );\n this.disallowProperty(\n elementObject,\n 'extras',\n 'An element descriptor'\n );\n return element;\n }, this);\n },\n toElementDescriptor: function(elementObject) {\n var kind = String(elementObject.kind);\n\n if (kind !== 'method' && kind !== 'field') {\n throw new TypeError(\n 'An element descriptor\\'s .kind property must be either \"method\" or' +\n ' \"field\", but a decorator created an element descriptor with' +\n ' .kind \"' +\n kind +\n '\"'\n );\n }\n\n var key = _toPropertyKey(elementObject.key);\n\n var placement = String(elementObject.placement);\n\n if (\n placement !== 'static' &&\n placement !== 'prototype' &&\n placement !== 'own'\n ) {\n throw new TypeError(\n 'An element descriptor\\'s .placement property must be one of \"static\",' +\n ' \"prototype\" or \"own\", but a decorator created an element descriptor' +\n ' with .placement \"' +\n placement +\n '\"'\n );\n }\n\n var descriptor = elementObject.descriptor;\n this.disallowProperty(\n elementObject,\n 'elements',\n 'An element descriptor'\n );\n var element = {\n kind: kind,\n key: key,\n placement: placement,\n descriptor: Object.assign({}, descriptor)\n };\n\n if (kind !== 'field') {\n this.disallowProperty(\n elementObject,\n 'initializer',\n 'A method descriptor'\n );\n } else {\n this.disallowProperty(\n descriptor,\n 'get',\n 'The property descriptor of a field descriptor'\n );\n this.disallowProperty(\n descriptor,\n 'set',\n 'The property descriptor of a field descriptor'\n );\n this.disallowProperty(\n descriptor,\n 'value',\n 'The property descriptor of a field descriptor'\n );\n element.initializer = elementObject.initializer;\n }\n\n return element;\n },\n toElementFinisherExtras: function(elementObject) {\n var element = this.toElementDescriptor(elementObject);\n\n var finisher = _optionalCallableProperty(elementObject, 'finisher');\n\n var extras = this.toElementDescriptors(elementObject.extras);\n return {\n element: element,\n finisher: finisher,\n extras: extras\n };\n },\n fromClassDescriptor: function(elements) {\n var obj = {\n kind: 'class',\n elements: elements.map(this.fromElementDescriptor, this)\n };\n var desc = {\n value: 'Descriptor',\n configurable: true\n };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n return obj;\n },\n toClassDescriptor: function(obj) {\n var kind = String(obj.kind);\n\n if (kind !== 'class') {\n throw new TypeError(\n 'A class descriptor\\'s .kind property must be \"class\", but a decorator' +\n ' created a class descriptor with .kind \"' +\n kind +\n '\"'\n );\n }\n\n this.disallowProperty(obj, 'key', 'A class descriptor');\n this.disallowProperty(obj, 'placement', 'A class descriptor');\n this.disallowProperty(obj, 'descriptor', 'A class descriptor');\n this.disallowProperty(obj, 'initializer', 'A class descriptor');\n this.disallowProperty(obj, 'extras', 'A class descriptor');\n\n var finisher = _optionalCallableProperty(obj, 'finisher');\n\n var elements = this.toElementDescriptors(obj.elements);\n return {\n elements: elements,\n finisher: finisher\n };\n },\n runClassFinishers: function(constructor, finishers) {\n for (var i = 0; i < finishers.length; i++) {\n var newConstructor = (0, finishers[i])(constructor);\n\n if (newConstructor !== undefined) {\n if (typeof newConstructor !== 'function') {\n throw new TypeError('Finishers must return a constructor.');\n }\n\n constructor = newConstructor;\n }\n }\n\n return constructor;\n },\n disallowProperty: function(obj, name, objectType) {\n if (obj[name] !== undefined) {\n throw new TypeError(\n objectType + \" can't have a .\" + name + ' property.'\n );\n }\n }\n };\n return api;\n }\n\n function _createElementDescriptor(def) {\n var key = _toPropertyKey(def.key);\n\n var descriptor;\n\n if (def.kind === 'method') {\n descriptor = {\n value: def.value,\n writable: true,\n configurable: true,\n enumerable: false\n };\n } else if (def.kind === 'get') {\n descriptor = {\n get: def.value,\n configurable: true,\n enumerable: false\n };\n } else if (def.kind === 'set') {\n descriptor = {\n set: def.value,\n configurable: true,\n enumerable: false\n };\n } else if (def.kind === 'field') {\n descriptor = {\n configurable: true,\n writable: true,\n enumerable: true\n };\n }\n\n var element = {\n kind: def.kind === 'field' ? 'field' : 'method',\n key: key,\n placement: def.static\n ? 'static'\n : def.kind === 'field'\n ? 'own'\n : 'prototype',\n descriptor: descriptor\n };\n if (def.decorators) element.decorators = def.decorators;\n if (def.kind === 'field') element.initializer = def.value;\n return element;\n }\n\n function _coalesceGetterSetter(element, other) {\n if (element.descriptor.get !== undefined) {\n other.descriptor.get = element.descriptor.get;\n } else {\n other.descriptor.set = element.descriptor.set;\n }\n }\n\n function _coalesceClassElements(elements) {\n var newElements = [];\n\n var isSameElement = function(other) {\n return (\n other.kind === 'method' &&\n other.key === element.key &&\n other.placement === element.placement\n );\n };\n\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n var other;\n\n if (\n element.kind === 'method' &&\n (other = newElements.find(isSameElement))\n ) {\n if (\n _isDataDescriptor(element.descriptor) ||\n _isDataDescriptor(other.descriptor)\n ) {\n if (_hasDecorators(element) || _hasDecorators(other)) {\n throw new ReferenceError(\n 'Duplicated methods (' + element.key + \") can't be decorated.\"\n );\n }\n\n other.descriptor = element.descriptor;\n } else {\n if (_hasDecorators(element)) {\n if (_hasDecorators(other)) {\n throw new ReferenceError(\n \"Decorators can't be placed on different accessors with for \" +\n 'the same property (' +\n element.key +\n ').'\n );\n }\n\n other.decorators = element.decorators;\n }\n\n _coalesceGetterSetter(element, other);\n }\n } else {\n newElements.push(element);\n }\n }\n\n return newElements;\n }\n\n function _hasDecorators(element) {\n return element.decorators && element.decorators.length;\n }\n\n function _isDataDescriptor(desc) {\n return (\n desc !== undefined &&\n !(desc.value === undefined && desc.writable === undefined)\n );\n }\n\n function _optionalCallableProperty(obj, name) {\n var value = obj[name];\n\n if (value !== undefined && typeof value !== 'function') {\n throw new TypeError(\"Expected '\" + name + \"' to be a function\");\n }\n\n return value;\n }\n\n function _classPrivateMethodGet(receiver, privateSet, fn) {\n if (!privateSet.has(receiver)) {\n throw new TypeError('attempted to get private field on non-instance');\n }\n\n return fn;\n }\n\n function _classPrivateMethodSet() {\n throw new TypeError('attempted to reassign private method');\n }\n\n function _wrapRegExp(re, groups) {\n _wrapRegExp = function(re, groups) {\n return new BabelRegExp(re, groups);\n };\n\n var _RegExp = _wrapNativeSuper(RegExp);\n\n var _super = RegExp.prototype;\n\n var _groups = new WeakMap();\n\n function BabelRegExp(re, groups) {\n var _this = _RegExp.call(this, re);\n\n _groups.set(_this, groups);\n\n return _this;\n }\n\n _inherits(BabelRegExp, _RegExp);\n\n BabelRegExp.prototype.exec = function(str) {\n var result = _super.exec.call(this, str);\n\n if (result) result.groups = buildGroups(result, this);\n return result;\n };\n\n BabelRegExp.prototype[Symbol.replace] = function(str, substitution) {\n if (typeof substitution === 'string') {\n var groups = _groups.get(this);\n\n return _super[Symbol.replace].call(\n this,\n str,\n substitution.replace(/\\$<([^>]+)>/g, function(_, name) {\n return '$' + groups[name];\n })\n );\n } else if (typeof substitution === 'function') {\n var _this = this;\n\n return _super[Symbol.replace].call(this, str, function() {\n var args = [];\n args.push.apply(args, arguments);\n\n if (typeof args[args.length - 1] !== 'object') {\n args.push(buildGroups(args, _this));\n }\n\n return substitution.apply(this, args);\n });\n } else {\n return _super[Symbol.replace].call(this, str, substitution);\n }\n };\n\n function buildGroups(result, re) {\n var g = _groups.get(re);\n\n return Object.keys(g).reduce(function(groups, name) {\n groups[name] = result[g[name]];\n return groups;\n }, Object.create(null));\n }\n\n return _wrapRegExp.apply(this, arguments);\n }\n\n var vectorMultiply = function vectorMultiply(v, amount) {\n return createVector(v.x * amount, v.y * amount);\n };\n\n var vectorAdd = function vectorAdd(a, b) {\n return createVector(a.x + b.x, a.y + b.y);\n };\n\n var vectorNormalize = function vectorNormalize(v) {\n var l = Math.sqrt(v.x * v.x + v.y * v.y);\n if (l === 0) {\n return {\n x: 0,\n y: 0\n };\n }\n return createVector(v.x / l, v.y / l);\n };\n\n var vectorRotate = function vectorRotate(v, radians, origin) {\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n var t = createVector(v.x - origin.x, v.y - origin.y);\n return createVector(\n origin.x + cos * t.x - sin * t.y,\n origin.y + sin * t.x + cos * t.y\n );\n };\n\n var createVector = function createVector() {\n var x =\n arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var y =\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return { x: x, y: y };\n };\n\n var getMarkupValue = function getMarkupValue(value, size) {\n var scalar =\n arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n var axis = arguments.length > 3 ? arguments[3] : undefined;\n if (typeof value === 'string') {\n return parseFloat(value) * scalar;\n }\n if (typeof value === 'number') {\n return value * (axis ? size[axis] : Math.min(size.width, size.height));\n }\n return;\n };\n\n var getMarkupStyles = function getMarkupStyles(markup, size, scale) {\n var lineStyle = markup.borderStyle || markup.lineStyle || 'solid';\n var fill = markup.backgroundColor || markup.fontColor || 'transparent';\n var stroke = markup.borderColor || markup.lineColor || 'transparent';\n var strokeWidth = getMarkupValue(\n markup.borderWidth || markup.lineWidth,\n size,\n scale\n );\n var lineCap = markup.lineCap || 'round';\n var lineJoin = markup.lineJoin || 'round';\n var dashes =\n typeof lineStyle === 'string'\n ? ''\n : lineStyle\n .map(function(v) {\n return getMarkupValue(v, size, scale);\n })\n .join(',');\n var opacity = markup.opacity || 1;\n return {\n 'stroke-linecap': lineCap,\n 'stroke-linejoin': lineJoin,\n 'stroke-width': strokeWidth || 0,\n 'stroke-dasharray': dashes,\n stroke: stroke,\n fill: fill,\n opacity: opacity\n };\n };\n\n var isDefined = function isDefined(value) {\n return value != null;\n };\n\n var getMarkupRect = function getMarkupRect(rect, size) {\n var scalar =\n arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n var left =\n getMarkupValue(rect.x, size, scalar, 'width') ||\n getMarkupValue(rect.left, size, scalar, 'width');\n var top =\n getMarkupValue(rect.y, size, scalar, 'height') ||\n getMarkupValue(rect.top, size, scalar, 'height');\n var width = getMarkupValue(rect.width, size, scalar, 'width');\n var height = getMarkupValue(rect.height, size, scalar, 'height');\n var right = getMarkupValue(rect.right, size, scalar, 'width');\n var bottom = getMarkupValue(rect.bottom, size, scalar, 'height');\n\n if (!isDefined(top)) {\n if (isDefined(height) && isDefined(bottom)) {\n top = size.height - height - bottom;\n } else {\n top = bottom;\n }\n }\n\n if (!isDefined(left)) {\n if (isDefined(width) && isDefined(right)) {\n left = size.width - width - right;\n } else {\n left = right;\n }\n }\n\n if (!isDefined(width)) {\n if (isDefined(left) && isDefined(right)) {\n width = size.width - left - right;\n } else {\n width = 0;\n }\n }\n\n if (!isDefined(height)) {\n if (isDefined(top) && isDefined(bottom)) {\n height = size.height - top - bottom;\n } else {\n height = 0;\n }\n }\n\n return {\n x: left || 0,\n y: top || 0,\n width: width || 0,\n height: height || 0\n };\n };\n\n var pointsToPathShape = function pointsToPathShape(points) {\n return points\n .map(function(point, index) {\n return ''\n .concat(index === 0 ? 'M' : 'L', ' ')\n .concat(point.x, ' ')\n .concat(point.y);\n })\n .join(' ');\n };\n\n var setAttributes = function setAttributes(element, attr) {\n return Object.keys(attr).forEach(function(key) {\n return element.setAttribute(key, attr[key]);\n });\n };\n\n var ns = 'http://www.w3.org/2000/svg';\n var svg = function svg(tag, attr) {\n var element = document.createElementNS(ns, tag);\n if (attr) {\n setAttributes(element, attr);\n }\n return element;\n };\n\n var updateRect = function updateRect(element) {\n return setAttributes(\n element,\n Object.assign({}, element.rect, element.styles)\n );\n };\n\n var updateEllipse = function updateEllipse(element) {\n var cx = element.rect.x + element.rect.width * 0.5;\n var cy = element.rect.y + element.rect.height * 0.5;\n var rx = element.rect.width * 0.5;\n var ry = element.rect.height * 0.5;\n return setAttributes(\n element,\n Object.assign(\n {\n cx: cx,\n cy: cy,\n rx: rx,\n ry: ry\n },\n element.styles\n )\n );\n };\n\n var IMAGE_FIT_STYLE = {\n contain: 'xMidYMid meet',\n cover: 'xMidYMid slice'\n };\n\n var updateImage = function updateImage(element, markup) {\n setAttributes(\n element,\n Object.assign({}, element.rect, element.styles, {\n preserveAspectRatio: IMAGE_FIT_STYLE[markup.fit] || 'none'\n })\n );\n };\n\n var TEXT_ANCHOR = {\n left: 'start',\n center: 'middle',\n right: 'end'\n };\n\n var updateText = function updateText(element, markup, size, scale) {\n var fontSize = getMarkupValue(markup.fontSize, size, scale);\n var fontFamily = markup.fontFamily || 'sans-serif';\n var fontWeight = markup.fontWeight || 'normal';\n var textAlign = TEXT_ANCHOR[markup.textAlign] || 'start';\n\n setAttributes(\n element,\n Object.assign({}, element.rect, element.styles, {\n 'stroke-width': 0,\n 'font-weight': fontWeight,\n 'font-size': fontSize,\n 'font-family': fontFamily,\n 'text-anchor': textAlign\n })\n );\n\n // update text\n if (element.text !== markup.text) {\n element.text = markup.text;\n element.textContent = markup.text.length ? markup.text : ' ';\n }\n };\n\n var updateLine = function updateLine(element, markup, size, scale) {\n setAttributes(\n element,\n Object.assign({}, element.rect, element.styles, {\n fill: 'none'\n })\n );\n\n var line = element.childNodes[0];\n var begin = element.childNodes[1];\n var end = element.childNodes[2];\n\n var origin = element.rect;\n\n var target = {\n x: element.rect.x + element.rect.width,\n y: element.rect.y + element.rect.height\n };\n\n setAttributes(line, {\n x1: origin.x,\n y1: origin.y,\n x2: target.x,\n y2: target.y\n });\n\n if (!markup.lineDecoration) return;\n\n begin.style.display = 'none';\n end.style.display = 'none';\n\n var v = vectorNormalize({\n x: target.x - origin.x,\n y: target.y - origin.y\n });\n\n var l = getMarkupValue(0.05, size, scale);\n\n if (markup.lineDecoration.indexOf('arrow-begin') !== -1) {\n var arrowBeginRotationPoint = vectorMultiply(v, l);\n var arrowBeginCenter = vectorAdd(origin, arrowBeginRotationPoint);\n var arrowBeginA = vectorRotate(origin, 2, arrowBeginCenter);\n var arrowBeginB = vectorRotate(origin, -2, arrowBeginCenter);\n\n setAttributes(begin, {\n style: 'display:block;',\n d: 'M'\n .concat(arrowBeginA.x, ',')\n .concat(arrowBeginA.y, ' L')\n .concat(origin.x, ',')\n .concat(origin.y, ' L')\n .concat(arrowBeginB.x, ',')\n .concat(arrowBeginB.y)\n });\n }\n\n if (markup.lineDecoration.indexOf('arrow-end') !== -1) {\n var arrowEndRotationPoint = vectorMultiply(v, -l);\n var arrowEndCenter = vectorAdd(target, arrowEndRotationPoint);\n var arrowEndA = vectorRotate(target, 2, arrowEndCenter);\n var arrowEndB = vectorRotate(target, -2, arrowEndCenter);\n\n setAttributes(end, {\n style: 'display:block;',\n d: 'M'\n .concat(arrowEndA.x, ',')\n .concat(arrowEndA.y, ' L')\n .concat(target.x, ',')\n .concat(target.y, ' L')\n .concat(arrowEndB.x, ',')\n .concat(arrowEndB.y)\n });\n }\n };\n\n var updatePath = function updatePath(element, markup, size, scale) {\n setAttributes(\n element,\n Object.assign({}, element.styles, {\n fill: 'none',\n d: pointsToPathShape(\n markup.points.map(function(point) {\n return {\n x: getMarkupValue(point.x, size, scale, 'width'),\n y: getMarkupValue(point.y, size, scale, 'height')\n };\n })\n )\n })\n );\n };\n\n var createShape = function createShape(node) {\n return function(markup) {\n return svg(node, { id: markup.id });\n };\n };\n\n var createImage = function createImage(markup) {\n var shape = svg('image', {\n id: markup.id,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round',\n opacity: '0'\n });\n\n shape.onload = function() {\n shape.setAttribute('opacity', markup.opacity || 1);\n };\n shape.setAttributeNS(\n 'http://www.w3.org/1999/xlink',\n 'xlink:href',\n markup.src\n );\n return shape;\n };\n\n var createLine = function createLine(markup) {\n var shape = svg('g', {\n id: markup.id,\n 'stroke-linecap': 'round',\n 'stroke-linejoin': 'round'\n });\n\n var line = svg('line');\n shape.appendChild(line);\n\n var begin = svg('path');\n shape.appendChild(begin);\n\n var end = svg('path');\n shape.appendChild(end);\n\n return shape;\n };\n\n var CREATE_TYPE_ROUTES = {\n image: createImage,\n rect: createShape('rect'),\n ellipse: createShape('ellipse'),\n text: createShape('text'),\n path: createShape('path'),\n line: createLine\n };\n\n var UPDATE_TYPE_ROUTES = {\n rect: updateRect,\n ellipse: updateEllipse,\n image: updateImage,\n text: updateText,\n path: updatePath,\n line: updateLine\n };\n\n var createMarkupByType = function createMarkupByType(type, markup) {\n return CREATE_TYPE_ROUTES[type](markup);\n };\n\n var updateMarkupByType = function updateMarkupByType(\n element,\n type,\n markup,\n size,\n scale\n ) {\n if (type !== 'path') {\n element.rect = getMarkupRect(markup, size, scale);\n }\n element.styles = getMarkupStyles(markup, size, scale);\n UPDATE_TYPE_ROUTES[type](element, markup, size, scale);\n };\n\n var MARKUP_RECT = [\n 'x',\n 'y',\n 'left',\n 'top',\n 'right',\n 'bottom',\n 'width',\n 'height'\n ];\n\n var toOptionalFraction = function toOptionalFraction(value) {\n return typeof value === 'string' && /%/.test(value)\n ? parseFloat(value) / 100\n : value;\n };\n\n // adds default markup properties, clones markup\n var prepareMarkup = function prepareMarkup(markup) {\n var _markup = _slicedToArray(markup, 2),\n type = _markup[0],\n props = _markup[1];\n\n var rect = props.points\n ? {}\n : MARKUP_RECT.reduce(function(prev, curr) {\n prev[curr] = toOptionalFraction(props[curr]);\n return prev;\n }, {});\n\n return [\n type,\n Object.assign(\n {\n zIndex: 0\n },\n props,\n rect\n )\n ];\n };\n\n var sortMarkupByZIndex = function sortMarkupByZIndex(a, b) {\n if (a[1].zIndex > b[1].zIndex) {\n return 1;\n }\n if (a[1].zIndex < b[1].zIndex) {\n return -1;\n }\n return 0;\n };\n\n var createMarkupView = function createMarkupView(_) {\n return _.utils.createView({\n name: 'image-preview-markup',\n tag: 'svg',\n ignoreRect: true,\n mixins: {\n apis: ['width', 'height', 'crop', 'markup', 'resize', 'dirty']\n },\n\n write: function write(_ref) {\n var root = _ref.root,\n props = _ref.props;\n\n if (!props.dirty) return;\n var crop = props.crop,\n resize = props.resize,\n markup = props.markup;\n\n var viewWidth = props.width;\n var viewHeight = props.height;\n\n var cropWidth = crop.width;\n var cropHeight = crop.height;\n\n if (resize) {\n var _size = resize.size;\n\n var outputWidth = _size && _size.width;\n var outputHeight = _size && _size.height;\n var outputFit = resize.mode;\n var outputUpscale = resize.upscale;\n\n if (outputWidth && !outputHeight) outputHeight = outputWidth;\n if (outputHeight && !outputWidth) outputWidth = outputHeight;\n\n var shouldUpscale =\n cropWidth < outputWidth && cropHeight < outputHeight;\n\n if (!shouldUpscale || (shouldUpscale && outputUpscale)) {\n var scalarWidth = outputWidth / cropWidth;\n var scalarHeight = outputHeight / cropHeight;\n\n if (outputFit === 'force') {\n cropWidth = outputWidth;\n cropHeight = outputHeight;\n } else {\n var scalar;\n if (outputFit === 'cover') {\n scalar = Math.max(scalarWidth, scalarHeight);\n } else if (outputFit === 'contain') {\n scalar = Math.min(scalarWidth, scalarHeight);\n }\n cropWidth = cropWidth * scalar;\n cropHeight = cropHeight * scalar;\n }\n }\n }\n\n var size = {\n width: viewWidth,\n height: viewHeight\n };\n\n root.element.setAttribute('width', size.width);\n root.element.setAttribute('height', size.height);\n\n var scale = Math.min(viewWidth / cropWidth, viewHeight / cropHeight);\n\n // clear\n root.element.innerHTML = '';\n\n // get filter\n var markupFilter = root.query('GET_IMAGE_PREVIEW_MARKUP_FILTER');\n\n // draw new\n markup\n .filter(markupFilter)\n .map(prepareMarkup)\n .sort(sortMarkupByZIndex)\n .forEach(function(markup) {\n var _markup = _slicedToArray(markup, 2),\n type = _markup[0],\n settings = _markup[1];\n\n // create\n var element = createMarkupByType(type, settings);\n\n // update\n updateMarkupByType(element, type, settings, size, scale);\n\n // add\n root.element.appendChild(element);\n });\n }\n });\n };\n\n var createVector$1 = function createVector(x, y) {\n return { x: x, y: y };\n };\n\n var vectorDot = function vectorDot(a, b) {\n return a.x * b.x + a.y * b.y;\n };\n\n var vectorSubtract = function vectorSubtract(a, b) {\n return createVector$1(a.x - b.x, a.y - b.y);\n };\n\n var vectorDistanceSquared = function vectorDistanceSquared(a, b) {\n return vectorDot(vectorSubtract(a, b), vectorSubtract(a, b));\n };\n\n var vectorDistance = function vectorDistance(a, b) {\n return Math.sqrt(vectorDistanceSquared(a, b));\n };\n\n var getOffsetPointOnEdge = function getOffsetPointOnEdge(length, rotation) {\n var a = length;\n\n var A = 1.5707963267948966;\n var B = rotation;\n var C = 1.5707963267948966 - rotation;\n\n var sinA = Math.sin(A);\n var sinB = Math.sin(B);\n var sinC = Math.sin(C);\n var cosC = Math.cos(C);\n var ratio = a / sinA;\n var b = ratio * sinB;\n var c = ratio * sinC;\n\n return createVector$1(cosC * b, cosC * c);\n };\n\n var getRotatedRectSize = function getRotatedRectSize(rect, rotation) {\n var w = rect.width;\n var h = rect.height;\n\n var hor = getOffsetPointOnEdge(w, rotation);\n var ver = getOffsetPointOnEdge(h, rotation);\n\n var tl = createVector$1(rect.x + Math.abs(hor.x), rect.y - Math.abs(hor.y));\n\n var tr = createVector$1(\n rect.x + rect.width + Math.abs(ver.y),\n rect.y + Math.abs(ver.x)\n );\n\n var bl = createVector$1(\n rect.x - Math.abs(ver.y),\n rect.y + rect.height - Math.abs(ver.x)\n );\n\n return {\n width: vectorDistance(tl, tr),\n height: vectorDistance(tl, bl)\n };\n };\n\n var calculateCanvasSize = function calculateCanvasSize(\n image,\n canvasAspectRatio\n ) {\n var zoom =\n arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;\n\n var imageAspectRatio = image.height / image.width;\n\n // determine actual pixels on x and y axis\n var canvasWidth = 1;\n var canvasHeight = canvasAspectRatio;\n var imgWidth = 1;\n var imgHeight = imageAspectRatio;\n if (imgHeight > canvasHeight) {\n imgHeight = canvasHeight;\n imgWidth = imgHeight / imageAspectRatio;\n }\n\n var scalar = Math.max(canvasWidth / imgWidth, canvasHeight / imgHeight);\n var width = image.width / (zoom * scalar * imgWidth);\n var height = width * canvasAspectRatio;\n\n return {\n width: width,\n height: height\n };\n };\n\n var getImageRectZoomFactor = function getImageRectZoomFactor(\n imageRect,\n cropRect,\n rotation,\n center\n ) {\n // calculate available space round image center position\n var cx = center.x > 0.5 ? 1 - center.x : center.x;\n var cy = center.y > 0.5 ? 1 - center.y : center.y;\n var imageWidth = cx * 2 * imageRect.width;\n var imageHeight = cy * 2 * imageRect.height;\n\n // calculate rotated crop rectangle size\n var rotatedCropSize = getRotatedRectSize(cropRect, rotation);\n\n // calculate scalar required to fit image\n return Math.max(\n rotatedCropSize.width / imageWidth,\n rotatedCropSize.height / imageHeight\n );\n };\n\n var getCenteredCropRect = function getCenteredCropRect(\n container,\n aspectRatio\n ) {\n var width = container.width;\n var height = width * aspectRatio;\n if (height > container.height) {\n height = container.height;\n width = height / aspectRatio;\n }\n var x = (container.width - width) * 0.5;\n var y = (container.height - height) * 0.5;\n\n return {\n x: x,\n y: y,\n width: width,\n height: height\n };\n };\n\n var getCurrentCropSize = function getCurrentCropSize(imageSize) {\n var crop =\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var zoom = crop.zoom,\n rotation = crop.rotation,\n center = crop.center,\n aspectRatio = crop.aspectRatio;\n\n if (!aspectRatio) aspectRatio = imageSize.height / imageSize.width;\n\n var canvasSize = calculateCanvasSize(imageSize, aspectRatio, zoom);\n\n var canvasCenter = {\n x: canvasSize.width * 0.5,\n y: canvasSize.height * 0.5\n };\n\n var stage = {\n x: 0,\n y: 0,\n width: canvasSize.width,\n height: canvasSize.height,\n center: canvasCenter\n };\n\n var shouldLimit = typeof crop.scaleToFit === 'undefined' || crop.scaleToFit;\n\n var stageZoomFactor = getImageRectZoomFactor(\n imageSize,\n getCenteredCropRect(stage, aspectRatio),\n rotation,\n shouldLimit ? center : { x: 0.5, y: 0.5 }\n );\n\n var scale = zoom * stageZoomFactor;\n\n // start drawing\n return {\n widthFloat: canvasSize.width / scale,\n heightFloat: canvasSize.height / scale,\n width: Math.round(canvasSize.width / scale),\n height: Math.round(canvasSize.height / scale)\n };\n };\n\n var IMAGE_SCALE_SPRING_PROPS = {\n type: 'spring',\n stiffness: 0.5,\n damping: 0.45,\n mass: 10\n };\n\n // does horizontal and vertical flipping\n var createBitmapView = function createBitmapView(_) {\n return _.utils.createView({\n name: 'image-bitmap',\n ignoreRect: true,\n mixins: { styles: ['scaleX', 'scaleY'] },\n create: function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n root.appendChild(props.image);\n }\n });\n };\n\n // shifts and rotates image\n var createImageCanvasWrapper = function createImageCanvasWrapper(_) {\n return _.utils.createView({\n name: 'image-canvas-wrapper',\n tag: 'div',\n ignoreRect: true,\n mixins: {\n apis: ['crop', 'width', 'height'],\n\n styles: [\n 'originX',\n 'originY',\n 'translateX',\n 'translateY',\n 'scaleX',\n 'scaleY',\n 'rotateZ'\n ],\n\n animations: {\n originX: IMAGE_SCALE_SPRING_PROPS,\n originY: IMAGE_SCALE_SPRING_PROPS,\n scaleX: IMAGE_SCALE_SPRING_PROPS,\n scaleY: IMAGE_SCALE_SPRING_PROPS,\n translateX: IMAGE_SCALE_SPRING_PROPS,\n translateY: IMAGE_SCALE_SPRING_PROPS,\n rotateZ: IMAGE_SCALE_SPRING_PROPS\n }\n },\n\n create: function create(_ref2) {\n var root = _ref2.root,\n props = _ref2.props;\n props.width = props.image.width;\n props.height = props.image.height;\n root.ref.bitmap = root.appendChildView(\n root.createChildView(createBitmapView(_), { image: props.image })\n );\n },\n write: function write(_ref3) {\n var root = _ref3.root,\n props = _ref3.props;\n var flip = props.crop.flip;\n var bitmap = root.ref.bitmap;\n bitmap.scaleX = flip.horizontal ? -1 : 1;\n bitmap.scaleY = flip.vertical ? -1 : 1;\n }\n });\n };\n\n // clips canvas to correct aspect ratio\n var createClipView = function createClipView(_) {\n return _.utils.createView({\n name: 'image-clip',\n tag: 'div',\n ignoreRect: true,\n mixins: {\n apis: [\n 'crop',\n 'markup',\n 'resize',\n 'width',\n 'height',\n 'dirty',\n 'background'\n ],\n\n styles: ['width', 'height', 'opacity'],\n animations: {\n opacity: { type: 'tween', duration: 250 }\n }\n },\n\n didWriteView: function didWriteView(_ref4) {\n var root = _ref4.root,\n props = _ref4.props;\n if (!props.background) return;\n root.element.style.backgroundColor = props.background;\n },\n create: function create(_ref5) {\n var root = _ref5.root,\n props = _ref5.props;\n\n root.ref.image = root.appendChildView(\n root.createChildView(\n createImageCanvasWrapper(_),\n Object.assign({}, props)\n )\n );\n\n root.ref.createMarkup = function() {\n if (root.ref.markup) return;\n root.ref.markup = root.appendChildView(\n root.createChildView(createMarkupView(_), Object.assign({}, props))\n );\n };\n\n root.ref.destroyMarkup = function() {\n if (!root.ref.markup) return;\n root.removeChildView(root.ref.markup);\n root.ref.markup = null;\n };\n\n // set up transparency grid\n var transparencyIndicator = root.query(\n 'GET_IMAGE_PREVIEW_TRANSPARENCY_INDICATOR'\n );\n if (transparencyIndicator === null) return;\n\n // grid pattern\n if (transparencyIndicator === 'grid') {\n root.element.dataset.transparencyIndicator = transparencyIndicator;\n }\n // basic color\n else {\n root.element.dataset.transparencyIndicator = 'color';\n }\n },\n write: function write(_ref6) {\n var root = _ref6.root,\n props = _ref6.props,\n shouldOptimize = _ref6.shouldOptimize;\n var crop = props.crop,\n markup = props.markup,\n resize = props.resize,\n dirty = props.dirty,\n width = props.width,\n height = props.height;\n\n root.ref.image.crop = crop;\n\n var stage = {\n x: 0,\n y: 0,\n width: width,\n height: height,\n center: {\n x: width * 0.5,\n y: height * 0.5\n }\n };\n\n var image = {\n width: root.ref.image.width,\n height: root.ref.image.height\n };\n\n var origin = {\n x: crop.center.x * image.width,\n y: crop.center.y * image.height\n };\n\n var translation = {\n x: stage.center.x - image.width * crop.center.x,\n y: stage.center.y - image.height * crop.center.y\n };\n\n var rotation = Math.PI * 2 + (crop.rotation % (Math.PI * 2));\n\n var cropAspectRatio = crop.aspectRatio || image.height / image.width;\n\n var shouldLimit =\n typeof crop.scaleToFit === 'undefined' || crop.scaleToFit;\n\n var stageZoomFactor = getImageRectZoomFactor(\n image,\n getCenteredCropRect(stage, cropAspectRatio),\n\n rotation,\n shouldLimit ? crop.center : { x: 0.5, y: 0.5 }\n );\n\n var scale = crop.zoom * stageZoomFactor;\n\n // update markup view\n if (markup && markup.length) {\n root.ref.createMarkup();\n root.ref.markup.width = width;\n root.ref.markup.height = height;\n root.ref.markup.resize = resize;\n root.ref.markup.dirty = dirty;\n root.ref.markup.markup = markup;\n root.ref.markup.crop = getCurrentCropSize(image, crop);\n } else if (root.ref.markup) {\n root.ref.destroyMarkup();\n }\n\n // update image view\n var imageView = root.ref.image;\n\n // don't update clip layout\n if (shouldOptimize) {\n imageView.originX = null;\n imageView.originY = null;\n imageView.translateX = null;\n imageView.translateY = null;\n imageView.rotateZ = null;\n imageView.scaleX = null;\n imageView.scaleY = null;\n return;\n }\n\n imageView.originX = origin.x;\n imageView.originY = origin.y;\n imageView.translateX = translation.x;\n imageView.translateY = translation.y;\n imageView.rotateZ = rotation;\n imageView.scaleX = scale;\n imageView.scaleY = scale;\n }\n });\n };\n\n var createImageView = function createImageView(_) {\n return _.utils.createView({\n name: 'image-preview',\n tag: 'div',\n ignoreRect: true,\n mixins: {\n apis: ['image', 'crop', 'markup', 'resize', 'dirty', 'background'],\n\n styles: ['translateY', 'scaleX', 'scaleY', 'opacity'],\n\n animations: {\n scaleX: IMAGE_SCALE_SPRING_PROPS,\n scaleY: IMAGE_SCALE_SPRING_PROPS,\n translateY: IMAGE_SCALE_SPRING_PROPS,\n opacity: { type: 'tween', duration: 400 }\n }\n },\n\n create: function create(_ref7) {\n var root = _ref7.root,\n props = _ref7.props;\n root.ref.clip = root.appendChildView(\n root.createChildView(createClipView(_), {\n id: props.id,\n image: props.image,\n crop: props.crop,\n markup: props.markup,\n resize: props.resize,\n dirty: props.dirty,\n background: props.background\n })\n );\n },\n write: function write(_ref8) {\n var root = _ref8.root,\n props = _ref8.props,\n shouldOptimize = _ref8.shouldOptimize;\n var clip = root.ref.clip;\n var image = props.image,\n crop = props.crop,\n markup = props.markup,\n resize = props.resize,\n dirty = props.dirty;\n\n clip.crop = crop;\n clip.markup = markup;\n clip.resize = resize;\n clip.dirty = dirty;\n\n // don't update clip layout\n clip.opacity = shouldOptimize ? 0 : 1;\n\n // don't re-render if optimizing or hidden (width will be zero resulting in weird animations)\n if (shouldOptimize || root.rect.element.hidden) return;\n\n // calculate scaled preview image size\n var imageAspectRatio = image.height / image.width;\n var aspectRatio = crop.aspectRatio || imageAspectRatio;\n\n // calculate container size\n var containerWidth = root.rect.inner.width;\n var containerHeight = root.rect.inner.height;\n\n var fixedPreviewHeight = root.query('GET_IMAGE_PREVIEW_HEIGHT');\n var minPreviewHeight = root.query('GET_IMAGE_PREVIEW_MIN_HEIGHT');\n var maxPreviewHeight = root.query('GET_IMAGE_PREVIEW_MAX_HEIGHT');\n\n var panelAspectRatio = root.query('GET_PANEL_ASPECT_RATIO');\n var allowMultiple = root.query('GET_ALLOW_MULTIPLE');\n\n if (panelAspectRatio && !allowMultiple) {\n fixedPreviewHeight = containerWidth * panelAspectRatio;\n aspectRatio = panelAspectRatio;\n }\n\n // determine clip width and height\n var clipHeight =\n fixedPreviewHeight !== null\n ? fixedPreviewHeight\n : Math.max(\n minPreviewHeight,\n Math.min(containerWidth * aspectRatio, maxPreviewHeight)\n );\n\n var clipWidth = clipHeight / aspectRatio;\n if (clipWidth > containerWidth) {\n clipWidth = containerWidth;\n clipHeight = clipWidth * aspectRatio;\n }\n\n if (clipHeight > containerHeight) {\n clipHeight = containerHeight;\n clipWidth = containerHeight / aspectRatio;\n }\n\n clip.width = clipWidth;\n clip.height = clipHeight;\n }\n });\n };\n\n var SVG_MASK =\n '<svg width=\"500\" height=\"200\" viewBox=\"0 0 500 200\" preserveAspectRatio=\"none\">\\n <defs>\\n <radialGradient id=\"gradient-__UID__\" cx=\".5\" cy=\"1.25\" r=\"1.15\">\\n <stop offset=\\'50%\\' stop-color=\\'#000000\\'/>\\n <stop offset=\\'56%\\' stop-color=\\'#0a0a0a\\'/>\\n <stop offset=\\'63%\\' stop-color=\\'#262626\\'/>\\n <stop offset=\\'69%\\' stop-color=\\'#4f4f4f\\'/>\\n <stop offset=\\'75%\\' stop-color=\\'#808080\\'/>\\n <stop offset=\\'81%\\' stop-color=\\'#b1b1b1\\'/>\\n <stop offset=\\'88%\\' stop-color=\\'#dadada\\'/>\\n <stop offset=\\'94%\\' stop-color=\\'#f6f6f6\\'/>\\n <stop offset=\\'100%\\' stop-color=\\'#ffffff\\'/>\\n </radialGradient>\\n <mask id=\"mask-__UID__\">\\n <rect x=\"0\" y=\"0\" width=\"500\" height=\"200\" fill=\"url(#gradient-__UID__)\"></rect>\\n </mask>\\n </defs>\\n <rect x=\"0\" width=\"500\" height=\"200\" fill=\"currentColor\" mask=\"url(#mask-__UID__)\"></rect>\\n</svg>';\n\n var SVGMaskUniqueId = 0;\n\n var createImageOverlayView = function createImageOverlayView(fpAPI) {\n return fpAPI.utils.createView({\n name: 'image-preview-overlay',\n tag: 'div',\n ignoreRect: true,\n create: function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n var mask = SVG_MASK;\n if (document.querySelector('base')) {\n var url = new URL(\n window.location.href.replace(window.location.hash, '')\n ).href;\n mask = mask.replace(/url\\(\\#/g, 'url(' + url + '#');\n }\n\n SVGMaskUniqueId++;\n root.element.classList.add(\n 'filepond--image-preview-overlay-'.concat(props.status)\n );\n\n root.element.innerHTML = mask.replace(/__UID__/g, SVGMaskUniqueId);\n },\n mixins: {\n styles: ['opacity'],\n animations: {\n opacity: { type: 'spring', mass: 25 }\n }\n }\n });\n };\n\n /**\n * Bitmap Worker\n */\n var BitmapWorker = function BitmapWorker() {\n self.onmessage = function(e) {\n createImageBitmap(e.data.message.file).then(function(bitmap) {\n self.postMessage({ id: e.data.id, message: bitmap }, [bitmap]);\n });\n };\n };\n\n /**\n * ColorMatrix Worker\n */\n var ColorMatrixWorker = function ColorMatrixWorker() {\n self.onmessage = function(e) {\n var imageData = e.data.message.imageData;\n var matrix = e.data.message.colorMatrix;\n\n var data = imageData.data;\n var l = data.length;\n\n var m11 = matrix[0];\n var m12 = matrix[1];\n var m13 = matrix[2];\n var m14 = matrix[3];\n var m15 = matrix[4];\n\n var m21 = matrix[5];\n var m22 = matrix[6];\n var m23 = matrix[7];\n var m24 = matrix[8];\n var m25 = matrix[9];\n\n var m31 = matrix[10];\n var m32 = matrix[11];\n var m33 = matrix[12];\n var m34 = matrix[13];\n var m35 = matrix[14];\n\n var m41 = matrix[15];\n var m42 = matrix[16];\n var m43 = matrix[17];\n var m44 = matrix[18];\n var m45 = matrix[19];\n\n var index = 0,\n r = 0.0,\n g = 0.0,\n b = 0.0,\n a = 0.0;\n\n for (; index < l; index += 4) {\n r = data[index] / 255;\n g = data[index + 1] / 255;\n b = data[index + 2] / 255;\n a = data[index + 3] / 255;\n data[index] = Math.max(\n 0,\n Math.min((r * m11 + g * m12 + b * m13 + a * m14 + m15) * 255, 255)\n );\n data[index + 1] = Math.max(\n 0,\n Math.min((r * m21 + g * m22 + b * m23 + a * m24 + m25) * 255, 255)\n );\n data[index + 2] = Math.max(\n 0,\n Math.min((r * m31 + g * m32 + b * m33 + a * m34 + m35) * 255, 255)\n );\n data[index + 3] = Math.max(\n 0,\n Math.min((r * m41 + g * m42 + b * m43 + a * m44 + m45) * 255, 255)\n );\n }\n\n self.postMessage({ id: e.data.id, message: imageData }, [\n imageData.data.buffer\n ]);\n };\n };\n\n var getImageSize = function getImageSize(url, cb) {\n var image = new Image();\n image.onload = function() {\n var width = image.naturalWidth;\n var height = image.naturalHeight;\n image = null;\n cb(width, height);\n };\n image.src = url;\n };\n\n var transforms = {\n 1: function _() {\n return [1, 0, 0, 1, 0, 0];\n },\n 2: function _(width) {\n return [-1, 0, 0, 1, width, 0];\n },\n 3: function _(width, height) {\n return [-1, 0, 0, -1, width, height];\n },\n 4: function _(width, height) {\n return [1, 0, 0, -1, 0, height];\n },\n 5: function _() {\n return [0, 1, 1, 0, 0, 0];\n },\n 6: function _(width, height) {\n return [0, 1, -1, 0, height, 0];\n },\n 7: function _(width, height) {\n return [0, -1, -1, 0, height, width];\n },\n 8: function _(width) {\n return [0, -1, 1, 0, 0, width];\n }\n };\n\n var fixImageOrientation = function fixImageOrientation(\n ctx,\n width,\n height,\n orientation\n ) {\n // no orientation supplied\n if (orientation === -1) {\n return;\n }\n\n ctx.transform.apply(ctx, transforms[orientation](width, height));\n };\n\n // draws the preview image to canvas\n var createPreviewImage = function createPreviewImage(\n data,\n width,\n height,\n orientation\n ) {\n // can't draw on half pixels\n width = Math.round(width);\n height = Math.round(height);\n\n // draw image\n var canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n var ctx = canvas.getContext('2d');\n\n // if is rotated incorrectly swap width and height\n if (orientation >= 5 && orientation <= 8) {\n var _ref = [height, width];\n width = _ref[0];\n height = _ref[1];\n }\n\n // correct image orientation\n fixImageOrientation(ctx, width, height, orientation);\n\n // draw the image\n ctx.drawImage(data, 0, 0, width, height);\n\n return canvas;\n };\n\n var isBitmap = function isBitmap(file) {\n return /^image/.test(file.type) && !/svg/.test(file.type);\n };\n\n var MAX_WIDTH = 10;\n var MAX_HEIGHT = 10;\n\n var calculateAverageColor = function calculateAverageColor(image) {\n var scalar = Math.min(MAX_WIDTH / image.width, MAX_HEIGHT / image.height);\n\n var canvas = document.createElement('canvas');\n var ctx = canvas.getContext('2d');\n var width = (canvas.width = Math.ceil(image.width * scalar));\n var height = (canvas.height = Math.ceil(image.height * scalar));\n ctx.drawImage(image, 0, 0, width, height);\n var data = null;\n try {\n data = ctx.getImageData(0, 0, width, height).data;\n } catch (e) {\n return null;\n }\n var l = data.length;\n\n var r = 0;\n var g = 0;\n var b = 0;\n var i = 0;\n\n for (; i < l; i += 4) {\n r += data[i] * data[i];\n g += data[i + 1] * data[i + 1];\n b += data[i + 2] * data[i + 2];\n }\n\n r = averageColor(r, l);\n g = averageColor(g, l);\n b = averageColor(b, l);\n\n return { r: r, g: g, b: b };\n };\n\n var averageColor = function averageColor(c, l) {\n return Math.floor(Math.sqrt(c / (l / 4)));\n };\n\n var cloneCanvas = function cloneCanvas(origin, target) {\n target = target || document.createElement('canvas');\n target.width = origin.width;\n target.height = origin.height;\n var ctx = target.getContext('2d');\n ctx.drawImage(origin, 0, 0);\n return target;\n };\n\n var cloneImageData = function cloneImageData(imageData) {\n var id;\n try {\n id = new ImageData(imageData.width, imageData.height);\n } catch (e) {\n var canvas = document.createElement('canvas');\n var ctx = canvas.getContext('2d');\n id = ctx.createImageData(imageData.width, imageData.height);\n }\n id.data.set(new Uint8ClampedArray(imageData.data));\n return id;\n };\n\n var loadImage = function loadImage(url) {\n return new Promise(function(resolve, reject) {\n var img = new Image();\n img.crossOrigin = 'Anonymous';\n img.onload = function() {\n resolve(img);\n };\n img.onerror = function(e) {\n reject(e);\n };\n img.src = url;\n });\n };\n\n var createImageWrapperView = function createImageWrapperView(_) {\n // create overlay view\n var OverlayView = createImageOverlayView(_);\n\n var ImageView = createImageView(_);\n var createWorker = _.utils.createWorker;\n\n var applyFilter = function applyFilter(root, filter, target) {\n return new Promise(function(resolve) {\n // will store image data for future filter updates\n if (!root.ref.imageData) {\n root.ref.imageData = target\n .getContext('2d')\n .getImageData(0, 0, target.width, target.height);\n }\n\n // get image data reference\n var imageData = cloneImageData(root.ref.imageData);\n\n if (!filter || filter.length !== 20) {\n target.getContext('2d').putImageData(imageData, 0, 0);\n return resolve();\n }\n\n var worker = createWorker(ColorMatrixWorker);\n worker.post(\n {\n imageData: imageData,\n colorMatrix: filter\n },\n\n function(response) {\n // apply filtered colors\n target.getContext('2d').putImageData(response, 0, 0);\n\n // stop worker\n worker.terminate();\n\n // done!\n resolve();\n },\n [imageData.data.buffer]\n );\n });\n };\n\n var removeImageView = function removeImageView(root, imageView) {\n root.removeChildView(imageView);\n imageView.image.width = 1;\n imageView.image.height = 1;\n imageView._destroy();\n };\n\n // remove an image\n var shiftImage = function shiftImage(_ref) {\n var root = _ref.root;\n var imageView = root.ref.images.shift();\n imageView.opacity = 0;\n imageView.translateY = -15;\n root.ref.imageViewBin.push(imageView);\n return imageView;\n };\n\n // add new image\n var pushImage = function pushImage(_ref2) {\n var root = _ref2.root,\n props = _ref2.props,\n image = _ref2.image;\n var id = props.id;\n var item = root.query('GET_ITEM', { id: id });\n if (!item) return;\n\n var crop = item.getMetadata('crop') || {\n center: {\n x: 0.5,\n y: 0.5\n },\n\n flip: {\n horizontal: false,\n vertical: false\n },\n\n zoom: 1,\n rotation: 0,\n aspectRatio: null\n };\n\n var background = root.query(\n 'GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR'\n );\n\n var markup;\n var resize;\n var dirty = false;\n if (root.query('GET_IMAGE_PREVIEW_MARKUP_SHOW')) {\n markup = item.getMetadata('markup') || [];\n resize = item.getMetadata('resize');\n dirty = true;\n }\n\n // append image presenter\n var imageView = root.appendChildView(\n root.createChildView(ImageView, {\n id: id,\n image: image,\n crop: crop,\n resize: resize,\n markup: markup,\n dirty: dirty,\n background: background,\n opacity: 0,\n scaleX: 1.15,\n scaleY: 1.15,\n translateY: 15\n }),\n\n root.childViews.length\n );\n\n root.ref.images.push(imageView);\n\n // reveal the preview image\n imageView.opacity = 1;\n imageView.scaleX = 1;\n imageView.scaleY = 1;\n imageView.translateY = 0;\n\n // the preview is now ready to be drawn\n setTimeout(function() {\n root.dispatch('DID_IMAGE_PREVIEW_SHOW', { id: id });\n }, 250);\n };\n\n var updateImage = function updateImage(_ref3) {\n var root = _ref3.root,\n props = _ref3.props;\n var item = root.query('GET_ITEM', { id: props.id });\n if (!item) return;\n var imageView = root.ref.images[root.ref.images.length - 1];\n imageView.crop = item.getMetadata('crop');\n imageView.background = root.query(\n 'GET_IMAGE_TRANSFORM_CANVAS_BACKGROUND_COLOR'\n );\n\n if (root.query('GET_IMAGE_PREVIEW_MARKUP_SHOW')) {\n imageView.dirty = true;\n imageView.resize = item.getMetadata('resize');\n imageView.markup = item.getMetadata('markup');\n }\n };\n\n // replace image preview\n var didUpdateItemMetadata = function didUpdateItemMetadata(_ref4) {\n var root = _ref4.root,\n props = _ref4.props,\n action = _ref4.action;\n // only filter and crop trigger redraw\n if (!/crop|filter|markup|resize/.test(action.change.key)) return;\n\n // no images to update, exit\n if (!root.ref.images.length) return;\n\n // no item found, exit\n var item = root.query('GET_ITEM', { id: props.id });\n if (!item) return;\n\n // for now, update existing image when filtering\n if (/filter/.test(action.change.key)) {\n var imageView = root.ref.images[root.ref.images.length - 1];\n applyFilter(root, action.change.value, imageView.image);\n return;\n }\n\n if (/crop|markup|resize/.test(action.change.key)) {\n var crop = item.getMetadata('crop');\n var image = root.ref.images[root.ref.images.length - 1];\n\n // if aspect ratio has changed, we need to create a new image\n if (\n crop &&\n crop.aspectRatio &&\n image.crop &&\n image.crop.aspectRatio &&\n Math.abs(crop.aspectRatio - image.crop.aspectRatio) > 0.00001\n ) {\n var _imageView = shiftImage({ root: root });\n pushImage({\n root: root,\n props: props,\n image: cloneCanvas(_imageView.image)\n });\n }\n // if not, we can update the current image\n else {\n updateImage({ root: root, props: props });\n }\n }\n };\n\n var canCreateImageBitmap = function canCreateImageBitmap(file) {\n // Firefox versions before 58 will freeze when running createImageBitmap\n // in a Web Worker so we detect those versions and return false for support\n var userAgent = window.navigator.userAgent;\n var isFirefox = userAgent.match(/Firefox\\/([0-9]+)\\./);\n var firefoxVersion = isFirefox ? parseInt(isFirefox[1]) : null;\n if (firefoxVersion <= 58) return false;\n\n return 'createImageBitmap' in window && isBitmap(file);\n };\n\n /**\n * Write handler for when preview container has been created\n */\n var didCreatePreviewContainer = function didCreatePreviewContainer(_ref5) {\n var root = _ref5.root,\n props = _ref5.props;\n var id = props.id;\n\n // we need to get the file data to determine the eventual image size\n var item = root.query('GET_ITEM', id);\n if (!item) return;\n\n // get url to file (we'll revoke it later on when done)\n var fileURL = URL.createObjectURL(item.file);\n\n // determine image size of this item\n getImageSize(fileURL, function(width, height) {\n // we can now scale the panel to the final size\n root.dispatch('DID_IMAGE_PREVIEW_CALCULATE_SIZE', {\n id: id,\n width: width,\n height: height\n });\n });\n };\n\n var drawPreview = function drawPreview(_ref6) {\n var root = _ref6.root,\n props = _ref6.props;\n var id = props.id;\n\n // we need to get the file data to determine the eventual image size\n var item = root.query('GET_ITEM', id);\n if (!item) return;\n\n // get url to file (we'll revoke it later on when done)\n var fileURL = URL.createObjectURL(item.file);\n\n // fallback\n var loadPreviewFallback = function loadPreviewFallback() {\n // let's scale the image in the main thread :(\n loadImage(fileURL).then(previewImageLoaded);\n };\n\n // image is now ready\n var previewImageLoaded = function previewImageLoaded(imageData) {\n // the file url is no longer needed\n URL.revokeObjectURL(fileURL);\n\n // draw the scaled down version here and use that as source so bitmapdata can be closed\n // orientation info\n var exif = item.getMetadata('exif') || {};\n var orientation = exif.orientation || -1;\n\n // get width and height from action, and swap if orientation is incorrect\n var width = imageData.width,\n height = imageData.height;\n\n // if no width or height, just return early.\n if (!width || !height) return;\n\n if (orientation >= 5 && orientation <= 8) {\n var _ref7 = [height, width];\n width = _ref7[0];\n height = _ref7[1];\n }\n\n // scale canvas based on pixel density\n // we multiply by .75 as that creates smaller but still clear images on screens with high res displays\n var pixelDensityFactor = Math.max(1, window.devicePixelRatio * 0.75);\n\n // we want as much pixels to work with as possible,\n // this multiplies the minimum image resolution,\n // so when zooming in it doesn't get too blurry\n var zoomFactor = root.query('GET_IMAGE_PREVIEW_ZOOM_FACTOR');\n\n // imaeg scale factor\n var scaleFactor = zoomFactor * pixelDensityFactor;\n\n // calculate scaled preview image size\n var previewImageRatio = height / width;\n\n // calculate image preview height and width\n var previewContainerWidth = root.rect.element.width;\n var previewContainerHeight = root.rect.element.height;\n\n var imageWidth = previewContainerWidth;\n var imageHeight = imageWidth * previewImageRatio;\n\n if (previewImageRatio > 1) {\n imageWidth = Math.min(width, previewContainerWidth * scaleFactor);\n imageHeight = imageWidth * previewImageRatio;\n } else {\n imageHeight = Math.min(height, previewContainerHeight * scaleFactor);\n imageWidth = imageHeight / previewImageRatio;\n }\n\n // transfer to image tag so no canvas memory wasted on iOS\n var previewImage = createPreviewImage(\n imageData,\n imageWidth,\n imageHeight,\n orientation\n );\n\n // done\n var done = function done() {\n // calculate average image color, disabled for now\n var averageColor = root.query(\n 'GET_IMAGE_PREVIEW_CALCULATE_AVERAGE_IMAGE_COLOR'\n )\n ? calculateAverageColor(data)\n : null;\n item.setMetadata('color', averageColor, true);\n\n // data has been transferred to canvas ( if was ImageBitmap )\n if ('close' in imageData) {\n imageData.close();\n }\n\n // show the overlay\n root.ref.overlayShadow.opacity = 1;\n\n // create the first image\n pushImage({ root: root, props: props, image: previewImage });\n };\n\n // apply filter\n var filter = item.getMetadata('filter');\n if (filter) {\n applyFilter(root, filter, previewImage).then(done);\n } else {\n done();\n }\n };\n\n // if we support scaling using createImageBitmap we use a worker\n if (canCreateImageBitmap(item.file)) {\n // let's scale the image in a worker\n var worker = createWorker(BitmapWorker);\n\n worker.post(\n {\n file: item.file\n },\n\n function(imageBitmap) {\n // destroy worker\n worker.terminate();\n\n // no bitmap returned, must be something wrong,\n // try the oldschool way\n if (!imageBitmap) {\n loadPreviewFallback();\n return;\n }\n\n // yay we got our bitmap, let's continue showing the preview\n previewImageLoaded(imageBitmap);\n }\n );\n } else {\n // create fallback preview\n loadPreviewFallback();\n }\n };\n\n /**\n * Write handler for when the preview image is ready to be animated\n */\n var didDrawPreview = function didDrawPreview(_ref8) {\n var root = _ref8.root;\n // get last added image\n var image = root.ref.images[root.ref.images.length - 1];\n image.translateY = 0;\n image.scaleX = 1.0;\n image.scaleY = 1.0;\n image.opacity = 1;\n };\n\n /**\n * Write handler for when the preview has been loaded\n */\n var restoreOverlay = function restoreOverlay(_ref9) {\n var root = _ref9.root;\n root.ref.overlayShadow.opacity = 1;\n root.ref.overlayError.opacity = 0;\n root.ref.overlaySuccess.opacity = 0;\n };\n\n var didThrowError = function didThrowError(_ref10) {\n var root = _ref10.root;\n root.ref.overlayShadow.opacity = 0.25;\n root.ref.overlayError.opacity = 1;\n };\n\n var didCompleteProcessing = function didCompleteProcessing(_ref11) {\n var root = _ref11.root;\n root.ref.overlayShadow.opacity = 0.25;\n root.ref.overlaySuccess.opacity = 1;\n };\n\n /**\n * Constructor\n */\n var create = function create(_ref12) {\n var root = _ref12.root;\n // image view\n root.ref.images = [];\n\n // the preview image data (we need this to filter the image)\n root.ref.imageData = null;\n\n // image bin\n root.ref.imageViewBin = [];\n\n // image overlays\n root.ref.overlayShadow = root.appendChildView(\n root.createChildView(OverlayView, {\n opacity: 0,\n status: 'idle'\n })\n );\n\n root.ref.overlaySuccess = root.appendChildView(\n root.createChildView(OverlayView, {\n opacity: 0,\n status: 'success'\n })\n );\n\n root.ref.overlayError = root.appendChildView(\n root.createChildView(OverlayView, {\n opacity: 0,\n status: 'failure'\n })\n );\n };\n\n return _.utils.createView({\n name: 'image-preview-wrapper',\n create: create,\n styles: ['height'],\n apis: ['height'],\n destroy: function destroy(_ref13) {\n var root = _ref13.root;\n // we resize the image so memory on iOS 12 is released more quickly (it seems)\n root.ref.images.forEach(function(imageView) {\n imageView.image.width = 1;\n imageView.image.height = 1;\n });\n },\n didWriteView: function didWriteView(_ref14) {\n var root = _ref14.root;\n root.ref.images.forEach(function(imageView) {\n imageView.dirty = false;\n });\n },\n write: _.utils.createRoute(\n {\n // image preview stated\n DID_IMAGE_PREVIEW_DRAW: didDrawPreview,\n DID_IMAGE_PREVIEW_CONTAINER_CREATE: didCreatePreviewContainer,\n DID_FINISH_CALCULATE_PREVIEWSIZE: drawPreview,\n DID_UPDATE_ITEM_METADATA: didUpdateItemMetadata,\n\n // file states\n DID_THROW_ITEM_LOAD_ERROR: didThrowError,\n DID_THROW_ITEM_PROCESSING_ERROR: didThrowError,\n DID_THROW_ITEM_INVALID: didThrowError,\n DID_COMPLETE_ITEM_PROCESSING: didCompleteProcessing,\n DID_START_ITEM_PROCESSING: restoreOverlay,\n DID_REVERT_ITEM_PROCESSING: restoreOverlay\n },\n\n function(_ref15) {\n var root = _ref15.root;\n // views on death row\n var viewsToRemove = root.ref.imageViewBin.filter(function(imageView) {\n return imageView.opacity === 0;\n });\n\n // views to retain\n root.ref.imageViewBin = root.ref.imageViewBin.filter(function(\n imageView\n ) {\n return imageView.opacity > 0;\n });\n\n // remove these views\n viewsToRemove.forEach(function(imageView) {\n return removeImageView(root, imageView);\n });\n viewsToRemove.length = 0;\n }\n )\n });\n };\n\n /**\n * Image Preview Plugin\n */\n var plugin = function plugin(fpAPI) {\n var addFilter = fpAPI.addFilter,\n utils = fpAPI.utils;\n var Type = utils.Type,\n createRoute = utils.createRoute,\n isFile = utils.isFile;\n\n // imagePreviewView\n var imagePreviewView = createImageWrapperView(fpAPI);\n\n // called for each view that is created right after the 'create' method\n addFilter('CREATE_VIEW', function(viewAPI) {\n // get reference to created view\n var is = viewAPI.is,\n view = viewAPI.view,\n query = viewAPI.query;\n\n // only hook up to item view and only if is enabled for this cropper\n if (!is('file') || !query('GET_ALLOW_IMAGE_PREVIEW')) return;\n\n // create the image preview plugin, but only do so if the item is an image\n var didLoadItem = function didLoadItem(_ref) {\n var root = _ref.root,\n props = _ref.props;\n var id = props.id;\n var item = query('GET_ITEM', id);\n\n // item could theoretically have been removed in the mean time\n if (!item || !isFile(item.file) || item.archived) return;\n\n // get the file object\n var file = item.file;\n\n // exit if this is not an image\n if (!isPreviewableImage(file)) return;\n\n // test if is filtered\n if (!query('GET_IMAGE_PREVIEW_FILTER_ITEM')(item)) return;\n\n // exit if image size is too high and no createImageBitmap support\n // this would simply bring the browser to its knees and that is not what we want\n var supportsCreateImageBitmap = 'createImageBitmap' in (window || {});\n var maxPreviewFileSize = query('GET_IMAGE_PREVIEW_MAX_FILE_SIZE');\n if (\n !supportsCreateImageBitmap &&\n maxPreviewFileSize &&\n file.size > maxPreviewFileSize\n )\n return;\n\n // set preview view\n root.ref.imagePreview = view.appendChildView(\n view.createChildView(imagePreviewView, { id: id })\n );\n\n // update height if is fixed\n var fixedPreviewHeight = root.query('GET_IMAGE_PREVIEW_HEIGHT');\n if (fixedPreviewHeight) {\n root.dispatch('DID_UPDATE_PANEL_HEIGHT', {\n id: item.id,\n height: fixedPreviewHeight\n });\n }\n\n // now ready\n var queue =\n !supportsCreateImageBitmap &&\n file.size > query('GET_IMAGE_PREVIEW_MAX_INSTANT_PREVIEW_FILE_SIZE');\n root.dispatch('DID_IMAGE_PREVIEW_CONTAINER_CREATE', { id: id }, queue);\n };\n\n var rescaleItem = function rescaleItem(root, props) {\n if (!root.ref.imagePreview) return;\n var id = props.id;\n\n // get item\n var item = root.query('GET_ITEM', { id: id });\n if (!item) return;\n\n // if is fixed height or panel has aspect ratio, exit here, height has already been defined\n var panelAspectRatio = root.query('GET_PANEL_ASPECT_RATIO');\n var itemPanelAspectRatio = root.query('GET_ITEM_PANEL_ASPECT_RATIO');\n var fixedHeight = root.query('GET_IMAGE_PREVIEW_HEIGHT');\n if (panelAspectRatio || itemPanelAspectRatio || fixedHeight) return;\n\n // no data!\n var _root$ref = root.ref,\n imageWidth = _root$ref.imageWidth,\n imageHeight = _root$ref.imageHeight;\n if (!imageWidth || !imageHeight) return;\n\n // get height min and max\n var minPreviewHeight = root.query('GET_IMAGE_PREVIEW_MIN_HEIGHT');\n var maxPreviewHeight = root.query('GET_IMAGE_PREVIEW_MAX_HEIGHT');\n\n // orientation info\n var exif = item.getMetadata('exif') || {};\n var orientation = exif.orientation || -1;\n\n // get width and height from action, and swap of orientation is incorrect\n if (orientation >= 5 && orientation <= 8) {\n var _ref2 = [imageHeight, imageWidth];\n imageWidth = _ref2[0];\n imageHeight = _ref2[1];\n }\n\n // scale up width and height when we're dealing with an SVG\n if (!isBitmap(item.file) || root.query('GET_IMAGE_PREVIEW_UPSCALE')) {\n var scalar = 2048 / imageWidth;\n imageWidth *= scalar;\n imageHeight *= scalar;\n }\n\n // image aspect ratio\n var imageAspectRatio = imageHeight / imageWidth;\n\n // we need the item to get to the crop size\n var previewAspectRatio =\n (item.getMetadata('crop') || {}).aspectRatio || imageAspectRatio;\n\n // preview height range\n var previewHeightMax = Math.max(\n minPreviewHeight,\n Math.min(imageHeight, maxPreviewHeight)\n );\n\n var itemWidth = root.rect.element.width;\n var previewHeight = Math.min(\n itemWidth * previewAspectRatio,\n previewHeightMax\n );\n\n // request update to panel height\n root.dispatch('DID_UPDATE_PANEL_HEIGHT', {\n id: item.id,\n height: previewHeight\n });\n };\n\n var didResizeView = function didResizeView(_ref3) {\n var root = _ref3.root;\n // actions in next write operation\n root.ref.shouldRescale = true;\n };\n\n var didUpdateItemMetadata = function didUpdateItemMetadata(_ref4) {\n var root = _ref4.root,\n action = _ref4.action;\n if (action.change.key !== 'crop') return;\n\n // actions in next write operation\n root.ref.shouldRescale = true;\n };\n\n var didCalculatePreviewSize = function didCalculatePreviewSize(_ref5) {\n var root = _ref5.root,\n action = _ref5.action;\n // remember dimensions\n root.ref.imageWidth = action.width;\n root.ref.imageHeight = action.height;\n\n // actions in next write operation\n root.ref.shouldRescale = true;\n root.ref.shouldDrawPreview = true;\n\n // as image load could take a while and fire when draw loop is resting we need to give it a kick\n root.dispatch('KICK');\n };\n\n // start writing\n view.registerWriter(\n createRoute(\n {\n DID_RESIZE_ROOT: didResizeView,\n DID_STOP_RESIZE: didResizeView,\n DID_LOAD_ITEM: didLoadItem,\n DID_IMAGE_PREVIEW_CALCULATE_SIZE: didCalculatePreviewSize,\n DID_UPDATE_ITEM_METADATA: didUpdateItemMetadata\n },\n\n function(_ref6) {\n var root = _ref6.root,\n props = _ref6.props;\n // no preview view attached\n if (!root.ref.imagePreview) return;\n\n // don't do anything while hidden\n if (root.rect.element.hidden) return;\n\n // resize the item panel\n if (root.ref.shouldRescale) {\n rescaleItem(root, props);\n root.ref.shouldRescale = false;\n }\n\n if (root.ref.shouldDrawPreview) {\n // queue till next frame so we're sure the height has been applied this forces the draw image call inside the wrapper view to use the correct height\n requestAnimationFrame(function() {\n // this requestAnimationFrame nesting is horrible but it fixes an issue with 100hz displays on Chrome\n // https://github.com/pqina/filepond-plugin-image-preview/issues/57\n requestAnimationFrame(function() {\n root.dispatch('DID_FINISH_CALCULATE_PREVIEWSIZE', {\n id: props.id\n });\n });\n });\n\n root.ref.shouldDrawPreview = false;\n }\n }\n )\n );\n });\n\n // expose plugin\n return {\n options: {\n // Enable or disable image preview\n allowImagePreview: [true, Type.BOOLEAN],\n\n // filters file items to determine which are shown as preview\n imagePreviewFilterItem: [\n function() {\n return true;\n },\n Type.FUNCTION\n ],\n\n // Fixed preview height\n imagePreviewHeight: [null, Type.INT],\n\n // Min image height\n imagePreviewMinHeight: [44, Type.INT],\n\n // Max image height\n imagePreviewMaxHeight: [256, Type.INT],\n\n // Max size of preview file for when createImageBitmap is not supported\n imagePreviewMaxFileSize: [null, Type.INT],\n\n // The amount of extra pixels added to the image preview to allow comfortable zooming\n imagePreviewZoomFactor: [2, Type.INT],\n\n // Should we upscale small images to fit the max bounding box of the preview area\n imagePreviewUpscale: [false, Type.BOOLEAN],\n\n // Max size of preview file that we allow to try to instant preview if createImageBitmap is not supported, else image is queued for loading\n imagePreviewMaxInstantPreviewFileSize: [1000000, Type.INT],\n\n // Style of the transparancy indicator used behind images\n imagePreviewTransparencyIndicator: [null, Type.STRING],\n\n // Enables or disables reading average image color\n imagePreviewCalculateAverageImageColor: [false, Type.BOOLEAN],\n\n // Enables or disables the previewing of markup\n imagePreviewMarkupShow: [true, Type.BOOLEAN],\n\n // Allows filtering of markup to only show certain shapes\n imagePreviewMarkupFilter: [\n function() {\n return true;\n },\n Type.FUNCTION\n ]\n }\n };\n };\n\n // fire pluginloaded event if running in browser, this allows registering the plugin when using async script tags\n var isBrowser =\n typeof window !== 'undefined' && typeof window.document !== 'undefined';\n if (isBrowser) {\n document.dispatchEvent(\n new CustomEvent('FilePond:pluginloaded', { detail: plugin })\n );\n }\n\n return plugin;\n});\n","/*!\n * FilePond 4.30.4\n * Licensed under MIT, https://opensource.org/licenses/MIT/\n * Please visit https://pqina.nl/filepond/ for details.\n */\n\n/* eslint-disable */\n\n(function(global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined'\n ? factory(exports)\n : typeof define === 'function' && define.amd\n ? define(['exports'], factory)\n : ((global = global || self), factory((global.FilePond = {})));\n})(this, function(exports) {\n 'use strict';\n\n var isNode = function isNode(value) {\n return value instanceof HTMLElement;\n };\n\n var createStore = function createStore(initialState) {\n var queries = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var actions = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n // internal state\n var state = Object.assign({}, initialState);\n\n // contains all actions for next frame, is clear when actions are requested\n var actionQueue = [];\n var dispatchQueue = [];\n\n // returns a duplicate of the current state\n var getState = function getState() {\n return Object.assign({}, state);\n };\n\n // returns a duplicate of the actions array and clears the actions array\n var processActionQueue = function processActionQueue() {\n // create copy of actions queue\n var queue = [].concat(actionQueue);\n\n // clear actions queue (we don't want no double actions)\n actionQueue.length = 0;\n\n return queue;\n };\n\n // processes actions that might block the main UI thread\n var processDispatchQueue = function processDispatchQueue() {\n // create copy of actions queue\n var queue = [].concat(dispatchQueue);\n\n // clear actions queue (we don't want no double actions)\n dispatchQueue.length = 0;\n\n // now dispatch these actions\n queue.forEach(function(_ref) {\n var type = _ref.type,\n data = _ref.data;\n dispatch(type, data);\n });\n };\n\n // adds a new action, calls its handler and\n var dispatch = function dispatch(type, data, isBlocking) {\n // is blocking action (should never block if document is hidden)\n if (isBlocking && !document.hidden) {\n dispatchQueue.push({ type: type, data: data });\n return;\n }\n\n // if this action has a handler, handle the action\n if (actionHandlers[type]) {\n actionHandlers[type](data);\n }\n\n // now add action\n actionQueue.push({\n type: type,\n data: data,\n });\n };\n\n var query = function query(str) {\n var _queryHandles;\n for (\n var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n return queryHandles[str]\n ? (_queryHandles = queryHandles)[str].apply(_queryHandles, args)\n : null;\n };\n\n var api = {\n getState: getState,\n processActionQueue: processActionQueue,\n processDispatchQueue: processDispatchQueue,\n dispatch: dispatch,\n query: query,\n };\n\n var queryHandles = {};\n queries.forEach(function(query) {\n queryHandles = Object.assign({}, query(state), {}, queryHandles);\n });\n\n var actionHandlers = {};\n actions.forEach(function(action) {\n actionHandlers = Object.assign({}, action(dispatch, query, state), {}, actionHandlers);\n });\n\n return api;\n };\n\n var defineProperty = function defineProperty(obj, property, definition) {\n if (typeof definition === 'function') {\n obj[property] = definition;\n return;\n }\n Object.defineProperty(obj, property, Object.assign({}, definition));\n };\n\n var forin = function forin(obj, cb) {\n for (var key in obj) {\n if (!obj.hasOwnProperty(key)) {\n continue;\n }\n\n cb(key, obj[key]);\n }\n };\n\n var createObject = function createObject(definition) {\n var obj = {};\n forin(definition, function(property) {\n defineProperty(obj, property, definition[property]);\n });\n return obj;\n };\n\n var attr = function attr(node, name) {\n var value = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n if (value === null) {\n return node.getAttribute(name) || node.hasAttribute(name);\n }\n node.setAttribute(name, value);\n };\n\n var ns = 'http://www.w3.org/2000/svg';\n var svgElements = ['svg', 'path']; // only svg elements used\n\n var isSVGElement = function isSVGElement(tag) {\n return svgElements.includes(tag);\n };\n\n var createElement = function createElement(tag, className) {\n var attributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n if (typeof className === 'object') {\n attributes = className;\n className = null;\n }\n var element = isSVGElement(tag)\n ? document.createElementNS(ns, tag)\n : document.createElement(tag);\n if (className) {\n if (isSVGElement(tag)) {\n attr(element, 'class', className);\n } else {\n element.className = className;\n }\n }\n forin(attributes, function(name, value) {\n attr(element, name, value);\n });\n return element;\n };\n\n var appendChild = function appendChild(parent) {\n return function(child, index) {\n if (typeof index !== 'undefined' && parent.children[index]) {\n parent.insertBefore(child, parent.children[index]);\n } else {\n parent.appendChild(child);\n }\n };\n };\n\n var appendChildView = function appendChildView(parent, childViews) {\n return function(view, index) {\n if (typeof index !== 'undefined') {\n childViews.splice(index, 0, view);\n } else {\n childViews.push(view);\n }\n\n return view;\n };\n };\n\n var removeChildView = function removeChildView(parent, childViews) {\n return function(view) {\n // remove from child views\n childViews.splice(childViews.indexOf(view), 1);\n\n // remove the element\n if (view.element.parentNode) {\n parent.removeChild(view.element);\n }\n\n return view;\n };\n };\n\n var IS_BROWSER = (function() {\n return typeof window !== 'undefined' && typeof window.document !== 'undefined';\n })();\n var isBrowser = function isBrowser() {\n return IS_BROWSER;\n };\n\n var testElement = isBrowser() ? createElement('svg') : {};\n var getChildCount =\n 'children' in testElement\n ? function(el) {\n return el.children.length;\n }\n : function(el) {\n return el.childNodes.length;\n };\n\n var getViewRect = function getViewRect(elementRect, childViews, offset, scale) {\n var left = offset[0] || elementRect.left;\n var top = offset[1] || elementRect.top;\n var right = left + elementRect.width;\n var bottom = top + elementRect.height * (scale[1] || 1);\n\n var rect = {\n // the rectangle of the element itself\n element: Object.assign({}, elementRect),\n\n // the rectangle of the element expanded to contain its children, does not include any margins\n inner: {\n left: elementRect.left,\n top: elementRect.top,\n right: elementRect.right,\n bottom: elementRect.bottom,\n },\n\n // the rectangle of the element expanded to contain its children including own margin and child margins\n // margins will be added after we've recalculated the size\n outer: {\n left: left,\n top: top,\n right: right,\n bottom: bottom,\n },\n };\n\n // expand rect to fit all child rectangles\n childViews\n .filter(function(childView) {\n return !childView.isRectIgnored();\n })\n .map(function(childView) {\n return childView.rect;\n })\n .forEach(function(childViewRect) {\n expandRect(rect.inner, Object.assign({}, childViewRect.inner));\n expandRect(rect.outer, Object.assign({}, childViewRect.outer));\n });\n\n // calculate inner width and height\n calculateRectSize(rect.inner);\n\n // append additional margin (top and left margins are included in top and left automatically)\n rect.outer.bottom += rect.element.marginBottom;\n rect.outer.right += rect.element.marginRight;\n\n // calculate outer width and height\n calculateRectSize(rect.outer);\n\n return rect;\n };\n\n var expandRect = function expandRect(parent, child) {\n // adjust for parent offset\n child.top += parent.top;\n child.right += parent.left;\n child.bottom += parent.top;\n child.left += parent.left;\n\n if (child.bottom > parent.bottom) {\n parent.bottom = child.bottom;\n }\n\n if (child.right > parent.right) {\n parent.right = child.right;\n }\n };\n\n var calculateRectSize = function calculateRectSize(rect) {\n rect.width = rect.right - rect.left;\n rect.height = rect.bottom - rect.top;\n };\n\n var isNumber = function isNumber(value) {\n return typeof value === 'number';\n };\n\n /**\n * Determines if position is at destination\n * @param position\n * @param destination\n * @param velocity\n * @param errorMargin\n * @returns {boolean}\n */\n var thereYet = function thereYet(position, destination, velocity) {\n var errorMargin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.001;\n return Math.abs(position - destination) < errorMargin && Math.abs(velocity) < errorMargin;\n };\n\n /**\n * Spring animation\n */\n var spring =\n // default options\n function spring() // method definition\n {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$stiffness = _ref.stiffness,\n stiffness = _ref$stiffness === void 0 ? 0.5 : _ref$stiffness,\n _ref$damping = _ref.damping,\n damping = _ref$damping === void 0 ? 0.75 : _ref$damping,\n _ref$mass = _ref.mass,\n mass = _ref$mass === void 0 ? 10 : _ref$mass;\n var target = null;\n var position = null;\n var velocity = 0;\n var resting = false;\n\n // updates spring state\n var interpolate = function interpolate(ts, skipToEndState) {\n // in rest, don't animate\n if (resting) return;\n\n // need at least a target or position to do springy things\n if (!(isNumber(target) && isNumber(position))) {\n resting = true;\n velocity = 0;\n return;\n }\n\n // calculate spring force\n var f = -(position - target) * stiffness;\n\n // update velocity by adding force based on mass\n velocity += f / mass;\n\n // update position by adding velocity\n position += velocity;\n\n // slow down based on amount of damping\n velocity *= damping;\n\n // we've arrived if we're near target and our velocity is near zero\n if (thereYet(position, target, velocity) || skipToEndState) {\n position = target;\n velocity = 0;\n resting = true;\n\n // we done\n api.onupdate(position);\n api.oncomplete(position);\n } else {\n // progress update\n api.onupdate(position);\n }\n };\n\n /**\n * Set new target value\n * @param value\n */\n var setTarget = function setTarget(value) {\n // if currently has no position, set target and position to this value\n if (isNumber(value) && !isNumber(position)) {\n position = value;\n }\n\n // next target value will not be animated to\n if (target === null) {\n target = value;\n position = value;\n }\n\n // let start moving to target\n target = value;\n\n // already at target\n if (position === target || typeof target === 'undefined') {\n // now resting as target is current position, stop moving\n resting = true;\n velocity = 0;\n\n // done!\n api.onupdate(position);\n api.oncomplete(position);\n\n return;\n }\n\n resting = false;\n };\n\n // need 'api' to call onupdate callback\n var api = createObject({\n interpolate: interpolate,\n target: {\n set: setTarget,\n get: function get() {\n return target;\n },\n },\n\n resting: {\n get: function get() {\n return resting;\n },\n },\n\n onupdate: function onupdate(value) {},\n oncomplete: function oncomplete(value) {},\n });\n\n return api;\n };\n\n var easeLinear = function easeLinear(t) {\n return t;\n };\n var easeInOutQuad = function easeInOutQuad(t) {\n return t < 0.5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n };\n\n var tween =\n // default values\n function tween() // method definition\n {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$duration = _ref.duration,\n duration = _ref$duration === void 0 ? 500 : _ref$duration,\n _ref$easing = _ref.easing,\n easing = _ref$easing === void 0 ? easeInOutQuad : _ref$easing,\n _ref$delay = _ref.delay,\n delay = _ref$delay === void 0 ? 0 : _ref$delay;\n var start = null;\n var t;\n var p;\n var resting = true;\n var reverse = false;\n var target = null;\n\n var interpolate = function interpolate(ts, skipToEndState) {\n if (resting || target === null) return;\n\n if (start === null) {\n start = ts;\n }\n\n if (ts - start < delay) return;\n\n t = ts - start - delay;\n\n if (t >= duration || skipToEndState) {\n t = 1;\n p = reverse ? 0 : 1;\n api.onupdate(p * target);\n api.oncomplete(p * target);\n resting = true;\n } else {\n p = t / duration;\n api.onupdate((t >= 0 ? easing(reverse ? 1 - p : p) : 0) * target);\n }\n };\n\n // need 'api' to call onupdate callback\n var api = createObject({\n interpolate: interpolate,\n target: {\n get: function get() {\n return reverse ? 0 : target;\n },\n set: function set(value) {\n // is initial value\n if (target === null) {\n target = value;\n api.onupdate(value);\n api.oncomplete(value);\n return;\n }\n\n // want to tween to a smaller value and have a current value\n if (value < target) {\n target = 1;\n reverse = true;\n } else {\n // not tweening to a smaller value\n reverse = false;\n target = value;\n }\n\n // let's go!\n resting = false;\n start = null;\n },\n },\n\n resting: {\n get: function get() {\n return resting;\n },\n },\n\n onupdate: function onupdate(value) {},\n oncomplete: function oncomplete(value) {},\n });\n\n return api;\n };\n\n var animator = {\n spring: spring,\n tween: tween,\n };\n\n /*\n { type: 'spring', stiffness: .5, damping: .75, mass: 10 };\n { translation: { type: 'spring', ... }, ... }\n { translation: { x: { type: 'spring', ... } } }\n */\n var createAnimator = function createAnimator(definition, category, property) {\n // default is single definition\n // we check if transform is set, if so, we check if property is set\n var def =\n definition[category] && typeof definition[category][property] === 'object'\n ? definition[category][property]\n : definition[category] || definition;\n\n var type = typeof def === 'string' ? def : def.type;\n var props = typeof def === 'object' ? Object.assign({}, def) : {};\n\n return animator[type] ? animator[type](props) : null;\n };\n\n var addGetSet = function addGetSet(keys, obj, props) {\n var overwrite = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n obj = Array.isArray(obj) ? obj : [obj];\n obj.forEach(function(o) {\n keys.forEach(function(key) {\n var name = key;\n var getter = function getter() {\n return props[key];\n };\n var setter = function setter(value) {\n return (props[key] = value);\n };\n\n if (typeof key === 'object') {\n name = key.key;\n getter = key.getter || getter;\n setter = key.setter || setter;\n }\n\n if (o[name] && !overwrite) {\n return;\n }\n\n o[name] = {\n get: getter,\n set: setter,\n };\n });\n });\n };\n\n // add to state,\n // add getters and setters to internal and external api (if not set)\n // setup animators\n\n var animations = function animations(_ref) {\n var mixinConfig = _ref.mixinConfig,\n viewProps = _ref.viewProps,\n viewInternalAPI = _ref.viewInternalAPI,\n viewExternalAPI = _ref.viewExternalAPI;\n // initial properties\n var initialProps = Object.assign({}, viewProps);\n\n // list of all active animations\n var animations = [];\n\n // setup animators\n forin(mixinConfig, function(property, animation) {\n var animator = createAnimator(animation);\n if (!animator) {\n return;\n }\n\n // when the animator updates, update the view state value\n animator.onupdate = function(value) {\n viewProps[property] = value;\n };\n\n // set animator target\n animator.target = initialProps[property];\n\n // when value is set, set the animator target value\n var prop = {\n key: property,\n setter: function setter(value) {\n // if already at target, we done!\n if (animator.target === value) {\n return;\n }\n\n animator.target = value;\n },\n getter: function getter() {\n return viewProps[property];\n },\n };\n\n // add getters and setters\n addGetSet([prop], [viewInternalAPI, viewExternalAPI], viewProps, true);\n\n // add it to the list for easy updating from the _write method\n animations.push(animator);\n });\n\n // expose internal write api\n return {\n write: function write(ts) {\n var skipToEndState = document.hidden;\n var resting = true;\n animations.forEach(function(animation) {\n if (!animation.resting) resting = false;\n animation.interpolate(ts, skipToEndState);\n });\n return resting;\n },\n destroy: function destroy() {},\n };\n };\n\n var addEvent = function addEvent(element) {\n return function(type, fn) {\n element.addEventListener(type, fn);\n };\n };\n\n var removeEvent = function removeEvent(element) {\n return function(type, fn) {\n element.removeEventListener(type, fn);\n };\n };\n\n // mixin\n var listeners = function listeners(_ref) {\n var mixinConfig = _ref.mixinConfig,\n viewProps = _ref.viewProps,\n viewInternalAPI = _ref.viewInternalAPI,\n viewExternalAPI = _ref.viewExternalAPI,\n viewState = _ref.viewState,\n view = _ref.view;\n var events = [];\n\n var add = addEvent(view.element);\n var remove = removeEvent(view.element);\n\n viewExternalAPI.on = function(type, fn) {\n events.push({\n type: type,\n fn: fn,\n });\n\n add(type, fn);\n };\n\n viewExternalAPI.off = function(type, fn) {\n events.splice(\n events.findIndex(function(event) {\n return event.type === type && event.fn === fn;\n }),\n 1\n );\n\n remove(type, fn);\n };\n\n return {\n write: function write() {\n // not busy\n return true;\n },\n destroy: function destroy() {\n events.forEach(function(event) {\n remove(event.type, event.fn);\n });\n },\n };\n };\n\n // add to external api and link to props\n\n var apis = function apis(_ref) {\n var mixinConfig = _ref.mixinConfig,\n viewProps = _ref.viewProps,\n viewExternalAPI = _ref.viewExternalAPI;\n addGetSet(mixinConfig, viewExternalAPI, viewProps);\n };\n\n var isDefined = function isDefined(value) {\n return value != null;\n };\n\n // add to state,\n // add getters and setters to internal and external api (if not set)\n // set initial state based on props in viewProps\n // apply as transforms each frame\n\n var defaults = {\n opacity: 1,\n scaleX: 1,\n scaleY: 1,\n translateX: 0,\n translateY: 0,\n rotateX: 0,\n rotateY: 0,\n rotateZ: 0,\n originX: 0,\n originY: 0,\n };\n\n var styles = function styles(_ref) {\n var mixinConfig = _ref.mixinConfig,\n viewProps = _ref.viewProps,\n viewInternalAPI = _ref.viewInternalAPI,\n viewExternalAPI = _ref.viewExternalAPI,\n view = _ref.view;\n // initial props\n var initialProps = Object.assign({}, viewProps);\n\n // current props\n var currentProps = {};\n\n // we will add those properties to the external API and link them to the viewState\n addGetSet(mixinConfig, [viewInternalAPI, viewExternalAPI], viewProps);\n\n // override rect on internal and external rect getter so it takes in account transforms\n var getOffset = function getOffset() {\n return [viewProps['translateX'] || 0, viewProps['translateY'] || 0];\n };\n\n var getScale = function getScale() {\n return [viewProps['scaleX'] || 0, viewProps['scaleY'] || 0];\n };\n var getRect = function getRect() {\n return view.rect\n ? getViewRect(view.rect, view.childViews, getOffset(), getScale())\n : null;\n };\n viewInternalAPI.rect = { get: getRect };\n viewExternalAPI.rect = { get: getRect };\n\n // apply view props\n mixinConfig.forEach(function(key) {\n viewProps[key] =\n typeof initialProps[key] === 'undefined' ? defaults[key] : initialProps[key];\n });\n\n // expose api\n return {\n write: function write() {\n // see if props have changed\n if (!propsHaveChanged(currentProps, viewProps)) {\n return;\n }\n\n // moves element to correct position on screen\n applyStyles(view.element, viewProps);\n\n // store new transforms\n Object.assign(currentProps, Object.assign({}, viewProps));\n\n // no longer busy\n return true;\n },\n destroy: function destroy() {},\n };\n };\n\n var propsHaveChanged = function propsHaveChanged(currentProps, newProps) {\n // different amount of keys\n if (Object.keys(currentProps).length !== Object.keys(newProps).length) {\n return true;\n }\n\n // lets analyze the individual props\n for (var prop in newProps) {\n if (newProps[prop] !== currentProps[prop]) {\n return true;\n }\n }\n\n return false;\n };\n\n var applyStyles = function applyStyles(element, _ref2) {\n var opacity = _ref2.opacity,\n perspective = _ref2.perspective,\n translateX = _ref2.translateX,\n translateY = _ref2.translateY,\n scaleX = _ref2.scaleX,\n scaleY = _ref2.scaleY,\n rotateX = _ref2.rotateX,\n rotateY = _ref2.rotateY,\n rotateZ = _ref2.rotateZ,\n originX = _ref2.originX,\n originY = _ref2.originY,\n width = _ref2.width,\n height = _ref2.height;\n\n var transforms = '';\n var styles = '';\n\n // handle transform origin\n if (isDefined(originX) || isDefined(originY)) {\n styles += 'transform-origin: ' + (originX || 0) + 'px ' + (originY || 0) + 'px;';\n }\n\n // transform order is relevant\n // 0. perspective\n if (isDefined(perspective)) {\n transforms += 'perspective(' + perspective + 'px) ';\n }\n\n // 1. translate\n if (isDefined(translateX) || isDefined(translateY)) {\n transforms +=\n 'translate3d(' + (translateX || 0) + 'px, ' + (translateY || 0) + 'px, 0) ';\n }\n\n // 2. scale\n if (isDefined(scaleX) || isDefined(scaleY)) {\n transforms +=\n 'scale3d(' +\n (isDefined(scaleX) ? scaleX : 1) +\n ', ' +\n (isDefined(scaleY) ? scaleY : 1) +\n ', 1) ';\n }\n\n // 3. rotate\n if (isDefined(rotateZ)) {\n transforms += 'rotateZ(' + rotateZ + 'rad) ';\n }\n\n if (isDefined(rotateX)) {\n transforms += 'rotateX(' + rotateX + 'rad) ';\n }\n\n if (isDefined(rotateY)) {\n transforms += 'rotateY(' + rotateY + 'rad) ';\n }\n\n // add transforms\n if (transforms.length) {\n styles += 'transform:' + transforms + ';';\n }\n\n // add opacity\n if (isDefined(opacity)) {\n styles += 'opacity:' + opacity + ';';\n\n // if we reach zero, we make the element inaccessible\n if (opacity === 0) {\n styles += 'visibility:hidden;';\n }\n\n // if we're below 100% opacity this element can't be clicked\n if (opacity < 1) {\n styles += 'pointer-events:none;';\n }\n }\n\n // add height\n if (isDefined(height)) {\n styles += 'height:' + height + 'px;';\n }\n\n // add width\n if (isDefined(width)) {\n styles += 'width:' + width + 'px;';\n }\n\n // apply styles\n var elementCurrentStyle = element.elementCurrentStyle || '';\n\n // if new styles does not match current styles, lets update!\n if (styles.length !== elementCurrentStyle.length || styles !== elementCurrentStyle) {\n element.style.cssText = styles;\n // store current styles so we can compare them to new styles later on\n // _not_ getting the style value is faster\n element.elementCurrentStyle = styles;\n }\n };\n\n var Mixins = {\n styles: styles,\n listeners: listeners,\n animations: animations,\n apis: apis,\n };\n\n var updateRect = function updateRect() {\n var rect = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var element = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var style = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n\n if (!element.layoutCalculated) {\n rect.paddingTop = parseInt(style.paddingTop, 10) || 0;\n rect.marginTop = parseInt(style.marginTop, 10) || 0;\n rect.marginRight = parseInt(style.marginRight, 10) || 0;\n rect.marginBottom = parseInt(style.marginBottom, 10) || 0;\n rect.marginLeft = parseInt(style.marginLeft, 10) || 0;\n element.layoutCalculated = true;\n }\n\n rect.left = element.offsetLeft || 0;\n rect.top = element.offsetTop || 0;\n rect.width = element.offsetWidth || 0;\n rect.height = element.offsetHeight || 0;\n\n rect.right = rect.left + rect.width;\n rect.bottom = rect.top + rect.height;\n\n rect.scrollTop = element.scrollTop;\n\n rect.hidden = element.offsetParent === null;\n\n return rect;\n };\n\n var createView =\n // default view definition\n function createView() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$tag = _ref.tag,\n tag = _ref$tag === void 0 ? 'div' : _ref$tag,\n _ref$name = _ref.name,\n name = _ref$name === void 0 ? null : _ref$name,\n _ref$attributes = _ref.attributes,\n attributes = _ref$attributes === void 0 ? {} : _ref$attributes,\n _ref$read = _ref.read,\n read = _ref$read === void 0 ? function() {} : _ref$read,\n _ref$write = _ref.write,\n write = _ref$write === void 0 ? function() {} : _ref$write,\n _ref$create = _ref.create,\n create = _ref$create === void 0 ? function() {} : _ref$create,\n _ref$destroy = _ref.destroy,\n destroy = _ref$destroy === void 0 ? function() {} : _ref$destroy,\n _ref$filterFrameActio = _ref.filterFrameActionsForChild,\n filterFrameActionsForChild =\n _ref$filterFrameActio === void 0\n ? function(child, actions) {\n return actions;\n }\n : _ref$filterFrameActio,\n _ref$didCreateView = _ref.didCreateView,\n didCreateView = _ref$didCreateView === void 0 ? function() {} : _ref$didCreateView,\n _ref$didWriteView = _ref.didWriteView,\n didWriteView = _ref$didWriteView === void 0 ? function() {} : _ref$didWriteView,\n _ref$ignoreRect = _ref.ignoreRect,\n ignoreRect = _ref$ignoreRect === void 0 ? false : _ref$ignoreRect,\n _ref$ignoreRectUpdate = _ref.ignoreRectUpdate,\n ignoreRectUpdate = _ref$ignoreRectUpdate === void 0 ? false : _ref$ignoreRectUpdate,\n _ref$mixins = _ref.mixins,\n mixins = _ref$mixins === void 0 ? [] : _ref$mixins;\n return function(\n // each view requires reference to store\n store\n ) {\n var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // root element should not be changed\n var element = createElement(tag, 'filepond--' + name, attributes);\n\n // style reference should also not be changed\n var style = window.getComputedStyle(element, null);\n\n // element rectangle\n var rect = updateRect();\n var frameRect = null;\n\n // rest state\n var isResting = false;\n\n // pretty self explanatory\n var childViews = [];\n\n // loaded mixins\n var activeMixins = [];\n\n // references to created children\n var ref = {};\n\n // state used for each instance\n var state = {};\n\n // list of writers that will be called to update this view\n var writers = [\n write, // default writer\n ];\n\n var readers = [\n read, // default reader\n ];\n\n var destroyers = [\n destroy, // default destroy\n ];\n\n // core view methods\n var getElement = function getElement() {\n return element;\n };\n var getChildViews = function getChildViews() {\n return childViews.concat();\n };\n var getReference = function getReference() {\n return ref;\n };\n var createChildView = function createChildView(store) {\n return function(view, props) {\n return view(store, props);\n };\n };\n var getRect = function getRect() {\n if (frameRect) {\n return frameRect;\n }\n frameRect = getViewRect(rect, childViews, [0, 0], [1, 1]);\n return frameRect;\n };\n var getStyle = function getStyle() {\n return style;\n };\n\n /**\n * Read data from DOM\n * @private\n */\n var _read = function _read() {\n frameRect = null;\n\n // read child views\n childViews.forEach(function(child) {\n return child._read();\n });\n\n var shouldUpdate = !(ignoreRectUpdate && rect.width && rect.height);\n if (shouldUpdate) {\n updateRect(rect, element, style);\n }\n\n // readers\n var api = { root: internalAPI, props: props, rect: rect };\n readers.forEach(function(reader) {\n return reader(api);\n });\n };\n\n /**\n * Write data to DOM\n * @private\n */\n var _write = function _write(ts, frameActions, shouldOptimize) {\n // if no actions, we assume that the view is resting\n var resting = frameActions.length === 0;\n\n // writers\n writers.forEach(function(writer) {\n var writerResting = writer({\n props: props,\n root: internalAPI,\n actions: frameActions,\n timestamp: ts,\n shouldOptimize: shouldOptimize,\n });\n\n if (writerResting === false) {\n resting = false;\n }\n });\n\n // run mixins\n activeMixins.forEach(function(mixin) {\n // if one of the mixins is still busy after write operation, we are not resting\n var mixinResting = mixin.write(ts);\n if (mixinResting === false) {\n resting = false;\n }\n });\n\n // updates child views that are currently attached to the DOM\n childViews\n .filter(function(child) {\n return !!child.element.parentNode;\n })\n .forEach(function(child) {\n // if a child view is not resting, we are not resting\n var childResting = child._write(\n ts,\n filterFrameActionsForChild(child, frameActions),\n shouldOptimize\n );\n\n if (!childResting) {\n resting = false;\n }\n });\n\n // append new elements to DOM and update those\n childViews\n //.filter(child => !child.element.parentNode)\n .forEach(function(child, index) {\n // skip\n if (child.element.parentNode) {\n return;\n }\n\n // append to DOM\n internalAPI.appendChild(child.element, index);\n\n // call read (need to know the size of these elements)\n child._read();\n\n // re-call write\n child._write(\n ts,\n filterFrameActionsForChild(child, frameActions),\n shouldOptimize\n );\n\n // we just added somthing to the dom, no rest\n resting = false;\n });\n\n // update resting state\n isResting = resting;\n\n didWriteView({\n props: props,\n root: internalAPI,\n actions: frameActions,\n timestamp: ts,\n });\n\n // let parent know if we are resting\n return resting;\n };\n\n var _destroy = function _destroy() {\n activeMixins.forEach(function(mixin) {\n return mixin.destroy();\n });\n destroyers.forEach(function(destroyer) {\n destroyer({ root: internalAPI, props: props });\n });\n childViews.forEach(function(child) {\n return child._destroy();\n });\n };\n\n // sharedAPI\n var sharedAPIDefinition = {\n element: {\n get: getElement,\n },\n\n style: {\n get: getStyle,\n },\n\n childViews: {\n get: getChildViews,\n },\n };\n\n // private API definition\n var internalAPIDefinition = Object.assign({}, sharedAPIDefinition, {\n rect: {\n get: getRect,\n },\n\n // access to custom children references\n ref: {\n get: getReference,\n },\n\n // dom modifiers\n is: function is(needle) {\n return name === needle;\n },\n appendChild: appendChild(element),\n createChildView: createChildView(store),\n linkView: function linkView(view) {\n childViews.push(view);\n return view;\n },\n unlinkView: function unlinkView(view) {\n childViews.splice(childViews.indexOf(view), 1);\n },\n appendChildView: appendChildView(element, childViews),\n removeChildView: removeChildView(element, childViews),\n registerWriter: function registerWriter(writer) {\n return writers.push(writer);\n },\n registerReader: function registerReader(reader) {\n return readers.push(reader);\n },\n registerDestroyer: function registerDestroyer(destroyer) {\n return destroyers.push(destroyer);\n },\n invalidateLayout: function invalidateLayout() {\n return (element.layoutCalculated = false);\n },\n\n // access to data store\n dispatch: store.dispatch,\n query: store.query,\n });\n\n // public view API methods\n var externalAPIDefinition = {\n element: {\n get: getElement,\n },\n\n childViews: {\n get: getChildViews,\n },\n\n rect: {\n get: getRect,\n },\n\n resting: {\n get: function get() {\n return isResting;\n },\n },\n\n isRectIgnored: function isRectIgnored() {\n return ignoreRect;\n },\n _read: _read,\n _write: _write,\n _destroy: _destroy,\n };\n\n // mixin API methods\n var mixinAPIDefinition = Object.assign({}, sharedAPIDefinition, {\n rect: {\n get: function get() {\n return rect;\n },\n },\n });\n\n // add mixin functionality\n Object.keys(mixins)\n .sort(function(a, b) {\n // move styles to the back of the mixin list (so adjustments of other mixins are applied to the props correctly)\n if (a === 'styles') {\n return 1;\n } else if (b === 'styles') {\n return -1;\n }\n return 0;\n })\n .forEach(function(key) {\n var mixinAPI = Mixins[key]({\n mixinConfig: mixins[key],\n viewProps: props,\n viewState: state,\n viewInternalAPI: internalAPIDefinition,\n viewExternalAPI: externalAPIDefinition,\n view: createObject(mixinAPIDefinition),\n });\n\n if (mixinAPI) {\n activeMixins.push(mixinAPI);\n }\n });\n\n // construct private api\n var internalAPI = createObject(internalAPIDefinition);\n\n // create the view\n create({\n root: internalAPI,\n props: props,\n });\n\n // append created child views to root node\n var childCount = getChildCount(element); // need to know the current child count so appending happens in correct order\n childViews.forEach(function(child, index) {\n internalAPI.appendChild(child.element, childCount + index);\n });\n\n // call did create\n didCreateView(internalAPI);\n\n // expose public api\n return createObject(externalAPIDefinition);\n };\n };\n\n var createPainter = function createPainter(read, write) {\n var fps = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60;\n\n var name = '__framePainter';\n\n // set global painter\n if (window[name]) {\n window[name].readers.push(read);\n window[name].writers.push(write);\n return;\n }\n\n window[name] = {\n readers: [read],\n writers: [write],\n };\n\n var painter = window[name];\n\n var interval = 1000 / fps;\n var last = null;\n var id = null;\n var requestTick = null;\n var cancelTick = null;\n\n var setTimerType = function setTimerType() {\n if (document.hidden) {\n requestTick = function requestTick() {\n return window.setTimeout(function() {\n return tick(performance.now());\n }, interval);\n };\n cancelTick = function cancelTick() {\n return window.clearTimeout(id);\n };\n } else {\n requestTick = function requestTick() {\n return window.requestAnimationFrame(tick);\n };\n cancelTick = function cancelTick() {\n return window.cancelAnimationFrame(id);\n };\n }\n };\n\n document.addEventListener('visibilitychange', function() {\n if (cancelTick) cancelTick();\n setTimerType();\n tick(performance.now());\n });\n\n var tick = function tick(ts) {\n // queue next tick\n id = requestTick(tick);\n\n // limit fps\n if (!last) {\n last = ts;\n }\n\n var delta = ts - last;\n\n if (delta <= interval) {\n // skip frame\n return;\n }\n\n // align next frame\n last = ts - (delta % interval);\n\n // update view\n painter.readers.forEach(function(read) {\n return read();\n });\n painter.writers.forEach(function(write) {\n return write(ts);\n });\n };\n\n setTimerType();\n tick(performance.now());\n\n return {\n pause: function pause() {\n cancelTick(id);\n },\n };\n };\n\n var createRoute = function createRoute(routes, fn) {\n return function(_ref) {\n var root = _ref.root,\n props = _ref.props,\n _ref$actions = _ref.actions,\n actions = _ref$actions === void 0 ? [] : _ref$actions,\n timestamp = _ref.timestamp,\n shouldOptimize = _ref.shouldOptimize;\n actions\n .filter(function(action) {\n return routes[action.type];\n })\n .forEach(function(action) {\n return routes[action.type]({\n root: root,\n props: props,\n action: action.data,\n timestamp: timestamp,\n shouldOptimize: shouldOptimize,\n });\n });\n\n if (fn) {\n fn({\n root: root,\n props: props,\n actions: actions,\n timestamp: timestamp,\n shouldOptimize: shouldOptimize,\n });\n }\n };\n };\n\n var insertBefore = function insertBefore(newNode, referenceNode) {\n return referenceNode.parentNode.insertBefore(newNode, referenceNode);\n };\n\n var insertAfter = function insertAfter(newNode, referenceNode) {\n return referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling);\n };\n\n var isArray = function isArray(value) {\n return Array.isArray(value);\n };\n\n var isEmpty = function isEmpty(value) {\n return value == null;\n };\n\n var trim = function trim(str) {\n return str.trim();\n };\n\n var toString = function toString(value) {\n return '' + value;\n };\n\n var toArray = function toArray(value) {\n var splitter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ',';\n if (isEmpty(value)) {\n return [];\n }\n if (isArray(value)) {\n return value;\n }\n return toString(value)\n .split(splitter)\n .map(trim)\n .filter(function(str) {\n return str.length;\n });\n };\n\n var isBoolean = function isBoolean(value) {\n return typeof value === 'boolean';\n };\n\n var toBoolean = function toBoolean(value) {\n return isBoolean(value) ? value : value === 'true';\n };\n\n var isString = function isString(value) {\n return typeof value === 'string';\n };\n\n var toNumber = function toNumber(value) {\n return isNumber(value)\n ? value\n : isString(value)\n ? toString(value).replace(/[a-z]+/gi, '')\n : 0;\n };\n\n var toInt = function toInt(value) {\n return parseInt(toNumber(value), 10);\n };\n\n var toFloat = function toFloat(value) {\n return parseFloat(toNumber(value));\n };\n\n var isInt = function isInt(value) {\n return isNumber(value) && isFinite(value) && Math.floor(value) === value;\n };\n\n var toBytes = function toBytes(value) {\n var base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n // is in bytes\n if (isInt(value)) {\n return value;\n }\n\n // is natural file size\n var naturalFileSize = toString(value).trim();\n\n // if is value in megabytes\n if (/MB$/i.test(naturalFileSize)) {\n naturalFileSize = naturalFileSize.replace(/MB$i/, '').trim();\n return toInt(naturalFileSize) * base * base;\n }\n\n // if is value in kilobytes\n if (/KB/i.test(naturalFileSize)) {\n naturalFileSize = naturalFileSize.replace(/KB$i/, '').trim();\n return toInt(naturalFileSize) * base;\n }\n\n return toInt(naturalFileSize);\n };\n\n var isFunction = function isFunction(value) {\n return typeof value === 'function';\n };\n\n var toFunctionReference = function toFunctionReference(string) {\n var ref = self;\n var levels = string.split('.');\n var level = null;\n while ((level = levels.shift())) {\n ref = ref[level];\n if (!ref) {\n return null;\n }\n }\n return ref;\n };\n\n var methods = {\n process: 'POST',\n patch: 'PATCH',\n revert: 'DELETE',\n fetch: 'GET',\n restore: 'GET',\n load: 'GET',\n };\n\n var createServerAPI = function createServerAPI(outline) {\n var api = {};\n\n api.url = isString(outline) ? outline : outline.url || '';\n api.timeout = outline.timeout ? parseInt(outline.timeout, 10) : 0;\n api.headers = outline.headers ? outline.headers : {};\n\n forin(methods, function(key) {\n api[key] = createAction(key, outline[key], methods[key], api.timeout, api.headers);\n });\n\n // remove process if no url or process on outline\n api.process = outline.process || isString(outline) || outline.url ? api.process : null;\n\n // special treatment for remove\n api.remove = outline.remove || null;\n\n // remove generic headers from api object\n delete api.headers;\n\n return api;\n };\n\n var createAction = function createAction(name, outline, method, timeout, headers) {\n // is explicitely set to null so disable\n if (outline === null) {\n return null;\n }\n\n // if is custom function, done! Dev handles everything.\n if (typeof outline === 'function') {\n return outline;\n }\n\n // build action object\n var action = {\n url: method === 'GET' || method === 'PATCH' ? '?' + name + '=' : '',\n method: method,\n headers: headers,\n withCredentials: false,\n timeout: timeout,\n onload: null,\n ondata: null,\n onerror: null,\n };\n\n // is a single url\n if (isString(outline)) {\n action.url = outline;\n return action;\n }\n\n // overwrite\n Object.assign(action, outline);\n\n // see if should reformat headers;\n if (isString(action.headers)) {\n var parts = action.headers.split(/:(.+)/);\n action.headers = {\n header: parts[0],\n value: parts[1],\n };\n }\n\n // if is bool withCredentials\n action.withCredentials = toBoolean(action.withCredentials);\n\n return action;\n };\n\n var toServerAPI = function toServerAPI(value) {\n return createServerAPI(value);\n };\n\n var isNull = function isNull(value) {\n return value === null;\n };\n\n var isObject = function isObject(value) {\n return typeof value === 'object' && value !== null;\n };\n\n var isAPI = function isAPI(value) {\n return (\n isObject(value) &&\n isString(value.url) &&\n isObject(value.process) &&\n isObject(value.revert) &&\n isObject(value.restore) &&\n isObject(value.fetch)\n );\n };\n\n var getType = function getType(value) {\n if (isArray(value)) {\n return 'array';\n }\n\n if (isNull(value)) {\n return 'null';\n }\n\n if (isInt(value)) {\n return 'int';\n }\n\n if (/^[0-9]+ ?(?:GB|MB|KB)$/gi.test(value)) {\n return 'bytes';\n }\n\n if (isAPI(value)) {\n return 'api';\n }\n\n return typeof value;\n };\n\n var replaceSingleQuotes = function replaceSingleQuotes(str) {\n return str\n .replace(/{\\s*'/g, '{\"')\n .replace(/'\\s*}/g, '\"}')\n .replace(/'\\s*:/g, '\":')\n .replace(/:\\s*'/g, ':\"')\n .replace(/,\\s*'/g, ',\"')\n .replace(/'\\s*,/g, '\",');\n };\n\n var conversionTable = {\n array: toArray,\n boolean: toBoolean,\n int: function int(value) {\n return getType(value) === 'bytes' ? toBytes(value) : toInt(value);\n },\n number: toFloat,\n float: toFloat,\n bytes: toBytes,\n string: function string(value) {\n return isFunction(value) ? value : toString(value);\n },\n function: function _function(value) {\n return toFunctionReference(value);\n },\n serverapi: toServerAPI,\n object: function object(value) {\n try {\n return JSON.parse(replaceSingleQuotes(value));\n } catch (e) {\n return null;\n }\n },\n };\n\n var convertTo = function convertTo(value, type) {\n return conversionTable[type](value);\n };\n\n var getValueByType = function getValueByType(newValue, defaultValue, valueType) {\n // can always assign default value\n if (newValue === defaultValue) {\n return newValue;\n }\n\n // get the type of the new value\n var newValueType = getType(newValue);\n\n // is valid type?\n if (newValueType !== valueType) {\n // is string input, let's attempt to convert\n var convertedValue = convertTo(newValue, valueType);\n\n // what is the type now\n newValueType = getType(convertedValue);\n\n // no valid conversions found\n if (convertedValue === null) {\n throw 'Trying to assign value with incorrect type to \"' +\n option +\n '\", allowed type: \"' +\n valueType +\n '\"';\n } else {\n newValue = convertedValue;\n }\n }\n\n // assign new value\n return newValue;\n };\n\n var createOption = function createOption(defaultValue, valueType) {\n var currentValue = defaultValue;\n return {\n enumerable: true,\n get: function get() {\n return currentValue;\n },\n set: function set(newValue) {\n currentValue = getValueByType(newValue, defaultValue, valueType);\n },\n };\n };\n\n var createOptions = function createOptions(options) {\n var obj = {};\n forin(options, function(prop) {\n var optionDefinition = options[prop];\n obj[prop] = createOption(optionDefinition[0], optionDefinition[1]);\n });\n return createObject(obj);\n };\n\n var createInitialState = function createInitialState(options) {\n return {\n // model\n items: [],\n\n // timeout used for calling update items\n listUpdateTimeout: null,\n\n // timeout used for stacking metadata updates\n itemUpdateTimeout: null,\n\n // queue of items waiting to be processed\n processingQueue: [],\n\n // options\n options: createOptions(options),\n };\n };\n\n var fromCamels = function fromCamels(string) {\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';\n return string\n .split(/(?=[A-Z])/)\n .map(function(part) {\n return part.toLowerCase();\n })\n .join(separator);\n };\n\n var createOptionAPI = function createOptionAPI(store, options) {\n var obj = {};\n forin(options, function(key) {\n obj[key] = {\n get: function get() {\n return store.getState().options[key];\n },\n set: function set(value) {\n store.dispatch('SET_' + fromCamels(key, '_').toUpperCase(), {\n value: value,\n });\n },\n };\n });\n return obj;\n };\n\n var createOptionActions = function createOptionActions(options) {\n return function(dispatch, query, state) {\n var obj = {};\n forin(options, function(key) {\n var name = fromCamels(key, '_').toUpperCase();\n\n obj['SET_' + name] = function(action) {\n try {\n state.options[key] = action.value;\n } catch (e) {} // nope, failed\n\n // we successfully set the value of this option\n dispatch('DID_SET_' + name, { value: state.options[key] });\n };\n });\n return obj;\n };\n };\n\n var createOptionQueries = function createOptionQueries(options) {\n return function(state) {\n var obj = {};\n forin(options, function(key) {\n obj['GET_' + fromCamels(key, '_').toUpperCase()] = function(action) {\n return state.options[key];\n };\n });\n return obj;\n };\n };\n\n var InteractionMethod = {\n API: 1,\n DROP: 2,\n BROWSE: 3,\n PASTE: 4,\n NONE: 5,\n };\n\n var getUniqueId = function getUniqueId() {\n return Math.random()\n .toString(36)\n .substring(2, 11);\n };\n\n function _typeof(obj) {\n if (typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol') {\n _typeof = function(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function(obj) {\n return obj &&\n typeof Symbol === 'function' &&\n obj.constructor === Symbol &&\n obj !== Symbol.prototype\n ? 'symbol'\n : typeof obj;\n };\n }\n\n return _typeof(obj);\n }\n\n var REACT_ELEMENT_TYPE;\n\n function _jsx(type, props, key, children) {\n if (!REACT_ELEMENT_TYPE) {\n REACT_ELEMENT_TYPE =\n (typeof Symbol === 'function' && Symbol['for'] && Symbol['for']('react.element')) ||\n 0xeac7;\n }\n\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n props = {\n children: void 0,\n };\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = new Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n }\n\n function _asyncIterator(iterable) {\n var method;\n\n if (typeof Symbol !== 'undefined') {\n if (Symbol.asyncIterator) {\n method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n\n if (Symbol.iterator) {\n method = iterable[Symbol.iterator];\n if (method != null) return method.call(iterable);\n }\n }\n\n throw new TypeError('Object is not async iterable');\n }\n\n function _AwaitValue(value) {\n this.wrapped = value;\n }\n\n function _AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function(resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null,\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg);\n var value = result.value;\n var wrappedAwait = value instanceof _AwaitValue;\n Promise.resolve(wrappedAwait ? value.wrapped : value).then(\n function(arg) {\n if (wrappedAwait) {\n resume('next', arg);\n return;\n }\n\n settle(result.done ? 'return' : 'normal', arg);\n },\n function(err) {\n resume('throw', err);\n }\n );\n } catch (err) {\n settle('throw', err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case 'return':\n front.resolve({\n value: value,\n done: true,\n });\n break;\n\n case 'throw':\n front.reject(value);\n break;\n\n default:\n front.resolve({\n value: value,\n done: false,\n });\n break;\n }\n\n front = front.next;\n\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n if (typeof gen.return !== 'function') {\n this.return = undefined;\n }\n }\n\n if (typeof Symbol === 'function' && Symbol.asyncIterator) {\n _AsyncGenerator.prototype[Symbol.asyncIterator] = function() {\n return this;\n };\n }\n\n _AsyncGenerator.prototype.next = function(arg) {\n return this._invoke('next', arg);\n };\n\n _AsyncGenerator.prototype.throw = function(arg) {\n return this._invoke('throw', arg);\n };\n\n _AsyncGenerator.prototype.return = function(arg) {\n return this._invoke('return', arg);\n };\n\n function _wrapAsyncGenerator(fn) {\n return function() {\n return new _AsyncGenerator(fn.apply(this, arguments));\n };\n }\n\n function _awaitAsyncGenerator(value) {\n return new _AwaitValue(value);\n }\n\n function _asyncGeneratorDelegate(inner, awaitWrap) {\n var iter = {},\n waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function(resolve) {\n resolve(inner[key](value));\n });\n return {\n done: false,\n value: awaitWrap(value),\n };\n }\n\n if (typeof Symbol === 'function' && Symbol.iterator) {\n iter[Symbol.iterator] = function() {\n return this;\n };\n }\n\n iter.next = function(value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n\n return pump('next', value);\n };\n\n if (typeof inner.throw === 'function') {\n iter.throw = function(value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n\n return pump('throw', value);\n };\n }\n\n if (typeof inner.return === 'function') {\n iter.return = function(value) {\n return pump('return', value);\n };\n }\n\n return iter;\n }\n\n function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n }\n\n function _asyncToGenerator(fn) {\n return function() {\n var self = this,\n args = arguments;\n return new Promise(function(resolve, reject) {\n var gen = fn.apply(self, args);\n\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'next', value);\n }\n\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, 'throw', err);\n }\n\n _next(undefined);\n });\n };\n }\n\n function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n }\n\n function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n }\n\n function _defineEnumerableProperties(obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ('value' in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n if (Object.getOwnPropertySymbols) {\n var objectSymbols = Object.getOwnPropertySymbols(descs);\n\n for (var i = 0; i < objectSymbols.length; i++) {\n var sym = objectSymbols[i];\n var desc = descs[sym];\n desc.configurable = desc.enumerable = true;\n if ('value' in desc) desc.writable = true;\n Object.defineProperty(obj, sym, desc);\n }\n }\n\n return obj;\n }\n\n function _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _extends() {\n _extends =\n Object.assign ||\n function(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n }\n\n function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(\n Object.getOwnPropertySymbols(source).filter(function(sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n })\n );\n }\n\n ownKeys.forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n }\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly)\n symbols = symbols.filter(function(sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n }\n\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(source, true).forEach(function(key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(source).forEach(function(key) {\n Object.defineProperty(\n target,\n key,\n Object.getOwnPropertyDescriptor(source, key)\n );\n });\n }\n }\n\n return target;\n }\n\n function _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function');\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true,\n },\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n }\n\n function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n }\n\n function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf\n ? Object.getPrototypeOf\n : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf =\n Object.setPrototypeOf ||\n function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function isNativeReflectConstruct() {\n if (typeof Reflect === 'undefined' || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === 'function') return true;\n\n try {\n Date.prototype.toString.call(Reflect.construct(Date, [], function() {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _isNativeFunction(fn) {\n return Function.toString.call(fn).indexOf('[native code]') !== -1;\n }\n\n function _wrapNativeSuper(Class) {\n var _cache = typeof Map === 'function' ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !_isNativeFunction(Class)) return Class;\n\n if (typeof Class !== 'function') {\n throw new TypeError('Super expression must either be null or a function');\n }\n\n if (typeof _cache !== 'undefined') {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {\n return _construct(Class, arguments, _getPrototypeOf(this).constructor);\n }\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true,\n },\n });\n return _setPrototypeOf(Wrapper, Class);\n };\n\n return _wrapNativeSuper(Class);\n }\n\n function _instanceof(left, right) {\n if (right != null && typeof Symbol !== 'undefined' && right[Symbol.hasInstance]) {\n return !!right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n }\n\n function _interopRequireDefault(obj) {\n return obj && obj.__esModule\n ? obj\n : {\n default: obj,\n };\n }\n\n function _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc =\n Object.defineProperty && Object.getOwnPropertyDescriptor\n ? Object.getOwnPropertyDescriptor(obj, key)\n : {};\n\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n }\n\n function _newArrowCheck(innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError('Cannot instantiate an arrow function');\n }\n }\n\n function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError('Cannot destructure undefined');\n }\n\n function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n }\n\n function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n }\n\n function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n }\n\n function _possibleConstructorReturn(self, call) {\n if (call && (typeof call === 'object' || typeof call === 'function')) {\n return call;\n }\n\n return _assertThisInitialized(self);\n }\n\n function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = _getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n }\n\n function _get(target, property, receiver) {\n if (typeof Reflect !== 'undefined' && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = _superPropBase(target, property);\n\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n }\n\n function set(target, property, value, receiver) {\n if (typeof Reflect !== 'undefined' && Reflect.set) {\n set = Reflect.set;\n } else {\n set = function set(target, property, value, receiver) {\n var base = _superPropBase(target, property);\n\n var desc;\n\n if (base) {\n desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.set) {\n desc.set.call(receiver, value);\n return true;\n } else if (!desc.writable) {\n return false;\n }\n }\n\n desc = Object.getOwnPropertyDescriptor(receiver, property);\n\n if (desc) {\n if (!desc.writable) {\n return false;\n }\n\n desc.value = value;\n Object.defineProperty(receiver, property, desc);\n } else {\n _defineProperty(receiver, property, value);\n }\n\n return true;\n };\n }\n\n return set(target, property, value, receiver);\n }\n\n function _set(target, property, value, receiver, isStrict) {\n var s = set(target, property, value, receiver || target);\n\n if (!s && isStrict) {\n throw new Error('failed to set property');\n }\n\n return value;\n }\n\n function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(\n Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw),\n },\n })\n );\n }\n\n function _taggedTemplateLiteralLoose(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n strings.raw = raw;\n return strings;\n }\n\n function _temporalRef(val, name) {\n if (val === _temporalUndefined) {\n throw new ReferenceError(name + ' is not defined - temporal dead zone');\n } else {\n return val;\n }\n }\n\n function _readOnlyError(name) {\n throw new Error('\"' + name + '\" is read-only');\n }\n\n function _classNameTDZError(name) {\n throw new Error('Class \"' + name + '\" cannot be referenced in computed property keys.');\n }\n\n var _temporalUndefined = {};\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n }\n\n function _slicedToArrayLoose(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimitLoose(arr, i) || _nonIterableRest();\n }\n\n function _toArray(arr) {\n return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArray(iter) {\n if (\n Symbol.iterator in Object(iter) ||\n Object.prototype.toString.call(iter) === '[object Arguments]'\n )\n return Array.from(iter);\n }\n\n function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i['return'] != null) _i['return']();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _iterableToArrayLimitLoose(arr, i) {\n var _arr = [];\n\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done; ) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n }\n\n function _nonIterableSpread() {\n throw new TypeError('Invalid attempt to spread non-iterable instance');\n }\n\n function _nonIterableRest() {\n throw new TypeError('Invalid attempt to destructure non-iterable instance');\n }\n\n function _skipFirstGeneratorNext(fn) {\n return function() {\n var it = fn.apply(this, arguments);\n it.next();\n return it;\n };\n }\n\n function _toPrimitive(input, hint) {\n if (typeof input !== 'object' || input === null) return input;\n var prim = input[Symbol.toPrimitive];\n\n if (prim !== undefined) {\n var res = prim.call(input, hint || 'default');\n if (typeof res !== 'object') return res;\n throw new TypeError('@@toPrimitive must return a primitive value.');\n }\n\n return (hint === 'string' ? String : Number)(input);\n }\n\n function _toPropertyKey(arg) {\n var key = _toPrimitive(arg, 'string');\n\n return typeof key === 'symbol' ? key : String(key);\n }\n\n function _initializerWarningHelper(descriptor, context) {\n throw new Error(\n 'Decorating class property failed. Please ensure that ' +\n 'proposal-class-properties is enabled and set to use loose mode. ' +\n 'To use proposal-class-properties in spec mode with decorators, wait for ' +\n 'the next major version of decorators in stage 2.'\n );\n }\n\n function _initializerDefineProperty(target, property, descriptor, context) {\n if (!descriptor) return;\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n\n function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n var desc = {};\n Object.keys(descriptor).forEach(function(key) {\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n\n if ('value' in desc || desc.initializer) {\n desc.writable = true;\n }\n\n desc = decorators\n .slice()\n .reverse()\n .reduce(function(desc, decorator) {\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0) {\n Object.defineProperty(target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n\n var id = 0;\n\n function _classPrivateFieldLooseKey(name) {\n return '__private_' + id++ + '_' + name;\n }\n\n function _classPrivateFieldLooseBase(receiver, privateKey) {\n if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {\n throw new TypeError('attempted to use private field on non-instance');\n }\n\n return receiver;\n }\n\n function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError('attempted to get private field on non-instance');\n }\n\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n\n return descriptor.value;\n }\n\n function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = privateMap.get(receiver);\n\n if (!descriptor) {\n throw new TypeError('attempted to set private field on non-instance');\n }\n\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError('attempted to set read only private field');\n }\n\n descriptor.value = value;\n }\n\n return value;\n }\n\n function _classPrivateFieldDestructureSet(receiver, privateMap) {\n if (!privateMap.has(receiver)) {\n throw new TypeError('attempted to set private field on non-instance');\n }\n\n var descriptor = privateMap.get(receiver);\n\n if (descriptor.set) {\n if (!('__destrObj' in descriptor)) {\n descriptor.__destrObj = {\n set value(v) {\n descriptor.set.call(receiver, v);\n },\n };\n }\n\n return descriptor.__destrObj;\n } else {\n if (!descriptor.writable) {\n throw new TypeError('attempted to set read only private field');\n }\n\n return descriptor;\n }\n }\n\n function _classStaticPrivateFieldSpecGet(receiver, classConstructor, descriptor) {\n if (receiver !== classConstructor) {\n throw new TypeError('Private static access of wrong provenance');\n }\n\n return descriptor.value;\n }\n\n function _classStaticPrivateFieldSpecSet(receiver, classConstructor, descriptor, value) {\n if (receiver !== classConstructor) {\n throw new TypeError('Private static access of wrong provenance');\n }\n\n if (!descriptor.writable) {\n throw new TypeError('attempted to set read only private field');\n }\n\n descriptor.value = value;\n return value;\n }\n\n function _classStaticPrivateMethodGet(receiver, classConstructor, method) {\n if (receiver !== classConstructor) {\n throw new TypeError('Private static access of wrong provenance');\n }\n\n return method;\n }\n\n function _classStaticPrivateMethodSet() {\n throw new TypeError('attempted to set read only static private field');\n }\n\n function _decorate(decorators, factory, superClass, mixins) {\n var api = _getDecoratorsApi();\n\n if (mixins) {\n for (var i = 0; i < mixins.length; i++) {\n api = mixins[i](api);\n }\n }\n\n var r = factory(function initialize(O) {\n api.initializeInstanceElements(O, decorated.elements);\n }, superClass);\n var decorated = api.decorateClass(\n _coalesceClassElements(r.d.map(_createElementDescriptor)),\n decorators\n );\n api.initializeClassElements(r.F, decorated.elements);\n return api.runClassFinishers(r.F, decorated.finishers);\n }\n\n function _getDecoratorsApi() {\n _getDecoratorsApi = function() {\n return api;\n };\n\n var api = {\n elementsDefinitionOrder: [['method'], ['field']],\n initializeInstanceElements: function(O, elements) {\n ['method', 'field'].forEach(function(kind) {\n elements.forEach(function(element) {\n if (element.kind === kind && element.placement === 'own') {\n this.defineClassElement(O, element);\n }\n }, this);\n }, this);\n },\n initializeClassElements: function(F, elements) {\n var proto = F.prototype;\n ['method', 'field'].forEach(function(kind) {\n elements.forEach(function(element) {\n var placement = element.placement;\n\n if (\n element.kind === kind &&\n (placement === 'static' || placement === 'prototype')\n ) {\n var receiver = placement === 'static' ? F : proto;\n this.defineClassElement(receiver, element);\n }\n }, this);\n }, this);\n },\n defineClassElement: function(receiver, element) {\n var descriptor = element.descriptor;\n\n if (element.kind === 'field') {\n var initializer = element.initializer;\n descriptor = {\n enumerable: descriptor.enumerable,\n writable: descriptor.writable,\n configurable: descriptor.configurable,\n value: initializer === void 0 ? void 0 : initializer.call(receiver),\n };\n }\n\n Object.defineProperty(receiver, element.key, descriptor);\n },\n decorateClass: function(elements, decorators) {\n var newElements = [];\n var finishers = [];\n var placements = {\n static: [],\n prototype: [],\n own: [],\n };\n elements.forEach(function(element) {\n this.addElementPlacement(element, placements);\n }, this);\n elements.forEach(function(element) {\n if (!_hasDecorators(element)) return newElements.push(element);\n var elementFinishersExtras = this.decorateElement(element, placements);\n newElements.push(elementFinishersExtras.element);\n newElements.push.apply(newElements, elementFinishersExtras.extras);\n finishers.push.apply(finishers, elementFinishersExtras.finishers);\n }, this);\n\n if (!decorators) {\n return {\n elements: newElements,\n finishers: finishers,\n };\n }\n\n var result = this.decorateConstructor(newElements, decorators);\n finishers.push.apply(finishers, result.finishers);\n result.finishers = finishers;\n return result;\n },\n addElementPlacement: function(element, placements, silent) {\n var keys = placements[element.placement];\n\n if (!silent && keys.indexOf(element.key) !== -1) {\n throw new TypeError('Duplicated element (' + element.key + ')');\n }\n\n keys.push(element.key);\n },\n decorateElement: function(element, placements) {\n var extras = [];\n var finishers = [];\n\n for (var decorators = element.decorators, i = decorators.length - 1; i >= 0; i--) {\n var keys = placements[element.placement];\n keys.splice(keys.indexOf(element.key), 1);\n var elementObject = this.fromElementDescriptor(element);\n var elementFinisherExtras = this.toElementFinisherExtras(\n (0, decorators[i])(elementObject) || elementObject\n );\n element = elementFinisherExtras.element;\n this.addElementPlacement(element, placements);\n\n if (elementFinisherExtras.finisher) {\n finishers.push(elementFinisherExtras.finisher);\n }\n\n var newExtras = elementFinisherExtras.extras;\n\n if (newExtras) {\n for (var j = 0; j < newExtras.length; j++) {\n this.addElementPlacement(newExtras[j], placements);\n }\n\n extras.push.apply(extras, newExtras);\n }\n }\n\n return {\n element: element,\n finishers: finishers,\n extras: extras,\n };\n },\n decorateConstructor: function(elements, decorators) {\n var finishers = [];\n\n for (var i = decorators.length - 1; i >= 0; i--) {\n var obj = this.fromClassDescriptor(elements);\n var elementsAndFinisher = this.toClassDescriptor(\n (0, decorators[i])(obj) || obj\n );\n\n if (elementsAndFinisher.finisher !== undefined) {\n finishers.push(elementsAndFinisher.finisher);\n }\n\n if (elementsAndFinisher.elements !== undefined) {\n elements = elementsAndFinisher.elements;\n\n for (var j = 0; j < elements.length - 1; j++) {\n for (var k = j + 1; k < elements.length; k++) {\n if (\n elements[j].key === elements[k].key &&\n elements[j].placement === elements[k].placement\n ) {\n throw new TypeError(\n 'Duplicated element (' + elements[j].key + ')'\n );\n }\n }\n }\n }\n }\n\n return {\n elements: elements,\n finishers: finishers,\n };\n },\n fromElementDescriptor: function(element) {\n var obj = {\n kind: element.kind,\n key: element.key,\n placement: element.placement,\n descriptor: element.descriptor,\n };\n var desc = {\n value: 'Descriptor',\n configurable: true,\n };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n if (element.kind === 'field') obj.initializer = element.initializer;\n return obj;\n },\n toElementDescriptors: function(elementObjects) {\n if (elementObjects === undefined) return;\n return _toArray(elementObjects).map(function(elementObject) {\n var element = this.toElementDescriptor(elementObject);\n this.disallowProperty(elementObject, 'finisher', 'An element descriptor');\n this.disallowProperty(elementObject, 'extras', 'An element descriptor');\n return element;\n }, this);\n },\n toElementDescriptor: function(elementObject) {\n var kind = String(elementObject.kind);\n\n if (kind !== 'method' && kind !== 'field') {\n throw new TypeError(\n 'An element descriptor\\'s .kind property must be either \"method\" or' +\n ' \"field\", but a decorator created an element descriptor with' +\n ' .kind \"' +\n kind +\n '\"'\n );\n }\n\n var key = _toPropertyKey(elementObject.key);\n\n var placement = String(elementObject.placement);\n\n if (placement !== 'static' && placement !== 'prototype' && placement !== 'own') {\n throw new TypeError(\n 'An element descriptor\\'s .placement property must be one of \"static\",' +\n ' \"prototype\" or \"own\", but a decorator created an element descriptor' +\n ' with .placement \"' +\n placement +\n '\"'\n );\n }\n\n var descriptor = elementObject.descriptor;\n this.disallowProperty(elementObject, 'elements', 'An element descriptor');\n var element = {\n kind: kind,\n key: key,\n placement: placement,\n descriptor: Object.assign({}, descriptor),\n };\n\n if (kind !== 'field') {\n this.disallowProperty(elementObject, 'initializer', 'A method descriptor');\n } else {\n this.disallowProperty(\n descriptor,\n 'get',\n 'The property descriptor of a field descriptor'\n );\n this.disallowProperty(\n descriptor,\n 'set',\n 'The property descriptor of a field descriptor'\n );\n this.disallowProperty(\n descriptor,\n 'value',\n 'The property descriptor of a field descriptor'\n );\n element.initializer = elementObject.initializer;\n }\n\n return element;\n },\n toElementFinisherExtras: function(elementObject) {\n var element = this.toElementDescriptor(elementObject);\n\n var finisher = _optionalCallableProperty(elementObject, 'finisher');\n\n var extras = this.toElementDescriptors(elementObject.extras);\n return {\n element: element,\n finisher: finisher,\n extras: extras,\n };\n },\n fromClassDescriptor: function(elements) {\n var obj = {\n kind: 'class',\n elements: elements.map(this.fromElementDescriptor, this),\n };\n var desc = {\n value: 'Descriptor',\n configurable: true,\n };\n Object.defineProperty(obj, Symbol.toStringTag, desc);\n return obj;\n },\n toClassDescriptor: function(obj) {\n var kind = String(obj.kind);\n\n if (kind !== 'class') {\n throw new TypeError(\n 'A class descriptor\\'s .kind property must be \"class\", but a decorator' +\n ' created a class descriptor with .kind \"' +\n kind +\n '\"'\n );\n }\n\n this.disallowProperty(obj, 'key', 'A class descriptor');\n this.disallowProperty(obj, 'placement', 'A class descriptor');\n this.disallowProperty(obj, 'descriptor', 'A class descriptor');\n this.disallowProperty(obj, 'initializer', 'A class descriptor');\n this.disallowProperty(obj, 'extras', 'A class descriptor');\n\n var finisher = _optionalCallableProperty(obj, 'finisher');\n\n var elements = this.toElementDescriptors(obj.elements);\n return {\n elements: elements,\n finisher: finisher,\n };\n },\n runClassFinishers: function(constructor, finishers) {\n for (var i = 0; i < finishers.length; i++) {\n var newConstructor = (0, finishers[i])(constructor);\n\n if (newConstructor !== undefined) {\n if (typeof newConstructor !== 'function') {\n throw new TypeError('Finishers must return a constructor.');\n }\n\n constructor = newConstructor;\n }\n }\n\n return constructor;\n },\n disallowProperty: function(obj, name, objectType) {\n if (obj[name] !== undefined) {\n throw new TypeError(objectType + \" can't have a .\" + name + ' property.');\n }\n },\n };\n return api;\n }\n\n function _createElementDescriptor(def) {\n var key = _toPropertyKey(def.key);\n\n var descriptor;\n\n if (def.kind === 'method') {\n descriptor = {\n value: def.value,\n writable: true,\n configurable: true,\n enumerable: false,\n };\n } else if (def.kind === 'get') {\n descriptor = {\n get: def.value,\n configurable: true,\n enumerable: false,\n };\n } else if (def.kind === 'set') {\n descriptor = {\n set: def.value,\n configurable: true,\n enumerable: false,\n };\n } else if (def.kind === 'field') {\n descriptor = {\n configurable: true,\n writable: true,\n enumerable: true,\n };\n }\n\n var element = {\n kind: def.kind === 'field' ? 'field' : 'method',\n key: key,\n placement: def.static ? 'static' : def.kind === 'field' ? 'own' : 'prototype',\n descriptor: descriptor,\n };\n if (def.decorators) element.decorators = def.decorators;\n if (def.kind === 'field') element.initializer = def.value;\n return element;\n }\n\n function _coalesceGetterSetter(element, other) {\n if (element.descriptor.get !== undefined) {\n other.descriptor.get = element.descriptor.get;\n } else {\n other.descriptor.set = element.descriptor.set;\n }\n }\n\n function _coalesceClassElements(elements) {\n var newElements = [];\n\n var isSameElement = function(other) {\n return (\n other.kind === 'method' &&\n other.key === element.key &&\n other.placement === element.placement\n );\n };\n\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i];\n var other;\n\n if (element.kind === 'method' && (other = newElements.find(isSameElement))) {\n if (_isDataDescriptor(element.descriptor) || _isDataDescriptor(other.descriptor)) {\n if (_hasDecorators(element) || _hasDecorators(other)) {\n throw new ReferenceError(\n 'Duplicated methods (' + element.key + \") can't be decorated.\"\n );\n }\n\n other.descriptor = element.descriptor;\n } else {\n if (_hasDecorators(element)) {\n if (_hasDecorators(other)) {\n throw new ReferenceError(\n \"Decorators can't be placed on different accessors with for \" +\n 'the same property (' +\n element.key +\n ').'\n );\n }\n\n other.decorators = element.decorators;\n }\n\n _coalesceGetterSetter(element, other);\n }\n } else {\n newElements.push(element);\n }\n }\n\n return newElements;\n }\n\n function _hasDecorators(element) {\n return element.decorators && element.decorators.length;\n }\n\n function _isDataDescriptor(desc) {\n return desc !== undefined && !(desc.value === undefined && desc.writable === undefined);\n }\n\n function _optionalCallableProperty(obj, name) {\n var value = obj[name];\n\n if (value !== undefined && typeof value !== 'function') {\n throw new TypeError(\"Expected '\" + name + \"' to be a function\");\n }\n\n return value;\n }\n\n function _classPrivateMethodGet(receiver, privateSet, fn) {\n if (!privateSet.has(receiver)) {\n throw new TypeError('attempted to get private field on non-instance');\n }\n\n return fn;\n }\n\n function _classPrivateMethodSet() {\n throw new TypeError('attempted to reassign private method');\n }\n\n function _wrapRegExp(re, groups) {\n _wrapRegExp = function(re, groups) {\n return new BabelRegExp(re, groups);\n };\n\n var _RegExp = _wrapNativeSuper(RegExp);\n\n var _super = RegExp.prototype;\n\n var _groups = new WeakMap();\n\n function BabelRegExp(re, groups) {\n var _this = _RegExp.call(this, re);\n\n _groups.set(_this, groups);\n\n return _this;\n }\n\n _inherits(BabelRegExp, _RegExp);\n\n BabelRegExp.prototype.exec = function(str) {\n var result = _super.exec.call(this, str);\n\n if (result) result.groups = buildGroups(result, this);\n return result;\n };\n\n BabelRegExp.prototype[Symbol.replace] = function(str, substitution) {\n if (typeof substitution === 'string') {\n var groups = _groups.get(this);\n\n return _super[Symbol.replace].call(\n this,\n str,\n substitution.replace(/\\$<([^>]+)>/g, function(_, name) {\n return '$' + groups[name];\n })\n );\n } else if (typeof substitution === 'function') {\n var _this = this;\n\n return _super[Symbol.replace].call(this, str, function() {\n var args = [];\n args.push.apply(args, arguments);\n\n if (typeof args[args.length - 1] !== 'object') {\n args.push(buildGroups(args, _this));\n }\n\n return substitution.apply(this, args);\n });\n } else {\n return _super[Symbol.replace].call(this, str, substitution);\n }\n };\n\n function buildGroups(result, re) {\n var g = _groups.get(re);\n\n return Object.keys(g).reduce(function(groups, name) {\n groups[name] = result[g[name]];\n return groups;\n }, Object.create(null));\n }\n\n return _wrapRegExp.apply(this, arguments);\n }\n\n var arrayRemove = function arrayRemove(arr, index) {\n return arr.splice(index, 1);\n };\n\n var run = function run(cb, sync) {\n if (sync) {\n cb();\n } else if (document.hidden) {\n Promise.resolve(1).then(cb);\n } else {\n setTimeout(cb, 0);\n }\n };\n\n var on = function on() {\n var listeners = [];\n var off = function off(event, cb) {\n arrayRemove(\n listeners,\n listeners.findIndex(function(listener) {\n return listener.event === event && (listener.cb === cb || !cb);\n })\n );\n };\n var _fire = function fire(event, args, sync) {\n listeners\n .filter(function(listener) {\n return listener.event === event;\n })\n .map(function(listener) {\n return listener.cb;\n })\n .forEach(function(cb) {\n return run(function() {\n return cb.apply(void 0, _toConsumableArray(args));\n }, sync);\n });\n };\n return {\n fireSync: function fireSync(event) {\n for (\n var _len = arguments.length,\n args = new Array(_len > 1 ? _len - 1 : 0),\n _key = 1;\n _key < _len;\n _key++\n ) {\n args[_key - 1] = arguments[_key];\n }\n _fire(event, args, true);\n },\n fire: function fire(event) {\n for (\n var _len2 = arguments.length,\n args = new Array(_len2 > 1 ? _len2 - 1 : 0),\n _key2 = 1;\n _key2 < _len2;\n _key2++\n ) {\n args[_key2 - 1] = arguments[_key2];\n }\n _fire(event, args, false);\n },\n on: function on(event, cb) {\n listeners.push({ event: event, cb: cb });\n },\n onOnce: function onOnce(event, _cb) {\n listeners.push({\n event: event,\n cb: function cb() {\n off(event, _cb);\n _cb.apply(void 0, arguments);\n },\n });\n },\n off: off,\n };\n };\n\n var copyObjectPropertiesToObject = function copyObjectPropertiesToObject(\n src,\n target,\n excluded\n ) {\n Object.getOwnPropertyNames(src)\n .filter(function(property) {\n return !excluded.includes(property);\n })\n .forEach(function(key) {\n return Object.defineProperty(\n target,\n key,\n Object.getOwnPropertyDescriptor(src, key)\n );\n });\n };\n\n var PRIVATE = [\n 'fire',\n 'process',\n 'revert',\n 'load',\n 'on',\n 'off',\n 'onOnce',\n 'retryLoad',\n 'extend',\n 'archive',\n 'archived',\n 'release',\n 'released',\n 'requestProcessing',\n 'freeze',\n ];\n\n var createItemAPI = function createItemAPI(item) {\n var api = {};\n copyObjectPropertiesToObject(item, api, PRIVATE);\n return api;\n };\n\n var removeReleasedItems = function removeReleasedItems(items) {\n items.forEach(function(item, index) {\n if (item.released) {\n arrayRemove(items, index);\n }\n });\n };\n\n var ItemStatus = {\n INIT: 1,\n IDLE: 2,\n PROCESSING_QUEUED: 9,\n PROCESSING: 3,\n PROCESSING_COMPLETE: 5,\n PROCESSING_ERROR: 6,\n PROCESSING_REVERT_ERROR: 10,\n LOADING: 7,\n LOAD_ERROR: 8,\n };\n\n var FileOrigin = {\n INPUT: 1,\n LIMBO: 2,\n LOCAL: 3,\n };\n\n var getNonNumeric = function getNonNumeric(str) {\n return /[^0-9]+/.exec(str);\n };\n\n var getDecimalSeparator = function getDecimalSeparator() {\n return getNonNumeric((1.1).toLocaleString())[0];\n };\n\n var getThousandsSeparator = function getThousandsSeparator() {\n // Added for browsers that do not return the thousands separator (happend on native browser Android 4.4.4)\n // We check against the normal toString output and if they're the same return a comma when decimal separator is a dot\n var decimalSeparator = getDecimalSeparator();\n var thousandsStringWithSeparator = (1000.0).toLocaleString();\n var thousandsStringWithoutSeparator = (1000.0).toString();\n if (thousandsStringWithSeparator !== thousandsStringWithoutSeparator) {\n return getNonNumeric(thousandsStringWithSeparator)[0];\n }\n return decimalSeparator === '.' ? ',' : '.';\n };\n\n var Type = {\n BOOLEAN: 'boolean',\n INT: 'int',\n NUMBER: 'number',\n STRING: 'string',\n ARRAY: 'array',\n OBJECT: 'object',\n FUNCTION: 'function',\n ACTION: 'action',\n SERVER_API: 'serverapi',\n REGEX: 'regex',\n };\n\n // all registered filters\n var filters = [];\n\n // loops over matching filters and passes options to each filter, returning the mapped results\n var applyFilterChain = function applyFilterChain(key, value, utils) {\n return new Promise(function(resolve, reject) {\n // find matching filters for this key\n var matchingFilters = filters\n .filter(function(f) {\n return f.key === key;\n })\n .map(function(f) {\n return f.cb;\n });\n\n // resolve now\n if (matchingFilters.length === 0) {\n resolve(value);\n return;\n }\n\n // first filter to kick things of\n var initialFilter = matchingFilters.shift();\n\n // chain filters\n matchingFilters\n .reduce(\n // loop over promises passing value to next promise\n function(current, next) {\n return current.then(function(value) {\n return next(value, utils);\n });\n },\n\n // call initial filter, will return a promise\n initialFilter(value, utils)\n\n // all executed\n )\n .then(function(value) {\n return resolve(value);\n })\n .catch(function(error) {\n return reject(error);\n });\n });\n };\n\n var applyFilters = function applyFilters(key, value, utils) {\n return filters\n .filter(function(f) {\n return f.key === key;\n })\n .map(function(f) {\n return f.cb(value, utils);\n });\n };\n\n // adds a new filter to the list\n var addFilter = function addFilter(key, cb) {\n return filters.push({ key: key, cb: cb });\n };\n\n var extendDefaultOptions = function extendDefaultOptions(additionalOptions) {\n return Object.assign(defaultOptions, additionalOptions);\n };\n\n var getOptions = function getOptions() {\n return Object.assign({}, defaultOptions);\n };\n\n var setOptions = function setOptions(opts) {\n forin(opts, function(key, value) {\n // key does not exist, so this option cannot be set\n if (!defaultOptions[key]) {\n return;\n }\n defaultOptions[key][0] = getValueByType(\n value,\n defaultOptions[key][0],\n defaultOptions[key][1]\n );\n });\n };\n\n // default options on app\n var defaultOptions = {\n // the id to add to the root element\n id: [null, Type.STRING],\n\n // input field name to use\n name: ['filepond', Type.STRING],\n\n // disable the field\n disabled: [false, Type.BOOLEAN],\n\n // classname to put on wrapper\n className: [null, Type.STRING],\n\n // is the field required\n required: [false, Type.BOOLEAN],\n\n // Allow media capture when value is set\n captureMethod: [null, Type.STRING],\n // - \"camera\", \"microphone\" or \"camcorder\",\n // - Does not work with multiple on apple devices\n // - If set, acceptedFileTypes must be made to match with media wildcard \"image/*\", \"audio/*\" or \"video/*\"\n\n // sync `acceptedFileTypes` property with `accept` attribute\n allowSyncAcceptAttribute: [true, Type.BOOLEAN],\n\n // Feature toggles\n allowDrop: [true, Type.BOOLEAN], // Allow dropping of files\n allowBrowse: [true, Type.BOOLEAN], // Allow browsing the file system\n allowPaste: [true, Type.BOOLEAN], // Allow pasting files\n allowMultiple: [false, Type.BOOLEAN], // Allow multiple files (disabled by default, as multiple attribute is also required on input to allow multiple)\n allowReplace: [true, Type.BOOLEAN], // Allow dropping a file on other file to replace it (only works when multiple is set to false)\n allowRevert: [true, Type.BOOLEAN], // Allows user to revert file upload\n allowRemove: [true, Type.BOOLEAN], // Allow user to remove a file\n allowProcess: [true, Type.BOOLEAN], // Allows user to process a file, when set to false, this removes the file upload button\n allowReorder: [false, Type.BOOLEAN], // Allow reordering of files\n allowDirectoriesOnly: [false, Type.BOOLEAN], // Allow only selecting directories with browse (no support for filtering dnd at this point)\n\n // Try store file if `server` not set\n storeAsFile: [false, Type.BOOLEAN],\n\n // Revert mode\n forceRevert: [false, Type.BOOLEAN], // Set to 'force' to require the file to be reverted before removal\n\n // Input requirements\n maxFiles: [null, Type.INT], // Max number of files\n checkValidity: [false, Type.BOOLEAN], // Enables custom validity messages\n\n // Where to put file\n itemInsertLocationFreedom: [true, Type.BOOLEAN], // Set to false to always add items to begin or end of list\n itemInsertLocation: ['before', Type.STRING], // Default index in list to add items that have been dropped at the top of the list\n itemInsertInterval: [75, Type.INT],\n\n // Drag 'n Drop related\n dropOnPage: [false, Type.BOOLEAN], // Allow dropping of files anywhere on page (prevents browser from opening file if dropped outside of Up)\n dropOnElement: [true, Type.BOOLEAN], // Drop needs to happen on element (set to false to also load drops outside of Up)\n dropValidation: [false, Type.BOOLEAN], // Enable or disable validating files on drop\n ignoredFiles: [['.ds_store', 'thumbs.db', 'desktop.ini'], Type.ARRAY],\n\n // Upload related\n instantUpload: [true, Type.BOOLEAN], // Should upload files immediately on drop\n maxParallelUploads: [2, Type.INT], // Maximum files to upload in parallel\n allowMinimumUploadDuration: [true, Type.BOOLEAN], // if true uploads take at least 750 ms, this ensures the user sees the upload progress giving trust the upload actually happened\n\n // Chunks\n chunkUploads: [false, Type.BOOLEAN], // Enable chunked uploads\n chunkForce: [false, Type.BOOLEAN], // Force use of chunk uploads even for files smaller than chunk size\n chunkSize: [5000000, Type.INT], // Size of chunks (5MB default)\n chunkRetryDelays: [[500, 1000, 3000], Type.ARRAY], // Amount of times to retry upload of a chunk when it fails\n\n // The server api end points to use for uploading (see docs)\n server: [null, Type.SERVER_API],\n\n // File size calculations, can set to 1024, this is only used for display, properties use file size base 1000\n fileSizeBase: [1000, Type.INT],\n\n // Labels and status messages\n labelFileSizeBytes: ['bytes', Type.STRING],\n labelFileSizeKilobytes: ['KB', Type.STRING],\n labelFileSizeMegabytes: ['MB', Type.STRING],\n labelFileSizeGigabytes: ['GB', Type.STRING],\n\n labelDecimalSeparator: [getDecimalSeparator(), Type.STRING], // Default is locale separator\n labelThousandsSeparator: [getThousandsSeparator(), Type.STRING], // Default is locale separator\n\n labelIdle: [\n 'Drag & Drop your files or <span class=\"filepond--label-action\">Browse</span>',\n Type.STRING,\n ],\n\n labelInvalidField: ['Field contains invalid files', Type.STRING],\n labelFileWaitingForSize: ['Waiting for size', Type.STRING],\n labelFileSizeNotAvailable: ['Size not available', Type.STRING],\n labelFileCountSingular: ['file in list', Type.STRING],\n labelFileCountPlural: ['files in list', Type.STRING],\n labelFileLoading: ['Loading', Type.STRING],\n labelFileAdded: ['Added', Type.STRING], // assistive only\n labelFileLoadError: ['Error during load', Type.STRING],\n labelFileRemoved: ['Removed', Type.STRING], // assistive only\n labelFileRemoveError: ['Error during remove', Type.STRING],\n labelFileProcessing: ['Uploading', Type.STRING],\n labelFileProcessingComplete: ['Upload complete', Type.STRING],\n labelFileProcessingAborted: ['Upload cancelled', Type.STRING],\n labelFileProcessingError: ['Error during upload', Type.STRING],\n labelFileProcessingRevertError: ['Error during revert', Type.STRING],\n\n labelTapToCancel: ['tap to cancel', Type.STRING],\n labelTapToRetry: ['tap to retry', Type.STRING],\n labelTapToUndo: ['tap to undo', Type.STRING],\n\n labelButtonRemoveItem: ['Remove', Type.STRING],\n labelButtonAbortItemLoad: ['Abort', Type.STRING],\n labelButtonRetryItemLoad: ['Retry', Type.STRING],\n labelButtonAbortItemProcessing: ['Cancel', Type.STRING],\n labelButtonUndoItemProcessing: ['Undo', Type.STRING],\n labelButtonRetryItemProcessing: ['Retry', Type.STRING],\n labelButtonProcessItem: ['Upload', Type.STRING],\n\n // make sure width and height plus viewpox are even numbers so icons are nicely centered\n iconRemove: [\n '<svg width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M11.586 13l-2.293 2.293a1 1 0 0 0 1.414 1.414L13 14.414l2.293 2.293a1 1 0 0 0 1.414-1.414L14.414 13l2.293-2.293a1 1 0 0 0-1.414-1.414L13 11.586l-2.293-2.293a1 1 0 0 0-1.414 1.414L11.586 13z\" fill=\"currentColor\" fill-rule=\"nonzero\"/></svg>',\n Type.STRING,\n ],\n\n iconProcess: [\n '<svg width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M14 10.414v3.585a1 1 0 0 1-2 0v-3.585l-1.293 1.293a1 1 0 0 1-1.414-1.415l3-3a1 1 0 0 1 1.414 0l3 3a1 1 0 0 1-1.414 1.415L14 10.414zM9 18a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2H9z\" fill=\"currentColor\" fill-rule=\"evenodd\"/></svg>',\n Type.STRING,\n ],\n\n iconRetry: [\n '<svg width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M10.81 9.185l-.038.02A4.997 4.997 0 0 0 8 13.683a5 5 0 0 0 5 5 5 5 0 0 0 5-5 1 1 0 0 1 2 0A7 7 0 1 1 9.722 7.496l-.842-.21a.999.999 0 1 1 .484-1.94l3.23.806c.535.133.86.675.73 1.21l-.804 3.233a.997.997 0 0 1-1.21.73.997.997 0 0 1-.73-1.21l.23-.928v-.002z\" fill=\"currentColor\" fill-rule=\"nonzero\"/></svg>',\n Type.STRING,\n ],\n\n iconUndo: [\n '<svg width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M9.185 10.81l.02-.038A4.997 4.997 0 0 1 13.683 8a5 5 0 0 1 5 5 5 5 0 0 1-5 5 1 1 0 0 0 0 2A7 7 0 1 0 7.496 9.722l-.21-.842a.999.999 0 1 0-1.94.484l.806 3.23c.133.535.675.86 1.21.73l3.233-.803a.997.997 0 0 0 .73-1.21.997.997 0 0 0-1.21-.73l-.928.23-.002-.001z\" fill=\"currentColor\" fill-rule=\"nonzero\"/></svg>',\n Type.STRING,\n ],\n\n iconDone: [\n '<svg width=\"26\" height=\"26\" viewBox=\"0 0 26 26\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M18.293 9.293a1 1 0 0 1 1.414 1.414l-7.002 7a1 1 0 0 1-1.414 0l-3.998-4a1 1 0 1 1 1.414-1.414L12 15.586l6.294-6.293z\" fill=\"currentColor\" fill-rule=\"nonzero\"/></svg>',\n Type.STRING,\n ],\n\n // event handlers\n oninit: [null, Type.FUNCTION],\n onwarning: [null, Type.FUNCTION],\n onerror: [null, Type.FUNCTION],\n onactivatefile: [null, Type.FUNCTION],\n oninitfile: [null, Type.FUNCTION],\n onaddfilestart: [null, Type.FUNCTION],\n onaddfileprogress: [null, Type.FUNCTION],\n onaddfile: [null, Type.FUNCTION],\n onprocessfilestart: [null, Type.FUNCTION],\n onprocessfileprogress: [null, Type.FUNCTION],\n onprocessfileabort: [null, Type.FUNCTION],\n onprocessfilerevert: [null, Type.FUNCTION],\n onprocessfile: [null, Type.FUNCTION],\n onprocessfiles: [null, Type.FUNCTION],\n onremovefile: [null, Type.FUNCTION],\n onpreparefile: [null, Type.FUNCTION],\n onupdatefiles: [null, Type.FUNCTION],\n onreorderfiles: [null, Type.FUNCTION],\n\n // hooks\n beforeDropFile: [null, Type.FUNCTION],\n beforeAddFile: [null, Type.FUNCTION],\n beforeRemoveFile: [null, Type.FUNCTION],\n beforePrepareFile: [null, Type.FUNCTION],\n\n // styles\n stylePanelLayout: [null, Type.STRING], // null 'integrated', 'compact', 'circle'\n stylePanelAspectRatio: [null, Type.STRING], // null or '3:2' or 1\n styleItemPanelAspectRatio: [null, Type.STRING],\n styleButtonRemoveItemPosition: ['left', Type.STRING],\n styleButtonProcessItemPosition: ['right', Type.STRING],\n styleLoadIndicatorPosition: ['right', Type.STRING],\n styleProgressIndicatorPosition: ['right', Type.STRING],\n styleButtonRemoveItemAlign: [false, Type.BOOLEAN],\n\n // custom initial files array\n files: [[], Type.ARRAY],\n\n // show support by displaying credits\n credits: [['https://pqina.nl/', 'Powered by PQINA'], Type.ARRAY],\n };\n\n var getItemByQuery = function getItemByQuery(items, query) {\n // just return first index\n if (isEmpty(query)) {\n return items[0] || null;\n }\n\n // query is index\n if (isInt(query)) {\n return items[query] || null;\n }\n\n // if query is item, get the id\n if (typeof query === 'object') {\n query = query.id;\n }\n\n // assume query is a string and return item by id\n return (\n items.find(function(item) {\n return item.id === query;\n }) || null\n );\n };\n\n var getNumericAspectRatioFromString = function getNumericAspectRatioFromString(aspectRatio) {\n if (isEmpty(aspectRatio)) {\n return aspectRatio;\n }\n if (/:/.test(aspectRatio)) {\n var parts = aspectRatio.split(':');\n return parts[1] / parts[0];\n }\n return parseFloat(aspectRatio);\n };\n\n var getActiveItems = function getActiveItems(items) {\n return items.filter(function(item) {\n return !item.archived;\n });\n };\n\n var Status = {\n EMPTY: 0,\n IDLE: 1, // waiting\n ERROR: 2, // a file is in error state\n BUSY: 3, // busy processing or loading\n READY: 4, // all files uploaded\n };\n\n var res = null;\n var canUpdateFileInput = function canUpdateFileInput() {\n if (res === null) {\n try {\n var dataTransfer = new DataTransfer();\n dataTransfer.items.add(new File(['hello world'], 'This_Works.txt'));\n var el = document.createElement('input');\n el.setAttribute('type', 'file');\n el.files = dataTransfer.files;\n res = el.files.length === 1;\n } catch (err) {\n res = false;\n }\n }\n return res;\n };\n\n var ITEM_ERROR = [\n ItemStatus.LOAD_ERROR,\n ItemStatus.PROCESSING_ERROR,\n ItemStatus.PROCESSING_REVERT_ERROR,\n ];\n\n var ITEM_BUSY = [\n ItemStatus.LOADING,\n ItemStatus.PROCESSING,\n ItemStatus.PROCESSING_QUEUED,\n ItemStatus.INIT,\n ];\n\n var ITEM_READY = [ItemStatus.PROCESSING_COMPLETE];\n\n var isItemInErrorState = function isItemInErrorState(item) {\n return ITEM_ERROR.includes(item.status);\n };\n var isItemInBusyState = function isItemInBusyState(item) {\n return ITEM_BUSY.includes(item.status);\n };\n var isItemInReadyState = function isItemInReadyState(item) {\n return ITEM_READY.includes(item.status);\n };\n\n var isAsync = function isAsync(state) {\n return (\n isObject(state.options.server) &&\n (isObject(state.options.server.process) || isFunction(state.options.server.process))\n );\n };\n\n var queries = function queries(state) {\n return {\n GET_STATUS: function GET_STATUS() {\n var items = getActiveItems(state.items);\n var EMPTY = Status.EMPTY,\n ERROR = Status.ERROR,\n BUSY = Status.BUSY,\n IDLE = Status.IDLE,\n READY = Status.READY;\n\n if (items.length === 0) return EMPTY;\n\n if (items.some(isItemInErrorState)) return ERROR;\n\n if (items.some(isItemInBusyState)) return BUSY;\n\n if (items.some(isItemInReadyState)) return READY;\n\n return IDLE;\n },\n\n GET_ITEM: function GET_ITEM(query) {\n return getItemByQuery(state.items, query);\n },\n\n GET_ACTIVE_ITEM: function GET_ACTIVE_ITEM(query) {\n return getItemByQuery(getActiveItems(state.items), query);\n },\n\n GET_ACTIVE_ITEMS: function GET_ACTIVE_ITEMS() {\n return getActiveItems(state.items);\n },\n\n GET_ITEMS: function GET_ITEMS() {\n return state.items;\n },\n\n GET_ITEM_NAME: function GET_ITEM_NAME(query) {\n var item = getItemByQuery(state.items, query);\n return item ? item.filename : null;\n },\n\n GET_ITEM_SIZE: function GET_ITEM_SIZE(query) {\n var item = getItemByQuery(state.items, query);\n return item ? item.fileSize : null;\n },\n\n GET_STYLES: function GET_STYLES() {\n return Object.keys(state.options)\n .filter(function(key) {\n return /^style/.test(key);\n })\n .map(function(option) {\n return {\n name: option,\n value: state.options[option],\n };\n });\n },\n\n GET_PANEL_ASPECT_RATIO: function GET_PANEL_ASPECT_RATIO() {\n var isShapeCircle = /circle/.test(state.options.stylePanelLayout);\n var aspectRatio = isShapeCircle\n ? 1\n : getNumericAspectRatioFromString(state.options.stylePanelAspectRatio);\n return aspectRatio;\n },\n\n GET_ITEM_PANEL_ASPECT_RATIO: function GET_ITEM_PANEL_ASPECT_RATIO() {\n return state.options.styleItemPanelAspectRatio;\n },\n\n GET_ITEMS_BY_STATUS: function GET_ITEMS_BY_STATUS(status) {\n return getActiveItems(state.items).filter(function(item) {\n return item.status === status;\n });\n },\n\n GET_TOTAL_ITEMS: function GET_TOTAL_ITEMS() {\n return getActiveItems(state.items).length;\n },\n\n SHOULD_UPDATE_FILE_INPUT: function SHOULD_UPDATE_FILE_INPUT() {\n return state.options.storeAsFile && canUpdateFileInput() && !isAsync(state);\n },\n\n IS_ASYNC: function IS_ASYNC() {\n return isAsync(state);\n },\n\n GET_FILE_SIZE_LABELS: function GET_FILE_SIZE_LABELS(query) {\n return {\n labelBytes: query('GET_LABEL_FILE_SIZE_BYTES') || undefined,\n labelKilobytes: query('GET_LABEL_FILE_SIZE_KILOBYTES') || undefined,\n labelMegabytes: query('GET_LABEL_FILE_SIZE_MEGABYTES') || undefined,\n labelGigabytes: query('GET_LABEL_FILE_SIZE_GIGABYTES') || undefined,\n };\n },\n };\n };\n\n var hasRoomForItem = function hasRoomForItem(state) {\n var count = getActiveItems(state.items).length;\n\n // if cannot have multiple items, to add one item it should currently not contain items\n if (!state.options.allowMultiple) {\n return count === 0;\n }\n\n // if allows multiple items, we check if a max item count has been set, if not, there's no limit\n var maxFileCount = state.options.maxFiles;\n if (maxFileCount === null) {\n return true;\n }\n\n // we check if the current count is smaller than the max count, if so, another file can still be added\n if (count < maxFileCount) {\n return true;\n }\n\n // no more room for another file\n return false;\n };\n\n var limit = function limit(value, min, max) {\n return Math.max(Math.min(max, value), min);\n };\n\n var arrayInsert = function arrayInsert(arr, index, item) {\n return arr.splice(index, 0, item);\n };\n\n var insertItem = function insertItem(items, item, index) {\n if (isEmpty(item)) {\n return null;\n }\n\n // if index is undefined, append\n if (typeof index === 'undefined') {\n items.push(item);\n return item;\n }\n\n // limit the index to the size of the items array\n index = limit(index, 0, items.length);\n\n // add item to array\n arrayInsert(items, index, item);\n\n // expose\n return item;\n };\n\n var isBase64DataURI = function isBase64DataURI(str) {\n return /^\\s*data:([a-z]+\\/[a-z0-9-+.]+(;[a-z-]+=[a-z0-9-]+)?)?(;base64)?,([a-z0-9!$&',()*+;=\\-._~:@\\/?%\\s]*)\\s*$/i.test(\n str\n );\n };\n\n var getFilenameFromURL = function getFilenameFromURL(url) {\n return url\n .split('/')\n .pop()\n .split('?')\n .shift();\n };\n\n var getExtensionFromFilename = function getExtensionFromFilename(name) {\n return name.split('.').pop();\n };\n\n var guesstimateExtension = function guesstimateExtension(type) {\n // if no extension supplied, exit here\n if (typeof type !== 'string') {\n return '';\n }\n\n // get subtype\n var subtype = type.split('/').pop();\n\n // is svg subtype\n if (/svg/.test(subtype)) {\n return 'svg';\n }\n\n if (/zip|compressed/.test(subtype)) {\n return 'zip';\n }\n\n if (/plain/.test(subtype)) {\n return 'txt';\n }\n\n if (/msword/.test(subtype)) {\n return 'doc';\n }\n\n // if is valid subtype\n if (/[a-z]+/.test(subtype)) {\n // always use jpg extension\n if (subtype === 'jpeg') {\n return 'jpg';\n }\n\n // return subtype\n return subtype;\n }\n\n return '';\n };\n\n var leftPad = function leftPad(value) {\n var padding = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n return (padding + value).slice(-padding.length);\n };\n\n var getDateString = function getDateString() {\n var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();\n return (\n date.getFullYear() +\n '-' +\n leftPad(date.getMonth() + 1, '00') +\n '-' +\n leftPad(date.getDate(), '00') +\n '_' +\n leftPad(date.getHours(), '00') +\n '-' +\n leftPad(date.getMinutes(), '00') +\n '-' +\n leftPad(date.getSeconds(), '00')\n );\n };\n\n var getFileFromBlob = function getFileFromBlob(blob, filename) {\n var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n var extension = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;\n var file =\n typeof type === 'string'\n ? blob.slice(0, blob.size, type)\n : blob.slice(0, blob.size, blob.type);\n file.lastModifiedDate = new Date();\n\n // copy relative path\n if (blob._relativePath) file._relativePath = blob._relativePath;\n\n // if blob has name property, use as filename if no filename supplied\n if (!isString(filename)) {\n filename = getDateString();\n }\n\n // if filename supplied but no extension and filename has extension\n if (filename && extension === null && getExtensionFromFilename(filename)) {\n file.name = filename;\n } else {\n extension = extension || guesstimateExtension(file.type);\n file.name = filename + (extension ? '.' + extension : '');\n }\n\n return file;\n };\n\n var getBlobBuilder = function getBlobBuilder() {\n return (window.BlobBuilder =\n window.BlobBuilder ||\n window.WebKitBlobBuilder ||\n window.MozBlobBuilder ||\n window.MSBlobBuilder);\n };\n\n var createBlob = function createBlob(arrayBuffer, mimeType) {\n var BB = getBlobBuilder();\n\n if (BB) {\n var bb = new BB();\n bb.append(arrayBuffer);\n return bb.getBlob(mimeType);\n }\n\n return new Blob([arrayBuffer], {\n type: mimeType,\n });\n };\n\n var getBlobFromByteStringWithMimeType = function getBlobFromByteStringWithMimeType(\n byteString,\n mimeType\n ) {\n var ab = new ArrayBuffer(byteString.length);\n var ia = new Uint8Array(ab);\n\n for (var i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n\n return createBlob(ab, mimeType);\n };\n\n var getMimeTypeFromBase64DataURI = function getMimeTypeFromBase64DataURI(dataURI) {\n return (/^data:(.+);/.exec(dataURI) || [])[1] || null;\n };\n\n var getBase64DataFromBase64DataURI = function getBase64DataFromBase64DataURI(dataURI) {\n // get data part of string (remove data:image/jpeg...,)\n var data = dataURI.split(',')[1];\n\n // remove any whitespace as that causes InvalidCharacterError in IE\n return data.replace(/\\s/g, '');\n };\n\n var getByteStringFromBase64DataURI = function getByteStringFromBase64DataURI(dataURI) {\n return atob(getBase64DataFromBase64DataURI(dataURI));\n };\n\n var getBlobFromBase64DataURI = function getBlobFromBase64DataURI(dataURI) {\n var mimeType = getMimeTypeFromBase64DataURI(dataURI);\n var byteString = getByteStringFromBase64DataURI(dataURI);\n\n return getBlobFromByteStringWithMimeType(byteString, mimeType);\n };\n\n var getFileFromBase64DataURI = function getFileFromBase64DataURI(dataURI, filename, extension) {\n return getFileFromBlob(getBlobFromBase64DataURI(dataURI), filename, null, extension);\n };\n\n var getFileNameFromHeader = function getFileNameFromHeader(header) {\n // test if is content disposition header, if not exit\n if (!/^content-disposition:/i.test(header)) return null;\n\n // get filename parts\n var matches = header\n .split(/filename=|filename\\*=.+''/)\n .splice(1)\n .map(function(name) {\n return name.trim().replace(/^[\"']|[;\"']{0,2}$/g, '');\n })\n .filter(function(name) {\n return name.length;\n });\n\n return matches.length ? decodeURI(matches[matches.length - 1]) : null;\n };\n\n var getFileSizeFromHeader = function getFileSizeFromHeader(header) {\n if (/content-length:/i.test(header)) {\n var size = header.match(/[0-9]+/)[0];\n return size ? parseInt(size, 10) : null;\n }\n return null;\n };\n\n var getTranfserIdFromHeader = function getTranfserIdFromHeader(header) {\n if (/x-content-transfer-id:/i.test(header)) {\n var id = (header.split(':')[1] || '').trim();\n return id || null;\n }\n return null;\n };\n\n var getFileInfoFromHeaders = function getFileInfoFromHeaders(headers) {\n var info = {\n source: null,\n name: null,\n size: null,\n };\n\n var rows = headers.split('\\n');\n var _iteratorNormalCompletion = true;\n var _didIteratorError = false;\n var _iteratorError = undefined;\n try {\n for (\n var _iterator = rows[Symbol.iterator](), _step;\n !(_iteratorNormalCompletion = (_step = _iterator.next()).done);\n _iteratorNormalCompletion = true\n ) {\n var header = _step.value;\n\n var name = getFileNameFromHeader(header);\n if (name) {\n info.name = name;\n continue;\n }\n\n var size = getFileSizeFromHeader(header);\n if (size) {\n info.size = size;\n continue;\n }\n\n var source = getTranfserIdFromHeader(header);\n if (source) {\n info.source = source;\n continue;\n }\n }\n } catch (err) {\n _didIteratorError = true;\n _iteratorError = err;\n } finally {\n try {\n if (!_iteratorNormalCompletion && _iterator.return != null) {\n _iterator.return();\n }\n } finally {\n if (_didIteratorError) {\n throw _iteratorError;\n }\n }\n }\n\n return info;\n };\n\n var createFileLoader = function createFileLoader(fetchFn) {\n var state = {\n source: null,\n complete: false,\n progress: 0,\n size: null,\n timestamp: null,\n duration: 0,\n request: null,\n };\n\n var getProgress = function getProgress() {\n return state.progress;\n };\n var abort = function abort() {\n if (state.request && state.request.abort) {\n state.request.abort();\n }\n };\n\n // load source\n var load = function load() {\n // get quick reference\n var source = state.source;\n\n api.fire('init', source);\n\n // Load Files\n if (source instanceof File) {\n api.fire('load', source);\n } else if (source instanceof Blob) {\n // Load blobs, set default name to current date\n api.fire('load', getFileFromBlob(source, source.name));\n } else if (isBase64DataURI(source)) {\n // Load base 64, set default name to current date\n api.fire('load', getFileFromBase64DataURI(source));\n } else {\n // Deal as if is external URL, let's load it!\n loadURL(source);\n }\n };\n\n // loads a url\n var loadURL = function loadURL(url) {\n // is remote url and no fetch method supplied\n if (!fetchFn) {\n api.fire('error', {\n type: 'error',\n body: \"Can't load URL\",\n code: 400,\n });\n\n return;\n }\n\n // set request start\n state.timestamp = Date.now();\n\n // load file\n state.request = fetchFn(\n url,\n function(response) {\n // update duration\n state.duration = Date.now() - state.timestamp;\n\n // done!\n state.complete = true;\n\n // turn blob response into a file\n if (response instanceof Blob) {\n response = getFileFromBlob(\n response,\n response.name || getFilenameFromURL(url)\n );\n }\n\n api.fire(\n 'load',\n // if has received blob, we go with blob, if no response, we return null\n response instanceof Blob ? response : response ? response.body : null\n );\n },\n function(error) {\n api.fire(\n 'error',\n typeof error === 'string'\n ? {\n type: 'error',\n code: 0,\n body: error,\n }\n : error\n );\n },\n function(computable, current, total) {\n // collected some meta data already\n if (total) {\n state.size = total;\n }\n\n // update duration\n state.duration = Date.now() - state.timestamp;\n\n // if we can't compute progress, we're not going to fire progress events\n if (!computable) {\n state.progress = null;\n return;\n }\n\n // update progress percentage\n state.progress = current / total;\n\n // expose\n api.fire('progress', state.progress);\n },\n function() {\n api.fire('abort');\n },\n function(response) {\n var fileinfo = getFileInfoFromHeaders(\n typeof response === 'string' ? response : response.headers\n );\n api.fire('meta', {\n size: state.size || fileinfo.size,\n filename: fileinfo.name,\n source: fileinfo.source,\n });\n }\n );\n };\n\n var api = Object.assign({}, on(), {\n setSource: function setSource(source) {\n return (state.source = source);\n },\n getProgress: getProgress, // file load progress\n abort: abort, // abort file load\n load: load, // start load\n });\n\n return api;\n };\n\n var isGet = function isGet(method) {\n return /GET|HEAD/.test(method);\n };\n\n var sendRequest = function sendRequest(data, url, options) {\n var api = {\n onheaders: function onheaders() {},\n onprogress: function onprogress() {},\n onload: function onload() {},\n ontimeout: function ontimeout() {},\n onerror: function onerror() {},\n onabort: function onabort() {},\n abort: function abort() {\n aborted = true;\n xhr.abort();\n },\n };\n\n // timeout identifier, only used when timeout is defined\n var aborted = false;\n var headersReceived = false;\n\n // set default options\n options = Object.assign(\n {\n method: 'POST',\n headers: {},\n withCredentials: false,\n },\n options\n );\n\n // encode url\n url = encodeURI(url);\n\n // if method is GET, add any received data to url\n\n if (isGet(options.method) && data) {\n url =\n '' +\n url +\n encodeURIComponent(typeof data === 'string' ? data : JSON.stringify(data));\n }\n\n // create request\n var xhr = new XMLHttpRequest();\n\n // progress of load\n var process = isGet(options.method) ? xhr : xhr.upload;\n process.onprogress = function(e) {\n // no progress event when aborted ( onprogress is called once after abort() )\n if (aborted) {\n return;\n }\n\n api.onprogress(e.lengthComputable, e.loaded, e.total);\n };\n\n // tries to get header info to the app as fast as possible\n xhr.onreadystatechange = function() {\n // not interesting in these states ('unsent' and 'openend' as they don't give us any additional info)\n if (xhr.readyState < 2) {\n return;\n }\n\n // no server response\n if (xhr.readyState === 4 && xhr.status === 0) {\n return;\n }\n\n if (headersReceived) {\n return;\n }\n\n headersReceived = true;\n\n // we've probably received some useful data in response headers\n api.onheaders(xhr);\n };\n\n // load successful\n xhr.onload = function() {\n // is classified as valid response\n if (xhr.status >= 200 && xhr.status < 300) {\n api.onload(xhr);\n } else {\n api.onerror(xhr);\n }\n };\n\n // error during load\n xhr.onerror = function() {\n return api.onerror(xhr);\n };\n\n // request aborted\n xhr.onabort = function() {\n aborted = true;\n api.onabort();\n };\n\n // request timeout\n xhr.ontimeout = function() {\n return api.ontimeout(xhr);\n };\n\n // open up open up!\n xhr.open(options.method, url, true);\n\n // set timeout if defined (do it after open so IE11 plays ball)\n if (isInt(options.timeout)) {\n xhr.timeout = options.timeout;\n }\n\n // add headers\n Object.keys(options.headers).forEach(function(key) {\n var value = unescape(encodeURIComponent(options.headers[key]));\n xhr.setRequestHeader(key, value);\n });\n\n // set type of response\n if (options.responseType) {\n xhr.responseType = options.responseType;\n }\n\n // set credentials\n if (options.withCredentials) {\n xhr.withCredentials = true;\n }\n\n // let's send our data\n xhr.send(data);\n\n return api;\n };\n\n var createResponse = function createResponse(type, code, body, headers) {\n return {\n type: type,\n code: code,\n body: body,\n headers: headers,\n };\n };\n\n var createTimeoutResponse = function createTimeoutResponse(cb) {\n return function(xhr) {\n cb(createResponse('error', 0, 'Timeout', xhr.getAllResponseHeaders()));\n };\n };\n\n var hasQS = function hasQS(str) {\n return /\\?/.test(str);\n };\n var buildURL = function buildURL() {\n var url = '';\n for (var _len = arguments.length, parts = new Array(_len), _key = 0; _key < _len; _key++) {\n parts[_key] = arguments[_key];\n }\n parts.forEach(function(part) {\n url += hasQS(url) && hasQS(part) ? part.replace(/\\?/, '&') : part;\n });\n return url;\n };\n\n var createFetchFunction = function createFetchFunction() {\n var apiUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var action = arguments.length > 1 ? arguments[1] : undefined;\n // custom handler (should also handle file, load, error, progress and abort)\n if (typeof action === 'function') {\n return action;\n }\n\n // no action supplied\n if (!action || !isString(action.url)) {\n return null;\n }\n\n // set onload hanlder\n var onload =\n action.onload ||\n function(res) {\n return res;\n };\n var onerror =\n action.onerror ||\n function(res) {\n return null;\n };\n\n // internal handler\n return function(url, load, error, progress, abort, headers) {\n // do local or remote request based on if the url is external\n var request = sendRequest(\n url,\n buildURL(apiUrl, action.url),\n Object.assign({}, action, {\n responseType: 'blob',\n })\n );\n\n request.onload = function(xhr) {\n // get headers\n var headers = xhr.getAllResponseHeaders();\n\n // get filename\n var filename = getFileInfoFromHeaders(headers).name || getFilenameFromURL(url);\n\n // create response\n load(\n createResponse(\n 'load',\n xhr.status,\n action.method === 'HEAD'\n ? null\n : getFileFromBlob(onload(xhr.response), filename),\n headers\n )\n );\n };\n\n request.onerror = function(xhr) {\n error(\n createResponse(\n 'error',\n xhr.status,\n onerror(xhr.response) || xhr.statusText,\n xhr.getAllResponseHeaders()\n )\n );\n };\n\n request.onheaders = function(xhr) {\n headers(createResponse('headers', xhr.status, null, xhr.getAllResponseHeaders()));\n };\n\n request.ontimeout = createTimeoutResponse(error);\n request.onprogress = progress;\n request.onabort = abort;\n\n // should return request\n return request;\n };\n };\n\n var ChunkStatus = {\n QUEUED: 0,\n COMPLETE: 1,\n PROCESSING: 2,\n ERROR: 3,\n WAITING: 4,\n };\n\n /*\n function signature:\n (file, metadata, load, error, progress, abort, transfer, options) => {\n return {\n abort:() => {}\n }\n }\n */\n\n // apiUrl, action, name, file, metadata, load, error, progress, abort, transfer, options\n var processFileChunked = function processFileChunked(\n apiUrl,\n action,\n name,\n file,\n metadata,\n load,\n error,\n progress,\n abort,\n transfer,\n options\n ) {\n // all chunks\n var chunks = [];\n var chunkTransferId = options.chunkTransferId,\n chunkServer = options.chunkServer,\n chunkSize = options.chunkSize,\n chunkRetryDelays = options.chunkRetryDelays;\n\n // default state\n var state = {\n serverId: chunkTransferId,\n aborted: false,\n };\n\n // set onload handlers\n var ondata =\n action.ondata ||\n function(fd) {\n return fd;\n };\n var onload =\n action.onload ||\n function(xhr, method) {\n return method === 'HEAD' ? xhr.getResponseHeader('Upload-Offset') : xhr.response;\n };\n var onerror =\n action.onerror ||\n function(res) {\n return null;\n };\n\n // create server hook\n var requestTransferId = function requestTransferId(cb) {\n var formData = new FormData();\n\n // add metadata under same name\n if (isObject(metadata)) formData.append(name, JSON.stringify(metadata));\n\n var headers =\n typeof action.headers === 'function'\n ? action.headers(file, metadata)\n : Object.assign({}, action.headers, {\n 'Upload-Length': file.size,\n });\n\n var requestParams = Object.assign({}, action, {\n headers: headers,\n });\n\n // send request object\n var request = sendRequest(\n ondata(formData),\n buildURL(apiUrl, action.url),\n requestParams\n );\n\n request.onload = function(xhr) {\n return cb(onload(xhr, requestParams.method));\n };\n\n request.onerror = function(xhr) {\n return error(\n createResponse(\n 'error',\n xhr.status,\n onerror(xhr.response) || xhr.statusText,\n xhr.getAllResponseHeaders()\n )\n );\n };\n\n request.ontimeout = createTimeoutResponse(error);\n };\n\n var requestTransferOffset = function requestTransferOffset(cb) {\n var requestUrl = buildURL(apiUrl, chunkServer.url, state.serverId);\n\n var headers =\n typeof action.headers === 'function'\n ? action.headers(state.serverId)\n : Object.assign({}, action.headers);\n\n var requestParams = {\n headers: headers,\n method: 'HEAD',\n };\n\n var request = sendRequest(null, requestUrl, requestParams);\n\n request.onload = function(xhr) {\n return cb(onload(xhr, requestParams.method));\n };\n\n request.onerror = function(xhr) {\n return error(\n createResponse(\n 'error',\n xhr.status,\n onerror(xhr.response) || xhr.statusText,\n xhr.getAllResponseHeaders()\n )\n );\n };\n\n request.ontimeout = createTimeoutResponse(error);\n };\n\n // create chunks\n var lastChunkIndex = Math.floor(file.size / chunkSize);\n for (var i = 0; i <= lastChunkIndex; i++) {\n var offset = i * chunkSize;\n var data = file.slice(offset, offset + chunkSize, 'application/offset+octet-stream');\n chunks[i] = {\n index: i,\n size: data.size,\n offset: offset,\n data: data,\n file: file,\n progress: 0,\n retries: _toConsumableArray(chunkRetryDelays),\n status: ChunkStatus.QUEUED,\n error: null,\n request: null,\n timeout: null,\n };\n }\n\n var completeProcessingChunks = function completeProcessingChunks() {\n return load(state.serverId);\n };\n\n var canProcessChunk = function canProcessChunk(chunk) {\n return chunk.status === ChunkStatus.QUEUED || chunk.status === ChunkStatus.ERROR;\n };\n\n var processChunk = function processChunk(chunk) {\n // processing is paused, wait here\n if (state.aborted) return;\n\n // get next chunk to process\n chunk = chunk || chunks.find(canProcessChunk);\n\n // no more chunks to process\n if (!chunk) {\n // all done?\n if (\n chunks.every(function(chunk) {\n return chunk.status === ChunkStatus.COMPLETE;\n })\n ) {\n completeProcessingChunks();\n }\n\n // no chunk to handle\n return;\n }\n\n // now processing this chunk\n chunk.status = ChunkStatus.PROCESSING;\n chunk.progress = null;\n\n // allow parsing of formdata\n var ondata =\n chunkServer.ondata ||\n function(fd) {\n return fd;\n };\n var onerror =\n chunkServer.onerror ||\n function(res) {\n return null;\n };\n\n // send request object\n var requestUrl = buildURL(apiUrl, chunkServer.url, state.serverId);\n\n var headers =\n typeof chunkServer.headers === 'function'\n ? chunkServer.headers(chunk)\n : Object.assign({}, chunkServer.headers, {\n 'Content-Type': 'application/offset+octet-stream',\n 'Upload-Offset': chunk.offset,\n 'Upload-Length': file.size,\n 'Upload-Name': file.name,\n });\n\n var request = (chunk.request = sendRequest(\n ondata(chunk.data),\n requestUrl,\n Object.assign({}, chunkServer, {\n headers: headers,\n })\n ));\n\n request.onload = function() {\n // done!\n chunk.status = ChunkStatus.COMPLETE;\n\n // remove request reference\n chunk.request = null;\n\n // start processing more chunks\n processChunks();\n };\n\n request.onprogress = function(lengthComputable, loaded, total) {\n chunk.progress = lengthComputable ? loaded : null;\n updateTotalProgress();\n };\n\n request.onerror = function(xhr) {\n chunk.status = ChunkStatus.ERROR;\n chunk.request = null;\n chunk.error = onerror(xhr.response) || xhr.statusText;\n if (!retryProcessChunk(chunk)) {\n error(\n createResponse(\n 'error',\n xhr.status,\n onerror(xhr.response) || xhr.statusText,\n xhr.getAllResponseHeaders()\n )\n );\n }\n };\n\n request.ontimeout = function(xhr) {\n chunk.status = ChunkStatus.ERROR;\n chunk.request = null;\n if (!retryProcessChunk(chunk)) {\n createTimeoutResponse(error)(xhr);\n }\n };\n\n request.onabort = function() {\n chunk.status = ChunkStatus.QUEUED;\n chunk.request = null;\n abort();\n };\n };\n\n var retryProcessChunk = function retryProcessChunk(chunk) {\n // no more retries left\n if (chunk.retries.length === 0) return false;\n\n // new retry\n chunk.status = ChunkStatus.WAITING;\n clearTimeout(chunk.timeout);\n chunk.timeout = setTimeout(function() {\n processChunk(chunk);\n }, chunk.retries.shift());\n\n // we're going to retry\n return true;\n };\n\n var updateTotalProgress = function updateTotalProgress() {\n // calculate total progress fraction\n var totalBytesTransfered = chunks.reduce(function(p, chunk) {\n if (p === null || chunk.progress === null) return null;\n return p + chunk.progress;\n }, 0);\n\n // can't compute progress\n if (totalBytesTransfered === null) return progress(false, 0, 0);\n\n // calculate progress values\n var totalSize = chunks.reduce(function(total, chunk) {\n return total + chunk.size;\n }, 0);\n\n // can update progress indicator\n progress(true, totalBytesTransfered, totalSize);\n };\n\n // process new chunks\n var processChunks = function processChunks() {\n var totalProcessing = chunks.filter(function(chunk) {\n return chunk.status === ChunkStatus.PROCESSING;\n }).length;\n if (totalProcessing >= 1) return;\n processChunk();\n };\n\n var abortChunks = function abortChunks() {\n chunks.forEach(function(chunk) {\n clearTimeout(chunk.timeout);\n if (chunk.request) {\n chunk.request.abort();\n }\n });\n };\n\n // let's go!\n if (!state.serverId) {\n requestTransferId(function(serverId) {\n // stop here if aborted, might have happened in between request and callback\n if (state.aborted) return;\n\n // pass back to item so we can use it if something goes wrong\n transfer(serverId);\n\n // store internally\n state.serverId = serverId;\n processChunks();\n });\n } else {\n requestTransferOffset(function(offset) {\n // stop here if aborted, might have happened in between request and callback\n if (state.aborted) return;\n\n // mark chunks with lower offset as complete\n chunks\n .filter(function(chunk) {\n return chunk.offset < offset;\n })\n .forEach(function(chunk) {\n chunk.status = ChunkStatus.COMPLETE;\n chunk.progress = chunk.size;\n });\n\n // continue processing\n processChunks();\n });\n }\n\n return {\n abort: function abort() {\n state.aborted = true;\n abortChunks();\n },\n };\n };\n\n /*\n function signature:\n (file, metadata, load, error, progress, abort) => {\n return {\n abort:() => {}\n }\n }\n */\n var createFileProcessorFunction = function createFileProcessorFunction(\n apiUrl,\n action,\n name,\n options\n ) {\n return function(file, metadata, load, error, progress, abort, transfer) {\n // no file received\n if (!file) return;\n\n // if was passed a file, and we can chunk it, exit here\n var canChunkUpload = options.chunkUploads;\n var shouldChunkUpload = canChunkUpload && file.size > options.chunkSize;\n var willChunkUpload = canChunkUpload && (shouldChunkUpload || options.chunkForce);\n if (file instanceof Blob && willChunkUpload)\n return processFileChunked(\n apiUrl,\n action,\n name,\n file,\n metadata,\n load,\n error,\n progress,\n abort,\n transfer,\n options\n );\n\n // set handlers\n var ondata =\n action.ondata ||\n function(fd) {\n return fd;\n };\n var onload =\n action.onload ||\n function(res) {\n return res;\n };\n var onerror =\n action.onerror ||\n function(res) {\n return null;\n };\n\n var headers =\n typeof action.headers === 'function'\n ? action.headers(file, metadata) || {}\n : Object.assign(\n {},\n\n action.headers\n );\n\n var requestParams = Object.assign({}, action, {\n headers: headers,\n });\n\n // create formdata object\n var formData = new FormData();\n\n // add metadata under same name\n if (isObject(metadata)) {\n formData.append(name, JSON.stringify(metadata));\n }\n\n // Turn into an array of objects so no matter what the input, we can handle it the same way\n (file instanceof Blob ? [{ name: null, file: file }] : file).forEach(function(item) {\n formData.append(\n name,\n item.file,\n item.name === null ? item.file.name : '' + item.name + item.file.name\n );\n });\n\n // send request object\n var request = sendRequest(\n ondata(formData),\n buildURL(apiUrl, action.url),\n requestParams\n );\n request.onload = function(xhr) {\n load(\n createResponse(\n 'load',\n xhr.status,\n onload(xhr.response),\n xhr.getAllResponseHeaders()\n )\n );\n };\n\n request.onerror = function(xhr) {\n error(\n createResponse(\n 'error',\n xhr.status,\n onerror(xhr.response) || xhr.statusText,\n xhr.getAllResponseHeaders()\n )\n );\n };\n\n request.ontimeout = createTimeoutResponse(error);\n request.onprogress = progress;\n request.onabort = abort;\n\n // should return request\n return request;\n };\n };\n\n var createProcessorFunction = function createProcessorFunction() {\n var apiUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var action = arguments.length > 1 ? arguments[1] : undefined;\n var name = arguments.length > 2 ? arguments[2] : undefined;\n var options = arguments.length > 3 ? arguments[3] : undefined;\n\n // custom handler (should also handle file, load, error, progress and abort)\n if (typeof action === 'function')\n return function() {\n for (\n var _len = arguments.length, params = new Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n params[_key] = arguments[_key];\n }\n return action.apply(void 0, [name].concat(params, [options]));\n };\n\n // no action supplied\n if (!action || !isString(action.url)) return null;\n\n // internal handler\n return createFileProcessorFunction(apiUrl, action, name, options);\n };\n\n /*\n function signature:\n (uniqueFileId, load, error) => { }\n */\n var createRevertFunction = function createRevertFunction() {\n var apiUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var action = arguments.length > 1 ? arguments[1] : undefined;\n // is custom implementation\n if (typeof action === 'function') {\n return action;\n }\n\n // no action supplied, return stub function, interface will work, but file won't be removed\n if (!action || !isString(action.url)) {\n return function(uniqueFileId, load) {\n return load();\n };\n }\n\n // set onload hanlder\n var onload =\n action.onload ||\n function(res) {\n return res;\n };\n var onerror =\n action.onerror ||\n function(res) {\n return null;\n };\n\n // internal implementation\n return function(uniqueFileId, load, error) {\n var request = sendRequest(\n uniqueFileId,\n apiUrl + action.url,\n action // contains method, headers and withCredentials properties\n );\n request.onload = function(xhr) {\n load(\n createResponse(\n 'load',\n xhr.status,\n onload(xhr.response),\n xhr.getAllResponseHeaders()\n )\n );\n };\n\n request.onerror = function(xhr) {\n error(\n createResponse(\n 'error',\n xhr.status,\n onerror(xhr.response) || xhr.statusText,\n xhr.getAllResponseHeaders()\n )\n );\n };\n\n request.ontimeout = createTimeoutResponse(error);\n\n return request;\n };\n };\n\n var getRandomNumber = function getRandomNumber() {\n var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;\n return min + Math.random() * (max - min);\n };\n\n var createPerceivedPerformanceUpdater = function createPerceivedPerformanceUpdater(cb) {\n var duration = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1000;\n var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n var tickMin = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 25;\n var tickMax = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 250;\n var timeout = null;\n var start = Date.now();\n\n var tick = function tick() {\n var runtime = Date.now() - start;\n var delay = getRandomNumber(tickMin, tickMax);\n\n if (runtime + delay > duration) {\n delay = runtime + delay - duration;\n }\n\n var progress = runtime / duration;\n if (progress >= 1 || document.hidden) {\n cb(1);\n return;\n }\n\n cb(progress);\n\n timeout = setTimeout(tick, delay);\n };\n\n if (duration > 0) tick();\n\n return {\n clear: function clear() {\n clearTimeout(timeout);\n },\n };\n };\n\n var createFileProcessor = function createFileProcessor(processFn, options) {\n var state = {\n complete: false,\n perceivedProgress: 0,\n perceivedPerformanceUpdater: null,\n progress: null,\n timestamp: null,\n perceivedDuration: 0,\n duration: 0,\n request: null,\n response: null,\n };\n var allowMinimumUploadDuration = options.allowMinimumUploadDuration;\n\n var process = function process(file, metadata) {\n var progressFn = function progressFn() {\n // we've not yet started the real download, stop here\n // the request might not go through, for instance, there might be some server trouble\n // if state.progress is null, the server does not allow computing progress and we show the spinner instead\n if (state.duration === 0 || state.progress === null) return;\n\n // as we're now processing, fire the progress event\n api.fire('progress', api.getProgress());\n };\n\n var completeFn = function completeFn() {\n state.complete = true;\n api.fire('load-perceived', state.response.body);\n };\n\n // let's start processing\n api.fire('start');\n\n // set request start\n state.timestamp = Date.now();\n\n // create perceived performance progress indicator\n state.perceivedPerformanceUpdater = createPerceivedPerformanceUpdater(\n function(progress) {\n state.perceivedProgress = progress;\n state.perceivedDuration = Date.now() - state.timestamp;\n\n progressFn();\n\n // if fake progress is done, and a response has been received,\n // and we've not yet called the complete method\n if (state.response && state.perceivedProgress === 1 && !state.complete) {\n // we done!\n completeFn();\n }\n },\n // random delay as in a list of files you start noticing\n // files uploading at the exact same speed\n allowMinimumUploadDuration ? getRandomNumber(750, 1500) : 0\n );\n\n // remember request so we can abort it later\n state.request = processFn(\n // the file to process\n file,\n\n // the metadata to send along\n metadata,\n\n // callbacks (load, error, progress, abort, transfer)\n // load expects the body to be a server id if\n // you want to make use of revert\n function(response) {\n // we put the response in state so we can access\n // it outside of this method\n state.response = isObject(response)\n ? response\n : {\n type: 'load',\n code: 200,\n body: '' + response,\n headers: {},\n };\n\n // update duration\n state.duration = Date.now() - state.timestamp;\n\n // force progress to 1 as we're now done\n state.progress = 1;\n\n // actual load is done let's share results\n api.fire('load', state.response.body);\n\n // we are really done\n // if perceived progress is 1 ( wait for perceived progress to complete )\n // or if server does not support progress ( null )\n if (\n !allowMinimumUploadDuration ||\n (allowMinimumUploadDuration && state.perceivedProgress === 1)\n ) {\n completeFn();\n }\n },\n\n // error is expected to be an object with type, code, body\n function(error) {\n // cancel updater\n state.perceivedPerformanceUpdater.clear();\n\n // update others about this error\n api.fire(\n 'error',\n isObject(error)\n ? error\n : {\n type: 'error',\n code: 0,\n body: '' + error,\n }\n );\n },\n\n // actual processing progress\n function(computable, current, total) {\n // update actual duration\n state.duration = Date.now() - state.timestamp;\n\n // update actual progress\n state.progress = computable ? current / total : null;\n\n progressFn();\n },\n\n // abort does not expect a value\n function() {\n // stop updater\n state.perceivedPerformanceUpdater.clear();\n\n // fire the abort event so we can switch visuals\n api.fire('abort', state.response ? state.response.body : null);\n },\n\n // register the id for this transfer\n function(transferId) {\n api.fire('transfer', transferId);\n }\n );\n };\n\n var abort = function abort() {\n // no request running, can't abort\n if (!state.request) return;\n\n // stop updater\n state.perceivedPerformanceUpdater.clear();\n\n // abort actual request\n if (state.request.abort) state.request.abort();\n\n // if has response object, we've completed the request\n state.complete = true;\n };\n\n var reset = function reset() {\n abort();\n state.complete = false;\n state.perceivedProgress = 0;\n state.progress = 0;\n state.timestamp = null;\n state.perceivedDuration = 0;\n state.duration = 0;\n state.request = null;\n state.response = null;\n };\n\n var getProgress = allowMinimumUploadDuration\n ? function() {\n return state.progress ? Math.min(state.progress, state.perceivedProgress) : null;\n }\n : function() {\n return state.progress || null;\n };\n\n var getDuration = allowMinimumUploadDuration\n ? function() {\n return Math.min(state.duration, state.perceivedDuration);\n }\n : function() {\n return state.duration;\n };\n\n var api = Object.assign({}, on(), {\n process: process, // start processing file\n abort: abort, // abort active process request\n getProgress: getProgress,\n getDuration: getDuration,\n reset: reset,\n });\n\n return api;\n };\n\n var getFilenameWithoutExtension = function getFilenameWithoutExtension(name) {\n return name.substring(0, name.lastIndexOf('.')) || name;\n };\n\n var createFileStub = function createFileStub(source) {\n var data = [source.name, source.size, source.type];\n\n // is blob or base64, then we need to set the name\n if (source instanceof Blob || isBase64DataURI(source)) {\n data[0] = source.name || getDateString();\n } else if (isBase64DataURI(source)) {\n // if is base64 data uri we need to determine the average size and type\n data[1] = source.length;\n data[2] = getMimeTypeFromBase64DataURI(source);\n } else if (isString(source)) {\n // url\n data[0] = getFilenameFromURL(source);\n data[1] = 0;\n data[2] = 'application/octet-stream';\n }\n\n return {\n name: data[0],\n size: data[1],\n type: data[2],\n };\n };\n\n var isFile = function isFile(value) {\n return !!(value instanceof File || (value instanceof Blob && value.name));\n };\n\n var deepCloneObject = function deepCloneObject(src) {\n if (!isObject(src)) return src;\n var target = isArray(src) ? [] : {};\n for (var key in src) {\n if (!src.hasOwnProperty(key)) continue;\n var v = src[key];\n target[key] = v && isObject(v) ? deepCloneObject(v) : v;\n }\n return target;\n };\n\n var createItem = function createItem() {\n var origin = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n var serverFileReference =\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var file = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;\n // unique id for this item, is used to identify the item across views\n var id = getUniqueId();\n\n /**\n * Internal item state\n */\n var state = {\n // is archived\n archived: false,\n\n // if is frozen, no longer fires events\n frozen: false,\n\n // removed from view\n released: false,\n\n // original source\n source: null,\n\n // file model reference\n file: file,\n\n // id of file on server\n serverFileReference: serverFileReference,\n\n // id of file transfer on server\n transferId: null,\n\n // is aborted\n processingAborted: false,\n\n // current item status\n status: serverFileReference ? ItemStatus.PROCESSING_COMPLETE : ItemStatus.INIT,\n\n // active processes\n activeLoader: null,\n activeProcessor: null,\n };\n\n // callback used when abort processing is called to link back to the resolve method\n var abortProcessingRequestComplete = null;\n\n /**\n * Externally added item metadata\n */\n var metadata = {};\n\n // item data\n var setStatus = function setStatus(status) {\n return (state.status = status);\n };\n\n // fire event unless the item has been archived\n var fire = function fire(event) {\n if (state.released || state.frozen) return;\n for (\n var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1;\n _key < _len;\n _key++\n ) {\n params[_key - 1] = arguments[_key];\n }\n api.fire.apply(api, [event].concat(params));\n };\n\n // file data\n var getFileExtension = function getFileExtension() {\n return getExtensionFromFilename(state.file.name);\n };\n var getFileType = function getFileType() {\n return state.file.type;\n };\n var getFileSize = function getFileSize() {\n return state.file.size;\n };\n var getFile = function getFile() {\n return state.file;\n };\n\n //\n // logic to load a file\n //\n var load = function load(source, loader, onload) {\n // remember the original item source\n state.source = source;\n\n // source is known\n api.fireSync('init');\n\n // file stub is already there\n if (state.file) {\n api.fireSync('load-skip');\n return;\n }\n\n // set a stub file object while loading the actual data\n state.file = createFileStub(source);\n\n // starts loading\n loader.on('init', function() {\n fire('load-init');\n });\n\n // we'eve received a size indication, let's update the stub\n loader.on('meta', function(meta) {\n // set size of file stub\n state.file.size = meta.size;\n\n // set name of file stub\n state.file.filename = meta.filename;\n\n // if has received source, we done\n if (meta.source) {\n origin = FileOrigin.LIMBO;\n state.serverFileReference = meta.source;\n state.status = ItemStatus.PROCESSING_COMPLETE;\n }\n\n // size has been updated\n fire('load-meta');\n });\n\n // the file is now loading we need to update the progress indicators\n loader.on('progress', function(progress) {\n setStatus(ItemStatus.LOADING);\n\n fire('load-progress', progress);\n });\n\n // an error was thrown while loading the file, we need to switch to error state\n loader.on('error', function(error) {\n setStatus(ItemStatus.LOAD_ERROR);\n\n fire('load-request-error', error);\n });\n\n // user or another process aborted the file load (cannot retry)\n loader.on('abort', function() {\n setStatus(ItemStatus.INIT);\n fire('load-abort');\n });\n\n // done loading\n loader.on('load', function(file) {\n // as we've now loaded the file the loader is no longer required\n state.activeLoader = null;\n\n // called when file has loaded succesfully\n var success = function success(result) {\n // set (possibly) transformed file\n state.file = isFile(result) ? result : state.file;\n\n // file received\n if (origin === FileOrigin.LIMBO && state.serverFileReference) {\n setStatus(ItemStatus.PROCESSING_COMPLETE);\n } else {\n setStatus(ItemStatus.IDLE);\n }\n\n fire('load');\n };\n\n var error = function error(result) {\n // set original file\n state.file = file;\n fire('load-meta');\n\n setStatus(ItemStatus.LOAD_ERROR);\n fire('load-file-error', result);\n };\n\n // if we already have a server file reference, we don't need to call the onload method\n if (state.serverFileReference) {\n success(file);\n return;\n }\n\n // no server id, let's give this file the full treatment\n onload(file, success, error);\n });\n\n // set loader source data\n loader.setSource(source);\n\n // set as active loader\n state.activeLoader = loader;\n\n // load the source data\n loader.load();\n };\n\n var retryLoad = function retryLoad() {\n if (!state.activeLoader) {\n return;\n }\n state.activeLoader.load();\n };\n\n var abortLoad = function abortLoad() {\n if (state.activeLoader) {\n state.activeLoader.abort();\n return;\n }\n setStatus(ItemStatus.INIT);\n fire('load-abort');\n };\n\n //\n // logic to process a file\n //\n var process = function process(processor, onprocess) {\n // processing was aborted\n if (state.processingAborted) {\n state.processingAborted = false;\n return;\n }\n\n // now processing\n setStatus(ItemStatus.PROCESSING);\n\n // reset abort callback\n abortProcessingRequestComplete = null;\n\n // if no file loaded we'll wait for the load event\n if (!(state.file instanceof Blob)) {\n api.on('load', function() {\n process(processor, onprocess);\n });\n return;\n }\n\n // setup processor\n processor.on('load', function(serverFileReference) {\n // need this id to be able to revert the upload\n state.transferId = null;\n state.serverFileReference = serverFileReference;\n });\n\n // register transfer id\n processor.on('transfer', function(transferId) {\n // need this id to be able to revert the upload\n state.transferId = transferId;\n });\n\n processor.on('load-perceived', function(serverFileReference) {\n // no longer required\n state.activeProcessor = null;\n\n // need this id to be able to rever the upload\n state.transferId = null;\n state.serverFileReference = serverFileReference;\n\n setStatus(ItemStatus.PROCESSING_COMPLETE);\n fire('process-complete', serverFileReference);\n });\n\n processor.on('start', function() {\n fire('process-start');\n });\n\n processor.on('error', function(error) {\n state.activeProcessor = null;\n setStatus(ItemStatus.PROCESSING_ERROR);\n fire('process-error', error);\n });\n\n processor.on('abort', function(serverFileReference) {\n state.activeProcessor = null;\n\n // if file was uploaded but processing was cancelled during perceived processor time store file reference\n state.serverFileReference = serverFileReference;\n\n setStatus(ItemStatus.IDLE);\n fire('process-abort');\n\n // has timeout so doesn't interfere with remove action\n if (abortProcessingRequestComplete) {\n abortProcessingRequestComplete();\n }\n });\n\n processor.on('progress', function(progress) {\n fire('process-progress', progress);\n });\n\n // when successfully transformed\n var success = function success(file) {\n // if was archived in the mean time, don't process\n if (state.archived) return;\n\n // process file!\n processor.process(file, Object.assign({}, metadata));\n };\n\n // something went wrong during transform phase\n var error = console.error;\n\n // start processing the file\n onprocess(state.file, success, error);\n\n // set as active processor\n state.activeProcessor = processor;\n };\n\n var requestProcessing = function requestProcessing() {\n state.processingAborted = false;\n setStatus(ItemStatus.PROCESSING_QUEUED);\n };\n\n var abortProcessing = function abortProcessing() {\n return new Promise(function(resolve) {\n if (!state.activeProcessor) {\n state.processingAborted = true;\n\n setStatus(ItemStatus.IDLE);\n fire('process-abort');\n\n resolve();\n return;\n }\n\n abortProcessingRequestComplete = function abortProcessingRequestComplete() {\n resolve();\n };\n\n state.activeProcessor.abort();\n });\n };\n\n //\n // logic to revert a processed file\n //\n var revert = function revert(revertFileUpload, forceRevert) {\n return new Promise(function(resolve, reject) {\n // a completed upload will have a serverFileReference, a failed chunked upload where\n // getting a serverId succeeded but >=0 chunks have been uploaded will have transferId set\n var serverTransferId =\n state.serverFileReference !== null\n ? state.serverFileReference\n : state.transferId;\n\n // cannot revert without a server id for this process\n if (serverTransferId === null) {\n resolve();\n return;\n }\n\n // revert the upload (fire and forget)\n revertFileUpload(\n serverTransferId,\n function() {\n // reset file server id and transfer id as now it's not available on the server\n state.serverFileReference = null;\n state.transferId = null;\n resolve();\n },\n function(error) {\n // don't set error state when reverting is optional, it will always resolve\n if (!forceRevert) {\n resolve();\n return;\n }\n\n // oh no errors\n setStatus(ItemStatus.PROCESSING_REVERT_ERROR);\n fire('process-revert-error');\n reject(error);\n }\n );\n\n // fire event\n setStatus(ItemStatus.IDLE);\n fire('process-revert');\n });\n };\n\n // exposed methods\n var _setMetadata = function setMetadata(key, value, silent) {\n var keys = key.split('.');\n var root = keys[0];\n var last = keys.pop();\n var data = metadata;\n keys.forEach(function(key) {\n return (data = data[key]);\n });\n\n // compare old value against new value, if they're the same, we're not updating\n if (JSON.stringify(data[last]) === JSON.stringify(value)) return;\n\n // update value\n data[last] = value;\n\n // fire update\n fire('metadata-update', {\n key: root,\n value: metadata[root],\n silent: silent,\n });\n };\n\n var getMetadata = function getMetadata(key) {\n return deepCloneObject(key ? metadata[key] : metadata);\n };\n\n var api = Object.assign(\n {\n id: {\n get: function get() {\n return id;\n },\n },\n origin: {\n get: function get() {\n return origin;\n },\n set: function set(value) {\n return (origin = value);\n },\n },\n serverId: {\n get: function get() {\n return state.serverFileReference;\n },\n },\n transferId: {\n get: function get() {\n return state.transferId;\n },\n },\n status: {\n get: function get() {\n return state.status;\n },\n },\n filename: {\n get: function get() {\n return state.file.name;\n },\n },\n filenameWithoutExtension: {\n get: function get() {\n return getFilenameWithoutExtension(state.file.name);\n },\n },\n fileExtension: { get: getFileExtension },\n fileType: { get: getFileType },\n fileSize: { get: getFileSize },\n file: { get: getFile },\n relativePath: {\n get: function get() {\n return state.file._relativePath;\n },\n },\n\n source: {\n get: function get() {\n return state.source;\n },\n },\n\n getMetadata: getMetadata,\n setMetadata: function setMetadata(key, value, silent) {\n if (isObject(key)) {\n var data = key;\n Object.keys(data).forEach(function(key) {\n _setMetadata(key, data[key], value);\n });\n return key;\n }\n _setMetadata(key, value, silent);\n return value;\n },\n\n extend: function extend(name, handler) {\n return (itemAPI[name] = handler);\n },\n\n abortLoad: abortLoad,\n retryLoad: retryLoad,\n requestProcessing: requestProcessing,\n abortProcessing: abortProcessing,\n\n load: load,\n process: process,\n revert: revert,\n },\n\n on(),\n {\n freeze: function freeze() {\n return (state.frozen = true);\n },\n\n release: function release() {\n return (state.released = true);\n },\n released: {\n get: function get() {\n return state.released;\n },\n },\n\n archive: function archive() {\n return (state.archived = true);\n },\n archived: {\n get: function get() {\n return state.archived;\n },\n },\n }\n );\n\n // create it here instead of returning it instantly so we can extend it later\n var itemAPI = createObject(api);\n\n return itemAPI;\n };\n\n var getItemIndexByQuery = function getItemIndexByQuery(items, query) {\n // just return first index\n if (isEmpty(query)) {\n return 0;\n }\n\n // invalid queries\n if (!isString(query)) {\n return -1;\n }\n\n // return item by id (or -1 if not found)\n return items.findIndex(function(item) {\n return item.id === query;\n });\n };\n\n var getItemById = function getItemById(items, itemId) {\n var index = getItemIndexByQuery(items, itemId);\n if (index < 0) {\n return;\n }\n return items[index] || null;\n };\n\n var fetchBlob = function fetchBlob(url, load, error, progress, abort, headers) {\n var request = sendRequest(null, url, {\n method: 'GET',\n responseType: 'blob',\n });\n\n request.onload = function(xhr) {\n // get headers\n var headers = xhr.getAllResponseHeaders();\n\n // get filename\n var filename = getFileInfoFromHeaders(headers).name || getFilenameFromURL(url);\n\n // create response\n load(\n createResponse('load', xhr.status, getFileFromBlob(xhr.response, filename), headers)\n );\n };\n\n request.onerror = function(xhr) {\n error(createResponse('error', xhr.status, xhr.statusText, xhr.getAllResponseHeaders()));\n };\n\n request.onheaders = function(xhr) {\n headers(createResponse('headers', xhr.status, null, xhr.getAllResponseHeaders()));\n };\n\n request.ontimeout = createTimeoutResponse(error);\n request.onprogress = progress;\n request.onabort = abort;\n\n // should return request\n return request;\n };\n\n var getDomainFromURL = function getDomainFromURL(url) {\n if (url.indexOf('//') === 0) {\n url = location.protocol + url;\n }\n return url\n .toLowerCase()\n .replace('blob:', '')\n .replace(/([a-z])?:\\/\\//, '$1')\n .split('/')[0];\n };\n\n var isExternalURL = function isExternalURL(url) {\n return (\n (url.indexOf(':') > -1 || url.indexOf('//') > -1) &&\n getDomainFromURL(location.href) !== getDomainFromURL(url)\n );\n };\n\n var dynamicLabel = function dynamicLabel(label) {\n return function() {\n return isFunction(label) ? label.apply(void 0, arguments) : label;\n };\n };\n\n var isMockItem = function isMockItem(item) {\n return !isFile(item.file);\n };\n\n var listUpdated = function listUpdated(dispatch, state) {\n clearTimeout(state.listUpdateTimeout);\n state.listUpdateTimeout = setTimeout(function() {\n dispatch('DID_UPDATE_ITEMS', { items: getActiveItems(state.items) });\n }, 0);\n };\n\n var optionalPromise = function optionalPromise(fn) {\n for (\n var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1;\n _key < _len;\n _key++\n ) {\n params[_key - 1] = arguments[_key];\n }\n return new Promise(function(resolve) {\n if (!fn) {\n return resolve(true);\n }\n\n var result = fn.apply(void 0, params);\n\n if (result == null) {\n return resolve(true);\n }\n\n if (typeof result === 'boolean') {\n return resolve(result);\n }\n\n if (typeof result.then === 'function') {\n result.then(resolve);\n }\n });\n };\n\n var sortItems = function sortItems(state, compare) {\n state.items.sort(function(a, b) {\n return compare(createItemAPI(a), createItemAPI(b));\n });\n };\n\n // returns item based on state\n var getItemByQueryFromState = function getItemByQueryFromState(state, itemHandler) {\n return function() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n var query = _ref.query,\n _ref$success = _ref.success,\n success = _ref$success === void 0 ? function() {} : _ref$success,\n _ref$failure = _ref.failure,\n failure = _ref$failure === void 0 ? function() {} : _ref$failure,\n options = _objectWithoutProperties(_ref, ['query', 'success', 'failure']);\n var item = getItemByQuery(state.items, query);\n if (!item) {\n failure({\n error: createResponse('error', 0, 'Item not found'),\n file: null,\n });\n\n return;\n }\n itemHandler(item, success, failure, options || {});\n };\n };\n\n var actions = function actions(dispatch, query, state) {\n return {\n /**\n * Aborts all ongoing processes\n */\n ABORT_ALL: function ABORT_ALL() {\n getActiveItems(state.items).forEach(function(item) {\n item.freeze();\n item.abortLoad();\n item.abortProcessing();\n });\n },\n\n /**\n * Sets initial files\n */\n DID_SET_FILES: function DID_SET_FILES(_ref2) {\n var _ref2$value = _ref2.value,\n value = _ref2$value === void 0 ? [] : _ref2$value;\n // map values to file objects\n var files = value.map(function(file) {\n return {\n source: file.source ? file.source : file,\n options: file.options,\n };\n });\n\n // loop over files, if file is in list, leave it be, if not, remove\n // test if items should be moved\n var activeItems = getActiveItems(state.items);\n\n activeItems.forEach(function(item) {\n // if item not is in new value, remove\n if (\n !files.find(function(file) {\n return file.source === item.source || file.source === item.file;\n })\n ) {\n dispatch('REMOVE_ITEM', { query: item, remove: false });\n }\n });\n\n // add new files\n activeItems = getActiveItems(state.items);\n files.forEach(function(file, index) {\n // if file is already in list\n if (\n activeItems.find(function(item) {\n return item.source === file.source || item.file === file.source;\n })\n )\n return;\n\n // not in list, add\n dispatch(\n 'ADD_ITEM',\n Object.assign({}, file, {\n interactionMethod: InteractionMethod.NONE,\n index: index,\n })\n );\n });\n },\n\n DID_UPDATE_ITEM_METADATA: function DID_UPDATE_ITEM_METADATA(_ref3) {\n var id = _ref3.id,\n action = _ref3.action,\n change = _ref3.change;\n // don't do anything\n if (change.silent) return;\n\n // if is called multiple times in close succession we combined all calls together to save resources\n clearTimeout(state.itemUpdateTimeout);\n state.itemUpdateTimeout = setTimeout(function() {\n var item = getItemById(state.items, id);\n\n // only revert and attempt to upload when we're uploading to a server\n if (!query('IS_ASYNC')) {\n // should we update the output data\n applyFilterChain('SHOULD_PREPARE_OUTPUT', false, {\n item: item,\n query: query,\n action: action,\n change: change,\n }).then(function(shouldPrepareOutput) {\n // plugins determined the output data should be prepared (or not), can be adjusted with beforePrepareOutput hook\n var beforePrepareFile = query('GET_BEFORE_PREPARE_FILE');\n if (beforePrepareFile)\n shouldPrepareOutput = beforePrepareFile(item, shouldPrepareOutput);\n\n if (!shouldPrepareOutput) return;\n\n dispatch(\n 'REQUEST_PREPARE_OUTPUT',\n {\n query: id,\n item: item,\n success: function success(file) {\n dispatch('DID_PREPARE_OUTPUT', { id: id, file: file });\n },\n },\n\n true\n );\n });\n\n return;\n }\n\n // if is local item we need to enable upload button so change can be propagated to server\n if (item.origin === FileOrigin.LOCAL) {\n dispatch('DID_LOAD_ITEM', {\n id: item.id,\n error: null,\n serverFileReference: item.source,\n });\n }\n\n // for async scenarios\n var upload = function upload() {\n // we push this forward a bit so the interface is updated correctly\n setTimeout(function() {\n dispatch('REQUEST_ITEM_PROCESSING', { query: id });\n }, 32);\n };\n\n var revert = function revert(doUpload) {\n item.revert(\n createRevertFunction(\n state.options.server.url,\n state.options.server.revert\n ),\n query('GET_FORCE_REVERT')\n )\n .then(doUpload ? upload : function() {})\n .catch(function() {});\n };\n\n var abort = function abort(doUpload) {\n item.abortProcessing().then(doUpload ? upload : function() {});\n };\n\n // if we should re-upload the file immediately\n if (item.status === ItemStatus.PROCESSING_COMPLETE) {\n return revert(state.options.instantUpload);\n }\n\n // if currently uploading, cancel upload\n if (item.status === ItemStatus.PROCESSING) {\n return abort(state.options.instantUpload);\n }\n\n if (state.options.instantUpload) {\n upload();\n }\n }, 0);\n },\n\n MOVE_ITEM: function MOVE_ITEM(_ref4) {\n var query = _ref4.query,\n index = _ref4.index;\n var item = getItemByQuery(state.items, query);\n if (!item) return;\n var currentIndex = state.items.indexOf(item);\n index = limit(index, 0, state.items.length - 1);\n if (currentIndex === index) return;\n state.items.splice(index, 0, state.items.splice(currentIndex, 1)[0]);\n },\n\n SORT: function SORT(_ref5) {\n var compare = _ref5.compare;\n sortItems(state, compare);\n dispatch('DID_SORT_ITEMS', {\n items: query('GET_ACTIVE_ITEMS'),\n });\n },\n\n ADD_ITEMS: function ADD_ITEMS(_ref6) {\n var items = _ref6.items,\n index = _ref6.index,\n interactionMethod = _ref6.interactionMethod,\n _ref6$success = _ref6.success,\n success = _ref6$success === void 0 ? function() {} : _ref6$success,\n _ref6$failure = _ref6.failure,\n failure = _ref6$failure === void 0 ? function() {} : _ref6$failure;\n var currentIndex = index;\n\n if (index === -1 || typeof index === 'undefined') {\n var insertLocation = query('GET_ITEM_INSERT_LOCATION');\n var totalItems = query('GET_TOTAL_ITEMS');\n currentIndex = insertLocation === 'before' ? 0 : totalItems;\n }\n\n var ignoredFiles = query('GET_IGNORED_FILES');\n var isValidFile = function isValidFile(source) {\n return isFile(source)\n ? !ignoredFiles.includes(source.name.toLowerCase())\n : !isEmpty(source);\n };\n var validItems = items.filter(isValidFile);\n\n var promises = validItems.map(function(source) {\n return new Promise(function(resolve, reject) {\n dispatch('ADD_ITEM', {\n interactionMethod: interactionMethod,\n source: source.source || source,\n success: resolve,\n failure: reject,\n index: currentIndex++,\n options: source.options || {},\n });\n });\n });\n\n Promise.all(promises)\n .then(success)\n .catch(failure);\n },\n\n /**\n * @param source\n * @param index\n * @param interactionMethod\n */\n ADD_ITEM: function ADD_ITEM(_ref7) {\n var source = _ref7.source,\n _ref7$index = _ref7.index,\n index = _ref7$index === void 0 ? -1 : _ref7$index,\n interactionMethod = _ref7.interactionMethod,\n _ref7$success = _ref7.success,\n success = _ref7$success === void 0 ? function() {} : _ref7$success,\n _ref7$failure = _ref7.failure,\n failure = _ref7$failure === void 0 ? function() {} : _ref7$failure,\n _ref7$options = _ref7.options,\n options = _ref7$options === void 0 ? {} : _ref7$options;\n // if no source supplied\n if (isEmpty(source)) {\n failure({\n error: createResponse('error', 0, 'No source'),\n file: null,\n });\n\n return;\n }\n\n // filter out invalid file items, used to filter dropped directory contents\n if (\n isFile(source) &&\n state.options.ignoredFiles.includes(source.name.toLowerCase())\n ) {\n // fail silently\n return;\n }\n\n // test if there's still room in the list of files\n if (!hasRoomForItem(state)) {\n // if multiple allowed, we can't replace\n // or if only a single item is allowed but we're not allowed to replace it we exit\n if (\n state.options.allowMultiple ||\n (!state.options.allowMultiple && !state.options.allowReplace)\n ) {\n var error = createResponse('warning', 0, 'Max files');\n\n dispatch('DID_THROW_MAX_FILES', {\n source: source,\n error: error,\n });\n\n failure({ error: error, file: null });\n\n return;\n }\n\n // let's replace the item\n // id of first item we're about to remove\n var _item = getActiveItems(state.items)[0];\n\n // if has been processed remove it from the server as well\n if (\n _item.status === ItemStatus.PROCESSING_COMPLETE ||\n _item.status === ItemStatus.PROCESSING_REVERT_ERROR\n ) {\n var forceRevert = query('GET_FORCE_REVERT');\n _item\n .revert(\n createRevertFunction(\n state.options.server.url,\n state.options.server.revert\n ),\n forceRevert\n )\n .then(function() {\n if (!forceRevert) return;\n\n // try to add now\n dispatch('ADD_ITEM', {\n source: source,\n index: index,\n interactionMethod: interactionMethod,\n success: success,\n failure: failure,\n options: options,\n });\n })\n .catch(function() {}); // no need to handle this catch state for now\n\n if (forceRevert) return;\n }\n\n // remove first item as it will be replaced by this item\n dispatch('REMOVE_ITEM', { query: _item.id });\n }\n\n // where did the file originate\n var origin =\n options.type === 'local'\n ? FileOrigin.LOCAL\n : options.type === 'limbo'\n ? FileOrigin.LIMBO\n : FileOrigin.INPUT;\n\n // create a new blank item\n var item = createItem(\n // where did this file come from\n origin,\n\n // an input file never has a server file reference\n origin === FileOrigin.INPUT ? null : source,\n\n // file mock data, if defined\n options.file\n );\n\n // set initial meta data\n Object.keys(options.metadata || {}).forEach(function(key) {\n item.setMetadata(key, options.metadata[key]);\n });\n\n // created the item, let plugins add methods\n applyFilters('DID_CREATE_ITEM', item, { query: query, dispatch: dispatch });\n\n // where to insert new items\n var itemInsertLocation = query('GET_ITEM_INSERT_LOCATION');\n\n // adjust index if is not allowed to pick location\n if (!state.options.itemInsertLocationFreedom) {\n index = itemInsertLocation === 'before' ? -1 : state.items.length;\n }\n\n // add item to list\n insertItem(state.items, item, index);\n\n // sort items in list\n if (isFunction(itemInsertLocation) && source) {\n sortItems(state, itemInsertLocation);\n }\n\n // get a quick reference to the item id\n var id = item.id;\n\n // observe item events\n item.on('init', function() {\n dispatch('DID_INIT_ITEM', { id: id });\n });\n\n item.on('load-init', function() {\n dispatch('DID_START_ITEM_LOAD', { id: id });\n });\n\n item.on('load-meta', function() {\n dispatch('DID_UPDATE_ITEM_META', { id: id });\n });\n\n item.on('load-progress', function(progress) {\n dispatch('DID_UPDATE_ITEM_LOAD_PROGRESS', { id: id, progress: progress });\n });\n\n item.on('load-request-error', function(error) {\n var mainStatus = dynamicLabel(state.options.labelFileLoadError)(error);\n\n // is client error, no way to recover\n if (error.code >= 400 && error.code < 500) {\n dispatch('DID_THROW_ITEM_INVALID', {\n id: id,\n error: error,\n status: {\n main: mainStatus,\n sub: error.code + ' (' + error.body + ')',\n },\n });\n\n // reject the file so can be dealt with through API\n failure({ error: error, file: createItemAPI(item) });\n return;\n }\n\n // is possible server error, so might be possible to retry\n dispatch('DID_THROW_ITEM_LOAD_ERROR', {\n id: id,\n error: error,\n status: {\n main: mainStatus,\n sub: state.options.labelTapToRetry,\n },\n });\n });\n\n item.on('load-file-error', function(error) {\n dispatch('DID_THROW_ITEM_INVALID', {\n id: id,\n error: error.status,\n status: error.status,\n });\n\n failure({ error: error.status, file: createItemAPI(item) });\n });\n\n item.on('load-abort', function() {\n dispatch('REMOVE_ITEM', { query: id });\n });\n\n item.on('load-skip', function() {\n dispatch('COMPLETE_LOAD_ITEM', {\n query: id,\n item: item,\n data: {\n source: source,\n success: success,\n },\n });\n });\n\n item.on('load', function() {\n var handleAdd = function handleAdd(shouldAdd) {\n // no should not add this file\n if (!shouldAdd) {\n dispatch('REMOVE_ITEM', {\n query: id,\n });\n\n return;\n }\n\n // now interested in metadata updates\n item.on('metadata-update', function(change) {\n dispatch('DID_UPDATE_ITEM_METADATA', { id: id, change: change });\n });\n\n // let plugins decide if the output data should be prepared at this point\n // means we'll do this and wait for idle state\n applyFilterChain('SHOULD_PREPARE_OUTPUT', false, {\n item: item,\n query: query,\n }).then(function(shouldPrepareOutput) {\n // plugins determined the output data should be prepared (or not), can be adjusted with beforePrepareOutput hook\n var beforePrepareFile = query('GET_BEFORE_PREPARE_FILE');\n if (beforePrepareFile)\n shouldPrepareOutput = beforePrepareFile(item, shouldPrepareOutput);\n\n var loadComplete = function loadComplete() {\n dispatch('COMPLETE_LOAD_ITEM', {\n query: id,\n item: item,\n data: {\n source: source,\n success: success,\n },\n });\n\n listUpdated(dispatch, state);\n };\n\n // exit\n if (shouldPrepareOutput) {\n // wait for idle state and then run PREPARE_OUTPUT\n dispatch(\n 'REQUEST_PREPARE_OUTPUT',\n {\n query: id,\n item: item,\n success: function success(file) {\n dispatch('DID_PREPARE_OUTPUT', { id: id, file: file });\n loadComplete();\n },\n },\n\n true\n );\n\n return;\n }\n\n loadComplete();\n });\n };\n\n // item loaded, allow plugins to\n // - read data (quickly)\n // - add metadata\n applyFilterChain('DID_LOAD_ITEM', item, { query: query, dispatch: dispatch })\n .then(function() {\n optionalPromise(query('GET_BEFORE_ADD_FILE'), createItemAPI(item)).then(\n handleAdd\n );\n })\n .catch(function(e) {\n if (!e || !e.error || !e.status) return handleAdd(false);\n dispatch('DID_THROW_ITEM_INVALID', {\n id: id,\n error: e.error,\n status: e.status,\n });\n });\n });\n\n item.on('process-start', function() {\n dispatch('DID_START_ITEM_PROCESSING', { id: id });\n });\n\n item.on('process-progress', function(progress) {\n dispatch('DID_UPDATE_ITEM_PROCESS_PROGRESS', { id: id, progress: progress });\n });\n\n item.on('process-error', function(error) {\n dispatch('DID_THROW_ITEM_PROCESSING_ERROR', {\n id: id,\n error: error,\n status: {\n main: dynamicLabel(state.options.labelFileProcessingError)(error),\n sub: state.options.labelTapToRetry,\n },\n });\n });\n\n item.on('process-revert-error', function(error) {\n dispatch('DID_THROW_ITEM_PROCESSING_REVERT_ERROR', {\n id: id,\n error: error,\n status: {\n main: dynamicLabel(state.options.labelFileProcessingRevertError)(error),\n sub: state.options.labelTapToRetry,\n },\n });\n });\n\n item.on('process-complete', function(serverFileReference) {\n dispatch('DID_COMPLETE_ITEM_PROCESSING', {\n id: id,\n error: null,\n serverFileReference: serverFileReference,\n });\n\n dispatch('DID_DEFINE_VALUE', { id: id, value: serverFileReference });\n });\n\n item.on('process-abort', function() {\n dispatch('DID_ABORT_ITEM_PROCESSING', { id: id });\n });\n\n item.on('process-revert', function() {\n dispatch('DID_REVERT_ITEM_PROCESSING', { id: id });\n dispatch('DID_DEFINE_VALUE', { id: id, value: null });\n });\n\n // let view know the item has been inserted\n dispatch('DID_ADD_ITEM', {\n id: id,\n index: index,\n interactionMethod: interactionMethod,\n });\n\n listUpdated(dispatch, state);\n\n // start loading the source\n var _ref8 = state.options.server || {},\n url = _ref8.url,\n load = _ref8.load,\n restore = _ref8.restore,\n fetch = _ref8.fetch;\n\n item.load(\n source,\n\n // this creates a function that loads the file based on the type of file (string, base64, blob, file) and location of file (local, remote, limbo)\n createFileLoader(\n origin === FileOrigin.INPUT\n ? // input, if is remote, see if should use custom fetch, else use default fetchBlob\n isString(source) && isExternalURL(source)\n ? fetch\n ? createFetchFunction(url, fetch)\n : fetchBlob // remote url\n : fetchBlob // try to fetch url\n : // limbo or local\n origin === FileOrigin.LIMBO\n ? createFetchFunction(url, restore) // limbo\n : createFetchFunction(url, load) // local\n ),\n\n // called when the file is loaded so it can be piped through the filters\n function(file, success, error) {\n // let's process the file\n applyFilterChain('LOAD_FILE', file, { query: query })\n .then(success)\n .catch(error);\n }\n );\n },\n\n REQUEST_PREPARE_OUTPUT: function REQUEST_PREPARE_OUTPUT(_ref9) {\n var item = _ref9.item,\n success = _ref9.success,\n _ref9$failure = _ref9.failure,\n failure = _ref9$failure === void 0 ? function() {} : _ref9$failure;\n // error response if item archived\n var err = {\n error: createResponse('error', 0, 'Item not found'),\n file: null,\n };\n\n // don't handle archived items, an item could have been archived (load aborted) while waiting to be prepared\n if (item.archived) return failure(err);\n\n // allow plugins to alter the file data\n applyFilterChain('PREPARE_OUTPUT', item.file, { query: query, item: item }).then(\n function(result) {\n applyFilterChain('COMPLETE_PREPARE_OUTPUT', result, {\n query: query,\n item: item,\n }).then(function(result) {\n // don't handle archived items, an item could have been archived (load aborted) while being prepared\n if (item.archived) return failure(err);\n\n // we done!\n success(result);\n });\n }\n );\n },\n\n COMPLETE_LOAD_ITEM: function COMPLETE_LOAD_ITEM(_ref10) {\n var item = _ref10.item,\n data = _ref10.data;\n var success = data.success,\n source = data.source;\n\n // sort items in list\n var itemInsertLocation = query('GET_ITEM_INSERT_LOCATION');\n if (isFunction(itemInsertLocation) && source) {\n sortItems(state, itemInsertLocation);\n }\n\n // let interface know the item has loaded\n dispatch('DID_LOAD_ITEM', {\n id: item.id,\n error: null,\n serverFileReference: item.origin === FileOrigin.INPUT ? null : source,\n });\n\n // item has been successfully loaded and added to the\n // list of items so can now be safely returned for use\n success(createItemAPI(item));\n\n // if this is a local server file we need to show a different state\n if (item.origin === FileOrigin.LOCAL) {\n dispatch('DID_LOAD_LOCAL_ITEM', { id: item.id });\n return;\n }\n\n // if is a temp server file we prevent async upload call here (as the file is already on the server)\n if (item.origin === FileOrigin.LIMBO) {\n dispatch('DID_COMPLETE_ITEM_PROCESSING', {\n id: item.id,\n error: null,\n serverFileReference: source,\n });\n\n dispatch('DID_DEFINE_VALUE', {\n id: item.id,\n value: item.serverId || source,\n });\n\n return;\n }\n\n // id we are allowed to upload the file immediately, lets do it\n if (query('IS_ASYNC') && state.options.instantUpload) {\n dispatch('REQUEST_ITEM_PROCESSING', { query: item.id });\n }\n },\n\n RETRY_ITEM_LOAD: getItemByQueryFromState(state, function(item) {\n // try loading the source one more time\n item.retryLoad();\n }),\n\n REQUEST_ITEM_PREPARE: getItemByQueryFromState(state, function(item, _success, failure) {\n dispatch(\n 'REQUEST_PREPARE_OUTPUT',\n {\n query: item.id,\n item: item,\n success: function success(file) {\n dispatch('DID_PREPARE_OUTPUT', { id: item.id, file: file });\n _success({\n file: item,\n output: file,\n });\n },\n failure: failure,\n },\n\n true\n );\n }),\n\n REQUEST_ITEM_PROCESSING: getItemByQueryFromState(state, function(\n item,\n success,\n failure\n ) {\n // cannot be queued (or is already queued)\n var itemCanBeQueuedForProcessing =\n // waiting for something\n item.status === ItemStatus.IDLE ||\n // processing went wrong earlier\n item.status === ItemStatus.PROCESSING_ERROR;\n\n // not ready to be processed\n if (!itemCanBeQueuedForProcessing) {\n var processNow = function processNow() {\n return dispatch('REQUEST_ITEM_PROCESSING', {\n query: item,\n success: success,\n failure: failure,\n });\n };\n\n var process = function process() {\n return document.hidden ? processNow() : setTimeout(processNow, 32);\n };\n\n // if already done processing or tried to revert but didn't work, try again\n if (\n item.status === ItemStatus.PROCESSING_COMPLETE ||\n item.status === ItemStatus.PROCESSING_REVERT_ERROR\n ) {\n item.revert(\n createRevertFunction(\n state.options.server.url,\n state.options.server.revert\n ),\n query('GET_FORCE_REVERT')\n )\n .then(process)\n .catch(function() {}); // don't continue with processing if something went wrong\n } else if (item.status === ItemStatus.PROCESSING) {\n item.abortProcessing().then(process);\n }\n\n return;\n }\n\n // already queued for processing\n if (item.status === ItemStatus.PROCESSING_QUEUED) return;\n\n item.requestProcessing();\n\n dispatch('DID_REQUEST_ITEM_PROCESSING', { id: item.id });\n\n dispatch('PROCESS_ITEM', { query: item, success: success, failure: failure }, true);\n }),\n\n PROCESS_ITEM: getItemByQueryFromState(state, function(item, success, failure) {\n var maxParallelUploads = query('GET_MAX_PARALLEL_UPLOADS');\n var totalCurrentUploads = query('GET_ITEMS_BY_STATUS', ItemStatus.PROCESSING)\n .length;\n\n // queue and wait till queue is freed up\n if (totalCurrentUploads === maxParallelUploads) {\n // queue for later processing\n state.processingQueue.push({\n id: item.id,\n success: success,\n failure: failure,\n });\n\n // stop it!\n return;\n }\n\n // if was not queued or is already processing exit here\n if (item.status === ItemStatus.PROCESSING) return;\n\n var processNext = function processNext() {\n // process queueud items\n var queueEntry = state.processingQueue.shift();\n\n // no items left\n if (!queueEntry) return;\n\n // get item reference\n var id = queueEntry.id,\n success = queueEntry.success,\n failure = queueEntry.failure;\n var itemReference = getItemByQuery(state.items, id);\n\n // if item was archived while in queue, jump to next\n if (!itemReference || itemReference.archived) {\n processNext();\n return;\n }\n\n // process queued item\n dispatch(\n 'PROCESS_ITEM',\n { query: id, success: success, failure: failure },\n true\n );\n };\n\n // we done function\n item.onOnce('process-complete', function() {\n success(createItemAPI(item));\n processNext();\n\n // if origin is local, and we're instant uploading, trigger remove of original\n // as revert will remove file from list\n var server = state.options.server;\n var instantUpload = state.options.instantUpload;\n if (\n instantUpload &&\n item.origin === FileOrigin.LOCAL &&\n isFunction(server.remove)\n ) {\n var noop = function noop() {};\n item.origin = FileOrigin.LIMBO;\n state.options.server.remove(item.source, noop, noop);\n }\n\n // All items processed? No errors?\n var allItemsProcessed =\n query('GET_ITEMS_BY_STATUS', ItemStatus.PROCESSING_COMPLETE).length ===\n state.items.length;\n if (allItemsProcessed) {\n dispatch('DID_COMPLETE_ITEM_PROCESSING_ALL');\n }\n });\n\n // we error function\n item.onOnce('process-error', function(error) {\n failure({ error: error, file: createItemAPI(item) });\n processNext();\n });\n\n // start file processing\n var options = state.options;\n item.process(\n createFileProcessor(\n createProcessorFunction(\n options.server.url,\n options.server.process,\n options.name,\n {\n chunkTransferId: item.transferId,\n chunkServer: options.server.patch,\n chunkUploads: options.chunkUploads,\n chunkForce: options.chunkForce,\n chunkSize: options.chunkSize,\n chunkRetryDelays: options.chunkRetryDelays,\n }\n ),\n\n {\n allowMinimumUploadDuration: query('GET_ALLOW_MINIMUM_UPLOAD_DURATION'),\n }\n ),\n\n // called when the file is about to be processed so it can be piped through the transform filters\n function(file, success, error) {\n // allow plugins to alter the file data\n applyFilterChain('PREPARE_OUTPUT', file, { query: query, item: item })\n .then(function(file) {\n dispatch('DID_PREPARE_OUTPUT', { id: item.id, file: file });\n\n success(file);\n })\n .catch(error);\n }\n );\n }),\n\n RETRY_ITEM_PROCESSING: getItemByQueryFromState(state, function(item) {\n dispatch('REQUEST_ITEM_PROCESSING', { query: item });\n }),\n\n REQUEST_REMOVE_ITEM: getItemByQueryFromState(state, function(item) {\n optionalPromise(query('GET_BEFORE_REMOVE_FILE'), createItemAPI(item)).then(function(\n shouldRemove\n ) {\n if (!shouldRemove) {\n return;\n }\n dispatch('REMOVE_ITEM', { query: item });\n });\n }),\n\n RELEASE_ITEM: getItemByQueryFromState(state, function(item) {\n item.release();\n }),\n\n REMOVE_ITEM: getItemByQueryFromState(state, function(item, success, failure, options) {\n var removeFromView = function removeFromView() {\n // get id reference\n var id = item.id;\n\n // archive the item, this does not remove it from the list\n getItemById(state.items, id).archive();\n\n // tell the view the item has been removed\n dispatch('DID_REMOVE_ITEM', { error: null, id: id, item: item });\n\n // now the list has been modified\n listUpdated(dispatch, state);\n\n // correctly removed\n success(createItemAPI(item));\n };\n\n // if this is a local file and the `server.remove` function has been configured,\n // send source there so dev can remove file from server\n var server = state.options.server;\n if (\n item.origin === FileOrigin.LOCAL &&\n server &&\n isFunction(server.remove) &&\n options.remove !== false\n ) {\n dispatch('DID_START_ITEM_REMOVE', { id: item.id });\n\n server.remove(\n item.source,\n function() {\n return removeFromView();\n },\n function(status) {\n dispatch('DID_THROW_ITEM_REMOVE_ERROR', {\n id: item.id,\n error: createResponse('error', 0, status, null),\n status: {\n main: dynamicLabel(state.options.labelFileRemoveError)(status),\n sub: state.options.labelTapToRetry,\n },\n });\n }\n );\n } else {\n // if is requesting revert and can revert need to call revert handler (not calling request_ because that would also trigger beforeRemoveHook)\n if (\n (options.revert &&\n item.origin !== FileOrigin.LOCAL &&\n item.serverId !== null) ||\n // if chunked uploads are enabled and we're uploading in chunks for this specific file\n // or if the file isn't big enough for chunked uploads but chunkForce is set then call\n // revert before removing from the view...\n (state.options.chunkUploads && item.file.size > state.options.chunkSize) ||\n (state.options.chunkUploads && state.options.chunkForce)\n ) {\n item.revert(\n createRevertFunction(\n state.options.server.url,\n state.options.server.revert\n ),\n query('GET_FORCE_REVERT')\n );\n }\n\n // can now safely remove from view\n removeFromView();\n }\n }),\n\n ABORT_ITEM_LOAD: getItemByQueryFromState(state, function(item) {\n item.abortLoad();\n }),\n\n ABORT_ITEM_PROCESSING: getItemByQueryFromState(state, function(item) {\n // test if is already processed\n if (item.serverId) {\n dispatch('REVERT_ITEM_PROCESSING', { id: item.id });\n return;\n }\n\n // abort\n item.abortProcessing().then(function() {\n var shouldRemove = state.options.instantUpload;\n if (shouldRemove) {\n dispatch('REMOVE_ITEM', { query: item.id });\n }\n });\n }),\n\n REQUEST_REVERT_ITEM_PROCESSING: getItemByQueryFromState(state, function(item) {\n // not instant uploading, revert immediately\n if (!state.options.instantUpload) {\n dispatch('REVERT_ITEM_PROCESSING', { query: item });\n return;\n }\n\n // if we're instant uploading the file will also be removed if we revert,\n // so if a before remove file hook is defined we need to run it now\n var handleRevert = function handleRevert(shouldRevert) {\n if (!shouldRevert) return;\n dispatch('REVERT_ITEM_PROCESSING', { query: item });\n };\n\n var fn = query('GET_BEFORE_REMOVE_FILE');\n if (!fn) {\n return handleRevert(true);\n }\n\n var requestRemoveResult = fn(createItemAPI(item));\n if (requestRemoveResult == null) {\n // undefined or null\n return handleRevert(true);\n }\n\n if (typeof requestRemoveResult === 'boolean') {\n return handleRevert(requestRemoveResult);\n }\n\n if (typeof requestRemoveResult.then === 'function') {\n requestRemoveResult.then(handleRevert);\n }\n }),\n\n REVERT_ITEM_PROCESSING: getItemByQueryFromState(state, function(item) {\n item.revert(\n createRevertFunction(state.options.server.url, state.options.server.revert),\n query('GET_FORCE_REVERT')\n )\n .then(function() {\n var shouldRemove = state.options.instantUpload || isMockItem(item);\n if (shouldRemove) {\n dispatch('REMOVE_ITEM', { query: item.id });\n }\n })\n .catch(function() {});\n }),\n\n SET_OPTIONS: function SET_OPTIONS(_ref11) {\n var options = _ref11.options;\n // get all keys passed\n var optionKeys = Object.keys(options);\n\n // get prioritized keyed to include (remove once not in options object)\n var prioritizedOptionKeys = PrioritizedOptions.filter(function(key) {\n return optionKeys.includes(key);\n });\n\n // order the keys, prioritized first, then rest\n var orderedOptionKeys = [].concat(\n _toConsumableArray(prioritizedOptionKeys),\n _toConsumableArray(\n Object.keys(options).filter(function(key) {\n return !prioritizedOptionKeys.includes(key);\n })\n )\n );\n\n // dispatch set event for each option\n orderedOptionKeys.forEach(function(key) {\n dispatch('SET_' + fromCamels(key, '_').toUpperCase(), {\n value: options[key],\n });\n });\n },\n };\n };\n\n var PrioritizedOptions = ['server'];\n\n var formatFilename = function formatFilename(name) {\n return name;\n };\n\n var createElement$1 = function createElement(tagName) {\n return document.createElement(tagName);\n };\n\n var text = function text(node, value) {\n var textNode = node.childNodes[0];\n if (!textNode) {\n textNode = document.createTextNode(value);\n node.appendChild(textNode);\n } else if (value !== textNode.nodeValue) {\n textNode.nodeValue = value;\n }\n };\n\n var polarToCartesian = function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (((angleInDegrees % 360) - 90) * Math.PI) / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians),\n };\n };\n\n var describeArc = function describeArc(x, y, radius, startAngle, endAngle, arcSweep) {\n var start = polarToCartesian(x, y, radius, endAngle);\n var end = polarToCartesian(x, y, radius, startAngle);\n return ['M', start.x, start.y, 'A', radius, radius, 0, arcSweep, 0, end.x, end.y].join(' ');\n };\n\n var percentageArc = function percentageArc(x, y, radius, from, to) {\n var arcSweep = 1;\n if (to > from && to - from <= 0.5) {\n arcSweep = 0;\n }\n if (from > to && from - to >= 0.5) {\n arcSweep = 0;\n }\n return describeArc(\n x,\n y,\n radius,\n Math.min(0.9999, from) * 360,\n Math.min(0.9999, to) * 360,\n arcSweep\n );\n };\n\n var create = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n // start at 0\n props.spin = false;\n props.progress = 0;\n props.opacity = 0;\n\n // svg\n var svg = createElement('svg');\n root.ref.path = createElement('path', {\n 'stroke-width': 2,\n 'stroke-linecap': 'round',\n });\n\n svg.appendChild(root.ref.path);\n\n root.ref.svg = svg;\n\n root.appendChild(svg);\n };\n\n var write = function write(_ref2) {\n var root = _ref2.root,\n props = _ref2.props;\n if (props.opacity === 0) {\n return;\n }\n\n if (props.align) {\n root.element.dataset.align = props.align;\n }\n\n // get width of stroke\n var ringStrokeWidth = parseInt(attr(root.ref.path, 'stroke-width'), 10);\n\n // calculate size of ring\n var size = root.rect.element.width * 0.5;\n\n // ring state\n var ringFrom = 0;\n var ringTo = 0;\n\n // now in busy mode\n if (props.spin) {\n ringFrom = 0;\n ringTo = 0.5;\n } else {\n ringFrom = 0;\n ringTo = props.progress;\n }\n\n // get arc path\n var coordinates = percentageArc(size, size, size - ringStrokeWidth, ringFrom, ringTo);\n\n // update progress bar\n attr(root.ref.path, 'd', coordinates);\n\n // hide while contains 0 value\n attr(root.ref.path, 'stroke-opacity', props.spin || props.progress > 0 ? 1 : 0);\n };\n\n var progressIndicator = createView({\n tag: 'div',\n name: 'progress-indicator',\n ignoreRectUpdate: true,\n ignoreRect: true,\n create: create,\n write: write,\n mixins: {\n apis: ['progress', 'spin', 'align'],\n styles: ['opacity'],\n animations: {\n opacity: { type: 'tween', duration: 500 },\n progress: {\n type: 'spring',\n stiffness: 0.95,\n damping: 0.65,\n mass: 10,\n },\n },\n },\n });\n\n var create$1 = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n root.element.innerHTML = (props.icon || '') + ('<span>' + props.label + '</span>');\n\n props.isDisabled = false;\n };\n\n var write$1 = function write(_ref2) {\n var root = _ref2.root,\n props = _ref2.props;\n var isDisabled = props.isDisabled;\n var shouldDisable = root.query('GET_DISABLED') || props.opacity === 0;\n\n if (shouldDisable && !isDisabled) {\n props.isDisabled = true;\n attr(root.element, 'disabled', 'disabled');\n } else if (!shouldDisable && isDisabled) {\n props.isDisabled = false;\n root.element.removeAttribute('disabled');\n }\n };\n\n var fileActionButton = createView({\n tag: 'button',\n attributes: {\n type: 'button',\n },\n\n ignoreRect: true,\n ignoreRectUpdate: true,\n name: 'file-action-button',\n mixins: {\n apis: ['label'],\n styles: ['translateX', 'translateY', 'scaleX', 'scaleY', 'opacity'],\n animations: {\n scaleX: 'spring',\n scaleY: 'spring',\n translateX: 'spring',\n translateY: 'spring',\n opacity: { type: 'tween', duration: 250 },\n },\n\n listeners: true,\n },\n\n create: create$1,\n write: write$1,\n });\n\n var toNaturalFileSize = function toNaturalFileSize(bytes) {\n var decimalSeparator =\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '.';\n var base = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1000;\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n var _options$labelBytes = options.labelBytes,\n labelBytes = _options$labelBytes === void 0 ? 'bytes' : _options$labelBytes,\n _options$labelKilobyt = options.labelKilobytes,\n labelKilobytes = _options$labelKilobyt === void 0 ? 'KB' : _options$labelKilobyt,\n _options$labelMegabyt = options.labelMegabytes,\n labelMegabytes = _options$labelMegabyt === void 0 ? 'MB' : _options$labelMegabyt,\n _options$labelGigabyt = options.labelGigabytes,\n labelGigabytes = _options$labelGigabyt === void 0 ? 'GB' : _options$labelGigabyt;\n\n // no negative byte sizes\n bytes = Math.round(Math.abs(bytes));\n\n var KB = base;\n var MB = base * base;\n var GB = base * base * base;\n\n // just bytes\n if (bytes < KB) {\n return bytes + ' ' + labelBytes;\n }\n\n // kilobytes\n if (bytes < MB) {\n return Math.floor(bytes / KB) + ' ' + labelKilobytes;\n }\n\n // megabytes\n if (bytes < GB) {\n return removeDecimalsWhenZero(bytes / MB, 1, decimalSeparator) + ' ' + labelMegabytes;\n }\n\n // gigabytes\n return removeDecimalsWhenZero(bytes / GB, 2, decimalSeparator) + ' ' + labelGigabytes;\n };\n\n var removeDecimalsWhenZero = function removeDecimalsWhenZero(value, decimalCount, separator) {\n return value\n .toFixed(decimalCount)\n .split('.')\n .filter(function(part) {\n return part !== '0';\n })\n .join(separator);\n };\n\n var create$2 = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n // filename\n var fileName = createElement$1('span');\n fileName.className = 'filepond--file-info-main';\n // hide for screenreaders\n // the file is contained in a fieldset with legend that contains the filename\n // no need to read it twice\n attr(fileName, 'aria-hidden', 'true');\n root.appendChild(fileName);\n root.ref.fileName = fileName;\n\n // filesize\n var fileSize = createElement$1('span');\n fileSize.className = 'filepond--file-info-sub';\n root.appendChild(fileSize);\n root.ref.fileSize = fileSize;\n\n // set initial values\n text(fileSize, root.query('GET_LABEL_FILE_WAITING_FOR_SIZE'));\n text(fileName, formatFilename(root.query('GET_ITEM_NAME', props.id)));\n };\n\n var updateFile = function updateFile(_ref2) {\n var root = _ref2.root,\n props = _ref2.props;\n text(\n root.ref.fileSize,\n toNaturalFileSize(\n root.query('GET_ITEM_SIZE', props.id),\n '.',\n root.query('GET_FILE_SIZE_BASE'),\n root.query('GET_FILE_SIZE_LABELS', root.query)\n )\n );\n\n text(root.ref.fileName, formatFilename(root.query('GET_ITEM_NAME', props.id)));\n };\n\n var updateFileSizeOnError = function updateFileSizeOnError(_ref3) {\n var root = _ref3.root,\n props = _ref3.props;\n // if size is available don't fallback to unknown size message\n if (isInt(root.query('GET_ITEM_SIZE', props.id))) {\n updateFile({ root: root, props: props });\n return;\n }\n\n text(root.ref.fileSize, root.query('GET_LABEL_FILE_SIZE_NOT_AVAILABLE'));\n };\n\n var fileInfo = createView({\n name: 'file-info',\n ignoreRect: true,\n ignoreRectUpdate: true,\n write: createRoute({\n DID_LOAD_ITEM: updateFile,\n DID_UPDATE_ITEM_META: updateFile,\n DID_THROW_ITEM_LOAD_ERROR: updateFileSizeOnError,\n DID_THROW_ITEM_INVALID: updateFileSizeOnError,\n }),\n\n didCreateView: function didCreateView(root) {\n applyFilters('CREATE_VIEW', Object.assign({}, root, { view: root }));\n },\n create: create$2,\n mixins: {\n styles: ['translateX', 'translateY'],\n animations: {\n translateX: 'spring',\n translateY: 'spring',\n },\n },\n });\n\n var toPercentage = function toPercentage(value) {\n return Math.round(value * 100);\n };\n\n var create$3 = function create(_ref) {\n var root = _ref.root;\n\n // main status\n var main = createElement$1('span');\n main.className = 'filepond--file-status-main';\n root.appendChild(main);\n root.ref.main = main;\n\n // sub status\n var sub = createElement$1('span');\n sub.className = 'filepond--file-status-sub';\n root.appendChild(sub);\n root.ref.sub = sub;\n\n didSetItemLoadProgress({ root: root, action: { progress: null } });\n };\n\n var didSetItemLoadProgress = function didSetItemLoadProgress(_ref2) {\n var root = _ref2.root,\n action = _ref2.action;\n var title =\n action.progress === null\n ? root.query('GET_LABEL_FILE_LOADING')\n : root.query('GET_LABEL_FILE_LOADING') + ' ' + toPercentage(action.progress) + '%';\n\n text(root.ref.main, title);\n text(root.ref.sub, root.query('GET_LABEL_TAP_TO_CANCEL'));\n };\n\n var didSetItemProcessProgress = function didSetItemProcessProgress(_ref3) {\n var root = _ref3.root,\n action = _ref3.action;\n var title =\n action.progress === null\n ? root.query('GET_LABEL_FILE_PROCESSING')\n : root.query('GET_LABEL_FILE_PROCESSING') +\n ' ' +\n toPercentage(action.progress) +\n '%';\n\n text(root.ref.main, title);\n text(root.ref.sub, root.query('GET_LABEL_TAP_TO_CANCEL'));\n };\n\n var didRequestItemProcessing = function didRequestItemProcessing(_ref4) {\n var root = _ref4.root;\n text(root.ref.main, root.query('GET_LABEL_FILE_PROCESSING'));\n text(root.ref.sub, root.query('GET_LABEL_TAP_TO_CANCEL'));\n };\n\n var didAbortItemProcessing = function didAbortItemProcessing(_ref5) {\n var root = _ref5.root;\n text(root.ref.main, root.query('GET_LABEL_FILE_PROCESSING_ABORTED'));\n text(root.ref.sub, root.query('GET_LABEL_TAP_TO_RETRY'));\n };\n\n var didCompleteItemProcessing = function didCompleteItemProcessing(_ref6) {\n var root = _ref6.root;\n text(root.ref.main, root.query('GET_LABEL_FILE_PROCESSING_COMPLETE'));\n text(root.ref.sub, root.query('GET_LABEL_TAP_TO_UNDO'));\n };\n\n var clear = function clear(_ref7) {\n var root = _ref7.root;\n text(root.ref.main, '');\n text(root.ref.sub, '');\n };\n\n var error = function error(_ref8) {\n var root = _ref8.root,\n action = _ref8.action;\n text(root.ref.main, action.status.main);\n text(root.ref.sub, action.status.sub);\n };\n\n var fileStatus = createView({\n name: 'file-status',\n ignoreRect: true,\n ignoreRectUpdate: true,\n write: createRoute({\n DID_LOAD_ITEM: clear,\n DID_REVERT_ITEM_PROCESSING: clear,\n DID_REQUEST_ITEM_PROCESSING: didRequestItemProcessing,\n DID_ABORT_ITEM_PROCESSING: didAbortItemProcessing,\n DID_COMPLETE_ITEM_PROCESSING: didCompleteItemProcessing,\n DID_UPDATE_ITEM_PROCESS_PROGRESS: didSetItemProcessProgress,\n DID_UPDATE_ITEM_LOAD_PROGRESS: didSetItemLoadProgress,\n DID_THROW_ITEM_LOAD_ERROR: error,\n DID_THROW_ITEM_INVALID: error,\n DID_THROW_ITEM_PROCESSING_ERROR: error,\n DID_THROW_ITEM_PROCESSING_REVERT_ERROR: error,\n DID_THROW_ITEM_REMOVE_ERROR: error,\n }),\n\n didCreateView: function didCreateView(root) {\n applyFilters('CREATE_VIEW', Object.assign({}, root, { view: root }));\n },\n create: create$3,\n mixins: {\n styles: ['translateX', 'translateY', 'opacity'],\n animations: {\n opacity: { type: 'tween', duration: 250 },\n translateX: 'spring',\n translateY: 'spring',\n },\n },\n });\n\n /**\n * Button definitions for the file view\n */\n\n var Buttons = {\n AbortItemLoad: {\n label: 'GET_LABEL_BUTTON_ABORT_ITEM_LOAD',\n action: 'ABORT_ITEM_LOAD',\n className: 'filepond--action-abort-item-load',\n align: 'LOAD_INDICATOR_POSITION', // right\n },\n RetryItemLoad: {\n label: 'GET_LABEL_BUTTON_RETRY_ITEM_LOAD',\n action: 'RETRY_ITEM_LOAD',\n icon: 'GET_ICON_RETRY',\n className: 'filepond--action-retry-item-load',\n align: 'BUTTON_PROCESS_ITEM_POSITION', // right\n },\n RemoveItem: {\n label: 'GET_LABEL_BUTTON_REMOVE_ITEM',\n action: 'REQUEST_REMOVE_ITEM',\n icon: 'GET_ICON_REMOVE',\n className: 'filepond--action-remove-item',\n align: 'BUTTON_REMOVE_ITEM_POSITION', // left\n },\n ProcessItem: {\n label: 'GET_LABEL_BUTTON_PROCESS_ITEM',\n action: 'REQUEST_ITEM_PROCESSING',\n icon: 'GET_ICON_PROCESS',\n className: 'filepond--action-process-item',\n align: 'BUTTON_PROCESS_ITEM_POSITION', // right\n },\n AbortItemProcessing: {\n label: 'GET_LABEL_BUTTON_ABORT_ITEM_PROCESSING',\n action: 'ABORT_ITEM_PROCESSING',\n className: 'filepond--action-abort-item-processing',\n align: 'BUTTON_PROCESS_ITEM_POSITION', // right\n },\n RetryItemProcessing: {\n label: 'GET_LABEL_BUTTON_RETRY_ITEM_PROCESSING',\n action: 'RETRY_ITEM_PROCESSING',\n icon: 'GET_ICON_RETRY',\n className: 'filepond--action-retry-item-processing',\n align: 'BUTTON_PROCESS_ITEM_POSITION', // right\n },\n RevertItemProcessing: {\n label: 'GET_LABEL_BUTTON_UNDO_ITEM_PROCESSING',\n action: 'REQUEST_REVERT_ITEM_PROCESSING',\n icon: 'GET_ICON_UNDO',\n className: 'filepond--action-revert-item-processing',\n align: 'BUTTON_PROCESS_ITEM_POSITION', // right\n },\n };\n\n // make a list of buttons, we can then remove buttons from this list if they're disabled\n var ButtonKeys = [];\n forin(Buttons, function(key) {\n ButtonKeys.push(key);\n });\n\n var calculateFileInfoOffset = function calculateFileInfoOffset(root) {\n if (getRemoveIndicatorAligment(root) === 'right') return 0;\n var buttonRect = root.ref.buttonRemoveItem.rect.element;\n return buttonRect.hidden ? null : buttonRect.width + buttonRect.left;\n };\n\n var calculateButtonWidth = function calculateButtonWidth(root) {\n var buttonRect = root.ref.buttonAbortItemLoad.rect.element;\n return buttonRect.width;\n };\n\n // Force on full pixels so text stays crips\n var calculateFileVerticalCenterOffset = function calculateFileVerticalCenterOffset(root) {\n return Math.floor(root.ref.buttonRemoveItem.rect.element.height / 4);\n };\n var calculateFileHorizontalCenterOffset = function calculateFileHorizontalCenterOffset(root) {\n return Math.floor(root.ref.buttonRemoveItem.rect.element.left / 2);\n };\n\n var getLoadIndicatorAlignment = function getLoadIndicatorAlignment(root) {\n return root.query('GET_STYLE_LOAD_INDICATOR_POSITION');\n };\n var getProcessIndicatorAlignment = function getProcessIndicatorAlignment(root) {\n return root.query('GET_STYLE_PROGRESS_INDICATOR_POSITION');\n };\n var getRemoveIndicatorAligment = function getRemoveIndicatorAligment(root) {\n return root.query('GET_STYLE_BUTTON_REMOVE_ITEM_POSITION');\n };\n\n var DefaultStyle = {\n buttonAbortItemLoad: { opacity: 0 },\n buttonRetryItemLoad: { opacity: 0 },\n buttonRemoveItem: { opacity: 0 },\n buttonProcessItem: { opacity: 0 },\n buttonAbortItemProcessing: { opacity: 0 },\n buttonRetryItemProcessing: { opacity: 0 },\n buttonRevertItemProcessing: { opacity: 0 },\n loadProgressIndicator: { opacity: 0, align: getLoadIndicatorAlignment },\n processProgressIndicator: { opacity: 0, align: getProcessIndicatorAlignment },\n processingCompleteIndicator: { opacity: 0, scaleX: 0.75, scaleY: 0.75 },\n info: { translateX: 0, translateY: 0, opacity: 0 },\n status: { translateX: 0, translateY: 0, opacity: 0 },\n };\n\n var IdleStyle = {\n buttonRemoveItem: { opacity: 1 },\n buttonProcessItem: { opacity: 1 },\n info: { translateX: calculateFileInfoOffset },\n status: { translateX: calculateFileInfoOffset },\n };\n\n var ProcessingStyle = {\n buttonAbortItemProcessing: { opacity: 1 },\n processProgressIndicator: { opacity: 1 },\n status: { opacity: 1 },\n };\n\n var StyleMap = {\n DID_THROW_ITEM_INVALID: {\n buttonRemoveItem: { opacity: 1 },\n info: { translateX: calculateFileInfoOffset },\n status: { translateX: calculateFileInfoOffset, opacity: 1 },\n },\n\n DID_START_ITEM_LOAD: {\n buttonAbortItemLoad: { opacity: 1 },\n loadProgressIndicator: { opacity: 1 },\n status: { opacity: 1 },\n },\n\n DID_THROW_ITEM_LOAD_ERROR: {\n buttonRetryItemLoad: { opacity: 1 },\n buttonRemoveItem: { opacity: 1 },\n info: { translateX: calculateFileInfoOffset },\n status: { opacity: 1 },\n },\n\n DID_START_ITEM_REMOVE: {\n processProgressIndicator: { opacity: 1, align: getRemoveIndicatorAligment },\n info: { translateX: calculateFileInfoOffset },\n status: { opacity: 0 },\n },\n\n DID_THROW_ITEM_REMOVE_ERROR: {\n processProgressIndicator: { opacity: 0, align: getRemoveIndicatorAligment },\n buttonRemoveItem: { opacity: 1 },\n info: { translateX: calculateFileInfoOffset },\n status: { opacity: 1, translateX: calculateFileInfoOffset },\n },\n\n DID_LOAD_ITEM: IdleStyle,\n DID_LOAD_LOCAL_ITEM: {\n buttonRemoveItem: { opacity: 1 },\n info: { translateX: calculateFileInfoOffset },\n status: { translateX: calculateFileInfoOffset },\n },\n\n DID_START_ITEM_PROCESSING: ProcessingStyle,\n DID_REQUEST_ITEM_PROCESSING: ProcessingStyle,\n DID_UPDATE_ITEM_PROCESS_PROGRESS: ProcessingStyle,\n DID_COMPLETE_ITEM_PROCESSING: {\n buttonRevertItemProcessing: { opacity: 1 },\n info: { opacity: 1 },\n status: { opacity: 1 },\n },\n\n DID_THROW_ITEM_PROCESSING_ERROR: {\n buttonRemoveItem: { opacity: 1 },\n buttonRetryItemProcessing: { opacity: 1 },\n status: { opacity: 1 },\n info: { translateX: calculateFileInfoOffset },\n },\n\n DID_THROW_ITEM_PROCESSING_REVERT_ERROR: {\n buttonRevertItemProcessing: { opacity: 1 },\n status: { opacity: 1 },\n info: { opacity: 1 },\n },\n\n DID_ABORT_ITEM_PROCESSING: {\n buttonRemoveItem: { opacity: 1 },\n buttonProcessItem: { opacity: 1 },\n info: { translateX: calculateFileInfoOffset },\n status: { opacity: 1 },\n },\n\n DID_REVERT_ITEM_PROCESSING: IdleStyle,\n };\n\n // complete indicator view\n var processingCompleteIndicatorView = createView({\n create: function create(_ref) {\n var root = _ref.root;\n root.element.innerHTML = root.query('GET_ICON_DONE');\n },\n name: 'processing-complete-indicator',\n ignoreRect: true,\n mixins: {\n styles: ['scaleX', 'scaleY', 'opacity'],\n animations: {\n scaleX: 'spring',\n scaleY: 'spring',\n opacity: { type: 'tween', duration: 250 },\n },\n },\n });\n\n /**\n * Creates the file view\n */\n var create$4 = function create(_ref2) {\n var root = _ref2.root,\n props = _ref2.props;\n // copy Buttons object\n var LocalButtons = Object.keys(Buttons).reduce(function(prev, curr) {\n prev[curr] = Object.assign({}, Buttons[curr]);\n return prev;\n }, {});\n var id = props.id;\n\n // allow reverting upload\n var allowRevert = root.query('GET_ALLOW_REVERT');\n\n // allow remove file\n var allowRemove = root.query('GET_ALLOW_REMOVE');\n\n // allow processing upload\n var allowProcess = root.query('GET_ALLOW_PROCESS');\n\n // is instant uploading, need this to determine the icon of the undo button\n var instantUpload = root.query('GET_INSTANT_UPLOAD');\n\n // is async set up\n var isAsync = root.query('IS_ASYNC');\n\n // should align remove item buttons\n var alignRemoveItemButton = root.query('GET_STYLE_BUTTON_REMOVE_ITEM_ALIGN');\n\n // enabled buttons array\n var buttonFilter;\n if (isAsync) {\n if (allowProcess && !allowRevert) {\n // only remove revert button\n buttonFilter = function buttonFilter(key) {\n return !/RevertItemProcessing/.test(key);\n };\n } else if (!allowProcess && allowRevert) {\n // only remove process button\n buttonFilter = function buttonFilter(key) {\n return !/ProcessItem|RetryItemProcessing|AbortItemProcessing/.test(key);\n };\n } else if (!allowProcess && !allowRevert) {\n // remove all process buttons\n buttonFilter = function buttonFilter(key) {\n return !/Process/.test(key);\n };\n }\n } else {\n // no process controls available\n buttonFilter = function buttonFilter(key) {\n return !/Process/.test(key);\n };\n }\n\n var enabledButtons = buttonFilter ? ButtonKeys.filter(buttonFilter) : ButtonKeys.concat();\n\n // update icon and label for revert button when instant uploading\n if (instantUpload && allowRevert) {\n LocalButtons['RevertItemProcessing'].label = 'GET_LABEL_BUTTON_REMOVE_ITEM';\n LocalButtons['RevertItemProcessing'].icon = 'GET_ICON_REMOVE';\n }\n\n // remove last button (revert) if not allowed\n if (isAsync && !allowRevert) {\n var map = StyleMap['DID_COMPLETE_ITEM_PROCESSING'];\n map.info.translateX = calculateFileHorizontalCenterOffset;\n map.info.translateY = calculateFileVerticalCenterOffset;\n map.status.translateY = calculateFileVerticalCenterOffset;\n map.processingCompleteIndicator = { opacity: 1, scaleX: 1, scaleY: 1 };\n }\n\n // should align center\n if (isAsync && !allowProcess) {\n [\n 'DID_START_ITEM_PROCESSING',\n 'DID_REQUEST_ITEM_PROCESSING',\n 'DID_UPDATE_ITEM_PROCESS_PROGRESS',\n 'DID_THROW_ITEM_PROCESSING_ERROR',\n ].forEach(function(key) {\n StyleMap[key].status.translateY = calculateFileVerticalCenterOffset;\n });\n StyleMap['DID_THROW_ITEM_PROCESSING_ERROR'].status.translateX = calculateButtonWidth;\n }\n\n // move remove button to right\n if (alignRemoveItemButton && allowRevert) {\n LocalButtons['RevertItemProcessing'].align = 'BUTTON_REMOVE_ITEM_POSITION';\n var _map = StyleMap['DID_COMPLETE_ITEM_PROCESSING'];\n _map.info.translateX = calculateFileInfoOffset;\n _map.status.translateY = calculateFileVerticalCenterOffset;\n _map.processingCompleteIndicator = { opacity: 1, scaleX: 1, scaleY: 1 };\n }\n\n // show/hide RemoveItem button\n if (!allowRemove) {\n LocalButtons['RemoveItem'].disabled = true;\n }\n\n // create the button views\n forin(LocalButtons, function(key, definition) {\n // create button\n var buttonView = root.createChildView(fileActionButton, {\n label: root.query(definition.label),\n icon: root.query(definition.icon),\n opacity: 0,\n });\n\n // should be appended?\n if (enabledButtons.includes(key)) {\n root.appendChildView(buttonView);\n }\n\n // toggle\n if (definition.disabled) {\n buttonView.element.setAttribute('disabled', 'disabled');\n buttonView.element.setAttribute('hidden', 'hidden');\n }\n\n // add position attribute\n buttonView.element.dataset.align = root.query('GET_STYLE_' + definition.align);\n\n // add class\n buttonView.element.classList.add(definition.className);\n\n // handle interactions\n buttonView.on('click', function(e) {\n e.stopPropagation();\n if (definition.disabled) return;\n root.dispatch(definition.action, { query: id });\n });\n\n // set reference\n root.ref['button' + key] = buttonView;\n });\n\n // checkmark\n root.ref.processingCompleteIndicator = root.appendChildView(\n root.createChildView(processingCompleteIndicatorView)\n );\n\n root.ref.processingCompleteIndicator.element.dataset.align = root.query(\n 'GET_STYLE_BUTTON_PROCESS_ITEM_POSITION'\n );\n\n // create file info view\n root.ref.info = root.appendChildView(root.createChildView(fileInfo, { id: id }));\n\n // create file status view\n root.ref.status = root.appendChildView(root.createChildView(fileStatus, { id: id }));\n\n // add progress indicators\n var loadIndicatorView = root.appendChildView(\n root.createChildView(progressIndicator, {\n opacity: 0,\n align: root.query('GET_STYLE_LOAD_INDICATOR_POSITION'),\n })\n );\n\n loadIndicatorView.element.classList.add('filepond--load-indicator');\n root.ref.loadProgressIndicator = loadIndicatorView;\n\n var progressIndicatorView = root.appendChildView(\n root.createChildView(progressIndicator, {\n opacity: 0,\n align: root.query('GET_STYLE_PROGRESS_INDICATOR_POSITION'),\n })\n );\n\n progressIndicatorView.element.classList.add('filepond--process-indicator');\n root.ref.processProgressIndicator = progressIndicatorView;\n\n // current active styles\n root.ref.activeStyles = [];\n };\n\n var write$2 = function write(_ref3) {\n var root = _ref3.root,\n actions = _ref3.actions,\n props = _ref3.props;\n // route actions\n route({ root: root, actions: actions, props: props });\n\n // select last state change action\n var action = actions\n .concat()\n .filter(function(action) {\n return /^DID_/.test(action.type);\n })\n .reverse()\n .find(function(action) {\n return StyleMap[action.type];\n });\n\n // a new action happened, let's get the matching styles\n if (action) {\n // define new active styles\n root.ref.activeStyles = [];\n\n var stylesToApply = StyleMap[action.type];\n forin(DefaultStyle, function(name, defaultStyles) {\n // get reference to control\n var control = root.ref[name];\n\n // loop over all styles for this control\n forin(defaultStyles, function(key, defaultValue) {\n var value =\n stylesToApply[name] && typeof stylesToApply[name][key] !== 'undefined'\n ? stylesToApply[name][key]\n : defaultValue;\n root.ref.activeStyles.push({ control: control, key: key, value: value });\n });\n });\n }\n\n // apply active styles to element\n root.ref.activeStyles.forEach(function(_ref4) {\n var control = _ref4.control,\n key = _ref4.key,\n value = _ref4.value;\n control[key] = typeof value === 'function' ? value(root) : value;\n });\n };\n\n var route = createRoute({\n DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING: function DID_SET_LABEL_BUTTON_ABORT_ITEM_PROCESSING(\n _ref5\n ) {\n var root = _ref5.root,\n action = _ref5.action;\n root.ref.buttonAbortItemProcessing.label = action.value;\n },\n DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD: function DID_SET_LABEL_BUTTON_ABORT_ITEM_LOAD(_ref6) {\n var root = _ref6.root,\n action = _ref6.action;\n root.ref.buttonAbortItemLoad.label = action.value;\n },\n DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL: function DID_SET_LABEL_BUTTON_ABORT_ITEM_REMOVAL(\n _ref7\n ) {\n var root = _ref7.root,\n action = _ref7.action;\n root.ref.buttonAbortItemRemoval.label = action.value;\n },\n DID_REQUEST_ITEM_PROCESSING: function DID_REQUEST_ITEM_PROCESSING(_ref8) {\n var root = _ref8.root;\n root.ref.processProgressIndicator.spin = true;\n root.ref.processProgressIndicator.progress = 0;\n },\n DID_START_ITEM_LOAD: function DID_START_ITEM_LOAD(_ref9) {\n var root = _ref9.root;\n root.ref.loadProgressIndicator.spin = true;\n root.ref.loadProgressIndicator.progress = 0;\n },\n DID_START_ITEM_REMOVE: function DID_START_ITEM_REMOVE(_ref10) {\n var root = _ref10.root;\n root.ref.processProgressIndicator.spin = true;\n root.ref.processProgressIndicator.progress = 0;\n },\n DID_UPDATE_ITEM_LOAD_PROGRESS: function DID_UPDATE_ITEM_LOAD_PROGRESS(_ref11) {\n var root = _ref11.root,\n action = _ref11.action;\n root.ref.loadProgressIndicator.spin = false;\n root.ref.loadProgressIndicator.progress = action.progress;\n },\n DID_UPDATE_ITEM_PROCESS_PROGRESS: function DID_UPDATE_ITEM_PROCESS_PROGRESS(_ref12) {\n var root = _ref12.root,\n action = _ref12.action;\n root.ref.processProgressIndicator.spin = false;\n root.ref.processProgressIndicator.progress = action.progress;\n },\n });\n\n var file = createView({\n create: create$4,\n write: write$2,\n didCreateView: function didCreateView(root) {\n applyFilters('CREATE_VIEW', Object.assign({}, root, { view: root }));\n },\n name: 'file',\n });\n\n /**\n * Creates the file view\n */\n var create$5 = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n\n // filename\n root.ref.fileName = createElement$1('legend');\n root.appendChild(root.ref.fileName);\n\n // file appended\n root.ref.file = root.appendChildView(root.createChildView(file, { id: props.id }));\n\n // data has moved to data.js\n root.ref.data = false;\n };\n\n /**\n * Data storage\n */\n var didLoadItem = function didLoadItem(_ref2) {\n var root = _ref2.root,\n props = _ref2.props;\n // updates the legend of the fieldset so screenreaders can better group buttons\n text(root.ref.fileName, formatFilename(root.query('GET_ITEM_NAME', props.id)));\n };\n\n var fileWrapper = createView({\n create: create$5,\n ignoreRect: true,\n write: createRoute({\n DID_LOAD_ITEM: didLoadItem,\n }),\n\n didCreateView: function didCreateView(root) {\n applyFilters('CREATE_VIEW', Object.assign({}, root, { view: root }));\n },\n tag: 'fieldset',\n name: 'file-wrapper',\n });\n\n var PANEL_SPRING_PROPS = { type: 'spring', damping: 0.6, mass: 7 };\n\n var create$6 = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n [\n {\n name: 'top',\n },\n\n {\n name: 'center',\n props: {\n translateY: null,\n scaleY: null,\n },\n\n mixins: {\n animations: {\n scaleY: PANEL_SPRING_PROPS,\n },\n\n styles: ['translateY', 'scaleY'],\n },\n },\n\n {\n name: 'bottom',\n props: {\n translateY: null,\n },\n\n mixins: {\n animations: {\n translateY: PANEL_SPRING_PROPS,\n },\n\n styles: ['translateY'],\n },\n },\n ].forEach(function(section) {\n createSection(root, section, props.name);\n });\n\n root.element.classList.add('filepond--' + props.name);\n\n root.ref.scalable = null;\n };\n\n var createSection = function createSection(root, section, className) {\n var viewConstructor = createView({\n name: 'panel-' + section.name + ' filepond--' + className,\n mixins: section.mixins,\n ignoreRectUpdate: true,\n });\n\n var view = root.createChildView(viewConstructor, section.props);\n\n root.ref[section.name] = root.appendChildView(view);\n };\n\n var write$3 = function write(_ref2) {\n var root = _ref2.root,\n props = _ref2.props;\n\n // update scalable state\n if (root.ref.scalable === null || props.scalable !== root.ref.scalable) {\n root.ref.scalable = isBoolean(props.scalable) ? props.scalable : true;\n root.element.dataset.scalable = root.ref.scalable;\n }\n\n // no height, can't set\n if (!props.height) return;\n\n // get child rects\n var topRect = root.ref.top.rect.element;\n var bottomRect = root.ref.bottom.rect.element;\n\n // make sure height never is smaller than bottom and top seciton heights combined (will probably never happen, but who knows)\n var height = Math.max(topRect.height + bottomRect.height, props.height);\n\n // offset center part\n root.ref.center.translateY = topRect.height;\n\n // scale center part\n // use math ceil to prevent transparent lines because of rounding errors\n root.ref.center.scaleY = (height - topRect.height - bottomRect.height) / 100;\n\n // offset bottom part\n root.ref.bottom.translateY = height - bottomRect.height;\n };\n\n var panel = createView({\n name: 'panel',\n read: function read(_ref3) {\n var root = _ref3.root,\n props = _ref3.props;\n return (props.heightCurrent = root.ref.bottom.translateY);\n },\n write: write$3,\n create: create$6,\n ignoreRect: true,\n mixins: {\n apis: ['height', 'heightCurrent', 'scalable'],\n },\n });\n\n var createDragHelper = function createDragHelper(items) {\n var itemIds = items.map(function(item) {\n return item.id;\n });\n var prevIndex = undefined;\n return {\n setIndex: function setIndex(index) {\n prevIndex = index;\n },\n getIndex: function getIndex() {\n return prevIndex;\n },\n getItemIndex: function getItemIndex(item) {\n return itemIds.indexOf(item.id);\n },\n };\n };\n\n var ITEM_TRANSLATE_SPRING = {\n type: 'spring',\n stiffness: 0.75,\n damping: 0.45,\n mass: 10,\n };\n\n var ITEM_SCALE_SPRING = 'spring';\n\n var StateMap = {\n DID_START_ITEM_LOAD: 'busy',\n DID_UPDATE_ITEM_LOAD_PROGRESS: 'loading',\n DID_THROW_ITEM_INVALID: 'load-invalid',\n DID_THROW_ITEM_LOAD_ERROR: 'load-error',\n DID_LOAD_ITEM: 'idle',\n DID_THROW_ITEM_REMOVE_ERROR: 'remove-error',\n DID_START_ITEM_REMOVE: 'busy',\n DID_START_ITEM_PROCESSING: 'busy processing',\n DID_REQUEST_ITEM_PROCESSING: 'busy processing',\n DID_UPDATE_ITEM_PROCESS_PROGRESS: 'processing',\n DID_COMPLETE_ITEM_PROCESSING: 'processing-complete',\n DID_THROW_ITEM_PROCESSING_ERROR: 'processing-error',\n DID_THROW_ITEM_PROCESSING_REVERT_ERROR: 'processing-revert-error',\n DID_ABORT_ITEM_PROCESSING: 'cancelled',\n DID_REVERT_ITEM_PROCESSING: 'idle',\n };\n\n /**\n * Creates the file view\n */\n var create$7 = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n\n // select\n root.ref.handleClick = function(e) {\n return root.dispatch('DID_ACTIVATE_ITEM', { id: props.id });\n };\n\n // set id\n root.element.id = 'filepond--item-' + props.id;\n root.element.addEventListener('click', root.ref.handleClick);\n\n // file view\n root.ref.container = root.appendChildView(\n root.createChildView(fileWrapper, { id: props.id })\n );\n\n // file panel\n root.ref.panel = root.appendChildView(root.createChildView(panel, { name: 'item-panel' }));\n\n // default start height\n root.ref.panel.height = null;\n\n // by default not marked for removal\n props.markedForRemoval = false;\n\n // if not allowed to reorder file items, exit here\n if (!root.query('GET_ALLOW_REORDER')) return;\n\n // set to idle so shows grab cursor\n root.element.dataset.dragState = 'idle';\n\n var grab = function grab(e) {\n if (!e.isPrimary) return;\n\n var removedActivateListener = false;\n\n var origin = {\n x: e.pageX,\n y: e.pageY,\n };\n\n props.dragOrigin = {\n x: root.translateX,\n y: root.translateY,\n };\n\n props.dragCenter = {\n x: e.offsetX,\n y: e.offsetY,\n };\n\n var dragState = createDragHelper(root.query('GET_ACTIVE_ITEMS'));\n\n root.dispatch('DID_GRAB_ITEM', { id: props.id, dragState: dragState });\n\n var drag = function drag(e) {\n if (!e.isPrimary) return;\n\n e.stopPropagation();\n e.preventDefault();\n\n props.dragOffset = {\n x: e.pageX - origin.x,\n y: e.pageY - origin.y,\n };\n\n // if dragged stop listening to clicks, will re-add when done dragging\n var dist =\n props.dragOffset.x * props.dragOffset.x +\n props.dragOffset.y * props.dragOffset.y;\n if (dist > 16 && !removedActivateListener) {\n removedActivateListener = true;\n root.element.removeEventListener('click', root.ref.handleClick);\n }\n\n root.dispatch('DID_DRAG_ITEM', { id: props.id, dragState: dragState });\n };\n\n var drop = function drop(e) {\n if (!e.isPrimary) return;\n\n document.removeEventListener('pointermove', drag);\n document.removeEventListener('pointerup', drop);\n\n props.dragOffset = {\n x: e.pageX - origin.x,\n y: e.pageY - origin.y,\n };\n\n root.dispatch('DID_DROP_ITEM', { id: props.id, dragState: dragState });\n\n // start listening to clicks again\n if (removedActivateListener) {\n setTimeout(function() {\n return root.element.addEventListener('click', root.ref.handleClick);\n }, 0);\n }\n };\n\n document.addEventListener('pointermove', drag);\n document.addEventListener('pointerup', drop);\n };\n\n root.element.addEventListener('pointerdown', grab);\n };\n\n var route$1 = createRoute({\n DID_UPDATE_PANEL_HEIGHT: function DID_UPDATE_PANEL_HEIGHT(_ref2) {\n var root = _ref2.root,\n action = _ref2.action;\n root.height = action.height;\n },\n });\n\n var write$4 = createRoute(\n {\n DID_GRAB_ITEM: function DID_GRAB_ITEM(_ref3) {\n var root = _ref3.root,\n props = _ref3.props;\n props.dragOrigin = {\n x: root.translateX,\n y: root.translateY,\n };\n },\n DID_DRAG_ITEM: function DID_DRAG_ITEM(_ref4) {\n var root = _ref4.root;\n root.element.dataset.dragState = 'drag';\n },\n DID_DROP_ITEM: function DID_DROP_ITEM(_ref5) {\n var root = _ref5.root,\n props = _ref5.props;\n props.dragOffset = null;\n props.dragOrigin = null;\n root.element.dataset.dragState = 'drop';\n },\n },\n function(_ref6) {\n var root = _ref6.root,\n actions = _ref6.actions,\n props = _ref6.props,\n shouldOptimize = _ref6.shouldOptimize;\n\n if (root.element.dataset.dragState === 'drop') {\n if (root.scaleX <= 1) {\n root.element.dataset.dragState = 'idle';\n }\n }\n\n // select last state change action\n var action = actions\n .concat()\n .filter(function(action) {\n return /^DID_/.test(action.type);\n })\n .reverse()\n .find(function(action) {\n return StateMap[action.type];\n });\n\n // no need to set same state twice\n if (action && action.type !== props.currentState) {\n // set current state\n props.currentState = action.type;\n\n // set state\n root.element.dataset.filepondItemState = StateMap[props.currentState] || '';\n }\n\n // route actions\n var aspectRatio =\n root.query('GET_ITEM_PANEL_ASPECT_RATIO') || root.query('GET_PANEL_ASPECT_RATIO');\n if (!aspectRatio) {\n route$1({ root: root, actions: actions, props: props });\n if (!root.height && root.ref.container.rect.element.height > 0) {\n root.height = root.ref.container.rect.element.height;\n }\n } else if (!shouldOptimize) {\n root.height = root.rect.element.width * aspectRatio;\n }\n\n // sync panel height with item height\n if (shouldOptimize) {\n root.ref.panel.height = null;\n }\n\n root.ref.panel.height = root.height;\n }\n );\n\n var item = createView({\n create: create$7,\n write: write$4,\n destroy: function destroy(_ref7) {\n var root = _ref7.root,\n props = _ref7.props;\n root.element.removeEventListener('click', root.ref.handleClick);\n root.dispatch('RELEASE_ITEM', { query: props.id });\n },\n tag: 'li',\n name: 'item',\n mixins: {\n apis: [\n 'id',\n 'interactionMethod',\n 'markedForRemoval',\n 'spawnDate',\n 'dragCenter',\n 'dragOrigin',\n 'dragOffset',\n ],\n styles: ['translateX', 'translateY', 'scaleX', 'scaleY', 'opacity', 'height'],\n\n animations: {\n scaleX: ITEM_SCALE_SPRING,\n scaleY: ITEM_SCALE_SPRING,\n translateX: ITEM_TRANSLATE_SPRING,\n translateY: ITEM_TRANSLATE_SPRING,\n opacity: { type: 'tween', duration: 150 },\n },\n },\n });\n\n var getItemsPerRow = function(horizontalSpace, itemWidth) {\n // add one pixel leeway, when using percentages for item width total items can be 1.99 per row\n\n return Math.max(1, Math.floor((horizontalSpace + 1) / itemWidth));\n };\n\n var getItemIndexByPosition = function getItemIndexByPosition(view, children, positionInView) {\n if (!positionInView) return;\n\n var horizontalSpace = view.rect.element.width;\n // const children = view.childViews;\n var l = children.length;\n var last = null;\n\n // -1, don't move items to accomodate (either add to top or bottom)\n if (l === 0 || positionInView.top < children[0].rect.element.top) return -1;\n\n // let's get the item width\n var item = children[0];\n var itemRect = item.rect.element;\n var itemHorizontalMargin = itemRect.marginLeft + itemRect.marginRight;\n var itemWidth = itemRect.width + itemHorizontalMargin;\n var itemsPerRow = getItemsPerRow(horizontalSpace, itemWidth);\n\n // stack\n if (itemsPerRow === 1) {\n for (var index = 0; index < l; index++) {\n var child = children[index];\n var childMid = child.rect.outer.top + child.rect.element.height * 0.5;\n if (positionInView.top < childMid) {\n return index;\n }\n }\n return l;\n }\n\n // grid\n var itemVerticalMargin = itemRect.marginTop + itemRect.marginBottom;\n var itemHeight = itemRect.height + itemVerticalMargin;\n for (var _index = 0; _index < l; _index++) {\n var indexX = _index % itemsPerRow;\n var indexY = Math.floor(_index / itemsPerRow);\n\n var offsetX = indexX * itemWidth;\n var offsetY = indexY * itemHeight;\n\n var itemTop = offsetY - itemRect.marginTop;\n var itemRight = offsetX + itemWidth;\n var itemBottom = offsetY + itemHeight + itemRect.marginBottom;\n\n if (positionInView.top < itemBottom && positionInView.top > itemTop) {\n if (positionInView.left < itemRight) {\n return _index;\n } else if (_index !== l - 1) {\n last = _index;\n } else {\n last = null;\n }\n }\n }\n\n if (last !== null) {\n return last;\n }\n\n return l;\n };\n\n var dropAreaDimensions = {\n height: 0,\n width: 0,\n get getHeight() {\n return this.height;\n },\n set setHeight(val) {\n if (this.height === 0 || val === 0) this.height = val;\n },\n get getWidth() {\n return this.width;\n },\n set setWidth(val) {\n if (this.width === 0 || val === 0) this.width = val;\n },\n setDimensions: function setDimensions(height, width) {\n if (this.height === 0 || height === 0) this.height = height;\n if (this.width === 0 || width === 0) this.width = width;\n },\n };\n\n var create$8 = function create(_ref) {\n var root = _ref.root;\n // need to set role to list as otherwise it won't be read as a list by VoiceOver\n attr(root.element, 'role', 'list');\n\n root.ref.lastItemSpanwDate = Date.now();\n };\n\n /**\n * Inserts a new item\n * @param root\n * @param action\n */\n var addItemView = function addItemView(_ref2) {\n var root = _ref2.root,\n action = _ref2.action;\n var id = action.id,\n index = action.index,\n interactionMethod = action.interactionMethod;\n\n root.ref.addIndex = index;\n\n var now = Date.now();\n var spawnDate = now;\n var opacity = 1;\n\n if (interactionMethod !== InteractionMethod.NONE) {\n opacity = 0;\n var cooldown = root.query('GET_ITEM_INSERT_INTERVAL');\n var dist = now - root.ref.lastItemSpanwDate;\n spawnDate = dist < cooldown ? now + (cooldown - dist) : now;\n }\n\n root.ref.lastItemSpanwDate = spawnDate;\n\n root.appendChildView(\n root.createChildView(\n // view type\n item,\n\n // props\n {\n spawnDate: spawnDate,\n id: id,\n opacity: opacity,\n interactionMethod: interactionMethod,\n }\n ),\n\n index\n );\n };\n\n var moveItem = function moveItem(item, x, y) {\n var vx = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n var vy = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\n // set to null to remove animation while dragging\n if (item.dragOffset) {\n item.translateX = null;\n item.translateY = null;\n item.translateX = item.dragOrigin.x + item.dragOffset.x;\n item.translateY = item.dragOrigin.y + item.dragOffset.y;\n item.scaleX = 1.025;\n item.scaleY = 1.025;\n } else {\n item.translateX = x;\n item.translateY = y;\n\n if (Date.now() > item.spawnDate) {\n // reveal element\n if (item.opacity === 0) {\n introItemView(item, x, y, vx, vy);\n }\n\n // make sure is default scale every frame\n item.scaleX = 1;\n item.scaleY = 1;\n item.opacity = 1;\n }\n }\n };\n\n var introItemView = function introItemView(item, x, y, vx, vy) {\n if (item.interactionMethod === InteractionMethod.NONE) {\n item.translateX = null;\n item.translateX = x;\n item.translateY = null;\n item.translateY = y;\n } else if (item.interactionMethod === InteractionMethod.DROP) {\n item.translateX = null;\n item.translateX = x - vx * 20;\n\n item.translateY = null;\n item.translateY = y - vy * 10;\n\n item.scaleX = 0.8;\n item.scaleY = 0.8;\n } else if (item.interactionMethod === InteractionMethod.BROWSE) {\n item.translateY = null;\n item.translateY = y - 30;\n } else if (item.interactionMethod === InteractionMethod.API) {\n item.translateX = null;\n item.translateX = x - 30;\n item.translateY = null;\n }\n };\n\n /**\n * Removes an existing item\n * @param root\n * @param action\n */\n var removeItemView = function removeItemView(_ref3) {\n var root = _ref3.root,\n action = _ref3.action;\n var id = action.id;\n\n // get the view matching the given id\n var view = root.childViews.find(function(child) {\n return child.id === id;\n });\n\n // if no view found, exit\n if (!view) {\n return;\n }\n\n // animate view out of view\n view.scaleX = 0.9;\n view.scaleY = 0.9;\n view.opacity = 0;\n\n // mark for removal\n view.markedForRemoval = true;\n };\n\n var getItemHeight = function getItemHeight(child) {\n return (\n child.rect.element.height +\n child.rect.element.marginBottom * 0.5 +\n child.rect.element.marginTop * 0.5\n );\n };\n var getItemWidth = function getItemWidth(child) {\n return (\n child.rect.element.width +\n child.rect.element.marginLeft * 0.5 +\n child.rect.element.marginRight * 0.5\n );\n };\n\n var dragItem = function dragItem(_ref4) {\n var root = _ref4.root,\n action = _ref4.action;\n var id = action.id,\n dragState = action.dragState;\n\n // reference to item\n var item = root.query('GET_ITEM', { id: id });\n\n // get the view matching the given id\n var view = root.childViews.find(function(child) {\n return child.id === id;\n });\n\n var numItems = root.childViews.length;\n var oldIndex = dragState.getItemIndex(item);\n\n // if no view found, exit\n if (!view) return;\n\n var dragPosition = {\n x: view.dragOrigin.x + view.dragOffset.x + view.dragCenter.x,\n y: view.dragOrigin.y + view.dragOffset.y + view.dragCenter.y,\n };\n\n // get drag area dimensions\n var dragHeight = getItemHeight(view);\n var dragWidth = getItemWidth(view);\n\n // get rows and columns (There will always be at least one row and one column if a file is present)\n var cols = Math.floor(root.rect.outer.width / dragWidth);\n if (cols > numItems) cols = numItems;\n\n // rows are used to find when we have left the preview area bounding box\n var rows = Math.floor(numItems / cols + 1);\n\n dropAreaDimensions.setHeight = dragHeight * rows;\n dropAreaDimensions.setWidth = dragWidth * cols;\n\n // get new index of dragged item\n var location = {\n y: Math.floor(dragPosition.y / dragHeight),\n x: Math.floor(dragPosition.x / dragWidth),\n getGridIndex: function getGridIndex() {\n if (\n dragPosition.y > dropAreaDimensions.getHeight ||\n dragPosition.y < 0 ||\n dragPosition.x > dropAreaDimensions.getWidth ||\n dragPosition.x < 0\n )\n return oldIndex;\n return this.y * cols + this.x;\n },\n getColIndex: function getColIndex() {\n var items = root.query('GET_ACTIVE_ITEMS');\n var visibleChildren = root.childViews.filter(function(child) {\n return child.rect.element.height;\n });\n var children = items.map(function(item) {\n return visibleChildren.find(function(childView) {\n return childView.id === item.id;\n });\n });\n\n var currentIndex = children.findIndex(function(child) {\n return child === view;\n });\n var dragHeight = getItemHeight(view);\n var l = children.length;\n var idx = l;\n var childHeight = 0;\n var childBottom = 0;\n var childTop = 0;\n for (var i = 0; i < l; i++) {\n childHeight = getItemHeight(children[i]);\n childTop = childBottom;\n childBottom = childTop + childHeight;\n if (dragPosition.y < childBottom) {\n if (currentIndex > i) {\n if (dragPosition.y < childTop + dragHeight) {\n idx = i;\n break;\n }\n continue;\n }\n idx = i;\n break;\n }\n }\n return idx;\n },\n };\n\n // get new index\n var index = cols > 1 ? location.getGridIndex() : location.getColIndex();\n root.dispatch('MOVE_ITEM', { query: view, index: index });\n\n // if the index of the item changed, dispatch reorder action\n var currentIndex = dragState.getIndex();\n\n if (currentIndex === undefined || currentIndex !== index) {\n dragState.setIndex(index);\n\n if (currentIndex === undefined) return;\n\n root.dispatch('DID_REORDER_ITEMS', {\n items: root.query('GET_ACTIVE_ITEMS'),\n origin: oldIndex,\n target: index,\n });\n }\n };\n\n /**\n * Setup action routes\n */\n var route$2 = createRoute({\n DID_ADD_ITEM: addItemView,\n DID_REMOVE_ITEM: removeItemView,\n DID_DRAG_ITEM: dragItem,\n });\n\n /**\n * Write to view\n * @param root\n * @param actions\n * @param props\n */\n var write$5 = function write(_ref5) {\n var root = _ref5.root,\n props = _ref5.props,\n actions = _ref5.actions,\n shouldOptimize = _ref5.shouldOptimize;\n // route actions\n route$2({ root: root, props: props, actions: actions });\n var dragCoordinates = props.dragCoordinates;\n\n // available space on horizontal axis\n var horizontalSpace = root.rect.element.width;\n\n // only draw children that have dimensions\n var visibleChildren = root.childViews.filter(function(child) {\n return child.rect.element.height;\n });\n\n // sort based on current active items\n var children = root\n .query('GET_ACTIVE_ITEMS')\n .map(function(item) {\n return visibleChildren.find(function(child) {\n return child.id === item.id;\n });\n })\n .filter(function(item) {\n return item;\n });\n\n // get index\n var dragIndex = dragCoordinates\n ? getItemIndexByPosition(root, children, dragCoordinates)\n : null;\n\n // add index is used to reserve the dropped/added item index till the actual item is rendered\n var addIndex = root.ref.addIndex || null;\n\n // add index no longer needed till possibly next draw\n root.ref.addIndex = null;\n\n var dragIndexOffset = 0;\n var removeIndexOffset = 0;\n var addIndexOffset = 0;\n\n if (children.length === 0) return;\n\n var childRect = children[0].rect.element;\n var itemVerticalMargin = childRect.marginTop + childRect.marginBottom;\n var itemHorizontalMargin = childRect.marginLeft + childRect.marginRight;\n var itemWidth = childRect.width + itemHorizontalMargin;\n var itemHeight = childRect.height + itemVerticalMargin;\n var itemsPerRow = getItemsPerRow(horizontalSpace, itemWidth);\n\n // stack\n if (itemsPerRow === 1) {\n var offsetY = 0;\n var dragOffset = 0;\n\n children.forEach(function(child, index) {\n if (dragIndex) {\n var dist = index - dragIndex;\n if (dist === -2) {\n dragOffset = -itemVerticalMargin * 0.25;\n } else if (dist === -1) {\n dragOffset = -itemVerticalMargin * 0.75;\n } else if (dist === 0) {\n dragOffset = itemVerticalMargin * 0.75;\n } else if (dist === 1) {\n dragOffset = itemVerticalMargin * 0.25;\n } else {\n dragOffset = 0;\n }\n }\n\n if (shouldOptimize) {\n child.translateX = null;\n child.translateY = null;\n }\n\n if (!child.markedForRemoval) {\n moveItem(child, 0, offsetY + dragOffset);\n }\n\n var itemHeight = child.rect.element.height + itemVerticalMargin;\n\n var visualHeight = itemHeight * (child.markedForRemoval ? child.opacity : 1);\n\n offsetY += visualHeight;\n });\n }\n // grid\n else {\n var prevX = 0;\n var prevY = 0;\n\n children.forEach(function(child, index) {\n if (index === dragIndex) {\n dragIndexOffset = 1;\n }\n\n if (index === addIndex) {\n addIndexOffset += 1;\n }\n\n if (child.markedForRemoval && child.opacity < 0.5) {\n removeIndexOffset -= 1;\n }\n\n var visualIndex = index + addIndexOffset + dragIndexOffset + removeIndexOffset;\n\n var indexX = visualIndex % itemsPerRow;\n var indexY = Math.floor(visualIndex / itemsPerRow);\n\n var offsetX = indexX * itemWidth;\n var offsetY = indexY * itemHeight;\n\n var vectorX = Math.sign(offsetX - prevX);\n var vectorY = Math.sign(offsetY - prevY);\n\n prevX = offsetX;\n prevY = offsetY;\n\n if (child.markedForRemoval) return;\n\n if (shouldOptimize) {\n child.translateX = null;\n child.translateY = null;\n }\n\n moveItem(child, offsetX, offsetY, vectorX, vectorY);\n });\n }\n };\n\n /**\n * Filters actions that are meant specifically for a certain child of the list\n * @param child\n * @param actions\n */\n var filterSetItemActions = function filterSetItemActions(child, actions) {\n return actions.filter(function(action) {\n // if action has an id, filter out actions that don't have this child id\n if (action.data && action.data.id) {\n return child.id === action.data.id;\n }\n\n // allow all other actions\n return true;\n });\n };\n\n var list = createView({\n create: create$8,\n write: write$5,\n tag: 'ul',\n name: 'list',\n didWriteView: function didWriteView(_ref6) {\n var root = _ref6.root;\n root.childViews\n .filter(function(view) {\n return view.markedForRemoval && view.opacity === 0 && view.resting;\n })\n .forEach(function(view) {\n view._destroy();\n root.removeChildView(view);\n });\n },\n filterFrameActionsForChild: filterSetItemActions,\n mixins: {\n apis: ['dragCoordinates'],\n },\n });\n\n var create$9 = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n root.ref.list = root.appendChildView(root.createChildView(list));\n props.dragCoordinates = null;\n props.overflowing = false;\n };\n\n var storeDragCoordinates = function storeDragCoordinates(_ref2) {\n var root = _ref2.root,\n props = _ref2.props,\n action = _ref2.action;\n if (!root.query('GET_ITEM_INSERT_LOCATION_FREEDOM')) return;\n props.dragCoordinates = {\n left: action.position.scopeLeft - root.ref.list.rect.element.left,\n top:\n action.position.scopeTop -\n (root.rect.outer.top + root.rect.element.marginTop + root.rect.element.scrollTop),\n };\n };\n\n var clearDragCoordinates = function clearDragCoordinates(_ref3) {\n var props = _ref3.props;\n props.dragCoordinates = null;\n };\n\n var route$3 = createRoute({\n DID_DRAG: storeDragCoordinates,\n DID_END_DRAG: clearDragCoordinates,\n });\n\n var write$6 = function write(_ref4) {\n var root = _ref4.root,\n props = _ref4.props,\n actions = _ref4.actions;\n\n // route actions\n route$3({ root: root, props: props, actions: actions });\n\n // current drag position\n root.ref.list.dragCoordinates = props.dragCoordinates;\n\n // if currently overflowing but no longer received overflow\n if (props.overflowing && !props.overflow) {\n props.overflowing = false;\n\n // reset overflow state\n root.element.dataset.state = '';\n root.height = null;\n }\n\n // if is not overflowing currently but does receive overflow value\n if (props.overflow) {\n var newHeight = Math.round(props.overflow);\n if (newHeight !== root.height) {\n props.overflowing = true;\n root.element.dataset.state = 'overflow';\n root.height = newHeight;\n }\n }\n };\n\n var listScroller = createView({\n create: create$9,\n write: write$6,\n name: 'list-scroller',\n mixins: {\n apis: ['overflow', 'dragCoordinates'],\n styles: ['height', 'translateY'],\n animations: {\n translateY: 'spring',\n },\n },\n });\n\n var attrToggle = function attrToggle(element, name, state) {\n var enabledValue = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';\n if (state) {\n attr(element, name, enabledValue);\n } else {\n element.removeAttribute(name);\n }\n };\n\n var resetFileInput = function resetFileInput(input) {\n // no value, no need to reset\n if (!input || input.value === '') {\n return;\n }\n\n try {\n // for modern browsers\n input.value = '';\n } catch (err) {}\n\n // for IE10\n if (input.value) {\n // quickly append input to temp form and reset form\n var form = createElement$1('form');\n var parentNode = input.parentNode;\n var ref = input.nextSibling;\n form.appendChild(input);\n form.reset();\n\n // re-inject input where it originally was\n if (ref) {\n parentNode.insertBefore(input, ref);\n } else {\n parentNode.appendChild(input);\n }\n }\n };\n\n var create$a = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n\n // set id so can be referenced from outside labels\n root.element.id = 'filepond--browser-' + props.id;\n\n // set name of element (is removed when a value is set)\n attr(root.element, 'name', root.query('GET_NAME'));\n\n // we have to link this element to the status element\n attr(root.element, 'aria-controls', 'filepond--assistant-' + props.id);\n\n // set label, we use labelled by as otherwise the screenreader does not read the \"browse\" text in the label (as it has tabindex: 0)\n attr(root.element, 'aria-labelledby', 'filepond--drop-label-' + props.id);\n\n // set configurable props\n setAcceptedFileTypes({\n root: root,\n action: { value: root.query('GET_ACCEPTED_FILE_TYPES') },\n });\n toggleAllowMultiple({ root: root, action: { value: root.query('GET_ALLOW_MULTIPLE') } });\n toggleDirectoryFilter({\n root: root,\n action: { value: root.query('GET_ALLOW_DIRECTORIES_ONLY') },\n });\n toggleDisabled({ root: root });\n toggleRequired({ root: root, action: { value: root.query('GET_REQUIRED') } });\n setCaptureMethod({ root: root, action: { value: root.query('GET_CAPTURE_METHOD') } });\n\n // handle changes to the input field\n root.ref.handleChange = function(e) {\n if (!root.element.value) {\n return;\n }\n\n // extract files and move value of webkitRelativePath path to _relativePath\n var files = Array.from(root.element.files).map(function(file) {\n file._relativePath = file.webkitRelativePath;\n return file;\n });\n\n // we add a little delay so the OS file select window can move out of the way before we add our file\n setTimeout(function() {\n // load files\n props.onload(files);\n\n // reset input, it's just for exposing a method to drop files, should not retain any state\n resetFileInput(root.element);\n }, 250);\n };\n\n root.element.addEventListener('change', root.ref.handleChange);\n };\n\n var setAcceptedFileTypes = function setAcceptedFileTypes(_ref2) {\n var root = _ref2.root,\n action = _ref2.action;\n if (!root.query('GET_ALLOW_SYNC_ACCEPT_ATTRIBUTE')) return;\n attrToggle(\n root.element,\n 'accept',\n !!action.value,\n action.value ? action.value.join(',') : ''\n );\n };\n\n var toggleAllowMultiple = function toggleAllowMultiple(_ref3) {\n var root = _ref3.root,\n action = _ref3.action;\n attrToggle(root.element, 'multiple', action.value);\n };\n\n var toggleDirectoryFilter = function toggleDirectoryFilter(_ref4) {\n var root = _ref4.root,\n action = _ref4.action;\n attrToggle(root.element, 'webkitdirectory', action.value);\n };\n\n var toggleDisabled = function toggleDisabled(_ref5) {\n var root = _ref5.root;\n var isDisabled = root.query('GET_DISABLED');\n var doesAllowBrowse = root.query('GET_ALLOW_BROWSE');\n var disableField = isDisabled || !doesAllowBrowse;\n attrToggle(root.element, 'disabled', disableField);\n };\n\n var toggleRequired = function toggleRequired(_ref6) {\n var root = _ref6.root,\n action = _ref6.action;\n // want to remove required, always possible\n if (!action.value) {\n attrToggle(root.element, 'required', false);\n }\n // if want to make required, only possible when zero items\n else if (root.query('GET_TOTAL_ITEMS') === 0) {\n attrToggle(root.element, 'required', true);\n }\n };\n\n var setCaptureMethod = function setCaptureMethod(_ref7) {\n var root = _ref7.root,\n action = _ref7.action;\n attrToggle(\n root.element,\n 'capture',\n !!action.value,\n action.value === true ? '' : action.value\n );\n };\n\n var updateRequiredStatus = function updateRequiredStatus(_ref8) {\n var root = _ref8.root;\n var element = root.element;\n // always remove the required attribute when more than zero items\n if (root.query('GET_TOTAL_ITEMS') > 0) {\n attrToggle(element, 'required', false);\n attrToggle(element, 'name', false);\n } else {\n // add name attribute\n attrToggle(element, 'name', true, root.query('GET_NAME'));\n\n // remove any validation messages\n var shouldCheckValidity = root.query('GET_CHECK_VALIDITY');\n if (shouldCheckValidity) {\n element.setCustomValidity('');\n }\n\n // we only add required if the field has been deemed required\n if (root.query('GET_REQUIRED')) {\n attrToggle(element, 'required', true);\n }\n }\n };\n\n var updateFieldValidityStatus = function updateFieldValidityStatus(_ref9) {\n var root = _ref9.root;\n var shouldCheckValidity = root.query('GET_CHECK_VALIDITY');\n if (!shouldCheckValidity) return;\n root.element.setCustomValidity(root.query('GET_LABEL_INVALID_FIELD'));\n };\n\n var browser = createView({\n tag: 'input',\n name: 'browser',\n ignoreRect: true,\n ignoreRectUpdate: true,\n attributes: {\n type: 'file',\n },\n\n create: create$a,\n destroy: function destroy(_ref10) {\n var root = _ref10.root;\n root.element.removeEventListener('change', root.ref.handleChange);\n },\n write: createRoute({\n DID_LOAD_ITEM: updateRequiredStatus,\n DID_REMOVE_ITEM: updateRequiredStatus,\n DID_THROW_ITEM_INVALID: updateFieldValidityStatus,\n\n DID_SET_DISABLED: toggleDisabled,\n DID_SET_ALLOW_BROWSE: toggleDisabled,\n DID_SET_ALLOW_DIRECTORIES_ONLY: toggleDirectoryFilter,\n DID_SET_ALLOW_MULTIPLE: toggleAllowMultiple,\n DID_SET_ACCEPTED_FILE_TYPES: setAcceptedFileTypes,\n DID_SET_CAPTURE_METHOD: setCaptureMethod,\n DID_SET_REQUIRED: toggleRequired,\n }),\n });\n\n var Key = {\n ENTER: 13,\n SPACE: 32,\n };\n\n var create$b = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n\n // create the label and link it to the file browser\n var label = createElement$1('label');\n attr(label, 'for', 'filepond--browser-' + props.id);\n\n // use for labeling file input (aria-labelledby on file input)\n attr(label, 'id', 'filepond--drop-label-' + props.id);\n\n // hide the label for screenreaders, the input element will read the contents of the label when it's focussed. If we don't set aria-hidden the screenreader will also navigate the contents of the label separately from the input.\n attr(label, 'aria-hidden', 'true');\n\n // handle keys\n root.ref.handleKeyDown = function(e) {\n var isActivationKey = e.keyCode === Key.ENTER || e.keyCode === Key.SPACE;\n if (!isActivationKey) return;\n // stops from triggering the element a second time\n e.preventDefault();\n\n // click link (will then in turn activate file input)\n root.ref.label.click();\n };\n\n root.ref.handleClick = function(e) {\n var isLabelClick = e.target === label || label.contains(e.target);\n\n // don't want to click twice\n if (isLabelClick) return;\n\n // click link (will then in turn activate file input)\n root.ref.label.click();\n };\n\n // attach events\n label.addEventListener('keydown', root.ref.handleKeyDown);\n root.element.addEventListener('click', root.ref.handleClick);\n\n // update\n updateLabelValue(label, props.caption);\n\n // add!\n root.appendChild(label);\n root.ref.label = label;\n };\n\n var updateLabelValue = function updateLabelValue(label, value) {\n label.innerHTML = value;\n var clickable = label.querySelector('.filepond--label-action');\n if (clickable) {\n attr(clickable, 'tabindex', '0');\n }\n return value;\n };\n\n var dropLabel = createView({\n name: 'drop-label',\n ignoreRect: true,\n create: create$b,\n destroy: function destroy(_ref2) {\n var root = _ref2.root;\n root.ref.label.addEventListener('keydown', root.ref.handleKeyDown);\n root.element.removeEventListener('click', root.ref.handleClick);\n },\n write: createRoute({\n DID_SET_LABEL_IDLE: function DID_SET_LABEL_IDLE(_ref3) {\n var root = _ref3.root,\n action = _ref3.action;\n updateLabelValue(root.ref.label, action.value);\n },\n }),\n\n mixins: {\n styles: ['opacity', 'translateX', 'translateY'],\n animations: {\n opacity: { type: 'tween', duration: 150 },\n translateX: 'spring',\n translateY: 'spring',\n },\n },\n });\n\n var blob = createView({\n name: 'drip-blob',\n ignoreRect: true,\n mixins: {\n styles: ['translateX', 'translateY', 'scaleX', 'scaleY', 'opacity'],\n animations: {\n scaleX: 'spring',\n scaleY: 'spring',\n translateX: 'spring',\n translateY: 'spring',\n opacity: { type: 'tween', duration: 250 },\n },\n },\n });\n\n var addBlob = function addBlob(_ref) {\n var root = _ref.root;\n var centerX = root.rect.element.width * 0.5;\n var centerY = root.rect.element.height * 0.5;\n\n root.ref.blob = root.appendChildView(\n root.createChildView(blob, {\n opacity: 0,\n scaleX: 2.5,\n scaleY: 2.5,\n translateX: centerX,\n translateY: centerY,\n })\n );\n };\n\n var moveBlob = function moveBlob(_ref2) {\n var root = _ref2.root,\n action = _ref2.action;\n if (!root.ref.blob) {\n addBlob({ root: root });\n return;\n }\n\n root.ref.blob.translateX = action.position.scopeLeft;\n root.ref.blob.translateY = action.position.scopeTop;\n root.ref.blob.scaleX = 1;\n root.ref.blob.scaleY = 1;\n root.ref.blob.opacity = 1;\n };\n\n var hideBlob = function hideBlob(_ref3) {\n var root = _ref3.root;\n if (!root.ref.blob) {\n return;\n }\n root.ref.blob.opacity = 0;\n };\n\n var explodeBlob = function explodeBlob(_ref4) {\n var root = _ref4.root;\n if (!root.ref.blob) {\n return;\n }\n root.ref.blob.scaleX = 2.5;\n root.ref.blob.scaleY = 2.5;\n root.ref.blob.opacity = 0;\n };\n\n var write$7 = function write(_ref5) {\n var root = _ref5.root,\n props = _ref5.props,\n actions = _ref5.actions;\n route$4({ root: root, props: props, actions: actions });\n var blob = root.ref.blob;\n\n if (actions.length === 0 && blob && blob.opacity === 0) {\n root.removeChildView(blob);\n root.ref.blob = null;\n }\n };\n\n var route$4 = createRoute({\n DID_DRAG: moveBlob,\n DID_DROP: explodeBlob,\n DID_END_DRAG: hideBlob,\n });\n\n var drip = createView({\n ignoreRect: true,\n ignoreRectUpdate: true,\n name: 'drip',\n write: write$7,\n });\n\n var setInputFiles = function setInputFiles(element, files) {\n try {\n // Create a DataTransfer instance and add a newly created file\n var dataTransfer = new DataTransfer();\n files.forEach(function(file) {\n if (file instanceof File) {\n dataTransfer.items.add(file);\n } else {\n dataTransfer.items.add(\n new File([file], file.name, {\n type: file.type,\n })\n );\n }\n });\n\n // Assign the DataTransfer files list to the file input\n element.files = dataTransfer.files;\n } catch (err) {\n return false;\n }\n return true;\n };\n\n var create$c = function create(_ref) {\n var root = _ref.root;\n return (root.ref.fields = {});\n };\n\n var getField = function getField(root, id) {\n return root.ref.fields[id];\n };\n\n var syncFieldPositionsWithItems = function syncFieldPositionsWithItems(root) {\n root.query('GET_ACTIVE_ITEMS').forEach(function(item) {\n if (!root.ref.fields[item.id]) return;\n root.element.appendChild(root.ref.fields[item.id]);\n });\n };\n\n var didReorderItems = function didReorderItems(_ref2) {\n var root = _ref2.root;\n return syncFieldPositionsWithItems(root);\n };\n\n var didAddItem = function didAddItem(_ref3) {\n var root = _ref3.root,\n action = _ref3.action;\n var fileItem = root.query('GET_ITEM', action.id);\n var isLocalFile = fileItem.origin === FileOrigin.LOCAL;\n var shouldUseFileInput = !isLocalFile && root.query('SHOULD_UPDATE_FILE_INPUT');\n var dataContainer = createElement$1('input');\n dataContainer.type = shouldUseFileInput ? 'file' : 'hidden';\n dataContainer.name = root.query('GET_NAME');\n dataContainer.disabled = root.query('GET_DISABLED');\n root.ref.fields[action.id] = dataContainer;\n syncFieldPositionsWithItems(root);\n };\n\n var didLoadItem$1 = function didLoadItem(_ref4) {\n var root = _ref4.root,\n action = _ref4.action;\n var field = getField(root, action.id);\n if (!field) return;\n\n // store server ref in hidden input\n if (action.serverFileReference !== null) field.value = action.serverFileReference;\n\n // store file item in file input\n if (!root.query('SHOULD_UPDATE_FILE_INPUT')) return;\n\n var fileItem = root.query('GET_ITEM', action.id);\n setInputFiles(field, [fileItem.file]);\n };\n\n var didPrepareOutput = function didPrepareOutput(_ref5) {\n var root = _ref5.root,\n action = _ref5.action;\n // this timeout pushes the handler after 'load'\n if (!root.query('SHOULD_UPDATE_FILE_INPUT')) return;\n setTimeout(function() {\n var field = getField(root, action.id);\n if (!field) return;\n setInputFiles(field, [action.file]);\n }, 0);\n };\n\n var didSetDisabled = function didSetDisabled(_ref6) {\n var root = _ref6.root;\n root.element.disabled = root.query('GET_DISABLED');\n };\n\n var didRemoveItem = function didRemoveItem(_ref7) {\n var root = _ref7.root,\n action = _ref7.action;\n var field = getField(root, action.id);\n if (!field) return;\n if (field.parentNode) field.parentNode.removeChild(field);\n delete root.ref.fields[action.id];\n };\n\n // only runs for server files (so doesn't deal with file input)\n var didDefineValue = function didDefineValue(_ref8) {\n var root = _ref8.root,\n action = _ref8.action;\n var field = getField(root, action.id);\n if (!field) return;\n if (action.value === null) {\n // clear field value\n field.removeAttribute('value');\n } else {\n // set field value\n field.value = action.value;\n }\n syncFieldPositionsWithItems(root);\n };\n\n var write$8 = createRoute({\n DID_SET_DISABLED: didSetDisabled,\n DID_ADD_ITEM: didAddItem,\n DID_LOAD_ITEM: didLoadItem$1,\n DID_REMOVE_ITEM: didRemoveItem,\n DID_DEFINE_VALUE: didDefineValue,\n DID_PREPARE_OUTPUT: didPrepareOutput,\n DID_REORDER_ITEMS: didReorderItems,\n DID_SORT_ITEMS: didReorderItems,\n });\n\n var data = createView({\n tag: 'fieldset',\n name: 'data',\n create: create$c,\n write: write$8,\n ignoreRect: true,\n });\n\n var getRootNode = function getRootNode(element) {\n return 'getRootNode' in element ? element.getRootNode() : document;\n };\n\n var images = ['jpg', 'jpeg', 'png', 'gif', 'bmp', 'webp', 'svg', 'tiff'];\n var text$1 = ['css', 'csv', 'html', 'txt'];\n var map = {\n zip: 'zip|compressed',\n epub: 'application/epub+zip',\n };\n\n var guesstimateMimeType = function guesstimateMimeType() {\n var extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n extension = extension.toLowerCase();\n if (images.includes(extension)) {\n return (\n 'image/' +\n (extension === 'jpg' ? 'jpeg' : extension === 'svg' ? 'svg+xml' : extension)\n );\n }\n if (text$1.includes(extension)) {\n return 'text/' + extension;\n }\n\n return map[extension] || '';\n };\n\n var requestDataTransferItems = function requestDataTransferItems(dataTransfer) {\n return new Promise(function(resolve, reject) {\n // try to get links from transfer, if found we'll exit immediately (unless a file is in the dataTransfer as well, this is because Firefox could represent the file as a URL and a file object at the same time)\n var links = getLinks(dataTransfer);\n if (links.length && !hasFiles(dataTransfer)) {\n return resolve(links);\n }\n // try to get files from the transfer\n getFiles(dataTransfer).then(resolve);\n });\n };\n\n /**\n * Test if datatransfer has files\n */\n var hasFiles = function hasFiles(dataTransfer) {\n if (dataTransfer.files) return dataTransfer.files.length > 0;\n return false;\n };\n\n /**\n * Extracts files from a DataTransfer object\n */\n var getFiles = function getFiles(dataTransfer) {\n return new Promise(function(resolve, reject) {\n // get the transfer items as promises\n var promisedFiles = (dataTransfer.items ? Array.from(dataTransfer.items) : [])\n // only keep file system items (files and directories)\n .filter(function(item) {\n return isFileSystemItem(item);\n })\n\n // map each item to promise\n .map(function(item) {\n return getFilesFromItem(item);\n });\n\n // if is empty, see if we can extract some info from the files property as a fallback\n if (!promisedFiles.length) {\n // TODO: test for directories (should not be allowed)\n // Use FileReader, problem is that the files property gets lost in the process\n resolve(dataTransfer.files ? Array.from(dataTransfer.files) : []);\n return;\n }\n\n // done!\n Promise.all(promisedFiles)\n .then(function(returnedFileGroups) {\n // flatten groups\n var files = [];\n returnedFileGroups.forEach(function(group) {\n files.push.apply(files, group);\n });\n\n // done (filter out empty files)!\n resolve(\n files\n .filter(function(file) {\n return file;\n })\n .map(function(file) {\n if (!file._relativePath)\n file._relativePath = file.webkitRelativePath;\n return file;\n })\n );\n })\n .catch(console.error);\n });\n };\n\n var isFileSystemItem = function isFileSystemItem(item) {\n if (isEntry(item)) {\n var entry = getAsEntry(item);\n if (entry) {\n return entry.isFile || entry.isDirectory;\n }\n }\n return item.kind === 'file';\n };\n\n var getFilesFromItem = function getFilesFromItem(item) {\n return new Promise(function(resolve, reject) {\n if (isDirectoryEntry(item)) {\n getFilesInDirectory(getAsEntry(item))\n .then(resolve)\n .catch(reject);\n return;\n }\n\n resolve([item.getAsFile()]);\n });\n };\n\n var getFilesInDirectory = function getFilesInDirectory(entry) {\n return new Promise(function(resolve, reject) {\n var files = [];\n\n // the total entries to read\n var dirCounter = 0;\n var fileCounter = 0;\n\n var resolveIfDone = function resolveIfDone() {\n if (fileCounter === 0 && dirCounter === 0) {\n resolve(files);\n }\n };\n\n // the recursive function\n var readEntries = function readEntries(dirEntry) {\n dirCounter++;\n\n var directoryReader = dirEntry.createReader();\n\n // directories are returned in batches, we need to process all batches before we're done\n var readBatch = function readBatch() {\n directoryReader.readEntries(function(entries) {\n if (entries.length === 0) {\n dirCounter--;\n resolveIfDone();\n return;\n }\n\n entries.forEach(function(entry) {\n // recursively read more directories\n if (entry.isDirectory) {\n readEntries(entry);\n } else {\n // read as file\n fileCounter++;\n\n entry.file(function(file) {\n var correctedFile = correctMissingFileType(file);\n if (entry.fullPath)\n correctedFile._relativePath = entry.fullPath;\n files.push(correctedFile);\n fileCounter--;\n resolveIfDone();\n });\n }\n });\n\n // try to get next batch of files\n readBatch();\n }, reject);\n };\n\n // read first batch of files\n readBatch();\n };\n\n // go!\n readEntries(entry);\n });\n };\n\n var correctMissingFileType = function correctMissingFileType(file) {\n if (file.type.length) return file;\n var date = file.lastModifiedDate;\n var name = file.name;\n var type = guesstimateMimeType(getExtensionFromFilename(file.name));\n if (!type.length) return file;\n file = file.slice(0, file.size, type);\n file.name = name;\n file.lastModifiedDate = date;\n return file;\n };\n\n var isDirectoryEntry = function isDirectoryEntry(item) {\n return isEntry(item) && (getAsEntry(item) || {}).isDirectory;\n };\n\n var isEntry = function isEntry(item) {\n return 'webkitGetAsEntry' in item;\n };\n\n var getAsEntry = function getAsEntry(item) {\n return item.webkitGetAsEntry();\n };\n\n /**\n * Extracts links from a DataTransfer object\n */\n var getLinks = function getLinks(dataTransfer) {\n var links = [];\n try {\n // look in meta data property\n links = getLinksFromTransferMetaData(dataTransfer);\n if (links.length) {\n return links;\n }\n links = getLinksFromTransferURLData(dataTransfer);\n } catch (e) {\n // nope nope nope (probably IE trouble)\n }\n return links;\n };\n\n var getLinksFromTransferURLData = function getLinksFromTransferURLData(dataTransfer) {\n var data = dataTransfer.getData('url');\n if (typeof data === 'string' && data.length) {\n return [data];\n }\n return [];\n };\n\n var getLinksFromTransferMetaData = function getLinksFromTransferMetaData(dataTransfer) {\n var data = dataTransfer.getData('text/html');\n if (typeof data === 'string' && data.length) {\n var matches = data.match(/src\\s*=\\s*\"(.+?)\"/);\n if (matches) {\n return [matches[1]];\n }\n }\n return [];\n };\n\n var dragNDropObservers = [];\n\n var eventPosition = function eventPosition(e) {\n return {\n pageLeft: e.pageX,\n pageTop: e.pageY,\n scopeLeft: e.offsetX || e.layerX,\n scopeTop: e.offsetY || e.layerY,\n };\n };\n\n var createDragNDropClient = function createDragNDropClient(\n element,\n scopeToObserve,\n filterElement\n ) {\n var observer = getDragNDropObserver(scopeToObserve);\n\n var client = {\n element: element,\n filterElement: filterElement,\n state: null,\n ondrop: function ondrop() {},\n onenter: function onenter() {},\n ondrag: function ondrag() {},\n onexit: function onexit() {},\n onload: function onload() {},\n allowdrop: function allowdrop() {},\n };\n\n client.destroy = observer.addListener(client);\n\n return client;\n };\n\n var getDragNDropObserver = function getDragNDropObserver(element) {\n // see if already exists, if so, return\n var observer = dragNDropObservers.find(function(item) {\n return item.element === element;\n });\n if (observer) {\n return observer;\n }\n\n // create new observer, does not yet exist for this element\n var newObserver = createDragNDropObserver(element);\n dragNDropObservers.push(newObserver);\n return newObserver;\n };\n\n var createDragNDropObserver = function createDragNDropObserver(element) {\n var clients = [];\n\n var routes = {\n dragenter: dragenter,\n dragover: dragover,\n dragleave: dragleave,\n drop: drop,\n };\n\n var handlers = {};\n\n forin(routes, function(event, createHandler) {\n handlers[event] = createHandler(element, clients);\n element.addEventListener(event, handlers[event], false);\n });\n\n var observer = {\n element: element,\n addListener: function addListener(client) {\n // add as client\n clients.push(client);\n\n // return removeListener function\n return function() {\n // remove client\n clients.splice(clients.indexOf(client), 1);\n\n // if no more clients, clean up observer\n if (clients.length === 0) {\n dragNDropObservers.splice(dragNDropObservers.indexOf(observer), 1);\n\n forin(routes, function(event) {\n element.removeEventListener(event, handlers[event], false);\n });\n }\n };\n },\n };\n\n return observer;\n };\n\n var elementFromPoint = function elementFromPoint(root, point) {\n if (!('elementFromPoint' in root)) {\n root = document;\n }\n return root.elementFromPoint(point.x, point.y);\n };\n\n var isEventTarget = function isEventTarget(e, target) {\n // get root\n var root = getRootNode(target);\n\n // get element at position\n // if root is not actual shadow DOM and does not have elementFromPoint method, use the one on document\n var elementAtPosition = elementFromPoint(root, {\n x: e.pageX - window.pageXOffset,\n y: e.pageY - window.pageYOffset,\n });\n\n // test if target is the element or if one of its children is\n return elementAtPosition === target || target.contains(elementAtPosition);\n };\n\n var initialTarget = null;\n\n var setDropEffect = function setDropEffect(dataTransfer, effect) {\n // is in try catch as IE11 will throw error if not\n try {\n dataTransfer.dropEffect = effect;\n } catch (e) {}\n };\n\n var dragenter = function dragenter(root, clients) {\n return function(e) {\n e.preventDefault();\n\n initialTarget = e.target;\n\n clients.forEach(function(client) {\n var element = client.element,\n onenter = client.onenter;\n\n if (isEventTarget(e, element)) {\n client.state = 'enter';\n\n // fire enter event\n onenter(eventPosition(e));\n }\n });\n };\n };\n\n var dragover = function dragover(root, clients) {\n return function(e) {\n e.preventDefault();\n\n var dataTransfer = e.dataTransfer;\n\n requestDataTransferItems(dataTransfer).then(function(items) {\n var overDropTarget = false;\n\n clients.some(function(client) {\n var filterElement = client.filterElement,\n element = client.element,\n onenter = client.onenter,\n onexit = client.onexit,\n ondrag = client.ondrag,\n allowdrop = client.allowdrop;\n\n // by default we can drop\n setDropEffect(dataTransfer, 'copy');\n\n // allow transfer of these items\n var allowsTransfer = allowdrop(items);\n\n // only used when can be dropped on page\n if (!allowsTransfer) {\n setDropEffect(dataTransfer, 'none');\n return;\n }\n\n // targetting this client\n if (isEventTarget(e, element)) {\n overDropTarget = true;\n\n // had no previous state, means we are entering this client\n if (client.state === null) {\n client.state = 'enter';\n onenter(eventPosition(e));\n return;\n }\n\n // now over element (no matter if it allows the drop or not)\n client.state = 'over';\n\n // needs to allow transfer\n if (filterElement && !allowsTransfer) {\n setDropEffect(dataTransfer, 'none');\n return;\n }\n\n // dragging\n ondrag(eventPosition(e));\n } else {\n // should be over an element to drop\n if (filterElement && !overDropTarget) {\n setDropEffect(dataTransfer, 'none');\n }\n\n // might have just left this client?\n if (client.state) {\n client.state = null;\n onexit(eventPosition(e));\n }\n }\n });\n });\n };\n };\n\n var drop = function drop(root, clients) {\n return function(e) {\n e.preventDefault();\n\n var dataTransfer = e.dataTransfer;\n\n requestDataTransferItems(dataTransfer).then(function(items) {\n clients.forEach(function(client) {\n var filterElement = client.filterElement,\n element = client.element,\n ondrop = client.ondrop,\n onexit = client.onexit,\n allowdrop = client.allowdrop;\n\n client.state = null;\n\n // if we're filtering on element we need to be over the element to drop\n if (filterElement && !isEventTarget(e, element)) return;\n\n // no transfer for this client\n if (!allowdrop(items)) return onexit(eventPosition(e));\n\n // we can drop these items on this client\n ondrop(eventPosition(e), items);\n });\n });\n };\n };\n\n var dragleave = function dragleave(root, clients) {\n return function(e) {\n if (initialTarget !== e.target) {\n return;\n }\n\n clients.forEach(function(client) {\n var onexit = client.onexit;\n\n client.state = null;\n\n onexit(eventPosition(e));\n });\n };\n };\n\n var createHopper = function createHopper(scope, validateItems, options) {\n // is now hopper scope\n scope.classList.add('filepond--hopper');\n\n // shortcuts\n var catchesDropsOnPage = options.catchesDropsOnPage,\n requiresDropOnElement = options.requiresDropOnElement,\n _options$filterItems = options.filterItems,\n filterItems =\n _options$filterItems === void 0\n ? function(items) {\n return items;\n }\n : _options$filterItems;\n\n // create a dnd client\n var client = createDragNDropClient(\n scope,\n catchesDropsOnPage ? document.documentElement : scope,\n requiresDropOnElement\n );\n\n // current client state\n var lastState = '';\n var currentState = '';\n\n // determines if a file may be dropped\n client.allowdrop = function(items) {\n // TODO: if we can, throw error to indicate the items cannot by dropped\n\n return validateItems(filterItems(items));\n };\n\n client.ondrop = function(position, items) {\n var filteredItems = filterItems(items);\n\n if (!validateItems(filteredItems)) {\n api.ondragend(position);\n return;\n }\n\n currentState = 'drag-drop';\n\n api.onload(filteredItems, position);\n };\n\n client.ondrag = function(position) {\n api.ondrag(position);\n };\n\n client.onenter = function(position) {\n currentState = 'drag-over';\n\n api.ondragstart(position);\n };\n\n client.onexit = function(position) {\n currentState = 'drag-exit';\n\n api.ondragend(position);\n };\n\n var api = {\n updateHopperState: function updateHopperState() {\n if (lastState !== currentState) {\n scope.dataset.hopperState = currentState;\n lastState = currentState;\n }\n },\n onload: function onload() {},\n ondragstart: function ondragstart() {},\n ondrag: function ondrag() {},\n ondragend: function ondragend() {},\n destroy: function destroy() {\n // destroy client\n client.destroy();\n },\n };\n\n return api;\n };\n\n var listening = false;\n var listeners$1 = [];\n\n var handlePaste = function handlePaste(e) {\n // if is pasting in input or textarea and the target is outside of a filepond scope, ignore\n var activeEl = document.activeElement;\n if (activeEl && /textarea|input/i.test(activeEl.nodeName)) {\n // test textarea or input is contained in filepond root\n var inScope = false;\n var element = activeEl;\n while (element !== document.body) {\n if (element.classList.contains('filepond--root')) {\n inScope = true;\n break;\n }\n element = element.parentNode;\n }\n\n if (!inScope) return;\n }\n\n requestDataTransferItems(e.clipboardData).then(function(files) {\n // no files received\n if (!files.length) {\n return;\n }\n\n // notify listeners of received files\n listeners$1.forEach(function(listener) {\n return listener(files);\n });\n });\n };\n\n var listen = function listen(cb) {\n // can't add twice\n if (listeners$1.includes(cb)) {\n return;\n }\n\n // add initial listener\n listeners$1.push(cb);\n\n // setup paste listener for entire page\n if (listening) {\n return;\n }\n\n listening = true;\n document.addEventListener('paste', handlePaste);\n };\n\n var unlisten = function unlisten(listener) {\n arrayRemove(listeners$1, listeners$1.indexOf(listener));\n\n // clean up\n if (listeners$1.length === 0) {\n document.removeEventListener('paste', handlePaste);\n listening = false;\n }\n };\n\n var createPaster = function createPaster() {\n var cb = function cb(files) {\n api.onload(files);\n };\n\n var api = {\n destroy: function destroy() {\n unlisten(cb);\n },\n onload: function onload() {},\n };\n\n listen(cb);\n\n return api;\n };\n\n /**\n * Creates the file view\n */\n var create$d = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n root.element.id = 'filepond--assistant-' + props.id;\n attr(root.element, 'role', 'status');\n attr(root.element, 'aria-live', 'polite');\n attr(root.element, 'aria-relevant', 'additions');\n };\n\n var addFilesNotificationTimeout = null;\n var notificationClearTimeout = null;\n\n var filenames = [];\n\n var assist = function assist(root, message) {\n root.element.textContent = message;\n };\n\n var clear$1 = function clear(root) {\n root.element.textContent = '';\n };\n\n var listModified = function listModified(root, filename, label) {\n var total = root.query('GET_TOTAL_ITEMS');\n assist(\n root,\n label +\n ' ' +\n filename +\n ', ' +\n total +\n ' ' +\n (total === 1\n ? root.query('GET_LABEL_FILE_COUNT_SINGULAR')\n : root.query('GET_LABEL_FILE_COUNT_PLURAL'))\n );\n\n // clear group after set amount of time so the status is not read twice\n clearTimeout(notificationClearTimeout);\n notificationClearTimeout = setTimeout(function() {\n clear$1(root);\n }, 1500);\n };\n\n var isUsingFilePond = function isUsingFilePond(root) {\n return root.element.parentNode.contains(document.activeElement);\n };\n\n var itemAdded = function itemAdded(_ref2) {\n var root = _ref2.root,\n action = _ref2.action;\n if (!isUsingFilePond(root)) {\n return;\n }\n\n root.element.textContent = '';\n var item = root.query('GET_ITEM', action.id);\n filenames.push(item.filename);\n\n clearTimeout(addFilesNotificationTimeout);\n addFilesNotificationTimeout = setTimeout(function() {\n listModified(root, filenames.join(', '), root.query('GET_LABEL_FILE_ADDED'));\n\n filenames.length = 0;\n }, 750);\n };\n\n var itemRemoved = function itemRemoved(_ref3) {\n var root = _ref3.root,\n action = _ref3.action;\n if (!isUsingFilePond(root)) {\n return;\n }\n\n var item = action.item;\n listModified(root, item.filename, root.query('GET_LABEL_FILE_REMOVED'));\n };\n\n var itemProcessed = function itemProcessed(_ref4) {\n var root = _ref4.root,\n action = _ref4.action;\n // will also notify the user when FilePond is not being used, as the user might be occupied with other activities while uploading a file\n\n var item = root.query('GET_ITEM', action.id);\n var filename = item.filename;\n var label = root.query('GET_LABEL_FILE_PROCESSING_COMPLETE');\n\n assist(root, filename + ' ' + label);\n };\n\n var itemProcessedUndo = function itemProcessedUndo(_ref5) {\n var root = _ref5.root,\n action = _ref5.action;\n var item = root.query('GET_ITEM', action.id);\n var filename = item.filename;\n var label = root.query('GET_LABEL_FILE_PROCESSING_ABORTED');\n\n assist(root, filename + ' ' + label);\n };\n\n var itemError = function itemError(_ref6) {\n var root = _ref6.root,\n action = _ref6.action;\n var item = root.query('GET_ITEM', action.id);\n var filename = item.filename;\n\n // will also notify the user when FilePond is not being used, as the user might be occupied with other activities while uploading a file\n\n assist(root, action.status.main + ' ' + filename + ' ' + action.status.sub);\n };\n\n var assistant = createView({\n create: create$d,\n ignoreRect: true,\n ignoreRectUpdate: true,\n write: createRoute({\n DID_LOAD_ITEM: itemAdded,\n DID_REMOVE_ITEM: itemRemoved,\n DID_COMPLETE_ITEM_PROCESSING: itemProcessed,\n\n DID_ABORT_ITEM_PROCESSING: itemProcessedUndo,\n DID_REVERT_ITEM_PROCESSING: itemProcessedUndo,\n\n DID_THROW_ITEM_REMOVE_ERROR: itemError,\n DID_THROW_ITEM_LOAD_ERROR: itemError,\n DID_THROW_ITEM_INVALID: itemError,\n DID_THROW_ITEM_PROCESSING_ERROR: itemError,\n }),\n\n tag: 'span',\n name: 'assistant',\n });\n\n var toCamels = function toCamels(string) {\n var separator = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '-';\n return string.replace(new RegExp(separator + '.', 'g'), function(sub) {\n return sub.charAt(1).toUpperCase();\n });\n };\n\n var debounce = function debounce(func) {\n var interval = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 16;\n var immidiateOnly =\n arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n var last = Date.now();\n var timeout = null;\n\n return function() {\n for (\n var _len = arguments.length, args = new Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n args[_key] = arguments[_key];\n }\n clearTimeout(timeout);\n\n var dist = Date.now() - last;\n\n var fn = function fn() {\n last = Date.now();\n func.apply(void 0, args);\n };\n\n if (dist < interval) {\n // we need to delay by the difference between interval and dist\n // for example: if distance is 10 ms and interval is 16 ms,\n // we need to wait an additional 6ms before calling the function)\n if (!immidiateOnly) {\n timeout = setTimeout(fn, interval - dist);\n }\n } else {\n // go!\n fn();\n }\n };\n };\n\n var MAX_FILES_LIMIT = 1000000;\n\n var prevent = function prevent(e) {\n return e.preventDefault();\n };\n\n var create$e = function create(_ref) {\n var root = _ref.root,\n props = _ref.props;\n // Add id\n var id = root.query('GET_ID');\n if (id) {\n root.element.id = id;\n }\n\n // Add className\n var className = root.query('GET_CLASS_NAME');\n if (className) {\n className\n .split(' ')\n .filter(function(name) {\n return name.length;\n })\n .forEach(function(name) {\n root.element.classList.add(name);\n });\n }\n\n // Field label\n root.ref.label = root.appendChildView(\n root.createChildView(\n dropLabel,\n Object.assign({}, props, {\n translateY: null,\n caption: root.query('GET_LABEL_IDLE'),\n })\n )\n );\n\n // List of items\n root.ref.list = root.appendChildView(\n root.createChildView(listScroller, { translateY: null })\n );\n\n // Background panel\n root.ref.panel = root.appendChildView(root.createChildView(panel, { name: 'panel-root' }));\n\n // Assistant notifies assistive tech when content changes\n root.ref.assistant = root.appendChildView(\n root.createChildView(assistant, Object.assign({}, props))\n );\n\n // Data\n root.ref.data = root.appendChildView(root.createChildView(data, Object.assign({}, props)));\n\n // Measure (tests if fixed height was set)\n // DOCTYPE needs to be set for this to work\n root.ref.measure = createElement$1('div');\n root.ref.measure.style.height = '100%';\n root.element.appendChild(root.ref.measure);\n\n // information on the root height or fixed height status\n root.ref.bounds = null;\n\n // apply initial style properties\n root.query('GET_STYLES')\n .filter(function(style) {\n return !isEmpty(style.value);\n })\n .map(function(_ref2) {\n var name = _ref2.name,\n value = _ref2.value;\n root.element.dataset[name] = value;\n });\n\n // determine if width changed\n root.ref.widthPrevious = null;\n root.ref.widthUpdated = debounce(function() {\n root.ref.updateHistory = [];\n root.dispatch('DID_RESIZE_ROOT');\n }, 250);\n\n // history of updates\n root.ref.previousAspectRatio = null;\n root.ref.updateHistory = [];\n\n // prevent scrolling and zooming on iOS (only if supports pointer events, for then we can enable reorder)\n var canHover = window.matchMedia('(pointer: fine) and (hover: hover)').matches;\n var hasPointerEvents = 'PointerEvent' in window;\n if (root.query('GET_ALLOW_REORDER') && hasPointerEvents && !canHover) {\n root.element.addEventListener('touchmove', prevent, { passive: false });\n root.element.addEventListener('gesturestart', prevent);\n }\n\n // add credits\n var credits = root.query('GET_CREDITS');\n var hasCredits = credits.length === 2;\n if (hasCredits) {\n var frag = document.createElement('a');\n frag.className = 'filepond--credits';\n frag.setAttribute('aria-hidden', 'true');\n frag.href = credits[0];\n frag.tabindex = -1;\n frag.target = '_blank';\n frag.rel = 'noopener noreferrer';\n frag.textContent = credits[1];\n root.element.appendChild(frag);\n root.ref.credits = frag;\n }\n };\n\n var write$9 = function write(_ref3) {\n var root = _ref3.root,\n props = _ref3.props,\n actions = _ref3.actions;\n // route actions\n route$5({ root: root, props: props, actions: actions });\n\n // apply style properties\n actions\n .filter(function(action) {\n return /^DID_SET_STYLE_/.test(action.type);\n })\n .filter(function(action) {\n return !isEmpty(action.data.value);\n })\n .map(function(_ref4) {\n var type = _ref4.type,\n data = _ref4.data;\n var name = toCamels(type.substring(8).toLowerCase(), '_');\n root.element.dataset[name] = data.value;\n root.invalidateLayout();\n });\n\n if (root.rect.element.hidden) return;\n\n if (root.rect.element.width !== root.ref.widthPrevious) {\n root.ref.widthPrevious = root.rect.element.width;\n root.ref.widthUpdated();\n }\n\n // get box bounds, we do this only once\n var bounds = root.ref.bounds;\n if (!bounds) {\n bounds = root.ref.bounds = calculateRootBoundingBoxHeight(root);\n\n // destroy measure element\n root.element.removeChild(root.ref.measure);\n root.ref.measure = null;\n }\n\n // get quick references to various high level parts of the upload tool\n var _root$ref = root.ref,\n hopper = _root$ref.hopper,\n label = _root$ref.label,\n list = _root$ref.list,\n panel = _root$ref.panel;\n\n // sets correct state to hopper scope\n if (hopper) {\n hopper.updateHopperState();\n }\n\n // bool to indicate if we're full or not\n var aspectRatio = root.query('GET_PANEL_ASPECT_RATIO');\n var isMultiItem = root.query('GET_ALLOW_MULTIPLE');\n var totalItems = root.query('GET_TOTAL_ITEMS');\n var maxItems = isMultiItem ? root.query('GET_MAX_FILES') || MAX_FILES_LIMIT : 1;\n var atMaxCapacity = totalItems === maxItems;\n\n // action used to add item\n var addAction = actions.find(function(action) {\n return action.type === 'DID_ADD_ITEM';\n });\n\n // if reached max capacity and we've just reached it\n if (atMaxCapacity && addAction) {\n // get interaction type\n var interactionMethod = addAction.data.interactionMethod;\n\n // hide label\n label.opacity = 0;\n\n if (isMultiItem) {\n label.translateY = -40;\n } else {\n if (interactionMethod === InteractionMethod.API) {\n label.translateX = 40;\n } else if (interactionMethod === InteractionMethod.BROWSE) {\n label.translateY = 40;\n } else {\n label.translateY = 30;\n }\n }\n } else if (!atMaxCapacity) {\n label.opacity = 1;\n label.translateX = 0;\n label.translateY = 0;\n }\n\n var listItemMargin = calculateListItemMargin(root);\n\n var listHeight = calculateListHeight(root);\n\n var labelHeight = label.rect.element.height;\n var currentLabelHeight = !isMultiItem || atMaxCapacity ? 0 : labelHeight;\n\n var listMarginTop = atMaxCapacity ? list.rect.element.marginTop : 0;\n var listMarginBottom = totalItems === 0 ? 0 : list.rect.element.marginBottom;\n\n var visualHeight =\n currentLabelHeight + listMarginTop + listHeight.visual + listMarginBottom;\n var boundsHeight =\n currentLabelHeight + listMarginTop + listHeight.bounds + listMarginBottom;\n\n // link list to label bottom position\n list.translateY =\n Math.max(0, currentLabelHeight - list.rect.element.marginTop) - listItemMargin.top;\n\n if (aspectRatio) {\n // fixed aspect ratio\n\n // calculate height based on width\n var width = root.rect.element.width;\n var height = width * aspectRatio;\n\n // clear history if aspect ratio has changed\n if (aspectRatio !== root.ref.previousAspectRatio) {\n root.ref.previousAspectRatio = aspectRatio;\n root.ref.updateHistory = [];\n }\n\n // remember this width\n var history = root.ref.updateHistory;\n history.push(width);\n\n var MAX_BOUNCES = 2;\n if (history.length > MAX_BOUNCES * 2) {\n var l = history.length;\n var bottom = l - 10;\n var bounces = 0;\n for (var i = l; i >= bottom; i--) {\n if (history[i] === history[i - 2]) {\n bounces++;\n }\n\n if (bounces >= MAX_BOUNCES) {\n // dont adjust height\n return;\n }\n }\n }\n\n // fix height of panel so it adheres to aspect ratio\n panel.scalable = false;\n panel.height = height;\n\n // available height for list\n var listAvailableHeight =\n // the height of the panel minus the label height\n height -\n currentLabelHeight -\n // the room we leave open between the end of the list and the panel bottom\n (listMarginBottom - listItemMargin.bottom) -\n // if we're full we need to leave some room between the top of the panel and the list\n (atMaxCapacity ? listMarginTop : 0);\n\n if (listHeight.visual > listAvailableHeight) {\n list.overflow = listAvailableHeight;\n } else {\n list.overflow = null;\n }\n\n // set container bounds (so pushes siblings downwards)\n root.height = height;\n } else if (bounds.fixedHeight) {\n // fixed height\n\n // fix height of panel\n panel.scalable = false;\n\n // available height for list\n var _listAvailableHeight =\n // the height of the panel minus the label height\n bounds.fixedHeight -\n currentLabelHeight -\n // the room we leave open between the end of the list and the panel bottom\n (listMarginBottom - listItemMargin.bottom) -\n // if we're full we need to leave some room between the top of the panel and the list\n (atMaxCapacity ? listMarginTop : 0);\n\n // set list height\n if (listHeight.visual > _listAvailableHeight) {\n list.overflow = _listAvailableHeight;\n } else {\n list.overflow = null;\n }\n\n // no need to set container bounds as these are handles by CSS fixed height\n } else if (bounds.cappedHeight) {\n // max-height\n\n // not a fixed height panel\n var isCappedHeight = visualHeight >= bounds.cappedHeight;\n var panelHeight = Math.min(bounds.cappedHeight, visualHeight);\n panel.scalable = true;\n panel.height = isCappedHeight\n ? panelHeight\n : panelHeight - listItemMargin.top - listItemMargin.bottom;\n\n // available height for list\n var _listAvailableHeight2 =\n // the height of the panel minus the label height\n panelHeight -\n currentLabelHeight -\n // the room we leave open between the end of the list and the panel bottom\n (listMarginBottom - listItemMargin.bottom) -\n // if we're full we need to leave some room between the top of the panel and the list\n (atMaxCapacity ? listMarginTop : 0);\n\n // set list height (if is overflowing)\n if (visualHeight > bounds.cappedHeight && listHeight.visual > _listAvailableHeight2) {\n list.overflow = _listAvailableHeight2;\n } else {\n list.overflow = null;\n }\n\n // set container bounds (so pushes siblings downwards)\n root.height = Math.min(\n bounds.cappedHeight,\n boundsHeight - listItemMargin.top - listItemMargin.bottom\n );\n } else {\n // flexible height\n\n // not a fixed height panel\n var itemMargin = totalItems > 0 ? listItemMargin.top + listItemMargin.bottom : 0;\n panel.scalable = true;\n panel.height = Math.max(labelHeight, visualHeight - itemMargin);\n\n // set container bounds (so pushes siblings downwards)\n root.height = Math.max(labelHeight, boundsHeight - itemMargin);\n }\n\n // move credits to bottom\n if (root.ref.credits && panel.heightCurrent)\n root.ref.credits.style.transform = 'translateY(' + panel.heightCurrent + 'px)';\n };\n\n var calculateListItemMargin = function calculateListItemMargin(root) {\n var item = root.ref.list.childViews[0].childViews[0];\n return item\n ? {\n top: item.rect.element.marginTop,\n bottom: item.rect.element.marginBottom,\n }\n : {\n top: 0,\n bottom: 0,\n };\n };\n\n var calculateListHeight = function calculateListHeight(root) {\n var visual = 0;\n var bounds = 0;\n\n // get file list reference\n var scrollList = root.ref.list;\n var itemList = scrollList.childViews[0];\n var visibleChildren = itemList.childViews.filter(function(child) {\n return child.rect.element.height;\n });\n var children = root\n .query('GET_ACTIVE_ITEMS')\n .map(function(item) {\n return visibleChildren.find(function(child) {\n return child.id === item.id;\n });\n })\n .filter(function(item) {\n return item;\n });\n\n // no children, done!\n if (children.length === 0) return { visual: visual, bounds: bounds };\n\n var horizontalSpace = itemList.rect.element.width;\n var dragIndex = getItemIndexByPosition(itemList, children, scrollList.dragCoordinates);\n\n var childRect = children[0].rect.element;\n\n var itemVerticalMargin = childRect.marginTop + childRect.marginBottom;\n var itemHorizontalMargin = childRect.marginLeft + childRect.marginRight;\n\n var itemWidth = childRect.width + itemHorizontalMargin;\n var itemHeight = childRect.height + itemVerticalMargin;\n\n var newItem = typeof dragIndex !== 'undefined' && dragIndex >= 0 ? 1 : 0;\n var removedItem = children.find(function(child) {\n return child.markedForRemoval && child.opacity < 0.45;\n })\n ? -1\n : 0;\n var verticalItemCount = children.length + newItem + removedItem;\n var itemsPerRow = getItemsPerRow(horizontalSpace, itemWidth);\n\n // stack\n if (itemsPerRow === 1) {\n children.forEach(function(item) {\n var height = item.rect.element.height + itemVerticalMargin;\n bounds += height;\n visual += height * item.opacity;\n });\n }\n // grid\n else {\n bounds = Math.ceil(verticalItemCount / itemsPerRow) * itemHeight;\n visual = bounds;\n }\n\n return { visual: visual, bounds: bounds };\n };\n\n var calculateRootBoundingBoxHeight = function calculateRootBoundingBoxHeight(root) {\n var height = root.ref.measureHeight || null;\n var cappedHeight = parseInt(root.style.maxHeight, 10) || null;\n var fixedHeight = height === 0 ? null : height;\n\n return {\n cappedHeight: cappedHeight,\n fixedHeight: fixedHeight,\n };\n };\n\n var exceedsMaxFiles = function exceedsMaxFiles(root, items) {\n var allowReplace = root.query('GET_ALLOW_REPLACE');\n var allowMultiple = root.query('GET_ALLOW_MULTIPLE');\n var totalItems = root.query('GET_TOTAL_ITEMS');\n var maxItems = root.query('GET_MAX_FILES');\n\n // total amount of items being dragged\n var totalBrowseItems = items.length;\n\n // if does not allow multiple items and dragging more than one item\n if (!allowMultiple && totalBrowseItems > 1) {\n root.dispatch('DID_THROW_MAX_FILES', {\n source: items,\n error: createResponse('warning', 0, 'Max files'),\n });\n\n return true;\n }\n\n // limit max items to one if not allowed to drop multiple items\n maxItems = allowMultiple ? maxItems : 1;\n\n if (!allowMultiple && allowReplace) {\n // There is only one item, so there is room to replace or add an item\n return false;\n }\n\n // no more room?\n var hasMaxItems = isInt(maxItems);\n if (hasMaxItems && totalItems + totalBrowseItems > maxItems) {\n root.dispatch('DID_THROW_MAX_FILES', {\n source: items,\n error: createResponse('warning', 0, 'Max files'),\n });\n\n return true;\n }\n\n return false;\n };\n\n var getDragIndex = function getDragIndex(list, children, position) {\n var itemList = list.childViews[0];\n return getItemIndexByPosition(itemList, children, {\n left: position.scopeLeft - itemList.rect.element.left,\n top:\n position.scopeTop -\n (list.rect.outer.top + list.rect.element.marginTop + list.rect.element.scrollTop),\n });\n };\n\n /**\n * Enable or disable file drop functionality\n */\n var toggleDrop = function toggleDrop(root) {\n var isAllowed = root.query('GET_ALLOW_DROP');\n var isDisabled = root.query('GET_DISABLED');\n var enabled = isAllowed && !isDisabled;\n if (enabled && !root.ref.hopper) {\n var hopper = createHopper(\n root.element,\n function(items) {\n // allow quick validation of dropped items\n var beforeDropFile =\n root.query('GET_BEFORE_DROP_FILE') ||\n function() {\n return true;\n };\n\n // all items should be validated by all filters as valid\n var dropValidation = root.query('GET_DROP_VALIDATION');\n return dropValidation\n ? items.every(function(item) {\n return (\n applyFilters('ALLOW_HOPPER_ITEM', item, {\n query: root.query,\n }).every(function(result) {\n return result === true;\n }) && beforeDropFile(item)\n );\n })\n : true;\n },\n {\n filterItems: function filterItems(items) {\n var ignoredFiles = root.query('GET_IGNORED_FILES');\n return items.filter(function(item) {\n if (isFile(item)) {\n return !ignoredFiles.includes(item.name.toLowerCase());\n }\n return true;\n });\n },\n catchesDropsOnPage: root.query('GET_DROP_ON_PAGE'),\n requiresDropOnElement: root.query('GET_DROP_ON_ELEMENT'),\n }\n );\n\n hopper.onload = function(items, position) {\n // get item children elements and sort based on list sort\n var list = root.ref.list.childViews[0];\n var visibleChildren = list.childViews.filter(function(child) {\n return child.rect.element.height;\n });\n var children = root\n .query('GET_ACTIVE_ITEMS')\n .map(function(item) {\n return visibleChildren.find(function(child) {\n return child.id === item.id;\n });\n })\n .filter(function(item) {\n return item;\n });\n\n applyFilterChain('ADD_ITEMS', items, { dispatch: root.dispatch }).then(function(\n queue\n ) {\n // these files don't fit so stop here\n if (exceedsMaxFiles(root, queue)) return false;\n\n // go\n root.dispatch('ADD_ITEMS', {\n items: queue,\n index: getDragIndex(root.ref.list, children, position),\n interactionMethod: InteractionMethod.DROP,\n });\n });\n\n root.dispatch('DID_DROP', { position: position });\n\n root.dispatch('DID_END_DRAG', { position: position });\n };\n\n hopper.ondragstart = function(position) {\n root.dispatch('DID_START_DRAG', { position: position });\n };\n\n hopper.ondrag = debounce(function(position) {\n root.dispatch('DID_DRAG', { position: position });\n });\n\n hopper.ondragend = function(position) {\n root.dispatch('DID_END_DRAG', { position: position });\n };\n\n root.ref.hopper = hopper;\n\n root.ref.drip = root.appendChildView(root.createChildView(drip));\n } else if (!enabled && root.ref.hopper) {\n root.ref.hopper.destroy();\n root.ref.hopper = null;\n root.removeChildView(root.ref.drip);\n }\n };\n\n /**\n * Enable or disable browse functionality\n */\n var toggleBrowse = function toggleBrowse(root, props) {\n var isAllowed = root.query('GET_ALLOW_BROWSE');\n var isDisabled = root.query('GET_DISABLED');\n var enabled = isAllowed && !isDisabled;\n if (enabled && !root.ref.browser) {\n root.ref.browser = root.appendChildView(\n root.createChildView(\n browser,\n Object.assign({}, props, {\n onload: function onload(items) {\n applyFilterChain('ADD_ITEMS', items, {\n dispatch: root.dispatch,\n }).then(function(queue) {\n // these files don't fit so stop here\n if (exceedsMaxFiles(root, queue)) return false;\n\n // add items!\n root.dispatch('ADD_ITEMS', {\n items: queue,\n index: -1,\n interactionMethod: InteractionMethod.BROWSE,\n });\n });\n },\n })\n ),\n\n 0\n );\n } else if (!enabled && root.ref.browser) {\n root.removeChildView(root.ref.browser);\n root.ref.browser = null;\n }\n };\n\n /**\n * Enable or disable paste functionality\n */\n var togglePaste = function togglePaste(root) {\n var isAllowed = root.query('GET_ALLOW_PASTE');\n var isDisabled = root.query('GET_DISABLED');\n var enabled = isAllowed && !isDisabled;\n if (enabled && !root.ref.paster) {\n root.ref.paster = createPaster();\n root.ref.paster.onload = function(items) {\n applyFilterChain('ADD_ITEMS', items, { dispatch: root.dispatch }).then(function(\n queue\n ) {\n // these files don't fit so stop here\n if (exceedsMaxFiles(root, queue)) return false;\n\n // add items!\n root.dispatch('ADD_ITEMS', {\n items: queue,\n index: -1,\n interactionMethod: InteractionMethod.PASTE,\n });\n });\n };\n } else if (!enabled && root.ref.paster) {\n root.ref.paster.destroy();\n root.ref.paster = null;\n }\n };\n\n /**\n * Route actions\n */\n var route$5 = createRoute({\n DID_SET_ALLOW_BROWSE: function DID_SET_ALLOW_BROWSE(_ref5) {\n var root = _ref5.root,\n props = _ref5.props;\n toggleBrowse(root, props);\n },\n DID_SET_ALLOW_DROP: function DID_SET_ALLOW_DROP(_ref6) {\n var root = _ref6.root;\n toggleDrop(root);\n },\n DID_SET_ALLOW_PASTE: function DID_SET_ALLOW_PASTE(_ref7) {\n var root = _ref7.root;\n togglePaste(root);\n },\n DID_SET_DISABLED: function DID_SET_DISABLED(_ref8) {\n var root = _ref8.root,\n props = _ref8.props;\n toggleDrop(root);\n togglePaste(root);\n toggleBrowse(root, props);\n var isDisabled = root.query('GET_DISABLED');\n if (isDisabled) {\n root.element.dataset.disabled = 'disabled';\n } else {\n // delete root.element.dataset.disabled; <= this does not work on iOS 10\n root.element.removeAttribute('data-disabled');\n }\n },\n });\n\n var root = createView({\n name: 'root',\n read: function read(_ref9) {\n var root = _ref9.root;\n if (root.ref.measure) {\n root.ref.measureHeight = root.ref.measure.offsetHeight;\n }\n },\n create: create$e,\n write: write$9,\n destroy: function destroy(_ref10) {\n var root = _ref10.root;\n if (root.ref.paster) {\n root.ref.paster.destroy();\n }\n if (root.ref.hopper) {\n root.ref.hopper.destroy();\n }\n root.element.removeEventListener('touchmove', prevent);\n root.element.removeEventListener('gesturestart', prevent);\n },\n mixins: {\n styles: ['height'],\n },\n });\n\n // creates the app\n var createApp = function createApp() {\n var initialOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // let element\n var originalElement = null;\n\n // get default options\n var defaultOptions = getOptions();\n\n // create the data store, this will contain all our app info\n var store = createStore(\n // initial state (should be serializable)\n createInitialState(defaultOptions),\n\n // queries\n [queries, createOptionQueries(defaultOptions)],\n\n // action handlers\n [actions, createOptionActions(defaultOptions)]\n );\n\n // set initial options\n store.dispatch('SET_OPTIONS', { options: initialOptions });\n\n // kick thread if visibility changes\n var visibilityHandler = function visibilityHandler() {\n if (document.hidden) return;\n store.dispatch('KICK');\n };\n document.addEventListener('visibilitychange', visibilityHandler);\n\n // re-render on window resize start and finish\n var resizeDoneTimer = null;\n var isResizing = false;\n var isResizingHorizontally = false;\n var initialWindowWidth = null;\n var currentWindowWidth = null;\n var resizeHandler = function resizeHandler() {\n if (!isResizing) {\n isResizing = true;\n }\n clearTimeout(resizeDoneTimer);\n resizeDoneTimer = setTimeout(function() {\n isResizing = false;\n initialWindowWidth = null;\n currentWindowWidth = null;\n if (isResizingHorizontally) {\n isResizingHorizontally = false;\n store.dispatch('DID_STOP_RESIZE');\n }\n }, 500);\n };\n window.addEventListener('resize', resizeHandler);\n\n // render initial view\n var view = root(store, { id: getUniqueId() });\n\n //\n // PRIVATE API -------------------------------------------------------------------------------------\n //\n var isResting = false;\n var isHidden = false;\n\n var readWriteApi = {\n // necessary for update loop\n\n /**\n * Reads from dom (never call manually)\n * @private\n */\n _read: function _read() {\n // test if we're resizing horizontally\n // TODO: see if we can optimize this by measuring root rect\n if (isResizing) {\n currentWindowWidth = window.innerWidth;\n if (!initialWindowWidth) {\n initialWindowWidth = currentWindowWidth;\n }\n\n if (!isResizingHorizontally && currentWindowWidth !== initialWindowWidth) {\n store.dispatch('DID_START_RESIZE');\n isResizingHorizontally = true;\n }\n }\n\n if (isHidden && isResting) {\n // test if is no longer hidden\n isResting = view.element.offsetParent === null;\n }\n\n // if resting, no need to read as numbers will still all be correct\n if (isResting) return;\n\n // read view data\n view._read();\n\n // if is hidden we need to know so we exit rest mode when revealed\n isHidden = view.rect.element.hidden;\n },\n\n /**\n * Writes to dom (never call manually)\n * @private\n */\n _write: function _write(ts) {\n // get all actions from store\n var actions = store\n .processActionQueue()\n\n // filter out set actions (these will automatically trigger DID_SET)\n .filter(function(action) {\n return !/^SET_/.test(action.type);\n });\n\n // if was idling and no actions stop here\n if (isResting && !actions.length) return;\n\n // some actions might trigger events\n routeActionsToEvents(actions);\n\n // update the view\n isResting = view._write(ts, actions, isResizingHorizontally);\n\n // will clean up all archived items\n removeReleasedItems(store.query('GET_ITEMS'));\n\n // now idling\n if (isResting) {\n store.processDispatchQueue();\n }\n },\n };\n\n //\n // EXPOSE EVENTS -------------------------------------------------------------------------------------\n //\n var createEvent = function createEvent(name) {\n return function(data) {\n // create default event\n var event = {\n type: name,\n };\n\n // no data to add\n if (!data) {\n return event;\n }\n\n // copy relevant props\n if (data.hasOwnProperty('error')) {\n event.error = data.error ? Object.assign({}, data.error) : null;\n }\n\n if (data.status) {\n event.status = Object.assign({}, data.status);\n }\n\n if (data.file) {\n event.output = data.file;\n }\n\n // only source is available, else add item if possible\n if (data.source) {\n event.file = data.source;\n } else if (data.item || data.id) {\n var item = data.item ? data.item : store.query('GET_ITEM', data.id);\n event.file = item ? createItemAPI(item) : null;\n }\n\n // map all items in a possible items array\n if (data.items) {\n event.items = data.items.map(createItemAPI);\n }\n\n // if this is a progress event add the progress amount\n if (/progress/.test(name)) {\n event.progress = data.progress;\n }\n\n // copy relevant props\n if (data.hasOwnProperty('origin') && data.hasOwnProperty('target')) {\n event.origin = data.origin;\n event.target = data.target;\n }\n\n return event;\n };\n };\n\n var eventRoutes = {\n DID_DESTROY: createEvent('destroy'),\n\n DID_INIT: createEvent('init'),\n\n DID_THROW_MAX_FILES: createEvent('warning'),\n\n DID_INIT_ITEM: createEvent('initfile'),\n DID_START_ITEM_LOAD: createEvent('addfilestart'),\n DID_UPDATE_ITEM_LOAD_PROGRESS: createEvent('addfileprogress'),\n DID_LOAD_ITEM: createEvent('addfile'),\n\n DID_THROW_ITEM_INVALID: [createEvent('error'), createEvent('addfile')],\n\n DID_THROW_ITEM_LOAD_ERROR: [createEvent('error'), createEvent('addfile')],\n\n DID_THROW_ITEM_REMOVE_ERROR: [createEvent('error'), createEvent('removefile')],\n\n DID_PREPARE_OUTPUT: createEvent('preparefile'),\n\n DID_START_ITEM_PROCESSING: createEvent('processfilestart'),\n DID_UPDATE_ITEM_PROCESS_PROGRESS: createEvent('processfileprogress'),\n DID_ABORT_ITEM_PROCESSING: createEvent('processfileabort'),\n DID_COMPLETE_ITEM_PROCESSING: createEvent('processfile'),\n DID_COMPLETE_ITEM_PROCESSING_ALL: createEvent('processfiles'),\n DID_REVERT_ITEM_PROCESSING: createEvent('processfilerevert'),\n\n DID_THROW_ITEM_PROCESSING_ERROR: [createEvent('error'), createEvent('processfile')],\n\n DID_REMOVE_ITEM: createEvent('removefile'),\n\n DID_UPDATE_ITEMS: createEvent('updatefiles'),\n\n DID_ACTIVATE_ITEM: createEvent('activatefile'),\n\n DID_REORDER_ITEMS: createEvent('reorderfiles'),\n };\n\n var exposeEvent = function exposeEvent(event) {\n // create event object to be dispatched\n var detail = Object.assign({ pond: exports }, event);\n delete detail.type;\n view.element.dispatchEvent(\n new CustomEvent('FilePond:' + event.type, {\n // event info\n detail: detail,\n\n // event behaviour\n bubbles: true,\n cancelable: true,\n composed: true, // triggers listeners outside of shadow root\n })\n );\n\n // event object to params used for `on()` event handlers and callbacks `oninit()`\n var params = [];\n\n // if is possible error event, make it the first param\n if (event.hasOwnProperty('error')) {\n params.push(event.error);\n }\n\n // file is always section\n if (event.hasOwnProperty('file')) {\n params.push(event.file);\n }\n\n // append other props\n var filtered = ['type', 'error', 'file'];\n Object.keys(event)\n .filter(function(key) {\n return !filtered.includes(key);\n })\n .forEach(function(key) {\n return params.push(event[key]);\n });\n\n // on(type, () => { })\n exports.fire.apply(exports, [event.type].concat(params));\n\n // oninit = () => {}\n var handler = store.query('GET_ON' + event.type.toUpperCase());\n if (handler) {\n handler.apply(void 0, params);\n }\n };\n\n var routeActionsToEvents = function routeActionsToEvents(actions) {\n if (!actions.length) return;\n actions\n .filter(function(action) {\n return eventRoutes[action.type];\n })\n .forEach(function(action) {\n var routes = eventRoutes[action.type];\n (Array.isArray(routes) ? routes : [routes]).forEach(function(route) {\n // this isn't fantastic, but because of the stacking of settimeouts plugins can handle the did_load before the did_init\n if (action.type === 'DID_INIT_ITEM') {\n exposeEvent(route(action.data));\n } else {\n setTimeout(function() {\n exposeEvent(route(action.data));\n }, 0);\n }\n });\n });\n };\n\n //\n // PUBLIC API -------------------------------------------------------------------------------------\n //\n var setOptions = function setOptions(options) {\n return store.dispatch('SET_OPTIONS', { options: options });\n };\n\n var getFile = function getFile(query) {\n return store.query('GET_ACTIVE_ITEM', query);\n };\n\n var prepareFile = function prepareFile(query) {\n return new Promise(function(resolve, reject) {\n store.dispatch('REQUEST_ITEM_PREPARE', {\n query: query,\n success: function success(item) {\n resolve(item);\n },\n failure: function failure(error) {\n reject(error);\n },\n });\n });\n };\n\n var addFile = function addFile(source) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new Promise(function(resolve, reject) {\n addFiles([{ source: source, options: options }], { index: options.index })\n .then(function(items) {\n return resolve(items && items[0]);\n })\n .catch(reject);\n });\n };\n\n var isFilePondFile = function isFilePondFile(obj) {\n return obj.file && obj.id;\n };\n\n var removeFile = function removeFile(query, options) {\n // if only passed options\n if (typeof query === 'object' && !isFilePondFile(query) && !options) {\n options = query;\n query = undefined;\n }\n\n // request item removal\n store.dispatch('REMOVE_ITEM', Object.assign({}, options, { query: query }));\n\n // see if item has been removed\n return store.query('GET_ACTIVE_ITEM', query) === null;\n };\n\n var addFiles = function addFiles() {\n for (\n var _len = arguments.length, args = new Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n args[_key] = arguments[_key];\n }\n return new Promise(function(resolve, reject) {\n var sources = [];\n var options = {};\n\n // user passed a sources array\n if (isArray(args[0])) {\n sources.push.apply(sources, args[0]);\n Object.assign(options, args[1] || {});\n } else {\n // user passed sources as arguments, last one might be options object\n var lastArgument = args[args.length - 1];\n if (typeof lastArgument === 'object' && !(lastArgument instanceof Blob)) {\n Object.assign(options, args.pop());\n }\n\n // add rest to sources\n sources.push.apply(sources, args);\n }\n\n store.dispatch('ADD_ITEMS', {\n items: sources,\n index: options.index,\n interactionMethod: InteractionMethod.API,\n success: resolve,\n failure: reject,\n });\n });\n };\n\n var getFiles = function getFiles() {\n return store.query('GET_ACTIVE_ITEMS');\n };\n\n var processFile = function processFile(query) {\n return new Promise(function(resolve, reject) {\n store.dispatch('REQUEST_ITEM_PROCESSING', {\n query: query,\n success: function success(item) {\n resolve(item);\n },\n failure: function failure(error) {\n reject(error);\n },\n });\n });\n };\n\n var prepareFiles = function prepareFiles() {\n for (\n var _len2 = arguments.length, args = new Array(_len2), _key2 = 0;\n _key2 < _len2;\n _key2++\n ) {\n args[_key2] = arguments[_key2];\n }\n var queries = Array.isArray(args[0]) ? args[0] : args;\n var items = queries.length ? queries : getFiles();\n return Promise.all(items.map(prepareFile));\n };\n\n var processFiles = function processFiles() {\n for (\n var _len3 = arguments.length, args = new Array(_len3), _key3 = 0;\n _key3 < _len3;\n _key3++\n ) {\n args[_key3] = arguments[_key3];\n }\n var queries = Array.isArray(args[0]) ? args[0] : args;\n if (!queries.length) {\n var files = getFiles().filter(function(item) {\n return (\n !(item.status === ItemStatus.IDLE && item.origin === FileOrigin.LOCAL) &&\n item.status !== ItemStatus.PROCESSING &&\n item.status !== ItemStatus.PROCESSING_COMPLETE &&\n item.status !== ItemStatus.PROCESSING_REVERT_ERROR\n );\n });\n\n return Promise.all(files.map(processFile));\n }\n return Promise.all(queries.map(processFile));\n };\n\n var removeFiles = function removeFiles() {\n for (\n var _len4 = arguments.length, args = new Array(_len4), _key4 = 0;\n _key4 < _len4;\n _key4++\n ) {\n args[_key4] = arguments[_key4];\n }\n\n var queries = Array.isArray(args[0]) ? args[0] : args;\n\n var options;\n if (typeof queries[queries.length - 1] === 'object') {\n options = queries.pop();\n } else if (Array.isArray(args[0])) {\n options = args[1];\n }\n\n var files = getFiles();\n\n if (!queries.length)\n return Promise.all(\n files.map(function(file) {\n return removeFile(file, options);\n })\n );\n\n // when removing by index the indexes shift after each file removal so we need to convert indexes to ids\n var mappedQueries = queries\n .map(function(query) {\n return isNumber(query) ? (files[query] ? files[query].id : null) : query;\n })\n .filter(function(query) {\n return query;\n });\n\n return mappedQueries.map(function(q) {\n return removeFile(q, options);\n });\n };\n\n var exports = Object.assign(\n {},\n\n on(),\n {},\n\n readWriteApi,\n {},\n\n createOptionAPI(store, defaultOptions),\n {\n /**\n * Override options defined in options object\n * @param options\n */\n setOptions: setOptions,\n\n /**\n * Load the given file\n * @param source - the source of the file (either a File, base64 data uri or url)\n * @param options - object, { index: 0 }\n */\n addFile: addFile,\n\n /**\n * Load the given files\n * @param sources - the sources of the files to load\n * @param options - object, { index: 0 }\n */\n addFiles: addFiles,\n\n /**\n * Returns the file objects matching the given query\n * @param query { string, number, null }\n */\n getFile: getFile,\n\n /**\n * Upload file with given name\n * @param query { string, number, null }\n */\n processFile: processFile,\n\n /**\n * Request prepare output for file with given name\n * @param query { string, number, null }\n */\n prepareFile: prepareFile,\n\n /**\n * Removes a file by its name\n * @param query { string, number, null }\n */\n removeFile: removeFile,\n\n /**\n * Moves a file to a new location in the files list\n */\n moveFile: function moveFile(query, index) {\n return store.dispatch('MOVE_ITEM', { query: query, index: index });\n },\n\n /**\n * Returns all files (wrapped in public api)\n */\n getFiles: getFiles,\n\n /**\n * Starts uploading all files\n */\n processFiles: processFiles,\n\n /**\n * Clears all files from the files list\n */\n removeFiles: removeFiles,\n\n /**\n * Starts preparing output of all files\n */\n prepareFiles: prepareFiles,\n\n /**\n * Sort list of files\n */\n sort: function sort(compare) {\n return store.dispatch('SORT', { compare: compare });\n },\n\n /**\n * Browse the file system for a file\n */\n browse: function browse() {\n // needs to be trigger directly as user action needs to be traceable (is not traceable in requestAnimationFrame)\n var input = view.element.querySelector('input[type=file]');\n if (input) {\n input.click();\n }\n },\n\n /**\n * Destroys the app\n */\n destroy: function destroy() {\n // request destruction\n exports.fire('destroy', view.element);\n\n // stop active processes (file uploads, fetches, stuff like that)\n // loop over items and depending on states call abort for ongoing processes\n store.dispatch('ABORT_ALL');\n\n // destroy view\n view._destroy();\n\n // stop listening to resize\n window.removeEventListener('resize', resizeHandler);\n\n // stop listening to the visiblitychange event\n document.removeEventListener('visibilitychange', visibilityHandler);\n\n // dispatch destroy\n store.dispatch('DID_DESTROY');\n },\n\n /**\n * Inserts the plugin before the target element\n */\n insertBefore: function insertBefore$1(element) {\n return insertBefore(view.element, element);\n },\n\n /**\n * Inserts the plugin after the target element\n */\n insertAfter: function insertAfter$1(element) {\n return insertAfter(view.element, element);\n },\n\n /**\n * Appends the plugin to the target element\n */\n appendTo: function appendTo(element) {\n return element.appendChild(view.element);\n },\n\n /**\n * Replaces an element with the app\n */\n replaceElement: function replaceElement(element) {\n // insert the app before the element\n insertBefore(view.element, element);\n\n // remove the original element\n element.parentNode.removeChild(element);\n\n // remember original element\n originalElement = element;\n },\n\n /**\n * Restores the original element\n */\n restoreElement: function restoreElement() {\n if (!originalElement) {\n return; // no element to restore\n }\n\n // restore original element\n insertAfter(originalElement, view.element);\n\n // remove our element\n view.element.parentNode.removeChild(view.element);\n\n // remove reference\n originalElement = null;\n },\n\n /**\n * Returns true if the app root is attached to given element\n * @param element\n */\n isAttachedTo: function isAttachedTo(element) {\n return view.element === element || originalElement === element;\n },\n\n /**\n * Returns the root element\n */\n element: {\n get: function get() {\n return view.element;\n },\n },\n\n /**\n * Returns the current pond status\n */\n status: {\n get: function get() {\n return store.query('GET_STATUS');\n },\n },\n }\n );\n\n // Done!\n store.dispatch('DID_INIT');\n\n // create actual api object\n return createObject(exports);\n };\n\n var createAppObject = function createAppObject() {\n var customOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n // default options\n var defaultOptions = {};\n forin(getOptions(), function(key, value) {\n defaultOptions[key] = value[0];\n });\n\n // set app options\n var app = createApp(\n Object.assign(\n {},\n\n defaultOptions,\n {},\n\n customOptions\n )\n );\n\n // return the plugin instance\n return app;\n };\n\n var lowerCaseFirstLetter = function lowerCaseFirstLetter(string) {\n return string.charAt(0).toLowerCase() + string.slice(1);\n };\n\n var attributeNameToPropertyName = function attributeNameToPropertyName(attributeName) {\n return toCamels(attributeName.replace(/^data-/, ''));\n };\n\n var mapObject = function mapObject(object, propertyMap) {\n // remove unwanted\n forin(propertyMap, function(selector, mapping) {\n forin(object, function(property, value) {\n // create regexp shortcut\n var selectorRegExp = new RegExp(selector);\n\n // tests if\n var matches = selectorRegExp.test(property);\n\n // no match, skip\n if (!matches) {\n return;\n }\n\n // if there's a mapping, the original property is always removed\n delete object[property];\n\n // should only remove, we done!\n if (mapping === false) {\n return;\n }\n\n // move value to new property\n if (isString(mapping)) {\n object[mapping] = value;\n return;\n }\n\n // move to group\n var group = mapping.group;\n if (isObject(mapping) && !object[group]) {\n object[group] = {};\n }\n\n object[group][lowerCaseFirstLetter(property.replace(selectorRegExp, ''))] = value;\n });\n\n // do submapping\n if (mapping.mapping) {\n mapObject(object[mapping.group], mapping.mapping);\n }\n });\n };\n\n var getAttributesAsObject = function getAttributesAsObject(node) {\n var attributeMapping =\n arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // turn attributes into object\n var attributes = [];\n forin(node.attributes, function(index) {\n attributes.push(node.attributes[index]);\n });\n\n var output = attributes\n .filter(function(attribute) {\n return attribute.name;\n })\n .reduce(function(obj, attribute) {\n var value = attr(node, attribute.name);\n\n obj[attributeNameToPropertyName(attribute.name)] =\n value === attribute.name ? true : value;\n return obj;\n }, {});\n\n // do mapping of object properties\n mapObject(output, attributeMapping);\n\n return output;\n };\n\n var createAppAtElement = function createAppAtElement(element) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // how attributes of the input element are mapped to the options for the plugin\n var attributeMapping = {\n // translate to other name\n '^class$': 'className',\n '^multiple$': 'allowMultiple',\n '^capture$': 'captureMethod',\n '^webkitdirectory$': 'allowDirectoriesOnly',\n\n // group under single property\n '^server': {\n group: 'server',\n mapping: {\n '^process': {\n group: 'process',\n },\n\n '^revert': {\n group: 'revert',\n },\n\n '^fetch': {\n group: 'fetch',\n },\n\n '^restore': {\n group: 'restore',\n },\n\n '^load': {\n group: 'load',\n },\n },\n },\n\n // don't include in object\n '^type$': false,\n '^files$': false,\n };\n\n // add additional option translators\n applyFilters('SET_ATTRIBUTE_TO_OPTION_MAP', attributeMapping);\n\n // create final options object by setting options object and then overriding options supplied on element\n var mergedOptions = Object.assign({}, options);\n\n var attributeOptions = getAttributesAsObject(\n element.nodeName === 'FIELDSET' ? element.querySelector('input[type=file]') : element,\n attributeMapping\n );\n\n // merge with options object\n Object.keys(attributeOptions).forEach(function(key) {\n if (isObject(attributeOptions[key])) {\n if (!isObject(mergedOptions[key])) {\n mergedOptions[key] = {};\n }\n Object.assign(mergedOptions[key], attributeOptions[key]);\n } else {\n mergedOptions[key] = attributeOptions[key];\n }\n });\n\n // if parent is a fieldset, get files from parent by selecting all input fields that are not file upload fields\n // these will then be automatically set to the initial files\n mergedOptions.files = (options.files || []).concat(\n Array.from(element.querySelectorAll('input:not([type=file])')).map(function(input) {\n return {\n source: input.value,\n options: {\n type: input.dataset.type,\n },\n };\n })\n );\n\n // build plugin\n var app = createAppObject(mergedOptions);\n\n // add already selected files\n if (element.files) {\n Array.from(element.files).forEach(function(file) {\n app.addFile(file);\n });\n }\n\n // replace the target element\n app.replaceElement(element);\n\n // expose\n return app;\n };\n\n // if an element is passed, we create the instance at that element, if not, we just create an up object\n var createApp$1 = function createApp() {\n return isNode(arguments.length <= 0 ? undefined : arguments[0])\n ? createAppAtElement.apply(void 0, arguments)\n : createAppObject.apply(void 0, arguments);\n };\n\n var PRIVATE_METHODS = ['fire', '_read', '_write'];\n\n var createAppAPI = function createAppAPI(app) {\n var api = {};\n\n copyObjectPropertiesToObject(app, api, PRIVATE_METHODS);\n\n return api;\n };\n\n /**\n * Replaces placeholders in given string with replacements\n * @param string - \"Foo {bar}\"\"\n * @param replacements - { \"bar\": 10 }\n */\n var replaceInString = function replaceInString(string, replacements) {\n return string.replace(/(?:{([a-zA-Z]+)})/g, function(match, group) {\n return replacements[group];\n });\n };\n\n var createWorker = function createWorker(fn) {\n var workerBlob = new Blob(['(', fn.toString(), ')()'], {\n type: 'application/javascript',\n });\n\n var workerURL = URL.createObjectURL(workerBlob);\n var worker = new Worker(workerURL);\n\n return {\n transfer: function transfer(message, cb) {},\n post: function post(message, cb, transferList) {\n var id = getUniqueId();\n\n worker.onmessage = function(e) {\n if (e.data.id === id) {\n cb(e.data.message);\n }\n };\n\n worker.postMessage(\n {\n id: id,\n message: message,\n },\n\n transferList\n );\n },\n terminate: function terminate() {\n worker.terminate();\n URL.revokeObjectURL(workerURL);\n },\n };\n };\n\n var loadImage = function loadImage(url) {\n return new Promise(function(resolve, reject) {\n var img = new Image();\n img.onload = function() {\n resolve(img);\n };\n img.onerror = function(e) {\n reject(e);\n };\n img.src = url;\n });\n };\n\n var renameFile = function renameFile(file, name) {\n var renamedFile = file.slice(0, file.size, file.type);\n renamedFile.lastModifiedDate = file.lastModifiedDate;\n renamedFile.name = name;\n return renamedFile;\n };\n\n var copyFile = function copyFile(file) {\n return renameFile(file, file.name);\n };\n\n // already registered plugins (can't register twice)\n var registeredPlugins = [];\n\n // pass utils to plugin\n var createAppPlugin = function createAppPlugin(plugin) {\n // already registered\n if (registeredPlugins.includes(plugin)) {\n return;\n }\n\n // remember this plugin\n registeredPlugins.push(plugin);\n\n // setup!\n var pluginOutline = plugin({\n addFilter: addFilter,\n utils: {\n Type: Type,\n forin: forin,\n isString: isString,\n isFile: isFile,\n toNaturalFileSize: toNaturalFileSize,\n replaceInString: replaceInString,\n getExtensionFromFilename: getExtensionFromFilename,\n getFilenameWithoutExtension: getFilenameWithoutExtension,\n guesstimateMimeType: guesstimateMimeType,\n getFileFromBlob: getFileFromBlob,\n getFilenameFromURL: getFilenameFromURL,\n createRoute: createRoute,\n createWorker: createWorker,\n createView: createView,\n createItemAPI: createItemAPI,\n loadImage: loadImage,\n copyFile: copyFile,\n renameFile: renameFile,\n createBlob: createBlob,\n applyFilterChain: applyFilterChain,\n text: text,\n getNumericAspectRatioFromString: getNumericAspectRatioFromString,\n },\n\n views: {\n fileActionButton: fileActionButton,\n },\n });\n\n // add plugin options to default options\n extendDefaultOptions(pluginOutline.options);\n };\n\n // feature detection used by supported() method\n var isOperaMini = function isOperaMini() {\n return Object.prototype.toString.call(window.operamini) === '[object OperaMini]';\n };\n var hasPromises = function hasPromises() {\n return 'Promise' in window;\n };\n var hasBlobSlice = function hasBlobSlice() {\n return 'slice' in Blob.prototype;\n };\n var hasCreateObjectURL = function hasCreateObjectURL() {\n return 'URL' in window && 'createObjectURL' in window.URL;\n };\n var hasVisibility = function hasVisibility() {\n return 'visibilityState' in document;\n };\n var hasTiming = function hasTiming() {\n return 'performance' in window;\n }; // iOS 8.x\n var hasCSSSupports = function hasCSSSupports() {\n return 'supports' in (window.CSS || {});\n }; // use to detect Safari 9+\n var isIE11 = function isIE11() {\n return /MSIE|Trident/.test(window.navigator.userAgent);\n };\n\n var supported = (function() {\n // Runs immediately and then remembers result for subsequent calls\n var isSupported =\n // Has to be a browser\n isBrowser() &&\n // Can't run on Opera Mini due to lack of everything\n !isOperaMini() &&\n // Require these APIs to feature detect a modern browser\n hasVisibility() &&\n hasPromises() &&\n hasBlobSlice() &&\n hasCreateObjectURL() &&\n hasTiming() &&\n // doesn't need CSSSupports but is a good way to detect Safari 9+ (we do want to support IE11 though)\n (hasCSSSupports() || isIE11());\n\n return function() {\n return isSupported;\n };\n })();\n\n /**\n * Plugin internal state (over all instances)\n */\n var state = {\n // active app instances, used to redraw the apps and to find the later\n apps: [],\n };\n\n // plugin name\n var name = 'filepond';\n\n /**\n * Public Plugin methods\n */\n var fn = function fn() {};\n exports.Status = {};\n exports.FileStatus = {};\n exports.FileOrigin = {};\n exports.OptionTypes = {};\n exports.create = fn;\n exports.destroy = fn;\n exports.parse = fn;\n exports.find = fn;\n exports.registerPlugin = fn;\n exports.getOptions = fn;\n exports.setOptions = fn;\n\n // if not supported, no API\n if (supported()) {\n // start painter and fire load event\n createPainter(\n function() {\n state.apps.forEach(function(app) {\n return app._read();\n });\n },\n function(ts) {\n state.apps.forEach(function(app) {\n return app._write(ts);\n });\n }\n );\n\n // fire loaded event so we know when FilePond is available\n var dispatch = function dispatch() {\n // let others know we have area ready\n document.dispatchEvent(\n new CustomEvent('FilePond:loaded', {\n detail: {\n supported: supported,\n create: exports.create,\n destroy: exports.destroy,\n parse: exports.parse,\n find: exports.find,\n registerPlugin: exports.registerPlugin,\n setOptions: exports.setOptions,\n },\n })\n );\n\n // clean up event\n document.removeEventListener('DOMContentLoaded', dispatch);\n };\n\n if (document.readyState !== 'loading') {\n // move to back of execution queue, FilePond should have been exported by then\n setTimeout(function() {\n return dispatch();\n }, 0);\n } else {\n document.addEventListener('DOMContentLoaded', dispatch);\n }\n\n // updates the OptionTypes object based on the current options\n var updateOptionTypes = function updateOptionTypes() {\n return forin(getOptions(), function(key, value) {\n exports.OptionTypes[key] = value[1];\n });\n };\n\n exports.Status = Object.assign({}, Status);\n exports.FileOrigin = Object.assign({}, FileOrigin);\n exports.FileStatus = Object.assign({}, ItemStatus);\n\n exports.OptionTypes = {};\n updateOptionTypes();\n\n // create method, creates apps and adds them to the app array\n exports.create = function create() {\n var app = createApp$1.apply(void 0, arguments);\n app.on('destroy', exports.destroy);\n state.apps.push(app);\n return createAppAPI(app);\n };\n\n // destroys apps and removes them from the app array\n exports.destroy = function destroy(hook) {\n // returns true if the app was destroyed successfully\n var indexToRemove = state.apps.findIndex(function(app) {\n return app.isAttachedTo(hook);\n });\n if (indexToRemove >= 0) {\n // remove from apps\n var app = state.apps.splice(indexToRemove, 1)[0];\n\n // restore original dom element\n app.restoreElement();\n\n return true;\n }\n\n return false;\n };\n\n // parses the given context for plugins (does not include the context element itself)\n exports.parse = function parse(context) {\n // get all possible hooks\n var matchedHooks = Array.from(context.querySelectorAll('.' + name));\n\n // filter out already active hooks\n var newHooks = matchedHooks.filter(function(newHook) {\n return !state.apps.find(function(app) {\n return app.isAttachedTo(newHook);\n });\n });\n\n // create new instance for each hook\n return newHooks.map(function(hook) {\n return exports.create(hook);\n });\n };\n\n // returns an app based on the given element hook\n exports.find = function find(hook) {\n var app = state.apps.find(function(app) {\n return app.isAttachedTo(hook);\n });\n if (!app) {\n return null;\n }\n return createAppAPI(app);\n };\n\n // adds a plugin extension\n exports.registerPlugin = function registerPlugin() {\n for (\n var _len = arguments.length, plugins = new Array(_len), _key = 0;\n _key < _len;\n _key++\n ) {\n plugins[_key] = arguments[_key];\n }\n\n // register plugins\n plugins.forEach(createAppPlugin);\n\n // update OptionTypes, each plugin might have extended the default options\n updateOptionTypes();\n };\n\n exports.getOptions = function getOptions$1() {\n var opts = {};\n forin(getOptions(), function(key, value) {\n opts[key] = value[0];\n });\n return opts;\n };\n\n exports.setOptions = function setOptions$1(opts) {\n if (isObject(opts)) {\n // update existing plugins\n state.apps.forEach(function(app) {\n app.setOptions(opts);\n });\n\n // override defaults\n setOptions(opts);\n }\n\n // return new options\n return exports.getOptions();\n };\n }\n\n exports.supported = supported;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n});\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar bind = require('function-bind');\n\nmodule.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\nimport { __assign, __rest, __spreadArray } from \"tslib\";\nimport { memoize, strategies } from '@formatjs/fast-memoize';\nimport { parse, } from '@formatjs/icu-messageformat-parser';\nimport { formatToParts, PART_TYPE, } from './formatters';\n// -- MessageFormat --------------------------------------------------------\nfunction mergeConfig(c1, c2) {\n if (!c2) {\n return c1;\n }\n return __assign(__assign(__assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {\n all[k] = __assign(__assign({}, c1[k]), (c2[k] || {}));\n return all;\n }, {}));\n}\nfunction mergeConfigs(defaultConfig, configs) {\n if (!configs) {\n return defaultConfig;\n }\n return Object.keys(defaultConfig).reduce(function (all, k) {\n all[k] = mergeConfig(defaultConfig[k], configs[k]);\n return all;\n }, __assign({}, defaultConfig));\n}\nfunction createFastMemoizeCache(store) {\n return {\n create: function () {\n return {\n get: function (key) {\n return store[key];\n },\n set: function (key, value) {\n store[key] = value;\n },\n };\n },\n };\n}\nfunction createDefaultFormatters(cache) {\n if (cache === void 0) { cache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n }; }\n return {\n getNumberFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.NumberFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.number),\n strategy: strategies.variadic,\n }),\n getDateTimeFormat: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.DateTimeFormat).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.dateTime),\n strategy: strategies.variadic,\n }),\n getPluralRules: memoize(function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return new ((_a = Intl.PluralRules).bind.apply(_a, __spreadArray([void 0], args, false)))();\n }, {\n cache: createFastMemoizeCache(cache.pluralRules),\n strategy: strategies.variadic,\n }),\n };\n}\nvar IntlMessageFormat = /** @class */ (function () {\n function IntlMessageFormat(message, locales, overrideFormats, opts) {\n if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }\n var _this = this;\n this.formatterCache = {\n number: {},\n dateTime: {},\n pluralRules: {},\n };\n this.format = function (values) {\n var parts = _this.formatToParts(values);\n // Hot path for straight simple msg translations\n if (parts.length === 1) {\n return parts[0].value;\n }\n var result = parts.reduce(function (all, part) {\n if (!all.length ||\n part.type !== PART_TYPE.literal ||\n typeof all[all.length - 1] !== 'string') {\n all.push(part.value);\n }\n else {\n all[all.length - 1] += part.value;\n }\n return all;\n }, []);\n if (result.length <= 1) {\n return result[0] || '';\n }\n return result;\n };\n this.formatToParts = function (values) {\n return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);\n };\n this.resolvedOptions = function () {\n var _a;\n return ({\n locale: ((_a = _this.resolvedLocale) === null || _a === void 0 ? void 0 : _a.toString()) ||\n Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],\n });\n };\n this.getAst = function () { return _this.ast; };\n // Defined first because it's used to build the format pattern.\n this.locales = locales;\n this.resolvedLocale = IntlMessageFormat.resolveLocale(locales);\n if (typeof message === 'string') {\n this.message = message;\n if (!IntlMessageFormat.__parse) {\n throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');\n }\n var _a = opts || {}, formatters = _a.formatters, parseOpts = __rest(_a, [\"formatters\"]);\n // Parse string messages into an AST.\n this.ast = IntlMessageFormat.__parse(message, __assign(__assign({}, parseOpts), { locale: this.resolvedLocale }));\n }\n else {\n this.ast = message;\n }\n if (!Array.isArray(this.ast)) {\n throw new TypeError('A message must be provided as a String or AST.');\n }\n // Creates a new object with the specified `formats` merged with the default\n // formats.\n this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);\n this.formatters =\n (opts && opts.formatters) || createDefaultFormatters(this.formatterCache);\n }\n Object.defineProperty(IntlMessageFormat, \"defaultLocale\", {\n get: function () {\n if (!IntlMessageFormat.memoizedDefaultLocale) {\n IntlMessageFormat.memoizedDefaultLocale =\n new Intl.NumberFormat().resolvedOptions().locale;\n }\n return IntlMessageFormat.memoizedDefaultLocale;\n },\n enumerable: false,\n configurable: true\n });\n IntlMessageFormat.memoizedDefaultLocale = null;\n IntlMessageFormat.resolveLocale = function (locales) {\n if (typeof Intl.Locale === 'undefined') {\n return;\n }\n var supportedLocales = Intl.NumberFormat.supportedLocalesOf(locales);\n if (supportedLocales.length > 0) {\n return new Intl.Locale(supportedLocales[0]);\n }\n return new Intl.Locale(typeof locales === 'string' ? locales : locales[0]);\n };\n IntlMessageFormat.__parse = parse;\n // Default format options used as the prototype of the `formats` provided to the\n // constructor. These are used when constructing the internal Intl.NumberFormat\n // and Intl.DateTimeFormat instances.\n IntlMessageFormat.formats = {\n number: {\n integer: {\n maximumFractionDigits: 0,\n },\n currency: {\n style: 'currency',\n },\n percent: {\n style: 'percent',\n },\n },\n date: {\n short: {\n month: 'numeric',\n day: 'numeric',\n year: '2-digit',\n },\n medium: {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n },\n long: {\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n full: {\n weekday: 'long',\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n },\n },\n time: {\n short: {\n hour: 'numeric',\n minute: 'numeric',\n },\n medium: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n },\n long: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n full: {\n hour: 'numeric',\n minute: 'numeric',\n second: 'numeric',\n timeZoneName: 'short',\n },\n },\n };\n return IntlMessageFormat;\n}());\nexport { IntlMessageFormat };\n","import { __extends } from \"tslib\";\nexport var ErrorCode;\n(function (ErrorCode) {\n // When we have a placeholder but no value to format\n ErrorCode[\"MISSING_VALUE\"] = \"MISSING_VALUE\";\n // When value supplied is invalid\n ErrorCode[\"INVALID_VALUE\"] = \"INVALID_VALUE\";\n // When we need specific Intl API but it's not available\n ErrorCode[\"MISSING_INTL_API\"] = \"MISSING_INTL_API\";\n})(ErrorCode || (ErrorCode = {}));\nvar FormatError = /** @class */ (function (_super) {\n __extends(FormatError, _super);\n function FormatError(msg, code, originalMessage) {\n var _this = _super.call(this, msg) || this;\n _this.code = code;\n _this.originalMessage = originalMessage;\n return _this;\n }\n FormatError.prototype.toString = function () {\n return \"[formatjs Error: \".concat(this.code, \"] \").concat(this.message);\n };\n return FormatError;\n}(Error));\nexport { FormatError };\nvar InvalidValueError = /** @class */ (function (_super) {\n __extends(InvalidValueError, _super);\n function InvalidValueError(variableId, value, options, originalMessage) {\n return _super.call(this, \"Invalid values for \\\"\".concat(variableId, \"\\\": \\\"\").concat(value, \"\\\". Options are \\\"\").concat(Object.keys(options).join('\", \"'), \"\\\"\"), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueError;\n}(FormatError));\nexport { InvalidValueError };\nvar InvalidValueTypeError = /** @class */ (function (_super) {\n __extends(InvalidValueTypeError, _super);\n function InvalidValueTypeError(value, type, originalMessage) {\n return _super.call(this, \"Value for \\\"\".concat(value, \"\\\" must be of type \").concat(type), ErrorCode.INVALID_VALUE, originalMessage) || this;\n }\n return InvalidValueTypeError;\n}(FormatError));\nexport { InvalidValueTypeError };\nvar MissingValueError = /** @class */ (function (_super) {\n __extends(MissingValueError, _super);\n function MissingValueError(variableId, originalMessage) {\n return _super.call(this, \"The intl string context variable \\\"\".concat(variableId, \"\\\" was not provided to the string \\\"\").concat(originalMessage, \"\\\"\"), ErrorCode.MISSING_VALUE, originalMessage) || this;\n }\n return MissingValueError;\n}(FormatError));\nexport { MissingValueError };\n","import { isArgumentElement, isDateElement, isDateTimeSkeleton, isLiteralElement, isNumberElement, isNumberSkeleton, isPluralElement, isPoundElement, isSelectElement, isTagElement, isTimeElement, } from '@formatjs/icu-messageformat-parser';\nimport { ErrorCode, FormatError, InvalidValueError, InvalidValueTypeError, MissingValueError, } from './error';\nexport var PART_TYPE;\n(function (PART_TYPE) {\n PART_TYPE[PART_TYPE[\"literal\"] = 0] = \"literal\";\n PART_TYPE[PART_TYPE[\"object\"] = 1] = \"object\";\n})(PART_TYPE || (PART_TYPE = {}));\nfunction mergeLiteral(parts) {\n if (parts.length < 2) {\n return parts;\n }\n return parts.reduce(function (all, part) {\n var lastPart = all[all.length - 1];\n if (!lastPart ||\n lastPart.type !== PART_TYPE.literal ||\n part.type !== PART_TYPE.literal) {\n all.push(part);\n }\n else {\n lastPart.value += part.value;\n }\n return all;\n }, []);\n}\nexport function isFormatXMLElementFn(el) {\n return typeof el === 'function';\n}\n// TODO(skeleton): add skeleton support\nexport function formatToParts(els, locales, formatters, formats, values, currentPluralValue, \n// For debugging\noriginalMessage) {\n // Hot path for straight simple msg translations\n if (els.length === 1 && isLiteralElement(els[0])) {\n return [\n {\n type: PART_TYPE.literal,\n value: els[0].value,\n },\n ];\n }\n var result = [];\n for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {\n var el = els_1[_i];\n // Exit early for string parts.\n if (isLiteralElement(el)) {\n result.push({\n type: PART_TYPE.literal,\n value: el.value,\n });\n continue;\n }\n // TODO: should this part be literal type?\n // Replace `#` in plural rules with the actual numeric value.\n if (isPoundElement(el)) {\n if (typeof currentPluralValue === 'number') {\n result.push({\n type: PART_TYPE.literal,\n value: formatters.getNumberFormat(locales).format(currentPluralValue),\n });\n }\n continue;\n }\n var varName = el.value;\n // Enforce that all required values are provided by the caller.\n if (!(values && varName in values)) {\n throw new MissingValueError(varName, originalMessage);\n }\n var value = values[varName];\n if (isArgumentElement(el)) {\n if (!value || typeof value === 'string' || typeof value === 'number') {\n value =\n typeof value === 'string' || typeof value === 'number'\n ? String(value)\n : '';\n }\n result.push({\n type: typeof value === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: value,\n });\n continue;\n }\n // Recursively format plural and select parts' option — which can be a\n // nested pattern structure. The choosing of the option to use is\n // abstracted-by and delegated-to the part helper object.\n if (isDateElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.date[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTimeElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.time[el.style]\n : isDateTimeSkeleton(el.style)\n ? el.style.parsedOptions\n : formats.time.medium;\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getDateTimeFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isNumberElement(el)) {\n var style = typeof el.style === 'string'\n ? formats.number[el.style]\n : isNumberSkeleton(el.style)\n ? el.style.parsedOptions\n : undefined;\n if (style && style.scale) {\n value =\n value *\n (style.scale || 1);\n }\n result.push({\n type: PART_TYPE.literal,\n value: formatters\n .getNumberFormat(locales, style)\n .format(value),\n });\n continue;\n }\n if (isTagElement(el)) {\n var children = el.children, value_1 = el.value;\n var formatFn = values[value_1];\n if (!isFormatXMLElementFn(formatFn)) {\n throw new InvalidValueTypeError(value_1, 'function', originalMessage);\n }\n var parts = formatToParts(children, locales, formatters, formats, values, currentPluralValue);\n var chunks = formatFn(parts.map(function (p) { return p.value; }));\n if (!Array.isArray(chunks)) {\n chunks = [chunks];\n }\n result.push.apply(result, chunks.map(function (c) {\n return {\n type: typeof c === 'string' ? PART_TYPE.literal : PART_TYPE.object,\n value: c,\n };\n }));\n }\n if (isSelectElement(el)) {\n var opt = el.options[value] || el.options.other;\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));\n continue;\n }\n if (isPluralElement(el)) {\n var opt = el.options[\"=\".concat(value)];\n if (!opt) {\n if (!Intl.PluralRules) {\n throw new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API, originalMessage);\n }\n var rule = formatters\n .getPluralRules(locales, { type: el.pluralType })\n .select(value - (el.offset || 0));\n opt = el.options[rule] || el.options.other;\n }\n if (!opt) {\n throw new InvalidValueError(el.value, value, Object.keys(el.options), originalMessage);\n }\n result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));\n continue;\n }\n }\n return mergeLiteral(result);\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Use invariant() to assert state which your program assumes to be true.\n *\n * Provide sprintf-style format (only %s is supported) and arguments\n * to provide information about what broke and what you were\n * expecting.\n *\n * The invariant message will be stripped in production, but the invariant\n * will remain to ensure logic does not differ in production.\n */\n\nvar invariant = function(condition, format, a, b, c, d, e, f) {\n if (process.env.NODE_ENV !== 'production') {\n if (format === undefined) {\n throw new Error('invariant requires an error message argument');\n }\n }\n\n if (!condition) {\n var error;\n if (format === undefined) {\n error = new Error(\n 'Minified exception occurred; use the non-minified dev environment ' +\n 'for the full error message and additional helpful warnings.'\n );\n } else {\n var args = [a, b, c, d, e, f];\n var argIndex = 0;\n error = new Error(\n format.replace(/%s/g, function() { return args[argIndex++]; })\n );\n error.name = 'Invariant Violation';\n }\n\n error.framesToPop = 1; // we don't care about invariant's own frame\n throw error;\n }\n};\n\nmodule.exports = invariant;\n","/*!\n * JavaScript Cookie v2.2.1\n * https://github.com/js-cookie/js-cookie\n *\n * Copyright 2006, 2015 Klaus Hartl & Fagner Brack\n * Released under the MIT license\n */\n;(function (factory) {\n\tvar registeredInModuleLoader;\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(factory);\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (typeof exports === 'object') {\n\t\tmodule.exports = factory();\n\t\tregisteredInModuleLoader = true;\n\t}\n\tif (!registeredInModuleLoader) {\n\t\tvar OldCookies = window.Cookies;\n\t\tvar api = window.Cookies = factory();\n\t\tapi.noConflict = function () {\n\t\t\twindow.Cookies = OldCookies;\n\t\t\treturn api;\n\t\t};\n\t}\n}(function () {\n\tfunction extend () {\n\t\tvar i = 0;\n\t\tvar result = {};\n\t\tfor (; i < arguments.length; i++) {\n\t\t\tvar attributes = arguments[ i ];\n\t\t\tfor (var key in attributes) {\n\t\t\t\tresult[key] = attributes[key];\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n\tfunction decode (s) {\n\t\treturn s.replace(/(%[0-9A-Z]{2})+/g, decodeURIComponent);\n\t}\n\n\tfunction init (converter) {\n\t\tfunction api() {}\n\n\t\tfunction set (key, value, attributes) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tattributes = extend({\n\t\t\t\tpath: '/'\n\t\t\t}, api.defaults, attributes);\n\n\t\t\tif (typeof attributes.expires === 'number') {\n\t\t\t\tattributes.expires = new Date(new Date() * 1 + attributes.expires * 864e+5);\n\t\t\t}\n\n\t\t\t// We're using \"expires\" because \"max-age\" is not supported by IE\n\t\t\tattributes.expires = attributes.expires ? attributes.expires.toUTCString() : '';\n\n\t\t\ttry {\n\t\t\t\tvar result = JSON.stringify(value);\n\t\t\t\tif (/^[\\{\\[]/.test(result)) {\n\t\t\t\t\tvalue = result;\n\t\t\t\t}\n\t\t\t} catch (e) {}\n\n\t\t\tvalue = converter.write ?\n\t\t\t\tconverter.write(value, key) :\n\t\t\t\tencodeURIComponent(String(value))\n\t\t\t\t\t.replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent);\n\n\t\t\tkey = encodeURIComponent(String(key))\n\t\t\t\t.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent)\n\t\t\t\t.replace(/[\\(\\)]/g, escape);\n\n\t\t\tvar stringifiedAttributes = '';\n\t\t\tfor (var attributeName in attributes) {\n\t\t\t\tif (!attributes[attributeName]) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tstringifiedAttributes += '; ' + attributeName;\n\t\t\t\tif (attributes[attributeName] === true) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Considers RFC 6265 section 5.2:\n\t\t\t\t// ...\n\t\t\t\t// 3. If the remaining unparsed-attributes contains a %x3B (\";\")\n\t\t\t\t// character:\n\t\t\t\t// Consume the characters of the unparsed-attributes up to,\n\t\t\t\t// not including, the first %x3B (\";\") character.\n\t\t\t\t// ...\n\t\t\t\tstringifiedAttributes += '=' + attributes[attributeName].split(';')[0];\n\t\t\t}\n\n\t\t\treturn (document.cookie = key + '=' + value + stringifiedAttributes);\n\t\t}\n\n\t\tfunction get (key, json) {\n\t\t\tif (typeof document === 'undefined') {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tvar jar = {};\n\t\t\t// To prevent the for loop in the first place assign an empty array\n\t\t\t// in case there are no cookies at all.\n\t\t\tvar cookies = document.cookie ? document.cookie.split('; ') : [];\n\t\t\tvar i = 0;\n\n\t\t\tfor (; i < cookies.length; i++) {\n\t\t\t\tvar parts = cookies[i].split('=');\n\t\t\t\tvar cookie = parts.slice(1).join('=');\n\n\t\t\t\tif (!json && cookie.charAt(0) === '\"') {\n\t\t\t\t\tcookie = cookie.slice(1, -1);\n\t\t\t\t}\n\n\t\t\t\ttry {\n\t\t\t\t\tvar name = decode(parts[0]);\n\t\t\t\t\tcookie = (converter.read || converter)(cookie, name) ||\n\t\t\t\t\t\tdecode(cookie);\n\n\t\t\t\t\tif (json) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tcookie = JSON.parse(cookie);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\n\t\t\t\t\tjar[name] = cookie;\n\n\t\t\t\t\tif (key === name) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t} catch (e) {}\n\t\t\t}\n\n\t\t\treturn key ? jar[key] : jar;\n\t\t}\n\n\t\tapi.set = set;\n\t\tapi.get = function (key) {\n\t\t\treturn get(key, false /* read as raw */);\n\t\t};\n\t\tapi.getJSON = function (key) {\n\t\t\treturn get(key, true /* read as json */);\n\t\t};\n\t\tapi.remove = function (key, attributes) {\n\t\t\tset(key, '', extend(attributes, {\n\t\t\t\texpires: -1\n\t\t\t}));\n\t\t};\n\n\t\tapi.defaults = {};\n\n\t\tapi.withConverter = init;\n\n\t\treturn api;\n\t}\n\n\treturn init(function () {});\n}));\n","var camel2hyphen = require('string-convert/camel2hyphen');\n\nvar isDimension = function (feature) {\n var re = /[height|width]$/;\n return re.test(feature);\n};\n\nvar obj2mq = function (obj) {\n var mq = '';\n var features = Object.keys(obj);\n features.forEach(function (feature, index) {\n var value = obj[feature];\n feature = camel2hyphen(feature);\n // Add px to dimension features\n if (isDimension(feature) && typeof value === 'number') {\n value = value + 'px';\n }\n if (value === true) {\n mq += feature;\n } else if (value === false) {\n mq += 'not ' + feature;\n } else {\n mq += '(' + feature + ': ' + value + ')';\n }\n if (index < features.length-1) {\n mq += ' and '\n }\n });\n return mq;\n};\n\nvar json2mq = function (query) {\n var mq = '';\n if (typeof query === 'string') {\n return query;\n }\n // Handling array of media queries\n if (query instanceof Array) {\n query.forEach(function (q, index) {\n mq += obj2mq(q);\n if (index < query.length-1) {\n mq += ', '\n }\n });\n return mq;\n }\n // Handling single media query\n return obj2mq(query);\n};\n\nmodule.exports = json2mq;","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>\n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.5\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i<alphabet.length ; i++) {\n baseReverseDic[alphabet][alphabet.charAt(i)] = i;\n }\n }\n return baseReverseDic[alphabet][character];\n}\n\nvar LZString = {\n compressToBase64 : function (input) {\n if (input == null) return \"\";\n var res = LZString._compress(input, 6, function(a){return keyStrBase64.charAt(a);});\n switch (res.length % 4) { // To produce valid Base64\n default: // When could this happen ?\n case 0 : return res;\n case 1 : return res+\"===\";\n case 2 : return res+\"==\";\n case 3 : return res+\"=\";\n }\n },\n\n decompressFromBase64 : function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrBase64, input.charAt(index)); });\n },\n\n compressToUTF16 : function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 15, function(a){return f(a+32);}) + \" \";\n },\n\n decompressFromUTF16: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 16384, function(index) { return compressed.charCodeAt(index) - 32; });\n },\n\n //compress into uint8array (UCS-2 big endian format)\n compressToUint8Array: function (uncompressed) {\n var compressed = LZString.compress(uncompressed);\n var buf=new Uint8Array(compressed.length*2); // 2 bytes per character\n\n for (var i=0, TotalLen=compressed.length; i<TotalLen; i++) {\n var current_value = compressed.charCodeAt(i);\n buf[i*2] = current_value >>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i<TotalLen; i++) {\n buf[i]=compressed[i*2]*256+compressed[i*2+1];\n }\n\n var result = [];\n buf.forEach(function (c) {\n result.push(f(c));\n });\n return LZString.decompress(result.join(''));\n\n }\n\n },\n\n\n //compress into a string that is already URI encoded\n compressToEncodedURIComponent: function (input) {\n if (input == null) return \"\";\n return LZString._compress(input, 6, function(a){return keyStrUriSafe.charAt(a);});\n },\n\n //decompress from an output of compressToEncodedURIComponent\n decompressFromEncodedURIComponent:function (input) {\n if (input == null) return \"\";\n if (input == \"\") return null;\n input = input.replace(/ /g, \"+\");\n return LZString._decompress(input.length, 32, function(index) { return getBaseValue(keyStrUriSafe, input.charAt(index)); });\n },\n\n compress: function (uncompressed) {\n return LZString._compress(uncompressed, 16, function(a){return f(a);});\n },\n _compress: function (uncompressed, bitsPerChar, getCharFromInt) {\n if (uncompressed == null) return \"\";\n var i, value,\n context_dictionary= {},\n context_dictionaryToCreate= {},\n context_c=\"\",\n context_wc=\"\",\n context_w=\"\",\n context_enlargeIn= 2, // Compensate for the first entry which should not count\n context_dictSize= 3,\n context_numBits= 2,\n context_data=[],\n context_data_val=0,\n context_data_position=0,\n ii;\n\n for (ii = 0; ii < uncompressed.length; ii += 1) {\n context_c = uncompressed.charAt(ii);\n if (!Object.prototype.hasOwnProperty.call(context_dictionary,context_c)) {\n context_dictionary[context_c] = context_dictSize++;\n context_dictionaryToCreate[context_c] = true;\n }\n\n context_wc = context_w + context_c;\n if (Object.prototype.hasOwnProperty.call(context_dictionary,context_wc)) {\n context_w = context_wc;\n } else {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position ==bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<8 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | value;\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = 0;\n }\n value = context_w.charCodeAt(0);\n for (i=0 ; i<16 ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i<context_numBits ; i++) {\n context_data_val = (context_data_val << 1) | (value&1);\n if (context_data_position == bitsPerChar-1) {\n context_data_position = 0;\n context_data.push(getCharFromInt(context_data_val));\n context_data_val = 0;\n } else {\n context_data_position++;\n }\n value = value >> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\n} else if( typeof angular !== 'undefined' && angular != null ) {\n angular.module('LZString', [])\n .factory('LZString', function () {\n return LZString;\n });\n}\n","'use strict';\n\nvar Config = {\n DEBUG: false,\n LIB_VERSION: '2.47.0'\n};\n\n// since es6 imports are static and we run unit tests from the console, window won't be defined when importing this file\nvar window$1;\nif (typeof(window) === 'undefined') {\n var loc = {\n hostname: ''\n };\n window$1 = {\n navigator: { userAgent: '' },\n document: {\n location: loc,\n referrer: ''\n },\n screen: { width: 0, height: 0 },\n location: loc\n };\n} else {\n window$1 = window;\n}\n\n/*\n * Saved references to long variable names, so that closure compiler can\n * minimize file size.\n */\n\nvar ArrayProto = Array.prototype;\nvar FuncProto = Function.prototype;\nvar ObjProto = Object.prototype;\nvar slice = ArrayProto.slice;\nvar toString = ObjProto.toString;\nvar hasOwnProperty = ObjProto.hasOwnProperty;\nvar windowConsole = window$1.console;\nvar navigator = window$1.navigator;\nvar document$1 = window$1.document;\nvar windowOpera = window$1.opera;\nvar screen = window$1.screen;\nvar userAgent = navigator.userAgent;\nvar nativeBind = FuncProto.bind;\nvar nativeForEach = ArrayProto.forEach;\nvar nativeIndexOf = ArrayProto.indexOf;\nvar nativeMap = ArrayProto.map;\nvar nativeIsArray = Array.isArray;\nvar breaker = {};\nvar _ = {\n trim: function(str) {\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill\n return str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n }\n};\n\n// Console override\nvar console = {\n /** @type {function(...*)} */\n log: function() {\n if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {\n try {\n windowConsole.log.apply(windowConsole, arguments);\n } catch (err) {\n _.each(arguments, function(arg) {\n windowConsole.log(arg);\n });\n }\n }\n },\n /** @type {function(...*)} */\n warn: function() {\n if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {\n var args = ['Mixpanel warning:'].concat(_.toArray(arguments));\n try {\n windowConsole.warn.apply(windowConsole, args);\n } catch (err) {\n _.each(args, function(arg) {\n windowConsole.warn(arg);\n });\n }\n }\n },\n /** @type {function(...*)} */\n error: function() {\n if (Config.DEBUG && !_.isUndefined(windowConsole) && windowConsole) {\n var args = ['Mixpanel error:'].concat(_.toArray(arguments));\n try {\n windowConsole.error.apply(windowConsole, args);\n } catch (err) {\n _.each(args, function(arg) {\n windowConsole.error(arg);\n });\n }\n }\n },\n /** @type {function(...*)} */\n critical: function() {\n if (!_.isUndefined(windowConsole) && windowConsole) {\n var args = ['Mixpanel error:'].concat(_.toArray(arguments));\n try {\n windowConsole.error.apply(windowConsole, args);\n } catch (err) {\n _.each(args, function(arg) {\n windowConsole.error(arg);\n });\n }\n }\n }\n};\n\nvar log_func_with_prefix = function(func, prefix) {\n return function() {\n arguments[0] = '[' + prefix + '] ' + arguments[0];\n return func.apply(console, arguments);\n };\n};\nvar console_with_prefix = function(prefix) {\n return {\n log: log_func_with_prefix(console.log, prefix),\n error: log_func_with_prefix(console.error, prefix),\n critical: log_func_with_prefix(console.critical, prefix)\n };\n};\n\n\n// UNDERSCORE\n// Embed part of the Underscore Library\n_.bind = function(func, context) {\n var args, bound;\n if (nativeBind && func.bind === nativeBind) {\n return nativeBind.apply(func, slice.call(arguments, 1));\n }\n if (!_.isFunction(func)) {\n throw new TypeError();\n }\n args = slice.call(arguments, 2);\n bound = function() {\n if (!(this instanceof bound)) {\n return func.apply(context, args.concat(slice.call(arguments)));\n }\n var ctor = {};\n ctor.prototype = func.prototype;\n var self = new ctor();\n ctor.prototype = null;\n var result = func.apply(self, args.concat(slice.call(arguments)));\n if (Object(result) === result) {\n return result;\n }\n return self;\n };\n return bound;\n};\n\n/**\n * @param {*=} obj\n * @param {function(...*)=} iterator\n * @param {Object=} context\n */\n_.each = function(obj, iterator, context) {\n if (obj === null || obj === undefined) {\n return;\n }\n if (nativeForEach && obj.forEach === nativeForEach) {\n obj.forEach(iterator, context);\n } else if (obj.length === +obj.length) {\n for (var i = 0, l = obj.length; i < l; i++) {\n if (i in obj && iterator.call(context, obj[i], i, obj) === breaker) {\n return;\n }\n }\n } else {\n for (var key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n if (iterator.call(context, obj[key], key, obj) === breaker) {\n return;\n }\n }\n }\n }\n};\n\n_.extend = function(obj) {\n _.each(slice.call(arguments, 1), function(source) {\n for (var prop in source) {\n if (source[prop] !== void 0) {\n obj[prop] = source[prop];\n }\n }\n });\n return obj;\n};\n\n_.isArray = nativeIsArray || function(obj) {\n return toString.call(obj) === '[object Array]';\n};\n\n// from a comment on http://dbj.org/dbj/?p=286\n// fails on only one very rare and deliberate custom object:\n// var bomb = { toString : undefined, valueOf: function(o) { return \"function BOMBA!\"; }};\n_.isFunction = function(f) {\n try {\n return /^\\s*\\bfunction\\b/.test(f);\n } catch (x) {\n return false;\n }\n};\n\n_.isArguments = function(obj) {\n return !!(obj && hasOwnProperty.call(obj, 'callee'));\n};\n\n_.toArray = function(iterable) {\n if (!iterable) {\n return [];\n }\n if (iterable.toArray) {\n return iterable.toArray();\n }\n if (_.isArray(iterable)) {\n return slice.call(iterable);\n }\n if (_.isArguments(iterable)) {\n return slice.call(iterable);\n }\n return _.values(iterable);\n};\n\n_.map = function(arr, callback, context) {\n if (nativeMap && arr.map === nativeMap) {\n return arr.map(callback, context);\n } else {\n var results = [];\n _.each(arr, function(item) {\n results.push(callback.call(context, item));\n });\n return results;\n }\n};\n\n_.keys = function(obj) {\n var results = [];\n if (obj === null) {\n return results;\n }\n _.each(obj, function(value, key) {\n results[results.length] = key;\n });\n return results;\n};\n\n_.values = function(obj) {\n var results = [];\n if (obj === null) {\n return results;\n }\n _.each(obj, function(value) {\n results[results.length] = value;\n });\n return results;\n};\n\n_.include = function(obj, target) {\n var found = false;\n if (obj === null) {\n return found;\n }\n if (nativeIndexOf && obj.indexOf === nativeIndexOf) {\n return obj.indexOf(target) != -1;\n }\n _.each(obj, function(value) {\n if (found || (found = (value === target))) {\n return breaker;\n }\n });\n return found;\n};\n\n_.includes = function(str, needle) {\n return str.indexOf(needle) !== -1;\n};\n\n// Underscore Addons\n_.inherit = function(subclass, superclass) {\n subclass.prototype = new superclass();\n subclass.prototype.constructor = subclass;\n subclass.superclass = superclass.prototype;\n return subclass;\n};\n\n_.isObject = function(obj) {\n return (obj === Object(obj) && !_.isArray(obj));\n};\n\n_.isEmptyObject = function(obj) {\n if (_.isObject(obj)) {\n for (var key in obj) {\n if (hasOwnProperty.call(obj, key)) {\n return false;\n }\n }\n return true;\n }\n return false;\n};\n\n_.isUndefined = function(obj) {\n return obj === void 0;\n};\n\n_.isString = function(obj) {\n return toString.call(obj) == '[object String]';\n};\n\n_.isDate = function(obj) {\n return toString.call(obj) == '[object Date]';\n};\n\n_.isNumber = function(obj) {\n return toString.call(obj) == '[object Number]';\n};\n\n_.isElement = function(obj) {\n return !!(obj && obj.nodeType === 1);\n};\n\n_.encodeDates = function(obj) {\n _.each(obj, function(v, k) {\n if (_.isDate(v)) {\n obj[k] = _.formatDate(v);\n } else if (_.isObject(v)) {\n obj[k] = _.encodeDates(v); // recurse\n }\n });\n return obj;\n};\n\n_.timestamp = function() {\n Date.now = Date.now || function() {\n return +new Date;\n };\n return Date.now();\n};\n\n_.formatDate = function(d) {\n // YYYY-MM-DDTHH:MM:SS in UTC\n function pad(n) {\n return n < 10 ? '0' + n : n;\n }\n return d.getUTCFullYear() + '-' +\n pad(d.getUTCMonth() + 1) + '-' +\n pad(d.getUTCDate()) + 'T' +\n pad(d.getUTCHours()) + ':' +\n pad(d.getUTCMinutes()) + ':' +\n pad(d.getUTCSeconds());\n};\n\n_.strip_empty_properties = function(p) {\n var ret = {};\n _.each(p, function(v, k) {\n if (_.isString(v) && v.length > 0) {\n ret[k] = v;\n }\n });\n return ret;\n};\n\n/*\n * this function returns a copy of object after truncating it. If\n * passed an Array or Object it will iterate through obj and\n * truncate all the values recursively.\n */\n_.truncate = function(obj, length) {\n var ret;\n\n if (typeof(obj) === 'string') {\n ret = obj.slice(0, length);\n } else if (_.isArray(obj)) {\n ret = [];\n _.each(obj, function(val) {\n ret.push(_.truncate(val, length));\n });\n } else if (_.isObject(obj)) {\n ret = {};\n _.each(obj, function(val, key) {\n ret[key] = _.truncate(val, length);\n });\n } else {\n ret = obj;\n }\n\n return ret;\n};\n\n_.JSONEncode = (function() {\n return function(mixed_val) {\n var value = mixed_val;\n var quote = function(string) {\n var escapable = /[\\\\\"\\x00-\\x1f\\x7f-\\x9f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]/g; // eslint-disable-line no-control-regex\n var meta = { // table of character substitutions\n '\\b': '\\\\b',\n '\\t': '\\\\t',\n '\\n': '\\\\n',\n '\\f': '\\\\f',\n '\\r': '\\\\r',\n '\"': '\\\\\"',\n '\\\\': '\\\\\\\\'\n };\n\n escapable.lastIndex = 0;\n return escapable.test(string) ?\n '\"' + string.replace(escapable, function(a) {\n var c = meta[a];\n return typeof c === 'string' ? c :\n '\\\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4);\n }) + '\"' :\n '\"' + string + '\"';\n };\n\n var str = function(key, holder) {\n var gap = '';\n var indent = ' ';\n var i = 0; // The loop counter.\n var k = ''; // The member key.\n var v = ''; // The member value.\n var length = 0;\n var mind = gap;\n var partial = [];\n var value = holder[key];\n\n // If the value has a toJSON method, call it to obtain a replacement value.\n if (value && typeof value === 'object' &&\n typeof value.toJSON === 'function') {\n value = value.toJSON(key);\n }\n\n // What happens next depends on the value's type.\n switch (typeof value) {\n case 'string':\n return quote(value);\n\n case 'number':\n // JSON numbers must be finite. Encode non-finite numbers as null.\n return isFinite(value) ? String(value) : 'null';\n\n case 'boolean':\n case 'null':\n // If the value is a boolean or null, convert it to a string. Note:\n // typeof null does not produce 'null'. The case is included here in\n // the remote chance that this gets fixed someday.\n\n return String(value);\n\n case 'object':\n // If the type is 'object', we might be dealing with an object or an array or\n // null.\n // Due to a specification blunder in ECMAScript, typeof null is 'object',\n // so watch out for that case.\n if (!value) {\n return 'null';\n }\n\n // Make an array to hold the partial results of stringifying this object value.\n gap += indent;\n partial = [];\n\n // Is the value an array?\n if (toString.apply(value) === '[object Array]') {\n // The value is an array. Stringify every element. Use null as a placeholder\n // for non-JSON values.\n\n length = value.length;\n for (i = 0; i < length; i += 1) {\n partial[i] = str(i, value) || 'null';\n }\n\n // Join all of the elements together, separated with commas, and wrap them in\n // brackets.\n v = partial.length === 0 ? '[]' :\n gap ? '[\\n' + gap +\n partial.join(',\\n' + gap) + '\\n' +\n mind + ']' :\n '[' + partial.join(',') + ']';\n gap = mind;\n return v;\n }\n\n // Iterate through all of the keys in the object.\n for (k in value) {\n if (hasOwnProperty.call(value, k)) {\n v = str(k, value);\n if (v) {\n partial.push(quote(k) + (gap ? ': ' : ':') + v);\n }\n }\n }\n\n // Join all of the member texts together, separated with commas,\n // and wrap them in braces.\n v = partial.length === 0 ? '{}' :\n gap ? '{' + partial.join(',') + '' +\n mind + '}' : '{' + partial.join(',') + '}';\n gap = mind;\n return v;\n }\n };\n\n // Make a fake root object containing our value under the key of ''.\n // Return the result of stringifying the value.\n return str('', {\n '': value\n });\n };\n})();\n\n/**\n * From https://github.com/douglascrockford/JSON-js/blob/master/json_parse.js\n * Slightly modified to throw a real Error rather than a POJO\n */\n_.JSONDecode = (function() {\n var at, // The index of the current character\n ch, // The current character\n escapee = {\n '\"': '\"',\n '\\\\': '\\\\',\n '/': '/',\n 'b': '\\b',\n 'f': '\\f',\n 'n': '\\n',\n 'r': '\\r',\n 't': '\\t'\n },\n text,\n error = function(m) {\n var e = new SyntaxError(m);\n e.at = at;\n e.text = text;\n throw e;\n },\n next = function(c) {\n // If a c parameter is provided, verify that it matches the current character.\n if (c && c !== ch) {\n error('Expected \\'' + c + '\\' instead of \\'' + ch + '\\'');\n }\n // Get the next character. When there are no more characters,\n // return the empty string.\n ch = text.charAt(at);\n at += 1;\n return ch;\n },\n number = function() {\n // Parse a number value.\n var number,\n string = '';\n\n if (ch === '-') {\n string = '-';\n next('-');\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n if (ch === '.') {\n string += '.';\n while (next() && ch >= '0' && ch <= '9') {\n string += ch;\n }\n }\n if (ch === 'e' || ch === 'E') {\n string += ch;\n next();\n if (ch === '-' || ch === '+') {\n string += ch;\n next();\n }\n while (ch >= '0' && ch <= '9') {\n string += ch;\n next();\n }\n }\n number = +string;\n if (!isFinite(number)) {\n error('Bad number');\n } else {\n return number;\n }\n },\n\n string = function() {\n // Parse a string value.\n var hex,\n i,\n string = '',\n uffff;\n // When parsing for string values, we must look for \" and \\ characters.\n if (ch === '\"') {\n while (next()) {\n if (ch === '\"') {\n next();\n return string;\n }\n if (ch === '\\\\') {\n next();\n if (ch === 'u') {\n uffff = 0;\n for (i = 0; i < 4; i += 1) {\n hex = parseInt(next(), 16);\n if (!isFinite(hex)) {\n break;\n }\n uffff = uffff * 16 + hex;\n }\n string += String.fromCharCode(uffff);\n } else if (typeof escapee[ch] === 'string') {\n string += escapee[ch];\n } else {\n break;\n }\n } else {\n string += ch;\n }\n }\n }\n error('Bad string');\n },\n white = function() {\n // Skip whitespace.\n while (ch && ch <= ' ') {\n next();\n }\n },\n word = function() {\n // true, false, or null.\n switch (ch) {\n case 't':\n next('t');\n next('r');\n next('u');\n next('e');\n return true;\n case 'f':\n next('f');\n next('a');\n next('l');\n next('s');\n next('e');\n return false;\n case 'n':\n next('n');\n next('u');\n next('l');\n next('l');\n return null;\n }\n error('Unexpected \"' + ch + '\"');\n },\n value, // Placeholder for the value function.\n array = function() {\n // Parse an array value.\n var array = [];\n\n if (ch === '[') {\n next('[');\n white();\n if (ch === ']') {\n next(']');\n return array; // empty array\n }\n while (ch) {\n array.push(value());\n white();\n if (ch === ']') {\n next(']');\n return array;\n }\n next(',');\n white();\n }\n }\n error('Bad array');\n },\n object = function() {\n // Parse an object value.\n var key,\n object = {};\n\n if (ch === '{') {\n next('{');\n white();\n if (ch === '}') {\n next('}');\n return object; // empty object\n }\n while (ch) {\n key = string();\n white();\n next(':');\n if (Object.hasOwnProperty.call(object, key)) {\n error('Duplicate key \"' + key + '\"');\n }\n object[key] = value();\n white();\n if (ch === '}') {\n next('}');\n return object;\n }\n next(',');\n white();\n }\n }\n error('Bad object');\n };\n\n value = function() {\n // Parse a JSON value. It could be an object, an array, a string,\n // a number, or a word.\n white();\n switch (ch) {\n case '{':\n return object();\n case '[':\n return array();\n case '\"':\n return string();\n case '-':\n return number();\n default:\n return ch >= '0' && ch <= '9' ? number() : word();\n }\n };\n\n // Return the json_parse function. It will have access to all of the\n // above functions and variables.\n return function(source) {\n var result;\n\n text = source;\n at = 0;\n ch = ' ';\n result = value();\n white();\n if (ch) {\n error('Syntax error');\n }\n\n return result;\n };\n})();\n\n_.base64Encode = function(data) {\n var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n var o1, o2, o3, h1, h2, h3, h4, bits, i = 0,\n ac = 0,\n enc = '',\n tmp_arr = [];\n\n if (!data) {\n return data;\n }\n\n data = _.utf8Encode(data);\n\n do { // pack three octets into four hexets\n o1 = data.charCodeAt(i++);\n o2 = data.charCodeAt(i++);\n o3 = data.charCodeAt(i++);\n\n bits = o1 << 16 | o2 << 8 | o3;\n\n h1 = bits >> 18 & 0x3f;\n h2 = bits >> 12 & 0x3f;\n h3 = bits >> 6 & 0x3f;\n h4 = bits & 0x3f;\n\n // use hexets to index into b64, and append result to encoded string\n tmp_arr[ac++] = b64.charAt(h1) + b64.charAt(h2) + b64.charAt(h3) + b64.charAt(h4);\n } while (i < data.length);\n\n enc = tmp_arr.join('');\n\n switch (data.length % 3) {\n case 1:\n enc = enc.slice(0, -2) + '==';\n break;\n case 2:\n enc = enc.slice(0, -1) + '=';\n break;\n }\n\n return enc;\n};\n\n_.utf8Encode = function(string) {\n string = (string + '').replace(/\\r\\n/g, '\\n').replace(/\\r/g, '\\n');\n\n var utftext = '',\n start,\n end;\n var stringl = 0,\n n;\n\n start = end = 0;\n stringl = string.length;\n\n for (n = 0; n < stringl; n++) {\n var c1 = string.charCodeAt(n);\n var enc = null;\n\n if (c1 < 128) {\n end++;\n } else if ((c1 > 127) && (c1 < 2048)) {\n enc = String.fromCharCode((c1 >> 6) | 192, (c1 & 63) | 128);\n } else {\n enc = String.fromCharCode((c1 >> 12) | 224, ((c1 >> 6) & 63) | 128, (c1 & 63) | 128);\n }\n if (enc !== null) {\n if (end > start) {\n utftext += string.substring(start, end);\n }\n utftext += enc;\n start = end = n + 1;\n }\n }\n\n if (end > start) {\n utftext += string.substring(start, string.length);\n }\n\n return utftext;\n};\n\n_.UUID = (function() {\n\n // Time-based entropy\n var T = function() {\n var time = 1 * new Date(); // cross-browser version of Date.now()\n var ticks;\n if (window$1.performance && window$1.performance.now) {\n ticks = window$1.performance.now();\n } else {\n // fall back to busy loop\n ticks = 0;\n\n // this while loop figures how many browser ticks go by\n // before 1*new Date() returns a new number, ie the amount\n // of ticks that go by per millisecond\n while (time == 1 * new Date()) {\n ticks++;\n }\n }\n return time.toString(16) + Math.floor(ticks).toString(16);\n };\n\n // Math.Random entropy\n var R = function() {\n return Math.random().toString(16).replace('.', '');\n };\n\n // User agent entropy\n // This function takes the user agent string, and then xors\n // together each sequence of 8 bytes. This produces a final\n // sequence of 8 bytes which it returns as hex.\n var UA = function() {\n var ua = userAgent,\n i, ch, buffer = [],\n ret = 0;\n\n function xor(result, byte_array) {\n var j, tmp = 0;\n for (j = 0; j < byte_array.length; j++) {\n tmp |= (buffer[j] << j * 8);\n }\n return result ^ tmp;\n }\n\n for (i = 0; i < ua.length; i++) {\n ch = ua.charCodeAt(i);\n buffer.unshift(ch & 0xFF);\n if (buffer.length >= 4) {\n ret = xor(ret, buffer);\n buffer = [];\n }\n }\n\n if (buffer.length > 0) {\n ret = xor(ret, buffer);\n }\n\n return ret.toString(16);\n };\n\n return function() {\n var se = (screen.height * screen.width).toString(16);\n return (T() + '-' + R() + '-' + UA() + '-' + se + '-' + T());\n };\n})();\n\n// _.isBlockedUA()\n// This is to block various web spiders from executing our JS and\n// sending false tracking data\nvar BLOCKED_UA_STRS = [\n 'ahrefsbot',\n 'baiduspider',\n 'bingbot',\n 'bingpreview',\n 'facebookexternal',\n 'petalbot',\n 'pinterest',\n 'screaming frog',\n 'yahoo! slurp',\n 'yandexbot',\n\n // a whole bunch of goog-specific crawlers\n // https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers\n 'adsbot-google',\n 'apis-google',\n 'duplexweb-google',\n 'feedfetcher-google',\n 'google favicon',\n 'google web preview',\n 'google-read-aloud',\n 'googlebot',\n 'googleweblight',\n 'mediapartners-google',\n 'storebot-google'\n];\n_.isBlockedUA = function(ua) {\n var i;\n ua = ua.toLowerCase();\n for (i = 0; i < BLOCKED_UA_STRS.length; i++) {\n if (ua.indexOf(BLOCKED_UA_STRS[i]) !== -1) {\n return true;\n }\n }\n return false;\n};\n\n/**\n * @param {Object=} formdata\n * @param {string=} arg_separator\n */\n_.HTTPBuildQuery = function(formdata, arg_separator) {\n var use_val, use_key, tmp_arr = [];\n\n if (_.isUndefined(arg_separator)) {\n arg_separator = '&';\n }\n\n _.each(formdata, function(val, key) {\n use_val = encodeURIComponent(val.toString());\n use_key = encodeURIComponent(key);\n tmp_arr[tmp_arr.length] = use_key + '=' + use_val;\n });\n\n return tmp_arr.join(arg_separator);\n};\n\n_.getQueryParam = function(url, param) {\n // Expects a raw URL\n\n param = param.replace(/[[]/, '\\\\[').replace(/[\\]]/, '\\\\]');\n var regexS = '[\\\\?&]' + param + '=([^&#]*)',\n regex = new RegExp(regexS),\n results = regex.exec(url);\n if (results === null || (results && typeof(results[1]) !== 'string' && results[1].length)) {\n return '';\n } else {\n var result = results[1];\n try {\n result = decodeURIComponent(result);\n } catch(err) {\n console.error('Skipping decoding for malformed query param: ' + result);\n }\n return result.replace(/\\+/g, ' ');\n }\n};\n\n\n// _.cookie\n// Methods partially borrowed from quirksmode.org/js/cookies.html\n_.cookie = {\n get: function(name) {\n var nameEQ = name + '=';\n var ca = document$1.cookie.split(';');\n for (var i = 0; i < ca.length; i++) {\n var c = ca[i];\n while (c.charAt(0) == ' ') {\n c = c.substring(1, c.length);\n }\n if (c.indexOf(nameEQ) === 0) {\n return decodeURIComponent(c.substring(nameEQ.length, c.length));\n }\n }\n return null;\n },\n\n parse: function(name) {\n var cookie;\n try {\n cookie = _.JSONDecode(_.cookie.get(name)) || {};\n } catch (err) {\n // noop\n }\n return cookie;\n },\n\n set_seconds: function(name, value, seconds, is_cross_subdomain, is_secure, is_cross_site, domain_override) {\n var cdomain = '',\n expires = '',\n secure = '';\n\n if (domain_override) {\n cdomain = '; domain=' + domain_override;\n } else if (is_cross_subdomain) {\n var domain = extract_domain(document$1.location.hostname);\n cdomain = domain ? '; domain=.' + domain : '';\n }\n\n if (seconds) {\n var date = new Date();\n date.setTime(date.getTime() + (seconds * 1000));\n expires = '; expires=' + date.toGMTString();\n }\n\n if (is_cross_site) {\n is_secure = true;\n secure = '; SameSite=None';\n }\n if (is_secure) {\n secure += '; secure';\n }\n\n document$1.cookie = name + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure;\n },\n\n set: function(name, value, days, is_cross_subdomain, is_secure, is_cross_site, domain_override) {\n var cdomain = '', expires = '', secure = '';\n\n if (domain_override) {\n cdomain = '; domain=' + domain_override;\n } else if (is_cross_subdomain) {\n var domain = extract_domain(document$1.location.hostname);\n cdomain = domain ? '; domain=.' + domain : '';\n }\n\n if (days) {\n var date = new Date();\n date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));\n expires = '; expires=' + date.toGMTString();\n }\n\n if (is_cross_site) {\n is_secure = true;\n secure = '; SameSite=None';\n }\n if (is_secure) {\n secure += '; secure';\n }\n\n var new_cookie_val = name + '=' + encodeURIComponent(value) + expires + '; path=/' + cdomain + secure;\n document$1.cookie = new_cookie_val;\n return new_cookie_val;\n },\n\n remove: function(name, is_cross_subdomain, domain_override) {\n _.cookie.set(name, '', -1, is_cross_subdomain, false, false, domain_override);\n }\n};\n\nvar _localStorageSupported = null;\nvar localStorageSupported = function(storage, forceCheck) {\n if (_localStorageSupported !== null && !forceCheck) {\n return _localStorageSupported;\n }\n\n var supported = true;\n try {\n storage = storage || window.localStorage;\n var key = '__mplss_' + cheap_guid(8),\n val = 'xyz';\n storage.setItem(key, val);\n if (storage.getItem(key) !== val) {\n supported = false;\n }\n storage.removeItem(key);\n } catch (err) {\n supported = false;\n }\n\n _localStorageSupported = supported;\n return supported;\n};\n\n// _.localStorage\n_.localStorage = {\n is_supported: function(force_check) {\n var supported = localStorageSupported(null, force_check);\n if (!supported) {\n console.error('localStorage unsupported; falling back to cookie store');\n }\n return supported;\n },\n\n error: function(msg) {\n console.error('localStorage error: ' + msg);\n },\n\n get: function(name) {\n try {\n return window.localStorage.getItem(name);\n } catch (err) {\n _.localStorage.error(err);\n }\n return null;\n },\n\n parse: function(name) {\n try {\n return _.JSONDecode(_.localStorage.get(name)) || {};\n } catch (err) {\n // noop\n }\n return null;\n },\n\n set: function(name, value) {\n try {\n window.localStorage.setItem(name, value);\n } catch (err) {\n _.localStorage.error(err);\n }\n },\n\n remove: function(name) {\n try {\n window.localStorage.removeItem(name);\n } catch (err) {\n _.localStorage.error(err);\n }\n }\n};\n\n_.register_event = (function() {\n // written by Dean Edwards, 2005\n // with input from Tino Zijdel - crisp@xs4all.nl\n // with input from Carl Sverre - mail@carlsverre.com\n // with input from Mixpanel\n // http://dean.edwards.name/weblog/2005/10/add-event/\n // https://gist.github.com/1930440\n\n /**\n * @param {Object} element\n * @param {string} type\n * @param {function(...*)} handler\n * @param {boolean=} oldSchool\n * @param {boolean=} useCapture\n */\n var register_event = function(element, type, handler, oldSchool, useCapture) {\n if (!element) {\n console.error('No valid element provided to register_event');\n return;\n }\n\n if (element.addEventListener && !oldSchool) {\n element.addEventListener(type, handler, !!useCapture);\n } else {\n var ontype = 'on' + type;\n var old_handler = element[ontype]; // can be undefined\n element[ontype] = makeHandler(element, handler, old_handler);\n }\n };\n\n function makeHandler(element, new_handler, old_handlers) {\n var handler = function(event) {\n event = event || fixEvent(window.event);\n\n // this basically happens in firefox whenever another script\n // overwrites the onload callback and doesn't pass the event\n // object to previously defined callbacks. All the browsers\n // that don't define window.event implement addEventListener\n // so the dom_loaded handler will still be fired as usual.\n if (!event) {\n return undefined;\n }\n\n var ret = true;\n var old_result, new_result;\n\n if (_.isFunction(old_handlers)) {\n old_result = old_handlers(event);\n }\n new_result = new_handler.call(element, event);\n\n if ((false === old_result) || (false === new_result)) {\n ret = false;\n }\n\n return ret;\n };\n\n return handler;\n }\n\n function fixEvent(event) {\n if (event) {\n event.preventDefault = fixEvent.preventDefault;\n event.stopPropagation = fixEvent.stopPropagation;\n }\n return event;\n }\n fixEvent.preventDefault = function() {\n this.returnValue = false;\n };\n fixEvent.stopPropagation = function() {\n this.cancelBubble = true;\n };\n\n return register_event;\n})();\n\n\nvar TOKEN_MATCH_REGEX = new RegExp('^(\\\\w*)\\\\[(\\\\w+)([=~\\\\|\\\\^\\\\$\\\\*]?)=?\"?([^\\\\]\"]*)\"?\\\\]$');\n\n_.dom_query = (function() {\n /* document.getElementsBySelector(selector)\n - returns an array of element objects from the current document\n matching the CSS selector. Selectors can contain element names,\n class names and ids and can be nested. For example:\n\n elements = document.getElementsBySelector('div#main p a.external')\n\n Will return an array of all 'a' elements with 'external' in their\n class attribute that are contained inside 'p' elements that are\n contained inside the 'div' element which has id=\"main\"\n\n New in version 0.4: Support for CSS2 and CSS3 attribute selectors:\n See http://www.w3.org/TR/css3-selectors/#attribute-selectors\n\n Version 0.4 - Simon Willison, March 25th 2003\n -- Works in Phoenix 0.5, Mozilla 1.3, Opera 7, Internet Explorer 6, Internet Explorer 5 on Windows\n -- Opera 7 fails\n\n Version 0.5 - Carl Sverre, Jan 7th 2013\n -- Now uses jQuery-esque `hasClass` for testing class name\n equality. This fixes a bug related to '-' characters being\n considered not part of a 'word' in regex.\n */\n\n function getAllChildren(e) {\n // Returns all children of element. Workaround required for IE5/Windows. Ugh.\n return e.all ? e.all : e.getElementsByTagName('*');\n }\n\n var bad_whitespace = /[\\t\\r\\n]/g;\n\n function hasClass(elem, selector) {\n var className = ' ' + selector + ' ';\n return ((' ' + elem.className + ' ').replace(bad_whitespace, ' ').indexOf(className) >= 0);\n }\n\n function getElementsBySelector(selector) {\n // Attempt to fail gracefully in lesser browsers\n if (!document$1.getElementsByTagName) {\n return [];\n }\n // Split selector in to tokens\n var tokens = selector.split(' ');\n var token, bits, tagName, found, foundCount, i, j, k, elements, currentContextIndex;\n var currentContext = [document$1];\n for (i = 0; i < tokens.length; i++) {\n token = tokens[i].replace(/^\\s+/, '').replace(/\\s+$/, '');\n if (token.indexOf('#') > -1) {\n // Token is an ID selector\n bits = token.split('#');\n tagName = bits[0];\n var id = bits[1];\n var element = document$1.getElementById(id);\n if (!element || (tagName && element.nodeName.toLowerCase() != tagName)) {\n // element not found or tag with that ID not found, return false\n return [];\n }\n // Set currentContext to contain just this element\n currentContext = [element];\n continue; // Skip to next token\n }\n if (token.indexOf('.') > -1) {\n // Token contains a class selector\n bits = token.split('.');\n tagName = bits[0];\n var className = bits[1];\n if (!tagName) {\n tagName = '*';\n }\n // Get elements matching tag, filter them for class selector\n found = [];\n foundCount = 0;\n for (j = 0; j < currentContext.length; j++) {\n if (tagName == '*') {\n elements = getAllChildren(currentContext[j]);\n } else {\n elements = currentContext[j].getElementsByTagName(tagName);\n }\n for (k = 0; k < elements.length; k++) {\n found[foundCount++] = elements[k];\n }\n }\n currentContext = [];\n currentContextIndex = 0;\n for (j = 0; j < found.length; j++) {\n if (found[j].className &&\n _.isString(found[j].className) && // some SVG elements have classNames which are not strings\n hasClass(found[j], className)\n ) {\n currentContext[currentContextIndex++] = found[j];\n }\n }\n continue; // Skip to next token\n }\n // Code to deal with attribute selectors\n var token_match = token.match(TOKEN_MATCH_REGEX);\n if (token_match) {\n tagName = token_match[1];\n var attrName = token_match[2];\n var attrOperator = token_match[3];\n var attrValue = token_match[4];\n if (!tagName) {\n tagName = '*';\n }\n // Grab all of the tagName elements within current context\n found = [];\n foundCount = 0;\n for (j = 0; j < currentContext.length; j++) {\n if (tagName == '*') {\n elements = getAllChildren(currentContext[j]);\n } else {\n elements = currentContext[j].getElementsByTagName(tagName);\n }\n for (k = 0; k < elements.length; k++) {\n found[foundCount++] = elements[k];\n }\n }\n currentContext = [];\n currentContextIndex = 0;\n var checkFunction; // This function will be used to filter the elements\n switch (attrOperator) {\n case '=': // Equality\n checkFunction = function(e) {\n return (e.getAttribute(attrName) == attrValue);\n };\n break;\n case '~': // Match one of space seperated words\n checkFunction = function(e) {\n return (e.getAttribute(attrName).match(new RegExp('\\\\b' + attrValue + '\\\\b')));\n };\n break;\n case '|': // Match start with value followed by optional hyphen\n checkFunction = function(e) {\n return (e.getAttribute(attrName).match(new RegExp('^' + attrValue + '-?')));\n };\n break;\n case '^': // Match starts with value\n checkFunction = function(e) {\n return (e.getAttribute(attrName).indexOf(attrValue) === 0);\n };\n break;\n case '$': // Match ends with value - fails with \"Warning\" in Opera 7\n checkFunction = function(e) {\n return (e.getAttribute(attrName).lastIndexOf(attrValue) == e.getAttribute(attrName).length - attrValue.length);\n };\n break;\n case '*': // Match ends with value\n checkFunction = function(e) {\n return (e.getAttribute(attrName).indexOf(attrValue) > -1);\n };\n break;\n default:\n // Just test for existence of attribute\n checkFunction = function(e) {\n return e.getAttribute(attrName);\n };\n }\n currentContext = [];\n currentContextIndex = 0;\n for (j = 0; j < found.length; j++) {\n if (checkFunction(found[j])) {\n currentContext[currentContextIndex++] = found[j];\n }\n }\n // alert('Attribute Selector: '+tagName+' '+attrName+' '+attrOperator+' '+attrValue);\n continue; // Skip to next token\n }\n // If we get here, token is JUST an element (not a class or ID selector)\n tagName = token;\n found = [];\n foundCount = 0;\n for (j = 0; j < currentContext.length; j++) {\n elements = currentContext[j].getElementsByTagName(tagName);\n for (k = 0; k < elements.length; k++) {\n found[foundCount++] = elements[k];\n }\n }\n currentContext = found;\n }\n return currentContext;\n }\n\n return function(query) {\n if (_.isElement(query)) {\n return [query];\n } else if (_.isObject(query) && !_.isUndefined(query.length)) {\n return query;\n } else {\n return getElementsBySelector.call(this, query);\n }\n };\n})();\n\nvar CAMPAIGN_KEYWORDS = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_content', 'utm_term'];\nvar CLICK_IDS = ['dclid', 'fbclid', 'gclid', 'ko_click_id', 'li_fat_id', 'msclkid', 'ttclid', 'twclid', 'wbraid'];\n\n_.info = {\n campaignParams: function(default_value) {\n var kw = '',\n params = {};\n _.each(CAMPAIGN_KEYWORDS, function(kwkey) {\n kw = _.getQueryParam(document$1.URL, kwkey);\n if (kw.length) {\n params[kwkey] = kw;\n } else if (default_value !== undefined) {\n params[kwkey] = default_value;\n }\n });\n\n return params;\n },\n\n clickParams: function() {\n var id = '',\n params = {};\n _.each(CLICK_IDS, function(idkey) {\n id = _.getQueryParam(document$1.URL, idkey);\n if (id.length) {\n params[idkey] = id;\n }\n });\n\n return params;\n },\n\n marketingParams: function() {\n return _.extend(_.info.campaignParams(), _.info.clickParams());\n },\n\n searchEngine: function(referrer) {\n if (referrer.search('https?://(.*)google.([^/?]*)') === 0) {\n return 'google';\n } else if (referrer.search('https?://(.*)bing.com') === 0) {\n return 'bing';\n } else if (referrer.search('https?://(.*)yahoo.com') === 0) {\n return 'yahoo';\n } else if (referrer.search('https?://(.*)duckduckgo.com') === 0) {\n return 'duckduckgo';\n } else {\n return null;\n }\n },\n\n searchInfo: function(referrer) {\n var search = _.info.searchEngine(referrer),\n param = (search != 'yahoo') ? 'q' : 'p',\n ret = {};\n\n if (search !== null) {\n ret['$search_engine'] = search;\n\n var keyword = _.getQueryParam(referrer, param);\n if (keyword.length) {\n ret['mp_keyword'] = keyword;\n }\n }\n\n return ret;\n },\n\n /**\n * This function detects which browser is running this script.\n * The order of the checks are important since many user agents\n * include key words used in later checks.\n */\n browser: function(user_agent, vendor, opera) {\n vendor = vendor || ''; // vendor is undefined for at least IE9\n if (opera || _.includes(user_agent, ' OPR/')) {\n if (_.includes(user_agent, 'Mini')) {\n return 'Opera Mini';\n }\n return 'Opera';\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(user_agent)) {\n return 'BlackBerry';\n } else if (_.includes(user_agent, 'IEMobile') || _.includes(user_agent, 'WPDesktop')) {\n return 'Internet Explorer Mobile';\n } else if (_.includes(user_agent, 'SamsungBrowser/')) {\n // https://developer.samsung.com/internet/user-agent-string-format\n return 'Samsung Internet';\n } else if (_.includes(user_agent, 'Edge') || _.includes(user_agent, 'Edg/')) {\n return 'Microsoft Edge';\n } else if (_.includes(user_agent, 'FBIOS')) {\n return 'Facebook Mobile';\n } else if (_.includes(user_agent, 'Chrome')) {\n return 'Chrome';\n } else if (_.includes(user_agent, 'CriOS')) {\n return 'Chrome iOS';\n } else if (_.includes(user_agent, 'UCWEB') || _.includes(user_agent, 'UCBrowser')) {\n return 'UC Browser';\n } else if (_.includes(user_agent, 'FxiOS')) {\n return 'Firefox iOS';\n } else if (_.includes(vendor, 'Apple')) {\n if (_.includes(user_agent, 'Mobile')) {\n return 'Mobile Safari';\n }\n return 'Safari';\n } else if (_.includes(user_agent, 'Android')) {\n return 'Android Mobile';\n } else if (_.includes(user_agent, 'Konqueror')) {\n return 'Konqueror';\n } else if (_.includes(user_agent, 'Firefox')) {\n return 'Firefox';\n } else if (_.includes(user_agent, 'MSIE') || _.includes(user_agent, 'Trident/')) {\n return 'Internet Explorer';\n } else if (_.includes(user_agent, 'Gecko')) {\n return 'Mozilla';\n } else {\n return '';\n }\n },\n\n /**\n * This function detects which browser version is running this script,\n * parsing major and minor version (e.g., 42.1). User agent strings from:\n * http://www.useragentstring.com/pages/useragentstring.php\n */\n browserVersion: function(userAgent, vendor, opera) {\n var browser = _.info.browser(userAgent, vendor, opera);\n var versionRegexs = {\n 'Internet Explorer Mobile': /rv:(\\d+(\\.\\d+)?)/,\n 'Microsoft Edge': /Edge?\\/(\\d+(\\.\\d+)?)/,\n 'Chrome': /Chrome\\/(\\d+(\\.\\d+)?)/,\n 'Chrome iOS': /CriOS\\/(\\d+(\\.\\d+)?)/,\n 'UC Browser' : /(UCBrowser|UCWEB)\\/(\\d+(\\.\\d+)?)/,\n 'Safari': /Version\\/(\\d+(\\.\\d+)?)/,\n 'Mobile Safari': /Version\\/(\\d+(\\.\\d+)?)/,\n 'Opera': /(Opera|OPR)\\/(\\d+(\\.\\d+)?)/,\n 'Firefox': /Firefox\\/(\\d+(\\.\\d+)?)/,\n 'Firefox iOS': /FxiOS\\/(\\d+(\\.\\d+)?)/,\n 'Konqueror': /Konqueror:(\\d+(\\.\\d+)?)/,\n 'BlackBerry': /BlackBerry (\\d+(\\.\\d+)?)/,\n 'Android Mobile': /android\\s(\\d+(\\.\\d+)?)/,\n 'Samsung Internet': /SamsungBrowser\\/(\\d+(\\.\\d+)?)/,\n 'Internet Explorer': /(rv:|MSIE )(\\d+(\\.\\d+)?)/,\n 'Mozilla': /rv:(\\d+(\\.\\d+)?)/\n };\n var regex = versionRegexs[browser];\n if (regex === undefined) {\n return null;\n }\n var matches = userAgent.match(regex);\n if (!matches) {\n return null;\n }\n return parseFloat(matches[matches.length - 2]);\n },\n\n os: function() {\n var a = userAgent;\n if (/Windows/i.test(a)) {\n if (/Phone/.test(a) || /WPDesktop/.test(a)) {\n return 'Windows Phone';\n }\n return 'Windows';\n } else if (/(iPhone|iPad|iPod)/.test(a)) {\n return 'iOS';\n } else if (/Android/.test(a)) {\n return 'Android';\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(a)) {\n return 'BlackBerry';\n } else if (/Mac/i.test(a)) {\n return 'Mac OS X';\n } else if (/Linux/.test(a)) {\n return 'Linux';\n } else if (/CrOS/.test(a)) {\n return 'Chrome OS';\n } else {\n return '';\n }\n },\n\n device: function(user_agent) {\n if (/Windows Phone/i.test(user_agent) || /WPDesktop/.test(user_agent)) {\n return 'Windows Phone';\n } else if (/iPad/.test(user_agent)) {\n return 'iPad';\n } else if (/iPod/.test(user_agent)) {\n return 'iPod Touch';\n } else if (/iPhone/.test(user_agent)) {\n return 'iPhone';\n } else if (/(BlackBerry|PlayBook|BB10)/i.test(user_agent)) {\n return 'BlackBerry';\n } else if (/Android/.test(user_agent)) {\n return 'Android';\n } else {\n return '';\n }\n },\n\n referringDomain: function(referrer) {\n var split = referrer.split('/');\n if (split.length >= 3) {\n return split[2];\n }\n return '';\n },\n\n properties: function() {\n return _.extend(_.strip_empty_properties({\n '$os': _.info.os(),\n '$browser': _.info.browser(userAgent, navigator.vendor, windowOpera),\n '$referrer': document$1.referrer,\n '$referring_domain': _.info.referringDomain(document$1.referrer),\n '$device': _.info.device(userAgent)\n }), {\n '$current_url': window$1.location.href,\n '$browser_version': _.info.browserVersion(userAgent, navigator.vendor, windowOpera),\n '$screen_height': screen.height,\n '$screen_width': screen.width,\n 'mp_lib': 'web',\n '$lib_version': Config.LIB_VERSION,\n '$insert_id': cheap_guid(),\n 'time': _.timestamp() / 1000 // epoch time in seconds\n });\n },\n\n people_properties: function() {\n return _.extend(_.strip_empty_properties({\n '$os': _.info.os(),\n '$browser': _.info.browser(userAgent, navigator.vendor, windowOpera)\n }), {\n '$browser_version': _.info.browserVersion(userAgent, navigator.vendor, windowOpera)\n });\n },\n\n mpPageViewProperties: function() {\n return _.strip_empty_properties({\n 'current_page_title': document$1.title,\n 'current_domain': window$1.location.hostname,\n 'current_url_path': window$1.location.pathname,\n 'current_url_protocol': window$1.location.protocol,\n 'current_url_search': window$1.location.search\n });\n }\n};\n\nvar cheap_guid = function(maxlen) {\n var guid = Math.random().toString(36).substring(2, 10) + Math.random().toString(36).substring(2, 10);\n return maxlen ? guid.substring(0, maxlen) : guid;\n};\n\n// naive way to extract domain name (example.com) from full hostname (my.sub.example.com)\nvar SIMPLE_DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]*\\.[a-z]+$/i;\n// this next one attempts to account for some ccSLDs, e.g. extracting oxford.ac.uk from www.oxford.ac.uk\nvar DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]+\\.[a-z.]{2,6}$/i;\n/**\n * Attempts to extract main domain name from full hostname, using a few blunt heuristics. For\n * common TLDs like .com/.org that always have a simple SLD.TLD structure (example.com), we\n * simply extract the last two .-separated parts of the hostname (SIMPLE_DOMAIN_MATCH_REGEX).\n * For others, we attempt to account for short ccSLD+TLD combos (.ac.uk) with the legacy\n * DOMAIN_MATCH_REGEX (kept to maintain backwards compatibility with existing Mixpanel\n * integrations). The only _reliable_ way to extract domain from hostname is with an up-to-date\n * list like at https://publicsuffix.org/ so for cases that this helper fails at, the SDK\n * offers the 'cookie_domain' config option to set it explicitly.\n * @example\n * extract_domain('my.sub.example.com')\n * // 'example.com'\n */\nvar extract_domain = function(hostname) {\n var domain_regex = DOMAIN_MATCH_REGEX;\n var parts = hostname.split('.');\n var tld = parts[parts.length - 1];\n if (tld.length > 4 || tld === 'com' || tld === 'org') {\n domain_regex = SIMPLE_DOMAIN_MATCH_REGEX;\n }\n var matches = hostname.match(domain_regex);\n return matches ? matches[0] : '';\n};\n\nvar JSONStringify = null;\nvar JSONParse = null;\nif (typeof JSON !== 'undefined') {\n JSONStringify = JSON.stringify;\n JSONParse = JSON.parse;\n}\nJSONStringify = JSONStringify || _.JSONEncode;\nJSONParse = JSONParse || _.JSONDecode;\n\n// EXPORTS (for closure compiler)\n_['toArray'] = _.toArray;\n_['isObject'] = _.isObject;\n_['JSONEncode'] = _.JSONEncode;\n_['JSONDecode'] = _.JSONDecode;\n_['isBlockedUA'] = _.isBlockedUA;\n_['isEmptyObject'] = _.isEmptyObject;\n_['info'] = _.info;\n_['info']['device'] = _.info.device;\n_['info']['browser'] = _.info.browser;\n_['info']['browserVersion'] = _.info.browserVersion;\n_['info']['properties'] = _.info.properties;\n\n/**\n * DomTracker Object\n * @constructor\n */\nvar DomTracker = function() {};\n\n\n// interface\nDomTracker.prototype.create_properties = function() {};\nDomTracker.prototype.event_handler = function() {};\nDomTracker.prototype.after_track_handler = function() {};\n\nDomTracker.prototype.init = function(mixpanel_instance) {\n this.mp = mixpanel_instance;\n return this;\n};\n\n/**\n * @param {Object|string} query\n * @param {string} event_name\n * @param {Object=} properties\n * @param {function=} user_callback\n */\nDomTracker.prototype.track = function(query, event_name, properties, user_callback) {\n var that = this;\n var elements = _.dom_query(query);\n\n if (elements.length === 0) {\n console.error('The DOM query (' + query + ') returned 0 elements');\n return;\n }\n\n _.each(elements, function(element) {\n _.register_event(element, this.override_event, function(e) {\n var options = {};\n var props = that.create_properties(properties, this);\n var timeout = that.mp.get_config('track_links_timeout');\n\n that.event_handler(e, this, options);\n\n // in case the mixpanel servers don't get back to us in time\n window.setTimeout(that.track_callback(user_callback, props, options, true), timeout);\n\n // fire the tracking event\n that.mp.track(event_name, props, that.track_callback(user_callback, props, options));\n });\n }, this);\n\n return true;\n};\n\n/**\n * @param {function} user_callback\n * @param {Object} props\n * @param {boolean=} timeout_occured\n */\nDomTracker.prototype.track_callback = function(user_callback, props, options, timeout_occured) {\n timeout_occured = timeout_occured || false;\n var that = this;\n\n return function() {\n // options is referenced from both callbacks, so we can have\n // a 'lock' of sorts to ensure only one fires\n if (options.callback_fired) { return; }\n options.callback_fired = true;\n\n if (user_callback && user_callback(timeout_occured, props) === false) {\n // user can prevent the default functionality by\n // returning false from their callback\n return;\n }\n\n that.after_track_handler(props, options, timeout_occured);\n };\n};\n\nDomTracker.prototype.create_properties = function(properties, element) {\n var props;\n\n if (typeof(properties) === 'function') {\n props = properties(element);\n } else {\n props = _.extend({}, properties);\n }\n\n return props;\n};\n\n/**\n * LinkTracker Object\n * @constructor\n * @extends DomTracker\n */\nvar LinkTracker = function() {\n this.override_event = 'click';\n};\n_.inherit(LinkTracker, DomTracker);\n\nLinkTracker.prototype.create_properties = function(properties, element) {\n var props = LinkTracker.superclass.create_properties.apply(this, arguments);\n\n if (element.href) { props['url'] = element.href; }\n\n return props;\n};\n\nLinkTracker.prototype.event_handler = function(evt, element, options) {\n options.new_tab = (\n evt.which === 2 ||\n evt.metaKey ||\n evt.ctrlKey ||\n element.target === '_blank'\n );\n options.href = element.href;\n\n if (!options.new_tab) {\n evt.preventDefault();\n }\n};\n\nLinkTracker.prototype.after_track_handler = function(props, options) {\n if (options.new_tab) { return; }\n\n setTimeout(function() {\n window.location = options.href;\n }, 0);\n};\n\n/**\n * FormTracker Object\n * @constructor\n * @extends DomTracker\n */\nvar FormTracker = function() {\n this.override_event = 'submit';\n};\n_.inherit(FormTracker, DomTracker);\n\nFormTracker.prototype.event_handler = function(evt, element, options) {\n options.element = element;\n evt.preventDefault();\n};\n\nFormTracker.prototype.after_track_handler = function(props, options) {\n setTimeout(function() {\n options.element.submit();\n }, 0);\n};\n\n// eslint-disable-line camelcase\n\nvar logger$2 = console_with_prefix('lock');\n\n/**\n * SharedLock: a mutex built on HTML5 localStorage, to ensure that only one browser\n * window/tab at a time will be able to access shared resources.\n *\n * Based on the Alur and Taubenfeld fast lock\n * (http://www.cs.rochester.edu/research/synchronization/pseudocode/fastlock.html)\n * with an added timeout to ensure there will be eventual progress in the event\n * that a window is closed in the middle of the callback.\n *\n * Implementation based on the original version by David Wolever (https://github.com/wolever)\n * at https://gist.github.com/wolever/5fd7573d1ef6166e8f8c4af286a69432.\n *\n * @example\n * const myLock = new SharedLock('some-key');\n * myLock.withLock(function() {\n * console.log('I hold the mutex!');\n * });\n *\n * @constructor\n */\nvar SharedLock = function(key, options) {\n options = options || {};\n\n this.storageKey = key;\n this.storage = options.storage || window.localStorage;\n this.pollIntervalMS = options.pollIntervalMS || 100;\n this.timeoutMS = options.timeoutMS || 2000;\n};\n\n// pass in a specific pid to test contention scenarios; otherwise\n// it is chosen randomly for each acquisition attempt\nSharedLock.prototype.withLock = function(lockedCB, errorCB, pid) {\n if (!pid && typeof errorCB !== 'function') {\n pid = errorCB;\n errorCB = null;\n }\n\n var i = pid || (new Date().getTime() + '|' + Math.random());\n var startTime = new Date().getTime();\n\n var key = this.storageKey;\n var pollIntervalMS = this.pollIntervalMS;\n var timeoutMS = this.timeoutMS;\n var storage = this.storage;\n\n var keyX = key + ':X';\n var keyY = key + ':Y';\n var keyZ = key + ':Z';\n\n var reportError = function(err) {\n errorCB && errorCB(err);\n };\n\n var delay = function(cb) {\n if (new Date().getTime() - startTime > timeoutMS) {\n logger$2.error('Timeout waiting for mutex on ' + key + '; clearing lock. [' + i + ']');\n storage.removeItem(keyZ);\n storage.removeItem(keyY);\n loop();\n return;\n }\n setTimeout(function() {\n try {\n cb();\n } catch(err) {\n reportError(err);\n }\n }, pollIntervalMS * (Math.random() + 0.1));\n };\n\n var waitFor = function(predicate, cb) {\n if (predicate()) {\n cb();\n } else {\n delay(function() {\n waitFor(predicate, cb);\n });\n }\n };\n\n var getSetY = function() {\n var valY = storage.getItem(keyY);\n if (valY && valY !== i) { // if Y == i then this process already has the lock (useful for test cases)\n return false;\n } else {\n storage.setItem(keyY, i);\n if (storage.getItem(keyY) === i) {\n return true;\n } else {\n if (!localStorageSupported(storage, true)) {\n throw new Error('localStorage support dropped while acquiring lock');\n }\n return false;\n }\n }\n };\n\n var loop = function() {\n storage.setItem(keyX, i);\n\n waitFor(getSetY, function() {\n if (storage.getItem(keyX) === i) {\n criticalSection();\n return;\n }\n\n delay(function() {\n if (storage.getItem(keyY) !== i) {\n loop();\n return;\n }\n waitFor(function() {\n return !storage.getItem(keyZ);\n }, criticalSection);\n });\n });\n };\n\n var criticalSection = function() {\n storage.setItem(keyZ, '1');\n try {\n lockedCB();\n } finally {\n storage.removeItem(keyZ);\n if (storage.getItem(keyY) === i) {\n storage.removeItem(keyY);\n }\n if (storage.getItem(keyX) === i) {\n storage.removeItem(keyX);\n }\n }\n };\n\n try {\n if (localStorageSupported(storage, true)) {\n loop();\n } else {\n throw new Error('localStorage support check failed');\n }\n } catch(err) {\n reportError(err);\n }\n};\n\n// eslint-disable-line camelcase\n\nvar logger$1 = console_with_prefix('batch');\n\n/**\n * RequestQueue: queue for batching API requests with localStorage backup for retries.\n * Maintains an in-memory queue which represents the source of truth for the current\n * page, but also writes all items out to a copy in the browser's localStorage, which\n * can be read on subsequent pageloads and retried. For batchability, all the request\n * items in the queue should be of the same type (events, people updates, group updates)\n * so they can be sent in a single request to the same API endpoint.\n *\n * LocalStorage keying and locking: In order for reloads and subsequent pageloads of\n * the same site to access the same persisted data, they must share the same localStorage\n * key (for instance based on project token and queue type). Therefore access to the\n * localStorage entry is guarded by an asynchronous mutex (SharedLock) to prevent\n * simultaneously open windows/tabs from overwriting each other's data (which would lead\n * to data loss in some situations).\n * @constructor\n */\nvar RequestQueue = function(storageKey, options) {\n options = options || {};\n this.storageKey = storageKey;\n this.storage = options.storage || window.localStorage;\n this.reportError = options.errorReporter || _.bind(logger$1.error, logger$1);\n this.lock = new SharedLock(storageKey, {storage: this.storage});\n\n this.pid = options.pid || null; // pass pid to test out storage lock contention scenarios\n\n this.memQueue = [];\n};\n\n/**\n * Add one item to queues (memory and localStorage). The queued entry includes\n * the given item along with an auto-generated ID and a \"flush-after\" timestamp.\n * It is expected that the item will be sent over the network and dequeued\n * before the flush-after time; if this doesn't happen it is considered orphaned\n * (e.g., the original tab where it was enqueued got closed before it could be\n * sent) and the item can be sent by any tab that finds it in localStorage.\n *\n * The final callback param is called with a param indicating success or\n * failure of the enqueue operation; it is asynchronous because the localStorage\n * lock is asynchronous.\n */\nRequestQueue.prototype.enqueue = function(item, flushInterval, cb) {\n var queueEntry = {\n 'id': cheap_guid(),\n 'flushAfter': new Date().getTime() + flushInterval * 2,\n 'payload': item\n };\n\n this.lock.withLock(_.bind(function lockAcquired() {\n var succeeded;\n try {\n var storedQueue = this.readFromStorage();\n storedQueue.push(queueEntry);\n succeeded = this.saveToStorage(storedQueue);\n if (succeeded) {\n // only add to in-memory queue when storage succeeds\n this.memQueue.push(queueEntry);\n }\n } catch(err) {\n this.reportError('Error enqueueing item', item);\n succeeded = false;\n }\n if (cb) {\n cb(succeeded);\n }\n }, this), _.bind(function lockFailure(err) {\n this.reportError('Error acquiring storage lock', err);\n if (cb) {\n cb(false);\n }\n }, this), this.pid);\n};\n\n/**\n * Read out the given number of queue entries. If this.memQueue\n * has fewer than batchSize items, then look for \"orphaned\" items\n * in the persisted queue (items where the 'flushAfter' time has\n * already passed).\n */\nRequestQueue.prototype.fillBatch = function(batchSize) {\n var batch = this.memQueue.slice(0, batchSize);\n if (batch.length < batchSize) {\n // don't need lock just to read events; localStorage is thread-safe\n // and the worst that could happen is a duplicate send of some\n // orphaned events, which will be deduplicated on the server side\n var storedQueue = this.readFromStorage();\n if (storedQueue.length) {\n // item IDs already in batch; don't duplicate out of storage\n var idsInBatch = {}; // poor man's Set\n _.each(batch, function(item) { idsInBatch[item['id']] = true; });\n\n for (var i = 0; i < storedQueue.length; i++) {\n var item = storedQueue[i];\n if (new Date().getTime() > item['flushAfter'] && !idsInBatch[item['id']]) {\n item.orphaned = true;\n batch.push(item);\n if (batch.length >= batchSize) {\n break;\n }\n }\n }\n }\n }\n return batch;\n};\n\n/**\n * Remove items with matching 'id' from array (immutably)\n * also remove any item without a valid id (e.g., malformed\n * storage entries).\n */\nvar filterOutIDsAndInvalid = function(items, idSet) {\n var filteredItems = [];\n _.each(items, function(item) {\n if (item['id'] && !idSet[item['id']]) {\n filteredItems.push(item);\n }\n });\n return filteredItems;\n};\n\n/**\n * Remove items with matching IDs from both in-memory queue\n * and persisted queue\n */\nRequestQueue.prototype.removeItemsByID = function(ids, cb) {\n var idSet = {}; // poor man's Set\n _.each(ids, function(id) { idSet[id] = true; });\n\n this.memQueue = filterOutIDsAndInvalid(this.memQueue, idSet);\n\n var removeFromStorage = _.bind(function() {\n var succeeded;\n try {\n var storedQueue = this.readFromStorage();\n storedQueue = filterOutIDsAndInvalid(storedQueue, idSet);\n succeeded = this.saveToStorage(storedQueue);\n\n // an extra check: did storage report success but somehow\n // the items are still there?\n if (succeeded) {\n storedQueue = this.readFromStorage();\n for (var i = 0; i < storedQueue.length; i++) {\n var item = storedQueue[i];\n if (item['id'] && !!idSet[item['id']]) {\n this.reportError('Item not removed from storage');\n return false;\n }\n }\n }\n } catch(err) {\n this.reportError('Error removing items', ids);\n succeeded = false;\n }\n return succeeded;\n }, this);\n\n this.lock.withLock(function lockAcquired() {\n var succeeded = removeFromStorage();\n if (cb) {\n cb(succeeded);\n }\n }, _.bind(function lockFailure(err) {\n var succeeded = false;\n this.reportError('Error acquiring storage lock', err);\n if (!localStorageSupported(this.storage, true)) {\n // Looks like localStorage writes have stopped working sometime after\n // initialization (probably full), and so nobody can acquire locks\n // anymore. Consider it temporarily safe to remove items without the\n // lock, since nobody's writing successfully anyway.\n succeeded = removeFromStorage();\n if (!succeeded) {\n // OK, we couldn't even write out the smaller queue. Try clearing it\n // entirely.\n try {\n this.storage.removeItem(this.storageKey);\n } catch(err) {\n this.reportError('Error clearing queue', err);\n }\n }\n }\n if (cb) {\n cb(succeeded);\n }\n }, this), this.pid);\n};\n\n// internal helper for RequestQueue.updatePayloads\nvar updatePayloads = function(existingItems, itemsToUpdate) {\n var newItems = [];\n _.each(existingItems, function(item) {\n var id = item['id'];\n if (id in itemsToUpdate) {\n var newPayload = itemsToUpdate[id];\n if (newPayload !== null) {\n item['payload'] = newPayload;\n newItems.push(item);\n }\n } else {\n // no update\n newItems.push(item);\n }\n });\n return newItems;\n};\n\n/**\n * Update payloads of given items in both in-memory queue and\n * persisted queue. Items set to null are removed from queues.\n */\nRequestQueue.prototype.updatePayloads = function(itemsToUpdate, cb) {\n this.memQueue = updatePayloads(this.memQueue, itemsToUpdate);\n this.lock.withLock(_.bind(function lockAcquired() {\n var succeeded;\n try {\n var storedQueue = this.readFromStorage();\n storedQueue = updatePayloads(storedQueue, itemsToUpdate);\n succeeded = this.saveToStorage(storedQueue);\n } catch(err) {\n this.reportError('Error updating items', itemsToUpdate);\n succeeded = false;\n }\n if (cb) {\n cb(succeeded);\n }\n }, this), _.bind(function lockFailure(err) {\n this.reportError('Error acquiring storage lock', err);\n if (cb) {\n cb(false);\n }\n }, this), this.pid);\n};\n\n/**\n * Read and parse items array from localStorage entry, handling\n * malformed/missing data if necessary.\n */\nRequestQueue.prototype.readFromStorage = function() {\n var storageEntry;\n try {\n storageEntry = this.storage.getItem(this.storageKey);\n if (storageEntry) {\n storageEntry = JSONParse(storageEntry);\n if (!_.isArray(storageEntry)) {\n this.reportError('Invalid storage entry:', storageEntry);\n storageEntry = null;\n }\n }\n } catch (err) {\n this.reportError('Error retrieving queue', err);\n storageEntry = null;\n }\n return storageEntry || [];\n};\n\n/**\n * Serialize the given items array to localStorage.\n */\nRequestQueue.prototype.saveToStorage = function(queue) {\n try {\n this.storage.setItem(this.storageKey, JSONStringify(queue));\n return true;\n } catch (err) {\n this.reportError('Error saving queue', err);\n return false;\n }\n};\n\n/**\n * Clear out queues (memory and localStorage).\n */\nRequestQueue.prototype.clear = function() {\n this.memQueue = [];\n this.storage.removeItem(this.storageKey);\n};\n\n// eslint-disable-line camelcase\n\n// maximum interval between request retries after exponential backoff\nvar MAX_RETRY_INTERVAL_MS = 10 * 60 * 1000; // 10 minutes\n\nvar logger = console_with_prefix('batch');\n\n/**\n * RequestBatcher: manages the queueing, flushing, retry etc of requests of one\n * type (events, people, groups).\n * Uses RequestQueue to manage the backing store.\n * @constructor\n */\nvar RequestBatcher = function(storageKey, options) {\n this.errorReporter = options.errorReporter;\n this.queue = new RequestQueue(storageKey, {\n errorReporter: _.bind(this.reportError, this),\n storage: options.storage\n });\n\n this.libConfig = options.libConfig;\n this.sendRequest = options.sendRequestFunc;\n this.beforeSendHook = options.beforeSendHook;\n this.stopAllBatching = options.stopAllBatchingFunc;\n\n // seed variable batch size + flush interval with configured values\n this.batchSize = this.libConfig['batch_size'];\n this.flushInterval = this.libConfig['batch_flush_interval_ms'];\n\n this.stopped = !this.libConfig['batch_autostart'];\n this.consecutiveRemovalFailures = 0;\n\n // extra client-side dedupe\n this.itemIdsSentSuccessfully = {};\n};\n\n/**\n * Add one item to queue.\n */\nRequestBatcher.prototype.enqueue = function(item, cb) {\n this.queue.enqueue(item, this.flushInterval, cb);\n};\n\n/**\n * Start flushing batches at the configured time interval. Must call\n * this method upon SDK init in order to send anything over the network.\n */\nRequestBatcher.prototype.start = function() {\n this.stopped = false;\n this.consecutiveRemovalFailures = 0;\n this.flush();\n};\n\n/**\n * Stop flushing batches. Can be restarted by calling start().\n */\nRequestBatcher.prototype.stop = function() {\n this.stopped = true;\n if (this.timeoutID) {\n clearTimeout(this.timeoutID);\n this.timeoutID = null;\n }\n};\n\n/**\n * Clear out queue.\n */\nRequestBatcher.prototype.clear = function() {\n this.queue.clear();\n};\n\n/**\n * Restore batch size configuration to whatever is set in the main SDK.\n */\nRequestBatcher.prototype.resetBatchSize = function() {\n this.batchSize = this.libConfig['batch_size'];\n};\n\n/**\n * Restore flush interval time configuration to whatever is set in the main SDK.\n */\nRequestBatcher.prototype.resetFlush = function() {\n this.scheduleFlush(this.libConfig['batch_flush_interval_ms']);\n};\n\n/**\n * Schedule the next flush in the given number of milliseconds.\n */\nRequestBatcher.prototype.scheduleFlush = function(flushMS) {\n this.flushInterval = flushMS;\n if (!this.stopped) { // don't schedule anymore if batching has been stopped\n this.timeoutID = setTimeout(_.bind(this.flush, this), this.flushInterval);\n }\n};\n\n/**\n * Flush one batch to network. Depending on success/failure modes, it will either\n * remove the batch from the queue or leave it in for retry, and schedule the next\n * flush. In cases of most network or API failures, it will back off exponentially\n * when retrying.\n * @param {Object} [options]\n * @param {boolean} [options.sendBeacon] - whether to send batch with\n * navigator.sendBeacon (only useful for sending batches before page unloads, as\n * sendBeacon offers no callbacks or status indications)\n */\nRequestBatcher.prototype.flush = function(options) {\n try {\n\n if (this.requestInProgress) {\n logger.log('Flush: Request already in progress');\n return;\n }\n\n options = options || {};\n var timeoutMS = this.libConfig['batch_request_timeout_ms'];\n var startTime = new Date().getTime();\n var currentBatchSize = this.batchSize;\n var batch = this.queue.fillBatch(currentBatchSize);\n var dataForRequest = [];\n var transformedItems = {};\n _.each(batch, function(item) {\n var payload = item['payload'];\n if (this.beforeSendHook && !item.orphaned) {\n payload = this.beforeSendHook(payload);\n }\n if (payload) {\n // mp_sent_by_lib_version prop captures which lib version actually\n // sends each event (regardless of which version originally queued\n // it for sending)\n if (payload['event'] && payload['properties']) {\n payload['properties'] = _.extend(\n {},\n payload['properties'],\n {'mp_sent_by_lib_version': Config.LIB_VERSION}\n );\n }\n var addPayload = true;\n var itemId = item['id'];\n if (itemId) {\n if ((this.itemIdsSentSuccessfully[itemId] || 0) > 5) {\n this.reportError('[dupe] item ID sent too many times, not sending', {\n item: item,\n batchSize: batch.length,\n timesSent: this.itemIdsSentSuccessfully[itemId]\n });\n addPayload = false;\n }\n } else {\n this.reportError('[dupe] found item with no ID', {item: item});\n }\n\n if (addPayload) {\n dataForRequest.push(payload);\n }\n }\n transformedItems[item['id']] = payload;\n }, this);\n if (dataForRequest.length < 1) {\n this.resetFlush();\n return; // nothing to do\n }\n\n this.requestInProgress = true;\n\n var batchSendCallback = _.bind(function(res) {\n this.requestInProgress = false;\n\n try {\n\n // handle API response in a try-catch to make sure we can reset the\n // flush operation if something goes wrong\n\n var removeItemsFromQueue = false;\n if (options.unloading) {\n // update persisted data to include hook transformations\n this.queue.updatePayloads(transformedItems);\n } else if (\n _.isObject(res) &&\n res.error === 'timeout' &&\n new Date().getTime() - startTime >= timeoutMS\n ) {\n this.reportError('Network timeout; retrying');\n this.flush();\n } else if (\n _.isObject(res) &&\n res.xhr_req &&\n (res.xhr_req['status'] >= 500 || res.xhr_req['status'] === 429 || res.error === 'timeout')\n ) {\n // network or API error, or 429 Too Many Requests, retry\n var retryMS = this.flushInterval * 2;\n var headers = res.xhr_req['responseHeaders'];\n if (headers) {\n var retryAfter = headers['Retry-After'];\n if (retryAfter) {\n retryMS = (parseInt(retryAfter, 10) * 1000) || retryMS;\n }\n }\n retryMS = Math.min(MAX_RETRY_INTERVAL_MS, retryMS);\n this.reportError('Error; retry in ' + retryMS + ' ms');\n this.scheduleFlush(retryMS);\n } else if (_.isObject(res) && res.xhr_req && res.xhr_req['status'] === 413) {\n // 413 Payload Too Large\n if (batch.length > 1) {\n var halvedBatchSize = Math.max(1, Math.floor(currentBatchSize / 2));\n this.batchSize = Math.min(this.batchSize, halvedBatchSize, batch.length - 1);\n this.reportError('413 response; reducing batch size to ' + this.batchSize);\n this.resetFlush();\n } else {\n this.reportError('Single-event request too large; dropping', batch);\n this.resetBatchSize();\n removeItemsFromQueue = true;\n }\n } else {\n // successful network request+response; remove each item in batch from queue\n // (even if it was e.g. a 400, in which case retrying won't help)\n removeItemsFromQueue = true;\n }\n\n if (removeItemsFromQueue) {\n this.queue.removeItemsByID(\n _.map(batch, function(item) { return item['id']; }),\n _.bind(function(succeeded) {\n if (succeeded) {\n this.consecutiveRemovalFailures = 0;\n this.flush(); // handle next batch if the queue isn't empty\n } else {\n this.reportError('Failed to remove items from queue');\n if (++this.consecutiveRemovalFailures > 5) {\n this.reportError('Too many queue failures; disabling batching system.');\n this.stopAllBatching();\n } else {\n this.resetFlush();\n }\n }\n }, this)\n );\n\n // client-side dedupe\n _.each(batch, _.bind(function(item) {\n var itemId = item['id'];\n if (itemId) {\n this.itemIdsSentSuccessfully[itemId] = this.itemIdsSentSuccessfully[itemId] || 0;\n this.itemIdsSentSuccessfully[itemId]++;\n if (this.itemIdsSentSuccessfully[itemId] > 5) {\n this.reportError('[dupe] item ID sent too many times', {\n item: item,\n batchSize: batch.length,\n timesSent: this.itemIdsSentSuccessfully[itemId]\n });\n }\n } else {\n this.reportError('[dupe] found item with no ID while removing', {item: item});\n }\n }, this));\n }\n\n } catch(err) {\n this.reportError('Error handling API response', err);\n this.resetFlush();\n }\n }, this);\n var requestOptions = {\n method: 'POST',\n verbose: true,\n ignore_json_errors: true, // eslint-disable-line camelcase\n timeout_ms: timeoutMS // eslint-disable-line camelcase\n };\n if (options.unloading) {\n requestOptions.transport = 'sendBeacon';\n }\n logger.log('MIXPANEL REQUEST:', dataForRequest);\n this.sendRequest(dataForRequest, requestOptions, batchSendCallback);\n\n } catch(err) {\n this.reportError('Error flushing request queue', err);\n this.resetFlush();\n }\n};\n\n/**\n * Log error to global logger and optional user-defined logger.\n */\nRequestBatcher.prototype.reportError = function(msg, err) {\n logger.error.apply(logger.error, arguments);\n if (this.errorReporter) {\n try {\n if (!(err instanceof Error)) {\n err = new Error(msg);\n }\n this.errorReporter(msg, err);\n } catch(err) {\n logger.error(err);\n }\n }\n};\n\n/**\n * A function used to track a Mixpanel event (e.g. MixpanelLib.track)\n * @callback trackFunction\n * @param {String} event_name The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc.\n * @param {Object} [properties] A set of properties to include with the event you're sending. These describe the user who did the event or details about the event itself.\n * @param {Function} [callback] If provided, the callback function will be called after tracking the event.\n */\n\n/** Public **/\n\nvar GDPR_DEFAULT_PERSISTENCE_PREFIX = '__mp_opt_in_out_';\n\n/**\n * Opt the user in to data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {trackFunction} [options.track] - function used for tracking a Mixpanel event to record the opt-in action\n * @param {string} [options.trackEventName] - event name to be used for tracking the opt-in action\n * @param {Object} [options.trackProperties] - set of properties to be tracked along with the opt-in action\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not\n */\nfunction optIn(token, options) {\n _optInOut(true, token, options);\n}\n\n/**\n * Opt the user out of data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-out cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-out cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-out cookie is set as secure or not\n */\nfunction optOut(token, options) {\n _optInOut(false, token, options);\n}\n\n/**\n * Check whether the user has opted in to data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @returns {boolean} whether the user has opted in to the given opt type\n */\nfunction hasOptedIn(token, options) {\n return _getStorageValue(token, options) === '1';\n}\n\n/**\n * Check whether the user has opted out of data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {boolean} [options.ignoreDnt] - flag to ignore browser DNT settings and always return false\n * @returns {boolean} whether the user has opted out of the given opt type\n */\nfunction hasOptedOut(token, options) {\n if (_hasDoNotTrackFlagOn(options)) {\n console.warn('This browser has \"Do Not Track\" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the \"Do Not Track\" browser setting, initialize the Mixpanel instance with the config \"ignore_dnt: true\"');\n return true;\n }\n var optedOut = _getStorageValue(token, options) === '0';\n if (optedOut) {\n console.warn('You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data.');\n }\n return optedOut;\n}\n\n/**\n * Wrap a MixpanelLib method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction addOptOutCheckMixpanelLib(method) {\n return _addOptOutCheck(method, function(name) {\n return this.get_config(name);\n });\n}\n\n/**\n * Wrap a MixpanelPeople method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction addOptOutCheckMixpanelPeople(method) {\n return _addOptOutCheck(method, function(name) {\n return this._get_config(name);\n });\n}\n\n/**\n * Wrap a MixpanelGroup method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction addOptOutCheckMixpanelGroup(method) {\n return _addOptOutCheck(method, function(name) {\n return this._get_config(name);\n });\n}\n\n/**\n * Clear the user's opt in/out status of data tracking and cookies/localstorage for the given token\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistenceType] Persistence mechanism used - cookie or localStorage\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not\n */\nfunction clearOptInOut(token, options) {\n options = options || {};\n _getStorage(options).remove(\n _getStorageKey(token, options), !!options.crossSubdomainCookie, options.cookieDomain\n );\n}\n\n/** Private **/\n\n/**\n * Get storage util\n * @param {Object} [options]\n * @param {string} [options.persistenceType]\n * @returns {object} either _.cookie or _.localstorage\n */\nfunction _getStorage(options) {\n options = options || {};\n return options.persistenceType === 'localStorage' ? _.localStorage : _.cookie;\n}\n\n/**\n * Get the name of the cookie that is used for the given opt type (tracking, cookie, etc.)\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @returns {string} the name of the cookie for the given opt type\n */\nfunction _getStorageKey(token, options) {\n options = options || {};\n return (options.persistencePrefix || GDPR_DEFAULT_PERSISTENCE_PREFIX) + token;\n}\n\n/**\n * Get the value of the cookie that is used for the given opt type (tracking, cookie, etc.)\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @returns {string} the value of the cookie for the given opt type\n */\nfunction _getStorageValue(token, options) {\n return _getStorage(options).get(_getStorageKey(token, options));\n}\n\n/**\n * Check whether the user has set the DNT/doNotTrack setting to true in their browser\n * @param {Object} [options]\n * @param {string} [options.window] - alternate window object to check; used to force various DNT settings in browser tests\n * @param {boolean} [options.ignoreDnt] - flag to ignore browser DNT settings and always return false\n * @returns {boolean} whether the DNT setting is true\n */\nfunction _hasDoNotTrackFlagOn(options) {\n if (options && options.ignoreDnt) {\n return false;\n }\n var win = (options && options.window) || window$1;\n var nav = win['navigator'] || {};\n var hasDntOn = false;\n\n _.each([\n nav['doNotTrack'], // standard\n nav['msDoNotTrack'],\n win['doNotTrack']\n ], function(dntValue) {\n if (_.includes([true, 1, '1', 'yes'], dntValue)) {\n hasDntOn = true;\n }\n });\n\n return hasDntOn;\n}\n\n/**\n * Set cookie/localstorage for the user indicating that they are opted in or out for the given opt type\n * @param {boolean} optValue - whether to opt the user in or out for the given opt type\n * @param {string} token - Mixpanel project tracking token\n * @param {Object} [options]\n * @param {trackFunction} [options.track] - function used for tracking a Mixpanel event to record the opt-in action\n * @param {string} [options.trackEventName] - event name to be used for tracking the opt-in action\n * @param {Object} [options.trackProperties] - set of properties to be tracked along with the opt-in action\n * @param {string} [options.persistencePrefix=__mp_opt_in_out] - custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookieExpiration] - number of days until the opt-in cookie expires\n * @param {string} [options.cookieDomain] - custom cookie domain\n * @param {boolean} [options.crossSiteCookie] - whether the opt-in cookie is set as cross-site-enabled\n * @param {boolean} [options.crossSubdomainCookie] - whether the opt-in cookie is set as cross-subdomain or not\n * @param {boolean} [options.secureCookie] - whether the opt-in cookie is set as secure or not\n */\nfunction _optInOut(optValue, token, options) {\n if (!_.isString(token) || !token.length) {\n console.error('gdpr.' + (optValue ? 'optIn' : 'optOut') + ' called with an invalid token');\n return;\n }\n\n options = options || {};\n\n _getStorage(options).set(\n _getStorageKey(token, options),\n optValue ? 1 : 0,\n _.isNumber(options.cookieExpiration) ? options.cookieExpiration : null,\n !!options.crossSubdomainCookie,\n !!options.secureCookie,\n !!options.crossSiteCookie,\n options.cookieDomain\n );\n\n if (options.track && optValue) { // only track event if opting in (optValue=true)\n options.track(options.trackEventName || '$opt_in', options.trackProperties, {\n 'send_immediately': true\n });\n }\n}\n\n/**\n * Wrap a method with a check for whether the user is opted out of data tracking and cookies/localstorage for the given token\n * If the user has opted out, return early instead of executing the method.\n * If a callback argument was provided, execute it passing the 0 error code.\n * @param {function} method - wrapped method to be executed if the user has not opted out\n * @param {function} getConfigValue - getter function for the Mixpanel API token and other options to be used with opt-out check\n * @returns {*} the result of executing method OR undefined if the user has opted out\n */\nfunction _addOptOutCheck(method, getConfigValue) {\n return function() {\n var optedOut = false;\n\n try {\n var token = getConfigValue.call(this, 'token');\n var ignoreDnt = getConfigValue.call(this, 'ignore_dnt');\n var persistenceType = getConfigValue.call(this, 'opt_out_tracking_persistence_type');\n var persistencePrefix = getConfigValue.call(this, 'opt_out_tracking_cookie_prefix');\n var win = getConfigValue.call(this, 'window'); // used to override window during browser tests\n\n if (token) { // if there was an issue getting the token, continue method execution as normal\n optedOut = hasOptedOut(token, {\n ignoreDnt: ignoreDnt,\n persistenceType: persistenceType,\n persistencePrefix: persistencePrefix,\n window: win\n });\n }\n } catch(err) {\n console.error('Unexpected error when checking tracking opt-out status: ' + err);\n }\n\n if (!optedOut) {\n return method.apply(this, arguments);\n }\n\n var callback = arguments[arguments.length - 1];\n if (typeof(callback) === 'function') {\n callback(0);\n }\n\n return;\n };\n}\n\n/** @const */ var SET_ACTION = '$set';\n/** @const */ var SET_ONCE_ACTION = '$set_once';\n/** @const */ var UNSET_ACTION = '$unset';\n/** @const */ var ADD_ACTION = '$add';\n/** @const */ var APPEND_ACTION = '$append';\n/** @const */ var UNION_ACTION = '$union';\n/** @const */ var REMOVE_ACTION = '$remove';\n/** @const */ var DELETE_ACTION = '$delete';\n\n// Common internal methods for mixpanel.people and mixpanel.group APIs.\n// These methods shouldn't involve network I/O.\nvar apiActions = {\n set_action: function(prop, to) {\n var data = {};\n var $set = {};\n if (_.isObject(prop)) {\n _.each(prop, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $set[k] = v;\n }\n }, this);\n } else {\n $set[prop] = to;\n }\n\n data[SET_ACTION] = $set;\n return data;\n },\n\n unset_action: function(prop) {\n var data = {};\n var $unset = [];\n if (!_.isArray(prop)) {\n prop = [prop];\n }\n\n _.each(prop, function(k) {\n if (!this._is_reserved_property(k)) {\n $unset.push(k);\n }\n }, this);\n\n data[UNSET_ACTION] = $unset;\n return data;\n },\n\n set_once_action: function(prop, to) {\n var data = {};\n var $set_once = {};\n if (_.isObject(prop)) {\n _.each(prop, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $set_once[k] = v;\n }\n }, this);\n } else {\n $set_once[prop] = to;\n }\n data[SET_ONCE_ACTION] = $set_once;\n return data;\n },\n\n union_action: function(list_name, values) {\n var data = {};\n var $union = {};\n if (_.isObject(list_name)) {\n _.each(list_name, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $union[k] = _.isArray(v) ? v : [v];\n }\n }, this);\n } else {\n $union[list_name] = _.isArray(values) ? values : [values];\n }\n data[UNION_ACTION] = $union;\n return data;\n },\n\n append_action: function(list_name, value) {\n var data = {};\n var $append = {};\n if (_.isObject(list_name)) {\n _.each(list_name, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $append[k] = v;\n }\n }, this);\n } else {\n $append[list_name] = value;\n }\n data[APPEND_ACTION] = $append;\n return data;\n },\n\n remove_action: function(list_name, value) {\n var data = {};\n var $remove = {};\n if (_.isObject(list_name)) {\n _.each(list_name, function(v, k) {\n if (!this._is_reserved_property(k)) {\n $remove[k] = v;\n }\n }, this);\n } else {\n $remove[list_name] = value;\n }\n data[REMOVE_ACTION] = $remove;\n return data;\n },\n\n delete_action: function() {\n var data = {};\n data[DELETE_ACTION] = '';\n return data;\n }\n};\n\n/**\n * Mixpanel Group Object\n * @constructor\n */\nvar MixpanelGroup = function() {};\n\n_.extend(MixpanelGroup.prototype, apiActions);\n\nMixpanelGroup.prototype._init = function(mixpanel_instance, group_key, group_id) {\n this._mixpanel = mixpanel_instance;\n this._group_key = group_key;\n this._group_id = group_id;\n};\n\n/**\n * Set properties on a group.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').set('Location', '405 Howard');\n *\n * // or set multiple properties at once\n * mixpanel.get_group('company', 'mixpanel').set({\n * 'Location': '405 Howard',\n * 'Founded' : 2009,\n * });\n * // properties can be strings, integers, dates, or lists\n *\n * @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n * @param {*} [to] A value to set on the given property name\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.set = addOptOutCheckMixpanelGroup(function(prop, to, callback) {\n var data = this.set_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n return this._send_request(data, callback);\n});\n\n/**\n * Set properties on a group, only if they do not yet exist.\n * This will not overwrite previous group property values, unlike\n * group.set().\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').set_once('Location', '405 Howard');\n *\n * // or set multiple properties at once\n * mixpanel.get_group('company', 'mixpanel').set_once({\n * 'Location': '405 Howard',\n * 'Founded' : 2009,\n * });\n * // properties can be strings, integers, lists or dates\n *\n * @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n * @param {*} [to] A value to set on the given property name\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.set_once = addOptOutCheckMixpanelGroup(function(prop, to, callback) {\n var data = this.set_once_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n return this._send_request(data, callback);\n});\n\n/**\n * Unset properties on a group permanently.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').unset('Founded');\n *\n * @param {String} prop The name of the property.\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.unset = addOptOutCheckMixpanelGroup(function(prop, callback) {\n var data = this.unset_action(prop);\n return this._send_request(data, callback);\n});\n\n/**\n * Merge a given list with a list-valued group property, excluding duplicate values.\n *\n * ### Usage:\n *\n * // merge a value to a list, creating it if needed\n * mixpanel.get_group('company', 'mixpanel').union('Location', ['San Francisco', 'London']);\n *\n * @param {String} list_name Name of the property.\n * @param {Array} values Values to merge with the given property\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.union = addOptOutCheckMixpanelGroup(function(list_name, values, callback) {\n if (_.isObject(list_name)) {\n callback = values;\n }\n var data = this.union_action(list_name, values);\n return this._send_request(data, callback);\n});\n\n/**\n * Permanently delete a group.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').delete();\n *\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype['delete'] = addOptOutCheckMixpanelGroup(function(callback) {\n // bracket notation above prevents a minification error related to reserved words\n var data = this.delete_action();\n return this._send_request(data, callback);\n});\n\n/**\n * Remove a property from a group. The value will be ignored if doesn't exist.\n *\n * ### Usage:\n *\n * mixpanel.get_group('company', 'mixpanel').remove('Location', 'London');\n *\n * @param {String} list_name Name of the property.\n * @param {Object} value Value to remove from the given group property\n * @param {Function} [callback] If provided, the callback will be called after the tracking event\n */\nMixpanelGroup.prototype.remove = addOptOutCheckMixpanelGroup(function(list_name, value, callback) {\n var data = this.remove_action(list_name, value);\n return this._send_request(data, callback);\n});\n\nMixpanelGroup.prototype._send_request = function(data, callback) {\n data['$group_key'] = this._group_key;\n data['$group_id'] = this._group_id;\n data['$token'] = this._get_config('token');\n\n var date_encoded_data = _.encodeDates(data);\n return this._mixpanel._track_or_batch({\n type: 'groups',\n data: date_encoded_data,\n endpoint: this._get_config('api_host') + '/groups/',\n batcher: this._mixpanel.request_batchers.groups\n }, callback);\n};\n\nMixpanelGroup.prototype._is_reserved_property = function(prop) {\n return prop === '$group_key' || prop === '$group_id';\n};\n\nMixpanelGroup.prototype._get_config = function(conf) {\n return this._mixpanel.get_config(conf);\n};\n\nMixpanelGroup.prototype.toString = function() {\n return this._mixpanel.toString() + '.group.' + this._group_key + '.' + this._group_id;\n};\n\n// MixpanelGroup Exports\nMixpanelGroup.prototype['remove'] = MixpanelGroup.prototype.remove;\nMixpanelGroup.prototype['set'] = MixpanelGroup.prototype.set;\nMixpanelGroup.prototype['set_once'] = MixpanelGroup.prototype.set_once;\nMixpanelGroup.prototype['union'] = MixpanelGroup.prototype.union;\nMixpanelGroup.prototype['unset'] = MixpanelGroup.prototype.unset;\nMixpanelGroup.prototype['toString'] = MixpanelGroup.prototype.toString;\n\n/**\n * Mixpanel People Object\n * @constructor\n */\nvar MixpanelPeople = function() {};\n\n_.extend(MixpanelPeople.prototype, apiActions);\n\nMixpanelPeople.prototype._init = function(mixpanel_instance) {\n this._mixpanel = mixpanel_instance;\n};\n\n/*\n* Set properties on a user record.\n*\n* ### Usage:\n*\n* mixpanel.people.set('gender', 'm');\n*\n* // or set multiple properties at once\n* mixpanel.people.set({\n* 'Company': 'Acme',\n* 'Plan': 'Premium',\n* 'Upgrade date': new Date()\n* });\n* // properties can be strings, integers, dates, or lists\n*\n* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [to] A value to set on the given property name\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.set = addOptOutCheckMixpanelPeople(function(prop, to, callback) {\n var data = this.set_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n // make sure that the referrer info has been updated and saved\n if (this._get_config('save_referrer')) {\n this._mixpanel['persistence'].update_referrer_info(document.referrer);\n }\n\n // update $set object with default people properties\n data[SET_ACTION] = _.extend(\n {},\n _.info.people_properties(),\n this._mixpanel['persistence'].get_referrer_info(),\n data[SET_ACTION]\n );\n return this._send_request(data, callback);\n});\n\n/*\n* Set properties on a user record, only if they do not yet exist.\n* This will not overwrite previous people property values, unlike\n* people.set().\n*\n* ### Usage:\n*\n* mixpanel.people.set_once('First Login Date', new Date());\n*\n* // or set multiple properties at once\n* mixpanel.people.set_once({\n* 'First Login Date': new Date(),\n* 'Starting Plan': 'Premium'\n* });\n*\n* // properties can be strings, integers or dates\n*\n* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [to] A value to set on the given property name\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.set_once = addOptOutCheckMixpanelPeople(function(prop, to, callback) {\n var data = this.set_once_action(prop, to);\n if (_.isObject(prop)) {\n callback = to;\n }\n return this._send_request(data, callback);\n});\n\n/*\n* Unset properties on a user record (permanently removes the properties and their values from a profile).\n*\n* ### Usage:\n*\n* mixpanel.people.unset('gender');\n*\n* // or unset multiple properties at once\n* mixpanel.people.unset(['gender', 'Company']);\n*\n* @param {Array|String} prop If a string, this is the name of the property. If an array, this is a list of property names.\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.unset = addOptOutCheckMixpanelPeople(function(prop, callback) {\n var data = this.unset_action(prop);\n return this._send_request(data, callback);\n});\n\n/*\n* Increment/decrement numeric people analytics properties.\n*\n* ### Usage:\n*\n* mixpanel.people.increment('page_views', 1);\n*\n* // or, for convenience, if you're just incrementing a counter by\n* // 1, you can simply do\n* mixpanel.people.increment('page_views');\n*\n* // to decrement a counter, pass a negative number\n* mixpanel.people.increment('credits_left', -1);\n*\n* // like mixpanel.people.set(), you can increment multiple\n* // properties at once:\n* mixpanel.people.increment({\n* counter1: 1,\n* counter2: 6\n* });\n*\n* @param {Object|String} prop If a string, this is the name of the property. If an object, this is an associative array of names and numeric values.\n* @param {Number} [by] An amount to increment the given property\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.increment = addOptOutCheckMixpanelPeople(function(prop, by, callback) {\n var data = {};\n var $add = {};\n if (_.isObject(prop)) {\n _.each(prop, function(v, k) {\n if (!this._is_reserved_property(k)) {\n if (isNaN(parseFloat(v))) {\n console.error('Invalid increment value passed to mixpanel.people.increment - must be a number');\n return;\n } else {\n $add[k] = v;\n }\n }\n }, this);\n callback = by;\n } else {\n // convenience: mixpanel.people.increment('property'); will\n // increment 'property' by 1\n if (_.isUndefined(by)) {\n by = 1;\n }\n $add[prop] = by;\n }\n data[ADD_ACTION] = $add;\n\n return this._send_request(data, callback);\n});\n\n/*\n* Append a value to a list-valued people analytics property.\n*\n* ### Usage:\n*\n* // append a value to a list, creating it if needed\n* mixpanel.people.append('pages_visited', 'homepage');\n*\n* // like mixpanel.people.set(), you can append multiple\n* // properties at once:\n* mixpanel.people.append({\n* list1: 'bob',\n* list2: 123\n* });\n*\n* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [value] value An item to append to the list\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.append = addOptOutCheckMixpanelPeople(function(list_name, value, callback) {\n if (_.isObject(list_name)) {\n callback = value;\n }\n var data = this.append_action(list_name, value);\n return this._send_request(data, callback);\n});\n\n/*\n* Remove a value from a list-valued people analytics property.\n*\n* ### Usage:\n*\n* mixpanel.people.remove('School', 'UCB');\n*\n* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [value] value Item to remove from the list\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.remove = addOptOutCheckMixpanelPeople(function(list_name, value, callback) {\n if (_.isObject(list_name)) {\n callback = value;\n }\n var data = this.remove_action(list_name, value);\n return this._send_request(data, callback);\n});\n\n/*\n* Merge a given list with a list-valued people analytics property,\n* excluding duplicate values.\n*\n* ### Usage:\n*\n* // merge a value to a list, creating it if needed\n* mixpanel.people.union('pages_visited', 'homepage');\n*\n* // like mixpanel.people.set(), you can append multiple\n* // properties at once:\n* mixpanel.people.union({\n* list1: 'bob',\n* list2: 123\n* });\n*\n* // like mixpanel.people.append(), you can append multiple\n* // values to the same list:\n* mixpanel.people.union({\n* list1: ['bob', 'billy']\n* });\n*\n* @param {Object|String} list_name If a string, this is the name of the property. If an object, this is an associative array of names and values.\n* @param {*} [value] Value / values to merge with the given property\n* @param {Function} [callback] If provided, the callback will be called after tracking the event.\n*/\nMixpanelPeople.prototype.union = addOptOutCheckMixpanelPeople(function(list_name, values, callback) {\n if (_.isObject(list_name)) {\n callback = values;\n }\n var data = this.union_action(list_name, values);\n return this._send_request(data, callback);\n});\n\n/*\n * Record that you have charged the current user a certain amount\n * of money. Charges recorded with track_charge() will appear in the\n * Mixpanel revenue report.\n *\n * ### Usage:\n *\n * // charge a user $50\n * mixpanel.people.track_charge(50);\n *\n * // charge a user $30.50 on the 2nd of january\n * mixpanel.people.track_charge(30.50, {\n * '$time': new Date('jan 1 2012')\n * });\n *\n * @param {Number} amount The amount of money charged to the current user\n * @param {Object} [properties] An associative array of properties associated with the charge\n * @param {Function} [callback] If provided, the callback will be called when the server responds\n * @deprecated\n */\nMixpanelPeople.prototype.track_charge = addOptOutCheckMixpanelPeople(function(amount, properties, callback) {\n if (!_.isNumber(amount)) {\n amount = parseFloat(amount);\n if (isNaN(amount)) {\n console.error('Invalid value passed to mixpanel.people.track_charge - must be a number');\n return;\n }\n }\n\n return this.append('$transactions', _.extend({\n '$amount': amount\n }, properties), callback);\n});\n\n/*\n * Permanently clear all revenue report transactions from the\n * current user's people analytics profile.\n *\n * ### Usage:\n *\n * mixpanel.people.clear_charges();\n *\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n * @deprecated\n */\nMixpanelPeople.prototype.clear_charges = function(callback) {\n return this.set('$transactions', [], callback);\n};\n\n/*\n* Permanently deletes the current people analytics profile from\n* Mixpanel (using the current distinct_id).\n*\n* ### Usage:\n*\n* // remove the all data you have stored about the current user\n* mixpanel.people.delete_user();\n*\n*/\nMixpanelPeople.prototype.delete_user = function() {\n if (!this._identify_called()) {\n console.error('mixpanel.people.delete_user() requires you to call identify() first');\n return;\n }\n var data = {'$delete': this._mixpanel.get_distinct_id()};\n return this._send_request(data);\n};\n\nMixpanelPeople.prototype.toString = function() {\n return this._mixpanel.toString() + '.people';\n};\n\nMixpanelPeople.prototype._send_request = function(data, callback) {\n data['$token'] = this._get_config('token');\n data['$distinct_id'] = this._mixpanel.get_distinct_id();\n var device_id = this._mixpanel.get_property('$device_id');\n var user_id = this._mixpanel.get_property('$user_id');\n var had_persisted_distinct_id = this._mixpanel.get_property('$had_persisted_distinct_id');\n if (device_id) {\n data['$device_id'] = device_id;\n }\n if (user_id) {\n data['$user_id'] = user_id;\n }\n if (had_persisted_distinct_id) {\n data['$had_persisted_distinct_id'] = had_persisted_distinct_id;\n }\n\n var date_encoded_data = _.encodeDates(data);\n\n if (!this._identify_called()) {\n this._enqueue(data);\n if (!_.isUndefined(callback)) {\n if (this._get_config('verbose')) {\n callback({status: -1, error: null});\n } else {\n callback(-1);\n }\n }\n return _.truncate(date_encoded_data, 255);\n }\n\n return this._mixpanel._track_or_batch({\n type: 'people',\n data: date_encoded_data,\n endpoint: this._get_config('api_host') + '/engage/',\n batcher: this._mixpanel.request_batchers.people\n }, callback);\n};\n\nMixpanelPeople.prototype._get_config = function(conf_var) {\n return this._mixpanel.get_config(conf_var);\n};\n\nMixpanelPeople.prototype._identify_called = function() {\n return this._mixpanel._flags.identify_called === true;\n};\n\n// Queue up engage operations if identify hasn't been called yet.\nMixpanelPeople.prototype._enqueue = function(data) {\n if (SET_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(SET_ACTION, data);\n } else if (SET_ONCE_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(SET_ONCE_ACTION, data);\n } else if (UNSET_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(UNSET_ACTION, data);\n } else if (ADD_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(ADD_ACTION, data);\n } else if (APPEND_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(APPEND_ACTION, data);\n } else if (REMOVE_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(REMOVE_ACTION, data);\n } else if (UNION_ACTION in data) {\n this._mixpanel['persistence']._add_to_people_queue(UNION_ACTION, data);\n } else {\n console.error('Invalid call to _enqueue():', data);\n }\n};\n\nMixpanelPeople.prototype._flush_one_queue = function(action, action_method, callback, queue_to_params_fn) {\n var _this = this;\n var queued_data = _.extend({}, this._mixpanel['persistence']._get_queue(action));\n var action_params = queued_data;\n\n if (!_.isUndefined(queued_data) && _.isObject(queued_data) && !_.isEmptyObject(queued_data)) {\n _this._mixpanel['persistence']._pop_from_people_queue(action, queued_data);\n if (queue_to_params_fn) {\n action_params = queue_to_params_fn(queued_data);\n }\n action_method.call(_this, action_params, function(response, data) {\n // on bad response, we want to add it back to the queue\n if (response === 0) {\n _this._mixpanel['persistence']._add_to_people_queue(action, queued_data);\n }\n if (!_.isUndefined(callback)) {\n callback(response, data);\n }\n });\n }\n};\n\n// Flush queued engage operations - order does not matter,\n// and there are network level race conditions anyway\nMixpanelPeople.prototype._flush = function(\n _set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback\n) {\n var _this = this;\n var $append_queue = this._mixpanel['persistence']._get_queue(APPEND_ACTION);\n var $remove_queue = this._mixpanel['persistence']._get_queue(REMOVE_ACTION);\n\n this._flush_one_queue(SET_ACTION, this.set, _set_callback);\n this._flush_one_queue(SET_ONCE_ACTION, this.set_once, _set_once_callback);\n this._flush_one_queue(UNSET_ACTION, this.unset, _unset_callback, function(queue) { return _.keys(queue); });\n this._flush_one_queue(ADD_ACTION, this.increment, _add_callback);\n this._flush_one_queue(UNION_ACTION, this.union, _union_callback);\n\n // we have to fire off each $append individually since there is\n // no concat method server side\n if (!_.isUndefined($append_queue) && _.isArray($append_queue) && $append_queue.length) {\n var $append_item;\n var append_callback = function(response, data) {\n if (response === 0) {\n _this._mixpanel['persistence']._add_to_people_queue(APPEND_ACTION, $append_item);\n }\n if (!_.isUndefined(_append_callback)) {\n _append_callback(response, data);\n }\n };\n for (var i = $append_queue.length - 1; i >= 0; i--) {\n $append_item = $append_queue.pop();\n if (!_.isEmptyObject($append_item)) {\n _this.append($append_item, append_callback);\n }\n }\n // Save the shortened append queue\n _this._mixpanel['persistence'].save();\n }\n\n // same for $remove\n if (!_.isUndefined($remove_queue) && _.isArray($remove_queue) && $remove_queue.length) {\n var $remove_item;\n var remove_callback = function(response, data) {\n if (response === 0) {\n _this._mixpanel['persistence']._add_to_people_queue(REMOVE_ACTION, $remove_item);\n }\n if (!_.isUndefined(_remove_callback)) {\n _remove_callback(response, data);\n }\n };\n for (var j = $remove_queue.length - 1; j >= 0; j--) {\n $remove_item = $remove_queue.pop();\n if (!_.isEmptyObject($remove_item)) {\n _this.remove($remove_item, remove_callback);\n }\n }\n _this._mixpanel['persistence'].save();\n }\n};\n\nMixpanelPeople.prototype._is_reserved_property = function(prop) {\n return prop === '$distinct_id' || prop === '$token' || prop === '$device_id' || prop === '$user_id' || prop === '$had_persisted_distinct_id';\n};\n\n// MixpanelPeople Exports\nMixpanelPeople.prototype['set'] = MixpanelPeople.prototype.set;\nMixpanelPeople.prototype['set_once'] = MixpanelPeople.prototype.set_once;\nMixpanelPeople.prototype['unset'] = MixpanelPeople.prototype.unset;\nMixpanelPeople.prototype['increment'] = MixpanelPeople.prototype.increment;\nMixpanelPeople.prototype['append'] = MixpanelPeople.prototype.append;\nMixpanelPeople.prototype['remove'] = MixpanelPeople.prototype.remove;\nMixpanelPeople.prototype['union'] = MixpanelPeople.prototype.union;\nMixpanelPeople.prototype['track_charge'] = MixpanelPeople.prototype.track_charge;\nMixpanelPeople.prototype['clear_charges'] = MixpanelPeople.prototype.clear_charges;\nMixpanelPeople.prototype['delete_user'] = MixpanelPeople.prototype.delete_user;\nMixpanelPeople.prototype['toString'] = MixpanelPeople.prototype.toString;\n\n/*\n * Constants\n */\n/** @const */ var SET_QUEUE_KEY = '__mps';\n/** @const */ var SET_ONCE_QUEUE_KEY = '__mpso';\n/** @const */ var UNSET_QUEUE_KEY = '__mpus';\n/** @const */ var ADD_QUEUE_KEY = '__mpa';\n/** @const */ var APPEND_QUEUE_KEY = '__mpap';\n/** @const */ var REMOVE_QUEUE_KEY = '__mpr';\n/** @const */ var UNION_QUEUE_KEY = '__mpu';\n// This key is deprecated, but we want to check for it to see whether aliasing is allowed.\n/** @const */ var PEOPLE_DISTINCT_ID_KEY = '$people_distinct_id';\n/** @const */ var ALIAS_ID_KEY = '__alias';\n/** @const */ var EVENT_TIMERS_KEY = '__timers';\n/** @const */ var RESERVED_PROPERTIES = [\n SET_QUEUE_KEY,\n SET_ONCE_QUEUE_KEY,\n UNSET_QUEUE_KEY,\n ADD_QUEUE_KEY,\n APPEND_QUEUE_KEY,\n REMOVE_QUEUE_KEY,\n UNION_QUEUE_KEY,\n PEOPLE_DISTINCT_ID_KEY,\n ALIAS_ID_KEY,\n EVENT_TIMERS_KEY\n];\n\n/**\n * Mixpanel Persistence Object\n * @constructor\n */\nvar MixpanelPersistence = function(config) {\n this['props'] = {};\n this.campaign_params_saved = false;\n\n if (config['persistence_name']) {\n this.name = 'mp_' + config['persistence_name'];\n } else {\n this.name = 'mp_' + config['token'] + '_mixpanel';\n }\n\n var storage_type = config['persistence'];\n if (storage_type !== 'cookie' && storage_type !== 'localStorage') {\n console.critical('Unknown persistence type ' + storage_type + '; falling back to cookie');\n storage_type = config['persistence'] = 'cookie';\n }\n\n if (storage_type === 'localStorage' && _.localStorage.is_supported()) {\n this.storage = _.localStorage;\n } else {\n this.storage = _.cookie;\n }\n\n this.load();\n this.update_config(config);\n this.upgrade(config);\n this.save();\n};\n\nMixpanelPersistence.prototype.properties = function() {\n var p = {};\n // Filter out reserved properties\n _.each(this['props'], function(v, k) {\n if (!_.include(RESERVED_PROPERTIES, k)) {\n p[k] = v;\n }\n });\n return p;\n};\n\nMixpanelPersistence.prototype.load = function() {\n if (this.disabled) { return; }\n\n var entry = this.storage.parse(this.name);\n\n if (entry) {\n this['props'] = _.extend({}, entry);\n }\n};\n\nMixpanelPersistence.prototype.upgrade = function(config) {\n var upgrade_from_old_lib = config['upgrade'],\n old_cookie_name,\n old_cookie;\n\n if (upgrade_from_old_lib) {\n old_cookie_name = 'mp_super_properties';\n // Case where they had a custom cookie name before.\n if (typeof(upgrade_from_old_lib) === 'string') {\n old_cookie_name = upgrade_from_old_lib;\n }\n\n old_cookie = this.storage.parse(old_cookie_name);\n\n // remove the cookie\n this.storage.remove(old_cookie_name);\n this.storage.remove(old_cookie_name, true);\n\n if (old_cookie) {\n this['props'] = _.extend(\n this['props'],\n old_cookie['all'],\n old_cookie['events']\n );\n }\n }\n\n if (!config['cookie_name'] && config['name'] !== 'mixpanel') {\n // special case to handle people with cookies of the form\n // mp_TOKEN_INSTANCENAME from the first release of this library\n old_cookie_name = 'mp_' + config['token'] + '_' + config['name'];\n old_cookie = this.storage.parse(old_cookie_name);\n\n if (old_cookie) {\n this.storage.remove(old_cookie_name);\n this.storage.remove(old_cookie_name, true);\n\n // Save the prop values that were in the cookie from before -\n // this should only happen once as we delete the old one.\n this.register_once(old_cookie);\n }\n }\n\n if (this.storage === _.localStorage) {\n old_cookie = _.cookie.parse(this.name);\n\n _.cookie.remove(this.name);\n _.cookie.remove(this.name, true);\n\n if (old_cookie) {\n this.register_once(old_cookie);\n }\n }\n};\n\nMixpanelPersistence.prototype.save = function() {\n if (this.disabled) { return; }\n this.storage.set(\n this.name,\n _.JSONEncode(this['props']),\n this.expire_days,\n this.cross_subdomain,\n this.secure,\n this.cross_site,\n this.cookie_domain\n );\n};\n\nMixpanelPersistence.prototype.remove = function() {\n // remove both domain and subdomain cookies\n this.storage.remove(this.name, false, this.cookie_domain);\n this.storage.remove(this.name, true, this.cookie_domain);\n};\n\n// removes the storage entry and deletes all loaded data\n// forced name for tests\nMixpanelPersistence.prototype.clear = function() {\n this.remove();\n this['props'] = {};\n};\n\n/**\n* @param {Object} props\n* @param {*=} default_value\n* @param {number=} days\n*/\nMixpanelPersistence.prototype.register_once = function(props, default_value, days) {\n if (_.isObject(props)) {\n if (typeof(default_value) === 'undefined') { default_value = 'None'; }\n this.expire_days = (typeof(days) === 'undefined') ? this.default_expiry : days;\n\n _.each(props, function(val, prop) {\n if (!this['props'].hasOwnProperty(prop) || this['props'][prop] === default_value) {\n this['props'][prop] = val;\n }\n }, this);\n\n this.save();\n\n return true;\n }\n return false;\n};\n\n/**\n* @param {Object} props\n* @param {number=} days\n*/\nMixpanelPersistence.prototype.register = function(props, days) {\n if (_.isObject(props)) {\n this.expire_days = (typeof(days) === 'undefined') ? this.default_expiry : days;\n\n _.extend(this['props'], props);\n\n this.save();\n\n return true;\n }\n return false;\n};\n\nMixpanelPersistence.prototype.unregister = function(prop) {\n if (prop in this['props']) {\n delete this['props'][prop];\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.update_search_keyword = function(referrer) {\n this.register(_.info.searchInfo(referrer));\n};\n\n// EXPORTED METHOD, we test this directly.\nMixpanelPersistence.prototype.update_referrer_info = function(referrer) {\n // If referrer doesn't exist, we want to note the fact that it was type-in traffic.\n this.register_once({\n '$initial_referrer': referrer || '$direct',\n '$initial_referring_domain': _.info.referringDomain(referrer) || '$direct'\n }, '');\n};\n\nMixpanelPersistence.prototype.get_referrer_info = function() {\n return _.strip_empty_properties({\n '$initial_referrer': this['props']['$initial_referrer'],\n '$initial_referring_domain': this['props']['$initial_referring_domain']\n });\n};\n\n// safely fills the passed in object with stored properties,\n// does not override any properties defined in both\n// returns the passed in object\nMixpanelPersistence.prototype.safe_merge = function(props) {\n _.each(this['props'], function(val, prop) {\n if (!(prop in props)) {\n props[prop] = val;\n }\n });\n\n return props;\n};\n\nMixpanelPersistence.prototype.update_config = function(config) {\n this.default_expiry = this.expire_days = config['cookie_expiration'];\n this.set_disabled(config['disable_persistence']);\n this.set_cookie_domain(config['cookie_domain']);\n this.set_cross_site(config['cross_site_cookie']);\n this.set_cross_subdomain(config['cross_subdomain_cookie']);\n this.set_secure(config['secure_cookie']);\n};\n\nMixpanelPersistence.prototype.set_disabled = function(disabled) {\n this.disabled = disabled;\n if (this.disabled) {\n this.remove();\n } else {\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.set_cookie_domain = function(cookie_domain) {\n if (cookie_domain !== this.cookie_domain) {\n this.remove();\n this.cookie_domain = cookie_domain;\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.set_cross_site = function(cross_site) {\n if (cross_site !== this.cross_site) {\n this.cross_site = cross_site;\n this.remove();\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.set_cross_subdomain = function(cross_subdomain) {\n if (cross_subdomain !== this.cross_subdomain) {\n this.cross_subdomain = cross_subdomain;\n this.remove();\n this.save();\n }\n};\n\nMixpanelPersistence.prototype.get_cross_subdomain = function() {\n return this.cross_subdomain;\n};\n\nMixpanelPersistence.prototype.set_secure = function(secure) {\n if (secure !== this.secure) {\n this.secure = secure ? true : false;\n this.remove();\n this.save();\n }\n};\n\nMixpanelPersistence.prototype._add_to_people_queue = function(queue, data) {\n var q_key = this._get_queue_key(queue),\n q_data = data[queue],\n set_q = this._get_or_create_queue(SET_ACTION),\n set_once_q = this._get_or_create_queue(SET_ONCE_ACTION),\n unset_q = this._get_or_create_queue(UNSET_ACTION),\n add_q = this._get_or_create_queue(ADD_ACTION),\n union_q = this._get_or_create_queue(UNION_ACTION),\n remove_q = this._get_or_create_queue(REMOVE_ACTION, []),\n append_q = this._get_or_create_queue(APPEND_ACTION, []);\n\n if (q_key === SET_QUEUE_KEY) {\n // Update the set queue - we can override any existing values\n _.extend(set_q, q_data);\n // if there was a pending increment, override it\n // with the set.\n this._pop_from_people_queue(ADD_ACTION, q_data);\n // if there was a pending union, override it\n // with the set.\n this._pop_from_people_queue(UNION_ACTION, q_data);\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === SET_ONCE_QUEUE_KEY) {\n // only queue the data if there is not already a set_once call for it.\n _.each(q_data, function(v, k) {\n if (!(k in set_once_q)) {\n set_once_q[k] = v;\n }\n });\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === UNSET_QUEUE_KEY) {\n _.each(q_data, function(prop) {\n\n // undo previously-queued actions on this key\n _.each([set_q, set_once_q, add_q, union_q], function(enqueued_obj) {\n if (prop in enqueued_obj) {\n delete enqueued_obj[prop];\n }\n });\n _.each(append_q, function(append_obj) {\n if (prop in append_obj) {\n delete append_obj[prop];\n }\n });\n\n unset_q[prop] = true;\n\n });\n } else if (q_key === ADD_QUEUE_KEY) {\n _.each(q_data, function(v, k) {\n // If it exists in the set queue, increment\n // the value\n if (k in set_q) {\n set_q[k] += v;\n } else {\n // If it doesn't exist, update the add\n // queue\n if (!(k in add_q)) {\n add_q[k] = 0;\n }\n add_q[k] += v;\n }\n }, this);\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === UNION_QUEUE_KEY) {\n _.each(q_data, function(v, k) {\n if (_.isArray(v)) {\n if (!(k in union_q)) {\n union_q[k] = [];\n }\n // We may send duplicates, the server will dedup them.\n union_q[k] = union_q[k].concat(v);\n }\n });\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n } else if (q_key === REMOVE_QUEUE_KEY) {\n remove_q.push(q_data);\n this._pop_from_people_queue(APPEND_ACTION, q_data);\n } else if (q_key === APPEND_QUEUE_KEY) {\n append_q.push(q_data);\n this._pop_from_people_queue(UNSET_ACTION, q_data);\n }\n\n console.log('MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):');\n console.log(data);\n\n this.save();\n};\n\nMixpanelPersistence.prototype._pop_from_people_queue = function(queue, data) {\n var q = this._get_queue(queue);\n if (!_.isUndefined(q)) {\n _.each(data, function(v, k) {\n if (queue === APPEND_ACTION || queue === REMOVE_ACTION) {\n // list actions: only remove if both k+v match\n // e.g. remove should not override append in a case like\n // append({foo: 'bar'}); remove({foo: 'qux'})\n _.each(q, function(queued_action) {\n if (queued_action[k] === v) {\n delete queued_action[k];\n }\n });\n } else {\n delete q[k];\n }\n }, this);\n\n this.save();\n }\n};\n\nMixpanelPersistence.prototype._get_queue_key = function(queue) {\n if (queue === SET_ACTION) {\n return SET_QUEUE_KEY;\n } else if (queue === SET_ONCE_ACTION) {\n return SET_ONCE_QUEUE_KEY;\n } else if (queue === UNSET_ACTION) {\n return UNSET_QUEUE_KEY;\n } else if (queue === ADD_ACTION) {\n return ADD_QUEUE_KEY;\n } else if (queue === APPEND_ACTION) {\n return APPEND_QUEUE_KEY;\n } else if (queue === REMOVE_ACTION) {\n return REMOVE_QUEUE_KEY;\n } else if (queue === UNION_ACTION) {\n return UNION_QUEUE_KEY;\n } else {\n console.error('Invalid queue:', queue);\n }\n};\n\nMixpanelPersistence.prototype._get_queue = function(queue) {\n return this['props'][this._get_queue_key(queue)];\n};\nMixpanelPersistence.prototype._get_or_create_queue = function(queue, default_val) {\n var key = this._get_queue_key(queue);\n default_val = _.isUndefined(default_val) ? {} : default_val;\n\n return this['props'][key] || (this['props'][key] = default_val);\n};\n\nMixpanelPersistence.prototype.set_event_timer = function(event_name, timestamp) {\n var timers = this['props'][EVENT_TIMERS_KEY] || {};\n timers[event_name] = timestamp;\n this['props'][EVENT_TIMERS_KEY] = timers;\n this.save();\n};\n\nMixpanelPersistence.prototype.remove_event_timer = function(event_name) {\n var timers = this['props'][EVENT_TIMERS_KEY] || {};\n var timestamp = timers[event_name];\n if (!_.isUndefined(timestamp)) {\n delete this['props'][EVENT_TIMERS_KEY][event_name];\n this.save();\n }\n return timestamp;\n};\n\n/*\n * Mixpanel JS Library\n *\n * Copyright 2012, Mixpanel, Inc. All Rights Reserved\n * http://mixpanel.com/\n *\n * Includes portions of Underscore.js\n * http://documentcloud.github.com/underscore/\n * (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.\n * Released under the MIT License.\n */\n\n// ==ClosureCompiler==\n// @compilation_level ADVANCED_OPTIMIZATIONS\n// @output_file_name mixpanel-2.8.min.js\n// ==/ClosureCompiler==\n\n/*\nSIMPLE STYLE GUIDE:\n\nthis.x === public function\nthis._x === internal - only use within this file\nthis.__x === private - only use within the class\n\nGlobals should be all caps\n*/\n\nvar init_type; // MODULE or SNIPPET loader\nvar mixpanel_master; // main mixpanel instance / object\nvar INIT_MODULE = 0;\nvar INIT_SNIPPET = 1;\n\nvar IDENTITY_FUNC = function(x) {return x;};\nvar NOOP_FUNC = function() {};\n\n/** @const */ var PRIMARY_INSTANCE_NAME = 'mixpanel';\n/** @const */ var PAYLOAD_TYPE_BASE64 = 'base64';\n/** @const */ var PAYLOAD_TYPE_JSON = 'json';\n/** @const */ var DEVICE_ID_PREFIX = '$device:';\n\n\n/*\n * Dynamic... constants? Is that an oxymoron?\n */\n// http://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/\n// https://developer.mozilla.org/en-US/docs/DOM/XMLHttpRequest#withCredentials\nvar USE_XHR = (window$1.XMLHttpRequest && 'withCredentials' in new XMLHttpRequest());\n\n// IE<10 does not support cross-origin XHR's but script tags\n// with defer won't block window.onload; ENQUEUE_REQUESTS\n// should only be true for Opera<12\nvar ENQUEUE_REQUESTS = !USE_XHR && (userAgent.indexOf('MSIE') === -1) && (userAgent.indexOf('Mozilla') === -1);\n\n// save reference to navigator.sendBeacon so it can be minified\nvar sendBeacon = null;\nif (navigator['sendBeacon']) {\n sendBeacon = function() {\n // late reference to navigator.sendBeacon to allow patching/spying\n return navigator['sendBeacon'].apply(navigator, arguments);\n };\n}\n\n/*\n * Module-level globals\n */\nvar DEFAULT_CONFIG = {\n 'api_host': 'https://api-js.mixpanel.com',\n 'api_method': 'POST',\n 'api_transport': 'XHR',\n 'api_payload_format': PAYLOAD_TYPE_BASE64,\n 'app_host': 'https://mixpanel.com',\n 'cdn': 'https://cdn.mxpnl.com',\n 'cross_site_cookie': false,\n 'cross_subdomain_cookie': true,\n 'error_reporter': NOOP_FUNC,\n 'persistence': 'cookie',\n 'persistence_name': '',\n 'cookie_domain': '',\n 'cookie_name': '',\n 'loaded': NOOP_FUNC,\n 'track_marketing': true,\n 'track_pageview': false,\n 'skip_first_touch_marketing': false,\n 'store_google': true,\n 'save_referrer': true,\n 'test': false,\n 'verbose': false,\n 'img': false,\n 'debug': false,\n 'track_links_timeout': 300,\n 'cookie_expiration': 365,\n 'upgrade': false,\n 'disable_persistence': false,\n 'disable_cookie': false,\n 'secure_cookie': false,\n 'ip': true,\n 'opt_out_tracking_by_default': false,\n 'opt_out_persistence_by_default': false,\n 'opt_out_tracking_persistence_type': 'localStorage',\n 'opt_out_tracking_cookie_prefix': null,\n 'property_blacklist': [],\n 'xhr_headers': {}, // { header: value, header2: value }\n 'ignore_dnt': false,\n 'batch_requests': true,\n 'batch_size': 50,\n 'batch_flush_interval_ms': 5000,\n 'batch_request_timeout_ms': 90000,\n 'batch_autostart': true,\n 'hooks': {}\n};\n\nvar DOM_LOADED = false;\n\n/**\n * Mixpanel Library Object\n * @constructor\n */\nvar MixpanelLib = function() {};\n\n\n/**\n * create_mplib(token:string, config:object, name:string)\n *\n * This function is used by the init method of MixpanelLib objects\n * as well as the main initializer at the end of the JSLib (that\n * initializes document.mixpanel as well as any additional instances\n * declared before this file has loaded).\n */\nvar create_mplib = function(token, config, name) {\n var instance,\n target = (name === PRIMARY_INSTANCE_NAME) ? mixpanel_master : mixpanel_master[name];\n\n if (target && init_type === INIT_MODULE) {\n instance = target;\n } else {\n if (target && !_.isArray(target)) {\n console.error('You have already initialized ' + name);\n return;\n }\n instance = new MixpanelLib();\n }\n\n instance._cached_groups = {}; // cache groups in a pool\n\n instance._init(token, config, name);\n\n instance['people'] = new MixpanelPeople();\n instance['people']._init(instance);\n\n if (!instance.get_config('skip_first_touch_marketing')) {\n // We need null UTM params in the object because\n // UTM parameters act as a tuple. If any UTM param\n // is present, then we set all UTM params including\n // empty ones together\n var utm_params = _.info.campaignParams(null);\n var initial_utm_params = {};\n var has_utm = false;\n _.each(utm_params, function(utm_value, utm_key) {\n initial_utm_params['initial_' + utm_key] = utm_value;\n if (utm_value) {\n has_utm = true;\n }\n });\n if (has_utm) {\n instance['people'].set_once(initial_utm_params);\n }\n }\n\n // if any instance on the page has debug = true, we set the\n // global debug to be true\n Config.DEBUG = Config.DEBUG || instance.get_config('debug');\n\n // if target is not defined, we called init after the lib already\n // loaded, so there won't be an array of things to execute\n if (!_.isUndefined(target) && _.isArray(target)) {\n // Crunch through the people queue first - we queue this data up &\n // flush on identify, so it's better to do all these operations first\n instance._execute_array.call(instance['people'], target['people']);\n instance._execute_array(target);\n }\n\n return instance;\n};\n\n// Initialization methods\n\n/**\n * This function initializes a new instance of the Mixpanel tracking object.\n * All new instances are added to the main mixpanel object as sub properties (such as\n * mixpanel.library_name) and also returned by this function. To define a\n * second instance on the page, you would call:\n *\n * mixpanel.init('new token', { your: 'config' }, 'library_name');\n *\n * and use it like so:\n *\n * mixpanel.library_name.track(...);\n *\n * @param {String} token Your Mixpanel API token\n * @param {Object} [config] A dictionary of config options to override. <a href=\"https://github.com/mixpanel/mixpanel-js/blob/v2.46.0/src/mixpanel-core.js#L88-L127\">See a list of default config options</a>.\n * @param {String} [name] The name for the new mixpanel instance that you want created\n */\nMixpanelLib.prototype.init = function (token, config, name) {\n if (_.isUndefined(name)) {\n this.report_error('You must name your new library: init(token, config, name)');\n return;\n }\n if (name === PRIMARY_INSTANCE_NAME) {\n this.report_error('You must initialize the main mixpanel object right after you include the Mixpanel js snippet');\n return;\n }\n\n var instance = create_mplib(token, config, name);\n mixpanel_master[name] = instance;\n instance._loaded();\n\n return instance;\n};\n\n// mixpanel._init(token:string, config:object, name:string)\n//\n// This function sets up the current instance of the mixpanel\n// library. The difference between this method and the init(...)\n// method is this one initializes the actual instance, whereas the\n// init(...) method sets up a new library and calls _init on it.\n//\nMixpanelLib.prototype._init = function(token, config, name) {\n config = config || {};\n\n this['__loaded'] = true;\n this['config'] = {};\n\n var variable_features = {};\n\n // default to JSON payload for standard mixpanel.com API hosts\n if (!('api_payload_format' in config)) {\n var api_host = config['api_host'] || DEFAULT_CONFIG['api_host'];\n if (api_host.match(/\\.mixpanel\\.com/)) {\n variable_features['api_payload_format'] = PAYLOAD_TYPE_JSON;\n }\n }\n\n this.set_config(_.extend({}, DEFAULT_CONFIG, variable_features, config, {\n 'name': name,\n 'token': token,\n 'callback_fn': ((name === PRIMARY_INSTANCE_NAME) ? name : PRIMARY_INSTANCE_NAME + '.' + name) + '._jsc'\n }));\n\n this['_jsc'] = NOOP_FUNC;\n\n this.__dom_loaded_queue = [];\n this.__request_queue = [];\n this.__disabled_events = [];\n this._flags = {\n 'disable_all_events': false,\n 'identify_called': false\n };\n\n // set up request queueing/batching\n this.request_batchers = {};\n this._batch_requests = this.get_config('batch_requests');\n if (this._batch_requests) {\n if (!_.localStorage.is_supported(true) || !USE_XHR) {\n this._batch_requests = false;\n console.log('Turning off Mixpanel request-queueing; needs XHR and localStorage support');\n } else {\n this.init_batchers();\n if (sendBeacon && window$1.addEventListener) {\n // Before page closes or hides (user tabs away etc), attempt to flush any events\n // queued up via navigator.sendBeacon. Since sendBeacon doesn't report success/failure,\n // events will not be removed from the persistent store; if the site is loaded again,\n // the events will be flushed again on startup and deduplicated on the Mixpanel server\n // side.\n // There is no reliable way to capture only page close events, so we lean on the\n // visibilitychange and pagehide events as recommended at\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/unload_event#usage_notes.\n // These events fire when the user clicks away from the current page/tab, so will occur\n // more frequently than page unload, but are the only mechanism currently for capturing\n // this scenario somewhat reliably.\n var flush_on_unload = _.bind(function() {\n if (!this.request_batchers.events.stopped) {\n this.request_batchers.events.flush({unloading: true});\n }\n }, this);\n window$1.addEventListener('pagehide', function(ev) {\n if (ev['persisted']) {\n flush_on_unload();\n }\n });\n window$1.addEventListener('visibilitychange', function() {\n if (document$1['visibilityState'] === 'hidden') {\n flush_on_unload();\n }\n });\n }\n }\n }\n\n this['persistence'] = this['cookie'] = new MixpanelPersistence(this['config']);\n this.unpersisted_superprops = {};\n this._gdpr_init();\n\n var uuid = _.UUID();\n if (!this.get_distinct_id()) {\n // There is no need to set the distinct id\n // or the device id if something was already stored\n // in the persitence\n this.register_once({\n 'distinct_id': DEVICE_ID_PREFIX + uuid,\n '$device_id': uuid\n }, '');\n }\n\n if (this.get_config('track_pageview')) {\n this.track_pageview();\n }\n};\n\n// Private methods\n\nMixpanelLib.prototype._loaded = function() {\n this.get_config('loaded')(this);\n this._set_default_superprops();\n};\n\n// update persistence with info on referrer, UTM params, etc\nMixpanelLib.prototype._set_default_superprops = function() {\n this['persistence'].update_search_keyword(document$1.referrer);\n if (this.get_config('store_google')) {\n this.register(_.info.campaignParams(), {persistent: false});\n }\n if (this.get_config('save_referrer')) {\n this['persistence'].update_referrer_info(document$1.referrer);\n }\n};\n\nMixpanelLib.prototype._dom_loaded = function() {\n _.each(this.__dom_loaded_queue, function(item) {\n this._track_dom.apply(this, item);\n }, this);\n\n if (!this.has_opted_out_tracking()) {\n _.each(this.__request_queue, function(item) {\n this._send_request.apply(this, item);\n }, this);\n }\n\n delete this.__dom_loaded_queue;\n delete this.__request_queue;\n};\n\nMixpanelLib.prototype._track_dom = function(DomClass, args) {\n if (this.get_config('img')) {\n this.report_error('You can\\'t use DOM tracking functions with img = true.');\n return false;\n }\n\n if (!DOM_LOADED) {\n this.__dom_loaded_queue.push([DomClass, args]);\n return false;\n }\n\n var dt = new DomClass().init(this);\n return dt.track.apply(dt, args);\n};\n\n/**\n * _prepare_callback() should be called by callers of _send_request for use\n * as the callback argument.\n *\n * If there is no callback, this returns null.\n * If we are going to make XHR/XDR requests, this returns a function.\n * If we are going to use script tags, this returns a string to use as the\n * callback GET param.\n */\nMixpanelLib.prototype._prepare_callback = function(callback, data) {\n if (_.isUndefined(callback)) {\n return null;\n }\n\n if (USE_XHR) {\n var callback_function = function(response) {\n callback(response, data);\n };\n return callback_function;\n } else {\n // if the user gives us a callback, we store as a random\n // property on this instances jsc function and update our\n // callback string to reflect that.\n var jsc = this['_jsc'];\n var randomized_cb = '' + Math.floor(Math.random() * 100000000);\n var callback_string = this.get_config('callback_fn') + '[' + randomized_cb + ']';\n jsc[randomized_cb] = function(response) {\n delete jsc[randomized_cb];\n callback(response, data);\n };\n return callback_string;\n }\n};\n\nMixpanelLib.prototype._send_request = function(url, data, options, callback) {\n var succeeded = true;\n\n if (ENQUEUE_REQUESTS) {\n this.__request_queue.push(arguments);\n return succeeded;\n }\n\n var DEFAULT_OPTIONS = {\n method: this.get_config('api_method'),\n transport: this.get_config('api_transport'),\n verbose: this.get_config('verbose')\n };\n var body_data = null;\n\n if (!callback && (_.isFunction(options) || typeof options === 'string')) {\n callback = options;\n options = null;\n }\n options = _.extend(DEFAULT_OPTIONS, options || {});\n if (!USE_XHR) {\n options.method = 'GET';\n }\n var use_post = options.method === 'POST';\n var use_sendBeacon = sendBeacon && use_post && options.transport.toLowerCase() === 'sendbeacon';\n\n // needed to correctly format responses\n var verbose_mode = options.verbose;\n if (data['verbose']) { verbose_mode = true; }\n\n if (this.get_config('test')) { data['test'] = 1; }\n if (verbose_mode) { data['verbose'] = 1; }\n if (this.get_config('img')) { data['img'] = 1; }\n if (!USE_XHR) {\n if (callback) {\n data['callback'] = callback;\n } else if (verbose_mode || this.get_config('test')) {\n // Verbose output (from verbose mode, or an error in test mode) is a json blob,\n // which by itself is not valid javascript. Without a callback, this verbose output will\n // cause an error when returned via jsonp, so we force a no-op callback param.\n // See the ECMA script spec: http://www.ecma-international.org/ecma-262/5.1/#sec-12.4\n data['callback'] = '(function(){})';\n }\n }\n\n data['ip'] = this.get_config('ip')?1:0;\n data['_'] = new Date().getTime().toString();\n\n if (use_post) {\n body_data = 'data=' + encodeURIComponent(data['data']);\n delete data['data'];\n }\n\n url += '?' + _.HTTPBuildQuery(data);\n\n var lib = this;\n if ('img' in data) {\n var img = document$1.createElement('img');\n img.src = url;\n document$1.body.appendChild(img);\n } else if (use_sendBeacon) {\n try {\n succeeded = sendBeacon(url, body_data);\n } catch (e) {\n lib.report_error(e);\n succeeded = false;\n }\n try {\n if (callback) {\n callback(succeeded ? 1 : 0);\n }\n } catch (e) {\n lib.report_error(e);\n }\n } else if (USE_XHR) {\n try {\n var req = new XMLHttpRequest();\n req.open(options.method, url, true);\n\n var headers = this.get_config('xhr_headers');\n if (use_post) {\n headers['Content-Type'] = 'application/x-www-form-urlencoded';\n }\n _.each(headers, function(headerValue, headerName) {\n req.setRequestHeader(headerName, headerValue);\n });\n\n if (options.timeout_ms && typeof req.timeout !== 'undefined') {\n req.timeout = options.timeout_ms;\n var start_time = new Date().getTime();\n }\n\n // send the mp_optout cookie\n // withCredentials cannot be modified until after calling .open on Android and Mobile Safari\n req.withCredentials = true;\n req.onreadystatechange = function () {\n if (req.readyState === 4) { // XMLHttpRequest.DONE == 4, except in safari 4\n if (req.status === 200) {\n if (callback) {\n if (verbose_mode) {\n var response;\n try {\n response = _.JSONDecode(req.responseText);\n } catch (e) {\n lib.report_error(e);\n if (options.ignore_json_errors) {\n response = req.responseText;\n } else {\n return;\n }\n }\n callback(response);\n } else {\n callback(Number(req.responseText));\n }\n }\n } else {\n var error;\n if (\n req.timeout &&\n !req.status &&\n new Date().getTime() - start_time >= req.timeout\n ) {\n error = 'timeout';\n } else {\n error = 'Bad HTTP status: ' + req.status + ' ' + req.statusText;\n }\n lib.report_error(error);\n if (callback) {\n if (verbose_mode) {\n callback({status: 0, error: error, xhr_req: req});\n } else {\n callback(0);\n }\n }\n }\n }\n };\n req.send(body_data);\n } catch (e) {\n lib.report_error(e);\n succeeded = false;\n }\n } else {\n var script = document$1.createElement('script');\n script.type = 'text/javascript';\n script.async = true;\n script.defer = true;\n script.src = url;\n var s = document$1.getElementsByTagName('script')[0];\n s.parentNode.insertBefore(script, s);\n }\n\n return succeeded;\n};\n\n/**\n * _execute_array() deals with processing any mixpanel function\n * calls that were called before the Mixpanel library were loaded\n * (and are thus stored in an array so they can be called later)\n *\n * Note: we fire off all the mixpanel function calls && user defined\n * functions BEFORE we fire off mixpanel tracking calls. This is so\n * identify/register/set_config calls can properly modify early\n * tracking calls.\n *\n * @param {Array} array\n */\nMixpanelLib.prototype._execute_array = function(array) {\n var fn_name, alias_calls = [], other_calls = [], tracking_calls = [];\n _.each(array, function(item) {\n if (item) {\n fn_name = item[0];\n if (_.isArray(fn_name)) {\n tracking_calls.push(item); // chained call e.g. mixpanel.get_group().set()\n } else if (typeof(item) === 'function') {\n item.call(this);\n } else if (_.isArray(item) && fn_name === 'alias') {\n alias_calls.push(item);\n } else if (_.isArray(item) && fn_name.indexOf('track') !== -1 && typeof(this[fn_name]) === 'function') {\n tracking_calls.push(item);\n } else {\n other_calls.push(item);\n }\n }\n }, this);\n\n var execute = function(calls, context) {\n _.each(calls, function(item) {\n if (_.isArray(item[0])) {\n // chained call\n var caller = context;\n _.each(item, function(call) {\n caller = caller[call[0]].apply(caller, call.slice(1));\n });\n } else {\n this[item[0]].apply(this, item.slice(1));\n }\n }, context);\n };\n\n execute(alias_calls, this);\n execute(other_calls, this);\n execute(tracking_calls, this);\n};\n\n// request queueing utils\n\nMixpanelLib.prototype.are_batchers_initialized = function() {\n return !!this.request_batchers.events;\n};\n\nMixpanelLib.prototype.init_batchers = function() {\n var token = this.get_config('token');\n if (!this.are_batchers_initialized()) {\n var batcher_for = _.bind(function(attrs) {\n return new RequestBatcher(\n '__mpq_' + token + attrs.queue_suffix,\n {\n libConfig: this['config'],\n sendRequestFunc: _.bind(function(data, options, cb) {\n this._send_request(\n this.get_config('api_host') + attrs.endpoint,\n this._encode_data_for_request(data),\n options,\n this._prepare_callback(cb, data)\n );\n }, this),\n beforeSendHook: _.bind(function(item) {\n return this._run_hook('before_send_' + attrs.type, item);\n }, this),\n errorReporter: this.get_config('error_reporter'),\n stopAllBatchingFunc: _.bind(this.stop_batch_senders, this)\n }\n );\n }, this);\n this.request_batchers = {\n events: batcher_for({type: 'events', endpoint: '/track/', queue_suffix: '_ev'}),\n people: batcher_for({type: 'people', endpoint: '/engage/', queue_suffix: '_pp'}),\n groups: batcher_for({type: 'groups', endpoint: '/groups/', queue_suffix: '_gr'})\n };\n }\n if (this.get_config('batch_autostart')) {\n this.start_batch_senders();\n }\n};\n\nMixpanelLib.prototype.start_batch_senders = function() {\n if (this.are_batchers_initialized()) {\n this._batch_requests = true;\n _.each(this.request_batchers, function(batcher) {\n batcher.start();\n });\n }\n};\n\nMixpanelLib.prototype.stop_batch_senders = function() {\n this._batch_requests = false;\n _.each(this.request_batchers, function(batcher) {\n batcher.stop();\n batcher.clear();\n });\n};\n\n/**\n * push() keeps the standard async-array-push\n * behavior around after the lib is loaded.\n * This is only useful for external integrations that\n * do not wish to rely on our convenience methods\n * (created in the snippet).\n *\n * ### Usage:\n * mixpanel.push(['register', { a: 'b' }]);\n *\n * @param {Array} item A [function_name, args...] array to be executed\n */\nMixpanelLib.prototype.push = function(item) {\n this._execute_array([item]);\n};\n\n/**\n * Disable events on the Mixpanel object. If passed no arguments,\n * this function disables tracking of any event. If passed an\n * array of event names, those events will be disabled, but other\n * events will continue to be tracked.\n *\n * Note: this function does not stop other mixpanel functions from\n * firing, such as register() or people.set().\n *\n * @param {Array} [events] An array of event names to disable\n */\nMixpanelLib.prototype.disable = function(events) {\n if (typeof(events) === 'undefined') {\n this._flags.disable_all_events = true;\n } else {\n this.__disabled_events = this.__disabled_events.concat(events);\n }\n};\n\nMixpanelLib.prototype._encode_data_for_request = function(data) {\n var encoded_data = _.JSONEncode(data);\n if (this.get_config('api_payload_format') === PAYLOAD_TYPE_BASE64) {\n encoded_data = _.base64Encode(encoded_data);\n }\n return {'data': encoded_data};\n};\n\n// internal method for handling track vs batch-enqueue logic\nMixpanelLib.prototype._track_or_batch = function(options, callback) {\n var truncated_data = _.truncate(options.data, 255);\n var endpoint = options.endpoint;\n var batcher = options.batcher;\n var should_send_immediately = options.should_send_immediately;\n var send_request_options = options.send_request_options || {};\n callback = callback || NOOP_FUNC;\n\n var request_enqueued_or_initiated = true;\n var send_request_immediately = _.bind(function() {\n if (!send_request_options.skip_hooks) {\n truncated_data = this._run_hook('before_send_' + options.type, truncated_data);\n }\n if (truncated_data) {\n console.log('MIXPANEL REQUEST:');\n console.log(truncated_data);\n return this._send_request(\n endpoint,\n this._encode_data_for_request(truncated_data),\n send_request_options,\n this._prepare_callback(callback, truncated_data)\n );\n } else {\n return null;\n }\n }, this);\n\n if (this._batch_requests && !should_send_immediately) {\n batcher.enqueue(truncated_data, function(succeeded) {\n if (succeeded) {\n callback(1, truncated_data);\n } else {\n send_request_immediately();\n }\n });\n } else {\n request_enqueued_or_initiated = send_request_immediately();\n }\n\n return request_enqueued_or_initiated && truncated_data;\n};\n\n/**\n * Track an event. This is the most important and\n * frequently used Mixpanel function.\n *\n * ### Usage:\n *\n * // track an event named 'Registered'\n * mixpanel.track('Registered', {'Gender': 'Male', 'Age': 21});\n *\n * // track an event using navigator.sendBeacon\n * mixpanel.track('Left page', {'duration_seconds': 35}, {transport: 'sendBeacon'});\n *\n * To track link clicks or form submissions, see track_links() or track_forms().\n *\n * @param {String} event_name The name of the event. This can be anything the user does - 'Button Click', 'Sign Up', 'Item Purchased', etc.\n * @param {Object} [properties] A set of properties to include with the event you're sending. These describe the user who did the event or details about the event itself.\n * @param {Object} [options] Optional configuration for this track request.\n * @param {String} [options.transport] Transport method for network request ('xhr' or 'sendBeacon').\n * @param {Boolean} [options.send_immediately] Whether to bypass batching/queueing and send track request immediately.\n * @param {Function} [callback] If provided, the callback function will be called after tracking the event.\n * @returns {Boolean|Object} If the tracking request was successfully initiated/queued, an object\n * with the tracking payload sent to the API server is returned; otherwise false.\n */\nMixpanelLib.prototype.track = addOptOutCheckMixpanelLib(function(event_name, properties, options, callback) {\n if (!callback && typeof options === 'function') {\n callback = options;\n options = null;\n }\n options = options || {};\n var transport = options['transport']; // external API, don't minify 'transport' prop\n if (transport) {\n options.transport = transport; // 'transport' prop name can be minified internally\n }\n var should_send_immediately = options['send_immediately'];\n if (typeof callback !== 'function') {\n callback = NOOP_FUNC;\n }\n\n if (_.isUndefined(event_name)) {\n this.report_error('No event name provided to mixpanel.track');\n return;\n }\n\n if (this._event_is_disabled(event_name)) {\n callback(0);\n return;\n }\n\n // set defaults\n properties = properties || {};\n properties['token'] = this.get_config('token');\n\n // set $duration if time_event was previously called for this event\n var start_timestamp = this['persistence'].remove_event_timer(event_name);\n if (!_.isUndefined(start_timestamp)) {\n var duration_in_ms = new Date().getTime() - start_timestamp;\n properties['$duration'] = parseFloat((duration_in_ms / 1000).toFixed(3));\n }\n\n this._set_default_superprops();\n\n var marketing_properties = this.get_config('track_marketing')\n ? _.info.marketingParams()\n : {};\n\n // note: extend writes to the first object, so lets make sure we\n // don't write to the persistence properties object and info\n // properties object by passing in a new object\n\n // update properties with pageview info and super-properties\n properties = _.extend(\n {},\n _.info.properties(),\n marketing_properties,\n this['persistence'].properties(),\n this.unpersisted_superprops,\n properties\n );\n\n var property_blacklist = this.get_config('property_blacklist');\n if (_.isArray(property_blacklist)) {\n _.each(property_blacklist, function(blacklisted_prop) {\n delete properties[blacklisted_prop];\n });\n } else {\n this.report_error('Invalid value for property_blacklist config: ' + property_blacklist);\n }\n\n var data = {\n 'event': event_name,\n 'properties': properties\n };\n var ret = this._track_or_batch({\n type: 'events',\n data: data,\n endpoint: this.get_config('api_host') + '/track/',\n batcher: this.request_batchers.events,\n should_send_immediately: should_send_immediately,\n send_request_options: options\n }, callback);\n\n return ret;\n});\n\n/**\n * Register the current user into one/many groups.\n *\n * ### Usage:\n *\n * mixpanel.set_group('company', ['mixpanel', 'google']) // an array of IDs\n * mixpanel.set_group('company', 'mixpanel')\n * mixpanel.set_group('company', 128746312)\n *\n * @param {String} group_key Group key\n * @param {Array|String|Number} group_ids An array of group IDs, or a singular group ID\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n *\n */\nMixpanelLib.prototype.set_group = addOptOutCheckMixpanelLib(function(group_key, group_ids, callback) {\n if (!_.isArray(group_ids)) {\n group_ids = [group_ids];\n }\n var prop = {};\n prop[group_key] = group_ids;\n this.register(prop);\n return this['people'].set(group_key, group_ids, callback);\n});\n\n/**\n * Add a new group for this user.\n *\n * ### Usage:\n *\n * mixpanel.add_group('company', 'mixpanel')\n *\n * @param {String} group_key Group key\n * @param {*} group_id A valid Mixpanel property type\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n */\nMixpanelLib.prototype.add_group = addOptOutCheckMixpanelLib(function(group_key, group_id, callback) {\n var old_values = this.get_property(group_key);\n if (old_values === undefined) {\n var prop = {};\n prop[group_key] = [group_id];\n this.register(prop);\n } else {\n if (old_values.indexOf(group_id) === -1) {\n old_values.push(group_id);\n this.register(prop);\n }\n }\n return this['people'].union(group_key, group_id, callback);\n});\n\n/**\n * Remove a group from this user.\n *\n * ### Usage:\n *\n * mixpanel.remove_group('company', 'mixpanel')\n *\n * @param {String} group_key Group key\n * @param {*} group_id A valid Mixpanel property type\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n */\nMixpanelLib.prototype.remove_group = addOptOutCheckMixpanelLib(function(group_key, group_id, callback) {\n var old_value = this.get_property(group_key);\n // if the value doesn't exist, the persistent store is unchanged\n if (old_value !== undefined) {\n var idx = old_value.indexOf(group_id);\n if (idx > -1) {\n old_value.splice(idx, 1);\n this.register({group_key: old_value});\n }\n if (old_value.length === 0) {\n this.unregister(group_key);\n }\n }\n return this['people'].remove(group_key, group_id, callback);\n});\n\n/**\n * Track an event with specific groups.\n *\n * ### Usage:\n *\n * mixpanel.track_with_groups('purchase', {'product': 'iphone'}, {'University': ['UCB', 'UCLA']})\n *\n * @param {String} event_name The name of the event (see `mixpanel.track()`)\n * @param {Object=} properties A set of properties to include with the event you're sending (see `mixpanel.track()`)\n * @param {Object=} groups An object mapping group name keys to one or more values\n * @param {Function} [callback] If provided, the callback will be called after tracking the event.\n */\nMixpanelLib.prototype.track_with_groups = addOptOutCheckMixpanelLib(function(event_name, properties, groups, callback) {\n var tracking_props = _.extend({}, properties || {});\n _.each(groups, function(v, k) {\n if (v !== null && v !== undefined) {\n tracking_props[k] = v;\n }\n });\n return this.track(event_name, tracking_props, callback);\n});\n\nMixpanelLib.prototype._create_map_key = function (group_key, group_id) {\n return group_key + '_' + JSON.stringify(group_id);\n};\n\nMixpanelLib.prototype._remove_group_from_cache = function (group_key, group_id) {\n delete this._cached_groups[this._create_map_key(group_key, group_id)];\n};\n\n/**\n * Look up reference to a Mixpanel group\n *\n * ### Usage:\n *\n * mixpanel.get_group(group_key, group_id)\n *\n * @param {String} group_key Group key\n * @param {Object} group_id A valid Mixpanel property type\n * @returns {Object} A MixpanelGroup identifier\n */\nMixpanelLib.prototype.get_group = function (group_key, group_id) {\n var map_key = this._create_map_key(group_key, group_id);\n var group = this._cached_groups[map_key];\n if (group === undefined || group._group_key !== group_key || group._group_id !== group_id) {\n group = new MixpanelGroup();\n group._init(this, group_key, group_id);\n this._cached_groups[map_key] = group;\n }\n return group;\n};\n\n/**\n * Track a default Mixpanel page view event, which includes extra default event properties to\n * improve page view data. The `config.track_pageview` option for <a href=\"#mixpanelinit\">mixpanel.init()</a>\n * may be turned on for tracking page loads automatically.\n *\n * ### Usage\n *\n * // track a default $mp_web_page_view event\n * mixpanel.track_pageview();\n *\n * // track a page view event with additional event properties\n * mixpanel.track_pageview({'ab_test_variant': 'card-layout-b'});\n *\n * // example approach to track page views on different page types as event properties\n * mixpanel.track_pageview({'page': 'pricing'});\n * mixpanel.track_pageview({'page': 'homepage'});\n *\n * // UNCOMMON: Tracking a page view event with a custom event_name option. NOT expected to be used for\n * // individual pages on the same site or product. Use cases for custom event_name may be page\n * // views on different products or internal applications that are considered completely separate\n * mixpanel.track_pageview({'page': 'customer-search'}, {'event_name': '[internal] Admin Page View'});\n *\n * @param {Object} [properties] An optional set of additional properties to send with the page view event\n * @param {Object} [options] Page view tracking options\n * @param {String} [options.event_name] - Alternate name for the tracking event\n * @returns {Boolean|Object} If the tracking request was successfully initiated/queued, an object\n * with the tracking payload sent to the API server is returned; otherwise false.\n */\nMixpanelLib.prototype.track_pageview = addOptOutCheckMixpanelLib(function(properties, options) {\n if (typeof properties !== 'object') {\n properties = {};\n }\n options = options || {};\n var event_name = options['event_name'] || '$mp_web_page_view';\n\n var default_page_properties = _.extend(\n _.info.mpPageViewProperties(),\n _.info.campaignParams(),\n _.info.clickParams()\n );\n\n var event_properties = _.extend(\n {},\n default_page_properties,\n properties\n );\n\n return this.track(event_name, event_properties);\n});\n\n/**\n * Track clicks on a set of document elements. Selector must be a\n * valid query. Elements must exist on the page at the time track_links is called.\n *\n * ### Usage:\n *\n * // track click for link id #nav\n * mixpanel.track_links('#nav', 'Clicked Nav Link');\n *\n * ### Notes:\n *\n * This function will wait up to 300 ms for the Mixpanel\n * servers to respond. If they have not responded by that time\n * it will head to the link without ensuring that your event\n * has been tracked. To configure this timeout please see the\n * set_config() documentation below.\n *\n * If you pass a function in as the properties argument, the\n * function will receive the DOMElement that triggered the\n * event as an argument. You are expected to return an object\n * from the function; any properties defined on this object\n * will be sent to mixpanel as event properties.\n *\n * @type {Function}\n * @param {Object|String} query A valid DOM query, element or jQuery-esque list\n * @param {String} event_name The name of the event to track\n * @param {Object|Function} [properties] A properties object or function that returns a dictionary of properties when passed a DOMElement\n */\nMixpanelLib.prototype.track_links = function() {\n return this._track_dom.call(this, LinkTracker, arguments);\n};\n\n/**\n * Track form submissions. Selector must be a valid query.\n *\n * ### Usage:\n *\n * // track submission for form id 'register'\n * mixpanel.track_forms('#register', 'Created Account');\n *\n * ### Notes:\n *\n * This function will wait up to 300 ms for the mixpanel\n * servers to respond, if they have not responded by that time\n * it will head to the link without ensuring that your event\n * has been tracked. To configure this timeout please see the\n * set_config() documentation below.\n *\n * If you pass a function in as the properties argument, the\n * function will receive the DOMElement that triggered the\n * event as an argument. You are expected to return an object\n * from the function; any properties defined on this object\n * will be sent to mixpanel as event properties.\n *\n * @type {Function}\n * @param {Object|String} query A valid DOM query, element or jQuery-esque list\n * @param {String} event_name The name of the event to track\n * @param {Object|Function} [properties] This can be a set of properties, or a function that returns a set of properties after being passed a DOMElement\n */\nMixpanelLib.prototype.track_forms = function() {\n return this._track_dom.call(this, FormTracker, arguments);\n};\n\n/**\n * Time an event by including the time between this call and a\n * later 'track' call for the same event in the properties sent\n * with the event.\n *\n * ### Usage:\n *\n * // time an event named 'Registered'\n * mixpanel.time_event('Registered');\n * mixpanel.track('Registered', {'Gender': 'Male', 'Age': 21});\n *\n * When called for a particular event name, the next track call for that event\n * name will include the elapsed time between the 'time_event' and 'track'\n * calls. This value is stored as seconds in the '$duration' property.\n *\n * @param {String} event_name The name of the event.\n */\nMixpanelLib.prototype.time_event = function(event_name) {\n if (_.isUndefined(event_name)) {\n this.report_error('No event name provided to mixpanel.time_event');\n return;\n }\n\n if (this._event_is_disabled(event_name)) {\n return;\n }\n\n this['persistence'].set_event_timer(event_name, new Date().getTime());\n};\n\nvar REGISTER_DEFAULTS = {\n 'persistent': true\n};\n/**\n * Helper to parse options param for register methods, maintaining\n * legacy support for plain \"days\" param instead of options object\n * @param {Number|Object} [days_or_options] 'days' option (Number), or Options object for register methods\n * @returns {Object} options object\n */\nvar options_for_register = function(days_or_options) {\n var options;\n if (_.isObject(days_or_options)) {\n options = days_or_options;\n } else if (!_.isUndefined(days_or_options)) {\n options = {'days': days_or_options};\n } else {\n options = {};\n }\n return _.extend({}, REGISTER_DEFAULTS, options);\n};\n\n/**\n * Register a set of super properties, which are included with all\n * events. This will overwrite previous super property values.\n *\n * ### Usage:\n *\n * // register 'Gender' as a super property\n * mixpanel.register({'Gender': 'Female'});\n *\n * // register several super properties when a user signs up\n * mixpanel.register({\n * 'Email': 'jdoe@example.com',\n * 'Account Type': 'Free'\n * });\n *\n * // register only for the current pageload\n * mixpanel.register({'Name': 'Pat'}, {persistent: false});\n *\n * @param {Object} properties An associative array of properties to store about the user\n * @param {Number|Object} [days_or_options] Options object or number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.days] - number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.persistent=true] - whether to put in persistent storage (cookie/localStorage)\n */\nMixpanelLib.prototype.register = function(props, days_or_options) {\n var options = options_for_register(days_or_options);\n if (options['persistent']) {\n this['persistence'].register(props, options['days']);\n } else {\n _.extend(this.unpersisted_superprops, props);\n }\n};\n\n/**\n * Register a set of super properties only once. This will not\n * overwrite previous super property values, unlike register().\n *\n * ### Usage:\n *\n * // register a super property for the first time only\n * mixpanel.register_once({\n * 'First Login Date': new Date().toISOString()\n * });\n *\n * // register once, only for the current pageload\n * mixpanel.register_once({\n * 'First interaction time': new Date().toISOString()\n * }, 'None', {persistent: false});\n *\n * ### Notes:\n *\n * If default_value is specified, current super properties\n * with that value will be overwritten.\n *\n * @param {Object} properties An associative array of properties to store about the user\n * @param {*} [default_value] Value to override if already set in super properties (ex: 'False') Default: 'None'\n * @param {Number|Object} [days_or_options] Options object or number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.days] - number of days since the user's last visit to store the super properties (only valid for persisted props)\n * @param {boolean} [days_or_options.persistent=true] - whether to put in persistent storage (cookie/localStorage)\n */\nMixpanelLib.prototype.register_once = function(props, default_value, days_or_options) {\n var options = options_for_register(days_or_options);\n if (options['persistent']) {\n this['persistence'].register_once(props, default_value, options['days']);\n } else {\n if (typeof(default_value) === 'undefined') {\n default_value = 'None';\n }\n _.each(props, function(val, prop) {\n if (!this.unpersisted_superprops.hasOwnProperty(prop) || this.unpersisted_superprops[prop] === default_value) {\n this.unpersisted_superprops[prop] = val;\n }\n }, this);\n }\n};\n\n/**\n * Delete a super property stored with the current user.\n *\n * @param {String} property The name of the super property to remove\n * @param {Object} [options]\n * @param {boolean} [options.persistent=true] - whether to look in persistent storage (cookie/localStorage)\n */\nMixpanelLib.prototype.unregister = function(property, options) {\n options = options_for_register(options);\n if (options['persistent']) {\n this['persistence'].unregister(property);\n } else {\n delete this.unpersisted_superprops[property];\n }\n};\n\nMixpanelLib.prototype._register_single = function(prop, value) {\n var props = {};\n props[prop] = value;\n this.register(props);\n};\n\n/**\n * Identify a user with a unique ID to track user activity across\n * devices, tie a user to their events, and create a user profile.\n * If you never call this method, unique visitors are tracked using\n * a UUID generated the first time they visit the site.\n *\n * Call identify when you know the identity of the current user,\n * typically after login or signup. We recommend against using\n * identify for anonymous visitors to your site.\n *\n * ### Notes:\n * If your project has\n * <a href=\"https://help.mixpanel.com/hc/en-us/articles/360039133851\">ID Merge</a>\n * enabled, the identify method will connect pre- and\n * post-authentication events when appropriate.\n *\n * If your project does not have ID Merge enabled, identify will\n * change the user's local distinct_id to the unique ID you pass.\n * Events tracked prior to authentication will not be connected\n * to the same user identity. If ID Merge is disabled, alias can\n * be used to connect pre- and post-registration events.\n *\n * @param {String} [unique_id] A string that uniquely identifies a user. If not provided, the distinct_id currently in the persistent store (cookie or localStorage) will be used.\n */\nMixpanelLib.prototype.identify = function(\n new_distinct_id, _set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback\n) {\n // Optional Parameters\n // _set_callback:function A callback to be run if and when the People set queue is flushed\n // _add_callback:function A callback to be run if and when the People add queue is flushed\n // _append_callback:function A callback to be run if and when the People append queue is flushed\n // _set_once_callback:function A callback to be run if and when the People set_once queue is flushed\n // _union_callback:function A callback to be run if and when the People union queue is flushed\n // _unset_callback:function A callback to be run if and when the People unset queue is flushed\n\n var previous_distinct_id = this.get_distinct_id();\n if (new_distinct_id && previous_distinct_id !== new_distinct_id) {\n // we allow the following condition if previous distinct_id is same as new_distinct_id\n // so that you can force flush people updates for anonymous profiles.\n if (typeof new_distinct_id === 'string' && new_distinct_id.indexOf(DEVICE_ID_PREFIX) === 0) {\n this.report_error('distinct_id cannot have $device: prefix');\n return -1;\n }\n this.register({'$user_id': new_distinct_id});\n }\n\n if (!this.get_property('$device_id')) {\n // The persisted distinct id might not actually be a device id at all\n // it might be a distinct id of the user from before\n var device_id = previous_distinct_id;\n this.register_once({\n '$had_persisted_distinct_id': true,\n '$device_id': device_id\n }, '');\n }\n\n // identify only changes the distinct id if it doesn't match either the existing or the alias;\n // if it's new, blow away the alias as well.\n if (new_distinct_id !== previous_distinct_id && new_distinct_id !== this.get_property(ALIAS_ID_KEY)) {\n this.unregister(ALIAS_ID_KEY);\n this.register({'distinct_id': new_distinct_id});\n }\n this._flags.identify_called = true;\n // Flush any queued up people requests\n this['people']._flush(_set_callback, _add_callback, _append_callback, _set_once_callback, _union_callback, _unset_callback, _remove_callback);\n\n // send an $identify event any time the distinct_id is changing - logic on the server\n // will determine whether or not to do anything with it.\n if (new_distinct_id !== previous_distinct_id) {\n this.track('$identify', {\n 'distinct_id': new_distinct_id,\n '$anon_distinct_id': previous_distinct_id\n }, {skip_hooks: true});\n }\n};\n\n/**\n * Clears super properties and generates a new random distinct_id for this instance.\n * Useful for clearing data when a user logs out.\n */\nMixpanelLib.prototype.reset = function() {\n this['persistence'].clear();\n this._flags.identify_called = false;\n var uuid = _.UUID();\n this.register_once({\n 'distinct_id': DEVICE_ID_PREFIX + uuid,\n '$device_id': uuid\n }, '');\n};\n\n/**\n * Returns the current distinct id of the user. This is either the id automatically\n * generated by the library or the id that has been passed by a call to identify().\n *\n * ### Notes:\n *\n * get_distinct_id() can only be called after the Mixpanel library has finished loading.\n * init() has a loaded function available to handle this automatically. For example:\n *\n * // set distinct_id after the mixpanel library has loaded\n * mixpanel.init('YOUR PROJECT TOKEN', {\n * loaded: function(mixpanel) {\n * distinct_id = mixpanel.get_distinct_id();\n * }\n * });\n */\nMixpanelLib.prototype.get_distinct_id = function() {\n return this.get_property('distinct_id');\n};\n\n/**\n * The alias method creates an alias which Mixpanel will use to\n * remap one id to another. Multiple aliases can point to the\n * same identifier.\n *\n * The following is a valid use of alias:\n *\n * mixpanel.alias('new_id', 'existing_id');\n * // You can add multiple id aliases to the existing ID\n * mixpanel.alias('newer_id', 'existing_id');\n *\n * Aliases can also be chained - the following is a valid example:\n *\n * mixpanel.alias('new_id', 'existing_id');\n * // chain newer_id - new_id - existing_id\n * mixpanel.alias('newer_id', 'new_id');\n *\n * Aliases cannot point to multiple identifiers - the following\n * example will not work:\n *\n * mixpanel.alias('new_id', 'existing_id');\n * // this is invalid as 'new_id' already points to 'existing_id'\n * mixpanel.alias('new_id', 'newer_id');\n *\n * ### Notes:\n *\n * If your project does not have\n * <a href=\"https://help.mixpanel.com/hc/en-us/articles/360039133851\">ID Merge</a>\n * enabled, the best practice is to call alias once when a unique\n * ID is first created for a user (e.g., when a user first registers\n * for an account). Do not use alias multiple times for a single\n * user without ID Merge enabled.\n *\n * @param {String} alias A unique identifier that you want to use for this user in the future.\n * @param {String} [original] The current identifier being used for this user.\n */\nMixpanelLib.prototype.alias = function(alias, original) {\n // If the $people_distinct_id key exists in persistence, there has been a previous\n // mixpanel.people.identify() call made for this user. It is VERY BAD to make an alias with\n // this ID, as it will duplicate users.\n if (alias === this.get_property(PEOPLE_DISTINCT_ID_KEY)) {\n this.report_error('Attempting to create alias for existing People user - aborting.');\n return -2;\n }\n\n var _this = this;\n if (_.isUndefined(original)) {\n original = this.get_distinct_id();\n }\n if (alias !== original) {\n this._register_single(ALIAS_ID_KEY, alias);\n return this.track('$create_alias', {\n 'alias': alias,\n 'distinct_id': original\n }, {\n skip_hooks: true\n }, function() {\n // Flush the people queue\n _this.identify(alias);\n });\n } else {\n this.report_error('alias matches current distinct_id - skipping api call.');\n this.identify(alias);\n return -1;\n }\n};\n\n/**\n * Provide a string to recognize the user by. The string passed to\n * this method will appear in the Mixpanel Streams product rather\n * than an automatically generated name. Name tags do not have to\n * be unique.\n *\n * This value will only be included in Streams data.\n *\n * @param {String} name_tag A human readable name for the user\n * @deprecated\n */\nMixpanelLib.prototype.name_tag = function(name_tag) {\n this._register_single('mp_name_tag', name_tag);\n};\n\n/**\n * Update the configuration of a mixpanel library instance.\n *\n * The default config is:\n *\n * {\n * // HTTP method for tracking requests\n * api_method: 'POST'\n *\n * // transport for sending requests ('XHR' or 'sendBeacon')\n * // NB: sendBeacon should only be used for scenarios such as\n * // page unload where a \"best-effort\" attempt to send is\n * // acceptable; the sendBeacon API does not support callbacks\n * // or any way to know the result of the request. Mixpanel\n * // tracking via sendBeacon will not support any event-\n * // batching or retry mechanisms.\n * api_transport: 'XHR'\n *\n * // request-batching/queueing/retry\n * batch_requests: true,\n *\n * // maximum number of events/updates to send in a single\n * // network request\n * batch_size: 50,\n *\n * // milliseconds to wait between sending batch requests\n * batch_flush_interval_ms: 5000,\n *\n * // milliseconds to wait for network responses to batch requests\n * // before they are considered timed-out and retried\n * batch_request_timeout_ms: 90000,\n *\n * // override value for cookie domain, only useful for ensuring\n * // correct cross-subdomain cookies on unusual domains like\n * // subdomain.mainsite.avocat.fr; NB this cannot be used to\n * // set cookies on a different domain than the current origin\n * cookie_domain: ''\n *\n * // super properties cookie expiration (in days)\n * cookie_expiration: 365\n *\n * // if true, cookie will be set with SameSite=None; Secure\n * // this is only useful in special situations, like embedded\n * // 3rd-party iframes that set up a Mixpanel instance\n * cross_site_cookie: false\n *\n * // super properties span subdomains\n * cross_subdomain_cookie: true\n *\n * // debug mode\n * debug: false\n *\n * // if this is true, the mixpanel cookie or localStorage entry\n * // will be deleted, and no user persistence will take place\n * disable_persistence: false\n *\n * // if this is true, Mixpanel will automatically determine\n * // City, Region and Country data using the IP address of\n * //the client\n * ip: true\n *\n * // opt users out of tracking by this Mixpanel instance by default\n * opt_out_tracking_by_default: false\n *\n * // opt users out of browser data storage by this Mixpanel instance by default\n * opt_out_persistence_by_default: false\n *\n * // persistence mechanism used by opt-in/opt-out methods - cookie\n * // or localStorage - falls back to cookie if localStorage is unavailable\n * opt_out_tracking_persistence_type: 'localStorage'\n *\n * // customize the name of cookie/localStorage set by opt-in/opt-out methods\n * opt_out_tracking_cookie_prefix: null\n *\n * // type of persistent store for super properties (cookie/\n * // localStorage) if set to 'localStorage', any existing\n * // mixpanel cookie value with the same persistence_name\n * // will be transferred to localStorage and deleted\n * persistence: 'cookie'\n *\n * // name for super properties persistent store\n * persistence_name: ''\n *\n * // names of properties/superproperties which should never\n * // be sent with track() calls\n * property_blacklist: []\n *\n * // if this is true, mixpanel cookies will be marked as\n * // secure, meaning they will only be transmitted over https\n * secure_cookie: false\n *\n * // disables enriching user profiles with first touch marketing data\n * skip_first_touch_marketing: false\n *\n * // the amount of time track_links will\n * // wait for Mixpanel's servers to respond\n * track_links_timeout: 300\n *\n * // adds any UTM parameters and click IDs present on the page to any events fired\n * track_marketing: true\n *\n * // enables automatic page view tracking using default page view events through\n * // the track_pageview() method\n * track_pageview: false\n *\n * // if you set upgrade to be true, the library will check for\n * // a cookie from our old js library and import super\n * // properties from it, then the old cookie is deleted\n * // The upgrade config option only works in the initialization,\n * // so make sure you set it when you create the library.\n * upgrade: false\n *\n * // extra HTTP request headers to set for each API request, in\n * // the format {'Header-Name': value}\n * xhr_headers: {}\n *\n * // whether to ignore or respect the web browser's Do Not Track setting\n * ignore_dnt: false\n * }\n *\n *\n * @param {Object} config A dictionary of new configuration values to update\n */\nMixpanelLib.prototype.set_config = function(config) {\n if (_.isObject(config)) {\n _.extend(this['config'], config);\n\n var new_batch_size = config['batch_size'];\n if (new_batch_size) {\n _.each(this.request_batchers, function(batcher) {\n batcher.resetBatchSize();\n });\n }\n\n if (!this.get_config('persistence_name')) {\n this['config']['persistence_name'] = this['config']['cookie_name'];\n }\n if (!this.get_config('disable_persistence')) {\n this['config']['disable_persistence'] = this['config']['disable_cookie'];\n }\n\n if (this['persistence']) {\n this['persistence'].update_config(this['config']);\n }\n Config.DEBUG = Config.DEBUG || this.get_config('debug');\n }\n};\n\n/**\n * returns the current config object for the library.\n */\nMixpanelLib.prototype.get_config = function(prop_name) {\n return this['config'][prop_name];\n};\n\n/**\n * Fetch a hook function from config, with safe default, and run it\n * against the given arguments\n * @param {string} hook_name which hook to retrieve\n * @returns {any|null} return value of user-provided hook, or null if nothing was returned\n */\nMixpanelLib.prototype._run_hook = function(hook_name) {\n var ret = (this['config']['hooks'][hook_name] || IDENTITY_FUNC).apply(this, slice.call(arguments, 1));\n if (typeof ret === 'undefined') {\n this.report_error(hook_name + ' hook did not return a value');\n ret = null;\n }\n return ret;\n};\n\n/**\n * Returns the value of the super property named property_name. If no such\n * property is set, get_property() will return the undefined value.\n *\n * ### Notes:\n *\n * get_property() can only be called after the Mixpanel library has finished loading.\n * init() has a loaded function available to handle this automatically. For example:\n *\n * // grab value for 'user_id' after the mixpanel library has loaded\n * mixpanel.init('YOUR PROJECT TOKEN', {\n * loaded: function(mixpanel) {\n * user_id = mixpanel.get_property('user_id');\n * }\n * });\n *\n * @param {String} property_name The name of the super property you want to retrieve\n */\nMixpanelLib.prototype.get_property = function(property_name) {\n return this['persistence']['props'][property_name];\n};\n\nMixpanelLib.prototype.toString = function() {\n var name = this.get_config('name');\n if (name !== PRIMARY_INSTANCE_NAME) {\n name = PRIMARY_INSTANCE_NAME + '.' + name;\n }\n return name;\n};\n\nMixpanelLib.prototype._event_is_disabled = function(event_name) {\n return _.isBlockedUA(userAgent) ||\n this._flags.disable_all_events ||\n _.include(this.__disabled_events, event_name);\n};\n\n// perform some housekeeping around GDPR opt-in/out state\nMixpanelLib.prototype._gdpr_init = function() {\n var is_localStorage_requested = this.get_config('opt_out_tracking_persistence_type') === 'localStorage';\n\n // try to convert opt-in/out cookies to localStorage if possible\n if (is_localStorage_requested && _.localStorage.is_supported()) {\n if (!this.has_opted_in_tracking() && this.has_opted_in_tracking({'persistence_type': 'cookie'})) {\n this.opt_in_tracking({'enable_persistence': false});\n }\n if (!this.has_opted_out_tracking() && this.has_opted_out_tracking({'persistence_type': 'cookie'})) {\n this.opt_out_tracking({'clear_persistence': false});\n }\n this.clear_opt_in_out_tracking({\n 'persistence_type': 'cookie',\n 'enable_persistence': false\n });\n }\n\n // check whether the user has already opted out - if so, clear & disable persistence\n if (this.has_opted_out_tracking()) {\n this._gdpr_update_persistence({'clear_persistence': true});\n\n // check whether we should opt out by default\n // note: we don't clear persistence here by default since opt-out default state is often\n // used as an initial state while GDPR information is being collected\n } else if (!this.has_opted_in_tracking() && (\n this.get_config('opt_out_tracking_by_default') || _.cookie.get('mp_optout')\n )) {\n _.cookie.remove('mp_optout');\n this.opt_out_tracking({\n 'clear_persistence': this.get_config('opt_out_persistence_by_default')\n });\n }\n};\n\n/**\n * Enable or disable persistence based on options\n * only enable/disable if persistence is not already in this state\n * @param {boolean} [options.clear_persistence] If true, will delete all data stored by the sdk in persistence and disable it\n * @param {boolean} [options.enable_persistence] If true, will re-enable sdk persistence\n */\nMixpanelLib.prototype._gdpr_update_persistence = function(options) {\n var disabled;\n if (options && options['clear_persistence']) {\n disabled = true;\n } else if (options && options['enable_persistence']) {\n disabled = false;\n } else {\n return;\n }\n\n if (!this.get_config('disable_persistence') && this['persistence'].disabled !== disabled) {\n this['persistence'].set_disabled(disabled);\n }\n\n if (disabled) {\n _.each(this.request_batchers, function(batcher) {\n batcher.clear();\n });\n }\n};\n\n// call a base gdpr function after constructing the appropriate token and options args\nMixpanelLib.prototype._gdpr_call_func = function(func, options) {\n options = _.extend({\n 'track': _.bind(this.track, this),\n 'persistence_type': this.get_config('opt_out_tracking_persistence_type'),\n 'cookie_prefix': this.get_config('opt_out_tracking_cookie_prefix'),\n 'cookie_expiration': this.get_config('cookie_expiration'),\n 'cross_site_cookie': this.get_config('cross_site_cookie'),\n 'cross_subdomain_cookie': this.get_config('cross_subdomain_cookie'),\n 'cookie_domain': this.get_config('cookie_domain'),\n 'secure_cookie': this.get_config('secure_cookie'),\n 'ignore_dnt': this.get_config('ignore_dnt')\n }, options);\n\n // check if localStorage can be used for recording opt out status, fall back to cookie if not\n if (!_.localStorage.is_supported()) {\n options['persistence_type'] = 'cookie';\n }\n\n return func(this.get_config('token'), {\n track: options['track'],\n trackEventName: options['track_event_name'],\n trackProperties: options['track_properties'],\n persistenceType: options['persistence_type'],\n persistencePrefix: options['cookie_prefix'],\n cookieDomain: options['cookie_domain'],\n cookieExpiration: options['cookie_expiration'],\n crossSiteCookie: options['cross_site_cookie'],\n crossSubdomainCookie: options['cross_subdomain_cookie'],\n secureCookie: options['secure_cookie'],\n ignoreDnt: options['ignore_dnt']\n });\n};\n\n/**\n * Opt the user in to data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * // opt user in\n * mixpanel.opt_in_tracking();\n *\n * // opt user in with specific event name, properties, cookie configuration\n * mixpanel.opt_in_tracking({\n * track_event_name: 'User opted in',\n * track_event_properties: {\n * 'Email': 'jdoe@example.com'\n * },\n * cookie_expiration: 30,\n * secure_cookie: true\n * });\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {function} [options.track] Function used for tracking a Mixpanel event to record the opt-in action (default is this Mixpanel instance's track method)\n * @param {string} [options.track_event_name=$opt_in] Event name to be used for tracking the opt-in action\n * @param {Object} [options.track_properties] Set of properties to be tracked along with the opt-in action\n * @param {boolean} [options.enable_persistence=true] If true, will re-enable sdk persistence\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config)\n * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config)\n */\nMixpanelLib.prototype.opt_in_tracking = function(options) {\n options = _.extend({\n 'enable_persistence': true\n }, options);\n\n this._gdpr_call_func(optIn, options);\n this._gdpr_update_persistence(options);\n};\n\n/**\n * Opt the user out of data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * // opt user out\n * mixpanel.opt_out_tracking();\n *\n * // opt user out with different cookie configuration from Mixpanel instance\n * mixpanel.opt_out_tracking({\n * cookie_expiration: 30,\n * secure_cookie: true\n * });\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {boolean} [options.delete_user=true] If true, will delete the currently identified user's profile and clear all charges after opting the user out\n * @param {boolean} [options.clear_persistence=true] If true, will delete all data stored by the sdk in persistence\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config)\n * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config)\n */\nMixpanelLib.prototype.opt_out_tracking = function(options) {\n options = _.extend({\n 'clear_persistence': true,\n 'delete_user': true\n }, options);\n\n // delete user and clear charges since these methods may be disabled by opt-out\n if (options['delete_user'] && this['people'] && this['people']._identify_called()) {\n this['people'].delete_user();\n this['people'].clear_charges();\n }\n\n this._gdpr_call_func(optOut, options);\n this._gdpr_update_persistence(options);\n};\n\n/**\n * Check whether the user has opted in to data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * var has_opted_in = mixpanel.has_opted_in_tracking();\n * // use has_opted_in value\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @returns {boolean} current opt-in status\n */\nMixpanelLib.prototype.has_opted_in_tracking = function(options) {\n return this._gdpr_call_func(hasOptedIn, options);\n};\n\n/**\n * Check whether the user has opted out of data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * var has_opted_out = mixpanel.has_opted_out_tracking();\n * // use has_opted_out value\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @returns {boolean} current opt-out status\n */\nMixpanelLib.prototype.has_opted_out_tracking = function(options) {\n return this._gdpr_call_func(hasOptedOut, options);\n};\n\n/**\n * Clear the user's opt in/out status of data tracking and cookies/localstorage for this Mixpanel instance\n *\n * ### Usage\n *\n * // clear user's opt-in/out status\n * mixpanel.clear_opt_in_out_tracking();\n *\n * // clear user's opt-in/out status with specific cookie configuration - should match\n * // configuration used when opt_in_tracking/opt_out_tracking methods were called.\n * mixpanel.clear_opt_in_out_tracking({\n * cookie_expiration: 30,\n * secure_cookie: true\n * });\n *\n * @param {Object} [options] A dictionary of config options to override\n * @param {boolean} [options.enable_persistence=true] If true, will re-enable sdk persistence\n * @param {string} [options.persistence_type=localStorage] Persistence mechanism used - cookie or localStorage - falls back to cookie if localStorage is unavailable\n * @param {string} [options.cookie_prefix=__mp_opt_in_out] Custom prefix to be used in the cookie/localstorage name\n * @param {Number} [options.cookie_expiration] Number of days until the opt-in cookie expires (overrides value specified in this Mixpanel instance's config)\n * @param {string} [options.cookie_domain] Custom cookie domain (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_site_cookie] Whether the opt-in cookie is set as cross-site-enabled (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.cross_subdomain_cookie] Whether the opt-in cookie is set as cross-subdomain or not (overrides value specified in this Mixpanel instance's config)\n * @param {boolean} [options.secure_cookie] Whether the opt-in cookie is set as secure or not (overrides value specified in this Mixpanel instance's config)\n */\nMixpanelLib.prototype.clear_opt_in_out_tracking = function(options) {\n options = _.extend({\n 'enable_persistence': true\n }, options);\n\n this._gdpr_call_func(clearOptInOut, options);\n this._gdpr_update_persistence(options);\n};\n\nMixpanelLib.prototype.report_error = function(msg, err) {\n console.error.apply(console.error, arguments);\n try {\n if (!err && !(msg instanceof Error)) {\n msg = new Error(msg);\n }\n this.get_config('error_reporter')(msg, err);\n } catch(err) {\n console.error(err);\n }\n};\n\n// EXPORTS (for closure compiler)\n\n// MixpanelLib Exports\nMixpanelLib.prototype['init'] = MixpanelLib.prototype.init;\nMixpanelLib.prototype['reset'] = MixpanelLib.prototype.reset;\nMixpanelLib.prototype['disable'] = MixpanelLib.prototype.disable;\nMixpanelLib.prototype['time_event'] = MixpanelLib.prototype.time_event;\nMixpanelLib.prototype['track'] = MixpanelLib.prototype.track;\nMixpanelLib.prototype['track_links'] = MixpanelLib.prototype.track_links;\nMixpanelLib.prototype['track_forms'] = MixpanelLib.prototype.track_forms;\nMixpanelLib.prototype['track_pageview'] = MixpanelLib.prototype.track_pageview;\nMixpanelLib.prototype['register'] = MixpanelLib.prototype.register;\nMixpanelLib.prototype['register_once'] = MixpanelLib.prototype.register_once;\nMixpanelLib.prototype['unregister'] = MixpanelLib.prototype.unregister;\nMixpanelLib.prototype['identify'] = MixpanelLib.prototype.identify;\nMixpanelLib.prototype['alias'] = MixpanelLib.prototype.alias;\nMixpanelLib.prototype['name_tag'] = MixpanelLib.prototype.name_tag;\nMixpanelLib.prototype['set_config'] = MixpanelLib.prototype.set_config;\nMixpanelLib.prototype['get_config'] = MixpanelLib.prototype.get_config;\nMixpanelLib.prototype['get_property'] = MixpanelLib.prototype.get_property;\nMixpanelLib.prototype['get_distinct_id'] = MixpanelLib.prototype.get_distinct_id;\nMixpanelLib.prototype['toString'] = MixpanelLib.prototype.toString;\nMixpanelLib.prototype['opt_out_tracking'] = MixpanelLib.prototype.opt_out_tracking;\nMixpanelLib.prototype['opt_in_tracking'] = MixpanelLib.prototype.opt_in_tracking;\nMixpanelLib.prototype['has_opted_out_tracking'] = MixpanelLib.prototype.has_opted_out_tracking;\nMixpanelLib.prototype['has_opted_in_tracking'] = MixpanelLib.prototype.has_opted_in_tracking;\nMixpanelLib.prototype['clear_opt_in_out_tracking'] = MixpanelLib.prototype.clear_opt_in_out_tracking;\nMixpanelLib.prototype['get_group'] = MixpanelLib.prototype.get_group;\nMixpanelLib.prototype['set_group'] = MixpanelLib.prototype.set_group;\nMixpanelLib.prototype['add_group'] = MixpanelLib.prototype.add_group;\nMixpanelLib.prototype['remove_group'] = MixpanelLib.prototype.remove_group;\nMixpanelLib.prototype['track_with_groups'] = MixpanelLib.prototype.track_with_groups;\nMixpanelLib.prototype['start_batch_senders'] = MixpanelLib.prototype.start_batch_senders;\nMixpanelLib.prototype['stop_batch_senders'] = MixpanelLib.prototype.stop_batch_senders;\n\n// MixpanelPersistence Exports\nMixpanelPersistence.prototype['properties'] = MixpanelPersistence.prototype.properties;\nMixpanelPersistence.prototype['update_search_keyword'] = MixpanelPersistence.prototype.update_search_keyword;\nMixpanelPersistence.prototype['update_referrer_info'] = MixpanelPersistence.prototype.update_referrer_info;\nMixpanelPersistence.prototype['get_cross_subdomain'] = MixpanelPersistence.prototype.get_cross_subdomain;\nMixpanelPersistence.prototype['clear'] = MixpanelPersistence.prototype.clear;\n\n\nvar instances = {};\nvar extend_mp = function() {\n // add all the sub mixpanel instances\n _.each(instances, function(instance, name) {\n if (name !== PRIMARY_INSTANCE_NAME) { mixpanel_master[name] = instance; }\n });\n\n // add private functions as _\n mixpanel_master['_'] = _;\n};\n\nvar override_mp_init_func = function() {\n // we override the snippets init function to handle the case where a\n // user initializes the mixpanel library after the script loads & runs\n mixpanel_master['init'] = function(token, config, name) {\n if (name) {\n // initialize a sub library\n if (!mixpanel_master[name]) {\n mixpanel_master[name] = instances[name] = create_mplib(token, config, name);\n mixpanel_master[name]._loaded();\n }\n return mixpanel_master[name];\n } else {\n var instance = mixpanel_master;\n\n if (instances[PRIMARY_INSTANCE_NAME]) {\n // main mixpanel lib already initialized\n instance = instances[PRIMARY_INSTANCE_NAME];\n } else if (token) {\n // intialize the main mixpanel lib\n instance = create_mplib(token, config, PRIMARY_INSTANCE_NAME);\n instance._loaded();\n instances[PRIMARY_INSTANCE_NAME] = instance;\n }\n\n mixpanel_master = instance;\n if (init_type === INIT_SNIPPET) {\n window$1[PRIMARY_INSTANCE_NAME] = mixpanel_master;\n }\n extend_mp();\n }\n };\n};\n\nvar add_dom_loaded_handler = function() {\n // Cross browser DOM Loaded support\n function dom_loaded_handler() {\n // function flag since we only want to execute this once\n if (dom_loaded_handler.done) { return; }\n dom_loaded_handler.done = true;\n\n DOM_LOADED = true;\n ENQUEUE_REQUESTS = false;\n\n _.each(instances, function(inst) {\n inst._dom_loaded();\n });\n }\n\n function do_scroll_check() {\n try {\n document$1.documentElement.doScroll('left');\n } catch(e) {\n setTimeout(do_scroll_check, 1);\n return;\n }\n\n dom_loaded_handler();\n }\n\n if (document$1.addEventListener) {\n if (document$1.readyState === 'complete') {\n // safari 4 can fire the DOMContentLoaded event before loading all\n // external JS (including this file). you will see some copypasta\n // on the internet that checks for 'complete' and 'loaded', but\n // 'loaded' is an IE thing\n dom_loaded_handler();\n } else {\n document$1.addEventListener('DOMContentLoaded', dom_loaded_handler, false);\n }\n } else if (document$1.attachEvent) {\n // IE\n document$1.attachEvent('onreadystatechange', dom_loaded_handler);\n\n // check to make sure we arn't in a frame\n var toplevel = false;\n try {\n toplevel = window$1.frameElement === null;\n } catch(e) {\n // noop\n }\n\n if (document$1.documentElement.doScroll && toplevel) {\n do_scroll_check();\n }\n }\n\n // fallback handler, always will work\n _.register_event(window$1, 'load', dom_loaded_handler, true);\n};\n\nfunction init_as_module() {\n init_type = INIT_MODULE;\n mixpanel_master = new MixpanelLib();\n\n override_mp_init_func();\n mixpanel_master['init']();\n add_dom_loaded_handler();\n\n return mixpanel_master;\n}\n\nvar mixpanel = init_as_module();\n\nmodule.exports = mixpanel;","\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/_app\",\n function () {\n return require(\"private-next-pages/_app.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/_app\"])\n });\n }\n ","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M6.5 10h-2v7h2zm6 0h-2v7h2zm8.5 9H2v2h19zm-2.5-9h-2v7h2zm-7-6.74L16.71 6H6.29zm0-2.26L2 6v2h19V6z\"\n}), 'AccountBalanceOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M12 17.5 6.5 12H10v-2h4v2h3.5zM5.12 5l.81-1h12l.94 1z\"\n}), 'Archive');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M6.24 5h11.52l.81.97H5.44zM5 19V8h14v11zm8.45-9h-2.9v3H8l4 4 4-4h-2.55z\"\n}), 'ArchiveOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z\"\n}), 'ArrowBack');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M22 12c0-5.52-4.48-10-10-10S2 6.48 2 12s4.48 10 10 10 10-4.48 10-10M4 12c0-4.42 3.58-8 8-8s8 3.58 8 8-3.58 8-8 8-8-3.58-8-8m12 0-4 4-1.41-1.41L12.17 13H8v-2h4.17l-1.59-1.59L12 8z\"\n}), 'ArrowCircleRightOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z\"\n}), 'ChevronLeft');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Close');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m20.79 9.23-2-3.46L14 8.54V3h-4v5.54L5.21 5.77l-2 3.46L8 12l-4.79 2.77 2 3.46L10 15.46V21h4v-5.54l4.79 2.77 2-3.46L16 12z\"\n}), 'Emergency');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M19 5h-2V3H7v2H5c-1.1 0-2 .9-2 2v1c0 2.55 1.92 4.63 4.39 4.94.63 1.5 1.98 2.63 3.61 2.96V19H7v2h10v-2h-4v-3.1c1.63-.33 2.98-1.46 3.61-2.96C19.08 12.63 21 10.55 21 8V7c0-1.1-.9-2-2-2M5 8V7h2v3.82C5.84 10.4 5 9.3 5 8m7 6c-1.65 0-3-1.35-3-3V5h6v6c0 1.65-1.35 3-3 3m7-6c0 1.3-.84 2.4-2 2.82V7h2z\"\n}), 'EmojiEventsOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M15 4v7H5.17L4 12.17V4zm1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1m5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1\"\n}), 'ForumOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M11 18h2v-2h-2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4\"\n}), 'HelpOutline');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2zm10 14.5V20H8v-3.5l4-4zm-4-5-4-4V4h8v3.5z\"\n}), 'HourglassEmpty');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6z\"\n}), 'KeyboardArrowDown');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)([/*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z\"\n}, \"0\"), /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24\"\n}, \"1\")], 'MenuBookOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m0 18c-4.42 0-8-3.58-8-8 0-1.85.63-3.55 1.69-4.9L16.9 18.31C15.55 19.37 13.85 20 12 20m6.31-3.1L7.1 5.69C8.45 4.63 10.15 4 12 4c4.42 0 8 3.58 8 8 0 1.85-.63 3.55-1.69 4.9\"\n}), 'NotInterested');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z\"\n}), 'Notifications');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4\"\n}), 'PersonOutline');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M14 4v5c0 1.12.37 2.16 1 3H9c.65-.86 1-1.9 1-3V4zm3-2H7c-.55 0-1 .45-1 1s.45 1 1 1h1v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1 1-1v-7H19v-2c-1.66 0-3-1.34-3-3V4h1c.55 0 1-.45 1-1s-.45-1-1-1\"\n}), 'PushPinOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m4.01 6.03 7.51 3.22-7.52-1zm7.5 8.72L4 17.97v-2.22zM2.01 3 2 10l15 2-15 2 .01 7L23 12z\"\n}), 'SendOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1q-.09-.03-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1q.09.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73s-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2\"\n}), 'SettingsOutlined');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M12 17.27 18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z\"\n}), 'Star');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"m22 9.24-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28z\"\n}), 'StarOutline');","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M18 4H6C3.79 4 2 5.79 2 8v8c0 2.21 1.79 4 4 4h12c2.21 0 4-1.79 4-4V8c0-2.21-1.79-4-4-4m-1.86 9.77c-.24.2-.57.28-.88.2L4.15 11.25C4.45 10.52 5.16 10 6 10h12c.67 0 1.26.34 1.63.84zM6 6h12c1.1 0 2 .9 2 2v.55c-.59-.34-1.27-.55-2-.55H6c-.73 0-1.41.21-2 .55V8c0-1.1.9-2 2-2\"\n}), 'WalletOutlined');","\"use strict\";\n'use client';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\nvar _utils = require(\"@mui/material/utils\");","'use client';\n\nimport * as React from 'react';\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Person from \"../internal/svg-icons/Person.js\";\nimport { getAvatarUtilityClass } from \"./avatarClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n colorDefault\n } = ownerState;\n const slots = {\n root: ['root', variant, colorDefault && 'colorDefault'],\n img: ['img'],\n fallback: ['fallback']\n };\n return composeClasses(slots, getAvatarUtilityClass, classes);\n};\nconst AvatarRoot = styled('div', {\n name: 'MuiAvatar',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], ownerState.colorDefault && styles.colorDefault];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n width: 40,\n height: 40,\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(20),\n lineHeight: 1,\n borderRadius: '50%',\n overflow: 'hidden',\n userSelect: 'none',\n variants: [{\n props: {\n variant: 'rounded'\n },\n style: {\n borderRadius: (theme.vars || theme).shape.borderRadius\n }\n }, {\n props: {\n variant: 'square'\n },\n style: {\n borderRadius: 0\n }\n }, {\n props: {\n colorDefault: true\n },\n style: {\n color: (theme.vars || theme).palette.background.default,\n ...(theme.vars ? {\n backgroundColor: theme.vars.palette.Avatar.defaultBg\n } : {\n backgroundColor: theme.palette.grey[400],\n ...theme.applyStyles('dark', {\n backgroundColor: theme.palette.grey[600]\n })\n })\n }\n }]\n})));\nconst AvatarImg = styled('img', {\n name: 'MuiAvatar',\n slot: 'Img',\n overridesResolver: (props, styles) => styles.img\n})({\n width: '100%',\n height: '100%',\n textAlign: 'center',\n // Handle non-square image.\n objectFit: 'cover',\n // Hide alt text.\n color: 'transparent',\n // Hide the image broken icon, only works on Chrome.\n textIndent: 10000\n});\nconst AvatarFallback = styled(Person, {\n name: 'MuiAvatar',\n slot: 'Fallback',\n overridesResolver: (props, styles) => styles.fallback\n})({\n width: '75%',\n height: '75%'\n});\nfunction useLoaded({\n crossOrigin,\n referrerPolicy,\n src,\n srcSet\n}) {\n const [loaded, setLoaded] = React.useState(false);\n React.useEffect(() => {\n if (!src && !srcSet) {\n return undefined;\n }\n setLoaded(false);\n let active = true;\n const image = new Image();\n image.onload = () => {\n if (!active) {\n return;\n }\n setLoaded('loaded');\n };\n image.onerror = () => {\n if (!active) {\n return;\n }\n setLoaded('error');\n };\n image.crossOrigin = crossOrigin;\n image.referrerPolicy = referrerPolicy;\n image.src = src;\n if (srcSet) {\n image.srcset = srcSet;\n }\n return () => {\n active = false;\n };\n }, [crossOrigin, referrerPolicy, src, srcSet]);\n return loaded;\n}\nconst Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiAvatar'\n });\n const {\n alt,\n children: childrenProp,\n className,\n component = 'div',\n slots = {},\n slotProps = {},\n imgProps,\n sizes,\n src,\n srcSet,\n variant = 'circular',\n ...other\n } = props;\n let children = null;\n\n // Use a hook instead of onError on the img element to support server-side rendering.\n const loaded = useLoaded({\n ...imgProps,\n src,\n srcSet\n });\n const hasImg = src || srcSet;\n const hasImgNotFailing = hasImg && loaded !== 'error';\n const ownerState = {\n ...props,\n colorDefault: !hasImgNotFailing,\n component,\n variant\n };\n // This issue explains why this is required: https://github.com/mui/material-ui/issues/42184\n delete ownerState.ownerState;\n const classes = useUtilityClasses(ownerState);\n const [ImgSlot, imgSlotProps] = useSlot('img', {\n className: classes.img,\n elementType: AvatarImg,\n externalForwardedProps: {\n slots,\n slotProps: {\n img: {\n ...imgProps,\n ...slotProps.img\n }\n }\n },\n additionalProps: {\n alt,\n src,\n srcSet,\n sizes\n },\n ownerState\n });\n if (hasImgNotFailing) {\n children = /*#__PURE__*/_jsx(ImgSlot, {\n ...imgSlotProps\n });\n // We only render valid children, non valid children are rendered with a fallback\n // We consider that invalid children are all falsy values, except 0, which is valid.\n } else if (!!childrenProp || childrenProp === 0) {\n children = childrenProp;\n } else if (hasImg && alt) {\n children = alt[0];\n } else {\n children = /*#__PURE__*/_jsx(AvatarFallback, {\n ownerState: ownerState,\n className: classes.fallback\n });\n }\n return /*#__PURE__*/_jsx(AvatarRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n ownerState: ownerState,\n children: children\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Avatar.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Used in combination with `src` or `srcSet` to\n * provide an alt attribute for the rendered `img` element.\n */\n alt: PropTypes.string,\n /**\n * Used to render icon or text elements inside the Avatar if `src` is not set.\n * This can be an element, or just a string.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.\n * It can be used to listen for the loading error event.\n */\n imgProps: PropTypes.object,\n /**\n * The `sizes` attribute for the `img` element.\n */\n sizes: PropTypes.string,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n img: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n img: PropTypes.elementType\n }),\n /**\n * The `src` attribute for the `img` element.\n */\n src: PropTypes.string,\n /**\n * The `srcSet` attribute for the `img` element.\n * Use this attribute for responsive image display.\n */\n srcSet: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The shape of the avatar.\n * @default 'circular'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['circular', 'rounded', 'square']), PropTypes.string])\n} : void 0;\nexport default Avatar;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getAvatarUtilityClass(slot) {\n return generateUtilityClass('MuiAvatar', slot);\n}\nconst avatarClasses = generateUtilityClasses('MuiAvatar', ['root', 'colorDefault', 'circular', 'rounded', 'square', 'img', 'fallback']);\nexport default avatarClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getBackdropUtilityClass(slot) {\n return generateUtilityClass('MuiBackdrop', slot);\n}\nconst backdropClasses = generateUtilityClasses('MuiBackdrop', ['root', 'invisible']);\nexport default backdropClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport Fade from \"../Fade/index.js\";\nimport { getBackdropUtilityClass } from \"./backdropClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n invisible\n } = ownerState;\n const slots = {\n root: ['root', invisible && 'invisible']\n };\n return composeClasses(slots, getBackdropUtilityClass, classes);\n};\nconst BackdropRoot = styled('div', {\n name: 'MuiBackdrop',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.invisible && styles.invisible];\n }\n})({\n position: 'fixed',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n WebkitTapHighlightColor: 'transparent',\n variants: [{\n props: {\n invisible: true\n },\n style: {\n backgroundColor: 'transparent'\n }\n }]\n});\nconst Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiBackdrop'\n });\n const {\n children,\n className,\n component = 'div',\n invisible = false,\n open,\n components = {},\n componentsProps = {},\n slotProps = {},\n slots = {},\n TransitionComponent: TransitionComponentProp,\n transitionDuration,\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n invisible\n };\n const classes = useUtilityClasses(ownerState);\n const backwardCompatibleSlots = {\n transition: TransitionComponentProp,\n root: components.Root,\n ...slots\n };\n const backwardCompatibleSlotProps = {\n ...componentsProps,\n ...slotProps\n };\n const externalForwardedProps = {\n slots: backwardCompatibleSlots,\n slotProps: backwardCompatibleSlotProps\n };\n const [RootSlot, rootProps] = useSlot('root', {\n elementType: BackdropRoot,\n externalForwardedProps,\n className: clsx(classes.root, className),\n ownerState\n });\n const [TransitionSlot, transitionProps] = useSlot('transition', {\n elementType: Fade,\n externalForwardedProps,\n ownerState\n });\n delete transitionProps.ownerState;\n return /*#__PURE__*/_jsx(TransitionSlot, {\n in: open,\n timeout: transitionDuration,\n ...other,\n ...transitionProps,\n children: /*#__PURE__*/_jsx(RootSlot, {\n \"aria-hidden\": true,\n ...rootProps,\n classes: classes,\n ref: ref,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Backdrop.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.object\n }),\n /**\n * If `true`, the backdrop is invisible.\n * It can be used when rendering a popover or a custom select component.\n * @default false\n */\n invisible: PropTypes.bool,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Fade\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Backdrop;","'use client';\n\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport styled from '@mui/styled-engine';\nimport styleFunctionSx, { extendSxProp } from \"../styleFunctionSx/index.js\";\nimport useTheme from \"../useTheme/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createBox(options = {}) {\n const {\n themeId,\n defaultTheme,\n defaultClassName = 'MuiBox-root',\n generateClassName\n } = options;\n const BoxRoot = styled('div', {\n shouldForwardProp: prop => prop !== 'theme' && prop !== 'sx' && prop !== 'as'\n })(styleFunctionSx);\n const Box = /*#__PURE__*/React.forwardRef(function Box(inProps, ref) {\n const theme = useTheme(defaultTheme);\n const {\n className,\n component = 'div',\n ...other\n } = extendSxProp(inProps);\n return /*#__PURE__*/_jsx(BoxRoot, {\n as: component,\n ref: ref,\n className: clsx(className, generateClassName ? generateClassName(defaultClassName) : defaultClassName),\n theme: themeId ? theme[themeId] || theme : theme,\n ...other\n });\n });\n return Box;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nconst boxClasses = generateUtilityClasses('MuiBox', ['root']);\nexport default boxClasses;","'use client';\n\nimport { createBox } from '@mui/system';\nimport PropTypes from 'prop-types';\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from \"../className/index.js\";\nimport { createTheme } from \"../styles/index.js\";\nimport THEME_ID from \"../styles/identifier.js\";\nimport boxClasses from \"./boxClasses.js\";\nconst defaultTheme = createTheme();\nconst Box = createBox({\n themeId: THEME_ID,\n defaultTheme,\n defaultClassName: boxClasses.root,\n generateClassName: ClassNameGenerator.generate\n});\nprocess.env.NODE_ENV !== \"production\" ? Box.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Box;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonUtilityClass(slot) {\n return generateUtilityClass('MuiButton', slot);\n}\nconst buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);\nexport default buttonClasses;","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst ButtonGroupContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ButtonGroupContext.displayName = 'ButtonGroupContext';\n}\nexport default ButtonGroupContext;","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';\n}\nexport default ButtonGroupButtonContext;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport resolveProps from '@mui/utils/resolveProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport buttonClasses, { getButtonUtilityClass } from \"./buttonClasses.js\";\nimport ButtonGroupContext from \"../ButtonGroup/ButtonGroupContext.js\";\nimport ButtonGroupButtonContext from \"../ButtonGroup/ButtonGroupButtonContext.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth'],\n label: ['label'],\n startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],\n endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`]\n };\n const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);\n return {\n ...classes,\n // forward the focused, disabled, etc. classes to the ButtonBase\n ...composedClasses\n };\n};\nconst commonIconStyles = [{\n props: {\n size: 'small'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n }\n}, {\n props: {\n size: 'medium'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n }\n}, {\n props: {\n size: 'large'\n },\n style: {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n }\n}];\nconst ButtonRoot = styled(ButtonBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color)}`], styles[`size${capitalize(ownerState.size)}`], styles[`${ownerState.variant}Size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];\n }\n})(memoTheme(({\n theme\n}) => {\n const inheritContainedBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey[300] : theme.palette.grey[800];\n const inheritContainedHoverBackgroundColor = theme.palette.mode === 'light' ? theme.palette.grey.A100 : theme.palette.grey[700];\n return {\n ...theme.typography.button,\n minWidth: 64,\n padding: '6px 16px',\n border: 0,\n borderRadius: (theme.vars || theme).shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n textDecoration: 'none'\n },\n [`&.${buttonClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n },\n variants: [{\n props: {\n variant: 'contained'\n },\n style: {\n color: `var(--variant-containedColor)`,\n backgroundColor: `var(--variant-containedBg)`,\n boxShadow: (theme.vars || theme).shadows[2],\n '&:hover': {\n boxShadow: (theme.vars || theme).shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: (theme.vars || theme).shadows[2]\n }\n },\n '&:active': {\n boxShadow: (theme.vars || theme).shadows[8]\n },\n [`&.${buttonClasses.focusVisible}`]: {\n boxShadow: (theme.vars || theme).shadows[6]\n },\n [`&.${buttonClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled,\n boxShadow: (theme.vars || theme).shadows[0],\n backgroundColor: (theme.vars || theme).palette.action.disabledBackground\n }\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n padding: '5px 15px',\n border: '1px solid currentColor',\n borderColor: `var(--variant-outlinedBorder, currentColor)`,\n backgroundColor: `var(--variant-outlinedBg)`,\n color: `var(--variant-outlinedColor)`,\n [`&.${buttonClasses.disabled}`]: {\n border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`\n }\n }\n }, {\n props: {\n variant: 'text'\n },\n style: {\n padding: '6px 8px',\n color: `var(--variant-textColor)`,\n backgroundColor: `var(--variant-textBg)`\n }\n }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main && palette.dark && palette.contrastText).map(([color]) => ({\n props: {\n color\n },\n style: {\n '--variant-textColor': (theme.vars || theme).palette[color].main,\n '--variant-outlinedColor': (theme.vars || theme).palette[color].main,\n '--variant-outlinedBorder': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.5)` : alpha(theme.palette[color].main, 0.5),\n '--variant-containedColor': (theme.vars || theme).palette[color].contrastText,\n '--variant-containedBg': (theme.vars || theme).palette[color].main,\n '@media (hover: hover)': {\n '&:hover': {\n '--variant-containedBg': (theme.vars || theme).palette[color].dark,\n '--variant-textBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity),\n '--variant-outlinedBorder': (theme.vars || theme).palette[color].main,\n '--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)\n }\n }\n }\n })), {\n props: {\n color: 'inherit'\n },\n style: {\n '--variant-containedColor': theme.vars ?\n // this is safe because grey does not change between default light/dark mode\n theme.vars.palette.text.primary : theme.palette.getContrastText?.(inheritContainedBackgroundColor),\n '--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedBg : inheritContainedBackgroundColor,\n '@media (hover: hover)': {\n '&:hover': {\n '--variant-containedBg': theme.vars ? theme.vars.palette.Button.inheritContainedHoverBg : inheritContainedHoverBackgroundColor,\n '--variant-textBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n '--variant-outlinedBg': theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.text.primary, theme.palette.action.hoverOpacity)\n }\n }\n }\n }, {\n props: {\n size: 'small',\n variant: 'text'\n },\n style: {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'text'\n },\n style: {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n size: 'small',\n variant: 'outlined'\n },\n style: {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'outlined'\n },\n style: {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n size: 'small',\n variant: 'contained'\n },\n style: {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n }\n }, {\n props: {\n size: 'large',\n variant: 'contained'\n },\n style: {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n }\n }, {\n props: {\n disableElevation: true\n },\n style: {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${buttonClasses.disabled}`]: {\n boxShadow: 'none'\n }\n }\n }, {\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }]\n };\n}));\nconst ButtonStartIcon = styled('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4,\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginLeft: -2\n }\n }, ...commonIconStyles]\n});\nconst ButtonEndIcon = styled('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, styles[`iconSize${capitalize(ownerState.size)}`]];\n }\n})({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8,\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginRight: -2\n }\n }, ...commonIconStyles]\n});\nconst Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {\n // props priority: `inProps` > `contextProps` > `themeDefaultProps`\n const contextProps = React.useContext(ButtonGroupContext);\n const buttonGroupButtonContextPositionClassName = React.useContext(ButtonGroupButtonContext);\n const resolvedProps = resolveProps(contextProps, inProps);\n const props = useDefaultProps({\n props: resolvedProps,\n name: 'MuiButton'\n });\n const {\n children,\n color = 'primary',\n component = 'button',\n className,\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n size,\n type,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const startIcon = startIconProp && /*#__PURE__*/_jsx(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp\n });\n const endIcon = endIconProp && /*#__PURE__*/_jsx(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp\n });\n const positionClassName = buttonGroupButtonContextPositionClassName || '';\n return /*#__PURE__*/_jsxs(ButtonRoot, {\n ownerState: ownerState,\n className: clsx(contextProps.className, classes.root, className, positionClassName),\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type,\n ...other,\n classes: classes,\n children: [startIcon, children, endIcon]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Button.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * Element placed after the children.\n */\n endIcon: PropTypes.node,\n /**\n * @ignore\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: PropTypes.string,\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n /**\n * Element placed before the children.\n */\n startIcon: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string]),\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'outlined', 'text']), PropTypes.string])\n} : void 0;\nexport default Button;","'use client';\n\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\n/**\n * Lazy initialization container for the Ripple instance. This improves\n * performance by delaying mounting the ripple until it's needed.\n */\nexport class LazyRipple {\n /** React ref to the ripple instance */\n\n /** If the ripple component should be mounted */\n\n /** Promise that resolves when the ripple component is mounted */\n\n /** If the ripple component has been mounted */\n\n /** React state hook setter */\n\n static create() {\n return new LazyRipple();\n }\n static use() {\n /* eslint-disable */\n const ripple = useLazyRef(LazyRipple.create).current;\n const [shouldMount, setShouldMount] = React.useState(false);\n ripple.shouldMount = shouldMount;\n ripple.setShouldMount = setShouldMount;\n React.useEffect(ripple.mountEffect, [shouldMount]);\n /* eslint-enable */\n\n return ripple;\n }\n constructor() {\n this.ref = {\n current: null\n };\n this.mounted = null;\n this.didMount = false;\n this.shouldMount = false;\n this.setShouldMount = null;\n }\n mount() {\n if (!this.mounted) {\n this.mounted = createControlledPromise();\n this.shouldMount = true;\n this.setShouldMount(this.shouldMount);\n }\n return this.mounted;\n }\n mountEffect = () => {\n if (this.shouldMount && !this.didMount) {\n if (this.ref.current !== null) {\n this.didMount = true;\n this.mounted.resolve();\n }\n }\n };\n\n /* Ripple API */\n\n start(...args) {\n this.mount().then(() => this.ref.current?.start(...args));\n }\n stop(...args) {\n this.mount().then(() => this.ref.current?.stop(...args));\n }\n pulsate(...args) {\n this.mount().then(() => this.ref.current?.pulsate(...args));\n }\n}\nexport default function useLazyRipple() {\n return LazyRipple.use();\n}\nfunction createControlledPromise() {\n let resolve;\n let reject;\n const p = new Promise((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n p.resolve = resolve;\n p.reject = reject;\n return p;\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Ripple(props) {\n const {\n className,\n classes,\n pulsate = false,\n rippleX,\n rippleY,\n rippleSize,\n in: inProp,\n onExited,\n timeout\n } = props;\n const [leaving, setLeaving] = React.useState(false);\n const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n const rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n if (!inProp && !leaving) {\n setLeaving(true);\n }\n React.useEffect(() => {\n if (!inProp && onExited != null) {\n // react-transition-group#onExited\n const timeoutId = setTimeout(onExited, timeout);\n return () => {\n clearTimeout(timeoutId);\n };\n }\n return undefined;\n }, [onExited, inProp, timeout]);\n return /*#__PURE__*/_jsx(\"span\", {\n className: rippleClassName,\n style: rippleStyles,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: childClassName\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes /* remove-proptypes */ = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTouchRippleUtilityClass(slot) {\n return generateUtilityClass('MuiTouchRipple', slot);\n}\nconst touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);\nexport default touchRippleClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Ripple from \"./Ripple.js\";\nimport touchRippleClasses from \"./touchRippleClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n`;\nconst exitKeyframe = keyframes`\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n`;\nconst pulsateKeyframe = keyframes`\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n`;\nexport const TouchRippleRoot = styled('span', {\n name: 'MuiTouchRipple',\n slot: 'Root'\n})({\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n});\n\n// This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\nexport const TouchRippleRipple = styled(Ripple, {\n name: 'MuiTouchRipple',\n slot: 'Ripple'\n})`\n opacity: 0;\n position: absolute;\n\n &.${touchRippleClasses.rippleVisible} {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${({\n theme\n}) => theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.child} {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .${touchRippleClasses.childLeaving} {\n opacity: 0;\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n`;\n\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const {\n center: centerProp = false,\n classes = {},\n className,\n ...other\n } = props;\n const [ripples, setRipples] = React.useState([]);\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n React.useEffect(() => {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]);\n\n // Used to filter out mouse emulated events on mobile.\n const ignoringMouseDown = React.useRef(false);\n // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n const startTimer = useTimeout();\n\n // This is the hook called once the previous timeout is ready.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const startCommit = React.useCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n setRipples(oldRipples => [...oldRipples, /*#__PURE__*/_jsx(TouchRippleRipple, {\n classes: {\n ripple: clsx(classes.ripple, touchRippleClasses.ripple),\n rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),\n ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),\n child: clsx(classes.child, touchRippleClasses.child),\n childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),\n childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)\n },\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n }, nextKey.current)]);\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // For test purposes\n } = options;\n if (event?.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n if (event?.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n const element = fakeElement ? null : container.current;\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n\n // Get the size of the ripple\n let rippleX;\n let rippleY;\n let rippleSize;\n if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n const {\n clientX,\n clientY\n } = event.touches && event.touches.length > 0 ? event.touches[0] : event;\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // For some reason the animation is broken on Mobile Chrome if the size is even.\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);\n }\n\n // Touche devices\n if (event?.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\n // Delay the execution of the ripple effect.\n // We have to make a tradeoff with this delay value.\n startTimer.start(DELAY_RIPPLE, () => {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n });\n }\n } else {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }\n }, [centerProp, startCommit, startTimer]);\n const pulsate = React.useCallback(() => {\n start({}, {\n pulsate: true\n });\n }, [start]);\n const stop = React.useCallback((event, cb) => {\n startTimer.clear();\n\n // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n if (event?.type === 'touchend' && startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.start(0, () => {\n stop(event, cb);\n });\n return;\n }\n startTimerCommit.current = null;\n setRipples(oldRipples => {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, [startTimer]);\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: /*#__PURE__*/_jsx(TransitionGroup, {\n component: null,\n exit: true,\n children: ripples\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default TouchRipple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonBaseUtilityClass(slot) {\n return generateUtilityClass('MuiButtonBase', slot);\n}\nconst buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);\nexport default buttonBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useLazyRipple from \"../useLazyRipple/index.js\";\nimport TouchRipple from \"./TouchRipple.js\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native <a /> element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n },\n [`&.${buttonBaseClasses.disabled}`]: {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n});\n\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\nconst ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiButtonBase'\n });\n const {\n action,\n centerRipple = false,\n children,\n className,\n component = 'button',\n disabled = false,\n disableRipple = false,\n disableTouchRipple = false,\n focusRipple = false,\n focusVisibleClassName,\n LinkComponent = 'a',\n onBlur,\n onClick,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n tabIndex = 0,\n TouchRippleProps,\n touchRippleRef,\n type,\n ...other\n } = props;\n const buttonRef = React.useRef(null);\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), []);\n const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled;\n React.useEffect(() => {\n if (focusVisible && focusRipple && !disableRipple) {\n ripple.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible, ripple]);\n function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {\n return useEventCallback(event => {\n if (eventCallback) {\n eventCallback(event);\n }\n const ignore = skipRippleAction;\n if (!ignore) {\n ripple[rippleAction](event);\n }\n return true;\n });\n }\n const handleMouseDown = useRippleHandler('start', onMouseDown);\n const handleContextMenu = useRippleHandler('stop', onContextMenu);\n const handleDragLeave = useRippleHandler('stop', onDragLeave);\n const handleMouseUp = useRippleHandler('stop', onMouseUp);\n const handleMouseLeave = useRippleHandler('stop', event => {\n if (focusVisible) {\n event.preventDefault();\n }\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n });\n const handleTouchStart = useRippleHandler('start', onTouchStart);\n const handleTouchEnd = useRippleHandler('stop', onTouchEnd);\n const handleTouchMove = useRippleHandler('stop', onTouchMove);\n const handleBlur = useRippleHandler('stop', event => {\n if (!isFocusVisible(event.target)) {\n setFocusVisible(false);\n }\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n const handleFocus = useEventCallback(event => {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const isNonNativeButton = () => {\n const button = buttonRef.current;\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n const handleKeyDown = useEventCallback(event => {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !event.repeat && focusVisible && event.key === ' ') {\n ripple.stop(event, () => {\n ripple.start(event);\n });\n }\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n if (onClick) {\n onClick(event);\n }\n }\n });\n const handleKeyUp = useEventCallback(event => {\n // calling preventDefault in keyUp on a <button> will not dispatch a click event if Space is pressed\n // https://codesandbox.io/p/sandbox/button-keyup-preventdefault-dn7f0\n if (focusRipple && event.key === ' ' && focusVisible && !event.defaultPrevented) {\n ripple.stop(event, () => {\n ripple.pulsate(event);\n });\n }\n if (onKeyUp) {\n onKeyUp(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (onClick && event.target === event.currentTarget && isNonNativeButton() && event.key === ' ' && !event.defaultPrevented) {\n onClick(event);\n }\n });\n let ComponentProp = component;\n if (ComponentProp === 'button' && (other.href || other.to)) {\n ComponentProp = LinkComponent;\n }\n const buttonProps = {};\n if (ComponentProp === 'button') {\n buttonProps.type = type === undefined ? 'button' : type;\n buttonProps.disabled = disabled;\n } else {\n if (!other.href && !other.to) {\n buttonProps.role = 'button';\n }\n if (disabled) {\n buttonProps['aria-disabled'] = disabled;\n }\n }\n const handleRef = useForkRef(ref, buttonRef);\n const ownerState = {\n ...props,\n centerRipple,\n component,\n disabled,\n disableRipple,\n disableTouchRipple,\n focusRipple,\n tabIndex,\n focusVisible\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(ButtonBaseRoot, {\n as: ComponentProp,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n onBlur: handleBlur,\n onClick: onClick,\n onContextMenu: handleContextMenu,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n onMouseDown: handleMouseDown,\n onMouseLeave: handleMouseLeave,\n onMouseUp: handleMouseUp,\n onDragLeave: handleDragLeave,\n onTouchEnd: handleTouchEnd,\n onTouchMove: handleTouchMove,\n onTouchStart: handleTouchStart,\n ref: handleRef,\n tabIndex: disabled ? -1 : tabIndex,\n type: type,\n ...buttonProps,\n ...other,\n children: [children, enableTouchRipple ? /*#__PURE__*/_jsx(TouchRipple, {\n ref: handleRippleRef,\n center: centerRipple,\n ...TouchRippleProps\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ButtonBase.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: refType,\n /**\n * If `true`, the ripples are centered.\n * They won't start at the cursor interaction position.\n * @default false\n */\n centerRipple: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: elementTypeAcceptingRef,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If `true`, the touch ripple effect is disabled.\n * @default false\n */\n disableTouchRipple: PropTypes.bool,\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n * @default false\n */\n focusRipple: PropTypes.bool,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * @ignore\n */\n href: PropTypes /* @typescript-to-proptypes-ignore */.any,\n /**\n * The component used to render a link when the `href` prop is provided.\n * @default 'a'\n */\n LinkComponent: PropTypes.elementType,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * @ignore\n */\n onContextMenu: PropTypes.func,\n /**\n * @ignore\n */\n onDragLeave: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n /**\n * @ignore\n */\n onMouseDown: PropTypes.func,\n /**\n * @ignore\n */\n onMouseLeave: PropTypes.func,\n /**\n * @ignore\n */\n onMouseUp: PropTypes.func,\n /**\n * @ignore\n */\n onTouchEnd: PropTypes.func,\n /**\n * @ignore\n */\n onTouchMove: PropTypes.func,\n /**\n * @ignore\n */\n onTouchStart: PropTypes.func,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number,\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: PropTypes.object,\n /**\n * A ref that points to the `TouchRipple` element.\n */\n touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n pulsate: PropTypes.func.isRequired,\n start: PropTypes.func.isRequired,\n stop: PropTypes.func.isRequired\n })\n })]),\n /**\n * @ignore\n */\n type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'reset', 'submit']), PropTypes.string])\n} : void 0;\nexport default ButtonBase;","'use client';\n\nimport * as React from 'react';\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z\"\n}), 'Cancel');","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getChipUtilityClass(slot) {\n return generateUtilityClass('MuiChip', slot);\n}\nconst chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorDefault', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);\nexport default chipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport CancelIcon from \"../internal/svg-icons/Cancel.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport unsupportedProp from \"../utils/unsupportedProp.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport chipClasses, { getChipUtilityClass } from \"./chipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n size,\n color,\n iconColor,\n onDelete,\n clickable,\n variant\n } = ownerState;\n const slots = {\n root: ['root', variant, disabled && 'disabled', `size${capitalize(size)}`, `color${capitalize(color)}`, clickable && 'clickable', clickable && `clickableColor${capitalize(color)}`, onDelete && 'deletable', onDelete && `deletableColor${capitalize(color)}`, `${variant}${capitalize(color)}`],\n label: ['label', `label${capitalize(size)}`],\n avatar: ['avatar', `avatar${capitalize(size)}`, `avatarColor${capitalize(color)}`],\n icon: ['icon', `icon${capitalize(size)}`, `iconColor${capitalize(iconColor)}`],\n deleteIcon: ['deleteIcon', `deleteIcon${capitalize(size)}`, `deleteIconColor${capitalize(color)}`, `deleteIcon${capitalize(variant)}Color${capitalize(color)}`]\n };\n return composeClasses(slots, getChipUtilityClass, classes);\n};\nconst ChipRoot = styled('div', {\n name: 'MuiChip',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n const {\n color,\n iconColor,\n clickable,\n onDelete,\n size,\n variant\n } = ownerState;\n return [{\n [`& .${chipClasses.avatar}`]: styles.avatar\n }, {\n [`& .${chipClasses.avatar}`]: styles[`avatar${capitalize(size)}`]\n }, {\n [`& .${chipClasses.avatar}`]: styles[`avatarColor${capitalize(color)}`]\n }, {\n [`& .${chipClasses.icon}`]: styles.icon\n }, {\n [`& .${chipClasses.icon}`]: styles[`icon${capitalize(size)}`]\n }, {\n [`& .${chipClasses.icon}`]: styles[`iconColor${capitalize(iconColor)}`]\n }, {\n [`& .${chipClasses.deleteIcon}`]: styles.deleteIcon\n }, {\n [`& .${chipClasses.deleteIcon}`]: styles[`deleteIcon${capitalize(size)}`]\n }, {\n [`& .${chipClasses.deleteIcon}`]: styles[`deleteIconColor${capitalize(color)}`]\n }, {\n [`& .${chipClasses.deleteIcon}`]: styles[`deleteIcon${capitalize(variant)}Color${capitalize(color)}`]\n }, styles.root, styles[`size${capitalize(size)}`], styles[`color${capitalize(color)}`], clickable && styles.clickable, clickable && color !== 'default' && styles[`clickableColor${capitalize(color)})`], onDelete && styles.deletable, onDelete && color !== 'default' && styles[`deletableColor${capitalize(color)}`], styles[variant], styles[`${variant}${capitalize(color)}`]];\n }\n})(memoTheme(({\n theme\n}) => {\n const textColor = theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];\n return {\n maxWidth: '100%',\n fontFamily: theme.typography.fontFamily,\n fontSize: theme.typography.pxToRem(13),\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n height: 32,\n color: (theme.vars || theme).palette.text.primary,\n backgroundColor: (theme.vars || theme).palette.action.selected,\n borderRadius: 32 / 2,\n whiteSpace: 'nowrap',\n transition: theme.transitions.create(['background-color', 'box-shadow']),\n // reset cursor explicitly in case ButtonBase is used\n cursor: 'unset',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n textDecoration: 'none',\n border: 0,\n // Remove `button` border\n padding: 0,\n // Remove `button` padding\n verticalAlign: 'middle',\n boxSizing: 'border-box',\n [`&.${chipClasses.disabled}`]: {\n opacity: (theme.vars || theme).palette.action.disabledOpacity,\n pointerEvents: 'none'\n },\n [`& .${chipClasses.avatar}`]: {\n marginLeft: 5,\n marginRight: -6,\n width: 24,\n height: 24,\n color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,\n fontSize: theme.typography.pxToRem(12)\n },\n [`& .${chipClasses.avatarColorPrimary}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.dark\n },\n [`& .${chipClasses.avatarColorSecondary}`]: {\n color: (theme.vars || theme).palette.secondary.contrastText,\n backgroundColor: (theme.vars || theme).palette.secondary.dark\n },\n [`& .${chipClasses.avatarSmall}`]: {\n marginLeft: 4,\n marginRight: -4,\n width: 18,\n height: 18,\n fontSize: theme.typography.pxToRem(10)\n },\n [`& .${chipClasses.icon}`]: {\n marginLeft: 5,\n marginRight: -6\n },\n [`& .${chipClasses.deleteIcon}`]: {\n WebkitTapHighlightColor: 'transparent',\n color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : alpha(theme.palette.text.primary, 0.26),\n fontSize: 22,\n cursor: 'pointer',\n margin: '0 5px 0 -6px',\n '&:hover': {\n color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.4)` : alpha(theme.palette.text.primary, 0.4)\n }\n },\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n height: 24,\n [`& .${chipClasses.icon}`]: {\n fontSize: 18,\n marginLeft: 4,\n marginRight: -4\n },\n [`& .${chipClasses.deleteIcon}`]: {\n fontSize: 16,\n marginRight: 4,\n marginLeft: -4\n }\n }\n }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main && value.contrastText).map(([color]) => {\n return {\n props: {\n color\n },\n style: {\n backgroundColor: (theme.vars || theme).palette[color].main,\n color: (theme.vars || theme).palette[color].contrastText,\n [`& .${chipClasses.deleteIcon}`]: {\n color: theme.vars ? `rgba(${theme.vars.palette[color].contrastTextChannel} / 0.7)` : alpha(theme.palette[color].contrastText, 0.7),\n '&:hover, &:active': {\n color: (theme.vars || theme).palette[color].contrastText\n }\n }\n }\n };\n }), {\n props: props => props.iconColor === props.color,\n style: {\n [`& .${chipClasses.icon}`]: {\n color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor\n }\n }\n }, {\n props: props => props.iconColor === props.color && props.color !== 'default',\n style: {\n [`& .${chipClasses.icon}`]: {\n color: 'inherit'\n }\n }\n }, {\n props: {\n onDelete: true\n },\n style: {\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n }\n }, ...Object.entries(theme.palette).filter(([, value]) => value && value.dark).map(([color]) => {\n return {\n props: {\n color,\n onDelete: true\n },\n style: {\n [`&.${chipClasses.focusVisible}`]: {\n background: (theme.vars || theme).palette[color].dark\n }\n }\n };\n }), {\n props: {\n clickable: true\n },\n style: {\n userSelect: 'none',\n WebkitTapHighlightColor: 'transparent',\n cursor: 'pointer',\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)\n },\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n },\n '&:active': {\n boxShadow: (theme.vars || theme).shadows[1]\n }\n }\n }, ...Object.entries(theme.palette).filter(([, value]) => value && value.dark).map(([color]) => ({\n props: {\n color,\n clickable: true\n },\n style: {\n [`&:hover, &.${chipClasses.focusVisible}`]: {\n backgroundColor: (theme.vars || theme).palette[color].dark\n }\n }\n })), {\n props: {\n variant: 'outlined'\n },\n style: {\n backgroundColor: 'transparent',\n border: theme.vars ? `1px solid ${theme.vars.palette.Chip.defaultBorder}` : `1px solid ${theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700]}`,\n [`&.${chipClasses.clickable}:hover`]: {\n backgroundColor: (theme.vars || theme).palette.action.hover\n },\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: (theme.vars || theme).palette.action.focus\n },\n [`& .${chipClasses.avatar}`]: {\n marginLeft: 4\n },\n [`& .${chipClasses.avatarSmall}`]: {\n marginLeft: 2\n },\n [`& .${chipClasses.icon}`]: {\n marginLeft: 4\n },\n [`& .${chipClasses.iconSmall}`]: {\n marginLeft: 2\n },\n [`& .${chipClasses.deleteIcon}`]: {\n marginRight: 5\n },\n [`& .${chipClasses.deleteIconSmall}`]: {\n marginRight: 3\n }\n }\n }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // no need to check for mainChannel as it's calculated from main\n .map(([color]) => ({\n props: {\n variant: 'outlined',\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main,\n border: `1px solid ${theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.7)` : alpha(theme.palette[color].main, 0.7)}`,\n [`&.${chipClasses.clickable}:hover`]: {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)\n },\n [`&.${chipClasses.focusVisible}`]: {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette[color].main, theme.palette.action.focusOpacity)\n },\n [`& .${chipClasses.deleteIcon}`]: {\n color: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / 0.7)` : alpha(theme.palette[color].main, 0.7),\n '&:hover, &:active': {\n color: (theme.vars || theme).palette[color].main\n }\n }\n }\n }))]\n };\n}));\nconst ChipLabel = styled('span', {\n name: 'MuiChip',\n slot: 'Label',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n const {\n size\n } = ownerState;\n return [styles.label, styles[`label${capitalize(size)}`]];\n }\n})({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n paddingLeft: 12,\n paddingRight: 12,\n whiteSpace: 'nowrap',\n variants: [{\n props: {\n variant: 'outlined'\n },\n style: {\n paddingLeft: 11,\n paddingRight: 11\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n paddingLeft: 8,\n paddingRight: 8\n }\n }, {\n props: {\n size: 'small',\n variant: 'outlined'\n },\n style: {\n paddingLeft: 7,\n paddingRight: 7\n }\n }]\n});\nfunction isDeleteKeyboardEvent(keyboardEvent) {\n return keyboardEvent.key === 'Backspace' || keyboardEvent.key === 'Delete';\n}\n\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n */\nconst Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiChip'\n });\n const {\n avatar: avatarProp,\n className,\n clickable: clickableProp,\n color = 'default',\n component: ComponentProp,\n deleteIcon: deleteIconProp,\n disabled = false,\n icon: iconProp,\n label,\n onClick,\n onDelete,\n onKeyDown,\n onKeyUp,\n size = 'medium',\n variant = 'filled',\n tabIndex,\n skipFocusWhenDisabled = false,\n // TODO v6: Rename to `focusableWhenDisabled`.\n ...other\n } = props;\n const chipRef = React.useRef(null);\n const handleRef = useForkRef(chipRef, ref);\n const handleDeleteIconClick = event => {\n // Stop the event from bubbling up to the `Chip`\n event.stopPropagation();\n if (onDelete) {\n onDelete(event);\n }\n };\n const handleKeyDown = event => {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target && isDeleteKeyboardEvent(event)) {\n // Will be handled in keyUp, otherwise some browsers\n // might init navigation\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleKeyUp = event => {\n // Ignore events from children of `Chip`.\n if (event.currentTarget === event.target) {\n if (onDelete && isDeleteKeyboardEvent(event)) {\n onDelete(event);\n }\n }\n if (onKeyUp) {\n onKeyUp(event);\n }\n };\n const clickable = clickableProp !== false && onClick ? true : clickableProp;\n const component = clickable || onDelete ? ButtonBase : ComponentProp || 'div';\n const ownerState = {\n ...props,\n component,\n disabled,\n size,\n color,\n iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,\n onDelete: !!onDelete,\n clickable,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const moreProps = component === ButtonBase ? {\n component: ComponentProp || 'div',\n focusVisibleClassName: classes.focusVisible,\n ...(onDelete && {\n disableRipple: true\n })\n } : {};\n let deleteIcon = null;\n if (onDelete) {\n deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? ( /*#__PURE__*/React.cloneElement(deleteIconProp, {\n className: clsx(deleteIconProp.props.className, classes.deleteIcon),\n onClick: handleDeleteIconClick\n })) : /*#__PURE__*/_jsx(CancelIcon, {\n className: clsx(classes.deleteIcon),\n onClick: handleDeleteIconClick\n });\n }\n let avatar = null;\n if (avatarProp && /*#__PURE__*/React.isValidElement(avatarProp)) {\n avatar = /*#__PURE__*/React.cloneElement(avatarProp, {\n className: clsx(classes.avatar, avatarProp.props.className)\n });\n }\n let icon = null;\n if (iconProp && /*#__PURE__*/React.isValidElement(iconProp)) {\n icon = /*#__PURE__*/React.cloneElement(iconProp, {\n className: clsx(classes.icon, iconProp.props.className)\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n if (avatar && icon) {\n console.error('MUI: The Chip component can not handle the avatar ' + 'and the icon prop at the same time. Pick one.');\n }\n }\n return /*#__PURE__*/_jsxs(ChipRoot, {\n as: component,\n className: clsx(classes.root, className),\n disabled: clickable && disabled ? true : undefined,\n onClick: onClick,\n onKeyDown: handleKeyDown,\n onKeyUp: handleKeyUp,\n ref: handleRef,\n tabIndex: skipFocusWhenDisabled && disabled ? -1 : tabIndex,\n ownerState: ownerState,\n ...moreProps,\n ...other,\n children: [avatar || icon, /*#__PURE__*/_jsx(ChipLabel, {\n className: clsx(classes.label),\n ownerState: ownerState,\n children: label\n }), deleteIcon]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Chip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The Avatar element to display.\n */\n avatar: PropTypes.element,\n /**\n * This prop isn't supported.\n * Use the `component` prop if you need to change the children structure.\n */\n children: unsupportedProp,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the chip will appear clickable, and will raise when pressed,\n * even if the onClick prop is not defined.\n * If `false`, the chip will not appear clickable, even if onClick prop is defined.\n * This can be used, for example,\n * along with the component prop to indicate an anchor Chip is clickable.\n * Note: this controls the UI and does not affect the onClick event.\n */\n clickable: PropTypes.bool,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'default'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Override the default delete icon element. Shown only if `onDelete` is set.\n */\n deleteIcon: PropTypes.element,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * Icon element.\n */\n icon: PropTypes.element,\n /**\n * The content of the component.\n */\n label: PropTypes.node,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * Callback fired when the delete icon is clicked.\n * If set, the delete icon will be shown.\n */\n onDelete: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * If `true`, allows the disabled chip to escape focus.\n * If `false`, allows the disabled chip to receive focus.\n * @default false\n */\n skipFocusWhenDisabled: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @ignore\n */\n tabIndex: PropTypes.number,\n /**\n * The variant to use.\n * @default 'filled'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Chip;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getCircularProgressUtilityClass(slot) {\n return generateUtilityClass('MuiCircularProgress', slot);\n}\nconst circularProgressClasses = generateUtilityClasses('MuiCircularProgress', ['root', 'determinate', 'indeterminate', 'colorPrimary', 'colorSecondary', 'svg', 'circle', 'circleDeterminate', 'circleIndeterminate', 'circleDisableShrink']);\nexport default circularProgressClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { keyframes, css, styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport { getCircularProgressUtilityClass } from \"./circularProgressClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst SIZE = 44;\nconst circularRotateKeyframe = keyframes`\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n`;\nconst circularDashKeyframe = keyframes`\n 0% {\n stroke-dasharray: 1px, 200px;\n stroke-dashoffset: 0;\n }\n\n 50% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -15px;\n }\n\n 100% {\n stroke-dasharray: 100px, 200px;\n stroke-dashoffset: -125px;\n }\n`;\n\n// This implementation is for supporting both Styled-components v4+ and Pigment CSS.\n// A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).\n// which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).\nconst rotateAnimation = typeof circularRotateKeyframe !== 'string' ? css`\n animation: ${circularRotateKeyframe} 1.4s linear infinite;\n ` : null;\nconst dashAnimation = typeof circularDashKeyframe !== 'string' ? css`\n animation: ${circularDashKeyframe} 1.4s ease-in-out infinite;\n ` : null;\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n color,\n disableShrink\n } = ownerState;\n const slots = {\n root: ['root', variant, `color${capitalize(color)}`],\n svg: ['svg'],\n circle: ['circle', `circle${capitalize(variant)}`, disableShrink && 'circleDisableShrink']\n };\n return composeClasses(slots, getCircularProgressUtilityClass, classes);\n};\nconst CircularProgressRoot = styled('span', {\n name: 'MuiCircularProgress',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`color${capitalize(ownerState.color)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-block',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('transform')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: rotateAnimation || {\n animation: `${circularRotateKeyframe} 1.4s linear infinite`\n }\n }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n }))]\n})));\nconst CircularProgressSVG = styled('svg', {\n name: 'MuiCircularProgress',\n slot: 'Svg',\n overridesResolver: (props, styles) => styles.svg\n})({\n display: 'block' // Keeps the progress centered\n});\nconst CircularProgressCircle = styled('circle', {\n name: 'MuiCircularProgress',\n slot: 'Circle',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.circle, styles[`circle${capitalize(ownerState.variant)}`], ownerState.disableShrink && styles.circleDisableShrink];\n }\n})(memoTheme(({\n theme\n}) => ({\n stroke: 'currentColor',\n variants: [{\n props: {\n variant: 'determinate'\n },\n style: {\n transition: theme.transitions.create('stroke-dashoffset')\n }\n }, {\n props: {\n variant: 'indeterminate'\n },\n style: {\n // Some default value that looks fine waiting for the animation to kicks in.\n strokeDasharray: '80px, 200px',\n strokeDashoffset: 0 // Add the unit to fix a Edge 16 and below bug.\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.variant === 'indeterminate' && !ownerState.disableShrink,\n style: dashAnimation || {\n // At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.\n animation: `${circularDashKeyframe} 1.4s ease-in-out infinite`\n }\n }]\n})));\n\n/**\n * ## ARIA\n *\n * If the progress bar is describing the loading progress of a particular region of a page,\n * you should use `aria-describedby` to point to the progress bar, and set the `aria-busy`\n * attribute to `true` on that region until it has finished loading.\n */\nconst CircularProgress = /*#__PURE__*/React.forwardRef(function CircularProgress(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiCircularProgress'\n });\n const {\n className,\n color = 'primary',\n disableShrink = false,\n size = 40,\n style,\n thickness = 3.6,\n value = 0,\n variant = 'indeterminate',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n disableShrink,\n size,\n thickness,\n value,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const circleStyle = {};\n const rootStyle = {};\n const rootProps = {};\n if (variant === 'determinate') {\n const circumference = 2 * Math.PI * ((SIZE - thickness) / 2);\n circleStyle.strokeDasharray = circumference.toFixed(3);\n rootProps['aria-valuenow'] = Math.round(value);\n circleStyle.strokeDashoffset = `${((100 - value) / 100 * circumference).toFixed(3)}px`;\n rootStyle.transform = 'rotate(-90deg)';\n }\n return /*#__PURE__*/_jsx(CircularProgressRoot, {\n className: clsx(classes.root, className),\n style: {\n width: size,\n height: size,\n ...rootStyle,\n ...style\n },\n ownerState: ownerState,\n ref: ref,\n role: \"progressbar\",\n ...rootProps,\n ...other,\n children: /*#__PURE__*/_jsx(CircularProgressSVG, {\n className: classes.svg,\n ownerState: ownerState,\n viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,\n children: /*#__PURE__*/_jsx(CircularProgressCircle, {\n className: classes.circle,\n style: circleStyle,\n ownerState: ownerState,\n cx: SIZE,\n cy: SIZE,\n r: (SIZE - thickness) / 2,\n fill: \"none\",\n strokeWidth: thickness\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? CircularProgress.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the shrink animation is disabled.\n * This only works if variant is `indeterminate`.\n * @default false\n */\n disableShrink: chainPropTypes(PropTypes.bool, props => {\n if (props.disableShrink && props.variant && props.variant !== 'indeterminate') {\n return new Error('MUI: You have provided the `disableShrink` prop ' + 'with a variant other than `indeterminate`. This will have no effect.');\n }\n return null;\n }),\n /**\n * The size of the component.\n * If using a number, the pixel unit is assumed.\n * If using a string, you need to provide the CSS unit, for example '3rem'.\n * @default 40\n */\n size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The thickness of the circle.\n * @default 3.6\n */\n thickness: PropTypes.number,\n /**\n * The value of the progress indicator for the determinate variant.\n * Value between 0 and 100.\n * @default 0\n */\n value: PropTypes.number,\n /**\n * The variant to use.\n * Use indeterminate when there is no progress value.\n * @default 'indeterminate'\n */\n variant: PropTypes.oneOf(['determinate', 'indeterminate'])\n} : void 0;\nexport default CircularProgress;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport useThemePropsSystem from \"../useThemeProps/index.js\";\nimport systemStyled from \"../styled/index.js\";\nimport createTheme from \"../createTheme/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst defaultTheme = createTheme();\nconst defaultCreateStyledComponent = systemStyled('div', {\n name: 'MuiContainer',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];\n }\n});\nconst useThemePropsDefault = inProps => useThemePropsSystem({\n props: inProps,\n name: 'MuiContainer',\n defaultTheme\n});\nconst useUtilityClasses = (ownerState, componentName) => {\n const getContainerUtilityClass = slot => {\n return generateUtilityClass(componentName, slot);\n };\n const {\n classes,\n fixed,\n disableGutters,\n maxWidth\n } = ownerState;\n const slots = {\n root: ['root', maxWidth && `maxWidth${capitalize(String(maxWidth))}`, fixed && 'fixed', disableGutters && 'disableGutters']\n };\n return composeClasses(slots, getContainerUtilityClass, classes);\n};\nexport default function createContainer(options = {}) {\n const {\n // This will allow adding custom styled fn (for example for custom sx style function)\n createStyledComponent = defaultCreateStyledComponent,\n useThemeProps = useThemePropsDefault,\n componentName = 'MuiContainer'\n } = options;\n const ContainerRoot = createStyledComponent(({\n theme,\n ownerState\n }) => ({\n width: '100%',\n marginLeft: 'auto',\n boxSizing: 'border-box',\n marginRight: 'auto',\n ...(!ownerState.disableGutters && {\n paddingLeft: theme.spacing(2),\n paddingRight: theme.spacing(2),\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up('sm')]: {\n paddingLeft: theme.spacing(3),\n paddingRight: theme.spacing(3)\n }\n })\n }), ({\n theme,\n ownerState\n }) => ownerState.fixed && Object.keys(theme.breakpoints.values).reduce((acc, breakpointValueKey) => {\n const breakpoint = breakpointValueKey;\n const value = theme.breakpoints.values[breakpoint];\n if (value !== 0) {\n // @ts-ignore\n acc[theme.breakpoints.up(breakpoint)] = {\n maxWidth: `${value}${theme.breakpoints.unit}`\n };\n }\n return acc;\n }, {}), ({\n theme,\n ownerState\n }) => ({\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ...(ownerState.maxWidth === 'xs' && {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up('xs')]: {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n maxWidth: Math.max(theme.breakpoints.values.xs, 444)\n }\n }),\n ...(ownerState.maxWidth &&\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ownerState.maxWidth !== 'xs' && {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n [theme.breakpoints.up(ownerState.maxWidth)]: {\n // @ts-ignore module augmentation fails if custom breakpoints are used\n maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`\n }\n })\n }));\n const Container = /*#__PURE__*/React.forwardRef(function Container(inProps, ref) {\n const props = useThemeProps(inProps);\n const {\n className,\n component = 'div',\n disableGutters = false,\n fixed = false,\n maxWidth = 'lg',\n classes: classesProp,\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n disableGutters,\n fixed,\n maxWidth\n };\n\n // @ts-ignore module augmentation fails if custom breakpoints are used\n const classes = useUtilityClasses(ownerState, componentName);\n return (\n /*#__PURE__*/\n // @ts-ignore theme is injected by the styled util\n _jsx(ContainerRoot, {\n as: component\n // @ts-ignore module augmentation fails if custom breakpoints are used\n ,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other\n })\n );\n });\n process.env.NODE_ENV !== \"production\" ? Container.propTypes /* remove-proptypes */ = {\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n component: PropTypes.elementType,\n disableGutters: PropTypes.bool,\n fixed: PropTypes.bool,\n maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n } : void 0;\n return Container;\n}","'use client';\n\nimport PropTypes from 'prop-types';\nimport { createContainer } from '@mui/system';\nimport capitalize from \"../utils/capitalize.js\";\nimport styled from \"../styles/styled.js\";\nimport useThemeProps from \"../styles/useThemeProps.js\";\nconst Container = createContainer({\n createStyledComponent: styled('div', {\n name: 'MuiContainer',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`maxWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fixed && styles.fixed, ownerState.disableGutters && styles.disableGutters];\n }\n }),\n useThemeProps: inProps => useThemeProps({\n props: inProps,\n name: 'MuiContainer'\n })\n});\nprocess.env.NODE_ENV !== \"production\" ? Container.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * Set the max-width to match the min-width of the current breakpoint.\n * This is useful if you'd prefer to design for a fixed set of sizes\n * instead of trying to accommodate a fully fluid viewport.\n * It's fluid by default.\n * @default false\n */\n fixed: PropTypes.bool,\n /**\n * Determine the max-width of the container.\n * The container width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n * @default 'lg'\n */\n maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Container;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport SystemDefaultPropsProvider, { useDefaultProps as useSystemDefaultProps } from '@mui/system/DefaultPropsProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/_jsx(SystemDefaultPropsProvider, {\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object.isRequired\n} : void 0;\nexport default DefaultPropsProvider;\nexport function useDefaultProps(params) {\n return useSystemDefaultProps(params);\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport capitalize from \"../utils/capitalize.js\";\nimport Modal from \"../Modal/index.js\";\nimport Fade from \"../Fade/index.js\";\nimport Paper from \"../Paper/index.js\";\nimport dialogClasses, { getDialogUtilityClass } from \"./dialogClasses.js\";\nimport DialogContext from \"./DialogContext.js\";\nimport Backdrop from \"../Backdrop/index.js\";\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DialogBackdrop = styled(Backdrop, {\n name: 'MuiDialog',\n slot: 'Backdrop',\n overrides: (props, styles) => styles.backdrop\n})({\n // Improve scrollable dialog support.\n zIndex: -1\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n scroll,\n maxWidth,\n fullWidth,\n fullScreen\n } = ownerState;\n const slots = {\n root: ['root'],\n container: ['container', `scroll${capitalize(scroll)}`],\n paper: ['paper', `paperScroll${capitalize(scroll)}`, `paperWidth${capitalize(String(maxWidth))}`, fullWidth && 'paperFullWidth', fullScreen && 'paperFullScreen']\n };\n return composeClasses(slots, getDialogUtilityClass, classes);\n};\nconst DialogRoot = styled(Modal, {\n name: 'MuiDialog',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n '@media print': {\n // Use !important to override the Modal inline-style.\n position: 'absolute !important'\n }\n});\nconst DialogContainer = styled('div', {\n name: 'MuiDialog',\n slot: 'Container',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.container, styles[`scroll${capitalize(ownerState.scroll)}`]];\n }\n})({\n height: '100%',\n '@media print': {\n height: 'auto'\n },\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n variants: [{\n props: {\n scroll: 'paper'\n },\n style: {\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n }\n }, {\n props: {\n scroll: 'body'\n },\n style: {\n overflowY: 'auto',\n overflowX: 'hidden',\n textAlign: 'center',\n '&::after': {\n content: '\"\"',\n display: 'inline-block',\n verticalAlign: 'middle',\n height: '100%',\n width: '0'\n }\n }\n }]\n});\nconst DialogPaper = styled(Paper, {\n name: 'MuiDialog',\n slot: 'Paper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.paper, styles[`scrollPaper${capitalize(ownerState.scroll)}`], styles[`paperWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fullWidth && styles.paperFullWidth, ownerState.fullScreen && styles.paperFullScreen];\n }\n})(memoTheme(({\n theme\n}) => ({\n margin: 32,\n position: 'relative',\n '@media print': {\n overflowY: 'visible',\n boxShadow: 'none'\n },\n variants: [{\n props: {\n scroll: 'paper'\n },\n style: {\n display: 'flex',\n flexDirection: 'column',\n maxHeight: 'calc(100% - 64px)'\n }\n }, {\n props: {\n scroll: 'body'\n },\n style: {\n display: 'inline-block',\n verticalAlign: 'middle',\n textAlign: 'initial'\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.maxWidth,\n style: {\n maxWidth: 'calc(100% - 64px)'\n }\n }, {\n props: {\n maxWidth: 'xs'\n },\n style: {\n maxWidth: theme.breakpoints.unit === 'px' ? Math.max(theme.breakpoints.values.xs, 444) : `max(${theme.breakpoints.values.xs}${theme.breakpoints.unit}, 444px)`,\n [`&.${dialogClasses.paperScrollBody}`]: {\n [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2)]: {\n maxWidth: 'calc(100% - 64px)'\n }\n }\n }\n }, ...Object.keys(theme.breakpoints.values).filter(maxWidth => maxWidth !== 'xs').map(maxWidth => ({\n props: {\n maxWidth\n },\n style: {\n maxWidth: `${theme.breakpoints.values[maxWidth]}${theme.breakpoints.unit}`,\n [`&.${dialogClasses.paperScrollBody}`]: {\n [theme.breakpoints.down(theme.breakpoints.values[maxWidth] + 32 * 2)]: {\n maxWidth: 'calc(100% - 64px)'\n }\n }\n }\n })), {\n props: ({\n ownerState\n }) => ownerState.fullWidth,\n style: {\n width: 'calc(100% - 64px)'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.fullScreen,\n style: {\n margin: 0,\n width: '100%',\n maxWidth: '100%',\n height: '100%',\n maxHeight: 'none',\n borderRadius: 0,\n [`&.${dialogClasses.paperScrollBody}`]: {\n margin: 0,\n maxWidth: '100%'\n }\n }\n }]\n})));\n\n/**\n * Dialogs are overlaid modal paper based components with a backdrop.\n */\nconst Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDialog'\n });\n const theme = useTheme();\n const defaultTransitionDuration = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-labelledby': ariaLabelledbyProp,\n BackdropComponent,\n BackdropProps,\n children,\n className,\n disableEscapeKeyDown = false,\n fullScreen = false,\n fullWidth = false,\n maxWidth = 'sm',\n onBackdropClick,\n onClick,\n onClose,\n open,\n PaperComponent = Paper,\n PaperProps = {},\n scroll = 'paper',\n TransitionComponent = Fade,\n transitionDuration = defaultTransitionDuration,\n TransitionProps,\n ...other\n } = props;\n const ownerState = {\n ...props,\n disableEscapeKeyDown,\n fullScreen,\n fullWidth,\n maxWidth,\n scroll\n };\n const classes = useUtilityClasses(ownerState);\n const backdropClick = React.useRef();\n const handleMouseDown = event => {\n // We don't want to close the dialog when clicking the dialog content.\n // Make sure the event starts and ends on the same DOM element.\n backdropClick.current = event.target === event.currentTarget;\n };\n const handleBackdropClick = event => {\n if (onClick) {\n onClick(event);\n }\n\n // Ignore the events not coming from the \"backdrop\".\n if (!backdropClick.current) {\n return;\n }\n backdropClick.current = null;\n if (onBackdropClick) {\n onBackdropClick(event);\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const ariaLabelledby = useId(ariaLabelledbyProp);\n const dialogContextValue = React.useMemo(() => {\n return {\n titleId: ariaLabelledby\n };\n }, [ariaLabelledby]);\n return /*#__PURE__*/_jsx(DialogRoot, {\n className: clsx(classes.root, className),\n closeAfterTransition: true,\n components: {\n Backdrop: DialogBackdrop\n },\n componentsProps: {\n backdrop: {\n transitionDuration,\n as: BackdropComponent,\n ...BackdropProps\n }\n },\n disableEscapeKeyDown: disableEscapeKeyDown,\n onClose: onClose,\n open: open,\n ref: ref,\n onClick: handleBackdropClick,\n ownerState: ownerState,\n ...other,\n children: /*#__PURE__*/_jsx(TransitionComponent, {\n appear: true,\n in: open,\n timeout: transitionDuration,\n role: \"presentation\",\n ...TransitionProps,\n children: /*#__PURE__*/_jsx(DialogContainer, {\n className: clsx(classes.container),\n onMouseDown: handleMouseDown,\n ownerState: ownerState,\n children: /*#__PURE__*/_jsx(DialogPaper, {\n as: PaperComponent,\n elevation: 24,\n role: \"dialog\",\n \"aria-describedby\": ariaDescribedby,\n \"aria-labelledby\": ariaLabelledby,\n ...PaperProps,\n className: clsx(classes.paper, PaperProps.className),\n ownerState: ownerState,\n children: /*#__PURE__*/_jsx(DialogContext.Provider, {\n value: dialogContextValue,\n children: children\n })\n })\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Dialog.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The id(s) of the element(s) that describe the dialog.\n */\n 'aria-describedby': PropTypes.string,\n /**\n * The id(s) of the element(s) that label the dialog.\n */\n 'aria-labelledby': PropTypes.string,\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * @ignore\n */\n BackdropProps: PropTypes.object,\n /**\n * Dialog children, usually the included sub-components.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * If `true`, the dialog is full-screen.\n * @default false\n */\n fullScreen: PropTypes.bool,\n /**\n * If `true`, the dialog stretches to `maxWidth`.\n *\n * Notice that the dialog width grow is limited by the default margin.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * Determine the max-width of the dialog.\n * The dialog width grows with the size of the screen.\n * Set to `false` to disable `maxWidth`.\n * @default 'sm'\n */\n maxWidth: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['xs', 'sm', 'md', 'lg', 'xl', false]), PropTypes.string]),\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: PropTypes.func,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The component used to render the body of the dialog.\n * @default Paper\n */\n PaperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.\n * @default {}\n */\n PaperProps: PropTypes.object,\n /**\n * Determine the container for scrolling the dialog.\n * @default 'paper'\n */\n scroll: PropTypes.oneOf(['body', 'paper']),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Fade\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Dialog;","import * as React from 'react';\nconst DialogContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n DialogContext.displayName = 'DialogContext';\n}\nexport default DialogContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDialogUtilityClass(slot) {\n return generateUtilityClass('MuiDialog', slot);\n}\nconst dialogClasses = generateUtilityClasses('MuiDialog', ['root', 'scrollPaper', 'scrollBody', 'container', 'paper', 'paperScrollPaper', 'paperScrollBody', 'paperWidthFalse', 'paperWidthXs', 'paperWidthSm', 'paperWidthMd', 'paperWidthLg', 'paperWidthXl', 'paperFullWidth', 'paperFullScreen']);\nexport default dialogClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDialogContentUtilityClass(slot) {\n return generateUtilityClass('MuiDialogContent', slot);\n}\nconst dialogContentClasses = generateUtilityClasses('MuiDialogContent', ['root', 'dividers']);\nexport default dialogContentClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getDialogContentUtilityClass } from \"./dialogContentClasses.js\";\nimport dialogTitleClasses from \"../DialogTitle/dialogTitleClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n dividers\n } = ownerState;\n const slots = {\n root: ['root', dividers && 'dividers']\n };\n return composeClasses(slots, getDialogContentUtilityClass, classes);\n};\nconst DialogContentRoot = styled('div', {\n name: 'MuiDialogContent',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dividers && styles.dividers];\n }\n})(memoTheme(({\n theme\n}) => ({\n flex: '1 1 auto',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch',\n overflowY: 'auto',\n padding: '20px 24px',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.dividers,\n style: {\n padding: '16px 24px',\n borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,\n borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.dividers,\n style: {\n [`.${dialogTitleClasses.root} + &`]: {\n paddingTop: 0\n }\n }\n }]\n})));\nconst DialogContent = /*#__PURE__*/React.forwardRef(function DialogContent(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDialogContent'\n });\n const {\n className,\n dividers = false,\n ...other\n } = props;\n const ownerState = {\n ...props,\n dividers\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogContentRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogContent.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * Display the top and bottom dividers.\n * @default false\n */\n dividers: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogContent;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDialogTitleUtilityClass(slot) {\n return generateUtilityClass('MuiDialogTitle', slot);\n}\nconst dialogTitleClasses = generateUtilityClasses('MuiDialogTitle', ['root']);\nexport default dialogTitleClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getDividerUtilityClass } from \"./dividerClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n absolute,\n children,\n classes,\n flexItem,\n light,\n orientation,\n textAlign,\n variant\n } = ownerState;\n const slots = {\n root: ['root', absolute && 'absolute', variant, light && 'light', orientation === 'vertical' && 'vertical', flexItem && 'flexItem', children && 'withChildren', children && orientation === 'vertical' && 'withChildrenVertical', textAlign === 'right' && orientation !== 'vertical' && 'textAlignRight', textAlign === 'left' && orientation !== 'vertical' && 'textAlignLeft'],\n wrapper: ['wrapper', orientation === 'vertical' && 'wrapperVertical']\n };\n return composeClasses(slots, getDividerUtilityClass, classes);\n};\nconst DividerRoot = styled('div', {\n name: 'MuiDivider',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.absolute && styles.absolute, styles[ownerState.variant], ownerState.light && styles.light, ownerState.orientation === 'vertical' && styles.vertical, ownerState.flexItem && styles.flexItem, ownerState.children && styles.withChildren, ownerState.children && ownerState.orientation === 'vertical' && styles.withChildrenVertical, ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical' && styles.textAlignRight, ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical' && styles.textAlignLeft];\n }\n})(memoTheme(({\n theme\n}) => ({\n margin: 0,\n // Reset browser default style.\n flexShrink: 0,\n borderWidth: 0,\n borderStyle: 'solid',\n borderColor: (theme.vars || theme).palette.divider,\n borderBottomWidth: 'thin',\n variants: [{\n props: {\n absolute: true\n },\n style: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%'\n }\n }, {\n props: {\n light: true\n },\n style: {\n borderColor: theme.vars ? `rgba(${theme.vars.palette.dividerChannel} / 0.08)` : alpha(theme.palette.divider, 0.08)\n }\n }, {\n props: {\n variant: 'inset'\n },\n style: {\n marginLeft: 72\n }\n }, {\n props: {\n variant: 'middle',\n orientation: 'horizontal'\n },\n style: {\n marginLeft: theme.spacing(2),\n marginRight: theme.spacing(2)\n }\n }, {\n props: {\n variant: 'middle',\n orientation: 'vertical'\n },\n style: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n height: '100%',\n borderBottomWidth: 0,\n borderRightWidth: 'thin'\n }\n }, {\n props: {\n flexItem: true\n },\n style: {\n alignSelf: 'stretch',\n height: 'auto'\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.children,\n style: {\n display: 'flex',\n whiteSpace: 'nowrap',\n textAlign: 'center',\n border: 0,\n borderTopStyle: 'solid',\n borderLeftStyle: 'solid',\n '&::before, &::after': {\n content: '\"\"',\n alignSelf: 'center'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.children && ownerState.orientation !== 'vertical',\n style: {\n '&::before, &::after': {\n width: '100%',\n borderTop: `thin solid ${(theme.vars || theme).palette.divider}`,\n borderTopStyle: 'inherit'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.orientation === 'vertical' && ownerState.children,\n style: {\n flexDirection: 'column',\n '&::before, &::after': {\n height: '100%',\n borderLeft: `thin solid ${(theme.vars || theme).palette.divider}`,\n borderLeftStyle: 'inherit'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.textAlign === 'right' && ownerState.orientation !== 'vertical',\n style: {\n '&::before': {\n width: '90%'\n },\n '&::after': {\n width: '10%'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.textAlign === 'left' && ownerState.orientation !== 'vertical',\n style: {\n '&::before': {\n width: '10%'\n },\n '&::after': {\n width: '90%'\n }\n }\n }]\n})));\nconst DividerWrapper = styled('span', {\n name: 'MuiDivider',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.wrapper, ownerState.orientation === 'vertical' && styles.wrapperVertical];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'inline-block',\n paddingLeft: `calc(${theme.spacing(1)} * 1.2)`,\n paddingRight: `calc(${theme.spacing(1)} * 1.2)`,\n variants: [{\n props: {\n orientation: 'vertical'\n },\n style: {\n paddingTop: `calc(${theme.spacing(1)} * 1.2)`,\n paddingBottom: `calc(${theme.spacing(1)} * 1.2)`\n }\n }]\n})));\nconst Divider = /*#__PURE__*/React.forwardRef(function Divider(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDivider'\n });\n const {\n absolute = false,\n children,\n className,\n orientation = 'horizontal',\n component = children || orientation === 'vertical' ? 'div' : 'hr',\n flexItem = false,\n light = false,\n role = component !== 'hr' ? 'separator' : undefined,\n textAlign = 'center',\n variant = 'fullWidth',\n ...other\n } = props;\n const ownerState = {\n ...props,\n absolute,\n component,\n flexItem,\n light,\n orientation,\n role,\n textAlign,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DividerRoot, {\n as: component,\n className: clsx(classes.root, className),\n role: role,\n ref: ref,\n ownerState: ownerState,\n \"aria-orientation\": role === 'separator' && (component !== 'hr' || orientation === 'vertical') ? orientation : undefined,\n ...other,\n children: children ? /*#__PURE__*/_jsx(DividerWrapper, {\n className: classes.wrapper,\n ownerState: ownerState,\n children: children\n }) : null\n });\n});\n\n/**\n * The following flag is used to ensure that this component isn't tabbable i.e.\n * does not get highlight/focus inside of MUI List.\n */\nif (Divider) {\n Divider.muiSkipListHighlight = true;\n}\nprocess.env.NODE_ENV !== \"production\" ? Divider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Absolutely position the element.\n * @default false\n */\n absolute: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, a vertical divider will have the correct height when used in flex container.\n * (By default, a vertical divider will have a calculated height of `0px` if it is the child of a flex container.)\n * @default false\n */\n flexItem: PropTypes.bool,\n /**\n * If `true`, the divider will have a lighter color.\n * @default false\n * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n light: PropTypes.bool,\n /**\n * The component orientation.\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * @ignore\n */\n role: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The text alignment.\n * @default 'center'\n */\n textAlign: PropTypes.oneOf(['center', 'left', 'right']),\n /**\n * The variant to use.\n * @default 'fullWidth'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['fullWidth', 'inset', 'middle']), PropTypes.string])\n} : void 0;\nexport default Divider;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDividerUtilityClass(slot) {\n return generateUtilityClass('MuiDivider', slot);\n}\nconst dividerClasses = generateUtilityClasses('MuiDivider', ['root', 'absolute', 'fullWidth', 'inset', 'middle', 'flexItem', 'light', 'vertical', 'withChildren', 'withChildrenVertical', 'textAlignRight', 'textAlignLeft', 'wrapper', 'wrapperVertical']);\nexport default dividerClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Transition } from 'react-transition-group';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactNodeRef from '@mui/utils/getReactNodeRef';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { reflow, getTransitionProps } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst styles = {\n entering: {\n opacity: 1\n },\n entered: {\n opacity: 1\n }\n};\n\n/**\n * The Fade transition is used by the [Modal](/material-ui/react-modal/) component.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Fade = /*#__PURE__*/React.forwardRef(function Fade(props, ref) {\n const theme = useTheme();\n const defaultTimeout = {\n enter: theme.transitions.duration.enteringScreen,\n exit: theme.transitions.duration.leavingScreen\n };\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = defaultTimeout,\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition,\n ...other\n } = props;\n const enableStrictModeCompat = true;\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactNodeRef(children), ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const transitionProps = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n node.style.webkitTransition = theme.transitions.create('opacity', transitionProps);\n node.style.transition = theme.transitions.create('opacity', transitionProps);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, {\n appear: appear,\n in: inProp,\n nodeRef: enableStrictModeCompat ? nodeRef : undefined,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout,\n ...other,\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, {\n style: {\n opacity: 0,\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined,\n ...styles[state],\n ...style,\n ...children.props.style\n },\n ref: handleRef,\n ...childProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Fade.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n * @default {\n * enter: theme.transitions.duration.enteringScreen,\n * exit: theme.transitions.duration.leavingScreen,\n * }\n */\n timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nexport default Fade;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { inputBaseClasses } from \"../InputBase/index.js\";\nexport function getFilledInputUtilityClass(slot) {\n return generateUtilityClass('MuiFilledInput', slot);\n}\nconst filledInputClasses = {\n ...inputBaseClasses,\n ...generateUtilityClasses('MuiFilledInput', ['root', 'underline', 'input', 'adornedStart', 'adornedEnd', 'sizeSmall', 'multiline', 'hiddenLabel'])\n};\nexport default filledInputClasses;","'use client';\n\nimport * as React from 'react';\nimport deepmerge from '@mui/utils/deepmerge';\nimport refType from '@mui/utils/refType';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport InputBase from \"../InputBase/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport filledInputClasses, { getFilledInputUtilityClass } from \"./filledInputClasses.js\";\nimport { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from \"../InputBase/InputBase.js\";\nimport { capitalize } from \"../utils/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline,\n startAdornment,\n endAdornment,\n size,\n hiddenLabel,\n multiline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', size === 'small' && `size${capitalize(size)}`, hiddenLabel && 'hiddenLabel', multiline && 'multiline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getFilledInputUtilityClass, classes);\n return {\n ...classes,\n // forward classes to the InputBase\n ...composedClasses\n };\n};\nconst FilledInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiFilledInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(memoTheme(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';\n const hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';\n const disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';\n return {\n position: 'relative',\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,\n borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,\n borderTopRightRadius: (theme.vars || theme).shape.borderRadius,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n '&:hover': {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor\n }\n },\n [`&.${filledInputClasses.focused}`]: {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor\n },\n [`&.${filledInputClasses.disabled}`]: {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground\n },\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableUnderline,\n style: {\n '&::after': {\n left: 0,\n bottom: 0,\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&.${filledInputClasses.focused}:after`]: {\n // translateX(0) is a workaround for Safari transform scale bug\n // See https://github.com/mui/material-ui/issues/31766\n transform: 'scaleX(1) translateX(0)'\n },\n [`&.${filledInputClasses.error}`]: {\n '&::before, &::after': {\n borderBottomColor: (theme.vars || theme).palette.error.main\n }\n },\n '&::before': {\n borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,\n left: 0,\n bottom: 0,\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]: {\n borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`\n },\n [`&.${filledInputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }\n }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n disableUnderline: false,\n color\n },\n style: {\n '&::after': {\n borderBottom: `2px solid ${(theme.vars || theme).palette[color]?.main}`\n }\n }\n })), {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 12\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 12\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: '25px 12px 8px'\n }\n }, {\n props: ({\n ownerState,\n size\n }) => ownerState.multiline && size === 'small',\n style: {\n paddingTop: 21,\n paddingBottom: 4\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline && ownerState.hiddenLabel,\n style: {\n paddingTop: 16,\n paddingBottom: 17\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline && ownerState.hiddenLabel && ownerState.size === 'small',\n style: {\n paddingTop: 8,\n paddingBottom: 9\n }\n }]\n };\n}));\nconst FilledInputInput = styled(InputBaseInput, {\n name: 'MuiFilledInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(memoTheme(({\n theme\n}) => ({\n paddingTop: 25,\n paddingRight: 12,\n paddingBottom: 8,\n paddingLeft: 12,\n ...(!theme.vars && {\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n }\n }),\n ...(theme.vars && {\n '&:-webkit-autofill': {\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit'\n },\n [theme.getColorSchemeSelector('dark')]: {\n '&:-webkit-autofill': {\n WebkitBoxShadow: '0 0 0 100px #266798 inset',\n WebkitTextFillColor: '#fff',\n caretColor: '#fff'\n }\n }\n }),\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n paddingTop: 21,\n paddingBottom: 4\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hiddenLabel,\n style: {\n paddingTop: 16,\n paddingBottom: 17\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hiddenLabel && ownerState.size === 'small',\n style: {\n paddingTop: 8,\n paddingBottom: 9\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n paddingTop: 0,\n paddingBottom: 0,\n paddingLeft: 0,\n paddingRight: 0\n }\n }]\n})));\nconst FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFilledInput'\n });\n const {\n disableUnderline = false,\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n hiddenLabel,\n // declare here to prevent spreading to DOM\n inputComponent = 'input',\n multiline = false,\n slotProps,\n slots = {},\n type = 'text',\n ...other\n } = props;\n const ownerState = {\n ...props,\n disableUnderline,\n fullWidth,\n inputComponent,\n multiline,\n type\n };\n const classes = useUtilityClasses(props);\n const filledInputComponentsProps = {\n root: {\n ownerState\n },\n input: {\n ownerState\n }\n };\n const componentsProps = slotProps ?? componentsPropsProp ? deepmerge(filledInputComponentsProps, slotProps ?? componentsPropsProp) : filledInputComponentsProps;\n const RootSlot = slots.root ?? components.Root ?? FilledInputRoot;\n const InputSlot = slots.input ?? components.Input ?? FilledInputInput;\n return /*#__PURE__*/_jsx(InputBase, {\n slots: {\n root: RootSlot,\n input: InputSlot\n },\n componentsProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type,\n ...other,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FilledInput.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the input will not have an underline.\n * @default false\n */\n disableUnderline: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nif (FilledInput) {\n FilledInput.muiName = 'Input';\n}\nexport default FilledInput;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormControlUtilityClasses(slot) {\n return generateUtilityClass('MuiFormControl', slot);\n}\nconst formControlClasses = generateUtilityClasses('MuiFormControl', ['root', 'marginNone', 'marginNormal', 'marginDense', 'fullWidth', 'disabled']);\nexport default formControlClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { isFilled, isAdornedStart } from \"../InputBase/utils.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport isMuiElement from \"../utils/isMuiElement.js\";\nimport FormControlContext from \"./FormControlContext.js\";\nimport { getFormControlUtilityClasses } from \"./formControlClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n margin,\n fullWidth\n } = ownerState;\n const slots = {\n root: ['root', margin !== 'none' && `margin${capitalize(margin)}`, fullWidth && 'fullWidth']\n };\n return composeClasses(slots, getFormControlUtilityClasses, classes);\n};\nconst FormControlRoot = styled('div', {\n name: 'MuiFormControl',\n slot: 'Root',\n overridesResolver: ({\n ownerState\n }, styles) => {\n return {\n ...styles.root,\n ...styles[`margin${capitalize(ownerState.margin)}`],\n ...(ownerState.fullWidth && styles.fullWidth)\n };\n }\n})({\n display: 'inline-flex',\n flexDirection: 'column',\n position: 'relative',\n // Reset fieldset default style.\n minWidth: 0,\n padding: 0,\n margin: 0,\n border: 0,\n verticalAlign: 'top',\n // Fix alignment issue on Safari.\n variants: [{\n props: {\n margin: 'normal'\n },\n style: {\n marginTop: 16,\n marginBottom: 8\n }\n }, {\n props: {\n margin: 'dense'\n },\n style: {\n marginTop: 8,\n marginBottom: 4\n }\n }, {\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }]\n});\n\n/**\n * Provides context such as filled/focused/error/required for form inputs.\n * Relying on the context provides high flexibility and ensures that the state always stays\n * consistent across the children of the `FormControl`.\n * This context is used by the following components:\n *\n * - FormLabel\n * - FormHelperText\n * - Input\n * - InputLabel\n *\n * You can find one composition example below and more going to [the demos](/material-ui/react-text-field/#components).\n *\n * ```jsx\n * <FormControl>\n * <InputLabel htmlFor=\"my-input\">Email address</InputLabel>\n * <Input id=\"my-input\" aria-describedby=\"my-helper-text\" />\n * <FormHelperText id=\"my-helper-text\">We'll never share your email.</FormHelperText>\n * </FormControl>\n * ```\n *\n * âš ï¸ Only one `InputBase` can be used within a FormControl because it creates visual inconsistencies.\n * For instance, only one input can be focused at the same time, the state shouldn't be shared.\n */\nconst FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormControl'\n });\n const {\n children,\n className,\n color = 'primary',\n component = 'div',\n disabled = false,\n error = false,\n focused: visuallyFocused,\n fullWidth = false,\n hiddenLabel = false,\n margin = 'none',\n required = false,\n size = 'medium',\n variant = 'outlined',\n ...other\n } = props;\n const ownerState = {\n ...props,\n color,\n component,\n disabled,\n error,\n fullWidth,\n hiddenLabel,\n margin,\n required,\n size,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const [adornedStart, setAdornedStart] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialAdornedStart = false;\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n const input = isMuiElement(child, ['Select']) ? child.props.input : child;\n if (input && isAdornedStart(input.props)) {\n initialAdornedStart = true;\n }\n });\n }\n return initialAdornedStart;\n });\n const [filled, setFilled] = React.useState(() => {\n // We need to iterate through the children and find the Input in order\n // to fully support server-side rendering.\n let initialFilled = false;\n if (children) {\n React.Children.forEach(children, child => {\n if (!isMuiElement(child, ['Input', 'Select'])) {\n return;\n }\n if (isFilled(child.props, true) || isFilled(child.props.inputProps, true)) {\n initialFilled = true;\n }\n });\n }\n return initialFilled;\n });\n const [focusedState, setFocused] = React.useState(false);\n if (disabled && focusedState) {\n setFocused(false);\n }\n const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;\n let registerEffect;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const registeredInput = React.useRef(false);\n registerEffect = () => {\n if (registeredInput.current) {\n console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\\n'));\n }\n registeredInput.current = true;\n return () => {\n registeredInput.current = false;\n };\n };\n }\n const childContext = React.useMemo(() => {\n return {\n adornedStart,\n setAdornedStart,\n color,\n disabled,\n error,\n filled,\n focused,\n fullWidth,\n hiddenLabel,\n size,\n onBlur: () => {\n setFocused(false);\n },\n onEmpty: () => {\n setFilled(false);\n },\n onFilled: () => {\n setFilled(true);\n },\n onFocus: () => {\n setFocused(true);\n },\n registerEffect,\n required,\n variant\n };\n }, [adornedStart, color, disabled, error, filled, focused, fullWidth, hiddenLabel, registerEffect, required, size, variant]);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(FormControlRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormControl.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the label, input and helper text should be displayed in a disabled state.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n /**\n * If `true`, the component will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n /**\n * If `true`, the label will indicate that the `input` is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default FormControl;","import * as React from 'react';\n/**\n * @ignore - internal component.\n */\nconst FormControlContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== 'production') {\n FormControlContext.displayName = 'FormControlContext';\n}\nexport default FormControlContext;","export default function formControlState({\n props,\n states,\n muiFormControl\n}) {\n return states.reduce((acc, state) => {\n acc[state] = props[state];\n if (muiFormControl) {\n if (typeof props[state] === 'undefined') {\n acc[state] = muiFormControl[state];\n }\n }\n return acc;\n }, {});\n}","'use client';\n\nimport * as React from 'react';\nimport FormControlContext from \"./FormControlContext.js\";\nexport default function useFormControl() {\n return React.useContext(FormControlContext);\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst GridContext = /*#__PURE__*/React.createContext();\nif (process.env.NODE_ENV !== 'production') {\n GridContext.displayName = 'GridContext';\n}\nexport default GridContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getGridUtilityClass(slot) {\n return generateUtilityClass('MuiGrid', slot);\n}\nconst SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];\nconst WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];\nconst GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nconst gridClasses = generateUtilityClasses('MuiGrid', ['root', 'container', 'item', 'zeroMinWidth',\n// spacings\n...SPACINGS.map(spacing => `spacing-xs-${spacing}`),\n// direction values\n...DIRECTIONS.map(direction => `direction-xs-${direction}`),\n// wrap values\n...WRAPS.map(wrap => `wrap-xs-${wrap}`),\n// grid sizes for all breakpoints\n...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);\nexport default gridClasses;","'use client';\n\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { handleBreakpoints, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';\nimport { extendSxProp } from '@mui/system/styleFunctionSx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport requirePropFactory from \"../utils/requirePropFactory.js\";\nimport styled from \"../styles/styled.js\";\nimport useThemeProps from \"../styles/useThemeProps.js\";\nimport useTheme from \"../styles/useTheme.js\";\nimport GridContext from \"./GridContext.js\";\nimport gridClasses, { getGridUtilityClass } from \"./gridClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function generateGrid({\n theme,\n ownerState\n}) {\n let size;\n return theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {\n // Use side effect over immutability for better performance.\n let styles = {};\n if (ownerState[breakpoint]) {\n size = ownerState[breakpoint];\n }\n if (!size) {\n return globalStyles;\n }\n if (size === true) {\n // For the auto layouting\n styles = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n } else if (size === 'auto') {\n styles = {\n flexBasis: 'auto',\n flexGrow: 0,\n flexShrink: 0,\n maxWidth: 'none',\n width: 'auto'\n };\n } else {\n const columnsBreakpointValues = resolveBreakpointValues({\n values: ownerState.columns,\n breakpoints: theme.breakpoints.values\n });\n const columnValue = typeof columnsBreakpointValues === 'object' ? columnsBreakpointValues[breakpoint] : columnsBreakpointValues;\n if (columnValue === undefined || columnValue === null) {\n return globalStyles;\n }\n // Keep 7 significant numbers.\n const width = `${Math.round(size / columnValue * 10e7) / 10e5}%`;\n let more = {};\n if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {\n const themeSpacing = theme.spacing(ownerState.columnSpacing);\n if (themeSpacing !== '0px') {\n const fullWidth = `calc(${width} + ${themeSpacing})`;\n more = {\n flexBasis: fullWidth,\n maxWidth: fullWidth\n };\n }\n }\n\n // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n styles = {\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width,\n ...more\n };\n }\n\n // No need for a media query for the first size.\n if (theme.breakpoints.values[breakpoint] === 0) {\n Object.assign(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n return globalStyles;\n }, {});\n}\nexport function generateDirection({\n theme,\n ownerState\n}) {\n const directionValues = resolveBreakpointValues({\n values: ownerState.direction,\n breakpoints: theme.breakpoints.values\n });\n return handleBreakpoints({\n theme\n }, directionValues, propValue => {\n const output = {\n flexDirection: propValue\n };\n if (propValue.startsWith('column')) {\n output[`& > .${gridClasses.item}`] = {\n maxWidth: 'none'\n };\n }\n return output;\n });\n}\n\n/**\n * Extracts zero value breakpoint keys before a non-zero value breakpoint key.\n * @example { xs: 0, sm: 0, md: 2, lg: 0, xl: 0 } or [0, 0, 2, 0, 0]\n * @returns [xs, sm]\n */\nfunction extractZeroValueBreakpointKeys({\n breakpoints,\n values\n}) {\n let nonZeroKey = '';\n Object.keys(values).forEach(key => {\n if (nonZeroKey !== '') {\n return;\n }\n if (values[key] !== 0) {\n nonZeroKey = key;\n }\n });\n const sortedBreakpointKeysByValue = Object.keys(breakpoints).sort((a, b) => {\n return breakpoints[a] - breakpoints[b];\n });\n return sortedBreakpointKeysByValue.slice(0, sortedBreakpointKeysByValue.indexOf(nonZeroKey));\n}\nexport function generateRowGap({\n theme,\n ownerState\n}) {\n const {\n container,\n rowSpacing\n } = ownerState;\n let styles = {};\n if (container && rowSpacing !== 0) {\n const rowSpacingValues = resolveBreakpointValues({\n values: rowSpacing,\n breakpoints: theme.breakpoints.values\n });\n let zeroValueBreakpointKeys;\n if (typeof rowSpacingValues === 'object') {\n zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({\n breakpoints: theme.breakpoints.values,\n values: rowSpacingValues\n });\n }\n styles = handleBreakpoints({\n theme\n }, rowSpacingValues, (propValue, breakpoint) => {\n const themeSpacing = theme.spacing(propValue);\n if (themeSpacing !== '0px') {\n return {\n marginTop: theme.spacing(-propValue),\n [`& > .${gridClasses.item}`]: {\n paddingTop: themeSpacing\n }\n };\n }\n if (zeroValueBreakpointKeys?.includes(breakpoint)) {\n return {};\n }\n return {\n marginTop: 0,\n [`& > .${gridClasses.item}`]: {\n paddingTop: 0\n }\n };\n });\n }\n return styles;\n}\nexport function generateColumnGap({\n theme,\n ownerState\n}) {\n const {\n container,\n columnSpacing\n } = ownerState;\n let styles = {};\n if (container && columnSpacing !== 0) {\n const columnSpacingValues = resolveBreakpointValues({\n values: columnSpacing,\n breakpoints: theme.breakpoints.values\n });\n let zeroValueBreakpointKeys;\n if (typeof columnSpacingValues === 'object') {\n zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({\n breakpoints: theme.breakpoints.values,\n values: columnSpacingValues\n });\n }\n styles = handleBreakpoints({\n theme\n }, columnSpacingValues, (propValue, breakpoint) => {\n const themeSpacing = theme.spacing(propValue);\n if (themeSpacing !== '0px') {\n const negativeValue = theme.spacing(-propValue);\n return {\n width: `calc(100% + ${themeSpacing})`,\n marginLeft: negativeValue,\n [`& > .${gridClasses.item}`]: {\n paddingLeft: themeSpacing\n }\n };\n }\n if (zeroValueBreakpointKeys?.includes(breakpoint)) {\n return {};\n }\n return {\n width: '100%',\n marginLeft: 0,\n [`& > .${gridClasses.item}`]: {\n paddingLeft: 0\n }\n };\n });\n }\n return styles;\n}\nexport function resolveSpacingStyles(spacing, breakpoints, styles = {}) {\n // undefined/null or `spacing` <= 0\n if (!spacing || spacing <= 0) {\n return [];\n }\n // in case of string/number `spacing`\n if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {\n return [styles[`spacing-xs-${String(spacing)}`]];\n }\n // in case of object `spacing`\n const spacingStyles = [];\n breakpoints.forEach(breakpoint => {\n const value = spacing[breakpoint];\n if (Number(value) > 0) {\n spacingStyles.push(styles[`spacing-${breakpoint}-${String(value)}`]);\n }\n });\n return spacingStyles;\n}\n\n// Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\nconst GridRoot = styled('div', {\n name: 'MuiGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n const {\n container,\n direction,\n item,\n spacing,\n wrap,\n zeroMinWidth,\n breakpoints\n } = ownerState;\n let spacingStyles = [];\n\n // in case of grid item\n if (container) {\n spacingStyles = resolveSpacingStyles(spacing, breakpoints, styles);\n }\n const breakpointsStyles = [];\n breakpoints.forEach(breakpoint => {\n const value = ownerState[breakpoint];\n if (value) {\n breakpointsStyles.push(styles[`grid-${breakpoint}-${String(value)}`]);\n }\n });\n return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, ...spacingStyles, direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], ...breakpointsStyles];\n }\n})(\n// FIXME(romgrk): Can't use memoTheme here\n({\n ownerState\n}) => ({\n boxSizing: 'border-box',\n ...(ownerState.container && {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n }),\n ...(ownerState.item && {\n margin: 0 // For instance, it's useful when used with a `figure` element.\n }),\n ...(ownerState.zeroMinWidth && {\n minWidth: 0\n }),\n ...(ownerState.wrap !== 'wrap' && {\n flexWrap: ownerState.wrap\n })\n}), generateDirection, generateRowGap, generateColumnGap, generateGrid);\nexport function resolveSpacingClasses(spacing, breakpoints) {\n // undefined/null or `spacing` <= 0\n if (!spacing || spacing <= 0) {\n return [];\n }\n // in case of string/number `spacing`\n if (typeof spacing === 'string' && !Number.isNaN(Number(spacing)) || typeof spacing === 'number') {\n return [`spacing-xs-${String(spacing)}`];\n }\n // in case of object `spacing`\n const classes = [];\n breakpoints.forEach(breakpoint => {\n const value = spacing[breakpoint];\n if (Number(value) > 0) {\n const className = `spacing-${breakpoint}-${String(value)}`;\n classes.push(className);\n }\n });\n return classes;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n container,\n direction,\n item,\n spacing,\n wrap,\n zeroMinWidth,\n breakpoints\n } = ownerState;\n let spacingClasses = [];\n\n // in case of grid item\n if (container) {\n spacingClasses = resolveSpacingClasses(spacing, breakpoints);\n }\n const breakpointsClasses = [];\n breakpoints.forEach(breakpoint => {\n const value = ownerState[breakpoint];\n if (value) {\n breakpointsClasses.push(`grid-${breakpoint}-${String(value)}`);\n }\n });\n const slots = {\n root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', ...spacingClasses, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, ...breakpointsClasses]\n };\n return composeClasses(slots, getGridUtilityClass, classes);\n};\n\n/**\n * @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.\n */\nconst Grid = /*#__PURE__*/React.forwardRef(function Grid(inProps, ref) {\n const themeProps = useThemeProps({\n props: inProps,\n name: 'MuiGrid'\n });\n const {\n breakpoints\n } = useTheme();\n const props = extendSxProp(themeProps);\n const {\n className,\n columns: columnsProp,\n columnSpacing: columnSpacingProp,\n component = 'div',\n container = false,\n direction = 'row',\n item = false,\n rowSpacing: rowSpacingProp,\n spacing = 0,\n wrap = 'wrap',\n zeroMinWidth = false,\n ...other\n } = props;\n const rowSpacing = rowSpacingProp || spacing;\n const columnSpacing = columnSpacingProp || spacing;\n const columnsContext = React.useContext(GridContext);\n\n // columns set with default breakpoint unit of 12\n const columns = container ? columnsProp || 12 : columnsContext;\n const breakpointsValues = {};\n const otherFiltered = {\n ...other\n };\n breakpoints.keys.forEach(breakpoint => {\n if (other[breakpoint] != null) {\n breakpointsValues[breakpoint] = other[breakpoint];\n delete otherFiltered[breakpoint];\n }\n });\n const ownerState = {\n ...props,\n columns,\n container,\n direction,\n item,\n rowSpacing,\n columnSpacing,\n wrap,\n zeroMinWidth,\n spacing,\n ...breakpointsValues,\n breakpoints: breakpoints.keys\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(GridContext.Provider, {\n value: columns,\n children: /*#__PURE__*/_jsx(GridRoot, {\n ownerState: ownerState,\n className: clsx(classes.root, className),\n as: component,\n ref: ref,\n ...otherFiltered\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grid.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The number of columns.\n * @default 12\n */\n columns: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number, PropTypes.object]),\n /**\n * Defines the horizontal space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n columnSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n container: PropTypes.bool,\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'row'\n */\n direction: PropTypes.oneOfType([PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), PropTypes.arrayOf(PropTypes.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), PropTypes.object]),\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n item: PropTypes.bool,\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `lg` breakpoint and wider screens if not overridden.\n * @default false\n */\n lg: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `md` breakpoint and wider screens if not overridden.\n * @default false\n */\n md: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * Defines the vertical space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n rowSpacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `sm` breakpoint and wider screens if not overridden.\n * @default false\n */\n sm: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * Defines the space between the type `item` components.\n * It can only be used on a type `container` component.\n * @default 0\n */\n spacing: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n * @default 'wrap'\n * @deprecated Use `flexWrap` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap']),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for the `xl` breakpoint and wider screens if not overridden.\n * @default false\n */\n xl: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * If a number, it sets the number of columns the grid item uses.\n * It can't be greater than the total number of columns of the container (12 by default).\n * If 'auto', the grid item's width matches its content.\n * If false, the prop is ignored.\n * If true, the grid item's width grows to use the space available in the grid container.\n * The value is applied for all the screen sizes with the lowest priority.\n * @default false\n */\n xs: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.bool]),\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n * @default false\n */\n zeroMinWidth: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n const requireProp = requirePropFactory('Grid', Grid);\n // eslint-disable-next-line no-useless-concat\n Grid['propTypes' + ''] = {\n // eslint-disable-next-line react/forbid-foreign-prop-types\n ...Grid.propTypes,\n direction: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n };\n}\nexport default Grid;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useTimeout from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport getReactNodeRef from '@mui/utils/getReactNodeRef';\nimport { Transition } from 'react-transition-group';\nimport { useTheme } from \"../zero-styled/index.js\";\nimport { getTransitionProps, reflow } from \"../transitions/utils.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getScale(value) {\n return `scale(${value}, ${value ** 2})`;\n}\nconst styles = {\n entering: {\n opacity: 1,\n transform: getScale(1)\n },\n entered: {\n opacity: 1,\n transform: 'none'\n }\n};\n\n/*\n TODO v6: remove\n Conditionally apply a workaround for the CSS transition bug in Safari 15.4 / WebKit browsers.\n */\nconst isWebKit154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent) && /(os |version\\/)15(.|_)4/i.test(navigator.userAgent);\n\n/**\n * The Grow transition is used by the [Tooltip](/material-ui/react-tooltip/) and\n * [Popover](/material-ui/react-popover/) components.\n * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.\n */\nconst Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {\n const {\n addEndListener,\n appear = true,\n children,\n easing,\n in: inProp,\n onEnter,\n onEntered,\n onEntering,\n onExit,\n onExited,\n onExiting,\n style,\n timeout = 'auto',\n // eslint-disable-next-line react/prop-types\n TransitionComponent = Transition,\n ...other\n } = props;\n const timer = useTimeout();\n const autoTimeout = React.useRef();\n const theme = useTheme();\n const nodeRef = React.useRef(null);\n const handleRef = useForkRef(nodeRef, getReactNodeRef(children), ref);\n const normalizedTransitionCallback = callback => maybeIsAppearing => {\n if (callback) {\n const node = nodeRef.current;\n\n // onEnterXxx and onExitXxx callbacks have a different arguments.length value.\n if (maybeIsAppearing === undefined) {\n callback(node);\n } else {\n callback(node, maybeIsAppearing);\n }\n }\n };\n const handleEntering = normalizedTransitionCallback(onEntering);\n const handleEnter = normalizedTransitionCallback((node, isAppearing) => {\n reflow(node); // So the animation always start from the start.\n\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'enter'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay,\n easing: transitionTimingFunction\n })].join(',');\n if (onEnter) {\n onEnter(node, isAppearing);\n }\n });\n const handleEntered = normalizedTransitionCallback(onEntered);\n const handleExiting = normalizedTransitionCallback(onExiting);\n const handleExit = normalizedTransitionCallback(node => {\n const {\n duration: transitionDuration,\n delay,\n easing: transitionTimingFunction\n } = getTransitionProps({\n style,\n timeout,\n easing\n }, {\n mode: 'exit'\n });\n let duration;\n if (timeout === 'auto') {\n duration = theme.transitions.getAutoHeightDuration(node.clientHeight);\n autoTimeout.current = duration;\n } else {\n duration = transitionDuration;\n }\n node.style.transition = [theme.transitions.create('opacity', {\n duration,\n delay\n }), theme.transitions.create('transform', {\n duration: isWebKit154 ? duration : duration * 0.666,\n delay: isWebKit154 ? delay : delay || duration * 0.333,\n easing: transitionTimingFunction\n })].join(',');\n node.style.opacity = 0;\n node.style.transform = getScale(0.75);\n if (onExit) {\n onExit(node);\n }\n });\n const handleExited = normalizedTransitionCallback(onExited);\n const handleAddEndListener = next => {\n if (timeout === 'auto') {\n timer.start(autoTimeout.current || 0, next);\n }\n if (addEndListener) {\n // Old call signature before `react-transition-group` implemented `nodeRef`\n addEndListener(nodeRef.current, next);\n }\n };\n return /*#__PURE__*/_jsx(TransitionComponent, {\n appear: appear,\n in: inProp,\n nodeRef: nodeRef,\n onEnter: handleEnter,\n onEntered: handleEntered,\n onEntering: handleEntering,\n onExit: handleExit,\n onExited: handleExited,\n onExiting: handleExiting,\n addEndListener: handleAddEndListener,\n timeout: timeout === 'auto' ? null : timeout,\n ...other,\n children: (state, childProps) => {\n return /*#__PURE__*/React.cloneElement(children, {\n style: {\n opacity: 0,\n transform: getScale(0.75),\n visibility: state === 'exited' && !inProp ? 'hidden' : undefined,\n ...styles[state],\n ...style,\n ...children.props.style\n },\n ref: handleRef,\n ...childProps\n });\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Grow.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Add a custom transition end trigger. Called with the transitioning DOM\n * node and a done callback. Allows for more fine grained transition end\n * logic. Note: Timeouts are still used as a fallback if provided.\n */\n addEndListener: PropTypes.func,\n /**\n * Perform the enter transition when it first mounts if `in` is also `true`.\n * Set this to `false` to disable this behavior.\n * @default true\n */\n appear: PropTypes.bool,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * The transition timing function.\n * You may specify a single easing or a object containing enter and exit values.\n */\n easing: PropTypes.oneOfType([PropTypes.shape({\n enter: PropTypes.string,\n exit: PropTypes.string\n }), PropTypes.string]),\n /**\n * If `true`, the component will transition in.\n */\n in: PropTypes.bool,\n /**\n * @ignore\n */\n onEnter: PropTypes.func,\n /**\n * @ignore\n */\n onEntered: PropTypes.func,\n /**\n * @ignore\n */\n onEntering: PropTypes.func,\n /**\n * @ignore\n */\n onExit: PropTypes.func,\n /**\n * @ignore\n */\n onExited: PropTypes.func,\n /**\n * @ignore\n */\n onExiting: PropTypes.func,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The duration for the transition, in milliseconds.\n * You may specify a single timeout for all transitions, or individually with an object.\n *\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n timeout: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })])\n} : void 0;\nif (Grow) {\n Grow.muiSupportAuto = true;\n}\nexport default Grow;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getIconButtonUtilityClass(slot) {\n return generateUtilityClass('MuiIconButton', slot);\n}\nconst iconButtonClasses = generateUtilityClasses('MuiIconButton', ['root', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'edgeStart', 'edgeEnd', 'sizeSmall', 'sizeMedium', 'sizeLarge']);\nexport default iconButtonClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport iconButtonClasses, { getIconButtonUtilityClass } from \"./iconButtonClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n color,\n edge,\n size\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', color !== 'default' && `color${capitalize(color)}`, edge && `edge${capitalize(edge)}`, `size${capitalize(size)}`]\n };\n return composeClasses(slots, getIconButtonUtilityClass, classes);\n};\nconst IconButtonRoot = styled(ButtonBase, {\n name: 'MuiIconButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], ownerState.edge && styles[`edge${capitalize(ownerState.edge)}`], styles[`size${capitalize(ownerState.size)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 8,\n borderRadius: '50%',\n color: (theme.vars || theme).palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n variants: [{\n props: {\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }, {\n props: {\n edge: 'start'\n },\n style: {\n marginLeft: -12\n }\n }, {\n props: {\n edge: 'start',\n size: 'small'\n },\n style: {\n marginLeft: -3\n }\n }, {\n props: {\n edge: 'end'\n },\n style: {\n marginRight: -12\n }\n }, {\n props: {\n edge: 'end',\n size: 'small'\n },\n style: {\n marginRight: -3\n }\n }]\n})), memoTheme(({\n theme\n}) => ({\n variants: [{\n props: {\n color: 'inherit'\n },\n style: {\n color: 'inherit'\n }\n }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n })), ...Object.entries(theme.palette).filter(([, value]) => value && value.main) // check all the used fields in the style below\n .map(([color]) => ({\n props: {\n color,\n disableRipple: false\n },\n style: {\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${(theme.vars || theme).palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha((theme.vars || theme).palette[color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n })), {\n props: {\n size: 'small'\n },\n style: {\n padding: 5,\n fontSize: theme.typography.pxToRem(18)\n }\n }, {\n props: {\n size: 'large'\n },\n style: {\n padding: 12,\n fontSize: theme.typography.pxToRem(28)\n }\n }],\n [`&.${iconButtonClasses.disabled}`]: {\n backgroundColor: 'transparent',\n color: (theme.vars || theme).palette.action.disabled\n }\n})));\n\n/**\n * Refer to the [Icons](/material-ui/icons/) section of the documentation\n * regarding the available icon options.\n */\nconst IconButton = /*#__PURE__*/React.forwardRef(function IconButton(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiIconButton'\n });\n const {\n edge = false,\n children,\n className,\n color = 'default',\n disabled = false,\n disableFocusRipple = false,\n disableRipple = false,\n size = 'medium',\n ...other\n } = props;\n const ownerState = {\n ...props,\n edge,\n color,\n disabled,\n disableFocusRipple,\n disableRipple,\n size\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(IconButtonRoot, {\n className: clsx(classes.root, className),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n disableRipple: disableRipple,\n ref: ref,\n ...other,\n ownerState: ownerState,\n children: children\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? IconButton.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The icon to display.\n */\n children: chainPropTypes(PropTypes.node, props => {\n const found = React.Children.toArray(props.children).some(child => /*#__PURE__*/React.isValidElement(child) && child.props.onClick);\n if (found) {\n return new Error(['MUI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole <button> will be responsive to click events.'].join('\\n'));\n }\n return null;\n }),\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'default'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'default', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If given, uses a negative margin to counteract the padding on one\n * side (this is often helpful for aligning the left or right\n * side of the icon with content above or below, without ruining the border\n * size and shape).\n * @default false\n */\n edge: PropTypes.oneOf(['end', 'start', false]),\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default IconButton;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { inputBaseClasses } from \"../InputBase/index.js\";\nexport function getInputUtilityClass(slot) {\n return generateUtilityClass('MuiInput', slot);\n}\nconst inputClasses = {\n ...inputBaseClasses,\n ...generateUtilityClasses('MuiInput', ['root', 'underline', 'input'])\n};\nexport default inputClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport deepmerge from '@mui/utils/deepmerge';\nimport refType from '@mui/utils/refType';\nimport InputBase from \"../InputBase/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport inputClasses, { getInputUtilityClass } from \"./inputClasses.js\";\nimport { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from \"../InputBase/InputBase.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getInputUtilityClass, classes);\n return {\n ...classes,\n // forward classes to the InputBase\n ...composedClasses\n };\n};\nconst InputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInput',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];\n }\n})(memoTheme(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n if (theme.vars) {\n bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;\n }\n return {\n position: 'relative',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.formControl,\n style: {\n 'label + &': {\n marginTop: 16\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disableUnderline,\n style: {\n '&::after': {\n left: 0,\n bottom: 0,\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&.${inputClasses.focused}:after`]: {\n // translateX(0) is a workaround for Safari transform scale bug\n // See https://github.com/mui/material-ui/issues/31766\n transform: 'scaleX(1) translateX(0)'\n },\n [`&.${inputClasses.error}`]: {\n '&::before, &::after': {\n borderBottomColor: (theme.vars || theme).palette.error.main\n }\n },\n '&::before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&:hover:not(.${inputClasses.disabled}, .${inputClasses.error}):before`]: {\n borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: `1px solid ${bottomLineColor}`\n }\n },\n [`&.${inputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }\n }, ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color,\n disableUnderline: false\n },\n style: {\n '&::after': {\n borderBottom: `2px solid ${(theme.vars || theme).palette[color].main}`\n }\n }\n }))]\n };\n}));\nconst InputInput = styled(InputBaseInput, {\n name: 'MuiInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})({});\nconst Input = /*#__PURE__*/React.forwardRef(function Input(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiInput'\n });\n const {\n disableUnderline = false,\n components = {},\n componentsProps: componentsPropsProp,\n fullWidth = false,\n inputComponent = 'input',\n multiline = false,\n slotProps,\n slots = {},\n type = 'text',\n ...other\n } = props;\n const classes = useUtilityClasses(props);\n const ownerState = {\n disableUnderline\n };\n const inputComponentsProps = {\n root: {\n ownerState\n }\n };\n const componentsProps = slotProps ?? componentsPropsProp ? deepmerge(slotProps ?? componentsPropsProp, inputComponentsProps) : inputComponentsProps;\n const RootSlot = slots.root ?? components.Root ?? InputRoot;\n const InputSlot = slots.input ?? components.Input ?? InputInput;\n return /*#__PURE__*/_jsx(InputBase, {\n slots: {\n root: RootSlot,\n input: InputSlot\n },\n slotProps: componentsProps,\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type,\n ...other,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Input.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the `input` will not have an underline.\n * @default false\n */\n disableUnderline: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nif (Input) {\n Input.muiName = 'Input';\n}\nexport default Input;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputAdornmentUtilityClass(slot) {\n return generateUtilityClass('MuiInputAdornment', slot);\n}\nconst inputAdornmentClasses = generateUtilityClasses('MuiInputAdornment', ['root', 'filled', 'standard', 'outlined', 'positionStart', 'positionEnd', 'disablePointerEvents', 'hiddenLabel', 'sizeSmall']);\nexport default inputAdornmentClasses;","'use client';\n\nvar _span;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport Typography from \"../Typography/index.js\";\nimport FormControlContext from \"../FormControl/FormControlContext.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport inputAdornmentClasses, { getInputAdornmentUtilityClass } from \"./inputAdornmentClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`position${capitalize(ownerState.position)}`], ownerState.disablePointerEvents === true && styles.disablePointerEvents, styles[ownerState.variant]];\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePointerEvents,\n hiddenLabel,\n position,\n size,\n variant\n } = ownerState;\n const slots = {\n root: ['root', disablePointerEvents && 'disablePointerEvents', position && `position${capitalize(position)}`, variant, hiddenLabel && 'hiddenLabel', size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getInputAdornmentUtilityClass, classes);\n};\nconst InputAdornmentRoot = styled('div', {\n name: 'MuiInputAdornment',\n slot: 'Root',\n overridesResolver\n})(memoTheme(({\n theme\n}) => ({\n display: 'flex',\n maxHeight: '2em',\n alignItems: 'center',\n whiteSpace: 'nowrap',\n color: (theme.vars || theme).palette.action.active,\n variants: [{\n props: {\n variant: 'filled'\n },\n style: {\n [`&.${inputAdornmentClasses.positionStart}&:not(.${inputAdornmentClasses.hiddenLabel})`]: {\n marginTop: 16\n }\n }\n }, {\n props: {\n position: 'start'\n },\n style: {\n marginRight: 8\n }\n }, {\n props: {\n position: 'end'\n },\n style: {\n marginLeft: 8\n }\n }, {\n props: {\n disablePointerEvents: true\n },\n style: {\n pointerEvents: 'none'\n }\n }]\n})));\nconst InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiInputAdornment'\n });\n const {\n children,\n className,\n component = 'div',\n disablePointerEvents = false,\n disableTypography = false,\n position,\n variant: variantProp,\n ...other\n } = props;\n const muiFormControl = useFormControl() || {};\n let variant = variantProp;\n if (variantProp && muiFormControl.variant) {\n if (process.env.NODE_ENV !== 'production') {\n if (variantProp === muiFormControl.variant) {\n console.error('MUI: The `InputAdornment` variant infers the variant prop ' + 'you do not have to provide one.');\n }\n }\n }\n if (muiFormControl && !variant) {\n variant = muiFormControl.variant;\n }\n const ownerState = {\n ...props,\n hiddenLabel: muiFormControl.hiddenLabel,\n size: muiFormControl.size,\n disablePointerEvents,\n position,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(InputAdornmentRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: typeof children === 'string' && !disableTypography ? /*#__PURE__*/_jsx(Typography, {\n color: \"textSecondary\",\n children: children\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [position === 'start' ? ( /* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n children: \"\\u200B\"\n }))) : null, children]\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputAdornment.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally an `IconButton` or string.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Disable pointer events on the root.\n * This allows for the content of the adornment to focus the `input` on click.\n * @default false\n */\n disablePointerEvents: PropTypes.bool,\n /**\n * If children is a string then disable wrapping in a Typography component.\n * @default false\n */\n disableTypography: PropTypes.bool,\n /**\n * The position this adornment should appear relative to the `Input`.\n */\n position: PropTypes.oneOf(['end', 'start']).isRequired,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * Note: If you are using the `TextField` component or the `FormControl` component\n * you do not have to set this manually.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputAdornment;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_debounce as debounce, unstable_useForkRef as useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, unstable_ownerWindow as ownerWindow } from '@mui/utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction getStyleValue(value) {\n return parseInt(value, 10) || 0;\n}\nconst styles = {\n shadow: {\n // Visibility needed to hide the extra text area on iPads\n visibility: 'hidden',\n // Remove from the content flow\n position: 'absolute',\n // Ignore the scrollbar width\n overflow: 'hidden',\n height: 0,\n top: 0,\n left: 0,\n // Create a new layer, increase the isolation of the computed values\n transform: 'translateZ(0)'\n }\n};\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0 || obj.outerHeightStyle === 0 && !obj.overflowing;\n}\n\n/**\n *\n * Demos:\n *\n * - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)\n *\n * API:\n *\n * - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)\n */\nconst TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, forwardedRef) {\n const {\n onChange,\n maxRows,\n minRows = 1,\n style,\n value,\n ...other\n } = props;\n const {\n current: isControlled\n } = React.useRef(value != null);\n const inputRef = React.useRef(null);\n const handleRef = useForkRef(forwardedRef, inputRef);\n const heightRef = React.useRef(null);\n const shadowRef = React.useRef(null);\n const calculateTextareaStyles = React.useCallback(() => {\n const input = inputRef.current;\n const containerWindow = ownerWindow(input);\n const computedStyle = containerWindow.getComputedStyle(input);\n\n // If input's width is shrunk and it's not visible, don't sync height.\n if (computedStyle.width === '0px') {\n return {\n outerHeightStyle: 0,\n overflowing: false\n };\n }\n const inputShallow = shadowRef.current;\n inputShallow.style.width = computedStyle.width;\n inputShallow.value = input.value || props.placeholder || 'x';\n if (inputShallow.value.slice(-1) === '\\n') {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n inputShallow.value += ' ';\n }\n const boxSizing = computedStyle.boxSizing;\n const padding = getStyleValue(computedStyle.paddingBottom) + getStyleValue(computedStyle.paddingTop);\n const border = getStyleValue(computedStyle.borderBottomWidth) + getStyleValue(computedStyle.borderTopWidth);\n\n // The height of the inner content\n const innerHeight = inputShallow.scrollHeight;\n\n // Measure height of a textarea with a single row\n inputShallow.value = 'x';\n const singleRowHeight = inputShallow.scrollHeight;\n\n // The height of the outer content\n let outerHeight = innerHeight;\n if (minRows) {\n outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n }\n if (maxRows) {\n outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n }\n outerHeight = Math.max(outerHeight, singleRowHeight);\n\n // Take the box sizing into account for applying this value as a style.\n const outerHeightStyle = outerHeight + (boxSizing === 'border-box' ? padding + border : 0);\n const overflowing = Math.abs(outerHeight - innerHeight) <= 1;\n return {\n outerHeightStyle,\n overflowing\n };\n }, [maxRows, minRows, props.placeholder]);\n const syncHeight = React.useCallback(() => {\n const textareaStyles = calculateTextareaStyles();\n if (isEmpty(textareaStyles)) {\n return;\n }\n const outerHeightStyle = textareaStyles.outerHeightStyle;\n const input = inputRef.current;\n if (heightRef.current !== outerHeightStyle) {\n heightRef.current = outerHeightStyle;\n input.style.height = `${outerHeightStyle}px`;\n }\n input.style.overflow = textareaStyles.overflowing ? 'hidden' : '';\n }, [calculateTextareaStyles]);\n useEnhancedEffect(() => {\n const handleResize = () => {\n syncHeight();\n };\n // Workaround a \"ResizeObserver loop completed with undelivered notifications\" error\n // in test.\n // Note that we might need to use this logic in production per https://github.com/WICG/resize-observer/issues/38\n // Also see https://github.com/mui/mui-x/issues/8733\n let rAF;\n const rAFHandleResize = () => {\n cancelAnimationFrame(rAF);\n rAF = requestAnimationFrame(() => {\n handleResize();\n });\n };\n const debounceHandleResize = debounce(handleResize);\n const input = inputRef.current;\n const containerWindow = ownerWindow(input);\n containerWindow.addEventListener('resize', debounceHandleResize);\n let resizeObserver;\n if (typeof ResizeObserver !== 'undefined') {\n resizeObserver = new ResizeObserver(process.env.NODE_ENV === 'test' ? rAFHandleResize : handleResize);\n resizeObserver.observe(input);\n }\n return () => {\n debounceHandleResize.clear();\n cancelAnimationFrame(rAF);\n containerWindow.removeEventListener('resize', debounceHandleResize);\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n }, [calculateTextareaStyles, syncHeight]);\n useEnhancedEffect(() => {\n syncHeight();\n });\n const handleChange = event => {\n if (!isControlled) {\n syncHeight();\n }\n if (onChange) {\n onChange(event);\n }\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"textarea\", {\n value: value,\n onChange: handleChange,\n ref: handleRef\n // Apply the rows prop to get a \"correct\" first SSR paint\n ,\n rows: minRows,\n style: style,\n ...other\n }), /*#__PURE__*/_jsx(\"textarea\", {\n \"aria-hidden\": true,\n className: props.className,\n readOnly: true,\n ref: shadowRef,\n tabIndex: -1,\n style: {\n ...styles.shadow,\n ...style,\n paddingTop: 0,\n paddingBottom: 0\n }\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextareaAutosize.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * Maximum number of rows to display.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display.\n * @default 1\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n placeholder: PropTypes.string,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * @ignore\n */\n value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.number, PropTypes.string])\n} : void 0;\nexport default TextareaAutosize;","'use client';\n\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nvar _InputGlobalStyles;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport TextareaAutosize from \"../TextareaAutosize/index.js\";\nimport isHostComponent from \"../utils/isHostComponent.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport FormControlContext from \"../FormControl/FormControlContext.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled, globalCss } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport { isFilled } from \"./utils.js\";\nimport inputBaseClasses, { getInputBaseUtilityClass } from \"./inputBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const rootOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.formControl && styles.formControl, ownerState.startAdornment && styles.adornedStart, ownerState.endAdornment && styles.adornedEnd, ownerState.error && styles.error, ownerState.size === 'small' && styles.sizeSmall, ownerState.multiline && styles.multiline, ownerState.color && styles[`color${capitalize(ownerState.color)}`], ownerState.fullWidth && styles.fullWidth, ownerState.hiddenLabel && styles.hiddenLabel];\n};\nexport const inputOverridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.input, ownerState.size === 'small' && styles.inputSizeSmall, ownerState.multiline && styles.inputMultiline, ownerState.type === 'search' && styles.inputTypeSearch, ownerState.startAdornment && styles.inputAdornedStart, ownerState.endAdornment && styles.inputAdornedEnd, ownerState.hiddenLabel && styles.inputHiddenLabel];\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n disabled,\n error,\n endAdornment,\n focused,\n formControl,\n fullWidth,\n hiddenLabel,\n multiline,\n readOnly,\n size,\n startAdornment,\n type\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${capitalize(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],\n input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']\n };\n return composeClasses(slots, getInputBaseUtilityClass, classes);\n};\nexport const InputBaseRoot = styled('div', {\n name: 'MuiInputBase',\n slot: 'Root',\n overridesResolver: rootOverridesResolver\n})(memoTheme(({\n theme\n}) => ({\n ...theme.typography.body1,\n color: (theme.vars || theme).palette.text.primary,\n lineHeight: '1.4375em',\n // 23px\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n position: 'relative',\n cursor: 'text',\n display: 'inline-flex',\n alignItems: 'center',\n [`&.${inputBaseClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled,\n cursor: 'default'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: '4px 0 5px'\n }\n }, {\n props: ({\n ownerState,\n size\n }) => ownerState.multiline && size === 'small',\n style: {\n paddingTop: 1\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.fullWidth,\n style: {\n width: '100%'\n }\n }]\n})));\nexport const InputBaseInput = styled('input', {\n name: 'MuiInputBase',\n slot: 'Input',\n overridesResolver: inputOverridesResolver\n})(memoTheme(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n const placeholder = {\n color: 'currentColor',\n ...(theme.vars ? {\n opacity: theme.vars.opacity.inputPlaceholder\n } : {\n opacity: light ? 0.42 : 0.5\n }),\n transition: theme.transitions.create('opacity', {\n duration: theme.transitions.duration.shorter\n })\n };\n const placeholderHidden = {\n opacity: '0 !important'\n };\n const placeholderVisible = theme.vars ? {\n opacity: theme.vars.opacity.inputPlaceholder\n } : {\n opacity: light ? 0.42 : 0.5\n };\n return {\n font: 'inherit',\n letterSpacing: 'inherit',\n color: 'currentColor',\n padding: '4px 0 5px',\n border: 0,\n boxSizing: 'content-box',\n background: 'none',\n height: '1.4375em',\n // Reset 23pxthe native input line-height\n margin: 0,\n // Reset for Safari\n WebkitTapHighlightColor: 'transparent',\n display: 'block',\n // Make the flex item shrink with Firefox\n minWidth: 0,\n width: '100%',\n '&::-webkit-input-placeholder': placeholder,\n '&::-moz-placeholder': placeholder,\n // Firefox 19+\n '&::-ms-input-placeholder': placeholder,\n // Edge\n '&:focus': {\n outline: 0\n },\n // Reset Firefox invalid required input style\n '&:invalid': {\n boxShadow: 'none'\n },\n '&::-webkit-search-decoration': {\n // Remove the padding when type=search.\n WebkitAppearance: 'none'\n },\n // Show and hide the placeholder logic\n [`label[data-shrink=false] + .${inputBaseClasses.formControl} &`]: {\n '&::-webkit-input-placeholder': placeholderHidden,\n '&::-moz-placeholder': placeholderHidden,\n // Firefox 19+\n '&::-ms-input-placeholder': placeholderHidden,\n // Edge\n '&:focus::-webkit-input-placeholder': placeholderVisible,\n '&:focus::-moz-placeholder': placeholderVisible,\n // Firefox 19+\n '&:focus::-ms-input-placeholder': placeholderVisible // Edge\n },\n [`&.${inputBaseClasses.disabled}`]: {\n opacity: 1,\n // Reset iOS opacity\n WebkitTextFillColor: (theme.vars || theme).palette.text.disabled // Fix opacity Safari bug\n },\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInjectingGlobalStyles,\n style: {\n animationName: 'mui-auto-fill-cancel',\n animationDuration: '10ms',\n '&:-webkit-autofill': {\n animationDuration: '5000s',\n animationName: 'mui-auto-fill'\n }\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n paddingTop: 1\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n height: 'auto',\n resize: 'none',\n padding: 0,\n paddingTop: 0\n }\n }, {\n props: {\n type: 'search'\n },\n style: {\n MozAppearance: 'textfield' // Improve type search style.\n }\n }]\n };\n}));\nconst InputGlobalStyles = globalCss({\n '@keyframes mui-auto-fill': {\n from: {\n display: 'block'\n }\n },\n '@keyframes mui-auto-fill-cancel': {\n from: {\n display: 'block'\n }\n }\n});\n\n/**\n * `InputBase` contains as few styles as possible.\n * It aims to be a simple building block for creating an input.\n * It contains a load of style reset and some state logic.\n */\nconst InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiInputBase'\n });\n const {\n 'aria-describedby': ariaDescribedby,\n autoComplete,\n autoFocus,\n className,\n color,\n components = {},\n componentsProps = {},\n defaultValue,\n disabled,\n disableInjectingGlobalStyles,\n endAdornment,\n error,\n fullWidth = false,\n id,\n inputComponent = 'input',\n inputProps: inputPropsProp = {},\n inputRef: inputRefProp,\n margin,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onClick,\n onFocus,\n onKeyDown,\n onKeyUp,\n placeholder,\n readOnly,\n renderSuffix,\n rows,\n size,\n slotProps = {},\n slots = {},\n startAdornment,\n type = 'text',\n value: valueProp,\n ...other\n } = props;\n const value = inputPropsProp.value != null ? inputPropsProp.value : valueProp;\n const {\n current: isControlled\n } = React.useRef(value != null);\n const inputRef = React.useRef();\n const handleInputRefWarning = React.useCallback(instance => {\n if (process.env.NODE_ENV !== 'production') {\n if (instance && instance.nodeName !== 'INPUT' && !instance.focus) {\n console.error(['MUI: You have provided a `inputComponent` to the input component', 'that does not correctly handle the `ref` prop.', 'Make sure the `ref` prop is called with a HTMLInputElement.'].join('\\n'));\n }\n }\n }, []);\n const handleInputRef = useForkRef(inputRef, inputRefProp, inputPropsProp.ref, handleInputRefWarning);\n const [focused, setFocused] = React.useState(false);\n const muiFormControl = useFormControl();\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (muiFormControl) {\n return muiFormControl.registerEffect();\n }\n return undefined;\n }, [muiFormControl]);\n }\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'hiddenLabel', 'size', 'required', 'filled']\n });\n fcs.focused = muiFormControl ? muiFormControl.focused : focused;\n\n // The blur won't fire when the disabled state is set on a focused input.\n // We need to book keep the focused state manually.\n React.useEffect(() => {\n if (!muiFormControl && disabled && focused) {\n setFocused(false);\n if (onBlur) {\n onBlur();\n }\n }\n }, [muiFormControl, disabled, focused, onBlur]);\n const onFilled = muiFormControl && muiFormControl.onFilled;\n const onEmpty = muiFormControl && muiFormControl.onEmpty;\n const checkDirty = React.useCallback(obj => {\n if (isFilled(obj)) {\n if (onFilled) {\n onFilled();\n }\n } else if (onEmpty) {\n onEmpty();\n }\n }, [onFilled, onEmpty]);\n useEnhancedEffect(() => {\n if (isControlled) {\n checkDirty({\n value\n });\n }\n }, [value, checkDirty, isControlled]);\n const handleFocus = event => {\n if (onFocus) {\n onFocus(event);\n }\n if (inputPropsProp.onFocus) {\n inputPropsProp.onFocus(event);\n }\n if (muiFormControl && muiFormControl.onFocus) {\n muiFormControl.onFocus(event);\n } else {\n setFocused(true);\n }\n };\n const handleBlur = event => {\n if (onBlur) {\n onBlur(event);\n }\n if (inputPropsProp.onBlur) {\n inputPropsProp.onBlur(event);\n }\n if (muiFormControl && muiFormControl.onBlur) {\n muiFormControl.onBlur(event);\n } else {\n setFocused(false);\n }\n };\n const handleChange = (event, ...args) => {\n if (!isControlled) {\n const element = event.target || inputRef.current;\n if (element == null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Expected valid input target. Did you use a custom \\`inputComponent\\` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.` : _formatMuiErrorMessage(1));\n }\n checkDirty({\n value: element.value\n });\n }\n if (inputPropsProp.onChange) {\n inputPropsProp.onChange(event, ...args);\n }\n\n // Perform in the willUpdate\n if (onChange) {\n onChange(event, ...args);\n }\n };\n\n // Check the input state on mount, in case it was filled by the user\n // or auto filled by the browser before the hydration (for SSR).\n React.useEffect(() => {\n checkDirty(inputRef.current);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n const handleClick = event => {\n if (inputRef.current && event.currentTarget === event.target) {\n inputRef.current.focus();\n }\n if (onClick) {\n onClick(event);\n }\n };\n let InputComponent = inputComponent;\n let inputProps = inputPropsProp;\n if (multiline && InputComponent === 'input') {\n if (rows) {\n if (process.env.NODE_ENV !== 'production') {\n if (minRows || maxRows) {\n console.warn('MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set.');\n }\n }\n inputProps = {\n type: undefined,\n minRows: rows,\n maxRows: rows,\n ...inputProps\n };\n } else {\n inputProps = {\n type: undefined,\n maxRows,\n minRows,\n ...inputProps\n };\n }\n InputComponent = TextareaAutosize;\n }\n const handleAutoFill = event => {\n // Provide a fake value as Chrome might not let you access it for security reasons.\n checkDirty(event.animationName === 'mui-auto-fill-cancel' ? inputRef.current : {\n value: 'x'\n });\n };\n React.useEffect(() => {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n const ownerState = {\n ...props,\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n endAdornment,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n startAdornment,\n type\n };\n const classes = useUtilityClasses(ownerState);\n const Root = slots.root || components.Root || InputBaseRoot;\n const rootProps = slotProps.root || componentsProps.root || {};\n const Input = slots.input || components.Input || InputBaseInput;\n inputProps = {\n ...inputProps,\n ...(slotProps.input ?? componentsProps.input)\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && ( // For Emotion/Styled-components, InputGlobalStyles will be a function\n // For Pigment CSS, this has no effect because the InputGlobalStyles will be null.\n _InputGlobalStyles || (_InputGlobalStyles = /*#__PURE__*/_jsx(InputGlobalStyles, {}))), /*#__PURE__*/_jsxs(Root, {\n ...rootProps,\n ref: ref,\n onClick: handleClick,\n ...other,\n ...(!isHostComponent(Root) && {\n ownerState: {\n ...ownerState,\n ...rootProps.ownerState\n }\n }),\n className: clsx(classes.root, rootProps.className, className, readOnly && 'MuiInputBase-readOnly'),\n children: [startAdornment, /*#__PURE__*/_jsx(FormControlContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(Input, {\n \"aria-invalid\": fcs.error,\n \"aria-describedby\": ariaDescribedby,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n disabled: fcs.disabled,\n id: id,\n onAnimationStart: handleAutoFill,\n name: name,\n placeholder: placeholder,\n readOnly: readOnly,\n required: fcs.required,\n rows: rows,\n value: value,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n type: type,\n ...inputProps,\n ...(!isHostComponent(Input) && {\n as: InputComponent,\n ownerState: {\n ...ownerState,\n ...inputProps.ownerState\n }\n }),\n ref: handleInputRef,\n className: clsx(classes.input, inputProps.className, readOnly && 'MuiInputBase-readOnly'),\n onBlur: handleBlur,\n onChange: handleChange,\n onFocus: handleFocus\n })\n }), endAdornment, renderSuffix ? renderSuffix({\n ...fcs,\n startAdornment\n }) : null]\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputBase.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, GlobalStyles for the auto-fill keyframes will not be injected/removed on mount/unmount. Make sure to inject them at the top of your application.\n * This option is intended to help with boosting the initial rendering performance if you are loading a big amount of Input components at once.\n * @default false\n */\n disableInjectingGlobalStyles: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: elementTypeAcceptingRef,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the `input` is blurred.\n *\n * Notice that the first argument (event) might be undefined.\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * Callback fired when the `input` doesn't satisfy its constraints.\n */\n onInvalid: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * @ignore\n */\n onKeyUp: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * @ignore\n */\n renderSuffix: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The size of the component.\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.object,\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nexport default InputBase;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputBaseUtilityClass(slot) {\n return generateUtilityClass('MuiInputBase', slot);\n}\nconst inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);\nexport default inputBaseClasses;","// Supports determination of isControlled().\n// Controlled input accepts its current value as a prop.\n//\n// @see https://facebook.github.io/react/docs/forms.html#controlled-components\n// @param value\n// @returns {boolean} true if string (including '') or number (including zero)\nexport function hasValue(value) {\n return value != null && !(Array.isArray(value) && value.length === 0);\n}\n\n// Determine if field is empty or filled.\n// Response determines if label is presented above field or as placeholder.\n//\n// @param obj\n// @param SSR\n// @returns {boolean} False when not present or empty string.\n// True when any number or string with length.\nexport function isFilled(obj, SSR = false) {\n return obj && (hasValue(obj.value) && obj.value !== '' || SSR && hasValue(obj.defaultValue) && obj.defaultValue !== '');\n}\n\n// Determine if an Input is adorned on start.\n// It's corresponding to the left with LTR.\n//\n// @param obj\n// @returns {boolean} False when no adornments.\n// True when adorned at the start.\nexport function isAdornedStart(obj) {\n return obj.startAdornment;\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListUtilityClass(slot) {\n return generateUtilityClass('MuiList', slot);\n}\nconst listClasses = generateUtilityClasses('MuiList', ['root', 'padding', 'dense', 'subheader']);\nexport default listClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"./ListContext.js\";\nimport { getListUtilityClass } from \"./listClasses.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disablePadding,\n dense,\n subheader\n } = ownerState;\n const slots = {\n root: ['root', !disablePadding && 'padding', dense && 'dense', subheader && 'subheader']\n };\n return composeClasses(slots, getListUtilityClass, classes);\n};\nconst ListRoot = styled('ul', {\n name: 'MuiList',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disablePadding && styles.padding, ownerState.dense && styles.dense, ownerState.subheader && styles.subheader];\n }\n})({\n listStyle: 'none',\n margin: 0,\n padding: 0,\n position: 'relative',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disablePadding,\n style: {\n paddingTop: 8,\n paddingBottom: 8\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.subheader,\n style: {\n paddingTop: 0\n }\n }]\n});\nconst List = /*#__PURE__*/React.forwardRef(function List(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiList'\n });\n const {\n children,\n className,\n component = 'ul',\n dense = false,\n disablePadding = false,\n subheader,\n ...other\n } = props;\n const context = React.useMemo(() => ({\n dense\n }), [dense]);\n const ownerState = {\n ...props,\n component,\n dense,\n disablePadding\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: context,\n children: /*#__PURE__*/_jsxs(ListRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ownerState: ownerState,\n ...other,\n children: [subheader, children]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? List.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default List;","'use client';\n\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nconst ListContext = /*#__PURE__*/React.createContext({});\nif (process.env.NODE_ENV !== 'production') {\n ListContext.displayName = 'ListContext';\n}\nexport default ListContext;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemUtilityClass(slot) {\n return generateUtilityClass('MuiListItem', slot);\n}\nconst listItemClasses = generateUtilityClasses('MuiListItem', ['root', 'container', 'dense', 'alignItemsFlexStart', 'divider', 'gutters', 'padding', 'secondaryAction']);\nexport default listItemClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemButtonUtilityClass(slot) {\n return generateUtilityClass('MuiListItemButton', slot);\n}\nconst listItemButtonClasses = generateUtilityClasses('MuiListItemButton', ['root', 'focusVisible', 'dense', 'alignItemsFlexStart', 'disabled', 'divider', 'gutters', 'selected']);\nexport default listItemButtonClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemSecondaryActionClassesUtilityClass(slot) {\n return generateUtilityClass('MuiListItemSecondaryAction', slot);\n}\nconst listItemSecondaryActionClasses = generateUtilityClasses('MuiListItemSecondaryAction', ['root', 'disableGutters']);\nexport default listItemSecondaryActionClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"../List/ListContext.js\";\nimport { getListItemSecondaryActionClassesUtilityClass } from \"./listItemSecondaryActionClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disableGutters,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disableGutters && 'disableGutters']\n };\n return composeClasses(slots, getListItemSecondaryActionClassesUtilityClass, classes);\n};\nconst ListItemSecondaryActionRoot = styled('div', {\n name: 'MuiListItemSecondaryAction',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.disableGutters && styles.disableGutters];\n }\n})({\n position: 'absolute',\n right: 16,\n top: '50%',\n transform: 'translateY(-50%)',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.disableGutters,\n style: {\n right: 0\n }\n }]\n});\n\n/**\n * Must be used as the last child of ListItem to function properly.\n *\n * @deprecated Use the `secondaryAction` prop in the `ListItem` component instead. This component will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\nconst ListItemSecondaryAction = /*#__PURE__*/React.forwardRef(function ListItemSecondaryAction(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiListItemSecondaryAction'\n });\n const {\n className,\n ...other\n } = props;\n const context = React.useContext(ListContext);\n const ownerState = {\n ...props,\n disableGutters: context.disableGutters\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(ListItemSecondaryActionRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemSecondaryAction.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component, normally an `IconButton` or selection control.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nListItemSecondaryAction.muiName = 'ListItemSecondaryAction';\nexport default ListItemSecondaryAction;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport isHostComponent from \"../utils/isHostComponent.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport isMuiElement from \"../utils/isMuiElement.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport ListContext from \"../List/ListContext.js\";\nimport { getListItemUtilityClass } from \"./listItemClasses.js\";\nimport { listItemButtonClasses } from \"../ListItemButton/index.js\";\nimport ListItemSecondaryAction from \"../ListItemSecondaryAction/index.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters, !ownerState.disablePadding && styles.padding, ownerState.hasSecondaryAction && styles.secondaryAction];\n};\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes,\n dense,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', !disableGutters && 'gutters', !disablePadding && 'padding', divider && 'divider', alignItems === 'flex-start' && 'alignItemsFlexStart', hasSecondaryAction && 'secondaryAction'],\n container: ['container']\n };\n return composeClasses(slots, getListItemUtilityClass, classes);\n};\nexport const ListItemRoot = styled('div', {\n name: 'MuiListItem',\n slot: 'Root',\n overridesResolver\n})(memoTheme(({\n theme\n}) => ({\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n width: '100%',\n boxSizing: 'border-box',\n textAlign: 'left',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disablePadding,\n style: {\n paddingTop: 8,\n paddingBottom: 8\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disablePadding && ownerState.dense,\n style: {\n paddingTop: 4,\n paddingBottom: 4\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disablePadding && !ownerState.disableGutters,\n style: {\n paddingLeft: 16,\n paddingRight: 16\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disablePadding && !!ownerState.secondaryAction,\n style: {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.secondaryAction,\n style: {\n [`& > .${listItemButtonClasses.root}`]: {\n paddingRight: 48\n }\n }\n }, {\n props: {\n alignItems: 'flex-start'\n },\n style: {\n alignItems: 'flex-start'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.divider,\n style: {\n borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,\n backgroundClip: 'padding-box'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.button,\n style: {\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: (theme.vars || theme).palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.hasSecondaryAction,\n style: {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n }\n }]\n})));\nconst ListItemContainer = styled('li', {\n name: 'MuiListItem',\n slot: 'Container',\n overridesResolver: (props, styles) => styles.container\n})({\n position: 'relative'\n});\n\n/**\n * Uses an additional container component if `ListItemSecondaryAction` is the last child.\n */\nconst ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiListItem'\n });\n const {\n alignItems = 'center',\n children: childrenProp,\n className,\n component: componentProp,\n components = {},\n componentsProps = {},\n ContainerComponent = 'li',\n ContainerProps: {\n className: ContainerClassName,\n ...ContainerProps\n } = {},\n dense = false,\n disableGutters = false,\n disablePadding = false,\n divider = false,\n secondaryAction,\n slotProps = {},\n slots = {},\n ...other\n } = props;\n const context = React.useContext(ListContext);\n const childContext = React.useMemo(() => ({\n dense: dense || context.dense || false,\n alignItems,\n disableGutters\n }), [alignItems, context.dense, dense, disableGutters]);\n const listItemRef = React.useRef(null);\n const children = React.Children.toArray(childrenProp);\n\n // v4 implementation, deprecated in v6, will be removed in v7\n const hasSecondaryAction = children.length && isMuiElement(children[children.length - 1], ['ListItemSecondaryAction']);\n const ownerState = {\n ...props,\n alignItems,\n dense: childContext.dense,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction\n };\n const classes = useUtilityClasses(ownerState);\n const handleRef = useForkRef(listItemRef, ref);\n const Root = slots.root || components.Root || ListItemRoot;\n const rootProps = slotProps.root || componentsProps.root || {};\n const componentProps = {\n className: clsx(classes.root, rootProps.className, className),\n ...other\n };\n let Component = componentProp || 'li';\n\n // v4 implementation, deprecated in v6, will be removed in v7\n if (hasSecondaryAction) {\n // Use div by default.\n Component = !componentProps.component && !componentProp ? 'div' : Component;\n\n // Avoid nesting of li > li.\n if (ContainerComponent === 'li') {\n if (Component === 'li') {\n Component = 'div';\n } else if (componentProps.component === 'li') {\n componentProps.component = 'div';\n }\n }\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsxs(ListItemContainer, {\n as: ContainerComponent,\n className: clsx(classes.container, ContainerClassName),\n ref: handleRef,\n ownerState: ownerState,\n ...ContainerProps,\n children: [/*#__PURE__*/_jsx(Root, {\n ...rootProps,\n ...(!isHostComponent(Root) && {\n as: Component,\n ownerState: {\n ...ownerState,\n ...rootProps.ownerState\n }\n }),\n ...componentProps,\n children: children\n }), children.pop()]\n })\n });\n }\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsxs(Root, {\n ...rootProps,\n as: Component,\n ref: handleRef,\n ...(!isHostComponent(Root) && {\n ownerState: {\n ...ownerState,\n ...rootProps.ownerState\n }\n }),\n ...componentProps,\n children: [children, secondaryAction && /*#__PURE__*/_jsx(ListItemSecondaryAction, {\n children: secondaryAction\n })]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItem.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Defines the `align-items` style property.\n * @default 'center'\n */\n alignItems: PropTypes.oneOf(['center', 'flex-start']),\n /**\n * The content of the component if a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: chainPropTypes(PropTypes.node, props => {\n const children = React.Children.toArray(props.children);\n\n // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction)\n let secondaryActionIndex = -1;\n for (let i = children.length - 1; i >= 0; i -= 1) {\n const child = children[i];\n if (isMuiElement(child, ['ListItemSecondaryAction'])) {\n secondaryActionIndex = i;\n break;\n }\n }\n\n // is ListItemSecondaryAction the last child of ListItem\n if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {\n return new Error('MUI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');\n }\n return null;\n }),\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.object\n }),\n /**\n * The container component used when a `ListItemSecondaryAction` is the last child.\n * @default 'li'\n * @deprecated Use the `component` or `slots.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n ContainerComponent: elementTypeAcceptingRef,\n /**\n * Props applied to the container component if used.\n * @default {}\n * @deprecated Use the `slotProps.root` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n ContainerProps: PropTypes.object,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent List component.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * If `true`, all padding is removed.\n * @default false\n */\n disablePadding: PropTypes.bool,\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n * @default false\n */\n divider: PropTypes.bool,\n /**\n * The element to display at the end of ListItem.\n */\n secondaryAction: PropTypes.node,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ListItem;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport Typography, { typographyClasses } from \"../Typography/index.js\";\nimport ListContext from \"../List/ListContext.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport listItemTextClasses, { getListItemTextUtilityClass } from \"./listItemTextClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n inset,\n primary,\n secondary,\n dense\n } = ownerState;\n const slots = {\n root: ['root', inset && 'inset', dense && 'dense', primary && secondary && 'multiline'],\n primary: ['primary'],\n secondary: ['secondary']\n };\n return composeClasses(slots, getListItemTextUtilityClass, classes);\n};\nconst ListItemTextRoot = styled('div', {\n name: 'MuiListItemText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${listItemTextClasses.primary}`]: styles.primary\n }, {\n [`& .${listItemTextClasses.secondary}`]: styles.secondary\n }, styles.root, ownerState.inset && styles.inset, ownerState.primary && ownerState.secondary && styles.multiline, ownerState.dense && styles.dense];\n }\n})({\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4,\n [`.${typographyClasses.root}:where(& .${listItemTextClasses.primary})`]: {\n display: 'block'\n },\n [`.${typographyClasses.root}:where(& .${listItemTextClasses.secondary})`]: {\n display: 'block'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.primary && ownerState.secondary,\n style: {\n marginTop: 6,\n marginBottom: 6\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.inset,\n style: {\n paddingLeft: 56\n }\n }]\n});\nconst ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiListItemText'\n });\n const {\n children,\n className,\n disableTypography = false,\n inset = false,\n primary: primaryProp,\n primaryTypographyProps,\n secondary: secondaryProp,\n secondaryTypographyProps,\n ...other\n } = props;\n const {\n dense\n } = React.useContext(ListContext);\n let primary = primaryProp != null ? primaryProp : children;\n let secondary = secondaryProp;\n const ownerState = {\n ...props,\n disableTypography,\n inset,\n primary: !!primary,\n secondary: !!secondary,\n dense\n };\n const classes = useUtilityClasses(ownerState);\n if (primary != null && primary.type !== Typography && !disableTypography) {\n primary = /*#__PURE__*/_jsx(Typography, {\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: primaryTypographyProps?.variant ? undefined : 'span',\n ...primaryTypographyProps,\n children: primary\n });\n }\n if (secondary != null && secondary.type !== Typography && !disableTypography) {\n secondary = /*#__PURE__*/_jsx(Typography, {\n variant: \"body2\",\n className: classes.secondary,\n color: \"textSecondary\",\n ...secondaryTypographyProps,\n children: secondary\n });\n }\n return /*#__PURE__*/_jsxs(ListItemTextRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other,\n children: [primary, secondary]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItemText.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Alias for the `primary` prop.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n * @default false\n */\n disableTypography: PropTypes.bool,\n /**\n * If `true`, the children are indented.\n * This should be used if there is no left avatar or left icon.\n * @default false\n */\n inset: PropTypes.bool,\n /**\n * The main content element.\n */\n primary: PropTypes.node,\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: PropTypes.object,\n /**\n * The secondary content element.\n */\n secondary: PropTypes.node,\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default ListItemText;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemTextUtilityClass(slot) {\n return generateUtilityClass('MuiListItemText', slot);\n}\nconst listItemTextClasses = generateUtilityClasses('MuiListItemText', ['root', 'multiline', 'dense', 'inset', 'primary', 'secondary']);\nexport default listItemTextClasses;","import { unstable_ownerWindow as ownerWindow, unstable_ownerDocument as ownerDocument, unstable_getScrollbarSize as getScrollbarSize } from '@mui/utils';\n// Is a vertical scrollbar displayed?\nfunction isOverflowing(container) {\n const doc = ownerDocument(container);\n if (doc.body === container) {\n return ownerWindow(container).innerWidth > doc.documentElement.clientWidth;\n }\n return container.scrollHeight > container.clientHeight;\n}\nexport function ariaHidden(element, show) {\n if (show) {\n element.setAttribute('aria-hidden', 'true');\n } else {\n element.removeAttribute('aria-hidden');\n }\n}\nfunction getPaddingRight(element) {\n return parseInt(ownerWindow(element).getComputedStyle(element).paddingRight, 10) || 0;\n}\nfunction isAriaHiddenForbiddenOnElement(element) {\n // The forbidden HTML tags are the ones from ARIA specification that\n // can be children of body and can't have aria-hidden attribute.\n // cf. https://www.w3.org/TR/html-aria/#docconformance\n const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];\n const isForbiddenTagName = forbiddenTagNames.indexOf(element.tagName) !== -1;\n const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';\n return isForbiddenTagName || isInputHidden;\n}\nfunction ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {\n const blacklist = [mountElement, currentElement, ...elementsToExclude];\n [].forEach.call(container.children, element => {\n const isNotExcludedElement = blacklist.indexOf(element) === -1;\n const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);\n if (isNotExcludedElement && isNotForbiddenElement) {\n ariaHidden(element, show);\n }\n });\n}\nfunction findIndexOf(items, callback) {\n let idx = -1;\n items.some((item, index) => {\n if (callback(item)) {\n idx = index;\n return true;\n }\n return false;\n });\n return idx;\n}\nfunction handleContainer(containerInfo, props) {\n const restoreStyle = [];\n const container = containerInfo.container;\n if (!props.disableScrollLock) {\n if (isOverflowing(container)) {\n // Compute the size before applying overflow hidden to avoid any scroll jumps.\n const scrollbarSize = getScrollbarSize(ownerDocument(container));\n restoreStyle.push({\n value: container.style.paddingRight,\n property: 'padding-right',\n el: container\n });\n // Use computed style, here to get the real padding to add our scrollbar width.\n container.style.paddingRight = `${getPaddingRight(container) + scrollbarSize}px`;\n\n // .mui-fixed is a global helper.\n const fixedElements = ownerDocument(container).querySelectorAll('.mui-fixed');\n [].forEach.call(fixedElements, element => {\n restoreStyle.push({\n value: element.style.paddingRight,\n property: 'padding-right',\n el: element\n });\n element.style.paddingRight = `${getPaddingRight(element) + scrollbarSize}px`;\n });\n }\n let scrollContainer;\n if (container.parentNode instanceof DocumentFragment) {\n scrollContainer = ownerDocument(container).body;\n } else {\n // Support html overflow-y: auto for scroll stability between pages\n // https://css-tricks.com/snippets/css/force-vertical-scrollbar/\n const parent = container.parentElement;\n const containerWindow = ownerWindow(container);\n scrollContainer = parent?.nodeName === 'HTML' && containerWindow.getComputedStyle(parent).overflowY === 'scroll' ? parent : container;\n }\n\n // Block the scroll even if no scrollbar is visible to account for mobile keyboard\n // screensize shrink.\n restoreStyle.push({\n value: scrollContainer.style.overflow,\n property: 'overflow',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowX,\n property: 'overflow-x',\n el: scrollContainer\n }, {\n value: scrollContainer.style.overflowY,\n property: 'overflow-y',\n el: scrollContainer\n });\n scrollContainer.style.overflow = 'hidden';\n }\n const restore = () => {\n restoreStyle.forEach(({\n value,\n el,\n property\n }) => {\n if (value) {\n el.style.setProperty(property, value);\n } else {\n el.style.removeProperty(property);\n }\n });\n };\n return restore;\n}\nfunction getHiddenSiblings(container) {\n const hiddenSiblings = [];\n [].forEach.call(container.children, element => {\n if (element.getAttribute('aria-hidden') === 'true') {\n hiddenSiblings.push(element);\n }\n });\n return hiddenSiblings;\n}\n/**\n * @ignore - do not document.\n *\n * Proper state management for containers and the modals in those containers.\n * Simplified, but inspired by react-overlay's ModalManager class.\n * Used by the Modal to ensure proper styling of containers.\n */\nexport class ModalManager {\n constructor() {\n this.modals = [];\n this.containers = [];\n }\n add(modal, container) {\n let modalIndex = this.modals.indexOf(modal);\n if (modalIndex !== -1) {\n return modalIndex;\n }\n modalIndex = this.modals.length;\n this.modals.push(modal);\n\n // If the modal we are adding is already in the DOM.\n if (modal.modalRef) {\n ariaHidden(modal.modalRef, false);\n }\n const hiddenSiblings = getHiddenSiblings(container);\n ariaHiddenSiblings(container, modal.mount, modal.modalRef, hiddenSiblings, true);\n const containerIndex = findIndexOf(this.containers, item => item.container === container);\n if (containerIndex !== -1) {\n this.containers[containerIndex].modals.push(modal);\n return modalIndex;\n }\n this.containers.push({\n modals: [modal],\n container,\n restore: null,\n hiddenSiblings\n });\n return modalIndex;\n }\n mount(modal, props) {\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n if (!containerInfo.restore) {\n containerInfo.restore = handleContainer(containerInfo, props);\n }\n }\n remove(modal, ariaHiddenState = true) {\n const modalIndex = this.modals.indexOf(modal);\n if (modalIndex === -1) {\n return modalIndex;\n }\n const containerIndex = findIndexOf(this.containers, item => item.modals.indexOf(modal) !== -1);\n const containerInfo = this.containers[containerIndex];\n containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);\n this.modals.splice(modalIndex, 1);\n\n // If that was the last modal in a container, clean up the container.\n if (containerInfo.modals.length === 0) {\n // The modal might be closed before it had the chance to be mounted in the DOM.\n if (containerInfo.restore) {\n containerInfo.restore();\n }\n if (modal.modalRef) {\n // In case the modal wasn't in the DOM yet.\n ariaHidden(modal.modalRef, ariaHiddenState);\n }\n ariaHiddenSiblings(containerInfo.container, modal.mount, modal.modalRef, containerInfo.hiddenSiblings, false);\n this.containers.splice(containerIndex, 1);\n } else {\n // Otherwise make sure the next top modal is visible to a screen reader.\n const nextTop = containerInfo.modals[containerInfo.modals.length - 1];\n // as soon as a modal is adding its modalRef is undefined. it can't set\n // aria-hidden because the dom element doesn't exist either\n // when modal was unmounted before modalRef gets null\n if (nextTop.modalRef) {\n ariaHidden(nextTop.modalRef, false);\n }\n }\n return modalIndex;\n }\n isTopModal(modal) {\n return this.modals.length > 0 && this.modals[this.modals.length - 1] === modal;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_createChainedFunction as createChainedFunction } from '@mui/utils';\nimport extractEventHandlers from '@mui/utils/extractEventHandlers';\nimport { ModalManager, ariaHidden } from \"./ModalManager.js\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\nfunction getHasTransition(children) {\n return children ? children.props.hasOwnProperty('in') : false;\n}\n\n// A modal manager used to track and manage the state of open Modals.\n// Modals don't open on the server so this won't conflict with concurrent requests.\nconst defaultManager = new ModalManager();\n/**\n *\n * Demos:\n *\n * - [Modal](https://mui.com/base-ui/react-modal/#hook)\n *\n * API:\n *\n * - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)\n */\nfunction useModal(parameters) {\n const {\n container,\n disableEscapeKeyDown = false,\n disableScrollLock = false,\n // @ts-ignore internal logic - Base UI supports the manager as a prop too\n manager = defaultManager,\n closeAfterTransition = false,\n onTransitionEnter,\n onTransitionExited,\n children,\n onClose,\n open,\n rootRef\n } = parameters;\n\n // @ts-ignore internal logic\n const modal = React.useRef({});\n const mountNodeRef = React.useRef(null);\n const modalRef = React.useRef(null);\n const handleRef = useForkRef(modalRef, rootRef);\n const [exited, setExited] = React.useState(!open);\n const hasTransition = getHasTransition(children);\n let ariaHiddenProp = true;\n if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {\n ariaHiddenProp = false;\n }\n const getDoc = () => ownerDocument(mountNodeRef.current);\n const getModal = () => {\n modal.current.modalRef = modalRef.current;\n modal.current.mount = mountNodeRef.current;\n return modal.current;\n };\n const handleMounted = () => {\n manager.mount(getModal(), {\n disableScrollLock\n });\n\n // Fix a bug on Chrome where the scroll isn't initially 0.\n if (modalRef.current) {\n modalRef.current.scrollTop = 0;\n }\n };\n const handleOpen = useEventCallback(() => {\n const resolvedContainer = getContainer(container) || getDoc().body;\n manager.add(getModal(), resolvedContainer);\n\n // The element was already mounted.\n if (modalRef.current) {\n handleMounted();\n }\n });\n const isTopModal = React.useCallback(() => manager.isTopModal(getModal()), [manager]);\n const handlePortalRef = useEventCallback(node => {\n mountNodeRef.current = node;\n if (!node) {\n return;\n }\n if (open && isTopModal()) {\n handleMounted();\n } else if (modalRef.current) {\n ariaHidden(modalRef.current, ariaHiddenProp);\n }\n });\n const handleClose = React.useCallback(() => {\n manager.remove(getModal(), ariaHiddenProp);\n }, [ariaHiddenProp, manager]);\n React.useEffect(() => {\n return () => {\n handleClose();\n };\n }, [handleClose]);\n React.useEffect(() => {\n if (open) {\n handleOpen();\n } else if (!hasTransition || !closeAfterTransition) {\n handleClose();\n }\n }, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);\n const createHandleKeyDown = otherHandlers => event => {\n otherHandlers.onKeyDown?.(event);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n if (event.key !== 'Escape' || event.which === 229 ||\n // Wait until IME is settled.\n !isTopModal()) {\n return;\n }\n if (!disableEscapeKeyDown) {\n // Swallow the event, in case someone is listening for the escape key on the body.\n event.stopPropagation();\n if (onClose) {\n onClose(event, 'escapeKeyDown');\n }\n }\n };\n const createHandleBackdropClick = otherHandlers => event => {\n otherHandlers.onClick?.(event);\n if (event.target !== event.currentTarget) {\n return;\n }\n if (onClose) {\n onClose(event, 'backdropClick');\n }\n };\n const getRootProps = (otherHandlers = {}) => {\n const propsEventHandlers = extractEventHandlers(parameters);\n\n // The custom event handlers shouldn't be spread on the root element\n delete propsEventHandlers.onTransitionEnter;\n delete propsEventHandlers.onTransitionExited;\n const externalEventHandlers = {\n ...propsEventHandlers,\n ...otherHandlers\n };\n return {\n role: 'presentation',\n ...externalEventHandlers,\n onKeyDown: createHandleKeyDown(externalEventHandlers),\n ref: handleRef\n };\n };\n const getBackdropProps = (otherHandlers = {}) => {\n const externalEventHandlers = otherHandlers;\n return {\n 'aria-hidden': true,\n ...externalEventHandlers,\n onClick: createHandleBackdropClick(externalEventHandlers),\n open\n };\n };\n const getTransitionProps = () => {\n const handleEnter = () => {\n setExited(false);\n if (onTransitionEnter) {\n onTransitionEnter();\n }\n };\n const handleExited = () => {\n setExited(true);\n if (onTransitionExited) {\n onTransitionExited();\n }\n if (closeAfterTransition) {\n handleClose();\n }\n };\n return {\n onEnter: createChainedFunction(handleEnter, children?.props.onEnter),\n onExited: createChainedFunction(handleExited, children?.props.onExited)\n };\n };\n return {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n rootRef: handleRef,\n portalRef: handlePortalRef,\n isTopModal,\n exited,\n hasTransition\n };\n}\nexport default useModal;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getModalUtilityClass(slot) {\n return generateUtilityClass('MuiModal', slot);\n}\nconst modalClasses = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);\nexport default modalClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport FocusTrap from \"../Unstable_TrapFocus/index.js\";\nimport Portal from \"../Portal/index.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Backdrop from \"../Backdrop/index.js\";\nimport useModal from \"./useModal.js\";\nimport { getModalUtilityClass } from \"./modalClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { useForkRef } from \"../utils/index.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n open,\n exited,\n classes\n } = ownerState;\n const slots = {\n root: ['root', !open && exited && 'hidden'],\n backdrop: ['backdrop']\n };\n return composeClasses(slots, getModalUtilityClass, classes);\n};\nconst ModalRoot = styled('div', {\n name: 'MuiModal',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.open && ownerState.exited && styles.hidden];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'fixed',\n zIndex: (theme.vars || theme).zIndex.modal,\n right: 0,\n bottom: 0,\n top: 0,\n left: 0,\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.open && ownerState.exited,\n style: {\n visibility: 'hidden'\n }\n }]\n})));\nconst ModalBackdrop = styled(Backdrop, {\n name: 'MuiModal',\n slot: 'Backdrop',\n overridesResolver: (props, styles) => {\n return styles.backdrop;\n }\n})({\n zIndex: -1\n});\n\n/**\n * Modal is a lower-level construct that is leveraged by the following components:\n *\n * - [Dialog](/material-ui/api/dialog/)\n * - [Drawer](/material-ui/api/drawer/)\n * - [Menu](/material-ui/api/menu/)\n * - [Popover](/material-ui/api/popover/)\n *\n * If you are creating a modal dialog, you probably want to use the [Dialog](/material-ui/api/dialog/) component\n * rather than directly using Modal.\n *\n * This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).\n */\nconst Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiModal',\n props: inProps\n });\n const {\n BackdropComponent = ModalBackdrop,\n BackdropProps,\n classes: classesProp,\n className,\n closeAfterTransition = false,\n children,\n container,\n component,\n components = {},\n componentsProps = {},\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableEscapeKeyDown = false,\n disablePortal = false,\n disableRestoreFocus = false,\n disableScrollLock = false,\n hideBackdrop = false,\n keepMounted = false,\n onBackdropClick,\n onClose,\n onTransitionEnter,\n onTransitionExited,\n open,\n slotProps = {},\n slots = {},\n // eslint-disable-next-line react/prop-types\n theme,\n ...other\n } = props;\n const propsWithDefaults = {\n ...props,\n closeAfterTransition,\n disableAutoFocus,\n disableEnforceFocus,\n disableEscapeKeyDown,\n disablePortal,\n disableRestoreFocus,\n disableScrollLock,\n hideBackdrop,\n keepMounted\n };\n const {\n getRootProps,\n getBackdropProps,\n getTransitionProps,\n portalRef,\n isTopModal,\n exited,\n hasTransition\n } = useModal({\n ...propsWithDefaults,\n rootRef: ref\n });\n const ownerState = {\n ...propsWithDefaults,\n exited\n };\n const classes = useUtilityClasses(ownerState);\n const childProps = {};\n if (children.props.tabIndex === undefined) {\n childProps.tabIndex = '-1';\n }\n\n // It's a Transition like component\n if (hasTransition) {\n const {\n onEnter,\n onExited\n } = getTransitionProps();\n childProps.onEnter = onEnter;\n childProps.onExited = onExited;\n }\n const externalForwardedProps = {\n slots: {\n root: components.Root,\n backdrop: components.Backdrop,\n ...slots\n },\n slotProps: {\n ...componentsProps,\n ...slotProps\n }\n };\n const [RootSlot, rootProps] = useSlot('root', {\n elementType: ModalRoot,\n externalForwardedProps,\n getSlotProps: getRootProps,\n additionalProps: {\n ref,\n as: component\n },\n ownerState,\n className: clsx(className, classes?.root, !ownerState.open && ownerState.exited && classes?.hidden)\n });\n const [BackdropSlot, backdropProps] = useSlot('backdrop', {\n elementType: BackdropComponent,\n externalForwardedProps,\n additionalProps: BackdropProps,\n getSlotProps: otherHandlers => {\n return getBackdropProps({\n ...otherHandlers,\n onClick: e => {\n if (onBackdropClick) {\n onBackdropClick(e);\n }\n if (otherHandlers?.onClick) {\n otherHandlers.onClick(e);\n }\n }\n });\n },\n className: clsx(BackdropProps?.className, classes?.backdrop),\n ownerState\n });\n const backdropRef = useForkRef(BackdropProps?.ref, backdropProps.ref);\n if (!keepMounted && !open && (!hasTransition || exited)) {\n return null;\n }\n return /*#__PURE__*/_jsx(Portal, {\n ref: portalRef,\n container: container,\n disablePortal: disablePortal,\n children: /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n ...other,\n children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, {\n ...backdropProps,\n ref: backdropRef\n }) : null, /*#__PURE__*/_jsx(FocusTrap, {\n disableEnforceFocus: disableEnforceFocus,\n disableAutoFocus: disableAutoFocus,\n disableRestoreFocus: disableRestoreFocus,\n isEnabled: isTopModal,\n open: open,\n children: /*#__PURE__*/React.cloneElement(children, childProps)\n })]\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Modal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](https://mui.com/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * A single child content element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * When set to true the Modal waits until a nested Transition is completed before closing.\n * @default false\n */\n closeAfterTransition: PropTypes.bool,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside.\n *\n * @deprecated Use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Backdrop: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated Use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true`, the modal will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any modal children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the modal will not prevent focus from leaving the modal while open.\n *\n * Generally this should never be set to `true` as it makes the modal less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, hitting escape will not fire the `onClose` callback.\n * @default false\n */\n disableEscapeKeyDown: PropTypes.bool,\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * If `true`, the modal will not restore focus to previously focused element once\n * modal is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * If `true`, the backdrop is not rendered.\n * @default false\n */\n hideBackdrop: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Modal.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Callback fired when the backdrop is clicked.\n * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.\n */\n onBackdropClick: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`.\n */\n onClose: PropTypes.func,\n /**\n * A function called when a transition enters.\n */\n onTransitionEnter: PropTypes.func,\n /**\n * A function called when a transition has exited.\n */\n onTransitionExited: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * The props used for each slot inside the Modal.\n * @default {}\n */\n slotProps: PropTypes.shape({\n backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Modal.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n backdrop: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default Modal;","'use client';\n\nvar _span;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst NotchedOutlineRoot = styled('fieldset', {\n shouldForwardProp: rootShouldForwardProp\n})({\n textAlign: 'left',\n position: 'absolute',\n bottom: 0,\n right: 0,\n top: -5,\n left: 0,\n margin: 0,\n padding: '0 8px',\n pointerEvents: 'none',\n borderRadius: 'inherit',\n borderStyle: 'solid',\n borderWidth: 1,\n overflow: 'hidden',\n minWidth: '0%'\n});\nconst NotchedOutlineLegend = styled('legend', {\n shouldForwardProp: rootShouldForwardProp\n})(memoTheme(({\n theme\n}) => ({\n float: 'unset',\n // Fix conflict with bootstrap\n width: 'auto',\n // Fix conflict with bootstrap\n overflow: 'hidden',\n // Fix Horizontal scroll when label too long\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.withLabel,\n style: {\n padding: 0,\n lineHeight: '11px',\n // sync with `height` in `legend` styles\n transition: theme.transitions.create('width', {\n duration: 150,\n easing: theme.transitions.easing.easeOut\n })\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.withLabel,\n style: {\n display: 'block',\n // Fix conflict with normalize.css and sanitize.css\n padding: 0,\n height: 11,\n // sync with `lineHeight` in `legend` styles\n fontSize: '0.75em',\n visibility: 'hidden',\n maxWidth: 0.01,\n transition: theme.transitions.create('max-width', {\n duration: 50,\n easing: theme.transitions.easing.easeOut\n }),\n whiteSpace: 'nowrap',\n '& > span': {\n paddingLeft: 5,\n paddingRight: 5,\n display: 'inline-block',\n opacity: 0,\n visibility: 'visible'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.withLabel && ownerState.notched,\n style: {\n maxWidth: '100%',\n transition: theme.transitions.create('max-width', {\n duration: 100,\n easing: theme.transitions.easing.easeOut,\n delay: 50\n })\n }\n }]\n})));\n\n/**\n * @ignore - internal component.\n */\nexport default function NotchedOutline(props) {\n const {\n children,\n classes,\n className,\n label,\n notched,\n ...other\n } = props;\n const withLabel = label != null && label !== '';\n const ownerState = {\n ...props,\n notched,\n withLabel\n };\n return /*#__PURE__*/_jsx(NotchedOutlineRoot, {\n \"aria-hidden\": true,\n className: className,\n ownerState: ownerState,\n ...other,\n children: /*#__PURE__*/_jsx(NotchedOutlineLegend, {\n ownerState: ownerState,\n children: withLabel ? /*#__PURE__*/_jsx(\"span\", {\n children: label\n }) : // notranslate needed while Google Translate will not fix zero-width space issue\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n children: \"\\u200B\"\n }))\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? NotchedOutline.propTypes /* remove-proptypes */ = {\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The label.\n */\n label: PropTypes.node,\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n style: PropTypes.object\n} : void 0;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { inputBaseClasses } from \"../InputBase/index.js\";\nexport function getOutlinedInputUtilityClass(slot) {\n return generateUtilityClass('MuiOutlinedInput', slot);\n}\nconst outlinedInputClasses = {\n ...inputBaseClasses,\n ...generateUtilityClasses('MuiOutlinedInput', ['root', 'notchedOutline', 'input'])\n};\nexport default outlinedInputClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport NotchedOutline from \"./NotchedOutline.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport outlinedInputClasses, { getOutlinedInputUtilityClass } from \"./outlinedInputClasses.js\";\nimport InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from \"../InputBase/InputBase.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n notchedOutline: ['notchedOutline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getOutlinedInputUtilityClass, classes);\n return {\n ...classes,\n // forward classes to the InputBase\n ...composedClasses\n };\n};\nconst OutlinedInputRoot = styled(InputBaseRoot, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiOutlinedInput',\n slot: 'Root',\n overridesResolver: inputBaseRootOverridesResolver\n})(memoTheme(({\n theme\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n position: 'relative',\n borderRadius: (theme.vars || theme).shape.borderRadius,\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.text.primary\n },\n [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {\n borderWidth: 2\n },\n variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette[color].main\n }\n }\n })), {\n props: {},\n // to overide the above style\n style: {\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n [`&:hover .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor\n }\n },\n [`&.${outlinedInputClasses.error} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.error.main\n },\n [`&.${outlinedInputClasses.disabled} .${outlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.action.disabled\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 14\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 14\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: '16.5px 14px'\n }\n }, {\n props: ({\n ownerState,\n size\n }) => ownerState.multiline && size === 'small',\n style: {\n padding: '8.5px 14px'\n }\n }]\n };\n}));\nconst NotchedOutlineRoot = styled(NotchedOutline, {\n name: 'MuiOutlinedInput',\n slot: 'NotchedOutline',\n overridesResolver: (props, styles) => styles.notchedOutline\n})(memoTheme(({\n theme\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor\n };\n}));\nconst OutlinedInputInput = styled(InputBaseInput, {\n name: 'MuiOutlinedInput',\n slot: 'Input',\n overridesResolver: inputBaseInputOverridesResolver\n})(memoTheme(({\n theme\n}) => ({\n padding: '16.5px 14px',\n ...(!theme.vars && {\n '&:-webkit-autofill': {\n WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',\n WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',\n caretColor: theme.palette.mode === 'light' ? null : '#fff',\n borderRadius: 'inherit'\n }\n }),\n ...(theme.vars && {\n '&:-webkit-autofill': {\n borderRadius: 'inherit'\n },\n [theme.getColorSchemeSelector('dark')]: {\n '&:-webkit-autofill': {\n WebkitBoxShadow: '0 0 0 100px #266798 inset',\n WebkitTextFillColor: '#fff',\n caretColor: '#fff'\n }\n }\n }),\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n padding: '8.5px 14px'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.multiline,\n style: {\n padding: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.startAdornment,\n style: {\n paddingLeft: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.endAdornment,\n style: {\n paddingRight: 0\n }\n }]\n})));\nconst OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {\n var _React$Fragment;\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiOutlinedInput'\n });\n const {\n components = {},\n fullWidth = false,\n inputComponent = 'input',\n label,\n multiline = false,\n notched,\n slots = {},\n type = 'text',\n ...other\n } = props;\n const classes = useUtilityClasses(props);\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'disabled', 'error', 'focused', 'hiddenLabel', 'size', 'required']\n });\n const ownerState = {\n ...props,\n color: fcs.color || 'primary',\n disabled: fcs.disabled,\n error: fcs.error,\n focused: fcs.focused,\n formControl: muiFormControl,\n fullWidth,\n hiddenLabel: fcs.hiddenLabel,\n multiline,\n size: fcs.size,\n type\n };\n const RootSlot = slots.root ?? components.Root ?? OutlinedInputRoot;\n const InputSlot = slots.input ?? components.Input ?? OutlinedInputInput;\n return /*#__PURE__*/_jsx(InputBase, {\n slots: {\n root: RootSlot,\n input: InputSlot\n },\n renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {\n ownerState: ownerState,\n className: classes.notchedOutline,\n label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [label, \"\\u2009\", '*']\n })) : label,\n notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)\n }),\n fullWidth: fullWidth,\n inputComponent: inputComponent,\n multiline: multiline,\n ref: ref,\n type: type,\n ...other,\n classes: {\n ...classes,\n notchedOutline: null\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? OutlinedInput.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Root: PropTypes.elementType\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n disabled: PropTypes.bool,\n /**\n * End `InputAdornment` for this component.\n */\n endAdornment: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The id of the `input` element.\n */\n id: PropTypes.string,\n /**\n * The component used for the `input` element.\n * Either a string to use a HTML element or a component.\n * @default 'input'\n */\n inputComponent: PropTypes.elementType,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @default {}\n */\n inputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label of the `input`. It is only used for layout. The actual labelling\n * is handled by `InputLabel`.\n */\n label: PropTypes.node,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n * The prop defaults to the value (`'none'`) inherited from the parent FormControl component.\n */\n margin: PropTypes.oneOf(['dense', 'none']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a [TextareaAutosize](https://mui.com/material-ui/react-textarea-autosize/) element is rendered.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * If `true`, the outline is notched to accommodate the label.\n */\n notched: PropTypes.bool,\n /**\n * Callback fired when the value is changed.\n *\n * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * Start `InputAdornment` for this component.\n */\n startAdornment: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n * @default 'text'\n */\n type: PropTypes.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any\n} : void 0;\nif (OutlinedInput) {\n OutlinedInput.muiName = 'Input';\n}\nexport default OutlinedInput;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport getOverlayAlpha from \"../styles/getOverlayAlpha.js\";\nimport { getPaperUtilityClass } from \"./paperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow'),\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.square,\n style: {\n borderRadius: theme.shape.borderRadius\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: {\n variant: 'elevation'\n },\n style: {\n boxShadow: 'var(--Paper-shadow)',\n backgroundImage: 'var(--Paper-overlay)'\n }\n }]\n})));\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const theme = useTheme();\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation',\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n elevation,\n square,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n style: {\n ...(variant === 'elevation' && {\n '--Paper-shadow': (theme.vars || theme).shadows[elevation],\n ...(theme.vars && {\n '--Paper-overlay': theme.vars.overlays?.[elevation]\n }),\n ...(!theme.vars && theme.palette.mode === 'dark' && {\n '--Paper-overlay': `linear-gradient(${alpha('#fff', getOverlayAlpha(elevation))}, ${alpha('#fff', getOverlayAlpha(elevation))})`\n })\n }),\n ...other.style\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopoverUtilityClass(slot) {\n return generateUtilityClass('MuiPopover', slot);\n}\nconst popoverClasses = generateUtilityClasses('MuiPopover', ['root', 'paper']);\nexport default popoverClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport isHostComponent from \"../utils/isHostComponent.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport debounce from \"../utils/debounce.js\";\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport ownerWindow from \"../utils/ownerWindow.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport Grow from \"../Grow/index.js\";\nimport Modal from \"../Modal/index.js\";\nimport PaperBase from \"../Paper/index.js\";\nimport { getPopoverUtilityClass } from \"./popoverClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport function getOffsetTop(rect, vertical) {\n let offset = 0;\n if (typeof vertical === 'number') {\n offset = vertical;\n } else if (vertical === 'center') {\n offset = rect.height / 2;\n } else if (vertical === 'bottom') {\n offset = rect.height;\n }\n return offset;\n}\nexport function getOffsetLeft(rect, horizontal) {\n let offset = 0;\n if (typeof horizontal === 'number') {\n offset = horizontal;\n } else if (horizontal === 'center') {\n offset = rect.width / 2;\n } else if (horizontal === 'right') {\n offset = rect.width;\n }\n return offset;\n}\nfunction getTransformOriginValue(transformOrigin) {\n return [transformOrigin.horizontal, transformOrigin.vertical].map(n => typeof n === 'number' ? `${n}px` : n).join(' ');\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPopoverUtilityClass, classes);\n};\nexport const PopoverRoot = styled(Modal, {\n name: 'MuiPopover',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const PopoverPaper = styled(PaperBase, {\n name: 'MuiPopover',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n position: 'absolute',\n overflowY: 'auto',\n overflowX: 'hidden',\n // So we see the popover when it's empty.\n // It's most likely on issue on userland.\n minWidth: 16,\n minHeight: 16,\n maxWidth: 'calc(100% - 32px)',\n maxHeight: 'calc(100% - 32px)',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopover'\n });\n const {\n action,\n anchorEl,\n anchorOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n anchorPosition,\n anchorReference = 'anchorEl',\n children,\n className,\n container: containerProp,\n elevation = 8,\n marginThreshold = 16,\n open,\n PaperProps: PaperPropsProp = {},\n slots = {},\n slotProps = {},\n transformOrigin = {\n vertical: 'top',\n horizontal: 'left'\n },\n TransitionComponent = Grow,\n transitionDuration: transitionDurationProp = 'auto',\n TransitionProps: {\n onEntering,\n ...TransitionProps\n } = {},\n disableScrollLock = false,\n ...other\n } = props;\n const externalPaperSlotProps = slotProps?.paper ?? PaperPropsProp;\n const paperRef = React.useRef();\n const ownerState = {\n ...props,\n anchorOrigin,\n anchorReference,\n elevation,\n marginThreshold,\n externalPaperSlotProps,\n transformOrigin,\n TransitionComponent,\n transitionDuration: transitionDurationProp,\n TransitionProps\n };\n const classes = useUtilityClasses(ownerState);\n\n // Returns the top/left offset of the position\n // to attach to on the anchor element (or body if none is provided)\n const getAnchorOffset = React.useCallback(() => {\n if (anchorReference === 'anchorPosition') {\n if (process.env.NODE_ENV !== 'production') {\n if (!anchorPosition) {\n console.error('MUI: You need to provide a `anchorPosition` prop when using ' + '<Popover anchorReference=\"anchorPosition\" />.');\n }\n }\n return anchorPosition;\n }\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n\n // If an anchor element wasn't provided, just use the parent body element of this Popover\n const anchorElement = resolvedAnchorEl && resolvedAnchorEl.nodeType === 1 ? resolvedAnchorEl : ownerDocument(paperRef.current).body;\n const anchorRect = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'production') {\n const box = anchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n return {\n top: anchorRect.top + getOffsetTop(anchorRect, anchorOrigin.vertical),\n left: anchorRect.left + getOffsetLeft(anchorRect, anchorOrigin.horizontal)\n };\n }, [anchorEl, anchorOrigin.horizontal, anchorOrigin.vertical, anchorPosition, anchorReference]);\n\n // Returns the base transform origin using the element\n const getTransformOrigin = React.useCallback(elemRect => {\n return {\n vertical: getOffsetTop(elemRect, transformOrigin.vertical),\n horizontal: getOffsetLeft(elemRect, transformOrigin.horizontal)\n };\n }, [transformOrigin.horizontal, transformOrigin.vertical]);\n const getPositioningStyle = React.useCallback(element => {\n const elemRect = {\n width: element.offsetWidth,\n height: element.offsetHeight\n };\n\n // Get the transform origin point on the element itself\n const elemTransformOrigin = getTransformOrigin(elemRect);\n if (anchorReference === 'none') {\n return {\n top: null,\n left: null,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }\n\n // Get the offset of the anchoring element\n const anchorOffset = getAnchorOffset();\n\n // Calculate element positioning\n let top = anchorOffset.top - elemTransformOrigin.vertical;\n let left = anchorOffset.left - elemTransformOrigin.horizontal;\n const bottom = top + elemRect.height;\n const right = left + elemRect.width;\n\n // Use the parent window of the anchorEl if provided\n const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));\n\n // Window thresholds taking required margin into account\n const heightThreshold = containerWindow.innerHeight - marginThreshold;\n const widthThreshold = containerWindow.innerWidth - marginThreshold;\n\n // Check if the vertical axis needs shifting\n if (marginThreshold !== null && top < marginThreshold) {\n const diff = top - marginThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n } else if (marginThreshold !== null && bottom > heightThreshold) {\n const diff = bottom - heightThreshold;\n top -= diff;\n elemTransformOrigin.vertical += diff;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (elemRect.height > heightThreshold && elemRect.height && heightThreshold) {\n console.error(['MUI: The popover component is too tall.', `Some part of it can not be seen on the screen (${elemRect.height - heightThreshold}px).`, 'Please consider adding a `max-height` to improve the user-experience.'].join('\\n'));\n }\n }\n\n // Check if the horizontal axis needs shifting\n if (marginThreshold !== null && left < marginThreshold) {\n const diff = left - marginThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n } else if (right > widthThreshold) {\n const diff = right - widthThreshold;\n left -= diff;\n elemTransformOrigin.horizontal += diff;\n }\n return {\n top: `${Math.round(top)}px`,\n left: `${Math.round(left)}px`,\n transformOrigin: getTransformOriginValue(elemTransformOrigin)\n };\n }, [anchorEl, anchorReference, getAnchorOffset, getTransformOrigin, marginThreshold]);\n const [isPositioned, setIsPositioned] = React.useState(open);\n const setPositioningStyles = React.useCallback(() => {\n const element = paperRef.current;\n if (!element) {\n return;\n }\n const positioning = getPositioningStyle(element);\n if (positioning.top !== null) {\n element.style.top = positioning.top;\n }\n if (positioning.left !== null) {\n element.style.left = positioning.left;\n }\n element.style.transformOrigin = positioning.transformOrigin;\n setIsPositioned(true);\n }, [getPositioningStyle]);\n React.useEffect(() => {\n if (disableScrollLock) {\n window.addEventListener('scroll', setPositioningStyles);\n }\n return () => window.removeEventListener('scroll', setPositioningStyles);\n }, [anchorEl, disableScrollLock, setPositioningStyles]);\n const handleEntering = (element, isAppearing) => {\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n setPositioningStyles();\n };\n const handleExited = () => {\n setIsPositioned(false);\n };\n React.useEffect(() => {\n if (open) {\n setPositioningStyles();\n }\n });\n React.useImperativeHandle(action, () => open ? {\n updatePosition: () => {\n setPositioningStyles();\n }\n } : null, [open, setPositioningStyles]);\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n const handleResize = debounce(() => {\n setPositioningStyles();\n });\n const containerWindow = ownerWindow(anchorEl);\n containerWindow.addEventListener('resize', handleResize);\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener('resize', handleResize);\n };\n }, [anchorEl, open, setPositioningStyles]);\n let transitionDuration = transitionDurationProp;\n if (transitionDurationProp === 'auto' && !TransitionComponent.muiSupportAuto) {\n transitionDuration = undefined;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n const container = containerProp || (anchorEl ? ownerDocument(resolveAnchorEl(anchorEl)).body : undefined);\n const externalForwardedProps = {\n slots,\n slotProps: {\n ...slotProps,\n paper: externalPaperSlotProps\n }\n };\n const [PaperSlot, paperProps] = useSlot('paper', {\n elementType: PopoverPaper,\n externalForwardedProps,\n additionalProps: {\n elevation,\n className: clsx(classes.paper, externalPaperSlotProps?.className),\n style: isPositioned ? externalPaperSlotProps.style : {\n ...externalPaperSlotProps.style,\n opacity: 0\n }\n },\n ownerState\n });\n const [RootSlot, {\n slotProps: rootSlotPropsProp,\n ...rootProps\n }] = useSlot('root', {\n elementType: PopoverRoot,\n externalForwardedProps,\n additionalProps: {\n slotProps: {\n backdrop: {\n invisible: true\n }\n },\n container,\n open\n },\n ownerState,\n className: clsx(classes.root, className)\n });\n const handlePaperRef = useForkRef(paperRef, paperProps.ref);\n return /*#__PURE__*/_jsx(RootSlot, {\n ...rootProps,\n ...(!isHostComponent(RootSlot) && {\n slotProps: rootSlotPropsProp,\n disableScrollLock\n }),\n ...other,\n ref: ref,\n children: /*#__PURE__*/_jsx(TransitionComponent, {\n appear: true,\n in: open,\n onEntering: handleEntering,\n onExited: handleExited,\n timeout: transitionDuration,\n ...TransitionProps,\n children: /*#__PURE__*/_jsx(PaperSlot, {\n ...paperProps,\n ref: handlePaperRef,\n children: children\n })\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popover.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A ref for imperative actions.\n * It currently only supports updatePosition() action.\n */\n action: refType,\n /**\n * An HTML element, [PopoverVirtualElement](https://mui.com/material-ui/react-popover/#virtual-element),\n * or a function that returns either.\n * It's used to set the position of the popover.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.func]), props => {\n if (props.open && (!props.anchorReference || props.anchorReference === 'anchorEl')) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', `It should be an Element or PopoverVirtualElement instance but it's \\`${resolvedAnchorEl}\\` instead.`].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * This is the point on the anchor where the popover's\n * `anchorEl` will attach to. This is not used when the\n * anchorReference is 'anchorPosition'.\n *\n * Options:\n * vertical: [top, center, bottom];\n * horizontal: [left, center, right].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n anchorOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * This is the position that may be used to set the position of the popover.\n * The coordinates are relative to the application's client area.\n */\n anchorPosition: PropTypes.shape({\n left: PropTypes.number.isRequired,\n top: PropTypes.number.isRequired\n }),\n /**\n * This determines which anchor prop to refer to when setting\n * the position of the popover.\n * @default 'anchorEl'\n */\n anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),\n /**\n * A backdrop component. This prop enables custom backdrop rendering.\n * @deprecated Use `slotProps.root.slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.\n * Use the `slotProps.root.slots.backdrop` prop to make your application ready for the next version of Material UI.\n * @default styled(Backdrop, {\n * name: 'MuiModal',\n * slot: 'Backdrop',\n * overridesResolver: (props, styles) => {\n * return styles.backdrop;\n * },\n * })({\n * zIndex: -1,\n * })\n */\n BackdropComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.\n * @deprecated Use `slotProps.root.slotProps.backdrop` instead.\n */\n BackdropProps: PropTypes.object,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * An HTML element, component instance, or function that returns either.\n * The `container` will passed to the Modal component.\n *\n * By default, it uses the body of the anchorEl's top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Disable the scroll lock behavior.\n * @default false\n */\n disableScrollLock: PropTypes.bool,\n /**\n * The elevation of the popover.\n * @default 8\n */\n elevation: integerPropType,\n /**\n * Specifies how close to the edge of the window the popover can appear.\n * If null, the popover will not be constrained by the window.\n * @default 16\n */\n marginThreshold: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n * The `reason` parameter can optionally be used to control the response to `onClose`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.\n *\n * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.\n * @deprecated Use `slotProps.paper` instead.\n *\n * @default {}\n */\n PaperProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n component: elementTypeAcceptingRef\n }),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * This is the point on the popover which\n * will attach to the anchor's origin.\n *\n * Options:\n * vertical: [top, center, bottom, x(px)];\n * horizontal: [left, center, right, x(px)].\n * @default {\n * vertical: 'top',\n * horizontal: 'left',\n * }\n */\n transformOrigin: PropTypes.shape({\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(['center', 'left', 'right']), PropTypes.number]).isRequired,\n vertical: PropTypes.oneOfType([PropTypes.oneOf(['bottom', 'center', 'top']), PropTypes.number]).isRequired\n }),\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Set to 'auto' to automatically calculate transition time based on height.\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @default {}\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Popover;","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If <html> has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on <html>\n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPopper', slot);\n}\nconst popperClasses = generateUtilityClasses('MuiPopper', ['root']);\nexport default popperClasses;","'use client';\n\nimport * as React from 'react';\nimport { chainPropTypes, HTMLElementType, refType, unstable_ownerDocument as ownerDocument, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { createPopper } from '@popperjs/core';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport Portal from \"../Portal/index.js\";\nimport { getPopperUtilityClass } from \"./popperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction flipPlacement(placement, direction) {\n if (direction === 'ltr') {\n return placement;\n }\n switch (placement) {\n case 'bottom-end':\n return 'bottom-start';\n case 'bottom-start':\n return 'bottom-end';\n case 'top-end':\n return 'top-start';\n case 'top-start':\n return 'top-end';\n default:\n return placement;\n }\n}\nfunction resolveAnchorEl(anchorEl) {\n return typeof anchorEl === 'function' ? anchorEl() : anchorEl;\n}\nfunction isHTMLElement(element) {\n return element.nodeType !== undefined;\n}\nfunction isVirtualElement(element) {\n return !isHTMLElement(element);\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getPopperUtilityClass, classes);\n};\nconst defaultPopperOptions = {};\nconst PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props, forwardedRef) {\n const {\n anchorEl,\n children,\n direction,\n disablePortal,\n modifiers,\n open,\n placement: initialPlacement,\n popperOptions,\n popperRef: popperRefProp,\n slotProps = {},\n slots = {},\n TransitionProps,\n // @ts-ignore internal logic\n ownerState: ownerStateProp,\n // prevent from spreading to DOM, it can come from the parent component e.g. Select.\n ...other\n } = props;\n const tooltipRef = React.useRef(null);\n const ownRef = useForkRef(tooltipRef, forwardedRef);\n const popperRef = React.useRef(null);\n const handlePopperRef = useForkRef(popperRef, popperRefProp);\n const handlePopperRefRef = React.useRef(handlePopperRef);\n useEnhancedEffect(() => {\n handlePopperRefRef.current = handlePopperRef;\n }, [handlePopperRef]);\n React.useImperativeHandle(popperRefProp, () => popperRef.current, []);\n const rtlPlacement = flipPlacement(initialPlacement, direction);\n /**\n * placement initialized from prop but can change during lifetime if modifiers.flip.\n * modifiers.flip is essentially a flip for controlled/uncontrolled behavior\n */\n const [placement, setPlacement] = React.useState(rtlPlacement);\n const [resolvedAnchorElement, setResolvedAnchorElement] = React.useState(resolveAnchorEl(anchorEl));\n React.useEffect(() => {\n if (popperRef.current) {\n popperRef.current.forceUpdate();\n }\n });\n React.useEffect(() => {\n if (anchorEl) {\n setResolvedAnchorElement(resolveAnchorEl(anchorEl));\n }\n }, [anchorEl]);\n useEnhancedEffect(() => {\n if (!resolvedAnchorElement || !open) {\n return undefined;\n }\n const handlePopperUpdate = data => {\n setPlacement(data.placement);\n };\n if (process.env.NODE_ENV !== 'production') {\n if (resolvedAnchorElement && isHTMLElement(resolvedAnchorElement) && resolvedAnchorElement.nodeType === 1) {\n const box = resolvedAnchorElement.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n console.warn(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n }\n }\n let popperModifiers = [{\n name: 'preventOverflow',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'flip',\n options: {\n altBoundary: disablePortal\n }\n }, {\n name: 'onUpdate',\n enabled: true,\n phase: 'afterWrite',\n fn: ({\n state\n }) => {\n handlePopperUpdate(state);\n }\n }];\n if (modifiers != null) {\n popperModifiers = popperModifiers.concat(modifiers);\n }\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n const popper = createPopper(resolvedAnchorElement, tooltipRef.current, {\n placement: rtlPlacement,\n ...popperOptions,\n modifiers: popperModifiers\n });\n handlePopperRefRef.current(popper);\n return () => {\n popper.destroy();\n handlePopperRefRef.current(null);\n };\n }, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);\n const childProps = {\n placement: placement\n };\n if (TransitionProps !== null) {\n childProps.TransitionProps = TransitionProps;\n }\n const classes = useUtilityClasses(props);\n const Root = slots.root ?? 'div';\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps.root,\n externalForwardedProps: other,\n additionalProps: {\n role: 'tooltip',\n ref: ownRef\n },\n ownerState: props,\n className: classes.root\n });\n return /*#__PURE__*/_jsx(Root, {\n ...rootProps,\n children: typeof children === 'function' ? children(childProps) : children\n });\n});\n\n/**\n * @ignore - internal component.\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(props, forwardedRef) {\n const {\n anchorEl,\n children,\n container: containerProp,\n direction = 'ltr',\n disablePortal = false,\n keepMounted = false,\n modifiers,\n open,\n placement = 'bottom',\n popperOptions = defaultPopperOptions,\n popperRef,\n style,\n transition = false,\n slotProps = {},\n slots = {},\n ...other\n } = props;\n const [exited, setExited] = React.useState(true);\n const handleEnter = () => {\n setExited(false);\n };\n const handleExited = () => {\n setExited(true);\n };\n if (!keepMounted && !open && (!transition || exited)) {\n return null;\n }\n\n // If the container prop is provided, use that\n // If the anchorEl prop is provided, use its parent body element as the container\n // If neither are provided let the Modal take care of choosing the container\n let container;\n if (containerProp) {\n container = containerProp;\n } else if (anchorEl) {\n const resolvedAnchorEl = resolveAnchorEl(anchorEl);\n container = resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) ? ownerDocument(resolvedAnchorEl).body : ownerDocument(null).body;\n }\n const display = !open && keepMounted && (!transition || exited) ? 'none' : undefined;\n const transitionProps = transition ? {\n in: open,\n onEnter: handleEnter,\n onExited: handleExited\n } : undefined;\n return /*#__PURE__*/_jsx(Portal, {\n disablePortal: disablePortal,\n container: container,\n children: /*#__PURE__*/_jsx(PopperTooltip, {\n anchorEl: anchorEl,\n direction: direction,\n disablePortal: disablePortal,\n modifiers: modifiers,\n ref: forwardedRef,\n open: transition ? !exited : open,\n placement: placement,\n popperOptions: popperOptions,\n popperRef: popperRef,\n slotProps: slotProps,\n slots: slots,\n ...other,\n style: {\n // Prevents scroll issue, waiting for Popper.js to add this style once initiated.\n position: 'fixed',\n // Fix Popper.js display issue\n top: 0,\n left: 0,\n display,\n ...style\n },\n TransitionProps: transitionProps,\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: chainPropTypes(PropTypes.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]), props => {\n if (props.open) {\n const resolvedAnchorEl = resolveAnchorEl(props.anchorEl);\n if (resolvedAnchorEl && isHTMLElement(resolvedAnchorEl) && resolvedAnchorEl.nodeType === 1) {\n const box = resolvedAnchorEl.getBoundingClientRect();\n if (process.env.NODE_ENV !== 'test' && box.top === 0 && box.left === 0 && box.right === 0 && box.bottom === 0) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'The anchor element should be part of the document layout.', \"Make sure the element is present in the document or that it's not display none.\"].join('\\n'));\n }\n } else if (!resolvedAnchorEl || typeof resolvedAnchorEl.getBoundingClientRect !== 'function' || isVirtualElement(resolvedAnchorEl) && resolvedAnchorEl.contextElement != null && resolvedAnchorEl.contextElement.nodeType !== 1) {\n return new Error(['MUI: The `anchorEl` prop provided to the component is invalid.', 'It should be an HTML element instance or a virtualElement ', '(https://popper.js.org/docs/v2/virtual-elements/).'].join('\\n'));\n }\n }\n return null;\n }),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * Direction of the text.\n * @default 'ltr'\n */\n direction: PropTypes.oneOf(['ltr', 'rtl']),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport { useRtl } from '@mui/system/RtlProvider';\nimport refType from '@mui/utils/refType';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport BasePopper from \"./BasePopper.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PopperRoot = styled(BasePopper, {\n name: 'MuiPopper',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/material-ui/react-autocomplete/)\n * - [Menu](https://mui.com/material-ui/react-menu/)\n * - [Popper](https://mui.com/material-ui/react-popper/)\n *\n * API:\n *\n * - [Popper API](https://mui.com/material-ui/api/popper/)\n */\nconst Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {\n const isRtl = useRtl();\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPopper'\n });\n const {\n anchorEl,\n component,\n components,\n componentsProps,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n slots,\n slotProps,\n ...other\n } = props;\n const RootComponent = slots?.root ?? components?.Root;\n const otherProps = {\n anchorEl,\n container,\n disablePortal,\n keepMounted,\n modifiers,\n open,\n placement,\n popperOptions,\n popperRef,\n transition,\n ...other\n };\n return /*#__PURE__*/_jsx(PopperRoot, {\n as: component,\n direction: isRtl ? 'rtl' : 'ltr',\n slots: {\n root: RootComponent\n },\n slotProps: slotProps ?? componentsProps,\n ...otherProps,\n ref: ref\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Popper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, [virtualElement](https://popper.js.org/docs/v2/virtual-elements/),\n * or a function that returns either.\n * It's used to set the position of the popper.\n * The return value will passed as the reference object of the Popper instance.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.object, PropTypes.func]),\n /**\n * Popper render function or node.\n */\n children: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.node, PropTypes.func]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n components: PropTypes.shape({\n Root: PropTypes.elementType\n }),\n /**\n * The props used for each slot inside the Popper.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).\n * @default {}\n */\n componentsProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool,\n /**\n * Always keep the children in the DOM.\n * This prop can be useful in SEO situation or\n * when you want to maximize the responsiveness of the Popper.\n * @default false\n */\n keepMounted: PropTypes.bool,\n /**\n * Popper.js is based on a \"plugin-like\" architecture,\n * most of its features are fully encapsulated \"modifiers\".\n *\n * A modifier is a function that is called each time Popper.js needs to\n * compute the position of the popper.\n * For this reason, modifiers should be very performant to avoid bottlenecks.\n * To learn how to create a modifier, [read the modifiers documentation](https://popper.js.org/docs/v2/modifiers/).\n */\n modifiers: PropTypes.arrayOf(PropTypes.shape({\n data: PropTypes.object,\n effect: PropTypes.func,\n enabled: PropTypes.bool,\n fn: PropTypes.func,\n name: PropTypes.any,\n options: PropTypes.object,\n phase: PropTypes.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PropTypes.arrayOf(PropTypes.string),\n requiresIfExists: PropTypes.arrayOf(PropTypes.string)\n })),\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * Popper placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * Options provided to the [`Popper.js`](https://popper.js.org/docs/v2/constructors/#options) instance.\n * @default {}\n */\n popperOptions: PropTypes.shape({\n modifiers: PropTypes.array,\n onFirstUpdate: PropTypes.func,\n placement: PropTypes.oneOf(['auto-end', 'auto-start', 'auto', 'bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n strategy: PropTypes.oneOf(['absolute', 'fixed'])\n }),\n /**\n * A ref that points to the used popper instance.\n */\n popperRef: refType,\n /**\n * The props used for each slot inside the Popper.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside the Popper.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Help supporting a react-transition-group/Transition component.\n * @default false\n */\n transition: PropTypes.bool\n} : void 0;\nexport default Popper;","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport PropTypes from 'prop-types';\nimport { exactProp, HTMLElementType, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useForkRef as useForkRef, unstable_setRef as setRef, unstable_getReactNodeRef as getReactNodeRef } from '@mui/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction getContainer(container) {\n return typeof container === 'function' ? container() : container;\n}\n\n/**\n * Portals provide a first-class way to render children into a DOM node\n * that exists outside the DOM hierarchy of the parent component.\n *\n * Demos:\n *\n * - [Portal](https://mui.com/material-ui/react-portal/)\n *\n * API:\n *\n * - [Portal API](https://mui.com/material-ui/api/portal/)\n */\nconst Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {\n const {\n children,\n container,\n disablePortal = false\n } = props;\n const [mountNode, setMountNode] = React.useState(null);\n const handleRef = useForkRef(getReactNodeRef(children), forwardedRef);\n useEnhancedEffect(() => {\n if (!disablePortal) {\n setMountNode(getContainer(container) || document.body);\n }\n }, [container, disablePortal]);\n useEnhancedEffect(() => {\n if (mountNode && !disablePortal) {\n setRef(forwardedRef, mountNode);\n return () => {\n setRef(forwardedRef, null);\n };\n }\n return undefined;\n }, [forwardedRef, mountNode, disablePortal]);\n if (disablePortal) {\n if ( /*#__PURE__*/React.isValidElement(children)) {\n const newProps = {\n ref: handleRef\n };\n return /*#__PURE__*/React.cloneElement(children, newProps);\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: children\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Portal.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The children to render into the `container`.\n */\n children: PropTypes.node,\n /**\n * An HTML element or function that returns one.\n * The `container` will have the portal children appended to it.\n *\n * You can also provide a callback, which is called in a React layout effect.\n * This lets you set the container from a ref, and also makes server-side rendering possible.\n *\n * By default, it uses the body of the top-level document object,\n * so it's simply `document.body` most of the time.\n */\n container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * The `children` will be under the DOM hierarchy of the parent component.\n * @default false\n */\n disablePortal: PropTypes.bool\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n Portal['propTypes' + ''] = exactProp(Portal.propTypes);\n}\nexport default Portal;","import getScrollbarSize from '@mui/utils/getScrollbarSize';\nexport default getScrollbarSize;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport List from \"../List/index.js\";\nimport getScrollbarSize from \"../utils/getScrollbarSize.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction nextItem(list, item, disableListWrap) {\n if (list === item) {\n return list.firstChild;\n }\n if (item && item.nextElementSibling) {\n return item.nextElementSibling;\n }\n return disableListWrap ? null : list.firstChild;\n}\nfunction previousItem(list, item, disableListWrap) {\n if (list === item) {\n return disableListWrap ? list.firstChild : list.lastChild;\n }\n if (item && item.previousElementSibling) {\n return item.previousElementSibling;\n }\n return disableListWrap ? null : list.lastChild;\n}\nfunction textCriteriaMatches(nextFocus, textCriteria) {\n if (textCriteria === undefined) {\n return true;\n }\n let text = nextFocus.innerText;\n if (text === undefined) {\n // jsdom doesn't support innerText\n text = nextFocus.textContent;\n }\n text = text.trim().toLowerCase();\n if (text.length === 0) {\n return false;\n }\n if (textCriteria.repeating) {\n return text[0] === textCriteria.keys[0];\n }\n return text.startsWith(textCriteria.keys.join(''));\n}\nfunction moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, traversalFunction, textCriteria) {\n let wrappedOnce = false;\n let nextFocus = traversalFunction(list, currentFocus, currentFocus ? disableListWrap : false);\n while (nextFocus) {\n // Prevent infinite loop.\n if (nextFocus === list.firstChild) {\n if (wrappedOnce) {\n return false;\n }\n wrappedOnce = true;\n }\n\n // Same logic as useAutocomplete.js\n const nextFocusDisabled = disabledItemsFocusable ? false : nextFocus.disabled || nextFocus.getAttribute('aria-disabled') === 'true';\n if (!nextFocus.hasAttribute('tabindex') || !textCriteriaMatches(nextFocus, textCriteria) || nextFocusDisabled) {\n // Move to the next element.\n nextFocus = traversalFunction(list, nextFocus, disableListWrap);\n } else {\n nextFocus.focus();\n return true;\n }\n }\n return false;\n}\n\n/**\n * A permanently displayed menu following https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/.\n * It's exposed to help customization of the [`Menu`](/material-ui/api/menu/) component if you\n * use it separately you need to move focus into the component manually. Once\n * the focus is placed inside the component it is fully keyboard accessible.\n */\nconst MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {\n const {\n // private\n // eslint-disable-next-line react/prop-types\n actions,\n autoFocus = false,\n autoFocusItem = false,\n children,\n className,\n disabledItemsFocusable = false,\n disableListWrap = false,\n onKeyDown,\n variant = 'selectedMenu',\n ...other\n } = props;\n const listRef = React.useRef(null);\n const textCriteriaRef = React.useRef({\n keys: [],\n repeating: true,\n previousKeyMatched: true,\n lastTime: null\n });\n useEnhancedEffect(() => {\n if (autoFocus) {\n listRef.current.focus();\n }\n }, [autoFocus]);\n React.useImperativeHandle(actions, () => ({\n adjustStyleForScrollbar: (containerElement, {\n direction\n }) => {\n // Let's ignore that piece of logic if users are already overriding the width\n // of the menu.\n const noExplicitWidth = !listRef.current.style.width;\n if (containerElement.clientHeight < listRef.current.clientHeight && noExplicitWidth) {\n const scrollbarSize = `${getScrollbarSize(ownerDocument(containerElement))}px`;\n listRef.current.style[direction === 'rtl' ? 'paddingLeft' : 'paddingRight'] = scrollbarSize;\n listRef.current.style.width = `calc(100% + ${scrollbarSize})`;\n }\n return listRef.current;\n }\n }), []);\n const handleKeyDown = event => {\n const list = listRef.current;\n const key = event.key;\n const isModifierKeyPressed = event.ctrlKey || event.metaKey || event.altKey;\n if (isModifierKeyPressed) {\n if (onKeyDown) {\n onKeyDown(event);\n }\n return;\n }\n\n /**\n * @type {Element} - will always be defined since we are in a keydown handler\n * attached to an element. A keydown event is either dispatched to the activeElement\n * or document.body or document.documentElement. Only the first case will\n * trigger this specific handler.\n */\n const currentFocus = ownerDocument(list).activeElement;\n if (key === 'ArrowDown') {\n // Prevent scroll of the page\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'ArrowUp') {\n event.preventDefault();\n moveFocus(list, currentFocus, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key === 'Home') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, nextItem);\n } else if (key === 'End') {\n event.preventDefault();\n moveFocus(list, null, disableListWrap, disabledItemsFocusable, previousItem);\n } else if (key.length === 1) {\n const criteria = textCriteriaRef.current;\n const lowerKey = key.toLowerCase();\n const currTime = performance.now();\n if (criteria.keys.length > 0) {\n // Reset\n if (currTime - criteria.lastTime > 500) {\n criteria.keys = [];\n criteria.repeating = true;\n criteria.previousKeyMatched = true;\n } else if (criteria.repeating && lowerKey !== criteria.keys[0]) {\n criteria.repeating = false;\n }\n }\n criteria.lastTime = currTime;\n criteria.keys.push(lowerKey);\n const keepFocusOnCurrent = currentFocus && !criteria.repeating && textCriteriaMatches(currentFocus, criteria);\n if (criteria.previousKeyMatched && (keepFocusOnCurrent || moveFocus(list, currentFocus, false, disabledItemsFocusable, nextItem, criteria))) {\n event.preventDefault();\n } else {\n criteria.previousKeyMatched = false;\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const handleRef = useForkRef(listRef, ref);\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.forEach(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n if (activeItemIndex === index) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n if (activeItemIndex === index && (child.props.disabled || child.props.muiSkipListHighlight || child.type.muiSkipListHighlight)) {\n activeItemIndex += 1;\n if (activeItemIndex >= children.length) {\n // there are no focusable items within the list.\n activeItemIndex = -1;\n }\n }\n });\n const items = React.Children.map(children, (child, index) => {\n if (index === activeItemIndex) {\n const newChildProps = {};\n if (autoFocusItem) {\n newChildProps.autoFocus = true;\n }\n if (child.props.tabIndex === undefined && variant === 'selectedMenu') {\n newChildProps.tabIndex = 0;\n }\n return /*#__PURE__*/React.cloneElement(child, newChildProps);\n }\n return child;\n });\n return /*#__PURE__*/_jsx(List, {\n role: \"menu\",\n ref: handleRef,\n className: className,\n onKeyDown: handleKeyDown,\n tabIndex: autoFocus ? 0 : -1,\n ...other,\n children: items\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuList.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, will focus the `[role=\"menu\"]` container and move into tab order.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, will focus the first menuitem if `variant=\"menu\"` or selected item\n * if `variant=\"selectedMenu\"`.\n * @default false\n */\n autoFocusItem: PropTypes.bool,\n /**\n * MenuList contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, will allow focus on disabled items.\n * @default false\n */\n disabledItemsFocusable: PropTypes.bool,\n /**\n * If `true`, the menu items will not wrap focus.\n * @default false\n */\n disableListWrap: PropTypes.bool,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus\n * and the vertical alignment relative to the anchor element.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default MenuList;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuUtilityClass(slot) {\n return generateUtilityClass('MuiMenu', slot);\n}\nconst menuClasses = generateUtilityClasses('MuiMenu', ['root', 'paper', 'list']);\nexport default menuClasses;","'use client';\n\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport HTMLElementType from '@mui/utils/HTMLElementType';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport MenuList from \"../MenuList/index.js\";\nimport Popover, { PopoverPaper } from \"../Popover/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getMenuUtilityClass } from \"./menuClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RTL_ORIGIN = {\n vertical: 'top',\n horizontal: 'right'\n};\nconst LTR_ORIGIN = {\n vertical: 'top',\n horizontal: 'left'\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper'],\n list: ['list']\n };\n return composeClasses(slots, getMenuUtilityClass, classes);\n};\nconst MenuRoot = styled(Popover, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenu',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nexport const MenuPaper = styled(PopoverPaper, {\n name: 'MuiMenu',\n slot: 'Paper',\n overridesResolver: (props, styles) => styles.paper\n})({\n // specZ: The maximum height of a simple menu should be one or more rows less than the view\n // height. This ensures a tappable area outside of the simple menu with which to dismiss\n // the menu.\n maxHeight: 'calc(100% - 96px)',\n // Add iOS momentum scrolling for iOS < 13.0\n WebkitOverflowScrolling: 'touch'\n});\nconst MenuMenuList = styled(MenuList, {\n name: 'MuiMenu',\n slot: 'List',\n overridesResolver: (props, styles) => styles.list\n})({\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0\n});\nconst Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiMenu'\n });\n const {\n autoFocus = true,\n children,\n className,\n disableAutoFocusItem = false,\n MenuListProps = {},\n onClose,\n open,\n PaperProps = {},\n PopoverClasses,\n transitionDuration = 'auto',\n TransitionProps: {\n onEntering,\n ...TransitionProps\n } = {},\n variant = 'selectedMenu',\n slots = {},\n slotProps = {},\n ...other\n } = props;\n const isRtl = useRtl();\n const ownerState = {\n ...props,\n autoFocus,\n disableAutoFocusItem,\n MenuListProps,\n onEntering,\n PaperProps,\n transitionDuration,\n TransitionProps,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n const autoFocusItem = autoFocus && !disableAutoFocusItem && open;\n const menuListActionsRef = React.useRef(null);\n const handleEntering = (element, isAppearing) => {\n if (menuListActionsRef.current) {\n menuListActionsRef.current.adjustStyleForScrollbar(element, {\n direction: isRtl ? 'rtl' : 'ltr'\n });\n }\n if (onEntering) {\n onEntering(element, isAppearing);\n }\n };\n const handleListKeyDown = event => {\n if (event.key === 'Tab') {\n event.preventDefault();\n if (onClose) {\n onClose(event, 'tabKeyDown');\n }\n }\n };\n\n /**\n * the index of the item should receive focus\n * in a `variant=\"selectedMenu\"` it's the first `selected` item\n * otherwise it's the very first item.\n */\n let activeItemIndex = -1;\n // since we inject focus related props into children we have to do a lookahead\n // to check if there is a `selected` item. We're looking for the last `selected`\n // item and use the first valid item as a fallback\n React.Children.map(children, (child, index) => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Menu component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n if (!child.props.disabled) {\n if (variant === 'selectedMenu' && child.props.selected) {\n activeItemIndex = index;\n } else if (activeItemIndex === -1) {\n activeItemIndex = index;\n }\n }\n });\n const PaperSlot = slots.paper ?? MenuPaper;\n const paperExternalSlotProps = slotProps.paper ?? PaperProps;\n const rootSlotProps = useSlotProps({\n elementType: slots.root,\n externalSlotProps: slotProps.root,\n ownerState,\n className: [classes.root, className]\n });\n const paperSlotProps = useSlotProps({\n elementType: PaperSlot,\n externalSlotProps: paperExternalSlotProps,\n ownerState,\n className: classes.paper\n });\n return /*#__PURE__*/_jsx(MenuRoot, {\n onClose: onClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: isRtl ? 'right' : 'left'\n },\n transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,\n slots: {\n paper: PaperSlot,\n root: slots.root\n },\n slotProps: {\n root: rootSlotProps,\n paper: paperSlotProps\n },\n open: open,\n ref: ref,\n transitionDuration: transitionDuration,\n TransitionProps: {\n onEntering: handleEntering,\n ...TransitionProps\n },\n ownerState: ownerState,\n ...other,\n classes: PopoverClasses,\n children: /*#__PURE__*/_jsx(MenuMenuList, {\n onKeyDown: handleListKeyDown,\n actions: menuListActionsRef,\n autoFocus: autoFocus && (activeItemIndex === -1 || disableAutoFocusItem),\n autoFocusItem: autoFocusItem,\n variant: variant,\n ...MenuListProps,\n className: clsx(classes.list, MenuListProps.className),\n children: children\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Menu.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * An HTML element, or a function that returns one.\n * It's used to set the position of the menu.\n */\n anchorEl: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),\n /**\n * If `true` (Default) will focus the `[role=\"menu\"]` if no focusable child is found. Disabled\n * children are not focusable. If you set this prop to `false` focus will be placed\n * on the parent modal container. This has severe accessibility implications\n * and should only be considered if you manage focus otherwise.\n * @default true\n */\n autoFocus: PropTypes.bool,\n /**\n * Menu contents, normally `MenuItem`s.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * When opening the menu will not focus the active item but the `[role=\"menu\"]`\n * unless `autoFocus` is also set to `false`. Not using the default means not\n * following WAI-ARIA authoring practices. Please be considerate about possible\n * accessibility implications.\n * @default false\n */\n disableAutoFocusItem: PropTypes.bool,\n /**\n * Props applied to the [`MenuList`](https://mui.com/material-ui/api/menu-list/) element.\n * @default {}\n */\n MenuListProps: PropTypes.object,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {object} event The event source of the callback.\n * @param {string} reason Can be: `\"escapeKeyDown\"`, `\"backdropClick\"`, `\"tabKeyDown\"`.\n */\n onClose: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool.isRequired,\n /**\n * @ignore\n */\n PaperProps: PropTypes.object,\n /**\n * `classes` prop applied to the [`Popover`](https://mui.com/material-ui/api/popover/) element.\n */\n PopoverClasses: PropTypes.object,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n paper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n paper: PropTypes.elementType,\n root: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The length of the transition in `ms`, or 'auto'\n * @default 'auto'\n */\n transitionDuration: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.number, PropTypes.shape({\n appear: PropTypes.number,\n enter: PropTypes.number,\n exit: PropTypes.number\n })]),\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n * @default {}\n */\n TransitionProps: PropTypes.object,\n /**\n * The variant to use. Use `menu` to prevent selected items from impacting the initial focus.\n * @default 'selectedMenu'\n */\n variant: PropTypes.oneOf(['menu', 'selectedMenu'])\n} : void 0;\nexport default Menu;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getNativeSelectUtilityClasses(slot) {\n return generateUtilityClass('MuiNativeSelect', slot);\n}\nconst nativeSelectClasses = generateUtilityClasses('MuiNativeSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);\nexport default nativeSelectClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport nativeSelectClasses, { getNativeSelectUtilityClasses } from \"./nativeSelectClasses.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n disabled,\n multiple,\n open,\n error\n } = ownerState;\n const slots = {\n select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],\n icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled']\n };\n return composeClasses(slots, getNativeSelectUtilityClasses, classes);\n};\nexport const StyledSelectSelect = styled('select')(({\n theme\n}) => ({\n // Reset\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // When interacting quickly, the text can end up selected.\n // Native select can't be selected either.\n userSelect: 'none',\n // Reset\n borderRadius: 0,\n cursor: 'pointer',\n '&:focus': {\n // Reset Chrome style\n borderRadius: 0\n },\n [`&.${nativeSelectClasses.disabled}`]: {\n cursor: 'default'\n },\n '&[multiple]': {\n height: 'auto'\n },\n '&:not([multiple]) option, &:not([multiple]) optgroup': {\n backgroundColor: (theme.vars || theme).palette.background.paper\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.variant !== 'filled' && ownerState.variant !== 'outlined',\n style: {\n // Bump specificity to allow extending custom inputs\n '&&&': {\n paddingRight: 24,\n minWidth: 16 // So it doesn't collapse.\n }\n }\n }, {\n props: {\n variant: 'filled'\n },\n style: {\n '&&&': {\n paddingRight: 32\n }\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n borderRadius: (theme.vars || theme).shape.borderRadius,\n '&:focus': {\n borderRadius: (theme.vars || theme).shape.borderRadius // Reset the reset for Chrome style\n },\n '&&&': {\n paddingRight: 32\n }\n }\n }]\n}));\nconst NativeSelectSelect = styled(StyledSelectSelect, {\n name: 'MuiNativeSelect',\n slot: 'Select',\n shouldForwardProp: rootShouldForwardProp,\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.select, styles[ownerState.variant], ownerState.error && styles.error, {\n [`&.${nativeSelectClasses.multiple}`]: styles.multiple\n }];\n }\n})({});\nexport const StyledSelectIcon = styled('svg')(({\n theme\n}) => ({\n // We use a position absolute over a flexbox in order to forward the pointer events\n // to the input and to support wrapping tags..\n position: 'absolute',\n right: 0,\n // Center vertically, height is 1em\n top: 'calc(50% - .5em)',\n // Don't block pointer events on the select under the icon.\n pointerEvents: 'none',\n color: (theme.vars || theme).palette.action.active,\n [`&.${nativeSelectClasses.disabled}`]: {\n color: (theme.vars || theme).palette.action.disabled\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.open,\n style: {\n transform: 'rotate(180deg)'\n }\n }, {\n props: {\n variant: 'filled'\n },\n style: {\n right: 7\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n right: 7\n }\n }]\n}));\nconst NativeSelectIcon = styled(StyledSelectIcon, {\n name: 'MuiNativeSelect',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];\n }\n})({});\n\n/**\n * @ignore - internal component.\n */\nconst NativeSelectInput = /*#__PURE__*/React.forwardRef(function NativeSelectInput(props, ref) {\n const {\n className,\n disabled,\n error,\n IconComponent,\n inputRef,\n variant = 'standard',\n ...other\n } = props;\n const ownerState = {\n ...props,\n disabled,\n variant,\n error\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(NativeSelectSelect, {\n ownerState: ownerState,\n className: clsx(classes.select, className),\n disabled: disabled,\n ref: inputRef || ref,\n ...other\n }), props.multiple ? null : /*#__PURE__*/_jsx(NativeSelectIcon, {\n as: IconComponent,\n ownerState: ownerState,\n className: classes.icon\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? NativeSelectInput.propTypes = {\n /**\n * The option elements to populate the select with.\n * Can be some `<option>` elements.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n /**\n * If `true`, the select is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the `select input` will indicate an error.\n */\n error: PropTypes.bool,\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n /**\n * Use that prop to pass a ref to the native select element.\n * @deprecated\n */\n inputRef: refType,\n /**\n * @ignore\n */\n multiple: PropTypes.bool,\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * The input value.\n */\n value: PropTypes.any,\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default NativeSelectInput;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSelectUtilityClasses(slot) {\n return generateUtilityClass('MuiSelect', slot);\n}\nconst selectClasses = generateUtilityClasses('MuiSelect', ['root', 'select', 'multiple', 'filled', 'outlined', 'standard', 'disabled', 'focused', 'icon', 'iconOpen', 'iconFilled', 'iconOutlined', 'iconStandard', 'nativeInput', 'error']);\nexport default selectClasses;","'use client';\n\nimport _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nvar _span;\nimport * as React from 'react';\nimport { isFragment } from 'react-is';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport refType from '@mui/utils/refType';\nimport ownerDocument from \"../utils/ownerDocument.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Menu from \"../Menu/Menu.js\";\nimport { StyledSelectSelect, StyledSelectIcon } from \"../NativeSelect/NativeSelectInput.js\";\nimport { isFilled } from \"../InputBase/utils.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport slotShouldForwardProp from \"../styles/slotShouldForwardProp.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport selectClasses, { getSelectUtilityClasses } from \"./selectClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst SelectSelect = styled(StyledSelectSelect, {\n name: 'MuiSelect',\n slot: 'Select',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [\n // Win specificity over the input base\n {\n [`&.${selectClasses.select}`]: styles.select\n }, {\n [`&.${selectClasses.select}`]: styles[ownerState.variant]\n }, {\n [`&.${selectClasses.error}`]: styles.error\n }, {\n [`&.${selectClasses.multiple}`]: styles.multiple\n }];\n }\n})({\n // Win specificity over the input base\n [`&.${selectClasses.select}`]: {\n height: 'auto',\n // Resets for multiple select with chips\n minHeight: '1.4375em',\n // Required for select\\text-field height consistency\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n overflow: 'hidden'\n }\n});\nconst SelectIcon = styled(StyledSelectIcon, {\n name: 'MuiSelect',\n slot: 'Icon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];\n }\n})({});\nconst SelectNativeInput = styled('input', {\n shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'classes',\n name: 'MuiSelect',\n slot: 'NativeInput',\n overridesResolver: (props, styles) => styles.nativeInput\n})({\n bottom: 0,\n left: 0,\n position: 'absolute',\n opacity: 0,\n pointerEvents: 'none',\n width: '100%',\n boxSizing: 'border-box'\n});\nfunction areEqualValues(a, b) {\n if (typeof b === 'object' && b !== null) {\n return a === b;\n }\n\n // The value could be a number, the DOM will stringify it anyway.\n return String(a) === String(b);\n}\nfunction isEmpty(display) {\n return display == null || typeof display === 'string' && !display.trim();\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n disabled,\n multiple,\n open,\n error\n } = ownerState;\n const slots = {\n select: ['select', variant, disabled && 'disabled', multiple && 'multiple', error && 'error'],\n icon: ['icon', `icon${capitalize(variant)}`, open && 'iconOpen', disabled && 'disabled'],\n nativeInput: ['nativeInput']\n };\n return composeClasses(slots, getSelectUtilityClasses, classes);\n};\n\n/**\n * @ignore - internal component.\n */\nconst SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n autoFocus,\n autoWidth,\n children,\n className,\n defaultOpen,\n defaultValue,\n disabled,\n displayEmpty,\n error = false,\n IconComponent,\n inputRef: inputRefProp,\n labelId,\n MenuProps = {},\n multiple,\n name,\n onBlur,\n onChange,\n onClose,\n onFocus,\n onOpen,\n open: openProp,\n readOnly,\n renderValue,\n SelectDisplayProps = {},\n tabIndex: tabIndexProp,\n // catching `type` from Input which makes no sense for SelectInput\n type,\n value: valueProp,\n variant = 'standard',\n ...other\n } = props;\n const [value, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'Select'\n });\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: defaultOpen,\n name: 'Select'\n });\n const inputRef = React.useRef(null);\n const displayRef = React.useRef(null);\n const [displayNode, setDisplayNode] = React.useState(null);\n const {\n current: isOpenControlled\n } = React.useRef(openProp != null);\n const [menuMinWidthState, setMenuMinWidthState] = React.useState();\n const handleRef = useForkRef(ref, inputRefProp);\n const handleDisplayRef = React.useCallback(node => {\n displayRef.current = node;\n if (node) {\n setDisplayNode(node);\n }\n }, []);\n const anchorElement = displayNode?.parentNode;\n React.useImperativeHandle(handleRef, () => ({\n focus: () => {\n displayRef.current.focus();\n },\n node: inputRef.current,\n value\n }), [value]);\n\n // Resize menu on `defaultOpen` automatic toggle.\n React.useEffect(() => {\n if (defaultOpen && openState && displayNode && !isOpenControlled) {\n setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);\n displayRef.current.focus();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [displayNode, autoWidth]);\n // `isOpenControlled` is ignored because the component should never switch between controlled and uncontrolled modes.\n // `defaultOpen` and `openState` are ignored to avoid unnecessary callbacks.\n React.useEffect(() => {\n if (autoFocus) {\n displayRef.current.focus();\n }\n }, [autoFocus]);\n React.useEffect(() => {\n if (!labelId) {\n return undefined;\n }\n const label = ownerDocument(displayRef.current).getElementById(labelId);\n if (label) {\n const handler = () => {\n if (getSelection().isCollapsed) {\n displayRef.current.focus();\n }\n };\n label.addEventListener('click', handler);\n return () => {\n label.removeEventListener('click', handler);\n };\n }\n return undefined;\n }, [labelId]);\n const update = (open, event) => {\n if (open) {\n if (onOpen) {\n onOpen(event);\n }\n } else if (onClose) {\n onClose(event);\n }\n if (!isOpenControlled) {\n setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);\n setOpenState(open);\n }\n };\n const handleMouseDown = event => {\n // Ignore everything but left-click\n if (event.button !== 0) {\n return;\n }\n // Hijack the default focus behavior.\n event.preventDefault();\n displayRef.current.focus();\n update(true, event);\n };\n const handleClose = event => {\n update(false, event);\n };\n const childrenArray = React.Children.toArray(children);\n\n // Support autofill.\n const handleChange = event => {\n const child = childrenArray.find(childItem => childItem.props.value === event.target.value);\n if (child === undefined) {\n return;\n }\n setValueState(child.props.value);\n if (onChange) {\n onChange(event, child);\n }\n };\n const handleItemClick = child => event => {\n let newValue;\n\n // We use the tabindex attribute to signal the available options.\n if (!event.currentTarget.hasAttribute('tabindex')) {\n return;\n }\n if (multiple) {\n newValue = Array.isArray(value) ? value.slice() : [];\n const itemIndex = value.indexOf(child.props.value);\n if (itemIndex === -1) {\n newValue.push(child.props.value);\n } else {\n newValue.splice(itemIndex, 1);\n }\n } else {\n newValue = child.props.value;\n }\n if (child.props.onClick) {\n child.props.onClick(event);\n }\n if (value !== newValue) {\n setValueState(newValue);\n if (onChange) {\n // Redefine target to allow name and value to be read.\n // This allows seamless integration with the most popular form libraries.\n // https://github.com/mui/material-ui/issues/13485#issuecomment-676048492\n // Clone the event to not override `target` of the original event.\n const nativeEvent = event.nativeEvent || event;\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n Object.defineProperty(clonedEvent, 'target', {\n writable: true,\n value: {\n value: newValue,\n name\n }\n });\n onChange(clonedEvent, child);\n }\n }\n if (!multiple) {\n update(false, event);\n }\n };\n const handleKeyDown = event => {\n if (!readOnly) {\n const validKeys = [' ', 'ArrowUp', 'ArrowDown',\n // The native select doesn't respond to enter on macOS, but it's recommended by\n // https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/\n 'Enter'];\n if (validKeys.includes(event.key)) {\n event.preventDefault();\n update(true, event);\n }\n }\n };\n const open = displayNode !== null && openState;\n const handleBlur = event => {\n // if open event.stopImmediatePropagation\n if (!open && onBlur) {\n // Preact support, target is read only property on a native event.\n Object.defineProperty(event, 'target', {\n writable: true,\n value: {\n value,\n name\n }\n });\n onBlur(event);\n }\n };\n delete other['aria-invalid'];\n let display;\n let displaySingle;\n const displayMultiple = [];\n let computeDisplay = false;\n let foundMatch = false;\n\n // No need to display any value if the field is empty.\n if (isFilled({\n value\n }) || displayEmpty) {\n if (renderValue) {\n display = renderValue(value);\n } else {\n computeDisplay = true;\n }\n }\n const items = childrenArray.map(child => {\n if (! /*#__PURE__*/React.isValidElement(child)) {\n return null;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (isFragment(child)) {\n console.error([\"MUI: The Select component doesn't accept a Fragment as a child.\", 'Consider providing an array instead.'].join('\\n'));\n }\n }\n let selected;\n if (multiple) {\n if (!Array.isArray(value)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The \\`value\\` prop must be an array when using the \\`Select\\` component with \\`multiple\\`.` : _formatMuiErrorMessage(2));\n }\n selected = value.some(v => areEqualValues(v, child.props.value));\n if (selected && computeDisplay) {\n displayMultiple.push(child.props.children);\n }\n } else {\n selected = areEqualValues(value, child.props.value);\n if (selected && computeDisplay) {\n displaySingle = child.props.children;\n }\n }\n if (selected) {\n foundMatch = true;\n }\n return /*#__PURE__*/React.cloneElement(child, {\n 'aria-selected': selected ? 'true' : 'false',\n onClick: handleItemClick(child),\n onKeyUp: event => {\n if (event.key === ' ') {\n // otherwise our MenuItems dispatches a click event\n // it's not behavior of the native <option> and causes\n // the select to close immediately since we open on space keydown\n event.preventDefault();\n }\n if (child.props.onKeyUp) {\n child.props.onKeyUp(event);\n }\n },\n role: 'option',\n selected,\n value: undefined,\n // The value is most likely not a valid HTML attribute.\n 'data-value': child.props.value // Instead, we provide it as a data attribute.\n });\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!foundMatch && !multiple && value !== '') {\n const values = childrenArray.map(child => child.props.value);\n console.warn([`MUI: You have provided an out-of-range value \\`${value}\\` for the select ${name ? `(name=\"${name}\") ` : ''}component.`, \"Consider providing a value that matches one of the available options or ''.\", `The available values are ${values.filter(x => x != null).map(x => `\\`${x}\\``).join(', ') || '\"\"'}.`].join('\\n'));\n }\n }, [foundMatch, childrenArray, multiple, name, value]);\n }\n if (computeDisplay) {\n if (multiple) {\n if (displayMultiple.length === 0) {\n display = null;\n } else {\n display = displayMultiple.reduce((output, child, index) => {\n output.push(child);\n if (index < displayMultiple.length - 1) {\n output.push(', ');\n }\n return output;\n }, []);\n }\n } else {\n display = displaySingle;\n }\n }\n\n // Avoid performing a layout computation in the render method.\n let menuMinWidth = menuMinWidthState;\n if (!autoWidth && isOpenControlled && displayNode) {\n menuMinWidth = anchorElement.clientWidth;\n }\n let tabIndex;\n if (typeof tabIndexProp !== 'undefined') {\n tabIndex = tabIndexProp;\n } else {\n tabIndex = disabled ? null : 0;\n }\n const buttonId = SelectDisplayProps.id || (name ? `mui-component-select-${name}` : undefined);\n const ownerState = {\n ...props,\n variant,\n value,\n open,\n error\n };\n const classes = useUtilityClasses(ownerState);\n const paperProps = {\n ...MenuProps.PaperProps,\n ...MenuProps.slotProps?.paper\n };\n const listboxId = useId();\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(SelectSelect, {\n as: \"div\",\n ref: handleDisplayRef,\n tabIndex: tabIndex,\n role: \"combobox\",\n \"aria-controls\": listboxId,\n \"aria-disabled\": disabled ? 'true' : undefined,\n \"aria-expanded\": open ? 'true' : 'false',\n \"aria-haspopup\": \"listbox\",\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": [labelId, buttonId].filter(Boolean).join(' ') || undefined,\n \"aria-describedby\": ariaDescribedby,\n onKeyDown: handleKeyDown,\n onMouseDown: disabled || readOnly ? null : handleMouseDown,\n onBlur: handleBlur,\n onFocus: onFocus,\n ...SelectDisplayProps,\n ownerState: ownerState,\n className: clsx(SelectDisplayProps.className, classes.select, className)\n // The id is required for proper a11y\n ,\n id: buttonId,\n children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n children: \"\\u200B\"\n })) : display\n }), /*#__PURE__*/_jsx(SelectNativeInput, {\n \"aria-invalid\": error,\n value: Array.isArray(value) ? value.join(',') : value,\n name: name,\n ref: inputRef,\n \"aria-hidden\": true,\n onChange: handleChange,\n tabIndex: -1,\n disabled: disabled,\n className: classes.nativeInput,\n autoFocus: autoFocus,\n ...other,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(SelectIcon, {\n as: IconComponent,\n className: classes.icon,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(Menu, {\n id: `menu-${name || ''}`,\n anchorEl: anchorElement,\n open: open,\n onClose: handleClose,\n anchorOrigin: {\n vertical: 'bottom',\n horizontal: 'center'\n },\n transformOrigin: {\n vertical: 'top',\n horizontal: 'center'\n },\n ...MenuProps,\n MenuListProps: {\n 'aria-labelledby': labelId,\n role: 'listbox',\n 'aria-multiselectable': multiple ? 'true' : undefined,\n disableListWrap: true,\n id: listboxId,\n ...MenuProps.MenuListProps\n },\n slotProps: {\n ...MenuProps.slotProps,\n paper: {\n ...paperProps,\n style: {\n minWidth: menuMinWidth,\n ...(paperProps != null ? paperProps.style : null)\n }\n }\n },\n children: items\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SelectInput.propTypes = {\n /**\n * @ignore\n */\n 'aria-describedby': PropTypes.string,\n /**\n * @ignore\n */\n 'aria-label': PropTypes.string,\n /**\n * @ignore\n */\n autoFocus: PropTypes.bool,\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n */\n autoWidth: PropTypes.bool,\n /**\n * The option elements to populate the select with.\n * Can be some `<MenuItem>` elements.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * The CSS class name of the select element.\n */\n className: PropTypes.string,\n /**\n * If `true`, the component is toggled on mount. Use when the component open state is not controlled.\n * You can only use it when the `native` prop is `false` (default).\n */\n defaultOpen: PropTypes.bool,\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the select is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the selected item is displayed even if its value is empty.\n */\n displayEmpty: PropTypes.bool,\n /**\n * If `true`, the `select input` will indicate an error.\n */\n error: PropTypes.bool,\n /**\n * The icon that displays the arrow.\n */\n IconComponent: PropTypes.elementType.isRequired,\n /**\n * Imperative handle implementing `{ value: T, node: HTMLElement, focus(): void }`\n * Equivalent to `ref`\n */\n inputRef: refType,\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n /**\n * Props applied to the [`Menu`](/material-ui/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n */\n multiple: PropTypes.bool,\n /**\n * Name attribute of the `select` or hidden `input` element.\n */\n name: PropTypes.string,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * @param {object} [child] The react element that was selected.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * Callback fired when the component requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * @ignore\n */\n readOnly: PropTypes.bool,\n /**\n * Render the selected value.\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n /**\n * @ignore\n */\n tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * @ignore\n */\n type: PropTypes.any,\n /**\n * The input value.\n */\n value: PropTypes.any,\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['standard', 'outlined', 'filled'])\n} : void 0;\nexport default SelectInput;","'use client';\n\nimport * as React from 'react';\nimport createSvgIcon from \"../../utils/createSvgIcon.js\";\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport deepmerge from '@mui/utils/deepmerge';\nimport getReactNodeRef from '@mui/utils/getReactNodeRef';\nimport SelectInput from \"./SelectInput.js\";\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport ArrowDropDownIcon from \"../internal/svg-icons/ArrowDropDown.js\";\nimport Input from \"../Input/index.js\";\nimport NativeSelectInput from \"../NativeSelect/NativeSelectInput.js\";\nimport FilledInput from \"../FilledInput/index.js\";\nimport OutlinedInput from \"../OutlinedInput/index.js\";\nimport useThemeProps from \"../styles/useThemeProps.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n return classes;\n};\nconst styledRootConfig = {\n name: 'MuiSelect',\n overridesResolver: (props, styles) => styles.root,\n shouldForwardProp: prop => rootShouldForwardProp(prop) && prop !== 'variant',\n slot: 'Root'\n};\nconst StyledInput = styled(Input, styledRootConfig)('');\nconst StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');\nconst StyledFilledInput = styled(FilledInput, styledRootConfig)('');\nconst Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {\n const props = useThemeProps({\n name: 'MuiSelect',\n props: inProps\n });\n const {\n autoWidth = false,\n children,\n classes: classesProp = {},\n className,\n defaultOpen = false,\n displayEmpty = false,\n IconComponent = ArrowDropDownIcon,\n id,\n input,\n inputProps,\n label,\n labelId,\n MenuProps,\n multiple = false,\n native = false,\n onClose,\n onOpen,\n open,\n renderValue,\n SelectDisplayProps,\n variant: variantProp = 'outlined',\n ...other\n } = props;\n const inputComponent = native ? NativeSelectInput : SelectInput;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['variant', 'error']\n });\n const variant = fcs.variant || variantProp;\n const ownerState = {\n ...props,\n variant,\n classes: classesProp\n };\n const classes = useUtilityClasses(ownerState);\n const {\n root,\n ...restOfClasses\n } = classes;\n const InputComponent = input || {\n standard: /*#__PURE__*/_jsx(StyledInput, {\n ownerState: ownerState\n }),\n outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {\n label: label,\n ownerState: ownerState\n }),\n filled: /*#__PURE__*/_jsx(StyledFilledInput, {\n ownerState: ownerState\n })\n }[variant];\n const inputComponentRef = useForkRef(ref, getReactNodeRef(InputComponent));\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: /*#__PURE__*/React.cloneElement(InputComponent, {\n // Most of the logic is implemented in `SelectInput`.\n // The `Select` component is a simple API wrapper to expose something better to play with.\n inputComponent,\n inputProps: {\n children,\n error: fcs.error,\n IconComponent,\n variant,\n type: undefined,\n // We render a select. We can ignore the type provided by the `Input`.\n multiple,\n ...(native ? {\n id\n } : {\n autoWidth,\n defaultOpen,\n displayEmpty,\n labelId,\n MenuProps,\n onClose,\n onOpen,\n open,\n renderValue,\n SelectDisplayProps: {\n id,\n ...SelectDisplayProps\n }\n }),\n ...inputProps,\n classes: inputProps ? deepmerge(restOfClasses, inputProps.classes) : restOfClasses,\n ...(input ? input.props.inputProps : {})\n },\n ...((multiple && native || displayEmpty) && variant === 'outlined' ? {\n notched: true\n } : {}),\n ref: inputComponentRef,\n className: clsx(InputComponent.props.className, className, classes.root),\n // If a custom input is provided via 'input' prop, do not allow 'variant' to be propagated to it's root element. See https://github.com/mui/material-ui/issues/33894.\n ...(!input && {\n variant\n }),\n ...other\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Select.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the width of the popover will automatically be set according to the items inside the\n * menu, otherwise it will be at least the width of the select input.\n * @default false\n */\n autoWidth: PropTypes.bool,\n /**\n * The option elements to populate the select with.\n * Can be some `MenuItem` when `native` is false and `option` when `native` is true.\n *\n * âš ï¸The `MenuItem` elements **must** be direct descendants when `native` is false.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n * @default {}\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).\n * You can only use it when the `native` prop is `false` (default).\n * @default false\n */\n defaultOpen: PropTypes.bool,\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, a value is displayed even if no items are selected.\n *\n * In order to display a meaningful value, a function can be passed to the `renderValue` prop which\n * returns the value to be displayed when no items are selected.\n *\n * âš ï¸ When using this prop, make sure the label doesn't overlap with the empty displayed value.\n * The label should either be hidden or forced to a shrunk state.\n * @default false\n */\n displayEmpty: PropTypes.bool,\n /**\n * The icon that displays the arrow.\n * @default ArrowDropDownIcon\n */\n IconComponent: PropTypes.elementType,\n /**\n * The `id` of the wrapper element or the `select` element when `native`.\n */\n id: PropTypes.string,\n /**\n * An `Input` element; does not have to be a material-ui specific `Input`.\n */\n input: PropTypes.element,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * When `native` is `true`, the attributes are applied on the `select` element.\n */\n inputProps: PropTypes.object,\n /**\n * See [OutlinedInput#label](https://mui.com/material-ui/api/outlined-input/#props)\n */\n label: PropTypes.node,\n /**\n * The ID of an element that acts as an additional label. The Select will\n * be labelled by the additional label and the selected value.\n */\n labelId: PropTypes.string,\n /**\n * Props applied to the [`Menu`](https://mui.com/material-ui/api/menu/) element.\n */\n MenuProps: PropTypes.object,\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n * @default false\n */\n multiple: PropTypes.bool,\n /**\n * If `true`, the component uses a native `select` element.\n * @default false\n */\n native: PropTypes.bool,\n /**\n * Callback fired when a menu item is selected.\n *\n * @param {SelectChangeEvent<Value>} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.\n * @param {object} [child] The react element that was selected when `native` is `false` (default).\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the component requests to be closed.\n * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapses).\n *\n * @param {object} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be opened.\n * Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).\n *\n * @param {object} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n * You can only use it when the `native` prop is `false` (default).\n */\n open: PropTypes.bool,\n /**\n * Render the selected value.\n * You can only use it when the `native` prop is `false` (default).\n *\n * @param {any} value The `value` provided to the component.\n * @returns {ReactNode}\n */\n renderValue: PropTypes.func,\n /**\n * Props applied to the clickable div element.\n */\n SelectDisplayProps: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The `input` value. Providing an empty string will select no options.\n * Set to an empty string `''` if you don't want any of the available options to be selected.\n *\n * If the value is an object it must have reference equality with the option in order to be selected.\n * If the value is not an object, the string representation must match with the string representation of the option in order to be selected.\n */\n value: PropTypes.oneOfType([PropTypes.oneOf(['']), PropTypes.any]),\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nSelect.muiName = 'Select';\nexport default Select;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getSvgIconUtilityClass } from \"./svgIconClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n flexShrink: 0,\n transition: theme.transitions?.create?.('fill', {\n duration: (theme.vars ?? theme).transitions?.duration?.shorter\n }),\n variants: [{\n props: props => !props.hasSvgAsChild,\n style: {\n // the <svg> will define the property that has `currentColor`\n // for example heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: 'currentColor'\n }\n }, {\n props: {\n fontSize: 'inherit'\n },\n style: {\n fontSize: 'inherit'\n }\n }, {\n props: {\n fontSize: 'small'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(20) || '1.25rem'\n }\n }, {\n props: {\n fontSize: 'medium'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(24) || '1.5rem'\n }\n }, {\n props: {\n fontSize: 'large'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(35) || '2.1875rem'\n }\n },\n // TODO v5 deprecate color prop, v6 remove for sx\n ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars ?? theme).palette?.[color]?.main\n }\n })), {\n props: {\n color: 'action'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.active\n }\n }, {\n props: {\n color: 'disabled'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.disabled\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n color: undefined\n }\n }]\n})));\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24',\n ...other\n } = props;\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = {\n ...props,\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n };\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, {\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref,\n ...more,\n ...other,\n ...(hasSvgAsChild && children.props),\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nif (SvgIcon) {\n SvgIcon.muiName = 'SvgIcon';\n}\nexport default SvgIcon;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiFormLabel', slot);\n}\nconst formLabelClasses = generateUtilityClasses('MuiFormLabel', ['root', 'colorSecondary', 'focused', 'disabled', 'error', 'filled', 'required', 'asterisk']);\nexport default formLabelClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport formLabelClasses, { getFormLabelUtilityClasses } from \"./formLabelClasses.js\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n color,\n focused,\n disabled,\n error,\n filled,\n required\n } = ownerState;\n const slots = {\n root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', filled && 'filled', focused && 'focused', required && 'required'],\n asterisk: ['asterisk', error && 'error']\n };\n return composeClasses(slots, getFormLabelUtilityClasses, classes);\n};\nexport const FormLabelRoot = styled('label', {\n name: 'MuiFormLabel',\n slot: 'Root',\n overridesResolver: ({\n ownerState\n }, styles) => {\n return {\n ...styles.root,\n ...(ownerState.color === 'secondary' && styles.colorSecondary),\n ...(ownerState.filled && styles.filled)\n };\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n ...theme.typography.body1,\n lineHeight: '1.4375em',\n padding: 0,\n position: 'relative',\n variants: [...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&.${formLabelClasses.focused}`]: {\n color: (theme.vars || theme).palette[color].main\n }\n }\n })), {\n props: {},\n style: {\n [`&.${formLabelClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n },\n [`&.${formLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n }\n }]\n})));\nconst AsteriskComponent = styled('span', {\n name: 'MuiFormLabel',\n slot: 'Asterisk',\n overridesResolver: (props, styles) => styles.asterisk\n})(memoTheme(({\n theme\n}) => ({\n [`&.${formLabelClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n }\n})));\nconst FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormLabel'\n });\n const {\n children,\n className,\n color,\n component = 'label',\n disabled,\n error,\n filled,\n focused,\n required,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['color', 'required', 'focused', 'disabled', 'error', 'filled']\n });\n const ownerState = {\n ...props,\n color: fcs.color || 'primary',\n component,\n disabled: fcs.disabled,\n error: fcs.error,\n filled: fcs.filled,\n focused: fcs.focused,\n required: fcs.required\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(FormLabelRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n children: [children, fcs.required && /*#__PURE__*/_jsxs(AsteriskComponent, {\n ownerState: ownerState,\n \"aria-hidden\": true,\n className: classes.asterisk,\n children: [\"\\u2009\", '*']\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the label should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the label should use filled classes key.\n */\n filled: PropTypes.bool,\n /**\n * If `true`, the input of this label is focused (used by `FormGroup` components).\n */\n focused: PropTypes.bool,\n /**\n * If `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default FormLabel;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getInputLabelUtilityClasses(slot) {\n return generateUtilityClass('MuiInputLabel', slot);\n}\nconst inputLabelClasses = generateUtilityClasses('MuiInputLabel', ['root', 'focused', 'disabled', 'error', 'required', 'asterisk', 'formControl', 'sizeSmall', 'shrink', 'animated', 'standard', 'filled', 'outlined']);\nexport default inputLabelClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport composeClasses from '@mui/utils/composeClasses';\nimport clsx from 'clsx';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport FormLabel, { formLabelClasses } from \"../FormLabel/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getInputLabelUtilityClasses } from \"./inputLabelClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n formControl,\n size,\n shrink,\n disableAnimation,\n variant,\n required\n } = ownerState;\n const slots = {\n root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant],\n asterisk: [required && 'asterisk']\n };\n const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);\n return {\n ...classes,\n // forward the focused, disabled, etc. classes to the FormLabel\n ...composedClasses\n };\n};\nconst InputLabelRoot = styled(FormLabel, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiInputLabel',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${formLabelClasses.asterisk}`]: styles.asterisk\n }, styles.root, ownerState.formControl && styles.formControl, ownerState.size === 'small' && styles.sizeSmall, ownerState.shrink && styles.shrink, !ownerState.disableAnimation && styles.animated, ownerState.focused && styles.focused, styles[ownerState.variant]];\n }\n})(memoTheme(({\n theme\n}) => ({\n display: 'block',\n transformOrigin: 'top left',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n maxWidth: '100%',\n variants: [{\n props: ({\n ownerState\n }) => ownerState.formControl,\n style: {\n position: 'absolute',\n left: 0,\n top: 0,\n // slight alteration to spec spacing to match visual spec result\n transform: 'translate(0, 20px) scale(1)'\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n // Compensation for the `Input.inputSizeSmall` style.\n transform: 'translate(0, 17px) scale(1)'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.shrink,\n style: {\n transform: 'translate(0, -1.5px) scale(0.75)',\n transformOrigin: 'top left',\n maxWidth: '133%'\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.disableAnimation,\n style: {\n transition: theme.transitions.create(['color', 'transform', 'max-width'], {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n })\n }\n }, {\n props: {\n variant: 'filled'\n },\n style: {\n // Chrome's autofill feature gives the input field a yellow background.\n // Since the input field is behind the label in the HTML tree,\n // the input field is drawn last and hides the label with an opaque background color.\n // zIndex: 1 will raise the label above opaque background-colors of input.\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(12px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n }\n }, {\n props: {\n variant: 'filled',\n size: 'small'\n },\n style: {\n transform: 'translate(12px, 13px) scale(1)'\n }\n }, {\n props: ({\n variant,\n ownerState\n }) => variant === 'filled' && ownerState.shrink,\n style: {\n userSelect: 'none',\n pointerEvents: 'auto',\n transform: 'translate(12px, 7px) scale(0.75)',\n maxWidth: 'calc(133% - 24px)'\n }\n }, {\n props: ({\n variant,\n ownerState,\n size\n }) => variant === 'filled' && ownerState.shrink && size === 'small',\n style: {\n transform: 'translate(12px, 4px) scale(0.75)'\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n // see comment above on filled.zIndex\n zIndex: 1,\n pointerEvents: 'none',\n transform: 'translate(14px, 16px) scale(1)',\n maxWidth: 'calc(100% - 24px)'\n }\n }, {\n props: {\n variant: 'outlined',\n size: 'small'\n },\n style: {\n transform: 'translate(14px, 9px) scale(1)'\n }\n }, {\n props: ({\n variant,\n ownerState\n }) => variant === 'outlined' && ownerState.shrink,\n style: {\n userSelect: 'none',\n pointerEvents: 'auto',\n // Theoretically, we should have (8+5)*2/0.75 = 34px\n // but it feels a better when it bleeds a bit on the left, so 32px.\n maxWidth: 'calc(133% - 32px)',\n transform: 'translate(14px, -9px) scale(0.75)'\n }\n }]\n})));\nconst InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, ref) {\n const props = useDefaultProps({\n name: 'MuiInputLabel',\n props: inProps\n });\n const {\n disableAnimation = false,\n margin,\n shrink: shrinkProp,\n variant,\n className,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n let shrink = shrinkProp;\n if (typeof shrink === 'undefined' && muiFormControl) {\n shrink = muiFormControl.filled || muiFormControl.focused || muiFormControl.adornedStart;\n }\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['size', 'variant', 'required', 'focused']\n });\n const ownerState = {\n ...props,\n disableAnimation,\n formControl: muiFormControl,\n shrink,\n size: fcs.size,\n variant: fcs.variant,\n required: fcs.required,\n focused: fcs.focused\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(InputLabelRoot, {\n \"data-shrink\": shrink,\n ref: ref,\n className: clsx(classes.root, className),\n ...other,\n ownerState: ownerState,\n classes: classes\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? InputLabel.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']), PropTypes.string]),\n /**\n * If `true`, the transition animation is disabled.\n * @default false\n */\n disableAnimation: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the `input` of this label is focused.\n */\n focused: PropTypes.bool,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n /**\n * if `true`, the label will indicate that the `input` is required.\n */\n required: PropTypes.bool,\n /**\n * If `true`, the label is shrunk.\n */\n shrink: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'normal'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['normal', 'small']), PropTypes.string]),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default InputLabel;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getFormHelperTextUtilityClasses(slot) {\n return generateUtilityClass('MuiFormHelperText', slot);\n}\nconst formHelperTextClasses = generateUtilityClasses('MuiFormHelperText', ['root', 'error', 'disabled', 'sizeSmall', 'sizeMedium', 'contained', 'focused', 'filled', 'required']);\nexport default formHelperTextClasses;","'use client';\n\nvar _span;\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport formControlState from \"../FormControl/formControlState.js\";\nimport useFormControl from \"../FormControl/useFormControl.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport formHelperTextClasses, { getFormHelperTextUtilityClasses } from \"./formHelperTextClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n contained,\n size,\n disabled,\n error,\n filled,\n focused,\n required\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', error && 'error', size && `size${capitalize(size)}`, contained && 'contained', focused && 'focused', filled && 'filled', required && 'required']\n };\n return composeClasses(slots, getFormHelperTextUtilityClasses, classes);\n};\nconst FormHelperTextRoot = styled('p', {\n name: 'MuiFormHelperText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.size && styles[`size${capitalize(ownerState.size)}`], ownerState.contained && styles.contained, ownerState.filled && styles.filled];\n }\n})(memoTheme(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary,\n ...theme.typography.caption,\n textAlign: 'left',\n marginTop: 3,\n marginRight: 0,\n marginBottom: 0,\n marginLeft: 0,\n [`&.${formHelperTextClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.disabled\n },\n [`&.${formHelperTextClasses.error}`]: {\n color: (theme.vars || theme).palette.error.main\n },\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n marginTop: 4\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.contained,\n style: {\n marginLeft: 14,\n marginRight: 14\n }\n }]\n})));\nconst FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiFormHelperText'\n });\n const {\n children,\n className,\n component = 'p',\n disabled,\n error,\n filled,\n focused,\n margin,\n required,\n variant,\n ...other\n } = props;\n const muiFormControl = useFormControl();\n const fcs = formControlState({\n props,\n muiFormControl,\n states: ['variant', 'size', 'disabled', 'error', 'filled', 'focused', 'required']\n });\n const ownerState = {\n ...props,\n component,\n contained: fcs.variant === 'filled' || fcs.variant === 'outlined',\n variant: fcs.variant,\n size: fcs.size,\n disabled: fcs.disabled,\n error: fcs.error,\n filled: fcs.filled,\n focused: fcs.focused,\n required: fcs.required\n };\n\n // This issue explains why this is required: https://github.com/mui/material-ui/issues/42184\n delete ownerState.ownerState;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(FormHelperTextRoot, {\n as: component,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n ownerState: ownerState,\n children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue\n _span || (_span = /*#__PURE__*/_jsx(\"span\", {\n className: \"notranslate\",\n children: \"\\u200B\"\n })) : children\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? FormHelperText.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n *\n * If `' '` is provided, the component reserves one line height for displaying a future message.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the helper text should be displayed in a disabled state.\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, helper text should be displayed in an error state.\n */\n error: PropTypes.bool,\n /**\n * If `true`, the helper text should use filled classes key.\n */\n filled: PropTypes.bool,\n /**\n * If `true`, the helper text should use focused classes key.\n */\n focused: PropTypes.bool,\n /**\n * If `dense`, will adjust vertical spacing. This is normally obtained via context from\n * FormControl.\n */\n margin: PropTypes.oneOf(['dense']),\n /**\n * If `true`, the helper text should use required classes key.\n */\n required: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])\n} : void 0;\nexport default FormHelperText;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTextFieldUtilityClass(slot) {\n return generateUtilityClass('MuiTextField', slot);\n}\nconst textFieldClasses = generateUtilityClasses('MuiTextField', ['root']);\nexport default textFieldClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport refType from '@mui/utils/refType';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Input from \"../Input/index.js\";\nimport FilledInput from \"../FilledInput/index.js\";\nimport OutlinedInput from \"../OutlinedInput/index.js\";\nimport InputLabel from \"../InputLabel/index.js\";\nimport FormControl from \"../FormControl/index.js\";\nimport FormHelperText from \"../FormHelperText/index.js\";\nimport Select from \"../Select/index.js\";\nimport { getTextFieldUtilityClass } from \"./textFieldClasses.js\";\nimport useSlot from \"../utils/useSlot.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst variantComponent = {\n standard: Input,\n filled: FilledInput,\n outlined: OutlinedInput\n};\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getTextFieldUtilityClass, classes);\n};\nconst TextFieldRoot = styled(FormControl, {\n name: 'MuiTextField',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n\n/**\n * The `TextField` is a convenience wrapper for the most common cases (80%).\n * It cannot be all things to all people, otherwise the API would grow out of control.\n *\n * ## Advanced Configuration\n *\n * It's important to understand that the text field is a simple abstraction\n * on top of the following components:\n *\n * - [FormControl](/material-ui/api/form-control/)\n * - [InputLabel](/material-ui/api/input-label/)\n * - [FilledInput](/material-ui/api/filled-input/)\n * - [OutlinedInput](/material-ui/api/outlined-input/)\n * - [Input](/material-ui/api/input/)\n * - [FormHelperText](/material-ui/api/form-helper-text/)\n *\n * If you wish to alter the props applied to the `input` element, you can do so as follows:\n *\n * ```jsx\n * const inputProps = {\n * step: 300,\n * };\n *\n * return <TextField id=\"time\" type=\"time\" inputProps={inputProps} />;\n * ```\n *\n * For advanced cases, please look at the source of TextField by clicking on the\n * \"Edit this page\" button above. Consider either:\n *\n * - using the upper case props for passing values directly to the components\n * - using the underlying components directly as shown in the demos\n */\nconst TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTextField'\n });\n const {\n autoComplete,\n autoFocus = false,\n children,\n className,\n color = 'primary',\n defaultValue,\n disabled = false,\n error = false,\n FormHelperTextProps: FormHelperTextPropsProp,\n fullWidth = false,\n helperText,\n id: idOverride,\n InputLabelProps: InputLabelPropsProp,\n inputProps: inputPropsProp,\n InputProps: InputPropsProp,\n inputRef,\n label,\n maxRows,\n minRows,\n multiline = false,\n name,\n onBlur,\n onChange,\n onFocus,\n placeholder,\n required = false,\n rows,\n select = false,\n SelectProps: SelectPropsProp,\n slots = {},\n slotProps = {},\n type,\n value,\n variant = 'outlined',\n ...other\n } = props;\n const ownerState = {\n ...props,\n autoFocus,\n color,\n disabled,\n error,\n fullWidth,\n multiline,\n required,\n select,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n if (select && !children) {\n console.error('MUI: `children` must be passed when using the `TextField` component with `select`.');\n }\n }\n const id = useId(idOverride);\n const helperTextId = helperText && id ? `${id}-helper-text` : undefined;\n const inputLabelId = label && id ? `${id}-label` : undefined;\n const InputComponent = variantComponent[variant];\n const externalForwardedProps = {\n slots,\n slotProps: {\n input: InputPropsProp,\n inputLabel: InputLabelPropsProp,\n htmlInput: inputPropsProp,\n formHelperText: FormHelperTextPropsProp,\n select: SelectPropsProp,\n ...slotProps\n }\n };\n const inputAdditionalProps = {};\n const inputLabelSlotProps = externalForwardedProps.slotProps.inputLabel;\n if (variant === 'outlined') {\n if (inputLabelSlotProps && typeof inputLabelSlotProps.shrink !== 'undefined') {\n inputAdditionalProps.notched = inputLabelSlotProps.shrink;\n }\n inputAdditionalProps.label = label;\n }\n if (select) {\n // unset defaults from textbox inputs\n if (!SelectPropsProp || !SelectPropsProp.native) {\n inputAdditionalProps.id = undefined;\n }\n inputAdditionalProps['aria-describedby'] = undefined;\n }\n const [InputSlot, inputProps] = useSlot('input', {\n elementType: InputComponent,\n externalForwardedProps,\n additionalProps: inputAdditionalProps,\n ownerState\n });\n const [InputLabelSlot, inputLabelProps] = useSlot('inputLabel', {\n elementType: InputLabel,\n externalForwardedProps,\n ownerState\n });\n const [HtmlInputSlot, htmlInputProps] = useSlot('htmlInput', {\n elementType: 'input',\n externalForwardedProps,\n ownerState\n });\n const [FormHelperTextSlot, formHelperTextProps] = useSlot('formHelperText', {\n elementType: FormHelperText,\n externalForwardedProps,\n ownerState\n });\n const [SelectSlot, selectProps] = useSlot('select', {\n elementType: Select,\n externalForwardedProps,\n ownerState\n });\n const InputElement = /*#__PURE__*/_jsx(InputSlot, {\n \"aria-describedby\": helperTextId,\n autoComplete: autoComplete,\n autoFocus: autoFocus,\n defaultValue: defaultValue,\n fullWidth: fullWidth,\n multiline: multiline,\n name: name,\n rows: rows,\n maxRows: maxRows,\n minRows: minRows,\n type: type,\n value: value,\n id: id,\n inputRef: inputRef,\n onBlur: onBlur,\n onChange: onChange,\n onFocus: onFocus,\n placeholder: placeholder,\n inputProps: htmlInputProps,\n slots: {\n input: slots.htmlInput ? HtmlInputSlot : undefined\n },\n ...inputProps\n });\n return /*#__PURE__*/_jsxs(TextFieldRoot, {\n className: clsx(classes.root, className),\n disabled: disabled,\n error: error,\n fullWidth: fullWidth,\n ref: ref,\n required: required,\n color: color,\n variant: variant,\n ownerState: ownerState,\n ...other,\n children: [label != null && label !== '' && /*#__PURE__*/_jsx(InputLabelSlot, {\n htmlFor: id,\n id: inputLabelId,\n ...inputLabelProps,\n children: label\n }), select ? /*#__PURE__*/_jsx(SelectSlot, {\n \"aria-describedby\": helperTextId,\n id: id,\n labelId: inputLabelId,\n value: value,\n input: InputElement,\n ...selectProps,\n children: children\n }) : InputElement, helperText && /*#__PURE__*/_jsx(FormHelperTextSlot, {\n id: helperTextId,\n ...formHelperTextProps,\n children: helperText\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TextField.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * This prop helps users to fill forms faster, especially on mobile devices.\n * The name can be confusing, as it's more like an autofill.\n * You can learn more about it [following the specification](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#autofill).\n */\n autoComplete: PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the label is displayed in an error state.\n * @default false\n */\n error: PropTypes.bool,\n /**\n * Props applied to the [`FormHelperText`](https://mui.com/material-ui/api/form-helper-text/) element.\n * @deprecated Use `slotProps.formHelperText` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n FormHelperTextProps: PropTypes.object,\n /**\n * If `true`, the input will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The helper text content.\n */\n helperText: PropTypes.node,\n /**\n * The id of the `input` element.\n * Use this prop to make `label` and `helperText` accessible for screen readers.\n */\n id: PropTypes.string,\n /**\n * Props applied to the [`InputLabel`](https://mui.com/material-ui/api/input-label/) element.\n * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.\n * @deprecated Use `slotProps.inputLabel` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n InputLabelProps: PropTypes.object,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n * @deprecated Use `slotProps.htmlInput` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n inputProps: PropTypes.object,\n /**\n * Props applied to the Input element.\n * It will be a [`FilledInput`](https://mui.com/material-ui/api/filled-input/),\n * [`OutlinedInput`](https://mui.com/material-ui/api/outlined-input/) or [`Input`](https://mui.com/material-ui/api/input/)\n * component depending on the `variant` prop value.\n * @deprecated Use `slotProps.input` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n InputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n /**\n * Maximum number of rows to display when multiline option is set to true.\n */\n maxRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Minimum number of rows to display when multiline option is set to true.\n */\n minRows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * If `true`, a `textarea` element is rendered instead of an input.\n * @default false\n */\n multiline: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * @ignore\n */\n onBlur: PropTypes.func,\n /**\n * Callback fired when the value is changed.\n *\n * @param {object} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (string).\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n onFocus: PropTypes.func,\n /**\n * The short hint displayed in the `input` before the user enters a value.\n */\n placeholder: PropTypes.string,\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * Number of rows to display when multiline option is set to true.\n */\n rows: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n /**\n * Render a [`Select`](https://mui.com/material-ui/api/select/) element while passing the Input element to `Select` as `input` parameter.\n * If this option is set you must pass the options of the select as children.\n * @default false\n */\n select: PropTypes.bool,\n /**\n * Props applied to the [`Select`](https://mui.com/material-ui/api/select/) element.\n * @deprecated Use `slotProps.select` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n SelectProps: PropTypes.object,\n /**\n * The size of the component.\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes /* @typescript-to-proptypes-ignore */.shape({\n formHelperText: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n htmlInput: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n inputLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n select: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n formHelperText: PropTypes.elementType,\n htmlInput: PropTypes.elementType,\n input: PropTypes.elementType,\n inputLabel: PropTypes.elementType,\n select: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The value of the `input` element, required for a controlled component.\n */\n value: PropTypes.any,\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport default TextField;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTooltipUtilityClass(slot) {\n return generateUtilityClass('MuiTooltip', slot);\n}\nconst tooltipClasses = generateUtilityClasses('MuiTooltip', ['popper', 'popperInteractive', 'popperArrow', 'popperClose', 'tooltip', 'tooltipArrow', 'touch', 'tooltipPlacementLeft', 'tooltipPlacementRight', 'tooltipPlacementTop', 'tooltipPlacementBottom', 'arrow']);\nexport default tooltipClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useTimeout, { Timeout } from '@mui/utils/useTimeout';\nimport elementAcceptingRef from '@mui/utils/elementAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport appendOwnerState from '@mui/utils/appendOwnerState';\nimport getReactNodeRef from '@mui/utils/getReactNodeRef';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport Grow from \"../Grow/index.js\";\nimport Popper from \"../Popper/index.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useId from \"../utils/useId.js\";\nimport useControlled from \"../utils/useControlled.js\";\nimport tooltipClasses, { getTooltipUtilityClass } from \"./tooltipClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${capitalize(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return composeClasses(slots, getTooltipUtilityClass, classes);\n};\nconst TooltipPopper = styled(Popper, {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(memoTheme(({\n theme\n}) => ({\n zIndex: (theme.vars || theme).zIndex.tooltip,\n pointerEvents: 'none',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableInteractive,\n style: {\n pointerEvents: 'auto'\n }\n }, {\n props: ({\n open\n }) => !open,\n style: {\n pointerEvents: 'none'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n [`&[data-popper-placement*=\"bottom\"] .${tooltipClasses.arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${tooltipClasses.arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n },\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"right\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n right: 0,\n marginRight: '-0.71em'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.arrow && !!ownerState.isRtl,\n style: {\n [`&[data-popper-placement*=\"left\"] .${tooltipClasses.arrow}`]: {\n left: 0,\n marginLeft: '-0.71em'\n }\n }\n }]\n})));\nconst TooltipTooltip = styled('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${capitalize(ownerState.placement.split('-')[0])}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),\n borderRadius: (theme.vars || theme).shape.borderRadius,\n color: (theme.vars || theme).palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium,\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n transformOrigin: 'right center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n transformOrigin: 'left center'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n transformOrigin: 'center top',\n marginTop: '14px'\n },\n variants: [{\n props: ({\n ownerState\n }) => ownerState.arrow,\n style: {\n position: 'relative',\n margin: 0\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginRight: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginLeft: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '14px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '14px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => !!ownerState.isRtl && ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"left\"] &`]: {\n marginLeft: '24px'\n },\n [`.${tooltipClasses.popper}[data-popper-placement*=\"right\"] &`]: {\n marginRight: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"top\"] &`]: {\n marginBottom: '24px'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.touch,\n style: {\n [`.${tooltipClasses.popper}[data-popper-placement*=\"bottom\"] &`]: {\n marginTop: '24px'\n }\n }\n }]\n})));\nconst TooltipArrow = styled('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(memoTheme(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em' /* = width / sqrt(2) = (length of the hypotenuse) */,\n boxSizing: 'border-box',\n color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n})));\nlet hystersisOpen = false;\nconst hystersisTimer = new Timeout();\nlet cursorPosition = {\n x: 0,\n y: 0\n};\nexport function testReset() {\n hystersisOpen = false;\n hystersisTimer.clear();\n}\nfunction composeEventHandler(handler, eventHandler) {\n return (event, ...params) => {\n if (eventHandler) {\n eventHandler(event, ...params);\n }\n handler(event, ...params);\n };\n}\n\n// TODO v6: Remove PopperComponent, PopperProps, TransitionComponent and TransitionProps.\nconst Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTooltip'\n });\n const {\n arrow = false,\n children: childrenProp,\n classes: classesProp,\n components = {},\n componentsProps = {},\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent: PopperComponentProp,\n PopperProps = {},\n slotProps = {},\n slots = {},\n title,\n TransitionComponent: TransitionComponentProp = Grow,\n TransitionProps,\n ...other\n } = props;\n\n // to prevent runtime errors, developers will need to provide a child as a React element anyway.\n const children = /*#__PURE__*/React.isValidElement(childrenProp) ? childrenProp : /*#__PURE__*/_jsx(\"span\", {\n children: childrenProp\n });\n const theme = useTheme();\n const isRtl = useRtl();\n const [childNode, setChildNode] = React.useState();\n const [arrowRef, setArrowRef] = React.useState(null);\n const ignoreNonTouchEvents = React.useRef(false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = useTimeout();\n const enterTimer = useTimeout();\n const leaveTimer = useTimeout();\n const touchTimer = useTimeout();\n const [openState, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = React.useRef(openProp !== undefined);\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['MUI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n const id = useId(idProp);\n const prevUserSelect = React.useRef();\n const stopTouchInteraction = useEventCallback(() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n touchTimer.clear();\n });\n React.useEffect(() => stopTouchInteraction, [stopTouchInteraction]);\n const handleOpen = event => {\n hystersisTimer.clear();\n hystersisOpen = true;\n\n // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n setOpenState(true);\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n const handleClose = useEventCallback(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n hystersisTimer.start(800 + leaveDelay, () => {\n hystersisOpen = false;\n });\n setOpenState(false);\n if (onClose && open) {\n onClose(event);\n }\n closeTimer.start(theme.transitions.duration.shortest, () => {\n ignoreNonTouchEvents.current = false;\n });\n });\n const handleMouseOver = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n }\n\n // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n if (childNode) {\n childNode.removeAttribute('title');\n }\n enterTimer.clear();\n leaveTimer.clear();\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.start(hystersisOpen ? enterNextDelay : enterDelay, () => {\n handleOpen(event);\n });\n } else {\n handleOpen(event);\n }\n };\n const handleMouseLeave = event => {\n enterTimer.clear();\n leaveTimer.start(leaveDelay, () => {\n handleClose(event);\n });\n };\n const [, setChildIsFocusVisible] = React.useState(false);\n const handleBlur = event => {\n if (!isFocusVisible(event.target)) {\n setChildIsFocusVisible(false);\n handleMouseLeave(event);\n }\n };\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n if (isFocusVisible(event.target)) {\n setChildIsFocusVisible(true);\n handleMouseOver(event);\n }\n };\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n const handleTouchStart = event => {\n detectTouchStart(event);\n leaveTimer.clear();\n closeTimer.clear();\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect;\n // Prevent iOS text selection on long-tap.\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.start(enterTouchDelay, () => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleMouseOver(event);\n });\n };\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n stopTouchInteraction();\n leaveTimer.start(leaveTouchDelay, () => {\n handleClose(event);\n });\n };\n React.useEffect(() => {\n if (!open) {\n return undefined;\n }\n\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n function handleKeyDown(nativeEvent) {\n if (nativeEvent.key === 'Escape') {\n handleClose(nativeEvent);\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleRef = useForkRef(getReactNodeRef(children), setChildNode, ref);\n\n // There is no point in displaying an empty tooltip.\n // So we exclude all falsy values, except 0, which is valid.\n if (!title && title !== 0) {\n open = false;\n }\n const popperRef = React.useRef();\n const handleMouseMove = event => {\n const childrenProps = children.props;\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n cursorPosition = {\n x: event.clientX,\n y: event.clientY\n };\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n const childrenProps = {\n ...nameOrDescProps,\n ...other,\n ...children.props,\n className: clsx(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef,\n ...(followCursor ? {\n onMouseMove: handleMouseMove\n } : {})\n };\n if (process.env.NODE_ENV !== 'production') {\n childrenProps['data-mui-internal-clone-element'] = true;\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['MUI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n const interactiveWrapperListeners = {};\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n if (process.env.NODE_ENV !== 'production') {\n if (children.props.title) {\n console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n const popperOptions = React.useMemo(() => {\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n if (PopperProps.popperOptions?.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n return {\n ...PopperProps.popperOptions,\n modifiers: tooltipModifiers\n };\n }, [arrowRef, PopperProps]);\n const ownerState = {\n ...props,\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponentProp,\n touch: ignoreNonTouchEvents.current\n };\n const classes = useUtilityClasses(ownerState);\n const PopperComponent = slots.popper ?? components.Popper ?? TooltipPopper;\n const TransitionComponent = slots.transition ?? components.Transition ?? TransitionComponentProp ?? Grow;\n const TooltipComponent = slots.tooltip ?? components.Tooltip ?? TooltipTooltip;\n const ArrowComponent = slots.arrow ?? components.Arrow ?? TooltipArrow;\n const popperProps = appendOwnerState(PopperComponent, {\n ...PopperProps,\n ...(slotProps.popper ?? componentsProps.popper),\n className: clsx(classes.popper, PopperProps?.className, (slotProps.popper ?? componentsProps.popper)?.className)\n }, ownerState);\n const transitionProps = appendOwnerState(TransitionComponent, {\n ...TransitionProps,\n ...(slotProps.transition ?? componentsProps.transition)\n }, ownerState);\n const tooltipProps = appendOwnerState(TooltipComponent, {\n ...(slotProps.tooltip ?? componentsProps.tooltip),\n className: clsx(classes.tooltip, (slotProps.tooltip ?? componentsProps.tooltip)?.className)\n }, ownerState);\n const tooltipArrowProps = appendOwnerState(ArrowComponent, {\n ...(slotProps.arrow ?? componentsProps.arrow),\n className: clsx(classes.arrow, (slotProps.arrow ?? componentsProps.arrow)?.className)\n }, ownerState);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperComponent, {\n as: PopperComponentProp ?? Popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: cursorPosition.y,\n left: cursorPosition.x,\n right: cursorPosition.x,\n bottom: cursorPosition.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true,\n ...interactiveWrapperListeners,\n ...popperProps,\n popperOptions: popperOptions,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/_jsx(TransitionComponent, {\n timeout: theme.transitions.duration.shorter,\n ...TransitionPropsInner,\n ...transitionProps,\n children: /*#__PURE__*/_jsxs(TooltipComponent, {\n ...tooltipProps,\n children: [title, arrow ? /*#__PURE__*/_jsx(ArrowComponent, {\n ...tooltipArrowProps,\n ref: setArrowRef\n }) : null]\n })\n })\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Tooltip.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: PropTypes.bool,\n /**\n * Tooltip reference element.\n */\n children: elementAcceptingRef.isRequired,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/).\n *\n * @default {}\n */\n components: PropTypes.shape({\n Arrow: PropTypes.elementType,\n Popper: PropTypes.elementType,\n Tooltip: PropTypes.elementType,\n Transition: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/).\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: PropTypes.bool,\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: PropTypes.bool,\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: PropTypes.bool,\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: PropTypes.bool,\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: PropTypes.bool,\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: PropTypes.number,\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: PropTypes.number,\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: PropTypes.number,\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: PropTypes.bool,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: PropTypes.string,\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: PropTypes.number,\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: PropTypes.number,\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: PropTypes.elementType,\n /**\n * Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.\n * @default {}\n */\n PopperProps: PropTypes.object,\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slotProps: PropTypes.shape({\n arrow: PropTypes.object,\n popper: PropTypes.object,\n tooltip: PropTypes.object,\n transition: PropTypes.object\n }),\n /**\n * The components used for each slot inside.\n *\n * This prop is an alias for the `components` prop, which will be deprecated in the future.\n *\n * @default {}\n */\n slots: PropTypes.shape({\n arrow: PropTypes.elementType,\n popper: PropTypes.elementType,\n tooltip: PropTypes.elementType,\n transition: PropTypes.elementType\n }),\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.\n */\n title: PropTypes.node,\n /**\n * The component used for the transition.\n * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: PropTypes.elementType,\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.\n */\n TransitionProps: PropTypes.object\n} : void 0;\nexport default Tooltip;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled, internal_createExtendSxProp } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport { getTypographyUtilityClass } from \"./typographyClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst v6Colors = {\n primary: true,\n secondary: true,\n error: true,\n info: true,\n success: true,\n warning: true,\n textPrimary: true,\n textSecondary: true,\n textDisabled: true\n};\nconst extendSxProp = internal_createExtendSxProp();\nconst useUtilityClasses = ownerState => {\n const {\n align,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, ownerState.align !== 'inherit' && `align${capitalize(align)}`, gutterBottom && 'gutterBottom', noWrap && 'noWrap', paragraph && 'paragraph']\n };\n return composeClasses(slots, getTypographyUtilityClass, classes);\n};\nexport const TypographyRoot = styled('span', {\n name: 'MuiTypography',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${capitalize(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];\n }\n})(memoTheme(({\n theme\n}) => ({\n margin: 0,\n variants: [{\n props: {\n variant: 'inherit'\n },\n style: {\n // Some elements, like <button> on Chrome have default font that doesn't inherit, reset this.\n font: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n }, ...Object.entries(theme.typography).filter(([variant, value]) => variant !== 'inherit' && value && typeof value === 'object').map(([variant, value]) => ({\n props: {\n variant\n },\n style: value\n })), ...Object.entries(theme.palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n })), ...Object.entries(theme.palette?.text || {}).filter(([, value]) => typeof value === 'string').map(([color]) => ({\n props: {\n color: `text${capitalize(color)}`\n },\n style: {\n color: (theme.vars || theme).palette.text[color]\n }\n })), {\n props: ({\n ownerState\n }) => ownerState.align !== 'inherit',\n style: {\n textAlign: 'var(--Typography-textAlign)'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.noWrap,\n style: {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.gutterBottom,\n style: {\n marginBottom: '0.35em'\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.paragraph,\n style: {\n marginBottom: 16\n }\n }]\n})));\nconst defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n inherit: 'p'\n};\nconst Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, ref) {\n const {\n color,\n ...themeProps\n } = useDefaultProps({\n props: inProps,\n name: 'MuiTypography'\n });\n const isSxColor = !v6Colors[color];\n // TODO: Remove `extendSxProp` in v7\n const props = extendSxProp({\n ...themeProps,\n ...(isSxColor && {\n color\n })\n });\n const {\n align = 'inherit',\n className,\n component,\n gutterBottom = false,\n noWrap = false,\n paragraph = false,\n variant = 'body1',\n variantMapping = defaultVariantMapping,\n ...other\n } = props;\n const ownerState = {\n ...props,\n align,\n color,\n className,\n component,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n variantMapping\n };\n const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(TypographyRoot, {\n as: Component,\n ref: ref,\n className: clsx(classes.root, className),\n ...other,\n ownerState: ownerState,\n style: {\n ...(align !== 'inherit' && {\n '--Typography-textAlign': align\n }),\n ...other.style\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Typography.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Set the text-align on the component.\n * @default 'inherit'\n */\n align: PropTypes.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'success', 'error', 'info', 'warning', 'textPrimary', 'textSecondary', 'textDisabled']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, the text will have a bottom margin.\n * @default false\n */\n gutterBottom: PropTypes.bool,\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n * @default false\n */\n noWrap: PropTypes.bool,\n /**\n * If `true`, the element will be a paragraph element.\n * @default false\n * @deprecated Use the `component` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n */\n paragraph: PropTypes.bool,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['body1', 'body2', 'button', 'caption', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit', 'overline', 'subtitle1', 'subtitle2']), PropTypes.string]),\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to `<h6>`.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n * @default {\n * h1: 'h1',\n * h2: 'h2',\n * h3: 'h3',\n * h4: 'h4',\n * h5: 'h5',\n * h6: 'h6',\n * subtitle1: 'h6',\n * subtitle2: 'h6',\n * body1: 'p',\n * body2: 'p',\n * inherit: 'p',\n * }\n */\n variantMapping: PropTypes /* @typescript-to-proptypes-ignore */.object\n} : void 0;\nexport default Typography;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTypographyUtilityClass(slot) {\n return generateUtilityClass('MuiTypography', slot);\n}\nconst typographyClasses = generateUtilityClasses('MuiTypography', ['root', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'subtitle1', 'subtitle2', 'body1', 'body2', 'inherit', 'button', 'caption', 'overline', 'alignLeft', 'alignRight', 'alignCenter', 'alignJustify', 'noWrap', 'gutterBottom', 'paragraph']);\nexport default typographyClasses;","'use client';\n\n/* eslint-disable consistent-return, jsx-a11y/no-noninteractive-tabindex */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp, elementAcceptingRef, unstable_useForkRef as useForkRef, unstable_ownerDocument as ownerDocument, unstable_getReactNodeRef as getReactNodeRef } from '@mui/utils';\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\n// Inspired by https://github.com/focus-trap/tabbable\nconst candidatesSelector = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])'].join(',');\nfunction getTabIndex(node) {\n const tabindexAttr = parseInt(node.getAttribute('tabindex') || '', 10);\n if (!Number.isNaN(tabindexAttr)) {\n return tabindexAttr;\n }\n\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // https://bugs.chromium.org/p/chromium/issues/detail?id=661108&q=contenteditable%20tabindex&can=2\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n if (node.contentEditable === 'true' || (node.nodeName === 'AUDIO' || node.nodeName === 'VIDEO' || node.nodeName === 'DETAILS') && node.getAttribute('tabindex') === null) {\n return 0;\n }\n return node.tabIndex;\n}\nfunction isNonTabbableRadio(node) {\n if (node.tagName !== 'INPUT' || node.type !== 'radio') {\n return false;\n }\n if (!node.name) {\n return false;\n }\n const getRadio = selector => node.ownerDocument.querySelector(`input[type=\"radio\"]${selector}`);\n let roving = getRadio(`[name=\"${node.name}\"]:checked`);\n if (!roving) {\n roving = getRadio(`[name=\"${node.name}\"]`);\n }\n return roving !== node;\n}\nfunction isNodeMatchingSelectorFocusable(node) {\n if (node.disabled || node.tagName === 'INPUT' && node.type === 'hidden' || isNonTabbableRadio(node)) {\n return false;\n }\n return true;\n}\nfunction defaultGetTabbable(root) {\n const regularTabNodes = [];\n const orderedTabNodes = [];\n Array.from(root.querySelectorAll(candidatesSelector)).forEach((node, i) => {\n const nodeTabIndex = getTabIndex(node);\n if (nodeTabIndex === -1 || !isNodeMatchingSelectorFocusable(node)) {\n return;\n }\n if (nodeTabIndex === 0) {\n regularTabNodes.push(node);\n } else {\n orderedTabNodes.push({\n documentOrder: i,\n tabIndex: nodeTabIndex,\n node: node\n });\n }\n });\n return orderedTabNodes.sort((a, b) => a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex).map(a => a.node).concat(regularTabNodes);\n}\nfunction defaultIsEnabled() {\n return true;\n}\n\n/**\n * @ignore - internal component.\n */\nfunction FocusTrap(props) {\n const {\n children,\n disableAutoFocus = false,\n disableEnforceFocus = false,\n disableRestoreFocus = false,\n getTabbable = defaultGetTabbable,\n isEnabled = defaultIsEnabled,\n open\n } = props;\n const ignoreNextEnforceFocus = React.useRef(false);\n const sentinelStart = React.useRef(null);\n const sentinelEnd = React.useRef(null);\n const nodeToRestore = React.useRef(null);\n const reactFocusEventTarget = React.useRef(null);\n // This variable is useful when disableAutoFocus is true.\n // It waits for the active element to move into the component to activate.\n const activated = React.useRef(false);\n const rootRef = React.useRef(null);\n const handleRef = useForkRef(getReactNodeRef(children), rootRef);\n const lastKeydown = React.useRef(null);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n activated.current = !disableAutoFocus;\n }, [disableAutoFocus, open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n if (!rootRef.current.contains(doc.activeElement)) {\n if (!rootRef.current.hasAttribute('tabIndex')) {\n if (process.env.NODE_ENV !== 'production') {\n console.error(['MUI: The modal content node does not accept focus.', 'For the benefit of assistive technologies, ' + 'the tabIndex of the node is being set to \"-1\".'].join('\\n'));\n }\n rootRef.current.setAttribute('tabIndex', '-1');\n }\n if (activated.current) {\n rootRef.current.focus();\n }\n }\n return () => {\n // restoreLastFocus()\n if (!disableRestoreFocus) {\n // In IE11 it is possible for document.activeElement to be null resulting\n // in nodeToRestore.current being null.\n // Not all elements in IE11 have a focus method.\n // Once IE11 support is dropped the focus() call can be unconditional.\n if (nodeToRestore.current && nodeToRestore.current.focus) {\n ignoreNextEnforceFocus.current = true;\n nodeToRestore.current.focus();\n }\n nodeToRestore.current = null;\n }\n };\n // Missing `disableRestoreFocus` which is fine.\n // We don't support changing that prop on an open FocusTrap\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [open]);\n React.useEffect(() => {\n // We might render an empty child.\n if (!open || !rootRef.current) {\n return;\n }\n const doc = ownerDocument(rootRef.current);\n const loopFocus = nativeEvent => {\n lastKeydown.current = nativeEvent;\n if (disableEnforceFocus || !isEnabled() || nativeEvent.key !== 'Tab') {\n return;\n }\n\n // Make sure the next tab starts from the right place.\n // doc.activeElement refers to the origin.\n if (doc.activeElement === rootRef.current && nativeEvent.shiftKey) {\n // We need to ignore the next contain as\n // it will try to move the focus back to the rootRef element.\n ignoreNextEnforceFocus.current = true;\n if (sentinelEnd.current) {\n sentinelEnd.current.focus();\n }\n }\n };\n const contain = () => {\n const rootElement = rootRef.current;\n\n // Cleanup functions are executed lazily in React 17.\n // Contain can be called between the component being unmounted and its cleanup function being run.\n if (rootElement === null) {\n return;\n }\n if (!doc.hasFocus() || !isEnabled() || ignoreNextEnforceFocus.current) {\n ignoreNextEnforceFocus.current = false;\n return;\n }\n\n // The focus is already inside\n if (rootElement.contains(doc.activeElement)) {\n return;\n }\n\n // The disableEnforceFocus is set and the focus is outside of the focus trap (and sentinel nodes)\n if (disableEnforceFocus && doc.activeElement !== sentinelStart.current && doc.activeElement !== sentinelEnd.current) {\n return;\n }\n\n // if the focus event is not coming from inside the children's react tree, reset the refs\n if (doc.activeElement !== reactFocusEventTarget.current) {\n reactFocusEventTarget.current = null;\n } else if (reactFocusEventTarget.current !== null) {\n return;\n }\n if (!activated.current) {\n return;\n }\n let tabbable = [];\n if (doc.activeElement === sentinelStart.current || doc.activeElement === sentinelEnd.current) {\n tabbable = getTabbable(rootRef.current);\n }\n\n // one of the sentinel nodes was focused, so move the focus\n // to the first/last tabbable element inside the focus trap\n if (tabbable.length > 0) {\n const isShiftTab = Boolean(lastKeydown.current?.shiftKey && lastKeydown.current?.key === 'Tab');\n const focusNext = tabbable[0];\n const focusPrevious = tabbable[tabbable.length - 1];\n if (typeof focusNext !== 'string' && typeof focusPrevious !== 'string') {\n if (isShiftTab) {\n focusPrevious.focus();\n } else {\n focusNext.focus();\n }\n }\n // no tabbable elements in the trap focus or the focus was outside of the focus trap\n } else {\n rootElement.focus();\n }\n };\n doc.addEventListener('focusin', contain);\n doc.addEventListener('keydown', loopFocus, true);\n\n // With Edge, Safari and Firefox, no focus related events are fired when the focused area stops being a focused area.\n // for example https://bugzilla.mozilla.org/show_bug.cgi?id=559561.\n // Instead, we can look if the active element was restored on the BODY element.\n //\n // The whatwg spec defines how the browser should behave but does not explicitly mention any events:\n // https://html.spec.whatwg.org/multipage/interaction.html#focus-fixup-rule.\n const interval = setInterval(() => {\n if (doc.activeElement && doc.activeElement.tagName === 'BODY') {\n contain();\n }\n }, 50);\n return () => {\n clearInterval(interval);\n doc.removeEventListener('focusin', contain);\n doc.removeEventListener('keydown', loopFocus, true);\n };\n }, [disableAutoFocus, disableEnforceFocus, disableRestoreFocus, isEnabled, open, getTabbable]);\n const onFocus = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n reactFocusEventTarget.current = event.target;\n const childrenPropsHandler = children.props.onFocus;\n if (childrenPropsHandler) {\n childrenPropsHandler(event);\n }\n };\n const handleFocusSentinel = event => {\n if (nodeToRestore.current === null) {\n nodeToRestore.current = event.relatedTarget;\n }\n activated.current = true;\n };\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelStart,\n \"data-testid\": \"sentinelStart\"\n }), /*#__PURE__*/React.cloneElement(children, {\n ref: handleRef,\n onFocus\n }), /*#__PURE__*/_jsx(\"div\", {\n tabIndex: open ? 0 : -1,\n onFocus: handleFocusSentinel,\n ref: sentinelEnd,\n \"data-testid\": \"sentinelEnd\"\n })]\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? FocusTrap.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * A single child content element.\n */\n children: elementAcceptingRef,\n /**\n * If `true`, the focus trap will not automatically shift focus to itself when it opens, and\n * replace it to the last focused element when it closes.\n * This also works correctly with any focus trap children that have the `disableAutoFocus` prop.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableAutoFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not prevent focus from leaving the focus trap while open.\n *\n * Generally this should never be set to `true` as it makes the focus trap less\n * accessible to assistive technologies, like screen readers.\n * @default false\n */\n disableEnforceFocus: PropTypes.bool,\n /**\n * If `true`, the focus trap will not restore focus to previously focused element once\n * focus trap is hidden or unmounted.\n * @default false\n */\n disableRestoreFocus: PropTypes.bool,\n /**\n * Returns an array of ordered tabbable nodes (i.e. in tab order) within the root.\n * For instance, you can provide the \"tabbable\" npm dependency.\n * @param {HTMLElement} root\n */\n getTabbable: PropTypes.func,\n /**\n * This prop extends the `open` prop.\n * It allows to toggle the open state without having to wait for a rerender when changing the `open` prop.\n * This prop should be memoized.\n * It can be used to support multiple focus trap mounted at the same time.\n * @default function defaultIsEnabled(): boolean {\n * return true;\n * }\n */\n isEnabled: PropTypes.func,\n /**\n * If `true`, focus is locked.\n */\n open: PropTypes.bool.isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line\n FocusTrap['propTypes' + ''] = exactProp(FocusTrap.propTypes);\n}\nexport default FocusTrap;","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { darken, getContrastRatio, lighten } from '@mui/system/colorManipulator';\nimport common from \"../colors/common.js\";\nimport grey from \"../colors/grey.js\";\nimport purple from \"../colors/purple.js\";\nimport red from \"../colors/red.js\";\nimport orange from \"../colors/orange.js\";\nimport blue from \"../colors/blue.js\";\nimport lightBlue from \"../colors/lightBlue.js\";\nimport green from \"../colors/green.js\";\nexport const light = {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n};\nexport const dark = {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n};\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2,\n ...other\n } = palette;\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = {\n ...color\n };\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\nThe color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\n\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\n\nDid you intend to use one of the following approaches?\n\nimport { green } from \"@mui/material/colors\";\n\nconst theme1 = createTheme({ palette: {\n primary: green,\n} });\n\nconst theme2 = createTheme({ palette: {\n primary: { main: green[500] },\n} });` : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n const modes = {\n dark,\n light\n };\n if (process.env.NODE_ENV !== 'production') {\n if (!modes[mode]) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge({\n // A collection of common colors.\n common: {\n ...common\n },\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset,\n // The light and dark mode object.\n ...modes[mode]\n }, other);\n return paletteOutput;\n}","/**\n * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable\n * and they does not need to remember the prefix (defined once).\n */\nexport default function createGetCssVar(prefix = '') {\n function appendVar(...vars) {\n if (!vars.length) {\n return '';\n }\n const value = vars[0];\n if (typeof value === 'string' && !value.match(/(#|\\(|\\)|(-?(\\d*\\.)?\\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\\d*\\.)?\\d+)$|(\\d+ \\d+ \\d+)/)) {\n return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;\n }\n return `, ${value}`;\n }\n\n // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.\n const getCssVar = (field, ...fallbacks) => {\n return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...fallbacks)})`;\n };\n return getCssVar;\n}","export default function prepareTypographyVars(typography) {\n const vars = {};\n const entries = Object.entries(typography);\n entries.forEach(entry => {\n const [key, value] = entry;\n if (typeof value === 'object') {\n vars[key] = `${value.fontStyle ? `${value.fontStyle} ` : ''}${value.fontVariant ? `${value.fontVariant} ` : ''}${value.fontWeight ? `${value.fontWeight} ` : ''}${value.fontStretch ? `${value.fontStretch} ` : ''}${value.fontSize || ''}${value.lineHeight ? `/${value.lineHeight} ` : ''}${value.fontFamily || ''}`;\n }\n });\n return vars;\n}","/**\n * This function create an object from keys, value and then assign to target\n *\n * @param {Object} obj : the target object to be assigned\n * @param {string[]} keys\n * @param {string | number} value\n *\n * @example\n * const source = {}\n * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }\n *\n * @example\n * const source = { palette: { primary: 'var(--palette-primary)' } }\n * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }\n */\nexport const assignNestedKeys = (obj, keys, value, arrayKeys = []) => {\n let temp = obj;\n keys.forEach((k, index) => {\n if (index === keys.length - 1) {\n if (Array.isArray(temp)) {\n temp[Number(k)] = value;\n } else if (temp && typeof temp === 'object') {\n temp[k] = value;\n }\n } else if (temp && typeof temp === 'object') {\n if (!temp[k]) {\n temp[k] = arrayKeys.includes(k) ? [] : {};\n }\n temp = temp[k];\n }\n });\n};\n\n/**\n *\n * @param {Object} obj : source object\n * @param {Function} callback : a function that will be called when\n * - the deepest key in source object is reached\n * - the value of the deepest key is NOT `undefined` | `null`\n *\n * @example\n * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)\n * // ['palette', 'primary', 'main'] '#000000'\n */\nexport const walkObjectDeep = (obj, callback, shouldSkipPaths) => {\n function recurse(object, parentKeys = [], arrayKeys = []) {\n Object.entries(object).forEach(([key, value]) => {\n if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key])) {\n if (value !== undefined && value !== null) {\n if (typeof value === 'object' && Object.keys(value).length > 0) {\n recurse(value, [...parentKeys, key], Array.isArray(value) ? [...arrayKeys, key] : arrayKeys);\n } else {\n callback([...parentKeys, key], value, arrayKeys);\n }\n }\n }\n });\n }\n recurse(obj);\n};\nconst getCssValue = (keys, value) => {\n if (typeof value === 'number') {\n if (['lineHeight', 'fontWeight', 'opacity', 'zIndex'].some(prop => keys.includes(prop))) {\n // CSS property that are unitless\n return value;\n }\n const lastKey = keys[keys.length - 1];\n if (lastKey.toLowerCase().indexOf('opacity') >= 0) {\n // opacity values are unitless\n return value;\n }\n return `${value}px`;\n }\n return value;\n};\n\n/**\n * a function that parse theme and return { css, vars }\n *\n * @param {Object} theme\n * @param {{\n * prefix?: string,\n * shouldSkipGeneratingVar?: (objectPathKeys: Array<string>, value: string | number) => boolean\n * }} options.\n * `prefix`: The prefix of the generated CSS variables. This function does not change the value.\n *\n * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).\n *\n * @example\n * const { css, vars } = parser({\n * fontSize: 12,\n * lineHeight: 1.2,\n * palette: { primary: { 500: 'var(--color)' } }\n * }, { prefix: 'foo' })\n *\n * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }\n * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }\n */\nexport default function cssVarsParser(theme, options) {\n const {\n prefix,\n shouldSkipGeneratingVar\n } = options || {};\n const css = {};\n const vars = {};\n const varsWithDefaults = {};\n walkObjectDeep(theme, (keys, value, arrayKeys) => {\n if (typeof value === 'string' || typeof value === 'number') {\n if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {\n // only create css & var if `shouldSkipGeneratingVar` return false\n const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;\n const resolvedValue = getCssValue(keys, value);\n Object.assign(css, {\n [cssVar]: resolvedValue\n });\n assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);\n assignNestedKeys(varsWithDefaults, keys, `var(${cssVar}, ${resolvedValue})`, arrayKeys);\n }\n }\n }, keys => keys[0] === 'vars' // skip 'vars/*' paths\n );\n return {\n css,\n vars,\n varsWithDefaults\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nimport cssVarsParser from \"./cssVarsParser.js\";\nfunction prepareCssVars(theme, parserConfig = {}) {\n const {\n getSelector = defaultGetSelector,\n disableCssColorScheme,\n colorSchemeSelector: selector\n } = parserConfig;\n // @ts-ignore - ignore components do not exist\n const {\n colorSchemes = {},\n components,\n defaultColorScheme = 'light',\n ...otherTheme\n } = theme;\n const {\n vars: rootVars,\n css: rootCss,\n varsWithDefaults: rootVarsWithDefaults\n } = cssVarsParser(otherTheme, parserConfig);\n let themeVars = rootVarsWithDefaults;\n const colorSchemesMap = {};\n const {\n [defaultColorScheme]: defaultScheme,\n ...otherColorSchemes\n } = colorSchemes;\n Object.entries(otherColorSchemes || {}).forEach(([key, scheme]) => {\n const {\n vars,\n css,\n varsWithDefaults\n } = cssVarsParser(scheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[key] = {\n css,\n vars\n };\n });\n if (defaultScheme) {\n // default color scheme vars should be merged last to set as default\n const {\n css,\n vars,\n varsWithDefaults\n } = cssVarsParser(defaultScheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[defaultColorScheme] = {\n css,\n vars\n };\n }\n function defaultGetSelector(colorScheme, cssObject) {\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-joy-color-scheme' -> '[data-joy-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (colorScheme) {\n if (rule === 'media') {\n if (theme.defaultColorScheme === colorScheme) {\n return ':root';\n }\n const mode = colorSchemes[colorScheme]?.palette?.mode || colorScheme;\n return {\n [`@media (prefers-color-scheme: ${mode})`]: {\n ':root': cssObject\n }\n };\n }\n if (rule) {\n if (theme.defaultColorScheme === colorScheme) {\n return `:root, ${rule.replace('%s', String(colorScheme))}`;\n }\n return rule.replace('%s', String(colorScheme));\n }\n }\n return ':root';\n }\n const generateThemeVars = () => {\n let vars = {\n ...rootVars\n };\n Object.entries(colorSchemesMap).forEach(([, {\n vars: schemeVars\n }]) => {\n vars = deepmerge(vars, schemeVars);\n });\n return vars;\n };\n const generateStyleSheets = () => {\n const stylesheets = [];\n const colorScheme = theme.defaultColorScheme || 'light';\n function insertStyleSheet(key, css) {\n if (Object.keys(css).length) {\n stylesheets.push(typeof key === 'string' ? {\n [key]: {\n ...css\n }\n } : key);\n }\n }\n insertStyleSheet(getSelector(undefined, {\n ...rootCss\n }), rootCss);\n const {\n [colorScheme]: defaultSchemeVal,\n ...other\n } = colorSchemesMap;\n if (defaultSchemeVal) {\n // default color scheme has to come before other color schemes\n const {\n css\n } = defaultSchemeVal;\n const cssColorSheme = colorSchemes[colorScheme]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(colorScheme, {\n ...finalCss\n }), finalCss);\n }\n Object.entries(other).forEach(([key, {\n css\n }]) => {\n const cssColorSheme = colorSchemes[key]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(key, {\n ...finalCss\n }), finalCss);\n });\n return stylesheets;\n };\n return {\n vars: themeVars,\n generateThemeVars,\n generateStyleSheets\n };\n}\nexport default prepareCssVars;","/* eslint-disable import/prefer-default-export */\nexport function createGetColorSchemeSelector(selector) {\n return function getColorSchemeSelector(colorScheme) {\n if (selector === 'media') {\n if (process.env.NODE_ENV !== 'production') {\n if (colorScheme !== 'light' && colorScheme !== 'dark') {\n console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${colorScheme}'.`);\n }\n }\n return `@media (prefers-color-scheme: ${colorScheme})`;\n }\n if (selector) {\n if (selector.startsWith('data-') && !selector.includes('%s')) {\n return `[${selector}=\"${colorScheme}\"] &`;\n }\n if (selector === 'class') {\n return `.${colorScheme} &`;\n }\n if (selector === 'data') {\n return `[data-${colorScheme}] &`;\n }\n return `${selector.replace('%s', colorScheme)} &`;\n }\n return '&';\n };\n}","export default function createMixins(breakpoints, mixins) {\n return {\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n },\n ...mixins\n };\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.desmos.com/calculator/vbrp3ggqet\n return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3000);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = {\n ...easing,\n ...inputTransitions.easing\n };\n const mergedDuration = {\n ...duration,\n ...inputTransitions.duration\n };\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0,\n ...other\n } = options;\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n const isNumber = value => !Number.isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return {\n getAutoHeightDuration,\n create,\n ...inputTransitions,\n easing: mergedEasing,\n duration: mergedDuration\n };\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport systemCreateTheme from '@mui/system/createTheme';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from \"./createMixins.js\";\nimport createPalette from \"./createPalette.js\";\nimport createTypography from \"./createTypography.js\";\nimport shadows from \"./shadows.js\";\nimport createTransitions from \"./createTransitions.js\";\nimport zIndex from \"./zIndex.js\";\nfunction createThemeNoVars(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput,\n mixins: mixinsInput = {},\n spacing: spacingInput,\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {},\n shape: shapeInput,\n ...other\n } = options;\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: \\`vars\\` is a private field used for CSS variables support.\nPlease use another name.` : _formatMuiErrorMessage(20));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: {\n ...zIndex\n }\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in\n for (key in node) {\n const child = node[key];\n if (stateClasses.includes(key) && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.startsWith('Mui')) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createThemeNoVars(...args);\n}\nexport default createThemeNoVars;","import createPalette from \"./createPalette.js\";\nimport getOverlayAlpha from \"./getOverlayAlpha.js\";\nconst defaultDarkOverlays = [...Array(25)].map((_, index) => {\n if (index === 0) {\n return undefined;\n }\n const overlay = getOverlayAlpha(index);\n return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;\n});\nexport function getOpacity(mode) {\n return {\n inputPlaceholder: mode === 'dark' ? 0.5 : 0.42,\n inputUnderline: mode === 'dark' ? 0.7 : 0.42,\n switchTrackDisabled: mode === 'dark' ? 0.2 : 0.12,\n switchTrack: mode === 'dark' ? 0.3 : 0.38\n };\n}\nexport function getOverlays(mode) {\n return mode === 'dark' ? defaultDarkOverlays : [];\n}\nexport default function createColorScheme(options) {\n const {\n palette: paletteInput = {\n mode: 'light'\n },\n // need to cast to avoid module augmentation test\n opacity,\n overlays,\n ...rest\n } = options;\n const palette = createPalette(paletteInput);\n return {\n palette,\n opacity: {\n ...getOpacity(palette.mode),\n ...opacity\n },\n overlays: overlays || getOverlays(palette.mode),\n ...rest\n };\n}","export default function shouldSkipGeneratingVar(keys) {\n return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||\n // ends with sxConfig\n keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);\n}","/**\n * @internal These variables should not appear in the :root stylesheet when the `defaultColorScheme=\"dark\"`\n */\nconst excludeVariablesFromRoot = cssVarPrefix => [...[...Array(24)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index + 1}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];\nexport default excludeVariablesFromRoot;","import excludeVariablesFromRoot from \"./excludeVariablesFromRoot.js\";\nexport default (theme => (colorScheme, css) => {\n const selector = theme.colorSchemeSelector;\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (theme.defaultColorScheme === colorScheme) {\n if (colorScheme === 'dark') {\n const excludedVariables = {};\n excludeVariablesFromRoot(theme.cssVarPrefix).forEach(cssVar => {\n excludedVariables[cssVar] = css[cssVar];\n delete css[cssVar];\n });\n if (rule === 'media') {\n return {\n ':root': css,\n [`@media (prefers-color-scheme: dark)`]: {\n ':root': excludedVariables\n }\n };\n }\n if (rule) {\n return {\n [rule.replace('%s', colorScheme)]: excludedVariables,\n [`:root, ${rule.replace('%s', colorScheme)}`]: css\n };\n }\n return {\n ':root': {\n ...css,\n ...excludedVariables\n }\n };\n }\n if (rule && rule !== 'media') {\n return `:root, ${rule.replace('%s', String(colorScheme))}`;\n }\n } else if (colorScheme) {\n if (rule === 'media') {\n return {\n [`@media (prefers-color-scheme: ${String(colorScheme)})`]: {\n ':root': css\n }\n };\n }\n if (rule) {\n return rule.replace('%s', String(colorScheme));\n }\n }\n return ':root';\n});","/* eslint-disable import/prefer-default-export */\nimport { isPlainObject } from '@mui/utils/deepmerge';\nfunction isSerializable(val) {\n return isPlainObject(val) || typeof val === 'undefined' || typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number' || Array.isArray(val);\n}\n\n/**\n * `baseTheme` usually comes from `createTheme` or `extendTheme`.\n *\n * This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS\n * For example, in a Next.js project:\n *\n * ```js\n * // next.config.js\n * const { extendTheme } = require('@mui/material/styles');\n *\n * const theme = extendTheme();\n * // `.toRuntimeSource` is Pigment CSS specific to create a theme that is available at runtime.\n * theme.toRuntimeSource = stringifyTheme;\n *\n * module.exports = withPigment({\n * theme,\n * });\n * ```\n */\nexport function stringifyTheme(baseTheme = {}) {\n const serializableTheme = {\n ...baseTheme\n };\n function serializeTheme(object) {\n const array = Object.entries(object);\n // eslint-disable-next-line no-plusplus\n for (let index = 0; index < array.length; index++) {\n const [key, value] = array[index];\n if (!isSerializable(value) || key.startsWith('unstable_')) {\n delete object[key];\n } else if (isPlainObject(value)) {\n object[key] = {\n ...value\n };\n serializeTheme(object[key]);\n }\n }\n }\n serializeTheme(serializableTheme);\n return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(serializableTheme, null, 2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { unstable_createGetCssVar as systemCreateGetCssVar, createSpacing } from '@mui/system';\nimport { createUnarySpacing } from '@mui/system/spacing';\nimport { prepareCssVars, prepareTypographyVars, createGetColorSchemeSelector } from '@mui/system/cssVars';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, hslToRgb } from '@mui/system/colorManipulator';\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nimport createColorScheme, { getOpacity, getOverlays } from \"./createColorScheme.js\";\nimport defaultShouldSkipGeneratingVar from \"./shouldSkipGeneratingVar.js\";\nimport defaultGetSelector from \"./createGetSelector.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction assignNode(obj, keys) {\n keys.forEach(k => {\n if (!obj[k]) {\n obj[k] = {};\n }\n });\n}\nfunction setColor(obj, key, defaultValue) {\n if (!obj[key] && defaultValue) {\n obj[key] = defaultValue;\n }\n}\nfunction toRgb(color) {\n if (!color || !color.startsWith('hsl')) {\n return color;\n }\n return hslToRgb(color);\n}\nfunction setColorChannel(obj, key) {\n if (!(`${key}Channel` in obj)) {\n // custom channel token is not provided, generate one.\n // if channel token can't be generated, show a warning.\n obj[`${key}Channel`] = safeColorChannel(toRgb(obj[key]), `MUI: Can't create \\`palette.${key}Channel\\` because \\`palette.${key}\\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\\n' + `To suppress this warning, you need to explicitly provide the \\`palette.${key}Channel\\` as a string (in rgb format, for example \"12 12 12\") or undefined if you want to remove the channel token.`);\n }\n}\nfunction getSpacingVal(spacingInput) {\n if (typeof spacingInput === 'number') {\n return `${spacingInput}px`;\n }\n if (typeof spacingInput === 'string' || typeof spacingInput === 'function' || Array.isArray(spacingInput)) {\n return spacingInput;\n }\n return '8px';\n}\nconst silent = fn => {\n try {\n return fn();\n } catch (error) {\n // ignore error\n }\n return undefined;\n};\nexport const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);\nfunction attachColorScheme(colorSchemes, scheme, restTheme, colorScheme) {\n if (!scheme) {\n return undefined;\n }\n scheme = scheme === true ? {} : scheme;\n const mode = colorScheme === 'dark' ? 'dark' : 'light';\n if (!restTheme) {\n colorSchemes[colorScheme] = createColorScheme({\n ...scheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n return undefined;\n }\n const {\n palette,\n ...muiTheme\n } = createThemeNoVars({\n ...restTheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n colorSchemes[colorScheme] = {\n ...scheme,\n palette,\n opacity: {\n ...getOpacity(mode),\n ...scheme?.opacity\n },\n overlays: scheme?.overlays || getOverlays(mode)\n };\n return muiTheme;\n}\n\n/**\n * A default `createThemeWithVars` comes with a single color scheme, either `light` or `dark` based on the `defaultColorScheme`.\n * This is better suited for apps that only need a single color scheme.\n *\n * To enable built-in `light` and `dark` color schemes, either:\n * 1. provide a `colorSchemeSelector` to define how the color schemes will change.\n * 2. provide `colorSchemes.dark` will set `colorSchemeSelector: 'media'` by default.\n */\nexport default function createThemeWithVars(options = {}, ...args) {\n const {\n colorSchemes: colorSchemesInput = {\n light: true\n },\n defaultColorScheme: defaultColorSchemeInput,\n disableCssColorScheme = false,\n cssVarPrefix = 'mui',\n shouldSkipGeneratingVar = defaultShouldSkipGeneratingVar,\n colorSchemeSelector: selector = colorSchemesInput.light && colorSchemesInput.dark ? 'media' : undefined,\n ...input\n } = options;\n const firstColorScheme = Object.keys(colorSchemesInput)[0];\n const defaultColorScheme = defaultColorSchemeInput || (colorSchemesInput.light && firstColorScheme !== 'light' ? 'light' : firstColorScheme);\n const getCssVar = createGetCssVar(cssVarPrefix);\n const {\n [defaultColorScheme]: defaultSchemeInput,\n light: builtInLight,\n dark: builtInDark,\n ...customColorSchemes\n } = colorSchemesInput;\n const colorSchemes = {\n ...customColorSchemes\n };\n let defaultScheme = defaultSchemeInput;\n\n // For built-in light and dark color schemes, ensure that the value is valid if they are the default color scheme.\n if (defaultColorScheme === 'dark' && !('dark' in colorSchemesInput) || defaultColorScheme === 'light' && !('light' in colorSchemesInput)) {\n defaultScheme = true;\n }\n if (!defaultScheme) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The \\`colorSchemes.${defaultColorScheme}\\` option is either missing or invalid.` : _formatMuiErrorMessage(21, defaultColorScheme));\n }\n\n // Create the palette for the default color scheme, either `light`, `dark`, or custom color scheme.\n const muiTheme = attachColorScheme(colorSchemes, defaultScheme, input, defaultColorScheme);\n if (builtInLight && !colorSchemes.light) {\n attachColorScheme(colorSchemes, builtInLight, undefined, 'light');\n }\n if (builtInDark && !colorSchemes.dark) {\n attachColorScheme(colorSchemes, builtInDark, undefined, 'dark');\n }\n let theme = {\n defaultColorScheme,\n ...muiTheme,\n cssVarPrefix,\n colorSchemeSelector: selector,\n getCssVar,\n colorSchemes,\n font: {\n ...prepareTypographyVars(muiTheme.typography),\n ...muiTheme.font\n },\n spacing: getSpacingVal(input.spacing)\n };\n Object.keys(theme.colorSchemes).forEach(key => {\n const palette = theme.colorSchemes[key].palette;\n const setCssVarColor = cssVar => {\n const tokens = cssVar.split('-');\n const color = tokens[1];\n const colorToken = tokens[2];\n return getCssVar(cssVar, palette[color][colorToken]);\n };\n\n // attach black & white channels to common node\n if (palette.mode === 'light') {\n setColor(palette.common, 'background', '#fff');\n setColor(palette.common, 'onBackground', '#000');\n }\n if (palette.mode === 'dark') {\n setColor(palette.common, 'background', '#000');\n setColor(palette.common, 'onBackground', '#fff');\n }\n\n // assign component variables\n assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Button', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);\n if (palette.mode === 'light') {\n setColor(palette.Alert, 'errorColor', safeDarken(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeDarken(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeDarken(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeDarken(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-main'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.main)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.main)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.main)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.main)));\n setColor(palette.Alert, 'errorStandardBg', safeLighten(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeLighten(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeLighten(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeLighten(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-300'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-A100'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));\n setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeLighten(palette.primary.main, 0.62));\n setColor(palette.LinearProgress, 'secondaryBg', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.LinearProgress, 'errorBg', safeLighten(palette.error.main, 0.62));\n setColor(palette.LinearProgress, 'infoBg', safeLighten(palette.info.main, 0.62));\n setColor(palette.LinearProgress, 'successBg', safeLighten(palette.success.main, 0.62));\n setColor(palette.LinearProgress, 'warningBg', safeLighten(palette.warning.main, 0.62));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.11)`);\n setColor(palette.Slider, 'primaryTrack', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Slider, 'secondaryTrack', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Slider, 'errorTrack', safeLighten(palette.error.main, 0.62));\n setColor(palette.Slider, 'infoTrack', safeLighten(palette.info.main, 0.62));\n setColor(palette.Slider, 'successTrack', safeLighten(palette.success.main, 0.62));\n setColor(palette.Slider, 'warningTrack', safeLighten(palette.warning.main, 0.62));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.8);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-common-white'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-100'));\n setColor(palette.Switch, 'primaryDisabledColor', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Switch, 'secondaryDisabledColor', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Switch, 'errorDisabledColor', safeLighten(palette.error.main, 0.62));\n setColor(palette.Switch, 'infoDisabledColor', safeLighten(palette.info.main, 0.62));\n setColor(palette.Switch, 'successDisabledColor', safeLighten(palette.success.main, 0.62));\n setColor(palette.Switch, 'warningDisabledColor', safeLighten(palette.warning.main, 0.62));\n setColor(palette.TableCell, 'border', safeLighten(safeAlpha(palette.divider, 1), 0.88));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n if (palette.mode === 'dark') {\n setColor(palette.Alert, 'errorColor', safeLighten(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeLighten(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeLighten(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeLighten(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-dark'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-dark'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-dark'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-dark'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.dark)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.dark)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.dark)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.dark)));\n setColor(palette.Alert, 'errorStandardBg', safeDarken(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeDarken(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeDarken(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeDarken(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-900'));\n setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode\n setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-800'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));\n setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeDarken(palette.primary.main, 0.5));\n setColor(palette.LinearProgress, 'secondaryBg', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.LinearProgress, 'errorBg', safeDarken(palette.error.main, 0.5));\n setColor(palette.LinearProgress, 'infoBg', safeDarken(palette.info.main, 0.5));\n setColor(palette.LinearProgress, 'successBg', safeDarken(palette.success.main, 0.5));\n setColor(palette.LinearProgress, 'warningBg', safeDarken(palette.warning.main, 0.5));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.13)`);\n setColor(palette.Slider, 'primaryTrack', safeDarken(palette.primary.main, 0.5));\n setColor(palette.Slider, 'secondaryTrack', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.Slider, 'errorTrack', safeDarken(palette.error.main, 0.5));\n setColor(palette.Slider, 'infoTrack', safeDarken(palette.info.main, 0.5));\n setColor(palette.Slider, 'successTrack', safeDarken(palette.success.main, 0.5));\n setColor(palette.Slider, 'warningTrack', safeDarken(palette.warning.main, 0.5));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.98);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'primaryDisabledColor', safeDarken(palette.primary.main, 0.55));\n setColor(palette.Switch, 'secondaryDisabledColor', safeDarken(palette.secondary.main, 0.55));\n setColor(palette.Switch, 'errorDisabledColor', safeDarken(palette.error.main, 0.55));\n setColor(palette.Switch, 'infoDisabledColor', safeDarken(palette.info.main, 0.55));\n setColor(palette.Switch, 'successDisabledColor', safeDarken(palette.success.main, 0.55));\n setColor(palette.Switch, 'warningDisabledColor', safeDarken(palette.warning.main, 0.55));\n setColor(palette.TableCell, 'border', safeDarken(safeAlpha(palette.divider, 1), 0.68));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n\n // MUI X - DataGrid needs this token.\n setColorChannel(palette.background, 'default');\n\n // added for consistency with the `background.default` token\n setColorChannel(palette.background, 'paper');\n setColorChannel(palette.common, 'background');\n setColorChannel(palette.common, 'onBackground');\n setColorChannel(palette, 'divider');\n Object.keys(palette).forEach(color => {\n const colors = palette[color];\n\n // The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.\n\n if (colors && typeof colors === 'object') {\n // Silent the error for custom palettes.\n if (colors.main) {\n setColor(palette[color], 'mainChannel', safeColorChannel(toRgb(colors.main)));\n }\n if (colors.light) {\n setColor(palette[color], 'lightChannel', safeColorChannel(toRgb(colors.light)));\n }\n if (colors.dark) {\n setColor(palette[color], 'darkChannel', safeColorChannel(toRgb(colors.dark)));\n }\n if (colors.contrastText) {\n setColor(palette[color], 'contrastTextChannel', safeColorChannel(toRgb(colors.contrastText)));\n }\n if (color === 'text') {\n // Text colors: text.primary, text.secondary\n setColorChannel(palette[color], 'primary');\n setColorChannel(palette[color], 'secondary');\n }\n if (color === 'action') {\n // Action colors: action.active, action.selected\n if (colors.active) {\n setColorChannel(palette[color], 'active');\n }\n if (colors.selected) {\n setColorChannel(palette[color], 'selected');\n }\n }\n }\n });\n });\n theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);\n const parserConfig = {\n prefix: cssVarPrefix,\n disableCssColorScheme,\n shouldSkipGeneratingVar,\n getSelector: defaultGetSelector(theme)\n };\n const {\n vars,\n generateThemeVars,\n generateStyleSheets\n } = prepareCssVars(theme, parserConfig);\n theme.vars = vars;\n Object.entries(theme.colorSchemes[theme.defaultColorScheme]).forEach(([key, value]) => {\n theme[key] = value;\n });\n theme.generateThemeVars = generateThemeVars;\n theme.generateStyleSheets = generateStyleSheets;\n theme.generateSpacing = function generateSpacing() {\n return createSpacing(input.spacing, createUnarySpacing(this));\n };\n theme.getColorSchemeSelector = createGetColorSchemeSelector(selector);\n theme.spacing = theme.generateSpacing();\n theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;\n theme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...input?.unstable_sxConfig\n };\n theme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n theme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return theme;\n}","import createPalette from \"./createPalette.js\";\nimport createThemeWithVars from \"./createThemeWithVars.js\";\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nexport { createMuiTheme } from \"./createThemeNoVars.js\";\n// eslint-disable-next-line consistent-return\nfunction attachColorScheme(theme, scheme, colorScheme) {\n if (!theme.colorSchemes) {\n return undefined;\n }\n if (colorScheme) {\n theme.colorSchemes[scheme] = {\n ...(colorScheme !== true && colorScheme),\n palette: createPalette({\n ...(colorScheme === true ? {} : colorScheme.palette),\n mode: scheme\n }) // cast type to skip module augmentation test\n };\n }\n}\n\n/**\n * Generate a theme base on the options received.\n * @param options Takes an incomplete theme object and adds the missing parts.\n * @param args Deep merge the arguments with the about to be returned theme.\n * @returns A complete, ready-to-use theme object.\n */\nexport default function createTheme(options = {},\n// cast type to skip module augmentation test\n...args) {\n const {\n palette,\n cssVariables = false,\n colorSchemes: initialColorSchemes = !palette ? {\n light: true\n } : undefined,\n defaultColorScheme: initialDefaultColorScheme = palette?.mode,\n ...rest\n } = options;\n const defaultColorSchemeInput = initialDefaultColorScheme || 'light';\n const defaultScheme = initialColorSchemes?.[defaultColorSchemeInput];\n const colorSchemesInput = {\n ...initialColorSchemes,\n ...(palette ? {\n [defaultColorSchemeInput]: {\n ...(typeof defaultScheme !== 'boolean' && defaultScheme),\n palette\n }\n } : undefined)\n };\n if (cssVariables === false) {\n if (!('colorSchemes' in options)) {\n // Behaves exactly as v5\n return createThemeNoVars(options, ...args);\n }\n let paletteOptions = palette;\n if (!('palette' in options)) {\n if (colorSchemesInput[defaultColorSchemeInput]) {\n if (colorSchemesInput[defaultColorSchemeInput] !== true) {\n paletteOptions = colorSchemesInput[defaultColorSchemeInput].palette;\n } else if (defaultColorSchemeInput === 'dark') {\n // @ts-ignore to prevent the module augmentation test from failing\n paletteOptions = {\n mode: 'dark'\n };\n }\n }\n }\n const theme = createThemeNoVars({\n ...options,\n palette: paletteOptions\n }, ...args);\n theme.defaultColorScheme = defaultColorSchemeInput;\n theme.colorSchemes = colorSchemesInput;\n if (theme.palette.mode === 'light') {\n theme.colorSchemes.light = {\n ...(colorSchemesInput.light !== true && colorSchemesInput.light),\n palette: theme.palette\n };\n attachColorScheme(theme, 'dark', colorSchemesInput.dark);\n }\n if (theme.palette.mode === 'dark') {\n theme.colorSchemes.dark = {\n ...(colorSchemesInput.dark !== true && colorSchemesInput.dark),\n palette: theme.palette\n };\n attachColorScheme(theme, 'light', colorSchemesInput.light);\n }\n return theme;\n }\n if (!palette && !('light' in colorSchemesInput) && defaultColorSchemeInput === 'light') {\n colorSchemesInput.light = true;\n }\n return createThemeWithVars({\n ...rest,\n colorSchemes: colorSchemesInput,\n defaultColorScheme: defaultColorSchemeInput,\n ...(typeof cssVariables !== 'boolean' && cssVariables)\n }, ...args);\n}","import deepmerge from '@mui/utils/deepmerge';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2,\n ...other\n } = typeof typography === 'function' ? typography(palette) : typography;\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight,\n // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing\n // across font-families can cause issues with the kerning.\n ...(fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}),\n ...casing,\n ...allVariants\n });\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold,\n ...variants\n }, other, {\n clone: false // No need to clone deep\n });\n}","'use client';\n\nimport createTheme from \"./createTheme.js\";\nconst defaultTheme = createTheme();\nexport default defaultTheme;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nexport default function getOverlayAlpha(elevation) {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return Math.round(alphaValue * 10) / 1000;\n}","export default '$$material';","import slotShouldForwardProp from \"./slotShouldForwardProp.js\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","// copied from @mui/system/createStyled\nfunction slotShouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport default slotShouldForwardProp;","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.js\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.js\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.js\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\n}","'use client';\n\nimport systemUseThemeProps from '@mui/system/useThemeProps';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: style.transitionDuration ?? (typeof timeout === 'number' ? timeout : timeout[options.mode] || 0),\n easing: style.transitionTimingFunction ?? (typeof easing === 'object' ? easing[options.mode] : easing),\n delay: style.transitionDelay\n };\n}","import capitalize from '@mui/utils/capitalize';\nexport default capitalize;","import createChainedFunction from '@mui/utils/createChainedFunction';\nexport default createChainedFunction;","'use client';\n\nimport * as React from 'react';\nimport SvgIcon from \"../SvgIcon/index.js\";\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, {\n \"data-testid\": `${displayName}Icon`,\n ref: ref,\n ...props,\n children: path\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Component));\n}","import debounce from '@mui/utils/debounce';\nexport default debounce;","export default function deprecatedPropType(validator, reason) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n return (props, propName, componentName, location, propFullName) => {\n const componentNameSafe = componentName || '<<anonymous>>';\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The ${location} \\`${propFullNameSafe}\\` of ` + `\\`${componentNameSafe}\\` is deprecated. ${reason}`);\n }\n return null;\n };\n}","import deprecatedPropType from '@mui/utils/deprecatedPropType';\nexport default deprecatedPropType;","export default function requirePropFactory(componentNameInError, Component) {\n if (process.env.NODE_ENV === 'production') {\n return () => null;\n }\n\n // eslint-disable-next-line react/forbid-foreign-prop-types\n const prevPropTypes = Component ? {\n ...Component.propTypes\n } : null;\n const requireProp = requiredProp => (props, propName, componentName, location, propFullName, ...args) => {\n const propFullNameSafe = propFullName || propName;\n const defaultTypeChecker = prevPropTypes?.[propFullNameSafe];\n if (defaultTypeChecker) {\n const typeCheckerResult = defaultTypeChecker(props, propName, componentName, location, propFullName, ...args);\n if (typeCheckerResult) {\n return typeCheckerResult;\n }\n }\n if (typeof props[propName] !== 'undefined' && !props[requiredProp]) {\n return new Error(`The prop \\`${propFullNameSafe}\\` of ` + `\\`${componentNameInError}\\` can only be used together with the \\`${requiredProp}\\` prop.`);\n }\n return null;\n };\n return requireProp;\n}","import requirePropFactory from '@mui/utils/requirePropFactory';\nexport default requirePropFactory;","import setRef from '@mui/utils/setRef';\nexport default setRef;","export default function unsupportedProp(props, propName, componentName, location, propFullName) {\n if (process.env.NODE_ENV === 'production') {\n return null;\n }\n const propFullNameSafe = propFullName || propName;\n if (typeof props[propName] !== 'undefined') {\n return new Error(`The prop \\`${propFullNameSafe}\\` is not supported. Please remove it.`);\n }\n return null;\n}","import unsupportedProp from '@mui/utils/unsupportedProp';\nexport default unsupportedProp;","'use client';\n\nimport { unstable_ClassNameGenerator as ClassNameGenerator } from '@mui/utils';\nexport { default as capitalize } from \"./capitalize.js\";\nexport { default as createChainedFunction } from \"./createChainedFunction.js\";\nexport { default as createSvgIcon } from \"./createSvgIcon.js\";\nexport { default as debounce } from \"./debounce.js\";\nexport { default as deprecatedPropType } from \"./deprecatedPropType.js\";\nexport { default as isMuiElement } from \"./isMuiElement.js\";\nexport { default as unstable_memoTheme } from \"./memoTheme.js\";\nexport { default as ownerDocument } from \"./ownerDocument.js\";\nexport { default as ownerWindow } from \"./ownerWindow.js\";\nexport { default as requirePropFactory } from \"./requirePropFactory.js\";\nexport { default as setRef } from \"./setRef.js\";\nexport { default as unstable_useEnhancedEffect } from \"./useEnhancedEffect.js\";\nexport { default as unstable_useId } from \"./useId.js\";\nexport { default as unsupportedProp } from \"./unsupportedProp.js\";\nexport { default as useControlled } from \"./useControlled.js\";\nexport { default as useEventCallback } from \"./useEventCallback.js\";\nexport { default as useForkRef } from \"./useForkRef.js\";\n// TODO: remove this export once ClassNameGenerator is stable\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const unstable_ClassNameGenerator = {\n configure: generator => {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(['MUI: `ClassNameGenerator` import from `@mui/material/utils` is outdated and might cause unexpected issues.', '', \"You should use `import { unstable_ClassNameGenerator } from '@mui/material/className'` instead\", '', 'The detail of the issue: https://github.com/mui/material-ui/issues/30011#issuecomment-1024993401', '', 'The updated documentation: https://mui.com/guides/classname-generator/'].join('\\n'));\n }\n ClassNameGenerator.configure(generator);\n }\n};","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(\n // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n element.type.muiName ?? element.type?._payload?.value?.muiName) !== -1;\n}","import isMuiElement from '@mui/utils/isMuiElement';\nexport default isMuiElement;","// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to\n// allocate more objects.\nconst arg = {\n theme: undefined\n};\n\n/**\n * Memoize style function on theme.\n * Intended to be used in styled() calls that only need access to the theme.\n */\nexport default function memoTheme(styleFn) {\n let lastValue;\n let lastTheme;\n return props => {\n let value = lastValue;\n if (value === undefined || props.theme !== lastTheme) {\n arg.theme = props.theme;\n value = styleFn(arg);\n lastValue = value;\n lastTheme = props.theme;\n }\n return value;\n };\n}","import ownerDocument from '@mui/utils/ownerDocument';\nexport default ownerDocument;","import ownerWindow from '@mui/utils/ownerWindow';\nexport default ownerWindow;","'use client';\n\nimport useControlled from '@mui/utils/useControlled';\nexport default useControlled;","'use client';\n\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nexport default useEnhancedEffect;","'use client';\n\nimport useEventCallback from '@mui/utils/useEventCallback';\nexport default useEventCallback;","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nexport default useForkRef;","'use client';\n\nimport useId from '@mui/utils/useId';\nexport default useId;","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nimport appendOwnerState from '@mui/utils/appendOwnerState';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport mergeSlotProps from '@mui/utils/mergeSlotProps';\n/**\n * An internal function to create a Material UI slot.\n *\n * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop\n * while Base UI does not need to support leaf component customization.\n *\n * @param {string} name: name of the slot\n * @param {object} parameters\n * @returns {[Slot, slotProps]} The slot's React component and the slot's props\n *\n * Note: the returned slot's props\n * - will never contain `component` prop.\n * - might contain `as` prop.\n */\nexport default function useSlot(\n/**\n * The slot's name. All Material UI components should have `root` slot.\n *\n * If the name is `root`, the logic behaves differently from other slots,\n * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.\n */\nname, parameters) {\n const {\n className,\n elementType: initialElementType,\n ownerState,\n externalForwardedProps,\n getSlotOwnerState,\n internalForwardedProps,\n ...useSlotPropsParams\n } = parameters;\n const {\n component: rootComponent,\n slots = {\n [name]: undefined\n },\n slotProps = {\n [name]: undefined\n },\n ...other\n } = externalForwardedProps;\n const elementType = slots[name] || initialElementType;\n\n // `slotProps[name]` can be a callback that receives the component's ownerState.\n // `resolvedComponentsProps` is always a plain object.\n const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);\n const {\n props: {\n component: slotComponent,\n ...mergedProps\n },\n internalRef\n } = mergeSlotProps({\n className,\n ...useSlotPropsParams,\n externalForwardedProps: name === 'root' ? other : undefined,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);\n const slotOwnerState = getSlotOwnerState ? getSlotOwnerState(mergedProps) : {};\n const finalOwnerState = {\n ...ownerState,\n ...slotOwnerState\n };\n const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;\n const props = appendOwnerState(elementType, {\n ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),\n ...(name !== 'root' && !slots[name] && internalForwardedProps),\n ...mergedProps,\n ...(LeafComponent && {\n as: LeafComponent\n }),\n ref\n }, finalOwnerState);\n Object.keys(slotOwnerState).forEach(propName => {\n delete props[propName];\n });\n return [elementType, props];\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as MuiGlobalStyles } from '@mui/styled-engine';\nimport useTheme from \"../useTheme/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GlobalStyles({\n styles,\n themeId,\n defaultTheme = {}\n}) {\n const upperTheme = useTheme(defaultTheme);\n const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;\n return /*#__PURE__*/_jsx(MuiGlobalStyles, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n defaultTheme: PropTypes.object,\n /**\n * @ignore\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),\n /**\n * @ignore\n */\n themeId: PropTypes.string\n} : void 0;\nexport default GlobalStyles;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as SystemGlobalStyles } from '@mui/system';\nimport defaultTheme from \"../styles/defaultTheme.js\";\nimport THEME_ID from \"../styles/identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GlobalStyles(props) {\n return /*#__PURE__*/_jsx(SystemGlobalStyles, {\n ...props,\n defaultTheme: defaultTheme,\n themeId: THEME_ID\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The styles you want to apply globally.\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])\n} : void 0;\nexport default GlobalStyles;","import * as React from 'react';\nimport { extendSxProp } from '@mui/system/styleFunctionSx';\nimport useTheme from \"../styles/useTheme.js\";\nimport GlobalStyles from \"../GlobalStyles/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport { css, keyframes } from '@mui/system';\nexport { default as styled } from \"../styles/styled.js\";\nexport function globalCss(styles) {\n return function GlobalStylesWrapper(props) {\n return (\n /*#__PURE__*/\n // Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.\n _jsx(GlobalStyles, {\n styles: typeof styles === 'function' ? theme => styles({\n theme,\n ...props\n }) : styles\n })\n );\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_createExtendSxProp() {\n return extendSxProp;\n}\nexport { useTheme };","/**\n * Polyfill for the optional chain operator, `?.`, given previous conversion of the expression into an array of values,\n * descriptors, and functions.\n *\n * Adapted from Sucrase (https://github.com/alangpierce/sucrase)\n * See https://github.com/alangpierce/sucrase/blob/265887868966917f3b924ce38dfad01fbab1329f/src/transformers/OptionalChainingNullishTransformer.ts#L15\n *\n * @param ops Array result of expression conversion\n * @returns The value of the expression\n */\nfunction _optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i] ;\n const fn = ops[i + 1] ;\n i += 2;\n // by checking for loose equality to `null`, we catch both `null` and `undefined`\n if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n // really we're meaning to return `undefined` as an actual value here, but it saves bytes not to write it\n return;\n }\n if (op === 'access' || op === 'optionalAccess') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === 'call' || op === 'optionalCall') {\n value = fn((...args) => (value ).call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n}\n\n// Sucrase version\n// function _optionalChain(ops) {\n// let lastAccessLHS = undefined;\n// let value = ops[0];\n// let i = 1;\n// while (i < ops.length) {\n// const op = ops[i];\n// const fn = ops[i + 1];\n// i += 2;\n// if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {\n// return undefined;\n// }\n// if (op === 'access' || op === 'optionalAccess') {\n// lastAccessLHS = value;\n// value = fn(value);\n// } else if (op === 'call' || op === 'optionalCall') {\n// value = fn((...args) => value.call(lastAccessLHS, ...args));\n// lastAccessLHS = undefined;\n// }\n// }\n// return value;\n// }\n\nexport { _optionalChain };\n//# sourceMappingURL=_optionalChain.js.map\n","import { getCurrentHub } from '../hub.js';\n\n// Treeshakable guard to remove all code related to tracing\n\n/**\n * Determines if tracing is currently enabled.\n *\n * Tracing is enabled when at least one of `tracesSampleRate` and `tracesSampler` is defined in the SDK config.\n */\nfunction hasTracingEnabled(\n maybeOptions,\n) {\n if (typeof __SENTRY_TRACING__ === 'boolean' && !__SENTRY_TRACING__) {\n return false;\n }\n\n const client = getCurrentHub().getClient();\n const options = maybeOptions || (client && client.getOptions());\n return !!options && (options.enableTracing || 'tracesSampleRate' in options || 'tracesSampler' in options);\n}\n\nexport { hasTracingEnabled };\n//# sourceMappingURL=hasTracingEnabled.js.map\n","// Slightly modified (no IE8 support, ES6) and transcribed to TypeScript\n// https://github.com/calvinmetcalf/rollup-plugin-node-builtins/blob/63ab8aacd013767445ca299e468d9a60a95328d7/src/es6/path.js\n//\n// Copyright Joyent, Inc.and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n/** JSDoc */\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n let up = 0;\n for (let i = parts.length - 1; i >= 0; i--) {\n const last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// Split a filename into [root, dir, basename, ext], unix version\n// 'root' is just a slash, or nothing.\nconst splitPathRe = /^(\\S+:\\\\|\\/?)([\\s\\S]*?)((?:\\.{1,2}|[^/\\\\]+?|)(\\.[^./\\\\]*|))(?:[/\\\\]*)$/;\n/** JSDoc */\nfunction splitPath(filename) {\n // Truncate files names greater than 1024 characters to avoid regex dos\n // https://github.com/getsentry/sentry-javascript/pull/8737#discussion_r1285719172\n const truncated = filename.length > 1024 ? `<truncated>${filename.slice(-1024)}` : filename;\n const parts = splitPathRe.exec(truncated);\n return parts ? parts.slice(1) : [];\n}\n\n// path.resolve([from ...], to)\n// posix version\n/** JSDoc */\nfunction resolve(...args) {\n let resolvedPath = '';\n let resolvedAbsolute = false;\n\n for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n const path = i >= 0 ? args[i] : '/';\n\n // Skip empty entries\n if (!path) {\n continue;\n }\n\n resolvedPath = `${path}/${resolvedPath}`;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(\n resolvedPath.split('/').filter(p => !!p),\n !resolvedAbsolute,\n ).join('/');\n\n return (resolvedAbsolute ? '/' : '') + resolvedPath || '.';\n}\n\n/** JSDoc */\nfunction trim(arr) {\n let start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') {\n break;\n }\n }\n\n let end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') {\n break;\n }\n }\n\n if (start > end) {\n return [];\n }\n return arr.slice(start, end - start + 1);\n}\n\n// path.relative(from, to)\n// posix version\n/** JSDoc */\nfunction relative(from, to) {\n /* eslint-disable no-param-reassign */\n from = resolve(from).slice(1);\n to = resolve(to).slice(1);\n /* eslint-enable no-param-reassign */\n\n const fromParts = trim(from.split('/'));\n const toParts = trim(to.split('/'));\n\n const length = Math.min(fromParts.length, toParts.length);\n let samePartsLength = length;\n for (let i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n let outputParts = [];\n for (let i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n}\n\n// path.normalize(path)\n// posix version\n/** JSDoc */\nfunction normalizePath(path) {\n const isPathAbsolute = isAbsolute(path);\n const trailingSlash = path.slice(-1) === '/';\n\n // Normalize the path\n let normalizedPath = normalizeArray(\n path.split('/').filter(p => !!p),\n !isPathAbsolute,\n ).join('/');\n\n if (!normalizedPath && !isPathAbsolute) {\n normalizedPath = '.';\n }\n if (normalizedPath && trailingSlash) {\n normalizedPath += '/';\n }\n\n return (isPathAbsolute ? '/' : '') + normalizedPath;\n}\n\n// posix version\n/** JSDoc */\nfunction isAbsolute(path) {\n return path.charAt(0) === '/';\n}\n\n// posix version\n/** JSDoc */\nfunction join(...args) {\n return normalizePath(args.join('/'));\n}\n\n/** JSDoc */\nfunction dirname(path) {\n const result = splitPath(path);\n const root = result[0];\n let dir = result[1];\n\n if (!root && !dir) {\n // No dirname whatsoever\n return '.';\n }\n\n if (dir) {\n // It has a dirname, strip trailing slash\n dir = dir.slice(0, dir.length - 1);\n }\n\n return root + dir;\n}\n\n/** JSDoc */\nfunction basename(path, ext) {\n let f = splitPath(path)[2];\n if (ext && f.slice(ext.length * -1) === ext) {\n f = f.slice(0, f.length - ext.length);\n }\n return f;\n}\n\nexport { basename, dirname, isAbsolute, join, normalizePath, relative, resolve };\n//# sourceMappingURL=path.js.map\n","import { relative, basename } from '@sentry/utils';\n\n/** Rewrite event frames paths */\nclass RewriteFrames {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'RewriteFrames';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {RewriteFrames.prototype.__init.call(this);\n this.name = RewriteFrames.id;\n\n if (options.root) {\n this._root = options.root;\n }\n this._prefix = options.prefix || 'app:///';\n if (options.iteratee) {\n this._iteratee = options.iteratee;\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n\n /** @inheritDoc */\n processEvent(event) {\n return this.process(event);\n }\n\n /**\n * TODO (v8): Make this private/internal\n */\n process(originalEvent) {\n let processedEvent = originalEvent;\n\n if (originalEvent.exception && Array.isArray(originalEvent.exception.values)) {\n processedEvent = this._processExceptionsEvent(processedEvent);\n }\n\n return processedEvent;\n }\n\n /**\n * @inheritDoc\n */\n __init() {this._iteratee = (frame) => {\n if (!frame.filename) {\n return frame;\n }\n // Determine if this is a Windows frame by checking for a Windows-style prefix such as `C:\\`\n const isWindowsFrame =\n /^[a-zA-Z]:\\\\/.test(frame.filename) ||\n // or the presence of a backslash without a forward slash (which are not allowed on Windows)\n (frame.filename.includes('\\\\') && !frame.filename.includes('/'));\n // Check if the frame filename begins with `/`\n const startsWithSlash = /^\\//.test(frame.filename);\n if (isWindowsFrame || startsWithSlash) {\n const filename = isWindowsFrame\n ? frame.filename\n .replace(/^[a-zA-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/') // replace all `\\\\` instances with `/`\n : frame.filename;\n const base = this._root ? relative(this._root, filename) : basename(filename);\n frame.filename = `${this._prefix}${base}`;\n }\n return frame;\n };}\n\n /** JSDoc */\n _processExceptionsEvent(event) {\n try {\n return {\n ...event,\n exception: {\n ...event.exception,\n // The check for this is performed inside `process` call itself, safe to skip here\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n values: event.exception.values.map(value => ({\n ...value,\n ...(value.stacktrace && { stacktrace: this._processStacktrace(value.stacktrace) }),\n })),\n },\n };\n } catch (_oO) {\n return event;\n }\n }\n\n /** JSDoc */\n _processStacktrace(stacktrace) {\n return {\n ...stacktrace,\n frames: stacktrace && stacktrace.frames && stacktrace.frames.map(f => this._iteratee(f)),\n };\n }\n} RewriteFrames.__initStatic();\n\nexport { RewriteFrames };\n//# sourceMappingURL=rewriteframes.js.map\n","const SDK_VERSION = '7.77.0';\n\nexport { SDK_VERSION };\n//# sourceMappingURL=version.js.map\n","import { logger, getEventDescription, stringMatchesSomePattern } from '@sentry/utils';\n\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nconst DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n\nconst DEFAULT_IGNORE_TRANSACTIONS = [\n /^.*\\/healthcheck$/,\n /^.*\\/healthy$/,\n /^.*\\/live$/,\n /^.*\\/ready$/,\n /^.*\\/heartbeat$/,\n /^.*\\/health$/,\n /^.*\\/healthz$/,\n];\n\n/** Options for the InboundFilters integration */\n\n/** Inbound filters configurable by the user */\nclass InboundFilters {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'InboundFilters';}\n\n /**\n * @inheritDoc\n */\n\n constructor(options = {}) {\n this.name = InboundFilters.id;\n this._options = options;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n\n /** @inheritDoc */\n processEvent(event, _eventHint, client) {\n const clientOptions = client.getOptions();\n const options = _mergeOptions(this._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n} InboundFilters.__initStatic();\n\n/** JSDoc */\nfunction _mergeOptions(\n internalOptions = {},\n clientOptions = {},\n) {\n return {\n allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],\n denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],\n ignoreErrors: [\n ...(internalOptions.ignoreErrors || []),\n ...(clientOptions.ignoreErrors || []),\n ...(internalOptions.disableErrorDefaults ? [] : DEFAULT_IGNORE_ERRORS),\n ],\n ignoreTransactions: [\n ...(internalOptions.ignoreTransactions || []),\n ...(clientOptions.ignoreTransactions || []),\n ...(internalOptions.disableTransactionDefaults ? [] : DEFAULT_IGNORE_TRANSACTIONS),\n ],\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n\n/** JSDoc */\nfunction _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`Event dropped due to being internal Sentry Error.\\nEvent: ${getEventDescription(event)}`);\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreErrors\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isIgnoredTransaction(event, options.ignoreTransactions)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`ignoreTransactions\\` option.\\nEvent: ${getEventDescription(event)}`,\n );\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to being matched by \\`denyUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Event dropped due to not being matched by \\`allowUrls\\` option.\\nEvent: ${getEventDescription(\n event,\n )}.\\nUrl: ${_getEventFilterUrl(event)}`,\n );\n return true;\n }\n return false;\n}\n\nfunction _isIgnoredError(event, ignoreErrors) {\n // If event.type, this is not an error\n if (event.type || !ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n\n return _getPossibleEventMessages(event).some(message => stringMatchesSomePattern(message, ignoreErrors));\n}\n\nfunction _isIgnoredTransaction(event, ignoreTransactions) {\n if (event.type !== 'transaction' || !ignoreTransactions || !ignoreTransactions.length) {\n return false;\n }\n\n const name = event.transaction;\n return name ? stringMatchesSomePattern(name, ignoreTransactions) : false;\n}\n\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n const url = _getEventFilterUrl(event);\n return !url ? false : stringMatchesSomePattern(url, denyUrls);\n}\n\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n const url = _getEventFilterUrl(event);\n return !url ? true : stringMatchesSomePattern(url, allowUrls);\n}\n\nfunction _getPossibleEventMessages(event) {\n const possibleMessages = [];\n\n if (event.message) {\n possibleMessages.push(event.message);\n }\n\n let lastException;\n try {\n // @ts-expect-error Try catching to save bundle size\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n lastException = event.exception.values[event.exception.values.length - 1];\n } catch (e) {\n // try catching to save bundle size checking existence of variables\n }\n\n if (lastException) {\n if (lastException.value) {\n possibleMessages.push(lastException.value);\n if (lastException.type) {\n possibleMessages.push(`${lastException.type}: ${lastException.value}`);\n }\n }\n }\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && possibleMessages.length === 0) {\n logger.error(`Could not extract message for event ${getEventDescription(event)}`);\n }\n\n return possibleMessages;\n}\n\nfunction _isSentryError(event) {\n try {\n // @ts-expect-error can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n } catch (e) {\n // ignore\n }\n return false;\n}\n\nfunction _getLastValidUrl(frames = []) {\n for (let i = frames.length - 1; i >= 0; i--) {\n const frame = frames[i];\n\n if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n\n return null;\n}\n\nfunction _getEventFilterUrl(event) {\n try {\n let frames;\n try {\n // @ts-expect-error we only care about frames if the whole thing here is defined\n frames = event.exception.values[0].stacktrace.frames;\n } catch (e) {\n // ignore\n }\n return frames ? _getLastValidUrl(frames) : null;\n } catch (oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(`Cannot extract url for event ${getEventDescription(event)}`);\n return null;\n }\n}\n\nexport { InboundFilters, _mergeOptions, _shouldDropEvent };\n//# sourceMappingURL=inboundfilters.js.map\n","import { getOriginalFunction } from '@sentry/utils';\n\nlet originalFunctionToString;\n\n/** Patch toString calls to return proper name for wrapped functions */\nclass FunctionToString {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'FunctionToString';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = FunctionToString.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n\n // intrinsics (like Function.prototype) might be immutable in some environments\n // e.g. Node with --frozen-intrinsics, XS (an embedded JavaScript engine) or SES (a JavaScript proposal)\n try {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n Function.prototype.toString = function ( ...args) {\n const context = getOriginalFunction(this) || this;\n return originalFunctionToString.apply(context, args);\n };\n } catch (e) {\n // ignore errors here, just don't patch this\n }\n }\n} FunctionToString.__initStatic();\n\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map\n","import { arrayify, logger } from '@sentry/utils';\nimport { addGlobalEventProcessor } from './eventProcessors.js';\nimport { getCurrentHub } from './hub.js';\n\nconst installedIntegrations = [];\n\n/** Map of integrations assigned to a client */\n\n/**\n * Remove duplicates from the given array, preferring the last instance of any duplicate. Not guaranteed to\n * preseve the order of integrations in the array.\n *\n * @private\n */\nfunction filterDuplicates(integrations) {\n const integrationsByName = {};\n\n integrations.forEach(currentInstance => {\n const { name } = currentInstance;\n\n const existingInstance = integrationsByName[name];\n\n // We want integrations later in the array to overwrite earlier ones of the same type, except that we never want a\n // default instance to overwrite an existing user instance\n if (existingInstance && !existingInstance.isDefaultInstance && currentInstance.isDefaultInstance) {\n return;\n }\n\n integrationsByName[name] = currentInstance;\n });\n\n return Object.keys(integrationsByName).map(k => integrationsByName[k]);\n}\n\n/** Gets integrations to install */\nfunction getIntegrationsToSetup(options) {\n const defaultIntegrations = options.defaultIntegrations || [];\n const userIntegrations = options.integrations;\n\n // We flag default instances, so that later we can tell them apart from any user-created instances of the same class\n defaultIntegrations.forEach(integration => {\n integration.isDefaultInstance = true;\n });\n\n let integrations;\n\n if (Array.isArray(userIntegrations)) {\n integrations = [...defaultIntegrations, ...userIntegrations];\n } else if (typeof userIntegrations === 'function') {\n integrations = arrayify(userIntegrations(defaultIntegrations));\n } else {\n integrations = defaultIntegrations;\n }\n\n const finalIntegrations = filterDuplicates(integrations);\n\n // The `Debug` integration prints copies of the `event` and `hint` which will be passed to `beforeSend` or\n // `beforeSendTransaction`. It therefore has to run after all other integrations, so that the changes of all event\n // processors will be reflected in the printed values. For lack of a more elegant way to guarantee that, we therefore\n // locate it and, assuming it exists, pop it out of its current spot and shove it onto the end of the array.\n const debugIndex = findIndex(finalIntegrations, integration => integration.name === 'Debug');\n if (debugIndex !== -1) {\n const [debugInstance] = finalIntegrations.splice(debugIndex, 1);\n finalIntegrations.push(debugInstance);\n }\n\n return finalIntegrations;\n}\n\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nfunction setupIntegrations(client, integrations) {\n const integrationIndex = {};\n\n integrations.forEach(integration => {\n // guard against empty provided integrations\n if (integration) {\n setupIntegration(client, integration, integrationIndex);\n }\n });\n\n return integrationIndex;\n}\n\n/** Setup a single integration. */\nfunction setupIntegration(client, integration, integrationIndex) {\n integrationIndex[integration.name] = integration;\n\n if (installedIntegrations.indexOf(integration.name) === -1) {\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n }\n\n if (client.on && typeof integration.preprocessEvent === 'function') {\n const callback = integration.preprocessEvent.bind(integration) ;\n client.on('preprocessEvent', (event, hint) => callback(event, hint, client));\n }\n\n if (client.addEventProcessor && typeof integration.processEvent === 'function') {\n const callback = integration.processEvent.bind(integration) ;\n\n const processor = Object.assign((event, hint) => callback(event, hint, client), {\n id: integration.name,\n });\n\n client.addEventProcessor(processor);\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Integration installed: ${integration.name}`);\n}\n\n/** Add an integration to the current hub's client. */\nfunction addIntegration(integration) {\n const client = getCurrentHub().getClient();\n\n if (!client || !client.addIntegration) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot add integration \"${integration.name}\" because no SDK Client is available.`);\n return;\n }\n\n client.addIntegration(integration);\n}\n\n// Polyfill for Array.findIndex(), which is not supported in ES5\nfunction findIndex(arr, callback) {\n for (let i = 0; i < arr.length; i++) {\n if (callback(arr[i]) === true) {\n return i;\n }\n }\n\n return -1;\n}\n\nexport { addIntegration, getIntegrationsToSetup, installedIntegrations, setupIntegration, setupIntegrations };\n//# sourceMappingURL=integration.js.map\n","import { logger } from '@sentry/utils';\nimport { getCurrentHub } from './hub.js';\n\n/** A class object that can instantiate Client objects. */\n\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instantiate.\n * @param options Options to pass to the client.\n */\nfunction initAndBind(\n clientClass,\n options,\n) {\n if (options.debug === true) {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n logger.enable();\n } else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n const hub = getCurrentHub();\n const scope = hub.getScope();\n scope.update(options.initialScope);\n\n const client = new clientClass(options);\n hub.bindClient(client);\n}\n\nexport { initAndBind };\n//# sourceMappingURL=sdk.js.map\n","import { node } from './node-stack-trace.js';\nexport { filenameIsInApp } from './node-stack-trace.js';\n\nconst STACKTRACE_FRAME_LIMIT = 50;\n// Used to sanitize webpack (error: *) wrapped stack errors\nconst WEBPACK_ERROR_REGEXP = /\\(error: (.*)\\)/;\nconst STRIP_FRAME_REGEXP = /captureMessage|captureException/;\n\n/**\n * Creates a stack parser with the supplied line parsers\n *\n * StackFrames are returned in the correct order for Sentry Exception\n * frames and with Sentry SDK internal frames removed from the top and bottom\n *\n */\nfunction createStackParser(...parsers) {\n const sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);\n\n return (stack, skipFirst = 0) => {\n const frames = [];\n const lines = stack.split('\\n');\n\n for (let i = skipFirst; i < lines.length; i++) {\n const line = lines[i];\n // Ignore lines over 1kb as they are unlikely to be stack frames.\n // Many of the regular expressions use backtracking which results in run time that increases exponentially with\n // input size. Huge strings can result in hangs/Denial of Service:\n // https://github.com/getsentry/sentry-javascript/issues/2286\n if (line.length > 1024) {\n continue;\n }\n\n // https://github.com/getsentry/sentry-javascript/issues/5459\n // Remove webpack (error: *) wrappers\n const cleanedLine = WEBPACK_ERROR_REGEXP.test(line) ? line.replace(WEBPACK_ERROR_REGEXP, '$1') : line;\n\n // https://github.com/getsentry/sentry-javascript/issues/7813\n // Skip Error: lines\n if (cleanedLine.match(/\\S*Error: /)) {\n continue;\n }\n\n for (const parser of sortedParsers) {\n const frame = parser(cleanedLine);\n\n if (frame) {\n frames.push(frame);\n break;\n }\n }\n\n if (frames.length >= STACKTRACE_FRAME_LIMIT) {\n break;\n }\n }\n\n return stripSentryFramesAndReverse(frames);\n };\n}\n\n/**\n * Gets a stack parser implementation from Options.stackParser\n * @see Options\n *\n * If options contains an array of line parsers, it is converted into a parser\n */\nfunction stackParserFromStackParserOptions(stackParser) {\n if (Array.isArray(stackParser)) {\n return createStackParser(...stackParser);\n }\n return stackParser;\n}\n\n/**\n * Removes Sentry frames from the top and bottom of the stack if present and enforces a limit of max number of frames.\n * Assumes stack input is ordered from top to bottom and returns the reverse representation so call site of the\n * function that caused the crash is the last frame in the array.\n * @hidden\n */\nfunction stripSentryFramesAndReverse(stack) {\n if (!stack.length) {\n return [];\n }\n\n const localStack = Array.from(stack);\n\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (/sentryWrapped/.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n\n // Reversing in the middle of the procedure allows us to just pop the values off the stack\n localStack.reverse();\n\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n\n // When using synthetic events, we will have a 2 levels deep stack, as `new Error('Sentry syntheticException')`\n // is produced within the hub itself, making it:\n //\n // Sentry.captureException()\n // getCurrentHub().captureException()\n //\n // instead of just the top `Sentry` call itself.\n // This forces us to possibly strip an additional frame in the exact same was as above.\n if (STRIP_FRAME_REGEXP.test(localStack[localStack.length - 1].function || '')) {\n localStack.pop();\n }\n }\n\n return localStack.slice(0, STACKTRACE_FRAME_LIMIT).map(frame => ({\n ...frame,\n filename: frame.filename || localStack[localStack.length - 1].filename,\n function: frame.function || '?',\n }));\n}\n\nconst defaultFunctionName = '<anonymous>';\n\n/**\n * Safely extract function name from itself\n */\nfunction getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n\n/**\n * Node.js stack line parser\n *\n * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.\n * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain\n */\nfunction nodeStackLineParser(getModule) {\n return [90, node(getModule)];\n}\n\nexport { createStackParser, getFunctionName, nodeStackLineParser, stackParserFromStackParserOptions, stripSentryFramesAndReverse };\n//# sourceMappingURL=stacktrace.js.map\n","import { logger } from './logger.js';\nimport { getGlobalObject } from './worldwide.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsErrorEvent() {\n try {\n new ErrorEvent('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMError() {\n try {\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-expect-error It really needs 1 argument, not 0.\n new DOMError('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsDOMException() {\n try {\n new DOMException('');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsFetch() {\n if (!('fetch' in WINDOW)) {\n return false;\n }\n\n try {\n new Headers();\n new Request('http://www.example.com');\n new Response();\n return true;\n } catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nfunction supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n\n // Fast path to avoid DOM I/O\n // eslint-disable-next-line @typescript-eslint/unbound-method\n if (isNativeFetch(WINDOW.fetch)) {\n return true;\n }\n\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n let result = false;\n const doc = WINDOW.document;\n // eslint-disable-next-line deprecation/deprecation\n if (doc && typeof (doc.createElement ) === 'function') {\n try {\n const sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n } catch (err) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n\n return result;\n}\n\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReportingObserver() {\n return 'ReportingObserver' in WINDOW;\n}\n\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'\n // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n\n if (!supportsFetch()) {\n return false;\n }\n\n try {\n new Request('_', {\n referrerPolicy: 'origin' ,\n });\n return true;\n } catch (e) {\n return false;\n }\n}\n\nexport { isNativeFetch, supportsDOMError, supportsDOMException, supportsErrorEvent, supportsFetch, supportsNativeFetch, supportsReferrerPolicy, supportsReportingObserver };\n//# sourceMappingURL=supports.js.map\n","import { getGlobalObject } from '../worldwide.js';\n\n// Based on https://github.com/angular/angular.js/pull/13945/files\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nfunction supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n /* eslint-disable @typescript-eslint/no-unsafe-member-access */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const chrome = (WINDOW ).chrome;\n const isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n /* eslint-enable @typescript-eslint/no-unsafe-member-access */\n const hasHistoryApi = 'history' in WINDOW && !!WINDOW.history.pushState && !!WINDOW.history.replaceState;\n\n return !isChromePackagedApp && hasHistoryApi;\n}\n\nexport { supportsHistory };\n//# sourceMappingURL=supportsHistory.js.map\n","import { isString } from './is.js';\nimport { logger, CONSOLE_LEVELS, originalConsoleMethods } from './logger.js';\nimport { uuid4 } from './misc.js';\nimport { fill, addNonEnumerableProperty } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\nimport { supportsNativeFetch } from './supports.js';\nimport { getGlobalObject, GLOBAL_OBJ } from './worldwide.js';\nimport { supportsHistory } from './vendor/supportsHistory.js';\n\n// eslint-disable-next-line deprecation/deprecation\nconst WINDOW = getGlobalObject();\n\nconst SENTRY_XHR_DATA_KEY = '__sentry_xhr_v2__';\n\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\n\nconst handlers = {};\nconst instrumented = {};\n\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n\n instrumented[type] = true;\n\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('unknown instrumentation type:', type);\n return;\n }\n}\n\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nfunction addInstrumentationHandler(type, callback) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(callback);\n instrument(type);\n}\n\n/**\n * Reset all instrumentation handlers.\n * This can be used by tests to ensure we have a clean slate of instrumentation handlers.\n */\nfunction resetInstrumentationHandlers() {\n Object.keys(handlers).forEach(key => {\n handlers[key ] = undefined;\n });\n}\n\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n if (!type || !handlers[type]) {\n return;\n }\n\n for (const handler of handlers[type] || []) {\n try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in GLOBAL_OBJ)) {\n return;\n }\n\n CONSOLE_LEVELS.forEach(function (level) {\n if (!(level in GLOBAL_OBJ.console)) {\n return;\n }\n\n fill(GLOBAL_OBJ.console, level, function (originalConsoleMethod) {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (...args) {\n triggerHandlers('console', { args, level });\n\n const log = originalConsoleMethods[level];\n log && log.apply(GLOBAL_OBJ.console, args);\n };\n });\n });\n}\n\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n\n fill(GLOBAL_OBJ, 'fetch', function (originalFetch) {\n return function (...args) {\n const { method, url } = parseFetchArgs(args);\n\n const handlerData = {\n args,\n fetchData: {\n method,\n url,\n },\n startTimestamp: Date.now(),\n };\n\n triggerHandlers('fetch', {\n ...handlerData,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return originalFetch.apply(GLOBAL_OBJ, args).then(\n (response) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n response,\n });\n return response;\n },\n (error) => {\n triggerHandlers('fetch', {\n ...handlerData,\n endTimestamp: Date.now(),\n error,\n });\n // NOTE: If you are a Sentry user, and you are seeing this stack frame,\n // it means the sentry.javascript SDK caught an error invoking your application code.\n // This is expected behavior and NOT indicative of a bug with sentry.javascript.\n throw error;\n },\n );\n };\n });\n}\n\nfunction hasProp(obj, prop) {\n return !!obj && typeof obj === 'object' && !!(obj )[prop];\n}\n\nfunction getUrlFromResource(resource) {\n if (typeof resource === 'string') {\n return resource;\n }\n\n if (!resource) {\n return '';\n }\n\n if (hasProp(resource, 'url')) {\n return resource.url;\n }\n\n if (resource.toString) {\n return resource.toString();\n }\n\n return '';\n}\n\n/**\n * Parses the fetch arguments to find the used Http method and the url of the request\n */\nfunction parseFetchArgs(fetchArgs) {\n if (fetchArgs.length === 0) {\n return { method: 'GET', url: '' };\n }\n\n if (fetchArgs.length === 2) {\n const [url, options] = fetchArgs ;\n\n return {\n url: getUrlFromResource(url),\n method: hasProp(options, 'method') ? String(options.method).toUpperCase() : 'GET',\n };\n }\n\n const arg = fetchArgs[0];\n return {\n url: getUrlFromResource(arg ),\n method: hasProp(arg, 'method') ? String(arg.method).toUpperCase() : 'GET',\n };\n}\n\n/** JSDoc */\nfunction instrumentXHR() {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (!(WINDOW ).XMLHttpRequest) {\n return;\n }\n\n const xhrproto = XMLHttpRequest.prototype;\n\n fill(xhrproto, 'open', function (originalOpen) {\n return function ( ...args) {\n const startTimestamp = Date.now();\n\n const url = args[1];\n const xhrInfo = (this[SENTRY_XHR_DATA_KEY] = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n request_headers: {},\n });\n\n // if Sentry key appears in URL, don't capture it as a request\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isString(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {\n this.__sentry_own_request__ = true;\n }\n\n const onreadystatechangeHandler = () => {\n // For whatever reason, this is not the same instance here as from the outer method\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (!xhrInfo) {\n return;\n }\n\n if (this.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n xhrInfo.status_code = this.status;\n } catch (e) {\n /* do nothing */\n }\n\n triggerHandlers('xhr', {\n args: args ,\n endTimestamp: Date.now(),\n startTimestamp,\n xhr: this,\n } );\n }\n };\n\n if ('onreadystatechange' in this && typeof this.onreadystatechange === 'function') {\n fill(this, 'onreadystatechange', function (original) {\n return function ( ...readyStateArgs) {\n onreadystatechangeHandler();\n return original.apply(this, readyStateArgs);\n };\n });\n } else {\n this.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n\n // Intercepting `setRequestHeader` to access the request headers of XHR instance.\n // This will only work for user/library defined headers, not for the default/browser-assigned headers.\n // Request cookies are also unavailable for XHR, as `Cookie` header can't be defined by `setRequestHeader`.\n fill(this, 'setRequestHeader', function (original) {\n return function ( ...setRequestHeaderArgs) {\n const [header, value] = setRequestHeaderArgs ;\n\n const xhrInfo = this[SENTRY_XHR_DATA_KEY];\n\n if (xhrInfo) {\n xhrInfo.request_headers[header.toLowerCase()] = value;\n }\n\n return original.apply(this, setRequestHeaderArgs);\n };\n });\n\n return originalOpen.apply(this, args);\n };\n });\n\n fill(xhrproto, 'send', function (originalSend) {\n return function ( ...args) {\n const sentryXhrData = this[SENTRY_XHR_DATA_KEY];\n if (sentryXhrData && args[0] !== undefined) {\n sentryXhrData.body = args[0];\n }\n\n triggerHandlers('xhr', {\n args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n\n return originalSend.apply(this, args);\n };\n });\n}\n\nlet lastHref;\n\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n\n const oldOnPopState = WINDOW.onpopstate;\n WINDOW.onpopstate = function ( ...args) {\n const to = WINDOW.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n const from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n if (oldOnPopState) {\n // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.\n // https://github.com/getsentry/sentry-javascript/issues/3344\n // https://github.com/bugsnag/bugsnag-js/issues/469\n try {\n return oldOnPopState.apply(this, args);\n } catch (_oO) {\n // no-empty\n }\n }\n };\n\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function ( ...args) {\n const url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n const from = lastHref;\n const to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from,\n to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n\n fill(WINDOW.history, 'pushState', historyReplacementFunction);\n fill(WINDOW.history, 'replaceState', historyReplacementFunction);\n}\n\nconst DEBOUNCE_DURATION = 1000;\nlet debounceTimerID;\nlet lastCapturedEventType;\nlet lastCapturedEventTargetId;\n\n/**\n * Check whether the event is similar to the last captured one. For example, two click events on the same button.\n */\nfunction isSimilarToLastCapturedEvent(event) {\n // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.\n if (event.type !== lastCapturedEventType) {\n return false;\n }\n\n try {\n // If both events have the same type, it's still possible that actions were performed on different targets.\n // e.g. 2 clicks on different buttons.\n if (!event.target || (event.target )._sentryId !== lastCapturedEventTargetId) {\n return false;\n }\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n }\n\n // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_\n // to which an event listener was attached), we treat them as the same action, as we want to capture\n // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.\n return true;\n}\n\n/**\n * Decide whether an event should be captured.\n * @param event event to be captured\n */\nfunction shouldSkipDOMEvent(eventType, target) {\n // We are only interested in filtering `keypress` events for now.\n if (eventType !== 'keypress') {\n return false;\n }\n\n if (!target || !target.tagName) {\n return true;\n }\n\n // Only consider keypress events on actual input elements. This will disregard keypresses targeting body\n // e.g.tabbing through elements, hotkeys, etc.\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {\n return false;\n }\n\n return true;\n}\n\nfunction getEventTarget(event) {\n try {\n return event.target ;\n } catch (e) {\n // just accessing `target` property can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/sentry-javascript/issues/838\n return null;\n }\n}\n\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param handler function that will be triggered\n * @param globalListener indicates whether event was captured by the global event listener\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction makeDOMEventHandler(handler, globalListener = false) {\n return (event) => {\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors).\n // Ignore if we've already captured that event.\n if (!event || event['_sentryCaptured']) {\n return;\n }\n\n const target = getEventTarget(event);\n\n // We always want to skip _some_ events.\n if (shouldSkipDOMEvent(event.type, target)) {\n return;\n }\n\n // Mark event as \"seen\"\n addNonEnumerableProperty(event, '_sentryCaptured', true);\n\n if (target && !target._sentryId) {\n // Add UUID to event target so we can identify if\n addNonEnumerableProperty(target, '_sentryId', uuid4());\n }\n\n const name = event.type === 'keypress' ? 'input' : event.type;\n\n // If there is no last captured event, it means that we can safely capture the new event and store it for future comparisons.\n // If there is a last captured event, see if the new event is different enough to treat it as a unique one.\n // If that's the case, emit the previous event and store locally the newly-captured DOM event.\n if (!isSimilarToLastCapturedEvent(event)) {\n handler({\n event: event,\n name,\n global: globalListener,\n });\n lastCapturedEventType = event.type;\n lastCapturedEventTargetId = target ? target._sentryId : undefined;\n }\n\n // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.\n clearTimeout(debounceTimerID);\n debounceTimerID = WINDOW.setTimeout(() => {\n lastCapturedEventTargetId = undefined;\n lastCapturedEventType = undefined;\n }, DEBOUNCE_DURATION);\n };\n}\n\n/** JSDoc */\nfunction instrumentDOM() {\n if (!WINDOW.document) {\n return;\n }\n\n // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom\n // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before\n // we instrument `addEventListener` so that we don't end up attaching this handler twice.\n const triggerDOMHandler = triggerHandlers.bind(null, 'dom');\n const globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);\n WINDOW.document.addEventListener('click', globalDOMEventHandler, false);\n WINDOW.document.addEventListener('keypress', globalDOMEventHandler, false);\n\n // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled\n // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That\n // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler\n // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still\n // guaranteed to fire at least once.)\n ['EventTarget', 'Node'].forEach((target) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = (WINDOW )[target] && (WINDOW )[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (originalAddEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});\n const handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });\n\n if (!handlerForType.handler) {\n const handler = makeDOMEventHandler(triggerDOMHandler);\n handlerForType.handler = handler;\n originalAddEventListener.call(this, type, handler, options);\n }\n\n handlerForType.refCount++;\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalAddEventListener.call(this, type, listener, options);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (originalRemoveEventListener) {\n return function (\n\n type,\n listener,\n options,\n ) {\n if (type === 'click' || type == 'keypress') {\n try {\n const el = this ;\n const handlers = el.__sentry_instrumentation_handlers__ || {};\n const handlerForType = handlers[type];\n\n if (handlerForType) {\n handlerForType.refCount--;\n // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.\n if (handlerForType.refCount <= 0) {\n originalRemoveEventListener.call(this, type, handlerForType.handler, options);\n handlerForType.handler = undefined;\n delete handlers[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete\n }\n\n // If there are no longer any custom handlers of any type on this element, cleanup everything.\n if (Object.keys(handlers).length === 0) {\n delete el.__sentry_instrumentation_handlers__;\n }\n }\n } catch (e) {\n // Accessing dom properties is always fragile.\n // Also allows us to skip `addEventListenrs` calls with no proper `this` context.\n }\n }\n\n return originalRemoveEventListener.call(this, type, listener, options);\n };\n },\n );\n });\n}\n\nlet _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = WINDOW.onerror;\n\n WINDOW.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column,\n error,\n line,\n msg,\n url,\n });\n\n if (_oldOnErrorHandler && !_oldOnErrorHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnErrorHandler.apply(this, arguments);\n }\n\n return false;\n };\n\n WINDOW.onerror.__SENTRY_INSTRUMENTED__ = true;\n}\n\nlet _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = WINDOW.onunhandledrejection;\n\n WINDOW.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n\n if (_oldOnUnhandledRejectionHandler && !_oldOnUnhandledRejectionHandler.__SENTRY_LOADER__) {\n // eslint-disable-next-line prefer-rest-params\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n\n return true;\n };\n\n WINDOW.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;\n}\n\nexport { SENTRY_XHR_DATA_KEY, addInstrumentationHandler, instrumentDOM, instrumentXHR, parseFetchArgs, resetInstrumentationHandlers };\n//# sourceMappingURL=instrument.js.map\n","import { logger } from './logger.js';\n\n/** Regular expression used to parse a Dsn. */\nconst DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+)?)?@)([\\w.-]+)(?::(\\d+))?\\/(.+)/;\n\nfunction isValidProtocol(protocol) {\n return protocol === 'http' || protocol === 'https';\n}\n\n/**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\nfunction dsnToString(dsn, withPassword = false) {\n const { host, path, pass, port, projectId, protocol, publicKey } = dsn;\n return (\n `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +\n `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`\n );\n}\n\n/**\n * Parses a Dsn from a given string.\n *\n * @param str A Dsn as string\n * @returns Dsn as DsnComponents or undefined if @param str is not a valid DSN string\n */\nfunction dsnFromString(str) {\n const match = DSN_REGEX.exec(str);\n\n if (!match) {\n // This should be logged to the console\n // eslint-disable-next-line no-console\n console.error(`Invalid Sentry Dsn: ${str}`);\n return undefined;\n }\n\n const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);\n let path = '';\n let projectId = lastPath;\n\n const split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop() ;\n }\n\n if (projectId) {\n const projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n\n return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });\n}\n\nfunction dsnFromComponents(components) {\n return {\n protocol: components.protocol,\n publicKey: components.publicKey || '',\n pass: components.pass || '',\n host: components.host,\n port: components.port || '',\n path: components.path || '',\n projectId: components.projectId,\n };\n}\n\nfunction validateDsn(dsn) {\n if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n return true;\n }\n\n const { port, projectId, protocol } = dsn;\n\n const requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];\n const hasMissingRequiredComponent = requiredComponents.find(component => {\n if (!dsn[component]) {\n logger.error(`Invalid Sentry Dsn: ${component} missing`);\n return true;\n }\n return false;\n });\n\n if (hasMissingRequiredComponent) {\n return false;\n }\n\n if (!projectId.match(/^\\d+$/)) {\n logger.error(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);\n return false;\n }\n\n if (!isValidProtocol(protocol)) {\n logger.error(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);\n return false;\n }\n\n if (port && isNaN(parseInt(port, 10))) {\n logger.error(`Invalid Sentry Dsn: Invalid port ${port}`);\n return false;\n }\n\n return true;\n}\n\n/**\n * Creates a valid Sentry Dsn object, identifying a Sentry instance and project.\n * @returns a valid DsnComponents object or `undefined` if @param from is an invalid DSN source\n */\nfunction makeDsn(from) {\n const components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);\n if (!components || !validateDsn(components)) {\n return undefined;\n }\n return components;\n}\n\nexport { dsnFromString, dsnToString, makeDsn };\n//# sourceMappingURL=dsn.js.map\n","/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n/**\n * Helper to decycle json objects\n */\nfunction memoBuilder() {\n const hasWeakSet = typeof WeakSet === 'function';\n const inner = hasWeakSet ? new WeakSet() : [];\n function memoize(obj) {\n if (hasWeakSet) {\n if (inner.has(obj)) {\n return true;\n }\n inner.add(obj);\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/prefer-for-of\n for (let i = 0; i < inner.length; i++) {\n const value = inner[i];\n if (value === obj) {\n return true;\n }\n }\n inner.push(obj);\n return false;\n }\n\n function unmemoize(obj) {\n if (hasWeakSet) {\n inner.delete(obj);\n } else {\n for (let i = 0; i < inner.length; i++) {\n if (inner[i] === obj) {\n inner.splice(i, 1);\n break;\n }\n }\n }\n }\n return [memoize, unmemoize];\n}\n\nexport { memoBuilder };\n//# sourceMappingURL=memo.js.map\n","import { isNaN, isVueViewModel, isSyntheticEvent } from './is.js';\nimport { memoBuilder } from './memo.js';\nimport { convertToPlainObject } from './object.js';\nimport { getFunctionName } from './stacktrace.js';\n\n/**\n * Recursively normalizes the given object.\n *\n * - Creates a copy to prevent original input mutation\n * - Skips non-enumerable properties\n * - When stringifying, calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializable values (`undefined`/`NaN`/functions) to serializable format\n * - Translates known global objects/classes to a string representations\n * - Takes care of `Error` object serialization\n * - Optionally limits depth of final output\n * - Optionally limits number of properties/elements included in any single object/array\n *\n * @param input The object to be normalized.\n * @param depth The max depth to which to normalize the object. (Anything deeper stringified whole.)\n * @param maxProperties The max number of elements or properties to be included in any single array or\n * object in the normallized output.\n * @returns A normalized version of the object, or `\"**non-serializable**\"` if any errors are thrown during normalization.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction normalize(input, depth = 100, maxProperties = +Infinity) {\n try {\n // since we're at the outermost level, we don't provide a key\n return visit('', input, depth, maxProperties);\n } catch (err) {\n return { ERROR: `**non-serializable** (${err})` };\n }\n}\n\n/** JSDoc */\nfunction normalizeToSize(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n object,\n // Default Node.js REPL depth\n depth = 3,\n // 100kB, as 200kB is max payload size, so half sounds reasonable\n maxSize = 100 * 1024,\n) {\n const normalized = normalize(object, depth);\n\n if (jsonSize(normalized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n\n return normalized ;\n}\n\n/**\n * Visits a node to perform normalization on it\n *\n * @param key The key corresponding to the given node\n * @param value The node to be visited\n * @param depth Optional number indicating the maximum recursion depth\n * @param maxProperties Optional maximum number of properties/elements included in any single object/array\n * @param memo Optional Memo class handling decycling\n */\nfunction visit(\n key,\n value,\n depth = +Infinity,\n maxProperties = +Infinity,\n memo = memoBuilder(),\n) {\n const [memoize, unmemoize] = memo;\n\n // Get the simple cases out of the way first\n if (\n value == null || // this matches null and undefined -> eqeq not eqeqeq\n (['number', 'boolean', 'string'].includes(typeof value) && !isNaN(value))\n ) {\n return value ;\n }\n\n const stringified = stringifyValue(key, value);\n\n // Anything we could potentially dig into more (objects or arrays) will have come back as `\"[object XXXX]\"`.\n // Everything else will have already been serialized, so if we don't see that pattern, we're done.\n if (!stringified.startsWith('[object ')) {\n return stringified;\n }\n\n // From here on, we can assert that `value` is either an object or an array.\n\n // Do not normalize objects that we know have already been normalized. As a general rule, the\n // \"__sentry_skip_normalization__\" property should only be used sparingly and only should only be set on objects that\n // have already been normalized.\n if ((value )['__sentry_skip_normalization__']) {\n return value ;\n }\n\n // We can set `__sentry_override_normalization_depth__` on an object to ensure that from there\n // We keep a certain amount of depth.\n // This should be used sparingly, e.g. we use it for the redux integration to ensure we get a certain amount of state.\n const remainingDepth =\n typeof (value )['__sentry_override_normalization_depth__'] === 'number'\n ? ((value )['__sentry_override_normalization_depth__'] )\n : depth;\n\n // We're also done if we've reached the max depth\n if (remainingDepth === 0) {\n // At this point we know `serialized` is a string of the form `\"[object XXXX]\"`. Clean it up so it's just `\"[XXXX]\"`.\n return stringified.replace('object ', '');\n }\n\n // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.\n if (memoize(value)) {\n return '[Circular ~]';\n }\n\n // If the value has a `toJSON` method, we call it to extract more information\n const valueWithToJSON = value ;\n if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {\n try {\n const jsonValue = valueWithToJSON.toJSON();\n // We need to normalize the return value of `.toJSON()` in case it has circular references\n return visit('', jsonValue, remainingDepth - 1, maxProperties, memo);\n } catch (err) {\n // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)\n }\n }\n\n // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse\n // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each\n // property/entry, and keep track of the number of items we add to it.\n const normalized = (Array.isArray(value) ? [] : {}) ;\n let numAdded = 0;\n\n // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant\n // properties are non-enumerable and otherwise would get missed.\n const visitable = convertToPlainObject(value );\n\n for (const visitKey in visitable) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {\n continue;\n }\n\n if (numAdded >= maxProperties) {\n normalized[visitKey] = '[MaxProperties ~]';\n break;\n }\n\n // Recursively visit all the child nodes\n const visitValue = visitable[visitKey];\n normalized[visitKey] = visit(visitKey, visitValue, remainingDepth - 1, maxProperties, memo);\n\n numAdded++;\n }\n\n // Once we've visited all the branches, remove the parent from memo storage\n unmemoize(value);\n\n // Return accumulated values\n return normalized;\n}\n\n/* eslint-disable complexity */\n/**\n * Stringify the given value. Handles various known special values and types.\n *\n * Not meant to be used on simple primitives which already have a string representation, as it will, for example, turn\n * the number 1231 into \"[Object Number]\", nor on `null`, as it will throw.\n *\n * @param value The value to stringify\n * @returns A stringified representation of the given value\n */\nfunction stringifyValue(\n key,\n // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for\n // our internal use, it'll do\n value,\n) {\n try {\n if (key === 'domain' && value && typeof value === 'object' && (value )._events) {\n return '[Domain]';\n }\n\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n\n // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first\n // which won't throw if they are not present.\n\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n\n // eslint-disable-next-line no-restricted-globals\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n\n if (isVueViewModel(value)) {\n return '[VueViewModel]';\n }\n\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n\n if (typeof value === 'function') {\n return `[Function: ${getFunctionName(value)}]`;\n }\n\n if (typeof value === 'symbol') {\n return `[${String(value)}]`;\n }\n\n // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion\n if (typeof value === 'bigint') {\n return `[BigInt: ${String(value)}]`;\n }\n\n // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting\n // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as\n // `\"[object Object]\"`. If we instead look at the constructor's name (which is the same as the name of the class),\n // we can make sure that only plain objects come out that way.\n const objName = getConstructorName(value);\n\n // Handle HTML Elements\n if (/^HTML(\\w*)Element$/.test(objName)) {\n return `[HTMLElement: ${objName}]`;\n }\n\n return `[object ${objName}]`;\n } catch (err) {\n return `**non-serializable** (${err})`;\n }\n}\n/* eslint-enable complexity */\n\nfunction getConstructorName(value) {\n const prototype = Object.getPrototypeOf(value);\n\n return prototype ? prototype.constructor.name : 'null prototype';\n}\n\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // eslint-disable-next-line no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n\n/** Calculates bytes size of input object */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n\nexport { normalize, normalizeToSize, visit as walk };\n//# sourceMappingURL=normalize.js.map\n","import { dsnToString } from './dsn.js';\nimport { normalize } from './normalize.js';\nimport { dropUndefinedKeys } from './object.js';\n\n/**\n * Creates an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction createEnvelope(headers, items = []) {\n return [headers, items] ;\n}\n\n/**\n * Add an item to an envelope.\n * Make sure to always explicitly provide the generic to this function\n * so that the envelope types resolve correctly.\n */\nfunction addItemToEnvelope(envelope, newItem) {\n const [headers, items] = envelope;\n return [headers, [...items, newItem]] ;\n}\n\n/**\n * Convenience function to loop through the items and item types of an envelope.\n * (This function was mostly created because working with envelope types is painful at the moment)\n *\n * If the callback returns true, the rest of the items will be skipped.\n */\nfunction forEachEnvelopeItem(\n envelope,\n callback,\n) {\n const envelopeItems = envelope[1];\n\n for (const envelopeItem of envelopeItems) {\n const envelopeItemType = envelopeItem[0].type;\n const result = callback(envelopeItem, envelopeItemType);\n\n if (result) {\n return true;\n }\n }\n\n return false;\n}\n\n/**\n * Returns true if the envelope contains any of the given envelope item types\n */\nfunction envelopeContainsItemType(envelope, types) {\n return forEachEnvelopeItem(envelope, (_, type) => types.includes(type));\n}\n\n/**\n * Encode a string to UTF8.\n */\nfunction encodeUTF8(input, textEncoder) {\n const utf8 = textEncoder || new TextEncoder();\n return utf8.encode(input);\n}\n\n/**\n * Serializes an envelope.\n */\nfunction serializeEnvelope(envelope, textEncoder) {\n const [envHeaders, items] = envelope;\n\n // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data\n let parts = JSON.stringify(envHeaders);\n\n function append(next) {\n if (typeof parts === 'string') {\n parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];\n } else {\n parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);\n }\n }\n\n for (const item of items) {\n const [itemHeaders, payload] = item;\n\n append(`\\n${JSON.stringify(itemHeaders)}\\n`);\n\n if (typeof payload === 'string' || payload instanceof Uint8Array) {\n append(payload);\n } else {\n let stringifiedPayload;\n try {\n stringifiedPayload = JSON.stringify(payload);\n } catch (e) {\n // In case, despite all our efforts to keep `payload` circular-dependency-free, `JSON.strinify()` still\n // fails, we try again after normalizing it again with infinite normalization depth. This of course has a\n // performance impact but in this case a performance hit is better than throwing.\n stringifiedPayload = JSON.stringify(normalize(payload));\n }\n append(stringifiedPayload);\n }\n }\n\n return typeof parts === 'string' ? parts : concatBuffers(parts);\n}\n\nfunction concatBuffers(buffers) {\n const totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);\n\n const merged = new Uint8Array(totalLength);\n let offset = 0;\n for (const buffer of buffers) {\n merged.set(buffer, offset);\n offset += buffer.length;\n }\n\n return merged;\n}\n\n/**\n * Parses an envelope\n */\nfunction parseEnvelope(\n env,\n textEncoder,\n textDecoder,\n) {\n let buffer = typeof env === 'string' ? textEncoder.encode(env) : env;\n\n function readBinary(length) {\n const bin = buffer.subarray(0, length);\n // Replace the buffer with the remaining data excluding trailing newline\n buffer = buffer.subarray(length + 1);\n return bin;\n }\n\n function readJson() {\n let i = buffer.indexOf(0xa);\n // If we couldn't find a newline, we must have found the end of the buffer\n if (i < 0) {\n i = buffer.length;\n }\n\n return JSON.parse(textDecoder.decode(readBinary(i))) ;\n }\n\n const envelopeHeader = readJson();\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const items = [];\n\n while (buffer.length) {\n const itemHeader = readJson();\n const binaryLength = typeof itemHeader.length === 'number' ? itemHeader.length : undefined;\n\n items.push([itemHeader, binaryLength ? readBinary(binaryLength) : readJson()]);\n }\n\n return [envelopeHeader, items];\n}\n\n/**\n * Creates attachment envelope items\n */\nfunction createAttachmentEnvelopeItem(\n attachment,\n textEncoder,\n) {\n const buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;\n\n return [\n dropUndefinedKeys({\n type: 'attachment',\n length: buffer.length,\n filename: attachment.filename,\n content_type: attachment.contentType,\n attachment_type: attachment.attachmentType,\n }),\n buffer,\n ];\n}\n\nconst ITEM_TYPE_TO_DATA_CATEGORY_MAP = {\n session: 'session',\n sessions: 'session',\n attachment: 'attachment',\n transaction: 'transaction',\n event: 'error',\n client_report: 'internal',\n user_report: 'default',\n profile: 'profile',\n replay_event: 'replay',\n replay_recording: 'replay',\n check_in: 'monitor',\n // TODO: This is a temporary workaround until we have a proper data category for metrics\n statsd: 'unknown',\n};\n\n/**\n * Maps the type of an envelope item to a data category.\n */\nfunction envelopeItemTypeToDataCategory(type) {\n return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];\n}\n\n/** Extracts the minimal SDK info from from the metadata or an events */\nfunction getSdkMetadataForEnvelopeHeader(metadataOrEvent) {\n if (!metadataOrEvent || !metadataOrEvent.sdk) {\n return;\n }\n const { name, version } = metadataOrEvent.sdk;\n return { name, version };\n}\n\n/**\n * Creates event envelope headers, based on event, sdk info and tunnel\n * Note: This function was extracted from the core package to make it available in Replay\n */\nfunction createEventEnvelopeHeaders(\n event,\n sdkInfo,\n tunnel,\n dsn,\n) {\n const dynamicSamplingContext = event.sdkProcessingMetadata && event.sdkProcessingMetadata.dynamicSamplingContext;\n return {\n event_id: event.event_id ,\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n ...(dynamicSamplingContext && {\n trace: dropUndefinedKeys({ ...dynamicSamplingContext }),\n }),\n };\n}\n\nexport { addItemToEnvelope, createAttachmentEnvelopeItem, createEnvelope, createEventEnvelopeHeaders, envelopeContainsItemType, envelopeItemTypeToDataCategory, forEachEnvelopeItem, getSdkMetadataForEnvelopeHeader, parseEnvelope, serializeEnvelope };\n//# sourceMappingURL=envelope.js.map\n","/** An error emitted by Sentry SDKs and related utilities. */\nclass SentryError extends Error {\n /** Display name of this error instance. */\n\n constructor( message, logLevel = 'warn') {\n super(message);this.message = message;\n this.name = new.target.prototype.constructor.name;\n // This sets the prototype to be `Error`, not `SentryError`. It's unclear why we do this, but commenting this line\n // out causes various (seemingly totally unrelated) playwright tests consistently time out. FYI, this makes\n // instances of `SentryError` fail `obj instanceof SentryError` checks.\n Object.setPrototypeOf(this, new.target.prototype);\n this.logLevel = logLevel;\n }\n}\n\nexport { SentryError };\n//# sourceMappingURL=error.js.map\n","import { makeDsn, dsnToString, urlEncode } from '@sentry/utils';\n\nconst SENTRY_API_VERSION = '7';\n\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\n const protocol = dsn.protocol ? `${dsn.protocol}:` : '';\n const port = dsn.port ? `:${dsn.port}` : '';\n return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;\n}\n\n/** Returns the ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn) {\n return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;\n}\n\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn, sdkInfo) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n ...(sdkInfo && { sentry_client: `${sdkInfo.name}/${sdkInfo.version}` }),\n });\n}\n\n/**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\nfunction getEnvelopeEndpointWithUrlEncodedAuth(\n dsn,\n // TODO (v8): Remove `tunnelOrOptions` in favor of `options`, and use the substitute code below\n // options: ClientOptions = {} as ClientOptions,\n tunnelOrOptions = {} ,\n) {\n // TODO (v8): Use this code instead\n // const { tunnel, _metadata = {} } = options;\n // return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, _metadata.sdk)}`;\n\n const tunnel = typeof tunnelOrOptions === 'string' ? tunnelOrOptions : tunnelOrOptions.tunnel;\n const sdkInfo =\n typeof tunnelOrOptions === 'string' || !tunnelOrOptions._metadata ? undefined : tunnelOrOptions._metadata.sdk;\n\n return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn, sdkInfo)}`;\n}\n\n/** Returns the url to the report dialog endpoint. */\nfunction getReportDialogEndpoint(\n dsnLike,\n dialogOptions\n\n,\n) {\n const dsn = makeDsn(dsnLike);\n if (!dsn) {\n return '';\n }\n\n const endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;\n\n let encodedOptions = `dsn=${dsnToString(dsn)}`;\n for (const key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n\n if (key === 'user') {\n const user = dialogOptions.user;\n if (!user) {\n continue;\n }\n if (user.name) {\n encodedOptions += `&name=${encodeURIComponent(user.name)}`;\n }\n if (user.email) {\n encodedOptions += `&email=${encodeURIComponent(user.email)}`;\n }\n } else {\n encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;\n }\n }\n\n return `${endpoint}?${encodedOptions}`;\n}\n\nexport { getEnvelopeEndpointWithUrlEncodedAuth, getReportDialogEndpoint };\n//# sourceMappingURL=api.js.map\n","import { getSdkMetadataForEnvelopeHeader, dsnToString, createEnvelope, createEventEnvelopeHeaders } from '@sentry/utils';\n\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];\n event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];\n return event;\n}\n\n/** Creates an envelope from a Session */\nfunction createSessionEnvelope(\n session,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n const envelopeHeaders = {\n sent_at: new Date().toISOString(),\n ...(sdkInfo && { sdk: sdkInfo }),\n ...(!!tunnel && dsn && { dsn: dsnToString(dsn) }),\n };\n\n const envelopeItem =\n 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session.toJSON()];\n\n return createEnvelope(envelopeHeaders, [envelopeItem]);\n}\n\n/**\n * Create an Envelope from an event.\n */\nfunction createEventEnvelope(\n event,\n dsn,\n metadata,\n tunnel,\n) {\n const sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);\n\n /*\n Note: Due to TS, event.type may be `replay_event`, theoretically.\n In practice, we never call `createEventEnvelope` with `replay_event` type,\n and we'd have to adjut a looot of types to make this work properly.\n We want to avoid casting this around, as that could lead to bugs (e.g. when we add another type)\n So the safe choice is to really guard against the replay_event type here.\n */\n const eventType = event.type && event.type !== 'replay_event' ? event.type : 'event';\n\n enhanceEventWithSdkInfo(event, metadata && metadata.sdk);\n\n const envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete event.sdkProcessingMetadata;\n\n const eventItem = [{ type: eventType }, event];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n\nexport { createEventEnvelope, createSessionEnvelope };\n//# sourceMappingURL=envelope.js.map\n","import { dropUndefinedKeys } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\n\n/**\n * Creates a dynamic sampling context from a client.\n *\n * Dispatchs the `createDsc` lifecycle hook as a side effect.\n */\nfunction getDynamicSamplingContextFromClient(\n trace_id,\n client,\n scope,\n) {\n const options = client.getOptions();\n\n const { publicKey: public_key } = client.getDsn() || {};\n const { segment: user_segment } = (scope && scope.getUser()) || {};\n\n const dsc = dropUndefinedKeys({\n environment: options.environment || DEFAULT_ENVIRONMENT,\n release: options.release,\n user_segment,\n public_key,\n trace_id,\n }) ;\n\n client.emit && client.emit('createDsc', dsc);\n\n return dsc;\n}\n\nexport { getDynamicSamplingContextFromClient };\n//# sourceMappingURL=dynamicSamplingContext.js.map\n","import { uuid4, dateTimestampInSeconds, resolvedSyncPromise, truncate, GLOBAL_OBJ, normalize } from '@sentry/utils';\nimport { DEFAULT_ENVIRONMENT } from '../constants.js';\nimport { notifyEventProcessors, getGlobalEventProcessors } from '../eventProcessors.js';\nimport { Scope } from '../scope.js';\n\n/**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * Note: This also triggers callbacks for `addGlobalEventProcessor`, but not `beforeSend`.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n * @hidden\n */\nfunction prepareEvent(\n options,\n event,\n hint,\n scope,\n client,\n) {\n const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = options;\n const prepared = {\n ...event,\n event_id: event.event_id || hint.event_id || uuid4(),\n timestamp: event.timestamp || dateTimestampInSeconds(),\n };\n const integrations = hint.integrations || options.integrations.map(i => i.name);\n\n applyClientOptions(prepared, options);\n applyIntegrationsMetadata(prepared, integrations);\n\n // Only put debug IDs onto frames for error events.\n if (event.type === undefined) {\n applyDebugIds(prepared, options.stackParser);\n }\n\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n let finalScope = scope;\n if (hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n\n // We prepare the result here with a resolved Event.\n let result = resolvedSyncPromise(prepared);\n\n const clientEventProcessors = client && client.getEventProcessors ? client.getEventProcessors() : [];\n\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n //\n // We need to check for the existence of `finalScope.getAttachments`\n // because `getAttachments` can be undefined if users are using an older version\n // of `@sentry/core` that does not have the `getAttachments` method.\n // See: https://github.com/getsentry/sentry-javascript/issues/5229\n if (finalScope) {\n // Collect attachments from the hint and scope\n if (finalScope.getAttachments) {\n const attachments = [...(hint.attachments || []), ...finalScope.getAttachments()];\n\n if (attachments.length) {\n hint.attachments = attachments;\n }\n }\n\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint, clientEventProcessors);\n } else {\n // Apply client & global event processors even if there is no scope\n // TODO (v8): Update the order to be Global > Client\n result = notifyEventProcessors([...clientEventProcessors, ...getGlobalEventProcessors()], prepared, hint);\n }\n\n return result.then(evt => {\n if (evt) {\n // We apply the debug_meta field only after all event processors have ran, so that if any event processors modified\n // file names (e.g.the RewriteFrames integration) the filename -> debug ID relationship isn't destroyed.\n // This should not cause any PII issues, since we're only moving data that is already on the event and not adding\n // any new data\n applyDebugMeta(evt);\n }\n\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\n }\n return evt;\n });\n}\n\n/**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\nfunction applyClientOptions(event, options) {\n const { environment, release, dist, maxValueLength = 250 } = options;\n\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : DEFAULT_ENVIRONMENT;\n }\n\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n\n const exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n\n const request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n}\n\nconst debugIdStackParserCache = new WeakMap();\n\n/**\n * Puts debug IDs into the stack frames of an error event.\n */\nfunction applyDebugIds(event, stackParser) {\n const debugIdMap = GLOBAL_OBJ._sentryDebugIds;\n\n if (!debugIdMap) {\n return;\n }\n\n let debugIdStackFramesCache;\n const cachedDebugIdStackFrameCache = debugIdStackParserCache.get(stackParser);\n if (cachedDebugIdStackFrameCache) {\n debugIdStackFramesCache = cachedDebugIdStackFrameCache;\n } else {\n debugIdStackFramesCache = new Map();\n debugIdStackParserCache.set(stackParser, debugIdStackFramesCache);\n }\n\n // Build a map of filename -> debug_id\n const filenameDebugIdMap = Object.keys(debugIdMap).reduce((acc, debugIdStackTrace) => {\n let parsedStack;\n const cachedParsedStack = debugIdStackFramesCache.get(debugIdStackTrace);\n if (cachedParsedStack) {\n parsedStack = cachedParsedStack;\n } else {\n parsedStack = stackParser(debugIdStackTrace);\n debugIdStackFramesCache.set(debugIdStackTrace, parsedStack);\n }\n\n for (let i = parsedStack.length - 1; i >= 0; i--) {\n const stackFrame = parsedStack[i];\n if (stackFrame.filename) {\n acc[stackFrame.filename] = debugIdMap[debugIdStackTrace];\n break;\n }\n }\n return acc;\n }, {});\n\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.filename) {\n frame.debug_id = filenameDebugIdMap[frame.filename];\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n}\n\n/**\n * Moves debug IDs from the stack frames of an error event into the debug_meta field.\n */\nfunction applyDebugMeta(event) {\n // Extract debug IDs and filenames from the stack frames on the event.\n const filenameDebugIdMap = {};\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n event.exception.values.forEach(exception => {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n exception.stacktrace.frames.forEach(frame => {\n if (frame.debug_id) {\n if (frame.abs_path) {\n filenameDebugIdMap[frame.abs_path] = frame.debug_id;\n } else if (frame.filename) {\n filenameDebugIdMap[frame.filename] = frame.debug_id;\n }\n delete frame.debug_id;\n }\n });\n });\n } catch (e) {\n // To save bundle size we're just try catching here instead of checking for the existence of all the different objects.\n }\n\n if (Object.keys(filenameDebugIdMap).length === 0) {\n return;\n }\n\n // Fill debug_meta information\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n const images = event.debug_meta.images;\n Object.keys(filenameDebugIdMap).forEach(filename => {\n images.push({\n type: 'sourcemap',\n code_file: filename,\n debug_id: filenameDebugIdMap[filename],\n });\n });\n}\n\n/**\n * This function adds all used integrations to the SDK info in the event.\n * @param event The event that will be filled with all integrations.\n */\nfunction applyIntegrationsMetadata(event, integrationNames) {\n if (integrationNames.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationNames];\n }\n}\n\n/**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\nfunction normalizeEvent(event, depth, maxBreadth) {\n if (!event) {\n return null;\n }\n\n const normalized = {\n ...event,\n ...(event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(b => ({\n ...b,\n ...(b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }),\n })),\n }),\n ...(event.user && {\n user: normalize(event.user, depth, maxBreadth),\n }),\n ...(event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n }),\n ...(event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\n }),\n };\n\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace && normalized.contexts) {\n normalized.contexts.trace = event.contexts.trace;\n\n // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it\n if (event.contexts.trace.data) {\n normalized.contexts.trace.data = normalize(event.contexts.trace.data, depth, maxBreadth);\n }\n }\n\n // event.spans[].data may contain circular/dangerous data so we need to normalize it\n if (event.spans) {\n normalized.spans = event.spans.map(span => {\n // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable\n if (span.data) {\n span.data = normalize(span.data, depth, maxBreadth);\n }\n return span;\n });\n }\n\n return normalized;\n}\n\nexport { applyDebugIds, applyDebugMeta, prepareEvent };\n//# sourceMappingURL=prepareEvent.js.map\n","import { makeDsn, logger, checkOrSetAlreadyCaught, isPrimitive, resolvedSyncPromise, addItemToEnvelope, createAttachmentEnvelopeItem, SyncPromise, rejectedSyncPromise, SentryError, isThenable, isPlainObject } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth } from './api.js';\nimport { createEventEnvelope, createSessionEnvelope } from './envelope.js';\nimport { setupIntegrations, setupIntegration } from './integration.js';\nimport { updateSession } from './session.js';\nimport { getDynamicSamplingContextFromClient } from './tracing/dynamicSamplingContext.js';\nimport { prepareEvent } from './utils/prepareEvent.js';\n\nconst ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\n\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event, it is passed through\n * {@link BaseClient._prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeOptions> {\n * public constructor(options: NodeOptions) {\n * super(options);\n * }\n *\n * // ...\n * }\n */\nclass BaseClient {\n /** Options passed to the SDK. */\n\n /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */\n\n /** Array of set up integrations. */\n\n /** Indicates whether this client's integrations have been set up. */\n\n /** Number of calls being processed */\n\n /** Holds flushable */\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n\n /**\n * Initializes this client instance.\n *\n * @param options Options for the client.\n */\n constructor(options) {\n this._options = options;\n this._integrations = {};\n this._integrationsInitialized = false;\n this._numProcessing = 0;\n this._outcomes = {};\n this._hooks = {};\n this._eventProcessors = [];\n\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('No DSN provided, client will not send events.');\n }\n\n if (this._dsn) {\n const url = getEnvelopeEndpointWithUrlEncodedAuth(this._dsn, options);\n this._transport = options.transport({\n recordDroppedEvent: this.recordDroppedEvent.bind(this),\n ...options.transportOptions,\n url,\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n captureException(exception, hint, scope) {\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n this._process(\n this.eventFromException(exception, hint)\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level,\n hint,\n scope,\n ) {\n let eventId = hint && hint.event_id;\n\n const promisedEvent = isPrimitive(message)\n ? this.eventFromMessage(String(message), level, hint)\n : this.eventFromException(message, hint);\n\n this._process(\n promisedEvent\n .then(event => this._captureEvent(event, hint, scope))\n .then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureEvent(event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n\n let eventId = hint && hint.event_id;\n\n this._process(\n this._captureEvent(event, hint, scope).then(result => {\n eventId = result;\n }),\n );\n\n return eventId;\n }\n\n /**\n * @inheritDoc\n */\n captureSession(session) {\n if (!(typeof session.release === 'string')) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Discarded session because of missing or non-string release');\n } else {\n this.sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n updateSession(session, { init: false });\n }\n }\n\n /**\n * @inheritDoc\n */\n getDsn() {\n return this._dsn;\n }\n\n /**\n * @inheritDoc\n */\n getOptions() {\n return this._options;\n }\n\n /**\n * @see SdkMetadata in @sentry/types\n *\n * @return The metadata of the SDK\n */\n getSdkMetadata() {\n return this._options._metadata;\n }\n\n /**\n * @inheritDoc\n */\n getTransport() {\n return this._transport;\n }\n\n /**\n * @inheritDoc\n */\n flush(timeout) {\n const transport = this._transport;\n if (transport) {\n return this._isClientDoneProcessing(timeout).then(clientFinished => {\n return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);\n });\n } else {\n return resolvedSyncPromise(true);\n }\n }\n\n /**\n * @inheritDoc\n */\n close(timeout) {\n return this.flush(timeout).then(result => {\n this.getOptions().enabled = false;\n return result;\n });\n }\n\n /** Get all installed event processors. */\n getEventProcessors() {\n return this._eventProcessors;\n }\n\n /** @inheritDoc */\n addEventProcessor(eventProcessor) {\n this._eventProcessors.push(eventProcessor);\n }\n\n /**\n * Sets up the integrations\n */\n setupIntegrations(forceInitialize) {\n if ((forceInitialize && !this._integrationsInitialized) || (this._isEnabled() && !this._integrationsInitialized)) {\n this._integrations = setupIntegrations(this, this._options.integrations);\n this._integrationsInitialized = true;\n }\n }\n\n /**\n * Gets an installed integration by its `id`.\n *\n * @returns The installed integration or `undefined` if no integration with that `id` was installed.\n */\n getIntegrationById(integrationId) {\n return this._integrations[integrationId];\n }\n\n /**\n * @inheritDoc\n */\n getIntegration(integration) {\n try {\n return (this._integrations[integration.id] ) || null;\n } catch (_oO) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Cannot retrieve integration ${integration.id} from the current Client`);\n return null;\n }\n }\n\n /**\n * @inheritDoc\n */\n addIntegration(integration) {\n setupIntegration(this, integration, this._integrations);\n }\n\n /**\n * @inheritDoc\n */\n sendEvent(event, hint = {}) {\n this.emit('beforeSendEvent', event, hint);\n\n let env = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);\n\n for (const attachment of hint.attachments || []) {\n env = addItemToEnvelope(\n env,\n createAttachmentEnvelopeItem(\n attachment,\n this._options.transportOptions && this._options.transportOptions.textEncoder,\n ),\n );\n }\n\n const promise = this._sendEnvelope(env);\n if (promise) {\n promise.then(sendResponse => this.emit('afterSendEvent', event, sendResponse), null);\n }\n }\n\n /**\n * @inheritDoc\n */\n sendSession(session) {\n const env = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);\n void this._sendEnvelope(env);\n }\n\n /**\n * @inheritDoc\n */\n recordDroppedEvent(reason, category, _event) {\n // Note: we use `event` in replay, where we overwrite this hook.\n\n if (this._options.sendClientReports) {\n // We want to track each category (error, transaction, session, replay_event) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n // With typescript 4.1 we could even use template literal types\n const key = `${reason}:${category}`;\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Adding outcome: \"${key}\"`);\n\n // The following works because undefined + 1 === NaN and NaN is falsy\n this._outcomes[key] = this._outcomes[key] + 1 || 1;\n }\n }\n\n // Keep on() & emit() signatures in sync with types' client.ts interface\n /* eslint-disable @typescript-eslint/unified-signatures */\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n on(hook, callback) {\n if (!this._hooks[hook]) {\n this._hooks[hook] = [];\n }\n\n // @ts-expect-error We assue the types are correct\n this._hooks[hook].push(callback);\n }\n\n /** @inheritdoc */\n\n /** @inheritdoc */\n emit(hook, ...rest) {\n if (this._hooks[hook]) {\n this._hooks[hook].forEach(callback => callback(...rest));\n }\n }\n\n /* eslint-enable @typescript-eslint/unified-signatures */\n\n /** Updates existing session based on the provided event */\n _updateSessionFromEvent(session, event) {\n let crashed = false;\n let errored = false;\n const exceptions = event.exception && event.exception.values;\n\n if (exceptions) {\n errored = true;\n\n for (const ex of exceptions) {\n const mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n const sessionNonTerminal = session.status === 'ok';\n const shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n\n if (shouldUpdateAndSend) {\n updateSession(session, {\n ...(crashed && { status: 'crashed' }),\n errors: session.errors || Number(errored || crashed),\n });\n this.captureSession(session);\n }\n }\n\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n _isClientDoneProcessing(timeout) {\n return new SyncPromise(resolve => {\n let ticked = 0;\n const tick = 1;\n\n const interval = setInterval(() => {\n if (this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n } else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\n }\n }\n }, tick);\n });\n }\n\n /** Determines whether this SDK is enabled and a transport is present. */\n _isEnabled() {\n return this.getOptions().enabled !== false && this._transport !== undefined;\n }\n\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n _prepareEvent(event, hint, scope) {\n const options = this.getOptions();\n const integrations = Object.keys(this._integrations);\n if (!hint.integrations && integrations.length > 0) {\n hint.integrations = integrations;\n }\n\n this.emit('preprocessEvent', event, hint);\n\n return prepareEvent(options, event, hint, scope, this).then(evt => {\n if (evt === null) {\n return evt;\n }\n\n // If a trace context is not set on the event, we use the propagationContext set on the event to\n // generate a trace context. If the propagationContext does not have a dynamic sampling context, we\n // also generate one for it.\n const { propagationContext } = evt.sdkProcessingMetadata || {};\n const trace = evt.contexts && evt.contexts.trace;\n if (!trace && propagationContext) {\n const { traceId: trace_id, spanId, parentSpanId, dsc } = propagationContext ;\n evt.contexts = {\n trace: {\n trace_id,\n span_id: spanId,\n parent_span_id: parentSpanId,\n },\n ...evt.contexts,\n };\n\n const dynamicSamplingContext = dsc ? dsc : getDynamicSamplingContextFromClient(trace_id, this, scope);\n\n evt.sdkProcessingMetadata = {\n dynamicSamplingContext,\n ...evt.sdkProcessingMetadata,\n };\n }\n return evt;\n });\n }\n\n /**\n * Processes the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n _captureEvent(event, hint = {}, scope) {\n return this._processEvent(event, hint, scope).then(\n finalEvent => {\n return finalEvent.event_id;\n },\n reason => {\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n // If something's gone wrong, log the error as a warning. If it's just us having used a `SentryError` for\n // control flow, log just the message (no stack) as a log-level log.\n const sentryError = reason ;\n if (sentryError.logLevel === 'log') {\n logger.log(sentryError.message);\n } else {\n logger.warn(sentryError);\n }\n }\n return undefined;\n },\n );\n }\n\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n _processEvent(event, hint, scope) {\n const options = this.getOptions();\n const { sampleRate } = options;\n\n const isTransaction = isTransactionEvent(event);\n const isError = isErrorEvent(event);\n const eventType = event.type || 'error';\n const beforeSendLabel = `before send for type \\`${eventType}\\``;\n\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (isError && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n this.recordDroppedEvent('sample_rate', 'error', event);\n return rejectedSyncPromise(\n new SentryError(\n `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,\n 'log',\n ),\n );\n }\n\n const dataCategory = eventType === 'replay_event' ? 'replay' : eventType;\n\n return this._prepareEvent(event, hint, scope)\n .then(prepared => {\n if (prepared === null) {\n this.recordDroppedEvent('event_processor', dataCategory, event);\n throw new SentryError('An event processor returned `null`, will not send event.', 'log');\n }\n\n const isInternalException = hint.data && (hint.data ).__sentry__ === true;\n if (isInternalException) {\n return prepared;\n }\n\n const result = processBeforeSend(options, prepared, hint);\n return _validateBeforeSendResult(result, beforeSendLabel);\n })\n .then(processedEvent => {\n if (processedEvent === null) {\n this.recordDroppedEvent('before_send', dataCategory, event);\n throw new SentryError(`${beforeSendLabel} returned \\`null\\`, will not send event.`, 'log');\n }\n\n const session = scope && scope.getSession();\n if (!isTransaction && session) {\n this._updateSessionFromEvent(session, processedEvent);\n }\n\n // None of the Sentry built event processor will update transaction name,\n // so if the transaction name has been changed by an event processor, we know\n // it has to come from custom event processor added by a user\n const transactionInfo = processedEvent.transaction_info;\n if (isTransaction && transactionInfo && processedEvent.transaction !== event.transaction) {\n const source = 'custom';\n processedEvent.transaction_info = {\n ...transactionInfo,\n source,\n };\n }\n\n this.sendEvent(processedEvent, hint);\n return processedEvent;\n })\n .then(null, reason => {\n if (reason instanceof SentryError) {\n throw reason;\n }\n\n this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\n `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: ${reason}`,\n );\n });\n }\n\n /**\n * Occupies the client with processing and event\n */\n _process(promise) {\n this._numProcessing++;\n void promise.then(\n value => {\n this._numProcessing--;\n return value;\n },\n reason => {\n this._numProcessing--;\n return reason;\n },\n );\n }\n\n /**\n * @inheritdoc\n */\n _sendEnvelope(envelope) {\n this.emit('beforeEnvelope', envelope);\n\n if (this._isEnabled() && this._transport) {\n return this._transport.send(envelope).then(null, reason => {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Error while sending event:', reason);\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Transport disabled');\n }\n }\n\n /**\n * Clears outcomes on this client and returns them.\n */\n _clearOutcomes() {\n const outcomes = this._outcomes;\n this._outcomes = {};\n return Object.keys(outcomes).map(key => {\n const [reason, category] = key.split(':') ;\n return {\n reason,\n category,\n quantity: outcomes[key],\n };\n });\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n\n}\n\n/**\n * Verifies that return value of configured `beforeSend` or `beforeSendTransaction` is of expected type, and returns the value if so.\n */\nfunction _validateBeforeSendResult(\n beforeSendResult,\n beforeSendLabel,\n) {\n const invalidValueError = `${beforeSendLabel} must return \\`null\\` or a valid event.`;\n if (isThenable(beforeSendResult)) {\n return beforeSendResult.then(\n event => {\n if (!isPlainObject(event) && event !== null) {\n throw new SentryError(invalidValueError);\n }\n return event;\n },\n e => {\n throw new SentryError(`${beforeSendLabel} rejected with ${e}`);\n },\n );\n } else if (!isPlainObject(beforeSendResult) && beforeSendResult !== null) {\n throw new SentryError(invalidValueError);\n }\n return beforeSendResult;\n}\n\n/**\n * Process the matching `beforeSendXXX` callback.\n */\nfunction processBeforeSend(\n options,\n event,\n hint,\n) {\n const { beforeSend, beforeSendTransaction } = options;\n\n if (isErrorEvent(event) && beforeSend) {\n return beforeSend(event, hint);\n }\n\n if (isTransactionEvent(event) && beforeSendTransaction) {\n return beforeSendTransaction(event, hint);\n }\n\n return event;\n}\n\nfunction isErrorEvent(event) {\n return event.type === undefined;\n}\n\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\nexport { BaseClient };\n//# sourceMappingURL=baseclient.js.map\n","import { createEnvelope } from './envelope.js';\nimport { dateTimestampInSeconds } from './time.js';\n\n/**\n * Creates client report envelope\n * @param discarded_events An array of discard events\n * @param dsn A DSN that can be set on the header. Optional.\n */\nfunction createClientReportEnvelope(\n discarded_events,\n dsn,\n timestamp,\n) {\n const clientReportItem = [\n { type: 'client_report' },\n {\n timestamp: timestamp || dateTimestampInSeconds(),\n discarded_events,\n },\n ];\n return createEnvelope(dsn ? { dsn } : {}, [clientReportItem]);\n}\n\nexport { createClientReportEnvelope };\n//# sourceMappingURL=clientreport.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport { addExceptionMechanism, resolvedSyncPromise, isErrorEvent, isDOMError, isDOMException, addExceptionTypeValue, isError, isPlainObject, isEvent, normalizeToSize, extractExceptionKeysForMessage } from '@sentry/utils';\n\n/**\n * This function creates an exception from a JavaScript Error\n */\nfunction exceptionFromError(stackParser, ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n const frames = parseStackFrames(stackParser, ex);\n\n const exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n\n if (frames.length) {\n exception.stacktrace = { frames };\n }\n\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n\n return exception;\n}\n\n/**\n * @hidden\n */\nfunction eventFromPlainObject(\n stackParser,\n exception,\n syntheticException,\n isUnhandledRejection,\n) {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const normalizeDepth = client && client.getOptions().normalizeDepth;\n\n const event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: getNonErrorObjectExceptionValue(exception, { isUnhandledRejection }),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception, normalizeDepth),\n },\n };\n\n if (syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n // event.exception.values[0] has been set above\n (event.exception ).values[0].stacktrace = { frames };\n }\n }\n\n return event;\n}\n\n/**\n * @hidden\n */\nfunction eventFromError(stackParser, ex) {\n return {\n exception: {\n values: [exceptionFromError(stackParser, ex)],\n },\n };\n}\n\n/** Parses stack frames from an error */\nfunction parseStackFrames(\n stackParser,\n ex,\n) {\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n const stacktrace = ex.stacktrace || ex.stack || '';\n\n const popSize = getPopSize(ex);\n\n try {\n return stackParser(stacktrace, popSize);\n } catch (e) {\n // no-empty\n }\n\n return [];\n}\n\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nconst reactMinifiedRegexp = /Minified React error #\\d+;/i;\n\nfunction getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n\n return 0;\n}\n\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n const message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n\n/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nfunction eventFromException(\n stackParser,\n exception,\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = 'error';\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * Builds and Event from a Message\n * @hidden\n */\nfunction eventFromMessage(\n stackParser,\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n attachStacktrace,\n) {\n const syntheticException = (hint && hint.syntheticException) || undefined;\n const event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n\n/**\n * @hidden\n */\nfunction eventFromUnknownInput(\n stackParser,\n exception,\n syntheticException,\n attachStacktrace,\n isUnhandledRejection,\n) {\n let event;\n\n if (isErrorEvent(exception ) && (exception ).error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n const errorEvent = exception ;\n return eventFromError(stackParser, errorEvent.error );\n }\n\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception )) {\n const domException = exception ;\n\n if ('stack' in (exception )) {\n event = eventFromError(stackParser, exception );\n } else {\n const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n const message = domException.message ? `${name}: ${domException.message}` : name;\n event = eventFromString(stackParser, message, syntheticException, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n // eslint-disable-next-line deprecation/deprecation\n event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };\n }\n\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(stackParser, exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n const objectException = exception ;\n event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);\n addExceptionTypeValue(event, `${exception}`, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n\n return event;\n}\n\n/**\n * @hidden\n */\nfunction eventFromString(\n stackParser,\n input,\n syntheticException,\n attachStacktrace,\n) {\n const event = {\n message: input,\n };\n\n if (attachStacktrace && syntheticException) {\n const frames = parseStackFrames(stackParser, syntheticException);\n if (frames.length) {\n event.exception = {\n values: [{ value: input, stacktrace: { frames } }],\n };\n }\n }\n\n return event;\n}\n\nfunction getNonErrorObjectExceptionValue(\n exception,\n { isUnhandledRejection },\n) {\n const keys = extractExceptionKeysForMessage(exception);\n const captureType = isUnhandledRejection ? 'promise rejection' : 'exception';\n\n // Some ErrorEvent instances do not have an `error` property, which is why they are not handled before\n // We still want to try to get a decent message for these cases\n if (isErrorEvent(exception)) {\n return `Event \\`ErrorEvent\\` captured as ${captureType} with message \\`${exception.message}\\``;\n }\n\n if (isEvent(exception)) {\n const className = getObjectClassName(exception);\n return `Event \\`${className}\\` (type=${exception.type}) captured as ${captureType}`;\n }\n\n return `Object captured as ${captureType} with keys: ${keys}`;\n}\n\nfunction getObjectClassName(obj) {\n try {\n const prototype = Object.getPrototypeOf(obj);\n return prototype ? prototype.constructor.name : undefined;\n } catch (e) {\n // ignore errors here\n }\n}\n\nexport { eventFromError, eventFromException, eventFromMessage, eventFromPlainObject, eventFromString, eventFromUnknownInput, exceptionFromError, parseStackFrames };\n//# sourceMappingURL=eventbuilder.js.map\n","import { withScope, captureException } from '@sentry/core';\nimport { GLOBAL_OBJ, getOriginalFunction, markFunctionWrapped, addNonEnumerableProperty, addExceptionTypeValue, addExceptionMechanism } from '@sentry/utils';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nlet ignoreOnError = 0;\n\n/**\n * @hidden\n */\nfunction shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n\n/**\n * @hidden\n */\nfunction ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError++;\n setTimeout(() => {\n ignoreOnError--;\n });\n}\n\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always\n * has a correct `this` context.\n * @returns The wrapped function.\n * @hidden\n */\nfunction wrap(\n fn,\n options\n\n = {},\n before,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) {\n // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n\n if (typeof fn !== 'function') {\n return fn;\n }\n\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n const wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\n }\n } catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n\n /* eslint-disable prefer-rest-params */\n // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`\n const sentryWrapped = function () {\n const args = Array.prototype.slice.call(arguments);\n\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n const wrappedArguments = args.map((arg) => wrap(arg, options));\n\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n } catch (ex) {\n ignoreNextOnError();\n\n withScope((scope) => {\n scope.addEventProcessor((event) => {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n\n event.extra = {\n ...event.extra,\n arguments: args,\n };\n\n return event;\n });\n\n captureException(ex);\n });\n\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\n\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (const property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\n\n // Restore original function name (not all browsers allow that)\n try {\n const descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') ;\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get() {\n return fn.name;\n },\n });\n }\n // eslint-disable-next-line no-empty\n } catch (_oO) {}\n\n return sentryWrapped;\n}\n\n/**\n * All properties the report dialog supports\n */\n\nexport { WINDOW, ignoreNextOnError, shouldIgnoreOnError, wrap };\n//# sourceMappingURL=helpers.js.map\n","import { dsnToString, createEnvelope } from '@sentry/utils';\n\n/**\n * Creates an envelope from a user feedback.\n */\nfunction createUserFeedbackEnvelope(\n feedback,\n {\n metadata,\n tunnel,\n dsn,\n }\n\n,\n) {\n const headers = {\n event_id: feedback.event_id,\n sent_at: new Date().toISOString(),\n ...(metadata &&\n metadata.sdk && {\n sdk: {\n name: metadata.sdk.name,\n version: metadata.sdk.version,\n },\n }),\n ...(!!tunnel && !!dsn && { dsn: dsnToString(dsn) }),\n };\n const item = createUserFeedbackEnvelopeItem(feedback);\n\n return createEnvelope(headers, [item]);\n}\n\nfunction createUserFeedbackEnvelopeItem(feedback) {\n const feedbackHeaders = {\n type: 'user_report',\n };\n return [feedbackHeaders, feedback];\n}\n\nexport { createUserFeedbackEnvelope };\n//# sourceMappingURL=userfeedback.js.map\n","import { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getSDKSource, logger, createClientReportEnvelope, dsnToString } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder.js';\nimport { WINDOW } from './helpers.js';\nimport { createUserFeedbackEnvelope } from './userfeedback.js';\n\n/**\n * Configuration options for the Sentry Browser SDK.\n * @see @sentry/types Options for more information.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nclass BrowserClient extends BaseClient {\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n constructor(options) {\n const sdkSource = WINDOW.SENTRY_SDK_SOURCE || getSDKSource();\n\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: `${sdkSource}:@sentry/browser`,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n\n super(options);\n\n if (options.sendClientReports && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n if (WINDOW.document.visibilityState === 'hidden') {\n this._flushOutcomes();\n }\n });\n }\n }\n\n /**\n * @inheritDoc\n */\n eventFromException(exception, hint) {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\n }\n\n /**\n * @inheritDoc\n */\n eventFromMessage(\n message,\n // eslint-disable-next-line deprecation/deprecation\n level = 'info',\n hint,\n ) {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace);\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n captureUserFeedback(feedback) {\n if (!this._isEnabled()) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('SDK not enabled, will not capture user feedback.');\n return;\n }\n\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this.getSdkMetadata(),\n dsn: this.getDsn(),\n tunnel: this.getOptions().tunnel,\n });\n void this._sendEnvelope(envelope);\n }\n\n /**\n * @inheritDoc\n */\n _prepareEvent(event, hint, scope) {\n event.platform = event.platform || 'javascript';\n return super._prepareEvent(event, hint, scope);\n }\n\n /**\n * Sends client reports as an envelope.\n */\n _flushOutcomes() {\n const outcomes = this._clearOutcomes();\n\n if (outcomes.length === 0) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('No outcomes to send');\n return;\n }\n\n // This is really the only place where we want to check for a DSN and only send outcomes then\n if (!this._dsn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('No dsn provided, will not send outcomes');\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Sending outcomes:', outcomes);\n\n const envelope = createClientReportEnvelope(outcomes, this._options.tunnel && dsnToString(this._dsn));\n void this._sendEnvelope(envelope);\n }\n}\n\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport { addInstrumentationHandler, isString, isPrimitive, isErrorEvent, getLocationHref, logger, addExceptionMechanism } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder.js';\nimport { shouldIgnoreOnError } from '../helpers.js';\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** Global handlers */\nclass GlobalHandlers {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'GlobalHandlers';}\n\n /**\n * @inheritDoc\n */\n\n /** JSDoc */\n\n /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n\n /** JSDoc */\n constructor(options) {\n this.name = GlobalHandlers.id;\n this._options = {\n onerror: true,\n onunhandledrejection: true,\n ...options,\n };\n\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n }\n /**\n * @inheritDoc\n */\n setupOnce() {\n Error.stackTraceLimit = 50;\n const options = this._options;\n\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (const key in options) {\n const installFunc = this._installFunc[key ];\n if (installFunc && options[key ]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key ] = undefined;\n }\n }\n }\n} GlobalHandlers.__initStatic();\n\n/** JSDoc */\nfunction _installGlobalOnErrorHandler() {\n addInstrumentationHandler(\n 'error',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (data) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n const { msg, url, line, column, error } = data;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n\n const event =\n error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(\n eventFromUnknownInput(stackParser, error || msg, undefined, attachStacktrace, false),\n url,\n line,\n column,\n );\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onerror');\n },\n );\n}\n\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler() {\n addInstrumentationHandler(\n 'unhandledrejection',\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (e) => {\n const [hub, stackParser, attachStacktrace] = getHubAndOptions();\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n let error = e;\n\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n } catch (_oO) {\n // no-empty\n }\n\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n\n const event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(stackParser, error, undefined, attachStacktrace, true);\n\n event.level = 'error';\n\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n },\n );\n}\n\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: `Non-Error promise rejection captured with value: ${String(reason)}`,\n },\n ],\n },\n };\n}\n\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(msg, url, line, column) {\n const ERROR_TYPES_RE =\n /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n\n // If 'message' is ErrorEvent, get real message from inside\n let message = isErrorEvent(msg) ? msg.message : msg;\n let name = 'Error';\n\n const groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n\n const event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n const e = (event.exception = event.exception || {});\n // event.exception.values\n const ev = (e.values = e.values || []);\n // event.exception.values[0]\n const ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n const ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n const ev0sf = (ev0s.frames = ev0s.frames || []);\n\n const colno = isNaN(parseInt(column, 10)) ? undefined : column;\n const lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n const filename = isString(url) && url.length > 0 ? url : getLocationHref();\n\n // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno,\n filename,\n function: '?',\n in_app: true,\n lineno,\n });\n }\n\n return event;\n}\n\nfunction globalHandlerLog(type) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Global Handler attached: ${type}`);\n}\n\nfunction addMechanismAndCapture(hub, error, event, type) {\n addExceptionMechanism(event, {\n handled: false,\n type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\n\nfunction getHubAndOptions() {\n const hub = getCurrentHub();\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {\n stackParser: () => [],\n attachStacktrace: false,\n };\n return [hub, options.stackParser, options.attachStacktrace];\n}\n\nexport { GlobalHandlers };\n//# sourceMappingURL=globalhandlers.js.map\n","import { fill, getFunctionName, getOriginalFunction } from '@sentry/utils';\nimport { WINDOW, wrap } from '../helpers.js';\n\nconst DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'BroadcastChannel',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'SharedWorker',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nclass TryCatch {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'TryCatch';}\n\n /**\n * @inheritDoc\n */\n\n /** JSDoc */\n\n /**\n * @inheritDoc\n */\n constructor(options) {\n this.name = TryCatch.id;\n this._options = {\n XMLHttpRequest: true,\n eventTarget: true,\n requestAnimationFrame: true,\n setInterval: true,\n setTimeout: true,\n ...options,\n };\n }\n\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n setupOnce() {\n if (this._options.setTimeout) {\n fill(WINDOW, 'setTimeout', _wrapTimeFunction);\n }\n\n if (this._options.setInterval) {\n fill(WINDOW, 'setInterval', _wrapTimeFunction);\n }\n\n if (this._options.requestAnimationFrame) {\n fill(WINDOW, 'requestAnimationFrame', _wrapRAF);\n }\n\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in WINDOW) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n\n const eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n const eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n }\n} TryCatch.__initStatic();\n\n/** JSDoc */\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( ...args) {\n const originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: false,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n}\n\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n }),\n ]);\n };\n}\n\n/** JSDoc */\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function ( ...args) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const xhr = this;\n const xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n\n xmlHttpRequestProps.forEach(prop => {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fill(xhr, prop, function (original) {\n const wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: false,\n type: 'instrument',\n },\n };\n\n // If Instrument integration has been called before TryCatch, get the name of original function\n const originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n\n return originalSend.apply(this, args);\n };\n}\n\n/** JSDoc */\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const globalObject = WINDOW ;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const proto = globalObject[target] && globalObject[target].prototype;\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n\n fill(proto, 'addEventListener', function (original)\n\n {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n eventName,\n fn,\n options,\n ) {\n try {\n if (typeof fn.handleEvent === 'function') {\n // ESlint disable explanation:\n // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would\n // introduce a bug here, because bind returns a new function that doesn't have our\n // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.\n // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.\n // eslint-disable-next-line @typescript-eslint/unbound-method\n fn.handleEvent = wrap(fn.handleEvent, {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n });\n }\n } catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n\n return original.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n wrap(fn , {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target,\n },\n handled: false,\n type: 'instrument',\n },\n }),\n options,\n ]);\n };\n });\n\n fill(\n proto,\n 'removeEventListener',\n function (\n originalRemoveEventListener,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ) {\n return function (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n eventName,\n fn,\n options,\n ) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n const wrappedEventHandler = fn ;\n try {\n const originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n } catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n },\n );\n}\n\nexport { TryCatch };\n//# sourceMappingURL=trycatch.js.map\n","// Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either\n//\n// a) moving `validSeverityLevels` to `@sentry/types`,\n// b) moving the`SeverityLevel` type here, or\n// c) importing `validSeverityLevels` from here into `@sentry/types`.\n//\n// Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would\n// create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the\n// type, reminding anyone who changes it to change this list also, will have to do.\n\nconst validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];\n\n/**\n * Converts a string-based level into a member of the deprecated {@link Severity} enum.\n *\n * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.\n *\n * @param level String representation of Severity\n * @returns Severity\n */\nfunction severityFromString(level) {\n return severityLevelFromString(level) ;\n}\n\n/**\n * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.\n *\n * @param level String representation of desired `SeverityLevel`.\n * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.\n */\nfunction severityLevelFromString(level) {\n return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') ;\n}\n\nexport { severityFromString, severityLevelFromString, validSeverityLevels };\n//# sourceMappingURL=severity.js.map\n","/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nfunction parseUrl(url) {\n if (!url) {\n return {};\n }\n\n const match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n\n if (!match) {\n return {};\n }\n\n // coerce to undefined values to empty string so we don't get 'undefined'\n const query = match[6] || '';\n const fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n search: query,\n hash: fragment,\n relative: match[5] + query + fragment, // everything minus origin\n };\n}\n\n/**\n * Strip the query string and fragment off of a given URL or path (if present)\n *\n * @param urlPath Full URL or path, including possible query string and/or fragment\n * @returns URL or path without query string or fragment\n */\nfunction stripUrlQueryAndFragment(urlPath) {\n // eslint-disable-next-line no-useless-escape\n return urlPath.split(/[\\?#]/, 1)[0];\n}\n\n/**\n * Returns number of URL segments of a passed string URL.\n */\nfunction getNumberOfUrlSegments(url) {\n // split at '/' or at '\\/' to split regex urls correctly\n return url.split(/\\\\?\\//).filter(s => s.length > 0 && s !== ',').length;\n}\n\n/**\n * Takes a URL object and returns a sanitized string which is safe to use as span description\n * see: https://develop.sentry.dev/sdk/data-handling/#structuring-data\n */\nfunction getSanitizedUrlString(url) {\n const { protocol, host, path } = url;\n\n const filteredHost =\n (host &&\n host\n // Always filter out authority\n .replace(/^.*@/, '[filtered]:[filtered]@')\n // Don't show standard :80 (http) and :443 (https) ports to reduce the noise\n .replace(':80', '')\n .replace(':443', '')) ||\n '';\n\n return `${protocol ? `${protocol}://` : ''}${filteredHost}${path}`;\n}\n\nexport { getNumberOfUrlSegments, getSanitizedUrlString, parseUrl, stripUrlQueryAndFragment };\n//# sourceMappingURL=url.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport { addInstrumentationHandler, getEventDescription, severityLevelFromString, safeJoin, SENTRY_XHR_DATA_KEY, parseUrl, logger, htmlTreeAsString } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\n\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n\n/** maxStringLength gets capped to prevent 100 breadcrumbs exceeding 1MB event payload size */\nconst MAX_ALLOWED_STRING_LENGTH = 1024;\n\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nclass Breadcrumbs {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Breadcrumbs';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Options of the breadcrumbs integration.\n */\n // This field is public, because we use it in the browser client to check if the `sentry` option is enabled.\n\n /**\n * @inheritDoc\n */\n constructor(options) {\n this.name = Breadcrumbs.id;\n this.options = {\n console: true,\n dom: true,\n fetch: true,\n history: true,\n sentry: true,\n xhr: true,\n ...options,\n };\n }\n\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n setupOnce() {\n if (this.options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this.options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this.options.dom));\n }\n if (this.options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this.options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this.options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n if (this.options.sentry) {\n const client = getCurrentHub().getClient();\n client && client.on && client.on('beforeSendEvent', addSentryBreadcrumb);\n }\n }\n} Breadcrumbs.__initStatic();\n\n/**\n * Adds a breadcrumb for Sentry events or transactions if this option is enabled.\n */\nfunction addSentryBreadcrumb(event) {\n getCurrentHub().addBreadcrumb(\n {\n category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n },\n {\n event,\n },\n );\n}\n\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\nfunction _domBreadcrumb(dom) {\n function _innerDomBreadcrumb(handlerData) {\n let target;\n let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n\n let maxStringLength =\n typeof dom === 'object' && typeof dom.maxStringLength === 'number' ? dom.maxStringLength : undefined;\n if (maxStringLength && maxStringLength > MAX_ALLOWED_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `\\`dom.maxStringLength\\` cannot exceed ${MAX_ALLOWED_STRING_LENGTH}, but a value of ${maxStringLength} was configured. Sentry will use ${MAX_ALLOWED_STRING_LENGTH} instead.`,\n );\n maxStringLength = MAX_ALLOWED_STRING_LENGTH;\n }\n\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n const event = handlerData.event ;\n target = _isEvent(event)\n ? htmlTreeAsString(event.target, { keyAttrs, maxStringLength })\n : htmlTreeAsString(event, { keyAttrs, maxStringLength });\n } catch (e) {\n target = '<unknown>';\n }\n\n if (target.length === 0) {\n return;\n }\n\n getCurrentHub().addBreadcrumb(\n {\n category: `ui.${handlerData.name}`,\n message: target,\n },\n {\n event: handlerData.event,\n name: handlerData.name,\n global: handlerData.global,\n },\n );\n }\n\n return _innerDomBreadcrumb;\n}\n\n/**\n * Creates breadcrumbs from console API calls\n */\nfunction _consoleBreadcrumb(handlerData) {\n const breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityLevelFromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = `Assertion failed: ${safeJoin(handlerData.args.slice(1), ' ') || 'console.assert'}`;\n breadcrumb.data.arguments = handlerData.args.slice(1);\n } else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n}\n\n/**\n * Creates breadcrumbs from XHR API calls\n */\nfunction _xhrBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n const sentryXhrData = handlerData.xhr[SENTRY_XHR_DATA_KEY];\n\n // We only capture complete, non-sentry requests\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return;\n }\n\n const { method, url, status_code, body } = sentryXhrData;\n\n const data = {\n method,\n url,\n status_code,\n };\n\n const hint = {\n xhr: handlerData.xhr,\n input: body,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'xhr',\n data,\n type: 'http',\n },\n hint,\n );\n}\n\n/**\n * Creates breadcrumbs from fetch API calls\n */\nfunction _fetchBreadcrumb(handlerData) {\n const { startTimestamp, endTimestamp } = handlerData;\n\n // We only capture complete fetch requests\n if (!endTimestamp) {\n return;\n }\n\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n\n if (handlerData.error) {\n const data = handlerData.fetchData;\n const hint = {\n data: handlerData.error,\n input: handlerData.args,\n startTimestamp,\n endTimestamp,\n };\n\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n level: 'error',\n type: 'http',\n },\n hint,\n );\n } else {\n const data = {\n ...handlerData.fetchData,\n status_code: handlerData.response && handlerData.response.status,\n };\n const hint = {\n input: handlerData.args,\n response: handlerData.response,\n startTimestamp,\n endTimestamp,\n };\n getCurrentHub().addBreadcrumb(\n {\n category: 'fetch',\n data,\n type: 'http',\n },\n hint,\n );\n }\n}\n\n/**\n * Creates breadcrumbs from history API calls\n */\nfunction _historyBreadcrumb(handlerData) {\n let from = handlerData.from;\n let to = handlerData.to;\n const parsedLoc = parseUrl(WINDOW.location.href);\n let parsedFrom = parseUrl(from);\n const parsedTo = parseUrl(to);\n\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from,\n to,\n },\n });\n}\n\nfunction _isEvent(event) {\n return !!event && !!(event ).target;\n}\n\nexport { Breadcrumbs };\n//# sourceMappingURL=breadcrumbs.js.map\n","import { isInstanceOf } from './is.js';\nimport { truncate } from './string.js';\n\n/**\n * Creates exceptions inside `event.exception.values` for errors that are nested on properties based on the `key` parameter.\n */\nfunction applyAggregateErrorsToEvent(\n exceptionFromErrorImplementation,\n parser,\n maxValueLimit = 250,\n key,\n limit,\n event,\n hint,\n) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n // Generally speaking the last item in `event.exception.values` is the exception originating from the original Error\n const originalException =\n event.exception.values.length > 0 ? event.exception.values[event.exception.values.length - 1] : undefined;\n\n // We only create exception grouping if there is an exception in the event.\n if (originalException) {\n event.exception.values = truncateAggregateExceptions(\n aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n hint.originalException ,\n key,\n event.exception.values,\n originalException,\n 0,\n ),\n maxValueLimit,\n );\n }\n}\n\nfunction aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error,\n key,\n prevExceptions,\n exception,\n exceptionId,\n) {\n if (prevExceptions.length >= limit + 1) {\n return prevExceptions;\n }\n\n let newExceptions = [...prevExceptions];\n\n if (isInstanceOf(error[key], Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, error[key]);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, key, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n error[key],\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n\n // This will create exception grouping for AggregateErrors\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/AggregateError\n if (Array.isArray(error.errors)) {\n error.errors.forEach((childError, i) => {\n if (isInstanceOf(childError, Error)) {\n applyExceptionGroupFieldsForParentException(exception, exceptionId);\n const newException = exceptionFromErrorImplementation(parser, childError);\n const newExceptionId = newExceptions.length;\n applyExceptionGroupFieldsForChildException(newException, `errors[${i}]`, newExceptionId, exceptionId);\n newExceptions = aggregateExceptionsFromError(\n exceptionFromErrorImplementation,\n parser,\n limit,\n childError,\n key,\n [newException, ...newExceptions],\n newException,\n newExceptionId,\n );\n }\n });\n }\n\n return newExceptions;\n}\n\nfunction applyExceptionGroupFieldsForParentException(exception, exceptionId) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n is_exception_group: true,\n exception_id: exceptionId,\n };\n}\n\nfunction applyExceptionGroupFieldsForChildException(\n exception,\n source,\n exceptionId,\n parentId,\n) {\n // Don't know if this default makes sense. The protocol requires us to set these values so we pick *some* default.\n exception.mechanism = exception.mechanism || { type: 'generic', handled: true };\n\n exception.mechanism = {\n ...exception.mechanism,\n type: 'chained',\n source,\n exception_id: exceptionId,\n parent_id: parentId,\n };\n}\n\n/**\n * Truncate the message (exception.value) of all exceptions in the event.\n * Because this event processor is ran after `applyClientOptions`,\n * we need to truncate the message of the added exceptions here.\n */\nfunction truncateAggregateExceptions(exceptions, maxValueLength) {\n return exceptions.map(exception => {\n if (exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n return exception;\n });\n}\n\nexport { applyAggregateErrorsToEvent };\n//# sourceMappingURL=aggregate-errors.js.map\n","import { applyAggregateErrorsToEvent } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder.js';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\n/** Adds SDK info to an event. */\nclass LinkedErrors {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'LinkedErrors';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n constructor(options = {}) {\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n\n /** @inheritdoc */\n setupOnce() {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n preprocessEvent(event, hint, client) {\n const options = client.getOptions();\n\n applyAggregateErrorsToEvent(\n exceptionFromError,\n options.stackParser,\n options.maxValueLength,\n this._key,\n this._limit,\n event,\n hint,\n );\n }\n} LinkedErrors.__initStatic();\n\nexport { LinkedErrors };\n//# sourceMappingURL=linkederrors.js.map\n","import { WINDOW } from '../helpers.js';\n\n/** HttpContext integration collects information about HTTP request headers */\nclass HttpContext {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'HttpContext';}\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = HttpContext.id;\n }\n\n /**\n * @inheritDoc\n */\n setupOnce() {\n // noop\n }\n\n /** @inheritDoc */\n preprocessEvent(event) {\n // if none of the information we want exists, don't bother\n if (!WINDOW.navigator && !WINDOW.location && !WINDOW.document) {\n return;\n }\n\n // grab as much info as exists and add it to the event\n const url = (event.request && event.request.url) || (WINDOW.location && WINDOW.location.href);\n const { referrer } = WINDOW.document || {};\n const { userAgent } = WINDOW.navigator || {};\n\n const headers = {\n ...(event.request && event.request.headers),\n ...(referrer && { Referer: referrer }),\n ...(userAgent && { 'User-Agent': userAgent }),\n };\n const request = { ...event.request, ...(url && { url }), headers };\n\n event.request = request;\n }\n} HttpContext.__initStatic();\n\nexport { HttpContext };\n//# sourceMappingURL=httpcontext.js.map\n","import { logger } from '@sentry/utils';\n\n/** Deduplication filter */\nclass Dedupe {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Dedupe';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n constructor() {\n this.name = Dedupe.id;\n }\n\n /** @inheritDoc */\n setupOnce(_addGlobaleventProcessor, _getCurrentHub) {\n // noop\n }\n\n /**\n * @inheritDoc\n */\n processEvent(currentEvent) {\n // We want to ignore any non-error type events, e.g. transactions or replays\n // These should never be deduped, and also not be compared against as _previousEvent.\n if (currentEvent.type) {\n return currentEvent;\n }\n\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, this._previousEvent)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n } catch (_oO) {} // eslint-disable-line no-empty\n\n return (this._previousEvent = currentEvent);\n }\n} Dedupe.__initStatic();\n\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n\n return false;\n}\n\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n const currentMessage = currentEvent.message;\n const previousMessage = previousEvent.message;\n\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n\n if (currentMessage !== previousMessage) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n const previousException = _getExceptionFromEvent(previousEvent);\n const currentException = _getExceptionFromEvent(currentEvent);\n\n if (!previousException || !currentException) {\n return false;\n }\n\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n let currentFrames = _getFramesFromEvent(currentEvent);\n let previousFrames = _getFramesFromEvent(previousEvent);\n\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n\n currentFrames = currentFrames ;\n previousFrames = previousFrames ;\n\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n\n // Otherwise, compare the two\n for (let i = 0; i < previousFrames.length; i++) {\n const frameA = previousFrames[i];\n const frameB = currentFrames[i];\n\n if (\n frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function\n ) {\n return false;\n }\n }\n\n return true;\n}\n\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n let currentFingerprint = currentEvent.fingerprint;\n let previousFingerprint = previousEvent.fingerprint;\n\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n\n currentFingerprint = currentFingerprint ;\n previousFingerprint = previousFingerprint ;\n\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n } catch (_oO) {\n return false;\n }\n}\n\n/** JSDoc */\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n\n/** JSDoc */\nfunction _getFramesFromEvent(event) {\n const exception = event.exception;\n\n if (exception) {\n try {\n // @ts-expect-error Object could be undefined\n return exception.values[0].stacktrace.frames;\n } catch (_oO) {\n return undefined;\n }\n }\n return undefined;\n}\n\nexport { Dedupe };\n//# sourceMappingURL=dedupe.js.map\n","import { createStackParser } from '@sentry/utils';\n\n// global reference to slice\nconst UNKNOWN_FUNCTION = '?';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename, func, lineno, colno) {\n const frame = {\n filename,\n function: func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nconst chrome = line => {\n const parts = chromeRegex.exec(line);\n\n if (parts) {\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nconst chromeStackLineParser = [CHROME_PRIORITY, chrome];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko = line => {\n const parts = geckoREgex.exec(line);\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]);\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nconst geckoStackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs = line => {\n const parts = winjsRegex.exec(line);\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nconst winjsStackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10 = line => {\n const parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nconst opera10StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11 = line => {\n const parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nconst opera11StackLineParser = [OPERA11_PRIORITY, opera11];\n\nconst defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];\n\nconst defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func, filename) => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n\nexport { chromeStackLineParser, defaultStackLineParsers, defaultStackParser, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser };\n//# sourceMappingURL=stack-parsers.js.map\n","import { SentryError } from './error.js';\nimport { rejectedSyncPromise, SyncPromise, resolvedSyncPromise } from './syncpromise.js';\n\n/**\n * Creates an new PromiseBuffer object with the specified limit\n * @param limit max number of promises that can be stored in the buffer\n */\nfunction makePromiseBuffer(limit) {\n const buffer = [];\n\n function isReady() {\n return limit === undefined || buffer.length < limit;\n }\n\n /**\n * Remove a promise from the queue.\n *\n * @param task Can be any PromiseLike<T>\n * @returns Removed promise.\n */\n function remove(task) {\n return buffer.splice(buffer.indexOf(task), 1)[0];\n }\n\n /**\n * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.\n *\n * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:\n * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor\n * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By\n * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer\n * limit check.\n * @returns The original promise.\n */\n function add(taskProducer) {\n if (!isReady()) {\n return rejectedSyncPromise(new SentryError('Not adding Promise because buffer limit was reached.'));\n }\n\n // start the task and add its promise to the queue\n const task = taskProducer();\n if (buffer.indexOf(task) === -1) {\n buffer.push(task);\n }\n void task\n .then(() => remove(task))\n // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`\n // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't\n // have promises, so TS has to polyfill when down-compiling.)\n .then(null, () =>\n remove(task).then(null, () => {\n // We have to add another catch here because `remove()` starts a new promise chain.\n }),\n );\n return task;\n }\n\n /**\n * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or\n * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and\n * `false` otherwise\n */\n function drain(timeout) {\n return new SyncPromise((resolve, reject) => {\n let counter = buffer.length;\n\n if (!counter) {\n return resolve(true);\n }\n\n // wait for `timeout` ms and then resolve to `false` (if not cancelled first)\n const capturedSetTimeout = setTimeout(() => {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n\n // if all promises resolve in time, cancel the timer and resolve to `true`\n buffer.forEach(item => {\n void resolvedSyncPromise(item).then(() => {\n if (!--counter) {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n }\n }, reject);\n });\n });\n }\n\n return {\n $: buffer,\n add,\n drain,\n };\n}\n\nexport { makePromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map\n","// Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend\n\nconst DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds\n\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param header string representation of 'Retry-After' header\n * @param now current unix timestamp\n *\n */\nfunction parseRetryAfterHeader(header, now = Date.now()) {\n const headerDelay = parseInt(`${header}`, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n\n const headerDate = Date.parse(`${header}`);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n\n return DEFAULT_RETRY_AFTER;\n}\n\n/**\n * Gets the time that the given category is disabled until for rate limiting.\n * In case no category-specific limit is set but a general rate limit across all categories is active,\n * that time is returned.\n *\n * @return the time in ms that the category is disabled until or 0 if there's no active rate limit.\n */\nfunction disabledUntil(limits, category) {\n return limits[category] || limits.all || 0;\n}\n\n/**\n * Checks if a category is rate limited\n */\nfunction isRateLimited(limits, category, now = Date.now()) {\n return disabledUntil(limits, category) > now;\n}\n\n/**\n * Update ratelimits from incoming headers.\n *\n * @return the updated RateLimits object.\n */\nfunction updateRateLimits(\n limits,\n { statusCode, headers },\n now = Date.now(),\n) {\n const updatedRateLimits = {\n ...limits,\n };\n\n // \"The name is case-insensitive.\"\n // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get\n const rateLimitHeader = headers && headers['x-sentry-rate-limits'];\n const retryAfterHeader = headers && headers['retry-after'];\n\n if (rateLimitHeader) {\n /**\n * rate limit headers are of the form\n * <header>,<header>,..\n * where each <header> is of the form\n * <retry_after>: <categories>: <scope>: <reason_code>\n * where\n * <retry_after> is a delay in seconds\n * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form\n * <category>;<category>;...\n * <scope> is what's being limited (org, project, or key) - ignored by SDK\n * <reason_code> is an arbitrary string like \"org_quota\" - ignored by SDK\n */\n for (const limit of rateLimitHeader.trim().split(',')) {\n const [retryAfter, categories] = limit.split(':', 2);\n const headerDelay = parseInt(retryAfter, 10);\n const delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default\n if (!categories) {\n updatedRateLimits.all = now + delay;\n } else {\n for (const category of categories.split(';')) {\n updatedRateLimits[category] = now + delay;\n }\n }\n }\n } else if (retryAfterHeader) {\n updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);\n } else if (statusCode === 429) {\n updatedRateLimits.all = now + 60 * 1000;\n }\n\n return updatedRateLimits;\n}\n\nexport { DEFAULT_RETRY_AFTER, disabledUntil, isRateLimited, parseRetryAfterHeader, updateRateLimits };\n//# sourceMappingURL=ratelimit.js.map\n","import { makePromiseBuffer, forEachEnvelopeItem, envelopeItemTypeToDataCategory, isRateLimited, resolvedSyncPromise, createEnvelope, SentryError, logger, serializeEnvelope, updateRateLimits } from '@sentry/utils';\n\nconst DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n\n/**\n * Creates an instance of a Sentry `Transport`\n *\n * @param options\n * @param makeRequest\n */\nfunction createTransport(\n options,\n makeRequest,\n buffer = makePromiseBuffer(\n options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE,\n ),\n) {\n let rateLimits = {};\n const flush = (timeout) => buffer.drain(timeout);\n\n function send(envelope) {\n const filteredEnvelopeItems = [];\n\n // Drop rate limited items from envelope\n forEachEnvelopeItem(envelope, (item, type) => {\n const envelopeItemDataCategory = envelopeItemTypeToDataCategory(type);\n if (isRateLimited(rateLimits, envelopeItemDataCategory)) {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory, event);\n } else {\n filteredEnvelopeItems.push(item);\n }\n });\n\n // Skip sending if envelope is empty after filtering out rate limited events\n if (filteredEnvelopeItems.length === 0) {\n return resolvedSyncPromise();\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const filteredEnvelope = createEnvelope(envelope[0], filteredEnvelopeItems );\n\n // Creates client report for each item in an envelope\n const recordEnvelopeLoss = (reason) => {\n forEachEnvelopeItem(filteredEnvelope, (item, type) => {\n const event = getEventForEnvelopeItem(item, type);\n options.recordDroppedEvent(reason, envelopeItemTypeToDataCategory(type), event);\n });\n };\n\n const requestTask = () =>\n makeRequest({ body: serializeEnvelope(filteredEnvelope, options.textEncoder) }).then(\n response => {\n // We don't want to throw on NOK responses, but we want to at least log them\n if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);\n }\n\n rateLimits = updateRateLimits(rateLimits, response);\n return response;\n },\n error => {\n recordEnvelopeLoss('network_error');\n throw error;\n },\n );\n\n return buffer.add(requestTask).then(\n result => result,\n error => {\n if (error instanceof SentryError) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Skipped sending event because buffer is full.');\n recordEnvelopeLoss('queue_overflow');\n return resolvedSyncPromise();\n } else {\n throw error;\n }\n },\n );\n }\n\n // We use this to identifify if the transport is the base transport\n // TODO (v8): Remove this again as we'll no longer need it\n send.__sentry__baseTransport__ = true;\n\n return {\n send,\n flush,\n };\n}\n\nfunction getEventForEnvelopeItem(item, type) {\n if (type !== 'event' && type !== 'transaction') {\n return undefined;\n }\n\n return Array.isArray(item) ? (item )[1] : undefined;\n}\n\nexport { DEFAULT_TRANSPORT_BUFFER_SIZE, createTransport };\n//# sourceMappingURL=base.js.map\n","import { isNativeFetch, logger } from '@sentry/utils';\nimport { WINDOW } from '../helpers.js';\n\nlet cachedFetchImpl = undefined;\n\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nfunction getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n\n /* eslint-disable @typescript-eslint/unbound-method */\n\n // Fast path to avoid DOM I/O\n if (isNativeFetch(WINDOW.fetch)) {\n return (cachedFetchImpl = WINDOW.fetch.bind(WINDOW));\n }\n\n const document = WINDOW.document;\n let fetchImpl = WINDOW.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n const sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n const contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n\n return (cachedFetchImpl = fetchImpl.bind(WINDOW));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n\n/** Clears cached fetch impl */\nfunction clearCachedFetchImplementation() {\n cachedFetchImpl = undefined;\n}\n\nexport { clearCachedFetchImplementation, getNativeFetchImplementation };\n//# sourceMappingURL=utils.js.map\n","import { createTransport } from '@sentry/core';\nimport { rejectedSyncPromise } from '@sentry/utils';\nimport { getNativeFetchImplementation, clearCachedFetchImplementation } from './utils.js';\n\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nfunction makeFetchTransport(\n options,\n nativeFetch = getNativeFetchImplementation(),\n) {\n let pendingBodySize = 0;\n let pendingCount = 0;\n\n function makeRequest(request) {\n const requestSize = request.body.length;\n pendingBodySize += requestSize;\n pendingCount++;\n\n const requestOptions = {\n body: request.body,\n method: 'POST',\n referrerPolicy: 'origin',\n headers: options.headers,\n // Outgoing requests are usually cancelled when navigating to a different page, causing a \"TypeError: Failed to\n // fetch\" error and sending a \"network_error\" client-outcome - in Chrome, the request status shows \"(cancelled)\".\n // The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're\n // frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).\n // Gotchas:\n // - `keepalive` isn't supported by Firefox\n // - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):\n // If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.\n // We will therefore only activate the flag when we're below that limit.\n // There is also a limit of requests that can be open at the same time, so we also limit this to 15\n // See https://github.com/getsentry/sentry-javascript/pull/7553 for details\n keepalive: pendingBodySize <= 60000 && pendingCount < 15,\n ...options.fetchOptions,\n };\n\n try {\n return nativeFetch(options.url, requestOptions).then(response => {\n pendingBodySize -= requestSize;\n pendingCount--;\n return {\n statusCode: response.status,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n };\n });\n } catch (e) {\n clearCachedFetchImplementation();\n pendingBodySize -= requestSize;\n pendingCount--;\n return rejectedSyncPromise(e);\n }\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeFetchTransport };\n//# sourceMappingURL=fetch.js.map\n","import { createTransport } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\n\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nconst XHR_READYSTATE_DONE = 4;\n\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nfunction makeXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n\n xhr.onerror = reject;\n\n xhr.onreadystatechange = () => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n resolve({\n statusCode: xhr.status,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n });\n }\n };\n\n xhr.open('POST', options.url);\n\n for (const header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n\n xhr.send(request.body);\n });\n }\n\n return createTransport(options, makeRequest);\n}\n\nexport { makeXHRTransport };\n//# sourceMappingURL=xhr.js.map\n","import { Integrations, getIntegrationsToSetup, initAndBind, getReportDialogEndpoint, getCurrentHub } from '@sentry/core';\nimport { stackParserFromStackParserOptions, supportsFetch, logger, addInstrumentationHandler } from '@sentry/utils';\nimport { BrowserClient } from './client.js';\nimport { WINDOW, wrap as wrap$1 } from './helpers.js';\nimport { GlobalHandlers } from './integrations/globalhandlers.js';\nimport { TryCatch } from './integrations/trycatch.js';\nimport { Breadcrumbs } from './integrations/breadcrumbs.js';\nimport { LinkedErrors } from './integrations/linkederrors.js';\nimport { HttpContext } from './integrations/httpcontext.js';\nimport { Dedupe } from './integrations/dedupe.js';\nimport { defaultStackParser } from './stack-parsers.js';\nimport { makeFetchTransport } from './transports/fetch.js';\nimport { makeXHRTransport } from './transports/xhr.js';\n\nconst defaultIntegrations = [\n new Integrations.InboundFilters(),\n new Integrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new Dedupe(),\n new HttpContext(),\n];\n\n/**\n * A magic string that build tooling can leverage in order to inject a release value into the SDK.\n */\n\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nfunction init(options = {}) {\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value\n if (typeof __SENTRY_RELEASE__ === 'string') {\n options.release = __SENTRY_RELEASE__;\n }\n\n // This supports the variable that sentry-webpack-plugin injects\n if (WINDOW.SENTRY_RELEASE && WINDOW.SENTRY_RELEASE.id) {\n options.release = WINDOW.SENTRY_RELEASE.id;\n }\n }\n if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n\n const clientOptions = {\n ...options,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup(options),\n transport: options.transport || (supportsFetch() ? makeFetchTransport : makeXHRTransport),\n };\n\n initAndBind(BrowserClient, clientOptions);\n\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\n}\n\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nfunction showReportDialog(options = {}, hub = getCurrentHub()) {\n // doesn't work without a document (React Native)\n if (!WINDOW.document) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Global document not defined in showReportDialog call');\n return;\n }\n\n const { client, scope } = hub.getStackTop();\n const dsn = options.dsn || (client && client.getDsn());\n if (!dsn) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('DSN not configured for showReportDialog call');\n return;\n }\n\n if (scope) {\n options.user = {\n ...scope.getUser(),\n ...options.user,\n };\n }\n\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n\n const script = WINDOW.document.createElement('script');\n script.async = true;\n script.crossOrigin = 'anonymous';\n script.src = getReportDialogEndpoint(dsn, options);\n\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n\n const injectionPoint = WINDOW.document.head || WINDOW.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Not injecting report dialog. No injection point found in HTML');\n }\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction forceLoad() {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nfunction onLoad(callback) {\n callback();\n}\n\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @deprecated This function will be removed in v8.\n * It is not part of Sentry's official API and it's easily replaceable by using a try/catch block\n * and calling Sentry.captureException.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\n// TODO(v8): Remove this function\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction wrap(fn) {\n return wrap$1(fn)();\n}\n\nfunction startSessionOnHub(hub) {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n if (typeof WINDOW.document === 'undefined') {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n\n const hub = getCurrentHub();\n\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', ({ from, to }) => {\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n\n/**\n * Captures user feedback and sends it to Sentry.\n */\nfunction captureUserFeedback(feedback) {\n const client = getCurrentHub().getClient();\n if (client) {\n client.captureUserFeedback(feedback);\n }\n}\n\nexport { captureUserFeedback, defaultIntegrations, forceLoad, init, onLoad, showReportDialog, wrap };\n//# sourceMappingURL=sdk.js.map\n","import { SDK_VERSION, init as init$1 } from '@sentry/browser';\n\n/**\n * Inits the React SDK\n */\nfunction init(options) {\n const opts = {\n _metadata: {} ,\n ...options,\n };\n\n opts._metadata.sdk = opts._metadata.sdk || {\n name: 'sentry.javascript.react',\n packages: [\n {\n name: 'npm:@sentry/react',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n init$1(opts);\n}\n\nexport { init };\n//# sourceMappingURL=sdk.js.map\n","import { isString } from './is.js';\nimport { logger } from './logger.js';\n\nconst BAGGAGE_HEADER_NAME = 'baggage';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';\n\nconst SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;\n\n/**\n * Max length of a serialized baggage string\n *\n * https://www.w3.org/TR/baggage/#limits\n */\nconst MAX_BAGGAGE_STRING_LENGTH = 8192;\n\n/**\n * Takes a baggage header and turns it into Dynamic Sampling Context, by extracting all the \"sentry-\" prefixed values\n * from it.\n *\n * @param baggageHeader A very bread definition of a baggage header as it might appear in various frameworks.\n * @returns The Dynamic Sampling Context that was found on `baggageHeader`, if there was any, `undefined` otherwise.\n */\nfunction baggageHeaderToDynamicSamplingContext(\n // Very liberal definition of what any incoming header might look like\n baggageHeader,\n) {\n if (!isString(baggageHeader) && !Array.isArray(baggageHeader)) {\n return undefined;\n }\n\n // Intermediary object to store baggage key value pairs of incoming baggage headers on.\n // It is later used to read Sentry-DSC-values from.\n let baggageObject = {};\n\n if (Array.isArray(baggageHeader)) {\n // Combine all baggage headers into one object containing the baggage values so we can later read the Sentry-DSC-values from it\n baggageObject = baggageHeader.reduce((acc, curr) => {\n const currBaggageObject = baggageHeaderToObject(curr);\n return {\n ...acc,\n ...currBaggageObject,\n };\n }, {});\n } else {\n // Return undefined if baggage header is an empty string (technically an empty baggage header is not spec conform but\n // this is how we choose to handle it)\n if (!baggageHeader) {\n return undefined;\n }\n\n baggageObject = baggageHeaderToObject(baggageHeader);\n }\n\n // Read all \"sentry-\" prefixed values out of the baggage object and put it onto a dynamic sampling context object.\n const dynamicSamplingContext = Object.entries(baggageObject).reduce((acc, [key, value]) => {\n if (key.match(SENTRY_BAGGAGE_KEY_PREFIX_REGEX)) {\n const nonPrefixedKey = key.slice(SENTRY_BAGGAGE_KEY_PREFIX.length);\n acc[nonPrefixedKey] = value;\n }\n return acc;\n }, {});\n\n // Only return a dynamic sampling context object if there are keys in it.\n // A keyless object means there were no sentry values on the header, which means that there is no DSC.\n if (Object.keys(dynamicSamplingContext).length > 0) {\n return dynamicSamplingContext ;\n } else {\n return undefined;\n }\n}\n\n/**\n * Turns a Dynamic Sampling Object into a baggage header by prefixing all the keys on the object with \"sentry-\".\n *\n * @param dynamicSamplingContext The Dynamic Sampling Context to turn into a header. For convenience and compatibility\n * with the `getDynamicSamplingContext` method on the Transaction class ,this argument can also be `undefined`. If it is\n * `undefined` the function will return `undefined`.\n * @returns a baggage header, created from `dynamicSamplingContext`, or `undefined` either if `dynamicSamplingContext`\n * was `undefined`, or if `dynamicSamplingContext` didn't contain any values.\n */\nfunction dynamicSamplingContextToSentryBaggageHeader(\n // this also takes undefined for convenience and bundle size in other places\n dynamicSamplingContext,\n) {\n if (!dynamicSamplingContext) {\n return undefined;\n }\n\n // Prefix all DSC keys with \"sentry-\" and put them into a new object\n const sentryPrefixedDSC = Object.entries(dynamicSamplingContext).reduce(\n (acc, [dscKey, dscValue]) => {\n if (dscValue) {\n acc[`${SENTRY_BAGGAGE_KEY_PREFIX}${dscKey}`] = dscValue;\n }\n return acc;\n },\n {},\n );\n\n return objectToBaggageHeader(sentryPrefixedDSC);\n}\n\n/**\n * Will parse a baggage header, which is a simple key-value map, into a flat object.\n *\n * @param baggageHeader The baggage header to parse.\n * @returns a flat object containing all the key-value pairs from `baggageHeader`.\n */\nfunction baggageHeaderToObject(baggageHeader) {\n return baggageHeader\n .split(',')\n .map(baggageEntry => baggageEntry.split('=').map(keyOrValue => decodeURIComponent(keyOrValue.trim())))\n .reduce((acc, [key, value]) => {\n acc[key] = value;\n return acc;\n }, {});\n}\n\n/**\n * Turns a flat object (key-value pairs) into a baggage header, which is also just key-value pairs.\n *\n * @param object The object to turn into a baggage header.\n * @returns a baggage header string, or `undefined` if the object didn't have any values, since an empty baggage header\n * is not spec compliant.\n */\nfunction objectToBaggageHeader(object) {\n if (Object.keys(object).length === 0) {\n // An empty baggage header is not spec compliant: We return undefined.\n return undefined;\n }\n\n return Object.entries(object).reduce((baggageHeader, [objectKey, objectValue], currentIndex) => {\n const baggageEntry = `${encodeURIComponent(objectKey)}=${encodeURIComponent(objectValue)}`;\n const newBaggageHeader = currentIndex === 0 ? baggageEntry : `${baggageHeader},${baggageEntry}`;\n if (newBaggageHeader.length > MAX_BAGGAGE_STRING_LENGTH) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `Not adding key: ${objectKey} with val: ${objectValue} to baggage header due to exceeding baggage size limits.`,\n );\n return baggageHeader;\n } else {\n return newBaggageHeader;\n }\n }, '');\n}\n\nexport { BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, baggageHeaderToDynamicSamplingContext, dynamicSamplingContextToSentryBaggageHeader };\n//# sourceMappingURL=baggage.js.map\n","import { baggageHeaderToDynamicSamplingContext } from './baggage.js';\nimport { uuid4 } from './misc.js';\n\nconst TRACEPARENT_REGEXP = new RegExp(\n '^[ \\\\t]*' + // whitespace\n '([0-9a-f]{32})?' + // trace_id\n '-?([0-9a-f]{16})?' + // span_id\n '-?([01])?' + // sampled\n '[ \\\\t]*$', // whitespace\n);\n\n/**\n * Extract transaction context data from a `sentry-trace` header.\n *\n * @param traceparent Traceparent string\n *\n * @returns Object containing data from the header, or undefined if traceparent string is malformed\n */\nfunction extractTraceparentData(traceparent) {\n if (!traceparent) {\n return undefined;\n }\n\n const matches = traceparent.match(TRACEPARENT_REGEXP);\n if (!matches) {\n return undefined;\n }\n\n let parentSampled;\n if (matches[3] === '1') {\n parentSampled = true;\n } else if (matches[3] === '0') {\n parentSampled = false;\n }\n\n return {\n traceId: matches[1],\n parentSampled,\n parentSpanId: matches[2],\n };\n}\n\n/**\n * Create tracing context from incoming headers.\n */\nfunction tracingContextFromHeaders(\n sentryTrace,\n baggage,\n)\n\n {\n const traceparentData = extractTraceparentData(sentryTrace);\n const dynamicSamplingContext = baggageHeaderToDynamicSamplingContext(baggage);\n\n const { traceId, parentSpanId, parentSampled } = traceparentData || {};\n\n const propagationContext = {\n traceId: traceId || uuid4(),\n spanId: uuid4().substring(16),\n sampled: parentSampled,\n };\n\n if (parentSpanId) {\n propagationContext.parentSpanId = parentSpanId;\n }\n\n if (dynamicSamplingContext) {\n propagationContext.dsc = dynamicSamplingContext ;\n }\n\n return {\n traceparentData,\n dynamicSamplingContext,\n propagationContext,\n };\n}\n\n/**\n * Create sentry-trace header from span context values.\n */\nfunction generateSentryTraceHeader(\n traceId = uuid4(),\n spanId = uuid4().substring(16),\n sampled,\n) {\n let sampledString = '';\n if (sampled !== undefined) {\n sampledString = sampled ? '-1' : '-0';\n }\n return `${traceId}-${spanId}${sampledString}`;\n}\n\nexport { TRACEPARENT_REGEXP, extractTraceparentData, generateSentryTraceHeader, tracingContextFromHeaders };\n//# sourceMappingURL=tracing.js.map\n","import { uuid4, timestampInSeconds, logger, generateSentryTraceHeader, dropUndefinedKeys } from '@sentry/utils';\n\n/**\n * Keeps track of finished spans for a given transaction\n * @internal\n * @hideconstructor\n * @hidden\n */\nclass SpanRecorder {\n\n constructor(maxlen = 1000) {\n this._maxlen = maxlen;\n this.spans = [];\n }\n\n /**\n * This is just so that we don't run out of memory while recording a lot\n * of spans. At some point we just stop and flush out the start of the\n * trace tree (i.e.the first n spans with the smallest\n * start_timestamp).\n */\n add(span) {\n if (this.spans.length > this._maxlen) {\n span.spanRecorder = undefined;\n } else {\n this.spans.push(span);\n }\n }\n}\n\n/**\n * Span contains all data about a span\n */\nclass Span {\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * Internal keeper of the status\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * Timestamp in seconds when the span was created.\n */\n\n /**\n * Timestamp in seconds when the span ended.\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n\n /**\n * List of spans that were finalized\n */\n\n /**\n * @inheritDoc\n */\n\n /**\n * The instrumenter that created this span.\n */\n\n /**\n * The origin of the span, giving context about what created the span.\n */\n\n /**\n * You should never call the constructor manually, always use `Sentry.startTransaction()`\n * or call `startChild()` on an existing span.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(spanContext = {}) {\n this.traceId = spanContext.traceId || uuid4();\n this.spanId = spanContext.spanId || uuid4().substring(16);\n this.startTimestamp = spanContext.startTimestamp || timestampInSeconds();\n this.tags = spanContext.tags || {};\n this.data = spanContext.data || {};\n this.instrumenter = spanContext.instrumenter || 'sentry';\n this.origin = spanContext.origin || 'manual';\n\n if (spanContext.parentSpanId) {\n this.parentSpanId = spanContext.parentSpanId;\n }\n // We want to include booleans as well here\n if ('sampled' in spanContext) {\n this.sampled = spanContext.sampled;\n }\n if (spanContext.op) {\n this.op = spanContext.op;\n }\n if (spanContext.description) {\n this.description = spanContext.description;\n }\n if (spanContext.name) {\n this.description = spanContext.name;\n }\n if (spanContext.status) {\n this.status = spanContext.status;\n }\n if (spanContext.endTimestamp) {\n this.endTimestamp = spanContext.endTimestamp;\n }\n }\n\n /** An alias for `description` of the Span. */\n get name() {\n return this.description || '';\n }\n /** Update the name of the span. */\n set name(name) {\n this.setName(name);\n }\n\n /**\n * @inheritDoc\n */\n startChild(\n spanContext,\n ) {\n const childSpan = new Span({\n ...spanContext,\n parentSpanId: this.spanId,\n sampled: this.sampled,\n traceId: this.traceId,\n });\n\n childSpan.spanRecorder = this.spanRecorder;\n if (childSpan.spanRecorder) {\n childSpan.spanRecorder.add(childSpan);\n }\n\n childSpan.transaction = this.transaction;\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && childSpan.transaction) {\n const opStr = (spanContext && spanContext.op) || '< unknown op >';\n const nameStr = childSpan.transaction.name || '< unknown name >';\n const idStr = childSpan.transaction.spanId;\n\n const logMessage = `[Tracing] Starting '${opStr}' span on transaction '${nameStr}' (${idStr}).`;\n childSpan.transaction.metadata.spanMetadata[childSpan.spanId] = { logMessage };\n logger.log(logMessage);\n }\n\n return childSpan;\n }\n\n /**\n * @inheritDoc\n */\n setTag(key, value) {\n this.tags = { ...this.tags, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n setData(key, value) {\n this.data = { ...this.data, [key]: value };\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setStatus(value) {\n this.status = value;\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setHttpStatus(httpStatus) {\n this.setTag('http.status_code', String(httpStatus));\n this.setData('http.response.status_code', httpStatus);\n const spanStatus = spanStatusfromHttpCode(httpStatus);\n if (spanStatus !== 'unknown_error') {\n this.setStatus(spanStatus);\n }\n return this;\n }\n\n /**\n * @inheritDoc\n */\n setName(name) {\n this.description = name;\n }\n\n /**\n * @inheritDoc\n */\n isSuccess() {\n return this.status === 'ok';\n }\n\n /**\n * @inheritDoc\n */\n finish(endTimestamp) {\n if (\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n // Don't call this for transactions\n this.transaction &&\n this.transaction.spanId !== this.spanId\n ) {\n const { logMessage } = this.transaction.metadata.spanMetadata[this.spanId];\n if (logMessage) {\n logger.log((logMessage ).replace('Starting', 'Finishing'));\n }\n }\n\n this.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n }\n\n /**\n * @inheritDoc\n */\n toTraceparent() {\n return generateSentryTraceHeader(this.traceId, this.spanId, this.sampled);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n return dropUndefinedKeys({\n data: this.data,\n description: this.description,\n endTimestamp: this.endTimestamp,\n op: this.op,\n parentSpanId: this.parentSpanId,\n sampled: this.sampled,\n spanId: this.spanId,\n startTimestamp: this.startTimestamp,\n status: this.status,\n tags: this.tags,\n traceId: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(spanContext) {\n this.data = spanContext.data || {};\n this.description = spanContext.description;\n this.endTimestamp = spanContext.endTimestamp;\n this.op = spanContext.op;\n this.parentSpanId = spanContext.parentSpanId;\n this.sampled = spanContext.sampled;\n this.spanId = spanContext.spanId || this.spanId;\n this.startTimestamp = spanContext.startTimestamp || this.startTimestamp;\n this.status = spanContext.status;\n this.tags = spanContext.tags || {};\n this.traceId = spanContext.traceId || this.traceId;\n\n return this;\n }\n\n /**\n * @inheritDoc\n */\n getTraceContext() {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n trace_id: this.traceId,\n });\n }\n\n /**\n * @inheritDoc\n */\n toJSON()\n\n {\n return dropUndefinedKeys({\n data: Object.keys(this.data).length > 0 ? this.data : undefined,\n description: this.description,\n op: this.op,\n parent_span_id: this.parentSpanId,\n span_id: this.spanId,\n start_timestamp: this.startTimestamp,\n status: this.status,\n tags: Object.keys(this.tags).length > 0 ? this.tags : undefined,\n timestamp: this.endTimestamp,\n trace_id: this.traceId,\n origin: this.origin,\n });\n }\n}\n\n/**\n * Converts a HTTP status code into a {@link SpanStatusType}.\n *\n * @param httpStatus The HTTP response status code.\n * @returns The span status or unknown_error.\n */\nfunction spanStatusfromHttpCode(httpStatus) {\n if (httpStatus < 400 && httpStatus >= 100) {\n return 'ok';\n }\n\n if (httpStatus >= 400 && httpStatus < 500) {\n switch (httpStatus) {\n case 401:\n return 'unauthenticated';\n case 403:\n return 'permission_denied';\n case 404:\n return 'not_found';\n case 409:\n return 'already_exists';\n case 413:\n return 'failed_precondition';\n case 429:\n return 'resource_exhausted';\n default:\n return 'invalid_argument';\n }\n }\n\n if (httpStatus >= 500 && httpStatus < 600) {\n switch (httpStatus) {\n case 501:\n return 'unimplemented';\n case 503:\n return 'unavailable';\n case 504:\n return 'deadline_exceeded';\n default:\n return 'internal_error';\n }\n }\n\n return 'unknown_error';\n}\n\nexport { Span, SpanRecorder, spanStatusfromHttpCode };\n//# sourceMappingURL=span.js.map\n","import { dropUndefinedKeys, logger } from '@sentry/utils';\nimport { getCurrentHub } from '../hub.js';\nimport { getDynamicSamplingContextFromClient } from './dynamicSamplingContext.js';\nimport { Span, SpanRecorder } from './span.js';\n\n/** JSDoc */\nclass Transaction extends Span {\n\n /**\n * The reference to the current hub.\n */\n\n /**\n * This constructor should never be called manually. Those instrumenting tracing should use\n * `Sentry.startTransaction()`, and internal methods should use `hub.startTransaction()`.\n * @internal\n * @hideconstructor\n * @hidden\n */\n constructor(transactionContext, hub) {\n super(transactionContext);\n // We need to delete description since it's set by the Span class constructor\n // but not needed for transactions.\n delete this.description;\n\n this._measurements = {};\n this._contexts = {};\n\n this._hub = hub || getCurrentHub();\n\n this._name = transactionContext.name || '';\n\n this.metadata = {\n source: 'custom',\n ...transactionContext.metadata,\n spanMetadata: {},\n };\n\n this._trimEnd = transactionContext.trimEnd;\n\n // this is because transactions are also spans, and spans have a transaction pointer\n this.transaction = this;\n\n // If Dynamic Sampling Context is provided during the creation of the transaction, we freeze it as it usually means\n // there is incoming Dynamic Sampling Context. (Either through an incoming request, a baggage meta-tag, or other means)\n const incomingDynamicSamplingContext = this.metadata.dynamicSamplingContext;\n if (incomingDynamicSamplingContext) {\n // We shallow copy this in case anything writes to the original reference of the passed in `dynamicSamplingContext`\n this._frozenDynamicSamplingContext = { ...incomingDynamicSamplingContext };\n }\n }\n\n /** Getter for `name` property */\n get name() {\n return this._name;\n }\n\n /** Setter for `name` property, which also sets `source` as custom */\n set name(newName) {\n this.setName(newName);\n }\n\n /**\n * JSDoc\n */\n setName(name, source = 'custom') {\n this._name = name;\n this.metadata.source = source;\n }\n\n /**\n * Attaches SpanRecorder to the span itself\n * @param maxlen maximum number of spans that can be recorded\n */\n initSpanRecorder(maxlen = 1000) {\n if (!this.spanRecorder) {\n this.spanRecorder = new SpanRecorder(maxlen);\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * @inheritDoc\n */\n setContext(key, context) {\n if (context === null) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this._contexts[key];\n } else {\n this._contexts[key] = context;\n }\n }\n\n /**\n * @inheritDoc\n */\n setMeasurement(name, value, unit = '') {\n this._measurements[name] = { value, unit };\n }\n\n /**\n * @inheritDoc\n */\n setMetadata(newMetadata) {\n this.metadata = { ...this.metadata, ...newMetadata };\n }\n\n /**\n * @inheritDoc\n */\n finish(endTimestamp) {\n const transaction = this._finishTransaction(endTimestamp);\n if (!transaction) {\n return undefined;\n }\n return this._hub.captureEvent(transaction);\n }\n\n /**\n * @inheritDoc\n */\n toContext() {\n const spanContext = super.toContext();\n\n return dropUndefinedKeys({\n ...spanContext,\n name: this.name,\n trimEnd: this._trimEnd,\n });\n }\n\n /**\n * @inheritDoc\n */\n updateWithContext(transactionContext) {\n super.updateWithContext(transactionContext);\n\n this.name = transactionContext.name || '';\n\n this._trimEnd = transactionContext.trimEnd;\n\n return this;\n }\n\n /**\n * @inheritdoc\n *\n * @experimental\n */\n getDynamicSamplingContext() {\n if (this._frozenDynamicSamplingContext) {\n return this._frozenDynamicSamplingContext;\n }\n\n const hub = this._hub || getCurrentHub();\n const client = hub.getClient();\n\n if (!client) return {};\n\n const scope = hub.getScope();\n const dsc = getDynamicSamplingContextFromClient(this.traceId, client, scope);\n\n const maybeSampleRate = this.metadata.sampleRate;\n if (maybeSampleRate !== undefined) {\n dsc.sample_rate = `${maybeSampleRate}`;\n }\n\n // We don't want to have a transaction name in the DSC if the source is \"url\" because URLs might contain PII\n const source = this.metadata.source;\n if (source && source !== 'url') {\n dsc.transaction = this.name;\n }\n\n if (this.sampled !== undefined) {\n dsc.sampled = String(this.sampled);\n }\n\n // Uncomment if we want to make DSC immutable\n // this._frozenDynamicSamplingContext = dsc;\n\n return dsc;\n }\n\n /**\n * Override the current hub with a new one.\n * Used if you want another hub to finish the transaction.\n *\n * @internal\n */\n setHub(hub) {\n this._hub = hub;\n }\n\n /**\n * Finish the transaction & prepare the event to send to Sentry.\n */\n _finishTransaction(endTimestamp) {\n // This transaction is already finished, so we should not flush it again.\n if (this.endTimestamp !== undefined) {\n return undefined;\n }\n\n if (!this.name) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Transaction has no name, falling back to `<unlabeled transaction>`.');\n this.name = '<unlabeled transaction>';\n }\n\n // just sets the end timestamp\n super.finish(endTimestamp);\n\n const client = this._hub.getClient();\n if (client && client.emit) {\n client.emit('finishTransaction', this);\n }\n\n if (this.sampled !== true) {\n // At this point if `sampled !== true` we want to discard the transaction.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Discarding transaction because its trace was not chosen to be sampled.');\n\n if (client) {\n client.recordDroppedEvent('sample_rate', 'transaction');\n }\n\n return undefined;\n }\n\n const finishedSpans = this.spanRecorder ? this.spanRecorder.spans.filter(s => s !== this && s.endTimestamp) : [];\n\n if (this._trimEnd && finishedSpans.length > 0) {\n this.endTimestamp = finishedSpans.reduce((prev, current) => {\n if (prev.endTimestamp && current.endTimestamp) {\n return prev.endTimestamp > current.endTimestamp ? prev : current;\n }\n return prev;\n }).endTimestamp;\n }\n\n const metadata = this.metadata;\n\n const transaction = {\n contexts: {\n ...this._contexts,\n // We don't want to override trace context\n trace: this.getTraceContext(),\n },\n spans: finishedSpans,\n start_timestamp: this.startTimestamp,\n tags: this.tags,\n timestamp: this.endTimestamp,\n transaction: this.name,\n type: 'transaction',\n sdkProcessingMetadata: {\n ...metadata,\n dynamicSamplingContext: this.getDynamicSamplingContext(),\n },\n ...(metadata.source && {\n transaction_info: {\n source: metadata.source,\n },\n }),\n };\n\n const hasMeasurements = Object.keys(this._measurements).length > 0;\n\n if (hasMeasurements) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n '[Measurements] Adding measurements to transaction',\n JSON.stringify(this._measurements, undefined, 2),\n );\n transaction.measurements = this._measurements;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`);\n\n return transaction;\n }\n}\n\nexport { Transaction };\n//# sourceMappingURL=transaction.js.map\n","import { logger, timestampInSeconds } from '@sentry/utils';\nimport { SpanRecorder } from './span.js';\nimport { Transaction } from './transaction.js';\n\nconst TRACING_DEFAULTS = {\n idleTimeout: 1000,\n finalTimeout: 30000,\n heartbeatInterval: 5000,\n};\n\nconst FINISH_REASON_TAG = 'finishReason';\n\nconst IDLE_TRANSACTION_FINISH_REASONS = [\n 'heartbeatFailed',\n 'idleTimeout',\n 'documentHidden',\n 'finalTimeout',\n 'externalFinish',\n 'cancelled',\n];\n\n/**\n * @inheritDoc\n */\nclass IdleTransactionSpanRecorder extends SpanRecorder {\n constructor(\n _pushActivity,\n _popActivity,\n transactionSpanId,\n maxlen,\n ) {\n super(maxlen);this._pushActivity = _pushActivity;this._popActivity = _popActivity;this.transactionSpanId = transactionSpanId; }\n\n /**\n * @inheritDoc\n */\n add(span) {\n // We should make sure we do not push and pop activities for\n // the transaction that this span recorder belongs to.\n if (span.spanId !== this.transactionSpanId) {\n // We patch span.finish() to pop an activity after setting an endTimestamp.\n span.finish = (endTimestamp) => {\n span.endTimestamp = typeof endTimestamp === 'number' ? endTimestamp : timestampInSeconds();\n this._popActivity(span.spanId);\n };\n\n // We should only push new activities if the span does not have an end timestamp.\n if (span.endTimestamp === undefined) {\n this._pushActivity(span.spanId);\n }\n }\n\n super.add(span);\n }\n}\n\n/**\n * An IdleTransaction is a transaction that automatically finishes. It does this by tracking child spans as activities.\n * You can have multiple IdleTransactions active, but if the `onScope` option is specified, the idle transaction will\n * put itself on the scope on creation.\n */\nclass IdleTransaction extends Transaction {\n // Activities store a list of active spans\n\n // Track state of activities in previous heartbeat\n\n // Amount of times heartbeat has counted. Will cause transaction to finish after 3 beats.\n\n // We should not use heartbeat if we finished a transaction\n\n // Idle timeout was canceled and we should finish the transaction with the last span end.\n\n /**\n * Timer that tracks Transaction idleTimeout\n */\n\n constructor(\n transactionContext,\n _idleHub,\n /**\n * The time to wait in ms until the idle transaction will be finished. This timer is started each time\n * there are no active spans on this transaction.\n */\n _idleTimeout = TRACING_DEFAULTS.idleTimeout,\n /**\n * The final value in ms that a transaction cannot exceed\n */\n _finalTimeout = TRACING_DEFAULTS.finalTimeout,\n _heartbeatInterval = TRACING_DEFAULTS.heartbeatInterval,\n // Whether or not the transaction should put itself on the scope when it starts and pop itself off when it ends\n _onScope = false,\n ) {\n super(transactionContext, _idleHub);this._idleHub = _idleHub;this._idleTimeout = _idleTimeout;this._finalTimeout = _finalTimeout;this._heartbeatInterval = _heartbeatInterval;this._onScope = _onScope;\n this.activities = {};\n this._heartbeatCounter = 0;\n this._finished = false;\n this._idleTimeoutCanceledPermanently = false;\n this._beforeFinishCallbacks = [];\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[4];\n\n if (_onScope) {\n // We set the transaction here on the scope so error events pick up the trace\n // context and attach it to the error.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`);\n _idleHub.configureScope(scope => scope.setSpan(this));\n }\n\n this._restartIdleTimeout();\n setTimeout(() => {\n if (!this._finished) {\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[3];\n this.finish();\n }\n }, this._finalTimeout);\n }\n\n /** {@inheritDoc} */\n finish(endTimestamp = timestampInSeconds()) {\n this._finished = true;\n this.activities = {};\n\n if (this.op === 'ui.action.click') {\n this.setTag(FINISH_REASON_TAG, this._finishReason);\n }\n\n if (this.spanRecorder) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Tracing] finishing IdleTransaction', new Date(endTimestamp * 1000).toISOString(), this.op);\n\n for (const callback of this._beforeFinishCallbacks) {\n callback(this, endTimestamp);\n }\n\n this.spanRecorder.spans = this.spanRecorder.spans.filter((span) => {\n // If we are dealing with the transaction itself, we just return it\n if (span.spanId === this.spanId) {\n return true;\n }\n\n // We cancel all pending spans with status \"cancelled\" to indicate the idle transaction was finished early\n if (!span.endTimestamp) {\n span.endTimestamp = endTimestamp;\n span.setStatus('cancelled');\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log('[Tracing] cancelling span since transaction ended early', JSON.stringify(span, undefined, 2));\n }\n\n const spanStartedBeforeTransactionFinish = span.startTimestamp < endTimestamp;\n\n // Add a delta with idle timeout so that we prevent false positives\n const timeoutWithMarginOfError = (this._finalTimeout + this._idleTimeout) / 1000;\n const spanEndedBeforeFinalTimeout = span.endTimestamp - this.startTimestamp < timeoutWithMarginOfError;\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n const stringifiedSpan = JSON.stringify(span, undefined, 2);\n if (!spanStartedBeforeTransactionFinish) {\n logger.log('[Tracing] discarding Span since it happened after Transaction was finished', stringifiedSpan);\n } else if (!spanEndedBeforeFinalTimeout) {\n logger.log('[Tracing] discarding Span since it finished after Transaction final timeout', stringifiedSpan);\n }\n }\n\n return spanStartedBeforeTransactionFinish && spanEndedBeforeFinalTimeout;\n });\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] flushing IdleTransaction');\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] No active IdleTransaction');\n }\n\n // if `this._onScope` is `true`, the transaction put itself on the scope when it started\n if (this._onScope) {\n const scope = this._idleHub.getScope();\n if (scope.getTransaction() === this) {\n scope.setSpan(undefined);\n }\n }\n\n return super.finish(endTimestamp);\n }\n\n /**\n * Register a callback function that gets excecuted before the transaction finishes.\n * Useful for cleanup or if you want to add any additional spans based on current context.\n *\n * This is exposed because users have no other way of running something before an idle transaction\n * finishes.\n */\n registerBeforeFinishCallback(callback) {\n this._beforeFinishCallbacks.push(callback);\n }\n\n /**\n * @inheritDoc\n */\n initSpanRecorder(maxlen) {\n if (!this.spanRecorder) {\n const pushActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._pushActivity(id);\n };\n const popActivity = (id) => {\n if (this._finished) {\n return;\n }\n this._popActivity(id);\n };\n\n this.spanRecorder = new IdleTransactionSpanRecorder(pushActivity, popActivity, this.spanId, maxlen);\n\n // Start heartbeat so that transactions do not run forever.\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('Starting heartbeat');\n this._pingHeartbeat();\n }\n this.spanRecorder.add(this);\n }\n\n /**\n * Cancels the existing idle timeout, if there is one.\n * @param restartOnChildSpanChange Default is `true`.\n * If set to false the transaction will end\n * with the last child span.\n */\n cancelIdleTimeout(\n endTimestamp,\n {\n restartOnChildSpanChange,\n }\n\n = {\n restartOnChildSpanChange: true,\n },\n ) {\n this._idleTimeoutCanceledPermanently = restartOnChildSpanChange === false;\n if (this._idleTimeoutID) {\n clearTimeout(this._idleTimeoutID);\n this._idleTimeoutID = undefined;\n\n if (Object.keys(this.activities).length === 0 && this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n }\n }\n }\n\n /**\n * Temporary method used to externally set the transaction's `finishReason`\n *\n * ** WARNING**\n * This is for the purpose of experimentation only and will be removed in the near future, do not use!\n *\n * @internal\n *\n */\n setFinishReason(reason) {\n this._finishReason = reason;\n }\n\n /**\n * Restarts idle timeout, if there is no running idle timeout it will start one.\n */\n _restartIdleTimeout(endTimestamp) {\n this.cancelIdleTimeout();\n this._idleTimeoutID = setTimeout(() => {\n if (!this._finished && Object.keys(this.activities).length === 0) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[1];\n this.finish(endTimestamp);\n }\n }, this._idleTimeout);\n }\n\n /**\n * Start tracking a specific activity.\n * @param spanId The span id that represents the activity\n */\n _pushActivity(spanId) {\n this.cancelIdleTimeout(undefined, { restartOnChildSpanChange: !this._idleTimeoutCanceledPermanently });\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] pushActivity: ${spanId}`);\n this.activities[spanId] = true;\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n /**\n * Remove an activity from usage\n * @param spanId The span id that represents the activity\n */\n _popActivity(spanId) {\n if (this.activities[spanId]) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] popActivity ${spanId}`);\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete this.activities[spanId];\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] new activities count', Object.keys(this.activities).length);\n }\n\n if (Object.keys(this.activities).length === 0) {\n const endTimestamp = timestampInSeconds();\n if (this._idleTimeoutCanceledPermanently) {\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[5];\n this.finish(endTimestamp);\n } else {\n // We need to add the timeout here to have the real endtimestamp of the transaction\n // Remember timestampInSeconds is in seconds, timeout is in ms\n this._restartIdleTimeout(endTimestamp + this._idleTimeout / 1000);\n }\n }\n }\n\n /**\n * Checks when entries of this.activities are not changing for 3 beats.\n * If this occurs we finish the transaction.\n */\n _beat() {\n // We should not be running heartbeat if the idle transaction is finished.\n if (this._finished) {\n return;\n }\n\n const heartbeatString = Object.keys(this.activities).join('');\n\n if (heartbeatString === this._prevHeartbeatString) {\n this._heartbeatCounter++;\n } else {\n this._heartbeatCounter = 1;\n }\n\n this._prevHeartbeatString = heartbeatString;\n\n if (this._heartbeatCounter >= 3) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Transaction finished because of no change for 3 heart beats');\n this.setStatus('deadline_exceeded');\n this._finishReason = IDLE_TRANSACTION_FINISH_REASONS[0];\n this.finish();\n } else {\n this._pingHeartbeat();\n }\n }\n\n /**\n * Pings the heartbeat\n */\n _pingHeartbeat() {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`);\n setTimeout(() => {\n this._beat();\n }, this._heartbeatInterval);\n }\n}\n\nexport { IdleTransaction, IdleTransactionSpanRecorder, TRACING_DEFAULTS };\n//# sourceMappingURL=idletransaction.js.map\n","import { getCurrentHub } from '../hub.js';\nexport { TRACEPARENT_REGEXP, extractTraceparentData, stripUrlQueryAndFragment } from '@sentry/utils';\n\n/** Grabs active transaction off scope, if any */\nfunction getActiveTransaction(maybeHub) {\n const hub = maybeHub || getCurrentHub();\n const scope = hub.getScope();\n return scope.getTransaction() ;\n}\n\nexport { getActiveTransaction };\n//# sourceMappingURL=utils.js.map\n","import { addInstrumentationHandler, logger } from '@sentry/utils';\nimport { getActiveTransaction } from './utils.js';\n\nlet errorsInstrumented = false;\n\n/**\n * Configures global error listeners\n */\nfunction registerErrorInstrumentation() {\n if (errorsInstrumented) {\n return;\n }\n\n errorsInstrumented = true;\n addInstrumentationHandler('error', errorCallback);\n addInstrumentationHandler('unhandledrejection', errorCallback);\n}\n\n/**\n * If an error or unhandled promise occurs, we mark the active transaction as failed\n */\nfunction errorCallback() {\n const activeTransaction = getActiveTransaction();\n if (activeTransaction) {\n const status = 'internal_error';\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Transaction: ${status} -> Global error occured`);\n activeTransaction.setStatus(status);\n }\n}\n\n// The function name will be lost when bundling but we need to be able to identify this listener later to maintain the\n// node.js default exit behaviour\nerrorCallback.tag = 'sentry_tracingErrorCallback';\n\nexport { registerErrorInstrumentation };\n//# sourceMappingURL=errors.js.map\n","import { logger, isNaN } from '@sentry/utils';\nimport { hasTracingEnabled } from '../utils/hasTracingEnabled.js';\n\n/**\n * Makes a sampling decision for the given transaction and stores it on the transaction.\n *\n * Called every time a transaction is created. Only transactions which emerge with a `sampled` value of `true` will be\n * sent to Sentry.\n *\n * This method muttes the given `transaction` and will set the `sampled` value on it.\n * It returns the same transaction, for convenience.\n */\nfunction sampleTransaction(\n transaction,\n options,\n samplingContext,\n) {\n // nothing to do if tracing is not enabled\n if (!hasTracingEnabled(options)) {\n transaction.sampled = false;\n return transaction;\n }\n\n // if the user has forced a sampling decision by passing a `sampled` value in their transaction context, go with that\n if (transaction.sampled !== undefined) {\n transaction.setMetadata({\n sampleRate: Number(transaction.sampled),\n });\n return transaction;\n }\n\n // we would have bailed already if neither `tracesSampler` nor `tracesSampleRate` nor `enableTracing` were defined, so one of these should\n // work; prefer the hook if so\n let sampleRate;\n if (typeof options.tracesSampler === 'function') {\n sampleRate = options.tracesSampler(samplingContext);\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else if (samplingContext.parentSampled !== undefined) {\n sampleRate = samplingContext.parentSampled;\n } else if (typeof options.tracesSampleRate !== 'undefined') {\n sampleRate = options.tracesSampleRate;\n transaction.setMetadata({\n sampleRate: Number(sampleRate),\n });\n } else {\n // When `enableTracing === true`, we use a sample rate of 100%\n sampleRate = 1;\n transaction.setMetadata({\n sampleRate,\n });\n }\n\n // Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The\n // only valid values are booleans or numbers between 0 and 1.)\n if (!isValidSampleRate(sampleRate)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Tracing] Discarding transaction because of invalid sample rate.');\n transaction.sampled = false;\n return transaction;\n }\n\n // if the function returned 0 (or false), or if `tracesSampleRate` is 0, it's a sign the transaction should be dropped\n if (!sampleRate) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Discarding transaction because ${\n typeof options.tracesSampler === 'function'\n ? 'tracesSampler returned 0 or false'\n : 'a negative sampling decision was inherited or tracesSampleRate is set to 0'\n }`,\n );\n transaction.sampled = false;\n return transaction;\n }\n\n // Now we roll the dice. Math.random is inclusive of 0, but not of 1, so strict < is safe here. In case sampleRate is\n // a boolean, the < comparison will cause it to be automatically cast to 1 if it's true and 0 if it's false.\n transaction.sampled = Math.random() < (sampleRate );\n\n // if we're not going to keep it, we're done\n if (!transaction.sampled) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(\n sampleRate,\n )})`,\n );\n return transaction;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] starting ${transaction.op} transaction - ${transaction.name}`);\n return transaction;\n}\n\n/**\n * Checks the given sample rate to make sure it is valid type and value (a boolean, or a number between 0 and 1).\n */\nfunction isValidSampleRate(rate) {\n // we need to check NaN explicitly because it's of type 'number' and therefore wouldn't get caught by this typecheck\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (isNaN(rate) || !(typeof rate === 'number' || typeof rate === 'boolean')) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(\n rate,\n )} of type ${JSON.stringify(typeof rate)}.`,\n );\n return false;\n }\n\n // in case sampleRate is a boolean, it will get automatically cast to 1 if it's true and 0 if it's false\n if (rate < 0 || rate > 1) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${rate}.`);\n return false;\n }\n return true;\n}\n\nexport { sampleTransaction };\n//# sourceMappingURL=sampling.js.map\n","import { logger } from '@sentry/utils';\nimport { getMainCarrier } from '../hub.js';\nimport { registerErrorInstrumentation } from './errors.js';\nimport { IdleTransaction } from './idletransaction.js';\nimport { sampleTransaction } from './sampling.js';\nimport { Transaction } from './transaction.js';\n\n/** Returns all trace headers that are currently on the top scope. */\nfunction traceHeaders() {\n const scope = this.getScope();\n const span = scope.getSpan();\n\n return span\n ? {\n 'sentry-trace': span.toTraceparent(),\n }\n : {};\n}\n\n/**\n * Creates a new transaction and adds a sampling decision if it doesn't yet have one.\n *\n * The Hub.startTransaction method delegates to this method to do its work, passing the Hub instance in as `this`, as if\n * it had been called on the hub directly. Exists as a separate function so that it can be injected into the class as an\n * \"extension method.\"\n *\n * @param this: The Hub starting the transaction\n * @param transactionContext: Data used to configure the transaction\n * @param CustomSamplingContext: Optional data to be provided to the `tracesSampler` function (if any)\n *\n * @returns The new transaction\n *\n * @see {@link Hub.startTransaction}\n */\nfunction _startTransaction(\n\n transactionContext,\n customSamplingContext,\n) {\n const client = this.getClient();\n const options = (client && client.getOptions()) || {};\n\n const configInstrumenter = options.instrumenter || 'sentry';\n const transactionInstrumenter = transactionContext.instrumenter || 'sentry';\n\n if (configInstrumenter !== transactionInstrumenter) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `A transaction was started with instrumenter=\\`${transactionInstrumenter}\\`, but the SDK is configured with the \\`${configInstrumenter}\\` instrumenter.\nThe transaction will not be sampled. Please use the ${configInstrumenter} instrumentation to start transactions.`,\n );\n\n transactionContext.sampled = false;\n }\n\n let transaction = new Transaction(transactionContext, this);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Create new idle transaction.\n */\nfunction startIdleTransaction(\n hub,\n transactionContext,\n idleTimeout,\n finalTimeout,\n onScope,\n customSamplingContext,\n heartbeatInterval,\n) {\n const client = hub.getClient();\n const options = (client && client.getOptions()) || {};\n\n let transaction = new IdleTransaction(transactionContext, hub, idleTimeout, finalTimeout, heartbeatInterval, onScope);\n transaction = sampleTransaction(transaction, options, {\n parentSampled: transactionContext.parentSampled,\n transactionContext,\n ...customSamplingContext,\n });\n if (transaction.sampled) {\n transaction.initSpanRecorder(options._experiments && (options._experiments.maxSpans ));\n }\n if (client && client.emit) {\n client.emit('startTransaction', transaction);\n }\n return transaction;\n}\n\n/**\n * Adds tracing extensions to the global hub.\n */\nfunction addTracingExtensions() {\n const carrier = getMainCarrier();\n if (!carrier.__SENTRY__) {\n return;\n }\n carrier.__SENTRY__.extensions = carrier.__SENTRY__.extensions || {};\n if (!carrier.__SENTRY__.extensions.startTransaction) {\n carrier.__SENTRY__.extensions.startTransaction = _startTransaction;\n }\n if (!carrier.__SENTRY__.extensions.traceHeaders) {\n carrier.__SENTRY__.extensions.traceHeaders = traceHeaders;\n }\n\n registerErrorInstrumentation();\n}\n\nexport { addTracingExtensions, startIdleTransaction };\n//# sourceMappingURL=hubextensions.js.map\n","import { GLOBAL_OBJ } from '@sentry/utils';\n\nconst WINDOW = GLOBAL_OBJ ;\n\nexport { WINDOW };\n//# sourceMappingURL=types.js.map\n","import { getActiveTransaction } from '@sentry/core';\nimport { logger } from '@sentry/utils';\nimport { WINDOW } from './types.js';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nfunction registerBackgroundTabDetection() {\n if (WINDOW && WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeTransaction = getActiveTransaction() ;\n if (WINDOW.document.hidden && activeTransaction) {\n const statusType = 'cancelled';\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(\n `[Tracing] Transaction: ${statusType} -> since tab moved to the background, op: ${activeTransaction.op}`,\n );\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!activeTransaction.status) {\n activeTransaction.setStatus(statusType);\n }\n activeTransaction.setTag('visibilitychange', 'document.hidden');\n activeTransaction.finish();\n }\n });\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n\nexport { registerBackgroundTabDetection };\n//# sourceMappingURL=backgroundtab.js.map\n","const bindReporter = (\n callback,\n metric,\n reportAllChanges,\n) => {\n let prevValue;\n let delta;\n return (forceReport) => {\n if (metric.value >= 0) {\n if (forceReport || reportAllChanges) {\n delta = metric.value - (prevValue || 0);\n\n // Report the metric if there's a non-zero delta or if no previous\n // value exists (which can happen in the case of the document becoming\n // hidden when the metric value is 0).\n // See: https://github.com/GoogleChrome/web-vitals/issues/14\n if (delta || prevValue === undefined) {\n prevValue = metric.value;\n metric.delta = delta;\n callback(metric);\n }\n }\n }\n };\n};\n\nexport { bindReporter };\n//# sourceMappingURL=bindReporter.js.map\n","/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Performantly generate a unique, 30-char string by combining a version\n * number, the current timestamp with a 13-digit number integer.\n * @return {string}\n */\nconst generateUniqueID = () => {\n return `v3-${Date.now()}-${Math.floor(Math.random() * (9e12 - 1)) + 1e12}`;\n};\n\nexport { generateUniqueID };\n//# sourceMappingURL=generateUniqueID.js.map\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getNavigationEntryFromPerformanceTiming = () => {\n // eslint-disable-next-line deprecation/deprecation\n const timing = WINDOW.performance.timing;\n // eslint-disable-next-line deprecation/deprecation\n const type = WINDOW.performance.navigation.type;\n\n const navigationEntry = {\n entryType: 'navigation',\n startTime: 0,\n type: type == 2 ? 'back_forward' : type === 1 ? 'reload' : 'navigate',\n };\n\n for (const key in timing) {\n if (key !== 'navigationStart' && key !== 'toJSON') {\n // eslint-disable-next-line deprecation/deprecation\n navigationEntry[key] = Math.max((timing[key ] ) - timing.navigationStart, 0);\n }\n }\n return navigationEntry ;\n};\n\nconst getNavigationEntry = () => {\n if (WINDOW.__WEB_VITALS_POLYFILL__) {\n return (\n WINDOW.performance &&\n ((performance.getEntriesByType && performance.getEntriesByType('navigation')[0]) ||\n getNavigationEntryFromPerformanceTiming())\n );\n } else {\n return WINDOW.performance && performance.getEntriesByType && performance.getEntriesByType('navigation')[0];\n }\n};\n\nexport { getNavigationEntry };\n//# sourceMappingURL=getNavigationEntry.js.map\n","import { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2022 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst getActivationStart = () => {\n const navEntry = getNavigationEntry();\n return (navEntry && navEntry.activationStart) || 0;\n};\n\nexport { getActivationStart };\n//# sourceMappingURL=getActivationStart.js.map\n","import { WINDOW } from '../../types.js';\nimport { generateUniqueID } from './generateUniqueID.js';\nimport { getActivationStart } from './getActivationStart.js';\nimport { getNavigationEntry } from './getNavigationEntry.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst initMetric = (name, value) => {\n const navEntry = getNavigationEntry();\n let navigationType = 'navigate';\n\n if (navEntry) {\n if (WINDOW.document.prerendering || getActivationStart() > 0) {\n navigationType = 'prerender';\n } else {\n navigationType = navEntry.type.replace(/_/g, '-') ;\n }\n }\n\n return {\n name,\n value: typeof value === 'undefined' ? -1 : value,\n rating: 'good', // Will be updated if the value changes.\n delta: 0,\n entries: [],\n id: generateUniqueID(),\n navigationType,\n };\n};\n\nexport { initMetric };\n//# sourceMappingURL=initMetric.js.map\n","/**\n * Takes a performance entry type and a callback function, and creates a\n * `PerformanceObserver` instance that will observe the specified entry type\n * with buffering enabled and call the callback _for each entry_.\n *\n * This function also feature-detects entry support and wraps the logic in a\n * try/catch to avoid errors in unsupporting browsers.\n */\nconst observe = (\n type,\n callback,\n opts,\n) => {\n try {\n if (PerformanceObserver.supportedEntryTypes.includes(type)) {\n const po = new PerformanceObserver(list => {\n callback(list.getEntries() );\n });\n po.observe(\n Object.assign(\n {\n type,\n buffered: true,\n },\n opts || {},\n ) ,\n );\n return po;\n }\n } catch (e) {\n // Do nothing.\n }\n return;\n};\n\nexport { observe };\n//# sourceMappingURL=observe.js.map\n","import { WINDOW } from '../../types.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst onHidden = (cb, once) => {\n const onHiddenOrPageHide = (event) => {\n if (event.type === 'pagehide' || WINDOW.document.visibilityState === 'hidden') {\n cb(event);\n if (once) {\n removeEventListener('visibilitychange', onHiddenOrPageHide, true);\n removeEventListener('pagehide', onHiddenOrPageHide, true);\n }\n }\n };\n addEventListener('visibilitychange', onHiddenOrPageHide, true);\n // Some browsers have buggy implementations of visibilitychange,\n // so we use pagehide in addition, just to be safe.\n addEventListener('pagehide', onHiddenOrPageHide, true);\n};\n\nexport { onHidden };\n//# sourceMappingURL=onHidden.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [CLS](https://web.dev/cls/) value for the current page and\n * calls the `callback` function once the value is ready to be reported, along\n * with all `layout-shift` performance entries that were used in the metric\n * value calculation. The reported value is a `double` (corresponding to a\n * [layout shift score](https://web.dev/cls/#layout-shift-score)).\n *\n * If the `reportAllChanges` configuration option is set to `true`, the\n * `callback` function will be called as soon as the value is initially\n * determined as well as any time the value changes throughout the page\n * lifespan.\n *\n * _**Important:** CLS should be continually monitored for changes throughout\n * the entire lifespan of a page—including if the user returns to the page after\n * it's been hidden/backgrounded. However, since browsers often [will not fire\n * additional callbacks once the user has backgrounded a\n * page](https://developer.chrome.com/blog/page-lifecycle-api/#advice-hidden),\n * `callback` is always called when the page's visibility state changes to\n * hidden. As a result, the `callback` function might be called multiple times\n * during the same page load._\n */\nconst onCLS = (onReport) => {\n const metric = initMetric('CLS', 0);\n let report;\n\n let sessionValue = 0;\n let sessionEntries = [];\n\n // const handleEntries = (entries: Metric['entries']) => {\n const handleEntries = (entries) => {\n entries.forEach(entry => {\n // Only count layout shifts without recent user input.\n if (!entry.hadRecentInput) {\n const firstSessionEntry = sessionEntries[0];\n const lastSessionEntry = sessionEntries[sessionEntries.length - 1];\n\n // If the entry occurred less than 1 second after the previous entry and\n // less than 5 seconds after the first entry in the session, include the\n // entry in the current session. Otherwise, start a new session.\n if (\n sessionValue &&\n sessionEntries.length !== 0 &&\n entry.startTime - lastSessionEntry.startTime < 1000 &&\n entry.startTime - firstSessionEntry.startTime < 5000\n ) {\n sessionValue += entry.value;\n sessionEntries.push(entry);\n } else {\n sessionValue = entry.value;\n sessionEntries = [entry];\n }\n\n // If the current session value is larger than the current CLS value,\n // update CLS and the entries contributing to it.\n if (sessionValue > metric.value) {\n metric.value = sessionValue;\n metric.entries = sessionEntries;\n if (report) {\n report();\n }\n }\n }\n });\n };\n\n const po = observe('layout-shift', handleEntries);\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = () => {\n handleEntries(po.takeRecords() );\n report(true);\n };\n\n onHidden(stopListening);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onCLS };\n//# sourceMappingURL=getCLS.js.map\n","import { WINDOW } from '../../types.js';\nimport { onHidden } from './onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nlet firstHiddenTime = -1;\n\nconst initHiddenTime = () => {\n // If the document is hidden and not prerendering, assume it was always\n // hidden and the page was loaded in the background.\n return WINDOW.document.visibilityState === 'hidden' && !WINDOW.document.prerendering ? 0 : Infinity;\n};\n\nconst trackChanges = () => {\n // Update the time if/when the document becomes hidden.\n onHidden(({ timeStamp }) => {\n firstHiddenTime = timeStamp;\n }, true);\n};\n\nconst getVisibilityWatcher = (\n\n) => {\n if (firstHiddenTime < 0) {\n // If the document is hidden when this code runs, assume it was hidden\n // since navigation start. This isn't a perfect heuristic, but it's the\n // best we can do until an API is available to support querying past\n // visibilityState.\n firstHiddenTime = initHiddenTime();\n trackChanges();\n }\n return {\n get firstHiddenTime() {\n return firstHiddenTime;\n },\n };\n};\n\nexport { getVisibilityWatcher };\n//# sourceMappingURL=getVisibilityWatcher.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Calculates the [FID](https://web.dev/fid/) value for the current page and\n * calls the `callback` function once the value is ready, along with the\n * relevant `first-input` performance entry used to determine the value. The\n * reported value is a `DOMHighResTimeStamp`.\n *\n * _**Important:** since FID is only reported after the user interacts with the\n * page, it's possible that it will not be reported for some page loads._\n */\nconst onFID = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('FID');\n // eslint-disable-next-line prefer-const\n let report;\n\n const handleEntry = (entry) => {\n // Only report if the page wasn't hidden prior to the first input.\n if (entry.startTime < visibilityWatcher.firstHiddenTime) {\n metric.value = entry.processingStart - entry.startTime;\n metric.entries.push(entry);\n report(true);\n }\n };\n\n const handleEntries = (entries) => {\n (entries ).forEach(handleEntry);\n };\n\n const po = observe('first-input', handleEntries);\n report = bindReporter(onReport, metric);\n\n if (po) {\n onHidden(() => {\n handleEntries(po.takeRecords() );\n po.disconnect();\n }, true);\n }\n};\n\nexport { onFID };\n//# sourceMappingURL=getFID.js.map\n","import { bindReporter } from './lib/bindReporter.js';\nimport { getActivationStart } from './lib/getActivationStart.js';\nimport { getVisibilityWatcher } from './lib/getVisibilityWatcher.js';\nimport { initMetric } from './lib/initMetric.js';\nimport { observe } from './lib/observe.js';\nimport { onHidden } from './lib/onHidden.js';\n\n/*\n * Copyright 2020 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nconst reportedMetricIDs = {};\n\n/**\n * Calculates the [LCP](https://web.dev/lcp/) value for the current page and\n * calls the `callback` function once the value is ready (along with the\n * relevant `largest-contentful-paint` performance entry used to determine the\n * value). The reported value is a `DOMHighResTimeStamp`.\n */\nconst onLCP = (onReport) => {\n const visibilityWatcher = getVisibilityWatcher();\n const metric = initMetric('LCP');\n let report;\n\n const handleEntries = (entries) => {\n const lastEntry = entries[entries.length - 1] ;\n if (lastEntry) {\n // The startTime attribute returns the value of the renderTime if it is\n // not 0, and the value of the loadTime otherwise. The activationStart\n // reference is used because LCP should be relative to page activation\n // rather than navigation start if the page was prerendered.\n const value = Math.max(lastEntry.startTime - getActivationStart(), 0);\n\n // Only report if the page wasn't hidden prior to LCP.\n if (value < visibilityWatcher.firstHiddenTime) {\n metric.value = value;\n metric.entries = [lastEntry];\n report();\n }\n }\n };\n\n const po = observe('largest-contentful-paint', handleEntries);\n\n if (po) {\n report = bindReporter(onReport, metric);\n\n const stopListening = () => {\n if (!reportedMetricIDs[metric.id]) {\n handleEntries(po.takeRecords() );\n po.disconnect();\n reportedMetricIDs[metric.id] = true;\n report(true);\n }\n };\n\n // Stop listening after input. Note: while scrolling is an input that\n // stop LCP observation, it's unreliable since it can be programmatically\n // generated. See: https://github.com/GoogleChrome/web-vitals/issues/75\n ['keydown', 'click'].forEach(type => {\n addEventListener(type, stopListening, { once: true, capture: true });\n });\n\n onHidden(stopListening, true);\n\n return stopListening;\n }\n\n return;\n};\n\nexport { onLCP };\n//# sourceMappingURL=getLCP.js.map\n","import { logger, getFunctionName } from '@sentry/utils';\nimport { onCLS } from './web-vitals/getCLS.js';\nimport { onFID } from './web-vitals/getFID.js';\nimport { onLCP } from './web-vitals/getLCP.js';\nimport { observe } from './web-vitals/lib/observe.js';\n\nconst handlers = {};\nconst instrumented = {};\n\nlet _previousCls;\nlet _previousFid;\nlet _previousLcp;\n\n/**\n * Add a callback that will be triggered when a CLS metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addClsInstrumentationHandler(callback) {\n return addMetricObserver('cls', callback, instrumentCls, _previousCls);\n}\n\n/**\n * Add a callback that will be triggered when a LCP metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addLcpInstrumentationHandler(callback) {\n return addMetricObserver('lcp', callback, instrumentLcp, _previousLcp);\n}\n\n/**\n * Add a callback that will be triggered when a FID metric is available.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addFidInstrumentationHandler(callback) {\n return addMetricObserver('fid', callback, instrumentFid, _previousFid);\n}\n\n/**\n * Add a callback that will be triggered when a performance observer is triggered,\n * and receives the entries of the observer.\n * Returns a cleanup callback which can be called to remove the instrumentation handler.\n */\nfunction addPerformanceInstrumentationHandler(\n type,\n callback,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentPerformanceObserver(type);\n instrumented[type] = true;\n }\n\n return getCleanupCallback(type, callback);\n}\n\n/** Trigger all handlers of a given type. */\nfunction triggerHandlers(type, data) {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers || !typeHandlers.length) {\n return;\n }\n\n for (const handler of typeHandlers) {\n try {\n handler(data);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error(\n `Error while triggering instrumentation handler.\\nType: ${type}\\nName: ${getFunctionName(handler)}\\nError:`,\n e,\n );\n }\n }\n}\n\nfunction instrumentCls() {\n onCLS(metric => {\n triggerHandlers('cls', {\n metric,\n });\n _previousCls = metric;\n });\n}\n\nfunction instrumentFid() {\n onFID(metric => {\n triggerHandlers('fid', {\n metric,\n });\n _previousFid = metric;\n });\n}\n\nfunction instrumentLcp() {\n onLCP(metric => {\n triggerHandlers('lcp', {\n metric,\n });\n _previousLcp = metric;\n });\n}\n\nfunction addMetricObserver(\n type,\n callback,\n instrumentFn,\n previousValue,\n) {\n addHandler(type, callback);\n\n if (!instrumented[type]) {\n instrumentFn();\n instrumented[type] = true;\n }\n\n if (previousValue) {\n callback({ metric: previousValue });\n }\n\n return getCleanupCallback(type, callback);\n}\n\nfunction instrumentPerformanceObserver(type) {\n const options = {};\n\n // Special per-type options we want to use\n if (type === 'event') {\n options.durationThreshold = 0;\n }\n\n observe(\n type,\n entries => {\n triggerHandlers(type, { entries });\n },\n options,\n );\n}\n\nfunction addHandler(type, handler) {\n handlers[type] = handlers[type] || [];\n (handlers[type] ).push(handler);\n}\n\n// Get a callback which can be called to remove the instrumentation handler\nfunction getCleanupCallback(type, callback) {\n return () => {\n const typeHandlers = handlers[type];\n\n if (!typeHandlers) {\n return;\n }\n\n const index = typeHandlers.indexOf(callback);\n if (index !== -1) {\n typeHandlers.splice(index, 1);\n }\n };\n}\n\nexport { addClsInstrumentationHandler, addFidInstrumentationHandler, addLcpInstrumentationHandler, addPerformanceInstrumentationHandler };\n//# sourceMappingURL=instrument.js.map\n","/**\n * Checks if a given value is a valid measurement value.\n */\nfunction isMeasurementValue(value) {\n return typeof value === 'number' && isFinite(value);\n}\n\n/**\n * Helper function to start child on transactions. This function will make sure that the transaction will\n * use the start timestamp of the created child span if it is earlier than the transactions actual\n * start timestamp.\n */\nfunction _startChild(transaction, { startTimestamp, ...ctx }) {\n if (startTimestamp && transaction.startTimestamp > startTimestamp) {\n transaction.startTimestamp = startTimestamp;\n }\n\n return transaction.startChild({\n startTimestamp,\n ...ctx,\n });\n}\n\nexport { _startChild, isMeasurementValue };\n//# sourceMappingURL=utils.js.map\n","import { getActiveTransaction } from '@sentry/core';\nimport { browserPerformanceTimeOrigin, htmlTreeAsString, logger } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler, addClsInstrumentationHandler, addLcpInstrumentationHandler, addFidInstrumentationHandler } from '../instrument.js';\nimport { WINDOW } from '../types.js';\nimport { getVisibilityWatcher } from '../web-vitals/lib/getVisibilityWatcher.js';\nimport { _startChild, isMeasurementValue } from './utils.js';\n\n/**\n * Converts from milliseconds to seconds\n * @param time time in ms\n */\nfunction msToSec(time) {\n return time / 1000;\n}\n\nfunction getBrowserPerformanceAPI() {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n return WINDOW && WINDOW.addEventListener && WINDOW.performance;\n}\n\nlet _performanceCursor = 0;\n\nlet _measurements = {};\nlet _lcpEntry;\nlet _clsEntry;\n\n/**\n * Start tracking web vitals\n *\n * @returns A function that forces web vitals collection\n */\nfunction startTrackingWebVitals() {\n const performance = getBrowserPerformanceAPI();\n if (performance && browserPerformanceTimeOrigin) {\n // @ts-expect-error we want to make sure all of these are available, even if TS is sure they are\n if (performance.mark) {\n WINDOW.performance.mark('sentry-tracing-init');\n }\n const fidCallback = _trackFID();\n const clsCallback = _trackCLS();\n const lcpCallback = _trackLCP();\n\n return () => {\n fidCallback();\n clsCallback();\n lcpCallback();\n };\n }\n\n return () => undefined;\n}\n\n/**\n * Start tracking long tasks.\n */\nfunction startTrackingLongTasks() {\n addPerformanceInstrumentationHandler('longtask', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: 'Main UI thread blocked',\n op: 'ui.long-task',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n });\n}\n\n/**\n * Start tracking interaction events.\n */\nfunction startTrackingInteractions() {\n addPerformanceInstrumentationHandler('event', ({ entries }) => {\n for (const entry of entries) {\n const transaction = getActiveTransaction() ;\n if (!transaction) {\n return;\n }\n\n if (entry.name === 'click') {\n const startTime = msToSec((browserPerformanceTimeOrigin ) + entry.startTime);\n const duration = msToSec(entry.duration);\n\n transaction.startChild({\n description: htmlTreeAsString(entry.target),\n op: `ui.interaction.${entry.name}`,\n origin: 'auto.ui.browser.metrics',\n startTimestamp: startTime,\n endTimestamp: startTime + duration,\n });\n }\n }\n });\n}\n\n/** Starts tracking the Cumulative Layout Shift on the current page. */\nfunction _trackCLS() {\n return addClsInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding CLS');\n _measurements['cls'] = { value: metric.value, unit: '' };\n _clsEntry = entry ;\n });\n}\n\n/** Starts tracking the Largest Contentful Paint on the current page. */\nfunction _trackLCP() {\n return addLcpInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP');\n _measurements['lcp'] = { value: metric.value, unit: 'millisecond' };\n _lcpEntry = entry ;\n });\n}\n\n/** Starts tracking the First Input Delay on the current page. */\nfunction _trackFID() {\n return addFidInstrumentationHandler(({ metric }) => {\n const entry = metric.entries.pop();\n if (!entry) {\n return;\n }\n\n const timeOrigin = msToSec(browserPerformanceTimeOrigin );\n const startTime = msToSec(entry.startTime);\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FID');\n _measurements['fid'] = { value: metric.value, unit: 'millisecond' };\n _measurements['mark.fid'] = { value: timeOrigin + startTime, unit: 'second' };\n });\n}\n\n/** Add performance related spans to a transaction */\nfunction addPerformanceEntries(transaction) {\n const performance = getBrowserPerformanceAPI();\n if (!performance || !WINDOW.performance.getEntries || !browserPerformanceTimeOrigin) {\n // Gatekeeper if performance API not available\n return;\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Tracing] Adding & adjusting spans using Performance API');\n const timeOrigin = msToSec(browserPerformanceTimeOrigin);\n\n const performanceEntries = performance.getEntries();\n\n let responseStartTimestamp;\n let requestStartTimestamp;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n performanceEntries.slice(_performanceCursor).forEach((entry) => {\n const startTime = msToSec(entry.startTime);\n const duration = msToSec(entry.duration);\n\n if (transaction.op === 'navigation' && timeOrigin + startTime < transaction.startTimestamp) {\n return;\n }\n\n switch (entry.entryType) {\n case 'navigation': {\n _addNavigationSpans(transaction, entry, timeOrigin);\n responseStartTimestamp = timeOrigin + msToSec(entry.responseStart);\n requestStartTimestamp = timeOrigin + msToSec(entry.requestStart);\n break;\n }\n case 'mark':\n case 'paint':\n case 'measure': {\n _addMeasureSpans(transaction, entry, startTime, duration, timeOrigin);\n\n // capture web vitals\n const firstHidden = getVisibilityWatcher();\n // Only report if the page wasn't hidden prior to the web vital.\n const shouldRecord = entry.startTime < firstHidden.firstHiddenTime;\n\n if (entry.name === 'first-paint' && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FP');\n _measurements['fp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n if (entry.name === 'first-contentful-paint' && shouldRecord) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding FCP');\n _measurements['fcp'] = { value: entry.startTime, unit: 'millisecond' };\n }\n break;\n }\n case 'resource': {\n const resourceName = (entry.name ).replace(WINDOW.location.origin, '');\n _addResourceSpans(transaction, entry, resourceName, startTime, duration, timeOrigin);\n break;\n }\n // Ignore other entry types.\n }\n });\n\n _performanceCursor = Math.max(performanceEntries.length - 1, 0);\n\n _trackNavigator(transaction);\n\n // Measurements are only available for pageload transactions\n if (transaction.op === 'pageload') {\n // Generate TTFB (Time to First Byte), which measured as the time between the beginning of the transaction and the\n // start of the response in milliseconds\n if (typeof responseStartTimestamp === 'number') {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding TTFB');\n _measurements['ttfb'] = {\n value: (responseStartTimestamp - transaction.startTimestamp) * 1000,\n unit: 'millisecond',\n };\n\n if (typeof requestStartTimestamp === 'number' && requestStartTimestamp <= responseStartTimestamp) {\n // Capture the time spent making the request and receiving the first byte of the response.\n // This is the time between the start of the request and the start of the response in milliseconds.\n _measurements['ttfb.requestTime'] = {\n value: (responseStartTimestamp - requestStartTimestamp) * 1000,\n unit: 'millisecond',\n };\n }\n }\n\n ['fcp', 'fp', 'lcp'].forEach(name => {\n if (!_measurements[name] || timeOrigin >= transaction.startTimestamp) {\n return;\n }\n // The web vitals, fcp, fp, lcp, and ttfb, all measure relative to timeOrigin.\n // Unfortunately, timeOrigin is not captured within the transaction span data, so these web vitals will need\n // to be adjusted to be relative to transaction.startTimestamp.\n const oldValue = _measurements[name].value;\n const measurementTimestamp = timeOrigin + msToSec(oldValue);\n\n // normalizedValue should be in milliseconds\n const normalizedValue = Math.abs((measurementTimestamp - transaction.startTimestamp) * 1000);\n const delta = normalizedValue - oldValue;\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(`[Measurements] Normalized ${name} from ${oldValue} to ${normalizedValue} (${delta})`);\n _measurements[name].value = normalizedValue;\n });\n\n const fidMark = _measurements['mark.fid'];\n if (fidMark && _measurements['fid']) {\n // create span for FID\n _startChild(transaction, {\n description: 'first input delay',\n endTimestamp: fidMark.value + msToSec(_measurements['fid'].value),\n op: 'ui.action',\n origin: 'auto.ui.browser.metrics',\n startTimestamp: fidMark.value,\n });\n\n // Delete mark.fid as we don't want it to be part of final payload\n delete _measurements['mark.fid'];\n }\n\n // If FCP is not recorded we should not record the cls value\n // according to the new definition of CLS.\n if (!('fcp' in _measurements)) {\n delete _measurements.cls;\n }\n\n Object.keys(_measurements).forEach(measurementName => {\n transaction.setMeasurement(\n measurementName,\n _measurements[measurementName].value,\n _measurements[measurementName].unit,\n );\n });\n\n _tagMetricInfo(transaction);\n }\n\n _lcpEntry = undefined;\n _clsEntry = undefined;\n _measurements = {};\n}\n\n/** Create measure related spans */\nfunction _addMeasureSpans(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n startTime,\n duration,\n timeOrigin,\n) {\n const measureStartTimestamp = timeOrigin + startTime;\n const measureEndTimestamp = measureStartTimestamp + duration;\n\n _startChild(transaction, {\n description: entry.name ,\n endTimestamp: measureEndTimestamp,\n op: entry.entryType ,\n origin: 'auto.resource.browser.metrics',\n startTimestamp: measureStartTimestamp,\n });\n\n return measureStartTimestamp;\n}\n\n/** Instrument navigation entries */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addNavigationSpans(transaction, entry, timeOrigin) {\n ['unloadEvent', 'redirect', 'domContentLoadedEvent', 'loadEvent', 'connect'].forEach(event => {\n _addPerformanceNavigationTiming(transaction, entry, event, timeOrigin);\n });\n _addPerformanceNavigationTiming(transaction, entry, 'secureConnection', timeOrigin, 'TLS/SSL', 'connectEnd');\n _addPerformanceNavigationTiming(transaction, entry, 'fetch', timeOrigin, 'cache', 'domainLookupStart');\n _addPerformanceNavigationTiming(transaction, entry, 'domainLookup', timeOrigin, 'DNS');\n _addRequest(transaction, entry, timeOrigin);\n}\n\n/** Create performance navigation related spans */\nfunction _addPerformanceNavigationTiming(\n transaction,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n entry,\n event,\n timeOrigin,\n description,\n eventEnd,\n) {\n const end = eventEnd ? (entry[eventEnd] ) : (entry[`${event}End`] );\n const start = entry[`${event}Start`] ;\n if (!start || !end) {\n return;\n }\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: description || event,\n startTimestamp: timeOrigin + msToSec(start),\n endTimestamp: timeOrigin + msToSec(end),\n });\n}\n\n/** Create request and response related spans */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _addRequest(transaction, entry, timeOrigin) {\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'request',\n startTimestamp: timeOrigin + msToSec(entry.requestStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n\n _startChild(transaction, {\n op: 'browser',\n origin: 'auto.browser.browser.metrics',\n description: 'response',\n startTimestamp: timeOrigin + msToSec(entry.responseStart ),\n endTimestamp: timeOrigin + msToSec(entry.responseEnd ),\n });\n}\n\n/** Create resource-related spans */\nfunction _addResourceSpans(\n transaction,\n entry,\n resourceName,\n startTime,\n duration,\n timeOrigin,\n) {\n // we already instrument based on fetch and xhr, so we don't need to\n // duplicate spans here.\n if (entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch') {\n return;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const data = {};\n if ('transferSize' in entry) {\n data['http.response_transfer_size'] = entry.transferSize;\n }\n if ('encodedBodySize' in entry) {\n data['http.response_content_length'] = entry.encodedBodySize;\n }\n if ('decodedBodySize' in entry) {\n data['http.decoded_response_content_length'] = entry.decodedBodySize;\n }\n if ('renderBlockingStatus' in entry) {\n data['resource.render_blocking_status'] = entry.renderBlockingStatus;\n }\n\n const startTimestamp = timeOrigin + startTime;\n const endTimestamp = startTimestamp + duration;\n\n _startChild(transaction, {\n description: resourceName,\n endTimestamp,\n op: entry.initiatorType ? `resource.${entry.initiatorType}` : 'resource.other',\n origin: 'auto.resource.browser.metrics',\n startTimestamp,\n data,\n });\n}\n\n/**\n * Capture the information of the user agent.\n */\nfunction _trackNavigator(transaction) {\n const navigator = WINDOW.navigator ;\n if (!navigator) {\n return;\n }\n\n // track network connectivity\n const connection = navigator.connection;\n if (connection) {\n if (connection.effectiveType) {\n transaction.setTag('effectiveConnectionType', connection.effectiveType);\n }\n\n if (connection.type) {\n transaction.setTag('connectionType', connection.type);\n }\n\n if (isMeasurementValue(connection.rtt)) {\n _measurements['connection.rtt'] = { value: connection.rtt, unit: 'millisecond' };\n }\n }\n\n if (isMeasurementValue(navigator.deviceMemory)) {\n transaction.setTag('deviceMemory', `${navigator.deviceMemory} GB`);\n }\n\n if (isMeasurementValue(navigator.hardwareConcurrency)) {\n transaction.setTag('hardwareConcurrency', String(navigator.hardwareConcurrency));\n }\n}\n\n/** Add LCP / CLS data to transaction to allow debugging */\nfunction _tagMetricInfo(transaction) {\n if (_lcpEntry) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding LCP Data');\n\n // Capture Properties of the LCP element that contributes to the LCP.\n\n if (_lcpEntry.element) {\n transaction.setTag('lcp.element', htmlTreeAsString(_lcpEntry.element));\n }\n\n if (_lcpEntry.id) {\n transaction.setTag('lcp.id', _lcpEntry.id);\n }\n\n if (_lcpEntry.url) {\n // Trim URL to the first 200 characters.\n transaction.setTag('lcp.url', _lcpEntry.url.trim().slice(0, 200));\n }\n\n transaction.setTag('lcp.size', _lcpEntry.size);\n }\n\n // See: https://developer.mozilla.org/en-US/docs/Web/API/LayoutShift\n if (_clsEntry && _clsEntry.sources) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Measurements] Adding CLS Data');\n _clsEntry.sources.forEach((source, index) =>\n transaction.setTag(`cls.source.${index + 1}`, htmlTreeAsString(source.node)),\n );\n }\n}\n\nexport { _addMeasureSpans, _addResourceSpans, addPerformanceEntries, startTrackingInteractions, startTrackingLongTasks, startTrackingWebVitals };\n//# sourceMappingURL=index.js.map\n","import { hasTracingEnabled, getCurrentHub, getDynamicSamplingContextFromClient } from '@sentry/core';\nimport { addInstrumentationHandler, generateSentryTraceHeader, dynamicSamplingContextToSentryBaggageHeader, isInstanceOf, BAGGAGE_HEADER_NAME, SENTRY_XHR_DATA_KEY, browserPerformanceTimeOrigin, stringMatchesSomePattern } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler } from './instrument.js';\n\n/* eslint-disable max-lines */\n\nconst DEFAULT_TRACE_PROPAGATION_TARGETS = ['localhost', /^\\/(?!\\/)/];\n\n/** Options for Request Instrumentation */\n\nconst defaultRequestInstrumentationOptions = {\n traceFetch: true,\n traceXHR: true,\n enableHTTPTimings: true,\n // TODO (v8): Remove this property\n tracingOrigins: DEFAULT_TRACE_PROPAGATION_TARGETS,\n tracePropagationTargets: DEFAULT_TRACE_PROPAGATION_TARGETS,\n};\n\n/** Registers span creators for xhr and fetch requests */\nfunction instrumentOutgoingRequests(_options) {\n const {\n traceFetch,\n traceXHR,\n // eslint-disable-next-line deprecation/deprecation\n tracePropagationTargets,\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n } = {\n traceFetch: defaultRequestInstrumentationOptions.traceFetch,\n traceXHR: defaultRequestInstrumentationOptions.traceXHR,\n ..._options,\n };\n\n const shouldCreateSpan =\n typeof shouldCreateSpanForRequest === 'function' ? shouldCreateSpanForRequest : (_) => true;\n\n // TODO(v8) Remove tracingOrigins here\n // The only reason we're passing it in here is because this instrumentOutgoingRequests function is publicly exported\n // and we don't want to break the API. We can remove it in v8.\n const shouldAttachHeadersWithTargets = (url) =>\n shouldAttachHeaders(url, tracePropagationTargets || tracingOrigins);\n\n const spans = {};\n\n if (traceFetch) {\n addInstrumentationHandler('fetch', (handlerData) => {\n const createdSpan = fetchCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n\n if (traceXHR) {\n addInstrumentationHandler('xhr', (handlerData) => {\n const createdSpan = xhrCallback(handlerData, shouldCreateSpan, shouldAttachHeadersWithTargets, spans);\n if (enableHTTPTimings && createdSpan) {\n addHTTPTimings(createdSpan);\n }\n });\n }\n}\n\nfunction isPerformanceResourceTiming(entry) {\n return (\n entry.entryType === 'resource' &&\n 'initiatorType' in entry &&\n typeof (entry ).nextHopProtocol === 'string' &&\n (entry.initiatorType === 'fetch' || entry.initiatorType === 'xmlhttprequest')\n );\n}\n\n/**\n * Creates a temporary observer to listen to the next fetch/xhr resourcing timings,\n * so that when timings hit their per-browser limit they don't need to be removed.\n *\n * @param span A span that has yet to be finished, must contain `url` on data.\n */\nfunction addHTTPTimings(span) {\n const url = span.data.url;\n\n if (!url) {\n return;\n }\n\n const cleanup = addPerformanceInstrumentationHandler('resource', ({ entries }) => {\n entries.forEach(entry => {\n if (isPerformanceResourceTiming(entry) && entry.name.endsWith(url)) {\n const spanData = resourceTimingEntryToSpanData(entry);\n spanData.forEach(data => span.setData(...data));\n // In the next tick, clean this handler up\n // We have to wait here because otherwise this cleans itself up before it is fully done\n setTimeout(cleanup);\n }\n });\n });\n}\n\n/**\n * Converts ALPN protocol ids to name and version.\n *\n * (https://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#alpn-protocol-ids)\n * @param nextHopProtocol PerformanceResourceTiming.nextHopProtocol\n */\nfunction extractNetworkProtocol(nextHopProtocol) {\n let name = 'unknown';\n let version = 'unknown';\n let _name = '';\n for (const char of nextHopProtocol) {\n // http/1.1 etc.\n if (char === '/') {\n [name, version] = nextHopProtocol.split('/');\n break;\n }\n // h2, h3 etc.\n if (!isNaN(Number(char))) {\n name = _name === 'h' ? 'http' : _name;\n version = nextHopProtocol.split(_name)[1];\n break;\n }\n _name += char;\n }\n if (_name === nextHopProtocol) {\n // webrtc, ftp, etc.\n name = _name;\n }\n return { name, version };\n}\n\nfunction getAbsoluteTime(time = 0) {\n return ((browserPerformanceTimeOrigin || performance.timeOrigin) + time) / 1000;\n}\n\nfunction resourceTimingEntryToSpanData(resourceTiming) {\n const { name, version } = extractNetworkProtocol(resourceTiming.nextHopProtocol);\n\n const timingSpanData = [];\n\n timingSpanData.push(['network.protocol.version', version], ['network.protocol.name', name]);\n\n if (!browserPerformanceTimeOrigin) {\n return timingSpanData;\n }\n return [\n ...timingSpanData,\n ['http.request.redirect_start', getAbsoluteTime(resourceTiming.redirectStart)],\n ['http.request.fetch_start', getAbsoluteTime(resourceTiming.fetchStart)],\n ['http.request.domain_lookup_start', getAbsoluteTime(resourceTiming.domainLookupStart)],\n ['http.request.domain_lookup_end', getAbsoluteTime(resourceTiming.domainLookupEnd)],\n ['http.request.connect_start', getAbsoluteTime(resourceTiming.connectStart)],\n ['http.request.secure_connection_start', getAbsoluteTime(resourceTiming.secureConnectionStart)],\n ['http.request.connection_end', getAbsoluteTime(resourceTiming.connectEnd)],\n ['http.request.request_start', getAbsoluteTime(resourceTiming.requestStart)],\n ['http.request.response_start', getAbsoluteTime(resourceTiming.responseStart)],\n ['http.request.response_end', getAbsoluteTime(resourceTiming.responseEnd)],\n ];\n}\n\n/**\n * A function that determines whether to attach tracing headers to a request.\n * This was extracted from `instrumentOutgoingRequests` to make it easier to test shouldAttachHeaders.\n * We only export this fuction for testing purposes.\n */\nfunction shouldAttachHeaders(url, tracePropagationTargets) {\n return stringMatchesSomePattern(url, tracePropagationTargets || DEFAULT_TRACE_PROPAGATION_TARGETS);\n}\n\n/**\n * Create and track fetch request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\nfunction fetchCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n if (!hasTracingEnabled() || !handlerData.fetchData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(handlerData.fetchData.url);\n\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = handlerData.fetchData.__span;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n if (handlerData.response) {\n // TODO (kmclb) remove this once types PR goes through\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n span.setHttpStatus(handlerData.response.status);\n\n const contentLength =\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n handlerData.response && handlerData.response.headers && handlerData.response.headers.get('content-length');\n\n const contentLengthNum = parseInt(contentLength);\n if (contentLengthNum > 0) {\n span.setData('http.response_content_length', contentLengthNum);\n }\n } else if (handlerData.error) {\n span.setStatus('internal_error');\n }\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const client = hub.getClient();\n const parentSpan = scope.getSpan();\n\n const { method, url } = handlerData.fetchData;\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n url,\n type: 'fetch',\n 'http.method': method,\n },\n description: `${method} ${url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n handlerData.fetchData.__span = span.spanId;\n spans[span.spanId] = span;\n }\n\n if (shouldAttachHeaders(handlerData.fetchData.url) && client) {\n const request = handlerData.args[0];\n\n // In case the user hasn't set the second argument of a fetch call we default it to `{}`.\n handlerData.args[1] = handlerData.args[1] || {};\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const options = handlerData.args[1];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n options.headers = addTracingHeadersToFetchRequest(request, client, scope, options, span);\n }\n\n return span;\n}\n\n/**\n * Adds sentry-trace and baggage headers to the various forms of fetch headers\n */\nfunction addTracingHeadersToFetchRequest(\n request, // unknown is actually type Request but we can't export DOM types from this package,\n client,\n scope,\n options\n\n,\n requestSpan,\n) {\n const span = requestSpan || scope.getSpan();\n\n const transaction = span && span.transaction;\n\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n\n const sentryTraceHeader = span ? span.toTraceparent() : generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext = transaction\n ? transaction.getDynamicSamplingContext()\n : dsc\n ? dsc\n : getDynamicSamplingContextFromClient(traceId, client, scope);\n\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n\n const headers =\n typeof Request !== 'undefined' && isInstanceOf(request, Request) ? (request ).headers : options.headers;\n\n if (!headers) {\n return { 'sentry-trace': sentryTraceHeader, baggage: sentryBaggageHeader };\n } else if (typeof Headers !== 'undefined' && isInstanceOf(headers, Headers)) {\n const newHeaders = new Headers(headers );\n\n newHeaders.append('sentry-trace', sentryTraceHeader);\n\n if (sentryBaggageHeader) {\n // If the same header is appended multiple times the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.append(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n\n return newHeaders ;\n } else if (Array.isArray(headers)) {\n const newHeaders = [...headers, ['sentry-trace', sentryTraceHeader]];\n\n if (sentryBaggageHeader) {\n // If there are multiple entries with the same key, the browser will merge the values into a single request header.\n // Its therefore safe to simply push a \"baggage\" entry, even though there might already be another baggage header.\n newHeaders.push([BAGGAGE_HEADER_NAME, sentryBaggageHeader]);\n }\n\n return newHeaders ;\n } else {\n const existingBaggageHeader = 'baggage' in headers ? headers.baggage : undefined;\n const newBaggageHeaders = [];\n\n if (Array.isArray(existingBaggageHeader)) {\n newBaggageHeaders.push(...existingBaggageHeader);\n } else if (existingBaggageHeader) {\n newBaggageHeaders.push(existingBaggageHeader);\n }\n\n if (sentryBaggageHeader) {\n newBaggageHeaders.push(sentryBaggageHeader);\n }\n\n return {\n ...(headers ),\n 'sentry-trace': sentryTraceHeader,\n baggage: newBaggageHeaders.length > 0 ? newBaggageHeaders.join(',') : undefined,\n };\n }\n}\n\n/**\n * Create and track xhr request spans\n *\n * @returns Span if a span was created, otherwise void.\n */\n// eslint-disable-next-line complexity\nfunction xhrCallback(\n handlerData,\n shouldCreateSpan,\n shouldAttachHeaders,\n spans,\n) {\n const xhr = handlerData.xhr;\n const sentryXhrData = xhr && xhr[SENTRY_XHR_DATA_KEY];\n\n if (!hasTracingEnabled() || (xhr && xhr.__sentry_own_request__) || !xhr || !sentryXhrData) {\n return undefined;\n }\n\n const shouldCreateSpanResult = shouldCreateSpan(sentryXhrData.url);\n\n // check first if the request has finished and is tracked by an existing span which should now end\n if (handlerData.endTimestamp && shouldCreateSpanResult) {\n const spanId = xhr.__sentry_xhr_span_id__;\n if (!spanId) return;\n\n const span = spans[spanId];\n if (span) {\n span.setHttpStatus(sentryXhrData.status_code);\n span.finish();\n\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete spans[spanId];\n }\n return undefined;\n }\n\n const hub = getCurrentHub();\n const scope = hub.getScope();\n const parentSpan = scope.getSpan();\n\n const span =\n shouldCreateSpanResult && parentSpan\n ? parentSpan.startChild({\n data: {\n ...sentryXhrData.data,\n type: 'xhr',\n 'http.method': sentryXhrData.method,\n url: sentryXhrData.url,\n },\n description: `${sentryXhrData.method} ${sentryXhrData.url}`,\n op: 'http.client',\n origin: 'auto.http.browser',\n })\n : undefined;\n\n if (span) {\n xhr.__sentry_xhr_span_id__ = span.spanId;\n spans[xhr.__sentry_xhr_span_id__] = span;\n }\n\n if (xhr.setRequestHeader && shouldAttachHeaders(sentryXhrData.url)) {\n if (span) {\n const transaction = span && span.transaction;\n const dynamicSamplingContext = transaction && transaction.getDynamicSamplingContext();\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, span.toTraceparent(), sentryBaggageHeader);\n } else {\n const client = hub.getClient();\n const { traceId, sampled, dsc } = scope.getPropagationContext();\n const sentryTraceHeader = generateSentryTraceHeader(traceId, undefined, sampled);\n const dynamicSamplingContext =\n dsc || (client ? getDynamicSamplingContextFromClient(traceId, client, scope) : undefined);\n const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext);\n setHeaderOnXhr(xhr, sentryTraceHeader, sentryBaggageHeader);\n }\n }\n\n return span;\n}\n\nfunction setHeaderOnXhr(\n xhr,\n sentryTraceHeader,\n sentryBaggageHeader,\n) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader('sentry-trace', sentryTraceHeader);\n if (sentryBaggageHeader) {\n // From MDN: \"If this method is called several times with the same header, the values are merged into one single request header.\"\n // We can therefore simply set a baggage header without checking what was there before\n // https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/setRequestHeader\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n xhr.setRequestHeader(BAGGAGE_HEADER_NAME, sentryBaggageHeader);\n }\n } catch (_) {\n // Error: InvalidStateError: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': The object's state must be OPENED.\n }\n}\n\nexport { DEFAULT_TRACE_PROPAGATION_TARGETS, addTracingHeadersToFetchRequest, defaultRequestInstrumentationOptions, extractNetworkProtocol, fetchCallback, instrumentOutgoingRequests, shouldAttachHeaders, xhrCallback };\n//# sourceMappingURL=request.js.map\n","import { logger, browserPerformanceTimeOrigin, addInstrumentationHandler } from '@sentry/utils';\nimport { WINDOW } from './types.js';\n\n/**\n * Default function implementing pageload and navigation transactions\n */\nfunction instrumentRoutingWithDefaults(\n customStartTransaction,\n startTransactionOnPageLoad = true,\n startTransactionOnLocationChange = true,\n) {\n if (!WINDOW || !WINDOW.location) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Could not initialize routing instrumentation due to invalid location');\n return;\n }\n\n let startingUrl = WINDOW.location.href;\n\n let activeTransaction;\n if (startTransactionOnPageLoad) {\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n // pageload should always start at timeOrigin (and needs to be in s, not ms)\n startTimestamp: browserPerformanceTimeOrigin ? browserPerformanceTimeOrigin / 1000 : undefined,\n op: 'pageload',\n origin: 'auto.pageload.browser',\n metadata: { source: 'url' },\n });\n }\n\n if (startTransactionOnLocationChange) {\n addInstrumentationHandler('history', ({ to, from }) => {\n /**\n * This early return is there to account for some cases where a navigation transaction starts right after\n * long-running pageload. We make sure that if `from` is undefined and a valid `startingURL` exists, we don't\n * create an uneccessary navigation transaction.\n *\n * This was hard to duplicate, but this behavior stopped as soon as this fix was applied. This issue might also\n * only be caused in certain development environments where the usage of a hot module reloader is causing\n * errors.\n */\n if (from === undefined && startingUrl && startingUrl.indexOf(to) !== -1) {\n startingUrl = undefined;\n return;\n }\n\n if (from !== to) {\n startingUrl = undefined;\n if (activeTransaction) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Finishing current transaction with op: ${activeTransaction.op}`);\n // If there's an open transaction on the scope, we need to finish it before creating an new one.\n activeTransaction.finish();\n }\n activeTransaction = customStartTransaction({\n name: WINDOW.location.pathname,\n op: 'navigation',\n origin: 'auto.navigation.browser',\n metadata: { source: 'url' },\n });\n }\n });\n }\n}\n\nexport { instrumentRoutingWithDefaults };\n//# sourceMappingURL=router.js.map\n","import { TRACING_DEFAULTS, addTracingExtensions, startIdleTransaction, getActiveTransaction } from '@sentry/core';\nimport { logger, tracingContextFromHeaders, getDomElement } from '@sentry/utils';\nimport { registerBackgroundTabDetection } from './backgroundtab.js';\nimport { startTrackingWebVitals, startTrackingLongTasks, startTrackingInteractions, addPerformanceEntries } from './metrics/index.js';\nimport { defaultRequestInstrumentationOptions, instrumentOutgoingRequests } from './request.js';\nimport { instrumentRoutingWithDefaults } from './router.js';\nimport { WINDOW } from './types.js';\n\nconst BROWSER_TRACING_INTEGRATION_ID = 'BrowserTracing';\n\n/** Options for Browser Tracing integration */\n\nconst DEFAULT_BROWSER_TRACING_OPTIONS = {\n ...TRACING_DEFAULTS,\n markBackgroundTransactions: true,\n routingInstrumentation: instrumentRoutingWithDefaults,\n startTransactionOnLocationChange: true,\n startTransactionOnPageLoad: true,\n enableLongTask: true,\n _experiments: {},\n ...defaultRequestInstrumentationOptions,\n};\n\n/**\n * The Browser Tracing integration automatically instruments browser pageload/navigation\n * actions as transactions, and captures requests, metrics and errors as spans.\n *\n * The integration can be configured with a variety of options, and can be extended to use\n * any routing library. This integration uses {@see IdleTransaction} to create transactions.\n */\nclass BrowserTracing {\n // This class currently doesn't have a static `id` field like the other integration classes, because it prevented\n // @sentry/tracing from being treeshaken. Tree shakers do not like static fields, because they behave like side effects.\n // TODO: Come up with a better plan, than using static fields on integration classes, and use that plan on all\n // integrations.\n\n /** Browser Tracing integration options */\n\n /**\n * @inheritDoc\n */\n\n constructor(_options) {\n this.name = BROWSER_TRACING_INTEGRATION_ID;\n this._hasSetTracePropagationTargets = false;\n\n addTracingExtensions();\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n this._hasSetTracePropagationTargets = !!(\n _options &&\n // eslint-disable-next-line deprecation/deprecation\n (_options.tracePropagationTargets || _options.tracingOrigins)\n );\n }\n\n this.options = {\n ...DEFAULT_BROWSER_TRACING_OPTIONS,\n ..._options,\n };\n\n // Special case: enableLongTask can be set in _experiments\n // TODO (v8): Remove this in v8\n if (this.options._experiments.enableLongTask !== undefined) {\n this.options.enableLongTask = this.options._experiments.enableLongTask;\n }\n\n // TODO (v8): remove this block after tracingOrigins is removed\n // Set tracePropagationTargets to tracingOrigins if specified by the user\n // In case both are specified, tracePropagationTargets takes precedence\n // eslint-disable-next-line deprecation/deprecation\n if (_options && !_options.tracePropagationTargets && _options.tracingOrigins) {\n // eslint-disable-next-line deprecation/deprecation\n this.options.tracePropagationTargets = _options.tracingOrigins;\n }\n\n this._collectWebVitals = startTrackingWebVitals();\n if (this.options.enableLongTask) {\n startTrackingLongTasks();\n }\n if (this.options._experiments.enableInteractions) {\n startTrackingInteractions();\n }\n }\n\n /**\n * @inheritDoc\n */\n setupOnce(_, getCurrentHub) {\n this._getCurrentHub = getCurrentHub;\n const hub = getCurrentHub();\n const client = hub.getClient();\n const clientOptions = client && client.getOptions();\n\n const {\n routingInstrumentation: instrumentRouting,\n startTransactionOnLocationChange,\n startTransactionOnPageLoad,\n markBackgroundTransactions,\n traceFetch,\n traceXHR,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n _experiments,\n } = this.options;\n\n const clientOptionsTracePropagationTargets = clientOptions && clientOptions.tracePropagationTargets;\n // There are three ways to configure tracePropagationTargets:\n // 1. via top level client option `tracePropagationTargets`\n // 2. via BrowserTracing option `tracePropagationTargets`\n // 3. via BrowserTracing option `tracingOrigins` (deprecated)\n //\n // To avoid confusion, favour top level client option `tracePropagationTargets`, and fallback to\n // BrowserTracing option `tracePropagationTargets` and then `tracingOrigins` (deprecated).\n // This is done as it minimizes bundle size (we don't have to have undefined checks).\n //\n // If both 1 and either one of 2 or 3 are set (from above), we log out a warning.\n // eslint-disable-next-line deprecation/deprecation\n const tracePropagationTargets = clientOptionsTracePropagationTargets || this.options.tracePropagationTargets;\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._hasSetTracePropagationTargets && clientOptionsTracePropagationTargets) {\n logger.warn(\n '[Tracing] The `tracePropagationTargets` option was set in the BrowserTracing integration and top level `Sentry.init`. The top level `Sentry.init` value is being used.',\n );\n }\n\n instrumentRouting(\n (context) => {\n const transaction = this._createRouteTransaction(context);\n\n this.options._experiments.onStartRouteTransaction &&\n this.options._experiments.onStartRouteTransaction(transaction, context, getCurrentHub);\n\n return transaction;\n },\n startTransactionOnPageLoad,\n startTransactionOnLocationChange,\n );\n\n if (markBackgroundTransactions) {\n registerBackgroundTabDetection();\n }\n\n if (_experiments.enableInteractions) {\n this._registerInteractionListener();\n }\n\n instrumentOutgoingRequests({\n traceFetch,\n traceXHR,\n tracePropagationTargets,\n shouldCreateSpanForRequest,\n enableHTTPTimings,\n });\n }\n\n /** Create routing idle transaction. */\n _createRouteTransaction(context) {\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Did not create ${context.op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n\n const { beforeNavigate, idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n\n const isPageloadTransaction = context.op === 'pageload';\n\n const sentryTrace = isPageloadTransaction ? getMetaContent('sentry-trace') : '';\n const baggage = isPageloadTransaction ? getMetaContent('baggage') : '';\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n const expandedContext = {\n ...context,\n ...traceparentData,\n metadata: {\n ...context.metadata,\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n },\n trimEnd: true,\n };\n\n const modifiedContext = typeof beforeNavigate === 'function' ? beforeNavigate(expandedContext) : expandedContext;\n\n // For backwards compatibility reasons, beforeNavigate can return undefined to \"drop\" the transaction (prevent it\n // from being sent to Sentry).\n const finalContext = modifiedContext === undefined ? { ...expandedContext, sampled: false } : modifiedContext;\n\n // If `beforeNavigate` set a custom name, record that fact\n finalContext.metadata =\n finalContext.name !== expandedContext.name\n ? { ...finalContext.metadata, source: 'custom' }\n : finalContext.metadata;\n\n this._latestRouteName = finalContext.name;\n this._latestRouteSource = finalContext.metadata && finalContext.metadata.source;\n\n if (finalContext.sampled === false) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.log(`[Tracing] Will not send ${finalContext.op} transaction because of beforeNavigate.`);\n }\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log(`[Tracing] Starting ${finalContext.op} transaction on scope`);\n\n const { location } = WINDOW;\n\n const idleTransaction = startIdleTransaction(\n hub,\n finalContext,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n\n const scope = hub.getScope();\n\n // If it's a pageload and there is a meta tag set\n // use the traceparentData as the propagation context\n if (isPageloadTransaction && traceparentData) {\n scope.setPropagationContext(propagationContext);\n } else {\n // Navigation transactions should set a new propagation context based on the\n // created idle transaction.\n scope.setPropagationContext({\n traceId: idleTransaction.traceId,\n spanId: idleTransaction.spanId,\n parentSpanId: idleTransaction.parentSpanId,\n sampled: idleTransaction.sampled,\n });\n }\n\n idleTransaction.registerBeforeFinishCallback(transaction => {\n this._collectWebVitals();\n addPerformanceEntries(transaction);\n });\n\n return idleTransaction ;\n }\n\n /** Start listener for interaction transactions */\n _registerInteractionListener() {\n let inflightInteractionTransaction;\n const registerInteractionTransaction = () => {\n const { idleTimeout, finalTimeout, heartbeatInterval } = this.options;\n const op = 'ui.action.click';\n\n const currentTransaction = getActiveTransaction();\n if (currentTransaction && currentTransaction.op && ['navigation', 'pageload'].includes(currentTransaction.op)) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(\n `[Tracing] Did not create ${op} transaction because a pageload or navigation transaction is in progress.`,\n );\n return undefined;\n }\n\n if (inflightInteractionTransaction) {\n inflightInteractionTransaction.setFinishReason('interactionInterrupted');\n inflightInteractionTransaction.finish();\n inflightInteractionTransaction = undefined;\n }\n\n if (!this._getCurrentHub) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn(`[Tracing] Did not create ${op} transaction because _getCurrentHub is invalid.`);\n return undefined;\n }\n\n if (!this._latestRouteName) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.warn(`[Tracing] Did not create ${op} transaction because _latestRouteName is missing.`);\n return undefined;\n }\n\n const hub = this._getCurrentHub();\n const { location } = WINDOW;\n\n const context = {\n name: this._latestRouteName,\n op,\n trimEnd: true,\n metadata: {\n source: this._latestRouteSource || 'url',\n },\n };\n\n inflightInteractionTransaction = startIdleTransaction(\n hub,\n context,\n idleTimeout,\n finalTimeout,\n true,\n { location }, // for use in the tracesSampler\n heartbeatInterval,\n );\n };\n\n ['click'].forEach(type => {\n addEventListener(type, registerInteractionTransaction, { once: false, capture: true });\n });\n }\n}\n\n/** Returns the value of a meta tag */\nfunction getMetaContent(metaName) {\n // Can't specify generic to `getDomElement` because tracing can be used\n // in a variety of environments, have to disable `no-unsafe-member-access`\n // as a result.\n const metaTag = getDomElement(`meta[name=${metaName}]`);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return metaTag ? metaTag.getAttribute('content') : undefined;\n}\n\nexport { BROWSER_TRACING_INTEGRATION_ID, BrowserTracing, getMetaContent };\n//# sourceMappingURL=browsertracing.js.map\n","/**\n * Recursively traverses an object to update an existing nested key.\n * Note: The provided key path must include existing properties,\n * the function will not create objects while traversing.\n *\n * @param obj An object to update\n * @param value The value to update the nested key with\n * @param keyPath The path to the key to update ex. fizz.buzz.foo\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction setNestedKey(obj, keyPath, value) {\n // Ex. foo.bar.zoop will extract foo and bar.zoop\n const match = keyPath.match(/([a-z_]+)\\.(.*)/i);\n // The match will be null when there's no more recursing to do, i.e., when we've reached the right level of the object\n if (match === null) {\n obj[keyPath] = value;\n } else {\n // `match[1]` is the initial segment of the path, and `match[2]` is the remainder of the path\n const innerObj = obj[match[1]];\n setNestedKey(innerObj, match[2], value);\n }\n}\n\n/**\n * Enforces inclusion of a given integration with specified options in an integration array originally determined by the\n * user, by either including the given default instance or by patching an existing user instance with the given options.\n *\n * Ideally this would happen when integrations are set up, but there isn't currently a mechanism there for merging\n * options from a default integration instance with those from a user-provided instance of the same integration, only\n * for allowing the user to override a default instance entirely. (TODO: Fix that.)\n *\n * @param defaultIntegrationInstance An instance of the integration with the correct options already set\n * @param userIntegrations Integrations defined by the user.\n * @param forcedOptions Options with which to patch an existing user-derived instance on the integration.\n * @returns A final integrations array.\n */\nfunction addOrUpdateIntegration(\n defaultIntegrationInstance,\n userIntegrations,\n forcedOptions = {},\n) {\n return (\n Array.isArray(userIntegrations)\n ? addOrUpdateIntegrationInArray(defaultIntegrationInstance, userIntegrations, forcedOptions)\n : addOrUpdateIntegrationInFunction(\n defaultIntegrationInstance,\n // Somehow TS can't figure out that not being an array makes this necessarily a function\n userIntegrations ,\n forcedOptions,\n )\n ) ;\n}\n\nfunction addOrUpdateIntegrationInArray(\n defaultIntegrationInstance,\n userIntegrations,\n forcedOptions,\n) {\n const userInstance = userIntegrations.find(integration => integration.name === defaultIntegrationInstance.name);\n\n if (userInstance) {\n for (const [keyPath, value] of Object.entries(forcedOptions)) {\n setNestedKey(userInstance, keyPath, value);\n }\n\n return userIntegrations;\n }\n\n return [...userIntegrations, defaultIntegrationInstance];\n}\n\nfunction addOrUpdateIntegrationInFunction(\n defaultIntegrationInstance,\n userIntegrationsFunc,\n forcedOptions,\n) {\n const wrapper = defaultIntegrations => {\n const userFinalIntegrations = userIntegrationsFunc(defaultIntegrations);\n\n // There are instances where we want the user to be able to prevent an integration from appearing at all, which they\n // would do by providing a function which filters out the integration in question. If that's happened in one of\n // those cases, don't add our default back in.\n if (defaultIntegrationInstance.allowExclusionByUser) {\n const userFinalInstance = userFinalIntegrations.find(\n integration => integration.name === defaultIntegrationInstance.name,\n );\n if (!userFinalInstance) {\n return userFinalIntegrations;\n }\n }\n\n return addOrUpdateIntegrationInArray(defaultIntegrationInstance, userFinalIntegrations, forcedOptions);\n };\n\n return wrapper;\n}\n\nexport { addOrUpdateIntegration };\n//# sourceMappingURL=userIntegrations.js.map\n","/**\n * Returns an environment setting value determined by Vercel's `VERCEL_ENV` environment variable.\n *\n * @param isClient Flag to indicate whether to use the `NEXT_PUBLIC_` prefixed version of the environment variable.\n */\nfunction getVercelEnv(isClient) {\n const vercelEnvVar = isClient ? process.env.NEXT_PUBLIC_VERCEL_ENV : process.env.VERCEL_ENV;\n return vercelEnvVar ? `vercel-${vercelEnvVar}` : undefined;\n}\n\nexport { getVercelEnv };\n//# sourceMappingURL=getVercelEnv.js.map\n","import { SDK_VERSION } from '@sentry/core';\n\nconst PACKAGE_NAME_PREFIX = 'npm:@sentry/';\n\n/**\n * A builder for the SDK metadata in the options for the SDK initialization.\n * @param options sdk options object that gets mutated\n * @param names list of package names\n */\nfunction buildMetadata(options, names) {\n options._metadata = options._metadata || {};\n options._metadata.sdk =\n options._metadata.sdk ||\n ({\n name: 'sentry.javascript.nextjs',\n packages: names.map(name => ({\n name: `${PACKAGE_NAME_PREFIX}${name}`,\n version: SDK_VERSION,\n })),\n version: SDK_VERSION,\n } );\n}\n\nexport { buildMetadata };\n//# sourceMappingURL=metadata.js.map\n","import { getCurrentHub } from '@sentry/core';\nimport { WINDOW } from '@sentry/react';\nimport { tracingContextFromHeaders, stripUrlQueryAndFragment, logger } from '@sentry/utils';\nimport Router from 'next/router';\n\nconst globalObject = WINDOW\n\n;\n\n/**\n * Every Next.js page (static and dynamic ones) comes with a script tag with the id \"__NEXT_DATA__\". This script tag\n * contains a JSON object with data that was either generated at build time for static pages (`getStaticProps`), or at\n * runtime with data fetchers like `getServerSideProps.`.\n *\n * We can use this information to:\n * - Always get the parameterized route we're in when loading a page.\n * - Send trace information (trace-id, baggage) from the server to the client.\n *\n * This function extracts this information.\n */\nfunction extractNextDataTagInformation() {\n let nextData;\n // Let's be on the safe side and actually check first if there is really a __NEXT_DATA__ script tag on the page.\n // Theoretically this should always be the case though.\n const nextDataTag = globalObject.document.getElementById('__NEXT_DATA__');\n if (nextDataTag && nextDataTag.innerHTML) {\n try {\n nextData = JSON.parse(nextDataTag.innerHTML);\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Could not extract __NEXT_DATA__');\n }\n }\n\n if (!nextData) {\n return {};\n }\n\n const nextDataTagInfo = {};\n\n const { page, query, props } = nextData;\n\n // `nextData.page` always contains the parameterized route - except for when an error occurs in a data fetching\n // function, then it is \"/_error\", but that isn't a problem since users know which route threw by looking at the\n // parent transaction\n // TODO: Actually this is a problem (even though it is not that big), because the DSC and the transaction payload will contain\n // a different transaction name. Maybe we can fix this. Idea: Also send transaction name via pageProps when available.\n nextDataTagInfo.route = page;\n nextDataTagInfo.params = query;\n\n if (props && props.pageProps) {\n nextDataTagInfo.sentryTrace = props.pageProps._sentryTraceData;\n nextDataTagInfo.baggage = props.pageProps._sentryBaggage;\n }\n\n return nextDataTagInfo;\n}\n\nconst DEFAULT_TAGS = {\n 'routing.instrumentation': 'next-router',\n} ;\n\n// We keep track of the active transaction so we can finish it when we start a navigation transaction.\nlet activeTransaction = undefined;\n\n// We keep track of the previous location name so we can set the `from` field on navigation transactions.\n// This is either a route or a pathname.\nlet prevLocationName = undefined;\n\nconst client = getCurrentHub().getClient();\n\n/**\n * Creates routing instrumention for Next Router. Only supported for\n * client side routing. Works for Next >= 10.\n *\n * Leverages the SingletonRouter from the `next/router` to\n * generate pageload/navigation transactions and parameterize\n * transaction names.\n */\nfunction nextRouterInstrumentation(\n startTransactionCb,\n startTransactionOnPageLoad = true,\n startTransactionOnLocationChange = true,\n) {\n const { route, params, sentryTrace, baggage } = extractNextDataTagInformation();\n const { traceparentData, dynamicSamplingContext, propagationContext } = tracingContextFromHeaders(\n sentryTrace,\n baggage,\n );\n\n getCurrentHub().getScope().setPropagationContext(propagationContext);\n prevLocationName = route || globalObject.location.pathname;\n\n if (startTransactionOnPageLoad) {\n const source = route ? 'route' : 'url';\n activeTransaction = startTransactionCb({\n name: prevLocationName,\n op: 'pageload',\n tags: DEFAULT_TAGS,\n ...(params && client && client.getOptions().sendDefaultPii && { data: params }),\n ...traceparentData,\n metadata: {\n source,\n dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,\n },\n });\n }\n\n if (startTransactionOnLocationChange) {\n Router.events.on('routeChangeStart', (navigationTarget) => {\n const strippedNavigationTarget = stripUrlQueryAndFragment(navigationTarget);\n const matchedRoute = getNextRouteFromPathname(strippedNavigationTarget);\n\n let transactionName;\n let transactionSource;\n\n if (matchedRoute) {\n transactionName = matchedRoute;\n transactionSource = 'route';\n } else {\n transactionName = strippedNavigationTarget;\n transactionSource = 'url';\n }\n\n const tags = {\n ...DEFAULT_TAGS,\n from: prevLocationName,\n };\n\n prevLocationName = transactionName;\n\n if (activeTransaction) {\n activeTransaction.finish();\n }\n\n const navigationTransaction = startTransactionCb({\n name: transactionName,\n op: 'navigation',\n tags,\n metadata: { source: transactionSource },\n });\n\n if (navigationTransaction) {\n // In addition to the navigation transaction we're also starting a span to mark Next.js's `routeChangeStart`\n // and `routeChangeComplete` events.\n // We don't want to finish the navigation transaction on `routeChangeComplete`, since users might want to attach\n // spans to that transaction even after `routeChangeComplete` is fired (eg. HTTP requests in some useEffect\n // hooks). Instead, we'll simply let the navigation transaction finish itself (it's an `IdleTransaction`).\n const nextRouteChangeSpan = navigationTransaction.startChild({\n op: 'ui.nextjs.route-change',\n description: 'Next.js Route Change',\n origin: 'auto.navigation.nextjs',\n });\n\n const finishRouteChangeSpan = () => {\n nextRouteChangeSpan.finish();\n Router.events.off('routeChangeComplete', finishRouteChangeSpan);\n };\n\n Router.events.on('routeChangeComplete', finishRouteChangeSpan);\n }\n });\n }\n}\n\nfunction getNextRouteFromPathname(pathname) {\n const pageRoutes = (globalObject.__BUILD_MANIFEST || {}).sortedPages;\n\n // Page route should in 99.999% of the cases be defined by now but just to be sure we make a check here\n if (!pageRoutes) {\n return;\n }\n\n return pageRoutes.find(route => {\n const routeRegExp = convertNextRouteToRegExp(route);\n return pathname.match(routeRegExp);\n });\n}\n\n/**\n * Converts a Next.js style route to a regular expression that matches on pathnames (no query params or URL fragments).\n *\n * In general this involves replacing any instances of square brackets in a route with a wildcard:\n * e.g. \"/users/[id]/info\" becomes /\\/users\\/([^/]+?)\\/info/\n *\n * Some additional edgecases need to be considered:\n * - All routes have an optional slash at the end, meaning users can navigate to \"/users/[id]/info\" or\n * \"/users/[id]/info/\" - both will be resolved to \"/users/[id]/info\".\n * - Non-optional \"catchall\"s at the end of a route must be considered when matching (e.g. \"/users/[...params]\").\n * - Optional \"catchall\"s at the end of a route must be considered when matching (e.g. \"/users/[[...params]]\").\n *\n * @param route A Next.js style route as it is found in `global.__BUILD_MANIFEST.sortedPages`\n */\nfunction convertNextRouteToRegExp(route) {\n // We can assume a route is at least \"/\".\n const routeParts = route.split('/');\n\n let optionalCatchallWildcardRegex = '';\n if (routeParts[routeParts.length - 1].match(/^\\[\\[\\.\\.\\..+\\]\\]$/)) {\n // If last route part has pattern \"[[...xyz]]\" we pop the latest route part to get rid of the required trailing\n // slash that would come before it if we didn't pop it.\n routeParts.pop();\n optionalCatchallWildcardRegex = '(?:/(.+?))?';\n }\n\n const rejoinedRouteParts = routeParts\n .map(\n routePart =>\n routePart\n .replace(/^\\[\\.\\.\\..+\\]$/, '(.+?)') // Replace catch all wildcard with regex wildcard\n .replace(/^\\[.*\\]$/, '([^/]+?)'), // Replace route wildcards with lazy regex wildcards\n )\n .join('/');\n\n return new RegExp(\n `^${rejoinedRouteParts}${optionalCatchallWildcardRegex}(?:/)?$`, // optional slash at the end\n );\n}\n\nexport { nextRouterInstrumentation };\n//# sourceMappingURL=performance.js.map\n","import { dsnFromString, logger } from '@sentry/utils';\n\nconst globalWithInjectedValues = global\n\n;\n\n/**\n * Applies the `tunnel` option to the Next.js SDK options based on `withSentryConfig`'s `tunnelRoute` option.\n */\nfunction applyTunnelRouteOption(options) {\n const tunnelRouteOption = globalWithInjectedValues.__sentryRewritesTunnelPath__;\n if (tunnelRouteOption && options.dsn) {\n const dsnComponents = dsnFromString(options.dsn);\n if (!dsnComponents) {\n return;\n }\n const sentrySaasDsnMatch = dsnComponents.host.match(/^o(\\d+)\\.ingest\\.sentry\\.io$/);\n if (sentrySaasDsnMatch) {\n const orgId = sentrySaasDsnMatch[1];\n const tunnelPath = `${tunnelRouteOption}?o=${orgId}&p=${dsnComponents.projectId}`;\n options.tunnel = tunnelPath;\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.info(`Tunneling events to \"${tunnelPath}\"`);\n } else {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Provided DSN is not a Sentry SaaS DSN. Will not tunnel events.');\n }\n }\n}\n\nexport { applyTunnelRouteOption };\n//# sourceMappingURL=tunnelRoute.js.map\n","import { _optionalChain } from '@sentry/utils/esm/buildPolyfills';\nimport { hasTracingEnabled } from '@sentry/core';\nimport { RewriteFrames } from '@sentry/integrations';\nimport { init as init$1, configureScope, BrowserTracing, defaultRequestInstrumentationOptions } from '@sentry/react';\nexport * from '@sentry/react';\nexport { BrowserTracing, Integrations } from '@sentry/react';\nimport { addOrUpdateIntegration } from '@sentry/utils';\nimport { devErrorSymbolicationEventProcessor } from '../common/devErrorSymbolicationEventProcessor.js';\nimport { getVercelEnv } from '../common/getVercelEnv.js';\nimport { buildMetadata } from '../common/metadata.js';\nimport { nextRouterInstrumentation } from './performance.js';\nexport { nextRouterInstrumentation } from './performance.js';\nimport { applyTunnelRouteOption } from './tunnelRoute.js';\nexport { captureUnderscoreErrorException } from '../common/_error.js';\nexport { withSentryGetStaticProps, wrapGetStaticPropsWithSentry } from '../common/wrapGetStaticPropsWithSentry.js';\nexport { withSentryServerSideGetInitialProps, wrapGetInitialPropsWithSentry } from '../common/wrapGetInitialPropsWithSentry.js';\nexport { withSentryServerSideAppGetInitialProps, wrapAppGetInitialPropsWithSentry } from '../common/wrapAppGetInitialPropsWithSentry.js';\nexport { withSentryServerSideDocumentGetInitialProps, wrapDocumentGetInitialPropsWithSentry } from '../common/wrapDocumentGetInitialPropsWithSentry.js';\nexport { withSentryServerSideErrorGetInitialProps, wrapErrorGetInitialPropsWithSentry } from '../common/wrapErrorGetInitialPropsWithSentry.js';\nexport { withSentryGetServerSideProps, wrapGetServerSidePropsWithSentry } from '../common/wrapGetServerSidePropsWithSentry.js';\nexport { wrapServerComponentWithSentry } from '../common/wrapServerComponentWithSentry.js';\nexport { wrapRouteHandlerWithSentry } from '../common/wrapRouteHandlerWithSentry.js';\nexport { wrapApiHandlerWithSentryVercelCrons } from '../common/wrapApiHandlerWithSentryVercelCrons.js';\nexport { wrapMiddlewareWithSentry } from '../common/wrapMiddlewareWithSentry.js';\nexport { wrapPageComponentWithSentry } from '../common/wrapPageComponentWithSentry.js';\n\n// Treeshakable guard to remove all code related to tracing\n\nconst globalWithInjectedValues = global\n\n;\n\n/** Inits the Sentry NextJS SDK on the browser with the React SDK. */\nfunction init(options) {\n const opts = {\n environment: getVercelEnv(true) || process.env.NODE_ENV,\n ...options,\n };\n\n applyTunnelRouteOption(opts);\n buildMetadata(opts, ['nextjs', 'react']);\n\n addClientIntegrations(opts);\n\n init$1(opts);\n\n configureScope(scope => {\n scope.setTag('runtime', 'browser');\n const filterTransactions = event =>\n event.type === 'transaction' && event.transaction === '/404' ? null : event;\n filterTransactions.id = 'NextClient404Filter';\n scope.addEventProcessor(filterTransactions);\n\n if (process.env.NODE_ENV === 'development') {\n scope.addEventProcessor(devErrorSymbolicationEventProcessor);\n }\n });\n}\n\nfunction addClientIntegrations(options) {\n let integrations = options.integrations || [];\n\n // This value is injected at build time, based on the output directory specified in the build config. Though a default\n // is set there, we set it here as well, just in case something has gone wrong with the injection.\n const assetPrefixPath = globalWithInjectedValues.__rewriteFramesAssetPrefixPath__ || '';\n\n const defaultRewriteFramesIntegration = new RewriteFrames({\n // Turn `<origin>/<path>/_next/static/...` into `app:///_next/static/...`\n iteratee: frame => {\n try {\n const { origin } = new URL(frame.filename );\n frame.filename = _optionalChain([frame, 'access', _ => _.filename, 'optionalAccess', _2 => _2.replace, 'call', _3 => _3(origin, 'app://'), 'access', _4 => _4.replace, 'call', _5 => _5(assetPrefixPath, '')]);\n } catch (err) {\n // Filename wasn't a properly formed URL, so there's nothing we can do\n }\n\n // We need to URI-decode the filename because Next.js has wildcard routes like \"/users/[id].js\" which show up as \"/users/%5id%5.js\" in Error stacktraces.\n // The corresponding sources that Next.js generates have proper brackets so we also need proper brackets in the frame so that source map resolving works.\n if (frame.filename && frame.filename.startsWith('app:///_next')) {\n frame.filename = decodeURI(frame.filename);\n }\n\n if (\n frame.filename &&\n frame.filename.match(\n /^app:\\/\\/\\/_next\\/static\\/chunks\\/(main-|main-app-|polyfills-|webpack-|framework-|framework\\.)[0-9a-f]+\\.js$/,\n )\n ) {\n // We don't care about these frames. It's Next.js internal code.\n frame.in_app = false;\n }\n\n return frame;\n },\n });\n integrations = addOrUpdateIntegration(defaultRewriteFramesIntegration, integrations);\n\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\", in which case everything inside\n // will get treeshaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n if (hasTracingEnabled(options)) {\n const defaultBrowserTracingIntegration = new BrowserTracing({\n // eslint-disable-next-line deprecation/deprecation\n tracingOrigins: [...defaultRequestInstrumentationOptions.tracingOrigins, /^(api\\/)/],\n routingInstrumentation: nextRouterInstrumentation,\n });\n\n integrations = addOrUpdateIntegration(defaultBrowserTracingIntegration, integrations, {\n 'options.routingInstrumentation': nextRouterInstrumentation,\n });\n }\n }\n\n options.integrations = integrations;\n}\n\n/**\n * Just a passthrough in case this is imported from the client.\n */\nfunction withSentryConfig(exportedUserNextConfig) {\n return exportedUserNextConfig;\n}\n\nexport { init, withSentryConfig };\n//# sourceMappingURL=index.js.map\n","/**\n * Checks whether given url points to Sentry server\n * @param url url to verify\n */\nfunction isSentryRequestUrl(url, hub) {\n const client = hub.getClient();\n const dsn = client && client.getDsn();\n const tunnel = client && client.getOptions().tunnel;\n\n return checkDsn(url, dsn) || checkTunnel(url, tunnel);\n}\n\nfunction checkTunnel(url, tunnel) {\n if (!tunnel) {\n return false;\n }\n\n return removeTrailingSlash(url) === removeTrailingSlash(tunnel);\n}\n\nfunction checkDsn(url, dsn) {\n return dsn ? url.includes(dsn.host) : false;\n}\n\nfunction removeTrailingSlash(str) {\n return str[str.length - 1] === '/' ? str.slice(0, -1) : str;\n}\n\nexport { isSentryRequestUrl };\n//# sourceMappingURL=isSentryRequestUrl.js.map\n","import { isNodeEnv } from './node.js';\nimport { GLOBAL_OBJ } from './worldwide.js';\n\n/**\n * Returns true if we are in the browser.\n */\nfunction isBrowser() {\n // eslint-disable-next-line no-restricted-globals\n return typeof window !== 'undefined' && (!isNodeEnv() || isElectronNodeRenderer());\n}\n\n// Electron renderers with nodeIntegration enabled are detected as Node.js so we specifically test for them\nfunction isElectronNodeRenderer() {\n return (\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n (GLOBAL_OBJ ).process !== undefined && ((GLOBAL_OBJ ).process ).type === 'renderer'\n );\n}\n\nexport { isBrowser };\n//# sourceMappingURL=isBrowser.js.map\n","import { getCurrentHub, isSentryRequestUrl, addGlobalEventProcessor, prepareEvent, setContext, captureException } from '@sentry/core';\nimport { GLOBAL_OBJ, normalize, fill, htmlTreeAsString, browserPerformanceTimeOrigin, logger, uuid4, SENTRY_XHR_DATA_KEY, dropUndefinedKeys, stringMatchesSomePattern, addInstrumentationHandler, createEnvelope, createEventEnvelopeHeaders, getSdkMetadataForEnvelopeHeader, isBrowser } from '@sentry/utils';\nimport { addPerformanceInstrumentationHandler, addLcpInstrumentationHandler } from '@sentry-internal/tracing';\n\n// exporting a separate copy of `WINDOW` rather than exporting the one from `@sentry/browser`\n// prevents the browser package from being bundled in the CDN bundle, and avoids a\n// circular dependency between the browser and replay packages should `@sentry/browser` import\n// from `@sentry/replay` in the future\nconst WINDOW = GLOBAL_OBJ ;\n\nconst REPLAY_SESSION_KEY = 'sentryReplaySession';\nconst REPLAY_EVENT_NAME = 'replay_event';\nconst UNABLE_TO_SEND_REPLAY = 'Unable to send Replay';\n\n// The idle limit for a session after which recording is paused.\nconst SESSION_IDLE_PAUSE_DURATION = 300000; // 5 minutes in ms\n\n// The idle limit for a session after which the session expires.\nconst SESSION_IDLE_EXPIRE_DURATION = 900000; // 15 minutes in ms\n\n/** Default flush delays */\nconst DEFAULT_FLUSH_MIN_DELAY = 5000;\n// XXX: Temp fix for our debounce logic where `maxWait` would never occur if it\n// was the same as `wait`\nconst DEFAULT_FLUSH_MAX_DELAY = 5500;\n\n/* How long to wait for error checkouts */\nconst BUFFER_CHECKOUT_TIME = 60000;\n\nconst RETRY_BASE_INTERVAL = 5000;\nconst RETRY_MAX_COUNT = 3;\n\n/* The max (uncompressed) size in bytes of a network body. Any body larger than this will be truncated. */\nconst NETWORK_BODY_MAX_SIZE = 150000;\n\n/* The max size of a single console arg that is captured. Any arg larger than this will be truncated. */\nconst CONSOLE_ARG_MAX_SIZE = 5000;\n\n/* Min. time to wait before we consider something a slow click. */\nconst SLOW_CLICK_THRESHOLD = 3000;\n/* For scroll actions after a click, we only look for a very short time period to detect programmatic scrolling. */\nconst SLOW_CLICK_SCROLL_TIMEOUT = 300;\n\n/** When encountering a total segment size exceeding this size, stop the replay (as we cannot properly ingest it). */\nconst REPLAY_MAX_EVENT_BUFFER_SIZE = 20000000; // ~20MB\n\n/** Replays must be min. 5s long before we send them. */\nconst MIN_REPLAY_DURATION = 4999;\n/* The max. allowed value that the minReplayDuration can be set to. */\nconst MIN_REPLAY_DURATION_LIMIT = 15000;\n\n/** The max. length of a replay. */\nconst MAX_REPLAY_DURATION = 3600000; // 60 minutes in ms;\n\nvar NodeType$1;\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType$1 || (NodeType$1 = {}));\n\nfunction isElement$1(n) {\n return n.nodeType === n.ELEMENT_NODE;\n}\nfunction isShadowRoot(n) {\n const host = n === null || n === void 0 ? void 0 : n.host;\n return Boolean((host === null || host === void 0 ? void 0 : host.shadowRoot) === n);\n}\nfunction isNativeShadowDom(shadowRoot) {\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\n}\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\n if (cssText.includes(' background-clip: text;') &&\n !cssText.includes(' -webkit-background-clip: text;')) {\n cssText = cssText.replace(' background-clip: text;', ' -webkit-background-clip: text; background-clip: text;');\n }\n return cssText;\n}\nfunction escapeImportStatement(rule) {\n const { cssText } = rule;\n if (cssText.split('\"').length < 3)\n return cssText;\n const statement = ['@import', `url(${JSON.stringify(rule.href)})`];\n if (rule.layerName === '') {\n statement.push(`layer`);\n }\n else if (rule.layerName) {\n statement.push(`layer(${rule.layerName})`);\n }\n if (rule.supportsText) {\n statement.push(`supports(${rule.supportsText})`);\n }\n if (rule.media.length) {\n statement.push(rule.media.mediaText);\n }\n return statement.join(' ') + ';';\n}\nfunction stringifyStylesheet(s) {\n try {\n const rules = s.rules || s.cssRules;\n return rules\n ? fixBrowserCompatibilityIssuesInCSS(Array.from(rules, stringifyRule).join(''))\n : null;\n }\n catch (error) {\n return null;\n }\n}\nfunction stringifyRule(rule) {\n let importStringified;\n if (isCSSImportRule(rule)) {\n try {\n importStringified =\n stringifyStylesheet(rule.styleSheet) ||\n escapeImportStatement(rule);\n }\n catch (error) {\n }\n }\n else if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n return fixSafariColons(rule.cssText);\n }\n return importStringified || rule.cssText;\n}\nfunction fixSafariColons(cssStringified) {\n const regex = /(\\[(?:[\\w-]+)[^\\\\])(:(?:[\\w-]+)\\])/gm;\n return cssStringified.replace(regex, '$1\\\\$2');\n}\nfunction isCSSImportRule(rule) {\n return 'styleSheet' in rule;\n}\nfunction isCSSStyleRule(rule) {\n return 'selectorText' in rule;\n}\nclass Mirror {\n constructor() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n getId(n) {\n var _a;\n if (!n)\n return -1;\n const id = (_a = this.getMeta(n)) === null || _a === void 0 ? void 0 : _a.id;\n return id !== null && id !== void 0 ? id : -1;\n }\n getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n getMeta(n) {\n return this.nodeMetaMap.get(n) || null;\n }\n removeNodeFromMap(n) {\n const id = this.getId(n);\n this.idNodeMap.delete(id);\n if (n.childNodes) {\n n.childNodes.forEach((childNode) => this.removeNodeFromMap(childNode));\n }\n }\n has(id) {\n return this.idNodeMap.has(id);\n }\n hasNode(node) {\n return this.nodeMetaMap.has(node);\n }\n add(n, meta) {\n const id = meta.id;\n this.idNodeMap.set(id, n);\n this.nodeMetaMap.set(n, meta);\n }\n replace(id, n) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta)\n this.nodeMetaMap.set(n, meta);\n }\n this.idNodeMap.set(id, n);\n }\n reset() {\n this.idNodeMap = new Map();\n this.nodeMetaMap = new WeakMap();\n }\n}\nfunction createMirror() {\n return new Mirror();\n}\nfunction shouldMaskInput({ maskInputOptions, tagName, type, }) {\n if (tagName === 'OPTION') {\n tagName = 'SELECT';\n }\n return Boolean(maskInputOptions[tagName.toLowerCase()] ||\n (type && maskInputOptions[type]) ||\n type === 'password' ||\n (tagName === 'INPUT' && !type && maskInputOptions['text']));\n}\nfunction maskInputValue({ isMasked, element, value, maskInputFn, }) {\n let text = value || '';\n if (!isMasked) {\n return text;\n }\n if (maskInputFn) {\n text = maskInputFn(text, element);\n }\n return '*'.repeat(text.length);\n}\nfunction toLowerCase(str) {\n return str.toLowerCase();\n}\nfunction toUpperCase(str) {\n return str.toUpperCase();\n}\nconst ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\nfunction is2DCanvasBlank(canvas) {\n const ctx = canvas.getContext('2d');\n if (!ctx)\n return true;\n const chunkSize = 50;\n for (let x = 0; x < canvas.width; x += chunkSize) {\n for (let y = 0; y < canvas.height; y += chunkSize) {\n const getImageData = ctx.getImageData;\n const originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\n : getImageData;\n const pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x, y, Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.height - y)).data.buffer);\n if (pixelBuffer.some((pixel) => pixel !== 0))\n return false;\n }\n }\n return true;\n}\nfunction getInputType(element) {\n const type = element.type;\n return element.hasAttribute('data-rr-is-password')\n ? 'password'\n : type\n ?\n toLowerCase(type)\n : null;\n}\nfunction getInputValue(el, tagName, type) {\n if (tagName === 'INPUT' && (type === 'radio' || type === 'checkbox')) {\n return el.getAttribute('value') || '';\n }\n return el.value;\n}\n\nlet _id = 1;\nconst tagNameRegex = new RegExp('[^a-z0-9-_:]');\nconst IGNORED_NODE = -2;\nfunction genId() {\n return _id++;\n}\nfunction getValidTagName(element) {\n if (element instanceof HTMLFormElement) {\n return 'form';\n }\n const processedTagName = toLowerCase(element.tagName);\n if (tagNameRegex.test(processedTagName)) {\n return 'div';\n }\n return processedTagName;\n}\nfunction extractOrigin(url) {\n let origin = '';\n if (url.indexOf('//') > -1) {\n origin = url.split('/').slice(0, 3).join('/');\n }\n else {\n origin = url.split('/')[0];\n }\n origin = origin.split('?')[0];\n return origin;\n}\nlet canvasService;\nlet canvasCtx;\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\nconst URL_PROTOCOL_MATCH = /^(?:[a-z+]+:)?\\/\\//i;\nconst URL_WWW_MATCH = /^www\\..*/i;\nconst DATA_URI = /^(data:)([^,]*),(.*)/i;\nfunction absoluteToStylesheet(cssText, href) {\n return (cssText || '').replace(URL_IN_CSS_REF, (origin, quote1, path1, quote2, path2, path3) => {\n const filePath = path1 || path2 || path3;\n const maybeQuote = quote1 || quote2 || '';\n if (!filePath) {\n return origin;\n }\n if (URL_PROTOCOL_MATCH.test(filePath) || URL_WWW_MATCH.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (DATA_URI.test(filePath)) {\n return `url(${maybeQuote}${filePath}${maybeQuote})`;\n }\n if (filePath[0] === '/') {\n return `url(${maybeQuote}${extractOrigin(href) + filePath}${maybeQuote})`;\n }\n const stack = href.split('/');\n const parts = filePath.split('/');\n stack.pop();\n for (const part of parts) {\n if (part === '.') {\n continue;\n }\n else if (part === '..') {\n stack.pop();\n }\n else {\n stack.push(part);\n }\n }\n return `url(${maybeQuote}${stack.join('/')}${maybeQuote})`;\n });\n}\nconst SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\nconst SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\n if (attributeValue.trim() === '') {\n return attributeValue;\n }\n let pos = 0;\n function collectCharacters(regEx) {\n let chars;\n const match = regEx.exec(attributeValue.substring(pos));\n if (match) {\n chars = match[0];\n pos += chars.length;\n return chars;\n }\n return '';\n }\n const output = [];\n while (true) {\n collectCharacters(SRCSET_COMMAS_OR_SPACES);\n if (pos >= attributeValue.length) {\n break;\n }\n let url = collectCharacters(SRCSET_NOT_SPACES);\n if (url.slice(-1) === ',') {\n url = absoluteToDoc(doc, url.substring(0, url.length - 1));\n output.push(url);\n }\n else {\n let descriptorsStr = '';\n url = absoluteToDoc(doc, url);\n let inParens = false;\n while (true) {\n const c = attributeValue.charAt(pos);\n if (c === '') {\n output.push((url + descriptorsStr).trim());\n break;\n }\n else if (!inParens) {\n if (c === ',') {\n pos += 1;\n output.push((url + descriptorsStr).trim());\n break;\n }\n else if (c === '(') {\n inParens = true;\n }\n }\n else {\n if (c === ')') {\n inParens = false;\n }\n }\n descriptorsStr += c;\n pos += 1;\n }\n }\n }\n return output.join(', ');\n}\nfunction absoluteToDoc(doc, attributeValue) {\n if (!attributeValue || attributeValue.trim() === '') {\n return attributeValue;\n }\n const a = doc.createElement('a');\n a.href = attributeValue;\n return a.href;\n}\nfunction isSVGElement(el) {\n return Boolean(el.tagName === 'svg' || el.ownerSVGElement);\n}\nfunction getHref() {\n const a = document.createElement('a');\n a.href = '';\n return a.href;\n}\nfunction transformAttribute(doc, tagName, name, value, element, maskAttributeFn) {\n if (!value) {\n return value;\n }\n if (name === 'src' ||\n (name === 'href' && !(tagName === 'use' && value[0] === '#'))) {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'xlink:href' && value[0] !== '#') {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'background' &&\n (tagName === 'table' || tagName === 'td' || tagName === 'th')) {\n return absoluteToDoc(doc, value);\n }\n else if (name === 'srcset') {\n return getAbsoluteSrcsetString(doc, value);\n }\n else if (name === 'style') {\n return absoluteToStylesheet(value, getHref());\n }\n else if (tagName === 'object' && name === 'data') {\n return absoluteToDoc(doc, value);\n }\n if (typeof maskAttributeFn === 'function') {\n return maskAttributeFn(name, value, element);\n }\n return value;\n}\nfunction ignoreAttribute(tagName, name, _value) {\n return (tagName === 'video' || tagName === 'audio') && name === 'autoplay';\n}\nfunction _isBlockedElement(element, blockClass, blockSelector, unblockSelector) {\n try {\n if (unblockSelector && element.matches(unblockSelector)) {\n return false;\n }\n if (typeof blockClass === 'string') {\n if (element.classList.contains(blockClass)) {\n return true;\n }\n }\n else {\n for (let eIndex = element.classList.length; eIndex--;) {\n const className = element.classList[eIndex];\n if (blockClass.test(className)) {\n return true;\n }\n }\n }\n if (blockSelector) {\n return element.matches(blockSelector);\n }\n }\n catch (e) {\n }\n return false;\n}\nfunction elementClassMatchesRegex(el, regex) {\n for (let eIndex = el.classList.length; eIndex--;) {\n const className = el.classList[eIndex];\n if (regex.test(className)) {\n return true;\n }\n }\n return false;\n}\nfunction distanceToMatch(node, matchPredicate, limit = Infinity, distance = 0) {\n if (!node)\n return -1;\n if (node.nodeType !== node.ELEMENT_NODE)\n return -1;\n if (distance > limit)\n return -1;\n if (matchPredicate(node))\n return distance;\n return distanceToMatch(node.parentNode, matchPredicate, limit, distance + 1);\n}\nfunction createMatchPredicate(className, selector) {\n return (node) => {\n const el = node;\n if (el === null)\n return false;\n if (className) {\n if (typeof className === 'string') {\n if (el.matches(`.${className}`))\n return true;\n }\n else if (elementClassMatchesRegex(el, className)) {\n return true;\n }\n }\n if (selector && el.matches(selector))\n return true;\n return false;\n };\n}\nfunction needMaskingText(node, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText) {\n try {\n const el = node.nodeType === node.ELEMENT_NODE\n ? node\n : node.parentElement;\n if (el === null)\n return false;\n let maskDistance = -1;\n let unmaskDistance = -1;\n if (maskAllText) {\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector));\n if (unmaskDistance < 0) {\n return true;\n }\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector), unmaskDistance >= 0 ? unmaskDistance : Infinity);\n }\n else {\n maskDistance = distanceToMatch(el, createMatchPredicate(maskTextClass, maskTextSelector));\n if (maskDistance < 0) {\n return false;\n }\n unmaskDistance = distanceToMatch(el, createMatchPredicate(unmaskTextClass, unmaskTextSelector), maskDistance >= 0 ? maskDistance : Infinity);\n }\n return maskDistance >= 0\n ? unmaskDistance >= 0\n ? maskDistance <= unmaskDistance\n : true\n : unmaskDistance >= 0\n ? false\n : !!maskAllText;\n }\n catch (e) {\n }\n return !!maskAllText;\n}\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\n const win = iframeEl.contentWindow;\n if (!win) {\n return;\n }\n let fired = false;\n let readyState;\n try {\n readyState = win.document.readyState;\n }\n catch (error) {\n return;\n }\n if (readyState !== 'complete') {\n const timer = setTimeout(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, iframeLoadTimeout);\n iframeEl.addEventListener('load', () => {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n return;\n }\n const blankUrl = 'about:blank';\n if (win.location.href !== blankUrl ||\n iframeEl.src === blankUrl ||\n iframeEl.src === '') {\n setTimeout(listener, 0);\n return iframeEl.addEventListener('load', listener);\n }\n iframeEl.addEventListener('load', listener);\n}\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\n let fired = false;\n let styleSheetLoaded;\n try {\n styleSheetLoaded = link.sheet;\n }\n catch (error) {\n return;\n }\n if (styleSheetLoaded)\n return;\n const timer = setTimeout(() => {\n if (!fired) {\n listener();\n fired = true;\n }\n }, styleSheetLoadTimeout);\n link.addEventListener('load', () => {\n clearTimeout(timer);\n fired = true;\n listener();\n });\n}\nfunction serializeNode(n, options) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, maskAllText, maskAttributeFn, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, inlineStylesheet, maskInputOptions = {}, maskTextFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, } = options;\n const rootId = getRootId(doc, mirror);\n switch (n.nodeType) {\n case n.DOCUMENT_NODE:\n if (n.compatMode !== 'CSS1Compat') {\n return {\n type: NodeType$1.Document,\n childNodes: [],\n compatMode: n.compatMode,\n };\n }\n else {\n return {\n type: NodeType$1.Document,\n childNodes: [],\n };\n }\n case n.DOCUMENT_TYPE_NODE:\n return {\n type: NodeType$1.DocumentType,\n name: n.name,\n publicId: n.publicId,\n systemId: n.systemId,\n rootId,\n };\n case n.ELEMENT_NODE:\n return serializeElementNode(n, {\n doc,\n blockClass,\n blockSelector,\n unblockSelector,\n inlineStylesheet,\n maskAttributeFn,\n maskInputOptions,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n rootId,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n });\n case n.TEXT_NODE:\n return serializeTextNode(n, {\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskTextFn,\n maskInputOptions,\n maskInputFn,\n rootId,\n });\n case n.CDATA_SECTION_NODE:\n return {\n type: NodeType$1.CDATA,\n textContent: '',\n rootId,\n };\n case n.COMMENT_NODE:\n return {\n type: NodeType$1.Comment,\n textContent: n.textContent || '',\n rootId,\n };\n default:\n return false;\n }\n}\nfunction getRootId(doc, mirror) {\n if (!mirror.hasNode(doc))\n return undefined;\n const docId = mirror.getId(doc);\n return docId === 1 ? undefined : docId;\n}\nfunction serializeTextNode(n, options) {\n var _a;\n const { maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, maskTextFn, maskInputOptions, maskInputFn, rootId, } = options;\n const parentTagName = n.parentNode && n.parentNode.tagName;\n let textContent = n.textContent;\n const isStyle = parentTagName === 'STYLE' ? true : undefined;\n const isScript = parentTagName === 'SCRIPT' ? true : undefined;\n const isTextarea = parentTagName === 'TEXTAREA' ? true : undefined;\n if (isStyle && textContent) {\n try {\n if (n.nextSibling || n.previousSibling) {\n }\n else if ((_a = n.parentNode.sheet) === null || _a === void 0 ? void 0 : _a.cssRules) {\n textContent = stringifyStylesheet(n.parentNode.sheet);\n }\n }\n catch (err) {\n console.warn(`Cannot get CSS styles from text's parentNode. Error: ${err}`, n);\n }\n textContent = absoluteToStylesheet(textContent, getHref());\n }\n if (isScript) {\n textContent = 'SCRIPT_PLACEHOLDER';\n }\n const forceMask = needMaskingText(n, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, maskAllText);\n if (!isStyle && !isScript && !isTextarea && textContent && forceMask) {\n textContent = maskTextFn\n ? maskTextFn(textContent)\n : textContent.replace(/[\\S]/g, '*');\n }\n if (isTextarea && textContent && (maskInputOptions.textarea || forceMask)) {\n textContent = maskInputFn\n ? maskInputFn(textContent, n.parentNode)\n : textContent.replace(/[\\S]/g, '*');\n }\n if (parentTagName === 'OPTION' && textContent) {\n const isInputMasked = shouldMaskInput({\n type: null,\n tagName: parentTagName,\n maskInputOptions,\n });\n textContent = maskInputValue({\n isMasked: needMaskingText(n, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked),\n element: n,\n value: textContent,\n maskInputFn,\n });\n }\n return {\n type: NodeType$1.Text,\n textContent: textContent || '',\n isStyle,\n rootId,\n };\n}\nfunction serializeElementNode(n, options) {\n const { doc, blockClass, blockSelector, unblockSelector, inlineStylesheet, maskInputOptions = {}, maskAttributeFn, maskInputFn, dataURLOptions = {}, inlineImages, recordCanvas, keepIframeSrcFn, newlyAddedElement = false, rootId, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, } = options;\n const needBlock = _isBlockedElement(n, blockClass, blockSelector, unblockSelector);\n const tagName = getValidTagName(n);\n let attributes = {};\n const len = n.attributes.length;\n for (let i = 0; i < len; i++) {\n const attr = n.attributes[i];\n if (!ignoreAttribute(tagName, attr.name, attr.value)) {\n attributes[attr.name] = transformAttribute(doc, tagName, toLowerCase(attr.name), attr.value, n, maskAttributeFn);\n }\n }\n if (tagName === 'link' && inlineStylesheet) {\n const stylesheet = Array.from(doc.styleSheets).find((s) => {\n return s.href === n.href;\n });\n let cssText = null;\n if (stylesheet) {\n cssText = stringifyStylesheet(stylesheet);\n }\n if (cssText) {\n delete attributes.rel;\n delete attributes.href;\n attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href);\n }\n }\n if (tagName === 'style' &&\n n.sheet &&\n !(n.innerText || n.textContent || '').trim().length) {\n const cssText = stringifyStylesheet(n.sheet);\n if (cssText) {\n attributes._cssText = absoluteToStylesheet(cssText, getHref());\n }\n }\n if (tagName === 'input' ||\n tagName === 'textarea' ||\n tagName === 'select' ||\n tagName === 'option') {\n const el = n;\n const type = getInputType(el);\n const value = getInputValue(el, toUpperCase(tagName), type);\n const checked = el.checked;\n if (type !== 'submit' && type !== 'button' && value) {\n const forceMask = needMaskingText(el, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, shouldMaskInput({\n type,\n tagName: toUpperCase(tagName),\n maskInputOptions,\n }));\n attributes.value = maskInputValue({\n isMasked: forceMask,\n element: el,\n value,\n maskInputFn,\n });\n }\n if (checked) {\n attributes.checked = checked;\n }\n }\n if (tagName === 'option') {\n if (n.selected && !maskInputOptions['select']) {\n attributes.selected = true;\n }\n else {\n delete attributes.selected;\n }\n }\n if (tagName === 'canvas' && recordCanvas) {\n if (n.__context === '2d') {\n if (!is2DCanvasBlank(n)) {\n attributes.rr_dataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n }\n }\n else if (!('__context' in n)) {\n const canvasDataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n const blankCanvas = document.createElement('canvas');\n blankCanvas.width = n.width;\n blankCanvas.height = n.height;\n const blankCanvasDataURL = blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n if (canvasDataURL !== blankCanvasDataURL) {\n attributes.rr_dataURL = canvasDataURL;\n }\n }\n }\n if (tagName === 'img' && inlineImages) {\n if (!canvasService) {\n canvasService = doc.createElement('canvas');\n canvasCtx = canvasService.getContext('2d');\n }\n const image = n;\n const oldValue = image.crossOrigin;\n image.crossOrigin = 'anonymous';\n const recordInlineImage = () => {\n image.removeEventListener('load', recordInlineImage);\n try {\n canvasService.width = image.naturalWidth;\n canvasService.height = image.naturalHeight;\n canvasCtx.drawImage(image, 0, 0);\n attributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality);\n }\n catch (err) {\n console.warn(`Cannot inline img src=${image.currentSrc}! Error: ${err}`);\n }\n oldValue\n ? (attributes.crossOrigin = oldValue)\n : image.removeAttribute('crossorigin');\n };\n if (image.complete && image.naturalWidth !== 0)\n recordInlineImage();\n else\n image.addEventListener('load', recordInlineImage);\n }\n if (tagName === 'audio' || tagName === 'video') {\n attributes.rr_mediaState = n.paused\n ? 'paused'\n : 'played';\n attributes.rr_mediaCurrentTime = n.currentTime;\n }\n if (!newlyAddedElement) {\n if (n.scrollLeft) {\n attributes.rr_scrollLeft = n.scrollLeft;\n }\n if (n.scrollTop) {\n attributes.rr_scrollTop = n.scrollTop;\n }\n }\n if (needBlock) {\n const { width, height } = n.getBoundingClientRect();\n attributes = {\n class: attributes.class,\n rr_width: `${width}px`,\n rr_height: `${height}px`,\n };\n }\n if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {\n if (!n.contentDocument) {\n attributes.rr_src = attributes.src;\n }\n delete attributes.src;\n }\n let isCustomElement;\n try {\n if (customElements.get(tagName))\n isCustomElement = true;\n }\n catch (e) {\n }\n return {\n type: NodeType$1.Element,\n tagName,\n attributes,\n childNodes: [],\n isSVG: isSVGElement(n) || undefined,\n needBlock,\n rootId,\n isCustom: isCustomElement,\n };\n}\nfunction lowerIfExists(maybeAttr) {\n if (maybeAttr === undefined || maybeAttr === null) {\n return '';\n }\n else {\n return maybeAttr.toLowerCase();\n }\n}\nfunction slimDOMExcluded(sn, slimDOMOptions) {\n if (slimDOMOptions.comment && sn.type === NodeType$1.Comment) {\n return true;\n }\n else if (sn.type === NodeType$1.Element) {\n if (slimDOMOptions.script &&\n (sn.tagName === 'script' ||\n (sn.tagName === 'link' &&\n (sn.attributes.rel === 'preload' ||\n sn.attributes.rel === 'modulepreload') &&\n sn.attributes.as === 'script') ||\n (sn.tagName === 'link' &&\n sn.attributes.rel === 'prefetch' &&\n typeof sn.attributes.href === 'string' &&\n sn.attributes.href.endsWith('.js')))) {\n return true;\n }\n else if (slimDOMOptions.headFavicon &&\n ((sn.tagName === 'link' && sn.attributes.rel === 'shortcut icon') ||\n (sn.tagName === 'meta' &&\n (lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) ||\n lowerIfExists(sn.attributes.name) === 'application-name' ||\n lowerIfExists(sn.attributes.rel) === 'icon' ||\n lowerIfExists(sn.attributes.rel) === 'apple-touch-icon' ||\n lowerIfExists(sn.attributes.rel) === 'shortcut icon')))) {\n return true;\n }\n else if (sn.tagName === 'meta') {\n if (slimDOMOptions.headMetaDescKeywords &&\n lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\n return true;\n }\n else if (slimDOMOptions.headMetaSocial &&\n (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) ||\n lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) ||\n lowerIfExists(sn.attributes.name) === 'pinterest')) {\n return true;\n }\n else if (slimDOMOptions.headMetaRobots &&\n (lowerIfExists(sn.attributes.name) === 'robots' ||\n lowerIfExists(sn.attributes.name) === 'googlebot' ||\n lowerIfExists(sn.attributes.name) === 'bingbot')) {\n return true;\n }\n else if (slimDOMOptions.headMetaHttpEquiv &&\n sn.attributes['http-equiv'] !== undefined) {\n return true;\n }\n else if (slimDOMOptions.headMetaAuthorship &&\n (lowerIfExists(sn.attributes.name) === 'author' ||\n lowerIfExists(sn.attributes.name) === 'generator' ||\n lowerIfExists(sn.attributes.name) === 'framework' ||\n lowerIfExists(sn.attributes.name) === 'publisher' ||\n lowerIfExists(sn.attributes.name) === 'progid' ||\n lowerIfExists(sn.attributes.property).match(/^article:/) ||\n lowerIfExists(sn.attributes.property).match(/^product:/))) {\n return true;\n }\n else if (slimDOMOptions.headMetaVerification &&\n (lowerIfExists(sn.attributes.name) === 'google-site-verification' ||\n lowerIfExists(sn.attributes.name) === 'yandex-verification' ||\n lowerIfExists(sn.attributes.name) === 'csrf-token' ||\n lowerIfExists(sn.attributes.name) === 'p:domain_verify' ||\n lowerIfExists(sn.attributes.name) === 'verify-v1' ||\n lowerIfExists(sn.attributes.name) === 'verification' ||\n lowerIfExists(sn.attributes.name) === 'shopify-checkout-api-token')) {\n return true;\n }\n }\n }\n return false;\n}\nfunction serializeNodeWithId(n, options) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, maskAllText, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, skipChild = false, inlineStylesheet = true, maskInputOptions = {}, maskAttributeFn, maskTextFn, maskInputFn, slimDOMOptions, dataURLOptions = {}, inlineImages = false, recordCanvas = false, onSerialize, onIframeLoad, iframeLoadTimeout = 5000, onStylesheetLoad, stylesheetLoadTimeout = 5000, keepIframeSrcFn = () => false, newlyAddedElement = false, } = options;\n let { preserveWhiteSpace = true } = options;\n const _serializedNode = serializeNode(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n keepIframeSrcFn,\n newlyAddedElement,\n });\n if (!_serializedNode) {\n console.warn(n, 'not serialized');\n return null;\n }\n let id;\n if (mirror.hasNode(n)) {\n id = mirror.getId(n);\n }\n else if (slimDOMExcluded(_serializedNode, slimDOMOptions) ||\n (!preserveWhiteSpace &&\n _serializedNode.type === NodeType$1.Text &&\n !_serializedNode.isStyle &&\n !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, '').length)) {\n id = IGNORED_NODE;\n }\n else {\n id = genId();\n }\n const serializedNode = Object.assign(_serializedNode, { id });\n mirror.add(n, serializedNode);\n if (id === IGNORED_NODE) {\n return null;\n }\n if (onSerialize) {\n onSerialize(n);\n }\n let recordChild = !skipChild;\n if (serializedNode.type === NodeType$1.Element) {\n recordChild = recordChild && !serializedNode.needBlock;\n delete serializedNode.needBlock;\n const shadowRoot = n.shadowRoot;\n if (shadowRoot && isNativeShadowDom(shadowRoot))\n serializedNode.isShadowHost = true;\n }\n if ((serializedNode.type === NodeType$1.Document ||\n serializedNode.type === NodeType$1.Element) &&\n recordChild) {\n if (slimDOMOptions.headWhitespace &&\n serializedNode.type === NodeType$1.Element &&\n serializedNode.tagName === 'head') {\n preserveWhiteSpace = false;\n }\n const bypassOptions = {\n doc,\n mirror,\n blockClass,\n blockSelector,\n maskAllText,\n unblockSelector,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n };\n for (const childN of Array.from(n.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n serializedNode.childNodes.push(serializedChildNode);\n }\n }\n if (isElement$1(n) && n.shadowRoot) {\n for (const childN of Array.from(n.shadowRoot.childNodes)) {\n const serializedChildNode = serializeNodeWithId(childN, bypassOptions);\n if (serializedChildNode) {\n isNativeShadowDom(n.shadowRoot) &&\n (serializedChildNode.isShadow = true);\n serializedNode.childNodes.push(serializedChildNode);\n }\n }\n }\n }\n if (n.parentNode &&\n isShadowRoot(n.parentNode) &&\n isNativeShadowDom(n.parentNode)) {\n serializedNode.isShadow = true;\n }\n if (serializedNode.type === NodeType$1.Element &&\n serializedNode.tagName === 'iframe') {\n onceIframeLoaded(n, () => {\n const iframeDoc = n.contentDocument;\n if (iframeDoc && onIframeLoad) {\n const serializedIframeNode = serializeNodeWithId(iframeDoc, {\n doc: iframeDoc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n });\n if (serializedIframeNode) {\n onIframeLoad(n, serializedIframeNode);\n }\n }\n }, iframeLoadTimeout);\n }\n if (serializedNode.type === NodeType$1.Element &&\n serializedNode.tagName === 'link' &&\n serializedNode.attributes.rel === 'stylesheet') {\n onceStylesheetLoaded(n, () => {\n if (onStylesheetLoad) {\n const serializedLinkNode = serializeNodeWithId(n, {\n doc,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n });\n if (serializedLinkNode) {\n onStylesheetLoad(n, serializedLinkNode);\n }\n }\n }, stylesheetLoadTimeout);\n }\n return serializedNode;\n}\nfunction snapshot(n, options) {\n const { mirror = new Mirror(), blockClass = 'rr-block', blockSelector = null, unblockSelector = null, maskAllText = false, maskTextClass = 'rr-mask', unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, inlineImages = false, recordCanvas = false, maskAllInputs = false, maskAttributeFn, maskTextFn, maskInputFn, slimDOM = false, dataURLOptions, preserveWhiteSpace, onSerialize, onIframeLoad, iframeLoadTimeout, onStylesheetLoad, stylesheetLoadTimeout, keepIframeSrcFn = () => false, } = options || {};\n const maskInputOptions = maskAllInputs === true\n ? {\n color: true,\n date: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true,\n }\n : maskAllInputs === false\n ? {}\n : maskAllInputs;\n const slimDOMOptions = slimDOM === true || slimDOM === 'all'\n ?\n {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaDescKeywords: slimDOM === 'all',\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaAuthorship: true,\n headMetaVerification: true,\n }\n : slimDOM === false\n ? {}\n : slimDOM;\n return serializeNodeWithId(n, {\n doc: n,\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n skipChild: false,\n inlineStylesheet,\n maskInputOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n slimDOMOptions,\n dataURLOptions,\n inlineImages,\n recordCanvas,\n preserveWhiteSpace,\n onSerialize,\n onIframeLoad,\n iframeLoadTimeout,\n onStylesheetLoad,\n stylesheetLoadTimeout,\n keepIframeSrcFn,\n newlyAddedElement: false,\n });\n}\n\nfunction on(type, fn, target = document) {\n const options = { capture: true, passive: true };\n target.addEventListener(type, fn, options);\n return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +\n '\\r\\n' +\n 'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +\n '\\r\\n' +\n 'or you can use record.mirror to access the mirror instance during recording.';\nlet _mirror = {\n map: {},\n getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n};\nif (typeof window !== 'undefined' && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get(target, prop, receiver) {\n if (prop === 'map') {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n return Reflect.get(target, prop, receiver);\n },\n });\n}\nfunction throttle$1(func, wait, options = {}) {\n let timeout = null;\n let previous = 0;\n return function (...args) {\n const now = Date.now();\n if (!previous && options.leading === false) {\n previous = now;\n }\n const remaining = wait - (now - previous);\n const context = this;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n func.apply(context, args);\n }\n else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(() => {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n func.apply(context, args);\n }, remaining);\n }\n };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n const original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(target, key, isRevoked\n ? d\n : {\n set(value) {\n setTimeout(() => {\n d.set.call(this, value);\n }, 0);\n if (original && original.set) {\n original.set.call(this, value);\n }\n },\n });\n return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === 'function') {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original,\n },\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n }\n catch (_a) {\n return () => {\n };\n }\n}\nlet nowTimestamp = Date.now;\nif (!(/[1-9][0-9]{12}/.test(Date.now().toString()))) {\n nowTimestamp = () => new Date().getTime();\n}\nfunction getWindowScroll(win) {\n var _a, _b, _c, _d, _e, _f;\n const doc = win.document;\n return {\n left: doc.scrollingElement\n ? doc.scrollingElement.scrollLeft\n : win.pageXOffset !== undefined\n ? win.pageXOffset\n : (doc === null || doc === void 0 ? void 0 : doc.documentElement.scrollLeft) ||\n ((_b = (_a = doc === null || doc === void 0 ? void 0 : doc.body) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.scrollLeft) ||\n ((_c = doc === null || doc === void 0 ? void 0 : doc.body) === null || _c === void 0 ? void 0 : _c.scrollLeft) ||\n 0,\n top: doc.scrollingElement\n ? doc.scrollingElement.scrollTop\n : win.pageYOffset !== undefined\n ? win.pageYOffset\n : (doc === null || doc === void 0 ? void 0 : doc.documentElement.scrollTop) ||\n ((_e = (_d = doc === null || doc === void 0 ? void 0 : doc.body) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.scrollTop) ||\n ((_f = doc === null || doc === void 0 ? void 0 : doc.body) === null || _f === void 0 ? void 0 : _f.scrollTop) ||\n 0,\n };\n}\nfunction getWindowHeight() {\n return (window.innerHeight ||\n (document.documentElement && document.documentElement.clientHeight) ||\n (document.body && document.body.clientHeight));\n}\nfunction getWindowWidth() {\n return (window.innerWidth ||\n (document.documentElement && document.documentElement.clientWidth) ||\n (document.body && document.body.clientWidth));\n}\nfunction isBlocked(node, blockClass, blockSelector, unblockSelector, checkAncestors) {\n if (!node) {\n return false;\n }\n const el = node.nodeType === node.ELEMENT_NODE\n ? node\n : node.parentElement;\n if (!el)\n return false;\n const blockedPredicate = createMatchPredicate(blockClass, blockSelector);\n if (!checkAncestors) {\n const isUnblocked = unblockSelector && el.matches(unblockSelector);\n return blockedPredicate(el) && !isUnblocked;\n }\n const blockDistance = distanceToMatch(el, blockedPredicate);\n let unblockDistance = -1;\n if (blockDistance < 0) {\n return false;\n }\n if (unblockSelector) {\n unblockDistance = distanceToMatch(el, createMatchPredicate(null, unblockSelector));\n }\n if (blockDistance > -1 && unblockDistance < 0) {\n return true;\n }\n return blockDistance < unblockDistance;\n}\nfunction isSerialized(n, mirror) {\n return mirror.getId(n) !== -1;\n}\nfunction isIgnored(n, mirror) {\n return mirror.getId(n) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror) {\n if (isShadowRoot(target)) {\n return false;\n }\n const id = mirror.getId(target);\n if (!mirror.has(id)) {\n return true;\n }\n if (target.parentNode &&\n target.parentNode.nodeType === target.DOCUMENT_NODE) {\n return false;\n }\n if (!target.parentNode) {\n return true;\n }\n return isAncestorRemoved(target.parentNode, mirror);\n}\nfunction legacy_isTouchEvent(event) {\n return Boolean(event.changedTouches);\n}\nfunction polyfill(win = window) {\n if ('NodeList' in win && !win.NodeList.prototype.forEach) {\n win.NodeList.prototype.forEach = Array.prototype\n .forEach;\n }\n if ('DOMTokenList' in win && !win.DOMTokenList.prototype.forEach) {\n win.DOMTokenList.prototype.forEach = Array.prototype\n .forEach;\n }\n if (!Node.prototype.contains) {\n Node.prototype.contains = (...args) => {\n let node = args[0];\n if (!(0 in args)) {\n throw new TypeError('1 argument is required');\n }\n do {\n if (this === node) {\n return true;\n }\n } while ((node = node && node.parentNode));\n return false;\n };\n }\n}\nfunction isSerializedIframe(n, mirror) {\n return Boolean(n.nodeName === 'IFRAME' && mirror.getMeta(n));\n}\nfunction isSerializedStylesheet(n, mirror) {\n return Boolean(n.nodeName === 'LINK' &&\n n.nodeType === n.ELEMENT_NODE &&\n n.getAttribute &&\n n.getAttribute('rel') === 'stylesheet' &&\n mirror.getMeta(n));\n}\nfunction hasShadowRoot(n) {\n return Boolean(n === null || n === void 0 ? void 0 : n.shadowRoot);\n}\nclass StyleSheetMirror {\n constructor() {\n this.id = 1;\n this.styleIDMap = new WeakMap();\n this.idStyleMap = new Map();\n }\n getId(stylesheet) {\n var _a;\n return (_a = this.styleIDMap.get(stylesheet)) !== null && _a !== void 0 ? _a : -1;\n }\n has(stylesheet) {\n return this.styleIDMap.has(stylesheet);\n }\n add(stylesheet, id) {\n if (this.has(stylesheet))\n return this.getId(stylesheet);\n let newId;\n if (id === undefined) {\n newId = this.id++;\n }\n else\n newId = id;\n this.styleIDMap.set(stylesheet, newId);\n this.idStyleMap.set(newId, stylesheet);\n return newId;\n }\n getStyle(id) {\n return this.idStyleMap.get(id) || null;\n }\n reset() {\n this.styleIDMap = new WeakMap();\n this.idStyleMap = new Map();\n this.id = 1;\n }\n generateId() {\n return this.id++;\n }\n}\nfunction getShadowHost(n) {\n var _a, _b;\n let shadowHost = null;\n if (((_b = (_a = n.getRootNode) === null || _a === void 0 ? void 0 : _a.call(n)) === null || _b === void 0 ? void 0 : _b.nodeType) === Node.DOCUMENT_FRAGMENT_NODE &&\n n.getRootNode().host)\n shadowHost = n.getRootNode().host;\n return shadowHost;\n}\nfunction getRootShadowHost(n) {\n let rootShadowHost = n;\n let shadowHost;\n while ((shadowHost = getShadowHost(rootShadowHost)))\n rootShadowHost = shadowHost;\n return rootShadowHost;\n}\nfunction shadowHostInDom(n) {\n const doc = n.ownerDocument;\n if (!doc)\n return false;\n const shadowHost = getRootShadowHost(n);\n return doc.contains(shadowHost);\n}\nfunction inDom(n) {\n const doc = n.ownerDocument;\n if (!doc)\n return false;\n return doc.contains(n) || shadowHostInDom(n);\n}\n\nvar EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n IncrementalSource2[IncrementalSource2[\"CustomElement\"] = 16] = \"CustomElement\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar PointerTypes = /* @__PURE__ */ ((PointerTypes2) => {\n PointerTypes2[PointerTypes2[\"Mouse\"] = 0] = \"Mouse\";\n PointerTypes2[PointerTypes2[\"Pen\"] = 1] = \"Pen\";\n PointerTypes2[PointerTypes2[\"Touch\"] = 2] = \"Touch\";\n return PointerTypes2;\n})(PointerTypes || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\n\nfunction isNodeInLinkedList(n) {\n return '__ln' in n;\n}\nclass DoubleLinkedList {\n constructor() {\n this.length = 0;\n this.head = null;\n this.tail = null;\n }\n get(position) {\n if (position >= this.length) {\n throw new Error('Position outside of list range');\n }\n let current = this.head;\n for (let index = 0; index < position; index++) {\n current = (current === null || current === void 0 ? void 0 : current.next) || null;\n }\n return current;\n }\n addNode(n) {\n const node = {\n value: n,\n previous: null,\n next: null,\n };\n n.__ln = node;\n if (n.previousSibling && isNodeInLinkedList(n.previousSibling)) {\n const current = n.previousSibling.__ln.next;\n node.next = current;\n node.previous = n.previousSibling.__ln;\n n.previousSibling.__ln.next = node;\n if (current) {\n current.previous = node;\n }\n }\n else if (n.nextSibling &&\n isNodeInLinkedList(n.nextSibling) &&\n n.nextSibling.__ln.previous) {\n const current = n.nextSibling.__ln.previous;\n node.previous = current;\n node.next = n.nextSibling.__ln;\n n.nextSibling.__ln.previous = node;\n if (current) {\n current.next = node;\n }\n }\n else {\n if (this.head) {\n this.head.previous = node;\n }\n node.next = this.head;\n this.head = node;\n }\n if (node.next === null) {\n this.tail = node;\n }\n this.length++;\n }\n removeNode(n) {\n const current = n.__ln;\n if (!this.head) {\n return;\n }\n if (!current.previous) {\n this.head = current.next;\n if (this.head) {\n this.head.previous = null;\n }\n else {\n this.tail = null;\n }\n }\n else {\n current.previous.next = current.next;\n if (current.next) {\n current.next.previous = current.previous;\n }\n else {\n this.tail = current.previous;\n }\n }\n if (n.__ln) {\n delete n.__ln;\n }\n this.length--;\n }\n}\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\nclass MutationBuffer {\n constructor() {\n this.frozen = false;\n this.locked = false;\n this.texts = [];\n this.attributes = [];\n this.removes = [];\n this.mapRemoves = [];\n this.movedMap = {};\n this.addedSet = new Set();\n this.movedSet = new Set();\n this.droppedSet = new Set();\n this.processMutations = (mutations) => {\n mutations.forEach(this.processMutation);\n this.emit();\n };\n this.emit = () => {\n if (this.frozen || this.locked) {\n return;\n }\n const adds = [];\n const addedIds = new Set();\n const addList = new DoubleLinkedList();\n const getNextId = (n) => {\n let ns = n;\n let nextId = IGNORED_NODE;\n while (nextId === IGNORED_NODE) {\n ns = ns && ns.nextSibling;\n nextId = ns && this.mirror.getId(ns);\n }\n return nextId;\n };\n const pushAdd = (n) => {\n if (!n.parentNode || !inDom(n)) {\n return;\n }\n const parentId = isShadowRoot(n.parentNode)\n ? this.mirror.getId(getShadowHost(n))\n : this.mirror.getId(n.parentNode);\n const nextId = getNextId(n);\n if (parentId === -1 || nextId === -1) {\n return addList.addNode(n);\n }\n const sn = serializeNodeWithId(n, {\n doc: this.doc,\n mirror: this.mirror,\n blockClass: this.blockClass,\n blockSelector: this.blockSelector,\n maskAllText: this.maskAllText,\n unblockSelector: this.unblockSelector,\n maskTextClass: this.maskTextClass,\n unmaskTextClass: this.unmaskTextClass,\n maskTextSelector: this.maskTextSelector,\n unmaskTextSelector: this.unmaskTextSelector,\n skipChild: true,\n newlyAddedElement: true,\n inlineStylesheet: this.inlineStylesheet,\n maskInputOptions: this.maskInputOptions,\n maskAttributeFn: this.maskAttributeFn,\n maskTextFn: this.maskTextFn,\n maskInputFn: this.maskInputFn,\n slimDOMOptions: this.slimDOMOptions,\n dataURLOptions: this.dataURLOptions,\n recordCanvas: this.recordCanvas,\n inlineImages: this.inlineImages,\n onSerialize: (currentN) => {\n if (isSerializedIframe(currentN, this.mirror)) {\n this.iframeManager.addIframe(currentN);\n }\n if (isSerializedStylesheet(currentN, this.mirror)) {\n this.stylesheetManager.trackLinkElement(currentN);\n }\n if (hasShadowRoot(n)) {\n this.shadowDomManager.addShadowRoot(n.shadowRoot, this.doc);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n this.iframeManager.attachIframe(iframe, childSn);\n this.shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (link, childSn) => {\n this.stylesheetManager.attachLinkElement(link, childSn);\n },\n });\n if (sn) {\n adds.push({\n parentId,\n nextId,\n node: sn,\n });\n addedIds.add(sn.id);\n }\n };\n while (this.mapRemoves.length) {\n this.mirror.removeNodeFromMap(this.mapRemoves.shift());\n }\n for (const n of this.movedSet) {\n if (isParentRemoved(this.removes, n, this.mirror) &&\n !this.movedSet.has(n.parentNode)) {\n continue;\n }\n pushAdd(n);\n }\n for (const n of this.addedSet) {\n if (!isAncestorInSet(this.droppedSet, n) &&\n !isParentRemoved(this.removes, n, this.mirror)) {\n pushAdd(n);\n }\n else if (isAncestorInSet(this.movedSet, n)) {\n pushAdd(n);\n }\n else {\n this.droppedSet.add(n);\n }\n }\n let candidate = null;\n while (addList.length) {\n let node = null;\n if (candidate) {\n const parentId = this.mirror.getId(candidate.value.parentNode);\n const nextId = getNextId(candidate.value);\n if (parentId !== -1 && nextId !== -1) {\n node = candidate;\n }\n }\n if (!node) {\n let tailNode = addList.tail;\n while (tailNode) {\n const _node = tailNode;\n tailNode = tailNode.previous;\n if (_node) {\n const parentId = this.mirror.getId(_node.value.parentNode);\n const nextId = getNextId(_node.value);\n if (nextId === -1)\n continue;\n else if (parentId !== -1) {\n node = _node;\n break;\n }\n else {\n const unhandledNode = _node.value;\n if (unhandledNode.parentNode &&\n unhandledNode.parentNode.nodeType ===\n Node.DOCUMENT_FRAGMENT_NODE) {\n const shadowHost = unhandledNode.parentNode\n .host;\n const parentId = this.mirror.getId(shadowHost);\n if (parentId !== -1) {\n node = _node;\n break;\n }\n }\n }\n }\n }\n }\n if (!node) {\n while (addList.head) {\n addList.removeNode(addList.head.value);\n }\n break;\n }\n candidate = node.previous;\n addList.removeNode(node.value);\n pushAdd(node.value);\n }\n const payload = {\n texts: this.texts\n .map((text) => ({\n id: this.mirror.getId(text.node),\n value: text.value,\n }))\n .filter((text) => !addedIds.has(text.id))\n .filter((text) => this.mirror.has(text.id)),\n attributes: this.attributes\n .map((attribute) => {\n const { attributes } = attribute;\n if (typeof attributes.style === 'string') {\n const diffAsStr = JSON.stringify(attribute.styleDiff);\n const unchangedAsStr = JSON.stringify(attribute._unchangedStyles);\n if (diffAsStr.length < attributes.style.length) {\n if ((diffAsStr + unchangedAsStr).split('var(').length ===\n attributes.style.split('var(').length) {\n attributes.style = attribute.styleDiff;\n }\n }\n }\n return {\n id: this.mirror.getId(attribute.node),\n attributes: attributes,\n };\n })\n .filter((attribute) => !addedIds.has(attribute.id))\n .filter((attribute) => this.mirror.has(attribute.id)),\n removes: this.removes,\n adds,\n };\n if (!payload.texts.length &&\n !payload.attributes.length &&\n !payload.removes.length &&\n !payload.adds.length) {\n return;\n }\n this.texts = [];\n this.attributes = [];\n this.removes = [];\n this.addedSet = new Set();\n this.movedSet = new Set();\n this.droppedSet = new Set();\n this.movedMap = {};\n this.mutationCb(payload);\n };\n this.processMutation = (m) => {\n if (isIgnored(m.target, this.mirror)) {\n return;\n }\n let unattachedDoc;\n try {\n unattachedDoc = document.implementation.createHTMLDocument();\n }\n catch (e) {\n unattachedDoc = this.doc;\n }\n switch (m.type) {\n case 'characterData': {\n const value = m.target.textContent;\n if (!isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) &&\n value !== m.oldValue) {\n this.texts.push({\n value: needMaskingText(m.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, this.maskAllText) && value\n ? this.maskTextFn\n ? this.maskTextFn(value)\n : value.replace(/[\\S]/g, '*')\n : value,\n node: m.target,\n });\n }\n break;\n }\n case 'attributes': {\n const target = m.target;\n let attributeName = m.attributeName;\n let value = m.target.getAttribute(attributeName);\n if (attributeName === 'value') {\n const type = getInputType(target);\n const tagName = target.tagName;\n value = getInputValue(target, tagName, type);\n const isInputMasked = shouldMaskInput({\n maskInputOptions: this.maskInputOptions,\n tagName,\n type,\n });\n const forceMask = needMaskingText(m.target, this.maskTextClass, this.maskTextSelector, this.unmaskTextClass, this.unmaskTextSelector, isInputMasked);\n value = maskInputValue({\n isMasked: forceMask,\n element: target,\n value,\n maskInputFn: this.maskInputFn,\n });\n }\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) ||\n value === m.oldValue) {\n return;\n }\n let item = this.attributes.find((a) => a.node === m.target);\n if (target.tagName === 'IFRAME' &&\n attributeName === 'src' &&\n !this.keepIframeSrcFn(value)) {\n if (!target.contentDocument) {\n attributeName = 'rr_src';\n }\n else {\n return;\n }\n }\n if (!item) {\n item = {\n node: m.target,\n attributes: {},\n styleDiff: {},\n _unchangedStyles: {},\n };\n this.attributes.push(item);\n }\n if (attributeName === 'type' &&\n target.tagName === 'INPUT' &&\n (m.oldValue || '').toLowerCase() === 'password') {\n target.setAttribute('data-rr-is-password', 'true');\n }\n if (!ignoreAttribute(target.tagName, attributeName)) {\n item.attributes[attributeName] = transformAttribute(this.doc, toLowerCase(target.tagName), toLowerCase(attributeName), value, target, this.maskAttributeFn);\n if (attributeName === 'style') {\n const old = unattachedDoc.createElement('span');\n if (m.oldValue) {\n old.setAttribute('style', m.oldValue);\n }\n for (const pname of Array.from(target.style)) {\n const newValue = target.style.getPropertyValue(pname);\n const newPriority = target.style.getPropertyPriority(pname);\n if (newValue !== old.style.getPropertyValue(pname) ||\n newPriority !== old.style.getPropertyPriority(pname)) {\n if (newPriority === '') {\n item.styleDiff[pname] = newValue;\n }\n else {\n item.styleDiff[pname] = [newValue, newPriority];\n }\n }\n else {\n item._unchangedStyles[pname] = [newValue, newPriority];\n }\n }\n for (const pname of Array.from(old.style)) {\n if (target.style.getPropertyValue(pname) === '') {\n item.styleDiff[pname] = false;\n }\n }\n }\n }\n break;\n }\n case 'childList': {\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, true)) {\n return;\n }\n m.addedNodes.forEach((n) => this.genAdds(n, m.target));\n m.removedNodes.forEach((n) => {\n const nodeId = this.mirror.getId(n);\n const parentId = isShadowRoot(m.target)\n ? this.mirror.getId(m.target.host)\n : this.mirror.getId(m.target);\n if (isBlocked(m.target, this.blockClass, this.blockSelector, this.unblockSelector, false) ||\n isIgnored(n, this.mirror) ||\n !isSerialized(n, this.mirror)) {\n return;\n }\n if (this.addedSet.has(n)) {\n deepDelete(this.addedSet, n);\n this.droppedSet.add(n);\n }\n else if (this.addedSet.has(m.target) && nodeId === -1) ;\n else if (isAncestorRemoved(m.target, this.mirror)) ;\n else if (this.movedSet.has(n) &&\n this.movedMap[moveKey(nodeId, parentId)]) {\n deepDelete(this.movedSet, n);\n }\n else {\n this.removes.push({\n parentId,\n id: nodeId,\n isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target)\n ? true\n : undefined,\n });\n }\n this.mapRemoves.push(n);\n });\n break;\n }\n }\n };\n this.genAdds = (n, target) => {\n if (this.processedNodeManager.inOtherBuffer(n, this))\n return;\n if (this.addedSet.has(n) || this.movedSet.has(n))\n return;\n if (this.mirror.hasNode(n)) {\n if (isIgnored(n, this.mirror)) {\n return;\n }\n this.movedSet.add(n);\n let targetId = null;\n if (target && this.mirror.hasNode(target)) {\n targetId = this.mirror.getId(target);\n }\n if (targetId && targetId !== -1) {\n this.movedMap[moveKey(this.mirror.getId(n), targetId)] = true;\n }\n }\n else {\n this.addedSet.add(n);\n this.droppedSet.delete(n);\n }\n if (!isBlocked(n, this.blockClass, this.blockSelector, this.unblockSelector, false)) {\n n.childNodes.forEach((childN) => this.genAdds(childN));\n if (hasShadowRoot(n)) {\n n.shadowRoot.childNodes.forEach((childN) => {\n this.processedNodeManager.add(childN, this);\n this.genAdds(childN, n);\n });\n }\n }\n };\n }\n init(options) {\n [\n 'mutationCb',\n 'blockClass',\n 'blockSelector',\n 'unblockSelector',\n 'maskAllText',\n 'maskTextClass',\n 'unmaskTextClass',\n 'maskTextSelector',\n 'unmaskTextSelector',\n 'inlineStylesheet',\n 'maskInputOptions',\n 'maskAttributeFn',\n 'maskTextFn',\n 'maskInputFn',\n 'keepIframeSrcFn',\n 'recordCanvas',\n 'inlineImages',\n 'slimDOMOptions',\n 'dataURLOptions',\n 'doc',\n 'mirror',\n 'iframeManager',\n 'stylesheetManager',\n 'shadowDomManager',\n 'canvasManager',\n 'processedNodeManager',\n ].forEach((key) => {\n this[key] = options[key];\n });\n }\n freeze() {\n this.frozen = true;\n this.canvasManager.freeze();\n }\n unfreeze() {\n this.frozen = false;\n this.canvasManager.unfreeze();\n this.emit();\n }\n isFrozen() {\n return this.frozen;\n }\n lock() {\n this.locked = true;\n this.canvasManager.lock();\n }\n unlock() {\n this.locked = false;\n this.canvasManager.unlock();\n this.emit();\n }\n reset() {\n this.shadowDomManager.reset();\n this.canvasManager.reset();\n }\n}\nfunction deepDelete(addsSet, n) {\n addsSet.delete(n);\n n.childNodes.forEach((childN) => deepDelete(addsSet, childN));\n}\nfunction isParentRemoved(removes, n, mirror) {\n if (removes.length === 0)\n return false;\n return _isParentRemoved(removes, n, mirror);\n}\nfunction _isParentRemoved(removes, n, mirror) {\n const { parentNode } = n;\n if (!parentNode) {\n return false;\n }\n const parentId = mirror.getId(parentNode);\n if (removes.some((r) => r.id === parentId)) {\n return true;\n }\n return _isParentRemoved(removes, parentNode, mirror);\n}\nfunction isAncestorInSet(set, n) {\n if (set.size === 0)\n return false;\n return _isAncestorInSet(set, n);\n}\nfunction _isAncestorInSet(set, n) {\n const { parentNode } = n;\n if (!parentNode) {\n return false;\n }\n if (set.has(parentNode)) {\n return true;\n }\n return _isAncestorInSet(set, parentNode);\n}\n\nlet errorHandler;\nfunction registerErrorHandler(handler) {\n errorHandler = handler;\n}\nfunction unregisterErrorHandler() {\n errorHandler = undefined;\n}\nconst callbackWrapper = (cb) => {\n if (!errorHandler) {\n return cb;\n }\n const rrwebWrapped = ((...rest) => {\n try {\n return cb(...rest);\n }\n catch (error) {\n if (errorHandler && errorHandler(error) === true) {\n return () => {\n };\n }\n throw error;\n }\n });\n return rrwebWrapped;\n};\n\nconst mutationBuffers = [];\nfunction getEventTarget(event) {\n try {\n if ('composedPath' in event) {\n const path = event.composedPath();\n if (path.length) {\n return path[0];\n }\n }\n else if ('path' in event && event.path.length) {\n return event.path[0];\n }\n }\n catch (_a) {\n }\n return event && event.target;\n}\nfunction initMutationObserver(options, rootEl) {\n var _a, _b;\n const mutationBuffer = new MutationBuffer();\n mutationBuffers.push(mutationBuffer);\n mutationBuffer.init(options);\n let mutationObserverCtor = window.MutationObserver ||\n window.__rrMutationObserver;\n const angularZoneSymbol = (_b = (_a = window === null || window === void 0 ? void 0 : window.Zone) === null || _a === void 0 ? void 0 : _a.__symbol__) === null || _b === void 0 ? void 0 : _b.call(_a, 'MutationObserver');\n if (angularZoneSymbol &&\n window[angularZoneSymbol]) {\n mutationObserverCtor = window[angularZoneSymbol];\n }\n const observer = new mutationObserverCtor(callbackWrapper((mutations) => {\n if (options.onMutation && options.onMutation(mutations) === false) {\n return;\n }\n mutationBuffer.processMutations.bind(mutationBuffer)(mutations);\n }));\n observer.observe(rootEl, {\n attributes: true,\n attributeOldValue: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true,\n });\n return observer;\n}\nfunction initMoveObserver({ mousemoveCb, sampling, doc, mirror, }) {\n if (sampling.mousemove === false) {\n return () => {\n };\n }\n const threshold = typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;\n const callbackThreshold = typeof sampling.mousemoveCallback === 'number'\n ? sampling.mousemoveCallback\n : 500;\n let positions = [];\n let timeBaseline;\n const wrappedCb = throttle$1(callbackWrapper((source) => {\n const totalOffset = Date.now() - timeBaseline;\n mousemoveCb(positions.map((p) => {\n p.timeOffset -= totalOffset;\n return p;\n }), source);\n positions = [];\n timeBaseline = null;\n }), callbackThreshold);\n const updatePosition = callbackWrapper(throttle$1(callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n const { clientX, clientY } = legacy_isTouchEvent(evt)\n ? evt.changedTouches[0]\n : evt;\n if (!timeBaseline) {\n timeBaseline = nowTimestamp();\n }\n positions.push({\n x: clientX,\n y: clientY,\n id: mirror.getId(target),\n timeOffset: nowTimestamp() - timeBaseline,\n });\n wrappedCb(typeof DragEvent !== 'undefined' && evt instanceof DragEvent\n ? IncrementalSource.Drag\n : evt instanceof MouseEvent\n ? IncrementalSource.MouseMove\n : IncrementalSource.TouchMove);\n }), threshold, {\n trailing: false,\n }));\n const handlers = [\n on('mousemove', updatePosition, doc),\n on('touchmove', updatePosition, doc),\n on('drag', updatePosition, doc),\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initMouseInteractionObserver({ mouseInteractionCb, doc, mirror, blockClass, blockSelector, unblockSelector, sampling, }) {\n if (sampling.mouseInteraction === false) {\n return () => {\n };\n }\n const disableMap = sampling.mouseInteraction === true ||\n sampling.mouseInteraction === undefined\n ? {}\n : sampling.mouseInteraction;\n const handlers = [];\n let currentPointerType = null;\n const getHandler = (eventKey) => {\n return (event) => {\n const target = getEventTarget(event);\n if (isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n let pointerType = null;\n let thisEventKey = eventKey;\n if ('pointerType' in event) {\n switch (event.pointerType) {\n case 'mouse':\n pointerType = PointerTypes.Mouse;\n break;\n case 'touch':\n pointerType = PointerTypes.Touch;\n break;\n case 'pen':\n pointerType = PointerTypes.Pen;\n break;\n }\n if (pointerType === PointerTypes.Touch) {\n if (MouseInteractions[eventKey] === MouseInteractions.MouseDown) {\n thisEventKey = 'TouchStart';\n }\n else if (MouseInteractions[eventKey] === MouseInteractions.MouseUp) {\n thisEventKey = 'TouchEnd';\n }\n }\n else if (pointerType === PointerTypes.Pen) ;\n }\n else if (legacy_isTouchEvent(event)) {\n pointerType = PointerTypes.Touch;\n }\n if (pointerType !== null) {\n currentPointerType = pointerType;\n if ((thisEventKey.startsWith('Touch') &&\n pointerType === PointerTypes.Touch) ||\n (thisEventKey.startsWith('Mouse') &&\n pointerType === PointerTypes.Mouse)) {\n pointerType = null;\n }\n }\n else if (MouseInteractions[eventKey] === MouseInteractions.Click) {\n pointerType = currentPointerType;\n currentPointerType = null;\n }\n const e = legacy_isTouchEvent(event) ? event.changedTouches[0] : event;\n if (!e) {\n return;\n }\n const id = mirror.getId(target);\n const { clientX, clientY } = e;\n callbackWrapper(mouseInteractionCb)(Object.assign({ type: MouseInteractions[thisEventKey], id, x: clientX, y: clientY }, (pointerType !== null && { pointerType })));\n };\n };\n Object.keys(MouseInteractions)\n .filter((key) => Number.isNaN(Number(key)) &&\n !key.endsWith('_Departed') &&\n disableMap[key] !== false)\n .forEach((eventKey) => {\n let eventName = toLowerCase(eventKey);\n const handler = getHandler(eventKey);\n if (window.PointerEvent) {\n switch (MouseInteractions[eventKey]) {\n case MouseInteractions.MouseDown:\n case MouseInteractions.MouseUp:\n eventName = eventName.replace('mouse', 'pointer');\n break;\n case MouseInteractions.TouchStart:\n case MouseInteractions.TouchEnd:\n return;\n }\n }\n handlers.push(on(eventName, handler, doc));\n });\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initScrollObserver({ scrollCb, doc, mirror, blockClass, blockSelector, unblockSelector, sampling, }) {\n const updatePosition = callbackWrapper(throttle$1(callbackWrapper((evt) => {\n const target = getEventTarget(evt);\n if (!target ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const id = mirror.getId(target);\n if (target === doc && doc.defaultView) {\n const scrollLeftTop = getWindowScroll(doc.defaultView);\n scrollCb({\n id,\n x: scrollLeftTop.left,\n y: scrollLeftTop.top,\n });\n }\n else {\n scrollCb({\n id,\n x: target.scrollLeft,\n y: target.scrollTop,\n });\n }\n }), sampling.scroll || 100));\n return on('scroll', updatePosition, doc);\n}\nfunction initViewportResizeObserver({ viewportResizeCb }, { win }) {\n let lastH = -1;\n let lastW = -1;\n const updateDimension = callbackWrapper(throttle$1(callbackWrapper(() => {\n const height = getWindowHeight();\n const width = getWindowWidth();\n if (lastH !== height || lastW !== width) {\n viewportResizeCb({\n width: Number(width),\n height: Number(height),\n });\n lastH = height;\n lastW = width;\n }\n }), 200));\n return on('resize', updateDimension, win);\n}\nfunction wrapEventWithUserTriggeredFlag(v, enable) {\n const value = Object.assign({}, v);\n if (!enable)\n delete value.userTriggered;\n return value;\n}\nconst INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];\nconst lastInputValueMap = new WeakMap();\nfunction initInputObserver({ inputCb, doc, mirror, blockClass, blockSelector, unblockSelector, ignoreClass, ignoreSelector, maskInputOptions, maskInputFn, sampling, userTriggeredOnInput, maskTextClass, unmaskTextClass, maskTextSelector, unmaskTextSelector, }) {\n function eventHandler(event) {\n let target = getEventTarget(event);\n const userTriggered = event.isTrusted;\n const tagName = target && toUpperCase(target.tagName);\n if (tagName === 'OPTION')\n target = target.parentElement;\n if (!target ||\n !tagName ||\n INPUT_TAGS.indexOf(tagName) < 0 ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const el = target;\n if (el.classList.contains(ignoreClass) ||\n (ignoreSelector && el.matches(ignoreSelector))) {\n return;\n }\n const type = getInputType(target);\n let text = getInputValue(el, tagName, type);\n let isChecked = false;\n const isInputMasked = shouldMaskInput({\n maskInputOptions,\n tagName,\n type,\n });\n const forceMask = needMaskingText(target, maskTextClass, maskTextSelector, unmaskTextClass, unmaskTextSelector, isInputMasked);\n if (type === 'radio' || type === 'checkbox') {\n isChecked = target.checked;\n }\n text = maskInputValue({\n isMasked: forceMask,\n element: target,\n value: text,\n maskInputFn,\n });\n cbWithDedup(target, callbackWrapper(wrapEventWithUserTriggeredFlag)({ text, isChecked, userTriggered }, userTriggeredOnInput));\n const name = target.name;\n if (type === 'radio' && name && isChecked) {\n doc\n .querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`)\n .forEach((el) => {\n if (el !== target) {\n const text = maskInputValue({\n isMasked: forceMask,\n element: el,\n value: getInputValue(el, tagName, type),\n maskInputFn,\n });\n cbWithDedup(el, callbackWrapper(wrapEventWithUserTriggeredFlag)({\n text,\n isChecked: !isChecked,\n userTriggered: false,\n }, userTriggeredOnInput));\n }\n });\n }\n }\n function cbWithDedup(target, v) {\n const lastInputValue = lastInputValueMap.get(target);\n if (!lastInputValue ||\n lastInputValue.text !== v.text ||\n lastInputValue.isChecked !== v.isChecked) {\n lastInputValueMap.set(target, v);\n const id = mirror.getId(target);\n callbackWrapper(inputCb)(Object.assign(Object.assign({}, v), { id }));\n }\n }\n const events = sampling.input === 'last' ? ['change'] : ['input', 'change'];\n const handlers = events.map((eventName) => on(eventName, callbackWrapper(eventHandler), doc));\n const currentWindow = doc.defaultView;\n if (!currentWindow) {\n return () => {\n handlers.forEach((h) => h());\n };\n }\n const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, 'value');\n const hookProperties = [\n [currentWindow.HTMLInputElement.prototype, 'value'],\n [currentWindow.HTMLInputElement.prototype, 'checked'],\n [currentWindow.HTMLSelectElement.prototype, 'value'],\n [currentWindow.HTMLTextAreaElement.prototype, 'value'],\n [currentWindow.HTMLSelectElement.prototype, 'selectedIndex'],\n [currentWindow.HTMLOptionElement.prototype, 'selected'],\n ];\n if (propertyDescriptor && propertyDescriptor.set) {\n handlers.push(...hookProperties.map((p) => hookSetter(p[0], p[1], {\n set() {\n callbackWrapper(eventHandler)({\n target: this,\n isTrusted: false,\n });\n },\n }, false, currentWindow)));\n }\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction getNestedCSSRulePositions(rule) {\n const positions = [];\n function recurse(childRule, pos) {\n if ((hasNestedCSSRule('CSSGroupingRule') &&\n childRule.parentRule instanceof CSSGroupingRule) ||\n (hasNestedCSSRule('CSSMediaRule') &&\n childRule.parentRule instanceof CSSMediaRule) ||\n (hasNestedCSSRule('CSSSupportsRule') &&\n childRule.parentRule instanceof CSSSupportsRule) ||\n (hasNestedCSSRule('CSSConditionRule') &&\n childRule.parentRule instanceof CSSConditionRule)) {\n const rules = Array.from(childRule.parentRule.cssRules);\n const index = rules.indexOf(childRule);\n pos.unshift(index);\n }\n else if (childRule.parentStyleSheet) {\n const rules = Array.from(childRule.parentStyleSheet.cssRules);\n const index = rules.indexOf(childRule);\n pos.unshift(index);\n }\n return pos;\n }\n return recurse(rule, positions);\n}\nfunction getIdAndStyleId(sheet, mirror, styleMirror) {\n let id, styleId;\n if (!sheet)\n return {};\n if (sheet.ownerNode)\n id = mirror.getId(sheet.ownerNode);\n else\n styleId = styleMirror.getId(sheet);\n return {\n styleId,\n id,\n };\n}\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror, stylesheetManager }, { win }) {\n if (!win.CSSStyleSheet || !win.CSSStyleSheet.prototype) {\n return () => {\n };\n }\n const insertRule = win.CSSStyleSheet.prototype.insertRule;\n win.CSSStyleSheet.prototype.insertRule = new Proxy(insertRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [{ rule, index }],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\n win.CSSStyleSheet.prototype.deleteRule = new Proxy(deleteRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [{ index }],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n let replace;\n if (win.CSSStyleSheet.prototype.replace) {\n replace = win.CSSStyleSheet.prototype.replace;\n win.CSSStyleSheet.prototype.replace = new Proxy(replace, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n replace: text,\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n }\n let replaceSync;\n if (win.CSSStyleSheet.prototype.replaceSync) {\n replaceSync = win.CSSStyleSheet.prototype.replaceSync;\n win.CSSStyleSheet.prototype.replaceSync = new Proxy(replaceSync, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [text] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n replaceSync: text,\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n }\n const supportedNestedCSSRuleTypes = {};\n if (canMonkeyPatchNestedCSSRule('CSSGroupingRule')) {\n supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\n }\n else {\n if (canMonkeyPatchNestedCSSRule('CSSMediaRule')) {\n supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\n }\n if (canMonkeyPatchNestedCSSRule('CSSConditionRule')) {\n supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\n }\n if (canMonkeyPatchNestedCSSRule('CSSSupportsRule')) {\n supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\n }\n }\n const unmodifiedFunctions = {};\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n unmodifiedFunctions[typeKey] = {\n insertRule: type.prototype.insertRule,\n deleteRule: type.prototype.deleteRule,\n };\n type.prototype.insertRule = new Proxy(unmodifiedFunctions[typeKey].insertRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [rule, index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n adds: [\n {\n rule,\n index: [\n ...getNestedCSSRulePositions(thisArg),\n index || 0,\n ],\n },\n ],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n type.prototype.deleteRule = new Proxy(unmodifiedFunctions[typeKey].deleteRule, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n const [index] = argumentsList;\n const { id, styleId } = getIdAndStyleId(thisArg.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleSheetRuleCb({\n id,\n styleId,\n removes: [\n { index: [...getNestedCSSRulePositions(thisArg), index] },\n ],\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n });\n return callbackWrapper(() => {\n win.CSSStyleSheet.prototype.insertRule = insertRule;\n win.CSSStyleSheet.prototype.deleteRule = deleteRule;\n replace && (win.CSSStyleSheet.prototype.replace = replace);\n replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\n type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\n type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\n });\n });\n}\nfunction initAdoptedStyleSheetObserver({ mirror, stylesheetManager, }, host) {\n var _a, _b, _c;\n let hostId = null;\n if (host.nodeName === '#document')\n hostId = mirror.getId(host);\n else\n hostId = mirror.getId(host.host);\n const patchTarget = host.nodeName === '#document'\n ? (_a = host.defaultView) === null || _a === void 0 ? void 0 : _a.Document\n : (_c = (_b = host.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView) === null || _c === void 0 ? void 0 : _c.ShadowRoot;\n const originalPropertyDescriptor = (patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype)\n ? Object.getOwnPropertyDescriptor(patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype, 'adoptedStyleSheets')\n : undefined;\n if (hostId === null ||\n hostId === -1 ||\n !patchTarget ||\n !originalPropertyDescriptor)\n return () => {\n };\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get() {\n var _a;\n return (_a = originalPropertyDescriptor.get) === null || _a === void 0 ? void 0 : _a.call(this);\n },\n set(sheets) {\n var _a;\n const result = (_a = originalPropertyDescriptor.set) === null || _a === void 0 ? void 0 : _a.call(this, sheets);\n if (hostId !== null && hostId !== -1) {\n try {\n stylesheetManager.adoptStyleSheets(sheets, hostId);\n }\n catch (e) {\n }\n }\n return result;\n },\n });\n return callbackWrapper(() => {\n Object.defineProperty(host, 'adoptedStyleSheets', {\n configurable: originalPropertyDescriptor.configurable,\n enumerable: originalPropertyDescriptor.enumerable,\n get: originalPropertyDescriptor.get,\n set: originalPropertyDescriptor.set,\n });\n });\n}\nfunction initStyleDeclarationObserver({ styleDeclarationCb, mirror, ignoreCSSAttributes, stylesheetManager, }, { win }) {\n const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\n win.CSSStyleDeclaration.prototype.setProperty = new Proxy(setProperty, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n var _a;\n const [property, value, priority] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return setProperty.apply(thisArg, [property, value, priority]);\n }\n const { id, styleId } = getIdAndStyleId((_a = thisArg.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleDeclarationCb({\n id,\n styleId,\n set: {\n property,\n value,\n priority,\n },\n index: getNestedCSSRulePositions(thisArg.parentRule),\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = new Proxy(removeProperty, {\n apply: callbackWrapper((target, thisArg, argumentsList) => {\n var _a;\n const [property] = argumentsList;\n if (ignoreCSSAttributes.has(property)) {\n return removeProperty.apply(thisArg, [property]);\n }\n const { id, styleId } = getIdAndStyleId((_a = thisArg.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet, mirror, stylesheetManager.styleMirror);\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\n styleDeclarationCb({\n id,\n styleId,\n remove: {\n property,\n },\n index: getNestedCSSRulePositions(thisArg.parentRule),\n });\n }\n return target.apply(thisArg, argumentsList);\n }),\n });\n return callbackWrapper(() => {\n win.CSSStyleDeclaration.prototype.setProperty = setProperty;\n win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\n });\n}\nfunction initMediaInteractionObserver({ mediaInteractionCb, blockClass, blockSelector, unblockSelector, mirror, sampling, doc, }) {\n const handler = callbackWrapper((type) => throttle$1(callbackWrapper((event) => {\n const target = getEventTarget(event);\n if (!target ||\n isBlocked(target, blockClass, blockSelector, unblockSelector, true)) {\n return;\n }\n const { currentTime, volume, muted, playbackRate } = target;\n mediaInteractionCb({\n type,\n id: mirror.getId(target),\n currentTime,\n volume,\n muted,\n playbackRate,\n });\n }), sampling.media || 500));\n const handlers = [\n on('play', handler(0), doc),\n on('pause', handler(1), doc),\n on('seeked', handler(2), doc),\n on('volumechange', handler(3), doc),\n on('ratechange', handler(4), doc),\n ];\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initFontObserver({ fontCb, doc }) {\n const win = doc.defaultView;\n if (!win) {\n return () => {\n };\n }\n const handlers = [];\n const fontMap = new WeakMap();\n const originalFontFace = win.FontFace;\n win.FontFace = function FontFace(family, source, descriptors) {\n const fontFace = new originalFontFace(family, source, descriptors);\n fontMap.set(fontFace, {\n family,\n buffer: typeof source !== 'string',\n descriptors,\n fontSource: typeof source === 'string'\n ? source\n : JSON.stringify(Array.from(new Uint8Array(source))),\n });\n return fontFace;\n };\n const restoreHandler = patch(doc.fonts, 'add', function (original) {\n return function (fontFace) {\n setTimeout(callbackWrapper(() => {\n const p = fontMap.get(fontFace);\n if (p) {\n fontCb(p);\n fontMap.delete(fontFace);\n }\n }), 0);\n return original.apply(this, [fontFace]);\n };\n });\n handlers.push(() => {\n win.FontFace = originalFontFace;\n });\n handlers.push(restoreHandler);\n return callbackWrapper(() => {\n handlers.forEach((h) => h());\n });\n}\nfunction initSelectionObserver(param) {\n const { doc, mirror, blockClass, blockSelector, unblockSelector, selectionCb, } = param;\n let collapsed = true;\n const updateSelection = callbackWrapper(() => {\n const selection = doc.getSelection();\n if (!selection || (collapsed && (selection === null || selection === void 0 ? void 0 : selection.isCollapsed)))\n return;\n collapsed = selection.isCollapsed || false;\n const ranges = [];\n const count = selection.rangeCount || 0;\n for (let i = 0; i < count; i++) {\n const range = selection.getRangeAt(i);\n const { startContainer, startOffset, endContainer, endOffset } = range;\n const blocked = isBlocked(startContainer, blockClass, blockSelector, unblockSelector, true) ||\n isBlocked(endContainer, blockClass, blockSelector, unblockSelector, true);\n if (blocked)\n continue;\n ranges.push({\n start: mirror.getId(startContainer),\n startOffset,\n end: mirror.getId(endContainer),\n endOffset,\n });\n }\n selectionCb({ ranges });\n });\n updateSelection();\n return on('selectionchange', updateSelection);\n}\nfunction initCustomElementObserver({ doc, customElementCb, }) {\n const win = doc.defaultView;\n if (!win || !win.customElements) {\n return () => {\n };\n }\n const restoreHandler = patch(win.customElements, 'define', function (original) {\n return function (name, constructor, options) {\n try {\n customElementCb({\n define: {\n name,\n },\n });\n }\n catch (e) {\n }\n return original.apply(this, [name, constructor, options]);\n };\n });\n return restoreHandler;\n}\nfunction mergeHooks(o, hooks) {\n const { mutationCb, mousemoveCb, mouseInteractionCb, scrollCb, viewportResizeCb, inputCb, mediaInteractionCb, styleSheetRuleCb, styleDeclarationCb, canvasMutationCb, fontCb, selectionCb, customElementCb, } = o;\n o.mutationCb = (...p) => {\n if (hooks.mutation) {\n hooks.mutation(...p);\n }\n mutationCb(...p);\n };\n o.mousemoveCb = (...p) => {\n if (hooks.mousemove) {\n hooks.mousemove(...p);\n }\n mousemoveCb(...p);\n };\n o.mouseInteractionCb = (...p) => {\n if (hooks.mouseInteraction) {\n hooks.mouseInteraction(...p);\n }\n mouseInteractionCb(...p);\n };\n o.scrollCb = (...p) => {\n if (hooks.scroll) {\n hooks.scroll(...p);\n }\n scrollCb(...p);\n };\n o.viewportResizeCb = (...p) => {\n if (hooks.viewportResize) {\n hooks.viewportResize(...p);\n }\n viewportResizeCb(...p);\n };\n o.inputCb = (...p) => {\n if (hooks.input) {\n hooks.input(...p);\n }\n inputCb(...p);\n };\n o.mediaInteractionCb = (...p) => {\n if (hooks.mediaInteaction) {\n hooks.mediaInteaction(...p);\n }\n mediaInteractionCb(...p);\n };\n o.styleSheetRuleCb = (...p) => {\n if (hooks.styleSheetRule) {\n hooks.styleSheetRule(...p);\n }\n styleSheetRuleCb(...p);\n };\n o.styleDeclarationCb = (...p) => {\n if (hooks.styleDeclaration) {\n hooks.styleDeclaration(...p);\n }\n styleDeclarationCb(...p);\n };\n o.canvasMutationCb = (...p) => {\n if (hooks.canvasMutation) {\n hooks.canvasMutation(...p);\n }\n canvasMutationCb(...p);\n };\n o.fontCb = (...p) => {\n if (hooks.font) {\n hooks.font(...p);\n }\n fontCb(...p);\n };\n o.selectionCb = (...p) => {\n if (hooks.selection) {\n hooks.selection(...p);\n }\n selectionCb(...p);\n };\n o.customElementCb = (...c) => {\n if (hooks.customElement) {\n hooks.customElement(...c);\n }\n customElementCb(...c);\n };\n}\nfunction initObservers(o, hooks = {}) {\n const currentWindow = o.doc.defaultView;\n if (!currentWindow) {\n return () => {\n };\n }\n mergeHooks(o, hooks);\n const mutationObserver = initMutationObserver(o, o.doc);\n const mousemoveHandler = initMoveObserver(o);\n const mouseInteractionHandler = initMouseInteractionObserver(o);\n const scrollHandler = initScrollObserver(o);\n const viewportResizeHandler = initViewportResizeObserver(o, {\n win: currentWindow,\n });\n const inputHandler = initInputObserver(o);\n const mediaInteractionHandler = initMediaInteractionObserver(o);\n const styleSheetObserver = initStyleSheetObserver(o, { win: currentWindow });\n const adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);\n const styleDeclarationObserver = initStyleDeclarationObserver(o, {\n win: currentWindow,\n });\n const fontObserver = o.collectFonts\n ? initFontObserver(o)\n : () => {\n };\n const selectionObserver = initSelectionObserver(o);\n const customElementObserver = initCustomElementObserver(o);\n const pluginHandlers = [];\n for (const plugin of o.plugins) {\n pluginHandlers.push(plugin.observer(plugin.callback, currentWindow, plugin.options));\n }\n return callbackWrapper(() => {\n mutationBuffers.forEach((b) => b.reset());\n mutationObserver.disconnect();\n mousemoveHandler();\n mouseInteractionHandler();\n scrollHandler();\n viewportResizeHandler();\n inputHandler();\n mediaInteractionHandler();\n styleSheetObserver();\n adoptedStyleSheetObserver();\n styleDeclarationObserver();\n fontObserver();\n selectionObserver();\n customElementObserver();\n pluginHandlers.forEach((h) => h());\n });\n}\nfunction hasNestedCSSRule(prop) {\n return typeof window[prop] !== 'undefined';\n}\nfunction canMonkeyPatchNestedCSSRule(prop) {\n return Boolean(typeof window[prop] !== 'undefined' &&\n window[prop].prototype &&\n 'insertRule' in window[prop].prototype &&\n 'deleteRule' in window[prop].prototype);\n}\n\nclass CrossOriginIframeMirror {\n constructor(generateIdFn) {\n this.generateIdFn = generateIdFn;\n this.iframeIdToRemoteIdMap = new WeakMap();\n this.iframeRemoteIdToIdMap = new WeakMap();\n }\n getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\n const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\n let id = idToRemoteIdMap.get(remoteId);\n if (!id) {\n id = this.generateIdFn();\n idToRemoteIdMap.set(remoteId, id);\n remoteIdToIdMap.set(id, remoteId);\n }\n return id;\n }\n getIds(iframe, remoteId) {\n const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return remoteId.map((id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap));\n }\n getRemoteId(iframe, id, map) {\n const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\n if (typeof id !== 'number')\n return id;\n const remoteId = remoteIdToIdMap.get(id);\n if (!remoteId)\n return -1;\n return remoteId;\n }\n getRemoteIds(iframe, ids) {\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\n return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\n }\n reset(iframe) {\n if (!iframe) {\n this.iframeIdToRemoteIdMap = new WeakMap();\n this.iframeRemoteIdToIdMap = new WeakMap();\n return;\n }\n this.iframeIdToRemoteIdMap.delete(iframe);\n this.iframeRemoteIdToIdMap.delete(iframe);\n }\n getIdToRemoteIdMap(iframe) {\n let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\n if (!idToRemoteIdMap) {\n idToRemoteIdMap = new Map();\n this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\n }\n return idToRemoteIdMap;\n }\n getRemoteIdToIdMap(iframe) {\n let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\n if (!remoteIdToIdMap) {\n remoteIdToIdMap = new Map();\n this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\n }\n return remoteIdToIdMap;\n }\n}\n\nclass IframeManagerNoop {\n constructor() {\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n }\n addIframe() {\n }\n addLoadListener() {\n }\n attachIframe() {\n }\n}\nclass IframeManager {\n constructor(options) {\n this.iframes = new WeakMap();\n this.crossOriginIframeMap = new WeakMap();\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\n this.crossOriginIframeRootIdMap = new WeakMap();\n this.mutationCb = options.mutationCb;\n this.wrappedEmit = options.wrappedEmit;\n this.stylesheetManager = options.stylesheetManager;\n this.recordCrossOriginIframes = options.recordCrossOriginIframes;\n this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror));\n this.mirror = options.mirror;\n if (this.recordCrossOriginIframes) {\n window.addEventListener('message', this.handleMessage.bind(this));\n }\n }\n addIframe(iframeEl) {\n this.iframes.set(iframeEl, true);\n if (iframeEl.contentWindow)\n this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);\n }\n addLoadListener(cb) {\n this.loadListener = cb;\n }\n attachIframe(iframeEl, childSn) {\n var _a;\n this.mutationCb({\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: childSn,\n },\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true,\n });\n (_a = this.loadListener) === null || _a === void 0 ? void 0 : _a.call(this, iframeEl);\n if (iframeEl.contentDocument &&\n iframeEl.contentDocument.adoptedStyleSheets &&\n iframeEl.contentDocument.adoptedStyleSheets.length > 0)\n this.stylesheetManager.adoptStyleSheets(iframeEl.contentDocument.adoptedStyleSheets, this.mirror.getId(iframeEl.contentDocument));\n }\n handleMessage(message) {\n const crossOriginMessageEvent = message;\n if (crossOriginMessageEvent.data.type !== 'rrweb' ||\n crossOriginMessageEvent.origin !== crossOriginMessageEvent.data.origin)\n return;\n const iframeSourceWindow = message.source;\n if (!iframeSourceWindow)\n return;\n const iframeEl = this.crossOriginIframeMap.get(message.source);\n if (!iframeEl)\n return;\n const transformedEvent = this.transformCrossOriginEvent(iframeEl, crossOriginMessageEvent.data.event);\n if (transformedEvent)\n this.wrappedEmit(transformedEvent, crossOriginMessageEvent.data.isCheckout);\n }\n transformCrossOriginEvent(iframeEl, e) {\n var _a;\n switch (e.type) {\n case EventType.FullSnapshot: {\n this.crossOriginIframeMirror.reset(iframeEl);\n this.crossOriginIframeStyleMirror.reset(iframeEl);\n this.replaceIdOnNode(e.data.node, iframeEl);\n const rootId = e.data.node.id;\n this.crossOriginIframeRootIdMap.set(iframeEl, rootId);\n this.patchRootIdOnNode(e.data.node, rootId);\n return {\n timestamp: e.timestamp,\n type: EventType.IncrementalSnapshot,\n data: {\n source: IncrementalSource.Mutation,\n adds: [\n {\n parentId: this.mirror.getId(iframeEl),\n nextId: null,\n node: e.data.node,\n },\n ],\n removes: [],\n texts: [],\n attributes: [],\n isAttachIframe: true,\n },\n };\n }\n case EventType.Meta:\n case EventType.Load:\n case EventType.DomContentLoaded: {\n return false;\n }\n case EventType.Plugin: {\n return e;\n }\n case EventType.Custom: {\n this.replaceIds(e.data.payload, iframeEl, ['id', 'parentId', 'previousId', 'nextId']);\n return e;\n }\n case EventType.IncrementalSnapshot: {\n switch (e.data.source) {\n case IncrementalSource.Mutation: {\n e.data.adds.forEach((n) => {\n this.replaceIds(n, iframeEl, [\n 'parentId',\n 'nextId',\n 'previousId',\n ]);\n this.replaceIdOnNode(n.node, iframeEl);\n const rootId = this.crossOriginIframeRootIdMap.get(iframeEl);\n rootId && this.patchRootIdOnNode(n.node, rootId);\n });\n e.data.removes.forEach((n) => {\n this.replaceIds(n, iframeEl, ['parentId', 'id']);\n });\n e.data.attributes.forEach((n) => {\n this.replaceIds(n, iframeEl, ['id']);\n });\n e.data.texts.forEach((n) => {\n this.replaceIds(n, iframeEl, ['id']);\n });\n return e;\n }\n case IncrementalSource.Drag:\n case IncrementalSource.TouchMove:\n case IncrementalSource.MouseMove: {\n e.data.positions.forEach((p) => {\n this.replaceIds(p, iframeEl, ['id']);\n });\n return e;\n }\n case IncrementalSource.ViewportResize: {\n return false;\n }\n case IncrementalSource.MediaInteraction:\n case IncrementalSource.MouseInteraction:\n case IncrementalSource.Scroll:\n case IncrementalSource.CanvasMutation:\n case IncrementalSource.Input: {\n this.replaceIds(e.data, iframeEl, ['id']);\n return e;\n }\n case IncrementalSource.StyleSheetRule:\n case IncrementalSource.StyleDeclaration: {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleId']);\n return e;\n }\n case IncrementalSource.Font: {\n return e;\n }\n case IncrementalSource.Selection: {\n e.data.ranges.forEach((range) => {\n this.replaceIds(range, iframeEl, ['start', 'end']);\n });\n return e;\n }\n case IncrementalSource.AdoptedStyleSheet: {\n this.replaceIds(e.data, iframeEl, ['id']);\n this.replaceStyleIds(e.data, iframeEl, ['styleIds']);\n (_a = e.data.styles) === null || _a === void 0 ? void 0 : _a.forEach((style) => {\n this.replaceStyleIds(style, iframeEl, ['styleId']);\n });\n return e;\n }\n }\n }\n }\n return false;\n }\n replace(iframeMirror, obj, iframeEl, keys) {\n for (const key of keys) {\n if (!Array.isArray(obj[key]) && typeof obj[key] !== 'number')\n continue;\n if (Array.isArray(obj[key])) {\n obj[key] = iframeMirror.getIds(iframeEl, obj[key]);\n }\n else {\n obj[key] = iframeMirror.getId(iframeEl, obj[key]);\n }\n }\n return obj;\n }\n replaceIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\n }\n replaceStyleIds(obj, iframeEl, keys) {\n return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\n }\n replaceIdOnNode(node, iframeEl) {\n this.replaceIds(node, iframeEl, ['id', 'rootId']);\n if ('childNodes' in node) {\n node.childNodes.forEach((child) => {\n this.replaceIdOnNode(child, iframeEl);\n });\n }\n }\n patchRootIdOnNode(node, rootId) {\n if (node.type !== NodeType$1.Document && !node.rootId)\n node.rootId = rootId;\n if ('childNodes' in node) {\n node.childNodes.forEach((child) => {\n this.patchRootIdOnNode(child, rootId);\n });\n }\n }\n}\n\nclass ShadowDomManagerNoop {\n init() {\n }\n addShadowRoot() {\n }\n observeAttachShadow() {\n }\n reset() {\n }\n}\nclass ShadowDomManager {\n constructor(options) {\n this.shadowDoms = new WeakSet();\n this.restoreHandlers = [];\n this.mutationCb = options.mutationCb;\n this.scrollCb = options.scrollCb;\n this.bypassOptions = options.bypassOptions;\n this.mirror = options.mirror;\n this.init();\n }\n init() {\n this.reset();\n this.patchAttachShadow(Element, document);\n }\n addShadowRoot(shadowRoot, doc) {\n if (!isNativeShadowDom(shadowRoot))\n return;\n if (this.shadowDoms.has(shadowRoot))\n return;\n this.shadowDoms.add(shadowRoot);\n const observer = initMutationObserver(Object.assign(Object.assign({}, this.bypassOptions), { doc, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), shadowRoot);\n this.restoreHandlers.push(() => observer.disconnect());\n this.restoreHandlers.push(initScrollObserver(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: shadowRoot, mirror: this.mirror })));\n setTimeout(() => {\n if (shadowRoot.adoptedStyleSheets &&\n shadowRoot.adoptedStyleSheets.length > 0)\n this.bypassOptions.stylesheetManager.adoptStyleSheets(shadowRoot.adoptedStyleSheets, this.mirror.getId(shadowRoot.host));\n this.restoreHandlers.push(initAdoptedStyleSheetObserver({\n mirror: this.mirror,\n stylesheetManager: this.bypassOptions.stylesheetManager,\n }, shadowRoot));\n }, 0);\n }\n observeAttachShadow(iframeElement) {\n if (!iframeElement.contentWindow || !iframeElement.contentDocument)\n return;\n this.patchAttachShadow(iframeElement.contentWindow.Element, iframeElement.contentDocument);\n }\n patchAttachShadow(element, doc) {\n const manager = this;\n this.restoreHandlers.push(patch(element.prototype, 'attachShadow', function (original) {\n return function (option) {\n const shadowRoot = original.call(this, option);\n if (this.shadowRoot && inDom(this))\n manager.addShadowRoot(this.shadowRoot, doc);\n return shadowRoot;\n };\n }));\n }\n reset() {\n this.restoreHandlers.forEach((handler) => {\n try {\n handler();\n }\n catch (e) {\n }\n });\n this.restoreHandlers = [];\n this.shadowDoms = new WeakSet();\n }\n}\n\n/*! *****************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n\nfunction __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nfunction __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\n/*\n * base64-arraybuffer 1.0.1 <https://github.com/niklasvh/base64-arraybuffer>\n * Copyright (c) 2021 Niklas von Hertzen <https://hertzen.com>\n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\n\nconst canvasVarMap = new Map();\nfunction variableListFor(ctx, ctor) {\n let contextMap = canvasVarMap.get(ctx);\n if (!contextMap) {\n contextMap = new Map();\n canvasVarMap.set(ctx, contextMap);\n }\n if (!contextMap.has(ctor)) {\n contextMap.set(ctor, []);\n }\n return contextMap.get(ctor);\n}\nconst saveWebGLVar = (value, win, ctx) => {\n if (!value ||\n !(isInstanceOfWebGLObject(value, win) || typeof value === 'object'))\n return;\n const name = value.constructor.name;\n const list = variableListFor(ctx, name);\n let index = list.indexOf(value);\n if (index === -1) {\n index = list.length;\n list.push(value);\n }\n return index;\n};\nfunction serializeArg(value, win, ctx) {\n if (value instanceof Array) {\n return value.map((arg) => serializeArg(arg, win, ctx));\n }\n else if (value === null) {\n return value;\n }\n else if (value instanceof Float32Array ||\n value instanceof Float64Array ||\n value instanceof Int32Array ||\n value instanceof Uint32Array ||\n value instanceof Uint8Array ||\n value instanceof Uint16Array ||\n value instanceof Int16Array ||\n value instanceof Int8Array ||\n value instanceof Uint8ClampedArray) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [Object.values(value)],\n };\n }\n else if (value instanceof ArrayBuffer) {\n const name = value.constructor.name;\n const base64 = encode(value);\n return {\n rr_type: name,\n base64,\n };\n }\n else if (value instanceof DataView) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [\n serializeArg(value.buffer, win, ctx),\n value.byteOffset,\n value.byteLength,\n ],\n };\n }\n else if (value instanceof HTMLImageElement) {\n const name = value.constructor.name;\n const { src } = value;\n return {\n rr_type: name,\n src,\n };\n }\n else if (value instanceof HTMLCanvasElement) {\n const name = 'HTMLImageElement';\n const src = value.toDataURL();\n return {\n rr_type: name,\n src,\n };\n }\n else if (value instanceof ImageData) {\n const name = value.constructor.name;\n return {\n rr_type: name,\n args: [serializeArg(value.data, win, ctx), value.width, value.height],\n };\n }\n else if (isInstanceOfWebGLObject(value, win) || typeof value === 'object') {\n const name = value.constructor.name;\n const index = saveWebGLVar(value, win, ctx);\n return {\n rr_type: name,\n index: index,\n };\n }\n return value;\n}\nconst serializeArgs = (args, win, ctx) => {\n return [...args].map((arg) => serializeArg(arg, win, ctx));\n};\nconst isInstanceOfWebGLObject = (value, win) => {\n const webGLConstructorNames = [\n 'WebGLActiveInfo',\n 'WebGLBuffer',\n 'WebGLFramebuffer',\n 'WebGLProgram',\n 'WebGLRenderbuffer',\n 'WebGLShader',\n 'WebGLShaderPrecisionFormat',\n 'WebGLTexture',\n 'WebGLUniformLocation',\n 'WebGLVertexArrayObject',\n 'WebGLVertexArrayObjectOES',\n ];\n const supportedWebGLConstructorNames = webGLConstructorNames.filter((name) => typeof win[name] === 'function');\n return Boolean(supportedWebGLConstructorNames.find((name) => value instanceof win[name]));\n};\n\nfunction initCanvas2DMutationObserver(cb, win, blockClass, blockSelector, unblockSelector) {\n const handlers = [];\n const props2D = Object.getOwnPropertyNames(win.CanvasRenderingContext2D.prototype);\n for (const prop of props2D) {\n try {\n if (typeof win.CanvasRenderingContext2D.prototype[prop] !== 'function') {\n continue;\n }\n const restoreHandler = patch(win.CanvasRenderingContext2D.prototype, prop, function (original) {\n return function (...args) {\n if (!isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) {\n setTimeout(() => {\n const recordArgs = serializeArgs([...args], win, this);\n cb(this.canvas, {\n type: CanvasContext['2D'],\n property: prop,\n args: recordArgs,\n });\n }, 0);\n }\n return original.apply(this, args);\n };\n });\n handlers.push(restoreHandler);\n }\n catch (_a) {\n const hookHandler = hookSetter(win.CanvasRenderingContext2D.prototype, prop, {\n set(v) {\n cb(this.canvas, {\n type: CanvasContext['2D'],\n property: prop,\n args: [v],\n setter: true,\n });\n },\n });\n handlers.push(hookHandler);\n }\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\n\nfunction getNormalizedContextName(contextType) {\n return contextType === 'experimental-webgl' ? 'webgl' : contextType;\n}\nfunction initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, setPreserveDrawingBufferToTrue) {\n const handlers = [];\n try {\n const restoreHandler = patch(win.HTMLCanvasElement.prototype, 'getContext', function (original) {\n return function (contextType, ...args) {\n if (!isBlocked(this, blockClass, blockSelector, unblockSelector, true)) {\n const ctxName = getNormalizedContextName(contextType);\n if (!('__context' in this))\n this.__context = ctxName;\n if (setPreserveDrawingBufferToTrue &&\n ['webgl', 'webgl2'].includes(ctxName)) {\n if (args[0] && typeof args[0] === 'object') {\n const contextAttributes = args[0];\n if (!contextAttributes.preserveDrawingBuffer) {\n contextAttributes.preserveDrawingBuffer = true;\n }\n }\n else {\n args.splice(0, 1, {\n preserveDrawingBuffer: true,\n });\n }\n }\n }\n return original.apply(this, [contextType, ...args]);\n };\n });\n handlers.push(restoreHandler);\n }\n catch (_a) {\n console.error('failed to patch HTMLCanvasElement.prototype.getContext');\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\n\nfunction patchGLPrototype(prototype, type, cb, blockClass, blockSelector, unblockSelector, mirror, win) {\n const handlers = [];\n const props = Object.getOwnPropertyNames(prototype);\n for (const prop of props) {\n if ([\n 'isContextLost',\n 'canvas',\n 'drawingBufferWidth',\n 'drawingBufferHeight',\n ].includes(prop)) {\n continue;\n }\n try {\n if (typeof prototype[prop] !== 'function') {\n continue;\n }\n const restoreHandler = patch(prototype, prop, function (original) {\n return function (...args) {\n const result = original.apply(this, args);\n saveWebGLVar(result, win, this);\n if ('tagName' in this.canvas &&\n !isBlocked(this.canvas, blockClass, blockSelector, unblockSelector, true)) {\n const recordArgs = serializeArgs([...args], win, this);\n const mutation = {\n type,\n property: prop,\n args: recordArgs,\n };\n cb(this.canvas, mutation);\n }\n return result;\n };\n });\n handlers.push(restoreHandler);\n }\n catch (_a) {\n const hookHandler = hookSetter(prototype, prop, {\n set(v) {\n cb(this.canvas, {\n type,\n property: prop,\n args: [v],\n setter: true,\n });\n },\n });\n handlers.push(hookHandler);\n }\n }\n return handlers;\n}\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass, blockSelector, unblockSelector, mirror) {\n const handlers = [];\n handlers.push(...patchGLPrototype(win.WebGLRenderingContext.prototype, CanvasContext.WebGL, cb, blockClass, blockSelector, unblockSelector, mirror, win));\n if (typeof win.WebGL2RenderingContext !== 'undefined') {\n handlers.push(...patchGLPrototype(win.WebGL2RenderingContext.prototype, CanvasContext.WebGL2, cb, blockClass, blockSelector, unblockSelector, mirror, win));\n }\n return () => {\n handlers.forEach((h) => h());\n };\n}\n\nfunction decodeBase64(base64, enableUnicode) {\n var binaryString = atob(base64);\n if (enableUnicode) {\n var binaryView = new Uint8Array(binaryString.length);\n for (var i = 0, n = binaryString.length; i < n; ++i) {\n binaryView[i] = binaryString.charCodeAt(i);\n }\n return String.fromCharCode.apply(null, new Uint16Array(binaryView.buffer));\n }\n return binaryString;\n}\n\nfunction createURL(base64, sourcemapArg, enableUnicodeArg) {\n var sourcemap = sourcemapArg === undefined ? null : sourcemapArg;\n var enableUnicode = enableUnicodeArg === undefined ? false : enableUnicodeArg;\n var source = decodeBase64(base64, enableUnicode);\n var start = source.indexOf('\\n', 10) + 1;\n var body = source.substring(start) + (sourcemap ? '\\/\\/# sourceMappingURL=' + sourcemap : '');\n var blob = new Blob([body], { type: 'application/javascript' });\n return URL.createObjectURL(blob);\n}\n\nfunction createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {\n var url;\n return function WorkerFactory(options) {\n url = url || createURL(base64, sourcemapArg, enableUnicodeArg);\n return new Worker(url, options);\n };\n}\n\nvar WorkerFactory = createBase64WorkerFactory('Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGRpc3RyaWJ1dGUgdGhpcyBzb2Z0d2FyZSBmb3IgYW55DQogICAgcHVycG9zZSB3aXRoIG9yIHdpdGhvdXQgZmVlIGlzIGhlcmVieSBncmFudGVkLg0KDQogICAgVEhFIFNPRlRXQVJFIElTIFBST1ZJREVEICJBUyBJUyIgQU5EIFRIRSBBVVRIT1IgRElTQ0xBSU1TIEFMTCBXQVJSQU5USUVTIFdJVEgNCiAgICBSRUdBUkQgVE8gVEhJUyBT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cih3aWR0aCwgaGVpZ2h0LCBkYXRhVVJMT3B0aW9ucykgew0KICAgICAgICByZXR1cm4gX19hd2FpdGVyKHRoaXMsIHZvaWQgMCwgdm9pZCAwLCBmdW5jdGlvbiogKCkgew0KICAgICAgICAgICAgY29uc3QgaWQgPSBgJHt3aWR0aH0tJHtoZWlnaHR9YDsNCiAgICAgICAgICAgIGlmICgnT2Zmc2NyZWVuQ2FudmFzJyBpbiBnbG9iYWxUaGlzKSB7DQogICAgICAgICAgICAgICAgaWYgKHRyYW5zcGFyZW50QmxvYk1hcC5oYXMoaWQpKQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJhbnNwYXJlbnRCbG9iTWFwLmdldChpZCk7DQogICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2NyZWVuID0gbmV3IE9mZnNjcmVlbkNhbnZhcyh3aWR0aCwgaGVpZ2h0KTsNCiAgICAgICAgICAgICAgICBvZmZzY3JlZW4uZ2V0Q29udGV4dCgnMmQnKTsNCiAgICAgICAgICAgICAgICBjb25zdCBibG9iID0geWllbGQgb2Zmc2NyZWVuLmNvbnZlcnRUb0Jsb2IoZGF0YVVSTE9wdGlvbnMpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGFycmF5QnVmZmVyID0geWllbGQgYmxvYi5hcnJheUJ1ZmZlcigpOw0KICAgICAgICAgICAgICAgIGNvbnN0IGJhc2U2NCA9IGVuY29kZShhcnJheUJ1ZmZlcik7DQogICAgICAgICAgICAgICAgdHJhbnNwYXJlbnRCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICByZXR1cm4gYmFzZTY0Ow0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgZWxzZSB7DQogICAgICAgICAgICAgICAgcmV0dXJuICcnOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9KTsNCiAgICB9DQogICAgY29uc3Qgd29ya2VyID0gc2VsZjsNCiAgICB3b3JrZXIub25tZXNzYWdlID0gZnVuY3Rp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ICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=', null, false);\n\nclass CanvasManagerNoop {\n reset() {\n }\n freeze() {\n }\n unfreeze() {\n }\n lock() {\n }\n unlock() {\n }\n}\nclass CanvasManager {\n reset() {\n this.pendingCanvasMutations.clear();\n this.resetObservers && this.resetObservers();\n }\n freeze() {\n this.frozen = true;\n }\n unfreeze() {\n this.frozen = false;\n }\n lock() {\n this.locked = true;\n }\n unlock() {\n this.locked = false;\n }\n constructor(options) {\n this.pendingCanvasMutations = new Map();\n this.rafStamps = { latestId: 0, invokeId: null };\n this.frozen = false;\n this.locked = false;\n this.processMutation = (target, mutation) => {\n const newFrame = this.rafStamps.invokeId &&\n this.rafStamps.latestId !== this.rafStamps.invokeId;\n if (newFrame || !this.rafStamps.invokeId)\n this.rafStamps.invokeId = this.rafStamps.latestId;\n if (!this.pendingCanvasMutations.has(target)) {\n this.pendingCanvasMutations.set(target, []);\n }\n this.pendingCanvasMutations.get(target).push(mutation);\n };\n const { sampling = 'all', win, blockClass, blockSelector, unblockSelector, recordCanvas, dataURLOptions, } = options;\n this.mutationCb = options.mutationCb;\n this.mirror = options.mirror;\n if (recordCanvas && sampling === 'all')\n this.initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector);\n if (recordCanvas && typeof sampling === 'number')\n this.initCanvasFPSObserver(sampling, win, blockClass, blockSelector, unblockSelector, {\n dataURLOptions,\n });\n }\n initCanvasFPSObserver(fps, win, blockClass, blockSelector, unblockSelector, options) {\n const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, true);\n const snapshotInProgressMap = new Map();\n const worker = new WorkerFactory();\n worker.onmessage = (e) => {\n const { id } = e.data;\n snapshotInProgressMap.set(id, false);\n if (!('base64' in e.data))\n return;\n const { base64, type, width, height } = e.data;\n this.mutationCb({\n id,\n type: CanvasContext['2D'],\n commands: [\n {\n property: 'clearRect',\n args: [0, 0, width, height],\n },\n {\n property: 'drawImage',\n args: [\n {\n rr_type: 'ImageBitmap',\n args: [\n {\n rr_type: 'Blob',\n data: [{ rr_type: 'ArrayBuffer', base64 }],\n type,\n },\n ],\n },\n 0,\n 0,\n ],\n },\n ],\n });\n };\n const timeBetweenSnapshots = 1000 / fps;\n let lastSnapshotTime = 0;\n let rafId;\n const getCanvas = () => {\n const matchedCanvas = [];\n win.document.querySelectorAll('canvas').forEach((canvas) => {\n if (!isBlocked(canvas, blockClass, blockSelector, unblockSelector, true)) {\n matchedCanvas.push(canvas);\n }\n });\n return matchedCanvas;\n };\n const takeCanvasSnapshots = (timestamp) => {\n if (lastSnapshotTime &&\n timestamp - lastSnapshotTime < timeBetweenSnapshots) {\n rafId = requestAnimationFrame(takeCanvasSnapshots);\n return;\n }\n lastSnapshotTime = timestamp;\n getCanvas()\n .forEach((canvas) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n const id = this.mirror.getId(canvas);\n if (snapshotInProgressMap.get(id))\n return;\n snapshotInProgressMap.set(id, true);\n if (['webgl', 'webgl2'].includes(canvas.__context)) {\n const context = canvas.getContext(canvas.__context);\n if (((_a = context === null || context === void 0 ? void 0 : context.getContextAttributes()) === null || _a === void 0 ? void 0 : _a.preserveDrawingBuffer) === false) {\n context.clear(context.COLOR_BUFFER_BIT);\n }\n }\n const bitmap = yield createImageBitmap(canvas);\n worker.postMessage({\n id,\n bitmap,\n width: canvas.width,\n height: canvas.height,\n dataURLOptions: options.dataURLOptions,\n }, [bitmap]);\n }));\n rafId = requestAnimationFrame(takeCanvasSnapshots);\n };\n rafId = requestAnimationFrame(takeCanvasSnapshots);\n this.resetObservers = () => {\n canvasContextReset();\n cancelAnimationFrame(rafId);\n };\n }\n initCanvasMutationObserver(win, blockClass, blockSelector, unblockSelector) {\n this.startRAFTimestamping();\n this.startPendingCanvasMutationFlusher();\n const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector, unblockSelector, false);\n const canvas2DReset = initCanvas2DMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector);\n const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, unblockSelector, this.mirror);\n this.resetObservers = () => {\n canvasContextReset();\n canvas2DReset();\n canvasWebGL1and2Reset();\n };\n }\n startPendingCanvasMutationFlusher() {\n requestAnimationFrame(() => this.flushPendingCanvasMutations());\n }\n startRAFTimestamping() {\n const setLatestRAFTimestamp = (timestamp) => {\n this.rafStamps.latestId = timestamp;\n requestAnimationFrame(setLatestRAFTimestamp);\n };\n requestAnimationFrame(setLatestRAFTimestamp);\n }\n flushPendingCanvasMutations() {\n this.pendingCanvasMutations.forEach((values, canvas) => {\n const id = this.mirror.getId(canvas);\n this.flushPendingCanvasMutationFor(canvas, id);\n });\n requestAnimationFrame(() => this.flushPendingCanvasMutations());\n }\n flushPendingCanvasMutationFor(canvas, id) {\n if (this.frozen || this.locked) {\n return;\n }\n const valuesWithType = this.pendingCanvasMutations.get(canvas);\n if (!valuesWithType || id === -1)\n return;\n const values = valuesWithType.map((value) => {\n const rest = __rest(value, [\"type\"]);\n return rest;\n });\n const { type } = valuesWithType[0];\n this.mutationCb({ id, type, commands: values });\n this.pendingCanvasMutations.delete(canvas);\n }\n}\n\nclass StylesheetManager {\n constructor(options) {\n this.trackedLinkElements = new WeakSet();\n this.styleMirror = new StyleSheetMirror();\n this.mutationCb = options.mutationCb;\n this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\n }\n attachLinkElement(linkEl, childSn) {\n if ('_cssText' in childSn.attributes)\n this.mutationCb({\n adds: [],\n removes: [],\n texts: [],\n attributes: [\n {\n id: childSn.id,\n attributes: childSn\n .attributes,\n },\n ],\n });\n this.trackLinkElement(linkEl);\n }\n trackLinkElement(linkEl) {\n if (this.trackedLinkElements.has(linkEl))\n return;\n this.trackedLinkElements.add(linkEl);\n this.trackStylesheetInLinkElement(linkEl);\n }\n adoptStyleSheets(sheets, hostId) {\n if (sheets.length === 0)\n return;\n const adoptedStyleSheetData = {\n id: hostId,\n styleIds: [],\n };\n const styles = [];\n for (const sheet of sheets) {\n let styleId;\n if (!this.styleMirror.has(sheet)) {\n styleId = this.styleMirror.add(sheet);\n styles.push({\n styleId,\n rules: Array.from(sheet.rules || CSSRule, (r, index) => ({\n rule: stringifyRule(r),\n index,\n })),\n });\n }\n else\n styleId = this.styleMirror.getId(sheet);\n adoptedStyleSheetData.styleIds.push(styleId);\n }\n if (styles.length > 0)\n adoptedStyleSheetData.styles = styles;\n this.adoptedStyleSheetCb(adoptedStyleSheetData);\n }\n reset() {\n this.styleMirror.reset();\n this.trackedLinkElements = new WeakSet();\n }\n trackStylesheetInLinkElement(linkEl) {\n }\n}\n\nclass ProcessedNodeManager {\n constructor() {\n this.nodeMap = new WeakMap();\n this.loop = true;\n this.periodicallyClear();\n }\n periodicallyClear() {\n requestAnimationFrame(() => {\n this.clear();\n if (this.loop)\n this.periodicallyClear();\n });\n }\n inOtherBuffer(node, thisBuffer) {\n const buffers = this.nodeMap.get(node);\n return (buffers && Array.from(buffers).some((buffer) => buffer !== thisBuffer));\n }\n add(node, buffer) {\n this.nodeMap.set(node, (this.nodeMap.get(node) || new Set()).add(buffer));\n }\n clear() {\n this.nodeMap = new WeakMap();\n }\n destroy() {\n this.loop = false;\n }\n}\n\nfunction wrapEvent(e) {\n return Object.assign(Object.assign({}, e), { timestamp: nowTimestamp() });\n}\nlet wrappedEmit;\nlet takeFullSnapshot;\nlet canvasManager;\nlet recording = false;\nconst mirror = createMirror();\nfunction record(options = {}) {\n const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'rr-block', blockSelector = null, unblockSelector = null, ignoreClass = 'rr-ignore', ignoreSelector = null, maskAllText = false, maskTextClass = 'rr-mask', unmaskTextClass = null, maskTextSelector = null, unmaskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskAttributeFn, maskInputFn, maskTextFn, hooks, packFn, sampling = {}, dataURLOptions = {}, mousemoveWait, recordCanvas = false, recordCrossOriginIframes = false, recordAfter = options.recordAfter === 'DOMContentLoaded'\n ? options.recordAfter\n : 'load', userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, ignoreCSSAttributes = new Set([]), errorHandler, onMutation, } = options;\n registerErrorHandler(errorHandler);\n const inEmittingFrame = recordCrossOriginIframes\n ? window.parent === window\n : true;\n let passEmitsToParent = false;\n if (!inEmittingFrame) {\n try {\n if (window.parent.document) {\n passEmitsToParent = false;\n }\n }\n catch (e) {\n passEmitsToParent = true;\n }\n }\n if (inEmittingFrame && !emit) {\n throw new Error('emit function is required');\n }\n if (mousemoveWait !== undefined && sampling.mousemove === undefined) {\n sampling.mousemove = mousemoveWait;\n }\n mirror.reset();\n const maskInputOptions = maskAllInputs === true\n ? {\n color: true,\n date: true,\n 'datetime-local': true,\n email: true,\n month: true,\n number: true,\n range: true,\n search: true,\n tel: true,\n text: true,\n time: true,\n url: true,\n week: true,\n textarea: true,\n select: true,\n radio: true,\n checkbox: true,\n }\n : _maskInputOptions !== undefined\n ? _maskInputOptions\n : {};\n const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === 'all'\n ? {\n script: true,\n comment: true,\n headFavicon: true,\n headWhitespace: true,\n headMetaSocial: true,\n headMetaRobots: true,\n headMetaHttpEquiv: true,\n headMetaVerification: true,\n headMetaAuthorship: _slimDOMOptions === 'all',\n headMetaDescKeywords: _slimDOMOptions === 'all',\n }\n : _slimDOMOptions\n ? _slimDOMOptions\n : {};\n polyfill();\n let lastFullSnapshotEvent;\n let incrementalSnapshotCount = 0;\n const eventProcessor = (e) => {\n for (const plugin of plugins || []) {\n if (plugin.eventProcessor) {\n e = plugin.eventProcessor(e);\n }\n }\n if (packFn &&\n !passEmitsToParent) {\n e = packFn(e);\n }\n return e;\n };\n wrappedEmit = (e, isCheckout) => {\n var _a;\n if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) &&\n e.type !== EventType.FullSnapshot &&\n !(e.type === EventType.IncrementalSnapshot &&\n e.data.source === IncrementalSource.Mutation)) {\n mutationBuffers.forEach((buf) => buf.unfreeze());\n }\n if (inEmittingFrame) {\n emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e), isCheckout);\n }\n else if (passEmitsToParent) {\n const message = {\n type: 'rrweb',\n event: eventProcessor(e),\n origin: window.location.origin,\n isCheckout,\n };\n window.parent.postMessage(message, '*');\n }\n if (e.type === EventType.FullSnapshot) {\n lastFullSnapshotEvent = e;\n incrementalSnapshotCount = 0;\n }\n else if (e.type === EventType.IncrementalSnapshot) {\n if (e.data.source === IncrementalSource.Mutation &&\n e.data.isAttachIframe) {\n return;\n }\n incrementalSnapshotCount++;\n const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\n const exceedTime = checkoutEveryNms &&\n e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\n if (exceedCount || exceedTime) {\n takeFullSnapshot(true);\n }\n }\n };\n const wrappedMutationEmit = (m) => {\n wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Mutation }, m),\n }));\n };\n const wrappedScrollEmit = (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Scroll }, p),\n }));\n const wrappedCanvasMutationEmit = (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.CanvasMutation }, p),\n }));\n const wrappedAdoptedStyleSheetEmit = (a) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.AdoptedStyleSheet }, a),\n }));\n const stylesheetManager = new StylesheetManager({\n mutationCb: wrappedMutationEmit,\n adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit,\n });\n const iframeManager = typeof __RRWEB_EXCLUDE_IFRAME__ === 'boolean' && __RRWEB_EXCLUDE_IFRAME__\n ? new IframeManagerNoop()\n : new IframeManager({\n mirror,\n mutationCb: wrappedMutationEmit,\n stylesheetManager: stylesheetManager,\n recordCrossOriginIframes,\n wrappedEmit,\n });\n for (const plugin of plugins || []) {\n if (plugin.getMirror)\n plugin.getMirror({\n nodeMirror: mirror,\n crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\n crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror,\n });\n }\n const processedNodeManager = new ProcessedNodeManager();\n canvasManager =\n typeof __RRWEB_EXCLUDE_CANVAS__ === 'boolean' && __RRWEB_EXCLUDE_CANVAS__\n ? new CanvasManagerNoop()\n : new CanvasManager({\n recordCanvas,\n mutationCb: wrappedCanvasMutationEmit,\n win: window,\n blockClass,\n blockSelector,\n unblockSelector,\n mirror,\n sampling: sampling.canvas,\n dataURLOptions,\n });\n const shadowDomManager = typeof __RRWEB_EXCLUDE_SHADOW_DOM__ === 'boolean' &&\n __RRWEB_EXCLUDE_SHADOW_DOM__\n ? new ShadowDomManagerNoop()\n : new ShadowDomManager({\n mutationCb: wrappedMutationEmit,\n scrollCb: wrappedScrollEmit,\n bypassOptions: {\n onMutation,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskInputOptions,\n dataURLOptions,\n maskAttributeFn,\n maskTextFn,\n maskInputFn,\n recordCanvas,\n inlineImages,\n sampling,\n slimDOMOptions,\n iframeManager,\n stylesheetManager,\n canvasManager,\n keepIframeSrcFn,\n processedNodeManager,\n },\n mirror,\n });\n takeFullSnapshot = (isCheckout = false) => {\n wrappedEmit(wrapEvent({\n type: EventType.Meta,\n data: {\n href: window.location.href,\n width: getWindowWidth(),\n height: getWindowHeight(),\n },\n }), isCheckout);\n stylesheetManager.reset();\n shadowDomManager.init();\n mutationBuffers.forEach((buf) => buf.lock());\n const node = snapshot(document, {\n mirror,\n blockClass,\n blockSelector,\n unblockSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n inlineStylesheet,\n maskAllInputs: maskInputOptions,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n slimDOM: slimDOMOptions,\n dataURLOptions,\n recordCanvas,\n inlineImages,\n onSerialize: (n) => {\n if (isSerializedIframe(n, mirror)) {\n iframeManager.addIframe(n);\n }\n if (isSerializedStylesheet(n, mirror)) {\n stylesheetManager.trackLinkElement(n);\n }\n if (hasShadowRoot(n)) {\n shadowDomManager.addShadowRoot(n.shadowRoot, document);\n }\n },\n onIframeLoad: (iframe, childSn) => {\n iframeManager.attachIframe(iframe, childSn);\n shadowDomManager.observeAttachShadow(iframe);\n },\n onStylesheetLoad: (linkEl, childSn) => {\n stylesheetManager.attachLinkElement(linkEl, childSn);\n },\n keepIframeSrcFn,\n });\n if (!node) {\n return console.warn('Failed to snapshot the document');\n }\n wrappedEmit(wrapEvent({\n type: EventType.FullSnapshot,\n data: {\n node,\n initialOffset: getWindowScroll(window),\n },\n }), isCheckout);\n mutationBuffers.forEach((buf) => buf.unlock());\n if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\n stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, mirror.getId(document));\n };\n try {\n const handlers = [];\n const observe = (doc) => {\n var _a;\n return callbackWrapper(initObservers)({\n onMutation,\n mutationCb: wrappedMutationEmit,\n mousemoveCb: (positions, source) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: {\n source,\n positions,\n },\n })),\n mouseInteractionCb: (d) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.MouseInteraction }, d),\n })),\n scrollCb: wrappedScrollEmit,\n viewportResizeCb: (d) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.ViewportResize }, d),\n })),\n inputCb: (v) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Input }, v),\n })),\n mediaInteractionCb: (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.MediaInteraction }, p),\n })),\n styleSheetRuleCb: (r) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.StyleSheetRule }, r),\n })),\n styleDeclarationCb: (r) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.StyleDeclaration }, r),\n })),\n canvasMutationCb: wrappedCanvasMutationEmit,\n fontCb: (p) => wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Font }, p),\n })),\n selectionCb: (p) => {\n wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.Selection }, p),\n }));\n },\n customElementCb: (c) => {\n wrappedEmit(wrapEvent({\n type: EventType.IncrementalSnapshot,\n data: Object.assign({ source: IncrementalSource.CustomElement }, c),\n }));\n },\n blockClass,\n ignoreClass,\n ignoreSelector,\n maskAllText,\n maskTextClass,\n unmaskTextClass,\n maskTextSelector,\n unmaskTextSelector,\n maskInputOptions,\n inlineStylesheet,\n sampling,\n recordCanvas,\n inlineImages,\n userTriggeredOnInput,\n collectFonts,\n doc,\n maskAttributeFn,\n maskInputFn,\n maskTextFn,\n keepIframeSrcFn,\n blockSelector,\n unblockSelector,\n slimDOMOptions,\n dataURLOptions,\n mirror,\n iframeManager,\n stylesheetManager,\n shadowDomManager,\n processedNodeManager,\n canvasManager,\n ignoreCSSAttributes,\n plugins: ((_a = plugins === null || plugins === void 0 ? void 0 : plugins.filter((p) => p.observer)) === null || _a === void 0 ? void 0 : _a.map((p) => ({\n observer: p.observer,\n options: p.options,\n callback: (payload) => wrappedEmit(wrapEvent({\n type: EventType.Plugin,\n data: {\n plugin: p.name,\n payload,\n },\n })),\n }))) || [],\n }, hooks);\n };\n iframeManager.addLoadListener((iframeEl) => {\n try {\n handlers.push(observe(iframeEl.contentDocument));\n }\n catch (error) {\n console.warn(error);\n }\n });\n const init = () => {\n takeFullSnapshot();\n handlers.push(observe(document));\n recording = true;\n };\n if (document.readyState === 'interactive' ||\n document.readyState === 'complete') {\n init();\n }\n else {\n handlers.push(on('DOMContentLoaded', () => {\n wrappedEmit(wrapEvent({\n type: EventType.DomContentLoaded,\n data: {},\n }));\n if (recordAfter === 'DOMContentLoaded')\n init();\n }));\n handlers.push(on('load', () => {\n wrappedEmit(wrapEvent({\n type: EventType.Load,\n data: {},\n }));\n if (recordAfter === 'load')\n init();\n }, window));\n }\n return () => {\n handlers.forEach((h) => h());\n processedNodeManager.destroy();\n recording = false;\n unregisterErrorHandler();\n };\n }\n catch (error) {\n console.warn(error);\n }\n}\nrecord.addCustomEvent = (tag, payload) => {\n if (!recording) {\n throw new Error('please add custom event after start recording');\n }\n wrappedEmit(wrapEvent({\n type: EventType.Custom,\n data: {\n tag,\n payload,\n },\n }));\n};\nrecord.freezePage = () => {\n mutationBuffers.forEach((buf) => buf.freeze());\n};\nrecord.takeFullSnapshot = (isCheckout) => {\n if (!recording) {\n throw new Error('please take full snapshot after start recording');\n }\n takeFullSnapshot(isCheckout);\n};\nrecord.mirror = mirror;\n\n/**\n * Converts a timestamp to ms, if it was in s, or keeps it as ms.\n */\nfunction timestampToMs(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp : timestamp * 1000;\n}\n\n/**\n * Converts a timestamp to s, if it was in ms, or keeps it as s.\n */\nfunction timestampToS(timestamp) {\n const isMs = timestamp > 9999999999;\n return isMs ? timestamp / 1000 : timestamp;\n}\n\n/**\n * Add a breadcrumb event to replay.\n */\nfunction addBreadcrumbEvent(replay, breadcrumb) {\n if (breadcrumb.category === 'sentry.transaction') {\n return;\n }\n\n if (['ui.click', 'ui.input'].includes(breadcrumb.category )) {\n replay.triggerUserActivity();\n } else {\n replay.checkAndHandleExpiredSession();\n }\n\n replay.addUpdate(() => {\n void replay.throttledAddEvent({\n type: EventType.Custom,\n // TODO: We were converting from ms to seconds for breadcrumbs, spans,\n // but maybe we should just keep them as milliseconds\n timestamp: (breadcrumb.timestamp || 0) * 1000,\n data: {\n tag: 'breadcrumb',\n // normalize to max. 10 depth and 1_000 properties per object\n payload: normalize(breadcrumb, 10, 1000),\n },\n });\n\n // Do not flush after console log messages\n return breadcrumb.category === 'console';\n });\n}\n\nconst INTERACTIVE_SELECTOR = 'button,a';\n\n/**\n * For clicks, we check if the target is inside of a button or link\n * If so, we use this as the target instead\n * This is useful because if you click on the image in <button><img></button>,\n * The target will be the image, not the button, which we don't want here\n */\nfunction getClickTargetNode(event) {\n const target = getTargetNode(event);\n\n if (!target || !(target instanceof Element)) {\n return target;\n }\n\n const closestInteractive = target.closest(INTERACTIVE_SELECTOR);\n return closestInteractive || target;\n}\n\n/** Get the event target node. */\nfunction getTargetNode(event) {\n if (isEventWithTarget(event)) {\n return event.target ;\n }\n\n return event;\n}\n\nfunction isEventWithTarget(event) {\n return typeof event === 'object' && !!event && 'target' in event;\n}\n\nlet handlers;\n\n/**\n * Register a handler to be called when `window.open()` is called.\n * Returns a cleanup function.\n */\nfunction onWindowOpen(cb) {\n // Ensure to only register this once\n if (!handlers) {\n handlers = [];\n monkeyPatchWindowOpen();\n }\n\n handlers.push(cb);\n\n return () => {\n const pos = handlers ? handlers.indexOf(cb) : -1;\n if (pos > -1) {\n (handlers ).splice(pos, 1);\n }\n };\n}\n\nfunction monkeyPatchWindowOpen() {\n fill(WINDOW, 'open', function (originalWindowOpen) {\n return function (...args) {\n if (handlers) {\n try {\n handlers.forEach(handler => handler());\n } catch (e) {\n // ignore errors in here\n }\n }\n\n return originalWindowOpen.apply(WINDOW, args);\n };\n });\n}\n\n/** Handle a click. */\nfunction handleClick(clickDetector, clickBreadcrumb, node) {\n clickDetector.handleClick(clickBreadcrumb, node);\n}\n\n/** A click detector class that can be used to detect slow or rage clicks on elements. */\nclass ClickDetector {\n // protected for testing\n\n constructor(\n replay,\n slowClickConfig,\n // Just for easier testing\n _addBreadcrumbEvent = addBreadcrumbEvent,\n ) {\n this._lastMutation = 0;\n this._lastScroll = 0;\n this._clicks = [];\n\n // We want everything in s, but options are in ms\n this._timeout = slowClickConfig.timeout / 1000;\n this._threshold = slowClickConfig.threshold / 1000;\n this._scollTimeout = slowClickConfig.scrollTimeout / 1000;\n this._replay = replay;\n this._ignoreSelector = slowClickConfig.ignoreSelector;\n this._addBreadcrumbEvent = _addBreadcrumbEvent;\n }\n\n /** Register click detection handlers on mutation or scroll. */\n addListeners() {\n const mutationHandler = () => {\n this._lastMutation = nowInSeconds();\n };\n\n const scrollHandler = () => {\n this._lastScroll = nowInSeconds();\n };\n\n const cleanupWindowOpen = onWindowOpen(() => {\n // Treat window.open as mutation\n this._lastMutation = nowInSeconds();\n });\n\n const clickHandler = (event) => {\n if (!event.target) {\n return;\n }\n\n const node = getClickTargetNode(event);\n if (node) {\n this._handleMultiClick(node );\n }\n };\n\n const obs = new MutationObserver(mutationHandler);\n\n obs.observe(WINDOW.document.documentElement, {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n });\n\n WINDOW.addEventListener('scroll', scrollHandler, { passive: true });\n WINDOW.addEventListener('click', clickHandler, { passive: true });\n\n this._teardown = () => {\n WINDOW.removeEventListener('scroll', scrollHandler);\n WINDOW.removeEventListener('click', clickHandler);\n cleanupWindowOpen();\n\n obs.disconnect();\n this._clicks = [];\n this._lastMutation = 0;\n this._lastScroll = 0;\n };\n }\n\n /** Clean up listeners. */\n removeListeners() {\n if (this._teardown) {\n this._teardown();\n }\n\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n }\n\n /** Handle a click */\n handleClick(breadcrumb, node) {\n if (ignoreElement(node, this._ignoreSelector) || !isClickBreadcrumb(breadcrumb)) {\n return;\n }\n\n const newClick = {\n timestamp: timestampToS(breadcrumb.timestamp),\n clickBreadcrumb: breadcrumb,\n // Set this to 0 so we know it originates from the click breadcrumb\n clickCount: 0,\n node,\n };\n\n // If there was a click in the last 1s on the same element, ignore it - only keep a single reference per second\n if (\n this._clicks.some(click => click.node === newClick.node && Math.abs(click.timestamp - newClick.timestamp) < 1)\n ) {\n return;\n }\n\n this._clicks.push(newClick);\n\n // If this is the first new click, set a timeout to check for multi clicks\n if (this._clicks.length === 1) {\n this._scheduleCheckClicks();\n }\n }\n\n /** Count multiple clicks on elements. */\n _handleMultiClick(node) {\n this._getClicks(node).forEach(click => {\n click.clickCount++;\n });\n }\n\n /** Get all pending clicks for a given node. */\n _getClicks(node) {\n return this._clicks.filter(click => click.node === node);\n }\n\n /** Check the clicks that happened. */\n _checkClicks() {\n const timedOutClicks = [];\n\n const now = nowInSeconds();\n\n this._clicks.forEach(click => {\n if (!click.mutationAfter && this._lastMutation) {\n click.mutationAfter = click.timestamp <= this._lastMutation ? this._lastMutation - click.timestamp : undefined;\n }\n if (!click.scrollAfter && this._lastScroll) {\n click.scrollAfter = click.timestamp <= this._lastScroll ? this._lastScroll - click.timestamp : undefined;\n }\n\n // All of these are in seconds!\n if (click.timestamp + this._timeout <= now) {\n timedOutClicks.push(click);\n }\n });\n\n // Remove \"old\" clicks\n for (const click of timedOutClicks) {\n const pos = this._clicks.indexOf(click);\n\n if (pos > -1) {\n this._generateBreadcrumbs(click);\n this._clicks.splice(pos, 1);\n }\n }\n\n // Trigger new check, unless no clicks left\n if (this._clicks.length) {\n this._scheduleCheckClicks();\n }\n }\n\n /** Generate matching breadcrumb(s) for the click. */\n _generateBreadcrumbs(click) {\n const replay = this._replay;\n const hadScroll = click.scrollAfter && click.scrollAfter <= this._scollTimeout;\n const hadMutation = click.mutationAfter && click.mutationAfter <= this._threshold;\n\n const isSlowClick = !hadScroll && !hadMutation;\n const { clickCount, clickBreadcrumb } = click;\n\n // Slow click\n if (isSlowClick) {\n // If `mutationAfter` is set, it means a mutation happened after the threshold, but before the timeout\n // If not, it means we just timed out without scroll & mutation\n const timeAfterClickMs = Math.min(click.mutationAfter || this._timeout, this._timeout) * 1000;\n const endReason = timeAfterClickMs < this._timeout * 1000 ? 'mutation' : 'timeout';\n\n const breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.slowClickDetected',\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n timeAfterClickMs,\n endReason,\n // If clickCount === 0, it means multiClick was not correctly captured here\n // - we still want to send 1 in this case\n clickCount: clickCount || 1,\n },\n };\n\n this._addBreadcrumbEvent(replay, breadcrumb);\n return;\n }\n\n // Multi click\n if (clickCount > 1) {\n const breadcrumb = {\n type: 'default',\n message: clickBreadcrumb.message,\n timestamp: clickBreadcrumb.timestamp,\n category: 'ui.multiClick',\n data: {\n ...clickBreadcrumb.data,\n url: WINDOW.location.href,\n route: replay.getCurrentRoute(),\n clickCount,\n metric: true,\n },\n };\n\n this._addBreadcrumbEvent(replay, breadcrumb);\n }\n }\n\n /** Schedule to check current clicks. */\n _scheduleCheckClicks() {\n if (this._checkClickTimeout) {\n clearTimeout(this._checkClickTimeout);\n }\n\n this._checkClickTimeout = setTimeout(() => this._checkClicks(), 1000);\n }\n}\n\nconst SLOW_CLICK_TAGS = ['A', 'BUTTON', 'INPUT'];\n\n/** exported for tests only */\nfunction ignoreElement(node, ignoreSelector) {\n if (!SLOW_CLICK_TAGS.includes(node.tagName)) {\n return true;\n }\n\n // If <input> tag, we only want to consider input[type='submit'] & input[type='button']\n if (node.tagName === 'INPUT' && !['submit', 'button'].includes(node.getAttribute('type') || '')) {\n return true;\n }\n\n // If <a> tag, detect special variants that may not lead to an action\n // If target !== _self, we may open the link somewhere else, which would lead to no action\n // Also, when downloading a file, we may not leave the page, but still not trigger an action\n if (\n node.tagName === 'A' &&\n (node.hasAttribute('download') || (node.hasAttribute('target') && node.getAttribute('target') !== '_self'))\n ) {\n return true;\n }\n\n if (ignoreSelector && node.matches(ignoreSelector)) {\n return true;\n }\n\n return false;\n}\n\nfunction isClickBreadcrumb(breadcrumb) {\n return !!(breadcrumb.data && typeof breadcrumb.data.nodeId === 'number' && breadcrumb.timestamp);\n}\n\n// This is good enough for us, and is easier to test/mock than `timestampInSeconds`\nfunction nowInSeconds() {\n return Date.now() / 1000;\n}\n\n/**\n * Create a breadcrumb for a replay.\n */\nfunction createBreadcrumb(\n breadcrumb,\n) {\n return {\n timestamp: Date.now() / 1000,\n type: 'default',\n ...breadcrumb,\n };\n}\n\nvar NodeType;\n(function (NodeType) {\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\n})(NodeType || (NodeType = {}));\n\n// Note that these are the serialized attributes and not attributes directly on\n// the DOM Node. Attributes we are interested in:\nconst ATTRIBUTES_TO_RECORD = new Set([\n 'id',\n 'class',\n 'aria-label',\n 'role',\n 'name',\n 'alt',\n 'title',\n 'data-test-id',\n 'data-testid',\n 'disabled',\n 'aria-disabled',\n]);\n\n/**\n * Inclusion list of attributes that we want to record from the DOM element\n */\nfunction getAttributesToRecord(attributes) {\n const obj = {};\n for (const key in attributes) {\n if (ATTRIBUTES_TO_RECORD.has(key)) {\n let normalizedKey = key;\n\n if (key === 'data-testid' || key === 'data-test-id') {\n normalizedKey = 'testId';\n }\n\n obj[normalizedKey] = attributes[key];\n }\n }\n\n return obj;\n}\n\nconst handleDomListener = (\n replay,\n) => {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleDom(handlerData);\n\n if (!result) {\n return;\n }\n\n const isClick = handlerData.name === 'click';\n const event = isClick && (handlerData.event );\n // Ignore clicks if ctrl/alt/meta/shift keys are held down as they alter behavior of clicks (e.g. open in new tab)\n if (\n isClick &&\n replay.clickDetector &&\n event &&\n !event.altKey &&\n !event.metaKey &&\n !event.ctrlKey &&\n !event.shiftKey\n ) {\n handleClick(\n replay.clickDetector,\n result ,\n getClickTargetNode(handlerData.event) ,\n );\n }\n\n addBreadcrumbEvent(replay, result);\n };\n};\n\n/** Get the base DOM breadcrumb. */\nfunction getBaseDomBreadcrumb(target, message) {\n const nodeId = record.mirror.getId(target);\n const node = nodeId && record.mirror.getNode(nodeId);\n const meta = node && record.mirror.getMeta(node);\n const element = meta && isElement(meta) ? meta : null;\n\n return {\n message,\n data: element\n ? {\n nodeId,\n node: {\n id: nodeId,\n tagName: element.tagName,\n textContent: Array.from(element.childNodes)\n .map((node) => node.type === NodeType.Text && node.textContent)\n .filter(Boolean) // filter out empty values\n .map(text => (text ).trim())\n .join(''),\n attributes: getAttributesToRecord(element.attributes),\n },\n }\n : {},\n };\n}\n\n/**\n * An event handler to react to DOM events.\n * Exported for tests.\n */\nfunction handleDom(handlerData) {\n const { target, message } = getDomTarget(handlerData);\n\n return createBreadcrumb({\n category: `ui.${handlerData.name}`,\n ...getBaseDomBreadcrumb(target, message),\n });\n}\n\nfunction getDomTarget(handlerData) {\n const isClick = handlerData.name === 'click';\n\n let message;\n let target = null;\n\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = isClick ? getClickTargetNode(handlerData.event) : getTargetNode(handlerData.event);\n message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n } catch (e) {\n message = '<unknown>';\n }\n\n return { target, message };\n}\n\nfunction isElement(node) {\n return node.type === NodeType.Element;\n}\n\n/** Handle keyboard events & create breadcrumbs. */\nfunction handleKeyboardEvent(replay, event) {\n if (!replay.isEnabled()) {\n return;\n }\n\n // Update user activity, but do not restart recording as it can create\n // noisy/low-value replays (e.g. user comes back from idle, hits alt-tab, new\n // session with a single \"keydown\" breadcrumb is created)\n replay.updateUserActivity();\n\n const breadcrumb = getKeyboardBreadcrumb(event);\n\n if (!breadcrumb) {\n return;\n }\n\n addBreadcrumbEvent(replay, breadcrumb);\n}\n\n/** exported only for tests */\nfunction getKeyboardBreadcrumb(event) {\n const { metaKey, shiftKey, ctrlKey, altKey, key, target } = event;\n\n // never capture for input fields\n if (!target || isInputElement(target ) || !key) {\n return null;\n }\n\n // Note: We do not consider shift here, as that means \"uppercase\"\n const hasModifierKey = metaKey || ctrlKey || altKey;\n const isCharacterKey = key.length === 1; // other keys like Escape, Tab, etc have a longer length\n\n // Do not capture breadcrumb if only a word key is pressed\n // This could leak e.g. user input\n if (!hasModifierKey && isCharacterKey) {\n return null;\n }\n\n const message = htmlTreeAsString(target, { maxStringLength: 200 }) || '<unknown>';\n const baseBreadcrumb = getBaseDomBreadcrumb(target , message);\n\n return createBreadcrumb({\n category: 'ui.keyDown',\n message,\n data: {\n ...baseBreadcrumb.data,\n metaKey,\n shiftKey,\n ctrlKey,\n altKey,\n key,\n },\n });\n}\n\nfunction isInputElement(target) {\n return target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;\n}\n\n// Map entryType -> function to normalize data for event\nconst ENTRY_TYPES\n\n = {\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n resource: createResourceEntry,\n paint: createPaintEntry,\n // @ts-expect-error TODO: entry type does not fit the create* functions entry type\n navigation: createNavigationEntry,\n};\n\n/**\n * Create replay performance entries from the browser performance entries.\n */\nfunction createPerformanceEntries(\n entries,\n) {\n return entries.map(createPerformanceEntry).filter(Boolean) ;\n}\n\nfunction createPerformanceEntry(entry) {\n if (!ENTRY_TYPES[entry.entryType]) {\n return null;\n }\n\n return ENTRY_TYPES[entry.entryType](entry);\n}\n\nfunction getAbsoluteTime(time) {\n // browserPerformanceTimeOrigin can be undefined if `performance` or\n // `performance.now` doesn't exist, but this is already checked by this integration\n return ((browserPerformanceTimeOrigin || WINDOW.performance.timeOrigin) + time) / 1000;\n}\n\nfunction createPaintEntry(entry) {\n const { duration, entryType, name, startTime } = entry;\n\n const start = getAbsoluteTime(startTime);\n return {\n type: entryType,\n name,\n start,\n end: start + duration,\n data: undefined,\n };\n}\n\nfunction createNavigationEntry(entry) {\n const {\n entryType,\n name,\n decodedBodySize,\n duration,\n domComplete,\n encodedBodySize,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n domInteractive,\n loadEventStart,\n loadEventEnd,\n redirectCount,\n startTime,\n transferSize,\n type,\n } = entry;\n\n // Ignore entries with no duration, they do not seem to be useful and cause dupes\n if (duration === 0) {\n return null;\n }\n\n return {\n type: `${entryType}.${type}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(domComplete),\n name,\n data: {\n size: transferSize,\n decodedBodySize,\n encodedBodySize,\n duration,\n domInteractive,\n domContentLoadedEventStart,\n domContentLoadedEventEnd,\n loadEventStart,\n loadEventEnd,\n domComplete,\n redirectCount,\n },\n };\n}\n\nfunction createResourceEntry(\n entry,\n) {\n const {\n entryType,\n initiatorType,\n name,\n responseEnd,\n startTime,\n decodedBodySize,\n encodedBodySize,\n responseStatus,\n transferSize,\n } = entry;\n\n // Core SDK handles these\n if (['fetch', 'xmlhttprequest'].includes(initiatorType)) {\n return null;\n }\n\n return {\n type: `${entryType}.${initiatorType}`,\n start: getAbsoluteTime(startTime),\n end: getAbsoluteTime(responseEnd),\n name,\n data: {\n size: transferSize,\n statusCode: responseStatus,\n decodedBodySize,\n encodedBodySize,\n },\n };\n}\n\n/**\n * Add a LCP event to the replay based on an LCP metric.\n */\nfunction getLargestContentfulPaint(metric\n\n) {\n const entries = metric.entries;\n const lastEntry = entries[entries.length - 1] ;\n const element = lastEntry ? lastEntry.element : undefined;\n\n const value = metric.value;\n\n const end = getAbsoluteTime(value);\n\n const data = {\n type: 'largest-contentful-paint',\n name: 'largest-contentful-paint',\n start: end,\n end,\n data: {\n value,\n size: value,\n nodeId: element ? record.mirror.getId(element) : undefined,\n },\n };\n\n return data;\n}\n\n/**\n * Sets up a PerformanceObserver to listen to all performance entry types.\n * Returns a callback to stop observing.\n */\nfunction setupPerformanceObserver(replay) {\n function addPerformanceEntry(entry) {\n // It is possible for entries to come up multiple times\n if (!replay.performanceEntries.includes(entry)) {\n replay.performanceEntries.push(entry);\n }\n }\n\n function onEntries({ entries }) {\n entries.forEach(addPerformanceEntry);\n }\n\n const clearCallbacks = [];\n\n (['navigation', 'paint', 'resource'] ).forEach(type => {\n clearCallbacks.push(addPerformanceInstrumentationHandler(type, onEntries));\n });\n\n clearCallbacks.push(\n addLcpInstrumentationHandler(({ metric }) => {\n replay.replayPerformanceEntries.push(getLargestContentfulPaint(metric));\n }),\n );\n\n // A callback to cleanup all handlers\n return () => {\n clearCallbacks.forEach(clearCallback => clearCallback());\n };\n}\n\nconst r = `var t={},e={};function a(t){let e=t.length;for(;--e>=0;)t[e]=0}const s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),r=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),n=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),_=new Array(576);a(_);const l=new Array(60);a(l);const h=new Array(512);a(h);const o=new Array(256);a(o);const d=new Array(29);a(d);const u=new Array(30);function f(t,e,a,s,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=s,this.max_length=r,this.has_stree=t&&t.length}let c,p,g;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}a(u);const m=t=>t<256?h[t]:h[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},y=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},v=(t,e,a)=>{y(t,a[2*e],a[2*e+1])},z=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},k=(t,e,a)=>{const s=new Array(16);let r,n,i=0;for(r=1;r<=15;r++)i=i+a[r-1]<<1,s[r]=i;for(n=0;n<=e;n++){let e=t[2*n+1];0!==e&&(t[2*n]=z(s[e]++,e))}},x=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},A=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},E=(t,e,a,s)=>{const r=2*e,n=2*a;return t[r]<t[n]||t[r]===t[n]&&s[e]<=s[a]},Z=(t,e,a)=>{const s=t.heap[a];let r=a<<1;for(;r<=t.heap_len&&(r<t.heap_len&&E(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!E(e,s,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=s},S=(t,e,a)=>{let n,i,_,l,h=0;if(0!==t.sym_next)do{n=255&t.pending_buf[t.sym_buf+h++],n+=(255&t.pending_buf[t.sym_buf+h++])<<8,i=t.pending_buf[t.sym_buf+h++],0===n?v(t,i,e):(_=o[i],v(t,_+256+1,e),l=s[_],0!==l&&(i-=d[_],y(t,i,l)),n--,_=m(n),v(t,_,a),l=r[_],0!==l&&(n-=u[_],y(t,n,l)))}while(h<t.sym_next);v(t,256,e)},U=(t,e)=>{const a=e.dyn_tree,s=e.stat_desc.static_tree,r=e.stat_desc.has_stree,n=e.stat_desc.elems;let i,_,l,h=-1;for(t.heap_len=0,t.heap_max=573,i=0;i<n;i++)0!==a[2*i]?(t.heap[++t.heap_len]=h=i,t.depth[i]=0):a[2*i+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,r&&(t.static_len-=s[2*l+1]);for(e.max_code=h,i=t.heap_len>>1;i>=1;i--)Z(t,a,i);l=n;do{i=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Z(t,a,1),_=t.heap[1],t.heap[--t.heap_max]=i,t.heap[--t.heap_max]=_,a[2*l]=a[2*i]+a[2*_],t.depth[l]=(t.depth[i]>=t.depth[_]?t.depth[i]:t.depth[_])+1,a[2*i+1]=a[2*_+1]=l,t.heap[1]=l++,Z(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,s=e.max_code,r=e.stat_desc.static_tree,n=e.stat_desc.has_stree,i=e.stat_desc.extra_bits,_=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,o,d,u,f,c,p=0;for(u=0;u<=15;u++)t.bl_count[u]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)o=t.heap[h],u=a[2*a[2*o+1]+1]+1,u>l&&(u=l,p++),a[2*o+1]=u,o>s||(t.bl_count[u]++,f=0,o>=_&&(f=i[o-_]),c=a[2*o],t.opt_len+=c*(u+f),n&&(t.static_len+=c*(r[2*o+1]+f)));if(0!==p){do{for(u=l-1;0===t.bl_count[u];)u--;t.bl_count[u]--,t.bl_count[u+1]+=2,t.bl_count[l]--,p-=2}while(p>0);for(u=l;0!==u;u--)for(o=t.bl_count[u];0!==o;)d=t.heap[--h],d>s||(a[2*d+1]!==u&&(t.opt_len+=(u-a[2*d+1])*a[2*d],a[2*d+1]=u),o--)}})(t,e),k(a,h,t.bl_count)},R=(t,e,a)=>{let s,r,n=-1,i=e[1],_=0,l=7,h=4;for(0===i&&(l=138,h=3),e[2*(a+1)+1]=65535,s=0;s<=a;s++)r=i,i=e[2*(s+1)+1],++_<l&&r===i||(_<h?t.bl_tree[2*r]+=_:0!==r?(r!==n&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,n=r,0===i?(l=138,h=3):r===i?(l=6,h=3):(l=7,h=4))},L=(t,e,a)=>{let s,r,n=-1,i=e[1],_=0,l=7,h=4;for(0===i&&(l=138,h=3),s=0;s<=a;s++)if(r=i,i=e[2*(s+1)+1],!(++_<l&&r===i)){if(_<h)do{v(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==n&&(v(t,r,t.bl_tree),_--),v(t,16,t.bl_tree),y(t,_-3,2)):_<=10?(v(t,17,t.bl_tree),y(t,_-3,3)):(v(t,18,t.bl_tree),y(t,_-11,7));_=0,n=r,0===i?(l=138,h=3):r===i?(l=6,h=3):(l=7,h=4)}};let T=!1;const F=(t,e,a,s)=>{y(t,0+(s?1:0),3),A(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};e._tr_init=t=>{T||((()=>{let t,e,a,i,w;const m=new Array(16);for(a=0,i=0;i<28;i++)for(d[i]=a,t=0;t<1<<s[i];t++)o[a++]=i;for(o[a-1]=i,w=0,i=0;i<16;i++)for(u[i]=w,t=0;t<1<<r[i];t++)h[w++]=i;for(w>>=7;i<30;i++)for(u[i]=w<<7,t=0;t<1<<r[i]-7;t++)h[256+w++]=i;for(e=0;e<=15;e++)m[e]=0;for(t=0;t<=143;)_[2*t+1]=8,t++,m[8]++;for(;t<=255;)_[2*t+1]=9,t++,m[9]++;for(;t<=279;)_[2*t+1]=7,t++,m[7]++;for(;t<=287;)_[2*t+1]=8,t++,m[8]++;for(k(_,287,m),t=0;t<30;t++)l[2*t+1]=5,l[2*t]=z(t,5);c=new f(_,s,257,286,15),p=new f(l,r,0,30,15),g=new f(new Array(0),n,0,19,7)})(),T=!0),t.l_desc=new w(t.dyn_ltree,c),t.d_desc=new w(t.dyn_dtree,p),t.bl_desc=new w(t.bl_tree,g),t.bi_buf=0,t.bi_valid=0,x(t)},e._tr_stored_block=F,e._tr_flush_block=(t,e,a,s)=>{let r,n,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),U(t,t.l_desc),U(t,t.d_desc),h=(t=>{let e;for(R(t,t.dyn_ltree,t.l_desc.max_code),R(t,t.dyn_dtree,t.d_desc.max_code),U(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),r=t.opt_len+3+7>>>3,n=t.static_len+3+7>>>3,n<=r&&(r=n)):r=n=a+5,a+4<=r&&-1!==e?F(t,e,a,s):4===t.strategy||n===r?(y(t,2+(s?1:0),3),S(t,_,l)):(y(t,4+(s?1:0),3),((t,e,a,s)=>{let r;for(y(t,e-257,5),y(t,a-1,5),y(t,s-4,4),r=0;r<s;r++)y(t,t.bl_tree[2*i[r]+1],3);L(t,t.dyn_ltree,e-1),L(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),S(t,t.dyn_ltree,t.dyn_dtree)),x(t),s&&A(t)},e._tr_tally=(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(o[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),e._tr_align=t=>{y(t,2,3),v(t,256,_),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)};var O=(t,e,a,s)=>{let r=65535&t|0,n=t>>>16&65535|0,i=0;for(;0!==a;){i=a>2e3?2e3:a,a-=i;do{r=r+e[s++]|0,n=n+r|0}while(--i);r%=65521,n%=65521}return r|n<<16|0};const D=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var s=0;s<8;s++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,s)=>{const r=D,n=s+a;t^=-1;for(let a=s;a<n;a++)t=t>>>8^r[255&(t^e[a])];return-1^t},C={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"},I={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:H,_tr_stored_block:B,_tr_flush_block:M,_tr_tally:P,_tr_align:Y}=e,K=O,j=N,G=C,{Z_NO_FLUSH:X,Z_PARTIAL_FLUSH:W,Z_FULL_FLUSH:q,Z_FINISH:J,Z_BLOCK:Q,Z_OK:V,Z_STREAM_END:$,Z_STREAM_ERROR:tt,Z_DATA_ERROR:et,Z_BUF_ERROR:at,Z_DEFAULT_COMPRESSION:st,Z_FILTERED:rt,Z_HUFFMAN_ONLY:nt,Z_RLE:it,Z_FIXED:_t,Z_DEFAULT_STRATEGY:lt,Z_UNKNOWN:ht,Z_DEFLATED:ot}=I,dt=(t,e)=>(t.msg=G[e],e),ut=t=>2*t-(t>4?9:0),ft=t=>{let e=t.length;for(;--e>=0;)t[e]=0},ct=t=>{let e,a,s,r=t.w_size;e=t.hash_size,s=e;do{a=t.head[--s],t.head[s]=a>=r?a-r:0}while(--e);e=r,s=e;do{a=t.prev[--s],t.prev[s]=a>=r?a-r:0}while(--e)};let pt=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const gt=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},wt=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,gt(t.strm)},mt=(t,e)=>{t.pending_buf[t.pending++]=e},bt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},yt=(t,e,a,s)=>{let r=t.avail_in;return r>s&&(r=s),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=K(t.adler,e,r,a):2===t.state.wrap&&(t.adler=j(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},vt=(t,e)=>{let a,s,r=t.max_chain_length,n=t.strstart,i=t.prev_length,_=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,o=t.w_mask,d=t.prev,u=t.strstart+258;let f=h[n+i-1],c=h[n+i];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(a=e,h[a+i]===c&&h[a+i-1]===f&&h[a]===h[n]&&h[++a]===h[n+1]){n+=2,a++;do{}while(h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&h[++n]===h[++a]&&n<u);if(s=258-(u-n),n=u-258,s>i){if(t.match_start=e,i=s,s>=_)break;f=h[n+i-1],c=h[n+i]}}}while((e=d[e&o])>l&&0!=--r);return i<=t.lookahead?i:t.lookahead},zt=t=>{const e=t.w_size;let a,s,r;do{if(s=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-s),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),ct(t),s+=e),0===t.strm.avail_in)break;if(a=yt(t.strm,t.window,t.strstart+t.lookahead,s),t.lookahead+=a,t.lookahead+t.insert>=3)for(r=t.strstart-t.insert,t.ins_h=t.window[r],t.ins_h=pt(t,t.ins_h,t.window[r+1]);t.insert&&(t.ins_h=pt(t,t.ins_h,t.window[r+3-1]),t.prev[r&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=r,r++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,s,r,n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,i=0,_=t.strm.avail_in;do{if(a=65535,r=t.bi_valid+42>>3,t.strm.avail_out<r)break;if(r=t.strm.avail_out-r,s=t.strstart-t.block_start,a>s+t.strm.avail_in&&(a=s+t.strm.avail_in),a>r&&(a=r),a<n&&(0===a&&e!==J||e===X||a!==s+t.strm.avail_in))break;i=e===J&&a===s+t.strm.avail_in?1:0,B(t,0,0,i),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,gt(t.strm),s&&(s>a&&(s=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+s),t.strm.next_out),t.strm.next_out+=s,t.strm.avail_out-=s,t.strm.total_out+=s,t.block_start+=s,a-=s),a&&(yt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===i);return _-=t.strm.avail_in,_&&(_>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=_&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-_,t.strm.next_in),t.strstart),t.strstart+=_,t.insert+=_>t.w_size-t.insert?t.w_size-t.insert:_),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),i?4:e!==X&&e!==J&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(r=t.window_size-t.strstart,t.strm.avail_in>r&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,r+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),r>t.strm.avail_in&&(r=t.strm.avail_in),r&&(yt(t.strm,t.window,t.strstart,r),t.strstart+=r,t.insert+=r>t.w_size-t.insert?t.w_size-t.insert:r),t.high_water<t.strstart&&(t.high_water=t.strstart),r=t.bi_valid+42>>3,r=t.pending_buf_size-r>65535?65535:t.pending_buf_size-r,n=r>t.w_size?t.w_size:r,s=t.strstart-t.block_start,(s>=n||(s||e===J)&&e!==X&&0===t.strm.avail_in&&s<=r)&&(a=s>r?r:s,i=e===J&&0===t.strm.avail_in&&a===s?1:0,B(t,t.block_start,a,i),t.block_start+=a,gt(t.strm)),i?3:1)},xt=(t,e)=>{let a,s;for(;;){if(t.lookahead<262){if(zt(t),t.lookahead<262&&e===X)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=vt(t,a)),t.match_length>=3)if(s=P(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=pt(t,t.ins_h,t.window[t.strstart+1]);else s=P(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(s&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2},At=(t,e)=>{let a,s,r;for(;;){if(t.lookahead<262){if(zt(t),t.lookahead<262&&e===X)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=vt(t,a),t.match_length<=5&&(t.strategy===rt||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,s=P(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=pt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,s&&(wt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(s=P(t,0,t.window[t.strstart-1]),s&&wt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(s=P(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2};function Et(t,e,a,s,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=s,this.func=r}const Zt=[new Et(0,0,0,0,kt),new Et(4,4,8,4,xt),new Et(4,5,16,8,xt),new Et(4,6,32,32,xt),new Et(4,4,16,16,At),new Et(8,16,32,32,At),new Et(8,16,128,128,At),new Et(8,32,128,256,At),new Et(32,128,258,1024,At),new Et(32,258,258,4096,At)];function St(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),ft(this.dyn_ltree),ft(this.dyn_dtree),ft(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),ft(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),ft(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Ut=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Ut(t))return dt(t,tt);t.total_in=t.total_out=0,t.data_type=ht;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,H(e),V},Lt=t=>{const e=Rt(t);var a;return e===V&&((a=t.state).window_size=2*a.w_size,ft(a.head),a.max_lazy_match=Zt[a.level].max_lazy,a.good_match=Zt[a.level].good_length,a.nice_match=Zt[a.level].nice_length,a.max_chain_length=Zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Tt=(t,e,a,s,r,n)=>{if(!t)return tt;let i=1;if(e===st&&(e=6),s<0?(i=0,s=-s):s>15&&(i=2,s-=16),r<1||r>9||a!==ot||s<8||s>15||e<0||e>9||n<0||n>_t||8===s&&1!==i)return dt(t,tt);8===s&&(s=9);const _=new St;return t.state=_,_.strm=t,_.status=42,_.wrap=i,_.gzhead=null,_.w_bits=s,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.sym_buf=_.lit_bufsize,_.sym_end=3*(_.lit_bufsize-1),_.level=e,_.strategy=n,_.method=a,Lt(t)};t.deflateInit=(t,e)=>Tt(t,e,ot,15,8,lt),t.deflateInit2=Tt,t.deflateReset=Lt,t.deflateResetKeep=Rt,t.deflateSetHeader=(t,e)=>Ut(t)||2!==t.state.wrap?tt:(t.state.gzhead=e,V),t.deflate=(t,e)=>{if(Ut(t)||e>Q||e<0)return t?dt(t,tt):tt;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==J)return dt(t,0===t.avail_out?at:tt);const s=a.last_flush;if(a.last_flush=e,0!==a.pending){if(gt(t),0===t.avail_out)return a.last_flush=-1,V}else if(0===t.avail_in&&ut(e)<=ut(s)&&e!==J)return dt(t,at);if(666===a.status&&0!==t.avail_in)return dt(t,at);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,s=-1;if(s=a.strategy>=nt||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=s<<6,0!==a.strstart&&(e|=32),e+=31-e%31,bt(a,e),0!==a.strstart&&(bt(a,t.adler>>>16),bt(a,65535&t.adler)),t.adler=1,a.status=113,gt(t),0!==a.pending)return a.last_flush=-1,V}if(57===a.status)if(t.adler=0,mt(a,31),mt(a,139),mt(a,8),a.gzhead)mt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),mt(a,255&a.gzhead.time),mt(a,a.gzhead.time>>8&255),mt(a,a.gzhead.time>>16&255),mt(a,a.gzhead.time>>24&255),mt(a,9===a.level?2:a.strategy>=nt||a.level<2?4:0),mt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(mt(a,255&a.gzhead.extra.length),mt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=j(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(mt(a,0),mt(a,0),mt(a,0),mt(a,0),mt(a,0),mt(a,9===a.level?2:a.strategy>=nt||a.level<2?4:0),mt(a,3),a.status=113,gt(t),0!==a.pending)return a.last_flush=-1,V;if(69===a.status){if(a.gzhead.extra){let e=a.pending,s=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+s>a.pending_buf_size;){let r=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+r),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=j(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=r,gt(t),0!==a.pending)return a.last_flush=-1,V;e=0,s-=r}let r=new Uint8Array(a.gzhead.extra);a.pending_buf.set(r.subarray(a.gzindex,a.gzindex+s),a.pending),a.pending+=s,a.gzhead.hcrc&&a.pending>e&&(t.adler=j(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,s=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s)),gt(t),0!==a.pending)return a.last_flush=-1,V;s=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,mt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,s=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s)),gt(t),0!==a.pending)return a.last_flush=-1,V;s=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,mt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>s&&(t.adler=j(t.adler,a.pending_buf,a.pending-s,s))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(gt(t),0!==a.pending))return a.last_flush=-1,V;mt(a,255&t.adler),mt(a,t.adler>>8&255),t.adler=0}if(a.status=113,gt(t),0!==a.pending)return a.last_flush=-1,V}if(0!==t.avail_in||0!==a.lookahead||e!==X&&666!==a.status){let s=0===a.level?kt(a,e):a.strategy===nt?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(zt(t),0===t.lookahead)){if(e===X)return 1;break}if(t.match_length=0,a=P(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,s,r,n;const i=t.window;for(;;){if(t.lookahead<=258){if(zt(t),t.lookahead<=258&&e===X)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(r=t.strstart-1,s=i[r],s===i[++r]&&s===i[++r]&&s===i[++r])){n=t.strstart+258;do{}while(s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&s===i[++r]&&r<n);t.match_length=258-(n-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=P(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=P(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(wt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===J?(wt(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(wt(t,!1),0===t.strm.avail_out)?1:2})(a,e):Zt[a.level].func(a,e);if(3!==s&&4!==s||(a.status=666),1===s||3===s)return 0===t.avail_out&&(a.last_flush=-1),V;if(2===s&&(e===W?Y(a):e!==Q&&(B(a,0,0,!1),e===q&&(ft(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),gt(t),0===t.avail_out))return a.last_flush=-1,V}return e!==J?V:a.wrap<=0?$:(2===a.wrap?(mt(a,255&t.adler),mt(a,t.adler>>8&255),mt(a,t.adler>>16&255),mt(a,t.adler>>24&255),mt(a,255&t.total_in),mt(a,t.total_in>>8&255),mt(a,t.total_in>>16&255),mt(a,t.total_in>>24&255)):(bt(a,t.adler>>>16),bt(a,65535&t.adler)),gt(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?V:$)},t.deflateEnd=t=>{if(Ut(t))return tt;const e=t.state.status;return t.state=null,113===e?dt(t,et):V},t.deflateSetDictionary=(t,e)=>{let a=e.length;if(Ut(t))return tt;const s=t.state,r=s.wrap;if(2===r||1===r&&42!==s.status||s.lookahead)return tt;if(1===r&&(t.adler=K(t.adler,e,a,0)),s.wrap=0,a>=s.w_size){0===r&&(ft(s.head),s.strstart=0,s.block_start=0,s.insert=0);let t=new Uint8Array(s.w_size);t.set(e.subarray(a-s.w_size,a),0),e=t,a=s.w_size}const n=t.avail_in,i=t.next_in,_=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,zt(s);s.lookahead>=3;){let t=s.strstart,e=s.lookahead-2;do{s.ins_h=pt(s,s.ins_h,s.window[t+3-1]),s.prev[t&s.w_mask]=s.head[s.ins_h],s.head[s.ins_h]=t,t++}while(--e);s.strstart=t,s.lookahead=2,zt(s)}return s.strstart+=s.lookahead,s.block_start=s.strstart,s.insert=s.lookahead,s.lookahead=0,s.match_length=s.prev_length=2,s.match_available=0,t.next_in=i,t.input=_,t.avail_in=n,s.wrap=r,V},t.deflateInfo=\"pako deflate (from Nodeca project)\";var Ft={};const Ot=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);Ft.assign=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if(\"object\"!=typeof a)throw new TypeError(a+\"must be non-object\");for(const e in a)Ot(a,e)&&(t[e]=a[e])}}return t},Ft.flattenChunks=t=>{let e=0;for(let a=0,s=t.length;a<s;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,s=0,r=t.length;e<r;e++){let r=t[e];a.set(r,s),s+=r.length}return a};var Dt={};let Nt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Nt=!1}const Ct=new Uint8Array(256);for(let t=0;t<256;t++)Ct[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Ct[254]=Ct[254]=1,Dt.string2buf=t=>{if(\"function\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,s,r,n,i=t.length,_=0;for(r=0;r<i;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<i&&(s=t.charCodeAt(r+1),56320==(64512&s)&&(a=65536+(a-55296<<10)+(s-56320),r++)),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),n=0,r=0;n<_;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<i&&(s=t.charCodeAt(r+1),56320==(64512&s)&&(a=65536+(a-55296<<10)+(s-56320),r++)),a<128?e[n++]=a:a<2048?(e[n++]=192|a>>>6,e[n++]=128|63&a):a<65536?(e[n++]=224|a>>>12,e[n++]=128|a>>>6&63,e[n++]=128|63&a):(e[n++]=240|a>>>18,e[n++]=128|a>>>12&63,e[n++]=128|a>>>6&63,e[n++]=128|63&a);return e};Dt.buf2string=(t,e)=>{const a=e||t.length;if(\"function\"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let s,r;const n=new Array(2*a);for(r=0,s=0;s<a;){let e=t[s++];if(e<128){n[r++]=e;continue}let i=Ct[e];if(i>4)n[r++]=65533,s+=i-1;else{for(e&=2===i?31:3===i?15:7;i>1&&s<a;)e=e<<6|63&t[s++],i--;i>1?n[r++]=65533:e<65536?n[r++]=e:(e-=65536,n[r++]=55296|e>>10&1023,n[r++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Nt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a=\"\";for(let s=0;s<e;s++)a+=String.fromCharCode(t[s]);return a})(n,r)},Dt.utf8border=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Ct[t[a]]>e?a:e};const It=t,Ht=Ft,Bt=Dt,Mt=C,Pt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0},Yt=Object.prototype.toString,{Z_NO_FLUSH:Kt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Gt,Z_FINISH:Xt,Z_OK:Wt,Z_STREAM_END:qt,Z_DEFAULT_COMPRESSION:Jt,Z_DEFAULT_STRATEGY:Qt,Z_DEFLATED:Vt}=I;function $t(t){this.options=Ht.assign({level:Jt,method:Vt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Qt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new Pt,this.strm.avail_out=0;let a=It.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Wt)throw new Error(Mt[a]);if(e.header&&It.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t=\"string\"==typeof e.dictionary?Bt.string2buf(e.dictionary):\"[object ArrayBuffer]\"===Yt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=It.deflateSetDictionary(this.strm,t),a!==Wt)throw new Error(Mt[a]);this._dict_set=!0}}$t.prototype.push=function(t,e){const a=this.strm,s=this.options.chunkSize;let r,n;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Xt:Kt,\"string\"==typeof t?a.input=Bt.string2buf(t):\"[object ArrayBuffer]\"===Yt.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(s),a.next_out=0,a.avail_out=s),(n===jt||n===Gt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(r=It.deflate(a,n),r===qt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),r=It.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===Wt;if(0!==a.avail_out){if(n>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},$t.prototype.onData=function(t){this.chunks.push(t)},$t.prototype.onEnd=function(t){t===Wt&&(this.result=Ht.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const te=$t,ee=function(t,e){const a=new $t(e);if(a.push(t,!0),a.err)throw a.msg||Mt[a.err];return a.result},ae=I;const se=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error(\"Adding invalid event\");const e=this._hasEvents?\",\":\"\";this.deflate.push(e+t,ae.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push(\"]\",ae.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new te,this.deflate.push(\"[\",ae.Z_NO_FLUSH)}},re={clear:()=>{se.clear()},addEvent:t=>se.addEvent(t),finish:()=>se.finish(),compress:t=>function(t){return ee(t)}(t)};addEventListener(\"message\",(function(t){const e=t.data.method,a=t.data.id,s=t.data.arg;if(e in re&&\"function\"==typeof re[e])try{const t=re[e](s);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:\"init\",success:!0,response:void 0});`;\n\nfunction e(){const e=new Blob([r]);return URL.createObjectURL(e)}\n\n/**\n * Log a message in debug mode, and add a breadcrumb when _experiment.traceInternals is enabled.\n */\nfunction logInfo(message, shouldAddBreadcrumb) {\n if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n return;\n }\n\n logger.info(message);\n\n if (shouldAddBreadcrumb) {\n addBreadcrumb(message);\n }\n}\n\n/**\n * Log a message, and add a breadcrumb in the next tick.\n * This is necessary when the breadcrumb may be added before the replay is initialized.\n */\nfunction logInfoNextTick(message, shouldAddBreadcrumb) {\n if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {\n return;\n }\n\n logger.info(message);\n\n if (shouldAddBreadcrumb) {\n // Wait a tick here to avoid race conditions for some initial logs\n // which may be added before replay is initialized\n setTimeout(() => {\n addBreadcrumb(message);\n }, 0);\n }\n}\n\nfunction addBreadcrumb(message) {\n const hub = getCurrentHub();\n hub.addBreadcrumb(\n {\n category: 'console',\n data: {\n logger: 'replay',\n },\n level: 'info',\n message,\n },\n { level: 'info' },\n );\n}\n\n/** This error indicates that the event buffer size exceeded the limit.. */\nclass EventBufferSizeExceededError extends Error {\n constructor() {\n super(`Event buffer exceeded maximum size of ${REPLAY_MAX_EVENT_BUFFER_SIZE}.`);\n }\n}\n\n/**\n * A basic event buffer that does not do any compression.\n * Used as fallback if the compression worker cannot be loaded or is disabled.\n */\nclass EventBufferArray {\n /** All the events that are buffered to be sent. */\n\n /** @inheritdoc */\n\n constructor() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return this.events.length > 0;\n }\n\n /** @inheritdoc */\n get type() {\n return 'sync';\n }\n\n /** @inheritdoc */\n destroy() {\n this.events = [];\n }\n\n /** @inheritdoc */\n async addEvent(event) {\n const eventSize = JSON.stringify(event).length;\n this._totalSize += eventSize;\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n throw new EventBufferSizeExceededError();\n }\n\n this.events.push(event);\n }\n\n /** @inheritdoc */\n finish() {\n return new Promise(resolve => {\n // Make a copy of the events array reference and immediately clear the\n // events member so that we do not lose new events while uploading\n // attachment.\n const eventsRet = this.events;\n this.clear();\n resolve(JSON.stringify(eventsRet));\n });\n }\n\n /** @inheritdoc */\n clear() {\n this.events = [];\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n const timestamp = this.events.map(event => event.timestamp).sort()[0];\n\n if (!timestamp) {\n return null;\n }\n\n return timestampToMs(timestamp);\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass WorkerHandler {\n\n constructor(worker) {\n this._worker = worker;\n this._id = 0;\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occured.\n */\n ensureReady() {\n // Ensure we only check once\n if (this._ensureReadyPromise) {\n return this._ensureReadyPromise;\n }\n\n this._ensureReadyPromise = new Promise((resolve, reject) => {\n this._worker.addEventListener(\n 'message',\n ({ data }) => {\n if ((data ).success) {\n resolve();\n } else {\n reject();\n }\n },\n { once: true },\n );\n\n this._worker.addEventListener(\n 'error',\n error => {\n reject(error);\n },\n { once: true },\n );\n });\n\n return this._ensureReadyPromise;\n }\n\n /**\n * Destroy the worker.\n */\n destroy() {\n logInfo('[Replay] Destroying compression worker');\n this._worker.terminate();\n }\n\n /**\n * Post message to worker and wait for response before resolving promise.\n */\n postMessage(method, arg) {\n const id = this._getAndIncrementId();\n\n return new Promise((resolve, reject) => {\n const listener = ({ data }) => {\n const response = data ;\n if (response.method !== method) {\n return;\n }\n\n // There can be multiple listeners for a single method, the id ensures\n // that the response matches the caller.\n if (response.id !== id) {\n return;\n }\n\n // At this point, we'll always want to remove listener regardless of result status\n this._worker.removeEventListener('message', listener);\n\n if (!response.success) {\n // TODO: Do some error handling, not sure what\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay]', response.response);\n\n reject(new Error('Error in compression worker'));\n return;\n }\n\n resolve(response.response );\n };\n\n // Note: we can't use `once` option because it's possible it needs to\n // listen to multiple messages\n this._worker.addEventListener('message', listener);\n this._worker.postMessage({ id, method, arg });\n });\n }\n\n /** Get the current ID and increment it for the next call. */\n _getAndIncrementId() {\n return this._id++;\n }\n}\n\n/**\n * Event buffer that uses a web worker to compress events.\n * Exported only for testing.\n */\nclass EventBufferCompressionWorker {\n /** @inheritdoc */\n\n constructor(worker) {\n this._worker = new WorkerHandler(worker);\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n }\n\n /** @inheritdoc */\n get hasEvents() {\n return !!this._earliestTimestamp;\n }\n\n /** @inheritdoc */\n get type() {\n return 'worker';\n }\n\n /**\n * Ensure the worker is ready (or not).\n * This will either resolve when the worker is ready, or reject if an error occured.\n */\n ensureReady() {\n return this._worker.ensureReady();\n }\n\n /**\n * Destroy the event buffer.\n */\n destroy() {\n this._worker.destroy();\n }\n\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfuly received and processed by worker.\n */\n addEvent(event) {\n const timestamp = timestampToMs(event.timestamp);\n if (!this._earliestTimestamp || timestamp < this._earliestTimestamp) {\n this._earliestTimestamp = timestamp;\n }\n\n const data = JSON.stringify(event);\n this._totalSize += data.length;\n\n if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) {\n return Promise.reject(new EventBufferSizeExceededError());\n }\n\n return this._sendEventToWorker(data);\n }\n\n /**\n * Finish the event buffer and return the compressed data.\n */\n finish() {\n return this._finishRequest();\n }\n\n /** @inheritdoc */\n clear() {\n this._earliestTimestamp = null;\n this._totalSize = 0;\n this.hasCheckout = false;\n\n // We do not wait on this, as we assume the order of messages is consistent for the worker\n void this._worker.postMessage('clear');\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._earliestTimestamp;\n }\n\n /**\n * Send the event to the worker.\n */\n _sendEventToWorker(data) {\n return this._worker.postMessage('addEvent', data);\n }\n\n /**\n * Finish the request and return the compressed data from the worker.\n */\n async _finishRequest() {\n const response = await this._worker.postMessage('finish');\n\n this._earliestTimestamp = null;\n this._totalSize = 0;\n\n return response;\n }\n}\n\n/**\n * This proxy will try to use the compression worker, and fall back to use the simple buffer if an error occurs there.\n * This can happen e.g. if the worker cannot be loaded.\n * Exported only for testing.\n */\nclass EventBufferProxy {\n\n constructor(worker) {\n this._fallback = new EventBufferArray();\n this._compression = new EventBufferCompressionWorker(worker);\n this._used = this._fallback;\n\n this._ensureWorkerIsLoadedPromise = this._ensureWorkerIsLoaded();\n }\n\n /** @inheritdoc */\n get type() {\n return this._used.type;\n }\n\n /** @inheritDoc */\n get hasEvents() {\n return this._used.hasEvents;\n }\n\n /** @inheritdoc */\n get hasCheckout() {\n return this._used.hasCheckout;\n }\n /** @inheritdoc */\n set hasCheckout(value) {\n this._used.hasCheckout = value;\n }\n\n /** @inheritDoc */\n destroy() {\n this._fallback.destroy();\n this._compression.destroy();\n }\n\n /** @inheritdoc */\n clear() {\n return this._used.clear();\n }\n\n /** @inheritdoc */\n getEarliestTimestamp() {\n return this._used.getEarliestTimestamp();\n }\n\n /**\n * Add an event to the event buffer.\n *\n * Returns true if event was successfully added.\n */\n addEvent(event) {\n return this._used.addEvent(event);\n }\n\n /** @inheritDoc */\n async finish() {\n // Ensure the worker is loaded, so the sent event is compressed\n await this.ensureWorkerIsLoaded();\n\n return this._used.finish();\n }\n\n /** Ensure the worker has loaded. */\n ensureWorkerIsLoaded() {\n return this._ensureWorkerIsLoadedPromise;\n }\n\n /** Actually check if the worker has been loaded. */\n async _ensureWorkerIsLoaded() {\n try {\n await this._compression.ensureReady();\n } catch (error) {\n // If the worker fails to load, we fall back to the simple buffer.\n // Nothing more to do from our side here\n logInfo('[Replay] Failed to load the compression worker, falling back to simple buffer');\n return;\n }\n\n // Now we need to switch over the array buffer to the compression worker\n await this._switchToCompressionWorker();\n }\n\n /** Switch the used buffer to the compression worker. */\n async _switchToCompressionWorker() {\n const { events, hasCheckout } = this._fallback;\n\n const addEventPromises = [];\n for (const event of events) {\n addEventPromises.push(this._compression.addEvent(event));\n }\n\n this._compression.hasCheckout = hasCheckout;\n\n // We switch over to the new buffer immediately - any further events will be added\n // after the previously buffered ones\n this._used = this._compression;\n\n // Wait for original events to be re-added before resolving\n try {\n await Promise.all(addEventPromises);\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Replay] Failed to add events when switching buffers.', error);\n }\n }\n}\n\n/**\n * Create an event buffer for replays.\n */\nfunction createEventBuffer({\n useCompression,\n workerUrl: customWorkerUrl,\n}) {\n if (\n useCompression &&\n // eslint-disable-next-line no-restricted-globals\n window.Worker\n ) {\n const worker = _loadWorker(customWorkerUrl);\n\n if (worker) {\n return worker;\n }\n }\n\n logInfo('[Replay] Using simple buffer');\n return new EventBufferArray();\n}\n\nfunction _loadWorker(customWorkerUrl) {\n try {\n const workerUrl = customWorkerUrl || _getWorkerUrl();\n\n if (!workerUrl) {\n return;\n }\n\n logInfo(`[Replay] Using compression worker${customWorkerUrl ? ` from ${customWorkerUrl}` : ''}`);\n const worker = new Worker(workerUrl);\n return new EventBufferProxy(worker);\n } catch (error) {\n logInfo('[Replay] Failed to create compression worker');\n // Fall back to use simple event buffer array\n }\n}\n\nfunction _getWorkerUrl() {\n if (typeof __SENTRY_EXCLUDE_REPLAY_WORKER__ === 'undefined' || !__SENTRY_EXCLUDE_REPLAY_WORKER__) {\n return e();\n }\n\n return '';\n}\n\n/** If sessionStorage is available. */\nfunction hasSessionStorage() {\n try {\n // This can throw, e.g. when being accessed in a sandboxed iframe\n return 'sessionStorage' in WINDOW && !!WINDOW.sessionStorage;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Removes the session from Session Storage and unsets session in replay instance\n */\nfunction clearSession(replay) {\n deleteSession();\n replay.session = undefined;\n}\n\n/**\n * Deletes a session from storage\n */\nfunction deleteSession() {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.removeItem(REPLAY_SESSION_KEY);\n } catch (e) {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Given a sample rate, returns true if replay should be sampled.\n *\n * 1.0 = 100% sampling\n * 0.0 = 0% sampling\n */\nfunction isSampled(sampleRate) {\n if (sampleRate === undefined) {\n return false;\n }\n\n // Math.random() returns a number in range of 0 to 1 (inclusive of 0, but not 1)\n return Math.random() < sampleRate;\n}\n\n/**\n * Save a session to session storage.\n */\nfunction saveSession(session) {\n if (!hasSessionStorage()) {\n return;\n }\n\n try {\n WINDOW.sessionStorage.setItem(REPLAY_SESSION_KEY, JSON.stringify(session));\n } catch (e) {\n // Ignore potential SecurityError exceptions\n }\n}\n\n/**\n * Get a session with defaults & applied sampling.\n */\nfunction makeSession(session) {\n const now = Date.now();\n const id = session.id || uuid4();\n // Note that this means we cannot set a started/lastActivity of `0`, but this should not be relevant outside of tests.\n const started = session.started || now;\n const lastActivity = session.lastActivity || now;\n const segmentId = session.segmentId || 0;\n const sampled = session.sampled;\n const previousSessionId = session.previousSessionId;\n\n return {\n id,\n started,\n lastActivity,\n segmentId,\n sampled,\n previousSessionId,\n };\n}\n\n/**\n * Get the sampled status for a session based on sample rates & current sampled status.\n */\nfunction getSessionSampleType(sessionSampleRate, allowBuffering) {\n return isSampled(sessionSampleRate) ? 'session' : allowBuffering ? 'buffer' : false;\n}\n\n/**\n * Create a new session, which in its current implementation is a Sentry event\n * that all replays will be saved to as attachments. Currently, we only expect\n * one of these Sentry events per \"replay session\".\n */\nfunction createSession(\n { sessionSampleRate, allowBuffering, stickySession = false },\n { previousSessionId } = {},\n) {\n const sampled = getSessionSampleType(sessionSampleRate, allowBuffering);\n const session = makeSession({\n sampled,\n previousSessionId,\n });\n\n if (stickySession) {\n saveSession(session);\n }\n\n return session;\n}\n\n/**\n * Fetches a session from storage\n */\nfunction fetchSession(traceInternals) {\n if (!hasSessionStorage()) {\n return null;\n }\n\n try {\n // This can throw if cookies are disabled\n const sessionStringFromStorage = WINDOW.sessionStorage.getItem(REPLAY_SESSION_KEY);\n\n if (!sessionStringFromStorage) {\n return null;\n }\n\n const sessionObj = JSON.parse(sessionStringFromStorage) ;\n\n logInfoNextTick('[Replay] Loading existing session', traceInternals);\n\n return makeSession(sessionObj);\n } catch (e) {\n return null;\n }\n}\n\n/**\n * Given an initial timestamp and an expiry duration, checks to see if current\n * time should be considered as expired.\n */\nfunction isExpired(\n initialTime,\n expiry,\n targetTime = +new Date(),\n) {\n // Always expired if < 0\n if (initialTime === null || expiry === undefined || expiry < 0) {\n return true;\n }\n\n // Never expires if == 0\n if (expiry === 0) {\n return false;\n }\n\n return initialTime + expiry <= targetTime;\n}\n\n/**\n * Checks to see if session is expired\n */\nfunction isSessionExpired(\n session,\n {\n maxReplayDuration,\n sessionIdleExpire,\n targetTime = Date.now(),\n },\n) {\n return (\n // First, check that maximum session length has not been exceeded\n isExpired(session.started, maxReplayDuration, targetTime) ||\n // check that the idle timeout has not been exceeded (i.e. user has\n // performed an action within the last `sessionIdleExpire` ms)\n isExpired(session.lastActivity, sessionIdleExpire, targetTime)\n );\n}\n\n/** If the session should be refreshed or not. */\nfunction shouldRefreshSession(\n session,\n { sessionIdleExpire, maxReplayDuration },\n) {\n // If not expired, all good, just keep the session\n if (!isSessionExpired(session, { sessionIdleExpire, maxReplayDuration })) {\n return false;\n }\n\n // If we are buffering & haven't ever flushed yet, always continue\n if (session.sampled === 'buffer' && session.segmentId === 0) {\n return false;\n }\n\n return true;\n}\n\n/**\n * Get or create a session, when initializing the replay.\n * Returns a session that may be unsampled.\n */\nfunction loadOrCreateSession(\n {\n traceInternals,\n sessionIdleExpire,\n maxReplayDuration,\n previousSessionId,\n }\n\n,\n sessionOptions,\n) {\n const existingSession = sessionOptions.stickySession && fetchSession(traceInternals);\n\n // No session exists yet, just create a new one\n if (!existingSession) {\n logInfoNextTick('[Replay] Creating new session', traceInternals);\n return createSession(sessionOptions, { previousSessionId });\n }\n\n if (!shouldRefreshSession(existingSession, { sessionIdleExpire, maxReplayDuration })) {\n return existingSession;\n }\n\n logInfoNextTick('[Replay] Session in sessionStorage is expired, creating new one...');\n return createSession(sessionOptions, { previousSessionId: existingSession.id });\n}\n\nconst ReplayEventTypeCustom = 5;\n\nfunction isCustomEvent(event) {\n return event.type === EventType.Custom;\n}\n\n/**\n * Add an event to the event buffer.\n * In contrast to `addEvent`, this does not return a promise & does not wait for the adding of the event to succeed/fail.\n * Instead this returns `true` if we tried to add the event, else false.\n * It returns `false` e.g. if we are paused, disabled, or out of the max replay duration.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEventSync(replay, event, isCheckout) {\n if (!shouldAddEvent(replay, event)) {\n return false;\n }\n\n void _addEvent(replay, event, isCheckout);\n\n return true;\n}\n\n/**\n * Add an event to the event buffer.\n * Resolves to `null` if no event was added, else to `void`.\n *\n * `isCheckout` is true if this is either the very first event, or an event triggered by `checkoutEveryNms`.\n */\nfunction addEvent(\n replay,\n event,\n isCheckout,\n) {\n if (!shouldAddEvent(replay, event)) {\n return Promise.resolve(null);\n }\n\n return _addEvent(replay, event, isCheckout);\n}\n\nasync function _addEvent(\n replay,\n event,\n isCheckout,\n) {\n if (!replay.eventBuffer) {\n return null;\n }\n\n try {\n if (isCheckout && replay.recordingMode === 'buffer') {\n replay.eventBuffer.clear();\n }\n\n if (isCheckout) {\n replay.eventBuffer.hasCheckout = true;\n }\n\n const replayOptions = replay.getOptions();\n\n const eventAfterPossibleCallback = maybeApplyCallback(event, replayOptions.beforeAddRecordingEvent);\n\n if (!eventAfterPossibleCallback) {\n return;\n }\n\n return await replay.eventBuffer.addEvent(eventAfterPossibleCallback);\n } catch (error) {\n const reason = error && error instanceof EventBufferSizeExceededError ? 'addEventSizeExceeded' : 'addEvent';\n\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(error);\n await replay.stop({ reason });\n\n const client = getCurrentHub().getClient();\n\n if (client) {\n client.recordDroppedEvent('internal_sdk_error', 'replay');\n }\n }\n}\n\n/** Exported only for tests. */\nfunction shouldAddEvent(replay, event) {\n if (!replay.eventBuffer || replay.isPaused() || !replay.isEnabled()) {\n return false;\n }\n\n const timestampInMs = timestampToMs(event.timestamp);\n\n // Throw out events that happen more than 5 minutes ago. This can happen if\n // page has been left open and idle for a long period of time and user\n // comes back to trigger a new session. The performance entries rely on\n // `performance.timeOrigin`, which is when the page first opened.\n if (timestampInMs + replay.timeouts.sessionIdlePause < Date.now()) {\n return false;\n }\n\n // Throw out events that are +60min from the initial timestamp\n if (timestampInMs > replay.getContext().initialTimestamp + replay.getOptions().maxReplayDuration) {\n logInfo(\n `[Replay] Skipping event with timestamp ${timestampInMs} because it is after maxReplayDuration`,\n replay.getOptions()._experiments.traceInternals,\n );\n return false;\n }\n\n return true;\n}\n\nfunction maybeApplyCallback(\n event,\n callback,\n) {\n try {\n if (typeof callback === 'function' && isCustomEvent(event)) {\n return callback(event);\n }\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&\n logger.error('[Replay] An error occured in the `beforeAddRecordingEvent` callback, skipping the event...', error);\n return null;\n }\n\n return event;\n}\n\n/** If the event is an error event */\nfunction isErrorEvent(event) {\n return !event.type;\n}\n\n/** If the event is a transaction event */\nfunction isTransactionEvent(event) {\n return event.type === 'transaction';\n}\n\n/** If the event is an replay event */\nfunction isReplayEvent(event) {\n return event.type === 'replay_event';\n}\n\n/**\n * Returns a listener to be added to `client.on('afterSendErrorEvent, listener)`.\n */\nfunction handleAfterSendEvent(replay) {\n // Custom transports may still be returning `Promise<void>`, which means we cannot expect the status code to be available there\n // TODO (v8): remove this check as it will no longer be necessary\n const enforceStatusCode = isBaseTransportSend();\n\n return (event, sendResponse) => {\n if (!replay.isEnabled() || (!isErrorEvent(event) && !isTransactionEvent(event))) {\n return;\n }\n\n const statusCode = sendResponse && sendResponse.statusCode;\n\n // We only want to do stuff on successful error sending, otherwise you get error replays without errors attached\n // If not using the base transport, we allow `undefined` response (as a custom transport may not implement this correctly yet)\n // If we do use the base transport, we skip if we encountered an non-OK status code\n if (enforceStatusCode && (!statusCode || statusCode < 200 || statusCode >= 300)) {\n return;\n }\n\n if (isTransactionEvent(event)) {\n handleTransactionEvent(replay, event);\n return;\n }\n\n handleErrorEvent(replay, event);\n };\n}\n\nfunction handleTransactionEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Collect traceIds in _context regardless of `recordingMode`\n // In error mode, _context gets cleared on every checkout\n // We limit to max. 100 transactions linked\n if (event.contexts && event.contexts.trace && event.contexts.trace.trace_id && replayContext.traceIds.size < 100) {\n replayContext.traceIds.add(event.contexts.trace.trace_id );\n }\n}\n\nfunction handleErrorEvent(replay, event) {\n const replayContext = replay.getContext();\n\n // Add error to list of errorIds of replay. This is ok to do even if not\n // sampled because context will get reset at next checkout.\n // XXX: There is also a race condition where it's possible to capture an\n // error to Sentry before Replay SDK has loaded, but response returns after\n // it was loaded, and this gets called.\n // We limit to max. 100 errors linked\n if (event.event_id && replayContext.errorIds.size < 100) {\n replayContext.errorIds.add(event.event_id);\n }\n\n // If error event is tagged with replay id it means it was sampled (when in buffer mode)\n // Need to be very careful that this does not cause an infinite loop\n if (replay.recordingMode === 'buffer' && event.tags && event.tags.replayId) {\n setTimeout(() => {\n // Capture current event buffer as new replay\n void replay.sendBufferedReplayOrFlush();\n });\n }\n}\n\nfunction isBaseTransportSend() {\n const client = getCurrentHub().getClient();\n if (!client) {\n return false;\n }\n\n const transport = client.getTransport();\n if (!transport) {\n return false;\n }\n\n return (\n (transport.send ).__sentry__baseTransport__ || false\n );\n}\n\n/**\n * Returns true if we think the given event is an error originating inside of rrweb.\n */\nfunction isRrwebError(event, hint) {\n if (event.type || !event.exception || !event.exception.values || !event.exception.values.length) {\n return false;\n }\n\n // @ts-expect-error this may be set by rrweb when it finds errors\n if (hint.originalException && hint.originalException.__rrweb__) {\n return true;\n }\n\n return false;\n}\n\n/**\n * Determine if event should be sampled (only applies in buffer mode).\n * When an event is captured by `hanldleGlobalEvent`, when in buffer mode\n * we determine if we want to sample the error or not.\n */\nfunction shouldSampleForBufferEvent(replay, event) {\n if (replay.recordingMode !== 'buffer') {\n return false;\n }\n\n // ignore this error because otherwise we could loop indefinitely with\n // trying to capture replay and failing\n if (event.message === UNABLE_TO_SEND_REPLAY) {\n return false;\n }\n\n // Require the event to be an error event & to have an exception\n if (!event.exception || event.type) {\n return false;\n }\n\n return isSampled(replay.getOptions().errorSampleRate);\n}\n\n/**\n * Returns a listener to be added to `addGlobalEventProcessor(listener)`.\n */\nfunction handleGlobalEventListener(\n replay,\n includeAfterSendEventHandling = false,\n) {\n const afterSendHandler = includeAfterSendEventHandling ? handleAfterSendEvent(replay) : undefined;\n\n return Object.assign(\n (event, hint) => {\n // Do nothing if replay has been disabled\n if (!replay.isEnabled()) {\n return event;\n }\n\n if (isReplayEvent(event)) {\n // Replays have separate set of breadcrumbs, do not include breadcrumbs\n // from core SDK\n delete event.breadcrumbs;\n return event;\n }\n\n // We only want to handle errors & transactions, nothing else\n if (!isErrorEvent(event) && !isTransactionEvent(event)) {\n return event;\n }\n\n // Ensure we do not add replay_id if the session is expired\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (!isSessionActive) {\n return event;\n }\n\n // Unless `captureExceptions` is enabled, we want to ignore errors coming from rrweb\n // As there can be a bunch of stuff going wrong in internals there, that we don't want to bubble up to users\n if (isRrwebError(event, hint) && !replay.getOptions()._experiments.captureExceptions) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.log('[Replay] Ignoring error from rrweb internals', event);\n return null;\n }\n\n // When in buffer mode, we decide to sample here.\n // Later, in `handleAfterSendEvent`, if the replayId is set, we know that we sampled\n // And convert the buffer session to a full session\n const isErrorEventSampled = shouldSampleForBufferEvent(replay, event);\n\n // Tag errors if it has been sampled in buffer mode, or if it is session mode\n // Only tag transactions if in session mode\n const shouldTagReplayId = isErrorEventSampled || replay.recordingMode === 'session';\n\n if (shouldTagReplayId) {\n event.tags = { ...event.tags, replayId: replay.getSessionId() };\n }\n\n // In cases where a custom client is used that does not support the new hooks (yet),\n // we manually call this hook method here\n if (afterSendHandler) {\n // Pretend the error had a 200 response so we always capture it\n afterSendHandler(event, { statusCode: 200 });\n }\n\n return event;\n },\n { id: 'Replay' },\n );\n}\n\n/**\n * Create a \"span\" for each performance entry.\n */\nfunction createPerformanceSpans(\n replay,\n entries,\n) {\n return entries.map(({ type, start, end, name, data }) => {\n const response = replay.throttledAddEvent({\n type: EventType.Custom,\n timestamp: start,\n data: {\n tag: 'performanceSpan',\n payload: {\n op: type,\n description: name,\n startTimestamp: start,\n endTimestamp: end,\n data,\n },\n },\n });\n\n // If response is a string, it means its either THROTTLED or SKIPPED\n return typeof response === 'string' ? Promise.resolve(null) : response;\n });\n}\n\nfunction handleHistory(handlerData) {\n const { from, to } = handlerData;\n\n const now = Date.now() / 1000;\n\n return {\n type: 'navigation.push',\n start: now,\n end: now,\n name: to,\n data: {\n previous: from,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addInstrumentationHandler('history', listener)`.\n */\nfunction handleHistorySpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleHistory(handlerData);\n\n if (result === null) {\n return;\n }\n\n // Need to collect visited URLs\n replay.getContext().urls.push(result.name);\n replay.triggerUserActivity();\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning false to flush\n return false;\n });\n };\n}\n\n/**\n * Check whether a given request URL should be filtered out. This is so we\n * don't log Sentry ingest requests.\n */\nfunction shouldFilterRequest(replay, url) {\n // If we enabled the `traceInternals` experiment, we want to trace everything\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && replay.getOptions()._experiments.traceInternals) {\n return false;\n }\n\n return isSentryRequestUrl(url, getCurrentHub());\n}\n\n/** Add a performance entry breadcrumb */\nfunction addNetworkBreadcrumb(\n replay,\n result,\n) {\n if (!replay.isEnabled()) {\n return;\n }\n\n if (result === null) {\n return;\n }\n\n if (shouldFilterRequest(replay, result.name)) {\n return;\n }\n\n replay.addUpdate(() => {\n createPerformanceSpans(replay, [result]);\n // Returning true will cause `addUpdate` to not flush\n // We do not want network requests to cause a flush. This will prevent\n // recurring/polling requests from keeping the replay session alive.\n return true;\n });\n}\n\n/** only exported for tests */\nfunction handleFetch(handlerData) {\n const { startTimestamp, endTimestamp, fetchData, response } = handlerData;\n\n if (!endTimestamp) {\n return null;\n }\n\n // This is only used as a fallback, so we know the body sizes are never set here\n const { method, url } = fetchData;\n\n return {\n type: 'resource.fetch',\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: {\n method,\n statusCode: response ? (response ).status : undefined,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addInstrumentationHandler('fetch', listener)`.\n */\nfunction handleFetchSpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleFetch(handlerData);\n\n addNetworkBreadcrumb(replay, result);\n };\n}\n\n/** only exported for tests */\nfunction handleXhr(handlerData) {\n const { startTimestamp, endTimestamp, xhr } = handlerData;\n\n const sentryXhrData = xhr[SENTRY_XHR_DATA_KEY];\n\n if (!startTimestamp || !endTimestamp || !sentryXhrData) {\n return null;\n }\n\n // This is only used as a fallback, so we know the body sizes are never set here\n const { method, url, status_code: statusCode } = sentryXhrData;\n\n if (url === undefined) {\n return null;\n }\n\n return {\n type: 'resource.xhr',\n name: url,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n data: {\n method,\n statusCode,\n },\n };\n}\n\n/**\n * Returns a listener to be added to `addInstrumentationHandler('xhr', listener)`.\n */\nfunction handleXhrSpanListener(replay) {\n return (handlerData) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleXhr(handlerData);\n\n addNetworkBreadcrumb(replay, result);\n };\n}\n\nconst OBJ = 10;\nconst OBJ_KEY = 11;\nconst OBJ_KEY_STR = 12;\nconst OBJ_VAL = 13;\nconst OBJ_VAL_STR = 14;\nconst OBJ_VAL_COMPLETED = 15;\n\nconst ARR = 20;\nconst ARR_VAL = 21;\nconst ARR_VAL_STR = 22;\nconst ARR_VAL_COMPLETED = 23;\n\nconst ALLOWED_PRIMITIVES = ['true', 'false', 'null'];\n\n/**\n * Complete an incomplete JSON string.\n * This will ensure that the last element always has a `\"~~\"` to indicate it was truncated.\n * For example, `[1,2,` will be completed to `[1,2,\"~~\"]`\n * and `{\"aa\":\"b` will be completed to `{\"aa\":\"b~~\"}`\n */\nfunction completeJson(incompleteJson, stack) {\n if (!stack.length) {\n return incompleteJson;\n }\n\n let json = incompleteJson;\n\n // Most checks are only needed for the last step in the stack\n const lastPos = stack.length - 1;\n const lastStep = stack[lastPos];\n\n json = _fixLastStep(json, lastStep);\n\n // Complete remaining steps - just add closing brackets\n for (let i = lastPos; i >= 0; i--) {\n const step = stack[i];\n\n switch (step) {\n case OBJ:\n json = `${json}}`;\n break;\n case ARR:\n json = `${json}]`;\n break;\n }\n }\n\n return json;\n}\n\nfunction _fixLastStep(json, lastStep) {\n switch (lastStep) {\n // Object cases\n case OBJ:\n return `${json}\"~~\":\"~~\"`;\n case OBJ_KEY:\n return `${json}:\"~~\"`;\n case OBJ_KEY_STR:\n return `${json}~~\":\"~~\"`;\n case OBJ_VAL:\n return _maybeFixIncompleteObjValue(json);\n case OBJ_VAL_STR:\n return `${json}~~\"`;\n case OBJ_VAL_COMPLETED:\n return `${json},\"~~\":\"~~\"`;\n\n // Array cases\n case ARR:\n return `${json}\"~~\"`;\n case ARR_VAL:\n return _maybeFixIncompleteArrValue(json);\n case ARR_VAL_STR:\n return `${json}~~\"`;\n case ARR_VAL_COMPLETED:\n return `${json},\"~~\"`;\n }\n\n return json;\n}\n\nfunction _maybeFixIncompleteArrValue(json) {\n const pos = _findLastArrayDelimiter(json);\n\n if (pos > -1) {\n const part = json.slice(pos + 1);\n\n if (ALLOWED_PRIMITIVES.includes(part.trim())) {\n return `${json},\"~~\"`;\n }\n\n // Everything else is replaced with `\"~~\"`\n return `${json.slice(0, pos + 1)}\"~~\"`;\n }\n\n // fallback, this shouldn't happen, to be save\n return json;\n}\n\nfunction _findLastArrayDelimiter(json) {\n for (let i = json.length - 1; i >= 0; i--) {\n const char = json[i];\n\n if (char === ',' || char === '[') {\n return i;\n }\n }\n\n return -1;\n}\n\nfunction _maybeFixIncompleteObjValue(json) {\n const startPos = json.lastIndexOf(':');\n\n const part = json.slice(startPos + 1);\n\n if (ALLOWED_PRIMITIVES.includes(part.trim())) {\n return `${json},\"~~\":\"~~\"`;\n }\n\n // Everything else is replaced with `\"~~\"`\n // This also means we do not have incomplete numbers, e.g `[1` is replaced with `[\"~~\"]`\n return `${json.slice(0, startPos + 1)}\"~~\"`;\n}\n\n/**\n * Evaluate an (incomplete) JSON string.\n */\nfunction evaluateJson(json) {\n const stack = [];\n\n for (let pos = 0; pos < json.length; pos++) {\n _evaluateJsonPos(stack, json, pos);\n }\n\n return stack;\n}\n\nfunction _evaluateJsonPos(stack, json, pos) {\n const curStep = stack[stack.length - 1];\n\n const char = json[pos];\n\n const whitespaceRegex = /\\s/;\n\n if (whitespaceRegex.test(char)) {\n return;\n }\n\n if (char === '\"' && !_isEscaped(json, pos)) {\n _handleQuote(stack, curStep);\n return;\n }\n\n switch (char) {\n case '{':\n _handleObj(stack, curStep);\n break;\n case '[':\n _handleArr(stack, curStep);\n break;\n case ':':\n _handleColon(stack, curStep);\n break;\n case ',':\n _handleComma(stack, curStep);\n break;\n case '}':\n _handleObjClose(stack, curStep);\n break;\n case ']':\n _handleArrClose(stack, curStep);\n break;\n }\n}\n\nfunction _handleQuote(stack, curStep) {\n // End of obj value\n if (curStep === OBJ_VAL_STR) {\n stack.pop();\n stack.push(OBJ_VAL_COMPLETED);\n return;\n }\n\n // End of arr value\n if (curStep === ARR_VAL_STR) {\n stack.pop();\n stack.push(ARR_VAL_COMPLETED);\n return;\n }\n\n // Start of obj value\n if (curStep === OBJ_VAL) {\n stack.push(OBJ_VAL_STR);\n return;\n }\n\n // Start of arr value\n if (curStep === ARR_VAL) {\n stack.push(ARR_VAL_STR);\n return;\n }\n\n // Start of obj key\n if (curStep === OBJ) {\n stack.push(OBJ_KEY_STR);\n return;\n }\n\n // End of obj key\n if (curStep === OBJ_KEY_STR) {\n stack.pop();\n stack.push(OBJ_KEY);\n return;\n }\n}\n\nfunction _handleObj(stack, curStep) {\n // Initial object\n if (!curStep) {\n stack.push(OBJ);\n return;\n }\n\n // New object as obj value\n if (curStep === OBJ_VAL) {\n stack.push(OBJ);\n return;\n }\n\n // New object as array element\n if (curStep === ARR_VAL) {\n stack.push(OBJ);\n }\n\n // New object as first array element\n if (curStep === ARR) {\n stack.push(OBJ);\n return;\n }\n}\n\nfunction _handleArr(stack, curStep) {\n // Initial array\n if (!curStep) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n return;\n }\n\n // New array as obj value\n if (curStep === OBJ_VAL) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n return;\n }\n\n // New array as array element\n if (curStep === ARR_VAL) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n }\n\n // New array as first array element\n if (curStep === ARR) {\n stack.push(ARR);\n stack.push(ARR_VAL);\n return;\n }\n}\n\nfunction _handleColon(stack, curStep) {\n if (curStep === OBJ_KEY) {\n stack.pop();\n stack.push(OBJ_VAL);\n }\n}\n\nfunction _handleComma(stack, curStep) {\n // Comma after obj value\n if (curStep === OBJ_VAL) {\n stack.pop();\n return;\n }\n if (curStep === OBJ_VAL_COMPLETED) {\n // Pop OBJ_VAL_COMPLETED & OBJ_VAL\n stack.pop();\n stack.pop();\n return;\n }\n\n // Comma after arr value\n if (curStep === ARR_VAL) {\n // do nothing - basically we'd pop ARR_VAL but add it right back\n return;\n }\n\n if (curStep === ARR_VAL_COMPLETED) {\n // Pop ARR_VAL_COMPLETED\n stack.pop();\n\n // basically we'd pop ARR_VAL but add it right back\n return;\n }\n}\n\nfunction _handleObjClose(stack, curStep) {\n // Empty object {}\n if (curStep === OBJ) {\n stack.pop();\n }\n\n // Object with element\n if (curStep === OBJ_VAL) {\n // Pop OBJ_VAL, OBJ\n stack.pop();\n stack.pop();\n }\n\n // Obj with element\n if (curStep === OBJ_VAL_COMPLETED) {\n // Pop OBJ_VAL_COMPLETED, OBJ_VAL, OBJ\n stack.pop();\n stack.pop();\n stack.pop();\n }\n\n // if was obj value, complete it\n if (stack[stack.length - 1] === OBJ_VAL) {\n stack.push(OBJ_VAL_COMPLETED);\n }\n\n // if was arr value, complete it\n if (stack[stack.length - 1] === ARR_VAL) {\n stack.push(ARR_VAL_COMPLETED);\n }\n}\n\nfunction _handleArrClose(stack, curStep) {\n // Empty array []\n if (curStep === ARR) {\n stack.pop();\n }\n\n // Array with element\n if (curStep === ARR_VAL) {\n // Pop ARR_VAL, ARR\n stack.pop();\n stack.pop();\n }\n\n // Array with element\n if (curStep === ARR_VAL_COMPLETED) {\n // Pop ARR_VAL_COMPLETED, ARR_VAL, ARR\n stack.pop();\n stack.pop();\n stack.pop();\n }\n\n // if was obj value, complete it\n if (stack[stack.length - 1] === OBJ_VAL) {\n stack.push(OBJ_VAL_COMPLETED);\n }\n\n // if was arr value, complete it\n if (stack[stack.length - 1] === ARR_VAL) {\n stack.push(ARR_VAL_COMPLETED);\n }\n}\n\nfunction _isEscaped(str, pos) {\n const previousChar = str[pos - 1];\n\n return previousChar === '\\\\' && !_isEscaped(str, pos - 1);\n}\n\n/* eslint-disable max-lines */\n\n/**\n * Takes an incomplete JSON string, and returns a hopefully valid JSON string.\n * Note that this _can_ fail, so you should check the return value is valid JSON.\n */\nfunction fixJson(incompleteJson) {\n const stack = evaluateJson(incompleteJson);\n\n return completeJson(incompleteJson, stack);\n}\n\n/** Get the size of a body. */\nfunction getBodySize(\n body,\n textEncoder,\n) {\n if (!body) {\n return undefined;\n }\n\n try {\n if (typeof body === 'string') {\n return textEncoder.encode(body).length;\n }\n\n if (body instanceof URLSearchParams) {\n return textEncoder.encode(body.toString()).length;\n }\n\n if (body instanceof FormData) {\n const formDataStr = _serializeFormData(body);\n return textEncoder.encode(formDataStr).length;\n }\n\n if (body instanceof Blob) {\n return body.size;\n }\n\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n\n // Currently unhandled types: ArrayBufferView, ReadableStream\n } catch (e) {\n // just return undefined\n }\n\n return undefined;\n}\n\n/** Convert a Content-Length header to number/undefined. */\nfunction parseContentLengthHeader(header) {\n if (!header) {\n return undefined;\n }\n\n const size = parseInt(header, 10);\n return isNaN(size) ? undefined : size;\n}\n\n/** Get the string representation of a body. */\nfunction getBodyString(body) {\n if (typeof body === 'string') {\n return body;\n }\n\n if (body instanceof URLSearchParams) {\n return body.toString();\n }\n\n if (body instanceof FormData) {\n return _serializeFormData(body);\n }\n\n return undefined;\n}\n\n/** Convert ReplayNetworkRequestData to a PerformanceEntry. */\nfunction makeNetworkReplayBreadcrumb(\n type,\n data,\n) {\n if (!data) {\n return null;\n }\n\n const { startTimestamp, endTimestamp, url, method, statusCode, request, response } = data;\n\n const result = {\n type,\n start: startTimestamp / 1000,\n end: endTimestamp / 1000,\n name: url,\n data: dropUndefinedKeys({\n method,\n statusCode,\n request,\n response,\n }),\n };\n\n return result;\n}\n\n/** Build the request or response part of a replay network breadcrumb that was skipped. */\nfunction buildSkippedNetworkRequestOrResponse(bodySize) {\n return {\n headers: {},\n size: bodySize,\n _meta: {\n warnings: ['URL_SKIPPED'],\n },\n };\n}\n\n/** Build the request or response part of a replay network breadcrumb. */\nfunction buildNetworkRequestOrResponse(\n headers,\n bodySize,\n body,\n) {\n if (!bodySize && Object.keys(headers).length === 0) {\n return undefined;\n }\n\n if (!bodySize) {\n return {\n headers,\n };\n }\n\n if (!body) {\n return {\n headers,\n size: bodySize,\n };\n }\n\n const info = {\n headers,\n size: bodySize,\n };\n\n const { body: normalizedBody, warnings } = normalizeNetworkBody(body);\n info.body = normalizedBody;\n if (warnings.length > 0) {\n info._meta = {\n warnings,\n };\n }\n\n return info;\n}\n\n/** Filter a set of headers */\nfunction getAllowedHeaders(headers, allowedHeaders) {\n return Object.keys(headers).reduce((filteredHeaders, key) => {\n const normalizedKey = key.toLowerCase();\n // Avoid putting empty strings into the headers\n if (allowedHeaders.includes(normalizedKey) && headers[key]) {\n filteredHeaders[normalizedKey] = headers[key];\n }\n return filteredHeaders;\n }, {});\n}\n\nfunction _serializeFormData(formData) {\n // This is a bit simplified, but gives us a decent estimate\n // This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'\n // @ts-expect-error passing FormData to URLSearchParams actually works\n return new URLSearchParams(formData).toString();\n}\n\nfunction normalizeNetworkBody(body)\n\n {\n if (!body || typeof body !== 'string') {\n return {\n body,\n warnings: [],\n };\n }\n\n const exceedsSizeLimit = body.length > NETWORK_BODY_MAX_SIZE;\n\n if (_strIsProbablyJson(body)) {\n try {\n const json = exceedsSizeLimit ? fixJson(body.slice(0, NETWORK_BODY_MAX_SIZE)) : body;\n const normalizedBody = JSON.parse(json);\n return {\n body: normalizedBody,\n warnings: exceedsSizeLimit ? ['JSON_TRUNCATED'] : [],\n };\n } catch (e3) {\n return {\n body: exceedsSizeLimit ? `${body.slice(0, NETWORK_BODY_MAX_SIZE)}…` : body,\n warnings: exceedsSizeLimit ? ['INVALID_JSON', 'TEXT_TRUNCATED'] : ['INVALID_JSON'],\n };\n }\n }\n\n return {\n body: exceedsSizeLimit ? `${body.slice(0, NETWORK_BODY_MAX_SIZE)}…` : body,\n warnings: exceedsSizeLimit ? ['TEXT_TRUNCATED'] : [],\n };\n}\n\nfunction _strIsProbablyJson(str) {\n const first = str[0];\n const last = str[str.length - 1];\n\n // Simple check: If this does not start & end with {} or [], it's not JSON\n return (first === '[' && last === ']') || (first === '{' && last === '}');\n}\n\n/** Match an URL against a list of strings/Regex. */\nfunction urlMatches(url, urls) {\n const fullUrl = getFullUrl(url);\n\n return stringMatchesSomePattern(fullUrl, urls);\n}\n\n/** exported for tests */\nfunction getFullUrl(url, baseURI = WINDOW.document.baseURI) {\n // Short circuit for common cases:\n if (url.startsWith('http://') || url.startsWith('https://') || url.startsWith(WINDOW.location.origin)) {\n return url;\n }\n const fixedUrl = new URL(url, baseURI);\n\n // If these do not match, we are not dealing with a relative URL, so just return it\n if (fixedUrl.origin !== new URL(baseURI).origin) {\n return url;\n }\n\n const fullUrl = fixedUrl.href;\n\n // Remove trailing slashes, if they don't match the original URL\n if (!url.endsWith('/') && fullUrl.endsWith('/')) {\n return fullUrl.slice(0, -1);\n }\n\n return fullUrl;\n}\n\n/**\n * Capture a fetch breadcrumb to a replay.\n * This adds additional data (where approriate).\n */\nasync function captureFetchBreadcrumbToReplay(\n breadcrumb,\n hint,\n options\n\n,\n) {\n try {\n const data = await _prepareFetchData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.fetch', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] Failed to capture fetch breadcrumb', error);\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichFetchBreadcrumb(\n breadcrumb,\n hint,\n options,\n) {\n const { input, response } = hint;\n\n const body = _getFetchRequestArgBody(input);\n const reqSize = getBodySize(body, options.textEncoder);\n\n const resSize = response ? parseContentLengthHeader(response.headers.get('content-length')) : undefined;\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nasync function _prepareFetchData(\n breadcrumb,\n hint,\n options\n\n,\n) {\n const { startTimestamp, endTimestamp } = hint;\n\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize,\n } = breadcrumb.data;\n\n const captureDetails =\n urlMatches(url, options.networkDetailAllowUrls) && !urlMatches(url, options.networkDetailDenyUrls);\n\n const request = captureDetails\n ? _getRequestInfo(options, hint.input, requestBodySize)\n : buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = await _getResponseInfo(captureDetails, options, hint.response, responseBodySize);\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n}\n\nfunction _getRequestInfo(\n { networkCaptureBodies, networkRequestHeaders },\n input,\n requestBodySize,\n) {\n const headers = getRequestHeaders(input, networkRequestHeaders);\n\n if (!networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, requestBodySize, undefined);\n }\n\n // We only want to transmit string or string-like bodies\n const requestBody = _getFetchRequestArgBody(input);\n const bodyStr = getBodyString(requestBody);\n return buildNetworkRequestOrResponse(headers, requestBodySize, bodyStr);\n}\n\nasync function _getResponseInfo(\n captureDetails,\n {\n networkCaptureBodies,\n textEncoder,\n networkResponseHeaders,\n }\n\n,\n response,\n responseBodySize,\n) {\n if (!captureDetails && responseBodySize !== undefined) {\n return buildSkippedNetworkRequestOrResponse(responseBodySize);\n }\n\n const headers = getAllHeaders(response.headers, networkResponseHeaders);\n\n if (!networkCaptureBodies && responseBodySize !== undefined) {\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n\n // Only clone the response if we need to\n try {\n // We have to clone this, as the body can only be read once\n const res = response.clone();\n const bodyText = await _parseFetchBody(res);\n\n const size =\n bodyText && bodyText.length && responseBodySize === undefined\n ? getBodySize(bodyText, textEncoder)\n : responseBodySize;\n\n if (!captureDetails) {\n return buildSkippedNetworkRequestOrResponse(size);\n }\n\n if (networkCaptureBodies) {\n return buildNetworkRequestOrResponse(headers, size, bodyText);\n }\n\n return buildNetworkRequestOrResponse(headers, size, undefined);\n } catch (e) {\n // fallback\n return buildNetworkRequestOrResponse(headers, responseBodySize, undefined);\n }\n}\n\nasync function _parseFetchBody(response) {\n try {\n return await response.text();\n } catch (e2) {\n return undefined;\n }\n}\n\nfunction _getFetchRequestArgBody(fetchArgs = []) {\n // We only support getting the body from the fetch options\n if (fetchArgs.length !== 2 || typeof fetchArgs[1] !== 'object') {\n return undefined;\n }\n\n return (fetchArgs[1] ).body;\n}\n\nfunction getAllHeaders(headers, allowedHeaders) {\n const allHeaders = {};\n\n allowedHeaders.forEach(header => {\n if (headers.get(header)) {\n allHeaders[header] = headers.get(header) ;\n }\n });\n\n return allHeaders;\n}\n\nfunction getRequestHeaders(fetchArgs, allowedHeaders) {\n if (fetchArgs.length === 1 && typeof fetchArgs[0] !== 'string') {\n return getHeadersFromOptions(fetchArgs[0] , allowedHeaders);\n }\n\n if (fetchArgs.length === 2) {\n return getHeadersFromOptions(fetchArgs[1] , allowedHeaders);\n }\n\n return {};\n}\n\nfunction getHeadersFromOptions(\n input,\n allowedHeaders,\n) {\n if (!input) {\n return {};\n }\n\n const headers = input.headers;\n\n if (!headers) {\n return {};\n }\n\n if (headers instanceof Headers) {\n return getAllHeaders(headers, allowedHeaders);\n }\n\n // We do not support this, as it is not really documented (anymore?)\n if (Array.isArray(headers)) {\n return {};\n }\n\n return getAllowedHeaders(headers, allowedHeaders);\n}\n\n/**\n * Capture an XHR breadcrumb to a replay.\n * This adds additional data (where approriate).\n */\nasync function captureXhrBreadcrumbToReplay(\n breadcrumb,\n hint,\n options,\n) {\n try {\n const data = _prepareXhrData(breadcrumb, hint, options);\n\n // Create a replay performance entry from this breadcrumb\n const result = makeNetworkReplayBreadcrumb('resource.xhr', data);\n addNetworkBreadcrumb(options.replay, result);\n } catch (error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] Failed to capture xhr breadcrumb', error);\n }\n}\n\n/**\n * Enrich a breadcrumb with additional data.\n * This has to be sync & mutate the given breadcrumb,\n * as the breadcrumb is afterwards consumed by other handlers.\n */\nfunction enrichXhrBreadcrumb(\n breadcrumb,\n hint,\n options,\n) {\n const { xhr, input } = hint;\n\n const reqSize = getBodySize(input, options.textEncoder);\n const resSize = xhr.getResponseHeader('content-length')\n ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n : getBodySize(xhr.response, options.textEncoder);\n\n if (reqSize !== undefined) {\n breadcrumb.data.request_body_size = reqSize;\n }\n if (resSize !== undefined) {\n breadcrumb.data.response_body_size = resSize;\n }\n}\n\nfunction _prepareXhrData(\n breadcrumb,\n hint,\n options,\n) {\n const { startTimestamp, endTimestamp, input, xhr } = hint;\n\n const {\n url,\n method,\n status_code: statusCode = 0,\n request_body_size: requestBodySize,\n response_body_size: responseBodySize,\n } = breadcrumb.data;\n\n if (!url) {\n return null;\n }\n\n if (!urlMatches(url, options.networkDetailAllowUrls) || urlMatches(url, options.networkDetailDenyUrls)) {\n const request = buildSkippedNetworkRequestOrResponse(requestBodySize);\n const response = buildSkippedNetworkRequestOrResponse(responseBodySize);\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n }\n\n const xhrInfo = xhr[SENTRY_XHR_DATA_KEY];\n const networkRequestHeaders = xhrInfo\n ? getAllowedHeaders(xhrInfo.request_headers, options.networkRequestHeaders)\n : {};\n const networkResponseHeaders = getAllowedHeaders(getResponseHeaders(xhr), options.networkResponseHeaders);\n\n const request = buildNetworkRequestOrResponse(\n networkRequestHeaders,\n requestBodySize,\n options.networkCaptureBodies ? getBodyString(input) : undefined,\n );\n const response = buildNetworkRequestOrResponse(\n networkResponseHeaders,\n responseBodySize,\n options.networkCaptureBodies ? hint.xhr.responseText : undefined,\n );\n\n return {\n startTimestamp,\n endTimestamp,\n url,\n method,\n statusCode,\n request,\n response,\n };\n}\n\nfunction getResponseHeaders(xhr) {\n const headers = xhr.getAllResponseHeaders();\n\n if (!headers) {\n return {};\n }\n\n return headers.split('\\r\\n').reduce((acc, line) => {\n const [key, value] = line.split(': ');\n acc[key.toLowerCase()] = value;\n return acc;\n }, {});\n}\n\n/**\n * This method does two things:\n * - It enriches the regular XHR/fetch breadcrumbs with request/response size data\n * - It captures the XHR/fetch breadcrumbs to the replay\n * (enriching it with further data that is _not_ added to the regular breadcrumbs)\n */\nfunction handleNetworkBreadcrumbs(replay) {\n const client = getCurrentHub().getClient();\n\n try {\n const textEncoder = new TextEncoder();\n\n const {\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n } = replay.getOptions();\n\n const options = {\n replay,\n textEncoder,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders,\n networkResponseHeaders,\n };\n\n if (client && client.on) {\n client.on('beforeAddBreadcrumb', (breadcrumb, hint) => beforeAddNetworkBreadcrumb(options, breadcrumb, hint));\n } else {\n // Fallback behavior\n addInstrumentationHandler('fetch', handleFetchSpanListener(replay));\n addInstrumentationHandler('xhr', handleXhrSpanListener(replay));\n }\n } catch (e2) {\n // Do nothing\n }\n}\n\n/** just exported for tests */\nfunction beforeAddNetworkBreadcrumb(\n options,\n breadcrumb,\n hint,\n) {\n if (!breadcrumb.data) {\n return;\n }\n\n try {\n if (_isXhrBreadcrumb(breadcrumb) && _isXhrHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichXhrBreadcrumb(breadcrumb, hint, options);\n\n void captureXhrBreadcrumbToReplay(breadcrumb, hint, options);\n }\n\n if (_isFetchBreadcrumb(breadcrumb) && _isFetchHint(hint)) {\n // This has to be sync, as we need to ensure the breadcrumb is enriched in the same tick\n // Because the hook runs synchronously, and the breadcrumb is afterwards passed on\n // So any async mutations to it will not be reflected in the final breadcrumb\n enrichFetchBreadcrumb(breadcrumb, hint, options);\n\n void captureFetchBreadcrumbToReplay(breadcrumb, hint, options);\n }\n } catch (e) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Error when enriching network breadcrumb');\n }\n}\n\nfunction _isXhrBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'xhr';\n}\n\nfunction _isFetchBreadcrumb(breadcrumb) {\n return breadcrumb.category === 'fetch';\n}\n\nfunction _isXhrHint(hint) {\n return hint && hint.xhr;\n}\n\nfunction _isFetchHint(hint) {\n return hint && hint.response;\n}\n\nlet _LAST_BREADCRUMB = null;\n\nfunction isBreadcrumbWithCategory(breadcrumb) {\n return !!breadcrumb.category;\n}\n\nconst handleScopeListener =\n (replay) =>\n (scope) => {\n if (!replay.isEnabled()) {\n return;\n }\n\n const result = handleScope(scope);\n\n if (!result) {\n return;\n }\n\n addBreadcrumbEvent(replay, result);\n };\n\n/**\n * An event handler to handle scope changes.\n */\nfunction handleScope(scope) {\n // TODO (v8): Remove this guard. This was put in place because we introduced\n // Scope.getLastBreadcrumb mid-v7 which caused incompatibilities with older SDKs.\n // For now, we'll just return null if the method doesn't exist but we should eventually\n // get rid of this guard.\n const newBreadcrumb = scope.getLastBreadcrumb && scope.getLastBreadcrumb();\n\n // Listener can be called when breadcrumbs have not changed, so we store the\n // reference to the last crumb and only return a crumb if it has changed\n if (_LAST_BREADCRUMB === newBreadcrumb || !newBreadcrumb) {\n return null;\n }\n\n _LAST_BREADCRUMB = newBreadcrumb;\n\n if (\n !isBreadcrumbWithCategory(newBreadcrumb) ||\n ['fetch', 'xhr', 'sentry.event', 'sentry.transaction'].includes(newBreadcrumb.category) ||\n newBreadcrumb.category.startsWith('ui.')\n ) {\n return null;\n }\n\n if (newBreadcrumb.category === 'console') {\n return normalizeConsoleBreadcrumb(newBreadcrumb);\n }\n\n return createBreadcrumb(newBreadcrumb);\n}\n\n/** exported for tests only */\nfunction normalizeConsoleBreadcrumb(\n breadcrumb,\n) {\n const args = breadcrumb.data && breadcrumb.data.arguments;\n\n if (!Array.isArray(args) || args.length === 0) {\n return createBreadcrumb(breadcrumb);\n }\n\n let isTruncated = false;\n\n // Avoid giant args captures\n const normalizedArgs = args.map(arg => {\n if (!arg) {\n return arg;\n }\n if (typeof arg === 'string') {\n if (arg.length > CONSOLE_ARG_MAX_SIZE) {\n isTruncated = true;\n return `${arg.slice(0, CONSOLE_ARG_MAX_SIZE)}…`;\n }\n\n return arg;\n }\n if (typeof arg === 'object') {\n try {\n const normalizedArg = normalize(arg, 7);\n const stringified = JSON.stringify(normalizedArg);\n if (stringified.length > CONSOLE_ARG_MAX_SIZE) {\n const fixedJson = fixJson(stringified.slice(0, CONSOLE_ARG_MAX_SIZE));\n const json = JSON.parse(fixedJson);\n // We only set this after JSON.parse() was successfull, so we know we didn't run into `catch`\n isTruncated = true;\n return json;\n }\n return normalizedArg;\n } catch (e) {\n // fall back to default\n }\n }\n\n return arg;\n });\n\n return createBreadcrumb({\n ...breadcrumb,\n data: {\n ...breadcrumb.data,\n arguments: normalizedArgs,\n ...(isTruncated ? { _meta: { warnings: ['CONSOLE_ARG_TRUNCATED'] } } : {}),\n },\n });\n}\n\n/**\n * Add global listeners that cannot be removed.\n */\nfunction addGlobalListeners(replay) {\n // Listeners from core SDK //\n const scope = getCurrentHub().getScope();\n const client = getCurrentHub().getClient();\n\n scope.addScopeListener(handleScopeListener(replay));\n addInstrumentationHandler('dom', handleDomListener(replay));\n addInstrumentationHandler('history', handleHistorySpanListener(replay));\n handleNetworkBreadcrumbs(replay);\n\n // Tag all (non replay) events that get sent to Sentry with the current\n // replay ID so that we can reference them later in the UI\n const eventProcessor = handleGlobalEventListener(replay, !hasHooks(client));\n if (client && client.addEventProcessor) {\n client.addEventProcessor(eventProcessor);\n } else {\n addGlobalEventProcessor(eventProcessor);\n }\n\n // If a custom client has no hooks yet, we continue to use the \"old\" implementation\n if (hasHooks(client)) {\n client.on('afterSendEvent', handleAfterSendEvent(replay));\n client.on('createDsc', (dsc) => {\n const replayId = replay.getSessionId();\n // We do not want to set the DSC when in buffer mode, as that means the replay has not been sent (yet)\n if (replayId && replay.isEnabled() && replay.recordingMode === 'session') {\n // Ensure to check that the session is still active - it could have expired in the meanwhile\n const isSessionActive = replay.checkAndHandleExpiredSession();\n if (isSessionActive) {\n dsc.replay_id = replayId;\n }\n }\n });\n\n client.on('startTransaction', transaction => {\n replay.lastTransaction = transaction;\n });\n\n // We may be missing the initial startTransaction due to timing issues,\n // so we capture it on finish again.\n client.on('finishTransaction', transaction => {\n replay.lastTransaction = transaction;\n });\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction hasHooks(client) {\n return !!(client && client.on);\n}\n\n/**\n * Create a \"span\" for the total amount of memory being used by JS objects\n * (including v8 internal objects).\n */\nasync function addMemoryEntry(replay) {\n // window.performance.memory is a non-standard API and doesn't work on all browsers, so we try-catch this\n try {\n return Promise.all(\n createPerformanceSpans(replay, [\n // @ts-expect-error memory doesn't exist on type Performance as the API is non-standard (we check that it exists above)\n createMemoryEntry(WINDOW.performance.memory),\n ]),\n );\n } catch (error) {\n // Do nothing\n return [];\n }\n}\n\nfunction createMemoryEntry(memoryEntry) {\n const { jsHeapSizeLimit, totalJSHeapSize, usedJSHeapSize } = memoryEntry;\n // we don't want to use `getAbsoluteTime` because it adds the event time to the\n // time origin, so we get the current timestamp instead\n const time = Date.now() / 1000;\n return {\n type: 'memory',\n name: 'memory',\n start: time,\n end: time,\n data: {\n memory: {\n jsHeapSizeLimit,\n totalJSHeapSize,\n usedJSHeapSize,\n },\n },\n };\n}\n\n/**\n * Heavily simplified debounce function based on lodash.debounce.\n *\n * This function takes a callback function (@param fun) and delays its invocation\n * by @param wait milliseconds. Optionally, a maxWait can be specified in @param options,\n * which ensures that the callback is invoked at least once after the specified max. wait time.\n *\n * @param func the function whose invocation is to be debounced\n * @param wait the minimum time until the function is invoked after it was called once\n * @param options the options object, which can contain the `maxWait` property\n *\n * @returns the debounced version of the function, which needs to be called at least once to start the\n * debouncing process. Subsequent calls will reset the debouncing timer and, in case @paramfunc\n * was already invoked in the meantime, return @param func's return value.\n * The debounced function has two additional properties:\n * - `flush`: Invokes the debounced function immediately and returns its return value\n * - `cancel`: Cancels the debouncing process and resets the debouncing timer\n */\nfunction debounce(func, wait, options) {\n let callbackReturnValue;\n\n let timerId;\n let maxTimerId;\n\n const maxWait = options && options.maxWait ? Math.max(options.maxWait, wait) : 0;\n\n function invokeFunc() {\n cancelTimers();\n callbackReturnValue = func();\n return callbackReturnValue;\n }\n\n function cancelTimers() {\n timerId !== undefined && clearTimeout(timerId);\n maxTimerId !== undefined && clearTimeout(maxTimerId);\n timerId = maxTimerId = undefined;\n }\n\n function flush() {\n if (timerId !== undefined || maxTimerId !== undefined) {\n return invokeFunc();\n }\n return callbackReturnValue;\n }\n\n function debounced() {\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(invokeFunc, wait);\n\n if (maxWait && maxTimerId === undefined) {\n maxTimerId = setTimeout(invokeFunc, maxWait);\n }\n\n return callbackReturnValue;\n }\n\n debounced.cancel = cancelTimers;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Handler for recording events.\n *\n * Adds to event buffer, and has varying flushing behaviors if the event was a checkout.\n */\nfunction getHandleRecordingEmit(replay) {\n let hadFirstEvent = false;\n\n return (event, _isCheckout) => {\n // If this is false, it means session is expired, create and a new session and wait for checkout\n if (!replay.checkAndHandleExpiredSession()) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('[Replay] Received replay event after session expired.');\n\n return;\n }\n\n // `_isCheckout` is only set when the checkout is due to `checkoutEveryNms`\n // We also want to treat the first event as a checkout, so we handle this specifically here\n const isCheckout = _isCheckout || !hadFirstEvent;\n hadFirstEvent = true;\n\n // The handler returns `true` if we do not want to trigger debounced flush, `false` if we want to debounce flush.\n replay.addUpdate(() => {\n // The session is always started immediately on pageload/init, but for\n // error-only replays, it should reflect the most recent checkout\n // when an error occurs. Clear any state that happens before this current\n // checkout. This needs to happen before `addEvent()` which updates state\n // dependent on this reset.\n if (replay.recordingMode === 'buffer' && isCheckout) {\n replay.setInitialState();\n }\n\n // If the event is not added (e.g. due to being paused, disabled, or out of the max replay duration),\n // Skip all further steps\n if (!addEventSync(replay, event, isCheckout)) {\n // Return true to skip scheduling a debounced flush\n return true;\n }\n\n // Different behavior for full snapshots (type=2), ignore other event types\n // See https://github.com/rrweb-io/rrweb/blob/d8f9290ca496712aa1e7d472549480c4e7876594/packages/rrweb/src/types.ts#L16\n if (!isCheckout) {\n return false;\n }\n\n // Additionally, create a meta event that will capture certain SDK settings.\n // In order to handle buffer mode, this needs to either be done when we\n // receive checkout events or at flush time.\n //\n // `isCheckout` is always true, but want to be explicit that it should\n // only be added for checkouts\n addSettingsEvent(replay, isCheckout);\n\n // If there is a previousSessionId after a full snapshot occurs, then\n // the replay session was started due to session expiration. The new session\n // is started before triggering a new checkout and contains the id\n // of the previous session. Do not immediately flush in this case\n // to avoid capturing only the checkout and instead the replay will\n // be captured if they perform any follow-up actions.\n if (replay.session && replay.session.previousSessionId) {\n return true;\n }\n\n // When in buffer mode, make sure we adjust the session started date to the current earliest event of the buffer\n // this should usually be the timestamp of the checkout event, but to be safe...\n if (replay.recordingMode === 'buffer' && replay.session && replay.eventBuffer) {\n const earliestEvent = replay.eventBuffer.getEarliestTimestamp();\n if (earliestEvent) {\n logInfo(\n `[Replay] Updating session start time to earliest event in buffer to ${new Date(earliestEvent)}`,\n replay.getOptions()._experiments.traceInternals,\n );\n\n replay.session.started = earliestEvent;\n\n if (replay.getOptions().stickySession) {\n saveSession(replay.session);\n }\n }\n }\n\n if (replay.recordingMode === 'session') {\n // If the full snapshot is due to an initial load, we will not have\n // a previous session ID. In this case, we want to buffer events\n // for a set amount of time before flushing. This can help avoid\n // capturing replays of users that immediately close the window.\n void replay.flush();\n }\n\n return true;\n });\n };\n}\n\n/**\n * Exported for tests\n */\nfunction createOptionsEvent(replay) {\n const options = replay.getOptions();\n return {\n type: EventType.Custom,\n timestamp: Date.now(),\n data: {\n tag: 'options',\n payload: {\n sessionSampleRate: options.sessionSampleRate,\n errorSampleRate: options.errorSampleRate,\n useCompressionOption: options.useCompression,\n blockAllMedia: options.blockAllMedia,\n maskAllText: options.maskAllText,\n maskAllInputs: options.maskAllInputs,\n useCompression: replay.eventBuffer ? replay.eventBuffer.type === 'worker' : false,\n networkDetailHasUrls: options.networkDetailAllowUrls.length > 0,\n networkCaptureBodies: options.networkCaptureBodies,\n networkRequestHasHeaders: options.networkRequestHeaders.length > 0,\n networkResponseHasHeaders: options.networkResponseHeaders.length > 0,\n },\n },\n };\n}\n\n/**\n * Add a \"meta\" event that contains a simplified view on current configuration\n * options. This should only be included on the first segment of a recording.\n */\nfunction addSettingsEvent(replay, isCheckout) {\n // Only need to add this event when sending the first segment\n if (!isCheckout || !replay.session || replay.session.segmentId !== 0) {\n return;\n }\n\n addEventSync(replay, createOptionsEvent(replay), false);\n}\n\n/**\n * Create a replay envelope ready to be sent.\n * This includes both the replay event, as well as the recording data.\n */\nfunction createReplayEnvelope(\n replayEvent,\n recordingData,\n dsn,\n tunnel,\n) {\n return createEnvelope(\n createEventEnvelopeHeaders(replayEvent, getSdkMetadataForEnvelopeHeader(replayEvent), tunnel, dsn),\n [\n [{ type: 'replay_event' }, replayEvent],\n [\n {\n type: 'replay_recording',\n // If string then we need to encode to UTF8, otherwise will have\n // wrong size. TextEncoder has similar browser support to\n // MutationObserver, although it does not accept IE11.\n length:\n typeof recordingData === 'string' ? new TextEncoder().encode(recordingData).length : recordingData.length,\n },\n recordingData,\n ],\n ],\n );\n}\n\n/**\n * Prepare the recording data ready to be sent.\n */\nfunction prepareRecordingData({\n recordingData,\n headers,\n}\n\n) {\n let payloadWithSequence;\n\n // XXX: newline is needed to separate sequence id from events\n const replayHeaders = `${JSON.stringify(headers)}\n`;\n\n if (typeof recordingData === 'string') {\n payloadWithSequence = `${replayHeaders}${recordingData}`;\n } else {\n const enc = new TextEncoder();\n // XXX: newline is needed to separate sequence id from events\n const sequence = enc.encode(replayHeaders);\n // Merge the two Uint8Arrays\n payloadWithSequence = new Uint8Array(sequence.length + recordingData.length);\n payloadWithSequence.set(sequence);\n payloadWithSequence.set(recordingData, sequence.length);\n }\n\n return payloadWithSequence;\n}\n\n/**\n * Prepare a replay event & enrich it with the SDK metadata.\n */\nasync function prepareReplayEvent({\n client,\n scope,\n replayId: event_id,\n event,\n}\n\n) {\n const integrations =\n typeof client._integrations === 'object' && client._integrations !== null && !Array.isArray(client._integrations)\n ? Object.keys(client._integrations)\n : undefined;\n\n const eventHint = { event_id, integrations };\n\n if (client.emit) {\n client.emit('preprocessEvent', event, eventHint);\n }\n\n const preparedEvent = (await prepareEvent(\n client.getOptions(),\n event,\n eventHint,\n scope,\n client,\n )) ;\n\n // If e.g. a global event processor returned null\n if (!preparedEvent) {\n return null;\n }\n\n // This normally happens in browser client \"_prepareEvent\"\n // but since we do not use this private method from the client, but rather the plain import\n // we need to do this manually.\n preparedEvent.platform = preparedEvent.platform || 'javascript';\n\n // extract the SDK name because `client._prepareEvent` doesn't add it to the event\n const metadata = client.getSdkMetadata && client.getSdkMetadata();\n const { name, version } = (metadata && metadata.sdk) || {};\n\n preparedEvent.sdk = {\n ...preparedEvent.sdk,\n name: name || 'sentry.javascript.unknown',\n version: version || '0.0.0',\n };\n\n return preparedEvent;\n}\n\n/**\n * Send replay attachment using `fetch()`\n */\nasync function sendReplayRequest({\n recordingData,\n replayId,\n segmentId: segment_id,\n eventContext,\n timestamp,\n session,\n}) {\n const preparedRecordingData = prepareRecordingData({\n recordingData,\n headers: {\n segment_id,\n },\n });\n\n const { urls, errorIds, traceIds, initialTimestamp } = eventContext;\n\n const hub = getCurrentHub();\n const client = hub.getClient();\n const scope = hub.getScope();\n const transport = client && client.getTransport();\n const dsn = client && client.getDsn();\n\n if (!client || !transport || !dsn || !session.sampled) {\n return;\n }\n\n const baseEvent = {\n type: REPLAY_EVENT_NAME,\n replay_start_timestamp: initialTimestamp / 1000,\n timestamp: timestamp / 1000,\n error_ids: errorIds,\n trace_ids: traceIds,\n urls,\n replay_id: replayId,\n segment_id,\n replay_type: session.sampled,\n };\n\n const replayEvent = await prepareReplayEvent({ scope, client, replayId, event: baseEvent });\n\n if (!replayEvent) {\n // Taken from baseclient's `_processEvent` method, where this is handled for errors/transactions\n client.recordDroppedEvent('event_processor', 'replay', baseEvent);\n logInfo('An event processor returned `null`, will not send event.');\n return;\n }\n\n /*\n For reference, the fully built event looks something like this:\n {\n \"type\": \"replay_event\",\n \"timestamp\": 1670837008.634,\n \"error_ids\": [\n \"errorId\"\n ],\n \"trace_ids\": [\n \"traceId\"\n ],\n \"urls\": [\n \"https://example.com\"\n ],\n \"replay_id\": \"eventId\",\n \"segment_id\": 3,\n \"replay_type\": \"error\",\n \"platform\": \"javascript\",\n \"event_id\": \"eventId\",\n \"environment\": \"production\",\n \"sdk\": {\n \"integrations\": [\n \"BrowserTracing\",\n \"Replay\"\n ],\n \"name\": \"sentry.javascript.browser\",\n \"version\": \"7.25.0\"\n },\n \"sdkProcessingMetadata\": {},\n \"contexts\": {\n },\n }\n */\n\n // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to\n // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may\n // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid\n // of this `delete`, lest we miss putting it back in the next time the property is in use.)\n delete replayEvent.sdkProcessingMetadata;\n\n const envelope = createReplayEnvelope(replayEvent, preparedRecordingData, dsn, client.getOptions().tunnel);\n\n let response;\n\n try {\n response = await transport.send(envelope);\n } catch (err) {\n const error = new Error(UNABLE_TO_SEND_REPLAY);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch (e) {\n // nothing to do\n }\n throw error;\n }\n\n // TODO (v8): we can remove this guard once transport.send's type signature doesn't include void anymore\n if (!response) {\n return response;\n }\n\n // If the status code is invalid, we want to immediately stop & not retry\n if (typeof response.statusCode === 'number' && (response.statusCode < 200 || response.statusCode >= 300)) {\n throw new TransportStatusCodeError(response.statusCode);\n }\n\n return response;\n}\n\n/**\n * This error indicates that the transport returned an invalid status code.\n */\nclass TransportStatusCodeError extends Error {\n constructor(statusCode) {\n super(`Transport returned status code ${statusCode}`);\n }\n}\n\n/**\n * Finalize and send the current replay event to Sentry\n */\nasync function sendReplay(\n replayData,\n retryConfig = {\n count: 0,\n interval: RETRY_BASE_INTERVAL,\n },\n) {\n const { recordingData, options } = replayData;\n\n // short circuit if there's no events to upload (this shouldn't happen as _runFlush makes this check)\n if (!recordingData.length) {\n return;\n }\n\n try {\n await sendReplayRequest(replayData);\n return true;\n } catch (err) {\n if (err instanceof TransportStatusCodeError) {\n throw err;\n }\n\n // Capture error for every failed replay\n setContext('Replays', {\n _retryCount: retryConfig.count,\n });\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && options._experiments && options._experiments.captureExceptions) {\n captureException(err);\n }\n\n // If an error happened here, it's likely that uploading the attachment\n // failed, we'll can retry with the same events payload\n if (retryConfig.count >= RETRY_MAX_COUNT) {\n const error = new Error(`${UNABLE_TO_SEND_REPLAY} - max retries exceeded`);\n\n try {\n // In case browsers don't allow this property to be writable\n // @ts-expect-error This needs lib es2022 and newer\n error.cause = err;\n } catch (e) {\n // nothing to do\n }\n\n throw error;\n }\n\n // will retry in intervals of 5, 10, 30\n retryConfig.interval *= ++retryConfig.count;\n\n return new Promise((resolve, reject) => {\n setTimeout(async () => {\n try {\n await sendReplay(replayData, retryConfig);\n resolve(true);\n } catch (err) {\n reject(err);\n }\n }, retryConfig.interval);\n });\n }\n}\n\nconst THROTTLED = '__THROTTLED';\nconst SKIPPED = '__SKIPPED';\n\n/**\n * Create a throttled function off a given function.\n * When calling the throttled function, it will call the original function only\n * if it hasn't been called more than `maxCount` times in the last `durationSeconds`.\n *\n * Returns `THROTTLED` if throttled for the first time, after that `SKIPPED`,\n * or else the return value of the original function.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction throttle(\n fn,\n maxCount,\n durationSeconds,\n) {\n const counter = new Map();\n\n const _cleanup = (now) => {\n const threshold = now - durationSeconds;\n counter.forEach((_value, key) => {\n if (key < threshold) {\n counter.delete(key);\n }\n });\n };\n\n const _getTotalCount = () => {\n return [...counter.values()].reduce((a, b) => a + b, 0);\n };\n\n let isThrottled = false;\n\n return (...rest) => {\n // Date in second-precision, which we use as basis for the throttling\n const now = Math.floor(Date.now() / 1000);\n\n // First, make sure to delete any old entries\n _cleanup(now);\n\n // If already over limit, do nothing\n if (_getTotalCount() >= maxCount) {\n const wasThrottled = isThrottled;\n isThrottled = true;\n return wasThrottled ? SKIPPED : THROTTLED;\n }\n\n isThrottled = false;\n const count = counter.get(now) || 0;\n counter.set(now, count + 1);\n\n return fn(...rest);\n };\n}\n\n/* eslint-disable max-lines */ // TODO: We might want to split this file up\n\n/**\n * The main replay container class, which holds all the state and methods for recording and sending replays.\n */\nclass ReplayContainer {\n\n /**\n * Recording can happen in one of three modes:\n * - session: Record the whole session, sending it continuously\n * - buffer: Always keep the last 60s of recording, requires:\n * - having replaysOnErrorSampleRate > 0 to capture replay when an error occurs\n * - or calling `flush()` to send the replay\n */\n\n /**\n * The current or last active transcation.\n * This is only available when performance is enabled.\n */\n\n /**\n * These are here so we can overwrite them in tests etc.\n * @hidden\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Timestamp of the last user activity. This lives across sessions.\n */\n\n /**\n * Is the integration currently active?\n */\n\n /**\n * Paused is a state where:\n * - DOM Recording is not listening at all\n * - Nothing will be added to event buffer (e.g. core SDK events)\n */\n\n /**\n * Have we attached listeners to the core SDK?\n * Note we have to track this as there is no way to remove instrumentation handlers.\n */\n\n /**\n * Function to stop recording\n */\n\n constructor({\n options,\n recordingOptions,\n }\n\n) {ReplayContainer.prototype.__init.call(this);ReplayContainer.prototype.__init2.call(this);ReplayContainer.prototype.__init3.call(this);ReplayContainer.prototype.__init4.call(this);ReplayContainer.prototype.__init5.call(this);ReplayContainer.prototype.__init6.call(this);\n this.eventBuffer = null;\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n this.recordingMode = 'session';\n this.timeouts = {\n sessionIdlePause: SESSION_IDLE_PAUSE_DURATION,\n sessionIdleExpire: SESSION_IDLE_EXPIRE_DURATION,\n } ;\n this._lastActivity = Date.now();\n this._isEnabled = false;\n this._isPaused = false;\n this._hasInitializedCoreListeners = false;\n this._context = {\n errorIds: new Set(),\n traceIds: new Set(),\n urls: [],\n initialTimestamp: Date.now(),\n initialUrl: '',\n };\n\n this._recordingOptions = recordingOptions;\n this._options = options;\n\n this._debouncedFlush = debounce(() => this._flush(), this._options.flushMinDelay, {\n maxWait: this._options.flushMaxDelay,\n });\n\n this._throttledAddEvent = throttle(\n (event, isCheckout) => addEvent(this, event, isCheckout),\n // Max 300 events...\n 300,\n // ... per 5s\n 5,\n );\n\n const { slowClickTimeout, slowClickIgnoreSelectors } = this.getOptions();\n\n const slowClickConfig = slowClickTimeout\n ? {\n threshold: Math.min(SLOW_CLICK_THRESHOLD, slowClickTimeout),\n timeout: slowClickTimeout,\n scrollTimeout: SLOW_CLICK_SCROLL_TIMEOUT,\n ignoreSelector: slowClickIgnoreSelectors ? slowClickIgnoreSelectors.join(',') : '',\n }\n : undefined;\n\n if (slowClickConfig) {\n this.clickDetector = new ClickDetector(this, slowClickConfig);\n }\n }\n\n /** Get the event context. */\n getContext() {\n return this._context;\n }\n\n /** If recording is currently enabled. */\n isEnabled() {\n return this._isEnabled;\n }\n\n /** If recording is currently paused. */\n isPaused() {\n return this._isPaused;\n }\n\n /** Get the replay integration options. */\n getOptions() {\n return this._options;\n }\n\n /**\n * Initializes the plugin based on sampling configuration. Should not be\n * called outside of constructor.\n */\n initializeSampling(previousSessionId) {\n const { errorSampleRate, sessionSampleRate } = this._options;\n\n // If neither sample rate is > 0, then do nothing - user will need to call one of\n // `start()` or `startBuffering` themselves.\n if (errorSampleRate <= 0 && sessionSampleRate <= 0) {\n return;\n }\n\n // Otherwise if there is _any_ sample rate set, try to load an existing\n // session, or create a new one.\n this._initializeSessionForSampling(previousSessionId);\n\n if (!this.session) {\n // This should not happen, something wrong has occurred\n this._handleException(new Error('Unable to initialize and create session'));\n return;\n }\n\n if (this.session.sampled === false) {\n // This should only occur if `errorSampleRate` is 0 and was unsampled for\n // session-based replay. In this case there is nothing to do.\n return;\n }\n\n // If segmentId > 0, it means we've previously already captured this session\n // In this case, we still want to continue in `session` recording mode\n this.recordingMode = this.session.sampled === 'buffer' && this.session.segmentId === 0 ? 'buffer' : 'session';\n\n logInfoNextTick(\n `[Replay] Starting replay in ${this.recordingMode} mode`,\n this._options._experiments.traceInternals,\n );\n\n this._initializeRecording();\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will throw an error if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * _performanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (this._isEnabled && this.recordingMode === 'session') {\n throw new Error('Replay recording is already in progress');\n }\n\n if (this._isEnabled && this.recordingMode === 'buffer') {\n throw new Error('Replay buffering is in progress, call `flush()` to save the replay');\n }\n\n logInfoNextTick('[Replay] Starting replay in session mode', this._options._experiments.traceInternals);\n\n const session = loadOrCreateSession(\n {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n traceInternals: this._options._experiments.traceInternals,\n },\n {\n stickySession: this._options.stickySession,\n // This is intentional: create a new session-based replay when calling `start()`\n sessionSampleRate: 1,\n allowBuffering: false,\n },\n );\n\n this.session = session;\n\n this._initializeRecording();\n }\n\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, an error occurs.\n */\n startBuffering() {\n if (this._isEnabled) {\n throw new Error('Replay recording is already in progress');\n }\n\n logInfoNextTick('[Replay] Starting replay in buffer mode', this._options._experiments.traceInternals);\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n traceInternals: this._options._experiments.traceInternals,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: 0,\n allowBuffering: true,\n },\n );\n\n this.session = session;\n\n this.recordingMode = 'buffer';\n this._initializeRecording();\n }\n\n /**\n * Start recording.\n *\n * Note that this will cause a new DOM checkout\n */\n startRecording() {\n try {\n this._stopRecording = record({\n ...this._recordingOptions,\n // When running in error sampling mode, we need to overwrite `checkoutEveryNms`\n // Without this, it would record forever, until an error happens, which we don't want\n // instead, we'll always keep the last 60 seconds of replay before an error happened\n ...(this.recordingMode === 'buffer' && { checkoutEveryNms: BUFFER_CHECKOUT_TIME }),\n emit: getHandleRecordingEmit(this),\n onMutation: this._onMutationHandler,\n });\n } catch (err) {\n this._handleException(err);\n }\n }\n\n /**\n * Stops the recording, if it was running.\n *\n * Returns true if it was previously stopped, or is now stopped,\n * otherwise false.\n */\n stopRecording() {\n try {\n if (this._stopRecording) {\n this._stopRecording();\n this._stopRecording = undefined;\n }\n\n return true;\n } catch (err) {\n this._handleException(err);\n return false;\n }\n }\n\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n async stop({ forceFlush = false, reason } = {}) {\n if (!this._isEnabled) {\n return;\n }\n\n // We can't move `_isEnabled` after awaiting a flush, otherwise we can\n // enter into an infinite loop when `stop()` is called while flushing.\n this._isEnabled = false;\n\n try {\n logInfo(\n `[Replay] Stopping Replay${reason ? ` triggered by ${reason}` : ''}`,\n this._options._experiments.traceInternals,\n );\n\n this._removeListeners();\n this.stopRecording();\n\n this._debouncedFlush.cancel();\n // See comment above re: `_isEnabled`, we \"force\" a flush, ignoring the\n // `_isEnabled` state of the plugin since it was disabled above.\n if (forceFlush) {\n await this._flush({ force: true });\n }\n\n // After flush, destroy event buffer\n this.eventBuffer && this.eventBuffer.destroy();\n this.eventBuffer = null;\n\n // Clear session from session storage, note this means if a new session\n // is started after, it will not have `previousSessionId`\n clearSession(this);\n } catch (err) {\n this._handleException(err);\n }\n }\n\n /**\n * Pause some replay functionality. See comments for `_isPaused`.\n * This differs from stop as this only stops DOM recording, it is\n * not as thorough of a shutdown as `stop()`.\n */\n pause() {\n if (this._isPaused) {\n return;\n }\n\n this._isPaused = true;\n this.stopRecording();\n\n logInfo('[Replay] Pausing replay', this._options._experiments.traceInternals);\n }\n\n /**\n * Resumes recording, see notes for `pause().\n *\n * Note that calling `startRecording()` here will cause a\n * new DOM checkout.`\n */\n resume() {\n if (!this._isPaused || !this._checkSession()) {\n return;\n }\n\n this._isPaused = false;\n this.startRecording();\n\n logInfo('[Replay] Resuming replay', this._options._experiments.traceInternals);\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n async sendBufferedReplayOrFlush({ continueRecording = true } = {}) {\n if (this.recordingMode === 'session') {\n return this.flushImmediate();\n }\n\n const activityTime = Date.now();\n\n logInfo('[Replay] Converting buffer to session', this._options._experiments.traceInternals);\n\n // Allow flush to complete before resuming as a session recording, otherwise\n // the checkout from `startRecording` may be included in the payload.\n // Prefer to keep the error replay as a separate (and smaller) segment\n // than the session replay.\n await this.flushImmediate();\n\n const hasStoppedRecording = this.stopRecording();\n\n if (!continueRecording || !hasStoppedRecording) {\n return;\n }\n\n // To avoid race conditions where this is called multiple times, we check here again that we are still buffering\n if ((this.recordingMode ) === 'session') {\n return;\n }\n\n // Re-start recording in session-mode\n this.recordingMode = 'session';\n\n // Once this session ends, we do not want to refresh it\n if (this.session) {\n this._updateUserActivity(activityTime);\n this._updateSessionActivity(activityTime);\n this._maybeSaveSession();\n }\n\n this.startRecording();\n }\n\n /**\n * We want to batch uploads of replay events. Save events only if\n * `<flushMinDelay>` milliseconds have elapsed since the last event\n * *OR* if `<flushMaxDelay>` milliseconds have elapsed.\n *\n * Accepts a callback to perform side-effects and returns true to stop batch\n * processing and hand back control to caller.\n */\n addUpdate(cb) {\n // We need to always run `cb` (e.g. in the case of `this.recordingMode == 'buffer'`)\n const cbResult = cb();\n\n // If this option is turned on then we will only want to call `flush`\n // explicitly\n if (this.recordingMode === 'buffer') {\n return;\n }\n\n // If callback is true, we do not want to continue with flushing -- the\n // caller will need to handle it.\n if (cbResult === true) {\n return;\n }\n\n // addUpdate is called quite frequently - use _debouncedFlush so that it\n // respects the flush delays and does not flush immediately\n this._debouncedFlush();\n }\n\n /**\n * Updates the user activity timestamp and resumes recording. This should be\n * called in an event handler for a user action that we consider as the user\n * being \"active\" (e.g. a mouse click).\n */\n triggerUserActivity() {\n this._updateUserActivity();\n\n // This case means that recording was once stopped due to inactivity.\n // Ensure that recording is resumed.\n if (!this._stopRecording) {\n // Create a new session, otherwise when the user action is flushed, it\n // will get rejected due to an expired session.\n if (!this._checkSession()) {\n return;\n }\n\n // Note: This will cause a new DOM checkout\n this.resume();\n return;\n }\n\n // Otherwise... recording was never suspended, continue as normalish\n this.checkAndHandleExpiredSession();\n\n this._updateSessionActivity();\n }\n\n /**\n * Updates the user activity timestamp *without* resuming\n * recording. Some user events (e.g. keydown) can be create\n * low-value replays that only contain the keypress as a\n * breadcrumb. Instead this would require other events to\n * create a new replay after a session has expired.\n */\n updateUserActivity() {\n this._updateUserActivity();\n this._updateSessionActivity();\n }\n\n /**\n * Only flush if `this.recordingMode === 'session'`\n */\n conditionalFlush() {\n if (this.recordingMode === 'buffer') {\n return Promise.resolve();\n }\n\n return this.flushImmediate();\n }\n\n /**\n * Flush using debounce flush\n */\n flush() {\n return this._debouncedFlush() ;\n }\n\n /**\n * Always flush via `_debouncedFlush` so that we do not have flushes triggered\n * from calling both `flush` and `_debouncedFlush`. Otherwise, there could be\n * cases of mulitple flushes happening closely together.\n */\n flushImmediate() {\n this._debouncedFlush();\n // `.flush` is provided by the debounced function, analogously to lodash.debounce\n return this._debouncedFlush.flush() ;\n }\n\n /**\n * Cancels queued up flushes.\n */\n cancelFlush() {\n this._debouncedFlush.cancel();\n }\n\n /** Get the current sesion (=replay) ID */\n getSessionId() {\n return this.session && this.session.id;\n }\n\n /**\n * Checks if recording should be stopped due to user inactivity. Otherwise\n * check if session is expired and create a new session if so. Triggers a new\n * full snapshot on new session.\n *\n * Returns true if session is not expired, false otherwise.\n * @hidden\n */\n checkAndHandleExpiredSession() {\n // Prevent starting a new session if the last user activity is older than\n // SESSION_IDLE_PAUSE_DURATION. Otherwise non-user activity can trigger a new\n // session+recording. This creates noisy replays that do not have much\n // content in them.\n if (\n this._lastActivity &&\n isExpired(this._lastActivity, this.timeouts.sessionIdlePause) &&\n this.session &&\n this.session.sampled === 'session'\n ) {\n // Pause recording only for session-based replays. Otherwise, resuming\n // will create a new replay and will conflict with users who only choose\n // to record error-based replays only. (e.g. the resumed replay will not\n // contain a reference to an error)\n this.pause();\n return;\n }\n\n // --- There is recent user activity --- //\n // This will create a new session if expired, based on expiry length\n if (!this._checkSession()) {\n // Check session handles the refreshing itself\n return false;\n }\n\n return true;\n }\n\n /**\n * Capture some initial state that can change throughout the lifespan of the\n * replay. This is required because otherwise they would be captured at the\n * first flush.\n */\n setInitialState() {\n const urlPath = `${WINDOW.location.pathname}${WINDOW.location.hash}${WINDOW.location.search}`;\n const url = `${WINDOW.location.origin}${urlPath}`;\n\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n // Reset _context as well\n this._clearContext();\n\n this._context.initialUrl = url;\n this._context.initialTimestamp = Date.now();\n this._context.urls.push(url);\n }\n\n /**\n * Add a breadcrumb event, that may be throttled.\n * If it was throttled, we add a custom breadcrumb to indicate that.\n */\n throttledAddEvent(\n event,\n isCheckout,\n ) {\n const res = this._throttledAddEvent(event, isCheckout);\n\n // If this is THROTTLED, it means we have throttled the event for the first time\n // In this case, we want to add a breadcrumb indicating that something was skipped\n if (res === THROTTLED) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.throttled',\n });\n\n this.addUpdate(() => {\n // Return `false` if the event _was_ added, as that means we schedule a flush\n return !addEventSync(this, {\n type: ReplayEventTypeCustom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n metric: true,\n },\n });\n });\n }\n\n return res;\n }\n\n /**\n * This will get the parametrized route name of the current page.\n * This is only available if performance is enabled, and if an instrumented router is used.\n */\n getCurrentRoute() {\n const lastTransaction = this.lastTransaction || getCurrentHub().getScope().getTransaction();\n if (!lastTransaction || !['route', 'custom'].includes(lastTransaction.metadata.source)) {\n return undefined;\n }\n\n return lastTransaction.name;\n }\n\n /**\n * Initialize and start all listeners to varying events (DOM,\n * Performance Observer, Recording, Sentry SDK, etc)\n */\n _initializeRecording() {\n this.setInitialState();\n\n // this method is generally called on page load or manually - in both cases\n // we should treat it as an activity\n this._updateSessionActivity();\n\n this.eventBuffer = createEventBuffer({\n useCompression: this._options.useCompression,\n workerUrl: this._options.workerUrl,\n });\n\n this._removeListeners();\n this._addListeners();\n\n // Need to set as enabled before we start recording, as `record()` can trigger a flush with a new checkout\n this._isEnabled = true;\n this._isPaused = false;\n\n this.startRecording();\n }\n\n /** A wrapper to conditionally capture exceptions. */\n _handleException(error) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay]', error);\n\n if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && this._options._experiments && this._options._experiments.captureExceptions) {\n captureException(error);\n }\n }\n\n /**\n * Loads (or refreshes) the current session.\n */\n _initializeSessionForSampling(previousSessionId) {\n // Whenever there is _any_ error sample rate, we always allow buffering\n // Because we decide on sampling when an error occurs, we need to buffer at all times if sampling for errors\n const allowBuffering = this._options.errorSampleRate > 0;\n\n const session = loadOrCreateSession(\n {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n traceInternals: this._options._experiments.traceInternals,\n previousSessionId,\n },\n {\n stickySession: this._options.stickySession,\n sessionSampleRate: this._options.sessionSampleRate,\n allowBuffering,\n },\n );\n\n this.session = session;\n }\n\n /**\n * Checks and potentially refreshes the current session.\n * Returns false if session is not recorded.\n */\n _checkSession() {\n // If there is no session yet, we do not want to refresh anything\n // This should generally not happen, but to be safe....\n if (!this.session) {\n return false;\n }\n\n const currentSession = this.session;\n\n if (\n shouldRefreshSession(currentSession, {\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n maxReplayDuration: this._options.maxReplayDuration,\n })\n ) {\n void this._refreshSession(currentSession);\n return false;\n }\n\n return true;\n }\n\n /**\n * Refresh a session with a new one.\n * This stops the current session (without forcing a flush, as that would never work since we are expired),\n * and then does a new sampling based on the refreshed session.\n */\n async _refreshSession(session) {\n if (!this._isEnabled) {\n return;\n }\n await this.stop({ reason: 'refresh session' });\n this.initializeSampling(session.id);\n }\n\n /**\n * Adds listeners to record events for the replay\n */\n _addListeners() {\n try {\n WINDOW.document.addEventListener('visibilitychange', this._handleVisibilityChange);\n WINDOW.addEventListener('blur', this._handleWindowBlur);\n WINDOW.addEventListener('focus', this._handleWindowFocus);\n WINDOW.addEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.addListeners();\n }\n\n // There is no way to remove these listeners, so ensure they are only added once\n if (!this._hasInitializedCoreListeners) {\n addGlobalListeners(this);\n\n this._hasInitializedCoreListeners = true;\n }\n } catch (err) {\n this._handleException(err);\n }\n\n this._performanceCleanupCallback = setupPerformanceObserver(this);\n }\n\n /**\n * Cleans up listeners that were created in `_addListeners`\n */\n _removeListeners() {\n try {\n WINDOW.document.removeEventListener('visibilitychange', this._handleVisibilityChange);\n\n WINDOW.removeEventListener('blur', this._handleWindowBlur);\n WINDOW.removeEventListener('focus', this._handleWindowFocus);\n WINDOW.removeEventListener('keydown', this._handleKeyboardEvent);\n\n if (this.clickDetector) {\n this.clickDetector.removeListeners();\n }\n\n if (this._performanceCleanupCallback) {\n this._performanceCleanupCallback();\n }\n } catch (err) {\n this._handleException(err);\n }\n }\n\n /**\n * Handle when visibility of the page content changes. Opening a new tab will\n * cause the state to change to hidden because of content of current page will\n * be hidden. Likewise, moving a different window to cover the contents of the\n * page will also trigger a change to a hidden state.\n */\n __init() {this._handleVisibilityChange = () => {\n if (WINDOW.document.visibilityState === 'visible') {\n this._doChangeToForegroundTasks();\n } else {\n this._doChangeToBackgroundTasks();\n }\n };}\n\n /**\n * Handle when page is blurred\n */\n __init2() {this._handleWindowBlur = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.blur',\n });\n\n // Do not count blur as a user action -- it's part of the process of them\n // leaving the page\n this._doChangeToBackgroundTasks(breadcrumb);\n };}\n\n /**\n * Handle when page is focused\n */\n __init3() {this._handleWindowFocus = () => {\n const breadcrumb = createBreadcrumb({\n category: 'ui.focus',\n });\n\n // Do not count focus as a user action -- instead wait until they focus and\n // interactive with page\n this._doChangeToForegroundTasks(breadcrumb);\n };}\n\n /** Ensure page remains active when a key is pressed. */\n __init4() {this._handleKeyboardEvent = (event) => {\n handleKeyboardEvent(this, event);\n };}\n\n /**\n * Tasks to run when we consider a page to be hidden (via blurring and/or visibility)\n */\n _doChangeToBackgroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n const expired = isSessionExpired(this.session, {\n maxReplayDuration: this._options.maxReplayDuration,\n sessionIdleExpire: this.timeouts.sessionIdleExpire,\n });\n\n if (expired) {\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Send replay when the page/tab becomes hidden. There is no reason to send\n // replay if it becomes visible, since no actions we care about were done\n // while it was hidden\n void this.conditionalFlush();\n }\n\n /**\n * Tasks to run when we consider a page to be visible (via focus and/or visibility)\n */\n _doChangeToForegroundTasks(breadcrumb) {\n if (!this.session) {\n return;\n }\n\n const isSessionActive = this.checkAndHandleExpiredSession();\n\n if (!isSessionActive) {\n // If the user has come back to the page within SESSION_IDLE_PAUSE_DURATION\n // ms, we will re-use the existing session, otherwise create a new\n // session\n logInfo('[Replay] Document has become active, but session has expired');\n return;\n }\n\n if (breadcrumb) {\n this._createCustomBreadcrumb(breadcrumb);\n }\n }\n\n /**\n * Update user activity (across session lifespans)\n */\n _updateUserActivity(_lastActivity = Date.now()) {\n this._lastActivity = _lastActivity;\n }\n\n /**\n * Updates the session's last activity timestamp\n */\n _updateSessionActivity(_lastActivity = Date.now()) {\n if (this.session) {\n this.session.lastActivity = _lastActivity;\n this._maybeSaveSession();\n }\n }\n\n /**\n * Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb\n */\n _createCustomBreadcrumb(breadcrumb) {\n this.addUpdate(() => {\n void this.throttledAddEvent({\n type: EventType.Custom,\n timestamp: breadcrumb.timestamp || 0,\n data: {\n tag: 'breadcrumb',\n payload: breadcrumb,\n },\n });\n });\n }\n\n /**\n * Observed performance events are added to `this.performanceEntries`. These\n * are included in the replay event before it is finished and sent to Sentry.\n */\n _addPerformanceEntries() {\n const performanceEntries = createPerformanceEntries(this.performanceEntries).concat(this.replayPerformanceEntries);\n\n this.performanceEntries = [];\n this.replayPerformanceEntries = [];\n\n return Promise.all(createPerformanceSpans(this, performanceEntries));\n }\n\n /**\n * Clear _context\n */\n _clearContext() {\n // XXX: `initialTimestamp` and `initialUrl` do not get cleared\n this._context.errorIds.clear();\n this._context.traceIds.clear();\n this._context.urls = [];\n }\n\n /** Update the initial timestamp based on the buffer content. */\n _updateInitialTimestampFromEventBuffer() {\n const { session, eventBuffer } = this;\n if (!session || !eventBuffer) {\n return;\n }\n\n // we only ever update this on the initial segment\n if (session.segmentId) {\n return;\n }\n\n const earliestEvent = eventBuffer.getEarliestTimestamp();\n if (earliestEvent && earliestEvent < this._context.initialTimestamp) {\n this._context.initialTimestamp = earliestEvent;\n }\n }\n\n /**\n * Return and clear _context\n */\n _popEventContext() {\n const _context = {\n initialTimestamp: this._context.initialTimestamp,\n initialUrl: this._context.initialUrl,\n errorIds: Array.from(this._context.errorIds),\n traceIds: Array.from(this._context.traceIds),\n urls: this._context.urls,\n };\n\n this._clearContext();\n\n return _context;\n }\n\n /**\n * Flushes replay event buffer to Sentry.\n *\n * Performance events are only added right before flushing - this is\n * due to the buffered performance observer events.\n *\n * Should never be called directly, only by `flush`\n */\n async _runFlush() {\n const replayId = this.getSessionId();\n\n if (!this.session || !this.eventBuffer || !replayId) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] No session or eventBuffer found to flush.');\n return;\n }\n\n await this._addPerformanceEntries();\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer || !this.eventBuffer.hasEvents) {\n return;\n }\n\n // Only attach memory event if eventBuffer is not empty\n await addMemoryEntry(this);\n\n // Check eventBuffer again, as it could have been stopped in the meanwhile\n if (!this.eventBuffer) {\n return;\n }\n\n // if this changed in the meanwhile, e.g. because the session was refreshed or similar, we abort here\n if (replayId !== this.getSessionId()) {\n return;\n }\n\n try {\n // This uses the data from the eventBuffer, so we need to call this before `finish()\n this._updateInitialTimestampFromEventBuffer();\n\n const timestamp = Date.now();\n\n // Check total duration again, to avoid sending outdated stuff\n // We leave 30s wiggle room to accomodate late flushing etc.\n // This _could_ happen when the browser is suspended during flushing, in which case we just want to stop\n if (timestamp - this._context.initialTimestamp > this._options.maxReplayDuration + 30000) {\n throw new Error('Session is too long, not sending replay');\n }\n\n const eventContext = this._popEventContext();\n // Always increment segmentId regardless of outcome of sending replay\n const segmentId = this.session.segmentId++;\n this._maybeSaveSession();\n\n // Note this empties the event buffer regardless of outcome of sending replay\n const recordingData = await this.eventBuffer.finish();\n\n await sendReplay({\n replayId,\n recordingData,\n segmentId,\n eventContext,\n session: this.session,\n options: this.getOptions(),\n timestamp,\n });\n } catch (err) {\n this._handleException(err);\n\n // This means we retried 3 times and all of them failed,\n // or we ran into a problem we don't want to retry, like rate limiting.\n // In this case, we want to completely stop the replay - otherwise, we may get inconsistent segments\n void this.stop({ reason: 'sendReplay' });\n\n const client = getCurrentHub().getClient();\n\n if (client) {\n client.recordDroppedEvent('send_error', 'replay');\n }\n }\n }\n\n /**\n * Flush recording data to Sentry. Creates a lock so that only a single flush\n * can be active at a time. Do not call this directly.\n */\n __init5() {this._flush = async ({\n force = false,\n }\n\n = {}) => {\n if (!this._isEnabled && !force) {\n // This can happen if e.g. the replay was stopped because of exceeding the retry limit\n return;\n }\n\n if (!this.checkAndHandleExpiredSession()) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('[Replay] Attempting to finish replay event after session expired.');\n return;\n }\n\n if (!this.session) {\n // should never happen, as we would have bailed out before\n return;\n }\n\n const start = this.session.started;\n const now = Date.now();\n const duration = now - start;\n\n // A flush is about to happen, cancel any queued flushes\n this._debouncedFlush.cancel();\n\n // If session is too short, or too long (allow some wiggle room over maxReplayDuration), do not send it\n // This _should_ not happen, but it may happen if flush is triggered due to a page activity change or similar\n const tooShort = duration < this._options.minReplayDuration;\n const tooLong = duration > this._options.maxReplayDuration + 5000;\n if (tooShort || tooLong) {\n logInfo(\n `[Replay] Session duration (${Math.floor(duration / 1000)}s) is too ${\n tooShort ? 'short' : 'long'\n }, not sending replay.`,\n this._options._experiments.traceInternals,\n );\n\n if (tooShort) {\n this._debouncedFlush();\n }\n return;\n }\n\n const eventBuffer = this.eventBuffer;\n if (eventBuffer && this.session.segmentId === 0 && !eventBuffer.hasCheckout) {\n logInfo('[Replay] Flushing initial segment without checkout.', this._options._experiments.traceInternals);\n // TODO FN: Evaluate if we want to stop here, or remove this again?\n }\n\n // this._flushLock acts as a lock so that future calls to `_flush()`\n // will be blocked until this promise resolves\n if (!this._flushLock) {\n this._flushLock = this._runFlush();\n await this._flushLock;\n this._flushLock = undefined;\n return;\n }\n\n // Wait for previous flush to finish, then call the debounced `_flush()`.\n // It's possible there are other flush requests queued and waiting for it\n // to resolve. We want to reduce all outstanding requests (as well as any\n // new flush requests that occur within a second of the locked flush\n // completing) into a single flush.\n\n try {\n await this._flushLock;\n } catch (err) {\n (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error(err);\n } finally {\n this._debouncedFlush();\n }\n };}\n\n /** Save the session, if it is sticky */\n _maybeSaveSession() {\n if (this.session && this._options.stickySession) {\n saveSession(this.session);\n }\n }\n\n /** Handler for rrweb.record.onMutation */\n __init6() {this._onMutationHandler = (mutations) => {\n const count = mutations.length;\n\n const mutationLimit = this._options.mutationLimit;\n const mutationBreadcrumbLimit = this._options.mutationBreadcrumbLimit;\n const overMutationLimit = mutationLimit && count > mutationLimit;\n\n // Create a breadcrumb if a lot of mutations happen at the same time\n // We can show this in the UI as an information with potential performance improvements\n if (count > mutationBreadcrumbLimit || overMutationLimit) {\n const breadcrumb = createBreadcrumb({\n category: 'replay.mutations',\n data: {\n count,\n limit: overMutationLimit,\n },\n });\n this._createCustomBreadcrumb(breadcrumb);\n }\n\n // Stop replay if over the mutation limit\n if (overMutationLimit) {\n void this.stop({ reason: 'mutationLimit', forceFlush: this.recordingMode === 'session' });\n return false;\n }\n\n // `true` means we use the regular mutation handling by rrweb\n return true;\n };}\n}\n\nfunction getOption(\n selectors,\n defaultSelectors,\n deprecatedClassOption,\n deprecatedSelectorOption,\n) {\n const deprecatedSelectors = typeof deprecatedSelectorOption === 'string' ? deprecatedSelectorOption.split(',') : [];\n\n const allSelectors = [\n ...selectors,\n // @deprecated\n ...deprecatedSelectors,\n\n // sentry defaults\n ...defaultSelectors,\n ];\n\n // @deprecated\n if (typeof deprecatedClassOption !== 'undefined') {\n // NOTE: No support for RegExp\n if (typeof deprecatedClassOption === 'string') {\n allSelectors.push(`.${deprecatedClassOption}`);\n }\n\n // eslint-disable-next-line no-console\n console.warn(\n '[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.',\n );\n }\n\n return allSelectors.join(',');\n}\n\n/**\n * Returns privacy related configuration for use in rrweb\n */\nfunction getPrivacyOptions({\n mask,\n unmask,\n block,\n unblock,\n ignore,\n\n // eslint-disable-next-line deprecation/deprecation\n blockClass,\n // eslint-disable-next-line deprecation/deprecation\n blockSelector,\n // eslint-disable-next-line deprecation/deprecation\n maskTextClass,\n // eslint-disable-next-line deprecation/deprecation\n maskTextSelector,\n // eslint-disable-next-line deprecation/deprecation\n ignoreClass,\n}) {\n const defaultBlockedElements = ['base[href=\"/\"]'];\n\n const maskSelector = getOption(mask, ['.sentry-mask', '[data-sentry-mask]'], maskTextClass, maskTextSelector);\n const unmaskSelector = getOption(unmask, ['.sentry-unmask', '[data-sentry-unmask]']);\n\n const options = {\n // We are making the decision to make text and input selectors the same\n maskTextSelector: maskSelector,\n unmaskTextSelector: unmaskSelector,\n\n blockSelector: getOption(\n block,\n ['.sentry-block', '[data-sentry-block]', ...defaultBlockedElements],\n blockClass,\n blockSelector,\n ),\n unblockSelector: getOption(unblock, ['.sentry-unblock', '[data-sentry-unblock]']),\n ignoreSelector: getOption(ignore, ['.sentry-ignore', '[data-sentry-ignore]', 'input[type=\"file\"]'], ignoreClass),\n };\n\n if (blockClass instanceof RegExp) {\n options.blockClass = blockClass;\n }\n\n if (maskTextClass instanceof RegExp) {\n options.maskTextClass = maskTextClass;\n }\n\n return options;\n}\n\n/**\n * Masks an attribute if necessary, otherwise return attribute value as-is.\n */\nfunction maskAttribute({\n el,\n key,\n maskAttributes,\n maskAllText,\n privacyOptions,\n value,\n}) {\n // We only mask attributes if `maskAllText` is true\n if (!maskAllText) {\n return value;\n }\n\n // unmaskTextSelector takes precendence\n if (privacyOptions.unmaskTextSelector && el.matches(privacyOptions.unmaskTextSelector)) {\n return value;\n }\n\n if (\n maskAttributes.includes(key) ||\n // Need to mask `value` attribute for `<input>` if it's a button-like\n // type\n (key === 'value' && el.tagName === 'INPUT' && ['submit', 'button'].includes(el.getAttribute('type') || ''))\n ) {\n return value.replace(/[\\S]/g, '*');\n }\n\n return value;\n}\n\nconst MEDIA_SELECTORS =\n 'img,image,svg,video,object,picture,embed,map,audio,link[rel=\"icon\"],link[rel=\"apple-touch-icon\"]';\n\nconst DEFAULT_NETWORK_HEADERS = ['content-length', 'content-type', 'accept'];\n\nlet _initialized = false;\n\n/**\n * The main replay integration class, to be passed to `init({ integrations: [] })`.\n */\nclass Replay {\n /**\n * @inheritDoc\n */\n static __initStatic() {this.id = 'Replay';}\n\n /**\n * @inheritDoc\n */\n\n /**\n * Options to pass to `rrweb.record()`\n */\n\n /**\n * Initial options passed to the replay integration, merged with default values.\n * Note: `sessionSampleRate` and `errorSampleRate` are not required here, as they\n * can only be finally set when setupOnce() is called.\n *\n * @private\n */\n\n constructor({\n flushMinDelay = DEFAULT_FLUSH_MIN_DELAY,\n flushMaxDelay = DEFAULT_FLUSH_MAX_DELAY,\n minReplayDuration = MIN_REPLAY_DURATION,\n maxReplayDuration = MAX_REPLAY_DURATION,\n stickySession = true,\n useCompression = true,\n workerUrl,\n _experiments = {},\n sessionSampleRate,\n errorSampleRate,\n maskAllText = true,\n maskAllInputs = true,\n blockAllMedia = true,\n\n mutationBreadcrumbLimit = 750,\n mutationLimit = 10000,\n\n slowClickTimeout = 7000,\n slowClickIgnoreSelectors = [],\n\n networkDetailAllowUrls = [],\n networkDetailDenyUrls = [],\n networkCaptureBodies = true,\n networkRequestHeaders = [],\n networkResponseHeaders = [],\n\n mask = [],\n maskAttributes = ['title', 'placeholder'],\n unmask = [],\n block = [],\n unblock = [],\n ignore = [],\n maskFn,\n\n beforeAddRecordingEvent,\n\n // eslint-disable-next-line deprecation/deprecation\n blockClass,\n // eslint-disable-next-line deprecation/deprecation\n blockSelector,\n // eslint-disable-next-line deprecation/deprecation\n maskInputOptions,\n // eslint-disable-next-line deprecation/deprecation\n maskTextClass,\n // eslint-disable-next-line deprecation/deprecation\n maskTextSelector,\n // eslint-disable-next-line deprecation/deprecation\n ignoreClass,\n } = {}) {\n this.name = Replay.id;\n\n const privacyOptions = getPrivacyOptions({\n mask,\n unmask,\n block,\n unblock,\n ignore,\n blockClass,\n blockSelector,\n maskTextClass,\n maskTextSelector,\n ignoreClass,\n });\n\n this._recordingOptions = {\n maskAllInputs,\n maskAllText,\n maskInputOptions: { ...(maskInputOptions || {}), password: true },\n maskTextFn: maskFn,\n maskInputFn: maskFn,\n maskAttributeFn: (key, value, el) =>\n maskAttribute({\n maskAttributes,\n maskAllText,\n privacyOptions,\n key,\n value,\n el,\n }),\n\n ...privacyOptions,\n\n // Our defaults\n slimDOMOptions: 'all',\n inlineStylesheet: true,\n // Disable inline images as it will increase segment/replay size\n inlineImages: false,\n // collect fonts, but be aware that `sentry.io` needs to be an allowed\n // origin for playback\n collectFonts: true,\n errorHandler: (err) => {\n try {\n err.__rrweb__ = true;\n } catch (error) {\n // ignore errors here\n // this can happen if the error is frozen or does not allow mutation for other reasons\n }\n },\n };\n\n this._initialOptions = {\n flushMinDelay,\n flushMaxDelay,\n minReplayDuration: Math.min(minReplayDuration, MIN_REPLAY_DURATION_LIMIT),\n maxReplayDuration: Math.min(maxReplayDuration, MAX_REPLAY_DURATION),\n stickySession,\n sessionSampleRate,\n errorSampleRate,\n useCompression,\n workerUrl,\n blockAllMedia,\n maskAllInputs,\n maskAllText,\n mutationBreadcrumbLimit,\n mutationLimit,\n slowClickTimeout,\n slowClickIgnoreSelectors,\n networkDetailAllowUrls,\n networkDetailDenyUrls,\n networkCaptureBodies,\n networkRequestHeaders: _getMergedNetworkHeaders(networkRequestHeaders),\n networkResponseHeaders: _getMergedNetworkHeaders(networkResponseHeaders),\n beforeAddRecordingEvent,\n\n _experiments,\n };\n\n if (typeof sessionSampleRate === 'number') {\n // eslint-disable-next-line\n console.warn(\n `[Replay] You are passing \\`sessionSampleRate\\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \\`replaysSessionSampleRate\\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${sessionSampleRate} })`,\n );\n\n this._initialOptions.sessionSampleRate = sessionSampleRate;\n }\n\n if (typeof errorSampleRate === 'number') {\n // eslint-disable-next-line\n console.warn(\n `[Replay] You are passing \\`errorSampleRate\\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \\`replaysOnErrorSampleRate\\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${errorSampleRate} })`,\n );\n\n this._initialOptions.errorSampleRate = errorSampleRate;\n }\n\n if (this._initialOptions.blockAllMedia) {\n // `blockAllMedia` is a more user friendly option to configure blocking\n // embedded media elements\n this._recordingOptions.blockSelector = !this._recordingOptions.blockSelector\n ? MEDIA_SELECTORS\n : `${this._recordingOptions.blockSelector},${MEDIA_SELECTORS}`;\n }\n\n if (this._isInitialized && isBrowser()) {\n throw new Error('Multiple Sentry Session Replay instances are not supported');\n }\n\n this._isInitialized = true;\n }\n\n /** If replay has already been initialized */\n get _isInitialized() {\n return _initialized;\n }\n\n /** Update _isInitialized */\n set _isInitialized(value) {\n _initialized = value;\n }\n\n /**\n * Setup and initialize replay container\n */\n setupOnce() {\n if (!isBrowser()) {\n return;\n }\n\n this._setup();\n\n // Once upon a time, we tried to create a transaction in `setupOnce` and it would\n // potentially create a transaction before some native SDK integrations have run\n // and applied their own global event processor. An example is:\n // https://github.com/getsentry/sentry-javascript/blob/b47ceafbdac7f8b99093ce6023726ad4687edc48/packages/browser/src/integrations/useragent.ts\n //\n // So we call `this._initialize()` in next event loop as a workaround to wait for other\n // global event processors to finish. This is no longer needed, but keeping it\n // here to avoid any future issues.\n setTimeout(() => this._initialize());\n }\n\n /**\n * Start a replay regardless of sampling rate. Calling this will always\n * create a new session. Will throw an error if replay is already in progress.\n *\n * Creates or loads a session, attaches listeners to varying events (DOM,\n * PerformanceObserver, Recording, Sentry SDK, etc)\n */\n start() {\n if (!this._replay) {\n return;\n }\n\n this._replay.start();\n }\n\n /**\n * Start replay buffering. Buffers until `flush()` is called or, if\n * `replaysOnErrorSampleRate` > 0, until an error occurs.\n */\n startBuffering() {\n if (!this._replay) {\n return;\n }\n\n this._replay.startBuffering();\n }\n\n /**\n * Currently, this needs to be manually called (e.g. for tests). Sentry SDK\n * does not support a teardown\n */\n stop() {\n if (!this._replay) {\n return Promise.resolve();\n }\n\n return this._replay.stop({ forceFlush: this._replay.recordingMode === 'session' });\n }\n\n /**\n * If not in \"session\" recording mode, flush event buffer which will create a new replay.\n * Unless `continueRecording` is false, the replay will continue to record and\n * behave as a \"session\"-based replay.\n *\n * Otherwise, queue up a flush.\n */\n flush(options) {\n if (!this._replay || !this._replay.isEnabled()) {\n return Promise.resolve();\n }\n\n return this._replay.sendBufferedReplayOrFlush(options);\n }\n\n /**\n * Get the current session ID.\n */\n getReplayId() {\n if (!this._replay || !this._replay.isEnabled()) {\n return;\n }\n\n return this._replay.getSessionId();\n }\n /**\n * Initializes replay.\n */\n _initialize() {\n if (!this._replay) {\n return;\n }\n\n this._replay.initializeSampling();\n }\n\n /** Setup the integration. */\n _setup() {\n // Client is not available in constructor, so we need to wait until setupOnce\n const finalOptions = loadReplayOptionsFromClient(this._initialOptions);\n\n this._replay = new ReplayContainer({\n options: finalOptions,\n recordingOptions: this._recordingOptions,\n });\n }\n} Replay.__initStatic();\n\n/** Parse Replay-related options from SDK options */\nfunction loadReplayOptionsFromClient(initialOptions) {\n const client = getCurrentHub().getClient();\n const opt = client && (client.getOptions() );\n\n const finalOptions = { sessionSampleRate: 0, errorSampleRate: 0, ...dropUndefinedKeys(initialOptions) };\n\n if (!opt) {\n // eslint-disable-next-line no-console\n console.warn('SDK client is not available.');\n return finalOptions;\n }\n\n if (\n initialOptions.sessionSampleRate == null && // TODO remove once deprecated rates are removed\n initialOptions.errorSampleRate == null && // TODO remove once deprecated rates are removed\n opt.replaysSessionSampleRate == null &&\n opt.replaysOnErrorSampleRate == null\n ) {\n // eslint-disable-next-line no-console\n console.warn(\n 'Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.',\n );\n }\n\n if (typeof opt.replaysSessionSampleRate === 'number') {\n finalOptions.sessionSampleRate = opt.replaysSessionSampleRate;\n }\n\n if (typeof opt.replaysOnErrorSampleRate === 'number') {\n finalOptions.errorSampleRate = opt.replaysOnErrorSampleRate;\n }\n\n return finalOptions;\n}\n\nfunction _getMergedNetworkHeaders(headers) {\n return [...DEFAULT_NETWORK_HEADERS, ...headers.map(header => header.toLowerCase())];\n}\n\nexport { Replay };\n//# sourceMappingURL=index.js.map\n","var _sentryCollisionFreeGlobalObject = typeof window === \"undefined\" ? global : window;\n_sentryCollisionFreeGlobalObject[\"__sentryRewritesTunnelPath__\"] = undefined;\n_sentryCollisionFreeGlobalObject[\"SENTRY_RELEASE\"] = {\"id\":\"Rg2O-iuUtoq5DeFRdbanF\"};\n_sentryCollisionFreeGlobalObject[\"__rewriteFramesAssetPrefixPath__\"] = \"\";\n\n// This file configures the initialization of Sentry on the browser.\n// The config you add here will be used whenever a page is visited.\n// https://docs.sentry.io/platforms/javascript/guides/nextjs/\n\nimport * as Sentry from '@sentry/nextjs';\n\nconst SENTRY_DSN = process.env.SENTRY_DSN || process.env.NEXT_PUBLIC_SENTRY_DSN;\n\nSentry.init({\n dsn:\n SENTRY_DSN ||\n 'https://76c508f2a1b54f19a2fd6f7779ae4164@o446981.ingest.sentry.io/4504911178432512',\n integrations: [new Sentry.Replay()],\n // Adjust this value in production, or use tracesSampler for greater control\n tracesSampleRate: 1.0,\n enabled: process.env.NODE_ENV !== 'local',\n replaysSessionSampleRate: 0.1,\n replaysOnErrorSampleRate: 1.0,\n // ...\n // Note: if you want to override the automatic release value, do not set a\n // `release` value here - use the environment variable `SENTRY_RELEASE`, so\n // that it will also get attached to your source maps\n});\n","'use strict';\n\nmodule.exports = ({onlyFirst = false} = {}) => {\n\tconst pattern = [\n\t\t'[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n};\n","import type { DomainLocale } from '../server/config'\nimport type { normalizeLocalePath as NormalizeFn } from './normalize-locale-path'\nimport type { detectDomainLocale as DetectFn } from './detect-domain-locale'\nimport { normalizePathTrailingSlash } from './normalize-trailing-slash'\n\nconst basePath = (process.env.__NEXT_ROUTER_BASEPATH as string) || ''\n\nexport function getDomainLocale(\n path: string,\n locale?: string | false,\n locales?: string[],\n domainLocales?: DomainLocale[]\n) {\n if (process.env.__NEXT_I18N_SUPPORT) {\n const normalizeLocalePath: typeof NormalizeFn =\n require('./normalize-locale-path').normalizeLocalePath\n const detectDomainLocale: typeof DetectFn =\n require('./detect-domain-locale').detectDomainLocale\n\n const target = locale || normalizeLocalePath(path, locales).detectedLocale\n const domain = detectDomainLocale(domainLocales, undefined, target)\n if (domain) {\n const proto = `http${domain.http ? '' : 's'}://`\n const finalLocale = target === domain.defaultLocale ? '' : `/${target}`\n return `${proto}${domain.domain}${normalizePathTrailingSlash(\n `${basePath}${finalLocale}${path}`\n )}`\n }\n return false\n } else {\n return false\n }\n}\n","'use client'\n\nimport React, {\n useRef,\n useEffect,\n useCallback,\n useContext,\n useMemo,\n useState,\n forwardRef,\n use,\n} from 'react'\nimport ReactDOM from 'react-dom'\nimport Head from '../shared/lib/head'\nimport { getImgProps } from '../shared/lib/get-img-props'\nimport type {\n ImageProps,\n ImgProps,\n OnLoad,\n OnLoadingComplete,\n PlaceholderValue,\n} from '../shared/lib/get-img-props'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n} from '../shared/lib/image-config'\nimport { imageConfigDefault } from '../shared/lib/image-config'\nimport { ImageConfigContext } from '../shared/lib/image-config-context.shared-runtime'\nimport { warnOnce } from '../shared/lib/utils/warn-once'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\n\n// @ts-ignore - This is replaced by webpack alias\nimport defaultLoader from 'next/dist/shared/lib/image-loader'\nimport { useMergedRef } from './use-merged-ref'\n\n// This is replaced by webpack define plugin\nconst configEnv = process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete\n\nif (typeof window === 'undefined') {\n ;(globalThis as any).__NEXT_IMAGE_IMPORTED = true\n}\n\nexport type { ImageLoaderProps }\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\ntype ImgElementWithDataProp = HTMLImageElement & {\n 'data-loaded-src': string | undefined\n}\n\ntype ImageElementProps = ImgProps & {\n unoptimized: boolean\n placeholder: PlaceholderValue\n onLoadRef: React.MutableRefObject<OnLoad | undefined>\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>\n setBlurComplete: (b: boolean) => void\n setShowAltText: (b: boolean) => void\n sizesInput: string | undefined\n}\n\n// See https://stackoverflow.com/q/39777833/266535 for why we use this ref\n// handler instead of the img's onLoad attribute.\nfunction handleLoading(\n img: ImgElementWithDataProp,\n placeholder: PlaceholderValue,\n onLoadRef: React.MutableRefObject<OnLoad | undefined>,\n onLoadingCompleteRef: React.MutableRefObject<OnLoadingComplete | undefined>,\n setBlurComplete: (b: boolean) => void,\n unoptimized: boolean,\n sizesInput: string | undefined\n) {\n const src = img?.src\n if (!img || img['data-loaded-src'] === src) {\n return\n }\n img['data-loaded-src'] = src\n const p = 'decode' in img ? img.decode() : Promise.resolve()\n p.catch(() => {}).then(() => {\n if (!img.parentElement || !img.isConnected) {\n // Exit early in case of race condition:\n // - onload() is called\n // - decode() is called but incomplete\n // - unmount is called\n // - decode() completes\n return\n }\n if (placeholder !== 'empty') {\n setBlurComplete(true)\n }\n if (onLoadRef?.current) {\n // Since we don't have the SyntheticEvent here,\n // we must create one with the same shape.\n // See https://reactjs.org/docs/events.html\n const event = new Event('load')\n Object.defineProperty(event, 'target', { writable: false, value: img })\n let prevented = false\n let stopped = false\n onLoadRef.current({\n ...event,\n nativeEvent: event,\n currentTarget: img,\n target: img,\n isDefaultPrevented: () => prevented,\n isPropagationStopped: () => stopped,\n persist: () => {},\n preventDefault: () => {\n prevented = true\n event.preventDefault()\n },\n stopPropagation: () => {\n stopped = true\n event.stopPropagation()\n },\n })\n }\n if (onLoadingCompleteRef?.current) {\n onLoadingCompleteRef.current(img)\n }\n if (process.env.NODE_ENV !== 'production') {\n const origSrc = new URL(src, 'http://n').searchParams.get('url') || src\n if (img.getAttribute('data-nimg') === 'fill') {\n if (!unoptimized && (!sizesInput || sizesInput === '100vw')) {\n let widthViewportRatio =\n img.getBoundingClientRect().width / window.innerWidth\n if (widthViewportRatio < 0.6) {\n if (sizesInput === '100vw') {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" prop and \"sizes\" prop of \"100vw\", but image is not rendered at full viewport width. Please adjust \"sizes\" to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n } else {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" but is missing \"sizes\" prop. Please add it to improve page performance. Read more: https://nextjs.org/docs/api-reference/next/image#sizes`\n )\n }\n }\n }\n if (img.parentElement) {\n const { position } = window.getComputedStyle(img.parentElement)\n const valid = ['absolute', 'fixed', 'relative']\n if (!valid.includes(position)) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and parent element with invalid \"position\". Provided \"${position}\" should be one of ${valid\n .map(String)\n .join(',')}.`\n )\n }\n }\n if (img.height === 0) {\n warnOnce(\n `Image with src \"${origSrc}\" has \"fill\" and a height value of 0. This is likely because the parent element of the image has not been styled to have a set height.`\n )\n }\n }\n\n const heightModified =\n img.height.toString() !== img.getAttribute('height')\n const widthModified = img.width.toString() !== img.getAttribute('width')\n if (\n (heightModified && !widthModified) ||\n (!heightModified && widthModified)\n ) {\n warnOnce(\n `Image with src \"${origSrc}\" has either width or height modified, but not the other. If you use CSS to change the size of your image, also include the styles 'width: \"auto\"' or 'height: \"auto\"' to maintain the aspect ratio.`\n )\n }\n }\n })\n}\n\nfunction getDynamicProps(\n fetchPriority?: string\n): Record<string, string | undefined> {\n if (Boolean(use)) {\n // In React 19.0.0 or newer, we must use camelCase\n // prop to avoid \"Warning: Invalid DOM property\".\n // See https://github.com/facebook/react/pull/25927\n return { fetchPriority }\n }\n // In React 18.2.0 or older, we must use lowercase prop\n // to avoid \"Warning: Invalid DOM property\".\n return { fetchpriority: fetchPriority }\n}\n\nconst ImageElement = forwardRef<HTMLImageElement | null, ImageElementProps>(\n (\n {\n src,\n srcSet,\n sizes,\n height,\n width,\n decoding,\n className,\n style,\n fetchPriority,\n placeholder,\n loading,\n unoptimized,\n fill,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n setShowAltText,\n sizesInput,\n onLoad,\n onError,\n ...rest\n },\n forwardedRef\n ) => {\n const ownRef = useCallback(\n (img: ImgElementWithDataProp | null) => {\n if (!img) {\n return\n }\n if (onError) {\n // If the image has an error before react hydrates, then the error is lost.\n // The workaround is to wait until the image is mounted which is after hydration,\n // then we set the src again to trigger the error handler (if there was an error).\n // eslint-disable-next-line no-self-assign\n img.src = img.src\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!src) {\n console.error(`Image is missing required \"src\" property:`, img)\n }\n if (img.getAttribute('alt') === null) {\n console.error(\n `Image is missing required \"alt\" property. Please add Alternative Text to describe the image for screen readers and search engines.`\n )\n }\n }\n if (img.complete) {\n handleLoading(\n img,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }\n },\n [\n src,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n onError,\n unoptimized,\n sizesInput,\n ]\n )\n\n const ref = useMergedRef(forwardedRef, ownRef)\n\n return (\n <img\n {...rest}\n {...getDynamicProps(fetchPriority)}\n // It's intended to keep `loading` before `src` because React updates\n // props in order which causes Safari/Firefox to not lazy load properly.\n // See https://github.com/facebook/react/issues/25883\n loading={loading}\n width={width}\n height={height}\n decoding={decoding}\n data-nimg={fill ? 'fill' : '1'}\n className={className}\n style={style}\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n sizes={sizes}\n srcSet={srcSet}\n src={src}\n ref={ref}\n onLoad={(event) => {\n const img = event.currentTarget as ImgElementWithDataProp\n handleLoading(\n img,\n placeholder,\n onLoadRef,\n onLoadingCompleteRef,\n setBlurComplete,\n unoptimized,\n sizesInput\n )\n }}\n onError={(event) => {\n // if the real image fails to load, this will ensure \"alt\" is visible\n setShowAltText(true)\n if (placeholder !== 'empty') {\n // If the real image fails to load, this will still remove the placeholder.\n setBlurComplete(true)\n }\n if (onError) {\n onError(event)\n }\n }}\n />\n )\n }\n)\n\nfunction ImagePreload({\n isAppRouter,\n imgAttributes,\n}: {\n isAppRouter: boolean\n imgAttributes: ImgProps\n}) {\n const opts = {\n as: 'image',\n imageSrcSet: imgAttributes.srcSet,\n imageSizes: imgAttributes.sizes,\n crossOrigin: imgAttributes.crossOrigin,\n referrerPolicy: imgAttributes.referrerPolicy,\n ...getDynamicProps(imgAttributes.fetchPriority),\n }\n\n if (isAppRouter && ReactDOM.preload) {\n // See https://github.com/facebook/react/pull/26940\n ReactDOM.preload(\n imgAttributes.src,\n // @ts-expect-error TODO: upgrade to `@types/react-dom@18.3.x`\n opts\n )\n return null\n }\n\n return (\n <Head>\n <link\n key={\n '__nimg-' +\n imgAttributes.src +\n imgAttributes.srcSet +\n imgAttributes.sizes\n }\n rel=\"preload\"\n // Note how we omit the `href` attribute, as it would only be relevant\n // for browsers that do not support `imagesrcset`, and in those cases\n // it would cause the incorrect image to be preloaded.\n //\n // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset\n href={imgAttributes.srcSet ? undefined : imgAttributes.src}\n {...opts}\n />\n </Head>\n )\n}\n\n/**\n * The `Image` component is used to optimize images.\n *\n * Read more: [Next.js docs: `Image`](https://nextjs.org/docs/app/api-reference/components/image)\n */\nexport const Image = forwardRef<HTMLImageElement | null, ImageProps>(\n (props, forwardedRef) => {\n const pagesRouter = useContext(RouterContext)\n // We're in the app directory if there is no pages router.\n const isAppRouter = !pagesRouter\n\n const configContext = useContext(ImageConfigContext)\n const config = useMemo(() => {\n const c = configEnv || configContext || imageConfigDefault\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n return { ...c, allSizes, deviceSizes }\n }, [configContext])\n\n const { onLoad, onLoadingComplete } = props\n const onLoadRef = useRef(onLoad)\n\n useEffect(() => {\n onLoadRef.current = onLoad\n }, [onLoad])\n\n const onLoadingCompleteRef = useRef(onLoadingComplete)\n\n useEffect(() => {\n onLoadingCompleteRef.current = onLoadingComplete\n }, [onLoadingComplete])\n\n const [blurComplete, setBlurComplete] = useState(false)\n const [showAltText, setShowAltText] = useState(false)\n\n const { props: imgAttributes, meta: imgMeta } = getImgProps(props, {\n defaultLoader,\n imgConf: config,\n blurComplete,\n showAltText,\n })\n\n return (\n <>\n {\n <ImageElement\n {...imgAttributes}\n unoptimized={imgMeta.unoptimized}\n placeholder={imgMeta.placeholder}\n fill={imgMeta.fill}\n onLoadRef={onLoadRef}\n onLoadingCompleteRef={onLoadingCompleteRef}\n setBlurComplete={setBlurComplete}\n setShowAltText={setShowAltText}\n sizesInput={props.sizes}\n ref={forwardedRef}\n />\n }\n {imgMeta.priority ? (\n <ImagePreload\n isAppRouter={isAppRouter}\n imgAttributes={imgAttributes}\n />\n ) : null}\n </>\n )\n }\n)\n","'use client'\n\nimport type {\n NextRouter,\n PrefetchOptions as RouterPrefetchOptions,\n} from '../shared/lib/router/router'\n\nimport React from 'react'\nimport type { UrlObject } from 'url'\nimport { resolveHref } from './resolve-href'\nimport { isLocalURL } from '../shared/lib/router/utils/is-local-url'\nimport { formatUrl } from '../shared/lib/router/utils/format-url'\nimport { isAbsoluteUrl } from '../shared/lib/utils'\nimport { addLocale } from './add-locale'\nimport { RouterContext } from '../shared/lib/router-context.shared-runtime'\nimport type { AppRouterInstance } from '../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from './use-intersection'\nimport { getDomainLocale } from './get-domain-locale'\nimport { addBasePath } from './add-base-path'\nimport { useMergedRef } from './use-merged-ref'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype InternalLinkProps = {\n /**\n * The path or URL to navigate to. It can also be an object.\n *\n * @example https://nextjs.org/docs/api-reference/next/link#with-url-object\n */\n href: Url\n /**\n * Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://github.com/vercel/next.js/blob/v9.5.2/docs/api-reference/next/link.md#dynamic-routes).\n */\n as?: Url\n /**\n * Replace the current `history` state instead of adding a new url into the stack.\n *\n * @defaultValue `false`\n */\n replace?: boolean\n /**\n * Whether to override the default scroll behavior\n *\n * @example https://nextjs.org/docs/api-reference/next/link#disable-scrolling-to-the-top-of-the-page\n *\n * @defaultValue `true`\n */\n scroll?: boolean\n /**\n * Update the path of the current page without rerunning [`getStaticProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-static-props), [`getServerSideProps`](https://nextjs.org/docs/pages/building-your-application/data-fetching/get-server-side-props) or [`getInitialProps`](/docs/pages/api-reference/functions/get-initial-props).\n *\n * @defaultValue `false`\n */\n shallow?: boolean\n /**\n * Forces `Link` to send the `href` property to its child.\n *\n * @defaultValue `false`\n */\n passHref?: boolean\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`. Prefetching is only enabled in production.\n *\n * In App Router:\n * - `null` (default): For statically generated pages, this will prefetch the full React Server Component data. For dynamic pages, this will prefetch up to the nearest route segment with a [`loading.js`](https://nextjs.org/docs/app/api-reference/file-conventions/loading) file. If there is no loading file, it will not fetch the full tree to avoid fetching too much data.\n * - `true`: This will prefetch the full React Server Component data for all route segments, regardless of whether they contain a segment with `loading.js`.\n * - `false`: This will not prefetch any data, even on hover.\n *\n * In Pages Router:\n * - `true` (default): The full route & its data will be prefetched.\n * - `false`: Prefetching will not happen when entering the viewport, but will still happen on hover.\n * @defaultValue `true` (pages router) or `null` (app router)\n */\n prefetch?: boolean | null\n /**\n * The active locale is automatically prepended. `locale` allows for providing a different locale.\n * When `false` `href` has to include the locale as the default behavior is disabled.\n * Note: This is only available in the Pages Router.\n */\n locale?: string | false\n /**\n * Enable legacy link behavior.\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n /**\n * Optional event handler for when the mouse pointer is moved onto Link\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when the webpack plugin runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<InternalLinkProps>\n\nconst prefetched = new Set<string>()\n\ntype PrefetchOptions = RouterPrefetchOptions & {\n /**\n * bypassPrefetchedCheck will bypass the check to see if the `href` has\n * already been fetched.\n */\n bypassPrefetchedCheck?: boolean\n}\n\nfunction prefetch(\n router: NextRouter,\n href: string,\n as: string,\n options: PrefetchOptions\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n if (!isLocalURL(href)) {\n return\n }\n\n // We should only dedupe requests when experimental.optimisticClientCache is\n // disabled.\n if (!options.bypassPrefetchedCheck) {\n const locale =\n // Let the link's locale prop override the default router locale.\n typeof options.locale !== 'undefined'\n ? options.locale\n : // Otherwise fallback to the router's locale.\n 'locale' in router\n ? router.locale\n : undefined\n\n const prefetchedKey = href + '%' + as + '%' + locale\n\n // If we've already fetched the key, then don't prefetch it again!\n if (prefetched.has(prefetchedKey)) {\n return\n }\n\n // Mark this URL as prefetched.\n prefetched.add(prefetchedKey)\n }\n\n // Prefetch the JSON page if asked (only in the client)\n // We need to handle a prefetch error here since we may be\n // loading with priority which can reject but we don't\n // want to force navigation since this is only a prefetch\n router.prefetch(href, as, options).catch((err) => {\n if (process.env.NODE_ENV !== 'production') {\n // rethrow to show invalid URL errors\n throw err\n }\n })\n}\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n router: NextRouter | AppRouterInstance,\n href: string,\n as: string,\n replace?: boolean,\n shallow?: boolean,\n scroll?: boolean,\n locale?: string | false\n): void {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n\n if (isAnchorNodeName && (isModifiedEvent(e) || !isLocalURL(href))) {\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n const navigate = () => {\n // If the router is an NextRouter instance it will have `beforePopState`\n const routerScroll = scroll ?? true\n if ('beforePopState' in router) {\n router[replace ? 'replace' : 'push'](href, as, {\n shallow,\n locale,\n scroll: routerScroll,\n })\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll,\n })\n }\n }\n\n navigate()\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof LinkProps> &\n LinkProps\n>\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation between routes.\n *\n * It is the primary way to navigate between routes in Next.js.\n *\n * Read more: [Next.js docs: `<Link>`](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef<HTMLAnchorElement, LinkPropsReal>(\n function LinkComponent(props, forwardedRef) {\n let children: React.ReactNode\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n locale,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(RouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n locale: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (key === 'locale') {\n if (props[key] && valType !== 'string') {\n throw createPropError({\n key,\n expected: '`string`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'prefetch' ||\n key === 'legacyBehavior'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const _: never = key\n }\n })\n }\n\n const { href, as } = React.useMemo(() => {\n if (!router) {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }\n\n const [resolvedHref, resolvedAs] = resolveHref(router, hrefProp, true)\n\n return {\n href: resolvedHref,\n as: asProp ? resolveHref(router, asProp) : resolvedAs || resolvedHref,\n }\n }, [router, hrefProp, asProp])\n\n const previousHref = React.useRef<string>(href)\n const previousAs = React.useRef<string>(as)\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n const [setIntersectionRef, isVisible, resetVisible] = useIntersection({\n rootMargin: '200px',\n })\n\n const setIntersectionWithResetRef = React.useCallback(\n (el: Element) => {\n // Before the link getting observed, check if visible state need to be reset\n if (previousAs.current !== as || previousHref.current !== href) {\n resetVisible()\n previousAs.current = as\n previousHref.current = href\n }\n\n setIntersectionRef(el)\n },\n [as, href, resetVisible, setIntersectionRef]\n )\n\n const setRef = useMergedRef(setIntersectionWithResetRef, childRef)\n\n // Prefetch the URL if we haven't already and it's visible.\n React.useEffect(() => {\n // in dev, we only prefetch on hover to avoid wasting resources as the prefetch will trigger compiling the page.\n if (process.env.NODE_ENV !== 'production') {\n return\n }\n\n if (!router) {\n return\n }\n\n // If we don't need to prefetch the URL, don't do prefetch.\n if (!isVisible || !prefetchEnabled) {\n return\n }\n\n // Prefetch the URL.\n prefetch(router, href, as, { locale })\n }, [as, href, isVisible, locale, prefetchEnabled, router?.locale, router])\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: setRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n\n if (e.defaultPrevented) {\n return\n }\n\n linkClicked(e, router, href, as, replace, shallow, scroll, locale)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n\n prefetch(router, href, as, {\n locale,\n priority: true,\n // @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}\n bypassPrefetchedCheck: true,\n })\n },\n }\n\n // If child is an <a> tag and doesn't have a href attribute, or if the 'passHref' property is\n // defined, we specify the current 'href', so that repetition is not needed by the user.\n // If the url is absolute, we can bypass the logic to prepend the domain and locale.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n const curLocale = typeof locale !== 'undefined' ? locale : router?.locale\n\n // we only render domain locales if we are currently on a domain locale\n // so that locale links are still visitable in development/preview envs\n const localeDomain =\n router?.isLocaleDomain &&\n getDomainLocale(as, curLocale, router?.locales, router?.domainLocales)\n\n childProps.href =\n localeDomain ||\n addBasePath(addLocale(as, curLocale, router?.defaultLocale))\n }\n\n return legacyBehavior ? (\n React.cloneElement(child, childProps)\n ) : (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n)\n\nexport default Link\n","import { useCallback, useEffect, useRef, useState } from 'react'\nimport {\n requestIdleCallback,\n cancelIdleCallback,\n} from './request-idle-callback'\n\ntype UseIntersectionObserverInit = Pick<\n IntersectionObserverInit,\n 'rootMargin' | 'root'\n>\n\ntype UseIntersection = { disabled?: boolean } & UseIntersectionObserverInit & {\n rootRef?: React.RefObject<HTMLElement | null> | null\n }\ntype ObserveCallback = (isVisible: boolean) => void\ntype Identifier = {\n root: Element | Document | null\n margin: string\n}\ntype Observer = {\n id: Identifier\n observer: IntersectionObserver\n elements: Map<Element, ObserveCallback>\n}\n\nconst hasIntersectionObserver = typeof IntersectionObserver === 'function'\n\nconst observers = new Map<Identifier, Observer>()\nconst idList: Identifier[] = []\n\nfunction createObserver(options: UseIntersectionObserverInit): Observer {\n const id = {\n root: options.root || null,\n margin: options.rootMargin || '',\n }\n const existing = idList.find(\n (obj) => obj.root === id.root && obj.margin === id.margin\n )\n let instance: Observer | undefined\n\n if (existing) {\n instance = observers.get(existing)\n if (instance) {\n return instance\n }\n }\n\n const elements = new Map<Element, ObserveCallback>()\n const observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n const callback = elements.get(entry.target)\n const isVisible = entry.isIntersecting || entry.intersectionRatio > 0\n if (callback && isVisible) {\n callback(isVisible)\n }\n })\n }, options)\n instance = {\n id,\n observer,\n elements,\n }\n\n idList.push(id)\n observers.set(id, instance)\n return instance\n}\n\nfunction observe(\n element: Element,\n callback: ObserveCallback,\n options: UseIntersectionObserverInit\n): () => void {\n const { id, observer, elements } = createObserver(options)\n elements.set(element, callback)\n\n observer.observe(element)\n return function unobserve(): void {\n elements.delete(element)\n observer.unobserve(element)\n\n // Destroy observer when there's nothing left to watch:\n if (elements.size === 0) {\n observer.disconnect()\n observers.delete(id)\n const index = idList.findIndex(\n (obj) => obj.root === id.root && obj.margin === id.margin\n )\n if (index > -1) {\n idList.splice(index, 1)\n }\n }\n }\n}\n\nexport function useIntersection<T extends Element>({\n rootRef,\n rootMargin,\n disabled,\n}: UseIntersection): [(element: T | null) => void, boolean, () => void] {\n const isDisabled: boolean = disabled || !hasIntersectionObserver\n\n const [visible, setVisible] = useState(false)\n const elementRef = useRef<T | null>(null)\n const setElement = useCallback((element: T | null) => {\n elementRef.current = element\n }, [])\n\n useEffect(() => {\n if (hasIntersectionObserver) {\n if (isDisabled || visible) return\n\n const element = elementRef.current\n if (element && element.tagName) {\n const unobserve = observe(\n element,\n (isVisible) => isVisible && setVisible(isVisible),\n { root: rootRef?.current, rootMargin }\n )\n\n return unobserve\n }\n } else {\n if (!visible) {\n const idleCallback = requestIdleCallback(() => setVisible(true))\n return () => cancelIdleCallback(idleCallback)\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isDisabled, rootMargin, rootRef, visible, elementRef.current])\n\n const resetVisible = useCallback(() => {\n setVisible(false)\n }, [])\n\n return [setElement, visible, resetVisible]\n}\n","import { useMemo, useRef, type Ref } from 'react'\n\n// This is a compatibility hook to support React 18 and 19 refs.\n// In 19, a cleanup function from refs may be returned.\n// In 18, returning a cleanup function creates a warning.\n// Since we take userspace refs, we don't know ahead of time if a cleanup function will be returned.\n// This implements cleanup functions with the old behavior in 18.\n// We know refs are always called alternating with `null` and then `T`.\n// So a call with `null` means we need to call the previous cleanup functions.\nexport function useMergedRef<TElement>(\n refA: Ref<TElement>,\n refB: Ref<TElement>\n): Ref<TElement> {\n const cleanupA = useRef<() => void>(() => {})\n const cleanupB = useRef<() => void>(() => {})\n\n return useMemo(() => {\n if (!refA || !refB) {\n return refA || refB\n }\n\n return (current: TElement | null): void => {\n if (current === null) {\n cleanupA.current()\n cleanupB.current()\n } else {\n cleanupA.current = applyRef(refA, current)\n cleanupB.current = applyRef(refB, current)\n }\n }\n }, [refA, refB])\n}\n\nfunction applyRef<TElement>(\n refA: NonNullable<Ref<TElement>>,\n current: TElement\n) {\n if (typeof refA === 'function') {\n const cleanup = refA(current)\n if (typeof cleanup === 'function') {\n return cleanup\n } else {\n return () => refA(null)\n }\n } else {\n refA.current = current\n return () => {\n refA.current = null\n }\n }\n}\n","import { warnOnce } from './utils/warn-once'\nimport { getImageBlurSvg } from './image-blur-svg'\nimport { imageConfigDefault } from './image-config'\nimport type {\n ImageConfigComplete,\n ImageLoaderProps,\n ImageLoaderPropsWithConfig,\n} from './image-config'\n\nimport type { JSX } from 'react'\n\nexport interface StaticImageData {\n src: string\n height: number\n width: number\n blurDataURL?: string\n blurWidth?: number\n blurHeight?: number\n}\n\nexport interface StaticRequire {\n default: StaticImageData\n}\n\nexport type StaticImport = StaticRequire | StaticImageData\n\nexport type ImageProps = Omit<\n JSX.IntrinsicElements['img'],\n 'src' | 'srcSet' | 'ref' | 'alt' | 'width' | 'height' | 'loading'\n> & {\n src: string | StaticImport\n alt: string\n width?: number | `${number}`\n height?: number | `${number}`\n fill?: boolean\n loader?: ImageLoader\n quality?: number | `${number}`\n priority?: boolean\n loading?: LoadingValue\n placeholder?: PlaceholderValue\n blurDataURL?: string\n unoptimized?: boolean\n overrideSrc?: string\n /**\n * @deprecated Use `onLoad` instead.\n * @see https://nextjs.org/docs/app/api-reference/components/image#onload\n */\n onLoadingComplete?: OnLoadingComplete\n /**\n * @deprecated Use `fill` prop instead of `layout=\"fill\"` or change import to `next/legacy/image`.\n * @see https://nextjs.org/docs/api-reference/next/legacy/image\n */\n layout?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectFit?: string\n /**\n * @deprecated Use `style` prop instead.\n */\n objectPosition?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyBoundary?: string\n /**\n * @deprecated This prop does not do anything.\n */\n lazyRoot?: string\n}\n\nexport type ImgProps = Omit<ImageProps, 'src' | 'loader'> & {\n loading: LoadingValue\n width: number | undefined\n height: number | undefined\n style: NonNullable<JSX.IntrinsicElements['img']['style']>\n sizes: string | undefined\n srcSet: string | undefined\n src: string\n}\n\nconst VALID_LOADING_VALUES = ['lazy', 'eager', undefined] as const\ntype LoadingValue = (typeof VALID_LOADING_VALUES)[number]\ntype ImageConfig = ImageConfigComplete & {\n allSizes: number[]\n output?: 'standalone' | 'export'\n}\n\nexport type ImageLoader = (p: ImageLoaderProps) => string\n\n// Do not export - this is an internal type only\n// because `next.config.js` is only meant for the\n// built-in loaders, not for a custom loader() prop.\ntype ImageLoaderWithConfig = (p: ImageLoaderPropsWithConfig) => string\n\nexport type PlaceholderValue = 'blur' | 'empty' | `data:image/${string}`\nexport type OnLoad = React.ReactEventHandler<HTMLImageElement> | undefined\nexport type OnLoadingComplete = (img: HTMLImageElement) => void\n\nfunction isStaticRequire(\n src: StaticRequire | StaticImageData\n): src is StaticRequire {\n return (src as StaticRequire).default !== undefined\n}\n\nfunction isStaticImageData(\n src: StaticRequire | StaticImageData\n): src is StaticImageData {\n return (src as StaticImageData).src !== undefined\n}\n\nfunction isStaticImport(src: string | StaticImport): src is StaticImport {\n return (\n !!src &&\n typeof src === 'object' &&\n (isStaticRequire(src as StaticImport) ||\n isStaticImageData(src as StaticImport))\n )\n}\n\nconst allImgs = new Map<\n string,\n { src: string; priority: boolean; placeholder: PlaceholderValue }\n>()\nlet perfObserver: PerformanceObserver | undefined\n\nfunction getInt(x: unknown): number | undefined {\n if (typeof x === 'undefined') {\n return x\n }\n if (typeof x === 'number') {\n return Number.isFinite(x) ? x : NaN\n }\n if (typeof x === 'string' && /^[0-9]+$/.test(x)) {\n return parseInt(x, 10)\n }\n return NaN\n}\n\nfunction getWidths(\n { deviceSizes, allSizes }: ImageConfig,\n width: number | undefined,\n sizes: string | undefined\n): { widths: number[]; kind: 'w' | 'x' } {\n if (sizes) {\n // Find all the \"vw\" percent sizes used in the sizes prop\n const viewportWidthRe = /(^|\\s)(1?\\d?\\d)vw/g\n const percentSizes = []\n for (let match; (match = viewportWidthRe.exec(sizes)); match) {\n percentSizes.push(parseInt(match[2]))\n }\n if (percentSizes.length) {\n const smallestRatio = Math.min(...percentSizes) * 0.01\n return {\n widths: allSizes.filter((s) => s >= deviceSizes[0] * smallestRatio),\n kind: 'w',\n }\n }\n return { widths: allSizes, kind: 'w' }\n }\n if (typeof width !== 'number') {\n return { widths: deviceSizes, kind: 'w' }\n }\n\n const widths = [\n ...new Set(\n // > This means that most OLED screens that say they are 3x resolution,\n // > are actually 3x in the green color, but only 1.5x in the red and\n // > blue colors. Showing a 3x resolution image in the app vs a 2x\n // > resolution image will be visually the same, though the 3x image\n // > takes significantly more data. Even true 3x resolution screens are\n // > wasteful as the human eye cannot see that level of detail without\n // > something like a magnifying glass.\n // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html\n [width, width * 2 /*, width * 3*/].map(\n (w) => allSizes.find((p) => p >= w) || allSizes[allSizes.length - 1]\n )\n ),\n ]\n return { widths, kind: 'x' }\n}\n\ntype GenImgAttrsData = {\n config: ImageConfig\n src: string\n unoptimized: boolean\n loader: ImageLoaderWithConfig\n width?: number\n quality?: number\n sizes?: string\n}\n\ntype GenImgAttrsResult = {\n src: string\n srcSet: string | undefined\n sizes: string | undefined\n}\n\nfunction generateImgAttrs({\n config,\n src,\n unoptimized,\n width,\n quality,\n sizes,\n loader,\n}: GenImgAttrsData): GenImgAttrsResult {\n if (unoptimized) {\n return { src, srcSet: undefined, sizes: undefined }\n }\n\n const { widths, kind } = getWidths(config, width, sizes)\n const last = widths.length - 1\n\n return {\n sizes: !sizes && kind === 'w' ? '100vw' : sizes,\n srcSet: widths\n .map(\n (w, i) =>\n `${loader({ config, src, quality, width: w })} ${\n kind === 'w' ? w : i + 1\n }${kind}`\n )\n .join(', '),\n\n // It's intended to keep `src` the last attribute because React updates\n // attributes in order. If we keep `src` the first one, Safari will\n // immediately start to fetch `src`, before `sizes` and `srcSet` are even\n // updated by React. That causes multiple unnecessary requests if `srcSet`\n // and `sizes` are defined.\n // This bug cannot be reproduced in Chrome or Firefox.\n src: loader({ config, src, quality, width: widths[last] }),\n }\n}\n\n/**\n * A shared function, used on both client and server, to generate the props for <img>.\n */\nexport function getImgProps(\n {\n src,\n sizes,\n unoptimized = false,\n priority = false,\n loading,\n className,\n quality,\n width,\n height,\n fill = false,\n style,\n overrideSrc,\n onLoad,\n onLoadingComplete,\n placeholder = 'empty',\n blurDataURL,\n fetchPriority,\n decoding = 'async',\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n ...rest\n }: ImageProps,\n _state: {\n defaultLoader: ImageLoaderWithConfig\n imgConf: ImageConfigComplete\n showAltText?: boolean\n blurComplete?: boolean\n }\n): {\n props: ImgProps\n meta: {\n unoptimized: boolean\n priority: boolean\n placeholder: NonNullable<ImageProps['placeholder']>\n fill: boolean\n }\n} {\n const { imgConf, showAltText, blurComplete, defaultLoader } = _state\n let config: ImageConfig\n let c = imgConf || imageConfigDefault\n if ('allSizes' in c) {\n config = c as ImageConfig\n } else {\n const allSizes = [...c.deviceSizes, ...c.imageSizes].sort((a, b) => a - b)\n const deviceSizes = c.deviceSizes.sort((a, b) => a - b)\n config = { ...c, allSizes, deviceSizes }\n }\n\n if (typeof defaultLoader === 'undefined') {\n throw new Error(\n 'images.loaderFile detected but the file is missing default export.\\nRead more: https://nextjs.org/docs/messages/invalid-images-config'\n )\n }\n let loader: ImageLoaderWithConfig = rest.loader || defaultLoader\n\n // Remove property so it's not spread on <img> element\n delete rest.loader\n delete (rest as any).srcSet\n\n // This special value indicates that the user\n // didn't define a \"loader\" prop or \"loader\" config.\n const isDefaultLoader = '__next_img_default' in loader\n\n if (isDefaultLoader) {\n if (config.loader === 'custom') {\n throw new Error(\n `Image with src \"${src}\" is missing \"loader\" prop.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader`\n )\n }\n } else {\n // The user defined a \"loader\" prop or config.\n // Since the config object is internal only, we\n // must not pass it to the user-defined \"loader\".\n const customImageLoader = loader as ImageLoader\n loader = (obj) => {\n const { config: _, ...opts } = obj\n return customImageLoader(opts)\n }\n }\n\n if (layout) {\n if (layout === 'fill') {\n fill = true\n }\n const layoutToStyle: Record<string, Record<string, string> | undefined> = {\n intrinsic: { maxWidth: '100%', height: 'auto' },\n responsive: { width: '100%', height: 'auto' },\n }\n const layoutToSizes: Record<string, string | undefined> = {\n responsive: '100vw',\n fill: '100vw',\n }\n const layoutStyle = layoutToStyle[layout]\n if (layoutStyle) {\n style = { ...style, ...layoutStyle }\n }\n const layoutSizes = layoutToSizes[layout]\n if (layoutSizes && !sizes) {\n sizes = layoutSizes\n }\n }\n\n let staticSrc = ''\n let widthInt = getInt(width)\n let heightInt = getInt(height)\n let blurWidth: number | undefined\n let blurHeight: number | undefined\n if (isStaticImport(src)) {\n const staticImageData = isStaticRequire(src) ? src.default : src\n\n if (!staticImageData.src) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n if (!staticImageData.height || !staticImageData.width) {\n throw new Error(\n `An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(\n staticImageData\n )}`\n )\n }\n\n blurWidth = staticImageData.blurWidth\n blurHeight = staticImageData.blurHeight\n blurDataURL = blurDataURL || staticImageData.blurDataURL\n staticSrc = staticImageData.src\n\n if (!fill) {\n if (!widthInt && !heightInt) {\n widthInt = staticImageData.width\n heightInt = staticImageData.height\n } else if (widthInt && !heightInt) {\n const ratio = widthInt / staticImageData.width\n heightInt = Math.round(staticImageData.height * ratio)\n } else if (!widthInt && heightInt) {\n const ratio = heightInt / staticImageData.height\n widthInt = Math.round(staticImageData.width * ratio)\n }\n }\n }\n src = typeof src === 'string' ? src : staticSrc\n\n let isLazy =\n !priority && (loading === 'lazy' || typeof loading === 'undefined')\n if (!src || src.startsWith('data:') || src.startsWith('blob:')) {\n // https://developer.mozilla.org/docs/Web/HTTP/Basics_of_HTTP/Data_URIs\n unoptimized = true\n isLazy = false\n }\n if (config.unoptimized) {\n unoptimized = true\n }\n if (\n isDefaultLoader &&\n !config.dangerouslyAllowSVG &&\n src.split('?', 1)[0].endsWith('.svg')\n ) {\n // Special case to make svg serve as-is to avoid proxying\n // through the built-in Image Optimization API.\n unoptimized = true\n }\n\n const qualityInt = getInt(quality)\n\n if (process.env.NODE_ENV !== 'production') {\n if (config.output === 'export' && isDefaultLoader && !unoptimized) {\n throw new Error(\n `Image Optimization using the default loader is not compatible with \\`{ output: 'export' }\\`.\n Possible solutions:\n - Remove \\`{ output: 'export' }\\` and run \"next start\" to run server mode including the Image Optimization API.\n - Configure \\`{ images: { unoptimized: true } }\\` in \\`next.config.js\\` to disable the Image Optimization API.\n Read more: https://nextjs.org/docs/messages/export-image-api`\n )\n }\n if (!src) {\n // React doesn't show the stack trace and there's\n // no `src` to help identify which image, so we\n // instead console.error(ref) during mount.\n unoptimized = true\n } else {\n if (fill) {\n if (width) {\n throw new Error(\n `Image with src \"${src}\" has both \"width\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (height) {\n throw new Error(\n `Image with src \"${src}\" has both \"height\" and \"fill\" properties. Only one should be used.`\n )\n }\n if (style?.position && style.position !== 'absolute') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.position\" properties. Images with \"fill\" always use position absolute - it cannot be modified.`\n )\n }\n if (style?.width && style.width !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.width\" properties. Images with \"fill\" always use width 100% - it cannot be modified.`\n )\n }\n if (style?.height && style.height !== '100%') {\n throw new Error(\n `Image with src \"${src}\" has both \"fill\" and \"style.height\" properties. Images with \"fill\" always use height 100% - it cannot be modified.`\n )\n }\n } else {\n if (typeof widthInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"width\" property.`\n )\n } else if (isNaN(widthInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"width\" property. Expected a numeric value in pixels but received \"${width}\".`\n )\n }\n if (typeof heightInt === 'undefined') {\n throw new Error(\n `Image with src \"${src}\" is missing required \"height\" property.`\n )\n } else if (isNaN(heightInt)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"height\" property. Expected a numeric value in pixels but received \"${height}\".`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/^[\\x00-\\x20]/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot start with a space or control character. Use src.trimStart() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n // eslint-disable-next-line no-control-regex\n if (/[\\x00-\\x20]$/.test(src)) {\n throw new Error(\n `Image with src \"${src}\" cannot end with a space or control character. Use src.trimEnd() to remove it or encodeURIComponent(src) to keep it.`\n )\n }\n }\n }\n if (!VALID_LOADING_VALUES.includes(loading)) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"loading\" property. Provided \"${loading}\" should be one of ${VALID_LOADING_VALUES.map(\n String\n ).join(',')}.`\n )\n }\n if (priority && loading === 'lazy') {\n throw new Error(\n `Image with src \"${src}\" has both \"priority\" and \"loading='lazy'\" properties. Only one should be used.`\n )\n }\n if (\n placeholder !== 'empty' &&\n placeholder !== 'blur' &&\n !placeholder.startsWith('data:image/')\n ) {\n throw new Error(\n `Image with src \"${src}\" has invalid \"placeholder\" property \"${placeholder}\".`\n )\n }\n if (placeholder !== 'empty') {\n if (widthInt && heightInt && widthInt * heightInt < 1600) {\n warnOnce(\n `Image with src \"${src}\" is smaller than 40x40. Consider removing the \"placeholder\" property to improve performance.`\n )\n }\n }\n if (placeholder === 'blur' && !blurDataURL) {\n const VALID_BLUR_EXT = ['jpeg', 'png', 'webp', 'avif'] // should match next-image-loader\n\n throw new Error(\n `Image with src \"${src}\" has \"placeholder='blur'\" property but is missing the \"blurDataURL\" property.\n Possible solutions:\n - Add a \"blurDataURL\" property, the contents should be a small Data URL to represent the image\n - Change the \"src\" property to a static import with one of the supported file types: ${VALID_BLUR_EXT.join(\n ','\n )} (animated images not supported)\n - Remove the \"placeholder\" property, effectively no blur effect\n Read more: https://nextjs.org/docs/messages/placeholder-blur-data-url`\n )\n }\n if ('ref' in rest) {\n warnOnce(\n `Image with src \"${src}\" is using unsupported \"ref\" property. Consider using the \"onLoad\" property instead.`\n )\n }\n\n if (!unoptimized && !isDefaultLoader) {\n const urlStr = loader({\n config,\n src,\n width: widthInt || 400,\n quality: qualityInt || 75,\n })\n let url: URL | undefined\n try {\n url = new URL(urlStr)\n } catch (err) {}\n if (urlStr === src || (url && url.pathname === src && !url.search)) {\n warnOnce(\n `Image with src \"${src}\" has a \"loader\" property that does not implement width. Please implement it or use the \"unoptimized\" property instead.` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader-width`\n )\n }\n }\n\n if (onLoadingComplete) {\n warnOnce(\n `Image with src \"${src}\" is using deprecated \"onLoadingComplete\" property. Please use the \"onLoad\" property instead.`\n )\n }\n\n for (const [legacyKey, legacyValue] of Object.entries({\n layout,\n objectFit,\n objectPosition,\n lazyBoundary,\n lazyRoot,\n })) {\n if (legacyValue) {\n warnOnce(\n `Image with src \"${src}\" has legacy prop \"${legacyKey}\". Did you forget to run the codemod?` +\n `\\nRead more: https://nextjs.org/docs/messages/next-image-upgrade-to-13`\n )\n }\n }\n\n if (\n typeof window !== 'undefined' &&\n !perfObserver &&\n window.PerformanceObserver\n ) {\n perfObserver = new PerformanceObserver((entryList) => {\n for (const entry of entryList.getEntries()) {\n // @ts-ignore - missing \"LargestContentfulPaint\" class with \"element\" prop\n const imgSrc = entry?.element?.src || ''\n const lcpImage = allImgs.get(imgSrc)\n if (\n lcpImage &&\n !lcpImage.priority &&\n lcpImage.placeholder === 'empty' &&\n !lcpImage.src.startsWith('data:') &&\n !lcpImage.src.startsWith('blob:')\n ) {\n // https://web.dev/lcp/#measure-lcp-in-javascript\n warnOnce(\n `Image with src \"${lcpImage.src}\" was detected as the Largest Contentful Paint (LCP). Please add the \"priority\" property if this image is above the fold.` +\n `\\nRead more: https://nextjs.org/docs/api-reference/next/image#priority`\n )\n }\n }\n })\n try {\n perfObserver.observe({\n type: 'largest-contentful-paint',\n buffered: true,\n })\n } catch (err) {\n // Log error but don't crash the app\n console.error(err)\n }\n }\n }\n const imgStyle = Object.assign(\n fill\n ? {\n position: 'absolute',\n height: '100%',\n width: '100%',\n left: 0,\n top: 0,\n right: 0,\n bottom: 0,\n objectFit,\n objectPosition,\n }\n : {},\n showAltText ? {} : { color: 'transparent' },\n style\n )\n\n const backgroundImage =\n !blurComplete && placeholder !== 'empty'\n ? placeholder === 'blur'\n ? `url(\"data:image/svg+xml;charset=utf-8,${getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL: blurDataURL || '', // assume not undefined\n objectFit: imgStyle.objectFit,\n })}\")`\n : `url(\"${placeholder}\")` // assume `data:image/`\n : null\n\n let placeholderStyle = backgroundImage\n ? {\n backgroundSize: imgStyle.objectFit || 'cover',\n backgroundPosition: imgStyle.objectPosition || '50% 50%',\n backgroundRepeat: 'no-repeat',\n backgroundImage,\n }\n : {}\n\n if (process.env.NODE_ENV === 'development') {\n if (\n placeholderStyle.backgroundImage &&\n placeholder === 'blur' &&\n blurDataURL?.startsWith('/')\n ) {\n // During `next dev`, we don't want to generate blur placeholders with webpack\n // because it can delay starting the dev server. Instead, `next-image-loader.js`\n // will inline a special url to lazily generate the blur placeholder at request time.\n placeholderStyle.backgroundImage = `url(\"${blurDataURL}\")`\n }\n }\n\n const imgAttributes = generateImgAttrs({\n config,\n src,\n unoptimized,\n width: widthInt,\n quality: qualityInt,\n sizes,\n loader,\n })\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined') {\n let fullUrl: URL\n try {\n fullUrl = new URL(imgAttributes.src)\n } catch (e) {\n fullUrl = new URL(imgAttributes.src, window.location.href)\n }\n allImgs.set(fullUrl.href, { src, priority, placeholder })\n }\n }\n\n const props: ImgProps = {\n ...rest,\n loading: isLazy ? 'lazy' : loading,\n fetchPriority,\n width: widthInt,\n height: heightInt,\n decoding,\n className,\n style: { ...imgStyle, ...placeholderStyle },\n sizes: imgAttributes.sizes,\n srcSet: imgAttributes.srcSet,\n src: overrideSrc || imgAttributes.src,\n }\n const meta = { unoptimized, priority, placeholder, fill }\n return { props, meta }\n}\n","/**\n * A shared function, used on both client and server, to generate a SVG blur placeholder.\n */\nexport function getImageBlurSvg({\n widthInt,\n heightInt,\n blurWidth,\n blurHeight,\n blurDataURL,\n objectFit,\n}: {\n widthInt?: number\n heightInt?: number\n blurWidth?: number\n blurHeight?: number\n blurDataURL: string\n objectFit?: string\n}): string {\n const std = 20\n const svgWidth = blurWidth ? blurWidth * 40 : widthInt\n const svgHeight = blurHeight ? blurHeight * 40 : heightInt\n\n const viewBox =\n svgWidth && svgHeight ? `viewBox='0 0 ${svgWidth} ${svgHeight}'` : ''\n const preserveAspectRatio = viewBox\n ? 'none'\n : objectFit === 'contain'\n ? 'xMidYMid'\n : objectFit === 'cover'\n ? 'xMidYMid slice'\n : 'none'\n\n return `%3Csvg xmlns='http://www.w3.org/2000/svg' ${viewBox}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='${std}'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${preserveAspectRatio}' style='filter: url(%23b);' href='${blurDataURL}'/%3E%3C/svg%3E`\n}\n","import type { ImageConfigComplete, ImageLoaderProps } from './image-config'\nimport type { ImageProps, ImageLoader, StaticImageData } from './get-img-props'\n\nimport { getImgProps } from './get-img-props'\nimport { Image } from '../../client/image-component'\n\n// @ts-ignore - This is replaced by webpack alias\nimport defaultLoader from 'next/dist/shared/lib/image-loader'\n\n/**\n * For more advanced use cases, you can call `getImageProps()`\n * to get the props that would be passed to the underlying `<img>` element,\n * and instead pass to them to another component, style, canvas, etc.\n *\n * Read more: [Next.js docs: `getImageProps`](https://nextjs.org/docs/app/api-reference/components/image#getimageprops)\n */\nexport function getImageProps(imgProps: ImageProps) {\n const { props } = getImgProps(imgProps, {\n defaultLoader,\n // This is replaced by webpack define plugin\n imgConf: process.env.__NEXT_IMAGE_OPTS as any as ImageConfigComplete,\n })\n // Normally we don't care about undefined props because we pass to JSX,\n // but this exported function could be used by the end user for anything\n // so we delete undefined props to clean it up a little.\n for (const [key, value] of Object.entries(props)) {\n if (value === undefined) {\n delete props[key as keyof typeof props]\n }\n }\n return { props }\n}\n\nexport default Image\n\nexport type { ImageProps, ImageLoaderProps, ImageLoader, StaticImageData }\n","import type { ImageLoaderPropsWithConfig } from './image-config'\n\nfunction defaultLoader({\n config,\n src,\n width,\n quality,\n}: ImageLoaderPropsWithConfig): string {\n if (process.env.NODE_ENV !== 'production') {\n const missingValues = []\n\n // these should always be provided but make sure they are\n if (!src) missingValues.push('src')\n if (!width) missingValues.push('width')\n\n if (missingValues.length > 0) {\n throw new Error(\n `Next Image Optimization requires ${missingValues.join(\n ', '\n )} to be provided. Make sure you pass them as props to the \\`next/image\\` component. Received: ${JSON.stringify(\n { src, width, quality }\n )}`\n )\n }\n\n if (src.startsWith('//')) {\n throw new Error(\n `Failed to parse src \"${src}\" on \\`next/image\\`, protocol-relative URL (//) must be changed to an absolute URL (http:// or https://)`\n )\n }\n\n if (src.startsWith('/') && config.localPatterns) {\n if (\n process.env.NODE_ENV !== 'test' &&\n // micromatch isn't compatible with edge runtime\n process.env.NEXT_RUNTIME !== 'edge'\n ) {\n // We use dynamic require because this should only error in development\n const { hasLocalMatch } = require('./match-local-pattern')\n if (!hasLocalMatch(config.localPatterns, src)) {\n throw new Error(\n `Invalid src prop (${src}) on \\`next/image\\` does not match \\`images.localPatterns\\` configured in your \\`next.config.js\\`\\n` +\n `See more info: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`\n )\n }\n }\n }\n\n if (!src.startsWith('/') && (config.domains || config.remotePatterns)) {\n let parsedSrc: URL\n try {\n parsedSrc = new URL(src)\n } catch (err) {\n console.error(err)\n throw new Error(\n `Failed to parse src \"${src}\" on \\`next/image\\`, if using relative image it must start with a leading slash \"/\" or be an absolute URL (http:// or https://)`\n )\n }\n\n if (\n process.env.NODE_ENV !== 'test' &&\n // micromatch isn't compatible with edge runtime\n process.env.NEXT_RUNTIME !== 'edge'\n ) {\n // We use dynamic require because this should only error in development\n const { hasRemoteMatch } = require('./match-remote-pattern')\n if (!hasRemoteMatch(config.domains, config.remotePatterns, parsedSrc)) {\n throw new Error(\n `Invalid src prop (${src}) on \\`next/image\\`, hostname \"${parsedSrc.hostname}\" is not configured under images in your \\`next.config.js\\`\\n` +\n `See more info: https://nextjs.org/docs/messages/next-image-unconfigured-host`\n )\n }\n }\n }\n }\n\n return `${config.path}?url=${encodeURIComponent(src)}&w=${width}&q=${\n quality || 75\n }${\n src.startsWith('/_next/static/media/') && process.env.NEXT_DEPLOYMENT_ID\n ? `&dpl=${process.env.NEXT_DEPLOYMENT_ID}`\n : ''\n }`\n}\n\n// We use this to determine if the import is the default loader\n// or a custom loader defined by the user in next.config.js\ndefaultLoader.__next_img_default = true\n\nexport default defaultLoader\n","require('client-only');\nvar React = require('react');\n\nfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\nvar React__default = /*#__PURE__*/_interopDefaultLegacy(React);\n\n/*\nBased on Glamor's sheet\nhttps://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js\n*/ function _defineProperties(target, props) {\n for(var i = 0; i < props.length; i++){\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\nvar isProd = typeof process !== \"undefined\" && process.env && process.env.NODE_ENV === \"production\";\nvar isString = function(o) {\n return Object.prototype.toString.call(o) === \"[object String]\";\n};\nvar StyleSheet = /*#__PURE__*/ function() {\n function StyleSheet(param) {\n var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? \"stylesheet\" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;\n invariant$1(isString(name), \"`name` must be a string\");\n this._name = name;\n this._deletedRulePlaceholder = \"#\" + name + \"-deleted-rule____{}\";\n invariant$1(typeof optimizeForSpeed === \"boolean\", \"`optimizeForSpeed` must be a boolean\");\n this._optimizeForSpeed = optimizeForSpeed;\n this._serverSheet = undefined;\n this._tags = [];\n this._injected = false;\n this._rulesCount = 0;\n var node = typeof window !== \"undefined\" && document.querySelector('meta[property=\"csp-nonce\"]');\n this._nonce = node ? node.getAttribute(\"content\") : null;\n }\n var _proto = StyleSheet.prototype;\n _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {\n invariant$1(typeof bool === \"boolean\", \"`setOptimizeForSpeed` accepts a boolean\");\n invariant$1(this._rulesCount === 0, \"optimizeForSpeed cannot be when rules have already been inserted\");\n this.flush();\n this._optimizeForSpeed = bool;\n this.inject();\n };\n _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {\n return this._optimizeForSpeed;\n };\n _proto.inject = function inject() {\n var _this = this;\n invariant$1(!this._injected, \"sheet already injected\");\n this._injected = true;\n if (typeof window !== \"undefined\" && this._optimizeForSpeed) {\n this._tags[0] = this.makeStyleTag(this._name);\n this._optimizeForSpeed = \"insertRule\" in this.getSheet();\n if (!this._optimizeForSpeed) {\n if (!isProd) {\n console.warn(\"StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.\");\n }\n this.flush();\n this._injected = true;\n }\n return;\n }\n this._serverSheet = {\n cssRules: [],\n insertRule: function(rule, index) {\n if (typeof index === \"number\") {\n _this._serverSheet.cssRules[index] = {\n cssText: rule\n };\n } else {\n _this._serverSheet.cssRules.push({\n cssText: rule\n });\n }\n return index;\n },\n deleteRule: function(index) {\n _this._serverSheet.cssRules[index] = null;\n }\n };\n };\n _proto.getSheetForTag = function getSheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n }\n // this weirdness brought to you by firefox\n for(var i = 0; i < document.styleSheets.length; i++){\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n }\n };\n _proto.getSheet = function getSheet() {\n return this.getSheetForTag(this._tags[this._tags.length - 1]);\n };\n _proto.insertRule = function insertRule(rule, index) {\n invariant$1(isString(rule), \"`insertRule` accepts only strings\");\n if (typeof window === \"undefined\") {\n if (typeof index !== \"number\") {\n index = this._serverSheet.cssRules.length;\n }\n this._serverSheet.insertRule(rule, index);\n return this._rulesCount++;\n }\n if (this._optimizeForSpeed) {\n var sheet = this.getSheet();\n if (typeof index !== \"number\") {\n index = sheet.cssRules.length;\n }\n // this weirdness for perf, and chrome's weird bug\n // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n return -1;\n }\n } else {\n var insertionPoint = this._tags[index];\n this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));\n }\n return this._rulesCount++;\n };\n _proto.replaceRule = function replaceRule(index, rule) {\n if (this._optimizeForSpeed || typeof window === \"undefined\") {\n var sheet = typeof window !== \"undefined\" ? this.getSheet() : this._serverSheet;\n if (!rule.trim()) {\n rule = this._deletedRulePlaceholder;\n }\n if (!sheet.cssRules[index]) {\n // @TBD Should we throw an error?\n return index;\n }\n sheet.deleteRule(index);\n try {\n sheet.insertRule(rule, index);\n } catch (error) {\n if (!isProd) {\n console.warn(\"StyleSheet: illegal rule: \\n\\n\" + rule + \"\\n\\nSee https://stackoverflow.com/q/20007992 for more info\");\n }\n // In order to preserve the indices we insert a deleteRulePlaceholder\n sheet.insertRule(this._deletedRulePlaceholder, index);\n }\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"old rule at index `\" + index + \"` not found\");\n tag.textContent = rule;\n }\n return index;\n };\n _proto.deleteRule = function deleteRule(index) {\n if (typeof window === \"undefined\") {\n this._serverSheet.deleteRule(index);\n return;\n }\n if (this._optimizeForSpeed) {\n this.replaceRule(index, \"\");\n } else {\n var tag = this._tags[index];\n invariant$1(tag, \"rule at index `\" + index + \"` not found\");\n tag.parentNode.removeChild(tag);\n this._tags[index] = null;\n }\n };\n _proto.flush = function flush() {\n this._injected = false;\n this._rulesCount = 0;\n if (typeof window !== \"undefined\") {\n this._tags.forEach(function(tag) {\n return tag && tag.parentNode.removeChild(tag);\n });\n this._tags = [];\n } else {\n // simpler on server\n this._serverSheet.cssRules = [];\n }\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n if (typeof window === \"undefined\") {\n return this._serverSheet.cssRules;\n }\n return this._tags.reduce(function(rules, tag) {\n if (tag) {\n rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {\n return rule.cssText === _this._deletedRulePlaceholder ? null : rule;\n }));\n } else {\n rules.push(null);\n }\n return rules;\n }, []);\n };\n _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {\n if (cssString) {\n invariant$1(isString(cssString), \"makeStyleTag accepts only strings as second parameter\");\n }\n var tag = document.createElement(\"style\");\n if (this._nonce) tag.setAttribute(\"nonce\", this._nonce);\n tag.type = \"text/css\";\n tag.setAttribute(\"data-\" + name, \"\");\n if (cssString) {\n tag.appendChild(document.createTextNode(cssString));\n }\n var head = document.head || document.getElementsByTagName(\"head\")[0];\n if (relativeToTag) {\n head.insertBefore(tag, relativeToTag);\n } else {\n head.appendChild(tag);\n }\n return tag;\n };\n _createClass(StyleSheet, [\n {\n key: \"length\",\n get: function get() {\n return this._rulesCount;\n }\n }\n ]);\n return StyleSheet;\n}();\nfunction invariant$1(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheet: \" + message + \".\");\n }\n}\n\nfunction hash(str) {\n var _$hash = 5381, i = str.length;\n while(i){\n _$hash = _$hash * 33 ^ str.charCodeAt(--i);\n }\n /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed\n * integers. Since we want the results to be always positive, convert the\n * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;\n}\nvar stringHash = hash;\n\nvar sanitize = function(rule) {\n return rule.replace(/\\/style/gi, \"\\\\/style\");\n};\nvar cache = {};\n/**\n * computeId\n *\n * Compute and memoize a jsx id from a basedId and optionally props.\n */ function computeId(baseId, props) {\n if (!props) {\n return \"jsx-\" + baseId;\n }\n var propsToString = String(props);\n var key = baseId + propsToString;\n if (!cache[key]) {\n cache[key] = \"jsx-\" + stringHash(baseId + \"-\" + propsToString);\n }\n return cache[key];\n}\n/**\n * computeSelector\n *\n * Compute and memoize dynamic selectors.\n */ function computeSelector(id, css) {\n var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;\n // Sanitize SSR-ed CSS.\n // Client side code doesn't need to be sanitized since we use\n // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).\n if (typeof window === \"undefined\") {\n css = sanitize(css);\n }\n var idcss = id + css;\n if (!cache[idcss]) {\n cache[idcss] = css.replace(selectoPlaceholderRegexp, id);\n }\n return cache[idcss];\n}\n\nfunction mapRulesToStyle(cssRules, options) {\n if (options === void 0) options = {};\n return cssRules.map(function(args) {\n var id = args[0];\n var css = args[1];\n return /*#__PURE__*/ React__default[\"default\"].createElement(\"style\", {\n id: \"__\" + id,\n // Avoid warnings upon render with a key\n key: \"__\" + id,\n nonce: options.nonce ? options.nonce : undefined,\n dangerouslySetInnerHTML: {\n __html: css\n }\n });\n });\n}\nvar StyleSheetRegistry = /*#__PURE__*/ function() {\n function StyleSheetRegistry(param) {\n var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;\n this._sheet = styleSheet || new StyleSheet({\n name: \"styled-jsx\",\n optimizeForSpeed: optimizeForSpeed\n });\n this._sheet.inject();\n if (styleSheet && typeof optimizeForSpeed === \"boolean\") {\n this._sheet.setOptimizeForSpeed(optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n }\n var _proto = StyleSheetRegistry.prototype;\n _proto.add = function add(props) {\n var _this = this;\n if (undefined === this._optimizeForSpeed) {\n this._optimizeForSpeed = Array.isArray(props.children);\n this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);\n this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();\n }\n if (typeof window !== \"undefined\" && !this._fromServer) {\n this._fromServer = this.selectFromServer();\n this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {\n acc[tagName] = 0;\n return acc;\n }, {});\n }\n var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;\n // Deduping: just increase the instances count.\n if (styleId in this._instancesCounts) {\n this._instancesCounts[styleId] += 1;\n return;\n }\n var indices = rules.map(function(rule) {\n return _this._sheet.insertRule(rule);\n })// Filter out invalid rules\n .filter(function(index) {\n return index !== -1;\n });\n this._indices[styleId] = indices;\n this._instancesCounts[styleId] = 1;\n };\n _proto.remove = function remove(props) {\n var _this = this;\n var styleId = this.getIdAndRules(props).styleId;\n invariant(styleId in this._instancesCounts, \"styleId: `\" + styleId + \"` not found\");\n this._instancesCounts[styleId] -= 1;\n if (this._instancesCounts[styleId] < 1) {\n var tagFromServer = this._fromServer && this._fromServer[styleId];\n if (tagFromServer) {\n tagFromServer.parentNode.removeChild(tagFromServer);\n delete this._fromServer[styleId];\n } else {\n this._indices[styleId].forEach(function(index) {\n return _this._sheet.deleteRule(index);\n });\n delete this._indices[styleId];\n }\n delete this._instancesCounts[styleId];\n }\n };\n _proto.update = function update(props, nextProps) {\n this.add(nextProps);\n this.remove(props);\n };\n _proto.flush = function flush() {\n this._sheet.flush();\n this._sheet.inject();\n this._fromServer = undefined;\n this._indices = {};\n this._instancesCounts = {};\n };\n _proto.cssRules = function cssRules() {\n var _this = this;\n var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {\n return [\n styleId,\n _this._fromServer[styleId]\n ];\n }) : [];\n var cssRules = this._sheet.cssRules();\n return fromServer.concat(Object.keys(this._indices).map(function(styleId) {\n return [\n styleId,\n _this._indices[styleId].map(function(index) {\n return cssRules[index].cssText;\n }).join(_this._optimizeForSpeed ? \"\" : \"\\n\")\n ];\n })// filter out empty rules\n .filter(function(rule) {\n return Boolean(rule[1]);\n }));\n };\n _proto.styles = function styles(options) {\n return mapRulesToStyle(this.cssRules(), options);\n };\n _proto.getIdAndRules = function getIdAndRules(props) {\n var css = props.children, dynamic = props.dynamic, id = props.id;\n if (dynamic) {\n var styleId = computeId(id, dynamic);\n return {\n styleId: styleId,\n rules: Array.isArray(css) ? css.map(function(rule) {\n return computeSelector(styleId, rule);\n }) : [\n computeSelector(styleId, css)\n ]\n };\n }\n return {\n styleId: computeId(id),\n rules: Array.isArray(css) ? css : [\n css\n ]\n };\n };\n /**\n * selectFromServer\n *\n * Collects style tags from the document with id __jsx-XXX\n */ _proto.selectFromServer = function selectFromServer() {\n var elements = Array.prototype.slice.call(document.querySelectorAll('[id^=\"__jsx-\"]'));\n return elements.reduce(function(acc, element) {\n var id = element.id.slice(2);\n acc[id] = element;\n return acc;\n }, {});\n };\n return StyleSheetRegistry;\n}();\nfunction invariant(condition, message) {\n if (!condition) {\n throw new Error(\"StyleSheetRegistry: \" + message + \".\");\n }\n}\nvar StyleSheetContext = /*#__PURE__*/ React.createContext(null);\nStyleSheetContext.displayName = \"StyleSheetContext\";\nfunction createStyleRegistry() {\n return new StyleSheetRegistry();\n}\nfunction StyleRegistry(param) {\n var configuredRegistry = param.registry, children = param.children;\n var rootRegistry = React.useContext(StyleSheetContext);\n var ref = React.useState(function() {\n return rootRegistry || configuredRegistry || createStyleRegistry();\n }), registry = ref[0];\n return /*#__PURE__*/ React__default[\"default\"].createElement(StyleSheetContext.Provider, {\n value: registry\n }, children);\n}\nfunction useStyleRegistry() {\n return React.useContext(StyleSheetContext);\n}\n\n// Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.\n// https://github.com/reactwg/react-18/discussions/110\nvar useInsertionEffect = React__default[\"default\"].useInsertionEffect || React__default[\"default\"].useLayoutEffect;\nvar defaultRegistry = typeof window !== \"undefined\" ? createStyleRegistry() : undefined;\nfunction JSXStyle(props) {\n var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();\n // If `registry` does not exist, we do nothing here.\n if (!registry) {\n return null;\n }\n if (typeof window === \"undefined\") {\n registry.add(props);\n return null;\n }\n useInsertionEffect(function() {\n registry.add(props);\n return function() {\n registry.remove(props);\n };\n // props.children can be string[], will be striped since id is identical\n }, [\n props.id,\n String(props.dynamic)\n ]);\n return null;\n}\nJSXStyle.dynamic = function(info) {\n return info.map(function(tagInfo) {\n var baseId = tagInfo[0];\n var props = tagInfo[1];\n return computeId(baseId, props);\n }).join(\" \");\n};\n\nexports.StyleRegistry = StyleRegistry;\nexports.createStyleRegistry = createStyleRegistry;\nexports.style = JSXStyle;\nexports.useStyleRegistry = useStyleRegistry;\n","module.exports = require('./dist/index').style\n","// import { useArrayInfo, useAuthUser, useDashboardModal } from '@hooks';\n// import BankIcon from '@icons/bank.svg';\n// import { AxiosError } from 'axios';\n// import { Button } from '@components/button';\n// import Script from 'next/script';\n// import { useEffect } from 'react';\n// import { useQuery } from 'react-query';\n// import { ApiService } from '@services/Api';\n// import { io } from 'socket.io-client';\n\n// declare global {\n// namespace JSX {\n// interface IntrinsicElements {\n// 'array-credit-alerts': React.DetailedHTMLProps<\n// React.HTMLAttributes<HTMLElement> & {\n// appKey: string;\n// userToken: string;\n// sandbox: string;\n// bureau: 'efx' | 'exp' | 'tui' | 'all';\n// },\n \n// HTMLElement\n// >;\n// }\n// }\n// }\n\n// export function ArrayCreditAlerts({\n// closeArrayAlerts,\n// bureau,\n// appKey,\n// userToken,\n// sandbox,\n// }: {\n// closeArrayAlerts: Function;\n// bureau: string;\n// appKey: string;\n// userToken: string;\n// sandbox: string;\n// }) {\n// const { appKey: key } = useArrayInfo();\n\n// const queryBoy = useQuery<\n// {\n// userId: string;\n// userToken: string;\n// },\n// {\n// data: AxiosError;\n// }\n// >(\n// ['user-token'],\n// async () => {\n// const resp = await ApiService.getBuyerCreditReportUserToken();\n// return resp.data;\n// },\n// {\n// refetchOnWindowFocus: false,\n// refetchOnMount: false,\n// retry: 0,\n// },\n// );\n\n// const { data: arrayUser, isError, error, status } = queryBoy;\n// const { setCurrentModal } = useDashboardModal();\n\n// return (\n// <>\n// <Script src={`https://embed.array.io/cms/array-web-component.js?appKey=${key}`} />\n// <Script src={`https://embed.array.io/cms/array-credit-alerts.js?appKey=${key}`} />\n// {isError || !!error?.data || status === 'error' ? (\n// <div className=\"flex flex-col items-center mt-5\">\n// <>\n// <div>You haven’t connected a credit report.</div>\n// <BankIcon className=\"text-[#D0CAE9] text-center my-12\" width={33} />\n// <div className=\"mb-6\">\n// <Button\n// variant=\"primary\"\n// onClick={() => {\n// closeArrayAlerts();\n// setCurrentModal('createCreditReportUser');\n// }}\n// >\n// Add Credit\n// </Button>\n// </div>\n// </>\n// </div>\n// ) : (\n// <>\n// {arrayUser?.userToken && (\n// <div>\n// <array-credit-alerts\n// bureau={bureau}\n// appKey={appKey}\n// userToken={arrayUser.userToken}\n// sandbox={sandbox}\n// />\n// </div>\n// )}\n// </>\n// )}\n// </>\n// );\n// };\n\nimport { useArrayInfo, useAuthUser, useDashboardModal } from '@hooks';\nimport { AxiosError } from 'axios';\nimport { Button } from '@components/button';\nimport Script from 'next/script';\nimport { useEffect } from 'react';\nimport { useQuery } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport { io } from 'socket.io-client';\nimport { useTranslation } from 'react-i18next';\n\ndeclare global {\n namespace JSX {\n interface IntrinsicElements {\n 'array-credit-alerts': React.DetailedHTMLProps<\n React.HTMLAttributes<HTMLElement> & {\n appKey: string;\n userToken: string;\n sandbox: string;\n bureau: 'efx' | 'exp' | 'tui' | 'all';\n },\n HTMLElement\n >;\n }\n }\n}\n\nexport function ArrayCreditAlerts({\n closeArrayAlerts,\n bureau,\n appKey,\n userToken,\n sandbox,\n}: {\n closeArrayAlerts?: Function;\n bureau?: string;\n appKey?: string;\n userToken?: string;\n sandbox?: string;\n}) {\n const { appKey: key } = useArrayInfo();\n const { t } = useTranslation();\n\n const queryBoy = useQuery<\n {\n userId: string;\n userToken: string;\n },\n {\n data: AxiosError;\n }\n >(\n ['user-token'],\n async () => {\n const resp = await ApiService.getBuyerCreditReportUserToken();\n return resp.data;\n },\n {\n refetchOnWindowFocus: false,\n refetchOnMount: false,\n retry: 0,\n },\n );\n\n const { data: arrayUser, isError, error, status } = queryBoy;\n const { setCurrentModal } = useDashboardModal();\n\n return (\n <>\n <Script src={`https://embed.array.io/cms/array-web-component.js?appKey=${key}`} />\n <Script src={`https://embed.array.io/cms/array-credit-alerts.js?appKey=${key}`} />\n {isError || !!error?.data || status === 'error' ? (\n <div className=\"flex flex-col items-center border border-gray-300 shadow-md rounded-xl p-5 mt-5\">\n <>\n <div className=\"text-center \">{t('You haven\\'t connected a credit report.')}</div>\n <svg className=\"text-[#D0CAE9] text-center my-12\" width={33} viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3 9.5L12 4L21 9.5M5 20H19M10 9H14M6 17V12M10 17V12M14 17V12M18 17V12\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n <div className=\"mb-6\">\n <Button\n variant=\"primary\"\n onClick={() => {\n closeArrayAlerts();\n setCurrentModal('createCreditReportUser');\n }}\n >\n {t('Add Credit')}\n </Button>\n </div>\n </>\n </div>\n ) : (\n <>\n {arrayUser?.userToken && (\n <div>\n <ArrayCreditAlerts\n bureau={bureau}\n closeArrayAlerts={closeArrayAlerts}\n appKey={appKey}\n userToken={arrayUser.userToken}\n sandbox={sandbox}\n />\n </div>\n )}\n </>\n )}\n </>\n );\n};\n","import clsx from 'clsx';\nimport { ButtonHTMLAttributes, MouseEventHandler, ReactNode } from 'react';\nimport Link from 'next/link';\n\ntype ButtonProps = {\n href?: string;\n onClick?: MouseEventHandler<any>;\n children: ReactNode;\n variant?:\n | 'black'\n | 'primary'\n | 'text-primary'\n | 'white'\n | 'red'\n | 'text-green'\n | 'text-red'\n | 'text-dark-purple';\n className?: string;\n type?: ButtonHTMLAttributes<HTMLButtonElement>['type'];\n disabled?: boolean;\n target?: string;\n form?: string;\n};\n\nexport const Button = ({\n children,\n className,\n variant = 'primary',\n href,\n ...props\n}: ButtonProps) => {\n const styles = clsx(\n 'font-semibold text-[15px] tracking-[0.15em] min-h-[48px] p-[15px_35px] rounded-[52px] transition-colors',\n {\n '!bg-gray-800 hover:!bg-gray-900': variant === 'black',\n 'text-primary hover:underline flex items-center justify-center': variant === 'text-primary',\n 'bg-[#01130F] hover:bg-[#022923] text-sm transition-colors px-4 uppercase font-bold':\n !variant || !variant.includes('text'),\n 'text-white': variant === 'primary' || variant === 'black' || variant === 'red',\n 'border border-[#9F98BE] hover:!bg-[#fcfcfc] !bg-white transition-colors dark:border-black-dark dark:hover:bg-black-dark':\n variant === 'white',\n 'bg-red-500 text-white hover:bg-red-600': variant === 'red',\n 'w-full': (!className?.includes('w-max') && !variant) || !variant.includes('text'),\n 'text-[#10B395] hover:underline flex items-center justify-center': variant === 'text-green',\n 'text-[#FF7E6D] hover:underline flex items-center justify-center': variant === 'text-red',\n 'text-[#635E7D] hover:underline flex items-center justify-center':\n variant === 'text-dark-purple',\n 'bg-primary-100 text-grey-300 border-none cursor-not-allowed pointer-events-none hover:':\n props.disabled,\n },\n className,\n );\n\n return href ? (\n <Link href={href} className={clsx(styles)} {...props}>\n {children}\n </Link>\n ) : (\n <button className={styles} type=\"submit\" {...props}>\n {children}\n </button>\n );\n};\n\nexport const ButtonContainer = ({ children }: { children: ReactNode }) => {\n return (\n <div className=\"flex gap-4 flex-col lg:flex-row justify-between mt-auto lg:pt-6 lg:mt-12 lg:border-t lg:dark:border-t-black-dark\">\n {children}\n </div>\n );\n};\n\nexport const BackButton = (props: ButtonHTMLAttributes<HTMLButtonElement>) => {\n return (\n <Button\n type=\"button\"\n {...props}\n className={clsx(\n 'lg:flex items-center min-h-[48px] px-4 border border-gray-200 rounded text-sm hover:!bg-[#fcfcfc] !bg-white text-gray-900 transition-colors dark:border-black-dark dark:hover:bg-black-dark tracking-[0.08em] uppercase !w-max hidden',\n props.className,\n )}\n variant=\"white\"\n >\n <svg className=\"mr-3.5 keep-color\" strokeWidth={2} width=\"8\" height=\"12\" viewBox=\"0 0 8 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.5 1L1.5 6L6.5 11\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n \n Back\n </Button>\n );\n};\n\nexport const ContinueButton = ({\n className,\n children = 'Continue',\n ...props\n}: Partial<ButtonProps>) => (\n <Button {...props} type=\"submit\" className={clsx(className, 'w-full')}>\n {children}\n </Button>\n);\n","import ArrowBackIcon from '@mui/icons-material/ArrowBack';\nimport { useRouter } from 'next/router';\nimport { commonRoutes } from '@utils';\nimport { Box } from '@mui/material';\nimport { useAuthUser } from '@hooks/use-auth';\n\nexport const BackButtonComponent = () => {\n const router = useRouter();\n const { refetchUserInfo, logout } = useAuthUser();\n\n const isOnboardingRoute = router.pathname === commonRoutes.buyer.auth.onboarding;\n const isQuickSetupRoute = router.pathname === '/user/onboarding/quick-setup';\n const isCompleteSetupRoute = router.pathname === commonRoutes.buyer.onboarding.completeSetup;\n const isLinkBankAccountRoute =\n router.pathname === commonRoutes.buyer.onboarding.currentAssessment;\n const isVerifyIncomeRoute = router.pathname === commonRoutes.buyer.onboarding.verifyIncome;\n const isGenerateCreditRoute = router.pathname === commonRoutes.buyer.onboarding.generateCredit;\n const isResetPasswordRoute = router.pathname === commonRoutes.buyer.reset;\n const isSignUpRoute = router.pathname === commonRoutes.buyer.signup;\n const isSignInRoute = router.pathname === commonRoutes.buyer.signin;\n\n const isValidRoute =\n isOnboardingRoute ||\n isQuickSetupRoute ||\n isCompleteSetupRoute ||\n isLinkBankAccountRoute ||\n isVerifyIncomeRoute ||\n isGenerateCreditRoute ||\n isResetPasswordRoute ||\n isSignUpRoute ||\n isSignInRoute;\n\n const isAuthRoute = isSignUpRoute || isSignInRoute || isResetPasswordRoute;\n\n const handleBack = async () => {\n try {\n if (isSignUpRoute) {\n await router.push(commonRoutes.buyer.signin);\n } else if (isSignInRoute) {\n await router.push('https://myhomepathway.squarespace.com/');\n } else if (isResetPasswordRoute) {\n await router.push(commonRoutes.buyer.signin);\n } else if (isCompleteSetupRoute || isQuickSetupRoute) {\n await router.push(commonRoutes.buyer.auth.onboarding);\n } else if (isLinkBankAccountRoute) {\n await router.push(commonRoutes.buyer.onboarding.completeSetup);\n } else if (isVerifyIncomeRoute) {\n await router.push(commonRoutes.buyer.onboarding.currentAssessment);\n } else if (isGenerateCreditRoute) {\n await router.push(commonRoutes.buyer.onboarding.verifyIncome);\n } else if(isOnboardingRoute) {\n logout();\n await router.push(commonRoutes.buyer.signin);\n }\n // Refetch profile data after navigation\n await refetchUserInfo();\n } catch (error) {\n console.error('Navigation error:', error);\n }\n };\n\n if (!isValidRoute) {\n return null;\n }\n\n return (\n <Box\n className=\"back-button-area cursor-pointer transition-all duration-300\"\n sx={{\n backgroundColor: isAuthRoute ? '#0AAA82' : '#fff',\n padding: isAuthRoute ? '14.4px' : '0px',\n borderRadius: '12px',\n display: 'flex',\n alignItems: 'center',\n gap: '12px',\n width: '165px',\n '&:hover': {\n '& .arrow-icon': {\n color: isAuthRoute ? '#fff' : '#00A6A6',\n },\n },\n }}\n onClick={handleBack}\n >\n <Box\n className=\"arrow-icon transition-all duration-300\"\n display=\"flex\"\n sx={{\n padding: '6px',\n borderRadius: '6px',\n justifyContent: 'center',\n alignItems: 'center',\n color: isAuthRoute ? '#fff' : '#000',\n border: isAuthRoute ? '1px solid #fff' : '1px solid #000',\n }}\n >\n <ArrowBackIcon />\n </Box>\n <img\n src={isAuthRoute ? '/MHP_Lockup_White 1.png' : '/images/MHP_Lockup_Mint.png'}\n alt=\"MHP logo\"\n width=\"78\"\n height=\"33.6\"\n />\n </Box>\n );\n};\n","import { Button } from '@components/button';\nimport { Form } from '@components/form';\nimport { Modal } from '@components/modal';\nimport { useAuthUser } from '@hooks';\nimport { useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { CustomInput } from '../custom-input';\nimport { Loading } from '@components/loading';\nimport { useMutation } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport { AxiosRequestConfig, AxiosResponse } from 'axios';\nimport { ErrorMessage } from '@components/error-message';\nimport { Toast } from '@utils';\n\ninterface IInviteCoBorrowerFields {\n coBorrowersFirstName: string;\n coBorrowersLastName: string;\n coBorrowersEmail: string;\n inviteeUserId: string;\n}\n\nexport const InviteCoBorrower = ({ label, disabled }: { label?: string; disabled?: boolean }) => {\n const [isOpen, setIsOpen] = useState(false);\n const { profile, refetchUserInfo } = useAuthUser();\n\n const methods = useForm<IInviteCoBorrowerFields>({\n defaultValues: {\n coBorrowersFirstName: profile?.coBorrowerInvite?.coBorrowersFirstName || '',\n coBorrowersLastName: profile?.coBorrowerInvite?.coBorrowersLastName || '',\n coBorrowersEmail: profile?.coBorrowerInvite?.coBorrowersEmail || '',\n inviteeUserId: profile?.userId || '',\n },\n reValidateMode: 'onChange',\n });\n\n const inviteMutation = useMutation<\n ApiService.InviteCoBorrowerResponse,\n AxiosResponse,\n ApiService.InviteCoBorrowerBody\n >(\n async (data) => {\n const resp = await ApiService.inviteCoBorrower(data);\n return resp.data;\n },\n {\n onSuccess: () => {\n setIsOpen(false);\n refetchUserInfo();\n methods.reset();\n },\n onError: (error: AxiosRequestConfig) => {\n Toast({\n text: error?.data?.message || 'Something went wrong ',\n variant: 'error',\n });\n setIsOpen(false);\n refetchUserInfo();\n },\n },\n );\n\n const onSubmit = (values: IInviteCoBorrowerFields) => {\n inviteMutation.mutate({\n email: values.coBorrowersEmail,\n firstName: values.coBorrowersFirstName,\n lastName: values.coBorrowersLastName,\n inviterId: profile.userId,\n });\n };\n return (\n <>\n <Modal\n open={isOpen && !profile.coBorrower}\n onClose={() => {\n setIsOpen(false);\n }}\n panelClassName=\"w-full lg:max-w-[800px] rounded-lg py-10 px-8 text-left \"\n title=\"Invite Co-Borrower / Co-Applicant\"\n >\n <Form\n id={'invite-co-borrower'}\n onSubmit={methods.handleSubmit((values) => {\n onSubmit(values);\n })}\n methods={methods}\n >\n <CustomInput.Input\n className=\"mb-4\"\n label=\"Co-Borrower's First Name\"\n name=\"coBorrowersFirstName\"\n validations={{ required: true }}\n />\n <CustomInput.Input\n className=\"mb-4\"\n label=\"Co-Borrower's Last Name\"\n name=\"coBorrowersLastName\"\n validations={{ required: true }}\n />\n <CustomInput.Email\n label=\"Co-Borrower's Email\"\n type=\"email\"\n name=\"coBorrowersEmail\"\n responseError={inviteMutation.isError && inviteMutation.error}\n isError={inviteMutation.isError}\n />\n\n <Button type=\"submit\" className=\"mt-10\">\n Invite\n </Button>\n </Form>\n <Loading isLoading={inviteMutation.isLoading} />\n </Modal>\n <Button\n type=\"button\"\n disabled={disabled}\n onClick={() => {\n setIsOpen(true);\n }}\n >\n {label ?? 'Invite Co-Borrower / Co-Applicant'}\n </Button>\n </>\n );\n};\n","import { useAuthUser } from '@hooks';\nimport { CustomInput } from '@components/custom-input';\nimport { Form } from '@components/form';\nimport { useForm } from 'react-hook-form';\n\nconst CoBorrowerDetails = () => {\n const { profile } = useAuthUser();\n\n const methods = useForm<{\n coBorrowersFirstName: string;\n coBorrowersLastName: string;\n coBorrowersEmail: string;\n }>({\n defaultValues: {\n coBorrowersEmail: profile.coBorrowersEmail || profile.coBorrowerInvite.coBorrowersEmail || '',\n coBorrowersFirstName:\n profile.coBorrowersFirstName || profile.coBorrowerInvite.coBorrowersFirstName || '',\n coBorrowersLastName:\n profile.coBorrowersLastName || profile.coBorrowerInvite.coBorrowersLastName || '',\n },\n });\n return (\n <>\n <Form id=\"co-borrowers-details\" methods={methods}>\n <CustomInput.Input\n className=\"mb-4 w-full\"\n disabled\n label=\"Co-Borrower's First Name\"\n name=\"coBorrowersFirstName\"\n />\n <CustomInput.Input\n className=\"mb-4 w-full\"\n disabled\n label=\"Co-Borrower's Last Name\"\n name=\"coBorrowersLastName\"\n />\n <CustomInput.Email\n className=\"mb-4 w-full\"\n disabled\n label=\"Co-Borrower's Email\"\n name=\"coBorrowersEmail\"\n />\n </Form>\n </>\n );\n};\n\nexport default CoBorrowerDetails;\n","import { Toast } from '@utils';\nimport { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';\nimport { Button } from '@components/button';\nimport { Loading } from '@components/loading';\nimport { Modal } from '@components/modal';\nimport { useAuthUser } from '@hooks';\nimport { useState } from 'react';\nimport { useMutation, useQueryClient } from 'react-query';\nimport { ApiService } from '@services/Api';\n\nexport const DisAssociateCoBorrower = () => {\n const [isOpen, setIsOpen] = useState(false);\n const { profile, refetchUserInfo } = useAuthUser();\n const qc = useQueryClient();\n\n const disassociationMutation = useMutation(\n async () => {\n const resp = await ApiService.disassociateCoBorrower();\n return resp.data;\n },\n {\n onSuccess: (data) => {\n if (data.status === 'dis-associated') {\n Toast({\n text: 'Successfully dis-associated',\n });\n qc.invalidateQueries(['user']);\n setIsOpen(false);\n }\n },\n onError: (error: AxiosRequestConfig) => {\n Toast({\n text: error?.data?.message || 'Something went wrong ',\n variant: 'error',\n });\n setIsOpen(false);\n refetchUserInfo();\n },\n },\n );\n\n return (\n <>\n <Modal\n open={isOpen && profile.coBorrower}\n onClose={() => {\n setIsOpen(false);\n }}\n panelClassName=\"w-full lg:max-w-[800px] rounded-lg py-10 px-8 text-left \"\n title=\"Disassociate Co-Borrower / Co-Applicant\"\n >\n Are you sure you want to disassociate from{' '}\n <b>\n {profile.coBorrowersFirstName} ({profile.coBorrowersEmail})\n </b>\n ?\n <Loading isLoading={disassociationMutation.isLoading} />\n <div className=\"flex flex-row gap-2 mt-4 border justify-between\">\n <Button\n type=\"button\"\n variant=\"red\"\n onClick={() => {\n setIsOpen(false);\n }}\n >\n Cancel\n </Button>\n <Button\n type=\"button\"\n onClick={() => {\n disassociationMutation.mutate();\n }}\n >\n Yea, sure.\n </Button>\n </div>\n </Modal>\n <Button\n type=\"button\"\n variant=\"red\"\n onClick={() => {\n setIsOpen(true);\n }}\n >\n Remove Co-Borrower / Co-Applicant\n </Button>\n </>\n );\n};\n","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getListItemIconUtilityClass(slot) {\n return generateUtilityClass('MuiListItemIcon', slot);\n}\nconst listItemIconClasses = generateUtilityClasses('MuiListItemIcon', ['root', 'alignItemsFlexStart']);\nexport default listItemIconClasses;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getMenuItemUtilityClass(slot) {\n return generateUtilityClass('MuiMenuItem', slot);\n}\nconst menuItemClasses = generateUtilityClasses('MuiMenuItem', ['root', 'focusVisible', 'dense', 'disabled', 'divider', 'gutters', 'selected']);\nexport default menuItemClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport rootShouldForwardProp from \"../styles/rootShouldForwardProp.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport ListContext from \"../List/ListContext.js\";\nimport ButtonBase from \"../ButtonBase/index.js\";\nimport useEnhancedEffect from \"../utils/useEnhancedEffect.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport { dividerClasses } from \"../Divider/index.js\";\nimport { listItemIconClasses } from \"../ListItemIcon/index.js\";\nimport { listItemTextClasses } from \"../ListItemText/index.js\";\nimport menuItemClasses, { getMenuItemUtilityClass } from \"./menuItemClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];\n};\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n dense,\n divider,\n disableGutters,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', disabled && 'disabled', !disableGutters && 'gutters', divider && 'divider', selected && 'selected']\n };\n const composedClasses = composeClasses(slots, getMenuItemUtilityClass, classes);\n return {\n ...classes,\n ...composedClasses\n };\n};\nconst MenuItemRoot = styled(ButtonBase, {\n shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',\n name: 'MuiMenuItem',\n slot: 'Root',\n overridesResolver\n})(memoTheme(({\n theme\n}) => ({\n ...theme.typography.body1,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n whiteSpace: 'nowrap',\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: (theme.vars || theme).palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${menuItemClasses.selected}`]: {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${menuItemClasses.focusVisible}`]: {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${menuItemClasses.selected}:hover`]: {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n },\n [`&.${menuItemClasses.focusVisible}`]: {\n backgroundColor: (theme.vars || theme).palette.action.focus\n },\n [`&.${menuItemClasses.disabled}`]: {\n opacity: (theme.vars || theme).palette.action.disabledOpacity\n },\n [`& + .${dividerClasses.root}`]: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n [`& + .${dividerClasses.inset}`]: {\n marginLeft: 52\n },\n [`& .${listItemTextClasses.root}`]: {\n marginTop: 0,\n marginBottom: 0\n },\n [`& .${listItemTextClasses.inset}`]: {\n paddingLeft: 36\n },\n [`& .${listItemIconClasses.root}`]: {\n minWidth: 36\n },\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableGutters,\n style: {\n paddingLeft: 16,\n paddingRight: 16\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.divider,\n style: {\n borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,\n backgroundClip: 'padding-box'\n }\n }, {\n props: ({\n ownerState\n }) => !ownerState.dense,\n style: {\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto'\n }\n }\n }, {\n props: ({\n ownerState\n }) => ownerState.dense,\n style: {\n minHeight: 32,\n // https://m2.material.io/components/menus#specs > Dense\n paddingTop: 4,\n paddingBottom: 4,\n ...theme.typography.body2,\n [`& .${listItemIconClasses.root} svg`]: {\n fontSize: '1.25rem'\n }\n }\n }]\n})));\nconst MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiMenuItem'\n });\n const {\n autoFocus = false,\n component = 'li',\n dense = false,\n divider = false,\n disableGutters = false,\n focusVisibleClassName,\n role = 'menuitem',\n tabIndex: tabIndexProp,\n className,\n ...other\n } = props;\n const context = React.useContext(ListContext);\n const childContext = React.useMemo(() => ({\n dense: dense || context.dense || false,\n disableGutters\n }), [context.dense, dense, disableGutters]);\n const menuItemRef = React.useRef(null);\n useEnhancedEffect(() => {\n if (autoFocus) {\n if (menuItemRef.current) {\n menuItemRef.current.focus();\n } else if (process.env.NODE_ENV !== 'production') {\n console.error('MUI: Unable to set focus to a MenuItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n const ownerState = {\n ...props,\n dense: childContext.dense,\n divider,\n disableGutters\n };\n const classes = useUtilityClasses(props);\n const handleRef = useForkRef(menuItemRef, ref);\n let tabIndex;\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n return /*#__PURE__*/_jsx(ListContext.Provider, {\n value: childContext,\n children: /*#__PURE__*/_jsx(MenuItemRoot, {\n ref: handleRef,\n role: role,\n tabIndex: tabIndex,\n component: component,\n focusVisibleClassName: clsx(classes.focusVisible, focusVisibleClassName),\n className: clsx(classes.root, className),\n ...other,\n ownerState: ownerState,\n classes: classes\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? MenuItem.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n */\n autoFocus: PropTypes.bool,\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent Menu component.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * @ignore\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: PropTypes.bool,\n /**\n * If `true`, a 1px light border is added to the bottom of the menu item.\n * @default false\n */\n divider: PropTypes.bool,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n /**\n * @ignore\n */\n role: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * If `true`, the component is selected.\n * @default false\n */\n selected: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number\n} : void 0;\nexport default MenuItem;","import React from 'react';\nimport { MenuItem, Select, FormControl, styled, Box, Typography } from '@mui/material';\nimport KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';\nimport { useLanguage } from 'context/LanguageContext';\n\nconst StyledSelect = styled(Select)({\n '.MuiSelect-select': {\n paddingRight: '32px',\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n // borderRadius: '100px',\n },\n '&.Mui-focused .MuiOutlinedInput-notchedOutline': {\n borderColor: '#E0E0E0',\n },\n '&.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline': {\n borderColor: '#E0E0E0',\n },\n});\n\nconst FlagImage = styled('img')({\n width: '24px',\n height: '16px',\n objectFit: 'cover',\n borderRadius: '2px',\n});\n\nconst LanguageSelect = () => {\n const { language, setLanguage } = useLanguage();\n\n const languages = [\n { code: 'en', name: '(US)', flag: '/flags/us.svg' },\n { code: 'es', name: '(ES)', flag: '/flags/es.svg' },\n // { code: 'fr', name: 'Français (FR)', flag: '/flags/fr.svg' },\n // { code: 'de', name: 'Deutsch (DE)', flag: '/flags/de.svg' },\n ];\n\n const handleChange = (event) => {\n setLanguage(event.target.value);\n };\n\n return (\n <FormControl>\n <StyledSelect\n value={language}\n onChange={handleChange}\n IconComponent={KeyboardArrowDownIcon}\n className=\"max-w-[175px] border-[#E0E0E0] max-h-[53px] md:h-[53px] min-h-[45px]\"\n sx={{\n backgroundColor: '#FFFFFF',\n borderRadius: '9999px',\n '& .MuiOutlinedInput-notchedOutline': {\n border: '1px solid #E0E0E0',\n borderRadius: '9999px',\n },\n '& .MuiSelect-icon': {\n color: '#000000',\n right: '12px',\n },\n '& .MuiTypography-root': {\n fontSize: { xs: '12px', md: '14px' },\n },\n }}\n renderValue={(selected) => {\n const lang = languages.find((l) => l.code === selected);\n return (\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n <FlagImage src={lang?.flag} alt={lang?.name} />\n <Typography>{lang?.name}</Typography>\n </Box>\n );\n }}\n >\n {languages.map((lang) => (\n <MenuItem key={lang.code} value={lang.code}>\n <Box sx={{ display: 'flex', alignItems: 'center', gap: 1 }}>\n <FlagImage src={lang.flag} alt={lang.name} />\n <Typography>{lang.name}</Typography>\n </Box>\n </MenuItem>\n ))}\n </StyledSelect>\n </FormControl>\n );\n};\n\nexport default LanguageSelect;\n","import clsx from 'clsx';\nimport { DetailedHTMLProps, InputHTMLAttributes } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\nexport const Checkbox = ({\n label,\n validations,\n ...props\n}: InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n validations?: Record<string, unknown>;\n}) => {\n const { register } = useFormContext();\n return (\n <label\n className={clsx('flex items-center gap-3 text-gray-800 dark:text-gray-100 cursor-pointer', {\n 'text-gray-300': props.disabled,\n })}\n key={props.name}\n >\n <input\n className=\"rounded border-2 border-gray-300 bg-transparent text-primary cursor-pointer\"\n type=\"checkbox\"\n name={props.name}\n {...register(props.name, validations)}\n {...props}\n />\n <span className=\"text-sm font-medium\">{label}</span>\n </label>\n );\n};\n\nexport const ControlledCheckbox = ({\n label,\n ...props\n}: {\n label: string;\n} & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => {\n return (\n <label className=\"flex items-center gap-3 text-gray-800 dark:text-gray-100 cursor-pointer\">\n <input\n className=\"rounded border-2 border-gray-300 bg-transparent text-[#1DAB37] cursor-pointer\"\n type=\"checkbox\"\n {...props}\n />\n <span className=\"text-sm font-normal\">{label}</span>\n </label>\n );\n};\n","import CoBorrowerDetails from '@components/co-borrower/co-borrower-details';\nimport { memo } from 'react';\nimport { DisAssociateCoBorrower } from '../../co-borrower/disassociation-consent';\n\nconst UnMemoCoBorrowerInput = () => {\n return (\n <>\n <CoBorrowerDetails />\n <DisAssociateCoBorrower />\n </>\n );\n};\n\nexport const CoBorrowerInput = memo(UnMemoCoBorrowerInput);\n\nexport * from '../../co-borrower/InviteCoBorrower';\n","import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';\nimport usePlaces from 'react-google-autocomplete/lib/usePlacesAutocompleteService';\nimport { useFormContext } from 'react-hook-form';\nimport { Input } from '../input';\n\ninterface AddressComponent {\n long_name: string;\n types: string[];\n}\n\ninterface IAddressFields {\n street?: string;\n apartment?: string;\n city?: string;\n state?: string;\n zipCode?: string;\n}\ninterface IAutoCompleteLocationProps {\n fieldNames?: IAddressFields;\n defaultValues?: Partial<Record<keyof IAddressFields, string>>;\n}\n\nconst AutoCompleteLocationComponent: React.FC<IAutoCompleteLocationProps> = ({\n fieldNames = {\n street: 'street',\n apartment: 'apartment',\n city: 'city',\n state: 'state',\n zipCode: 'zipCode',\n },\n defaultValues,\n}) => {\n const [showPredictions, setShowPredictions] = useState(false);\n const { getValues, setValue } = useFormContext();\n const [address, setAddress] = useState<IAddressFields>({\n street: '',\n apartment: '',\n city: '',\n state: '',\n zipCode: '',\n });\n\n const { placesService, placePredictions, getPlacePredictions } = usePlaces({\n debounce: 300,\n language: 'en',\n apiKey: process.env.NEXT_PUBLIC_MAPS_API,\n options: {\n componentRestrictions: { country: 'us' },\n types: ['address'],\n },\n });\n\n // triggers places prediction on change of the street field\n const onQueryChange = (event) => {\n getPlacePredictions({\n input: event.target.value,\n });\n setAddress((address) => ({ ...address, street: event.target.value }));\n setShowPredictions(true);\n };\n\n // gets diff address components\n const getAddressComponentValue = (addressComponents: AddressComponent[], type: string) => {\n const component = addressComponents.find((component) => component.types.includes(type));\n return component ? component.long_name : '';\n };\n\n // extracts street name of the prediction\n const getStreetName = (addressComponents: AddressComponent[]): string => {\n const streetNumberComponent = addressComponents.find((component) =>\n component.types.includes('street_number'),\n );\n const streetNumber = streetNumberComponent?.long_name || '';\n\n const streetNameComponent = addressComponents.find((component) =>\n component.types.includes('route'),\n );\n const streetName = streetNameComponent?.long_name || '';\n\n return streetNumber + ' ' + streetName;\n };\n\n const updateFormState = useCallback(\n (data: IAddressFields) => {\n setValue(fieldNames.apartment, data.apartment, {\n shouldTouch: true,\n shouldDirty: true,\n shouldValidate: true,\n });\n setValue(fieldNames.street, data.street, {\n shouldTouch: true,\n shouldDirty: true,\n shouldValidate: true,\n });\n setValue(fieldNames.state, data.state, {\n shouldTouch: true,\n shouldDirty: true,\n shouldValidate: true,\n });\n setValue(fieldNames.city, data.city, {\n shouldTouch: true,\n shouldDirty: true,\n shouldValidate: true,\n });\n setValue(fieldNames.zipCode, data.zipCode, {\n shouldTouch: true,\n shouldDirty: true,\n shouldValidate: true,\n });\n },\n [\n fieldNames.apartment,\n fieldNames.city,\n fieldNames.state,\n fieldNames.street,\n fieldNames.zipCode,\n setValue,\n ],\n );\n\n // selector on click of predicted addresses\n const selectAddress = useCallback(\n (placeId: string) => {\n placesService.getDetails(\n {\n placeId,\n },\n (place) => {\n const addressComponents = place?.address_components ?? [];\n const street = getStreetName(addressComponents);\n const city = getAddressComponentValue(addressComponents, 'locality');\n const state = getAddressComponentValue(addressComponents, 'administrative_area_level_1');\n const zipCode = getAddressComponentValue(addressComponents, 'postal_code');\n\n setAddress((prev) => {\n const data = { ...prev, street, city, state, zipCode };\n\n updateFormState(data);\n\n return data;\n });\n setShowPredictions(false);\n },\n );\n },\n [placesService, updateFormState],\n );\n\n // renders the predictions\n const predictions = useMemo(\n () =>\n placePredictions.length > 0 &&\n showPredictions && (\n <div className=\"absolute z-10 w-5/6 mt-1 bg-white-100 border border-gray-300 rounded-md shadow-lg overflow-y-auto max-h-[250px]\">\n {placePredictions.map((prediction) => (\n <div\n key={prediction.place_id}\n className=\"px-4 py-2 hover:bg-gray-100 cursor-pointer\"\n onClick={() => {\n selectAddress(prediction?.place_id);\n }}\n >\n {prediction.description}\n </div>\n ))}\n </div>\n ),\n [placePredictions, selectAddress, showPredictions],\n );\n\n // handles change of the input boxes after prediction selected (manual inputs)\n const handleChange: React.ChangeEventHandler = (event: React.ChangeEvent<HTMLInputElement>) => {\n setAddress((prevAddress) => {\n const data = { ...prevAddress, [event.target.name]: event.target.value };\n updateFormState(data);\n return data;\n });\n };\n\n useEffect(() => {\n setAddress({\n street: defaultValues?.street || getValues(fieldNames.street) || '',\n apartment: defaultValues?.apartment || getValues(fieldNames.apartment) || '',\n city: defaultValues?.city || getValues(fieldNames.city) || '',\n state: defaultValues?.state || getValues(fieldNames.state) || '',\n zipCode: defaultValues?.zipCode || getValues(fieldNames.zipCode) || '',\n });\n }, [\n defaultValues?.apartment,\n defaultValues?.city,\n defaultValues?.state,\n defaultValues?.street,\n defaultValues?.zipCode,\n fieldNames.apartment,\n fieldNames.city,\n fieldNames.state,\n fieldNames.street,\n fieldNames.zipCode,\n getValues,\n ]);\n\n return (<>\n <section>\n <Input\n label=\"Street\"\n placeholder=\"Street and number, Apt, Unit, etc.\"\n className=\"w-full\"\n name={fieldNames.street}\n validations={{ required: true, pattern: /[a-zA-Z]{2,30}/ }}\n onChange={onQueryChange}\n autoComplete=\"true\"\n value={address.street}\n />\n {/* predictions list */}\n {predictions}\n </section>\n <section className=\"grid gap-4 w-full sm:grid-cols-2\">\n <Input\n label=\"Apartment / Suite / Unit\"\n wrapperClassName=\"w-full\"\n placeholder=\"Enter Apartment / Suite / Unit Number\"\n className=\"w-full\"\n name={fieldNames.apartment}\n autoComplete=\"true\"\n value={address.apartment}\n onChange={handleChange}\n />\n <Input\n wrapperClassName=\"w-full\"\n label=\"City\"\n placeholder=\"City\"\n className=\"w-full\"\n name={fieldNames.city}\n autoComplete=\"true\"\n validations={{ required: true, pattern: /[a-zA-Z]{2,30}/ }}\n value={address.city}\n onChange={handleChange}\n />\n </section>\n <section className=\"grid gap-4 w-full sm:grid-cols-2\">\n <Input\n label=\"State\"\n wrapperClassName=\"w-full\"\n placeholder=\"State\"\n className=\"w-full\"\n name={fieldNames.state}\n validations={{ required: true, pattern: /[a-zA-Z]{2,30}/ }}\n autoComplete=\"true\"\n value={address.state}\n onChange={handleChange}\n />\n <Input\n label=\"Zip Code\"\n placeholder=\"Zip\"\n wrapperClassName=\"w-full\"\n className=\"w-full\"\n name={fieldNames.zipCode}\n validations={{ required: true, pattern: /[0-9]{5,5}/ }}\n autoComplete=\"true\"\n value={address.zipCode}\n onChange={handleChange}\n mask=\"99999\"\n />\n </section>\n </>);\n};\n\nexport const AutoCompleteLocation = memo(AutoCompleteLocationComponent);\n","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { getThemeProps } from \"../useThemeProps/index.js\";\nimport useTheme from \"../useThemeWithoutDefault/index.js\";\nfunction useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n const [match, setMatch] = React.useState(() => {\n if (noSsr && matchMedia) {\n return matchMedia(query).matches;\n }\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n }\n\n // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n return defaultMatches;\n });\n useEnhancedEffect(() => {\n if (!matchMedia) {\n return undefined;\n }\n const queryList = matchMedia(query);\n const updateMatch = () => {\n setMatch(queryList.matches);\n };\n updateMatch();\n queryList.addEventListener('change', updateMatch);\n return () => {\n queryList.removeEventListener('change', updateMatch);\n };\n }, [query, matchMedia]);\n return match;\n}\n\n// eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];\nfunction useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);\n const getServerSnapshot = React.useMemo(() => {\n if (noSsr && matchMedia) {\n return () => matchMedia(query).matches;\n }\n if (ssrMatchMedia !== null) {\n const {\n matches\n } = ssrMatchMedia(query);\n return () => matches;\n }\n return getDefaultSnapshot;\n }, [getDefaultSnapshot, query, ssrMatchMedia, noSsr, matchMedia]);\n const [getSnapshot, subscribe] = React.useMemo(() => {\n if (matchMedia === null) {\n return [getDefaultSnapshot, () => () => {}];\n }\n const mediaQueryList = matchMedia(query);\n return [() => mediaQueryList.matches, notify => {\n mediaQueryList.addEventListener('change', notify);\n return () => {\n mediaQueryList.removeEventListener('change', notify);\n };\n }];\n }, [getDefaultSnapshot, matchMedia, query]);\n const match = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return match;\n}\nexport default function useMediaQuery(queryInput, options = {}) {\n const theme = useTheme();\n // Wait for jsdom to support the match media feature.\n // All the browsers MUI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n const {\n defaultMatches = false,\n matchMedia = supportMatchMedia ? window.matchMedia : null,\n ssrMatchMedia = null,\n noSsr = false\n } = getThemeProps({\n name: 'MuiUseMediaQuery',\n props: options,\n theme\n });\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, '');\n\n // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable\n const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;\n const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query,\n match\n });\n }\n return match;\n}","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nexport function resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersToolbarUtilityClass(slot) {\n return generateUtilityClass('MuiPickersToolbar', slot);\n}\nexport const pickersToolbarClasses = generateUtilityClasses('MuiPickersToolbar', ['root', 'content', 'penIconButton', 'penIconButtonLandscape']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Grid from '@mui/material/Grid';\nimport Typography from '@mui/material/Typography';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { getPickersToolbarUtilityClass } from './pickersToolbarClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n isLandscape\n } = ownerState;\n const slots = {\n root: ['root'],\n content: ['content'],\n penIconButton: ['penIconButton', isLandscape && 'penIconButtonLandscape']\n };\n return composeClasses(slots, getPickersToolbarUtilityClass, classes);\n};\nconst PickersToolbarRoot = styled('div', {\n name: 'MuiPickersToolbar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => _extends({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n padding: theme.spacing(2, 3)\n}, ownerState.isLandscape && {\n height: 'auto',\n maxWidth: 160,\n padding: 16,\n justifyContent: 'flex-start',\n flexWrap: 'wrap'\n}));\nconst PickersToolbarContent = styled(Grid, {\n name: 'MuiPickersToolbar',\n slot: 'Content',\n overridesResolver: (props, styles) => styles.content\n})(({\n ownerState\n}) => _extends({\n flex: 1\n}, !ownerState.isLandscape && {\n alignItems: 'center'\n}));\nexport const PickersToolbar = /*#__PURE__*/React.forwardRef(function PickersToolbar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersToolbar'\n });\n const {\n children,\n className,\n isLandscape,\n landscapeDirection = 'column',\n toolbarTitle,\n hidden,\n titleId\n } = props;\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n if (hidden) {\n return null;\n }\n return /*#__PURE__*/_jsxs(PickersToolbarRoot, {\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n children: [/*#__PURE__*/_jsx(Typography, {\n color: \"text.secondary\",\n variant: \"overline\",\n id: titleId,\n children: toolbarTitle\n }), /*#__PURE__*/_jsx(PickersToolbarContent, {\n container: true,\n justifyContent: isLandscape ? 'flex-start' : 'space-between',\n className: classes.content,\n ownerState: ownerState,\n direction: isLandscape ? landscapeDirection : 'row',\n alignItems: isLandscape ? 'flex-start' : 'flex-end',\n children: children\n })]\n });\n});","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getDatePickerToolbarUtilityClass(slot) {\n return generateUtilityClass('MuiDatePickerToolbar', slot);\n}\nexport const datePickerToolbarClasses = generateUtilityClasses('MuiDatePickerToolbar', ['root', 'title']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"value\", \"isLandscape\", \"onChange\", \"toolbarFormat\", \"toolbarPlaceholder\", \"views\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Typography from '@mui/material/Typography';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { PickersToolbar } from '../internals/components/PickersToolbar';\nimport { useLocaleText, useUtils } from '../internals/hooks/useUtils';\nimport { getDatePickerToolbarUtilityClass } from './datePickerToolbarClasses';\nimport { resolveDateFormat } from '../internals/utils/date-utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n title: ['title']\n };\n return composeClasses(slots, getDatePickerToolbarUtilityClass, classes);\n};\nconst DatePickerToolbarRoot = styled(PickersToolbar, {\n name: 'MuiDatePickerToolbar',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})({});\n\n/**\n * @ignore - do not document.\n */\nconst DatePickerToolbarTitle = styled(Typography, {\n name: 'MuiDatePickerToolbar',\n slot: 'Title',\n overridesResolver: (_, styles) => styles.title\n})(({\n ownerState\n}) => _extends({}, ownerState.isLandscape && {\n margin: 'auto 16px auto auto'\n}));\nconst DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDatePickerToolbar'\n });\n const {\n value,\n isLandscape,\n toolbarFormat,\n toolbarPlaceholder = '––',\n views\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const utils = useUtils();\n const localeText = useLocaleText();\n const classes = useUtilityClasses(props);\n const dateText = React.useMemo(() => {\n if (!value) {\n return toolbarPlaceholder;\n }\n const formatFromViews = resolveDateFormat(utils, {\n format: toolbarFormat,\n views\n }, true);\n return utils.formatByString(value, formatFromViews);\n }, [value, toolbarFormat, toolbarPlaceholder, utils, views]);\n const ownerState = props;\n return /*#__PURE__*/_jsx(DatePickerToolbarRoot, _extends({\n ref: ref,\n toolbarTitle: localeText.datePickerToolbarTitle,\n isLandscape: isLandscape,\n className: classes.root\n }, other, {\n children: /*#__PURE__*/_jsx(DatePickerToolbarTitle, {\n variant: \"h4\",\n align: isLandscape ? 'left' : 'center',\n ownerState: ownerState,\n className: classes.title,\n children: dateText\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DatePickerToolbar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n classes: PropTypes.object,\n /**\n * className applied to the root component.\n */\n className: PropTypes.string,\n disabled: PropTypes.bool,\n /**\n * If `true`, show the toolbar even in desktop mode.\n * @default `true` for Desktop, `false` for Mobile.\n */\n hidden: PropTypes.bool,\n isLandscape: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n /**\n * Callback called when a toolbar is clicked\n * @template TView\n * @param {TView} view The view to open\n */\n onViewChange: PropTypes.func.isRequired,\n readOnly: PropTypes.bool,\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n titleId: PropTypes.string,\n /**\n * Toolbar date format.\n */\n toolbarFormat: PropTypes.string,\n /**\n * Toolbar value placeholder—it is displayed when the value is empty.\n * @default \"––\"\n */\n toolbarPlaceholder: PropTypes.node,\n value: PropTypes.any,\n /**\n * Currently visible picker view.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']).isRequired,\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired).isRequired\n} : void 0;\nexport { DatePickerToolbar };","import _extends from \"@babel/runtime/helpers/esm/extends\";\n// TODO v7: This file exist only to simplify typing between\n// components/componentsProps and slots/slotProps\n// Should be deleted when components/componentsProps are removed\n\nexport const uncapitalizeObjectKeys = capitalizedObject => {\n if (capitalizedObject === undefined) {\n return undefined;\n }\n return Object.keys(capitalizedObject).reduce((acc, key) => _extends({}, acc, {\n [`${key.slice(0, 1).toLowerCase()}${key.slice(1)}`]: capitalizedObject[key]\n }), {});\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useThemeProps } from '@mui/material/styles';\nimport { useDefaultDates, useUtils } from '../internals/hooks/useUtils';\nimport { applyDefaultViewProps } from '../internals/utils/views';\nimport { applyDefaultDate } from '../internals/utils/date-utils';\nimport { DatePickerToolbar } from './DatePickerToolbar';\nimport { uncapitalizeObjectKeys } from '../internals/utils/slots-migration';\nexport function useDatePickerDefaultizedProps(props, name) {\n var _themeProps$slots, _themeProps$disableFu, _themeProps$disablePa, _themeProps$slotProps;\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const themeProps = useThemeProps({\n props,\n name\n });\n const localeText = React.useMemo(() => {\n var _themeProps$localeTex;\n if (((_themeProps$localeTex = themeProps.localeText) == null ? void 0 : _themeProps$localeTex.toolbarTitle) == null) {\n return themeProps.localeText;\n }\n return _extends({}, themeProps.localeText, {\n datePickerToolbarTitle: themeProps.localeText.toolbarTitle\n });\n }, [themeProps.localeText]);\n const slots = (_themeProps$slots = themeProps.slots) != null ? _themeProps$slots : uncapitalizeObjectKeys(themeProps.components);\n return _extends({}, themeProps, {\n localeText\n }, applyDefaultViewProps({\n views: themeProps.views,\n openTo: themeProps.openTo,\n defaultViews: ['year', 'day'],\n defaultOpenTo: 'day'\n }), {\n disableFuture: (_themeProps$disableFu = themeProps.disableFuture) != null ? _themeProps$disableFu : false,\n disablePast: (_themeProps$disablePa = themeProps.disablePast) != null ? _themeProps$disablePa : false,\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate),\n slots: _extends({\n toolbar: DatePickerToolbar\n }, slots),\n slotProps: (_themeProps$slotProps = themeProps.slotProps) != null ? _themeProps$slotProps : themeProps.componentsProps\n });\n}","import { applyDefaultDate } from '../date-utils';\nexport const validateDate = ({\n props,\n value,\n adapter\n}) => {\n if (value === null) {\n return null;\n }\n const {\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n disablePast,\n disableFuture,\n timezone\n } = props;\n const now = adapter.utils.dateWithTimezone(undefined, timezone);\n const minDate = applyDefaultDate(adapter.utils, props.minDate, adapter.defaultDates.minDate);\n const maxDate = applyDefaultDate(adapter.utils, props.maxDate, adapter.defaultDates.maxDate);\n switch (true) {\n case !adapter.utils.isValid(value):\n return 'invalidDate';\n case Boolean(shouldDisableDate && shouldDisableDate(value)):\n return 'shouldDisableDate';\n case Boolean(shouldDisableMonth && shouldDisableMonth(value)):\n return 'shouldDisableMonth';\n case Boolean(shouldDisableYear && shouldDisableYear(value)):\n return 'shouldDisableYear';\n case Boolean(disableFuture && adapter.utils.isAfterDay(value, now)):\n return 'disableFuture';\n case Boolean(disablePast && adapter.utils.isBeforeDay(value, now)):\n return 'disablePast';\n case Boolean(minDate && adapter.utils.isBeforeDay(value, minDate)):\n return 'minDate';\n case Boolean(maxDate && adapter.utils.isAfterDay(value, maxDate)):\n return 'maxDate';\n default:\n return null;\n }\n};","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\nimport setRef from '../setRef';\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nexport function isHostComponent(element) {\n return typeof element === 'string';\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { isHostComponent } from './isHostComponent';\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nexport function appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return _extends({}, otherProps, {\n ownerState: _extends({}, otherProps.ownerState, ownerState)\n });\n}","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nexport function extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nexport function omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport clsx from 'clsx';\nimport { extractEventHandlers } from './extractEventHandlers';\nimport { omitEventHandlers } from './omitEventHandlers';\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nexport function mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, additionalProps, externalForwardedProps, externalSlotProps);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers(_extends({}, externalForwardedProps, externalSlotProps));\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps == null ? void 0 : internalSlotProps.className, additionalProps == null ? void 0 : additionalProps.className, className, externalForwardedProps == null ? void 0 : externalForwardedProps.className, externalSlotProps == null ? void 0 : externalSlotProps.className);\n const mergedStyle = _extends({}, internalSlotProps == null ? void 0 : internalSlotProps.style, additionalProps == null ? void 0 : additionalProps.style, externalForwardedProps == null ? void 0 : externalForwardedProps.style, externalSlotProps == null ? void 0 : externalSlotProps.style);\n const props = _extends({}, internalSlotProps, additionalProps, otherPropsWithoutEventHandlers, componentsPropsWithoutEventHandlers);\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"elementType\", \"externalSlotProps\", \"ownerState\", \"skipResolvingSlotProps\"];\nimport { unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { appendOwnerState } from './appendOwnerState';\nimport { mergeSlotProps } from './mergeSlotProps';\nimport { resolveComponentProps } from './resolveComponentProps';\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nexport function useSlotProps(parameters) {\n var _parameters$additiona;\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false\n } = parameters,\n rest = _objectWithoutPropertiesLoose(parameters, _excluded);\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps(_extends({}, rest, {\n externalSlotProps: resolvedComponentsProps\n }));\n const ref = useForkRef(internalRef, resolvedComponentsProps == null ? void 0 : resolvedComponentsProps.ref, (_parameters$additiona = parameters.additionalProps) == null ? void 0 : _parameters$additiona.ref);\n const props = appendOwnerState(elementType, _extends({}, mergedProps, {\n ref\n }), ownerState);\n return props;\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// downstream bundlers may remove unnecessary concatenation, but won't remove toString call -- Workaround for https://github.com/webpack/webpack/issues/14814\nconst maybeReactUseId = React['useId'.toString()];\n/**\n *\n * @example <div id={useId()} />\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride != null ? idOverride : reactId;\n }\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPickersPopper', slot);\n}\nexport const pickersPopperClasses = generateUtilityClasses('MuiPickersPopper', ['root', 'paper']);","/* Use it instead of .includes method for IE support */\nexport function arrayIncludes(array, itemOrItems) {\n if (Array.isArray(itemOrItems)) {\n return itemOrItems.every(item => array.indexOf(item) !== -1);\n }\n return array.indexOf(itemOrItems) !== -1;\n}\nexport const onSpaceOrEnter = (innerFn, externalEvent) => event => {\n if (event.key === 'Enter' || event.key === ' ') {\n innerFn(event);\n\n // prevent any side effects\n event.preventDefault();\n event.stopPropagation();\n }\n if (externalEvent) {\n externalEvent(event);\n }\n};\nexport const executeInTheNextEventLoopTick = fn => {\n setTimeout(fn, 0);\n};\n\n// https://www.abeautifulsite.net/posts/finding-the-active-element-in-a-shadow-root/\nexport const getActiveElement = (root = document) => {\n const activeEl = root.activeElement;\n if (!activeEl) {\n return null;\n }\n if (activeEl.shadowRoot) {\n return getActiveElement(activeEl.shadowRoot);\n }\n return activeEl;\n};\nexport const DEFAULT_DESKTOP_MODE_MEDIA_QUERY = '@media (pointer: fine)';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useSlotProps } from '@mui/base/utils';\nimport Grow from '@mui/material/Grow';\nimport MuiPaper from '@mui/material/Paper';\nimport MuiPopper from '@mui/material/Popper';\nimport MuiTrapFocus from '@mui/material/Unstable_TrapFocus';\nimport { unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_ownerDocument as ownerDocument, unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { getPickersPopperUtilityClass } from './pickersPopperClasses';\nimport { getActiveElement } from '../utils/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPickersPopperUtilityClass, classes);\n};\nconst PickersPopperRoot = styled(MuiPopper, {\n name: 'MuiPickersPopper',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})(({\n theme\n}) => ({\n zIndex: theme.zIndex.modal\n}));\nconst PickersPopperPaper = styled(MuiPaper, {\n name: 'MuiPickersPopper',\n slot: 'Paper',\n overridesResolver: (_, styles) => styles.paper\n})(({\n ownerState\n}) => _extends({\n transformOrigin: 'top center',\n outline: 0\n}, ownerState.placement === 'top' && {\n transformOrigin: 'bottom center'\n}));\nfunction clickedRootScrollbar(event, doc) {\n return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;\n}\n/**\n * Based on @mui/material/ClickAwayListener without the customization.\n * We can probably strip away even more since children won't be portaled.\n * @param {boolean} active Only listen to clicks when the popper is opened.\n * @param {(event: MouseEvent | TouchEvent) => void} onClickAway The callback to call when clicking outside the popper.\n * @returns {Array} The ref and event handler to listen to the outside clicks.\n */\nfunction useClickAwayListener(active, onClickAway) {\n const movedRef = React.useRef(false);\n const syntheticEventRef = React.useRef(false);\n const nodeRef = React.useRef(null);\n const activatedRef = React.useRef(false);\n React.useEffect(() => {\n if (!active) {\n return undefined;\n }\n\n // Ensure that this hook is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n function armClickAwayListener() {\n activatedRef.current = true;\n }\n document.addEventListener('mousedown', armClickAwayListener, true);\n document.addEventListener('touchstart', armClickAwayListener, true);\n return () => {\n document.removeEventListener('mousedown', armClickAwayListener, true);\n document.removeEventListener('touchstart', armClickAwayListener, true);\n activatedRef.current = false;\n };\n }, [active]);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n const handleClickAway = useEventCallback(event => {\n if (!activatedRef.current) {\n return;\n }\n\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false;\n const doc = ownerDocument(nodeRef.current);\n\n // 1. IE11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n if (!nodeRef.current ||\n // is a TouchEvent?\n 'clientX' in event && clickedRootScrollbar(event, doc)) {\n return;\n }\n\n // Do not act if user performed touchmove\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n let insideDOM;\n\n // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n if (!insideDOM && !insideReactTree) {\n onClickAway(event);\n }\n });\n\n // Keep track of mouse/touch events that bubbled up through the portal.\n const handleSynthetic = () => {\n syntheticEventRef.current = true;\n };\n React.useEffect(() => {\n if (active) {\n const doc = ownerDocument(nodeRef.current);\n const handleTouchMove = () => {\n movedRef.current = true;\n };\n doc.addEventListener('touchstart', handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return () => {\n doc.removeEventListener('touchstart', handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n return undefined;\n }, [active, handleClickAway]);\n React.useEffect(() => {\n // TODO This behavior is not tested automatically\n // It's unclear whether this is due to different update semantics in test (batched in act() vs discrete on click).\n // Or if this is a timing related issues due to different Transition components\n // Once we get rid of all the manual scheduling (e.g. setTimeout(update, 0)) we can revisit this code+test.\n if (active) {\n const doc = ownerDocument(nodeRef.current);\n doc.addEventListener('click', handleClickAway);\n return () => {\n doc.removeEventListener('click', handleClickAway);\n // cleanup `handleClickAway`\n syntheticEventRef.current = false;\n };\n }\n return undefined;\n }, [active, handleClickAway]);\n return [nodeRef, handleSynthetic, handleSynthetic];\n}\nexport function PickersPopper(inProps) {\n var _slots$desktopTransit, _slots$desktopTrapFoc, _slots$desktopPaper, _slots$popper;\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersPopper'\n });\n const {\n anchorEl,\n children,\n containerRef = null,\n shouldRestoreFocus,\n onBlur,\n onDismiss,\n open,\n role,\n placement,\n slots,\n slotProps\n } = props;\n React.useEffect(() => {\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Blink?) use 'Esc'\n if (open && (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc')) {\n onDismiss();\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [onDismiss, open]);\n const lastFocusedElementRef = React.useRef(null);\n React.useEffect(() => {\n if (role === 'tooltip' || shouldRestoreFocus && !shouldRestoreFocus()) {\n return;\n }\n if (open) {\n lastFocusedElementRef.current = getActiveElement(document);\n } else if (lastFocusedElementRef.current && lastFocusedElementRef.current instanceof HTMLElement) {\n // make sure the button is flushed with updated label, before returning focus to it\n // avoids issue, where screen reader could fail to announce selected date after selection\n setTimeout(() => {\n if (lastFocusedElementRef.current instanceof HTMLElement) {\n lastFocusedElementRef.current.focus();\n }\n });\n }\n }, [open, role, shouldRestoreFocus]);\n const [clickAwayRef, onPaperClick, onPaperTouchStart] = useClickAwayListener(open, onBlur != null ? onBlur : onDismiss);\n const paperRef = React.useRef(null);\n const handleRef = useForkRef(paperRef, containerRef);\n const handlePaperRef = useForkRef(handleRef, clickAwayRef);\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const handleKeyDown = event => {\n if (event.key === 'Escape') {\n // stop the propagation to avoid closing parent modal\n event.stopPropagation();\n onDismiss();\n }\n };\n const Transition = (_slots$desktopTransit = slots == null ? void 0 : slots.desktopTransition) != null ? _slots$desktopTransit : Grow;\n const TrapFocus = (_slots$desktopTrapFoc = slots == null ? void 0 : slots.desktopTrapFocus) != null ? _slots$desktopTrapFoc : MuiTrapFocus;\n const Paper = (_slots$desktopPaper = slots == null ? void 0 : slots.desktopPaper) != null ? _slots$desktopPaper : PickersPopperPaper;\n const paperProps = useSlotProps({\n elementType: Paper,\n externalSlotProps: slotProps == null ? void 0 : slotProps.desktopPaper,\n additionalProps: {\n tabIndex: -1,\n elevation: 8,\n ref: handlePaperRef\n },\n className: classes.paper,\n ownerState: {} // Is overridden below to use `placement\n });\n\n const Popper = (_slots$popper = slots == null ? void 0 : slots.popper) != null ? _slots$popper : PickersPopperRoot;\n const popperProps = useSlotProps({\n elementType: Popper,\n externalSlotProps: slotProps == null ? void 0 : slotProps.popper,\n additionalProps: {\n transition: true,\n role,\n open,\n anchorEl,\n placement,\n onKeyDown: handleKeyDown\n },\n className: classes.root,\n ownerState: props\n });\n return /*#__PURE__*/_jsx(Popper, _extends({}, popperProps, {\n children: ({\n TransitionProps,\n placement: popperPlacement\n }) => /*#__PURE__*/_jsx(TrapFocus, _extends({\n open: open,\n disableAutoFocus: true\n // pickers are managing focus position manually\n // without this prop the focus is returned to the button before `aria-label` is updated\n // which would force screen readers to read too old label\n ,\n disableRestoreFocus: true,\n disableEnforceFocus: role === 'tooltip',\n isEnabled: () => true\n }, slotProps == null ? void 0 : slotProps.desktopTrapFocus, {\n children: /*#__PURE__*/_jsx(Transition, _extends({}, TransitionProps, slotProps == null ? void 0 : slotProps.desktopTransition, {\n children: /*#__PURE__*/_jsx(Paper, _extends({}, paperProps, {\n onClick: event => {\n var _paperProps$onClick;\n onPaperClick(event);\n (_paperProps$onClick = paperProps.onClick) == null ? void 0 : _paperProps$onClick.call(paperProps, event);\n },\n onTouchStart: event => {\n var _paperProps$onTouchSt;\n onPaperTouchStart(event);\n (_paperProps$onTouchSt = paperProps.onTouchStart) == null ? void 0 : _paperProps$onTouchSt.call(paperProps, event);\n },\n ownerState: _extends({}, ownerState, {\n placement: popperPlacement\n }),\n children: children\n }))\n }))\n }))\n }));\n}","import * as React from 'react';\nexport const useOpenState = ({\n open,\n onOpen,\n onClose\n}) => {\n const isControllingOpenProp = React.useRef(typeof open === 'boolean').current;\n const [openState, setIsOpenState] = React.useState(false);\n\n // It is required to update inner state in useEffect in order to avoid situation when\n // Our component is not mounted yet, but `open` state is set to `true` (e.g. initially opened)\n React.useEffect(() => {\n if (isControllingOpenProp) {\n if (typeof open !== 'boolean') {\n throw new Error('You must not mix controlling and uncontrolled mode for `open` prop');\n }\n setIsOpenState(open);\n }\n }, [isControllingOpenProp, open]);\n const setIsOpen = React.useCallback(newIsOpen => {\n if (!isControllingOpenProp) {\n setIsOpenState(newIsOpen);\n }\n if (newIsOpen && onOpen) {\n onOpen();\n }\n if (!newIsOpen && onClose) {\n onClose();\n }\n }, [isControllingOpenProp, onOpen, onClose]);\n return {\n isOpen: openState,\n setIsOpen\n };\n};","import * as React from 'react';\nimport { useLocalizationContext } from './useUtils';\nexport function useValidation(props, validate, isSameError, defaultErrorState) {\n const {\n value,\n onError\n } = props;\n const adapter = useLocalizationContext();\n const previousValidationErrorRef = React.useRef(defaultErrorState);\n const validationError = validate({\n adapter,\n value,\n props\n });\n React.useEffect(() => {\n if (onError && !isSameError(validationError, previousValidationErrorRef.current)) {\n onError(validationError, value);\n }\n previousValidationErrorRef.current = validationError;\n }, [isSameError, onError, previousValidationErrorRef, validationError, value]);\n return validationError;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_useControlled as useControlled } from '@mui/utils';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useOpenState } from '../useOpenState';\nimport { useLocalizationContext, useUtils } from '../useUtils';\nimport { useValidation } from '../useValidation';\nimport { useValueWithTimezone } from '../useValueWithTimezone';\n\n/**\n * Decide if the new value should be published\n * The published value will be passed to `onChange` if defined.\n */\nconst shouldPublishValue = params => {\n const {\n action,\n hasChanged,\n dateState,\n isControlled\n } = params;\n const isCurrentValueTheDefaultValue = !isControlled && !dateState.hasBeenModifiedSinceMount;\n\n // The field is responsible for only calling `onChange` when needed.\n if (action.name === 'setValueFromField') {\n return true;\n }\n if (action.name === 'setValueFromAction') {\n // If the component is not controlled, and the value has not been modified since the mount,\n // Then we want to publish the default value whenever the user pressed the \"Accept\", \"Today\" or \"Clear\" button.\n if (isCurrentValueTheDefaultValue && ['accept', 'today', 'clear'].includes(action.pickerAction)) {\n return true;\n }\n return hasChanged(dateState.lastPublishedValue);\n }\n if (action.name === 'setValueFromView' && action.selectionState !== 'shallow') {\n // On the first view,\n // If the value is not controlled, then clicking on any value (including the one equal to `defaultValue`) should call `onChange`\n if (isCurrentValueTheDefaultValue) {\n return true;\n }\n return hasChanged(dateState.lastPublishedValue);\n }\n if (action.name === 'setValueFromShortcut' && action.changeImportance === 'accept') {\n // On the first view,\n // If the value is not controlled, then clicking on any value (including the one equal to `defaultValue`) should call `onChange`\n if (isCurrentValueTheDefaultValue) {\n return true;\n }\n return hasChanged(dateState.lastPublishedValue);\n }\n return false;\n};\n\n/**\n * Decide if the new value should be committed.\n * The committed value will be passed to `onAccept` if defined.\n * It will also be used as a reset target when calling the `cancel` picker action (when clicking on the \"Cancel\" button).\n */\nconst shouldCommitValue = params => {\n const {\n action,\n hasChanged,\n dateState,\n isControlled,\n closeOnSelect\n } = params;\n const isCurrentValueTheDefaultValue = !isControlled && !dateState.hasBeenModifiedSinceMount;\n if (action.name === 'setValueFromAction') {\n // If the component is not controlled, and the value has not been modified since the mount,\n // Then we want to commit the default value whenever the user pressed the \"Accept\", \"Today\" or \"Clear\" button.\n if (isCurrentValueTheDefaultValue && ['accept', 'today', 'clear'].includes(action.pickerAction)) {\n return true;\n }\n return hasChanged(dateState.lastCommittedValue);\n }\n if (action.name === 'setValueFromView' && action.selectionState === 'finish' && closeOnSelect) {\n // On picker where the 1st view is also the last view,\n // If the value is not controlled, then clicking on any value (including the one equal to `defaultValue`) should call `onAccept`\n if (isCurrentValueTheDefaultValue) {\n return true;\n }\n return hasChanged(dateState.lastCommittedValue);\n }\n if (action.name === 'setValueFromShortcut') {\n return action.changeImportance === 'accept' && hasChanged(dateState.lastCommittedValue);\n }\n return false;\n};\n\n/**\n * Decide if the picker should be closed after the value is updated.\n */\nconst shouldClosePicker = params => {\n const {\n action,\n closeOnSelect\n } = params;\n if (action.name === 'setValueFromAction') {\n return true;\n }\n if (action.name === 'setValueFromView') {\n return action.selectionState === 'finish' && closeOnSelect;\n }\n if (action.name === 'setValueFromShortcut') {\n return action.changeImportance === 'accept';\n }\n return false;\n};\n\n/**\n * Manage the value lifecycle of all the pickers.\n */\nexport const usePickerValue = ({\n props,\n valueManager,\n valueType,\n wrapperVariant,\n validator\n}) => {\n const {\n onAccept,\n onChange,\n value: inValue,\n defaultValue: inDefaultValue,\n closeOnSelect = wrapperVariant === 'desktop',\n selectedSections: selectedSectionsProp,\n onSelectedSectionsChange,\n timezone: timezoneProp\n } = props;\n const {\n current: defaultValue\n } = React.useRef(inDefaultValue);\n const {\n current: isControlled\n } = React.useRef(inValue !== undefined);\n\n /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (inValue !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled value of a picker to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled value` + 'for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [inValue]);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== inDefaultValue) {\n console.error([`MUI: A component is changing the defaultValue of an uncontrolled picker after being initialized. ` + `To suppress this warning opt to use a controlled value.`].join('\\n'));\n }\n }, [JSON.stringify(defaultValue)]);\n }\n /* eslint-enable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\n\n const utils = useUtils();\n const adapter = useLocalizationContext();\n const [selectedSections, setSelectedSections] = useControlled({\n controlled: selectedSectionsProp,\n default: null,\n name: 'usePickerValue',\n state: 'selectedSections'\n });\n const {\n isOpen,\n setIsOpen\n } = useOpenState(props);\n const [dateState, setDateState] = React.useState(() => {\n let initialValue;\n if (inValue !== undefined) {\n initialValue = inValue;\n } else if (defaultValue !== undefined) {\n initialValue = defaultValue;\n } else {\n initialValue = valueManager.emptyValue;\n }\n return {\n draft: initialValue,\n lastPublishedValue: initialValue,\n lastCommittedValue: initialValue,\n lastControlledValue: inValue,\n hasBeenModifiedSinceMount: false\n };\n });\n const {\n timezone,\n handleValueChange\n } = useValueWithTimezone({\n timezone: timezoneProp,\n value: inValue,\n defaultValue,\n onChange,\n valueManager\n });\n useValidation(_extends({}, props, {\n value: dateState.draft,\n timezone\n }), validator, valueManager.isSameError, valueManager.defaultErrorState);\n const updateDate = useEventCallback(action => {\n const updaterParams = {\n action,\n dateState,\n hasChanged: comparison => !valueManager.areValuesEqual(utils, action.value, comparison),\n isControlled,\n closeOnSelect\n };\n const shouldPublish = shouldPublishValue(updaterParams);\n const shouldCommit = shouldCommitValue(updaterParams);\n const shouldClose = shouldClosePicker(updaterParams);\n setDateState(prev => _extends({}, prev, {\n draft: action.value,\n lastPublishedValue: shouldPublish ? action.value : prev.lastPublishedValue,\n lastCommittedValue: shouldCommit ? action.value : prev.lastCommittedValue,\n hasBeenModifiedSinceMount: true\n }));\n if (shouldPublish) {\n const validationError = action.name === 'setValueFromField' ? action.context.validationError : validator({\n adapter,\n value: action.value,\n props: _extends({}, props, {\n value: action.value,\n timezone\n })\n });\n const context = {\n validationError\n };\n handleValueChange(action.value, context);\n }\n if (shouldCommit && onAccept) {\n onAccept(action.value);\n }\n if (shouldClose) {\n setIsOpen(false);\n }\n });\n if (inValue !== undefined && (dateState.lastControlledValue === undefined || !valueManager.areValuesEqual(utils, dateState.lastControlledValue, inValue))) {\n const isUpdateComingFromPicker = valueManager.areValuesEqual(utils, dateState.draft, inValue);\n setDateState(prev => _extends({}, prev, {\n lastControlledValue: inValue\n }, isUpdateComingFromPicker ? {} : {\n lastCommittedValue: inValue,\n lastPublishedValue: inValue,\n draft: inValue,\n hasBeenModifiedSinceMount: true\n }));\n }\n const handleClear = useEventCallback(() => {\n updateDate({\n value: valueManager.emptyValue,\n name: 'setValueFromAction',\n pickerAction: 'clear'\n });\n });\n const handleAccept = useEventCallback(() => {\n updateDate({\n value: dateState.lastPublishedValue,\n name: 'setValueFromAction',\n pickerAction: 'accept'\n });\n });\n const handleDismiss = useEventCallback(() => {\n updateDate({\n value: dateState.lastPublishedValue,\n name: 'setValueFromAction',\n pickerAction: 'dismiss'\n });\n });\n const handleCancel = useEventCallback(() => {\n updateDate({\n value: dateState.lastCommittedValue,\n name: 'setValueFromAction',\n pickerAction: 'cancel'\n });\n });\n const handleSetToday = useEventCallback(() => {\n updateDate({\n value: valueManager.getTodayValue(utils, timezone, valueType),\n name: 'setValueFromAction',\n pickerAction: 'today'\n });\n });\n const handleOpen = useEventCallback(() => setIsOpen(true));\n const handleClose = useEventCallback(() => setIsOpen(false));\n const handleChange = useEventCallback((newValue, selectionState = 'partial') => updateDate({\n name: 'setValueFromView',\n value: newValue,\n selectionState\n }));\n const handleSelectShortcut = useEventCallback((newValue, changeImportance) => updateDate({\n name: 'setValueFromShortcut',\n value: newValue,\n changeImportance: changeImportance != null ? changeImportance : 'accept'\n }));\n const handleChangeFromField = useEventCallback((newValue, context) => updateDate({\n name: 'setValueFromField',\n value: newValue,\n context\n }));\n const handleFieldSelectedSectionsChange = useEventCallback(newSelectedSections => {\n setSelectedSections(newSelectedSections);\n onSelectedSectionsChange == null ? void 0 : onSelectedSectionsChange(newSelectedSections);\n });\n const actions = {\n onClear: handleClear,\n onAccept: handleAccept,\n onDismiss: handleDismiss,\n onCancel: handleCancel,\n onSetToday: handleSetToday,\n onOpen: handleOpen,\n onClose: handleClose\n };\n const fieldResponse = {\n value: dateState.draft,\n onChange: handleChangeFromField,\n selectedSections,\n onSelectedSectionsChange: handleFieldSelectedSectionsChange\n };\n const viewValue = React.useMemo(() => valueManager.cleanValue(utils, dateState.draft), [utils, valueManager, dateState.draft]);\n const viewResponse = {\n value: viewValue,\n onChange: handleChange,\n onClose: handleClose,\n open: isOpen,\n onSelectedSectionsChange: handleFieldSelectedSectionsChange\n };\n const isValid = testedValue => {\n const error = validator({\n adapter,\n value: testedValue,\n props: _extends({}, props, {\n value: testedValue,\n timezone\n })\n });\n return !valueManager.hasError(error);\n };\n const layoutResponse = _extends({}, actions, {\n value: viewValue,\n onChange: handleChange,\n onSelectShortcut: handleSelectShortcut,\n isValid\n });\n return {\n open: isOpen,\n fieldProps: fieldResponse,\n viewProps: viewResponse,\n layoutProps: layoutResponse,\n actions\n };\n};","import * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { unstable_useControlled as useControlled } from '@mui/utils';\nlet warnedOnceNotValidView = false;\nexport function useViews({\n onChange,\n onViewChange,\n openTo,\n view: inView,\n views,\n autoFocus,\n focusedView: inFocusedView,\n onFocusedViewChange\n}) {\n var _views, _views2;\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnceNotValidView) {\n if (inView != null && !views.includes(inView)) {\n console.warn(`MUI: \\`view=\"${inView}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n if (inView == null && openTo != null && !views.includes(openTo)) {\n console.warn(`MUI: \\`openTo=\"${openTo}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n }\n }\n const previousOpenTo = React.useRef(openTo);\n const previousViews = React.useRef(views);\n const defaultView = React.useRef(views.includes(openTo) ? openTo : views[0]);\n const [view, setView] = useControlled({\n name: 'useViews',\n state: 'view',\n controlled: inView,\n default: defaultView.current\n });\n const defaultFocusedView = React.useRef(autoFocus ? view : null);\n const [focusedView, setFocusedView] = useControlled({\n name: 'useViews',\n state: 'focusedView',\n controlled: inFocusedView,\n default: defaultFocusedView.current\n });\n React.useEffect(() => {\n // Update the current view when `openTo` or `views` props change\n if (previousOpenTo.current && previousOpenTo.current !== openTo || previousViews.current && previousViews.current.some(previousView => !views.includes(previousView))) {\n setView(views.includes(openTo) ? openTo : views[0]);\n previousViews.current = views;\n previousOpenTo.current = openTo;\n }\n }, [openTo, setView, view, views]);\n const viewIndex = views.indexOf(view);\n const previousView = (_views = views[viewIndex - 1]) != null ? _views : null;\n const nextView = (_views2 = views[viewIndex + 1]) != null ? _views2 : null;\n const handleFocusedViewChange = useEventCallback((viewToFocus, hasFocus) => {\n if (hasFocus) {\n // Focus event\n setFocusedView(viewToFocus);\n } else {\n // Blur event\n setFocusedView(prevFocusedView => viewToFocus === prevFocusedView ? null : prevFocusedView // If false the blur is due to view switching\n );\n }\n\n onFocusedViewChange == null ? void 0 : onFocusedViewChange(viewToFocus, hasFocus);\n });\n const handleChangeView = useEventCallback(newView => {\n if (newView === view) {\n return;\n }\n setView(newView);\n handleFocusedViewChange(newView, true);\n if (onViewChange) {\n onViewChange(newView);\n }\n });\n const goToNextView = useEventCallback(() => {\n if (nextView) {\n handleChangeView(nextView);\n }\n handleFocusedViewChange(nextView, true);\n });\n const setValueAndGoToNextView = useEventCallback((value, currentViewSelectionState, selectedView) => {\n const isSelectionFinishedOnCurrentView = currentViewSelectionState === 'finish';\n const hasMoreViews = selectedView ?\n // handles case like `DateTimePicker`, where a view might return a `finish` selection state\n // but we it's not the final view given all `views` -> overall selection state should be `partial`.\n views.indexOf(selectedView) < views.length - 1 : Boolean(nextView);\n const globalSelectionState = isSelectionFinishedOnCurrentView && hasMoreViews ? 'partial' : currentViewSelectionState;\n onChange(value, globalSelectionState);\n if (isSelectionFinishedOnCurrentView) {\n goToNextView();\n }\n });\n const setValueAndGoToView = useEventCallback((value, newView, selectedView) => {\n onChange(value, newView ? 'partial' : 'finish', selectedView);\n if (newView) {\n handleChangeView(newView);\n handleFocusedViewChange(newView, true);\n }\n });\n return {\n view,\n setView: handleChangeView,\n focusedView,\n setFocusedView: handleFocusedViewChange,\n nextView,\n previousView,\n defaultView: defaultView.current,\n goToNextView,\n setValueAndGoToNextView,\n setValueAndGoToView\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"sx\"];\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useViews } from '../useViews';\nimport { isTimeView } from '../../utils/time-utils';\n\n/**\n * Props used to handle the views that are common to all pickers.\n */\n\n/**\n * Props used to handle the views of the pickers.\n */\n\n/**\n * Props used to handle the value of the pickers.\n */\n\n/**\n * Manage the views of all the pickers:\n * - Handles the view switch\n * - Handles the switch between UI views and field views\n * - Handles the focus management when switching views\n */\nexport const usePickerViews = ({\n props,\n propsFromPickerValue,\n additionalViewProps,\n inputRef,\n autoFocusView\n}) => {\n const {\n onChange,\n open,\n onSelectedSectionsChange,\n onClose\n } = propsFromPickerValue;\n const {\n views,\n openTo,\n onViewChange,\n disableOpenPicker,\n viewRenderers,\n timezone\n } = props;\n const propsToForwardToView = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n view,\n setView,\n defaultView,\n focusedView,\n setFocusedView,\n setValueAndGoToNextView\n } = useViews({\n view: undefined,\n views,\n openTo,\n onChange,\n onViewChange,\n autoFocus: autoFocusView\n });\n const {\n hasUIView,\n viewModeLookup\n } = React.useMemo(() => views.reduce((acc, viewForReduce) => {\n let viewMode;\n if (disableOpenPicker) {\n viewMode = 'field';\n } else if (viewRenderers[viewForReduce] != null) {\n viewMode = 'UI';\n } else {\n viewMode = 'field';\n }\n acc.viewModeLookup[viewForReduce] = viewMode;\n if (viewMode === 'UI') {\n acc.hasUIView = true;\n }\n return acc;\n }, {\n hasUIView: false,\n viewModeLookup: {}\n }), [disableOpenPicker, viewRenderers, views]);\n const timeViewsCount = React.useMemo(() => views.reduce((acc, viewForReduce) => {\n if (viewRenderers[viewForReduce] != null && isTimeView(viewForReduce)) {\n return acc + 1;\n }\n return acc;\n }, 0), [viewRenderers, views]);\n const currentViewMode = viewModeLookup[view];\n const shouldRestoreFocus = useEventCallback(() => currentViewMode === 'UI');\n const [popperView, setPopperView] = React.useState(currentViewMode === 'UI' ? view : null);\n if (popperView !== view && viewModeLookup[view] === 'UI') {\n setPopperView(view);\n }\n useEnhancedEffect(() => {\n // Handle case of `DateTimePicker` without time renderers\n if (currentViewMode === 'field' && open) {\n onClose();\n setTimeout(() => {\n // focusing the input before the range selection is done\n // calling `onSelectedSectionsChange` outside of timeout results in an inconsistent behavior between Safari And Chrome\n inputRef == null ? void 0 : inputRef.current.focus();\n onSelectedSectionsChange(view);\n });\n }\n }, [view]); // eslint-disable-line react-hooks/exhaustive-deps\n\n useEnhancedEffect(() => {\n if (!open) {\n return;\n }\n let newView = view;\n\n // If the current view is a field view, go to the last popper view\n if (currentViewMode === 'field' && popperView != null) {\n newView = popperView;\n }\n\n // If the current view is not the default view and both are UI views\n if (newView !== defaultView && viewModeLookup[newView] === 'UI' && viewModeLookup[defaultView] === 'UI') {\n newView = defaultView;\n }\n if (newView !== view) {\n setView(newView);\n }\n setFocusedView(newView, true);\n }, [open]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const layoutProps = {\n views,\n view: popperView,\n onViewChange: setView\n };\n return {\n hasUIView,\n shouldRestoreFocus,\n layoutProps,\n renderCurrentView: () => {\n if (popperView == null) {\n return null;\n }\n const renderer = viewRenderers[popperView];\n if (renderer == null) {\n return null;\n }\n return renderer(_extends({}, propsToForwardToView, additionalViewProps, propsFromPickerValue, {\n views,\n timezone,\n onChange: setValueAndGoToNextView,\n view: popperView,\n onViewChange: setView,\n focusedView,\n onFocusedViewChange: setFocusedView,\n showViewSwitcher: timeViewsCount > 1,\n timeViewsCount\n }));\n }\n };\n};","import * as React from 'react';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { arrayIncludes } from '../utils/utils';\nfunction getOrientation() {\n if (typeof window === 'undefined') {\n return 'portrait';\n }\n if (window.screen && window.screen.orientation && window.screen.orientation.angle) {\n return Math.abs(window.screen.orientation.angle) === 90 ? 'landscape' : 'portrait';\n }\n\n // Support IOS safari\n if (window.orientation) {\n return Math.abs(Number(window.orientation)) === 90 ? 'landscape' : 'portrait';\n }\n return 'portrait';\n}\nexport const useIsLandscape = (views, customOrientation) => {\n const [orientation, setOrientation] = React.useState(getOrientation);\n useEnhancedEffect(() => {\n const eventHandler = () => {\n setOrientation(getOrientation());\n };\n window.addEventListener('orientationchange', eventHandler);\n return () => {\n window.removeEventListener('orientationchange', eventHandler);\n };\n }, []);\n if (arrayIncludes(views, ['hours', 'minutes', 'seconds'])) {\n // could not display 13:34:44 in landscape mode\n return false;\n }\n const orientationToUse = customOrientation || orientation;\n return orientationToUse === 'landscape';\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useIsLandscape } from '../useIsLandscape';\n\n/**\n * Props used to create the layout of the views.\n * Those props are exposed on all the pickers.\n */\n\n/**\n * Prepare the props for the view layout (managed by `PickersLayout`)\n */\nexport const usePickerLayoutProps = ({\n props,\n propsFromPickerValue,\n propsFromPickerViews,\n wrapperVariant\n}) => {\n const {\n orientation\n } = props;\n const isLandscape = useIsLandscape(propsFromPickerViews.views, orientation);\n const layoutProps = _extends({}, propsFromPickerViews, propsFromPickerValue, {\n isLandscape,\n wrapperVariant,\n disabled: props.disabled,\n readOnly: props.readOnly\n });\n return {\n layoutProps\n };\n};","import { usePickerValue } from './usePickerValue';\nimport { usePickerViews } from './usePickerViews';\nimport { usePickerLayoutProps } from './usePickerLayoutProps';\nimport { buildWarning } from '../../utils/warning';\nconst warnRenderInputIsDefined = buildWarning(['The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);\nexport const usePicker = ({\n props,\n valueManager,\n valueType,\n wrapperVariant,\n inputRef,\n additionalViewProps,\n validator,\n autoFocusView\n}) => {\n if (process.env.NODE_ENV !== 'production') {\n if (props.renderInput != null) {\n warnRenderInputIsDefined();\n }\n }\n const pickerValueResponse = usePickerValue({\n props,\n valueManager,\n valueType,\n wrapperVariant,\n validator\n });\n const pickerViewsResponse = usePickerViews({\n props,\n inputRef,\n additionalViewProps,\n autoFocusView,\n propsFromPickerValue: pickerValueResponse.viewProps\n });\n const pickerLayoutResponse = usePickerLayoutProps({\n props,\n wrapperVariant,\n propsFromPickerValue: pickerValueResponse.layoutProps,\n propsFromPickerViews: pickerViewsResponse.layoutProps\n });\n return {\n // Picker value\n open: pickerValueResponse.open,\n actions: pickerValueResponse.actions,\n fieldProps: pickerValueResponse.fieldProps,\n // Picker views\n renderCurrentView: pickerViewsResponse.renderCurrentView,\n hasUIView: pickerViewsResponse.hasUIView,\n shouldRestoreFocus: pickerViewsResponse.shouldRestoreFocus,\n // Picker layout\n layoutProps: pickerLayoutResponse.layoutProps\n };\n};","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersLayoutUtilityClass(slot) {\n return generateUtilityClass('MuiPickersLayout', slot);\n}\nexport const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'shortcuts']);","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getDialogActionsUtilityClass(slot) {\n return generateUtilityClass('MuiDialogActions', slot);\n}\nconst dialogActionsClasses = generateUtilityClasses('MuiDialogActions', ['root', 'spacing']);\nexport default dialogActionsClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getDialogActionsUtilityClass } from \"./dialogActionsClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableSpacing\n } = ownerState;\n const slots = {\n root: ['root', !disableSpacing && 'spacing']\n };\n return composeClasses(slots, getDialogActionsUtilityClass, classes);\n};\nconst DialogActionsRoot = styled('div', {\n name: 'MuiDialogActions',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableSpacing && styles.spacing];\n }\n})({\n display: 'flex',\n alignItems: 'center',\n padding: 8,\n justifyContent: 'flex-end',\n flex: '0 0 auto',\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.disableSpacing,\n style: {\n '& > :not(style) ~ :not(style)': {\n marginLeft: 8\n }\n }\n }]\n});\nconst DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiDialogActions'\n });\n const {\n className,\n disableSpacing = false,\n ...other\n } = props;\n const ownerState = {\n ...props,\n disableSpacing\n };\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(DialogActionsRoot, {\n className: clsx(classes.root, className),\n ownerState: ownerState,\n ref: ref,\n ...other\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? DialogActions.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport default DialogActions;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onAccept\", \"onClear\", \"onCancel\", \"onSetToday\", \"actions\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@mui/material/Button';\nimport DialogActions from '@mui/material/DialogActions';\nimport { useLocaleText } from '../internals/hooks/useUtils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction PickersActionBar(props) {\n const {\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n actions\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const localeText = useLocaleText();\n if (actions == null || actions.length === 0) {\n return null;\n }\n const buttons = actions == null ? void 0 : actions.map(actionType => {\n switch (actionType) {\n case 'clear':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onClear,\n children: localeText.clearButtonLabel\n }, actionType);\n case 'cancel':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onCancel,\n children: localeText.cancelButtonLabel\n }, actionType);\n case 'accept':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onAccept,\n children: localeText.okButtonLabel\n }, actionType);\n case 'today':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onSetToday,\n children: localeText.todayButtonLabel\n }, actionType);\n default:\n return null;\n }\n });\n return /*#__PURE__*/_jsx(DialogActions, _extends({}, other, {\n children: buttons\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? PickersActionBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Ordered array of actions to display.\n * If empty, does not display that action bar.\n * @default `['cancel', 'accept']` for mobile and `[]` for desktop\n */\n actions: PropTypes.arrayOf(PropTypes.oneOf(['accept', 'cancel', 'clear', 'today']).isRequired),\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n onAccept: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n onSetToday: PropTypes.func.isRequired,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { PickersActionBar };","export const DAY_SIZE = 36;\nexport const DAY_MARGIN = 2;\nexport const DIALOG_WIDTH = 320;\nexport const VIEW_HEIGHT = 358;\nexport const DIGITAL_CLOCK_VIEW_HEIGHT = 232;\nexport const MULTI_SECTION_CLOCK_SECTION_WIDTH = 48;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"items\", \"changeImportance\", \"isLandscape\", \"onChange\", \"isValid\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport Chip from '@mui/material/Chip';\nimport { VIEW_HEIGHT } from '../internals/constants/dimensions';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction PickersShortcuts(props) {\n const {\n items,\n changeImportance,\n onChange,\n isValid\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n if (items == null || items.length === 0) {\n return null;\n }\n const resolvedItems = items.map(item => {\n const newValue = item.getValue({\n isValid\n });\n return {\n label: item.label,\n onClick: () => {\n onChange(newValue, changeImportance);\n },\n disabled: !isValid(newValue)\n };\n });\n return /*#__PURE__*/_jsx(List, _extends({\n dense: true,\n sx: [{\n maxHeight: VIEW_HEIGHT,\n maxWidth: 200,\n overflow: 'auto'\n }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]\n }, other, {\n children: resolvedItems.map(item => {\n return /*#__PURE__*/_jsx(ListItem, {\n children: /*#__PURE__*/_jsx(Chip, _extends({}, item))\n }, item.label);\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? PickersShortcuts.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Importance of the change when picking a shortcut:\n * - \"accept\": fires `onChange`, fires `onAccept` and closes the picker.\n * - \"set\": fires `onChange` but do not fire `onAccept` and does not close the picker.\n * @default \"accept\"\n */\n changeImportance: PropTypes.oneOf(['accept', 'set']),\n className: PropTypes.string,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n isLandscape: PropTypes.bool.isRequired,\n isValid: PropTypes.func.isRequired,\n /**\n * Ordered array of shortcuts to display.\n * If empty, does not display the shortcuts.\n * @default `[]`\n */\n items: PropTypes.arrayOf(PropTypes.shape({\n getValue: PropTypes.func.isRequired,\n label: PropTypes.string.isRequired\n })),\n onChange: PropTypes.func.isRequired,\n style: PropTypes.object,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { PickersShortcuts };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useSlotProps } from '@mui/base/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { PickersActionBar } from '../PickersActionBar';\nimport { getPickersLayoutUtilityClass } from './pickersLayoutClasses';\nimport { PickersShortcuts } from '../PickersShortcuts';\nimport { uncapitalizeObjectKeys } from '../internals/utils/slots-migration';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction toolbarHasView(toolbarProps) {\n return toolbarProps.view !== null;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n isLandscape\n } = ownerState;\n const slots = {\n root: ['root', isLandscape && 'landscape'],\n contentWrapper: ['contentWrapper'],\n toolbar: ['toolbar'],\n actionBar: ['actionBar'],\n tabs: ['tabs'],\n landscape: ['landscape'],\n shortcuts: ['shortcuts']\n };\n return composeClasses(slots, getPickersLayoutUtilityClass, classes);\n};\nconst usePickerLayout = props => {\n var _slots$actionBar, _slots$shortcuts;\n const {\n wrapperVariant,\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n view,\n views,\n onViewChange,\n value,\n onChange,\n onSelectShortcut,\n isValid,\n isLandscape,\n disabled,\n readOnly,\n children,\n components,\n componentsProps,\n slots: innerSlots,\n slotProps: innerSlotProps\n // TODO: Remove this \"as\" hack. It get introduced to mark `value` prop in PickersLayoutProps as not required.\n // The true type should be\n // - For pickers value: TDate | null\n // - For range pickers value: [TDate | null, TDate | null]\n } = props;\n const slots = innerSlots != null ? innerSlots : uncapitalizeObjectKeys(components);\n const slotProps = innerSlotProps != null ? innerSlotProps : componentsProps;\n const classes = useUtilityClasses(props);\n\n // Action bar\n\n const ActionBar = (_slots$actionBar = slots == null ? void 0 : slots.actionBar) != null ? _slots$actionBar : PickersActionBar;\n const actionBarProps = useSlotProps({\n elementType: ActionBar,\n externalSlotProps: slotProps == null ? void 0 : slotProps.actionBar,\n additionalProps: {\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n actions: wrapperVariant === 'desktop' ? [] : ['cancel', 'accept'],\n className: classes.actionBar\n },\n ownerState: _extends({}, props, {\n wrapperVariant\n })\n });\n const actionBar = /*#__PURE__*/_jsx(ActionBar, _extends({}, actionBarProps));\n\n // Toolbar\n\n const Toolbar = slots == null ? void 0 : slots.toolbar;\n const toolbarProps = useSlotProps({\n elementType: Toolbar,\n externalSlotProps: slotProps == null ? void 0 : slotProps.toolbar,\n additionalProps: {\n isLandscape,\n onChange,\n value,\n view,\n onViewChange,\n views,\n disabled,\n readOnly,\n className: classes.toolbar\n },\n ownerState: _extends({}, props, {\n wrapperVariant\n })\n });\n const toolbar = toolbarHasView(toolbarProps) && !!Toolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, toolbarProps)) : null;\n\n // Content\n\n const content = children;\n\n // Tabs\n\n const Tabs = slots == null ? void 0 : slots.tabs;\n const tabs = view && Tabs ? /*#__PURE__*/_jsx(Tabs, _extends({\n view: view,\n onViewChange: onViewChange\n }, slotProps == null ? void 0 : slotProps.tabs)) : null;\n\n // Shortcuts\n\n const Shortcuts = (_slots$shortcuts = slots == null ? void 0 : slots.shortcuts) != null ? _slots$shortcuts : PickersShortcuts;\n const shortcutsProps = useSlotProps({\n elementType: Shortcuts,\n externalSlotProps: slotProps == null ? void 0 : slotProps.shortcuts,\n additionalProps: {\n isValid,\n isLandscape,\n onChange: onSelectShortcut,\n className: classes.shortcuts\n },\n ownerState: {\n isValid,\n isLandscape,\n onChange: onSelectShortcut,\n className: classes.shortcuts,\n wrapperVariant\n }\n });\n const shortcuts = view && !!Shortcuts ? /*#__PURE__*/_jsx(Shortcuts, _extends({}, shortcutsProps)) : null;\n return {\n toolbar,\n content,\n tabs,\n actionBar,\n shortcuts\n };\n};\nexport default usePickerLayout;","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { pickersLayoutClasses, getPickersLayoutUtilityClass } from './pickersLayoutClasses';\nimport usePickerLayout from './usePickerLayout';\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n isLandscape,\n classes\n } = ownerState;\n const slots = {\n root: ['root', isLandscape && 'landscape'],\n contentWrapper: ['contentWrapper']\n };\n return composeClasses(slots, getPickersLayoutUtilityClass, classes);\n};\nconst PickersLayoutRoot = styled('div', {\n name: 'MuiPickersLayout',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => ({\n display: 'grid',\n gridAutoColumns: 'max-content auto max-content',\n gridAutoRows: 'max-content auto max-content',\n [`& .${pickersLayoutClasses.toolbar}`]: ownerState.isLandscape ? {\n gridColumn: theme.direction === 'rtl' ? 3 : 1,\n gridRow: '2 / 3'\n } : {\n gridColumn: '2 / 4',\n gridRow: 1\n },\n [`.${pickersLayoutClasses.shortcuts}`]: ownerState.isLandscape ? {\n gridColumn: '2 / 4',\n gridRow: 1\n } : {\n gridColumn: theme.direction === 'rtl' ? 3 : 1,\n gridRow: '2 / 3'\n },\n [`& .${pickersLayoutClasses.actionBar}`]: {\n gridColumn: '1 / 4',\n gridRow: 3\n }\n}));\nPickersLayoutRoot.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n as: PropTypes.elementType,\n ownerState: PropTypes.shape({\n isLandscape: PropTypes.bool.isRequired\n }).isRequired,\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n};\nexport { PickersLayoutRoot };\nexport const PickersLayoutContentWrapper = styled('div', {\n name: 'MuiPickersLayout',\n slot: 'ContentWrapper',\n overridesResolver: (props, styles) => styles.contentWrapper\n})({\n gridColumn: 2,\n gridRow: 2,\n display: 'flex',\n flexDirection: 'column'\n});\nconst PickersLayout = function PickersLayout(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersLayout'\n });\n const {\n toolbar,\n content,\n tabs,\n actionBar,\n shortcuts\n } = usePickerLayout(props);\n const {\n sx,\n className,\n isLandscape,\n ref,\n wrapperVariant\n } = props;\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(PickersLayoutRoot, {\n ref: ref,\n sx: sx,\n className: clsx(className, classes.root),\n ownerState: ownerState,\n children: [isLandscape ? shortcuts : toolbar, isLandscape ? toolbar : shortcuts, /*#__PURE__*/_jsx(PickersLayoutContentWrapper, {\n className: classes.contentWrapper,\n children: wrapperVariant === 'desktop' ? /*#__PURE__*/_jsxs(React.Fragment, {\n children: [content, tabs]\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [tabs, content]\n })\n }), actionBar]\n });\n};\nprocess.env.NODE_ENV !== \"production\" ? PickersLayout.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * Overridable components.\n * @default {}\n * @deprecated Please use `slots`.\n */\n components: PropTypes.object,\n /**\n * The props used for each component slot.\n * @default {}\n * @deprecated Please use `slotProps`.\n */\n componentsProps: PropTypes.object,\n disabled: PropTypes.bool,\n isLandscape: PropTypes.bool.isRequired,\n isValid: PropTypes.func.isRequired,\n onAccept: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n onDismiss: PropTypes.func.isRequired,\n onOpen: PropTypes.func.isRequired,\n onSelectShortcut: PropTypes.func.isRequired,\n onSetToday: PropTypes.func.isRequired,\n onViewChange: PropTypes.func.isRequired,\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n value: PropTypes.any,\n view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired,\n wrapperVariant: PropTypes.oneOf(['desktop', 'mobile'])\n} : void 0;\nexport { PickersLayout };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"props\", \"getOpenDialogAriaText\"],\n _excluded2 = [\"ownerState\"],\n _excluded3 = [\"ownerState\"];\nimport * as React from 'react';\nimport { useSlotProps } from '@mui/base/utils';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport IconButton from '@mui/material/IconButton';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useId from '@mui/utils/useId';\nimport { PickersPopper } from '../../components/PickersPopper';\nimport { useUtils } from '../useUtils';\nimport { usePicker } from '../usePicker';\nimport { LocalizationProvider } from '../../../LocalizationProvider';\nimport { PickersLayout } from '../../../PickersLayout';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Hook managing all the single-date desktop pickers:\n * - DesktopDatePicker\n * - DesktopDateTimePicker\n * - DesktopTimePicker\n */\nexport const useDesktopPicker = _ref => {\n var _innerSlotProps$toolb, _innerSlotProps$toolb2, _slots$inputAdornment, _slots$openPickerButt, _slots$layout;\n let {\n props,\n getOpenDialogAriaText\n } = _ref,\n pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);\n const {\n slots,\n slotProps: innerSlotProps,\n className,\n sx,\n format,\n formatDensity,\n timezone,\n label,\n inputRef,\n readOnly,\n disabled,\n autoFocus,\n localeText\n } = props;\n const utils = useUtils();\n const internalInputRef = React.useRef(null);\n const containerRef = React.useRef(null);\n const labelId = useId();\n const isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null ? void 0 : (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;\n const {\n open,\n actions,\n hasUIView,\n layoutProps,\n renderCurrentView,\n shouldRestoreFocus,\n fieldProps: pickerFieldProps\n } = usePicker(_extends({}, pickerParams, {\n props,\n inputRef: internalInputRef,\n autoFocusView: true,\n additionalViewProps: {},\n wrapperVariant: 'desktop'\n }));\n const InputAdornment = (_slots$inputAdornment = slots.inputAdornment) != null ? _slots$inputAdornment : MuiInputAdornment;\n const _useSlotProps = useSlotProps({\n elementType: InputAdornment,\n externalSlotProps: innerSlotProps == null ? void 0 : innerSlotProps.inputAdornment,\n additionalProps: {\n position: 'end'\n },\n ownerState: props\n }),\n inputAdornmentProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const OpenPickerButton = (_slots$openPickerButt = slots.openPickerButton) != null ? _slots$openPickerButt : IconButton;\n const _useSlotProps2 = useSlotProps({\n elementType: OpenPickerButton,\n externalSlotProps: innerSlotProps == null ? void 0 : innerSlotProps.openPickerButton,\n additionalProps: {\n disabled: disabled || readOnly,\n onClick: actions.onOpen,\n 'aria-label': getOpenDialogAriaText(pickerFieldProps.value, utils),\n edge: inputAdornmentProps.position\n },\n ownerState: props\n }),\n openPickerButtonProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);\n const OpenPickerIcon = slots.openPickerIcon;\n const Field = slots.field;\n const fieldProps = useSlotProps({\n elementType: Field,\n externalSlotProps: innerSlotProps == null ? void 0 : innerSlotProps.field,\n additionalProps: _extends({}, pickerFieldProps, isToolbarHidden && {\n id: labelId\n }, {\n readOnly,\n disabled,\n className,\n sx,\n format,\n formatDensity,\n timezone,\n label,\n autoFocus: autoFocus && !props.open,\n focused: open ? true : undefined\n }),\n ownerState: props\n });\n\n // TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged\n if (hasUIView) {\n fieldProps.InputProps = _extends({}, fieldProps.InputProps, {\n ref: containerRef,\n [`${inputAdornmentProps.position}Adornment`]: /*#__PURE__*/_jsx(InputAdornment, _extends({}, inputAdornmentProps, {\n children: /*#__PURE__*/_jsx(OpenPickerButton, _extends({}, openPickerButtonProps, {\n children: /*#__PURE__*/_jsx(OpenPickerIcon, _extends({}, innerSlotProps == null ? void 0 : innerSlotProps.openPickerIcon))\n }))\n }))\n });\n }\n const slotsForField = _extends({\n textField: slots.textField\n }, fieldProps.slots);\n const Layout = (_slots$layout = slots.layout) != null ? _slots$layout : PickersLayout;\n const handleInputRef = useForkRef(internalInputRef, fieldProps.inputRef, inputRef);\n let labelledById = labelId;\n if (isToolbarHidden) {\n if (label) {\n labelledById = `${labelId}-label`;\n } else {\n labelledById = undefined;\n }\n }\n const slotProps = _extends({}, innerSlotProps, {\n toolbar: _extends({}, innerSlotProps == null ? void 0 : innerSlotProps.toolbar, {\n titleId: labelId\n }),\n popper: _extends({\n 'aria-labelledby': labelledById\n }, innerSlotProps == null ? void 0 : innerSlotProps.popper)\n });\n const renderPicker = () => /*#__PURE__*/_jsxs(LocalizationProvider, {\n localeText: localeText,\n children: [/*#__PURE__*/_jsx(Field, _extends({}, fieldProps, {\n slots: slotsForField,\n slotProps: slotProps,\n inputRef: handleInputRef\n })), /*#__PURE__*/_jsx(PickersPopper, _extends({\n role: \"dialog\",\n placement: \"bottom-start\",\n anchorEl: containerRef.current\n }, actions, {\n open: open,\n slots: slots,\n slotProps: slotProps,\n shouldRestoreFocus: shouldRestoreFocus,\n children: /*#__PURE__*/_jsx(Layout, _extends({}, layoutProps, slotProps == null ? void 0 : slotProps.layout, {\n slots: slots,\n slotProps: slotProps,\n children: renderCurrentView()\n }))\n }))]\n });\n return {\n renderPicker\n };\n};","import { createSvgIcon } from '@mui/material/utils';\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ArrowDropDownIcon = createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowLeftIcon = createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z\"\n}), 'ArrowLeft');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowRightIcon = createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n}), 'ArrowRight');\n\n/**\n * @ignore - internal component.\n */\nexport const CalendarIcon = createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z\"\n}), 'Calendar');\n\n/**\n * @ignore - internal component.\n */\nexport const ClockIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Clock');\n\n/**\n * @ignore - internal component.\n */\nexport const DateRangeIcon = createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z\"\n}), 'DateRange');\n\n/**\n * @ignore - internal component.\n */\nexport const TimeIcon = createSvgIcon( /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Time');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useControlled from '@mui/utils/useControlled';\nimport { useTheme } from '@mui/material/styles';\nimport { useUtils, useLocaleText, useLocalizationContext } from '../useUtils';\nimport { addPositionPropertiesToSections, splitFormatIntoSections, clampDaySectionIfPossible, mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections } from './useField.utils';\nimport { useValueWithTimezone } from '../useValueWithTimezone';\nimport { getSectionTypeGranularity } from '../../utils/getDefaultReferenceDate';\nexport const useFieldState = params => {\n const utils = useUtils();\n const localeText = useLocaleText();\n const adapter = useLocalizationContext();\n const theme = useTheme();\n const isRTL = theme.direction === 'rtl';\n const {\n valueManager,\n fieldValueManager,\n valueType,\n validator,\n internalProps,\n internalProps: {\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n format,\n formatDensity = 'dense',\n selectedSections: selectedSectionsProp,\n onSelectedSectionsChange,\n shouldRespectLeadingZeros = false,\n timezone: timezoneProp\n }\n } = params;\n const {\n timezone,\n value: valueFromTheOutside,\n handleValueChange\n } = useValueWithTimezone({\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n onChange,\n valueManager\n });\n const sectionsValueBoundaries = React.useMemo(() => getSectionsBoundaries(utils, timezone), [utils, timezone]);\n const getSectionsFromValue = React.useCallback((value, fallbackSections = null) => fieldValueManager.getSectionsFromValue(utils, value, fallbackSections, isRTL, date => splitFormatIntoSections(utils, timezone, localeText, format, date, formatDensity, shouldRespectLeadingZeros, isRTL)), [fieldValueManager, format, localeText, isRTL, shouldRespectLeadingZeros, utils, formatDensity, timezone]);\n const placeholder = React.useMemo(() => fieldValueManager.getValueStrFromSections(getSectionsFromValue(valueManager.emptyValue), isRTL), [fieldValueManager, getSectionsFromValue, valueManager.emptyValue, isRTL]);\n const [state, setState] = React.useState(() => {\n const sections = getSectionsFromValue(valueFromTheOutside);\n validateSections(sections, valueType);\n const stateWithoutReferenceDate = {\n sections,\n value: valueFromTheOutside,\n referenceValue: valueManager.emptyValue,\n tempValueStrAndroid: null\n };\n const granularity = getSectionTypeGranularity(sections);\n const referenceValue = valueManager.getInitialReferenceValue({\n referenceDate: referenceDateProp,\n value: valueFromTheOutside,\n utils,\n props: internalProps,\n granularity,\n timezone\n });\n return _extends({}, stateWithoutReferenceDate, {\n referenceValue\n });\n });\n const [selectedSections, innerSetSelectedSections] = useControlled({\n controlled: selectedSectionsProp,\n default: null,\n name: 'useField',\n state: 'selectedSectionIndexes'\n });\n const setSelectedSections = newSelectedSections => {\n innerSetSelectedSections(newSelectedSections);\n onSelectedSectionsChange == null ? void 0 : onSelectedSectionsChange(newSelectedSections);\n setState(prevState => _extends({}, prevState, {\n selectedSectionQuery: null\n }));\n };\n const selectedSectionIndexes = React.useMemo(() => {\n if (selectedSections == null) {\n return null;\n }\n if (selectedSections === 'all') {\n return {\n startIndex: 0,\n endIndex: state.sections.length - 1,\n shouldSelectBoundarySelectors: true\n };\n }\n if (typeof selectedSections === 'number') {\n return {\n startIndex: selectedSections,\n endIndex: selectedSections\n };\n }\n if (typeof selectedSections === 'string') {\n const selectedSectionIndex = state.sections.findIndex(section => section.type === selectedSections);\n return {\n startIndex: selectedSectionIndex,\n endIndex: selectedSectionIndex\n };\n }\n return selectedSections;\n }, [selectedSections, state.sections]);\n const publishValue = ({\n value,\n referenceValue,\n sections\n }) => {\n setState(prevState => _extends({}, prevState, {\n sections,\n value,\n referenceValue,\n tempValueStrAndroid: null\n }));\n const context = {\n validationError: validator({\n adapter,\n value,\n props: _extends({}, internalProps, {\n value,\n timezone\n })\n })\n };\n handleValueChange(value, context);\n };\n const setSectionValue = (sectionIndex, newSectionValue) => {\n const newSections = [...state.sections];\n newSections[sectionIndex] = _extends({}, newSections[sectionIndex], {\n value: newSectionValue,\n modified: true\n });\n return addPositionPropertiesToSections(newSections, isRTL);\n };\n const clearValue = () => {\n if (valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue)) {\n return;\n }\n publishValue({\n value: valueManager.emptyValue,\n referenceValue: state.referenceValue,\n sections: getSectionsFromValue(valueManager.emptyValue)\n });\n };\n const clearActiveSection = () => {\n if (selectedSectionIndexes == null) {\n return;\n }\n const activeSection = state.sections[selectedSectionIndexes.startIndex];\n if (activeSection.value === '') {\n return;\n }\n const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);\n const nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(section => section.value !== '').length;\n const isTheOnlyNonEmptySection = nonEmptySectionCountBefore === 1;\n const newSections = setSectionValue(selectedSectionIndexes.startIndex, '');\n const newActiveDate = isTheOnlyNonEmptySection ? null : utils.date(new Date(''));\n const newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);\n if ((newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date))) {\n publishValue(_extends({}, newValues, {\n sections: newSections\n }));\n } else {\n setState(prevState => _extends({}, prevState, newValues, {\n sections: newSections,\n tempValueStrAndroid: null\n }));\n }\n };\n const updateValueFromValueStr = valueStr => {\n const parseDateStr = (dateStr, referenceDate) => {\n const date = utils.parse(dateStr, format);\n if (date == null || !utils.isValid(date)) {\n return null;\n }\n const sections = splitFormatIntoSections(utils, timezone, localeText, format, date, formatDensity, shouldRespectLeadingZeros, isRTL);\n return mergeDateIntoReferenceDate(utils, timezone, date, sections, referenceDate, false);\n };\n const newValue = fieldValueManager.parseValueStr(valueStr, state.referenceValue, parseDateStr);\n const newReferenceValue = fieldValueManager.updateReferenceValue(utils, newValue, state.referenceValue);\n publishValue({\n value: newValue,\n referenceValue: newReferenceValue,\n sections: getSectionsFromValue(newValue, state.sections)\n });\n };\n const updateSectionValue = ({\n activeSection,\n newSectionValue,\n shouldGoToNextSection\n }) => {\n /**\n * 1. Decide which section should be focused\n */\n if (shouldGoToNextSection && selectedSectionIndexes && selectedSectionIndexes.startIndex < state.sections.length - 1) {\n setSelectedSections(selectedSectionIndexes.startIndex + 1);\n } else if (selectedSectionIndexes && selectedSectionIndexes.startIndex !== selectedSectionIndexes.endIndex) {\n setSelectedSections(selectedSectionIndexes.startIndex);\n }\n\n /**\n * 2. Try to build a valid date from the new section value\n */\n const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);\n const newSections = setSectionValue(selectedSectionIndexes.startIndex, newSectionValue);\n const newActiveDateSections = activeDateManager.getSections(newSections);\n let newActiveDate = getDateFromDateSections(utils, newActiveDateSections);\n let shouldRegenSections = false;\n\n /**\n * If the date is invalid,\n * Then we can try to clamp the day section to see if that produces a valid date.\n * This can be useful if the month has fewer days than the day value currently provided.\n */\n if (!utils.isValid(newActiveDate)) {\n const clampedSections = clampDaySectionIfPossible(utils, timezone, newActiveDateSections, sectionsValueBoundaries);\n if (clampedSections != null) {\n shouldRegenSections = true;\n newActiveDate = getDateFromDateSections(utils, clampedSections);\n }\n }\n let values;\n let shouldPublish;\n\n /**\n * If the new date is valid,\n * Then we merge the value of the modified sections into the reference date.\n * This makes sure that we don't lose some information of the initial date (like the time on a date field).\n */\n if (newActiveDate != null && utils.isValid(newActiveDate)) {\n const mergedDate = mergeDateIntoReferenceDate(utils, timezone, newActiveDate, newActiveDateSections, activeDateManager.referenceDate, true);\n values = activeDateManager.getNewValuesFromNewActiveDate(mergedDate);\n shouldPublish = true;\n } else {\n values = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);\n shouldPublish = (newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date));\n }\n\n /**\n * If the value has been modified (to clamp the day).\n * Then we need to re-generate the sections to make sure they also have this change.\n */\n const sections = shouldRegenSections ? getSectionsFromValue(values.value, state.sections) : newSections;\n\n /**\n * Publish or update the internal state with the new value and sections.\n */\n if (shouldPublish) {\n return publishValue(_extends({}, values, {\n sections\n }));\n }\n return setState(prevState => _extends({}, prevState, values, {\n sections,\n tempValueStrAndroid: null\n }));\n };\n const setTempAndroidValueStr = tempValueStrAndroid => setState(prev => _extends({}, prev, {\n tempValueStrAndroid\n }));\n React.useEffect(() => {\n let shouldUpdate = false;\n if (!valueManager.areValuesEqual(utils, state.value, valueFromTheOutside)) {\n shouldUpdate = true;\n } else {\n shouldUpdate = valueManager.getTimezone(utils, state.value) !== valueManager.getTimezone(utils, valueFromTheOutside);\n }\n if (shouldUpdate) {\n setState(prevState => _extends({}, prevState, {\n value: valueFromTheOutside,\n referenceValue: fieldValueManager.updateReferenceValue(utils, valueFromTheOutside, prevState.referenceValue),\n sections: getSectionsFromValue(valueFromTheOutside)\n }));\n }\n }, [valueFromTheOutside]); // eslint-disable-line react-hooks/exhaustive-deps\n\n React.useEffect(() => {\n const sections = getSectionsFromValue(state.value);\n validateSections(sections, valueType);\n setState(prevState => _extends({}, prevState, {\n sections\n }));\n }, [format, utils.locale]); // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n state,\n selectedSectionIndexes,\n setSelectedSections,\n clearValue,\n clearActiveSection,\n updateSectionValue,\n updateValueFromValueStr,\n setTempAndroidValueStr,\n sectionsValueBoundaries,\n placeholder,\n timezone\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useUtils } from '../useUtils';\nimport { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions } from './useField.utils';\n\n/**\n * The letter editing and the numeric editing each define a `CharacterEditingApplier`.\n * This function decides what the new section value should be and if the focus should switch to the next section.\n *\n * If it returns `null`, then the section value is not updated and the focus does not move.\n */\n\n/**\n * Function called by `applyQuery` which decides:\n * - what is the new section value ?\n * - should the query used to get this value be stored for the next key press ?\n *\n * If it returns `{ sectionValue: string; shouldGoToNextSection: boolean }`,\n * Then we store the query and update the section with the new value.\n *\n * If it returns `{ saveQuery: true` },\n * Then we store the query and don't update the section.\n *\n * If it returns `{ saveQuery: false },\n * Then we do nothing.\n */\n\nconst QUERY_LIFE_DURATION_MS = 5000;\nconst isQueryResponseWithoutValue = response => response.saveQuery != null;\n\n/**\n * Update the active section value when the user pressed a key that is not a navigation key (arrow key for example).\n * This hook has two main editing behaviors\n *\n * 1. The numeric editing when the user presses a digit\n * 2. The letter editing when the user presses another key\n */\nexport const useFieldCharacterEditing = ({\n sections,\n updateSectionValue,\n sectionsValueBoundaries,\n setTempAndroidValueStr,\n timezone\n}) => {\n const utils = useUtils();\n const [query, setQuery] = React.useState(null);\n const resetQuery = useEventCallback(() => setQuery(null));\n React.useEffect(() => {\n var _sections$query$secti;\n if (query != null && ((_sections$query$secti = sections[query.sectionIndex]) == null ? void 0 : _sections$query$secti.type) !== query.sectionType) {\n resetQuery();\n }\n }, [sections, query, resetQuery]);\n React.useEffect(() => {\n if (query != null) {\n const timeout = setTimeout(() => resetQuery(), QUERY_LIFE_DURATION_MS);\n return () => {\n window.clearTimeout(timeout);\n };\n }\n return () => {};\n }, [query, resetQuery]);\n const applyQuery = ({\n keyPressed,\n sectionIndex\n }, getFirstSectionValueMatchingWithQuery, isValidQueryValue) => {\n const cleanKeyPressed = keyPressed.toLowerCase();\n const activeSection = sections[sectionIndex];\n\n // The current query targets the section being editing\n // We can try to concatenated value\n if (query != null && (!isValidQueryValue || isValidQueryValue(query.value)) && query.sectionIndex === sectionIndex) {\n const concatenatedQueryValue = `${query.value}${cleanKeyPressed}`;\n const queryResponse = getFirstSectionValueMatchingWithQuery(concatenatedQueryValue, activeSection);\n if (!isQueryResponseWithoutValue(queryResponse)) {\n setQuery({\n sectionIndex,\n value: concatenatedQueryValue,\n sectionType: activeSection.type\n });\n return queryResponse;\n }\n }\n const queryResponse = getFirstSectionValueMatchingWithQuery(cleanKeyPressed, activeSection);\n if (isQueryResponseWithoutValue(queryResponse) && !queryResponse.saveQuery) {\n resetQuery();\n return null;\n }\n setQuery({\n sectionIndex,\n value: cleanKeyPressed,\n sectionType: activeSection.type\n });\n if (isQueryResponseWithoutValue(queryResponse)) {\n return null;\n }\n return queryResponse;\n };\n const applyLetterEditing = params => {\n const findMatchingOptions = (format, options, queryValue) => {\n const matchingValues = options.filter(option => option.toLowerCase().startsWith(queryValue));\n if (matchingValues.length === 0) {\n return {\n saveQuery: false\n };\n }\n return {\n sectionValue: matchingValues[0],\n shouldGoToNextSection: matchingValues.length === 1\n };\n };\n const testQueryOnFormatAndFallbackFormat = (queryValue, activeSection, fallbackFormat, formatFallbackValue) => {\n const getOptions = format => getLetterEditingOptions(utils, timezone, activeSection.type, format);\n if (activeSection.contentType === 'letter') {\n return findMatchingOptions(activeSection.format, getOptions(activeSection.format), queryValue);\n }\n\n // When editing a digit-format month / weekDay and the user presses a letter,\n // We can support the letter editing by using the letter-format month / weekDay and re-formatting the result.\n // We just have to make sure that the default month / weekDay format is a letter format,\n if (fallbackFormat && formatFallbackValue != null && getDateSectionConfigFromFormatToken(utils, fallbackFormat).contentType === 'letter') {\n const fallbackOptions = getOptions(fallbackFormat);\n const response = findMatchingOptions(fallbackFormat, fallbackOptions, queryValue);\n if (isQueryResponseWithoutValue(response)) {\n return {\n saveQuery: false\n };\n }\n return _extends({}, response, {\n sectionValue: formatFallbackValue(response.sectionValue, fallbackOptions)\n });\n }\n return {\n saveQuery: false\n };\n };\n const getFirstSectionValueMatchingWithQuery = (queryValue, activeSection) => {\n switch (activeSection.type) {\n case 'month':\n {\n const formatFallbackValue = fallbackValue => changeSectionValueFormat(utils, fallbackValue, utils.formats.month, activeSection.format);\n return testQueryOnFormatAndFallbackFormat(queryValue, activeSection, utils.formats.month, formatFallbackValue);\n }\n case 'weekDay':\n {\n const formatFallbackValue = (fallbackValue, fallbackOptions) => fallbackOptions.indexOf(fallbackValue).toString();\n return testQueryOnFormatAndFallbackFormat(queryValue, activeSection, utils.formats.weekday, formatFallbackValue);\n }\n case 'meridiem':\n {\n return testQueryOnFormatAndFallbackFormat(queryValue, activeSection);\n }\n default:\n {\n return {\n saveQuery: false\n };\n }\n }\n };\n return applyQuery(params, getFirstSectionValueMatchingWithQuery);\n };\n const applyNumericEditing = params => {\n const getNewSectionValue = (queryValue, section) => {\n const queryValueNumber = Number(`${queryValue}`);\n const sectionBoundaries = sectionsValueBoundaries[section.type]({\n currentDate: null,\n format: section.format,\n contentType: section.contentType\n });\n if (queryValueNumber > sectionBoundaries.maximum) {\n return {\n saveQuery: false\n };\n }\n\n // If the user types `0` on a month section,\n // It is below the minimum, but we want to store the `0` in the query,\n // So that when he pressed `1`, it will store `01` and move to the next section.\n if (queryValueNumber < sectionBoundaries.minimum) {\n return {\n saveQuery: true\n };\n }\n const shouldGoToNextSection = Number(`${queryValue}0`) > sectionBoundaries.maximum || queryValue.length === sectionBoundaries.maximum.toString().length;\n const newSectionValue = cleanDigitSectionValue(utils, timezone, queryValueNumber, sectionBoundaries, section);\n return {\n sectionValue: newSectionValue,\n shouldGoToNextSection\n };\n };\n const getFirstSectionValueMatchingWithQuery = (queryValue, activeSection) => {\n if (activeSection.contentType === 'digit' || activeSection.contentType === 'digit-with-letter') {\n return getNewSectionValue(queryValue, activeSection);\n }\n\n // When editing a letter-format month and the user presses a digit,\n // We can support the numeric editing by using the digit-format month and re-formatting the result.\n if (activeSection.type === 'month') {\n const hasLeadingZerosInFormat = doesSectionFormatHaveLeadingZeros(utils, timezone, 'digit', 'month', 'MM');\n const response = getNewSectionValue(queryValue, {\n type: activeSection.type,\n format: 'MM',\n hasLeadingZerosInFormat,\n hasLeadingZerosInInput: true,\n contentType: 'digit',\n maxLength: 2\n });\n if (isQueryResponseWithoutValue(response)) {\n return response;\n }\n const formattedValue = changeSectionValueFormat(utils, response.sectionValue, 'MM', activeSection.format);\n return _extends({}, response, {\n sectionValue: formattedValue\n });\n }\n\n // When editing a letter-format weekDay and the user presses a digit,\n // We can support the numeric editing by returning the nth day in the week day array.\n if (activeSection.type === 'weekDay') {\n const response = getNewSectionValue(queryValue, activeSection);\n if (isQueryResponseWithoutValue(response)) {\n return response;\n }\n const formattedValue = getDaysInWeekStr(utils, timezone, activeSection.format)[Number(response.sectionValue) - 1];\n return _extends({}, response, {\n sectionValue: formattedValue\n });\n }\n return {\n saveQuery: false\n };\n };\n return applyQuery(params, getFirstSectionValueMatchingWithQuery, queryValue => !Number.isNaN(Number(queryValue)));\n };\n const applyCharacterEditing = useEventCallback(params => {\n const activeSection = sections[params.sectionIndex];\n const isNumericEditing = !Number.isNaN(Number(params.keyPressed));\n const response = isNumericEditing ? applyNumericEditing(params) : applyLetterEditing(params);\n if (response == null) {\n setTempAndroidValueStr(null);\n } else {\n updateSectionValue({\n activeSection,\n newSectionValue: response.sectionValue,\n shouldGoToNextSection: response.shouldGoToNextSection\n });\n }\n });\n return {\n applyCharacterEditing,\n resetCharacterQuery: resetQuery\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onClick\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"onMouseUp\", \"onPaste\", \"error\"];\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { useTheme } from '@mui/material/styles';\nimport { useValidation } from '../useValidation';\nimport { useUtils } from '../useUtils';\nimport { adjustSectionValue, isAndroid, cleanString, getSectionOrder } from './useField.utils';\nimport { useFieldState } from './useFieldState';\nimport { useFieldCharacterEditing } from './useFieldCharacterEditing';\nimport { getActiveElement } from '../../utils/utils';\nexport const useField = params => {\n const utils = useUtils();\n const {\n state,\n selectedSectionIndexes,\n setSelectedSections,\n clearValue,\n clearActiveSection,\n updateSectionValue,\n updateValueFromValueStr,\n setTempAndroidValueStr,\n sectionsValueBoundaries,\n placeholder,\n timezone\n } = useFieldState(params);\n const {\n inputRef: inputRefProp,\n internalProps,\n internalProps: {\n readOnly = false,\n unstableFieldRef,\n minutesStep\n },\n forwardedProps: {\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n onMouseUp,\n onPaste,\n error\n },\n fieldValueManager,\n valueManager,\n validator\n } = params,\n otherForwardedProps = _objectWithoutPropertiesLoose(params.forwardedProps, _excluded);\n const {\n applyCharacterEditing,\n resetCharacterQuery\n } = useFieldCharacterEditing({\n sections: state.sections,\n updateSectionValue,\n sectionsValueBoundaries,\n setTempAndroidValueStr,\n timezone\n });\n const inputRef = React.useRef(null);\n const handleRef = useForkRef(inputRefProp, inputRef);\n const focusTimeoutRef = React.useRef(undefined);\n const theme = useTheme();\n const isRTL = theme.direction === 'rtl';\n const sectionOrder = React.useMemo(() => getSectionOrder(state.sections, isRTL), [state.sections, isRTL]);\n const syncSelectionFromDOM = () => {\n var _selectionStart;\n if (readOnly) {\n setSelectedSections(null);\n return;\n }\n const browserStartIndex = (_selectionStart = inputRef.current.selectionStart) != null ? _selectionStart : 0;\n let nextSectionIndex;\n if (browserStartIndex <= state.sections[0].startInInput) {\n // Special case if browser index is in invisible characters at the beginning\n nextSectionIndex = 1;\n } else if (browserStartIndex >= state.sections[state.sections.length - 1].endInInput) {\n // If the click is after the last character of the input, then we want to select the 1st section.\n nextSectionIndex = 1;\n } else {\n nextSectionIndex = state.sections.findIndex(section => section.startInInput - section.startSeparator.length > browserStartIndex);\n }\n const sectionIndex = nextSectionIndex === -1 ? state.sections.length - 1 : nextSectionIndex - 1;\n setSelectedSections(sectionIndex);\n };\n const handleInputClick = useEventCallback((...args) => {\n onClick == null ? void 0 : onClick(...args);\n syncSelectionFromDOM();\n });\n const handleInputMouseUp = useEventCallback(event => {\n onMouseUp == null ? void 0 : onMouseUp(event);\n\n // Without this, the browser will remove the selected when clicking inside an already-selected section.\n event.preventDefault();\n });\n const handleInputFocus = useEventCallback((...args) => {\n onFocus == null ? void 0 : onFocus(...args);\n // The ref is guaranteed to be resolved at this point.\n const input = inputRef.current;\n window.clearTimeout(focusTimeoutRef.current);\n focusTimeoutRef.current = setTimeout(() => {\n // The ref changed, the component got remounted, the focus event is no longer relevant.\n if (!input || input !== inputRef.current) {\n return;\n }\n if (selectedSectionIndexes != null || readOnly) {\n return;\n }\n if (\n // avoid selecting all sections when focusing empty field without value\n input.value.length && Number(input.selectionEnd) - Number(input.selectionStart) === input.value.length) {\n setSelectedSections('all');\n } else {\n syncSelectionFromDOM();\n }\n });\n });\n const handleInputBlur = useEventCallback((...args) => {\n onBlur == null ? void 0 : onBlur(...args);\n setSelectedSections(null);\n });\n const handleInputPaste = useEventCallback(event => {\n onPaste == null ? void 0 : onPaste(event);\n if (readOnly) {\n event.preventDefault();\n return;\n }\n const pastedValue = event.clipboardData.getData('text');\n if (selectedSectionIndexes && selectedSectionIndexes.startIndex === selectedSectionIndexes.endIndex) {\n const activeSection = state.sections[selectedSectionIndexes.startIndex];\n const lettersOnly = /^[a-zA-Z]+$/.test(pastedValue);\n const digitsOnly = /^[0-9]+$/.test(pastedValue);\n const digitsAndLetterOnly = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(pastedValue);\n const isValidPastedValue = activeSection.contentType === 'letter' && lettersOnly || activeSection.contentType === 'digit' && digitsOnly || activeSection.contentType === 'digit-with-letter' && digitsAndLetterOnly;\n if (isValidPastedValue) {\n // Early return to let the paste update section, value\n return;\n }\n if (lettersOnly || digitsOnly) {\n // The pasted value correspond to a single section but not the expected type\n // skip the modification\n event.preventDefault();\n return;\n }\n }\n event.preventDefault();\n resetCharacterQuery();\n updateValueFromValueStr(pastedValue);\n });\n const handleInputChange = useEventCallback(event => {\n if (readOnly) {\n return;\n }\n const valueStr = event.target.value;\n const cleanValueStr = cleanString(valueStr);\n\n // If no section is selected, we just try to parse the new value\n // This line is mostly triggered by imperative code / application tests.\n if (selectedSectionIndexes == null) {\n updateValueFromValueStr(cleanValueStr);\n return;\n }\n let keyPressed;\n if (selectedSectionIndexes.startIndex === 0 && selectedSectionIndexes.endIndex === state.sections.length - 1 && cleanValueStr.length === 1) {\n keyPressed = cleanValueStr;\n } else {\n const prevValueStr = cleanString(fieldValueManager.getValueStrFromSections(state.sections, isRTL));\n let startOfDiffIndex = -1;\n let endOfDiffIndex = -1;\n for (let i = 0; i < prevValueStr.length; i += 1) {\n if (startOfDiffIndex === -1 && prevValueStr[i] !== cleanValueStr[i]) {\n startOfDiffIndex = i;\n }\n if (endOfDiffIndex === -1 && prevValueStr[prevValueStr.length - i - 1] !== cleanValueStr[cleanValueStr.length - i - 1]) {\n endOfDiffIndex = i;\n }\n }\n const activeSection = state.sections[selectedSectionIndexes.startIndex];\n const hasDiffOutsideOfActiveSection = startOfDiffIndex < activeSection.start || prevValueStr.length - endOfDiffIndex - 1 > activeSection.end;\n if (hasDiffOutsideOfActiveSection) {\n // TODO: Support if the new date is valid\n return;\n }\n\n // The active section being selected, the browser has replaced its value with the key pressed by the user.\n const activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;\n keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);\n }\n if (isAndroid() && keyPressed.length === 0) {\n setTempAndroidValueStr(valueStr);\n return;\n }\n applyCharacterEditing({\n keyPressed,\n sectionIndex: selectedSectionIndexes.startIndex\n });\n });\n const handleInputKeyDown = useEventCallback(event => {\n onKeyDown == null ? void 0 : onKeyDown(event);\n\n // eslint-disable-next-line default-case\n switch (true) {\n // Select all\n case event.key === 'a' && (event.ctrlKey || event.metaKey):\n {\n // prevent default to make sure that the next line \"select all\" while updating\n // the internal state at the same time.\n event.preventDefault();\n setSelectedSections('all');\n break;\n }\n\n // Move selection to next section\n case event.key === 'ArrowRight':\n {\n event.preventDefault();\n if (selectedSectionIndexes == null) {\n setSelectedSections(sectionOrder.startIndex);\n } else if (selectedSectionIndexes.startIndex !== selectedSectionIndexes.endIndex) {\n setSelectedSections(selectedSectionIndexes.endIndex);\n } else {\n const nextSectionIndex = sectionOrder.neighbors[selectedSectionIndexes.startIndex].rightIndex;\n if (nextSectionIndex !== null) {\n setSelectedSections(nextSectionIndex);\n }\n }\n break;\n }\n\n // Move selection to previous section\n case event.key === 'ArrowLeft':\n {\n event.preventDefault();\n if (selectedSectionIndexes == null) {\n setSelectedSections(sectionOrder.endIndex);\n } else if (selectedSectionIndexes.startIndex !== selectedSectionIndexes.endIndex) {\n setSelectedSections(selectedSectionIndexes.startIndex);\n } else {\n const nextSectionIndex = sectionOrder.neighbors[selectedSectionIndexes.startIndex].leftIndex;\n if (nextSectionIndex !== null) {\n setSelectedSections(nextSectionIndex);\n }\n }\n break;\n }\n\n // Reset the value of the selected section\n case ['Backspace', 'Delete'].includes(event.key):\n {\n event.preventDefault();\n if (readOnly) {\n break;\n }\n if (selectedSectionIndexes == null || selectedSectionIndexes.startIndex === 0 && selectedSectionIndexes.endIndex === state.sections.length - 1) {\n clearValue();\n } else {\n clearActiveSection();\n }\n resetCharacterQuery();\n break;\n }\n\n // Increment / decrement the selected section value\n case ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(event.key):\n {\n event.preventDefault();\n if (readOnly || selectedSectionIndexes == null) {\n break;\n }\n const activeSection = state.sections[selectedSectionIndexes.startIndex];\n const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);\n const newSectionValue = adjustSectionValue(utils, timezone, activeSection, event.key, sectionsValueBoundaries, activeDateManager.date, {\n minutesStep\n });\n updateSectionValue({\n activeSection,\n newSectionValue,\n shouldGoToNextSection: false\n });\n break;\n }\n }\n });\n useEnhancedEffect(() => {\n if (!inputRef.current) {\n return;\n }\n if (selectedSectionIndexes == null) {\n if (inputRef.current.scrollLeft) {\n // Ensure that input content is not marked as selected.\n // setting selection range to 0 causes issues in Safari.\n // https://bugs.webkit.org/show_bug.cgi?id=224425\n inputRef.current.scrollLeft = 0;\n }\n return;\n }\n const firstSelectedSection = state.sections[selectedSectionIndexes.startIndex];\n const lastSelectedSection = state.sections[selectedSectionIndexes.endIndex];\n let selectionStart = firstSelectedSection.startInInput;\n let selectionEnd = lastSelectedSection.endInInput;\n if (selectedSectionIndexes.shouldSelectBoundarySelectors) {\n selectionStart -= firstSelectedSection.startSeparator.length;\n selectionEnd += lastSelectedSection.endSeparator.length;\n }\n if (selectionStart !== inputRef.current.selectionStart || selectionEnd !== inputRef.current.selectionEnd) {\n // Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321\n const currentScrollTop = inputRef.current.scrollTop;\n // On multi input range pickers we want to update selection range only for the active input\n // This helps avoiding the focus jumping on Safari https://github.com/mui/mui-x/issues/9003\n // because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425\n if (inputRef.current === getActiveElement(document)) {\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n }\n // Even reading this variable seems to do the trick, but also setting it just to make use of it\n inputRef.current.scrollTop = currentScrollTop;\n }\n });\n const validationError = useValidation(_extends({}, internalProps, {\n value: state.value,\n timezone\n }), validator, valueManager.isSameError, valueManager.defaultErrorState);\n const inputError = React.useMemo(() => {\n // only override when `error` is undefined.\n // in case of multi input fields, the `error` value is provided externally and will always be defined.\n if (error !== undefined) {\n return error;\n }\n return valueManager.hasError(validationError);\n }, [valueManager, validationError, error]);\n React.useEffect(() => {\n if (!inputError && !selectedSectionIndexes) {\n resetCharacterQuery();\n }\n }, [state.referenceValue, selectedSectionIndexes, inputError]); // eslint-disable-line react-hooks/exhaustive-deps\n\n React.useEffect(() => {\n // Select the right section when focused on mount (`autoFocus = true` on the input)\n if (inputRef.current && inputRef.current === document.activeElement) {\n setSelectedSections('all');\n }\n return () => window.clearTimeout(focusTimeoutRef.current);\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n // If `state.tempValueStrAndroid` is still defined when running `useEffect`,\n // Then `onChange` has only been called once, which means the user pressed `Backspace` to reset the section.\n // This causes a small flickering on Android,\n // But we can't use `useEnhancedEffect` which is always called before the second `onChange` call and then would cause false positives.\n React.useEffect(() => {\n if (state.tempValueStrAndroid != null && selectedSectionIndexes != null) {\n resetCharacterQuery();\n clearActiveSection();\n }\n }, [state.tempValueStrAndroid]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const valueStr = React.useMemo(() => {\n var _state$tempValueStrAn;\n return (_state$tempValueStrAn = state.tempValueStrAndroid) != null ? _state$tempValueStrAn : fieldValueManager.getValueStrFromSections(state.sections, isRTL);\n }, [state.sections, fieldValueManager, state.tempValueStrAndroid, isRTL]);\n const inputMode = React.useMemo(() => {\n if (selectedSectionIndexes == null) {\n return 'text';\n }\n if (state.sections[selectedSectionIndexes.startIndex].contentType === 'letter') {\n return 'text';\n }\n return 'tel';\n }, [selectedSectionIndexes, state.sections]);\n const inputHasFocus = inputRef.current && inputRef.current === getActiveElement(document);\n const shouldShowPlaceholder = !inputHasFocus && valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue);\n React.useImperativeHandle(unstableFieldRef, () => ({\n getSections: () => state.sections,\n getActiveSectionIndex: () => {\n var _selectionStart2, _selectionEnd;\n const browserStartIndex = (_selectionStart2 = inputRef.current.selectionStart) != null ? _selectionStart2 : 0;\n const browserEndIndex = (_selectionEnd = inputRef.current.selectionEnd) != null ? _selectionEnd : 0;\n if (browserStartIndex === 0 && browserEndIndex === 0) {\n return null;\n }\n const nextSectionIndex = browserStartIndex <= state.sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.\n : state.sections.findIndex(section => section.startInInput - section.startSeparator.length > browserStartIndex);\n return nextSectionIndex === -1 ? state.sections.length - 1 : nextSectionIndex - 1;\n },\n setSelectedSections: activeSectionIndex => setSelectedSections(activeSectionIndex)\n }));\n return _extends({\n placeholder,\n autoComplete: 'off'\n }, otherForwardedProps, {\n value: shouldShowPlaceholder ? '' : valueStr,\n inputMode,\n readOnly,\n onClick: handleInputClick,\n onFocus: handleInputFocus,\n onBlur: handleInputBlur,\n onPaste: handleInputPaste,\n onChange: handleInputChange,\n onKeyDown: handleInputKeyDown,\n onMouseUp: handleInputMouseUp,\n error: inputError,\n ref: handleRef\n });\n};","export const DATE_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minDate', 'maxDate', 'shouldDisableDate', 'shouldDisableMonth', 'shouldDisableYear'];\nexport const TIME_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minTime', 'maxTime', 'shouldDisableClock', 'shouldDisableTime', 'minutesStep', 'ampm', 'disableIgnoringDatePartForTimeValidation'];\nexport const DATE_TIME_VALIDATION_PROP_NAMES = ['minDateTime', 'maxDateTime'];\nconst VALIDATION_PROP_NAMES = [...DATE_VALIDATION_PROP_NAMES, ...TIME_VALIDATION_PROP_NAMES, ...DATE_TIME_VALIDATION_PROP_NAMES];\n/**\n * Extract the validation props for the props received by a component.\n * Limit the risk of forgetting some of them and reduce the bundle size.\n */\nexport const extractValidationProps = props => VALIDATION_PROP_NAMES.reduce((extractedProps, propName) => {\n if (props.hasOwnProperty(propName)) {\n extractedProps[propName] = props[propName];\n }\n return extractedProps;\n}, {});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { DATE_TIME_VALIDATION_PROP_NAMES, DATE_VALIDATION_PROP_NAMES, TIME_VALIDATION_PROP_NAMES } from './validation/extractValidationProps';\nconst SHARED_FIELD_INTERNAL_PROP_NAMES = ['value', 'defaultValue', 'referenceDate', 'format', 'formatDensity', 'onChange', 'timezone', 'readOnly', 'onError', 'shouldRespectLeadingZeros', 'selectedSections', 'onSelectedSectionsChange', 'unstableFieldRef'];\nexport const splitFieldInternalAndForwardedProps = (props, valueType) => {\n const forwardedProps = _extends({}, props);\n const internalProps = {};\n const extractProp = propName => {\n if (forwardedProps.hasOwnProperty(propName)) {\n // @ts-ignore\n internalProps[propName] = forwardedProps[propName];\n delete forwardedProps[propName];\n }\n };\n SHARED_FIELD_INTERNAL_PROP_NAMES.forEach(extractProp);\n if (valueType === 'date') {\n DATE_VALIDATION_PROP_NAMES.forEach(extractProp);\n } else if (valueType === 'time') {\n TIME_VALIDATION_PROP_NAMES.forEach(extractProp);\n } else if (valueType === 'date-time') {\n DATE_VALIDATION_PROP_NAMES.forEach(extractProp);\n TIME_VALIDATION_PROP_NAMES.forEach(extractProp);\n DATE_TIME_VALIDATION_PROP_NAMES.forEach(extractProp);\n }\n return {\n forwardedProps,\n internalProps\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { singleItemFieldValueManager, singleItemValueManager } from '../internals/utils/valueManagers';\nimport { useField } from '../internals/hooks/useField';\nimport { validateDate } from '../internals/utils/validation/validateDate';\nimport { applyDefaultDate } from '../internals/utils/date-utils';\nimport { useUtils, useDefaultDates } from '../internals/hooks/useUtils';\nimport { splitFieldInternalAndForwardedProps } from '../internals/utils/fields';\nconst useDefaultizedDateField = props => {\n var _props$disablePast, _props$disableFuture, _props$format;\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n return _extends({}, props, {\n disablePast: (_props$disablePast = props.disablePast) != null ? _props$disablePast : false,\n disableFuture: (_props$disableFuture = props.disableFuture) != null ? _props$disableFuture : false,\n format: (_props$format = props.format) != null ? _props$format : utils.formats.keyboardDate,\n minDate: applyDefaultDate(utils, props.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, props.maxDate, defaultDates.maxDate)\n });\n};\nexport const useDateField = ({\n props: inProps,\n inputRef\n}) => {\n const props = useDefaultizedDateField(inProps);\n const {\n forwardedProps,\n internalProps\n } = splitFieldInternalAndForwardedProps(props, 'date');\n return useField({\n inputRef,\n forwardedProps,\n internalProps,\n valueManager: singleItemValueManager,\n fieldValueManager: singleItemFieldValueManager,\n validator: validateDate,\n valueType: 'date'\n });\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"components\", \"componentsProps\", \"slots\", \"slotProps\", \"InputProps\", \"inputProps\"],\n _excluded2 = [\"inputRef\"],\n _excluded3 = [\"ref\", \"onPaste\", \"onKeyDown\", \"inputMode\", \"readOnly\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport MuiTextField from '@mui/material/TextField';\nimport { useThemeProps } from '@mui/material/styles';\nimport { useSlotProps } from '@mui/base/utils';\nimport { useDateField } from './useDateField';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, ref) {\n var _ref, _slots$textField, _slotProps$textField;\n const themeProps = useThemeProps({\n props: inProps,\n name: 'MuiDateField'\n });\n const {\n components,\n componentsProps,\n slots,\n slotProps,\n InputProps,\n inputProps\n } = themeProps,\n other = _objectWithoutPropertiesLoose(themeProps, _excluded);\n const ownerState = themeProps;\n const TextField = (_ref = (_slots$textField = slots == null ? void 0 : slots.textField) != null ? _slots$textField : components == null ? void 0 : components.TextField) != null ? _ref : MuiTextField;\n const _useSlotProps = useSlotProps({\n elementType: TextField,\n externalSlotProps: (_slotProps$textField = slotProps == null ? void 0 : slotProps.textField) != null ? _slotProps$textField : componentsProps == null ? void 0 : componentsProps.textField,\n externalForwardedProps: other,\n ownerState\n }),\n {\n inputRef: externalInputRef\n } = _useSlotProps,\n textFieldProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n\n // TODO: Remove when mui/material-ui#35088 will be merged\n textFieldProps.inputProps = _extends({}, textFieldProps.inputProps, inputProps);\n textFieldProps.InputProps = _extends({}, textFieldProps.InputProps, InputProps);\n const _useDateField = useDateField({\n props: textFieldProps,\n inputRef: externalInputRef\n }),\n {\n ref: inputRef,\n onPaste,\n onKeyDown,\n inputMode,\n readOnly\n } = _useDateField,\n fieldProps = _objectWithoutPropertiesLoose(_useDateField, _excluded3);\n return /*#__PURE__*/_jsx(TextField, _extends({\n ref: ref\n }, fieldProps, {\n InputProps: _extends({}, fieldProps.InputProps, {\n readOnly\n }),\n inputProps: _extends({}, fieldProps.inputProps, {\n inputMode,\n onPaste,\n onKeyDown,\n ref: inputRef\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DateField.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the `input` element is focused during the first mount.\n * @default false\n */\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).\n * @default 'primary'\n */\n color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),\n /**\n * Overridable components.\n * @default {}\n * @deprecated Please use `slots`.\n */\n components: PropTypes.object,\n /**\n * The props used for each component slot.\n * @default {}\n * @deprecated Please use `slotProps`.\n */\n componentsProps: PropTypes.object,\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n /**\n * Format of the date when rendered in the input(s).\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.\n */\n FormHelperTextProps: PropTypes.object,\n /**\n * If `true`, the input will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The helper text content.\n */\n helperText: PropTypes.node,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n /**\n * The id of the `input` element.\n * Use this prop to make `label` and `helperText` accessible for screen readers.\n */\n id: PropTypes.string,\n /**\n * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.\n * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.\n */\n InputLabelProps: PropTypes.object,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n /**\n * Props applied to the Input element.\n * It will be a [`FilledInput`](/material-ui/api/filled-input/),\n * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)\n * component depending on the `variant` prop value.\n */\n InputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.any.isRequired\n })]),\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any,\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n onBlur: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * Callback fired when the error associated to the current value changes.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TError} error The new error.\n * @param {TValue} value The value associated to the error.\n */\n onError: PropTypes.func,\n onFocus: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate a part of the new value that is not present in the format when both `value` and `defaultValue` are empty.\n * For example, on time fields it will be used to determine the date to set.\n * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.\n */\n referenceDate: PropTypes.any,\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The currently selected sections.\n * This prop accept four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.\n * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 4. If `null` is provided, no section will be selected\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({\n endIndex: PropTypes.number.isRequired,\n startIndex: PropTypes.number.isRequired\n })]),\n /**\n * Disable specific date.\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, the format will respect the leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `8/16/2018`)\n * If `false`, the format will always add leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `08/16/2018`)\n *\n * Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (e.g: \"DD\"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.\n *\n * Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.\n * If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\\u200e/g, '')`.\n *\n * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.\n * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.\n *\n * @default `false`\n */\n shouldRespectLeadingZeros: PropTypes.bool,\n /**\n * The size of the component.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The ref object used to imperatively interact with the field.\n */\n unstableFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.any,\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport { DateField };","import * as React from 'react';\nimport { validateDate } from '../internals/utils/validation/validateDate';\nimport { useLocalizationContext } from '../internals/hooks/useUtils';\nexport const useIsDateDisabled = ({\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n minDate,\n maxDate,\n disableFuture,\n disablePast,\n timezone\n}) => {\n const adapter = useLocalizationContext();\n return React.useCallback(day => validateDate({\n adapter,\n value: day,\n props: {\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n minDate,\n maxDate,\n disableFuture,\n disablePast,\n timezone\n }\n }) !== null, [adapter, shouldDisableDate, shouldDisableMonth, shouldDisableYear, minDate, maxDate, disableFuture, disablePast, timezone]);\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useIsDateDisabled } from './useIsDateDisabled';\nimport { useUtils, useNow } from '../internals/hooks/useUtils';\nimport { singleItemValueManager } from '../internals/utils/valueManagers';\nimport { SECTION_TYPE_GRANULARITY } from '../internals/utils/getDefaultReferenceDate';\nexport const createCalendarStateReducer = (reduceAnimations, disableSwitchToMonthOnDayFocus, utils) => (state, action) => {\n switch (action.type) {\n case 'changeMonth':\n return _extends({}, state, {\n slideDirection: action.direction,\n currentMonth: action.newMonth,\n isMonthSwitchingAnimating: !reduceAnimations\n });\n case 'finishMonthSwitchingAnimation':\n return _extends({}, state, {\n isMonthSwitchingAnimating: false\n });\n case 'changeFocusedDay':\n {\n if (state.focusedDay != null && action.focusedDay != null && utils.isSameDay(action.focusedDay, state.focusedDay)) {\n return state;\n }\n const needMonthSwitch = action.focusedDay != null && !disableSwitchToMonthOnDayFocus && !utils.isSameMonth(state.currentMonth, action.focusedDay);\n return _extends({}, state, {\n focusedDay: action.focusedDay,\n isMonthSwitchingAnimating: needMonthSwitch && !reduceAnimations && !action.withoutMonthSwitchingAnimation,\n currentMonth: needMonthSwitch ? utils.startOfMonth(action.focusedDay) : state.currentMonth,\n slideDirection: action.focusedDay != null && utils.isAfterDay(action.focusedDay, state.currentMonth) ? 'left' : 'right'\n });\n }\n default:\n throw new Error('missing support');\n }\n};\nexport const useCalendarState = params => {\n const {\n value,\n referenceDate: referenceDateProp,\n defaultCalendarMonth,\n disableFuture,\n disablePast,\n disableSwitchToMonthOnDayFocus = false,\n maxDate,\n minDate,\n onMonthChange,\n reduceAnimations,\n shouldDisableDate,\n timezone\n } = params;\n const now = useNow(timezone);\n const utils = useUtils();\n const reducerFn = React.useRef(createCalendarStateReducer(Boolean(reduceAnimations), disableSwitchToMonthOnDayFocus, utils)).current;\n const referenceDate = React.useMemo(() => {\n let externalReferenceDate = null;\n if (referenceDateProp) {\n externalReferenceDate = referenceDateProp;\n } else if (defaultCalendarMonth) {\n // For `defaultCalendarMonth`, we just want to keep the month and the year to avoid a behavior change.\n externalReferenceDate = utils.startOfMonth(defaultCalendarMonth);\n }\n return singleItemValueManager.getInitialReferenceValue({\n value,\n utils,\n timezone,\n props: params,\n referenceDate: externalReferenceDate,\n granularity: SECTION_TYPE_GRANULARITY.day\n });\n }, [] // eslint-disable-line react-hooks/exhaustive-deps\n );\n\n const [calendarState, dispatch] = React.useReducer(reducerFn, {\n isMonthSwitchingAnimating: false,\n focusedDay: value || now,\n currentMonth: utils.startOfMonth(referenceDate),\n slideDirection: 'left'\n });\n const handleChangeMonth = React.useCallback(payload => {\n dispatch(_extends({\n type: 'changeMonth'\n }, payload));\n if (onMonthChange) {\n onMonthChange(payload.newMonth);\n }\n }, [onMonthChange]);\n const changeMonth = React.useCallback(newDate => {\n const newDateRequested = newDate;\n if (utils.isSameMonth(newDateRequested, calendarState.currentMonth)) {\n return;\n }\n handleChangeMonth({\n newMonth: utils.startOfMonth(newDateRequested),\n direction: utils.isAfterDay(newDateRequested, calendarState.currentMonth) ? 'left' : 'right'\n });\n }, [calendarState.currentMonth, handleChangeMonth, utils]);\n const isDateDisabled = useIsDateDisabled({\n shouldDisableDate,\n minDate,\n maxDate,\n disableFuture,\n disablePast,\n timezone\n });\n const onMonthSwitchingAnimationEnd = React.useCallback(() => {\n dispatch({\n type: 'finishMonthSwitchingAnimation'\n });\n }, []);\n const changeFocusedDay = useEventCallback((newFocusedDate, withoutMonthSwitchingAnimation) => {\n if (!isDateDisabled(newFocusedDate)) {\n dispatch({\n type: 'changeFocusedDay',\n focusedDay: newFocusedDate,\n withoutMonthSwitchingAnimation\n });\n }\n });\n return {\n referenceDate,\n calendarState,\n changeMonth,\n changeFocusedDay,\n isDateDisabled,\n onMonthSwitchingAnimationEnd,\n handleChangeMonth\n };\n};","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getPickersFadeTransitionGroupUtilityClass = slot => generateUtilityClass('MuiPickersFadeTransitionGroup', slot);\nexport const pickersFadeTransitionGroupClasses = generateUtilityClasses('MuiPickersFadeTransitionGroup', ['root']);","import * as React from 'react';\nimport clsx from 'clsx';\nimport Fade from '@mui/material/Fade';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { TransitionGroup } from 'react-transition-group';\nimport { getPickersFadeTransitionGroupUtilityClass } from './pickersFadeTransitionGroupClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getPickersFadeTransitionGroupUtilityClass, classes);\n};\nconst animationDuration = 500;\nconst PickersFadeTransitionGroupRoot = styled(TransitionGroup, {\n name: 'MuiPickersFadeTransitionGroup',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})({\n display: 'block',\n position: 'relative'\n});\n\n/**\n * @ignore - do not document.\n */\nexport function PickersFadeTransitionGroup(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersFadeTransitionGroup'\n });\n const {\n children,\n className,\n reduceAnimations,\n transKey\n } = props;\n const classes = useUtilityClasses(props);\n if (reduceAnimations) {\n return children;\n }\n return /*#__PURE__*/_jsx(PickersFadeTransitionGroupRoot, {\n className: clsx(classes.root, className),\n children: /*#__PURE__*/_jsx(Fade, {\n appear: false,\n mountOnEnter: true,\n unmountOnExit: true,\n timeout: {\n appear: animationDuration,\n enter: animationDuration / 2,\n exit: 0\n },\n children: children\n }, transKey)\n });\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersDayUtilityClass(slot) {\n return generateUtilityClass('MuiPickersDay', slot);\n}\nexport const pickersDayClasses = generateUtilityClasses('MuiPickersDay', ['root', 'dayWithMargin', 'dayOutsideMonth', 'hiddenDaySpacingFiller', 'today', 'selected', 'disabled']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"day\", \"disabled\", \"disableHighlightToday\", \"disableMargin\", \"hidden\", \"isAnimating\", \"onClick\", \"onDaySelect\", \"onFocus\", \"onBlur\", \"onKeyDown\", \"onMouseDown\", \"onMouseEnter\", \"outsideCurrentMonth\", \"selected\", \"showDaysOutsideCurrentMonth\", \"children\", \"today\", \"isFirstVisibleCell\", \"isLastVisibleCell\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ButtonBase from '@mui/material/ButtonBase';\nimport { unstable_useEnhancedEffect as useEnhancedEffect, unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { alpha, styled, useThemeProps } from '@mui/material/styles';\nimport { useUtils } from '../internals/hooks/useUtils';\nimport { DAY_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';\nimport { getPickersDayUtilityClass, pickersDayClasses } from './pickersDayClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n selected,\n disableMargin,\n disableHighlightToday,\n today,\n disabled,\n outsideCurrentMonth,\n showDaysOutsideCurrentMonth,\n classes\n } = ownerState;\n const slots = {\n root: ['root', selected && 'selected', disabled && 'disabled', !disableMargin && 'dayWithMargin', !disableHighlightToday && today && 'today', outsideCurrentMonth && showDaysOutsideCurrentMonth && 'dayOutsideMonth', outsideCurrentMonth && !showDaysOutsideCurrentMonth && 'hiddenDaySpacingFiller'],\n hiddenDaySpacingFiller: ['hiddenDaySpacingFiller']\n };\n return composeClasses(slots, getPickersDayUtilityClass, classes);\n};\nconst styleArg = ({\n theme,\n ownerState\n}) => _extends({}, theme.typography.caption, {\n width: DAY_SIZE,\n height: DAY_SIZE,\n borderRadius: '50%',\n padding: 0,\n // explicitly setting to `transparent` to avoid potentially getting impacted by change from the overridden component\n backgroundColor: 'transparent',\n color: (theme.vars || theme).palette.text.primary,\n '@media (pointer: fine)': {\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)\n }\n },\n '&:focus': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.focusOpacity),\n [`&.${pickersDayClasses.selected}`]: {\n willChange: 'background-color',\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n },\n [`&.${pickersDayClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.short\n }),\n '&:hover': {\n willChange: 'background-color',\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n },\n [`&.${pickersDayClasses.disabled}:not(.${pickersDayClasses.selected})`]: {\n color: (theme.vars || theme).palette.text.disabled\n },\n [`&.${pickersDayClasses.disabled}&.${pickersDayClasses.selected}`]: {\n opacity: 0.6\n }\n}, !ownerState.disableMargin && {\n margin: `0 ${DAY_MARGIN}px`\n}, ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && {\n color: (theme.vars || theme).palette.text.secondary\n}, !ownerState.disableHighlightToday && ownerState.today && {\n [`&:not(.${pickersDayClasses.selected})`]: {\n border: `1px solid ${(theme.vars || theme).palette.text.secondary}`\n }\n});\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableMargin && styles.dayWithMargin, !ownerState.disableHighlightToday && ownerState.today && styles.today, !ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && styles.dayOutsideMonth, ownerState.outsideCurrentMonth && !ownerState.showDaysOutsideCurrentMonth && styles.hiddenDaySpacingFiller];\n};\nconst PickersDayRoot = styled(ButtonBase, {\n name: 'MuiPickersDay',\n slot: 'Root',\n overridesResolver\n})(styleArg);\nconst PickersDayFiller = styled('div', {\n name: 'MuiPickersDay',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => _extends({}, styleArg({\n theme,\n ownerState\n}), {\n // visibility: 'hidden' does not work here as it hides the element from screen readers as well\n opacity: 0,\n pointerEvents: 'none'\n}));\nconst noop = () => {};\nconst PickersDayRaw = /*#__PURE__*/React.forwardRef(function PickersDay(inProps, forwardedRef) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersDay'\n });\n const {\n autoFocus = false,\n className,\n day,\n disabled = false,\n disableHighlightToday = false,\n disableMargin = false,\n isAnimating,\n onClick,\n onDaySelect,\n onFocus = noop,\n onBlur = noop,\n onKeyDown = noop,\n onMouseDown = noop,\n onMouseEnter = noop,\n outsideCurrentMonth,\n selected = false,\n showDaysOutsideCurrentMonth = false,\n children,\n today: isToday = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n autoFocus,\n disabled,\n disableHighlightToday,\n disableMargin,\n selected,\n showDaysOutsideCurrentMonth,\n today: isToday\n });\n const classes = useUtilityClasses(ownerState);\n const utils = useUtils();\n const ref = React.useRef(null);\n const handleRef = useForkRef(ref, forwardedRef);\n\n // Since this is rendered when a Popper is opened we can't use passive effects.\n // Focusing in passive effects in Popper causes scroll jump.\n useEnhancedEffect(() => {\n if (autoFocus && !disabled && !isAnimating && !outsideCurrentMonth) {\n // ref.current being null would be a bug in MUI\n ref.current.focus();\n }\n }, [autoFocus, disabled, isAnimating, outsideCurrentMonth]);\n\n // For day outside of current month, move focus from mouseDown to mouseUp\n // Goal: have the onClick ends before sliding to the new month\n const handleMouseDown = event => {\n onMouseDown(event);\n if (outsideCurrentMonth) {\n event.preventDefault();\n }\n };\n const handleClick = event => {\n if (!disabled) {\n onDaySelect(day);\n }\n if (outsideCurrentMonth) {\n event.currentTarget.focus();\n }\n if (onClick) {\n onClick(event);\n }\n };\n if (outsideCurrentMonth && !showDaysOutsideCurrentMonth) {\n return /*#__PURE__*/_jsx(PickersDayFiller, {\n className: clsx(classes.root, classes.hiddenDaySpacingFiller, className),\n ownerState: ownerState,\n role: other.role\n });\n }\n return /*#__PURE__*/_jsx(PickersDayRoot, _extends({\n className: clsx(classes.root, className),\n ref: handleRef,\n centerRipple: true,\n disabled: disabled,\n tabIndex: selected ? 0 : -1,\n onKeyDown: event => onKeyDown(event, day),\n onFocus: event => onFocus(event, day),\n onBlur: event => onBlur(event, day),\n onMouseEnter: event => onMouseEnter(event, day),\n onClick: handleClick,\n onMouseDown: handleMouseDown\n }, other, {\n ownerState: ownerState,\n children: !children ? utils.format(day, 'dayOfMonth') : children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersDayRaw.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focusVisible: PropTypes.func.isRequired\n })\n })]),\n /**\n * If `true`, the ripples are centered.\n * They won't start at the cursor interaction position.\n * @default false\n */\n centerRipple: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * The date to show.\n */\n day: PropTypes.any.isRequired,\n /**\n * If `true`, renders as disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, days are rendering without margin. Useful for displaying linked range of days.\n * @default false\n */\n disableMargin: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * âš ï¸ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If `true`, the touch ripple effect is disabled.\n * @default false\n */\n disableTouchRipple: PropTypes.bool,\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n * @default false\n */\n focusRipple: PropTypes.bool,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n isAnimating: PropTypes.bool,\n /**\n * If `true`, day is the first visible cell of the month.\n * Either the first day of the month or the first day of the week depending on `showDaysOutsideCurrentMonth`.\n */\n isFirstVisibleCell: PropTypes.bool.isRequired,\n /**\n * If `true`, day is the last visible cell of the month.\n * Either the last day of the month or the last day of the week depending on `showDaysOutsideCurrentMonth`.\n */\n isLastVisibleCell: PropTypes.bool.isRequired,\n onBlur: PropTypes.func,\n onDaySelect: PropTypes.func.isRequired,\n onFocus: PropTypes.func,\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func,\n onKeyDown: PropTypes.func,\n onMouseEnter: PropTypes.func,\n /**\n * If `true`, day is outside of month and will be hidden.\n */\n outsideCurrentMonth: PropTypes.bool.isRequired,\n /**\n * If `true`, renders as selected.\n * @default false\n */\n selected: PropTypes.bool,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number,\n /**\n * If `true`, renders as today date.\n * @default false\n */\n today: PropTypes.bool,\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: PropTypes.object,\n /**\n * A ref that points to the `TouchRipple` element.\n */\n touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n pulsate: PropTypes.func.isRequired,\n start: PropTypes.func.isRequired,\n stop: PropTypes.func.isRequired\n })\n })])\n} : void 0;\n\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)\n *\n * API:\n *\n * - [PickersDay API](https://mui.com/x/api/date-pickers/pickers-day/)\n */\nexport const PickersDay = /*#__PURE__*/React.memo(PickersDayRaw);","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\nimport { forceReflow } from './utils/reflow';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <CSSTransition in={inProp} timeout={200} classNames=\"my-node\">\n * <div>\n * {\"I'll receive my-node-* classes\"}\n * </div>\n * </CSSTransition>\n * <button type=\"button\" onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n if (node) forceReflow(node);\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `<Transition>` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getPickersSlideTransitionUtilityClass = slot => generateUtilityClass('MuiPickersSlideTransition', slot);\nexport const pickersSlideTransitionClasses = generateUtilityClasses('MuiPickersSlideTransition', ['root', 'slideEnter-left', 'slideEnter-right', 'slideEnterActive', 'slideExit', 'slideExitActiveLeft-left', 'slideExitActiveLeft-right']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"reduceAnimations\", \"slideDirection\", \"transKey\", \"classes\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\nimport { getPickersSlideTransitionUtilityClass, pickersSlideTransitionClasses } from './pickersSlideTransitionClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n slideDirection\n } = ownerState;\n const slots = {\n root: ['root'],\n exit: ['slideExit'],\n enterActive: ['slideEnterActive'],\n enter: [`slideEnter-${slideDirection}`],\n exitActive: [`slideExitActiveLeft-${slideDirection}`]\n };\n return composeClasses(slots, getPickersSlideTransitionUtilityClass, classes);\n};\nexport const slideAnimationDuration = 350;\nconst PickersSlideTransitionRoot = styled(TransitionGroup, {\n name: 'MuiPickersSlideTransition',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root, {\n [`.${pickersSlideTransitionClasses['slideEnter-left']}`]: styles['slideEnter-left']\n }, {\n [`.${pickersSlideTransitionClasses['slideEnter-right']}`]: styles['slideEnter-right']\n }, {\n [`.${pickersSlideTransitionClasses.slideEnterActive}`]: styles.slideEnterActive\n }, {\n [`.${pickersSlideTransitionClasses.slideExit}`]: styles.slideExit\n }, {\n [`.${pickersSlideTransitionClasses['slideExitActiveLeft-left']}`]: styles['slideExitActiveLeft-left']\n }, {\n [`.${pickersSlideTransitionClasses['slideExitActiveLeft-right']}`]: styles['slideExitActiveLeft-right']\n }]\n})(({\n theme\n}) => {\n const slideTransition = theme.transitions.create('transform', {\n duration: slideAnimationDuration,\n easing: 'cubic-bezier(0.35, 0.8, 0.4, 1)'\n });\n return {\n display: 'block',\n position: 'relative',\n overflowX: 'hidden',\n '& > *': {\n position: 'absolute',\n top: 0,\n right: 0,\n left: 0\n },\n [`& .${pickersSlideTransitionClasses['slideEnter-left']}`]: {\n willChange: 'transform',\n transform: 'translate(100%)',\n zIndex: 1\n },\n [`& .${pickersSlideTransitionClasses['slideEnter-right']}`]: {\n willChange: 'transform',\n transform: 'translate(-100%)',\n zIndex: 1\n },\n [`& .${pickersSlideTransitionClasses.slideEnterActive}`]: {\n transform: 'translate(0%)',\n transition: slideTransition\n },\n [`& .${pickersSlideTransitionClasses.slideExit}`]: {\n transform: 'translate(0%)'\n },\n [`& .${pickersSlideTransitionClasses['slideExitActiveLeft-left']}`]: {\n willChange: 'transform',\n transform: 'translate(-100%)',\n transition: slideTransition,\n zIndex: 0\n },\n [`& .${pickersSlideTransitionClasses['slideExitActiveLeft-right']}`]: {\n willChange: 'transform',\n transform: 'translate(100%)',\n transition: slideTransition,\n zIndex: 0\n }\n };\n});\n\n/**\n * @ignore - do not document.\n */\nexport function PickersSlideTransition(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersSlideTransition'\n });\n const {\n children,\n className,\n reduceAnimations,\n transKey\n // extracting `classes` from `other`\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const classes = useUtilityClasses(props);\n if (reduceAnimations) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx(classes.root, className),\n children: children\n });\n }\n const transitionClasses = {\n exit: classes.exit,\n enterActive: classes.enterActive,\n enter: classes.enter,\n exitActive: classes.exitActive\n };\n return /*#__PURE__*/_jsx(PickersSlideTransitionRoot, {\n className: clsx(classes.root, className),\n childFactory: element => /*#__PURE__*/React.cloneElement(element, {\n classNames: transitionClasses\n }),\n role: \"presentation\",\n children: /*#__PURE__*/_jsx(CSSTransition, _extends({\n mountOnEnter: true,\n unmountOnExit: true,\n timeout: slideAnimationDuration,\n classNames: transitionClasses\n }, other, {\n children: children\n }), transKey)\n });\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getDayCalendarUtilityClass = slot => generateUtilityClass('MuiDayCalendar', slot);\nexport const dayPickerClasses = generateUtilityClasses('MuiDayCalendar', ['header', 'weekDayLabel', 'loadingContainer', 'slideTransition', 'monthContainer', 'weekContainer', 'weekNumberLabel', 'weekNumber']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"parentProps\", \"day\", \"focusableDay\", \"selectedDays\", \"isDateDisabled\", \"currentMonthNumber\", \"isViewFocused\"],\n _excluded2 = [\"ownerState\"];\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport Typography from '@mui/material/Typography';\nimport { useSlotProps } from '@mui/base/utils';\nimport { styled, useTheme, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, unstable_useControlled as useControlled } from '@mui/utils';\nimport clsx from 'clsx';\nimport { PickersDay } from '../PickersDay/PickersDay';\nimport { useUtils, useNow, useLocaleText } from '../internals/hooks/useUtils';\nimport { DAY_SIZE, DAY_MARGIN } from '../internals/constants/dimensions';\nimport { PickersSlideTransition } from './PickersSlideTransition';\nimport { useIsDateDisabled } from './useIsDateDisabled';\nimport { findClosestEnabledDate } from '../internals/utils/date-utils';\nimport { getDayCalendarUtilityClass } from './dayCalendarClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n header: ['header'],\n weekDayLabel: ['weekDayLabel'],\n loadingContainer: ['loadingContainer'],\n slideTransition: ['slideTransition'],\n monthContainer: ['monthContainer'],\n weekContainer: ['weekContainer'],\n weekNumberLabel: ['weekNumberLabel'],\n weekNumber: ['weekNumber']\n };\n return composeClasses(slots, getDayCalendarUtilityClass, classes);\n};\nconst defaultDayOfWeekFormatter = day => day.charAt(0).toUpperCase();\nconst weeksContainerHeight = (DAY_SIZE + DAY_MARGIN * 2) * 6;\nconst PickersCalendarDayHeader = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'Header',\n overridesResolver: (_, styles) => styles.header\n})({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n});\nconst PickersCalendarWeekDayLabel = styled(Typography, {\n name: 'MuiDayCalendar',\n slot: 'WeekDayLabel',\n overridesResolver: (_, styles) => styles.weekDayLabel\n})(({\n theme\n}) => ({\n width: 36,\n height: 40,\n margin: '0 2px',\n textAlign: 'center',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: (theme.vars || theme).palette.text.secondary\n}));\nconst PickersCalendarWeekNumberLabel = styled(Typography, {\n name: 'MuiDayPicker',\n slot: 'WeekNumberLabel',\n overridesResolver: (_, styles) => styles.weekNumberLabel\n})(({\n theme\n}) => ({\n width: 36,\n height: 40,\n margin: '0 2px',\n textAlign: 'center',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: theme.palette.text.disabled\n}));\nconst PickersCalendarWeekNumber = styled(Typography, {\n name: 'MuiDayPicker',\n slot: 'WeekNumber',\n overridesResolver: (_, styles) => styles.weekNumber\n})(({\n theme\n}) => _extends({}, theme.typography.caption, {\n width: DAY_SIZE,\n height: DAY_SIZE,\n padding: 0,\n margin: `0 ${DAY_MARGIN}px`,\n color: theme.palette.text.disabled,\n fontSize: '0.75rem',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'inline-flex'\n}));\nconst PickersCalendarLoadingContainer = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'LoadingContainer',\n overridesResolver: (_, styles) => styles.loadingContainer\n})({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: weeksContainerHeight\n});\nconst PickersCalendarSlideTransition = styled(PickersSlideTransition, {\n name: 'MuiDayCalendar',\n slot: 'SlideTransition',\n overridesResolver: (_, styles) => styles.slideTransition\n})({\n minHeight: weeksContainerHeight\n});\nconst PickersCalendarWeekContainer = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'MonthContainer',\n overridesResolver: (_, styles) => styles.monthContainer\n})({\n overflow: 'hidden'\n});\nconst PickersCalendarWeek = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'WeekContainer',\n overridesResolver: (_, styles) => styles.weekContainer\n})({\n margin: `${DAY_MARGIN}px 0`,\n display: 'flex',\n justifyContent: 'center'\n});\nfunction WrappedDay(_ref) {\n var _ref2, _slots$day, _slotProps$day;\n let {\n parentProps,\n day,\n focusableDay,\n selectedDays,\n isDateDisabled,\n currentMonthNumber,\n isViewFocused\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n const {\n disabled,\n disableHighlightToday,\n isMonthSwitchingAnimating,\n showDaysOutsideCurrentMonth,\n components,\n componentsProps,\n slots,\n slotProps,\n timezone\n } = parentProps;\n const utils = useUtils();\n const now = useNow(timezone);\n const isFocusableDay = focusableDay !== null && utils.isSameDay(day, focusableDay);\n const isSelected = selectedDays.some(selectedDay => utils.isSameDay(selectedDay, day));\n const isToday = utils.isSameDay(day, now);\n const Day = (_ref2 = (_slots$day = slots == null ? void 0 : slots.day) != null ? _slots$day : components == null ? void 0 : components.Day) != null ? _ref2 : PickersDay;\n // We don't want to pass to ownerState down, to avoid re-rendering all the day whenever a prop changes.\n const _useSlotProps = useSlotProps({\n elementType: Day,\n externalSlotProps: (_slotProps$day = slotProps == null ? void 0 : slotProps.day) != null ? _slotProps$day : componentsProps == null ? void 0 : componentsProps.day,\n additionalProps: _extends({\n disableHighlightToday,\n showDaysOutsideCurrentMonth,\n role: 'gridcell',\n isAnimating: isMonthSwitchingAnimating,\n // it is used in date range dragging logic by accessing `dataset.timestamp`\n 'data-timestamp': utils.toJsDate(day).valueOf()\n }, other),\n ownerState: _extends({}, parentProps, {\n day,\n selected: isSelected\n })\n }),\n dayProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const isDisabled = React.useMemo(() => disabled || isDateDisabled(day), [disabled, isDateDisabled, day]);\n const outsideCurrentMonth = React.useMemo(() => utils.getMonth(day) !== currentMonthNumber, [utils, day, currentMonthNumber]);\n const isFirstVisibleCell = React.useMemo(() => {\n const startOfMonth = utils.startOfMonth(utils.setMonth(day, currentMonthNumber));\n if (!showDaysOutsideCurrentMonth) {\n return utils.isSameDay(day, startOfMonth);\n }\n return utils.isSameDay(day, utils.startOfWeek(startOfMonth));\n }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils]);\n const isLastVisibleCell = React.useMemo(() => {\n const endOfMonth = utils.endOfMonth(utils.setMonth(day, currentMonthNumber));\n if (!showDaysOutsideCurrentMonth) {\n return utils.isSameDay(day, endOfMonth);\n }\n return utils.isSameDay(day, utils.endOfWeek(endOfMonth));\n }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils]);\n return /*#__PURE__*/_jsx(Day, _extends({}, dayProps, {\n day: day,\n disabled: isDisabled,\n autoFocus: isViewFocused && isFocusableDay,\n today: isToday,\n outsideCurrentMonth: outsideCurrentMonth,\n isFirstVisibleCell: isFirstVisibleCell,\n isLastVisibleCell: isLastVisibleCell,\n selected: isSelected,\n tabIndex: isFocusableDay ? 0 : -1,\n \"aria-selected\": isSelected,\n \"aria-current\": isToday ? 'date' : undefined\n }));\n}\n\n/**\n * @ignore - do not document.\n */\nexport function DayCalendar(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDayCalendar'\n });\n const {\n onFocusedDayChange,\n className,\n currentMonth,\n selectedDays,\n focusedDay,\n loading,\n onSelectedDaysChange,\n onMonthSwitchingAnimationEnd,\n readOnly,\n reduceAnimations,\n renderLoading = () => /*#__PURE__*/_jsx(\"span\", {\n children: \"...\"\n }),\n slideDirection,\n TransitionProps,\n disablePast,\n disableFuture,\n minDate,\n maxDate,\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n dayOfWeekFormatter = defaultDayOfWeekFormatter,\n hasFocus,\n onFocusedViewChange,\n gridLabelId,\n displayWeekNumber,\n fixedWeekNumber,\n autoFocus,\n timezone\n } = props;\n const now = useNow(timezone);\n const utils = useUtils();\n const classes = useUtilityClasses(props);\n const theme = useTheme();\n const isRTL = theme.direction === 'rtl';\n const isDateDisabled = useIsDateDisabled({\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n minDate,\n maxDate,\n disablePast,\n disableFuture,\n timezone\n });\n const localeText = useLocaleText();\n const [internalHasFocus, setInternalHasFocus] = useControlled({\n name: 'DayCalendar',\n state: 'hasFocus',\n controlled: hasFocus,\n default: autoFocus != null ? autoFocus : false\n });\n const [internalFocusedDay, setInternalFocusedDay] = React.useState(() => focusedDay || now);\n const handleDaySelect = useEventCallback(day => {\n if (readOnly) {\n return;\n }\n onSelectedDaysChange(day);\n });\n const focusDay = day => {\n if (!isDateDisabled(day)) {\n onFocusedDayChange(day);\n setInternalFocusedDay(day);\n onFocusedViewChange == null ? void 0 : onFocusedViewChange(true);\n setInternalHasFocus(true);\n }\n };\n const handleKeyDown = useEventCallback((event, day) => {\n switch (event.key) {\n case 'ArrowUp':\n focusDay(utils.addDays(day, -7));\n event.preventDefault();\n break;\n case 'ArrowDown':\n focusDay(utils.addDays(day, 7));\n event.preventDefault();\n break;\n case 'ArrowLeft':\n {\n const newFocusedDayDefault = utils.addDays(day, isRTL ? 1 : -1);\n const nextAvailableMonth = utils.addMonths(day, isRTL ? 1 : -1);\n const closestDayToFocus = findClosestEnabledDate({\n utils,\n date: newFocusedDayDefault,\n minDate: isRTL ? newFocusedDayDefault : utils.startOfMonth(nextAvailableMonth),\n maxDate: isRTL ? utils.endOfMonth(nextAvailableMonth) : newFocusedDayDefault,\n isDateDisabled,\n timezone\n });\n focusDay(closestDayToFocus || newFocusedDayDefault);\n event.preventDefault();\n break;\n }\n case 'ArrowRight':\n {\n const newFocusedDayDefault = utils.addDays(day, isRTL ? -1 : 1);\n const nextAvailableMonth = utils.addMonths(day, isRTL ? -1 : 1);\n const closestDayToFocus = findClosestEnabledDate({\n utils,\n date: newFocusedDayDefault,\n minDate: isRTL ? utils.startOfMonth(nextAvailableMonth) : newFocusedDayDefault,\n maxDate: isRTL ? newFocusedDayDefault : utils.endOfMonth(nextAvailableMonth),\n isDateDisabled,\n timezone\n });\n focusDay(closestDayToFocus || newFocusedDayDefault);\n event.preventDefault();\n break;\n }\n case 'Home':\n focusDay(utils.startOfWeek(day));\n event.preventDefault();\n break;\n case 'End':\n focusDay(utils.endOfWeek(day));\n event.preventDefault();\n break;\n case 'PageUp':\n focusDay(utils.addMonths(day, 1));\n event.preventDefault();\n break;\n case 'PageDown':\n focusDay(utils.addMonths(day, -1));\n event.preventDefault();\n break;\n default:\n break;\n }\n });\n const handleFocus = useEventCallback((event, day) => focusDay(day));\n const handleBlur = useEventCallback((event, day) => {\n if (internalHasFocus && utils.isSameDay(internalFocusedDay, day)) {\n onFocusedViewChange == null ? void 0 : onFocusedViewChange(false);\n }\n });\n const currentMonthNumber = utils.getMonth(currentMonth);\n const validSelectedDays = React.useMemo(() => selectedDays.filter(day => !!day).map(day => utils.startOfDay(day)), [utils, selectedDays]);\n\n // need a new ref whenever the `key` of the transition changes: http://reactcommunity.org/react-transition-group/transition/#Transition-prop-nodeRef.\n const transitionKey = currentMonthNumber;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const slideNodeRef = React.useMemo(() => /*#__PURE__*/React.createRef(), [transitionKey]);\n const startOfCurrentWeek = utils.startOfWeek(now);\n const focusableDay = React.useMemo(() => {\n const startOfMonth = utils.startOfMonth(currentMonth);\n const endOfMonth = utils.endOfMonth(currentMonth);\n if (isDateDisabled(internalFocusedDay) || utils.isAfterDay(internalFocusedDay, endOfMonth) || utils.isBeforeDay(internalFocusedDay, startOfMonth)) {\n return findClosestEnabledDate({\n utils,\n date: internalFocusedDay,\n minDate: startOfMonth,\n maxDate: endOfMonth,\n disablePast,\n disableFuture,\n isDateDisabled,\n timezone\n });\n }\n return internalFocusedDay;\n }, [currentMonth, disableFuture, disablePast, internalFocusedDay, isDateDisabled, utils, timezone]);\n const weeksToDisplay = React.useMemo(() => {\n const currentMonthWithTimezone = utils.setTimezone(currentMonth, timezone);\n const toDisplay = utils.getWeekArray(currentMonthWithTimezone);\n let nextMonth = utils.addMonths(currentMonthWithTimezone, 1);\n while (fixedWeekNumber && toDisplay.length < fixedWeekNumber) {\n const additionalWeeks = utils.getWeekArray(nextMonth);\n const hasCommonWeek = utils.isSameDay(toDisplay[toDisplay.length - 1][0], additionalWeeks[0][0]);\n additionalWeeks.slice(hasCommonWeek ? 1 : 0).forEach(week => {\n if (toDisplay.length < fixedWeekNumber) {\n toDisplay.push(week);\n }\n });\n nextMonth = utils.addMonths(nextMonth, 1);\n }\n return toDisplay;\n }, [currentMonth, fixedWeekNumber, utils, timezone]);\n return /*#__PURE__*/_jsxs(\"div\", {\n role: \"grid\",\n \"aria-labelledby\": gridLabelId,\n children: [/*#__PURE__*/_jsxs(PickersCalendarDayHeader, {\n role: \"row\",\n className: classes.header,\n children: [displayWeekNumber && /*#__PURE__*/_jsx(PickersCalendarWeekNumberLabel, {\n variant: \"caption\",\n role: \"columnheader\",\n \"aria-label\": localeText.calendarWeekNumberHeaderLabel,\n className: classes.weekNumberLabel,\n children: localeText.calendarWeekNumberHeaderText\n }), utils.getWeekdays().map((day, i) => {\n var _dayOfWeekFormatter;\n return /*#__PURE__*/_jsx(PickersCalendarWeekDayLabel, {\n variant: \"caption\",\n role: \"columnheader\",\n \"aria-label\": utils.format(utils.addDays(startOfCurrentWeek, i), 'weekday'),\n className: classes.weekDayLabel,\n children: (_dayOfWeekFormatter = dayOfWeekFormatter == null ? void 0 : dayOfWeekFormatter(day)) != null ? _dayOfWeekFormatter : day\n }, day + i.toString());\n })]\n }), loading ? /*#__PURE__*/_jsx(PickersCalendarLoadingContainer, {\n className: classes.loadingContainer,\n children: renderLoading()\n }) : /*#__PURE__*/_jsx(PickersCalendarSlideTransition, _extends({\n transKey: transitionKey,\n onExited: onMonthSwitchingAnimationEnd,\n reduceAnimations: reduceAnimations,\n slideDirection: slideDirection,\n className: clsx(className, classes.slideTransition)\n }, TransitionProps, {\n nodeRef: slideNodeRef,\n children: /*#__PURE__*/_jsx(PickersCalendarWeekContainer, {\n ref: slideNodeRef,\n role: \"rowgroup\",\n className: classes.monthContainer,\n children: weeksToDisplay.map((week, index) => /*#__PURE__*/_jsxs(PickersCalendarWeek, {\n role: \"row\",\n className: classes.weekContainer\n // fix issue of announcing row 1 as row 2\n // caused by week day labels row\n ,\n \"aria-rowindex\": index + 1,\n children: [displayWeekNumber && /*#__PURE__*/_jsx(PickersCalendarWeekNumber, {\n className: classes.weekNumber,\n role: \"rowheader\",\n \"aria-label\": localeText.calendarWeekNumberAriaLabelText(utils.getWeekNumber(week[0])),\n children: localeText.calendarWeekNumberText(utils.getWeekNumber(week[0]))\n }), week.map((day, dayIndex) => /*#__PURE__*/_jsx(WrappedDay, {\n parentProps: props,\n day: day,\n selectedDays: validSelectedDays,\n focusableDay: focusableDay,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onDaySelect: handleDaySelect,\n isDateDisabled: isDateDisabled,\n currentMonthNumber: currentMonthNumber,\n isViewFocused: internalHasFocus\n // fix issue of announcing column 1 as column 2 when `displayWeekNumber` is enabled\n ,\n \"aria-colindex\": dayIndex + 1\n }, day.toString()))]\n }, `week-${week[0]}`))\n })\n }))]\n });\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersArrowSwitcherUtilityClass(slot) {\n return generateUtilityClass('MuiPickersArrowSwitcher', slot);\n}\nexport const pickersArrowSwitcherClasses = generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"slots\", \"slotProps\", \"isNextDisabled\", \"isNextHidden\", \"onGoToNext\", \"nextLabel\", \"isPreviousDisabled\", \"isPreviousHidden\", \"onGoToPrevious\", \"previousLabel\"],\n _excluded2 = [\"ownerState\"],\n _excluded3 = [\"ownerState\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@mui/material/Typography';\nimport { useTheme, styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { useSlotProps } from '@mui/base/utils';\nimport IconButton from '@mui/material/IconButton';\nimport { ArrowLeftIcon, ArrowRightIcon } from '../../../icons';\nimport { getPickersArrowSwitcherUtilityClass } from './pickersArrowSwitcherClasses';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PickersArrowSwitcherRoot = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex'\n});\nconst PickersArrowSwitcherSpacer = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Spacer',\n overridesResolver: (props, styles) => styles.spacer\n})(({\n theme\n}) => ({\n width: theme.spacing(3)\n}));\nconst PickersArrowSwitcherButton = styled(IconButton, {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Button',\n overridesResolver: (props, styles) => styles.button\n})(({\n ownerState\n}) => _extends({}, ownerState.hidden && {\n visibility: 'hidden'\n}));\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n spacer: ['spacer'],\n button: ['button']\n };\n return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes);\n};\nexport const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function PickersArrowSwitcher(inProps, ref) {\n var _slots$previousIconBu, _slots$nextIconButton, _slots$leftArrowIcon, _slots$rightArrowIcon;\n const theme = useTheme();\n const isRTL = theme.direction === 'rtl';\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersArrowSwitcher'\n });\n const {\n children,\n className,\n slots,\n slotProps,\n isNextDisabled,\n isNextHidden,\n onGoToNext,\n nextLabel,\n isPreviousDisabled,\n isPreviousHidden,\n onGoToPrevious,\n previousLabel\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const nextProps = {\n isDisabled: isNextDisabled,\n isHidden: isNextHidden,\n goTo: onGoToNext,\n label: nextLabel\n };\n const previousProps = {\n isDisabled: isPreviousDisabled,\n isHidden: isPreviousHidden,\n goTo: onGoToPrevious,\n label: previousLabel\n };\n const [leftProps, rightProps] = isRTL ? [nextProps, previousProps] : [previousProps, nextProps];\n const PreviousIconButton = (_slots$previousIconBu = slots == null ? void 0 : slots.previousIconButton) != null ? _slots$previousIconBu : PickersArrowSwitcherButton;\n const previousIconButtonProps = useSlotProps({\n elementType: PreviousIconButton,\n externalSlotProps: slotProps == null ? void 0 : slotProps.previousIconButton,\n additionalProps: {\n size: 'medium',\n title: leftProps.label,\n 'aria-label': leftProps.label,\n disabled: leftProps.isDisabled,\n edge: 'end',\n onClick: leftProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n hidden: leftProps.isHidden\n }),\n className: classes.button\n });\n const NextIconButton = (_slots$nextIconButton = slots == null ? void 0 : slots.nextIconButton) != null ? _slots$nextIconButton : PickersArrowSwitcherButton;\n const nextIconButtonProps = useSlotProps({\n elementType: NextIconButton,\n externalSlotProps: slotProps == null ? void 0 : slotProps.nextIconButton,\n additionalProps: {\n size: 'medium',\n title: rightProps.label,\n 'aria-label': rightProps.label,\n disabled: rightProps.isDisabled,\n edge: 'start',\n onClick: rightProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n hidden: rightProps.isHidden\n }),\n className: classes.button\n });\n const LeftArrowIcon = (_slots$leftArrowIcon = slots == null ? void 0 : slots.leftArrowIcon) != null ? _slots$leftArrowIcon : ArrowLeftIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps = useSlotProps({\n elementType: LeftArrowIcon,\n externalSlotProps: slotProps == null ? void 0 : slotProps.leftArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState: undefined\n }),\n leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const RightArrowIcon = (_slots$rightArrowIcon = slots == null ? void 0 : slots.rightArrowIcon) != null ? _slots$rightArrowIcon : ArrowRightIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps2 = useSlotProps({\n elementType: RightArrowIcon,\n externalSlotProps: slotProps == null ? void 0 : slotProps.rightArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState: undefined\n }),\n rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);\n return /*#__PURE__*/_jsxs(PickersArrowSwitcherRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(PreviousIconButton, _extends({}, previousIconButtonProps, {\n children: isRTL ? /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps)) : /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps))\n })), children ? /*#__PURE__*/_jsx(Typography, {\n variant: \"subtitle1\",\n component: \"span\",\n children: children\n }) : /*#__PURE__*/_jsx(PickersArrowSwitcherSpacer, {\n className: classes.spacer,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(NextIconButton, _extends({}, nextIconButtonProps, {\n children: isRTL ? /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps)) : /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps))\n }))]\n }));\n});","import * as React from 'react';\nimport { useUtils } from './useUtils';\nimport { getMeridiem, convertToMeridiem } from '../utils/time-utils';\nexport function useNextMonthDisabled(month, {\n disableFuture,\n maxDate,\n timezone\n}) {\n const utils = useUtils();\n return React.useMemo(() => {\n const now = utils.dateWithTimezone(undefined, timezone);\n const lastEnabledMonth = utils.startOfMonth(disableFuture && utils.isBefore(now, maxDate) ? now : maxDate);\n return !utils.isAfter(lastEnabledMonth, month);\n }, [disableFuture, maxDate, month, utils, timezone]);\n}\nexport function usePreviousMonthDisabled(month, {\n disablePast,\n minDate,\n timezone\n}) {\n const utils = useUtils();\n return React.useMemo(() => {\n const now = utils.dateWithTimezone(undefined, timezone);\n const firstEnabledMonth = utils.startOfMonth(disablePast && utils.isAfter(now, minDate) ? now : minDate);\n return !utils.isBefore(firstEnabledMonth, month);\n }, [disablePast, minDate, month, utils, timezone]);\n}\nexport function useMeridiemMode(date, ampm, onChange, selectionState) {\n const utils = useUtils();\n const meridiemMode = getMeridiem(date, utils);\n const handleMeridiemChange = React.useCallback(mode => {\n const timeWithMeridiem = date == null ? null : convertToMeridiem(date, mode, Boolean(ampm), utils);\n onChange(timeWithMeridiem, selectionState != null ? selectionState : 'partial');\n }, [ampm, date, onChange, selectionState, utils]);\n return {\n meridiemMode,\n handleMeridiemChange\n };\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getPickersCalendarHeaderUtilityClass = slot => generateUtilityClass('MuiPickersCalendarHeader', slot);\nexport const pickersCalendarHeaderClasses = generateUtilityClasses('MuiPickersCalendarHeader', ['root', 'labelContainer', 'label', 'switchViewButton', 'switchViewIcon']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"ownerState\"];\nimport * as React from 'react';\nimport Fade from '@mui/material/Fade';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { useSlotProps } from '@mui/base/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/utils';\nimport IconButton from '@mui/material/IconButton';\nimport { useLocaleText, useUtils } from '../internals/hooks/useUtils';\nimport { PickersFadeTransitionGroup } from './PickersFadeTransitionGroup';\nimport { ArrowDropDownIcon } from '../icons';\nimport { PickersArrowSwitcher } from '../internals/components/PickersArrowSwitcher';\nimport { usePreviousMonthDisabled, useNextMonthDisabled } from '../internals/hooks/date-helpers-hooks';\nimport { getPickersCalendarHeaderUtilityClass, pickersCalendarHeaderClasses } from './pickersCalendarHeaderClasses';\n\n// We keep the interface to allow module augmentation\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n labelContainer: ['labelContainer'],\n label: ['label'],\n switchViewButton: ['switchViewButton'],\n switchViewIcon: ['switchViewIcon']\n };\n return composeClasses(slots, getPickersCalendarHeaderUtilityClass, classes);\n};\nconst PickersCalendarHeaderRoot = styled('div', {\n name: 'MuiPickersCalendarHeader',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})({\n display: 'flex',\n alignItems: 'center',\n marginTop: 16,\n marginBottom: 8,\n paddingLeft: 24,\n paddingRight: 12,\n // prevent jumping in safari\n maxHeight: 30,\n minHeight: 30\n});\nconst PickersCalendarHeaderLabelContainer = styled('div', {\n name: 'MuiPickersCalendarHeader',\n slot: 'LabelContainer',\n overridesResolver: (_, styles) => styles.labelContainer\n})(({\n theme\n}) => _extends({\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'center',\n cursor: 'pointer',\n marginRight: 'auto'\n}, theme.typography.body1, {\n fontWeight: theme.typography.fontWeightMedium\n}));\nconst PickersCalendarHeaderLabel = styled('div', {\n name: 'MuiPickersCalendarHeader',\n slot: 'Label',\n overridesResolver: (_, styles) => styles.label\n})({\n marginRight: 6\n});\nconst PickersCalendarHeaderSwitchViewButton = styled(IconButton, {\n name: 'MuiPickersCalendarHeader',\n slot: 'SwitchViewButton',\n overridesResolver: (_, styles) => styles.switchViewButton\n})(({\n ownerState\n}) => _extends({\n marginRight: 'auto'\n}, ownerState.view === 'year' && {\n [`.${pickersCalendarHeaderClasses.switchViewIcon}`]: {\n transform: 'rotate(180deg)'\n }\n}));\nconst PickersCalendarHeaderSwitchViewIcon = styled(ArrowDropDownIcon, {\n name: 'MuiPickersCalendarHeader',\n slot: 'SwitchViewIcon',\n overridesResolver: (_, styles) => styles.switchViewIcon\n})(({\n theme\n}) => ({\n willChange: 'transform',\n transition: theme.transitions.create('transform'),\n transform: 'rotate(0deg)'\n}));\n\n/**\n * @ignore - do not document.\n */\nexport function PickersCalendarHeader(inProps) {\n var _slots$switchViewButt, _slots$switchViewIcon;\n const localeText = useLocaleText();\n const utils = useUtils();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersCalendarHeader'\n });\n const {\n slots,\n slotProps,\n currentMonth: month,\n disabled,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n onMonthChange,\n onViewChange,\n view,\n reduceAnimations,\n views,\n labelId,\n timezone\n } = props;\n const ownerState = props;\n const classes = useUtilityClasses(props);\n const SwitchViewButton = (_slots$switchViewButt = slots == null ? void 0 : slots.switchViewButton) != null ? _slots$switchViewButt : PickersCalendarHeaderSwitchViewButton;\n const switchViewButtonProps = useSlotProps({\n elementType: SwitchViewButton,\n externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewButton,\n additionalProps: {\n size: 'small',\n 'aria-label': localeText.calendarViewSwitchingButtonAriaLabel(view)\n },\n ownerState,\n className: classes.switchViewButton\n });\n const SwitchViewIcon = (_slots$switchViewIcon = slots == null ? void 0 : slots.switchViewIcon) != null ? _slots$switchViewIcon : PickersCalendarHeaderSwitchViewIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps = useSlotProps({\n elementType: SwitchViewIcon,\n externalSlotProps: slotProps == null ? void 0 : slotProps.switchViewIcon,\n ownerState: undefined,\n className: classes.switchViewIcon\n }),\n switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded);\n const selectNextMonth = () => onMonthChange(utils.addMonths(month, 1), 'left');\n const selectPreviousMonth = () => onMonthChange(utils.addMonths(month, -1), 'right');\n const isNextMonthDisabled = useNextMonthDisabled(month, {\n disableFuture,\n maxDate,\n timezone\n });\n const isPreviousMonthDisabled = usePreviousMonthDisabled(month, {\n disablePast,\n minDate,\n timezone\n });\n const handleToggleView = () => {\n if (views.length === 1 || !onViewChange || disabled) {\n return;\n }\n if (views.length === 2) {\n onViewChange(views.find(el => el !== view) || views[0]);\n } else {\n // switching only between first 2\n const nextIndexToOpen = views.indexOf(view) !== 0 ? 0 : 1;\n onViewChange(views[nextIndexToOpen]);\n }\n };\n\n // No need to display more information\n if (views.length === 1 && views[0] === 'year') {\n return null;\n }\n return /*#__PURE__*/_jsxs(PickersCalendarHeaderRoot, {\n ownerState: ownerState,\n className: classes.root,\n children: [/*#__PURE__*/_jsxs(PickersCalendarHeaderLabelContainer, {\n role: \"presentation\",\n onClick: handleToggleView,\n ownerState: ownerState\n // putting this on the label item element below breaks when using transition\n ,\n \"aria-live\": \"polite\",\n className: classes.labelContainer,\n children: [/*#__PURE__*/_jsx(PickersFadeTransitionGroup, {\n reduceAnimations: reduceAnimations,\n transKey: utils.format(month, 'monthAndYear'),\n children: /*#__PURE__*/_jsx(PickersCalendarHeaderLabel, {\n id: labelId,\n ownerState: ownerState,\n className: classes.label,\n children: utils.format(month, 'monthAndYear')\n })\n }), views.length > 1 && !disabled && /*#__PURE__*/_jsx(SwitchViewButton, _extends({}, switchViewButtonProps, {\n children: /*#__PURE__*/_jsx(SwitchViewIcon, _extends({}, switchViewIconProps))\n }))]\n }), /*#__PURE__*/_jsx(Fade, {\n in: view === 'day',\n children: /*#__PURE__*/_jsx(PickersArrowSwitcher, {\n slots: slots,\n slotProps: slotProps,\n onGoToPrevious: selectPreviousMonth,\n isPreviousDisabled: isPreviousMonthDisabled,\n previousLabel: localeText.previousMonth,\n onGoToNext: selectNextMonth,\n isNextDisabled: isNextMonthDisabled,\n nextLabel: localeText.nextMonth\n })\n })]\n });\n}","import { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH, VIEW_HEIGHT } from '../../constants/dimensions';\nexport const PickerViewRoot = styled('div')({\n overflow: 'hidden',\n width: DIALOG_WIDTH,\n maxHeight: VIEW_HEIGHT,\n display: 'flex',\n flexDirection: 'column',\n margin: '0 auto'\n});","export const defaultReduceAnimations = typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent);","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getDateCalendarUtilityClass = slot => generateUtilityClass('MuiDateCalendar', slot);\nexport const dateCalendarClasses = generateUtilityClasses('MuiDateCalendar', ['root', 'viewTransitionContainer']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"onViewChange\", \"value\", \"defaultValue\", \"referenceDate\", \"disableFuture\", \"disablePast\", \"defaultCalendarMonth\", \"onChange\", \"onYearChange\", \"onMonthChange\", \"reduceAnimations\", \"shouldDisableDate\", \"shouldDisableMonth\", \"shouldDisableYear\", \"view\", \"views\", \"openTo\", \"className\", \"disabled\", \"readOnly\", \"minDate\", \"maxDate\", \"disableHighlightToday\", \"focusedView\", \"onFocusedViewChange\", \"showDaysOutsideCurrentMonth\", \"fixedWeekNumber\", \"dayOfWeekFormatter\", \"components\", \"componentsProps\", \"slots\", \"slotProps\", \"loading\", \"renderLoading\", \"displayWeekNumber\", \"yearsPerRow\", \"monthsPerRow\", \"timezone\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { useCalendarState } from './useCalendarState';\nimport { useDefaultDates, useUtils } from '../internals/hooks/useUtils';\nimport { PickersFadeTransitionGroup } from './PickersFadeTransitionGroup';\nimport { DayCalendar } from './DayCalendar';\nimport { MonthCalendar } from '../MonthCalendar';\nimport { YearCalendar } from '../YearCalendar';\nimport { useViews } from '../internals/hooks/useViews';\nimport { PickersCalendarHeader } from './PickersCalendarHeader';\nimport { findClosestEnabledDate, applyDefaultDate, mergeDateAndTime } from '../internals/utils/date-utils';\nimport { PickerViewRoot } from '../internals/components/PickerViewRoot';\nimport { defaultReduceAnimations } from '../internals/utils/defaultReduceAnimations';\nimport { getDateCalendarUtilityClass } from './dateCalendarClasses';\nimport { useControlledValueWithTimezone } from '../internals/hooks/useValueWithTimezone';\nimport { singleItemValueManager } from '../internals/utils/valueManagers';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n viewTransitionContainer: ['viewTransitionContainer']\n };\n return composeClasses(slots, getDateCalendarUtilityClass, classes);\n};\nfunction useDateCalendarDefaultizedProps(props, name) {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const themeProps = useThemeProps({\n props,\n name\n });\n return _extends({\n loading: false,\n disablePast: false,\n disableFuture: false,\n openTo: 'day',\n views: ['year', 'day'],\n reduceAnimations: defaultReduceAnimations,\n renderLoading: () => /*#__PURE__*/_jsx(\"span\", {\n children: \"...\"\n })\n }, themeProps, {\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)\n });\n}\nconst DateCalendarRoot = styled(PickerViewRoot, {\n name: 'MuiDateCalendar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'column'\n});\nconst DateCalendarViewTransitionContainer = styled(PickersFadeTransitionGroup, {\n name: 'MuiDateCalendar',\n slot: 'ViewTransitionContainer',\n overridesResolver: (props, styles) => styles.viewTransitionContainer\n})({});\n/**\n *\n * Demos:\n *\n * - [Date Picker](https://mui.com/x/react-date-pickers/date-picker/)\n *\n * API:\n *\n * - [DateCalendar API](https://mui.com/x/api/date-pickers/date-calendar/)\n */\nexport const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(inProps, ref) {\n const utils = useUtils();\n const id = useId();\n const props = useDateCalendarDefaultizedProps(inProps, 'MuiDateCalendar');\n const {\n autoFocus,\n onViewChange,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disableFuture,\n disablePast,\n defaultCalendarMonth,\n onChange,\n onYearChange,\n onMonthChange,\n reduceAnimations,\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n view: inView,\n views,\n openTo,\n className,\n disabled,\n readOnly,\n minDate,\n maxDate,\n disableHighlightToday,\n focusedView: inFocusedView,\n onFocusedViewChange,\n showDaysOutsideCurrentMonth,\n fixedWeekNumber,\n dayOfWeekFormatter,\n components,\n componentsProps,\n slots,\n slotProps,\n loading,\n renderLoading,\n displayWeekNumber,\n yearsPerRow,\n monthsPerRow,\n timezone: timezoneProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValueWithTimezone({\n name: 'DateCalendar',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n onChange,\n valueManager: singleItemValueManager\n });\n const {\n view,\n setView,\n focusedView,\n setFocusedView,\n goToNextView,\n setValueAndGoToNextView\n } = useViews({\n view: inView,\n views,\n openTo,\n onChange: handleValueChange,\n onViewChange,\n autoFocus,\n focusedView: inFocusedView,\n onFocusedViewChange\n });\n const {\n referenceDate,\n calendarState,\n changeFocusedDay,\n changeMonth,\n handleChangeMonth,\n isDateDisabled,\n onMonthSwitchingAnimationEnd\n } = useCalendarState({\n value,\n defaultCalendarMonth,\n referenceDate: referenceDateProp,\n reduceAnimations,\n onMonthChange,\n minDate,\n maxDate,\n shouldDisableDate,\n disablePast,\n disableFuture,\n timezone\n });\n const handleDateMonthChange = useEventCallback(newDate => {\n const startOfMonth = utils.startOfMonth(newDate);\n const endOfMonth = utils.endOfMonth(newDate);\n const closestEnabledDate = isDateDisabled(newDate) ? findClosestEnabledDate({\n utils,\n date: newDate,\n minDate: utils.isBefore(minDate, startOfMonth) ? startOfMonth : minDate,\n maxDate: utils.isAfter(maxDate, endOfMonth) ? endOfMonth : maxDate,\n disablePast,\n disableFuture,\n isDateDisabled,\n timezone\n }) : newDate;\n if (closestEnabledDate) {\n setValueAndGoToNextView(closestEnabledDate, 'finish');\n onMonthChange == null ? void 0 : onMonthChange(startOfMonth);\n } else {\n goToNextView();\n changeMonth(startOfMonth);\n }\n changeFocusedDay(closestEnabledDate, true);\n });\n const handleDateYearChange = useEventCallback(newDate => {\n const startOfYear = utils.startOfYear(newDate);\n const endOfYear = utils.endOfYear(newDate);\n const closestEnabledDate = isDateDisabled(newDate) ? findClosestEnabledDate({\n utils,\n date: newDate,\n minDate: utils.isBefore(minDate, startOfYear) ? startOfYear : minDate,\n maxDate: utils.isAfter(maxDate, endOfYear) ? endOfYear : maxDate,\n disablePast,\n disableFuture,\n isDateDisabled,\n timezone\n }) : newDate;\n if (closestEnabledDate) {\n setValueAndGoToNextView(closestEnabledDate, 'finish');\n onYearChange == null ? void 0 : onYearChange(closestEnabledDate);\n } else {\n goToNextView();\n changeMonth(startOfYear);\n }\n changeFocusedDay(closestEnabledDate, true);\n });\n const handleSelectedDayChange = useEventCallback(day => {\n if (day) {\n // If there is a date already selected, then we want to keep its time\n return handleValueChange(mergeDateAndTime(utils, day, value != null ? value : referenceDate), 'finish');\n }\n return handleValueChange(day, 'finish');\n });\n React.useEffect(() => {\n if (value != null && utils.isValid(value)) {\n changeMonth(value);\n }\n }, [value]); // eslint-disable-line\n\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const baseDateValidationProps = {\n disablePast,\n disableFuture,\n maxDate,\n minDate\n };\n\n // When disabled, limit the view to the selected date\n const minDateWithDisabled = disabled && value || minDate;\n const maxDateWithDisabled = disabled && value || maxDate;\n const commonViewProps = {\n disableHighlightToday,\n readOnly,\n disabled,\n timezone\n };\n const gridLabelId = `${id}-grid-label`;\n const hasFocus = focusedView !== null;\n const prevOpenViewRef = React.useRef(view);\n React.useEffect(() => {\n // If the view change and the focus was on the previous view\n // Then we update the focus.\n if (prevOpenViewRef.current === view) {\n return;\n }\n if (focusedView === prevOpenViewRef.current) {\n setFocusedView(view, true);\n }\n prevOpenViewRef.current = view;\n }, [focusedView, setFocusedView, view]);\n const selectedDays = React.useMemo(() => [value], [value]);\n return /*#__PURE__*/_jsxs(DateCalendarRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(PickersCalendarHeader, {\n views: views,\n view: view,\n currentMonth: calendarState.currentMonth,\n onViewChange: setView,\n onMonthChange: (newMonth, direction) => handleChangeMonth({\n newMonth,\n direction\n }),\n minDate: minDateWithDisabled,\n maxDate: maxDateWithDisabled,\n disabled: disabled,\n disablePast: disablePast,\n disableFuture: disableFuture,\n reduceAnimations: reduceAnimations,\n labelId: gridLabelId,\n slots: slots,\n slotProps: slotProps,\n timezone: timezone\n }), /*#__PURE__*/_jsx(DateCalendarViewTransitionContainer, {\n reduceAnimations: reduceAnimations,\n className: classes.viewTransitionContainer,\n transKey: view,\n ownerState: ownerState,\n children: /*#__PURE__*/_jsxs(\"div\", {\n children: [view === 'year' && /*#__PURE__*/_jsx(YearCalendar, _extends({}, baseDateValidationProps, commonViewProps, {\n value: value,\n onChange: handleDateYearChange,\n shouldDisableYear: shouldDisableYear,\n hasFocus: hasFocus,\n onFocusedViewChange: isViewFocused => setFocusedView('year', isViewFocused),\n yearsPerRow: yearsPerRow,\n referenceDate: referenceDate\n })), view === 'month' && /*#__PURE__*/_jsx(MonthCalendar, _extends({}, baseDateValidationProps, commonViewProps, {\n hasFocus: hasFocus,\n className: className,\n value: value,\n onChange: handleDateMonthChange,\n shouldDisableMonth: shouldDisableMonth,\n onFocusedViewChange: isViewFocused => setFocusedView('month', isViewFocused),\n monthsPerRow: monthsPerRow,\n referenceDate: referenceDate\n })), view === 'day' && /*#__PURE__*/_jsx(DayCalendar, _extends({}, calendarState, baseDateValidationProps, commonViewProps, {\n onMonthSwitchingAnimationEnd: onMonthSwitchingAnimationEnd,\n onFocusedDayChange: changeFocusedDay,\n reduceAnimations: reduceAnimations,\n selectedDays: selectedDays,\n onSelectedDaysChange: handleSelectedDayChange,\n shouldDisableDate: shouldDisableDate,\n shouldDisableMonth: shouldDisableMonth,\n shouldDisableYear: shouldDisableYear,\n hasFocus: hasFocus,\n onFocusedViewChange: isViewFocused => setFocusedView('day', isViewFocused),\n gridLabelId: gridLabelId,\n showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,\n fixedWeekNumber: fixedWeekNumber,\n dayOfWeekFormatter: dayOfWeekFormatter,\n displayWeekNumber: displayWeekNumber,\n components: components,\n componentsProps: componentsProps,\n slots: slots,\n slotProps: slotProps,\n loading: loading,\n renderLoading: renderLoading\n }))]\n })\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DateCalendar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * Overridable components.\n * @default {}\n * @deprecated Please use `slots`.\n */\n components: PropTypes.object,\n /**\n * The props used for each component slot.\n * @default {}\n * @deprecated Please use `slotProps`.\n */\n componentsProps: PropTypes.object,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * Default calendar month displayed when `value` and `defaultValue` are empty.\n */\n defaultCalendarMonth: PropTypes.any,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * Calendar will show more weeks in order to match this value.\n * Put it to 6 for having fix number of week in Gregorian calendars\n * @default undefined\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Controlled focused view.\n */\n focusedView: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any,\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Callback fired when the value changes.\n * @template TDate\n * @param {TDate | null} value The new value.\n * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired on focused view change.\n * @template TView\n * @param {TView} view The new view to focus or not.\n * @param {boolean} hasFocus `true` if the view should be focused.\n */\n onFocusedViewChange: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`.\n */\n referenceDate: PropTypes.any,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n /**\n * Disable specific date.\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.any,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years rendered per row.\n * @default 3\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n} : void 0;","import * as React from 'react';\nimport { DateCalendar } from '../DateCalendar';\nimport { isDatePickerView } from '../internals/utils/date-utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const renderDateViewCalendar = ({\n view,\n onViewChange,\n views,\n focusedView,\n onFocusedViewChange,\n value,\n defaultValue,\n onChange,\n className,\n classes,\n disableFuture,\n disablePast,\n minDate,\n maxDate,\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n reduceAnimations,\n onMonthChange,\n monthsPerRow,\n onYearChange,\n yearsPerRow,\n defaultCalendarMonth,\n components,\n componentsProps,\n slots,\n slotProps,\n loading,\n renderLoading,\n disableHighlightToday,\n readOnly,\n disabled,\n showDaysOutsideCurrentMonth,\n dayOfWeekFormatter,\n sx,\n autoFocus,\n fixedWeekNumber,\n displayWeekNumber,\n timezone\n}) => /*#__PURE__*/_jsx(DateCalendar, {\n view: view,\n onViewChange: onViewChange,\n views: views.filter(isDatePickerView),\n focusedView: focusedView && isDatePickerView(focusedView) ? focusedView : null,\n onFocusedViewChange: onFocusedViewChange,\n value: value,\n defaultValue: defaultValue,\n onChange: onChange,\n className: className,\n classes: classes,\n disableFuture: disableFuture,\n disablePast: disablePast,\n minDate: minDate,\n maxDate: maxDate,\n shouldDisableDate: shouldDisableDate,\n shouldDisableMonth: shouldDisableMonth,\n shouldDisableYear: shouldDisableYear,\n reduceAnimations: reduceAnimations,\n onMonthChange: onMonthChange,\n monthsPerRow: monthsPerRow,\n onYearChange: onYearChange,\n yearsPerRow: yearsPerRow,\n defaultCalendarMonth: defaultCalendarMonth,\n components: components,\n componentsProps: componentsProps,\n slots: slots,\n slotProps: slotProps,\n loading: loading,\n renderLoading: renderLoading,\n disableHighlightToday: disableHighlightToday,\n readOnly: readOnly,\n disabled: disabled,\n showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,\n dayOfWeekFormatter: dayOfWeekFormatter,\n sx: sx,\n autoFocus: autoFocus,\n fixedWeekNumber: fixedWeekNumber,\n displayWeekNumber: displayWeekNumber,\n timezone: timezone\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { resolveComponentProps } from '@mui/base/utils';\nimport { singleItemValueManager } from '../internals/utils/valueManagers';\nimport { useDatePickerDefaultizedProps } from '../DatePicker/shared';\nimport { useLocaleText, useUtils, validateDate } from '../internals';\nimport { useDesktopPicker } from '../internals/hooks/useDesktopPicker';\nimport { CalendarIcon } from '../icons';\nimport { DateField } from '../DateField';\nimport { extractValidationProps } from '../internals/utils/validation/extractValidationProps';\nimport { renderDateViewCalendar } from '../dateViewRenderers';\nimport { resolveDateFormat } from '../internals/utils/date-utils';\nconst DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {\n var _defaultizedProps$yea, _defaultizedProps$slo2;\n const localeText = useLocaleText();\n const utils = useUtils();\n\n // Props with the default values common to all date pickers\n const defaultizedProps = useDatePickerDefaultizedProps(inProps, 'MuiDesktopDatePicker');\n const viewRenderers = _extends({\n day: renderDateViewCalendar,\n month: renderDateViewCalendar,\n year: renderDateViewCalendar\n }, defaultizedProps.viewRenderers);\n\n // Props with the default values specific to the desktop variant\n const props = _extends({}, defaultizedProps, {\n viewRenderers,\n format: resolveDateFormat(utils, defaultizedProps, false),\n yearsPerRow: (_defaultizedProps$yea = defaultizedProps.yearsPerRow) != null ? _defaultizedProps$yea : 4,\n slots: _extends({\n openPickerIcon: CalendarIcon,\n field: DateField\n }, defaultizedProps.slots),\n slotProps: _extends({}, defaultizedProps.slotProps, {\n field: ownerState => {\n var _defaultizedProps$slo;\n return _extends({}, resolveComponentProps((_defaultizedProps$slo = defaultizedProps.slotProps) == null ? void 0 : _defaultizedProps$slo.field, ownerState), extractValidationProps(defaultizedProps), {\n ref\n });\n },\n toolbar: _extends({\n hidden: true\n }, (_defaultizedProps$slo2 = defaultizedProps.slotProps) == null ? void 0 : _defaultizedProps$slo2.toolbar)\n })\n });\n const {\n renderPicker\n } = useDesktopPicker({\n props,\n valueManager: singleItemValueManager,\n valueType: 'date',\n getOpenDialogAriaText: localeText.openDatePickerDialogue,\n validator: validateDate\n });\n return renderPicker();\n});\nDesktopDatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n /**\n * Class name applied to the root element.\n */\n className: PropTypes.string,\n /**\n * If `true`, the popover or modal will close after submitting the full date.\n * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n /**\n * Overridable components.\n * @default {}\n * @deprecated Please use `slots`.\n */\n components: PropTypes.object,\n /**\n * The props used for each component slot.\n * @default {}\n * @deprecated Please use `slotProps`.\n */\n componentsProps: PropTypes.object,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * Default calendar month displayed when `value` and `defaultValue` are empty.\n */\n defaultCalendarMonth: PropTypes.any,\n /**\n * The default value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, the open picker button will not be rendered (renders only the field).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * Calendar will show more weeks in order to match this value.\n * Put it to 6 for having fix number of week in Gregorian calendars\n * @default undefined\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Format of the date when rendered in the input(s).\n * Defaults to localized format based on the used `views`.\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Locale for components texts.\n * Allows overriding texts coming from `LocalizationProvider` and `theme`.\n */\n localeText: PropTypes.object,\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any,\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Callback fired when the value is accepted.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see `open`).\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the error associated to the current value changes.\n * If the error has a non-null value, then the `TextField` will be rendered in `error` state.\n *\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TError} error The new error describing why the current value is not valid.\n * @param {TValue} value The value associated to the error.\n */\n onError: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see `open`).\n */\n onOpen: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * Control the popup or dialog open state.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n /**\n * The currently selected sections.\n * This prop accept four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.\n * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 4. If `null` is provided, no section will be selected\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({\n endIndex: PropTypes.number.isRequired,\n startIndex: PropTypes.number.isRequired\n })]),\n /**\n * Disable specific date.\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.any,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Define custom view renderers for each section.\n * If `null`, the section will only have field editing.\n * If `undefined`, internally defined view will be the used.\n */\n viewRenderers: PropTypes.shape({\n day: PropTypes.func,\n month: PropTypes.func,\n year: PropTypes.func\n }),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years rendered per row.\n * @default 4\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n};\nexport { DesktopDatePicker };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport DialogContent from '@mui/material/DialogContent';\nimport Fade from '@mui/material/Fade';\nimport MuiDialog, { dialogClasses } from '@mui/material/Dialog';\nimport { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH } from '../constants/dimensions';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PickersModalDialogRoot = styled(MuiDialog)({\n [`& .${dialogClasses.container}`]: {\n outline: 0\n },\n [`& .${dialogClasses.paper}`]: {\n outline: 0,\n minWidth: DIALOG_WIDTH\n }\n});\nconst PickersModalDialogContent = styled(DialogContent)({\n '&:first-of-type': {\n padding: 0\n }\n});\nexport function PickersModalDialog(props) {\n var _slots$dialog, _slots$mobileTransiti;\n const {\n children,\n onDismiss,\n open,\n slots,\n slotProps\n } = props;\n const Dialog = (_slots$dialog = slots == null ? void 0 : slots.dialog) != null ? _slots$dialog : PickersModalDialogRoot;\n const Transition = (_slots$mobileTransiti = slots == null ? void 0 : slots.mobileTransition) != null ? _slots$mobileTransiti : Fade;\n return /*#__PURE__*/_jsx(Dialog, _extends({\n open: open,\n onClose: onDismiss\n }, slotProps == null ? void 0 : slotProps.dialog, {\n TransitionComponent: Transition,\n TransitionProps: slotProps == null ? void 0 : slotProps.mobileTransition,\n PaperComponent: slots == null ? void 0 : slots.mobilePaper,\n PaperProps: slotProps == null ? void 0 : slotProps.mobilePaper,\n children: /*#__PURE__*/_jsx(PickersModalDialogContent, {\n children: children\n })\n }));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"props\", \"getOpenDialogAriaText\"];\nimport * as React from 'react';\nimport { useSlotProps } from '@mui/base/utils';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useId from '@mui/utils/useId';\nimport { PickersModalDialog } from '../../components/PickersModalDialog';\nimport { usePicker } from '../usePicker';\nimport { onSpaceOrEnter } from '../../utils/utils';\nimport { useUtils } from '../useUtils';\nimport { LocalizationProvider } from '../../../LocalizationProvider';\nimport { PickersLayout } from '../../../PickersLayout';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\n/**\n * Hook managing all the single-date mobile pickers:\n * - MobileDatePicker\n * - MobileDateTimePicker\n * - MobileTimePicker\n */\nexport const useMobilePicker = _ref => {\n var _innerSlotProps$toolb, _innerSlotProps$toolb2, _slots$layout;\n let {\n props,\n getOpenDialogAriaText\n } = _ref,\n pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);\n const {\n slots,\n slotProps: innerSlotProps,\n className,\n sx,\n format,\n formatDensity,\n timezone,\n label,\n inputRef,\n readOnly,\n disabled,\n localeText\n } = props;\n const utils = useUtils();\n const internalInputRef = React.useRef(null);\n const labelId = useId();\n const isToolbarHidden = (_innerSlotProps$toolb = innerSlotProps == null ? void 0 : (_innerSlotProps$toolb2 = innerSlotProps.toolbar) == null ? void 0 : _innerSlotProps$toolb2.hidden) != null ? _innerSlotProps$toolb : false;\n const {\n open,\n actions,\n layoutProps,\n renderCurrentView,\n fieldProps: pickerFieldProps\n } = usePicker(_extends({}, pickerParams, {\n props,\n inputRef: internalInputRef,\n autoFocusView: true,\n additionalViewProps: {},\n wrapperVariant: 'mobile'\n }));\n const Field = slots.field;\n const fieldProps = useSlotProps({\n elementType: Field,\n externalSlotProps: innerSlotProps == null ? void 0 : innerSlotProps.field,\n additionalProps: _extends({}, pickerFieldProps, isToolbarHidden && {\n id: labelId\n }, !(disabled || readOnly) && {\n onClick: actions.onOpen,\n onKeyDown: onSpaceOrEnter(actions.onOpen)\n }, {\n readOnly: readOnly != null ? readOnly : true,\n disabled,\n className,\n sx,\n format,\n formatDensity,\n timezone,\n label\n }),\n ownerState: props\n });\n\n // TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged\n fieldProps.inputProps = _extends({}, fieldProps.inputProps, {\n 'aria-label': getOpenDialogAriaText(pickerFieldProps.value, utils)\n });\n const slotsForField = _extends({\n textField: slots.textField\n }, fieldProps.slots);\n const Layout = (_slots$layout = slots.layout) != null ? _slots$layout : PickersLayout;\n const handleInputRef = useForkRef(internalInputRef, fieldProps.inputRef, inputRef);\n let labelledById = labelId;\n if (isToolbarHidden) {\n if (label) {\n labelledById = `${labelId}-label`;\n } else {\n labelledById = undefined;\n }\n }\n const slotProps = _extends({}, innerSlotProps, {\n toolbar: _extends({}, innerSlotProps == null ? void 0 : innerSlotProps.toolbar, {\n titleId: labelId\n }),\n mobilePaper: _extends({\n 'aria-labelledby': labelledById\n }, innerSlotProps == null ? void 0 : innerSlotProps.mobilePaper)\n });\n const renderPicker = () => /*#__PURE__*/_jsxs(LocalizationProvider, {\n localeText: localeText,\n children: [/*#__PURE__*/_jsx(Field, _extends({}, fieldProps, {\n slots: slotsForField,\n slotProps: slotProps,\n inputRef: handleInputRef\n })), /*#__PURE__*/_jsx(PickersModalDialog, _extends({}, actions, {\n open: open,\n slots: slots,\n slotProps: slotProps,\n children: /*#__PURE__*/_jsx(Layout, _extends({}, layoutProps, slotProps == null ? void 0 : slotProps.layout, {\n slots: slots,\n slotProps: slotProps,\n children: renderCurrentView()\n }))\n }))]\n });\n return {\n renderPicker\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { resolveComponentProps } from '@mui/base/utils';\nimport { useMobilePicker } from '../internals/hooks/useMobilePicker';\nimport { useDatePickerDefaultizedProps } from '../DatePicker/shared';\nimport { useLocaleText, useUtils, validateDate } from '../internals';\nimport { DateField } from '../DateField';\nimport { extractValidationProps } from '../internals/utils/validation/extractValidationProps';\nimport { singleItemValueManager } from '../internals/utils/valueManagers';\nimport { renderDateViewCalendar } from '../dateViewRenderers';\nimport { resolveDateFormat } from '../internals/utils/date-utils';\nconst MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker(inProps, ref) {\n var _defaultizedProps$slo2;\n const localeText = useLocaleText();\n const utils = useUtils();\n\n // Props with the default values common to all date pickers\n const defaultizedProps = useDatePickerDefaultizedProps(inProps, 'MuiMobileDatePicker');\n const viewRenderers = _extends({\n day: renderDateViewCalendar,\n month: renderDateViewCalendar,\n year: renderDateViewCalendar\n }, defaultizedProps.viewRenderers);\n\n // Props with the default values specific to the mobile variant\n const props = _extends({}, defaultizedProps, {\n viewRenderers,\n format: resolveDateFormat(utils, defaultizedProps, false),\n slots: _extends({\n field: DateField\n }, defaultizedProps.slots),\n slotProps: _extends({}, defaultizedProps.slotProps, {\n field: ownerState => {\n var _defaultizedProps$slo;\n return _extends({}, resolveComponentProps((_defaultizedProps$slo = defaultizedProps.slotProps) == null ? void 0 : _defaultizedProps$slo.field, ownerState), extractValidationProps(defaultizedProps), {\n ref\n });\n },\n toolbar: _extends({\n hidden: false\n }, (_defaultizedProps$slo2 = defaultizedProps.slotProps) == null ? void 0 : _defaultizedProps$slo2.toolbar)\n })\n });\n const {\n renderPicker\n } = useMobilePicker({\n props,\n valueManager: singleItemValueManager,\n valueType: 'date',\n getOpenDialogAriaText: localeText.openDatePickerDialogue,\n validator: validateDate\n });\n return renderPicker();\n});\nMobileDatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n /**\n * Class name applied to the root element.\n */\n className: PropTypes.string,\n /**\n * If `true`, the popover or modal will close after submitting the full date.\n * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n /**\n * Overridable components.\n * @default {}\n * @deprecated Please use `slots`.\n */\n components: PropTypes.object,\n /**\n * The props used for each component slot.\n * @default {}\n * @deprecated Please use `slotProps`.\n */\n componentsProps: PropTypes.object,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * Default calendar month displayed when `value` and `defaultValue` are empty.\n */\n defaultCalendarMonth: PropTypes.any,\n /**\n * The default value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, the open picker button will not be rendered (renders only the field).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * Calendar will show more weeks in order to match this value.\n * Put it to 6 for having fix number of week in Gregorian calendars\n * @default undefined\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Format of the date when rendered in the input(s).\n * Defaults to localized format based on the used `views`.\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Locale for components texts.\n * Allows overriding texts coming from `LocalizationProvider` and `theme`.\n */\n localeText: PropTypes.object,\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any,\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Callback fired when the value is accepted.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see `open`).\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the error associated to the current value changes.\n * If the error has a non-null value, then the `TextField` will be rendered in `error` state.\n *\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TError} error The new error describing why the current value is not valid.\n * @param {TValue} value The value associated to the error.\n */\n onError: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see `open`).\n */\n onOpen: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * Control the popup or dialog open state.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n /**\n * The currently selected sections.\n * This prop accept four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.\n * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 4. If `null` is provided, no section will be selected\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({\n endIndex: PropTypes.number.isRequired,\n startIndex: PropTypes.number.isRequired\n })]),\n /**\n * Disable specific date.\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.any,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Define custom view renderers for each section.\n * If `null`, the section will only have field editing.\n * If `undefined`, internally defined view will be the used.\n */\n viewRenderers: PropTypes.shape({\n day: PropTypes.func,\n month: PropTypes.func,\n year: PropTypes.func\n }),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years rendered per row.\n * @default 3\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n};\nexport { MobileDatePicker };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"desktopModeMediaQuery\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { useThemeProps } from '@mui/material/styles';\nimport { DesktopDatePicker } from '../DesktopDatePicker';\nimport { MobileDatePicker } from '../MobileDatePicker';\nimport { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from '../internals/utils/utils';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDatePicker'\n });\n const {\n desktopModeMediaQuery = DEFAULT_DESKTOP_MODE_MEDIA_QUERY\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n // defaults to `true` in environments where `window.matchMedia` would not be available (i.e. test/jsdom)\n const isDesktop = useMediaQuery(desktopModeMediaQuery, {\n defaultMatches: true\n });\n if (isDesktop) {\n return /*#__PURE__*/_jsx(DesktopDatePicker, _extends({\n ref: ref\n }, other));\n }\n return /*#__PURE__*/_jsx(MobileDatePicker, _extends({\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n /**\n * Class name applied to the root element.\n */\n className: PropTypes.string,\n /**\n * If `true`, the popover or modal will close after submitting the full date.\n * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n /**\n * Overridable components.\n * @default {}\n * @deprecated Please use `slots`.\n */\n components: PropTypes.object,\n /**\n * The props used for each component slot.\n * @default {}\n * @deprecated Please use `slotProps`.\n */\n componentsProps: PropTypes.object,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {string} day The day of week provided by the adapter's method `getWeekdays`.\n * @returns {string} The name to display.\n * @default (day) => day.charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * Default calendar month displayed when `value` and `defaultValue` are empty.\n */\n defaultCalendarMonth: PropTypes.any,\n /**\n * The default value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.any,\n /**\n * CSS media query when `Mobile` mode will be changed to `Desktop`.\n * @default '@media (pointer: fine)'\n * @example '@media (min-width: 720px)' or theme.breakpoints.up(\"sm\")\n */\n desktopModeMediaQuery: PropTypes.string,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, the open picker button will not be rendered (renders only the field).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * Calendar will show more weeks in order to match this value.\n * Put it to 6 for having fix number of week in Gregorian calendars\n * @default undefined\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Format of the date when rendered in the input(s).\n * Defaults to localized format based on the used `views`.\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })]),\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Locale for components texts.\n * Allows overriding texts coming from `LocalizationProvider` and `theme`.\n */\n localeText: PropTypes.object,\n /**\n * Maximal selectable date.\n */\n maxDate: PropTypes.any,\n /**\n * Minimal selectable date.\n */\n minDate: PropTypes.any,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Callback fired when the value is accepted.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @param {TValue} value The value that was just accepted.\n */\n onAccept: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext<TError>} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see `open`).\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the error associated to the current value changes.\n * If the error has a non-null value, then the `TextField` will be rendered in `error` state.\n *\n * @template TValue The value type. Will be either the same type as `value` or `null`. Can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. Will be either `string` or a `null`. Can be in `[start, end]` format in case of range value.\n * @param {TError} error The new error describing why the current value is not valid.\n * @param {TValue} value The value associated to the error.\n */\n onError: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see `open`).\n */\n onOpen: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * Control the popup or dialog open state.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * Disable heavy animations.\n * @default typeof navigator !== 'undefined' && /(android)/i.test(navigator.userAgent)\n */\n reduceAnimations: PropTypes.bool,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => <span data-mui-test=\"loading-progress\">...</span>\n */\n renderLoading: PropTypes.func,\n /**\n * The currently selected sections.\n * This prop accept four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If an object with a `startIndex` and `endIndex` properties are provided, the sections between those two indexes will be selected.\n * 3. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 4. If `null` is provided, no section will be selected\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number, PropTypes.shape({\n endIndex: PropTypes.number.isRequired,\n startIndex: PropTypes.number.isRequired\n })]),\n /**\n * Disable specific date.\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documention} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.any,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Define custom view renderers for each section.\n * If `null`, the section will only have field editing.\n * If `undefined`, internally defined view will be the used.\n */\n viewRenderers: PropTypes.shape({\n day: PropTypes.func,\n month: PropTypes.func,\n year: PropTypes.func\n }),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years rendered per row.\n * @default 4 on desktop, 3 on mobile\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n} : void 0;\nexport { DatePicker };","import { DatePicker, LocalizationProvider } from '@mui/x-date-pickers';\nimport { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';\nimport clsx from 'clsx';\nimport { ErrorMessage } from '@components/error-message';\nimport dayjs from 'dayjs';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\nconst DATE_FORMAT = 'YYYY-MM-DD';\n\nexport const BirthDate = () => {\n // if in a form context\n const {\n register,\n getValues,\n setValue,\n formState: { errors },\n } = useFormContext();\n\n const defaultDate = getValues('dateOfBirth')\n ? dayjs(getValues('dateOfBirth'), DATE_FORMAT)\n : null;\n\n const handleDateChange = (value: dayjs.Dayjs) => {\n if (!value?.isValid()) return;\n setValue('dateOfBirth', value?.format(DATE_FORMAT), {\n shouldDirty: true,\n shouldTouch: true,\n });\n };\n\n useEffect(() => {\n register('dateOfBirth', {\n required: 'Date of birth is required.',\n });\n }, [register]);\n\n const errorInvalid = errors && errors?.['dateOfBirth']?.message;\n\n return (\n <div className=\"flex flex-col gap-2\">\n <label>Date of Birth</label>\n <LocalizationProvider dateAdapter={AdapterDayjs}>\n <DatePicker\n sx={\n errorInvalid\n ? {\n outline: '.6px solid red ',\n borderRadius: '4px',\n }\n : {}\n }\n maxDate={dayjs().subtract(1, 'day')}\n defaultValue={defaultDate}\n value={defaultDate}\n onChange={handleDateChange}\n />\n </LocalizationProvider>\n {errorInvalid && (\n <ErrorMessage error={errors?.['dateOfBirth']?.message as string} className=\"text-xs \" />\n )}\n </div>\n );\n};\n\n{\n /* <Input\n label='Date Of Birth'\n placeholder='Enter your date of birth'\n className='w-full flex'\n name='dateofbirth'\n /> */\n}\n","import clsx from 'clsx';\nimport { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Label } from '../label';\n\nexport const CheckBoxOptions = ({\n label,\n nameOnForm,\n options,\n}: {\n label: string;\n nameOnForm: string;\n options: { label: string; value: string; disabled?: boolean }[];\n}) => {\n const { setValue, getValues } = useFormContext();\n\n const defaultValue = useMemo(() => getValues(nameOnForm) || [], []);\n\n const handleSelect = (checked, value) => {\n const currValues = getValues(nameOnForm);\n\n if (checked) {\n currValues.push(value);\n } else {\n const valueIndex = currValues.indexOf(value);\n\n // according to the set up logic valueIndex should never be equal to -1\n // so if it became a -1 , check the logic of this flow you've changed\n if (valueIndex !== -1) {\n currValues.splice(valueIndex, 1);\n }\n }\n setValue(nameOnForm, currValues, { shouldDirty: true });\n };\n\n return (\n <div>\n <Label name={nameOnForm} className=\"mb-2\">\n {label}\n </Label>\n {options.map((option, index) => (\n <label\n key={`option-${nameOnForm}-${index}`}\n className={clsx(\n 'flex items-center gap-3 text-gray-800 dark:text-gray-100 cursor-pointer mb-4',\n {\n 'opacity-50 pointer-events-none': !!option.disabled,\n },\n )}\n >\n <input\n disabled={option.disabled}\n className=\"rounded border-2 border-gray-300 bg-transparent text-primary cursor-pointer\"\n type=\"checkbox\"\n defaultChecked={defaultValue.includes(option.value)}\n onClick={(event) => {\n const target = event.target as HTMLInputElement;\n\n const checked = target.checked;\n handleSelect(checked, option.value);\n }}\n />\n <span className=\"text-sm font-medium text-justify\">{option.label}</span>\n </label>\n ))}\n </div>\n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport { useTranslation } from 'react-i18next';\nimport { ChildrenUnder18CountOptions } from '@services/Api';\nimport { Select } from '../select';\n\nexport const ChildrenSelect = (props) => {\n const methods = useFormContext();\n const { t } = useTranslation();\n\n const currentChildren = methods.watch('children');\n\n const disabled = !currentChildren || currentChildren === 'no';\n\n return (\n <div className=\"grid grid-rows-2 gap-4\">\n <Select\n name=\"children\"\n options={[\n { label: t('Yes'), value: 'yes' },\n { label: t('No'), value: 'no' },\n ]}\n label={t('Have Children')}\n defaultValue=\"no\"\n {...props}\n onChange={() => {\n methods.setValue('childrenUnder18Count', null, {\n shouldDirty: true,\n shouldTouch: true,\n shouldValidate: true,\n });\n }}\n />\n <Select\n disabled={disabled}\n name=\"childrenUnder18Count\"\n options={[\n { label: '0-2', value: ChildrenUnder18CountOptions.zeroTwo },\n { label: '3-5', value: ChildrenUnder18CountOptions.threeFive },\n { label: '6-10', value: ChildrenUnder18CountOptions.sixTen },\n { label: t('More than 10'), value: ChildrenUnder18CountOptions.moreThanTen },\n ]}\n label={t('Number Of Children under 18')}\n showRequired={false}\n validations={{\n validate: (value) => {\n if (methods.getValues('children') === 'yes' && !value) {\n return t('Children under 18 is required.');\n }\n return undefined;\n },\n }}\n />\n </div>\n );\n};\n","import { Input } from '../input';\n\nexport const City = ({ label = 'City*' }: { label?: string }) => {\n return <Input name=\"city\" label={label} placeholder=\"Boston\" validations={{ required: true }} />;\n};\n","import { Select } from '../select';\nimport countriesList from '@data/countries-list.json';\n\nexport const Country = ({ label = 'Country*' }: { label?: string }) => {\n return (\n <Select name=\"country\" label={label} validations={{ required: true }} options={countriesList} />\n );\n};\n","import Image from 'next/image';\nimport { useFormContext } from 'react-hook-form';\nimport { CustomInput, Input } from '../input';\nimport clsx from 'clsx';\n\nconst Flags = () => {\n return <Image src={'/icons/flag.png'} alt=\"Picture of the author\" width={22} height={16} />;\n};\nexport const CountryPhone = (props: CustomInput) => {\n const { watch, formState } = useFormContext();\n const inputValue = watch(props.name || 'phone');\n\n const errors = Boolean(formState.errors?.phone);\n\n let phoneNumberValidationUS = /^(\\([1-9][0-9]{2}\\)|[1-9][0-9]{2})( |-)?([0-9]{3}( |-)?[0-9]{4})$/;\n\n return (\n <div>\n <Input\n name=\"phone\"\n label=\"Phone number\"\n placeholder=\"(123) 876-5432 - Phone Number is required.\"\n icon={<Flags />}\n mask=\"(999) 999-9999\"\n validations={{\n pattern: {\n value: phoneNumberValidationUS,\n message:\n 'Invalid phone number. Ensure the format is (123) 876-5432 and the area code starts with 2-9.',\n },\n }}\n className={clsx('keep-color', {\n 'stroke-primary': inputValue?.length >= 10,\n 'stroke-gray-500': inputValue?.length === 0,\n 'stroke-red': errors,\n })}\n isError={errors}\n {...props}\n />\n </div>\n );\n};\n","import clsx from 'clsx';\nimport { ErrorMessage } from '@components/error-message';\nimport CurrencyFormat, { StrictProps } from 'react-currency-format';\nimport { useFormContext } from 'react-hook-form';\nimport { useIntl } from 'react-intl';\nimport { InputProps } from '../input';\nimport { Label } from '../label';\n\nexport type CurrencyProps = Pick<\n InputProps,\n | 'name'\n | 'validations'\n | 'responseError'\n | 'showLabel'\n | 'icon'\n | 'showRequired'\n | 'label'\n | 'info'\n | 'maxLength'\n | 'labelClassName'\n | 'placeholder'\n | 'description'\n> &\n StrictProps;\n\nexport const Currency = ({\n name,\n validations,\n responseError,\n showLabel = true,\n placeholder,\n icon,\n showRequired,\n mask,\n className,\n label: customLabel,\n info,\n maxLength,\n labelClassName,\n description,\n ...inputProps\n}: CurrencyProps) => {\n const intl = useIntl();\n const {\n formState: { errors, isSubmitted },\n register,\n setValue,\n watch,\n } = useFormContext();\n\n const label = customLabel || intl.formatMessage({ id: `page.account.${name}` });\n const formatValidations = { ...validations };\n\n if (!validations?.pattern?.value) {\n formatValidations.pattern = {\n value: validations?.pattern,\n message: `This ${label.replace('*', '').toLowerCase()} is invalid, please try again.`,\n };\n }\n\n const requiredMessage = `${label.replace('*', '').toLowerCase()} is required.`;\n\n if (validations?.required || showRequired) {\n formatValidations.required =\n typeof validations.required === 'string' ? validations.required : requiredMessage;\n }\n\n if (mask && validations?.required) {\n formatValidations.validate = (value: string) => {\n if (value.includes('_')) {\n return requiredMessage;\n }\n return undefined;\n };\n }\n\n const errorInvalid = errors && errors[name]?.message && isSubmitted;\n\n const errorFieldAlreadyExists =\n responseError?.data?.error === 'fields_already_in_use' &&\n responseError?.data?.metadata?.fields?.includes(name.toLowerCase());\n\n const hasError = errorInvalid || errorFieldAlreadyExists;\n\n const allProps = {\n className: clsx(\n 'border border-[#635E7D] dark:border-black-dark w-full rounded bg-transparent text-sm placeholder:text-gray-400 py-1 text-gray-900 dark:text-white',\n {\n 'pl-9': icon,\n 'border-error-500 pr-[42px] focus:!border-error-500': hasError,\n 'min-h-[48px] py-1 px-[17px]': !showLabel,\n 'min-h-[48px] px-3': showLabel,\n },\n className,\n ),\n type: 'text',\n placeholder: placeholder,\n ...register(name, formatValidations),\n ...inputProps,\n } as const;\n\n const value = watch(name);\n\n return (\n <div className=\"flex flex-col\">\n {showLabel && (\n <Label className={labelClassName} name={name}>\n <div className=\"flex flex-col\">\n <div>{label}</div>{' '}\n {description && <div className=\"text-sm text-gray-500 mt-1 mb-2\">{description}</div>}\n </div>\n {info && (\n <div className=\"relative group\">\n <svg className=\"cursor-pointer keep-color\" width=\"14\" height=\"15\" viewBox=\"0 0 14 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.33334 4.16671H7.66668V5.50004H6.33334V4.16671ZM6.33334 6.83337H7.66668V10.8334H6.33334V6.83337ZM7.00001 0.833374C3.32001 0.833374 0.333344 3.82004 0.333344 7.50004C0.333344 11.18 3.32001 14.1667 7.00001 14.1667C10.68 14.1667 13.6667 11.18 13.6667 7.50004C13.6667 3.82004 10.68 0.833374 7.00001 0.833374ZM7.00001 12.8334C4.06001 12.8334 1.66668 10.44 1.66668 7.50004C1.66668 4.56004 4.06001 2.16671 7.00001 2.16671C9.94001 2.16671 12.3333 4.56004 12.3333 7.50004C12.3333 10.44 9.94001 12.8334 7.00001 12.8334Z\" fill=\"#6B7280\"/>\n </svg>\n\n <div className=\"absolute opacity-0 invisible transition-all group-hover:opacity-100 group-hover:visible lg:group-hover:block min-w-[369px] py-2 px-3 text-white text-left !leading-tight-[150%] bg-gray-700 rounded-lg text-sm font-normal z-10 -left-[30px] lg:-left-[177px] before -top-[150px]\">\n <div className=\"w-[18px] overflow-hidden inline-block absolute -bottom-[12px] left-1/2 -translate-x-1/2 rotate-180\">\n <div className=\"h-[13px] w-[13px] bg-gray-700 rotate-45 transform origin-bottom-left\" />\n </div>\n {info}\n </div>\n </div>\n )}\n </Label>\n )}\n <div className=\"relative\">\n <div\n className={clsx('absolute -translate-y-1/2 top-1/2 ml-3', {\n 'text-error-500': hasError,\n 'text-primary': !hasError,\n })}\n >\n {icon}\n </div>\n <CurrencyFormat\n mask={mask}\n {...allProps}\n value={value}\n onValueChange={(value) => {\n setValue(name, +value.value);\n }}\n />\n </div>\n {errorInvalid ? (\n <ErrorMessage error={errors[name]?.message as string} className=\"text-xs\" />\n ) : (\n errorFieldAlreadyExists && (\n <ErrorMessage error={`This ${name} is already taken. Please try again.`} />\n )\n )}\n <style jsx global>{`\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n display: none;\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n }\n `}</style>\n </div>\n );\n};\n","import { validEmail } from '@utils';\nimport { CustomInput, Input } from '../input';\nimport clsx from 'clsx';\nimport { useFormContext } from 'react-hook-form';\n\nexport const Email = (props: CustomInput) => {\n const { watch, formState } = useFormContext();\n const inputValue = watch(props.name || 'email');\n const errors = Boolean(formState.errors?.[props.name || 'email']);\n const EmailIconApp = (props: any) => (\n <svg viewBox=\"0 0 20 14\" {...props} fill=\"transparent\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M5.83301 4.5L9.99967 7.41667L14.1663 4.5\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M1.6665 11.1667V2.83333C1.6665 2.3913 1.8421 1.96738 2.15466 1.65482C2.46722 1.34226 2.89114 1.16666 3.33317 1.16666H16.6665C17.1085 1.16666 17.5325 1.34226 17.845 1.65482C18.1576 1.96738 18.3332 2.3913 18.3332 2.83333V11.1667C18.3332 11.6087 18.1576 12.0326 17.845 12.3452C17.5325 12.6577 17.1085 12.8333 16.6665 12.8333H3.33317C2.89114 12.8333 2.46722 12.6577 2.15466 12.3452C1.8421 12.0326 1.6665 11.6087 1.6665 11.1667Z\"\n stroke-width=\"1.5\"\n />\n </svg>\n );\n return (\n <Input\n name={props.name || 'email'}\n icon={\n <svg viewBox=\"0 0 20 14\" fill=\"transparent\" xmlns=\"http://www.w3.org/2000/svg\">\n placeholder=\"your.email@example.com\"\n width={24}\n className={clsx('keep-color', {\n 'stroke-primary': inputValue?.length > 0,\n 'stroke-gray-500': inputValue?.length === 0,\n 'stroke-red': errors,\n })}\n <path d=\"M5.83301 4.5L9.99967 7.41667L14.1663 4.5\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M1.6665 11.1667V2.83333C1.6665 2.3913 1.8421 1.96738 2.15466 1.65482C2.46722 1.34226 2.89114 1.16666 3.33317 1.16666H16.6665C17.1085 1.16666 17.5325 1.34226 17.845 1.65482C18.1576 1.96738 18.3332 2.3913 18.3332 2.83333V11.1667C18.3332 11.6087 18.1576 12.0326 17.845 12.3452C17.5325 12.6577 17.1085 12.8333 16.6665 12.8333H3.33317C2.89114 12.8333 2.46722 12.6577 2.15466 12.3452C1.8421 12.0326 1.6665 11.6087 1.6665 11.1667Z\" stroke-width=\"1.5\" />\n </svg>\n \n }\n validations={{ required: true, pattern: validEmail }}\n {...props}\n className=\"text-sm\"\n />\n );\n};\n","import { useEffect, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { Select } from '../select';\nimport ReactInputMask from 'react-input-mask';\nimport clsx from 'clsx';\nimport { extractNumbers } from '@utils';\n\nconst otherAmountFieldName = 'otherAmount';\n\nexport const PurchaseHomeTimeDropdown = ({\n defaultValue,\n otherAmountDefaultValue,\n otherAmountSelectionDefault = 'years',\n}) => {\n const [selectedVal, setSelectedVal] = useState(defaultValue);\n const [otherAmountSelection, setOtherAmountSelection] = useState(otherAmountSelectionDefault);\n\n const {\n register,\n setValue,\n getValues,\n formState: { errors },\n } = useFormContext();\n\n useEffect(() => {\n if (selectedVal !== 'another') return;\n register(otherAmountFieldName, {\n required: true,\n value: getValues('expectedPurchaseMonthsPeriod') || 0,\n });\n }, [getValues, register, selectedVal]);\n\n return (\n <>\n <Select\n validations={{\n validate: (value) => {\n const numberVal = Number(extractNumbers(value));\n if (Number.isNaN(numberVal) || numberVal <= 0 || numberVal > 999) {\n return 'Expected purchase month is required or should be greater than 0.';\n }\n return null;\n },\n }}\n showRequired\n name=\"expectedPurchaseMonthsPeriod\"\n options={[\n { value: 6, label: '6 months' },\n { value: 12, label: '1 year' },\n { value: 24, label: '2 years' },\n { value: 60, label: '5 years' },\n { value: 120, label: '10 years' },\n { value: 'another', label: 'Another amount' },\n ]}\n showLabel={false}\n alternate\n placeholder=\"Select\"\n value={selectedVal}\n onChange={({ value }) => setSelectedVal(value)}\n />\n\n {selectedVal === 'another' && (\n <div className=\"flex items-center mt-[10px]\">\n <div\n className={clsx('border border-[#635E7D] border-r-0 rounded-l h-[48px] w-full', {\n 'border-red': !!errors[otherAmountFieldName],\n })}\n >\n <ReactInputMask\n mask=\"999\"\n name={otherAmountFieldName}\n defaultValue={otherAmountDefaultValue}\n onChange={(e) => {\n setValue('expectedPurchaseMonthsPeriod', +e.target.value);\n setValue(otherAmountFieldName, e.target.value, {\n shouldDirty: true,\n shouldTouch: true,\n shouldValidate: true,\n });\n }}\n maskPlaceholder=\"\"\n className=\"h-full px-3 w-full text-sm text-gray-900 rounded-l\"\n />\n {!!errors[otherAmountFieldName] && <div className=\"text-red\">Required</div>}\n </div>\n <Select\n name=\"otherAmountSelect\"\n options={[\n { label: 'Months', value: 'months' },\n { label: 'Years', value: 'years' },\n ]}\n shouldRegister={false}\n showLabel={false}\n alternate\n placeholder=\"Select\"\n value={otherAmountSelection}\n onChange={({ value }) => {\n setValue('otherAmountSelect', value);\n setOtherAmountSelection(value);\n }}\n />\n </div>\n )}\n </>\n );\n};\n","import { useMemo } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { PurchaseHomeTimeDropdown } from '../purchase-home-time-select';\nconst normalExpectedPurchaseMonthsPeriodValues = [6, 12, 24, 60, 120];\n\nexport const ExpectedPurchaseAt = () => {\n const { getValues } = useFormContext();\n const { expectedPurchaseMonthsPeriodDefault, otherAmountSelectDefault, otherAmountDefaultValue } =\n useMemo(() => {\n let expectedVal: string | number = +getValues('expectedPurchaseMonthsPeriod') || 6;\n let otherSelectionVal = 'years';\n let otherAmount = 1;\n\n if (!normalExpectedPurchaseMonthsPeriodValues.includes(expectedVal)) {\n if (expectedVal % 12 !== 0) {\n otherSelectionVal = 'months';\n otherAmount = expectedVal;\n } else {\n otherAmount = expectedVal / 12;\n }\n\n expectedVal = 'another';\n }\n\n return {\n expectedPurchaseMonthsPeriodDefault: expectedVal,\n otherAmountSelectDefault: otherSelectionVal,\n otherAmountDefaultValue: otherAmount,\n };\n }, [getValues]);\n\n return (\n <PurchaseHomeTimeDropdown\n defaultValue={expectedPurchaseMonthsPeriodDefault}\n otherAmountDefaultValue={otherAmountDefaultValue}\n otherAmountSelectionDefault={otherAmountSelectDefault}\n />\n );\n};\n","import { Select } from '../select';\nimport { useTranslation } from 'react-i18next';\n\nexport const Gender = (props) => {\n const { t } = useTranslation();\n return (\n <Select\n showRequired={false}\n name=\"gender\"\n options={[\n { label: t('Male'), value: 'male' },\n { label: t('Female'), value: 'female' },\n { label: t('Transgender'), value: 'transgender' },\n { label: t('Non Binary'), value: 'non_binary' },\n { label: t('Prefer Not To Say'), value: 'prefer_not_to_say' },\n ]}\n label={t('Sex')}\n {...props}\n />\n );\n};\n","import { Select } from '../select';\nimport { useTranslation } from 'react-i18next';\n\nexport const HispanicOrigin = (props) => {\n const { t } = useTranslation();\n return (\n <Select\n name=\"hispanicOrigin\"\n showRequired={false}\n options={[\n { label: t('Yes'), value: 'yes' },\n { label: t('No'), value: 'no' },\n ]}\n label={t('Hispanic Origin')}\n {...props}\n />\n );\n};\n","import { extractNumbers } from '@utils';\nimport clsx from 'clsx';\nimport { useFormContext } from 'react-hook-form';\nimport { Currency } from '../currency';\n\nexport const HousePriceGoal = () => {\n const methods = useFormContext();\n return (\n <div className=\"relative\">\n <div\n className={clsx('absolute left-3 top-1/2 -translate-y-1/2 -mt-[0px]', {\n '-mt-[12px] text-error-500': methods.formState.errors.housePriceGoal,\n 'text-gray-400': !methods.watch('housePriceGoal'),\n })}\n >\n $\n </div>\n <Currency\n name=\"housePriceGoal\"\n label=\"House buying goal\"\n showLabel={false}\n placeholder=\"0\"\n thousandSeparator=\",\"\n className=\"pl-8\"\n decimalSeparator=\" \"\n allowNegative={false}\n validations={{\n validate: (value) => {\n const numberVal = Number(extractNumbers(value));\n if (Number.isNaN(numberVal) || numberVal > 10000000 || numberVal < 50000) {\n return 'Please select an amount from 50k to 10m';\n }\n return null;\n },\n }}\n />\n </div>\n );\n};\n","import { Select } from '../select';\n\nexport const MilitaryStatus = (props) => {\n return (\n <Select\n name=\"militaryStatus\"\n options={[\n { label: 'Not Applicable', value: 'notApplicable' },\n { label: 'Veteran', value: 'veteran' },\n { label: 'Active Duty', value: 'active' },\n ]}\n label=\"Military Status\"\n {...props}\n />\n );\n};\n","import clsx from 'clsx';\nimport { ErrorMessage } from '@components/error-message';\nimport React, { memo, useCallback, useMemo, useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { EMilitaryStatus, EMonthlyRent, EReasonForPurchase } from '@services/Api';\n\ninterface IMultiSelectOptions {\n name: string;\n value: EMilitaryStatus | EMonthlyRent | EReasonForPurchase;\n}\ninterface IMultiSelectProps {\n name: string;\n label: string;\n options: IMultiSelectOptions[];\n onChange?: (value: { name: string; value: any }) => void;\n defaultValue?: EMilitaryStatus | EMonthlyRent | EReasonForPurchase;\n required?: boolean;\n requiredMessage?: string;\n}\n\nconst MultiSelectComponent: React.FC<IMultiSelectProps> = ({\n name,\n label,\n options,\n onChange,\n defaultValue,\n requiredMessage = '',\n required = true,\n}) => {\n const methods = useFormContext();\n const errors = methods.formState.errors;\n\n const [selected, setSelected] = useState<EMilitaryStatus | EMonthlyRent | EReasonForPurchase>(\n defaultValue || methods.getValues(name) || null,\n );\n\n const onClick = useCallback(\n (selectedOption: { name: string; value: any }) => {\n setSelected(selectedOption.value);\n if (onChange) onChange(selectedOption);\n if (methods) methods.setValue(name, selectedOption.value);\n },\n [methods, name, onChange],\n );\n\n methods.register(name, {\n required:\n required &&\n (requiredMessage ||\n `${name.replace(/([a-z0-9])([A-Z])/g, '$1 $2').toLowerCase()} is required.`),\n });\n\n const fieldState = methods.getFieldState(name);\n\n const optionsRender = useMemo(\n () =>\n options.map((option) => (\n <MultiSelectOptions\n value={option}\n onClick={onClick}\n key={option.value}\n selected={option.value === selected}\n />\n )),\n [onClick, options, selected],\n );\n return (\n <div className=\" pb-8 flex flex-col gap-6\">\n <h1 className=\"text-xl font-bold text-[#635E7D] mr-3\">{label}</h1>\n <div className=\"grid row-auto gap-6 grid-cols-1 xs:grid-cols-2\">{optionsRender}</div>\n {errors && errors?.[name]?.message && (\n <ErrorMessage error={errors?.[name]?.message as string} className=\"text-center\" />\n )}\n </div>\n );\n};\n\nconst MultiSelectOptions: React.FC<{\n value: IMultiSelectOptions;\n selected: boolean;\n onClick: (value: { name: string; value: any }) => void;\n}> = ({ value, onClick, selected }) => {\n return (\n <div\n onClick={() => onClick(value)}\n className={clsx('border-2 border-gray rounded-md p-4 text-center cursor-pointer', {\n 'bg-[#ffbb5566] ': selected,\n })}\n >\n <span className=\"select-none text-[#1C1A27]\">{value.name}</span>\n </div>\n );\n};\n\nexport const MultiSelect = memo(MultiSelectComponent);\n","import { validName } from '@utils';\nimport { CustomInput, Input } from '../input';\n\nexport const Name = (props: CustomInput) => {\n return (\n <Input\n wrapperClassName=\"w-full\"\n name=\"firstName\"\n minLength={2}\n maxLength={50}\n validations={{\n required: true,\n pattern: validName,\n }}\n {...props}\n />\n );\n};\n","import { Input } from '../input';\n\nexport const Occupation = ({ required = true }: { required?: boolean }) => {\n return (\n <Input\n placeholder=\"Your job title\"\n name=\"occupation\"\n label=\"Occupation\"\n validations={{ required }}\n onKeyPress={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }}\n />\n );\n};\n","import { validPassword } from '@utils';\nimport React, { useState } from 'react';\nimport { CustomInput, Input } from '../input';\nimport clsx from 'clsx';\nimport { useFormContext } from 'react-hook-form';\n\nexport const Password = (props: CustomInput) => {\n const { watch, formState } = useFormContext();\n const [showPwd, setShowPwd] = useState<boolean>(true);\n const inputValue = watch('password');\n const repwdinputValue = watch('re-password');\n const errors = Boolean(formState.errors?.password);\n\n if (props.PwdValidation && props.name == 'password') {\n const isContainsUppercase = /^(?=.*[A-Z])/;\n const isContainsLowercase = /^(?=.*[a-z])/;\n const isContainsNumber = /^(?=.*[0-9])/;\n const isValidLength = /^.{8,24}$/;\n const hasSpecialCharacters = new RegExp(/[!@#$%^&*]/, 'gm');\n\n let charCheck = false;\n let numberCheck = false;\n let alphaCheck = false;\n let specialCharsCheck = false;\n\n // Password must contain one lower & uppercase letter\n if (isContainsUppercase.test(inputValue) && isContainsLowercase.test(inputValue)) {\n charCheck = true;\n }\n\n // \"Password must contain at least one Digit.\";\n if (isContainsNumber.test(inputValue)) {\n numberCheck = true;\n }\n\n // \"Password must be 8-24 Characters Long.\";\n if (isValidLength.test(inputValue)) {\n alphaCheck = true;\n }\n\n // \"Password must have a special char !@#$%^&*\n if (hasSpecialCharacters.test(inputValue)) {\n specialCharsCheck = true;\n }\n\n props.PwdValidation(\n { charCheck, numberCheck, alphaCheck, specialCharsCheck },\n !!repwdinputValue && inputValue != repwdinputValue,\n );\n }\n\n return (\n <Input\n wrapperClassName=\"w-full\"\n name=\"password\"\n type={showPwd ? 'password' : 'text'}\n icon={\n props.showIcon ? (\n <svg\n width={16}\n className={clsx('keep-color', {\n 'stroke-primary': inputValue?.length > 0,\n 'stroke-gray-500': inputValue?.length === 0,\n 'stroke-red': errors,\n })} style={{color: 'rgb(10, 170, 130)'}} role=\"img\" viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><title>LastPass</title><path d=\"M22.629,6.857c0-0.379,0.304-0.686,0.686-0.686C23.693,6.171,24,6.483,24,6.857 v10.286c0,0.379-0.304,0.686-0.686,0.686c-0.379,0-0.686-0.312-0.686-0.686V6.857z M2.057,10.286c1.136,0,2.057,0.921,2.057,2.057 S3.193,14.4,2.057,14.4S0,13.479,0,12.343S0.921,10.286,2.057,10.286z M9.6,10.286c1.136,0,2.057,0.921,2.057,2.057 S10.736,14.4,9.6,14.4s-2.057-0.921-2.057-2.057S8.464,10.286,9.6,10.286z M17.143,10.286c1.136,0,2.057,0.921,2.057,2.057 S18.279,14.4,17.143,14.4s-2.057-0.921-2.057-2.057S16.007,10.286,17.143,10.286z\" fill=\"#0aaa82\"></path></svg>\n ) : (\n ''\n )\n }\n rightIcon={\n showPwd ? (\n <svg width={16}\n className={clsx('keep-color', {\n 'stroke-primary': inputValue?.length > 0,\n 'stroke-gray-500': inputValue?.length === 0,\n 'stroke-red': errors,\n })}\n onClick={() => {\n setShowPwd(false);\n }} style={{width: '1em',height: '1em',verticalAlign: 'middle', overflow: 'hidden'}} viewBox=\"0 0 1024 1024\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M989.184 533.504c0 52.736-42.496 118.272-114.176 175.104-6.144 5.12-13.824 7.68-21.504 7.68-10.24 0-19.968-4.608-26.624-12.8-11.776-14.848-9.216-36.352 5.12-48.128 60.928-48.64 88.576-97.28 88.576-121.856 0-69.12-171.52-232.448-406.528-232.448-26.624 0-53.248 2.048-79.872 5.632-18.432 3.072-35.84-10.24-38.912-28.672-2.56-18.432 10.24-35.84 28.672-38.912 29.696-4.608 59.904-6.656 89.6-6.656 263.168 0 475.648 182.272 475.648 301.056z m-136.192 272.896c13.312 13.312 13.312 34.816 0 48.128-6.656 6.656-15.36 10.24-24.064 10.24-8.704 0-17.408-3.584-24.064-10.24l-66.56-66.56c-71.168 29.696-147.968 45.568-223.744 45.568-264.704 0-479.744-181.76-479.744-300.544 0-82.432 86.016-178.176 209.92-238.592L175.616 225.28a33.9968 33.9968 0 0 1 0-48.128c13.312-13.312 34.816-13.312 48.128 0l104.96 104.96 524.288 524.288zM445.44 533.504c0 37.888 30.72 68.608 68.608 68.608 10.752 0 20.992-2.56 30.72-7.168l-92.16-92.16c-4.608 9.216-7.168 19.456-7.168 30.72z m240.64 202.24l-91.136-91.136c-23.04 16.896-50.688 26.112-80.384 26.112-75.776 0-137.216-61.44-137.216-137.216 0-29.184 9.728-56.832 26.112-79.872L296.96 346.624c-119.808 52.224-193.536 135.168-193.536 186.88 0 69.12 173.568 232.448 411.136 232.448 57.856-0.512 116.224-10.752 171.52-30.208z\" /></svg>\n ) : (\n <svg width={16}\n className={clsx('keep-color', {\n 'stroke-primary': inputValue?.length > 0,\n 'stroke-gray-500': inputValue?.length === 0,\n 'stroke-red': errors,\n })}\n onClick={() => {\n setShowPwd(true);\n }} viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M9.99896 7.64172C8.69414 7.64172 7.64062 8.69524 7.64062 10.0001C7.64062 11.3049 8.69414 12.3584 9.99896 12.3584C11.3038 12.3584 12.3573 11.3049 12.3573 10.0001C12.3573 8.69524 11.3038 7.64172 9.99896 7.64172ZM6.39062 10.0001C6.39062 8.00488 8.00378 6.39172 9.99896 6.39172C11.9941 6.39172 13.6073 8.00488 13.6073 10.0001C13.6073 11.9952 11.9941 13.6084 9.99896 13.6084C8.00378 13.6084 6.39062 11.9952 6.39062 10.0001Z\" fill=\"currentColor\" />\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M1.88307 7.49745C3.8755 4.36548 6.79517 2.47498 10.0018 2.47498C13.2086 2.47498 16.1284 4.36564 18.1208 7.49786C18.575 8.20981 18.781 9.12177 18.781 9.99581C18.781 10.8698 18.575 11.7818 18.1208 12.4938C16.1284 15.626 13.2086 17.5166 10.0018 17.5166C6.79503 17.5166 3.87524 15.626 1.88281 12.4938C1.42866 11.7818 1.22266 10.8698 1.22266 9.99581C1.22266 9.12161 1.42874 8.20946 1.88307 7.49745ZM10.0018 3.72498C7.32528 3.72498 4.76173 5.30098 2.93751 8.16876L2.93698 8.16958C2.6415 8.63251 2.47266 9.29518 2.47266 9.99581C2.47266 10.6964 2.6415 11.3591 2.93698 11.822L2.93751 11.8229C4.76174 14.6906 7.32528 16.2666 10.0018 16.2666C12.6784 16.2666 15.2419 14.6906 17.0661 11.8229L17.0667 11.822C17.3622 11.3591 17.531 10.6964 17.531 9.99581C17.531 9.29518 17.3622 8.63251 17.0667 8.16958L17.0661 8.16876C15.2419 5.30098 12.6784 3.72498 10.0018 3.72498Z\" fill=\"currentColor\" />\n </svg>\n )\n }\n validations={{\n required: true,\n validate: (password) => {\n if (props.checkValidation && props.name == 'password' && !validPassword.test(password)) {\n return 'This password is invalid, please try again.';\n }\n },\n }}\n {...props}\n />\n );\n};\n","import { Select } from '../select';\nimport { useTranslation } from 'react-i18next';\n\nexport const Race = (props) => {\n const { t } = useTranslation();\n return (\n <Select\n name=\"race\"\n showRequired={false}\n options={[\n { label: t('American Indian or Alaskan Native'), value: 'American Indian or Alaskan Native' },\n { label: t('Asian'), value: 'Asian' },\n { label: t('Black or African American'), value: 'Black or African American' },\n { label: t('Multi-Racial'), value: 'Multi-Racial' },\n {\n label: t('Native Hawaiian or Other Pacific Islander'),\n value: 'Native Hawaiian or Other Pacific Islander',\n },\n { label: t('White'), value: 'White' },\n { label: t('I Prefer Not to Say'), value: 'I Prefer Not to Say' },\n ]}\n label={t('Race')}\n {...props}\n />\n );\n};\n","import { EReasonForPurchase } from '@services/Api';\nimport { Select } from '../select';\n\nexport const ReasonForPurchase = ({\n showLabel = true,\n alternate,\n showRequired = true,\n}: {\n showLabel?: boolean;\n alternate?: boolean;\n showRequired?: boolean;\n}) => {\n return (\n <Select\n name=\"reasonForPurchase\"\n options={[\n { label: 'Build wealth', value: EReasonForPurchase.build_wealth },\n { label: 'Better schools', value: EReasonForPurchase.better_schools },\n { label: 'Safer neighborhood', value: EReasonForPurchase.safer_neighborhood },\n { label: 'Stop paying rent', value: EReasonForPurchase.stop_paying_rent },\n { label: 'Tax benefits', value: EReasonForPurchase.tax_benefits },\n { label: 'Place to raise my family', value: EReasonForPurchase.place_to_raise_family },\n { label: 'Other', value: EReasonForPurchase.other },\n ]}\n showLabel={showLabel}\n alternate={alternate}\n label=\"Reason for home purchase\"\n placeholder=\"Select\"\n showRequired={showRequired}\n />\n );\n};\n","import { Label } from '../label';\nimport { useAnotherAmount } from '../time-pills';\nimport { useFormContext, UseFormRegisterReturn } from 'react-hook-form';\nimport clsx from 'clsx';\nimport { useIntl } from 'react-intl';\nimport { Fragment } from 'react';\nimport { Listbox, Transition } from '@headlessui/react';\nimport ReactInputMask from 'react-input-mask';\n\ninterface InputSelectProps {\n showRequired?: boolean;\n name: string;\n options: { value: string; label: string }[];\n validations?: any;\n label?: string;\n showLabel?: boolean;\n className?: string;\n placeholder?: string;\n onChange?: ({ value, name }) => void;\n shouldRegister?: boolean;\n value?: string;\n}\n\nconst SelectDateAmount = ({\n showRequired = true,\n name,\n options,\n validations,\n label: customLabel,\n showLabel = true,\n className,\n placeholder = 'Select...',\n onChange,\n shouldRegister = true,\n value,\n}: InputSelectProps) => {\n const {\n register,\n watch,\n setValue,\n formState: { errors, isSubmitted },\n } = useFormContext();\n\n const selected: string = shouldRegister ? watch(name) : value;\n\n const intl = useIntl();\n\n const formatValidations = { ...validations };\n\n const label = customLabel || intl.formatMessage({ id: `page.account.${name}` });\n\n if (!validations?.pattern?.value) {\n formatValidations.pattern = {\n value: validations?.pattern,\n message: `This ${label.replace('*', '').toLowerCase()} is invalid, please try again.`,\n };\n }\n\n const requiredMessage = `${label.replace('*', '').toLowerCase()} is required.`;\n\n if (validations?.required || showRequired) {\n formatValidations.required = requiredMessage;\n }\n\n const errorInvalid = errors && errors[name]?.message && isSubmitted;\n const inputRegister = shouldRegister ? register(name, formatValidations) : false;\n const currentExpectedPurchaseMonthsPeriod = watch('expectedPurchaseMonthsPeriod');\n\n const inputValue = currentExpectedPurchaseMonthsPeriod;\n\n return (\n <div className={className}>\n {showLabel && <Label name={name}>{label}</Label>}\n <div className=\"flex items-center\">\n <div className=\"border border-gray-200 border-r-0 rounded-l h-[48px] w-full\">\n <ReactInputMask\n mask=\"999\"\n value={String(inputValue) || ''}\n onChange={(e) => {\n setValue('expectedPurchaseMonthsPeriod', e.target.value, {\n shouldDirty: true,\n shouldTouch: true,\n shouldValidate: true,\n });\n }}\n maskPlaceholder=\"\"\n className=\"h-full px-3 w-full text-sm text-gray-900 rounded-l\"\n />\n </div>\n <Listbox\n {...inputRegister}\n value={selected}\n onChange={(value) => {\n if (shouldRegister) {\n (inputRegister as UseFormRegisterReturn<string>).onChange({\n target: { value, name },\n });\n }\n if (onChange) {\n onChange({ value, name });\n }\n }}\n >\n <div className=\"relative\">\n <Listbox.Button\n className={clsx(\n 'relative py-2 pr-10 text-left bg-white dark:bg-transparent cursor-default focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm border border-gray-200 dark:border-black-dark w-full px-3 rounded-r bg-transparent text-sm min-h-[48px]',\n { 'border-error-500': errorInvalid },\n )}\n >\n {selected ? (\n <span className=\"block truncate\">\n {options.find((option) => option.value === selected)?.label}\n </span>\n ) : (\n <span className=\"block text-gray-400 truncate\">{placeholder}</span>\n )}\n <span className=\"absolute inset-y-0 right-0 flex items-center pr-[12px] pointer-events-none\">\n <svg className=\"text-gray-400 keep-color\" aria-hidden=\"true\" width=\"16\" height=\"16\" viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4 6L8 10L12 6\" stroke=\"#7C7C7C\" strokeWidth=\"2\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </span>\n </Listbox.Button>\n <Transition\n as={Fragment}\n leave=\"transition ease-in duration-100\"\n leaveFrom=\"opacity-100\"\n leaveTo=\"opacity-0\"\n >\n <Listbox.Options className=\"absolute z-10 w-full py-0 mt-1 overflow-auto text-base bg-white border border-gray-200 rounded max-h-60 focus:outline-none sm:text-sm dark:border-black-dark dark:bg-black-background ring-0\">\n {options.map((item, i) => (\n <Listbox.Option\n key={i}\n className={({ active }) =>\n `relative cursor-default select-none py-2 px-3 border-b border-gray-200 pr-4 min-h-[48px] z-10 last:border-b-0 items-center flex text-sm dark:bg-black-background dark:text-white dark:border-black-dark ${\n active\n ? 'bg-primary dark:bg-primary text-white-500 dark:text-white-500'\n : 'text-gray-900 bg-white'\n }`\n }\n value={item.value}\n >\n {item.label}\n </Listbox.Option>\n ))}\n </Listbox.Options>\n </Transition>\n </div>\n </Listbox>\n </div>\n </div>\n );\n};\n\nexport const SelectExpectedPurchasePeriod = () => {\n const { isAnotherAmount, otherAmountSelection, setOtherAmountSelection } = useAnotherAmount();\n const methods = useFormContext();\n\n methods.register('expectedPurchaseMonthsPeriod', {\n required: 'Choose a valid amount',\n validate: (value) => {\n const minMonth = 1;\n const minYear = 1;\n const maxYear = 50;\n const maxMonth = 50 * 12;\n if (\n isAnotherAmount &&\n otherAmountSelection === 'months' &&\n (value < minMonth || value > maxMonth)\n ) {\n return `Enter a valid amount (${minMonth}-${maxMonth} months)`;\n }\n if (\n isAnotherAmount &&\n otherAmountSelection === 'years' &&\n (value < minYear || value > maxYear)\n ) {\n return `Enter a valid amount (${minYear}-${maxYear} years)`;\n }\n\n return null;\n },\n });\n\n return (\n isAnotherAmount && (\n <SelectDateAmount\n className=\"mt-6\"\n name=\"otherAmountSelection\"\n label=\"Other amount\"\n validations={{ required: false }}\n value={otherAmountSelection}\n shouldRegister={false}\n onChange={({ value }) => {\n if (value) {\n setOtherAmountSelection(value);\n }\n methods.setValue('expectedPurchaseMonthsPeriod', null);\n }}\n showLabel={false}\n options={[\n { label: 'Months', value: 'months' },\n { label: 'Years', value: 'years' },\n ]}\n />\n )\n );\n};\n","import { Input } from '../input';\nimport { useFormContext } from 'react-hook-form';\n\nexport const SSN = () => {\n const { formState: { errors, isSubmitted } } = useFormContext();\n\n return (\n <Input\n name=\"ssn\"\n label=\"Social Security Number\"\n placeholder=\"000 - 00 - 0000\"\n mask=\"999 - 99 - 9999\"\n validations={{ \n required: {\n value: true,\n message: \"Social security number is required\"\n },\n pattern: {\n value: /^\\d{3}\\s*-\\s*\\d{2}\\s*-\\s*\\d{4}$/,\n message: \"Please enter a valid SSN in the format: XXX-XX-XXXX\"\n }\n }}\n description=\"Enter your 9-digit SSN for verification purposes. This information is securely encrypted.\"\n info=\"Your SSN is required to verify your identity when accessing your credit report. We use industry-standard encryption to protect your data.\"\n />\n );\n};\n","import states from '@data/states.json';\nimport { Select } from '../select';\n\nexport const State = () => {\n return (\n <Select\n name=\"state\"\n label=\"State\"\n options={Object.entries(states).map(([value, state]) => ({\n value,\n label: state,\n }))}\n />\n );\n};\n/*\nimport states from '@data/states.json';\nimport React, { useState } from 'react'\nimport Select, {components} from 'react-select';\n\nexport const State = () => {\n const setIsClearable= useState(false);\n const isSearchable = useState(false);\n const [isDisabled, setIsDisabled] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n const [isRtl, setIsRtl] = useState(false);\n onchange\n const customStyles = {\n control: base => ({\n ...base,\n height: 45,\n minHeight: 45\n })\n };\n\n (inputProps: any) => <components.Input {...inputProps} autoComplete=\"yes\"> </components.Input>\n return (\n<div className = \"row\">\n <div className='col-md-15'>\n <span>State</span>\n <Select\n name=\"state\"\n styles={customStyles}\n \n options={Object.entries(states).map(([value, state]) => ({\n value,\n label: state\n ,onchange={(value) => {\n if (shouldRegister) {\n (inputRegister as UseFormRegisterReturn<string>).onChange({\n target: { value, name },\n });\n }\n if (onChange) {\n onChange({ value, name });\n }\n }}\n }))}\n />\n </div>\n </div>\n\n );\n};*/\n","import c,{createContext as m,useContext as L,useMemo as f,useState as b}from\"react\";import{useId as T}from'../../hooks/use-id.js';import{forwardRefWithAs as E,render as g}from'../../utils/render.js';import{useIsoMorphicEffect as x}from'../../hooks/use-iso-morphic-effect.js';import{useSyncRefs as P}from'../../hooks/use-sync-refs.js';import{useEvent as y}from'../../hooks/use-event.js';let d=m(null);function u(){let o=L(d);if(o===null){let t=new Error(\"You used a <Label /> component, but it is not inside a relevant parent.\");throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}return o}function H(){let[o,t]=b([]);return[o.length>0?o.join(\" \"):void 0,f(()=>function(e){let s=y(r=>(t(l=>[...l,r]),()=>t(l=>{let n=l.slice(),p=n.indexOf(r);return p!==-1&&n.splice(p,1),n}))),a=f(()=>({register:s,slot:e.slot,name:e.name,props:e.props}),[s,e.slot,e.name,e.props]);return c.createElement(d.Provider,{value:a},e.children)},[t])]}let A=\"label\";function h(o,t){let i=T(),{id:e=`headlessui-label-${i}`,passive:s=!1,...a}=o,r=u(),l=P(t);x(()=>r.register(e),[e,r.register]);let n={ref:l,...r.props,id:e};return s&&(\"onClick\"in n&&(delete n.htmlFor,delete n.onClick),\"onClick\"in a&&delete a.onClick),g({ourProps:n,theirProps:a,slot:r.slot||{},defaultTag:A,name:r.name||\"Label\"})}let v=E(h),M=Object.assign(v,{});export{M as Label,H as useLabels};\n","import i,{Fragment as x,createContext as A,useContext as H,useMemo as E,useRef as F,useState as M,useEffect as _}from\"react\";import{forwardRefWithAs as U,render as P,compact as K}from'../../utils/render.js';import{useId as B}from'../../hooks/use-id.js';import{Keys as g}from'../keyboard.js';import{isDisabledReactIssue7711 as I}from'../../utils/bugs.js';import{Label as O,useLabels as W}from'../label/label.js';import{Description as N,useDescriptions as J}from'../description/description.js';import{useResolveButtonType as X}from'../../hooks/use-resolve-button-type.js';import{useSyncRefs as j}from'../../hooks/use-sync-refs.js';import{Hidden as $,Features as q}from'../../internal/hidden.js';import{attemptSubmit as z}from'../../utils/form.js';import{useEvent as m}from'../../hooks/use-event.js';import{useControllable as Q}from'../../hooks/use-controllable.js';import{useDisposables as V}from'../../hooks/use-disposables.js';let y=A(null);y.displayName=\"GroupContext\";let Y=x;function Z(s){var d;let[n,p]=M(null),[c,f]=W(),[r,h]=J(),l=E(()=>({switch:n,setSwitch:p,labelledby:c,describedby:r}),[n,p,c,r]),T={},b=s;return i.createElement(h,{name:\"Switch.Description\"},i.createElement(f,{name:\"Switch.Label\",props:{htmlFor:(d=l.switch)==null?void 0:d.id,onClick(t){n&&(t.currentTarget.tagName===\"LABEL\"&&t.preventDefault(),n.click(),n.focus({preventScroll:!0}))}}},i.createElement(y.Provider,{value:l},P({ourProps:T,theirProps:b,defaultTag:Y,name:\"Switch.Group\"}))))}let ee=\"button\";function te(s,n){let p=B(),{id:c=`headlessui-switch-${p}`,checked:f,defaultChecked:r=!1,onChange:h,name:l,value:T,form:b,...d}=s,t=H(y),u=F(null),D=j(u,n,t===null?null:t.setSwitch),[o,a]=Q(f,h,r),S=m(()=>a==null?void 0:a(!o)),C=m(e=>{if(I(e.currentTarget))return e.preventDefault();e.preventDefault(),S()}),L=m(e=>{e.key===g.Space?(e.preventDefault(),S()):e.key===g.Enter&&z(e.currentTarget)}),v=m(e=>e.preventDefault()),G=E(()=>({checked:o}),[o]),R={id:c,ref:D,role:\"switch\",type:X(s,u),tabIndex:0,\"aria-checked\":o,\"aria-labelledby\":t==null?void 0:t.labelledby,\"aria-describedby\":t==null?void 0:t.describedby,onClick:C,onKeyUp:L,onKeyPress:v},k=V();return _(()=>{var w;let e=(w=u.current)==null?void 0:w.closest(\"form\");e&&r!==void 0&&k.addEventListener(e,\"reset\",()=>{a(r)})},[u,a]),i.createElement(i.Fragment,null,l!=null&&o&&i.createElement($,{features:q.Hidden,...K({as:\"input\",type:\"checkbox\",hidden:!0,readOnly:!0,form:b,checked:o,name:l,value:T})}),P({ourProps:R,theirProps:d,slot:G,defaultTag:ee,name:\"Switch\"}))}let ne=U(te),re=Z,Ge=Object.assign(ne,{Group:re,Label:O,Description:N});export{Ge as Switch};\n","import { useFormContext } from 'react-hook-form';\nimport { Fragment } from 'react';\nimport { Switch as SwitchComponent } from '@headlessui/react';\n\ninterface SwitchProps {\n name: string;\n label: string;\n}\n\nexport const Switch = ({ name, label }: SwitchProps) => {\n const methods = useFormContext();\n\n const value = methods.watch(name);\n const checked = value === true;\n\n return (\n (<SwitchComponent\n checked={checked}\n onChange={(value) => {\n methods.setValue(name, value, {\n shouldDirty: true,\n shouldTouch: true,\n shouldValidate: true,\n });\n }}\n as={Fragment}\n >\n {({ checked }) => (\n /* Use the `checked` state to conditionally style the button. */\n (<div className=\"flex items-center gap-4 mt-8 text-sm font-medium cursor-pointer\">\n <button\n className={`${\n checked ? 'bg-primary' : 'bg-gray-200 dark:bg-black-dark'\n } relative inline-flex h-6 w-11 items-center rounded-full shrink-0`}\n >\n <span\n className={`${\n checked ? 'translate-x-6' : 'translate-x-1'\n } inline-block h-4 w-4 transform rounded-full bg-white transition`}\n />\n </button>\n {label}\n </div>)\n )}\n </SwitchComponent>)\n );\n};\n","import clsx from 'clsx';\nimport { useFormContext } from 'react-hook-form';\nimport { useIntl } from 'react-intl';\nimport { Label } from '../label';\nimport { InputProps } from '../input';\nimport { ErrorMessage } from '@components/error-message';\n\nexport const TextArea = ({\n name,\n validations,\n responseError,\n showLabel = true,\n placeholder,\n icon,\n showRequired,\n mask,\n textArea = true,\n className,\n label: customLabel,\n maskPlaceholder,\n info,\n maxLength,\n description,\n labelClassName,\n ...inputProps\n}: InputProps) => {\n const intl = useIntl();\n const {\n formState: { errors, isSubmitted },\n register,\n watch,\n } = useFormContext();\n\n const label = customLabel || intl.formatMessage({ id: `page.account.${name}` });\n const formatValidations = { ...validations };\n\n if (!validations?.pattern?.value) {\n formatValidations.pattern = {\n value: validations?.pattern,\n message: `This ${label.replace('*', '').toLowerCase()} is invalid, please try again.`,\n };\n }\n\n const requiredMessage = `${label.replace('*', '').toLowerCase()} is required.`;\n\n if (validations?.required || showRequired) {\n formatValidations.required =\n typeof validations.required === 'string' ? validations.required : requiredMessage;\n }\n\n if (mask && validations?.required) {\n formatValidations.validate = (value: string) => {\n if (value.includes('_')) {\n return requiredMessage;\n }\n return undefined;\n };\n }\n\n const errorInvalid = errors && errors[name]?.message && isSubmitted;\n\n const errorFieldAlreadyExists =\n responseError?.data?.error === 'fields_already_in_use' &&\n responseError?.data?.metadata?.fields?.includes(name.toLowerCase());\n\n const hasError = errorInvalid || errorFieldAlreadyExists;\n\n const qtyCharacters = watch(name)?.length;\n\n const allProps = {\n className: clsx(\n 'border dark:border-black-dark w-full rounded bg-transparent text-sm placeholder:text-gray-400 text-gray-900 dark:text-white p-3',\n className,\n { 'border-red-500': hasError, 'border-gray-200': !hasError },\n ),\n type: 'text',\n placeholder: placeholder,\n ...register(name, {\n ...formatValidations,\n maxLength: {\n value: maxLength,\n message: `The entered text exceeds the ${maxLength} characters limit by ${\n qtyCharacters - maxLength\n } characters`,\n },\n }),\n ...inputProps,\n };\n\n return (\n <div className=\"flex flex-col\">\n {showLabel && (\n <Label className={labelClassName} name={name}>\n <div className=\"flex flex-col\">\n <div className=\"first-letter:capitalize\">{label}</div>{' '}\n {description && (\n <div className=\"mt-1 text-sm text-gray-500 mb-2 font-normal\">{description}</div>\n )}\n </div>\n {info && (\n <div className=\"relative group\">\n <svg className=\"cursor-pointer keep-color\" width=\"14\" height=\"15\" viewBox=\"0 0 14 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.33334 4.16671H7.66668V5.50004H6.33334V4.16671ZM6.33334 6.83337H7.66668V10.8334H6.33334V6.83337ZM7.00001 0.833374C3.32001 0.833374 0.333344 3.82004 0.333344 7.50004C0.333344 11.18 3.32001 14.1667 7.00001 14.1667C10.68 14.1667 13.6667 11.18 13.6667 7.50004C13.6667 3.82004 10.68 0.833374 7.00001 0.833374ZM7.00001 12.8334C4.06001 12.8334 1.66668 10.44 1.66668 7.50004C1.66668 4.56004 4.06001 2.16671 7.00001 2.16671C9.94001 2.16671 12.3333 4.56004 12.3333 7.50004C12.3333 10.44 9.94001 12.8334 7.00001 12.8334Z\" fill=\"#6B7280\"/>\n </svg>\n\n <div className=\"absolute opacity-0 invisible transition-all group-hover:opacity-100 group-hover:visible lg:group-hover:block min-w-[369px] py-2 px-3 text-white text-left !leading-tight-[150%] bg-gray-700 rounded-lg text-sm font-normal z-10 -left-[30px] lg:-left-[177px] before -top-[150px]\">\n <div className=\"w-[18px] overflow-hidden inline-block absolute -bottom-[12px] left-1/2 -translate-x-1/2 rotate-180\">\n <div className=\"h-[13px] w-[13px] bg-gray-700 rotate-45 transform origin-bottom-left\" />\n </div>\n {info}\n </div>\n </div>\n )}\n </Label>\n )}\n <div className=\"relative\">\n <div\n className={clsx('absolute -translate-y-1/2 top-1/2 ml-[17px]', {\n 'text-error-500': hasError,\n 'text-primary': !hasError,\n })}\n >\n {icon}\n </div>\n <textarea {...allProps} />\n {maxLength && textArea && (\n <div\n className={clsx('absolute bottom-2 right-2 text-xs font-medium', {\n 'text-red-500': maxLength - (qtyCharacters || 0) < 0,\n 'text-gray-400': maxLength - (qtyCharacters || 0) >= 0,\n })}\n >\n {maxLength - qtyCharacters || 0}\n </div>\n )}\n </div>\n {errorInvalid ? (\n <ErrorMessage error={errors[name]?.message as string} className=\"text-xs\" />\n ) : (\n errorFieldAlreadyExists && (\n <ErrorMessage error={`This ${name} is already taken. Please try again.`} />\n )\n )}\n <style jsx global>{`\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n display: none;\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n }\n `}</style>\n </div>\n );\n};\n","import { Input } from '../input';\n\nexport const Title = () => {\n return (\n <Input\n name=\"role\"\n label=\"Title\"\n placeholder=\"Senior Software Engineer\"\n validations={{ required: true }}\n />\n );\n};\n","import { useCallback, useEffect, useMemo, useState } from 'react';\nimport usePlaceAutoComplete from 'react-google-autocomplete/lib/usePlacesAutocompleteService';\nimport { useFormContext } from 'react-hook-form';\nimport { Input } from '../input';\nimport { ErrorMessage } from '@components';\ninterface AddressComponent {\n long_name: string;\n types: string[];\n}\nconst LocationTags = ({\n locations,\n onDelete,\n}: {\n locations: Partial<Record<'city' | 'state' | 'country' | 'placeId', string>>[];\n onDelete: (placeId: string) => void;\n}) => {\n const locationsRender = useMemo(\n () =>\n locations.map((location) => {\n const data = { ...location };\n const placeId = data.placeId;\n delete data.placeId;\n return (\n <button\n \n type=\"button\"\n key={placeId}\n className=\"px-4 py-2 border border-primary-500 rounded-full text-sm font-medium text-primary-500 flex items-center gap-2 hover:bg-primary-500 hover:text-white min-h-[40px]\"\n >\n <div className=\"-mt-[1px] capitalize text-left w-max\">\n {Object.values(data).join(', ')}\n </div>\n <svg xmlns=\"http://www.w3.org/2000/svg\" height={16} strokeWidth={2} onClick={() => onDelete(placeId)} viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n );\n }),\n [locations, onDelete],\n );\n return (\n <>\n {locations?.length > 0 && <div className=\"mt-6 flex gap-2 flex-wrap\">{locationsRender}</div>}\n </>\n );\n};\n\ninterface SearchLocationProps {\n fieldName?: string;\n required?: boolean;\n}\n\nexport const WishedLocation = ({\n fieldName = 'wishedLocations',\n required = true,\n}: SearchLocationProps) => {\n const [showPredictions, setShowPredictions] = useState(false);\n const [searchTerm, setSearchTerm] = useState('');\n const { placePredictions, getPlacePredictions, placesService } = usePlaceAutoComplete({\n debounce: 200,\n language: 'en',\n apiKey: process.env.NEXT_PUBLIC_MAPS_API,\n\n options: {\n componentRestrictions: { country: 'us' },\n types: ['(cities)'],\n },\n });\n const methods = useFormContext();\n const [locations, setLocations] = useState<\n Partial<Record<'placeId' | 'state' | 'city' | 'country', string>>[]\n >(methods.getValues(fieldName) || []);\n\n const errorInvalid =\n methods.formState.errors &&\n methods.formState.errors[fieldName]?.message &&\n methods.formState.isSubmitted;\n\n useEffect(() => {\n methods.register(fieldName, {\n validate: (locations) => {\n if (!required) return true;\n if (!locations.length) {\n return 'Add at least one state or city.';\n }\n if (locations.length > 5) {\n return 'Choose no more than 5 states or cities.';\n }\n },\n });\n () => methods.unregister(fieldName);\n }, [fieldName, methods, required]);\n\n const onQueryChange = (event) => {\n setSearchTerm(event.target.value);\n if (event.target.value.length < 3) return;\n getPlacePredictions({\n input: event.target.value,\n });\n setShowPredictions(true);\n };\n\n // gets diff address components\n const getAddressComponentValue = (addressComponents: AddressComponent[], type: string) => {\n const component = addressComponents.find((component) => component.types.includes(type));\n return component ? component.long_name : '';\n };\n\n const handlePredictionsClick = useCallback(\n (placeId) => {\n placesService.getDetails(\n {\n placeId,\n },\n (place) => {\n const addressComponents = place?.address_components ?? [];\n const city = getAddressComponentValue(addressComponents, 'locality');\n const state = getAddressComponentValue(addressComponents, 'administrative_area_level_1');\n\n setLocations((locations) => {\n const data = [...locations, { placeId, city, state, country: 'USA' }];\n methods.setValue(fieldName, data, {\n shouldValidate: true,\n shouldDirty: true,\n });\n if (errorInvalid)\n methods.setError(fieldName, {\n message: '',\n });\n return data;\n });\n setShowPredictions(false);\n setSearchTerm('');\n },\n );\n },\n [fieldName, methods, placesService, errorInvalid],\n );\n\n const predictions = useMemo(\n () =>\n showPredictions && (\n <div className=\"absolute z-10 w-full mt-1 bg-white-100 border border-gray-300 rounded-md shadow-lg overflow-y-auto max-h-[250px]\">\n {placePredictions.length ? (\n placePredictions.map((prediction) => (\n <div\n key={prediction.place_id}\n className=\"px-4 py-2 hover:bg-gray-100 cursor-pointer\"\n onClick={() => {\n handlePredictionsClick(prediction.place_id);\n }}\n >\n {prediction.description}\n </div>\n ))\n ) : (\n <div className=\"px-4 py-2 hover:bg-gray-100 cursor-pointer\">No cities found.</div>\n )}\n </div>\n ),\n [handlePredictionsClick, placePredictions, showPredictions],\n );\n\n const onDelete = useCallback(\n (placeId: string) => {\n const filteredLocations = locations.filter((location) => location.placeId !== placeId);\n methods.setValue(fieldName, filteredLocations);\n setLocations(filteredLocations);\n },\n [fieldName, locations, methods],\n );\n\n return (\n <section>\n <Input\n label=\" \"\n placeholder=\"Search by state or city...\"\n className=\"w-full\"\n name=\"locationSearch\"\n onChange={onQueryChange}\n value={searchTerm}\n />\n {errorInvalid && (\n <ErrorMessage\n className=\"mt-3\"\n error={methods.formState.errors?.[fieldName].message as string}\n />\n )}\n {/* predictions list */}\n {predictions}\n {/* tags */}\n <LocationTags locations={locations} onDelete={onDelete} />\n </section>\n );\n};\n","import { Input } from '../input';\n\nexport const ZipCode = ({ name = 'zipCode' }) => {\n return (\n <Input\n wrapperClassName=\"w-full\"\n mask=\"99999\"\n validations={{ required: true }}\n placeholder=\"Enter ZIP\"\n name={name || 'zipCode'}\n label=\"ZIP code\"\n />\n );\n};\n","import { DatePicker, LocalizationProvider } from '@mui/x-date-pickers';\nimport { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';\nimport clsx from 'clsx';\nimport { ErrorMessage } from '@components/error-message';\nimport dayjs from 'dayjs';\nimport { useEffect } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\nconst DATE_FORMAT = 'YYYY-MM-DD';\n\nexport const DateSelector = ({\n name,\n label,\n className,\n}: {\n name: string;\n label: string;\n className: string;\n}) => {\n // if in a form context\n const {\n register,\n getValues,\n setValue,\n formState: { errors },\n } = useFormContext();\n\n const defaultDate = getValues(name) ? dayjs(getValues(name), DATE_FORMAT) : null;\n\n const handleDateChange = (value: dayjs.Dayjs | null) => {\n if (!value || !value.isValid()) return;\n setValue(name, value.format(DATE_FORMAT), {\n shouldDirty: true,\n shouldTouch: true,\n });\n };\n\n useEffect(() => {\n register(name, {\n required: 'Date is required.',\n });\n }, [register]);\n\n const errorInvalid = errors && errors?.[name]?.message;\n\n return (\n <div className=\"flex flex-col gap-2\">\n <label>{label}</label>\n <LocalizationProvider dateAdapter={AdapterDayjs}>\n <DatePicker\n sx={\n errorInvalid\n ? {\n outline: '.6px solid red ',\n borderRadius: '4px',\n }\n : {}\n }\n maxDate={dayjs().subtract(1, 'day')}\n defaultValue={defaultDate}\n value={defaultDate}\n onChange={handleDateChange}\n />\n </LocalizationProvider>\n {errorInvalid && (\n <ErrorMessage error={errors?.[name]?.message as string} className=\"text-xs \" />\n )}\n </div>\n );\n};\n\n{\n /* <Input\n label='Date Of Birth'\n placeholder='Enter your date of birth'\n className='w-full flex'\n name='dateofbirth'\n /> */\n}\n","import { AutoCompleteLocation } from './address-autocomplete';\nimport { BirthDate } from './birth-date';\nimport { Checkbox } from './checkbox';\nimport { CheckBoxOptions } from './checkbox-options';\nimport { ChildrenSelect } from './children-select';\nimport { City } from './city';\nimport { CoBorrowerInput } from './co-borrower';\nimport { Country } from './country';\nimport { CountryPhone } from './country-phone';\nimport { Currency } from './currency';\nimport { Email } from './email';\nimport { ExpectedPurchaseAt } from './expected-purchase-at';\nimport { Gender } from './gender';\nimport { HispanicOrigin } from './hispanic-origin';\nimport { HousePriceGoal } from './house-price-goal';\nimport { Input } from './input';\nimport { MilitaryStatus } from './military-status';\nimport { MultiSelect } from './multi-select';\nimport { Name } from './name';\nimport { Occupation } from './occupation';\nimport { Password } from './password';\nimport { PurchaseHomeTimeDropdown } from './purchase-home-time-select';\nimport { Race } from './race';\nimport { Radio, RadioWrapper } from './radio';\nimport { ReasonForPurchase } from './reason-for-purchase';\nimport { Select } from './select';\nimport { SelectExpectedPurchasePeriod } from './select-expected-purchase-period';\nimport { SSN } from './ssn';\nimport { State } from './state';\nimport { Switch } from './switch';\nimport { TextArea } from './text-area';\nimport { TimePills } from './time-pills';\nimport { Title } from './title';\nimport { WishedLocation } from './wished-locations';\nimport { ZipCode } from './zip-code';\nimport { DateSelector } from './date';\n\nexport const CustomInput = {\n Email,\n Password,\n Input,\n Name,\n Select,\n Checkbox,\n TextArea,\n Radio,\n RadioWrapper,\n Switch,\n Country,\n City,\n Title,\n CountryPhone,\n Currency,\n Gender,\n Race,\n MilitaryStatus,\n ChildrenSelect,\n ReasonForPurchase,\n State,\n ZipCode,\n BirthDate,\n SSN,\n Occupation,\n HousePriceGoal,\n TimePills,\n SelectExpectedPurchasePeriod,\n PurchaseHomeTimeDropdown,\n CheckBoxOptions,\n HispanicOrigin,\n CoBorrowerInput,\n AutoCompleteLocation,\n MultiSelect,\n WishedLocation,\n ExpectedPurchaseAt,\n DateSelector,\n};\n","import { AxiosRequestConfig } from 'axios';\nimport clsx from 'clsx';\nimport { ErrorMessage } from '@components';\nimport { InputHTMLAttributes, ReactNode, TextareaHTMLAttributes } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport ReactInputMask from 'react-input-mask-next';\nimport InputMask from 'react-input-mask-next';\n\nimport { useIntl } from 'react-intl';\nimport { Label } from '../label';\n\nexport type InputProps = Partial<InputHTMLAttributes<HTMLInputElement>> &\n Partial<TextareaHTMLAttributes<HTMLTextAreaElement>> & {\n name: string;\n validations?: any;\n submitError?: any;\n PwdValidation?: any;\n checkValidation?: boolean;\n responseError?: AxiosRequestConfig;\n showLabel?: boolean;\n showIcon?: boolean;\n showRequired?: boolean;\n textArea?: boolean;\n placeholder?: string;\n icon?: ReactNode;\n rightIcon?: ReactNode;\n mask?: string;\n label?: string;\n maskPlaceholder?: string;\n info?: string;\n description?: string;\n labelClassName?: string;\n isError?: boolean;\n wrapperClassName?: string;\n };\n\nexport type CustomInput = Omit<InputProps, 'validations' | 'name'> & {\n name?: string;\n validations?: any;\n};\n\nexport const Input = ({\n name,\n validations,\n responseError,\n showLabel = true,\n placeholder,\n icon,\n rightIcon,\n showRequired,\n mask,\n textArea,\n className,\n label: customLabel,\n maskPlaceholder,\n info,\n maxLength,\n labelClassName,\n description,\n isError,\n wrapperClassName,\n ...inputProps\n}: InputProps) => {\n const intl = useIntl();\n const {\n formState: { errors, isSubmitted },\n register,\n } = useFormContext();\n\n const label = customLabel\n ? customLabel || intl.formatMessage({ id: `page.account.${name}` })\n : '';\n const formatValidations = { ...validations };\n\n if (!validations?.pattern?.value) {\n formatValidations.pattern = {\n value: validations?.pattern,\n message: `This ${label.replace('*', '').toLowerCase()} is invalid, please try again.`,\n };\n }\n\n const requiredMessage = `${label.replace('*', '').toLowerCase()} is required.`;\n\n if (validations?.required || showRequired) {\n formatValidations.required =\n typeof validations.required === 'string' ? validations.required : requiredMessage;\n }\n\n if (mask && validations?.required) {\n formatValidations.validate = (value: string) => {\n if (value.includes('_')) {\n return requiredMessage;\n }\n return undefined;\n };\n }\n\n const errorInvalid = errors && errors[name]?.message && isSubmitted;\n\n const errorFieldAlreadyExists =\n responseError?.data?.error === 'fields_already_in_use' &&\n responseError?.data?.metadata?.fields?.includes(name.toLowerCase());\n\n const otherEmailErrors =\n ['user_associated_to_co_borrower', 'you_cannot_associate_with_yourself'].includes(\n responseError?.data?.error,\n ) && responseError?.data?.metadata?.fields?.includes(name);\n\n const hasError = errorInvalid || errorFieldAlreadyExists || isError;\n\n const allProps = {\n className: clsx(\n 'border border-gray-200 dark:border-black-dark w-full rounded bg-transparent text-sm placeholder:text-gray-400 py-1 text-gray-900 dark:text-white min-h-[48px] py-1 px-3',\n {\n 'pl-9': icon,\n '!border-error-500 pr-[42px] focus:!border-error-500': hasError,\n 'cursor-not-allowed !bg-gray-50 !text-gray-500': inputProps?.disabled,\n },\n className,\n ),\n type: name == 'password' ? 'password' : 'text',\n placeholder: placeholder,\n maxLength,\n ...register(name, formatValidations),\n ...inputProps,\n };\n\n return (\n <div className={clsx('flex flex-col', wrapperClassName)}>\n {showLabel && (\n <Label\n className={clsx(labelClassName, {\n 'text-gray-500': inputProps?.disabled,\n })}\n name={name}\n >\n <div className=\"flex flex-col\">\n <div>{label}</div>{' '}\n {description && <div className=\"mt-1 mb-2 text-sm text-gray-500\">{description}</div>}\n </div>\n {info && (\n <div className=\"relative group\">\n {/* <InfoIcon className=\"cursor-pointer keep-color\" /> */}\n <div className=\"absolute opacity-0 invisible transition-all group-hover:opacity-100 group-hover:visible lg:group-hover:block min-w-[369px] py-2 px-3 text-white text-left !leading-tight-[150%] bg-gray-700 rounded-lg text-sm font-normal z-10 -left-[30px] lg:-left-[177px] before -top-[150px]\">\n <div className=\"w-[18px] overflow-hidden inline-block absolute -bottom-[12px] left-1/2 -translate-x-1/2 rotate-180\">\n <div className=\"h-[13px] w-[13px] bg-gray-700 rotate-45 transform origin-bottom-left\" />\n </div>\n {info}\n </div>\n </div>\n )}\n </Label>\n )}\n <div className=\"relative\">\n <div\n className={clsx('absolute -translate-y-1/2 top-1/2 bottom-1 ml-2', {\n 'text-error-500': hasError,\n 'text-primary': !hasError,\n })}\n >\n {icon}\n </div>\n {mask ? (\n // <ReactInputMask mask={mask} maskPlaceholder={maskPlaceholder} {...allProps} />\n <input placeholder={maskPlaceholder} {...allProps} />\n ) : textArea ? (\n <textarea {...allProps} />\n ) : (\n <input {...allProps} />\n )}\n <div className={clsx('absolute -translate-y-1/2 right-0 top-1/2 mr-3')}>{rightIcon}</div>\n </div>\n {errorInvalid ? (\n <ErrorMessage error={errors[name]?.message as string} className=\"text-xs\" />\n ) : (\n <>\n {errorFieldAlreadyExists && (\n <ErrorMessage error={`This ${name} is already taken. Please try again.`} />\n )}\n {!errorFieldAlreadyExists && otherEmailErrors && (\n <ErrorMessage\n error={\n responseError?.data?.message ??\n `Something is wrong with this email. Please contact support.`\n }\n />\n )}\n </>\n )}\n <style jsx global>{`\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n display: none;\n }\n\n input[type='number'] {\n -moz-appearance: textfield;\n }\n `}</style>\n </div>\n );\n};\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\n\ninterface LabelProps {\n name: string;\n children: ReactNode;\n className?: string;\n}\n\nexport const Label = ({ name, children, className }: LabelProps) => (\n <label\n htmlFor={name}\n className={clsx(\n 'flex items-center gap-1 mb-2 text-sm font-medium text-gray-800 dark:text-white',\n className,\n )}\n >\n {children}\n </label>\n);\n","import clsx from 'clsx';\nimport { ErrorMessage } from '@components';\nimport { useFormContext } from 'react-hook-form';\nimport { DetailedHTMLProps, ReactNode } from 'react';\nimport { InputHTMLAttributes } from 'react';\n\nexport const RadioWrapper = ({\n children,\n className,\n name,\n}: {\n children: ReactNode;\n className?: string;\n name: string;\n}) => {\n const methods = useFormContext();\n return (\n <div className={clsx('flex flex-col gap-5', className)}>\n {children}\n {methods.formState.errors[name]?.message && (\n <ErrorMessage className=\"-mt-2\" error={methods.formState.errors[name]?.message as string} />\n )}\n </div>\n );\n};\n\nexport const Radio = ({\n label,\n validations,\n description,\n ...props\n}: InputHTMLAttributes<HTMLInputElement> & {\n label?: string;\n validations?: Record<string, unknown>;\n description?: string;\n}) => {\n const { register, watch, setValue } = useFormContext();\n const value = watch(props.name);\n const isChecked = value === props.value;\n return (\n <label\n className={clsx('flex gap-3 text-gray-800 dark:text-gray-100 cursor-pointer', {\n 'items-start': description,\n 'items-center': !description,\n })}\n key={props.name}\n >\n <input\n className=\"rounded-full border-2 border-gray-300 text-primary cursor-pointer w-[20px] h-[20px] sr-only shrink-0\"\n type=\"radio\"\n name={props.name}\n {...props}\n {...register(props.name, {\n validate: (value) =>\n value?.length === 0 ? (validations?.required as string) : undefined,\n })}\n onChange={() => {\n setValue(props.name, props.value, {\n shouldTouch: true,\n shouldValidate: true,\n shouldDirty: true,\n });\n }}\n defaultChecked={isChecked}\n />\n <div\n className={clsx(\n 'rounded-full shrink-0 flex items-center justify-center w-[20px] h-[20px]',\n {\n 'border-2 border-primary': isChecked,\n 'border-2': !isChecked,\n },\n )}\n >\n {isChecked && <div className=\"w-[10px] h-[10px] bg-primary rounded-full m-auto\"></div>}\n </div>\n <div>\n <div className=\"text-sm font-medium first-letter:uppercase\">{label}</div>\n {description && <div className=\"mt-1 text-xs text-gray-500\">{description}</div>}\n </div>\n </label>\n );\n};\n\nexport const ControlledRadio = ({\n label,\n ...props\n}: { label: string } & DetailedHTMLProps<\n InputHTMLAttributes<HTMLInputElement>,\n HTMLInputElement\n>) => {\n return (\n <label className={clsx('flex gap-3 dark:text-gray-100 cursor-pointer items-center')}>\n <input\n className=\"rounded-full border-2 border-gray-300 text-primary cursor-pointer w-[20px] h-[20px] sr-only shrink-0\"\n type=\"radio\"\n {...props}\n />\n <div\n className={clsx(\n 'rounded-full shrink-0 flex items-center justify-center w-[20px] h-[20px]',\n {\n 'border-2 border-[#1DAB37]': props.checked,\n 'border-2 border-[#D0CAE9]': !props.checked,\n },\n )}\n >\n {props.checked && <div className=\"w-[10px] h-[10px] bg-primary rounded-full m-auto\"></div>}\n </div>\n <div>\n <div className=\"text-sm font-normal first-letter:uppercase\">{label}</div>\n </div>\n </label>\n );\n};\n","import clsx from 'clsx';\nimport { ErrorMessage } from '@components';\nimport { useFormContext, UseFormRegisterReturn } from 'react-hook-form';\nimport { useIntl } from 'react-intl';\nimport { Fragment } from 'react';\nimport { Listbox, Transition } from '@headlessui/react';\nimport { Label } from '../label';\n\ninterface InputSelectProps {\n showRequired?: boolean;\n name: string;\n options: { value: string | boolean | number; label: string }[];\n validations?: any;\n label?: string;\n showLabel?: boolean;\n className?: string;\n placeholder?: string;\n onChange?: ({ value, name }) => void;\n shouldRegister?: boolean;\n disabled?: boolean;\n value?: string;\n alternate?: boolean;\n}\n\nexport const Select = ({\n showRequired = false,\n name,\n options,\n validations,\n label: customLabel,\n showLabel = true,\n className,\n placeholder = 'Select...',\n onChange,\n shouldRegister = true,\n value,\n disabled,\n alternate,\n}: InputSelectProps) => {\n const {\n register,\n watch,\n formState: { errors, isSubmitted },\n } = useFormContext();\n\n const selected: string = shouldRegister ? watch(name) : value;\n const intl = useIntl();\n\n const formatValidations = { ...validations };\n\n const label = customLabel || intl.formatMessage({ id: `page.account.${name}` });\n\n if (!validations?.pattern?.value) {\n formatValidations.pattern = {\n value: validations?.pattern,\n message: `This ${label.replace('*', '').toLowerCase()} is invalid, please try again.`,\n };\n }\n\n const requiredMessage = `${label.replace('*', '').toLowerCase()} is required.`;\n\n if (validations?.required || showRequired) {\n formatValidations.required = requiredMessage;\n }\n\n const errorInvalid = errors && errors[name]?.message && isSubmitted;\n const inputRegister = shouldRegister ? register(name, formatValidations) : false;\n return (\n <div className={className}>\n {showLabel && (\n <Label\n className={clsx('mb-3', {\n '!text-gray-500': disabled,\n })}\n name={name}\n >\n {label}\n </Label>\n )}\n <div>\n <Listbox\n {...inputRegister}\n value={selected}\n disabled={disabled}\n onChange={(value) => {\n if (shouldRegister) {\n (inputRegister as UseFormRegisterReturn<string>).onChange({\n target: { value, name },\n });\n }\n if (onChange) {\n onChange({ value, name });\n }\n }}\n >\n <div\n className={clsx('relative', {\n 'mt-1': !alternate,\n })}\n >\n <Listbox.Button\n className={clsx(\n 'relative py-2 pr-10 text-left !bg-gray-50 dark:bg-transparent cursor-default focus:outline-none focus-visible:border-indigo-500 focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-orange-300 sm:text-sm border border-gray-200 dark:border-black-dark w-full px-3 rounded bg-transparent text-sm min-h-[48px]',\n {\n 'border-[#635E7D]': alternate,\n 'border-error-500': errorInvalid,\n '!bg-white': disabled,\n },\n )}\n >\n {selected ? (\n <span className=\"block truncate\">\n {options.find((option) => option.value == selected)?.label}\n </span>\n ) : (\n <span\n className={clsx('block text-gray-400 truncate', {\n 'text-[#635E7D]': alternate,\n })}\n >\n {placeholder}\n </span>\n )}\n <span className=\"absolute inset-y-0 right-0 flex items-center pr-[12px] pointer-events-none\">\n {alternate ? (\n <svg viewBox=\"0 0 20 20\">\n <path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\" />\n </svg>\n ) : (\n <svg viewBox=\"0 0 20 20\">\n <path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\" />\n </svg>\n )}\n {/* {alternate ? (\n <ChevronUp\n width={20}\n className=\"keep-color ml-1.5 text-[#1C1A27] transition-transform rotate-[180deg]\"\n />\n ) : (\n <ChevronDownIcon className=\"text-gray-400 keep-color\" aria-hidden=\"true\" />\n )} */}\n </span>\n </Listbox.Button>\n <Transition\n as={Fragment}\n leave=\"transition ease-in duration-100\"\n leaveFrom=\"opacity-100\"\n leaveTo=\"opacity-0\"\n >\n <Listbox.Options className=\"absolute z-10 w-full py-0 mt-1 overflow-auto text-base bg-white border border-gray-200 rounded max-h-60 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm dark:border-black-dark dark:bg-black-background\">\n {options.map((item, i) => (\n <Listbox.Option\n key={i}\n className={({ active }) =>\n `relative cursor-default select-none !bg-gray-50 py-2 px-3 border-b border-gray-200 pr-4 min-h-[48px] z-10 last:border-b-0 items-center flex text-sm dark:bg-black-background dark:text-white dark:border-black-dark ${\n active\n ? 'bg-primary dark:bg-primary text-gray-500 dark:text-white-500'\n : 'text-gray-900 bg-white'\n }`\n }\n value={item.value}\n >\n {item.label}\n </Listbox.Option>\n ))}\n </Listbox.Options>\n </Transition>\n </div>\n </Listbox>\n {errorInvalid && (\n <ErrorMessage error={errors[name]?.message as string} className=\"text-xs\" />\n )}\n </div>\n </div>\n );\n};\n","import clsx from 'clsx';\nimport { ButtonHTMLAttributes } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\nimport { Select } from '../select';\n\nexport const amountOptions = [\n { value: 6, label: 'Immediately (3-6 months)' },\n { value: 12, label: 'Soon (6-12 months)' },\n { value: 24, label: 'Later (12-24 months)' },\n { value: 60, label: 'Future (24+ months)' },\n];\n\nexport const useAnotherAmount = create(\n persist<{\n isAnotherAmount?: boolean;\n setIsAnotherAmount: (isAnotherAmount: boolean) => void;\n otherAmountSelection: 'years' | 'months';\n setOtherAmountSelection: (otherAmountSelection: 'years' | 'months') => void;\n }>(\n (set) => ({\n isAnotherAmount: false,\n setIsAnotherAmount: (isAnotherAmount: boolean) => set({ isAnotherAmount }),\n setOtherAmountSelection: (otherAmountSelection: 'years' | 'months') =>\n set({ otherAmountSelection }),\n otherAmountSelection: 'months',\n }),\n { name: 'another-amount' },\n ),\n);\n\nconst TimePill = ({\n label,\n isActive,\n onClick,\n ...buttonProps\n}: {\n label: string;\n isActive: boolean;\n onClick: () => void;\n} & ButtonHTMLAttributes<HTMLButtonElement>) => {\n return (\n <button\n type=\"button\"\n className={clsx('font-medium rounded-full h-[32px] text-sm px-3', {\n 'bg-primary-500 text-white cursor-default': isActive,\n 'bg-gray-200 hover:bg-gray-300 text-gray-600': !isActive,\n })}\n {...buttonProps}\n onClick={() => {\n onClick();\n }}\n >\n {label}\n </button>\n );\n};\n\nexport const TimePills = ({\n showLabel = true,\n alternate,\n showRequired = true,\n}: {\n showLabel?: boolean;\n alternate?: boolean;\n showRequired?: boolean;\n}) => {\n // const methods = useFormContext();\n // const currentExpectedPurchaseMonthsPeriod = methods.watch('expectedPurchaseMonthsPeriod');\n // const { isAnotherAmount, setIsAnotherAmount, setOtherAmountSelection } = useAnotherAmount();\n return (\n <>\n {/* {amountOptions.map((option) => (\n <TimePill\n key={option.value}\n label={option.label}\n isActive={option.value === currentExpectedPurchaseMonthsPeriod && !isAnotherAmount}\n onClick={() => {\n // setIsAnotherAmount(false);\n // if (option.label.includes('month')) {\n // setOtherAmountSelection('months');\n // } else {\n // setOtherAmountSelection('years');\n // }\n methods.setValue('expectedPurchaseMonthsPeriod', option.value);\n }}\n />\n ))} */}\n {/* <TimePill\n label=\"Another amount\"\n isActive={isAnotherAmount}\n onClick={() => {\n setIsAnotherAmount(true);\n methods.setValue('expectedPurchaseMonthsPeriod', null);\n }}\n /> */}\n <Select\n name=\"purchaseTime\"\n options={amountOptions}\n showLabel={showLabel}\n alternate={alternate}\n label=\"When do you hope to purchase a home\"\n placeholder=\"Select\"\n showRequired={showRequired}\n />\n </>\n );\n};\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\n\nconst styles = {\n dropdown:\n 'absolute shadow-[0px_20px_25px_-5px_rgba(0,_0,_0,_0.1)] rounded-lg filter-[drop-shadow(0px_10px_10px_rgba(0,_0,_0,_0.04))] flex flex-col min-w-[160px] right-0 top-8 bg-[#fff] transition z-10',\n};\n\nexport const Dropdown = ({\n isOpen,\n children,\n className,\n}: {\n isOpen: boolean;\n children: ReactNode;\n className?: string;\n}) => {\n return (\n <div\n className={clsx(\n styles.dropdown,\n { 'visible opacity-100': isOpen },\n { 'invisible opacity-0': !isOpen },\n className,\n )}\n >\n {children}\n </div>\n );\n};\n","import classNames from 'classnames';\n\ninterface ErrorMessageProps {\n error?: string | undefined;\n className?: string;\n}\n\nexport const ErrorMessage = ({\n error = 'We encountered an error on our side. Please try again in a few minutes.',\n className,\n}: ErrorMessageProps) => {\n return error ? (\n <p\n className={classNames(\n 'text-red-500 pt-2 font-normal !text-xs first-letter:uppercase',\n className,\n )}\n >\n {error + (error[error.length - 1] === '.' ? '' : '.')}\n </p>\n ) : null;\n};\n","import { Loading } from '@components/loading';\nimport { FormHTMLAttributes, ReactNode } from 'react';\nimport { FormProvider } from 'react-hook-form';\n\nexport interface FormProps extends FormHTMLAttributes<HTMLFormElement> {\n methods: any;\n children: ReactNode;\n isLoading?: boolean;\n wrapperClassName?: string;\n}\n\nexport const Form = ({ children, methods, wrapperClassName, isLoading, ...props }: FormProps) => {\n return (\n <div className={wrapperClassName}>\n <FormProvider {...methods}>\n <form {...props}>\n <Loading isLoading={isLoading} />\n\n {children}\n </form>\n </FormProvider>\n </div>\n );\n};\n","import { useIsMounted } from '@hooks';\nimport { Toast } from '@utils';\nimport { Button } from '@components/button';\nimport { Loading } from '@components/loading';\nimport { useRouter } from 'next/router';\nimport { FC, useEffect, useState } from 'react';\nimport { PlaidLinkOptions, PlaidLinkOptionsWithLinkToken, usePlaidLink } from 'react-plaid-link';\nimport { useMutation } from 'react-query';\nimport { ApiService } from '@services/Api';\n\nexport const BuyerPlaidOauthPage: FC<PlaidLinkOptions> = () => {\n const [error, setError] = useState<boolean>(null);\n const [token, setToken] = useState<string>(null);\n const [redirectTo, setRedirectTo] = useState<string>(null);\n\n const isMounted = useIsMounted();\n const router = useRouter();\n\n useEffect(() => {\n if (isMounted) {\n const localStorageItem = localStorage.getItem('plaid_oauth_config');\n\n if (localStorageItem) {\n const { token, redirectTo } = JSON.parse(localStorageItem);\n setToken(token);\n setRedirectTo(redirectTo);\n } else {\n setError(true);\n }\n }\n }, [isMounted]);\n\n const exchangeTransactionsPublicTokenMutation = useMutation(\n async (body: { publicToken: string; institutionId: string }) => {\n const resp = await ApiService.exchangeBuyerTransactionsPublicToken(body);\n return resp.data;\n },\n {\n onSuccess: () => {\n Toast({\n text: 'Successfully connected with your bank! You are going to be redirected soon.',\n });\n if (typeof window !== 'undefined') {\n localStorage.removeItem('plaid_oauth_config');\n window.location.href = redirectTo;\n }\n },\n },\n );\n\n const onSuccess = (publicToken: string, metadata: any) => {\n exchangeTransactionsPublicTokenMutation.mutate({\n publicToken,\n institutionId: metadata.institution.institution_id,\n });\n };\n\n const onExit = (error: any, metadata: any) => {\n setError(true);\n };\n\n useEffect(() => {\n if (error) {\n Toast({\n text: 'Something went wrong. Please try again.',\n variant: 'error',\n duration: 5000,\n });\n }\n }, [error]);\n\n return (\n <div>\n {typeof window !== 'undefined' && token && (\n <Link\n token={token}\n receivedRedirectUri={window.location.href}\n onSuccess={onSuccess}\n onExit={onExit}\n onError={() => setError(true)}\n />\n )}\n {error && (\n <div\n style={{\n width: '100vw',\n height: '100vh',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n }}\n >\n <div>\n <p>Something went wrong. Please try again.</p>\n <Button onClick={() => router.push('/user/summary')}>Go back to app</Button>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nconst Link: FC<PlaidLinkOptionsWithLinkToken & { onError: () => void }> = ({\n onSuccess,\n onExit,\n onError,\n receivedRedirectUri,\n token,\n}) => {\n const { open, ready, error } = usePlaidLink({\n token,\n receivedRedirectUri,\n onSuccess,\n onExit,\n });\n\n useEffect(() => {\n if (ready && token && receivedRedirectUri) {\n open();\n }\n }, [ready, token, receivedRedirectUri, open]);\n\n useEffect(() => {\n if (error) {\n onError();\n }\n }, [error, onError]);\n\n return (\n <div>\n <Loading isLoading={!ready} />\n {error && <>An error has occurred</>}\n {/*{error && <pre>{JSON.stringify(error, null, 2)}</pre>}*/}\n </div>\n );\n};\n","import { ErrorMessage, Modal } from '@components';\nimport { AxiosRequestConfig } from 'axios';\nimport clsx from 'clsx';\nimport React, { useEffect, useRef, useState } from 'react';\nimport { formatPhoneNumberIntl } from 'react-phone-number-input';\nimport { useIntl } from 'react-intl';\nimport { E164Number } from 'libphonenumber-js';\n\nconst isArrayFull = (object: any[], length: number): boolean =>\n object.length === length && object.every((x) => x !== null && x !== undefined);\n\nexport interface CodeInputProps {\n /**\n * State of modal open.\n */\n open: boolean;\n\n /**\n * Callback function to be called when the modal is open and closed.\n */\n onClose: () => void;\n\n /**\n * Verify callback function.\n */\n verifyCode: (code: string) => void;\n\n /**\n * Phone number to be used.\n */\n phoneNumber?: string;\n\n /**\n * Callback function to resend code.\n */\n onCodeResent: () => void;\n\n error?: AxiosRequestConfig<any> | null | undefined;\n email?: string;\n}\n\nconst BACKSPACE_KEY = 'Backspace';\nconst LEFT_KEY = 'ArrowLeft';\nconst RIGHT_KEY = 'ArrowRight';\nconst CODE_LENGTH = 5;\n\ntype InputType = number | null;\n\nconst styles = {\n input:\n 'w-[45px] h-[45px] lg:w-[70px] lg:h-[70px] text-2xl p-0 text-center text-gray-900 font-semibold border border-gray rounded-lg hover:border-primary-500 focus:border-primary-500 focus:outline-none bg-transparent dark:border-black-dark dark:text-white',\n};\n\nexport const CodeInputModal = ({\n open = false,\n onClose,\n onCodeResent,\n verifyCode,\n phoneNumber,\n error,\n email,\n}: CodeInputProps) => {\n const intl = useIntl();\n\n const inputRefs = useRef<HTMLInputElement[]>([]);\n const [code, setCode] = useState<InputType[]>([]);\n const [duration, setDuration] = useState(0);\n const intervalId = useRef<NodeJS.Timer | null>(null);\n\n const changeInputFocus = (index: number) => {\n const ref = inputRefs.current[index];\n if (ref) {\n ref.focus();\n }\n };\n\n const updateCode = (value: number | null, index: number) => {\n const temp = [...code];\n temp[index] = value;\n setCode([...temp]);\n };\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>, index: number) => {\n const key = event.nativeEvent.code;\n\n switch (key) {\n case BACKSPACE_KEY:\n event.preventDefault();\n updateCode(null, index);\n changeInputFocus(index - 1);\n break;\n case RIGHT_KEY:\n changeInputFocus(index + 1);\n break;\n case LEFT_KEY:\n changeInputFocus(index - 1);\n break;\n\n default:\n return;\n }\n };\n\n const onChange = (e: React.ChangeEvent<HTMLInputElement>, index: number) => {\n if (e.target.value.length > 1) return;\n const value = Number(e.target.value);\n if (!isNaN(value)) {\n updateCode(value, index);\n if (index < CODE_LENGTH - 1) {\n changeInputFocus(index + 1);\n }\n }\n };\n\n const onPasteNumber = (e: React.ClipboardEvent) => {\n const pasteValue = e.clipboardData.getData('Text');\n if (pasteValue.length === CODE_LENGTH && !isNaN(Number(pasteValue))) {\n setCode([...pasteValue.split('').map((e: string) => Number(e))]);\n }\n };\n\n useEffect(() => {\n if (isArrayFull(code, CODE_LENGTH)) {\n const verificationCode = code.join('');\n verifyCode(verificationCode);\n }\n }, [code]); // eslint-disable-line\n\n const formattedPhoneNumber = formatPhoneNumberIntl(phoneNumber as E164Number);\n return (\n <Modal\n open={open}\n onClose={() => {\n onClose();\n setCode([]);\n }}\n title={intl.formatMessage({\n id: email ? 'cmpt.code-input.title-email' : 'cmpt.code-input.title',\n })}\n >\n <p className=\"mt-4 text-xs text-black lg:text-sm dark:text-black-gray \">\n {email ? (\n <>\n {intl.formatMessage({ id: 'cmpt.code-input.email' })} {email}\n </>\n ) : (\n <>\n {intl.formatMessage({ id: 'cmpt.code-input.phone-number' })}{' '}\n {formattedPhoneNumber?.slice(0, formattedPhoneNumber.length - 3)}\n -***\n </>\n )}\n </p>\n <div className=\"flex flex-wrap gap-3 mt-9 lg:gap-4\">\n {new Array(CODE_LENGTH).fill(0).map((_, i) => (\n <input\n className={clsx(styles.input)}\n key={i}\n type=\"text\"\n pattern=\"[0-9]*\"\n ref={(el) => {\n if (el) {\n inputRefs.current[i] = el;\n }\n }}\n onKeyDown={(e) => onKeyDown(e, i)}\n value={code[i] ?? ''}\n onChange={(e) => onChange(e, i)}\n onPaste={onPasteNumber}\n />\n ))}\n </div>\n <div className=\"flex mt-6 space-x-2\">\n {duration > 0 ? (\n <div className=\"flex items-center\">\n <span className=\"text-xs lg:text-sm\">\n <span className=\"font-medium\">Code resent.</span>{' '}\n <span>Wait {duration} seconds to try again.</span>\n </span>\n </div>\n ) : (\n <>\n <p className=\"text-xs text-black lg:text-sm dark:text-black-gray\">\n {intl.formatMessage({ id: 'cmpt.code-input.no-received' })}\n </p>\n <button\n type=\"button\"\n className=\"mr-4 text-xs cursor-pointer lg:text-sm text-primary\"\n onClick={() => {\n onCodeResent();\n setDuration(20);\n\n clearInterval(intervalId.current);\n intervalId.current = setInterval(() => {\n setDuration((d) => d - 1);\n }, 1000);\n }}\n >\n {intl.formatMessage({ id: 'cmpt.code-input.resend' })}\n </button>\n </>\n )}\n </div>\n {error?.data?.error === 'invalid_fields' && error?.data?.metadata?.fields[0] === 'code' ? (\n <ErrorMessage error=\"The code you have entered does not match our records.\" />\n ) : (\n error && <ErrorMessage error={error?.data?.message} />\n )}\n <style>\n {`\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n `}\n </style>\n </Modal>\n );\n};\n","import clsx from 'clsx';\nimport { forwardRef, cloneElement, ButtonHTMLAttributes } from 'react';\n\nconst styles = {\n base: 'inline-block rounded-full focus:outline-none focus-visible:ring focus-visible:ring-opacity-50 max-w-min',\n transition: 'transition duration-300 ease-in-out',\n color: {\n 'blue-ribbon':\n 'bg-blue-ribbon-500 text-white hover:bg-blue-ribbon-600 ring-blue-ribbon-200',\n 'spring-green':\n 'bg-spring-green-500 text-white hover:bg-spring-green-600 ring-spring-green-200',\n 'majorelle-blue':\n 'bg-majorelle-blue-500 text-white hover:bg-majorelle-blue-600 ring-majorelle-blue-200',\n 'cornflower-blue':\n 'bg-cornflower-blue-500 text-white hover:bg-cornflower-blue-600 ring-cornflower-blue-200',\n 'yellow-munsell':\n 'bg-yellow-munsell-500 text-white hover:bg-yellow-munsell-600 ring-yellow-munsell-200',\n 'elf-green':\n 'bg-elf-green-500 text-white hover:bg-elf-green-600 ring-elf-green-200',\n success: 'bg-success-500 text-white hover:bg-success-600 ring-success-200',\n warn: 'bg-warn-500 text-white hover:bg-warn-600 ring-warn-200',\n error: 'bg-error-500 text-white hover:bg-error-600 ring-error-200',\n black: 'bg-black-500 text-white hover:bg-black-600 ring-black-200',\n white:\n 'bg-neutral-ghost dark:bg-[#2d2d2d] dark:text-white text-black hover:bg-neutral-ghost-white ring-white-200',\n transparent:\n 'bg-tranparent text-black hover:bg-neutral-ghost-white/40 ring-transparent',\n },\n disabled: 'bg-black-disabled cursor-not-allowed',\n size: {\n xs: 'p-2',\n sm: 'p-3',\n },\n};\n\nexport interface IconButtonProps\n extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {\n /**\n * Defines the variant of the button\n */\n color?: string;\n /**\n * Defines the size of the button\n */\n size?: keyof typeof styles.size;\n /**\n * The icon that will be rendered, must use icons created through SvgIcon component\n */\n icon: any;\n}\n\nexport const IconButton = forwardRef<HTMLButtonElement, IconButtonProps>(\n function Button(\n {\n size = 'xs',\n type = 'button',\n color = 'blue-ribbon',\n disabled = false,\n className,\n icon,\n ...props\n },\n ref\n ): any {\n const classes = clsx(\n styles.base,\n styles.transition,\n styles.size[size],\n disabled ? styles.disabled : styles.color[color],\n className\n );\n\n return (\n <button\n ref={ref}\n type={type}\n disabled={disabled}\n className={classes}\n {...props}\n >\n {cloneElement(icon, {\n size,\n color: disabled ? undefined : icon.props.color,\n })}\n </button>\n );\n }\n);\n","import { Modal, Button, ErrorMessage, InputEmail, Form, InputPhone } from '@components';\nimport { useIntl } from 'react-intl';\nimport { E164Number, CountryCode } from 'libphonenumber-js';\nimport { getCompletePhone } from '@utils';\nimport { AxiosRequestConfig } from 'axios';\nimport { useForm } from 'react-hook-form';\nimport { useAuthUser } from '@hooks';\n\nexport interface SendCodeModalProps {\n open: boolean;\n onClose: () => void;\n onSubmit: (phone: E164Number | undefined | string) => void;\n error?: AxiosRequestConfig<any> | null | undefined;\n}\n\nexport const SendCodeModal = ({\n open,\n onClose,\n onSubmit: parentOnSubmit,\n error,\n}: SendCodeModalProps) => {\n const intl = useIntl();\n\n const { selectedAuth } = useAuthUser();\n\n const methods = useForm<{\n email?: string;\n phone?: string;\n countryCode?: CountryCode;\n }>({\n defaultValues: {\n countryCode: 'CA',\n },\n });\n const { watch, handleSubmit } = methods;\n const email = watch('email');\n const phone = watch('phone');\n const countryCode = watch('countryCode');\n\n const onSubmit = () => {\n if (selectedAuth === 'phone') {\n parentOnSubmit(getCompletePhone({ countryCode, phone }));\n } else {\n parentOnSubmit(email);\n }\n };\n\n return (\n <Modal\n open={open}\n wrapperClassName=\"flex min-h-[90%] items-center justify-center p-4 text-center\"\n panelClassName=\"w-full max-w-xl rounded-2xl !p-6 lg:!py-10 lg:!px-8 text-left\"\n onClose={() => {\n onClose();\n }}\n title={\n <div className=\"flex flex-wrap items-center justify-between gap-1\">\n <div className=\"text-sm lg:text-2xl\">\n {intl.formatMessage({ id: 'cmpt.phone-input.title' })}\n </div>{' '}\n </div>\n }\n >\n <Form methods={methods} onSubmit={handleSubmit(onSubmit)}>\n <p className=\"mt-3 mb-4 text-xs !leading-5 text-black lg:mt-3 lg:mb-4 lg:text-sm dark:text-black-gray\">\n {intl.formatMessage({\n id: selectedAuth === 'phone' ? 'cmpt.phone-input.narrator' : 'cmpt.email.narrator',\n })}\n </p>\n {selectedAuth === 'phone' && <InputPhone responseError={error} />}\n {selectedAuth === 'email' && <InputEmail responseError={error} />}\n <p className=\"mt-[10px] mb-4 text-[10px] lg:text-xs text-gray-900 dark:text-black-gray\">\n {intl.formatMessage({\n id:\n selectedAuth === 'email' ? 'cmpt.email.description' : 'cmpt.phone-input.description',\n })}{' '}\n <a\n href=\"/user/\"\n target=\"_blank\"\n className=\"text-[10px] lg:text-xs text-blue-ribbon-300\"\n rel=\"noreferrer\"\n >\n {intl.formatMessage({ id: 'general.privacy-policy' })}\n </a>\n </p>\n {error && <ErrorMessage className=\"mb-3\" error={error?.data?.message} />}\n <Button className=\"!h-auto py-2\" type=\"submit\">\n <p className=\"text-[10px] lg:text-lg\">\n {intl.formatMessage({ id: 'cmpt.phone-input.button' })}\n </p>\n </Button>\n </Form>\n </Modal>\n );\n};\n","import clsx from 'clsx';\nimport { forwardRef } from 'react';\n\nconst styles = {\n base: 'h-[1px] border-none block w-full bg-black-divider dark:bg-white-divider',\n};\n\nexport interface DividerProps extends React.HTMLAttributes<HTMLHRElement> {}\n\nexport const Divider = forwardRef<HTMLHRElement, DividerProps>(function Divider(\n { className, ...props },\n ref\n) {\n const classes = clsx(styles.base, className);\n\n return <hr className={classes} ref={ref} {...props} />;\n});\n","import { countryPhoneCodes, extractNumbers, validEmail, validName, validUserName } from '@utils';\nimport { AxiosRequestConfig } from 'axios';\nimport clsx from 'clsx';\nimport { ErrorMessage } from '@components/error-message';\nimport { getCountryCallingCode, isValidPhoneNumber } from 'libphonenumber-js';\nimport { useFormContext } from 'react-hook-form';\nimport { useIntl } from 'react-intl';\nimport en from 'react-phone-number-input/locale/en.json';\n// @ts-ignore\nimport PhoneInput from 'react-phone-input-2';\nimport { useMemo } from 'react';\n\nconst styles = {\n input_title: 'text-xs lg:text-sm text-black-russian mb-3 dark:text-white',\n input:\n 'h-[40px] lg:h-[46px] border border-gray dark:border-black-dark w-full px-2 rounded-[4px] bg-transparent text-sm',\n};\n\ninterface InputProps {\n name: string;\n validations: any;\n responseError: AxiosRequestConfig;\n}\n\nexport const Input = ({ name, validations, responseError }: InputProps) => {\n const intl = useIntl();\n const {\n formState: { errors, isSubmitted },\n register,\n } = useFormContext();\n\n const formatValidations = { ...validations };\n\n const label = intl.formatMessage({ id: `page.account.${name}` });\n\n if (!validations?.pattern?.value) {\n formatValidations.pattern = {\n value: validations?.pattern,\n message: `This ${label.toLowerCase()} is invalid, please try again.`,\n };\n }\n\n if (validations?.required) {\n formatValidations.required = `${label.toLowerCase()} is required.`;\n }\n\n return (\n <div className=\"flex flex-col\">\n <label htmlFor={name} className={clsx(styles.input_title)}>\n {label}\n </label>\n <input className={clsx(styles.input)} type=\"text\" {...register(name, formatValidations)} />\n {errors && errors[name]?.message && isSubmitted ? (\n <ErrorMessage error={errors[name]?.message as string} className=\"text-xs\" />\n ) : (\n responseError?.data?.error === 'fields_already_in_use' &&\n responseError?.data?.metadata?.fields?.includes(name.toLowerCase()) && (\n <ErrorMessage error={`This ${name} is already taken. Please try again.`} />\n )\n )}\n </div>\n );\n};\n\ntype CustomInput = Omit<InputProps, 'validations' | 'name'> & {\n name?: string;\n validations?: any;\n};\n\nexport const InputEmail = (props: CustomInput) => {\n return <Input name=\"email\" validations={{ required: true, pattern: validEmail }} {...props} />;\n};\n\nexport const InputName = (props: CustomInput) => {\n return (\n <Input\n name=\"name\"\n validations={{\n required: true,\n pattern: validName,\n }}\n {...props}\n />\n );\n};\n\nexport const InputUserName = (props: CustomInput) => {\n return (\n <Input\n name=\"userName\"\n validations={{\n required: true,\n pattern: {\n value: validUserName,\n message: 'Username can only contain alphanumeric characters (A-Z or 0-9).',\n },\n minLength: {\n value: 3,\n message: 'Username must contain at least 3 characters.',\n },\n }}\n {...props}\n />\n );\n};\n\ninterface InputPhoneProps {\n responseError?: AxiosRequestConfig;\n resetError?: () => void;\n showLabel?: boolean;\n}\n\nexport const InputPhone = ({ responseError, resetError, showLabel }: InputPhoneProps) => {\n const countryCodes = useMemo(() => countryPhoneCodes(), []);\n const intl = useIntl();\n const {\n setValue,\n watch,\n register,\n formState: { errors, isSubmitted },\n } = useFormContext();\n\n const phone = watch('phone');\n const countryCode = watch('countryCode');\n\n const registerPhone = register('phone', {\n required: 'Phone is required.',\n validate: (phone) => {\n const dialCode = getCountryCallingCode(countryCode);\n\n const purePhone = `+${dialCode}${extractNumbers(phone)}`;\n\n if (purePhone === `+${dialCode}`) {\n return 'Phone number is required.';\n } else if (!isValidPhoneNumber(purePhone)) {\n return 'Invalid phone number.';\n }\n\n if (resetError) {\n resetError();\n }\n },\n });\n return (\n <div>\n {showLabel && <p className={clsx(styles.input_title)}>Phone number</p>}\n <div className=\"grid w-full grid-cols-1 border divide-y rounded border-gray divide-gray dark:border-black-dark dark:divide-black-dark\">\n <div className=\"px-4 py-1 lg:py-2\">\n <label className=\"text-[10px] leading-5 text-gray-card flex -mb-1 lg:-mb-[2px]\">\n {intl.formatMessage({ id: 'cmpt.phone-input.country' })}\n </label>\n <select\n value={countryCode}\n {...register('countryCode', {\n onChange: () => {\n setValue('phone', '');\n },\n })}\n className=\"w-full text-[11px] lg:text-sm p-0 text-sm border-0 border-white border-none outline-none text-gray-900 focus:outline-none bg-transparent dark:text-white cursor-pointer\"\n >\n {countryCodes.map((country) => (\n <option value={country} key={country}>\n {en[country]} (+{getCountryCallingCode(country)})\n </option>\n ))}\n </select>\n </div>\n <div className=\"flex flex-col px-4 py-1 lg:py-2\">\n <label\n htmlFor=\"phone\"\n className=\"text-sm leading-5 text-gray-card !text-[10px] flex -mb-1 lg:mb-0\"\n >\n {intl.formatMessage({ id: 'cmpt.phone-input.number' })}\n </label>\n <div key={countryCode} className={clsx('text-gray-900 dark:text-white')}>\n <PhoneInput\n onlyCountries={[countryCode.toLowerCase()]}\n // @ts-ignore although the typings say this prop doesn't exists, it really does and is necessary to make this input work\n defaultCountry={countryCode.toLowerCase()}\n value={phone}\n {...registerPhone}\n onChange={(phone) => {\n registerPhone.onChange({\n target: { value: phone, name: 'phone' },\n });\n }}\n specialLabel=\"\"\n disableCountryCode\n disableCountryGuess\n jumpCursorToEnd={false}\n inputClass=\"w-full p-0 text-sm border-0 border-none outline-none focus:border-0 text-[11px] lg:text-sm bg-transparent\"\n placeholder=\"Enter a phone number\"\n />\n </div>\n </div>\n </div>\n\n {errors && errors.phone?.message && isSubmitted ? (\n <ErrorMessage error={errors.phone?.message as string} className=\"text-xs\" />\n ) : (\n responseError?.data?.error === 'fields_already_in_use' &&\n responseError?.data?.metadata.fields.includes('phone') && (\n <ErrorMessage\n error={\n responseError?.data?.error === 'fields_already_in_use' &&\n responseError?.data?.metadata.fields.includes('phone') &&\n 'This phone already exists, please try again.'\n }\n />\n )\n )}\n </div>\n );\n};\n","import { useAuthUser } from '@hooks';\nimport { useRouter } from 'next/router';\nimport { ReactNode } from 'react';\n\nconst protectedFromSignedIn = ['/account'];\n\ninterface RouteProtectorProps {\n children: ReactNode;\n}\n\nexport const RouteProtector = ({ children }: RouteProtectorProps) => {\n const router = useRouter();\n const { signedIn } = useAuthUser();\n\n if (signedIn && protectedFromSignedIn.includes(router.asPath)) {\n router.push('/');\n }\n\n return <>{children}</>;\n};\n","import { useIsMounted } from '@hooks';\nimport { ReactElement, ReactNode } from 'react';\n\nexport const Switch = ({\n test,\n children,\n}: {\n test: number;\n children: ReactElement<{ value: number | number[] }>[];\n}) => {\n const stepToRender = children?.find((child) => {\n const props = child.props.value;\n\n return Array.isArray(props)\n ? props.some((value) => value === test)\n : props === test;\n });\n\n if (!stepToRender) {\n throw new Error(\n `The component of step ${test} wasn't rendered successfully. Check if there's really a component rendering on this step.`\n );\n }\n\n const isMounted = useIsMounted();\n return isMounted ? stepToRender : null;\n};\n","import { ReactElement, ReactNode } from 'react';\n\ninterface CaseProps {\n children: ReactNode;\n value: number | number[];\n}\n\nexport const Case = ({ children }: CaseProps) => children as ReactElement;\n","import { ErrorMessage, Steps } from '@components';\nimport { AxiosRequestConfig } from 'axios';\nimport clsx from 'clsx';\nimport React, { Dispatch, SetStateAction, useRef } from 'react';\n// @ts-ignore\n\nconst BACKSPACE_KEY = 'Backspace';\nconst LEFT_KEY = 'ArrowLeft';\nconst RIGHT_KEY = 'ArrowRight';\nconst CODE_LENGTH = 5;\n\nexport interface CustomCodeInputProps {\n onCodeResent: () => void;\n error?: AxiosRequestConfig;\n sendCodeInfo?: boolean;\n disable?: boolean;\n phoneNumber?: string;\n email?: string;\n code?: number[];\n setCode: Dispatch<SetStateAction<number[]>>;\n}\n\nexport const CustomCodeInput = ({\n error,\n onCodeResent,\n disable,\n phoneNumber,\n email,\n sendCodeInfo,\n code,\n setCode,\n}: CustomCodeInputProps) => {\n const onChange = (e: React.ChangeEvent<HTMLInputElement>, index: number) => {\n if (e.target.value.length > 1) return;\n\n // Note: this is a specific fix\n // for android + chrome as apperantly android + chrome does not\n // fire the \"backspace\" event, which would handle this instead.\n // So we check if an empty string would be passed in and we can\n // assume that the user tried \"emptying\" that space\n if (e.target.value === '') {\n updateCode(null, index);\n changeInputFocus(index - 1);\n } else {\n const value = Number(e.target.value);\n if (!isNaN(value)) {\n updateCode(value, index);\n if (index < CODE_LENGTH - 1) {\n changeInputFocus(index + 1);\n }\n }\n }\n };\n\n const inputRefs = useRef<HTMLInputElement[]>([]);\n\n const changeInputFocus = (index: number) => {\n const ref = inputRefs.current[index];\n if (ref) {\n ref.focus();\n }\n };\n\n const updateCode = (value: number | null, index: number) => {\n const temp = [...code];\n temp[index] = value;\n setCode([...temp]);\n };\n\n const onKeyDown = (event: React.KeyboardEvent<HTMLInputElement>, index: number) => {\n const key = event.nativeEvent.code;\n\n switch (key) {\n case BACKSPACE_KEY:\n event.preventDefault();\n updateCode(null, index);\n changeInputFocus(index - 1);\n break;\n case RIGHT_KEY:\n changeInputFocus(index + 1);\n break;\n case LEFT_KEY:\n changeInputFocus(index - 1);\n break;\n\n default:\n return;\n }\n };\n\n const onPasteNumber = (e: React.ClipboardEvent) => {\n const pasteValue = e.clipboardData.getData('Text');\n if (pasteValue.length === CODE_LENGTH && !isNaN(Number(pasteValue))) {\n setCode([...pasteValue.split('').map((e: string) => Number(e))]);\n }\n };\n\n return (\n <div className=\"mb-4\">\n <div className=\" xs:pl-75 lg:pl-3 \">\n <section className=\"w-fit mx-auto flex gap-3 lg:gap-4 xs:gap-3\">\n {new Array(CODE_LENGTH).fill(0).map((_, i) => (\n <input\n className={clsx(\n 'text-xl p-0 text-center sm:w-16 md:w-16 h-16 text-gray-900 font-semibold border-0 outline outline-1 dark:outline-gray-800 rounded hover:!outline-2 dark:hover:outline-primary hover:outline-primary dark:focus:outline-primary focus:outline-primary bg-transparent dark:border-black-dark dark:text-white aspect-1 w-full dark:active:outline-primary active:outline-primary hover:outline-offset-2 border-transparent focus:border-transparent xs:w-[45px] focus:ring-0',\n {\n 'outline-red': error,\n 'outline-gray': !error,\n },\n )}\n key={i}\n disabled={disable}\n type=\"number\"\n pattern=\"[0-9]*\"\n ref={(el) => {\n if (el) {\n inputRefs.current[i] = el;\n }\n }}\n onKeyDown={(e) => onKeyDown(e, i)}\n value={code[i] ?? ''}\n onChange={(e) => onChange(e, i)}\n onPaste={onPasteNumber}\n />\n ))}\n </section>\n </div>\n\n {error && (\n <ErrorMessage\n className=\"w-[max-content] block\"\n error={\n error?.data?.statusCode === 400\n ? error?.data?.message || 'Invalid code'\n : error?.data?.statusCode === 500\n ? undefined\n : error?.data?.message\n }\n />\n )}\n {!disable && <Steps.ResendCodeButton onCodeResent={onCodeResent} />}\n <style>\n {`\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n `}\n </style>\n </div>\n );\n};\n","import { ReactNode, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport Link from 'next/link';\nimport { CustomCodeInput } from './custom-code-input';\nimport { BackButton, Button, ButtonContainer, ContinueButton } from '@components/button';\nimport { useTranslation } from 'react-i18next';\n\nconst Title = ({ children, className }: { children: ReactNode; className?: string }) => (\n <h1 className={clsx('text-2xl font-medium text-gray-900 dark:text-white font-slab', className)}>\n {children}\n </h1>\n);\n\nconst Paragraph = ({ children }: { children: ReactNode }) => {\n return (\n <div className=\"flex items-center gap-1 mt-2 mb-8\">\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">{children}</p>\n </div>\n );\n};\n\nconst CustomLink = ({ children, href }: { children: ReactNode; href: string }) => (\n <Link href={href} className=\"text-sm font-bold text-primary hover:underline\">\n {children}\n </Link>\n);\n\nconst ResendCode = ({ onCodeResent }: { onCodeResent: () => void }) => {\n const [duration, setDuration] = useState(0);\n const intervalId = useRef<NodeJS.Timer | null>(null);\n const { t } = useTranslation();\n\n return (\n <div className=\"flex mt-2.5 space-x-2 w-fit mx-auto\">\n {duration > 0 ? (\n <div className=\"flex items-center\">\n <span className=\"text-sm\">\n <span className=\"font-medium\">{t('Code resent.')}</span>{' '}\n <span>{t('Wait ')} { duration } {t(' seconds to try again.')}</span>\n </span>\n </div>\n ) : (\n <>\n <p\n style={{ fontFamily: 'PlusJakartaSans' }}\n className=\"text-sm text-gray-500 dark:text-gray-400 xs:text-xs\"\n >\n {t('Didn\\'t receive the code?')}\n </p>\n <button\n style={{ fontFamily: 'PlusJakartaSans' }}\n type=\"button\"\n className=\"xs:text-xs text-sm font-semibold text-primary hover:underline\"\n onClick={() => {\n onCodeResent();\n setDuration(20);\n\n clearInterval(intervalId.current);\n intervalId.current = setInterval(() => {\n setDuration((d) => d - 1);\n }, 1000);\n }}\n >\n {t('Click to resend')}\n </button>\n </>\n )}\n </div>\n );\n};\n\nexport const Steps = {\n Title,\n Link: CustomLink,\n Button,\n ResendCodeButton: ResendCode,\n CodeInput: CustomCodeInput,\n ButtonContainer,\n BackButton,\n ContinueButton,\n Paragraph,\n};\n","import HomeIcon from '@mui/icons-material/Home';\n\nexport const PartnerList = () => {\n return (\n <>\n <div className=\"hidden xs:block sm:block md:block lg:block xl:block\">\n <p className=\"font-semibold text-center\">Partners who support our mission</p>\n <div\n className=\"xs:mt-7 sm:mt-7 xs:max-h-[100px] sm:max-h-[10px] mx-auto r-10\"\n style={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n maxWidth: '100%',\n margin: '20px',\n }}\n >\n <svg\n className=\"keep-color md:mb-3 lg:mb-2.5\"\n style={{\n width: '67.55px',\n height: '70px',\n top: '40px',\n left: '10px',\n marginRight: '15px',\n }}\n width=\"68\"\n height=\"70\"\n viewBox=\"0 0 68 70\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect width=\"67.5507\" height=\"70\" fill=\"url(#pattern0)\" />\n <defs>\n <pattern id=\"pattern0\" patternContentUnits=\"objectBoundingBox\" width=\"1\" height=\"1\">\n <use transform=\"matrix(0.0046056 0 0 0.00444444 -0.0181295 0)\" />\n </pattern>\n <image id=\"image0_3608_1602\" width=\"225\" height=\"225\" />\n </defs>\n </svg>\n\n <svg\n className=\"keep-color\"\n style={{\n width: '54.04px',\n height: '56.71px',\n top: '47px',\n left: '102.29px',\n borderRadius: '11px',\n marginRight: '15px',\n }}\n width=\"55\"\n height=\"57\"\n viewBox=\"0 0 55 57\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"0.291016\" width=\"54.0405\" height=\"56.7114\" rx=\"11\" fill=\"url(#pattern0)\" />\n <defs>\n <pattern id=\"pattern0\" patternContentUnits=\"objectBoundingBox\" width=\"1\" height=\"1\">\n <use transform=\"translate(-0.392857) scale(0.00599233 0.00591716)\" />\n </pattern>\n <image id=\"image0_3608_1603\" width=\"298\" height=\"169\" />\n </defs>\n </svg>\n\n {/* <ESUSU\n className=\"keep-color\"\n style={{\n width: '144.75px',\n height: '76.85px',\n top: '40px',\n left: '191.07px',\n marginRight: '15px',\n }}\n /> */}\n <HomeIcon\n className=\"keep-color\"\n style={{\n width: '67.55px',\n height: '70px',\n top: '43px',\n left: '370.56px',\n marginRight: '15px',\n }}\n />\n\n <svg\n className=\"keep-color\"\n style={{\n width: '51.15px',\n height: '52px',\n top: '56px',\n left: '472.85px',\n }}\n width=\"52\"\n height=\"52\"\n viewBox=\"0 0 52 52\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <rect x=\"0.854492\" width=\"51.1455\" height=\"52\" fill=\"url(#pattern0)\" />\n <defs>\n <pattern id=\"pattern0\" patternContentUnits=\"objectBoundingBox\" width=\"1\" height=\"1\">\n <use transform=\"matrix(0.008521 0 0 0.00868486 -0.811321 -0.230769)\" />\n </pattern>\n <image id=\"image0_3608_1606\" width=\"310\" height=\"163\" />\n </defs>\n </svg>\n </div>\n </div>\n </>\n );\n};\n","import { Button, CustomInput, ErrorMessage, FormWrapper, Steps } from '@components';\nimport { useAuthUser, useBuyerSigninInfo } from '@hooks';\nimport { commonRoutes } from '@utils';\nimport { TermsModal, useOpenTermsModal } from '@components/modal/terms-modal';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport * as React from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useIntl } from 'react-intl';\nimport { useMutation } from 'react-query';\nimport { useMediaQuery } from 'react-responsive';\nimport { ApiService, Authentication, EAuthenticationType, EUserType } from '@services/Api';\nimport { BuyerSocialSignin } from '../social-logins';\nimport { BuyerSocialSigninV2 } from '@components/social-logins-v2';\nimport * as gtag from '@lib/gtag';\nimport { PartnerList } from '@components/partners-list';\nimport { useEffect } from 'react';\n\nexport const Step1 = () => {\n const { setBuyerInfo, step, email } = useBuyerSigninInfo();\n const { updateUserInfo, signedIn } = useAuthUser();\n const methods = useForm({ defaultValues: { email, password: '' } });\n const router = useRouter();\n const [submitErrorMsg, setSubmitErrorMsg] = React.useState<any>(false);\n const [visitorId, setVisitorId] = React.useState('');\n const referredBy = router.isReady && (router.query?.referredBy as string);\n\n const isDesktop = useMediaQuery({ minWidth: 992 });\n\n useEffect(() => {\n if (!router.isReady) return; // Wait for router to be ready\n\n console.log(\"🚀 Query Params:\", router.query);\n\n const { v_id } = router.query;\n setVisitorId(v_id as string);\n if (!v_id) {\n console.log(\"⌠No v_id, stopping.\");\n return;\n }\n\n }, [router.isReady, router.query])\n\n const startAuthenticationMutation = useMutation(\n async (values: Authentication) => {\n const resp = await ApiService.startAuthenticationByEmailAndPassword({\n email: values.email,\n password: values.password,\n userType: EUserType.buyer,\n type: EAuthenticationType.signin,\n referredBy,\n visitorId\n }).catch((error) => {\n setSubmitErrorMsg(true);\n if (error?.data?.error === 'user_not_found') {\n // setSubmitError('Email not found, please sign up');\n throw new Error('Your email or password is incorrect, please try again.');\n }\n if (error?.data?.error === 'email_or_password_invalid') {\n // setSubmitError('The email address or password you entered is invalid');\n throw new Error('The email address or password you entered is invalid');\n }\n throw (\n error?.data?.message ||\n 'We encountered an error on our side. Please try again in a few minutes.'\n );\n });\n\n return resp.data;\n },\n {\n onSuccess: (data) => {\n setBuyerInfo({ authenticationId: null });\n const remappedUserType = data.user.userType === 'buyer' ? 'buyer' : 'partner';\n\n // if not logged in previously send login event to ga\n if (!signedIn && data.accessToken)\n gtag.event({\n action: 'login',\n category: 'interaction',\n label: 'Login',\n value: {\n user_id: data.user.id,\n provider: 'email-password',\n },\n });\n\n updateUserInfo({\n ...data.user,\n userType: remappedUserType,\n accessToken: data.accessToken,\n signedIn: true,\n dataSynced: false,\n });\n },\n },\n );\n\n const { setOpenTermsModal } = useOpenTermsModal();\n\n const intl = useIntl();\n\n let submitError = startAuthenticationMutation.error as Error;\n\n return (\n (<FormWrapper\n onBackClick={() => {\n router.push(commonRoutes.buyer.getStarted);\n }}\n isLoading={startAuthenticationMutation.isLoading}\n onSubmit={methods.handleSubmit((values) => {\n startAuthenticationMutation.mutate(values as Authentication); // Authentication is type of values object data\n })}\n methods={methods}\n maxWidth={null}\n containerClassName=\"lg:px-0 mb-0 lg:-mt-[31px] xs:px-0\"\n >\n <div className=\"flex scale-90\t h-full bg-white p-5 lg:p-[50px] lg:min-w-[624px] xs:min-h-[500px] mx-auto r-10 \">\n <div className=\"flex flex-col w-full lg:justify-center\">\n <PartnerList />\n <Steps.Title className=\"lg:font-bolder lg:text-[32px] xs:mb-3 sm:mb-3 md:mb-3 lg:mb-2.5 text-center\">\n {intl.formatMessage({ id: 'page.account.welcomeback' })}\n </Steps.Title>\n <p className=\"text-[15px] text-center text-gray-500 dark:text-gray-400 xs:mb-5 sm:mb-3 md:mb-3 lg:mb-5\">\n {intl.formatMessage({ id: 'page.account.signinmessage' })}\n </p>\n\n <div className=\" lg:justify-center w-full mx-auto flex flex-col flex-grow\">\n <div className=\"w-full\">\n <CustomInput.Email\n showLabel={true}\n placeholder=\"your.email@example.com\"\n label={'Email Address'}\n />\n <div className=\"mt-4\">\n <CustomInput.Password\n showLabel={true}\n placeholder=\"Enter your password\"\n showIcon={true}\n />\n </div>\n {submitError && <ErrorMessage error={submitError?.message} />}\n </div>\n <div className=\"mt-auto xs:mt-7 sm:mt-7 md:mt-7 lg:mt-4\">\n <Steps.Button>{intl.formatMessage({ id: 'page.account.signin' })}</Steps.Button>\n <div className=\"flex flex-row text-center items-center gap-1 mt-6 justify-center lg:hidden\">\n <p className=\"xs:text-sm text-sm text-black-400 dark:text-black-400\">\n {intl.formatMessage({ id: 'getstarted.noAccount' })}\n </p>\n <Button\n variant=\"text-primary\"\n className=\"xs:text-sm\n text-sm font-bold text-primary hover:underline pl-2\"\n onClick={() => router.push(commonRoutes.buyer.signup)}\n type=\"button\"\n >\n {intl.formatMessage({ id: 'page.account.createanaccount' })}\n </Button>\n </div>\n </div>\n\n <div className=\"mb-2 lg:mb-2.5 mt-6 lg:mt-5 xs:mt-2 sm:mt-2 md:mt-2\">\n <div className=\"lg:flex items-center justify-center hidden\">\n <p className=\"text-sm text-black-500 dark:text-black-400\">\n {intl.formatMessage({ id: 'getstarted.noAccount' })}\n </p>\n <Button\n variant=\"text-primary\"\n className=\"text-sm font-bold text-primary hover:underline pl-2\"\n onClick={() => router.push(commonRoutes.buyer.signup)}\n type=\"button\"\n >\n {intl.formatMessage({ id: 'page.account.createanaccount' })}\n </Button>\n </div>\n </div>\n <div className=\" text-center text-sm font-bold text-primary\">\n <Link href=\"/user/reset-password\" legacyBehavior>\n {intl.formatMessage({ id: 'getstarted.forgotpassword' })}\n </Link>\n </div>\n <div className=\"mt-auto flex flex-row items-center\">\n <div className=\"lg:border-t lg:dark:border-t-black-dark w-full\"></div>\n {isDesktop && (\n //hide on mobile\n (<div className=\"px-5 text-md\">OR</div>)\n )}\n <div className=\"lg:border-t lg:dark:border-t-black-dark w-full\"></div>\n </div>\n {!isDesktop && <div className=\"w-[300px] border border-[#635E7D] my-5 mx-auto\"></div>}\n <div className=\"mt-auto lg-mt-2\">\n {/* <BuyerSocialSignin /> */}\n <BuyerSocialSigninV2 />\n </div>\n </div>\n </div>\n </div>\n <TermsModal />\n </FormWrapper>)\n );\n};\n","import { FormWrapper, Steps } from '@components';\nimport { useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useAuthUser, useBuyerSigninInfo } from '@hooks';\nimport { useMutation } from 'react-query';\nimport { ApiService, EUserType } from '@services/Api';\n\nexport const Step2 = () => {\n const { authenticationId, setBuyerInfo, step, email } = useBuyerSigninInfo();\n const { updateUserInfo } = useAuthUser();\n const methods = useForm();\n const [code, setCode] = useState([]);\n const strCode = code.join('');\n\n const signInMutation = useMutation(\n async () => {\n const resp = await ApiService.signIn({\n authenticationId,\n userType: EUserType.buyer,\n code: strCode,\n });\n return resp.data;\n },\n {\n onSuccess: (data) => {\n setBuyerInfo({ authenticationId: null });\n\n const remappedUserType = data.user.userType === 'buyer' ? 'buyer' : 'partner';\n updateUserInfo({\n ...data.user,\n userType: remappedUserType,\n accessToken: data.accessToken,\n signedIn: true,\n });\n },\n onError: () => {\n setCode([]);\n },\n },\n );\n\n const resendCodeMutation = useMutation(async () => {\n const resp = await ApiService.resendCode({ id: authenticationId, type: 'authentication' });\n return resp.data;\n });\n\n useEffect(() => {\n if (strCode.length >= 5) {\n signInMutation.mutate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [strCode]);\n\n return (\n <FormWrapper\n onBackClick={() => setBuyerInfo({ step: step - 1 })}\n isLoading={signInMutation.isLoading || resendCodeMutation.isLoading}\n maxWidth={450}\n methods={methods}\n containerClassName=\"lg:px-0 mb-0 lg:-mt-20\"\n >\n <div className=\"flex flex-col lg:my-auto\">\n <Steps.Title>We sent you a code!</Steps.Title>\n <div className=\"flex items-center gap-1 mt-2 mb-8\">\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">Check your email {email}</p>\n </div>\n <Steps.CodeInput\n code={code}\n setCode={setCode}\n onCodeResent={resendCodeMutation.mutate}\n email={email}\n error={signInMutation.error || resendCodeMutation.error}\n sendCodeInfo\n />\n <Steps.ButtonContainer>\n <Steps.BackButton onClick={() => setBuyerInfo({ step: step - 1 })} />\n </Steps.ButtonContainer>\n </div>\n </FormWrapper>\n );\n};\n","import { Case, SignLayout, Switch } from '@components';\nimport { useBuyerSigninInfo } from '@hooks';\nimport { commonRoutes } from '@utils';\nimport { IntroductionStep } from '@components/introduction/introduction-step';\nimport Image from \"next/image\";\nimport Link from 'next/link';\nimport { NextPageWithLayout } from 'pages/_app';\nimport { useRef } from 'react';\nimport { useMediaQuery } from 'react-responsive';\nimport Slider from 'react-slick';\nimport { Step1 } from './step1';\nimport { Step2 } from './step2';\n\nconst IntroductionDesktopSlider = () => {\n const slider = useRef<Slider | null>(null);\n\n return (\n <div className=\"w-full\">\n <Slider\n prevArrow={\n <div>\n <button\n type=\"button\"\n className=\"absolute border border-gray-300 w-[28px] h-[28px] rounded-full flex items-center justify-center hover:bg-gray-100\"\n >\n <svg className=\"keep-color\" width=\"8\" height=\"12\" viewBox=\"0 0 8 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.5 1L1.5 6L6.5 11\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n \n </button>\n </div>\n }\n nextArrow={\n <div>\n <button\n type=\"button\"\n className=\"absolute border border-gray-300 w-[28px] h-[28px] rounded-full flex items-center justify-center hover:bg-gray-100\"\n >\n <svg className=\"keep-color rotate-180 -mr-[1px]\" width=\"8\" height=\"12\" viewBox=\"0 0 8 12\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.5 1L1.5 6L6.5 11\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n \n </button>\n </div>\n }\n ref={slider}\n {...{ dots: true, infinite: false, speed: 500 }}\n >\n <IntroductionStep\n title={\n <>\n Avoid obstacles in the way of <br /> buying your home.\n </>\n }\n description={\n <>\n Specify the price range of the property you'd want to purchase, <br /> and\n we'll help you better understand credit, raise your score, and <br /> manage your\n finances.\n </>\n }\n image=\"/images/avoid-obstacles-desktop.png\"\n priority\n />\n <IntroductionStep\n title=\"Make your dreams come true, step by step.\"\n description=\"Our software will then provide you practical recommendations and financial literacy quizzes based on your Home Readiness Grade.\"\n image=\"/images/dreams-true.png\"\n />\n <IntroductionStep\n title=\"Get your loan approved with ease.\"\n description=\"Once you've finished our program and raised your grade, we'll help you get your loan pre-approved and pair you with a lender.\"\n image=\"/images/loan-approved.png\"\n />\n </Slider>\n </div>\n );\n};\n\nexport const BuyerSigninPage: NextPageWithLayout = () => {\n const { step: signinStep } = useBuyerSigninInfo();\n const isDesktop = useMediaQuery({ minWidth: 992 });\n\n return (\n (<SignLayout mainClassName=\"!pb-0\">\n <div className=\"flex h-full \">\n <div className=\"absolute inset-x-0 flex items-center justify-center text-center top-10\">\n <Link href={commonRoutes.buyer.getStarted} legacyBehavior>\n <a>\n <Image\n src=\"https://mhp-icons.s3.amazonaws.com/white-lockup.png\"\n alt=\"Logo\"\n width={130}\n height={80}\n style={{\n maxWidth: \"130px\",\n height: \"80px\",\n objectFit: \"contain\"\n }} />\n </a>\n </Link>\n </div>\n <div className=\"flex flex-col flex-grow w-full shrink-1\">\n <div className=\"flex items-center justify-center h-full xs:px-0\">\n <div className=\"flex flex-col h-3/4\">\n <Switch test={signinStep}>\n <Case value={1}>\n <Step1 />\n </Case>\n <Case value={2}>\n <Step2 />\n </Case>\n </Switch>\n </div>\n {/* <div className=\"items-center justify-center hidden w-1/2 h-full bg-gray-50 lg:flex flex-fill\">\n <IntroductionDesktopSlider />\n \n </div> */}\n </div>\n </div>\n </div>\n <style jsx global>{`\n /* Slider */\n .slick-slider {\n position: relative;\n\n display: block;\n box-sizing: border-box;\n\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n -webkit-touch-callout: none;\n -khtml-user-select: none;\n -ms-touch-action: pan-y;\n touch-action: pan-y;\n -webkit-tap-highlight-color: transparent;\n }\n\n .slick-slider.slick-initialized {\n height: 100%;\n }\n\n .slick-dots {\n display: flex !important;\n gap: 12px;\n margin: 0 auto;\n width: max-content;\n font-size: 0px;\n position: absolute !important;\n left: 50%;\n transform: translateX(-50%);\n bottom: -50px;\n }\n\n .slick-dots li {\n display: flex;\n }\n\n .slick-dots button {\n width: 8px;\n height: 8px;\n background: #d1d5db;\n border-radius: 999px;\n }\n\n .slick-dots li.slick-active button {\n background: #111928;\n }\n\n .slick-arrow.slick-next {\n position: absolute;\n bottom: -33px;\n right: 19vw;\n cursor: pointer;\n }\n\n .slick-arrow.slick-prev[currentslide='0'] {\n display: none !important;\n }\n\n .slick-arrow.slick-next[currentslide='2'] {\n display: none !important;\n }\n\n .slick-arrow.slick-prev {\n position: absolute;\n bottom: -33px;\n left: 17.5vw;\n z-index: 1;\n cursor: pointer;\n }\n\n .slick-list {\n position: relative;\n\n display: block;\n overflow: hidden;\n\n margin-top: -71px;\n padding: 0;\n }\n .slick-list:focus {\n outline: none;\n }\n .slick-list.dragging {\n cursor: pointer;\n cursor: hand;\n }\n\n .slick-slider .slick-track,\n .slick-slider .slick-list {\n -webkit-transform: translate3d(0, 0, 0);\n -moz-transform: translate3d(0, 0, 0);\n -ms-transform: translate3d(0, 0, 0);\n -o-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n }\n\n .slick-track {\n position: relative;\n top: 0;\n left: 0;\n\n display: block;\n margin-left: auto;\n margin-right: auto;\n }\n .slick-track:before,\n .slick-track:after {\n display: table;\n\n content: '';\n }\n .slick-track:after {\n clear: both;\n }\n .slick-loading .slick-track {\n visibility: hidden;\n }\n\n .slick-slide {\n display: none;\n float: left;\n\n height: 100%;\n min-height: 1px;\n }\n [dir='rtl'] .slick-slide {\n float: right;\n }\n .slick-slide img {\n display: block;\n }\n .slick-slide.slick-loading img {\n display: none;\n }\n .slick-slide.dragging img {\n pointer-events: none;\n }\n .slick-initialized .slick-slide {\n display: block;\n }\n .slick-loading .slick-slide {\n visibility: hidden;\n }\n .slick-vertical .slick-slide {\n display: block;\n\n height: auto;\n\n border: 1px solid transparent;\n }\n .slick-arrow.slick-hidden {\n display: none;\n }\n `}</style>\n </SignLayout>)\n );\n};\n","import { Button, CustomInput, ErrorMessage, ErrorState, FormWrapper, Steps } from '@components';\nimport { BuyerState, useBuyerSignupInfo } from '@hooks';\nimport { commonRoutes } from '@utils';\nimport { AxiosRequestConfig } from 'axios';\nimport { BuyerSocialSigninV2 } from '@components/social-logins-v2';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useIntl } from 'react-intl';\nimport { useMutation } from 'react-query';\nimport { useMediaQuery } from 'react-responsive';\nimport { ApiService, Authentication, EAuthenticationType, EUserType } from '@services/Api';\n\nexport const Step1 = ({\n onNextStep,\n skipToThirdStep,\n}: {\n onNextStep?: Function;\n skipToThirdStep?: Function;\n}) => {\n const { setBuyerInfo, email } = useBuyerSignupInfo();\n\n const router = useRouter();\n const query = router?.query;\n const partnerID = (query?.pc as string) || '';\n const lenderID = (query?.lc as string) || '';\n const associateId = (query?.associateId as string) || '';\n const buyerEmail = (query?.email as string) || '';\n\n const [associateIdError, setAssociateIdError] = useState(false);\n const isDesktop = useMediaQuery({ minWidth: 992 });\n\n useEffect(() => {\n if (partnerID || lenderID || associateId) {\n if (lenderID)\n setBuyerInfo({\n partnerCode: null,\n lenderCode: lenderID,\n associateId: associateId || null,\n });\n else if (partnerID)\n setBuyerInfo({\n partnerCode: partnerID,\n lenderCode: null,\n associateId: associateId || null,\n });\n else\n setBuyerInfo({\n partnerCode: null,\n lenderCode: null,\n associateId: associateId || null,\n });\n ApiService.signUpVerifyPartnerCode({\n partnerCode: partnerID,\n lenderCode: lenderID,\n associateId,\n })\n .then((data) => {\n const isPartnerCodeVerified = data?.data;\n if (associateId && !isPartnerCodeVerified.associateIdStatus) {\n setAssociateIdError(true);\n return;\n }\n if (\n isPartnerCodeVerified &&\n (isPartnerCodeVerified?.partnerCodeStatus || isPartnerCodeVerified.associateIdStatus)\n ) {\n setBuyerInfo({\n partnerCode: partnerID,\n lenderCode: lenderID,\n accessCode: [{ partnerCode: partnerID, lenderCode: lenderID, associateId }],\n partnerCodeStatus: isPartnerCodeVerified?.partnerCodeStatus,\n associateIdStatus: isPartnerCodeVerified.associateIdStatus,\n });\n } else {\n setBuyerInfo({\n partnerCode: '',\n lenderCode: '',\n accessCode: [],\n partnerCodeStatus: isPartnerCodeVerified?.partnerCodeStatus,\n associateIdStatus: isPartnerCodeVerified.associateIdStatus,\n });\n }\n })\n .catch((error) => {\n if (error?.data?.error === 'user_already_exists') {\n throw new Error('Email already exists, please sign in');\n }\n throw (\n error?.data?.message ||\n 'We encountered an error on our side. Please try again in a few minutes.'\n );\n });\n }\n }, [partnerID, lenderID, setBuyerInfo, associateId, buyerEmail]);\n useEffect(() => {\n setBuyerInfo({\n email: buyerEmail,\n });\n }, [buyerEmail, setBuyerInfo]);\n\n const methods = useForm<Pick<BuyerState, 'email'>>({\n defaultValues: { email },\n });\n const referredBy = router.isReady && (router.query?.referredBy as string);\n\n const startAuthenticationByEmail = useMutation<\n { authenticationId: string; type: 'signin' | 'signup'; email: string },\n AxiosRequestConfig,\n { email: string }\n >(\n async ({ email }: { email: string }) => {\n const resp = await ApiService.startAuthenticationByEmail({\n email,\n userType: EUserType.buyer,\n type: EAuthenticationType.signup,\n referredBy,\n }).catch((error) => {\n if (error?.data?.error === 'user_already_exists') {\n throw new Error('Email already exists, please sign in');\n }\n throw (\n error?.data?.message ||\n 'We encountered an error on our side. Please try again in a few minutes.'\n );\n });\n\n return {\n email,\n ...resp.data,\n };\n },\n {\n onSuccess: (data) => {\n setBuyerInfo({\n email: data.email,\n authenticationId: data.authenticationId,\n });\n onNextStep && onNextStep();\n },\n },\n );\n\n const handleBackClick = () => {\n router.push(commonRoutes.buyer.getStarted);\n };\n const intl = useIntl();\n\n const submitErrorByEmail = startAuthenticationByEmail.error as Error;\n\n // if the associate link is wrong then the buyer is shown with this error state\n if (associateIdError) return <ErrorState type=\"wrong_associate_id\" />;\n return (\n (<FormWrapper\n onBackClick={handleBackClick}\n onSubmit={methods.handleSubmit((values) => {\n startAuthenticationByEmail.mutate(values as Authentication);\n })}\n methods={methods}\n isLoading={startAuthenticationByEmail.isLoading}\n // containerClassName=\"lg:px-0 mb-0 lg:-mt-[31px]\"\n >\n <div className=\"flex h-full bg-white p-5 \">\n <div className=\"flex flex-col w-full lg:justify-center xs:px-0\">\n <Steps.Title className=\"mb-2.5 text-center\">Create an Account</Steps.Title>\n <p className=\"text-[15px] text-center text-gray-500 dark:text-gray-400 xs:mb-5 sm:mb-3 md:mb-3 lg:mb-5\">\n {intl.formatMessage({ id: 'page.account.mobilesignin' })}\n </p>\n <CustomInput.Email\n showLabel={true}\n placeholder=\"your.email@example.com\"\n label=\"Email Address\"\n />\n\n {startAuthenticationByEmail.isError && methods.formState.errors?.email == null && (\n <ErrorMessage\n error={startAuthenticationByEmail.error?.data?.message || submitErrorByEmail.message}\n />\n )}\n {/* <Steps.ButtonContainer> */}\n {/* <Steps.BackButton\n className=\"hidden lg:flex\"\n onClick={() => {\n handleBackClick();\n }}\n />*/}\n\n <Steps.ContinueButton className=\" mt-7\" />\n <div className=\"mb-2 lg:mb-2.5 mt-6 lg:mt-5\">\n <div className=\"flex flex-row text-center items-center gap-1 mt-6 justify-center\">\n <p className=\"text-sm text-black-500 dark:text-black-400\">\n {intl.formatMessage({ id: 'getstarted.hasAccount' })}\n </p>\n <Button\n variant=\"text-primary\"\n className=\"xs:text-xs text-sm font-bold text-primary hover:underline pl-2\"\n onClick={() => router.push(commonRoutes.buyer.signin)}\n type=\"button\"\n >\n {intl.formatMessage({ id: 'page.account.signin' })}\n </Button>\n </div>\n </div>\n <div className=\" text-center text-sm font-bold text-primary\">\n <Link href=\"/user/reset-password\" legacyBehavior>\n {intl.formatMessage({ id: 'getstarted.forgotpassword' })}\n </Link>\n </div>\n {/* </Steps.ButtonContainer> */}\n <div className=\" mt-auto lg:pt-4 flex flex-row items-center\">\n <div className=\"lg:border-t lg:dark:border-t-black-dark w-full\"></div>\n {!isDesktop ? (\n <hr className=\"mt-2 w-[50%] items-center\" />\n ) : (\n //hide on mobile\n (<div className=\"px-5 text-md\">OR</div>)\n )}\n <div className=\"lg:border-t lg:dark:border-t-black-dark w-full\"></div>\n </div>\n <div className=\"mt-auto lg:pt-4 lg:mt-4\">\n {/* <BuyerSocialSignin skipToThirdStep={skipToThirdStep} /> */}\n <BuyerSocialSigninV2 skipToThirdStep={skipToThirdStep} />\n </div>\n </div>\n </div>\n </FormWrapper>)\n );\n};\n","import { useMutation } from 'react-query';\nimport { AxiosRequestConfig } from 'axios';\nimport { useForm } from 'react-hook-form';\nimport { Button, ErrorMessage, FormWrapper, Steps, CustomInput } from '@components';\nimport { useEffect, useState } from 'react';\nimport { useBuyerSignupInfo } from '@hooks';\nimport { ApiService, EUserType } from '@services/Api';\nimport { useIntl } from 'react-intl';\nimport { encryptText } from '@utils/encryptionDecryption';\nimport { useMediaQuery } from 'react-responsive';\nimport { useRouter } from 'next/router';\n\nexport const Step2 = ({ onNextStep }) => {\n const { setBuyerInfo, email, authenticationId } = useBuyerSignupInfo();\n const methods = useForm();\n const [pwdCharCheck, setPwdCharCheck] = useState<boolean>(false);\n const [pwdNumberCheck, setPwdNumberCheck] = useState<boolean>(false);\n const [pwdAlphaCheck, setPwdAlphaCheck] = useState<boolean>(false);\n const [pwdConfirmPwdCheck, setPwdConfirmPwdCheck] = useState<any>(null);\n const intl = useIntl();\n const [verifyCodeMessage, setVerifyCodeMessage] = useState('');\n const [isEmailVerified, setIsEmailVerified] = useState(false);\n const [code, setCode] = useState([]);\n const strCode = code.join('');\n const router = useRouter();\n const query = router?.query;\n\n const buyerFirstName = (query?.firstName as string) || '';\n const buyerLastName = (query?.lastName as string) || '';\n\n useEffect(() => {\n if (buyerFirstName) methods.setValue('firstName', buyerFirstName);\n if (buyerLastName) methods.setValue('lastName', buyerLastName);\n }, [buyerFirstName, buyerLastName, methods]);\n\n const isDesktop = useMediaQuery({ minWidth: 992 });\n\n const verifyCodeMutation = useMutation<\n ApiService.SignUpVerifyCodeResponse,\n AxiosRequestConfig,\n void\n >(\n async () => {\n const resp = await ApiService.signUpVerifyCode({\n authenticationId,\n userType: EUserType.buyer,\n code: strCode,\n });\n\n return resp.data;\n },\n {\n onSuccess: (result) => {\n setBuyerInfo({\n ...(result.partialSignupForm?.values ?? {}),\n isEmailVerified: true,\n password: '',\n });\n\n setVerifyCodeMessage('OTP verification successful.');\n setIsEmailVerified(true);\n },\n },\n );\n\n const resendCodeMutation = useMutation<void, AxiosRequestConfig, void>(async () => {\n verifyCodeMutation.reset();\n\n const resp = await ApiService.resendCode({\n id: authenticationId,\n type: 'authentication',\n emailCodeType: 'sign-up',\n });\n return resp.data;\n });\n\n useEffect(() => {\n if (strCode.length >= 5) {\n verifyCodeMutation.mutate();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [setBuyerInfo, strCode]);\n\n const PwdValidation = (value: any, confirmPwdCheck: any) => {\n setPwdCharCheck(value.charCheck);\n setPwdNumberCheck(value.numberCheck);\n setPwdAlphaCheck(value.alphaCheck);\n setPwdConfirmPwdCheck(confirmPwdCheck);\n };\n\n return (\n <FormWrapper\n isLoading={verifyCodeMutation.isLoading || resendCodeMutation.isLoading}\n onSubmit={methods.handleSubmit((values: any, rest) => {\n // setBuyerInfo({\n // email,\n // authenticationId,\n // password: values.password,\n // userType: 'buyer',\n // step: step + 1,\n // });\n let emailSplit = email.split('@')[0];\n if (emailSplit.length > 8) {\n emailSplit = emailSplit.slice(0, 8);\n }\n const encryptedPassword = encryptText(values.password, emailSplit);\n\n //return;\n onNextStep({\n password: encryptedPassword,\n firstName: values.firstName,\n lastName: values.lastName,\n });\n })}\n methods={methods}\n maxWidth={350}\n containerClassName=\"lg:px-0 mb-0 lg:mt-0 xs:px-0 xs:h-full xs:scale-80\"\n >\n <div className=\"max-w-[350px] lg:min-w-[624px] lg:justify-center mx-auto flex flex-col bg-white p-5 lg:p-[50px]\">\n <Steps.Title className=\"text-center\">Create Password</Steps.Title>\n\n <div className=\"flex flex-col items-center gap-1 mt-5 mb-2.5 mx-auto xs:mx-0\">\n <p className=\"text-sm text-gray-500 dark:text-gray-400 mb-5\">\n Complete this information to create your account\n </p>\n <p className=\"text-[15px] text-[#1C1A27] \">\n Please enter the verification code that was sent to {email}\n </p>\n </div>\n\n <div className=\"justify-center items-center\">\n <Steps.CodeInput\n code={code}\n setCode={setCode}\n onCodeResent={resendCodeMutation.mutate}\n email={email}\n sendCodeInfo\n disable={isEmailVerified}\n error={verifyCodeMutation.error}\n />\n </div>\n\n {verifyCodeMessage && (\n <div className=\"text-sm font-semibold text-primary\">{verifyCodeMessage}</div>\n )}\n <div className=\"grid gap-4 grid-cols-2 mt-2.5 xs:mt-7 xs:flex-row \">\n {/* <div className={!isDesktop ? \"flex-row mt-2.5 xs:mt-7 \" : \"flex gap-4 grid-cols-2 mt-2.5 xs:mt-7 xs:flex-row \"}> */}\n <CustomInput.Name disabled={!isEmailVerified} />\n <CustomInput.Name disabled={!isEmailVerified} name=\"lastName\" label=\"Last name\" />\n </div>\n <div\n className={`grid gap-4 grid-cols-2 relative mt-2.5 ${\n isEmailVerified ? 'enable-password-fields' : ''\n }`}\n >\n <CustomInput.Password\n name=\"password\"\n label=\"Password\"\n className={`${!isEmailVerified ? 'pointer-events-none' : ''}`}\n PwdValidation={PwdValidation}\n checkValidation={true}\n isError={pwdConfirmPwdCheck}\n />\n {pwdConfirmPwdCheck && (\n <ErrorMessage\n error={'Passwords do not match.' as string}\n className=\"text-xs absolute -bottom-6\"\n />\n )}\n <CustomInput.Password\n name=\"re-password\"\n className={`${!isEmailVerified ? 'pointer-events-none' : ''}`}\n label=\"Confirm password\"\n isError={pwdConfirmPwdCheck}\n />\n </div>\n\n <div className=\"mt-5\">\n <label className={`${!pwdConfirmPwdCheck ? `-mt-2` : `mt-2`} block text-xm`}>\n Password must contain:\n </label>\n <div className=\"flex flex-row items-center xs:mt-5 xs:mb-5\">\n <div className=\"flex\">\n {pwdCharCheck &&\n <svg height={16} className=\"text-primary mr-2\" viewBox=\"0 0 14 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.99992 0.833496C3.31992 0.833496 0.333252 3.82016 0.333252 7.50016C0.333252 11.1802 3.31992 14.1668 6.99992 14.1668C10.6799 14.1668 13.6666 11.1802 13.6666 7.50016C13.6666 3.82016 10.6799 0.833496 6.99992 0.833496ZM6.99992 12.8335C4.05992 12.8335 1.66659 10.4402 1.66659 7.50016C1.66659 4.56016 4.05992 2.16683 6.99992 2.16683C9.93992 2.16683 12.3333 4.56016 12.3333 7.50016C12.3333 10.4402 9.93992 12.8335 6.99992 12.8335ZM10.0599 4.5535L5.66659 8.94683L3.93992 7.22683L2.99992 8.16683L5.66659 10.8335L10.9999 5.50016L10.0599 4.5535Z\" fill=\"currentColor\" />\n </svg>\n }\n {!pwdCharCheck && (\n <svg height={16} className=\"text-error keep-color mr-2 mt-px\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.64366 12.3565L10.0012 9.99984M12.3578 7.64317L10.0012 9.99984M10.0012 9.99984L7.64366 7.64317M10.0012 9.99984L12.3578 12.3565M10.0003 18.3332C14.6028 18.3332 18.3337 14.6023 18.3337 9.99984C18.3337 5.39734 14.6028 1.6665 10.0003 1.6665C5.39783 1.6665 1.66699 5.39734 1.66699 9.99984C1.66699 14.6023 5.39783 18.3332 10.0003 18.3332Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n )}\n </div>\n <div className=\"flex text-xm\">Both upper and lowercase letters</div>\n </div>\n <div className=\"flex flex-row items-center xs:mb-5\">\n <div className=\"flex\">\n {pwdNumberCheck && \n <svg height={16} className=\"text-primary mr-2\" viewBox=\"0 0 14 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.99992 0.833496C3.31992 0.833496 0.333252 3.82016 0.333252 7.50016C0.333252 11.1802 3.31992 14.1668 6.99992 14.1668C10.6799 14.1668 13.6666 11.1802 13.6666 7.50016C13.6666 3.82016 10.6799 0.833496 6.99992 0.833496ZM6.99992 12.8335C4.05992 12.8335 1.66659 10.4402 1.66659 7.50016C1.66659 4.56016 4.05992 2.16683 6.99992 2.16683C9.93992 2.16683 12.3333 4.56016 12.3333 7.50016C12.3333 10.4402 9.93992 12.8335 6.99992 12.8335ZM10.0599 4.5535L5.66659 8.94683L3.93992 7.22683L2.99992 8.16683L5.66659 10.8335L10.9999 5.50016L10.0599 4.5535Z\" fill=\"currentColor\" />\n </svg>\n }\n {!pwdNumberCheck && (\n <svg height={16} className=\"text-error keep-color mr-2 mt-px\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.64366 12.3565L10.0012 9.99984M12.3578 7.64317L10.0012 9.99984M10.0012 9.99984L7.64366 7.64317M10.0012 9.99984L12.3578 12.3565M10.0003 18.3332C14.6028 18.3332 18.3337 14.6023 18.3337 9.99984C18.3337 5.39734 14.6028 1.6665 10.0003 1.6665C5.39783 1.6665 1.66699 5.39734 1.66699 9.99984C1.66699 14.6023 5.39783 18.3332 10.0003 18.3332Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n )}\n </div>\n <div className=\"flex text-xm\">At least 1 number</div>\n </div>\n <div className=\"flex flex-row items-center xs:mb-5\">\n <div className=\"flex\">\n {pwdAlphaCheck &&\n <svg height={16} className=\"text-primary mr-2\" viewBox=\"0 0 14 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M6.99992 0.833496C3.31992 0.833496 0.333252 3.82016 0.333252 7.50016C0.333252 11.1802 3.31992 14.1668 6.99992 14.1668C10.6799 14.1668 13.6666 11.1802 13.6666 7.50016C13.6666 3.82016 10.6799 0.833496 6.99992 0.833496ZM6.99992 12.8335C4.05992 12.8335 1.66659 10.4402 1.66659 7.50016C1.66659 4.56016 4.05992 2.16683 6.99992 2.16683C9.93992 2.16683 12.3333 4.56016 12.3333 7.50016C12.3333 10.4402 9.93992 12.8335 6.99992 12.8335ZM10.0599 4.5535L5.66659 8.94683L3.93992 7.22683L2.99992 8.16683L5.66659 10.8335L10.9999 5.50016L10.0599 4.5535Z\" fill=\"currentColor\" />\n </svg>\n }\n {!pwdAlphaCheck && (\n <svg height={16} className=\"text-error keep-color mr-2 mt-px\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M7.64366 12.3565L10.0012 9.99984M12.3578 7.64317L10.0012 9.99984M10.0012 9.99984L7.64366 7.64317M10.0012 9.99984L12.3578 12.3565M10.0003 18.3332C14.6028 18.3332 18.3337 14.6023 18.3337 9.99984C18.3337 5.39734 14.6028 1.6665 10.0003 1.6665C5.39783 1.6665 1.66699 5.39734 1.66699 9.99984C1.66699 14.6023 5.39783 18.3332 10.0003 18.3332Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n )}\n </div>\n <div className=\"flex text-xm\">8 - 24 characters</div>\n </div>\n </div>\n\n <div className=\"mt-auto lg:mt-[30px]\">\n <Steps.Button className=\"w-full\">\n {intl.formatMessage({ id: 'page.account.createyouraccount' })}\n </Steps.Button>\n {/* <div className='w-[200px] border border-[#635E7D] my-5 mx-auto'></div>\n <Button\n variant=\"text-primary\"\n className=\"text-sm font-normal text-[#1C1A27] hover:underline text-center mx-auto\"\n onClick={() => setBuyerInfo({ step: step - 1 })}\n type=\"button\"\n >\n {intl.formatMessage({ id: 'Back to Sign in' })}\n </Button> */}\n </div>\n </div>\n </FormWrapper>\n );\n};\n","import { commonRoutes } from '@utils';\n\nimport { Button, Steps } from '@components';\nimport { useBuyerSignupInfo, useIsMounted } from '@hooks';\nimport { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport { useMediaQuery } from 'react-responsive';\nimport { create } from 'zustand';\n\nexport const useOpenTermsModal = create<{\n openTermsModal: boolean;\n setOpenTermsModal: (openTermsModal: boolean) => void;\n}>((set) => ({\n openTermsModal: false,\n setOpenTermsModal: (openTermsModal) => set({ openTermsModal }),\n}));\n\nexport const Step3 = ({ onFinish }) => {\n const { setBuyerInfo, step, ...rest } = useBuyerSignupInfo();\n const [bottom, setBottom] = useState(true);\n\n const intl = useIntl();\n const router = useRouter();\n const query = router.isReady && router.query;\n const isDesktop = useMediaQuery({ minWidth: 992 });\n const isMounted = useIsMounted();\n\n useEffect(() => {\n const timer1 = setTimeout(() => setBottom(false), 3000);\n return () => {\n clearTimeout(timer1);\n };\n }, []);\n return (\n isMounted && (\n <div className=\"flex flex-col flex-grow bg-primary mt-11\">\n <div className=\"\">\n <div className=\"lg:max-w-[624px] lg:justify-center mx-auto flex flex-col p-5 lg:p-[50px] bg-white rounded\">\n <div className=\"flex flex-col w-full lg:justify-center\">\n <Steps.Title className=\"mb-2.5 text-center text-[#1C1A27]\">\n Agree To Our Terms\n </Steps.Title>\n <p className=\"text-[15px] text-[#635E7D] text-center dark:text-gray-400 mb-5 lg:mb-[1.875rem]\">\n {intl.formatMessage({ id: 'terms.shortdesc' })}\n </p>\n </div>\n\n <div className='relative after:content-[\"\"] border border-[#9F98BE] p-5 rounded'>\n <div className=\"text-xs text-[#9F98BE] flex flex-col gap-5 overflow-auto max-h-[285px] pb-6\">\n <p>{intl.formatMessage({ id: 'terms.last-updated' })}</p>\n <p>{intl.formatMessage({ id: 'terms.pre-intro' })}</p>\n <p>{intl.formatMessage({ id: 'terms.intro-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.intro-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.statement-of-courage-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.statement-of-courage' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Information-Collection-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.registeration-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.registeration' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Account-Deletion-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Account-Deletion' })}</p>\n <p>{intl.formatMessage({ id: 'terms.updating-your-personal-info-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.updating-your-personal-info' })}</p>\n <p>{intl.formatMessage({ id: 'terms.transactions-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.transactions' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Site-Access-Activity-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Site-Access-Activity' })}</p>\n <p>{intl.formatMessage({ id: 'terms.public-content-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.public-content' })}</p>\n <p>{intl.formatMessage({ id: 'terms.location-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.location' })}</p>\n <p>{intl.formatMessage({ id: 'terms.messages-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.messages' })}</p>\n <p>{intl.formatMessage({ id: 'terms.mobile-application-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.mobile-application' })}</p>\n <p>{intl.formatMessage({ id: 'terms.other-sites-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.other-sites' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-by-third-parties-about-you-h' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-by-third-parties-about-you' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-to-third-parties-about-you-h' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-to-third-parties-about-you' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-two' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-three' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.customer-service-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.customer-service' })}</p>\n <p>{intl.formatMessage({ id: 'terms.children-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.children' })}</p>\n <p>{intl.formatMessage({ id: 'terms.data-protection-and-security-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.data-protection-and-security' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information' })}</p>\n <ul className=\"pl-4 list-disc\">\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-one' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-two' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-three' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-four' })}\n </li>\n </ul>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-five' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-six' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-seven' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-eight' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-nine' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-ten' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-eleven' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-twelve' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-thirteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-fourteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-fifteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-sixteen' })}\n </p>\n <p>\n {intl.formatMessage({\n id: 'terms.Disclosure-sharing-of-information-seventeen',\n })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.Safeguarding-Communications-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Safeguarding-Communications' })}</p>\n <p>{intl.formatMessage({ id: 'terms.cookies-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.cookies' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-three' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-four' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-five' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-six' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-seven' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Data-Rentetion-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Data-Rentetion' })}</p>\n <p>{intl.formatMessage({ id: 'terms.changes-to-this-privacy-policy-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.changes-to-this-privacy-policy' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Questions-Suggestions-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Questions-Suggestions' })}</p>\n <ul>\n <li>{intl.formatMessage({ id: 'terms.about-to' })}</li>\n <li>{intl.formatMessage({ id: 'terms.about-to-one' })}</li>\n <li>{intl.formatMessage({ id: 'terms.about-to-two' })}</li>\n </ul>\n </div>\n </div>\n <div className=\"flex flex-row justify-between gap-4 mt-[3.123rem]\">\n <Button\n className=\"w-full\"\n variant=\"white\"\n onClick={() => {\n setBuyerInfo({\n authenticationId: null,\n email: '',\n isEmailVerified: false,\n password: '',\n step: 1,\n });\n router.push(commonRoutes.buyer.getStarted);\n }}\n >\n {intl.formatMessage({ id: 'getstarted.back' })}\n </Button>\n <Button\n className=\"w-full\"\n variant={'primary'}\n onClick={async () => {\n setBuyerInfo({ agreedToTerms: true, step: step });\n onFinish({ ...rest });\n }}\n disabled={bottom}\n >\n {intl.formatMessage({ id: 'getstarted.agreeTerms' })}\n </Button>\n </div>\n </div>\n </div>\n </div>\n )\n );\n};\n","import { Loading } from '@components';\nimport { BuyerFormFields, useBuyerSignupInfo } from '@hooks';\nimport { commonRoutes, extractNumbers, localStorageDataRef } from '@utils';\nimport { AxiosRequestConfig } from 'axios';\nimport dayjs from 'dayjs';\nimport Image from \"next/image\";\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport { FC, useCallback, useState } from 'react';\nimport { toast } from 'react-hot-toast';\nimport { useMutation } from 'react-query';\nimport { ApiService, EUserType } from '@services/Api';\nimport { Step1 } from './step1';\nimport { Step2 } from './step2';\nimport { Step3 } from './step3';\n\ninterface Props {\n onSubmit: (values: ApiService.SignUpBuyerBody) => void;\n}\n\nexport interface BuyerStepProps {\n onNextStep?: (values: Partial<BuyerFormFields>) => void;\n onSubmit?: (values: Partial<BuyerFormFields>) => void;\n onBeforeSubmit?: (values: Partial<BuyerFormFields>) => void;\n}\n\nexport const BuyerSignupForm: FC<Props> = ({ onSubmit }) => {\n const { authenticationId, email, setBuyerInfo, reset, ...rest } = useBuyerSignupInfo();\n const [currStep, setCurrStep] = useState(1);\n\n const router = useRouter();\n const handleSubmit = useCallback(\n (values: BuyerFormFields) => {\n let partnerCode = null;\n if (values.accessCode && values.accessCode.length > 0) {\n partnerCode = values?.partnerCode;\n }\n const valuesToSubmit: ApiService.SignUpBuyerBody = {\n authenticationId: values.authenticationId,\n firstName: values.firstName || 'New',\n lastName: values.lastName || 'User',\n email: values.email,\n password: values.password,\n accessCode: values.partnerCode ?? undefined,\n partnerCode: values.partnerCode ?? undefined,\n lenderCode: values.lenderCode ?? undefined,\n associateId: values.associateIdStatus ? values.associateId : undefined,\n housePriceGoal: 0,\n expectedPurchaseMonthsPeriod: 0,\n phone: Number(extractNumbers(values.phone)) > 1 ? values.phone : null,\n wishedLocations: [],\n // acceptPhoneConsent: values.acceptPhoneConsent,\n // declinePhoneConsent: values.declinePhoneConsent,\n provider: values.provider,\n inviteId: localStorage.getItem(localStorageDataRef.acceptInvite),\n } as any;\n\n onSubmit(valuesToSubmit);\n },\n [onSubmit],\n );\n\n const onNextStepMutation = useMutation<\n Partial<BuyerFormFields>,\n AxiosRequestConfig,\n Partial<BuyerFormFields>\n >(\n async ({ ...values }: Partial<BuyerFormFields>) => {\n let partnerCodeStatus: boolean = rest?.partnerCodeStatus;\n let associateIdStatus: boolean = rest?.associateIdStatus;\n // TODO: clean this up\n if (partnerCodeStatus) {\n await ApiService.savePartialSignUpForm({\n authenticationId,\n email,\n userType: EUserType.buyer,\n partialSignupForm: {\n values: {\n ...rest,\n ...values,\n partnerCodeStatus: partnerCodeStatus,\n associateIdStatus: associateIdStatus,\n email,\n } as any,\n },\n });\n } else if (associateIdStatus) {\n await ApiService.savePartialSignUpForm({\n authenticationId,\n email,\n userType: EUserType.buyer,\n partialSignupForm: {\n values: {\n ...rest,\n ...values,\n partnerCodeStatus: partnerCodeStatus,\n associateIdStatus: associateIdStatus,\n email,\n } as any,\n },\n });\n } else {\n await ApiService.savePartialSignUpForm({\n authenticationId,\n email,\n userType: EUserType.buyer,\n partialSignupForm: {\n values: {\n ...rest,\n ...values,\n partnerCodeStatus: partnerCodeStatus,\n associateIdStatus: associateIdStatus,\n email,\n } as any,\n },\n });\n }\n\n return { ...values, partnerCodeStatus, associateIdStatus };\n },\n {\n onSuccess: (values) => {\n const inviteId = localStorage.getItem(localStorageDataRef.acceptInvite);\n const inviteDate = localStorage.getItem(localStorageDataRef.acceptInviteDate);\n let inviteValid = false;\n if (inviteId && inviteDate) {\n const diff = dayjs(Date.now()).diff(new Date(inviteDate), 'days');\n if (diff > 2) inviteValid = false;\n else inviteValid = true;\n }\n if (values?.partnerCodeStatus || values?.associateIdStatus || inviteValid) {\n setBuyerInfo(values);\n setCurrStep((prevStep) => prevStep + 1);\n } else {\n reset();\n router.push({\n pathname: commonRoutes.buyer.getStarted,\n query: { partnerCodeStatus: false },\n });\n }\n },\n onError: (error: AxiosRequestConfig) => {\n console.error(error);\n if (error.data?.error === 'phone_number_already_exists') {\n toast.error('Phone number already in use, please try using a different one');\n return;\n }\n\n if (error.data?.error === 'email_already_exists') {\n toast.error('Email already in use, please try using a different one');\n return;\n }\n\n toast.error(`${error.data.message} - Try starting over`);\n },\n },\n );\n\n const toThirdStep = useCallback(\n (values) => {\n onNextStepMutation.mutate(values);\n },\n [onNextStepMutation],\n );\n\n return (\n (<div className=\"flex h-full bg-center bg-no-repeat bg-cover\">\n <Loading isLoading={onNextStepMutation.isLoading} />\n <div className=\"absolute inset-x-0 flex items-center justify-center text-center top-10\">\n <Link href={commonRoutes.buyer.getStarted}>\n\n <Image\n src=\"https://mhp-icons.s3.amazonaws.com/white-lockup.png\"\n alt=\"Logo\"\n width={130}\n height={80}\n style={{\n maxWidth: \"130px\",\n height: \"80px\",\n objectFit: \"contain\"\n }} />\n\n </Link>\n </div>\n <div className=\"flex flex-col flex-grow w-full shrink-1\">\n <div className=\"flex items-center justify-center xs:px-0\">\n <div className=\"flex flex-col h-3/4\">\n <Step\n step={currStep}\n toSecondStep={() => setCurrStep((prevStep) => prevStep + 1)}\n skipToThirdStep={() => setCurrStep(3)}\n toThirdStep={toThirdStep}\n onSubmit={handleSubmit}\n />\n </div>\n </div>\n </div>\n </div>)\n );\n};\n\nconst Step: FC<\n {\n step: number;\n toSecondStep: Function;\n toThirdStep: (values: Partial<BuyerFormFields>) => void;\n skipToThirdStep: Function;\n } & BuyerStepProps\n> = ({ step, toSecondStep, toThirdStep, skipToThirdStep, onSubmit }) => {\n switch (step) {\n case 1:\n return <Step1 onNextStep={toSecondStep} skipToThirdStep={skipToThirdStep} />;\n case 2:\n return <Step2 onNextStep={toThirdStep} />;\n case 3:\n return <Step3 onFinish={onSubmit} />;\n // case 4:\n // return <Step4 onNextStep={onNextStep} />;\n // case 5:\n // return <Step5 onNextStep={onNextStep} />;\n // case 6:\n // return <Step6 onNextStep={onNextStep} />;\n // case 7:\n // return <Step7 onFinish={onSubmit} />;\n\n default:\n return <>No step found</>;\n }\n};\n","import clsx from 'clsx';\nimport { useState } from 'react';\nimport { useFormContext } from 'react-hook-form';\nimport { ListItemRecord } from '@services/Api';\n\ninterface SuggestedSkillsProps {\n suggestedSkills: ListItemRecord[];\n fieldName?: string;\n}\n\nexport const SuggestedSkills = ({\n suggestedSkills,\n fieldName = 'skills',\n}: SuggestedSkillsProps) => {\n const [isSuggestedSkillsOpen, setIsSuggestedSkillsOpen] = useState(true);\n const methods = useFormContext();\n const selectedSkills = methods.watch(fieldName);\n\n return (\n <>\n {isSuggestedSkillsOpen && suggestedSkills?.length > 0 && (\n <div>\n <div className=\"mt-8 p-4 rounded-lg border border-gray-200 bg-gray-50 dark:border-black-dark dark:bg-transparent\">\n <div className=\"flex justify-between mb-3\">\n <p className=\"text-sm font-medium\">Suggested based on your focus</p>{' '}\n <button\n onClick={() => {\n setIsSuggestedSkillsOpen(false);\n }}\n type=\"button\"\n >\n <svg\n height={16}\n strokeWidth={2}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n <div className=\"flex gap-2 flex-wrap\">\n {suggestedSkills.map((suggestedSkill) => {\n const isActive = selectedSkills.some(\n (skill) => skill.value === suggestedSkill.value,\n );\n\n return (\n <button\n onClick={() => {\n methods.setValue(\n fieldName,\n isActive\n ? selectedSkills.filter((skill) => skill.value !== suggestedSkill.value)\n : [\n ...selectedSkills,\n {\n label: suggestedSkill.label,\n value: suggestedSkill.value,\n },\n ],\n {\n shouldDirty: true,\n shouldValidate: true,\n },\n );\n }}\n type=\"button\"\n key={suggestedSkill.value}\n disabled={isActive}\n className={clsx(\n 'px-4 py-2 border rounded-full text-sm font-medium flex items-center gap-2 dark:hover:text-white disabled:hover:bg-transparent min-h-[40px] flex-wrap disabled:border-gray-400 disabled:text-gray-400 text-gray-600 dark:text-gray-400 dark:border-gray-400 dark:disabled:text-gray-500 dark:disabled:border-gray-500 dark:hover:bg-gray-900 dark:hover:disabled:bg-transparent hover:bg-gray-600 hover:border-gray-600 hover:text-white border-gray-600',\n )}\n >\n <div className=\"-mt-[1px]\">{suggestedSkill.label}</div>\n </button>\n );\n })}\n </div>\n </div>\n </div>\n )}\n </>\n );\n};\n","import { useFormContext } from 'react-hook-form';\n\ninterface SkillTags {\n fieldName: string;\n}\n\nexport const SkillTags = ({ fieldName = 'skills' }: SkillTags) => {\n const methods = useFormContext();\n const selectedSkills = methods.watch(fieldName);\n\n return (\n <>\n {selectedSkills?.length > 0 && (\n <div className=\"mt-8 flex gap-2 flex-wrap\">\n {selectedSkills?.map((selectedSkill) => (\n <button\n onClick={() => {\n methods.setValue(\n fieldName,\n selectedSkills.filter((skill) => skill.value !== selectedSkill.value),\n {\n shouldDirty: true,\n shouldValidate: true,\n },\n );\n }}\n type=\"button\"\n key={selectedSkill.value}\n className=\"px-4 py-2 border border-primary-500 rounded-full text-sm font-medium text-primary-500 flex items-center gap-2 hover:bg-primary-500 hover:text-white min-h-[40px]\"\n >\n <div className=\"-mt-[1px] first-letter:capitalize text-left w-max\">\n {selectedSkill.label}\n </div>\n <svg\n height={16}\n strokeWidth={2}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n ))}\n </div>\n )}\n </>\n );\n};\n","import { useFormContext } from 'react-hook-form';\nimport clsx from 'clsx';\nimport { SkillTags } from '@components';\nimport { Combobox } from '@headlessui/react';\nimport { ReactNode, useMemo, useState } from 'react';\nimport { ListItemRecord } from '@services/Api';\n\ninterface SkillsComboboxProps {\n skills: ListItemRecord[];\n fieldName?: string;\n label?: ReactNode;\n isLoading?: boolean;\n}\n\nexport const SkillsCombobox = ({\n skills,\n fieldName = 'skills',\n label = 'Add a skill*',\n isLoading,\n}: SkillsComboboxProps) => {\n const methods = useFormContext();\n\n const selectedSkills = useMemo(() => methods.watch(fieldName) || [], [fieldName, methods]);\n\n const search = methods.watch('skillsSearch') || '';\n\n const skillsWithoutSelected = useMemo(() => {\n return skills\n ? skills.filter(\n (skill) => !selectedSkills.some((selectedSkill) => selectedSkill.value === skill.value),\n )\n : [];\n }, [selectedSkills, skills]);\n\n const filteredSkills = useMemo(() => {\n return search === ''\n ? skillsWithoutSelected\n : skillsWithoutSelected?.filter((skill) => {\n return skill.label.toLowerCase().includes(search.toLowerCase());\n });\n }, [search, skillsWithoutSelected]);\n\n return (\n <div className=\"relative\">\n <Combobox\n value={selectedSkills}\n onChange={(value) => {\n methods.setValue(fieldName, value, {\n shouldDirty: true,\n shouldValidate: true,\n });\n\n methods.setValue('skillsSearch', '');\n }}\n multiple\n name={fieldName}\n nullable={false}\n >\n <div className=\"text-sm font-medium text-gray-800 dark:text-gray-100 mb-2\">{label}</div>\n <div className=\"relative\">\n <Combobox.Input\n className=\"border-gray-200 w-full h-[48px] rounded text-sm placeholder:text-gray-400 dark:bg-transparent dark:border-black-dark\"\n placeholder=\"Type to search\"\n onKeyDown={(e) => {\n methods.setValue('skillsSearch', e.currentTarget.value);\n }}\n onChange={undefined}\n />\n {search.length === 0 ? (\n <div>\n <svg className=\"keep-color absolute top-1/2 -translate-y-1/2 right-4\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12.917 12.9165L15.8337 15.8332M4.16699 9.1665C4.16699 9.82311 4.29632 10.4733 4.54759 11.0799C4.79887 11.6865 5.16717 12.2377 5.63146 12.702C6.09575 13.1663 6.64695 13.5346 7.25357 13.7859C7.8602 14.0372 8.51038 14.1665 9.16699 14.1665C9.8236 14.1665 10.4738 14.0372 11.0804 13.7859C11.687 13.5346 12.2382 13.1663 12.7025 12.702C13.1668 12.2377 13.5351 11.6865 13.7864 11.0799C14.0377 10.4733 14.167 9.82311 14.167 9.1665C14.167 7.84042 13.6402 6.56865 12.7025 5.63097C11.7648 4.69329 10.4931 4.1665 9.16699 4.1665C7.84091 4.1665 6.56914 4.69329 5.63146 5.63097C4.69378 6.56865 4.16699 7.84042 4.16699 9.1665V9.1665Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n</svg>\n \n </div>\n ) : (\n <button\n className=\"absolute top-1/2 -translate-y-1/2 right-4\"\n onClick={() => {\n methods.setValue('skillsSearch', '');\n }}\n type=\"button\"\n >\n <svg height={16} strokeWidth={2} className=\"keep-color\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n</svg>\n </button>\n )}\n </div>\n <Combobox.Options\n className={clsx(\n 'mt-2 shadow-[0px_8px_18px_0px_#11192814] border border-gray-200 overflow-auto max-h-[244px] rounded absolute z-10 bg-white w-full dark:border-black-dark dark:bg-black-background',\n { 'max-h-[244px]': filteredSkills.length > 0 },\n )}\n >\n {isLoading ? (\n <div className=\"flex justify-center align-center\">\n <p className=\"text-sm flex items-center justify-center h-full py-6\">Loading...</p>\n </div>\n ) : filteredSkills.length > 0 ? (\n <>\n {filteredSkills.map((skill) => (\n <Combobox.Option\n className=\"text-sm p-3 border-b border-gray-200 min-h-[48px] flex items-center hover:bg-primary-500 hover:text-white dark:border-black-dark cursor-pointer last:border-b-0 top-0 w-full\"\n key={skill.value}\n value={skill}\n >\n <span className=\"first-letter:uppercase\">{skill.label}</span>\n </Combobox.Option>\n ))}\n </>\n ) : (\n <p className=\"text-sm flex items-center justify-center h-full py-6\">Skill not found.</p>\n )}\n </Combobox.Options>\n <SkillTags fieldName={fieldName} />\n </Combobox>\n </div>\n );\n};\n","import clsx from 'clsx';\nimport { ListItemRecord } from '@services/Api';\n\ninterface SkillPills {\n skills: ListItemRecord[];\n scrollSkills?: boolean;\n}\n\nexport const SkillPills = ({ skills, scrollSkills = true }: SkillPills) => {\n return (\n <ul\n className={clsx('flex gap-2 pb-4 px-6 lg:pb-0 lg:px-0', {\n 'overflow-auto': scrollSkills,\n 'flex-col': !scrollSkills,\n })}\n >\n {skills.map((skill) => (\n <li\n key={skill.value + skill.label}\n className={clsx(\n 'rounded-full py-2 px-4 border text-gray-800 border-gray-800 font-medium text-sm w-max first-letter:capitalize',\n {\n 'whitespace-nowrap': scrollSkills,\n truncate: !scrollSkills,\n },\n )}\n >\n {skill.label}\n </li>\n ))}\n </ul>\n );\n};\n","import { useBuyerSignupInfo } from '@hooks';\nimport clsx from 'clsx';\nimport { Form, FormProps, StepHighlight } from '@components';\nimport { useRouter } from 'next/router';\nimport { ReactNode } from 'react';\nimport { useMediaQuery } from 'react-responsive';\n\ninterface FormWrapperProps extends FormProps {\n children: ReactNode;\n onBackClick?: () => void;\n maxWidth?: number;\n containerClassName?: string;\n formClassName?: string;\n}\n\nexport const FormWrapper = ({\n children,\n onBackClick,\n maxWidth = 600,\n containerClassName,\n formClassName,\n ...formProps\n}: FormWrapperProps) => {\n const { step } = useBuyerSignupInfo();\n const router = useRouter();\n const isSignup = router.pathname === '/user/sign-up';\n const shouldShowSteps = step >= 3 && isSignup;\n\n const isDesktop = useMediaQuery({ minWidth: 1024 });\n return (\n <div className=\"flex flex-col flex-grow\">\n <div className={'lg:hidden absolute top-[50px] left-[50px] mb-20 '}>\n {shouldShowSteps && (\n <ul className=\"flex items-center gap-2 w-full justify-center pr-[80px]\">\n <StepHighlight isActive={step === 3} />\n <StepHighlight isActive={step === 4} />\n <StepHighlight isActive={step === 5} />\n <StepHighlight isActive={step === 6} />\n <StepHighlight isActive={step === 7} />\n </ul>\n )}\n </div>\n <div className={clsx('container-default h-full flex-grow flex flex-col', containerClassName)}>\n <div\n className=\"flex flex-col flex-grow w-full lg:mx-auto \"\n style={{\n // maxWidth: isDesktop ?\n maxWidth: '624px',\n }}\n >\n <div className=\"flex mt-10 lg:mt-6 mb-[46px] xs:mb-0 xs:mt-10\">\n {/* //Commenting out the button for now, I don't think it's used for either desktop or mobile designs */}\n {/* <button\n className=\"lg:hidden z-[1]\"\n onClick={() => {\n onBackClick();\n }}\n type=\"button\"\n >\n <ArrowLeft />\n </button> */}\n\n {shouldShowSteps && (\n <ul className=\"flex items-center justify-center w-full gap-2\">\n <StepHighlight isActive={step === 3} />\n <StepHighlight isActive={step === 4} />\n <StepHighlight isActive={step === 5} />\n <StepHighlight isActive={step === 6} />\n <StepHighlight isActive={step === 7} />\n </ul>\n )}\n </div>\n <Form\n wrapperClassName=\"h-full flex flex-col flex-grow\"\n className={clsx('flex flex-col flex-grow', formClassName)}\n {...formProps}\n >\n {children}\n </Form>\n </div>\n </div>\n </div>\n );\n};\n","import clsx from 'clsx';\nimport { ReactNode } from 'react';\n\nexport const StepHighlight = ({\n isActive,\n className,\n name,\n stepCount,\n totalSteps,\n step,\n}: {\n isActive?: boolean;\n className?: string;\n name?: string;\n stepCount?: string;\n totalSteps?: string;\n step?: any;\n}) => {\n return (\n <li className=\"flex flex-col items-center mb-auto\">\n <div className={clsx('flex flex-row items-center')}>\n {stepCount == '1' ? (\n <div className=\"w-[20px] sm:w-[29px]\"></div>\n ) : (\n <>\n {step > stepCount ? (\n <div className=\"h-[3px] w-[20px] sm:w-[29px] bg-[#FFF1DD]\"></div>\n ) : (\n <div className=\"h-[3px] w-[20px] sm:w-[29px] bg-[#F8F8F8]\"></div>\n )}\n </>\n )}\n <div\n className={clsx(\n 'h-[40px] !w-[40px] lg:h-[50px] lg:!w-[50px] rounded-full flex items-center justify-center',\n className,\n {\n 'bg-[#FFF1DD] border border-[#FFF1DD]': isActive,\n 'bg-[#F8F8F8] ': !isActive,\n 'border border-[#9F98BE]': step < stepCount,\n },\n )}\n >\n {step > stepCount ? (\n <div className=\"bg-[#FFBB55] h-[40px] w-[40px] lg:h-[50px] lg:w-[50px] rounded-full flex items-center justify-center\">\n <svg width={25} className=\"text-[#FFBB55] \" viewBox=\"0 0 22 23\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <circle cx=\"11\" cy=\"11.5\" r=\"10\" fill=\"currentColor\" stroke=\"currentColor\" stroke-width=\"1.5\" />\n <path d=\"M6 11.5L9.32941 15.25L16 7.75\" fill=\"currentColor\" />\n <path d=\"M6 11.5L9.32941 15.25L16 7.75\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </div>\n ) : (\n <div\n className={clsx('text-center', {\n 'text-[#FFBB55]': isActive,\n 'text-[#9F98BE]': !isActive,\n })}\n >\n {stepCount}\n </div>\n )}\n </div>\n {stepCount == totalSteps ? (\n <div className=\"w-[20px] sm:w-[29px]\"></div>\n ) : (\n <>\n {step > stepCount ? (\n <div className=\"h-[3px] w-[20px] sm:w-[29px] bg-[#FFF1DD]\"></div>\n ) : (\n <div className=\"h-[3px] w-[20px] sm:w-[29px] bg-[#F8F8F8]\"></div>\n )}\n </>\n )}\n </div>\n {name && (\n <div\n className={clsx('text-[12px] mt-[10px] text-center max-w-[80px] sm:max-w-none', {\n 'text-[#FFBB55]': step > stepCount,\n 'text-[#9F98BE]': step <= stepCount,\n })}\n >\n {name}\n </div>\n )}\n </li>\n );\n};\n\nexport const StepHighlightWrapper = ({ children }: { children: ReactNode }) => {\n return <ul className=\"flex items-center w-full justify-center\">{children}</ul>;\n};\n","export default {\"src\":\"/_next/static/media/error.84207949.png\",\"height\":260,\"width\":280,\"blurDataURL\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAHCAMAAAACh/xsAAAAJFBMVEX////59/f7+/vw7u7y2N35ydJtb2+npaXO0dHj4+PdzdC7u7ujloDaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAL0lEQVR4nB2JxxEAMAyDkGvK/vvmnA/iBACyIUim2TzLv0Rfm6aq/oe2h48YkcADDIQAcgvuCYcAAAAASUVORK5CYII=\",\"blurWidth\":8,\"blurHeight\":7};","export default {\"src\":\"/_next/static/media/error-2.0d4c21d9.png\",\"height\":181,\"width\":272,\"blurDataURL\":\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAV1BMVEVMaXG7ipNULTPlY3hYR0nRbX/Is7gAAAAfFhcOCwyKRlHcdIbv7e0AAAC8oaVFRESXiYvq1dnPVmpwMj3X5ePvqLVwLTivwr42Iyb/ztcfEBO6trfQmKIRQcwoAAAAGHRSTlMA+Pts3itiCY/9/p2hP+3y0b2Q93qRjUMKV9WJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAM0lEQVR4nAXBiQKAEBBAwUe7jlJ0Cv3/dzYDTMtzKMDe5vO+8Gv5jJWKhh7jG4A0smzO/yVEAbi8t4SCAAAAAElFTkSuQmCC\",\"blurWidth\":8,\"blurHeight\":5};","import Image from \"next/image\";\nimport ErrorIllustration from '../../../public/images/error.png';\nimport ErrorIllustration2 from '../../../public/images/error-2.png';\nimport { Button } from '../button';\nimport { useRouter } from 'next/router';\nimport { useAuthUser } from '@hooks';\nimport { commonRoutes } from '@utils';\n\nexport const ErrorState = ({\n type = 'something-went-wrong',\n}: {\n type?:\n | 'something-went-wrong'\n | 'maintenance'\n | '404'\n | 'something-went-wrong-button'\n | 'wrong_associate_id'\n | 'invalid_co_borrowing_link';\n}) => {\n const router = useRouter();\n const { signedIn } = useAuthUser();\n const handleGoBack = () => {\n if (signedIn) {\n router.push(commonRoutes.buyer.auth.summary);\n } else {\n router.push(commonRoutes.buyer.signup);\n }\n };\n\n const arrowBack = (\n <button className=\"z-[1] lg:hidden ml-6 -mt-8 w-max\" onClick={handleGoBack} type=\"button\">\n {/* <ArrowLeft /> */}\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M18.5 12H6M6 12L12 6M6 12L12 18\" stroke=\"#212121\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>\n\n </button>\n );\n\n const wrapperClassName =\n 'text-center h-full flex justify-center flex-col w-full text-white bg-primary';\n\n if (type === 'maintenance') {\n return (\n (<section className={wrapperClassName}>\n <div>\n <Image\n src={ErrorIllustration2}\n alt=\"\"\n width={200}\n height={200}\n />\n </div>\n <h2 className=\"font-semibold text-xl mb-4 mt-10\">Working on it!</h2>\n <p className=\"text-[15px]\">\n We're down or undergoing maintenance <br /> right now but we'll be back soon.\n </p>\n </section>)\n );\n }\n\n if (type === '404') {\n return (\n (<section className={wrapperClassName}>\n {arrowBack}\n <div>\n <Image\n src={ErrorIllustration}\n alt=\"\"\n width={200}\n height={200}\n />\n </div>\n <h2 className=\"font-semibold text-xl mb-4 mt-10\">Oops, page not found!</h2>\n <p className=\"text-[15px]\">\n Sorry for the headache, we can't find what <br /> you're looking for.\n </p>\n <div className=\"w-max mx-auto mt-10\">\n <Button className=\"w-max\" variant=\"black\" onClick={handleGoBack}>\n GO BACK\n </Button>\n </div>\n </section>)\n );\n }\n if (type === 'wrong_associate_id') {\n return (\n <section className=\"text-center m-auto flex justify-center flex-col w-[70%] rounded-lg p-4 bg-white\">\n <h2 className=\"font-semibold text-xl mb-4 mt-10\">Link doesn't look right!</h2>\n <p className=\"text-[15px]\">\n Sorry but the associate link doesn't look right?\n <br /> Could you please check in with your realtor about the link?\n </p>\n\n <div className=\"w-max mx-auto mt-10\">\n <Button className=\"w-max\" variant=\"white\" onClick={handleGoBack}>\n GO BACK\n </Button>\n </div>\n </section>\n );\n }\n if (type === 'invalid_co_borrowing_link') {\n return (\n <section className={wrapperClassName}>\n <h2 className=\"font-semibold text-xl mb-4 mt-10\">Link doesn't look right!</h2>\n <p className=\"text-[15px]\">\n The link you clicked on is either invalid or has expired.\n <br /> If you were trying to connect your account with your co-borrower,\n <br /> can you please ask them to resend the link?\n <br /> Or you can sign-up and send them a link to join you as a co-borrower!\n </p>\n\n <div className=\"w-max mx-auto mt-10\">\n <Button className=\"w-max\" variant=\"white\" onClick={handleGoBack}>\n Sign Up\n </Button>\n </div>\n </section>\n );\n }\n\n return (\n (<section className={wrapperClassName}>\n {arrowBack}\n <div>\n <Image\n src={ErrorIllustration}\n alt=\"\" \n width={300}\n height={300}\n />\n </div>\n <h2 className=\"font-semibold text-xl mb-4 mt-10\">Oops, something went wrong!</h2>\n <p className=\"text-[15px]\">\n Sorry for the headache, we’re having <br /> trouble reaching this page.\n </p>\n {type === 'something-went-wrong-button' && (\n <div className=\"w-max mx-auto mt-10\">\n <Button\n className=\"w-max\"\n variant=\"black\"\n onClick={() => {\n router.back();\n }}\n >\n GO BACK\n </Button>\n </div>\n )}\n </section>)\n );\n};\n","import Image from 'next/image';\nimport { ReactNode } from 'react';\nimport EmptyImage from '../../../public/images/empty.png';\n\nexport const Empty = ({\n main,\n flavor,\n hideImage,\n}: {\n main: ReactNode;\n flavor: ReactNode;\n hideImage?: boolean;\n}) => {\n return (\n <div className=\"text-center justify-center min-h-[400px] bpt-6 -mt-2 px-4 flex flex-col items-center mx-6 lg:mx-0\">\n {!hideImage && (\n <div className=\"max-w-[400px] flex mb-2\">\n <Image src=\"/images/layers.png\" alt=\"layer\" width={50} height={50} />\n </div>\n )}\n <p className=\"text-center font-plusJakarta text-[13px] text-[#696767] leading-[12px] font-medium mb-1\">\n {main}\n </p>\n <p className=\"text-center text-[13px] font-plusJakarta text-[#696767] leading-5 font-medium\">\n {flavor}\n </p>\n </div>\n );\n};\n","import clsx from 'clsx';\n// TODO: Maybe remove these components entirely?\nimport { useClickOutside } from '@hooks';\nimport { useRouter } from 'next/router';\n\nimport { capitalize } from '@utils';\nimport { FilterPill } from '@components';\nimport { ControlledCheckbox } from '@components/custom-input/checkbox';\nimport { ControlledRadio } from '@components/custom-input/radio';\nimport { Dropdown } from '@components/dropdown';\nimport { CleanModal } from '@components/modal';\nimport Image from 'next/image';\nimport React, { ReactNode, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useMutation, useQuery } from 'react-query';\nimport { useMediaQuery } from 'react-responsive';\nimport WarningIcon from '@mui/icons-material/Warning';\nimport { useAuthUser } from '@hooks';\nimport { useTranslation } from 'react-i18next';\nimport {\n ApiService,\n BuyerRecommendation,\n EBuyerRecommendationStatus,\n EBuyerRecommendationType,\n} from '@services/Api';\nimport { UpdateBuyerPayload } from '../../services/Api/controllers';\nimport { Empty } from '../empty';\nimport { SuggestionItem, SuggestionStatus } from './suggestion-card';\nimport { Button, Typography, Link, Icon } from '@mui/material';\n\nconst recommendationTypeLabels = {\n [EBuyerRecommendationType.action]: 'Action',\n [EBuyerRecommendationType.alert]: 'Attention',\n};\n\nconst recommendationSectionData = [\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <PinIcon2 className=\"text-[#fff] mt-[-2px] ml-[-2px]\" /> */}\n <svg\n width=\"20\"\n height=\"21\"\n className=\"text-[#fff] mt-[-2px] ml-[-2px]\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.75 10.494V8.167h.833v-.834a.834.834 0 0 0-.833-.833h-2.5a.833.833 0 0 0-.833.833v.834h.833v2.327l-1.128.711A.415.415 0 0 0 7 11.5v.833a.417.417 0 0 0 .417.417h1.666V14l.417.833.417-.833v-1.25h1.666a.417.417 0 0 0 .417-.417V11.5a.416.416 0 0 0-.122-.295l-1.128-.71Z\"\n fill=\"#fff\"\n />\n </svg>\n </div>\n ),\n text: 'Pinned',\n itemKey: 'pinned',\n },\n {\n // icon: <InfoSquare className=\"text-[#635E7D]\" />,\n Icon: (\n <svg\n width=\"20\"\n className=\"text-[#635E7D]\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2.5 3.83333V17.1667C2.5 17.3877 2.5878 17.5996 2.74408 17.7559C2.90036 17.9122 3.11232 18 3.33333 18H16.6667C16.8877 18 17.0996 17.9122 17.2559 17.7559C17.4122 17.5996 17.5 17.3877 17.5 17.1667V3.83333C17.5 3.61232 17.4122 3.40036 17.2559 3.24408C17.0996 3.0878 16.8877 3 16.6667 3H3.33333C3.11232 3 2.90036 3.0878 2.74408 3.24408C2.5878 3.40036 2.5 3.61232 2.5 3.83333ZM9.16667 6.33333H10.8333V8H9.16667V6.33333ZM9.16667 9.66667H10.8333V14.6667H9.16667V9.66667Z\"\n fill=\"#635E7D\"\n />\n </svg>\n ),\n\n text: 'Available',\n itemKey: 'active',\n },\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <HorizontalOptionsIcon className=\"text-[#fff]\" /> */}\n <svg\n width=\"15\"\n height=\"15\"\n className=\"text-[#fff]\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.0007 8.33331C9.08398 8.33331 8.33398 9.08331 8.33398 9.99998C8.33398 10.9166 9.08398 11.6666 10.0007 11.6666C10.9173 11.6666 11.6673 10.9166 11.6673 9.99998C11.6673 9.08331 10.9173 8.33331 10.0007 8.33331ZM15.0007 8.33331C14.084 8.33331 13.334 9.08331 13.334 9.99998C13.334 10.9166 14.084 11.6666 15.0007 11.6666C15.9173 11.6666 16.6673 10.9166 16.6673 9.99998C16.6673 9.08331 15.9173 8.33331 15.0007 8.33331ZM5.00065 8.33331C4.08398 8.33331 3.33398 9.08331 3.33398 9.99998C3.33398 10.9166 4.08398 11.6666 5.00065 11.6666C5.91732 11.6666 6.66732 10.9166 6.66732 9.99998C6.66732 9.08331 5.91732 8.33331 5.00065 8.33331Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </div>\n ),\n text: 'In progress',\n itemKey: 'in_progress',\n },\n {\n // icon: <CheckBoxIcon />,\n icon: (\n <svg\n width=\"20\"\n className=\"text-[#635E7D]\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.14286 2.5C3.57454 2.5 3.02949 2.72576 2.62763 3.12763C2.22576 3.52949 2 4.07454 2 4.64286V15.3571C2 15.9255 2.22576 16.4705 2.62763 16.8724C3.02949 17.2742 3.57454 17.5 4.14286 17.5H14.8571C15.4255 17.5 15.9705 17.2742 16.3724 16.8724C16.7742 16.4705 17 15.9255 17 15.3571V4.64286C17 4.07454 16.7742 3.52949 16.3724 3.12763C15.9705 2.72576 15.4255 2.5 14.8571 2.5H4.14286ZM8.42857 13.6579L5.52821 10.7575L7.04321 9.2425L8.42857 10.6279L12.4925 6.56393L14.0075 8.07893L8.42857 13.6579Z\"\n fill=\"#635E7D\"\n />\n </svg>\n ),\n text: 'Completed',\n itemKey: 'completed',\n },\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <ForwardRightIcon className=\"text-[#fff]\" /> */}\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 20 20\"\n className=\"text-[#fff]\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.8836 4.11584L9.11523 5.88418L13.2319 10L9.11523 14.1158L10.8836 15.8842L16.7669 10L10.8836 4.11584Z\"\n fill=\"#1C1A27\"\n />\n <path\n d=\"M5.05154 15.8842L10.9349 10L5.05154 4.11584L3.2832 5.88418L7.39987 10L3.2832 14.1158L5.05154 15.8842Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </div>\n ),\n text: 'Deferred',\n itemKey: 'deferred',\n },\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <CloseBoxIcon className=\"text-[#fff] mt-[-2px] ml-[-3px]\" /> */}\n <svg\n width=\"20\"\n className=\"text-[#fff] mt-[-2px] ml-[-3px]\"\n height=\"21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.125 6.5 10.5 9.125 7.875 6.5 7 7.375 9.625 10 7 12.624l.875.875 2.625-2.624 2.625 2.624.875-.875L11.375 10 14 7.375l-.875-.875Z\"\n fill=\"#fff\"\n />\n </svg>\n </div>\n ),\n text: 'Dismissed',\n itemKey: 'dismissed',\n },\n {\n // icon: <SpreadSheetIcon className=\"text-[#635E7D]\" />,\n icon: (\n <svg\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n className=\"text-[#635E7D]\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2.5 4.16667V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H15.8333C16.2754 17.5 16.6993 17.3244 17.0118 17.0118C17.3244 16.6993 17.5 16.2754 17.5 15.8333V4.16667C17.5 3.72464 17.3244 3.30072 17.0118 2.98816C16.6993 2.67559 16.2754 2.5 15.8333 2.5H4.16667C3.72464 2.5 3.30072 2.67559 2.98816 2.98816C2.67559 3.30072 2.5 3.72464 2.5 4.16667ZM8.33333 5.83333H15V7.5H8.33333V5.83333ZM8.33333 9.16667H15V10.8333H8.33333V9.16667ZM8.33333 12.5H15V14.1667H8.33333V12.5ZM5 5.83333H6.66667V7.5H5V5.83333ZM5 9.16667H6.66667V10.8333H5V9.16667ZM5 12.5H6.66667V14.1667H5V12.5Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n ),\n\n text: 'History',\n itemKey: 'history',\n },\n];\n\nexport const useSuggestions = () => {\n const { profile } = useAuthUser();\n const buyerId = profile?.id || 'id';\n\n const suggestionQuery = useQuery(\n ['suggestions'],\n async () => {\n const { data } = await ApiService.getBuyerRecommendations(buyerId);\n console.log('🚀 ~ file: index.tsx ~ line 45 ~ suggestionQuery ~ data', data);\n return data;\n },\n {\n refetchOnWindowFocus: true,\n },\n );\n\n const suggestionStatusMutation = useMutation(\n async ({ status, id }: UpdateBuyerPayload) => {\n await ApiService.updateBuyerRecommendations({ status, id });\n },\n {\n onSuccess: () => {\n suggestionQuery.refetch();\n },\n },\n );\n\n const handleSuggestionChange = ({ status, id }: UpdateBuyerPayload) => {\n suggestionStatusMutation.mutate({ status, id });\n };\n\n const suggestions = useMemo(() => {\n const newSuggestions = {\n active: [],\n in_progress: [],\n completed: [],\n deferred: [],\n dismissed: [],\n pinned: [],\n history: [],\n all: [],\n };\n\n suggestionQuery?.data?.items?.forEach((suggestionItem) => {\n newSuggestions.all.push(suggestionItem);\n\n if (suggestionItem.status === EBuyerRecommendationStatus.active) {\n newSuggestions.active.push(suggestionItem);\n }\n\n if (suggestionItem.status === EBuyerRecommendationStatus.in_progress) {\n newSuggestions.in_progress.push(suggestionItem);\n }\n\n if (suggestionItem.status === EBuyerRecommendationStatus.completed) {\n newSuggestions.completed.push(suggestionItem);\n }\n\n if (suggestionItem.status === EBuyerRecommendationStatus.deferred) {\n newSuggestions.deferred.push(suggestionItem);\n }\n\n if (suggestionItem.status === EBuyerRecommendationStatus.dismissed) {\n newSuggestions.dismissed.push(suggestionItem);\n }\n\n if (suggestionItem.status === EBuyerRecommendationStatus.pinned) {\n newSuggestions.pinned.push(suggestionItem);\n }\n\n if (suggestionItem.status === EBuyerRecommendationStatus.history) {\n newSuggestions.history.push(suggestionItem);\n }\n });\n\n return newSuggestions;\n }, [suggestionQuery?.data?.items]);\n\n return {\n suggestions: suggestions,\n handleSuggestionChange,\n qtyAvailableSuggestions: suggestions.active.length + suggestions.pinned.length,\n };\n};\n\nconst initialActionFilter = [\n EBuyerRecommendationStatus.active,\n EBuyerRecommendationStatus.in_progress,\n EBuyerRecommendationStatus.completed,\n EBuyerRecommendationStatus.deferred,\n EBuyerRecommendationStatus.dismissed,\n];\n\nconst initialAlertFilter = [\n EBuyerRecommendationStatus.active,\n EBuyerRecommendationStatus.pinned,\n EBuyerRecommendationStatus.history,\n];\n\nexport const RecommendationOptions = ({\n actionable,\n activeActionRecoExists,\n activeAlertRecoExists,\n latestActionRecoDate,\n latestAlertRecoDate,\n ...suggestionItem\n}: {\n activeActionRecoExists: boolean;\n activeAlertRecoExists: boolean;\n latestActionRecoDate?: Date;\n latestAlertRecoDate?: Date;\n status: SuggestionStatus;\n actionable: boolean;\n} & SuggestionItem) => {\n const [isOpen, setIsOpen] = useState(false);\n const buttonClassName =\n 'text-left text-sm font-medium px-4 py-2 bg-[#fff] hover:bg-gray-50 rounded-md';\n const refClickOutside = useRef<HTMLDivElement | null>(null);\n\n useClickOutside(refClickOutside, () => {\n setIsOpen(false);\n });\n\n const { handleSuggestionChange } = useSuggestions();\n\n const optionData = useMemo(() => {\n const initialActionRecoOptions = [\n {\n title: 'Dismiss',\n statusChange: EBuyerRecommendationStatus.dismissed,\n },\n ];\n\n const initialAlertRecoOptions = [\n {\n title: 'Pin',\n statusChange: EBuyerRecommendationStatus.pinned,\n },\n ];\n\n let options = [];\n if (suggestionItem.type === 'action') {\n if (suggestionItem.status !== EBuyerRecommendationStatus.active) {\n if (!activeActionRecoExists && suggestionItem.createdAt === latestActionRecoDate) {\n options = [\n {\n title: 'Mark as completed',\n statusChange: EBuyerRecommendationStatus.completed,\n },\n {\n title: 'Reset action',\n statusChange: EBuyerRecommendationStatus.active,\n },\n ];\n }\n } else {\n options = initialActionRecoOptions;\n }\n if (suggestionItem.status !== EBuyerRecommendationStatus.in_progress) {\n if (!activeActionRecoExists && suggestionItem.createdAt === latestActionRecoDate) {\n options = [\n {\n title: 'Reset action',\n statusChange: EBuyerRecommendationStatus.active,\n },\n ];\n }\n } else {\n [\n {\n title: 'Mark as completed',\n statusChange: EBuyerRecommendationStatus.completed,\n },\n {\n title: 'Reset action',\n statusChange: EBuyerRecommendationStatus.active,\n },\n ];\n }\n } else {\n if (suggestionItem.status !== EBuyerRecommendationStatus.pinned) {\n options = initialAlertRecoOptions;\n } else {\n if (!activeAlertRecoExists && suggestionItem.createdAt === latestAlertRecoDate) {\n options = [\n {\n title: 'Unpin',\n statusChange: EBuyerRecommendationStatus.active,\n },\n ];\n } else {\n options = [\n {\n title: 'Unpin',\n statusChange: EBuyerRecommendationStatus.history,\n },\n ];\n }\n }\n }\n\n return options;\n }, [\n suggestionItem,\n activeActionRecoExists,\n latestActionRecoDate,\n activeAlertRecoExists,\n latestAlertRecoDate,\n ]);\n\n return (\n <div ref={refClickOutside} className=\"relative\">\n {!!optionData.length && (\n <>\n {/* <button onClick={() => setIsOpen(true)} className=\"h-max\" type=\"button\">\n <MoreVertIcon />\n </button> */}\n <Dropdown isOpen={isOpen} className=\"border rounded-md\">\n {optionData.map((optionItem, index) => (\n <button\n key={`optionItem-${index}`}\n onClick={() => {\n handleSuggestionChange({\n status: optionItem.statusChange,\n id: suggestionItem.id,\n });\n setIsOpen(false);\n }}\n className={buttonClassName}\n type=\"button\"\n >\n {optionItem.title}\n </button>\n ))}\n </Dropdown>\n </>\n )}\n </div>\n );\n};\n\nconst RecommendationCard = ({\n item,\n activeActionRecoExists,\n activeAlertRecoExists,\n latestActionRecoDate,\n latestAlertRecoDate,\n}: {\n item: SuggestionItem & {\n status: SuggestionStatus;\n };\n activeActionRecoExists: boolean;\n activeAlertRecoExists: boolean;\n latestActionRecoDate?: Date;\n latestAlertRecoDate?: Date;\n}) => {\n const { title, type, description, createdAt, status, linkUrl, linkLabel, gap, benefit } = item;\n console.log('description', description);\n\n // Function to convert HTML anchor tags to React links\n const convertLinksInDescription = (text: string) => {\n const linkRegex = /<a href=\"([^\"]+)\">([^<]+)<\\/a>/g;\n const parts = [];\n let lastIndex = 0;\n\n // Remove <br> tags\n text = text.replace(/<br\\s*\\/?>/gi, ' ');\n\n // Find all matches for <a> tags and split the string\n text.replace(linkRegex, (match, url, linkText, offset) => {\n // Add text before the link\n if (offset > lastIndex) {\n parts.push(text.slice(lastIndex, offset));\n }\n\n // Add the link as a React component\n parts.push(\n <a\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n key={offset}\n className=\"text-[#1d4ed8] font-bold cursor-pointer\"\n >\n {linkText}\n </a>,\n );\n\n lastIndex = offset + match.length;\n return match;\n });\n\n // Add remaining text after the last link\n if (lastIndex < text.length) {\n parts.push(text.slice(lastIndex));\n }\n\n return parts.length > 0 ? parts : text;\n };\n\n // Convert description text to include clickable links\n const updatedDescription = description ? convertLinksInDescription(description) : description;\n\n console.log('Updated Description with links 1111:', updatedDescription);\n\n const daysAgo =\n Number(new Date(createdAt).toLocaleDateString('en-US', { day: 'numeric' })) -\n Number(new Date().toLocaleDateString('en-US', { day: 'numeric' }));\n\n const { handleSuggestionChange } = useSuggestions();\n\n const actionsDisabled = status !== EBuyerRecommendationStatus.active;\n console.log('testing', item);\n function parseBoldText(text) {\n // Split the text by ** and replace with JSX\n const parts = text.split(/(\\*\\*.*?\\*\\*)/); // Match text between **\n return parts.map((part, index) =>\n part.startsWith('**') && part.endsWith('**') ? (\n <strong key={index}>{part.slice(2, -2)}</strong>\n ) : (\n part\n ),\n );\n }\n\n return (\n <div className=\"border border-[#C5C5C5] rounded-2xl p-6 mt-6\">\n {/* <div className=\"flex flex-row items-center\">\n <h4 className=\"text-[15px]\">Gap: </h4>\n <h4 className=\"border bg-yellow-munsell-1000 rounded-[10px] py-[5px] px-2.5 text-[15px] ml-2 text-cornflower-blue-50 capitalize\">\n {item.gap}\n </h4>\n </div> */}\n <div className=\"flex justify-between\">\n <div className=\"flex flex-wrap items-center gap-3 \">\n <h3 className={'font-semibold mb-1 text-[#1C1A27] capitalize'}>{title}</h3>\n <h3\n className={\n 'font-semibold bg-primary rounded-full py-1 px-2 text-[11px] tracking-wide text-white mb-1 capitalize'\n }\n >\n {gap ? gap.replace(/_/g, ' ') : 'N/A'}\n </h3>\n\n {/* <p className=\"flex items-center text-[#1C1A27] text-[12px] font-light\">\n {daysAgo > 0 ? (\n <>\n {daysAgo} day{daysAgo > 1 ? 's' : ''} ago\n </>\n ) : (\n 'Today'\n )}{' '}\n <span className=\"mx-[10px] text-[#1C1A27] text-[15px] font-semibold\">•</span>{' '}\n <span\n className={clsx({\n 'text-[#FFC235]': type === EBuyerRecommendationType.action,\n 'text-[#FF433D]': type === EBuyerRecommendationType.alert,\n })}\n >\n {recommendationTypeLabels[type]}\n </span>\n </p> */}\n </div>\n <RecommendationOptions\n {...item}\n status={status}\n actionable={true}\n activeActionRecoExists={activeActionRecoExists}\n activeAlertRecoExists={activeAlertRecoExists}\n latestActionRecoDate={latestActionRecoDate}\n latestAlertRecoDate={latestAlertRecoDate}\n />\n </div>\n <div className=\"mt-3 empty:mt-0 text-[12px] font-normal\">\n <h3 className={'tracking-wide pb-5 text-[#696767] text-[14px] capitalize'}>\n Gap: {gap ? gap.replace(/_/g, ' ') : 'N/A'}\n </h3>\n <h3 className={'tracking-wide pb-5 text-[#696767] text-[14px] capitalize'}>\n Benefit: {benefit || 'N/A'}\n </h3>\n {updatedDescription && (\n <div className=\"tracking-wide pb-5 text-[#696767] text-[14px]\">\n Recommendation: {updatedDescription}\n </div>\n )}\n </div>\n {item.type === EBuyerRecommendationType.action && (\n <div className=\"flex justify-start mt-[10px] gap-3 \">\n {/* <div className=\"border border-[#C5C5C5] my-2 p-2 rounded-md flex flex-row justify-center items-center gap-2 w-fit\">\n <Image\n alt=\"badge img\"\n width={18}\n height={18}\n className=\"filter brightness-90 opacity-50\"\n src=\"/icons/pocket.png\"\n />\n <h4 className=\"text-[12px] font-semibold text-black-900 capitalize\">{title.replace(/_/g, ' ')}</h4>\n </div> */}\n\n <Button\n variant=\"text\"\n className={clsx({\n 'pointer-events-none': actionsDisabled,\n '!text-[#635E7D]': actionsDisabled,\n })}\n onClick={() => {\n handleSuggestionChange({\n status: EBuyerRecommendationStatus.in_progress,\n id: item.id,\n });\n linkUrl && window.open(linkUrl, '_blank');\n }}\n style={{\n color: '#2CE25D',\n lineHeight: '1.5',\n border: '1px solid #2CE25D',\n borderRadius: '20px',\n padding: '6px 16px',\n }}\n sx={{\n '&:hover': {\n borderColor: '#2CE25D',\n backgroundColor: 'rgba(44, 226, 93, 0.1)',\n },\n }}\n >\n Accept\n </Button>\n <Button\n variant=\"text\"\n className={clsx('ml-[20px]', {\n 'pointer-events-none': actionsDisabled,\n '!text-[#635E7D] opacity-50': actionsDisabled,\n })}\n onClick={() => {\n handleSuggestionChange({\n status: EBuyerRecommendationStatus.deferred,\n id: item.id,\n });\n }}\n style={{\n color: '#696767',\n lineHeight: '1.5',\n border: '1px solid #696767',\n borderRadius: '20px',\n padding: '6px 16px',\n }}\n sx={{\n '&:hover': {\n borderColor: '#696767',\n backgroundColor: 'rgba(105, 103, 103, 0.1)',\n },\n }}\n >\n Defer\n </Button>\n <div\n style={{\n textAlign: 'right',\n width: '100%',\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'flex-end',\n }}\n >\n {' '}\n <Button\n variant=\"text\"\n className={clsx('ml-[20px]', {\n 'pointer-events-none': actionsDisabled,\n '!text-[#635E7D] opacity-50': actionsDisabled,\n })}\n onClick={() => {\n handleSuggestionChange({\n status: EBuyerRecommendationStatus.dismissed,\n id: item.id,\n });\n }}\n style={{\n color: '#F7210F',\n lineHeight: '1.5',\n border: '1px solid #F7210F',\n borderRadius: '20px',\n padding: '6px 16px',\n }}\n sx={{\n '&:hover': {\n borderColor: '#F7210F',\n backgroundColor: 'rgba(247, 33, 15, 0.1)',\n },\n }}\n >\n Decline\n </Button>\n </div>\n </div>\n )}\n </div>\n );\n};\n\nconst RecommendationSection = ({\n icon,\n text,\n items = [],\n activeActionRecoExists,\n activeAlertRecoExists,\n latestActionRecoDate,\n latestAlertRecoDate,\n}: {\n icon: ReactNode;\n text: string;\n items?: SuggestionItem[];\n activeActionRecoExists: boolean;\n activeAlertRecoExists: boolean;\n latestActionRecoDate?: Date;\n latestAlertRecoDate?: Date;\n}) => {\n const [open, setOpen] = useState(true);\n\n return (\n <div>\n <button\n className=\"flex justify-between text-[#1C1A27] w-full\"\n onClick={() => setOpen((prevState) => !prevState)}\n >\n <div className=\"flex items-center\">\n {icon}\n <div className=\"text-[15px] ml-[10px] capitalize\">\n {text.replace(/_/g, ' ')} ({items.length})\n </div>\n </div>\n {/* <ChevronUp\n className={clsx('transition-transform', {\n 'rotate-0': open,\n 'rotate-180': !open,\n })}\n width={20}\n /> */}\n <svg\n viewBox=\"0 0 20 20\"\n className={clsx('transition-transform', {\n 'rotate-0': open,\n 'rotate-180': !open,\n })}\n width={20}\n >\n <path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\" />\n </svg>\n </button>\n {open && (\n <div>\n {items.map((item, index) => (\n <RecommendationCard\n key={`rec-card-${index}`}\n item={item}\n activeActionRecoExists={activeActionRecoExists}\n activeAlertRecoExists={activeAlertRecoExists}\n latestActionRecoDate={latestActionRecoDate}\n latestAlertRecoDate={latestAlertRecoDate}\n />\n ))}\n </div>\n )}\n </div>\n );\n};\n\nexport const Suggestions = () => {\n const { t } = useTranslation();\n const [tab, setTab] = useState<'action' | 'alert' | 'view_all'>('action');\n const [sort, setSort] = useState<'newest-to-oldest' | 'oldest-to-newest'>('newest-to-oldest');\n const [filter, setFilter] = useState<string[]>(initialActionFilter);\n const [suggestions, setSuggestions] = useState<{ [k: string]: BuyerRecommendation[] }>({});\n console.log('🚀 ~ Suggestions ~ suggestions:', suggestions);\n\n const { profile } = useAuthUser();\n const buyerId = profile?.id || 'id';\n // **Todo new recommendation\n const [newSuggestions, setNewSuggestions] = useState([]);\n console.log('🚀 ~ Suggestions ~ newSuggestions:', newSuggestions);\n\n const { suggestions: suggestionsState } = useSuggestions();\n\n const sortAndFilterSuggestions = () => {\n const newSuggestions = {\n active: suggestionsState.active.filter((suggestion) => suggestion.type === tab),\n in_progress: suggestionsState.in_progress.filter((suggestion) => suggestion.type === tab),\n completed: suggestionsState.completed.filter((suggestion) => suggestion.type === tab),\n deferred: suggestionsState.deferred.filter((suggestion) => suggestion.type === tab),\n dismissed: suggestionsState.dismissed.filter((suggestion) => suggestion.type === tab),\n pinned: suggestionsState.pinned.filter((suggestion) => suggestion.type === tab),\n history: suggestionsState.history.filter((suggestion) => suggestion.type === tab),\n };\n\n const sortedSuggestions = Object.fromEntries(\n Object.entries(\n Object.fromEntries(\n Object.entries(newSuggestions).filter(([key, value]) =>\n filter.includes(key as SuggestionStatus),\n ),\n ) as Record<keyof SuggestionItem, SuggestionItem[]>,\n ).map(([key, value]) => {\n return [\n key,\n value.sort((suggestionA, suggestionB) =>\n sort === 'newest-to-oldest'\n ? new Date(suggestionA.createdAt).getTime() -\n new Date(suggestionB.createdAt).getTime()\n : new Date(suggestionB.createdAt).getTime() -\n new Date(suggestionA.createdAt).getTime(),\n ),\n ];\n }),\n );\n\n setSuggestions(sortedSuggestions);\n };\n\n const getNewRecommendations = async (buyerId: string) => {\n console.log('kkkkk', buyerId);\n try {\n const resp = await ApiService.getBuyerRecommendations(buyerId);\n setNewSuggestions(resp?.data?.data?.recommendations);\n } catch (error) {\n console.log('🚀 ~ getNewRecommendations ~ error:', error);\n }\n };\n\n useEffect(() => {\n getNewRecommendations(buyerId);\n }, []);\n\n useEffect(() => {\n const newFilter = tab === 'action' ? [...initialActionFilter] : [...initialAlertFilter];\n setFilter(newFilter);\n }, [tab]);\n\n useEffect(() => {\n sortAndFilterSuggestions();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [filter, sort, suggestionsState]);\n\n const activeActionRecoExists = useMemo(\n () => suggestionsState.active.find((activeSuggestion) => activeSuggestion.type === 'action'),\n [suggestionsState],\n );\n\n const activeAlertRecoExists = useMemo(\n () => suggestionsState.active.find((activeSuggestion) => activeSuggestion.type === 'alert'),\n [suggestionsState],\n );\n\n const latestActionRecoDate = useMemo(() => {\n let allActionRecos = suggestionsState.all.filter((suggestion) => suggestion.type === 'action');\n\n allActionRecos = allActionRecos.sort(\n (suggestionA, suggestionB) =>\n new Date(suggestionA.createdAt).getTime() - new Date(suggestionB.createdAt).getTime(),\n );\n\n return allActionRecos[0]?.createdAt;\n }, [suggestionsState]);\n\n const latestAlertRecoDate = useMemo(() => {\n let allAlertRecos = suggestionsState.all.filter((suggestion) => suggestion.type === 'alert');\n\n allAlertRecos = allAlertRecos.sort(\n (suggestionA, suggestionB) =>\n new Date(suggestionA.createdAt).getTime() - new Date(suggestionB.createdAt).getTime(),\n );\n\n return allAlertRecos[0]?.createdAt;\n }, [suggestionsState]);\n\n const [currentModal, setCurrentModal] = useState(null);\n const isDesktop = useMediaQuery({ minWidth: 992 });\n\n const refClickOutside = useRef<HTMLDivElement | null>(null);\n\n useClickOutside(refClickOutside, () => {\n if (isDesktop) {\n setCurrentModal(null);\n }\n });\n\n const sortOptions = (\n <>\n <ControlledRadio\n onChange={() => {\n setSort('newest-to-oldest');\n }}\n checked={sort === 'newest-to-oldest'}\n label={t('Newest to oldest')}\n />\n <ControlledRadio\n onChange={() => {\n setSort('oldest-to-newest');\n }}\n checked={sort === 'oldest-to-newest'}\n label={t('Oldest to newest')}\n />\n </>\n );\n\n const filterOptions = (tab === 'action' ? initialActionFilter : initialAlertFilter).map(\n (suggestionStatus) => (\n <ControlledCheckbox\n key={suggestionStatus}\n onChange={() => {\n setFilter((s) =>\n s.includes(suggestionStatus)\n ? s.filter((suggestion) => suggestion !== suggestionStatus)\n : [...s, suggestionStatus],\n );\n }}\n checked={filter.includes(suggestionStatus)}\n label={capitalize(\n suggestionStatus === 'active'\n ? t('available')\n : suggestionStatus.replace(/([A-Z])/g, ' $1').trim(), // Transform camelCase or PascalCase\n )}\n />\n ),\n );\n\n const recommendationsExist = useMemo(() => {\n if (tab === 'action') {\n return !!(\n suggestions.active?.length ||\n suggestions.in_progress?.length ||\n suggestions.completed?.length ||\n suggestions.deferred?.length ||\n suggestions.dismissed?.length\n );\n }\n\n // otherwise we check what needs to exist for tab='alert'\n return !!(\n suggestions.active?.length ||\n suggestions.pinned?.length ||\n suggestions.history?.length\n );\n }, [suggestions, tab]);\n\n const router = useRouter();\n\n const parseDetails = (details) => {\n const linkRegex = /\\[([^\\]]+)\\]\\((https?:\\/\\/[^\\s)]+)\\)/g;\n const parts = [];\n let lastIndex = 0;\n\n let match;\n while ((match = linkRegex.exec(details)) !== null) {\n const [fullMatch, linkText, href] = match;\n const startIndex = match.index;\n\n // Add text before the link\n if (startIndex > lastIndex) {\n parts.push(details.slice(lastIndex, startIndex));\n }\n\n // Add the link\n parts.push(\n <Link\n key={href}\n href={href}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n sx={{\n textDecoration: 'none',\n color: 'primary.main',\n fontWeight: 'bold',\n }}\n >\n {linkText}\n </Link>,\n );\n\n lastIndex = startIndex + fullMatch.length;\n }\n\n // Add remaining text after the last link\n if (lastIndex < details.length) {\n parts.push(details.slice(lastIndex));\n }\n\n return parts;\n };\n\n const daysAgo = (createdAt) => {\n const daysAgo =\n Number(new Date(createdAt).toLocaleDateString('en-US', { day: 'numeric' })) -\n Number(new Date().toLocaleDateString('en-US', { day: 'numeric' }));\n return daysAgo;\n };\n\n const recommendationTypeLabels = {\n [EBuyerRecommendationType.action]: t('Action'),\n [EBuyerRecommendationType.alert]: t('Attention'),\n };\n\n const recommendationSectionData = [\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <PinIcon2 className=\"text-[#fff] mt-[-2px] ml-[-2px]\" /> */}\n <svg\n width=\"20\"\n height=\"21\"\n className=\"text-[#fff] mt-[-2px] ml-[-2px]\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.75 10.494V8.167h.833v-.834a.834.834 0 0 0-.833-.833h-2.5a.833.833 0 0 0-.833.833v.834h.833v2.327l-1.128.711A.415.415 0 0 0 7 11.5v.833a.417.417 0 0 0 .417.417h1.666V14l.417.833.417-.833v-1.25h1.666a.417.417 0 0 0 .417-.417V11.5a.416.416 0 0 0-.122-.295l-1.128-.71Z\"\n fill=\"#fff\"\n />\n </svg>\n </div>\n ),\n text: t('Pinned'),\n itemKey: 'pinned',\n },\n {\n // icon: <InfoSquare className=\"text-[#635E7D]\" />,\n Icon: (\n <svg\n width=\"20\"\n className=\"text-[#635E7D]\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2.5 3.83333V17.1667C2.5 17.3877 2.5878 17.5996 2.74408 17.7559C2.90036 17.9122 3.11232 18 3.33333 18H16.6667C16.8877 18 17.0996 17.9122 17.2559 17.7559C17.4122 17.5996 17.5 17.3877 17.5 17.1667V3.83333C17.5 3.61232 17.4122 3.40036 17.2559 3.24408C17.0996 3.0878 16.8877 3 16.6667 3H3.33333C3.11232 3 2.90036 3.0878 2.74408 3.24408C2.5878 3.40036 2.5 3.61232 2.5 3.83333ZM9.16667 6.33333H10.8333V8H9.16667V6.33333ZM9.16667 9.66667H10.8333V14.6667H9.16667V9.66667Z\"\n fill=\"#635E7D\"\n />\n </svg>\n ),\n text: t('Available'),\n itemKey: 'active',\n },\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <HorizontalOptionsIcon className=\"text-[#fff]\" /> */}\n <svg\n width=\"15\"\n height=\"15\"\n className=\"text-[#fff]\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.0007 8.33331C9.08398 8.33331 8.33398 9.08331 8.33398 9.99998C8.33398 10.9166 9.08398 11.6666 10.0007 11.6666C10.9173 11.6666 11.6673 10.9166 11.6673 9.99998C11.6673 9.08331 10.9173 8.33331 10.0007 8.33331ZM15.0007 8.33331C14.084 8.33331 13.334 9.08331 13.334 9.99998C13.334 10.9166 14.084 11.6666 15.0007 11.6666C15.9173 11.6666 16.6673 10.9166 16.6673 9.99998C16.6673 9.08331 15.9173 8.33331 15.0007 8.33331ZM5.00065 8.33331C4.08398 8.33331 3.33398 9.08331 3.33398 9.99998C3.33398 10.9166 4.08398 11.6666 5.00065 11.6666C5.91732 11.6666 6.66732 10.9166 6.66732 9.99998C6.66732 9.08331 5.91732 8.33331 5.00065 8.33331Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </div>\n ),\n text: t('In progress'),\n itemKey: 'in_progress',\n },\n {\n icon: (\n <svg\n width=\"20\"\n className=\"text-[#635E7D]\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M4.14286 2.5C3.57454 2.5 3.02949 2.72576 2.62763 3.12763C2.22576 3.52949 2 4.07454 2 4.64286V15.3571C2 15.9255 2.22576 16.4705 2.62763 16.8724C3.02949 17.2742 3.57454 17.5 4.14286 17.5H14.8571C15.4255 17.5 15.9705 17.2742 16.3724 16.8724C16.7742 16.4705 17 15.9255 17 15.3571V4.64286C17 4.07454 16.7742 3.52949 16.3724 3.12763C15.9705 2.72576 15.4255 2.5 14.8571 2.5H4.14286ZM8.42857 13.6579L5.52821 10.7575L7.04321 9.2425L8.42857 10.6279L12.4925 6.56393L14.0075 8.07893L8.42857 13.6579Z\"\n fill=\"#635E7D\"\n />\n </svg>\n ),\n text: t('Completed'),\n itemKey: 'completed',\n },\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <ForwardRightIcon className=\"text-[#fff]\" />\n */}\n <svg\n width=\"15\"\n height=\"15\"\n viewBox=\"0 0 20 20\"\n className=\"text-[#fff]\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M10.8836 4.11584L9.11523 5.88418L13.2319 10L9.11523 14.1158L10.8836 15.8842L16.7669 10L10.8836 4.11584Z\"\n fill=\"#1C1A27\"\n />\n <path\n d=\"M5.05154 15.8842L10.9349 10L5.05154 4.11584L3.2832 5.88418L7.39987 10L3.2832 14.1158L5.05154 15.8842Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </div>\n ),\n text: t('Deferred'),\n itemKey: 'deferred',\n },\n {\n icon: (\n <div className=\"bg-[#635E7D] rounded h-[15px] w-[15px]\">\n {/* <CloseBoxIcon className=\"text-[#fff] mt-[-2px] ml-[-3px]\" /> */}\n <svg\n width=\"20\"\n className=\"text-[#fff] mt-[-2px] ml-[-3px]\"\n height=\"21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.125 6.5 10.5 9.125 7.875 6.5 7 7.375 9.625 10 7 12.624l.875.875 2.625-2.624 2.625 2.624.875-.875L11.375 10 14 7.375l-.875-.875Z\"\n fill=\"#fff\"\n />\n </svg>\n </div>\n ),\n text: t('Dismissed'),\n itemKey: 'dismissed',\n },\n {\n icon: (\n <svg\n className=\"text-[#635E7D]\"\n width=\"20\"\n height=\"20\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M2.5 4.16667V15.8333C2.5 16.2754 2.67559 16.6993 2.98816 17.0118C3.30072 17.3244 3.72464 17.5 4.16667 17.5H15.8333C16.2754 17.5 16.6993 17.3244 17.0118 17.0118C17.3244 16.6993 17.5 16.2754 17.5 15.8333V4.16667C17.5 3.72464 17.3244 3.30072 17.0118 2.98816C16.6993 2.67559 16.2754 2.5 15.8333 2.5H4.16667C3.72464 2.5 3.30072 2.67559 2.98816 2.98816C2.67559 3.30072 2.5 3.72464 2.5 4.16667ZM8.33333 5.83333H15V7.5H8.33333V5.83333ZM8.33333 9.16667H15V10.8333H8.33333V9.16667ZM8.33333 12.5H15V14.1667H8.33333V12.5ZM5 5.83333H6.66667V7.5H5V5.83333ZM5 9.16667H6.66667V10.8333H5V9.16667ZM5 12.5H6.66667V14.1667H5V12.5Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n ),\n\n text: t('History'),\n itemKey: 'history',\n },\n ];\n\n return (\n <>\n <div>\n <div className=\"px-4\">\n <div className=\"flex justify-between items-center\">\n <h1\n className=\"text-[16px] font-md leading-5 flex items-center\"\n style={{ fontFamily: 'PlusJakartaSans', fontWeight: 600 }}\n id=\"step2\"\n >\n {t('To-do List')}\n <span className=\"ml-2 rounded-full w-6 h-6 flex items-center justify-center border border-[#C5C5C5]\">\n {(suggestions.active?.length || 0) +\n (suggestions.in_progress?.length || 0) +\n (suggestions.deferred?.length || 0)}\n </span>\n </h1>\n\n <div\n className=\"flex bg-transparent py-2 px-6 justify-between items-center gap-4 rounded-full\"\n style={{ border: '1px solid #EBEDEF' }}\n ref={refClickOutside}\n >\n <div className=\"flex w-full justify-center items-center relative\">\n <div\n className=\" text-transparent cursor-pointer\"\n onClick={() => setCurrentModal('sort')}\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M17 9L12 4L7 9\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M17 15L12 20L7 15\"\n stroke=\"black\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n <Dropdown\n className=\"min-w-[220px] !hidden lg:!flex text-[#1C1A27]\"\n isOpen={currentModal === 'sort'}\n >\n <div className=\"flex items-center justify-between px-5 pt-5\">\n <h6 className=\"font-medium\">{t('Sort by')}</h6>\n </div>\n\n <div className=\"flex flex-col gap-5 p-5\">{sortOptions}</div>\n </Dropdown>\n </div>\n\n <div className=\"flex w-full justify-center items-center relative\">\n <div\n className=\" text-transparent cursor-pointer\"\n onClick={() => setCurrentModal('filter')}\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M21 4H14\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M10 4H3\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M21 12H12\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M8 12H3\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M21 20H16\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M12 20H3\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M14 2V6\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M8 10V14\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M16 18V22\"\n stroke=\"#01130F\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </div>\n <Dropdown\n className=\"min-w-[220px] !hidden lg:!flex text-[#1C1A27]\"\n isOpen={currentModal === 'filter'}\n >\n <div className=\"flex items-center justify-between px-5 pt-5\">\n <h6 className=\"font-medium\">{t('Filter')}</h6>\n </div>\n\n <div className=\"flex flex-col gap-5 p-5\">{filterOptions}</div>\n </Dropdown>\n </div>\n </div>\n </div>\n\n {/* actions tabs commenting for now ticket Main-366 */}\n\n {/* <div className=\"flex w-[176px] justify-between gap-2 my-4\">\n <FilterPill\n text=\"Action\"\n active={tab === EBuyerRecommendationType.action}\n onClick={() => setTab(EBuyerRecommendationType.action)}\n />\n <FilterPill\n text=\"Attention\"\n active={tab === EBuyerRecommendationType.alert}\n onClick={() => setTab(EBuyerRecommendationType.alert)}\n />\n </div>\n\n <hr /> */}\n </div>\n <div className=\"mt-3\">\n {/* new suggestions */}\n\n {/* {newSuggestions?.length >= 0 ? (\n newSuggestions?.map((suggestion, index: any) => (\n <div className=\"border border-[#C5C5C5] rounded-2xl p-6 mt-6\">\n <div className=\"flex justify-between\">\n <div>\n <h3 className={'font-semibold mb-1 text-[#1C1A27]'}>{suggestion?.title.replace(/_/g, ' ')}</h3>\n <p className=\"flex items-center text-[#1C1A27] text-[12px] font-light\">\n {daysAgo(suggestion?.createdAt) > 0 ? (\n <>\n {daysAgo(suggestion?.createdAt)} day{daysAgo(suggestion?.createdAt) > 1 ? 's' : ''} ago\n </>\n ) : (\n 'Today'\n )}{' '}\n </p>\n </div>\n </div>\n <p className=\"mt-3 empty:mt-0 text-[12px] font-normal\">{suggestion?.details}</p>\n </div>\n <div className=\"flex flex-col gap-5 mb-5 p-5 w-full border-2 rounded-xl \">\n <h1\n className=\"text-[16px] font-md leading-5 flex items-center capitalize\"\n style={{ fontFamily: 'PlusJakartaSans', fontWeight: 600 }}\n id={`suggestion-${index}`}\n >\n {suggestion?.title.replace(/_/g, ' ')}\n </h1>\n <Typography\n variant=\"body2\"\n sx={{\n fontFamily: 'PlusJakartaSans',\n }}\n >\n {' '}\n {parseDetails(suggestion?.details)}\n </Typography>\n <Typography\n variant=\"body2\"\n sx={{\n fontFamily: 'PlusJakartaSans',\n }}\n >\n {' '}\n {suggestion?.status}\n </Typography>\n </div>\n <React.Fragment key={`recc-section-${index}`}>\n {!!index && <div className=\"bg-[#D0CAE9] h-px my-[30px]\" />}\n <RecommendationSection\n icon={'icon'}\n text={'text'}\n items={suggestions[suggestion]}\n activeActionRecoExists={activeActionRecoExists}\n activeAlertRecoExists={activeAlertRecoExists}\n latestActionRecoDate={latestActionRecoDate}\n latestAlertRecoDate={latestAlertRecoDate}\n />\n </React.Fragment>\n ))\n ))\n ) : (\n <Empty\n main={t('No recommendations available')}\n flavor={\n <>\n {t(\"Hang on... that's a good thing! \\n You deserve a break.\")}\n </>\n }\n />\n )} */}\n\n {recommendationsExist ? (\n <>\n {recommendationSectionData\n .filter(({ itemKey }) => suggestions[itemKey]?.length)\n .map(({ icon, text, itemKey }, index) => (\n <React.Fragment key={`recc-section-${index}`}>\n {!!index && <div className=\"bg-[#D0CAE9] h-px my-[30px]\" />}\n <RecommendationSection\n icon={icon}\n text={text}\n items={suggestions[itemKey]}\n activeActionRecoExists={activeActionRecoExists}\n activeAlertRecoExists={activeAlertRecoExists}\n latestActionRecoDate={latestActionRecoDate}\n latestAlertRecoDate={latestAlertRecoDate}\n />\n </React.Fragment>\n ))}\n </>\n ) : (\n <Empty\n main={t('No recommendations available')}\n flavor={<>{t(\"Hang on... that's a good thing! \\n You deserve a break.\")}</>}\n />\n )}\n\n <button\n id=\"history-button\"\n className=\"w-28 border flex justify-center mt-5 items-center gap-2 border-[#222B36] rounded-full text-[#3C3C3C] py-2 gap font-medium text-sm\"\n onClick={() => router.push('/user/summary/reco-history')}\n >\n <Image src=\"/images/history.png\" alt=\"history\" width={20} height={20} />\n <p>{t('History')}</p>\n </button>\n </div>\n </div>\n\n {!isDesktop && (\n <CleanModal\n onClose={() => {\n setCurrentModal(null);\n }}\n panelClassName=\"!rounded-none !rounded-t-lg !p-0\"\n wrapperClassName=\"!p-0 !items-end\"\n open={currentModal === 'sort'}\n >\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-b-gray-200\">\n <h6 className=\"text-gray-900 font-medium\">{t('Sort')}</h6>\n <button\n className=\"block ml-auto dark:text-white\"\n onClick={() => setCurrentModal(null)}\n type=\"button\"\n >\n {/* <CloseIcon width={20} strokeWidth={2} className=\"keep-color\" /> */}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={20}\n strokeWidth={2}\n className=\"keep-color\"\n fill=\"none\"\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n\n <div className=\"flex flex-col gap-6 p-6 pb-0 mb-12\">{sortOptions}</div>\n </CleanModal>\n )}\n {!isDesktop && (\n <CleanModal\n onClose={() => {\n setCurrentModal(null);\n }}\n panelClassName=\"!rounded-none !rounded-t-lg !p-0\"\n wrapperClassName=\"!p-0 !items-end\"\n open={currentModal === 'filter'}\n >\n <div className=\"flex items-center justify-between px-6 py-4 border-b border-b-gray-200\">\n <h6 className=\"text-gray-900 font-medium\">{t('Filter')}</h6>\n <button\n className=\"block ml-auto dark:text-white\"\n onClick={() => setCurrentModal(null)}\n type=\"button\"\n >\n {/* <CloseIcon width={20} strokeWidth={2} className=\"keep-color\" /> */}\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n width={20}\n strokeWidth={2}\n className=\"keep-color\"\n fill=\"none\"\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n\n <div className=\"flex flex-col gap-6 p-6 pb-0 mb-12\">{filterOptions}</div>\n </CleanModal>\n )}\n </>\n );\n};\n\nexport const BeAwareOf = () => {\n const { profile } = useAuthUser();\n const buyerId = profile?.id;\n const dummyData = [\n {\n title: 'Connect to rent reporting',\n description:\n 'Improve your credit score by linking a rent reporting tool. Open an account with credit reporting partner! ',\n },\n {\n title: 'Connect to rent reporting',\n description:\n 'Improve your credit score by linking a rent reporting tool. Open an account with credit reporting partner! ',\n },\n ];\n const [awareData, setAwareData] = useState<{ items: BuyerRecommendation[] }>({ items: [] });\n const getBuyerRecommendationsAwareData = async () => {\n const { data } = await ApiService.getBuyerRecommendations(buyerId);\n setAwareData(data);\n return data;\n };\n console.log('🚀 ~ getBuyerRecommendationsAwareData ~ data:', awareData);\n useEffect(() => {\n getBuyerRecommendationsAwareData();\n }, []);\n const { t } = useTranslation();\n\n return (\n <div>\n {awareData?.items?.filter((item) => item?.type === 'alert').length > 0 && (\n <div className=\" p-6 mt-6\">\n <Typography\n variant=\"h5\"\n className=\" font-md leading-5 flex items-center\"\n style={{ fontFamily: 'PlusJakartaSans', fontWeight: 600 }}\n >\n {t('Be Aware Of')}\n </Typography>\n\n <div className=\"flex flex-col flex-wrap xl:flex-row gap-5 \">\n {awareData?.items\n ?.filter((item) => item?.type === 'alert')\n .map((item, idx) => (\n <div\n className=\" flex flex-col md:flex-row items-center max-w-[40rem] gap-5 border border-[#C5C5C5] rounded-2xl p-6 mt-6\"\n key={idx}\n >\n {/* <WarningIcon className=\"text-orange-400 \" fontSize=\"large\" /> */}\n <Image\n src=\"/icons/warning-triangle.svg\"\n alt={item?.title}\n width={44}\n height={44}\n className=\"rounded-full\"\n />\n\n <div>\n <Typography\n variant=\"h6\"\n className=\"text-[16px] font-md leading-5 flex items-center\"\n >\n {/* {item?.title} */}\n </Typography>\n <Typography\n variant=\"body1\"\n className=\"text-[16px] max-w-[25] leading-5 flex items-center\"\n >\n {item.description}\n </Typography>\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n );\n};\n","import { useCalculateScore } from '@hooks';\nimport { ErrorState } from '@components/error-state';\nimport Image from \"next/image\";\n\nexport const AnalyzingData = () => {\n const { error } = useCalculateScore();\n return error ? (\n <ErrorState />\n ) : (\n <div className=\"text-center flex flex-col justify-center h-full flex-grow my-auto\">\n <div>\n <Image\n alt=\"\"\n width={320}\n height={261}\n src=\"/images/analyzing.png\"\n style={{\n maxWidth: \"320px\",\n height: \"261px\"\n }} />\n </div>\n <h1 className=\"font-slab font-semibold text-xl mb-4 mt-10\">Analyzing your data...</h1>\n <p className=\"text-[15px] text-gray-900 max-w-[268px] mx-auto\">\n Hold on while we build your profile and select the ideal recommendations.\n </p>\n </div>\n );\n};\n","import { useAuthUser, useBuyerSignupInfo, useOnboarding } from '@hooks';\nimport { commonRoutes } from '@utils';\nimport { Button } from '@components';\nimport Image from 'next/image';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\n\nexport const Thankyou = () => {\n const { id, signedIn } = useAuthUser(true);\n const { reset } = useBuyerSignupInfo();\n const { reset: resetCompleteModal } = useOnboarding();\n const [isShareOpen, setIsShareOpen] = useState(false);\n const router = useRouter();\n useEffect(() => {\n reset();\n resetCompleteModal();\n }, []);\n\n return (\n <div className=\"flex h-full bg-center bg-no-repeat bg-cover bg-sign-up-bg\">\n <div className=\"absolute inset-x-0 flex items-center justify-center h-full top-10\">\n <div className=\"absolute inset-x-0 flex items-center justify-center text-center top-10\">\n <Link href={commonRoutes.buyer.getStarted} legacyBehavior>\n <a>\n <Image\n src=\"https://mhp-icons.s3.amazonaws.com/white-lockup.png\"\n alt=\"Logo\"\n width={130}\n height={80}\n style={{\n objectFit: 'contain',\n }}\n />\n </a>\n </Link>\n </div>\n <div className=\"w-[90%] md:min-w-[554px] md:max-w-[554px] lg:justify-center mx-auto flex flex-col p-2.5 lg:p-[0.938rem] bg-white rounded my-auto\">\n <div className=\"flex flex-col justify-center\">\n <div className=\"mb-2.5 mx-auto relative\">\n <Image\n src=\"/images/sticker.png\"\n width={50}\n height={50}\n alt=\"sticker\"\n style={{\n objectFit: 'contain',\n }}\n />\n \n <svg width={16}\n className=\"text-black absolute top-[18px] left-[16px] items-center justify-center\" viewBox=\"0 0 18 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M5.79508 11.3925L1.62508 7.2225L0.205078 8.6325L5.79508 14.2225L17.7951 2.2225L16.3851 0.8125L5.79508 11.3925Z\" fill=\"white\"/>\n</svg>\n\n </div>\n <h1 className=\"mb-2 lg:mb-4 text-[32px] font-medium font-slab text-center\">\n Congratulations!\n </h1>\n <p className=\"text-sm text-[#635E7D] text-normal leading-6 description text-center\">\n Your account has been successfully created. To start enjoying our platform and access\n all features, please complete your account set-up.\n </p>\n </div>\n <div className=\"flex flex-row justify-center gap-5 mt-[1.875rem]\">\n {/* <Button\n type=\"button\"\n onClick={() => {\n router.push(commonRoutes.buyer.auth.summary);\n }}\n className=\"w-full\"\n >\n GO TO DASHBOARD\n </Button> */}\n <Button\n type=\"button\"\n onClick={() => {\n router.push(commonRoutes.buyer.auth.summary);\n }}\n className=\"w-full\"\n >\n ACCOUNT SET UP\n </Button>\n </div>\n </div>\n </div>\n <style jsx>{`\n .title {\n margin-top: 30px;\n\n font-size: 28px;\n }\n .description {\n font-size: 12px;\n }\n @media (min-height: 620px) {\n .title {\n font-size: 32px;\n margin-top: 80px;\n }\n .description {\n font-size: 14px;\n }\n }\n `}</style>\n </div>\n );\n};\n","import { commonRoutes } from '@utils';\nimport { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\n\nexport const useAuthRouteProtector = (user) => {\n const router = useRouter();\n\n const [routeAccessDenied, setRouteAccessDenied] = useState(true);\n\n useEffect(() => {\n const newRouteAccessDenied =\n ((Object.values(commonRoutes.buyer.auth) as string[]).some((path) => router.pathname.startsWith(path)) ||\n router.pathname.startsWith('/user/onboarding')) &&\n !user?.signedIn;\n\n if (newRouteAccessDenied) {\n // sets a redirect query param to the end of the sign-in link.\n const redirectLink = new URL(router.asPath, window.location.href);\n const redirectURLParams = new URLSearchParams();\n redirectURLParams.set('redirect', redirectLink.toString());\n const url = new URL(commonRoutes.buyer.signin, window.location.href);\n url.search = redirectURLParams.toString();\n router.replace(url.toString());\n }\n\n setRouteAccessDenied(newRouteAccessDenied);\n }, [user?.signedIn, router]);\n\n return {\n routeAccessDenied,\n };\n};\n","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar useTrackingCode = function useTrackingCode() {\n var _hsq = typeof window !== 'undefined' && window._hsq ? window._hsq : [];\n\n var setContentType = function setContentType(contentType) {\n _hsq.push(['setContentType', contentType]);\n };\n\n var setTrackPageView = function setTrackPageView() {\n _hsq.push(['trackPageView']);\n };\n\n var setPathPageView = function setPathPageView(path) {\n // This function updates the path\n _hsq.push(['setPath', path]); // This function track the current updated page path\n\n\n setTrackPageView();\n };\n\n var setIdentity = function setIdentity(email, customPropertities) {\n _hsq.push(['identify', _extends({\n email: email\n }, customPropertities)]);\n };\n\n var setTrackEvent = function setTrackEvent(_ref) {\n var eventId = _ref.eventId,\n value = _ref.value;\n\n _hsq.push(['trackEvent', {\n id: eventId,\n value: value\n }]);\n };\n\n return {\n setContentType: setContentType,\n setPathPageView: setPathPageView,\n setTrackPageView: setTrackPageView,\n setIdentity: setIdentity,\n setTrackEvent: setTrackEvent\n };\n};\n\nexport { useTrackingCode };\n//# sourceMappingURL=react-hubspot-tracking-code-hook.esm.js.map\n","import { useRouter } from 'next/router';\nimport { useEffect } from 'react';\nimport { useTrackingCode } from 'react-hubspot-tracking-code-hook';\n\nexport const useHubspotTracking = () => {\n const router = useRouter();\n\n const { setPathPageView } = useTrackingCode();\n\n useEffect(() => {\n setPathPageView(router.asPath);\n }, [router.asPath]);\n};\n","var Et=Object.create;var Ye=Object.defineProperty;var bt=Object.getOwnPropertyDescriptor;var gt=Object.getOwnPropertyNames;var yt=Object.getPrototypeOf,wt=Object.prototype.hasOwnProperty;var Lt=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports);var Pt=(n,e,r,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let o of gt(e))!wt.call(n,o)&&o!==r&&Ye(n,o,{get:()=>e[o],enumerable:!(i=bt(e,o))||i.enumerable});return n};var St=(n,e,r)=>(r=n!=null?Et(yt(n)):{},Pt(e||!n||!n.__esModule?Ye(r,\"default\",{value:n,enumerable:!0}):r,n));var je=Lt((he,Je)=>{(function(n,e){typeof he==\"object\"&&typeof Je<\"u\"?e(he):typeof define==\"function\"&&define.amd?define([\"exports\"],e):(n=typeof globalThis<\"u\"?globalThis:n||self,e(n.fastUniqueNumbers={}))})(he,function(n){\"use strict\";var e=function(l){return function(p){var f=l(p);return p.add(f),f}},r=function(l){return function(p,f){return l.set(p,f),f}},i=Number.MAX_SAFE_INTEGER===void 0?9007199254740991:Number.MAX_SAFE_INTEGER,o=536870912,u=o*2,g=function(l,p){return function(f){var B=p.get(f),y=B===void 0?f.size:B<u?B+1:0;if(!f.has(y))return l(f,y);if(f.size<o){for(;f.has(y);)y=Math.floor(Math.random()*u);return l(f,y)}if(f.size>i)throw new Error(\"Congratulations, you created a collection of unique numbers which uses all available integers!\");for(;f.has(y);)y=Math.floor(Math.random()*i);return l(f,y)}},O=new WeakMap,W=r(O),m=g(W,O),a=e(m);n.addUniqueNumber=a,n.generateUniqueNumber=m})});import{Component as Mt,forwardRef as Rt}from\"react\";import{jsx as At}from\"react/jsx-runtime\";function kt(n){return Rt(function(r,i){let o={...r},u=se(o);return typeof i==\"function\"?i(u):i&&(i.current=u),At(n,{...r,...u})})}var Re=class extends Mt{},ke=class extends Re{constructor(e){super(e),this.onPresenceChange&&e.setOnPresenceChange(this.onPresenceChange.bind(this)),this.onPrompt&&e.setOnPrompt(this.onPrompt.bind(this)),this.onIdle&&e.setOnIdle(this.onIdle.bind(this)),this.onActive&&e.setOnActive(this.onActive.bind(this)),this.onAction&&e.setOnAction(this.onAction.bind(this)),this.onMessage&&e.setOnMessage(this.onMessage.bind(this))}};import{useEffect as b,useRef as c,useCallback as T,useMemo as Dt}from\"react\";var oe=St(je());var Xe=n=>n.method!==void 0&&n.method===\"call\";var ze=n=>n.error===null&&typeof n.id==\"number\";var Ke=n=>{let e=new Map([[0,()=>{}]]),r=new Map([[0,()=>{}]]),i=new Map,o=new Worker(n);return o.addEventListener(\"message\",({data:m})=>{if(Xe(m)){let{params:{timerId:a,timerType:d}}=m;if(d===\"interval\"){let l=e.get(a);if(typeof l==\"number\"){let p=i.get(l);if(p===void 0||p.timerId!==a||p.timerType!==d)throw new Error(\"The timer is in an undefined state.\")}else if(typeof l<\"u\")l();else throw new Error(\"The timer is in an undefined state.\")}else if(d===\"timeout\"){let l=r.get(a);if(typeof l==\"number\"){let p=i.get(l);if(p===void 0||p.timerId!==a||p.timerType!==d)throw new Error(\"The timer is in an undefined state.\")}else if(typeof l<\"u\")l(),r.delete(a);else throw new Error(\"The timer is in an undefined state.\")}}else if(ze(m)){let{id:a}=m,d=i.get(a);if(d===void 0)throw new Error(\"The timer is in an undefined state.\");let{timerId:l,timerType:p}=d;i.delete(a),p===\"interval\"?e.delete(l):r.delete(l)}else{let{error:{message:a}}=m;throw new Error(a)}}),{clearInterval:m=>{let a=(0,oe.generateUniqueNumber)(i);i.set(a,{timerId:m,timerType:\"interval\"}),e.set(m,a),o.postMessage({id:a,method:\"clear\",params:{timerId:m,timerType:\"interval\"}})},clearTimeout:m=>{let a=(0,oe.generateUniqueNumber)(i);i.set(a,{timerId:m,timerType:\"timeout\"}),r.set(m,a),o.postMessage({id:a,method:\"clear\",params:{timerId:m,timerType:\"timeout\"}})},setInterval:(m,a)=>{let d=(0,oe.generateUniqueNumber)(e);return e.set(d,()=>{m(),typeof e.get(d)==\"function\"&&o.postMessage({id:null,method:\"set\",params:{delay:a,now:performance.now(),timerId:d,timerType:\"interval\"}})}),o.postMessage({id:null,method:\"set\",params:{delay:a,now:performance.now(),timerId:d,timerType:\"interval\"}}),d},setTimeout:(m,a)=>{let d=(0,oe.generateUniqueNumber)(r);return r.set(d,m),o.postMessage({id:null,method:\"set\",params:{delay:a,now:performance.now(),timerId:d,timerType:\"timeout\"}}),d}}};var Qe=(n,e)=>{let r=null;return()=>{if(r!==null)return r;let i=new Blob([e],{type:\"application/javascript; charset=utf-8\"}),o=URL.createObjectURL(i);return r=n(o),setTimeout(()=>URL.revokeObjectURL(o)),r}};var Ze=`(()=>{\"use strict\";const e=new Map,t=new Map,r=(e,t)=>{let r,o;const i=performance.now();r=i,o=e-Math.max(0,i-t);return{expected:r+o,remainingDelay:o}},o=(e,t,r,i)=>{const s=performance.now();s>r?postMessage({id:null,method:\"call\",params:{timerId:t,timerType:i}}):e.set(t,setTimeout(o,r-s,e,t,r,i))};addEventListener(\"message\",(i=>{let{data:s}=i;try{if(\"clear\"===s.method){const{id:r,params:{timerId:o,timerType:i}}=s;if(\"interval\"===i)(t=>{const r=e.get(t);if(void 0===r)throw new Error('There is no interval scheduled with the given id \"'.concat(t,'\".'));clearTimeout(r),e.delete(t)})(o),postMessage({error:null,id:r});else{if(\"timeout\"!==i)throw new Error('The given type \"'.concat(i,'\" is not supported'));(e=>{const r=t.get(e);if(void 0===r)throw new Error('There is no timeout scheduled with the given id \"'.concat(e,'\".'));clearTimeout(r),t.delete(e)})(o),postMessage({error:null,id:r})}}else{if(\"set\"!==s.method)throw new Error('The given method \"'.concat(s.method,'\" is not supported'));{const{params:{delay:i,now:n,timerId:a,timerType:d}}=s;if(\"interval\"===d)((t,i,s)=>{const{expected:n,remainingDelay:a}=r(t,s);e.set(i,setTimeout(o,a,e,i,n,\"interval\"))})(i,a,n);else{if(\"timeout\"!==d)throw new Error('The given type \"'.concat(d,'\" is not supported'));((e,i,s)=>{const{expected:n,remainingDelay:a}=r(e,s);t.set(i,setTimeout(o,a,t,i,n,\"timeout\"))})(i,a,n)}}}}catch(e){postMessage({error:{message:e.message},id:s.id,result:null})}}))})();`;var ve=Qe(Ke,Ze),et=n=>ve().clearInterval(n),tt=n=>ve().clearTimeout(n),rt=(n,e)=>ve().setInterval(n,e),nt=(n,e)=>ve().setTimeout(n,e);var M=(typeof window>\"u\"?\"undefined\":typeof window)==\"object\";var I={setTimeout:M?setTimeout.bind(window):setTimeout,clearTimeout:M?clearTimeout.bind(window):clearTimeout,setInterval:M?setInterval.bind(window):setInterval,clearInterval:M?clearInterval.bind(window):clearInterval},ae={setTimeout:nt,clearTimeout:tt,setInterval:rt,clearInterval:et};function Ot(){I.setTimeout=setTimeout,I.clearTimeout=clearTimeout,I.setInterval=setInterval,I.clearInterval=clearInterval,ae.setTimeout=setTimeout,ae.clearTimeout=clearTimeout,ae.setInterval=setInterval,ae.clearInterval=clearInterval}function it(n){I.setTimeout=n.setTimeout,I.clearTimeout=n.clearTimeout,I.setInterval=n.setInterval,I.clearInterval=n.clearInterval}var Q={},Ae=class{name;closed=!1;mc=new MessageChannel;constructor(e){this.name=e,Q[e]=Q[e]||[],Q[e].push(this),this.mc.port1.start(),this.mc.port2.start(),this.onStorage=this.onStorage.bind(this),window.addEventListener(\"storage\",this.onStorage)}onStorage(e){if(e.storageArea!==window.localStorage||e.key.substring(0,this.name.length)!==this.name||e.newValue===null)return;let r=JSON.parse(e.newValue);this.mc.port2.postMessage(r)}postMessage(e){if(this.closed)throw new Error(\"InvalidStateError\");let r=JSON.stringify(e),i=`${this.name}:${String(Date.now())}${String(Math.random())}`;window.localStorage.setItem(i,r),I.setTimeout(()=>{window.localStorage.removeItem(i)},500),Q[this.name].forEach(o=>{o!==this&&o.mc.port2.postMessage(JSON.parse(r))})}close(){if(this.closed)return;this.closed=!0,this.mc.port1.close(),this.mc.port2.close(),window.removeEventListener(\"storage\",this.onStorage);let e=Q[this.name].indexOf(this);Q[this.name].splice(e,1)}get onmessage(){return this.mc.port1.onmessage}set onmessage(e){this.mc.port1.onmessage=e}get onmessageerror(){return this.mc.port1.onmessageerror}set onmessageerror(e){this.mc.port1.onmessageerror=e}addEventListener(e,r){return this.mc.port1.addEventListener(e,r)}removeEventListener(e,r){return this.mc.port1.removeEventListener(e,r)}dispatchEvent(e){return this.mc.port1.dispatchEvent(e)}},st=typeof window>\"u\"?void 0:typeof window.BroadcastChannel==\"function\"?window.BroadcastChannel:Ae;function ot(n=0){return new Promise(e=>I.setTimeout(e,n))}function Te(){return Math.random().toString(36).substring(2)}var Ie=class{options;channel;token=Te();isLeader=!1;isDead=!1;isApplying=!1;reApply=!1;intervals=[];listeners=[];deferred;constructor(e,r){this.channel=e,this.options=r,this.apply=this.apply.bind(this),this.awaitLeadership=this.awaitLeadership.bind(this),this.sendAction=this.sendAction.bind(this)}async apply(){if(this.isLeader||this.isDead)return!1;if(this.isApplying)return this.reApply=!0,!1;this.isApplying=!0;let e=!1,r=i=>{let{token:o,action:u}=i.data;o!==this.token&&(u===0&&o>this.token&&(e=!0),u===1&&(e=!0))};this.channel.addEventListener(\"message\",r);try{return this.sendAction(0),await ot(this.options.responseTime),this.channel.removeEventListener(\"message\",r),this.isApplying=!1,e?this.reApply?this.apply():!1:(this.assumeLead(),!0)}catch{return!1}}awaitLeadership(){if(this.isLeader)return Promise.resolve();let e=!1,r=null;return new Promise(i=>{let o=()=>{if(e)return;e=!0;try{I.clearInterval(r)}catch{}let g=this.intervals.indexOf(r);g>=0&&this.intervals.splice(g,1),this.channel.removeEventListener(\"message\",u),i()};r=I.setInterval(()=>{this.apply().then(()=>{this.isLeader&&o()})},this.options.fallbackInterval),this.intervals.push(r);let u=g=>{let{action:O}=g.data;O===2&&this.apply().then(()=>{this.isLeader&&o()})};this.channel.addEventListener(\"message\",u)})}sendAction(e){this.channel.postMessage({action:e,token:this.token})}assumeLead(){this.isLeader=!0;let e=r=>{let{action:i}=r.data;i===0&&this.sendAction(1)};return this.channel.addEventListener(\"message\",e),this.listeners.push(e),this.sendAction(1)}waitForLeadership(){return this.deferred?this.deferred:(this.deferred=this.awaitLeadership(),this.deferred)}close(){if(!this.isDead){this.isDead=!0,this.isLeader=!1,this.sendAction(2);try{this.listeners.forEach(e=>this.channel.removeEventListener(\"message\",e)),this.intervals.forEach(e=>I.clearInterval(e))}catch{}}}};var Ee=class{channel;options;elector;token=Te();registry=new Map;allIdle=!1;isLastActive=!1;constructor(e){let{channelName:r}=e;if(this.options=e,this.channel=new st(r),this.registry.set(this.token,1),e.leaderElection){let i={fallbackInterval:2e3,responseTime:100};this.elector=new Ie(this.channel,i),this.elector.waitForLeadership()}this.channel.addEventListener(\"message\",i=>{let{action:o,token:u,data:g}=i.data;switch(o){case 3:this.registry.set(u,2);break;case 4:this.registry.delete(u);break;case 5:this.idle(u);break;case 6:this.active(u);break;case 7:this.prompt(u);break;case 8:this.start(u);break;case 9:this.reset(u);break;case 10:this.activate(u);break;case 11:this.pause(u);break;case 12:this.resume(u);break;case 13:this.options.onMessage(g);break}}),this.send(3)}get isLeader(){if(!this.elector)throw new Error('\\u274C Leader election is not enabled. To Enable it set the \"leaderElection\" property to true.');return this.elector.isLeader}prompt(e=this.token){this.registry.set(e,0);let r=[...this.registry.values()].every(i=>i===0);e===this.token&&this.send(7),r&&this.options.onPrompt()}idle(e=this.token){this.registry.set(e,2);let r=[...this.registry.values()].every(i=>i===2);e===this.token&&this.send(5),!this.allIdle&&r&&(this.allIdle=!0,this.options.onIdle())}active(e=this.token){this.allIdle=!1,this.registry.set(e,1);let r=[...this.registry.values()].some(i=>i===1);e===this.token&&this.send(6),r&&this.options.onActive(),this.isLastActive=e===this.token}start(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(8):this.options.start(!0),this.isLastActive=e===this.token}reset(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(9):this.options.reset(!0),this.isLastActive=e===this.token}activate(e=this.token){this.allIdle=!1,this.registry.set(e,1),e===this.token?this.send(10):this.options.activate(!0),this.isLastActive=e===this.token}pause(e=this.token){e===this.token?this.send(11):this.options.pause(!0)}resume(e=this.token){e===this.token?this.send(12):this.options.resume(!0)}message(e){try{this.channel.postMessage({action:13,token:this.token,data:e})}catch{}}send(e){try{this.channel.postMessage({action:e,token:this.token})}catch{}}close(){this.options.leaderElection&&this.elector.close(),this.send(4),this.channel.close()}};var at=M?document:null,xe=[\"mousemove\",\"keydown\",\"wheel\",\"DOMMouseScroll\",\"mousewheel\",\"mousedown\",\"touchstart\",\"touchmove\",\"MSPointerDown\",\"MSPointerMove\",\"visibilitychange\",\"focus\"];function ct(n,e){let r;function i(...o){r&&clearTimeout(r),r=setTimeout(()=>{n(...o),r=null},e)}return i.cancel=function(){clearTimeout(r)},i}function be(n,e){let r=0;return function(...i){let o=new Date().getTime();if(!(o-r<e))return r=o,n(...i)}}var v=()=>Date.now();var Z=2147483647;function se({timeout:n=1e3*60*20,promptTimeout:e=0,promptBeforeIdle:r=0,element:i=at,events:o=xe,timers:u=void 0,immediateEvents:g=[],onPresenceChange:O=()=>{},onPrompt:W=()=>{},onIdle:m=()=>{},onActive:a=()=>{},onAction:d=()=>{},onMessage:l=()=>{},debounce:p=0,throttle:f=0,eventsThrottle:B=200,startOnMount:y=!0,startManually:D=!1,stopOnIdle:ce=!1,crossTab:j=!1,name:Oe=\"idle-timer\",syncTimers:ee=0,leaderElection:Ce=!1,disabled:C=!1}={}){let De=c(v()),ue=c(v()),w=c(null),R=c(null),F=c(0),te=c(0),N=c(0),S=c(0),h=c(!1),E=c(!1),H=c(!1),_=c(!0),re=c(!1),U=c(null),s=c(null),k=c(n),G=c(0);b(()=>{if(e&&console.warn(\"\\u26A0\\uFE0F IdleTimer -- The `promptTimeout` property has been deprecated in favor of `promptBeforeIdle`. It will be removed in the next major release.\"),r&&e)throw new Error(\"\\u274C Both promptTimeout and promptBeforeIdle can not be set. The promptTimeout property will be deprecated in a future version.\");if(n>=Z)throw new Error(`\\u274C The value for the timeout property must fit in a 32 bit signed integer, ${Z}.`);if(e>=Z)throw new Error(`\\u274C The value for the promptTimeout property must fit in a 32 bit signed integer, ${Z}.`);if(r>=Z)throw new Error(`\\u274C The value for the promptBeforeIdle property must fit in a 32 bit signed integer, ${Z}.`);if(r>=n)throw new Error(`\\u274C The value for the promptBeforeIdle property must be less than the timeout property, ${n}.`);if(r?(k.current=n-r,G.current=r):(k.current=n,G.current=e),!_.current){if(D||C)return;h.current&&(X.current(null,L),s.current&&s.current.active()),J()}},[n,e,r,D,C]);let Ne=c(ce);b(()=>{Ne.current=ce},[ce]);let He=c(g),ne=c(i),ye=c([...new Set([...o,...g]).values()]),A=c(C);b(()=>{A.current=C,!_.current&&(C?fe():D||J())},[C]);let ie=c(O);b(()=>{ie.current=O},[O]);let le=c(W);b(()=>{le.current=W},[W]);let me=c(m);b(()=>{me.current=m},[m]);let X=c(a);b(()=>{X.current=a},[a]);let de=c(d);b(()=>{de.current=d},[d]);let z=c(l);b(()=>{z.current=l},[l]);let q=Dt(()=>{let t=(P,K)=>de.current(P,K);return p>0?ct(t,p):f>0?be(t,f):t},[f,p]),_e=c();b(()=>{j&&ee&&(_e.current=be(()=>{s.current.active()},ee))},[j,ee]);let x=()=>{U.current!==null&&(I.clearTimeout(U.current),U.current=null)},$=(t,P=!0)=>{x(),U.current=I.setTimeout(Le,t||k.current),P&&(R.current=v())},Ue=t=>{!E.current&&!h.current&&(le.current(t,L),ie.current({type:\"active\",prompted:!0},L)),S.current=0,N.current=v(),E.current=!0,$(G.current,!1)},Fe=()=>{x(),h.current||(me.current(null,L),ie.current({type:\"idle\"},L)),h.current=!0,w.current=v(),Ne.current?Y():E.current&&(N.current=0,E.current=!1)},we=t=>{x(),(h.current||E.current)&&(X.current(t,L),ie.current({type:\"active\",prompted:!1},L)),E.current=!1,N.current=0,h.current=!1,F.current+=v()-w.current,te.current+=v()-w.current,V(),$()},Le=t=>{if(!h.current){q.cancel&&q.cancel();let K=v()-R.current;if(!(k.current+G.current<K)&&G.current>0&&!E.current){s.current?s.current.prompt():Ue(t);return}s.current?s.current.idle():Fe();return}s.current?s.current.active():we(t)},Pe=t=>{if(!y&&!R.current&&(R.current=v(),X.current(null,L)),q(t,L),E.current)return;if(x(),!h.current&&He.current.includes(t.type)){Le(t);return}let P=v()-R.current;if(h.current&&!ce||!h.current&&P>=k.current){Le(t);return}H.current=!1,S.current=0,N.current=0,$(),j&&ee&&_e.current()},pe=c(Pe);b(()=>{let t=re.current;t&&Y(),B>0?pe.current=be(Pe,B):pe.current=Pe,t&&V()},[B,f,p,de,j,ee]);let V=()=>{M&&ne.current&&(re.current||(ye.current.forEach(t=>{ne.current.addEventListener(t,pe.current,{capture:!0,passive:!0})}),re.current=!0))},Y=(t=!1)=>{M&&ne.current&&(re.current||t)&&(ye.current.forEach(P=>{ne.current.removeEventListener(P,pe.current,{capture:!0})}),re.current=!1)},J=T(t=>A.current?!1:(x(),V(),h.current=!1,E.current=!1,H.current=!1,S.current=0,N.current=0,s.current&&!t&&s.current.start(),$(),!0),[U,h,A,k,s]),Se=T(t=>A.current?!1:(x(),V(),ue.current=v(),F.current+=v()-w.current,te.current+=v()-w.current,F.current=0,h.current=!1,E.current=!1,H.current=!1,S.current=0,N.current=0,s.current&&!t&&s.current.reset(),D||$(),!0),[U,h,k,D,A,s]),Ve=T(t=>A.current?!1:(x(),V(),(h.current||E.current)&&we(),h.current=!1,E.current=!1,H.current=!1,S.current=0,N.current=0,ue.current=v(),s.current&&!t&&s.current.activate(),$(),!0),[U,h,E,A,k,s]),fe=T((t=!1)=>A.current||H.current?!1:(S.current=We(),H.current=!0,Y(),x(),s.current&&!t&&s.current.pause(),!0),[U,A,s]),Me=T((t=!1)=>A.current||!H.current?!1:(H.current=!1,E.current||V(),h.current||$(S.current),N.current&&(N.current=v()),s.current&&!t&&s.current.resume(),!0),[U,k,A,S,s]),ut=T((t,P)=>(s.current?(P&&z.current(t,L),s.current.message(t)):P&&z.current(t,L),!0),[l]),lt=T(()=>h.current,[h]),mt=T(()=>E.current,[E]),dt=T(()=>s.current?s.current.isLeader:null,[s]),pt=T(()=>s.current?s.current.isLastActive:null,[s]),ft=T(()=>s.current?s.current.token:null,[s]),We=T(()=>{if(H.current)return S.current;let t=S.current?S.current:G.current+k.current,P=R.current?v()-R.current:0,K=Math.floor(t-P);return K<0?0:Math.abs(K)},[k,G,E,S,R]),Be=T(()=>Math.round(v()-ue.current),[ue]),Ge=T(()=>Math.round(v()-De.current),[De]),ht=T(()=>w.current?new Date(w.current):null,[w]),vt=T(()=>R.current?new Date(R.current):null,[R]),qe=T(()=>h.current?Math.round(v()-w.current+F.current):Math.round(F.current),[w,F]),$e=T(()=>h.current?Math.round(v()-w.current+te.current):Math.round(te.current),[w,te]),Tt=T(()=>{let t=Math.round(Be()-qe());return t>=0?t:0},[w,F]),It=T(()=>{let t=Math.round(Ge()-$e());return t>=0?t:0},[w,F]);b(()=>{if(p>0&&f>0)throw new Error(\"\\u274C onAction can either be throttled or debounced, not both.\");u&&it(u);let t=()=>{s.current&&s.current.close(),q.cancel&&q.cancel(),x(),Y(!0)};return M&&window.addEventListener(\"beforeunload\",t),()=>{M&&window.removeEventListener(\"beforeunload\",t),s.current&&s.current.close(),q.cancel&&q.cancel(),x(),Y(!0)}},[]),b(()=>{s.current&&s.current.close(),j?s.current=new Ee({channelName:Oe,leaderElection:Ce,onPrompt:()=>{Ue()},onIdle:()=>{Fe()},onActive:()=>{we()},onMessage:t=>{z.current(t,L)},start:J,reset:Se,activate:Ve,pause:fe,resume:Me}):s.current=null},[j,Oe,Ce,le,me,X,z,J,Se,fe,Me]),b(()=>{_.current||(x(),Y(!0)),!(D||C)&&(y?J():V())},[D,y,C,_]),b(()=>{if(!_.current){let t=[...new Set([...o,...g]).values()];if(Y(),ye.current=t,ne.current=i,He.current=g,D||C)return;y?J():V()}},[i,JSON.stringify(o),JSON.stringify(g),_,C,D,y]),b(()=>{_.current&&(_.current=!1)},[_]);let L={message:ut,start:J,reset:Se,activate:Ve,pause:fe,resume:Me,isIdle:lt,isPrompted:mt,isLeader:dt,isLastActiveTab:pt,getTabId:ft,getRemainingTime:We,getElapsedTime:Be,getTotalElapsedTime:Ge,getLastIdleTime:ht,getLastActiveTime:vt,getIdleTime:qe,getTotalIdleTime:$e,getActiveTime:Tt,getTotalActiveTime:It,setOnPresenceChange:t=>{O=t,ie.current=t},setOnPrompt:t=>{W=t,le.current=t},setOnIdle:t=>{m=t,me.current=t},setOnActive:t=>{a=t,X.current=t},setOnAction:t=>{d=t,de.current=t},setOnMessage:t=>{l=t,z.current=t}};return L}import{createContext as Nt,useContext as Ht}from\"react\";import{jsx as Vt}from\"react/jsx-runtime\";var ge=Nt(null);function _t(n){let e=se(n);return Vt(ge.Provider,{value:e,children:n.children})}var Ut=ge.Consumer;function Ft(){return Ht(ge)}export{xe as DEFAULT_EVENTS,ke as IdleTimerComponent,Ut as IdleTimerConsumer,ge as IdleTimerContext,_t as IdleTimerProvider,Ot as createMocks,se as useIdleTimer,Ft as useIdleTimerContext,kt as withIdleTimer,ae as workerTimers};\n","import { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\nimport { useIdleTimer } from 'react-idle-timer';\n\n// These two add up, so since we want to logout user\n// after 15m.\n// 780000 - 5min .\nconst idleTimeout = 300_000;\n// 120000 - 2min .\nconst promptTimeout = 120_000;\n\nexport const useIdleLogout = (user) => {\n const router = useRouter();\n\n const [showIdle, setShowIdle] = useState<boolean>(false);\n const [remaining, setRemaining] = useState<number>(promptTimeout / 1000);\n\n const showIdlePrompt = () => {\n setShowIdle(true);\n setRemaining(promptTimeout / 1000);\n };\n\n const logoutAfterIdle = () => {\n setShowIdle(false);\n user.logout();\n router.push('/user/sign-in');\n };\n\n const resetIdleTimer = () => {\n setShowIdle(false);\n idleTimer.activate();\n };\n\n const idleTimer = useIdleTimer({\n timeout: idleTimeout,\n promptTimeout,\n onPrompt: showIdlePrompt,\n onIdle: logoutAfterIdle,\n startManually: true,\n stopOnIdle: false,\n });\n\n // Logged in time effects\n useEffect(() => {\n let interval;\n\n if (showIdle) {\n interval = setInterval(() => {\n const remainingTime = idleTimer.getRemainingTime();\n if (remainingTime > 0) {\n setRemaining(Math.ceil(remainingTime / 1000));\n } else {\n setShowIdle(false);\n logoutAfterIdle();\n }\n }, 500);\n }\n\n return () => {\n if (interval) {\n clearInterval(interval);\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [showIdle]);\n\n useEffect(() => {\n if (user) {\n if (user.signedIn) {\n idleTimer.activate();\n } else {\n idleTimer.pause();\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [user?.signedIn]);\n\n return {\n showIdle,\n remaining,\n resetIdleTimer,\n };\n};\n","import { useEffect, useMemo } from 'react';\nimport dayjs from 'dayjs';\nimport mixpanel from 'mixpanel-browser';\n\n\n\n\n\nconst SESSION_ACTIVE = 'session_active';\n\nexport const useKeepMixpanelSessionAlive = (user) => {\n const sessionTrackingId = useMemo(() => (Math.random() + 1).toString(36).substring(7), []);\n useEffect(() => {\n const currentUrl = window.location.href;\n \n if (currentUrl.includes('dev')) {\n console.log('This is the development environment');\n } else if (currentUrl.includes('staging')) {\n console.log('This is the staging environment');\n } else {\n console.log('This is the production environment');\n mixpanel.init(process.env.NEXT_PUBLIC_MIXPANEL_TOKEN);\n }\n }, []);\n const sendActivityTrackingEvent = () => {\n if (\n !localStorage.getItem('sessionTrackingId') ||\n !localStorage.getItem('lastSessionUpdateDate') ||\n // So if more than 6mins have past since last session update\n // most likely the previous opened tab has been closed and the current one can pick up the slack\n dayjs().diff(dayjs(localStorage.getItem('lastSessionUpdateDate')), 'minutes') > 6\n ) {\n localStorage.setItem('sessionTrackingId', sessionTrackingId);\n }\n\n // and if the current sessionTrackingId is equal to the current tabs sessionTrackingId\n // this tab can be sending out the keep session alive events\n if (localStorage.getItem('sessionTrackingId') === sessionTrackingId) {\n localStorage.setItem('lastSessionUpdateDate', dayjs().toISOString());\n if (user?.email) {\n mixpanel.track(SESSION_ACTIVE, { distinct_id: user.email });\n }\n }\n };\n\n useEffect(() => {\n let interval;\n\n if (user.signedIn) {\n // 5minutes - 300000ms\n interval = setInterval(sendActivityTrackingEvent, 300000);\n } else {\n clearInterval(interval);\n }\n\n return () => {\n if (interval) {\n clearInterval(interval);\n }\n };\n }, [user.signedIn]);\n};\n","import { useSyncData } from '@hooks';\nimport { useEffect } from 'react';\n\nexport const useSyncOnLogin = (user) => {\n const syncDataMutation = useSyncData(false);\n\n // Sync data on login effect\n useEffect(() => {\n if (\n [\n user?.profile?.onboardingTransactionAccountStatus,\n user?.profile?.onboardingIncomeAccountStatus,\n ].some((val) => val === 'completed') &&\n !user?.profile?.isFetchingVerifiedData &&\n !user?.dataSynced\n ) {\n syncDataMutation.mutateAsync();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n user?.profile?.onboardingTransactionAccountStatus,\n user?.profile?.onboardingIncomeAccountStatus,\n user?.profile?.isFetchingVerifiedData,\n user?.dataSynced,\n ]);\n};\n","import { useAuthUser } from '@hooks';\nimport { GenericModal } from '@components/modal/generic-modal';\nimport { useAuthRouteProtector } from './use-auth-route-protector';\nimport { useHubspotTracking } from './use-hubspot-tracking';\nimport { useIdleLogout } from './use-idle-logout';\nimport { useKeepMixpanelSessionAlive } from './use-keep-mixpanel-session-alive';\nimport { useSyncOnLogin } from './use-sync-on-login';\n\nexport const AppWrapper = ({ children }) => {\n const user = useAuthUser();\n\n useSyncOnLogin(user);\n\n const { showIdle, remaining, resetIdleTimer } = useIdleLogout(user);\n\n const { routeAccessDenied } = useAuthRouteProtector(user);\n\n useHubspotTracking();\n\n useKeepMixpanelSessionAlive(user);\n\n return (\n <>\n {!routeAccessDenied ? <>{children}</> : <div />}\n {showIdle && (\n <GenericModal\n title=\"You are about to be logged out\"\n content={<div>Logging out in {remaining} seconds</div>}\n actionTitle=\"I'm still here\"\n onActionClick={resetIdleTimer}\n />\n )}\n </>\n );\n};\n","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgDiceCategoryOther = function SvgDiceCategoryOther(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.833 2.5H4.167c-.92 0-1.667.748-1.667 1.667v11.666c0 .92.748 1.667 1.667 1.667h11.666c.92 0 1.667-.747 1.667-1.667V4.167c0-.92-.747-1.667-1.667-1.667zM6.667 14.583a1.25 1.25 0 110-2.498 1.25 1.25 0 010 2.498zm0-6.666a1.25 1.25 0 110-2.501 1.25 1.25 0 010 2.5zM10 11.25a1.25 1.25 0 11.001-2.501A1.25 1.25 0 0110 11.25zm3.333 3.333a1.248 1.248 0 01-1.154-1.729 1.25 1.25 0 111.154 1.73zm0-6.666a1.25 1.25 0 11.001-2.5 1.25 1.25 0 010 2.5z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgDiceCategoryOther;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgBankFeesCategory = function SvgBankFeesCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1.668 6.666V10h.833v5h-.833v2.5h16.667V15H17.5v-5h.834V6.666l-8.334-5-8.333 5zm3.333 8.333V10h1.667v5H5.001zm4.167 0V10h1.667v5H9.168zm5.833 0h-1.666V10H15v5zm-3.333-8.333a1.669 1.669 0 01-2.846 1.178 1.667 1.667 0 112.846-1.178z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgBankFeesCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgCashAdvanceCategory = function SvgCashAdvanceCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.505 3.336h15c.46 0 .834.373.834.833v11.667c0 .46-.373.833-.834.833h-15a.833.833 0 01-.833-.833V4.169c0-.46.373-.833.833-.833zM5.418 5H3.335v2.083c1.15 0 2.083-.932 2.083-2.083zm9.167 0c0 1.15.933 2.083 2.083 2.083V5h-2.083zm-11.25 7.917V15h2.083c0-1.15-.933-2.083-2.083-2.083zM14.585 15h2.083v-2.083c-1.15 0-2.083.933-2.083 2.083zM10 13.334a3.333 3.333 0 100-6.667 3.333 3.333 0 000 6.667z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgCashAdvanceCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgCommunityCategory = function SvgCommunityCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.001 8.333a3.333 3.333 0 100-6.667 3.333 3.333 0 000 6.667zm-5.416 2.5a2.083 2.083 0 100-4.167 2.083 2.083 0 000 4.167zM17.5 8.749a2.083 2.083 0 11-4.166 0 2.083 2.083 0 014.166 0zm-7.5.417a4.167 4.167 0 014.167 4.167v5H5.835v-5A4.167 4.167 0 0110 9.166zm-5.833 4.167c0-.578.084-1.136.24-1.662l-.141.012a2.917 2.917 0 00-2.599 2.9v3.75h2.5v-5zm14.167 5v-3.75a2.917 2.917 0 00-2.74-2.912c.156.526.24 1.084.24 1.662v5h2.5z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgCommunityCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgFoodAndDrinkCategory = function SvgFoodAndDrinkCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.36 3.796a.833.833 0 00-.694-1.296H3.333a.833.833 0 00-.693 1.295l6.526 9.79v3.082h-2.5v1.666h6.667v-1.666h-2.5v-3.081l6.527-9.79zm-2.25.37l-1.667 2.5H6.556l-1.666-2.5h10.22z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgFoodAndDrinkCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgHealthcareCategory = function SvgHealthcareCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.499 16.666h1.666v1.667H.832v-1.667h1.667V2.499c0-.46.373-.833.833-.833h13.333c.46 0 .834.373.834.833v14.167zm-8.334-10H7.5v1.667h1.666v1.666h1.667V8.333h1.667V6.666h-1.667V4.999H9.165v1.667zm2.5 10h1.667v-5H6.665v5h1.667v-3.333h3.333v3.333z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgHealthcareCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgInterestCategory = function SvgInterestCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.001 17.5h-2.5a.833.833 0 01-.833-.834V9.999a.833.833 0 01.833-.833h2.5a.833.833 0 01.834.833v6.667a.833.833 0 01-.834.833zm5.834 0h-2.5a.833.833 0 01-.834-.834V2.499a.833.833 0 01.834-.833h2.5a.833.833 0 01.833.833v14.167a.833.833 0 01-.833.833zm5.833 0h-2.5a.833.833 0 01-.833-.834V7.499a.833.833 0 01.833-.833h2.5a.833.833 0 01.833.833v9.167a.833.833 0 01-.833.833z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgInterestCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgPaymentCategory = function SvgPaymentCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.668 3.334H3.335c-.92 0-1.667.747-1.667 1.667v10c0 .919.747 1.666 1.667 1.666h13.333c.92 0 1.667-.747 1.667-1.666V5c0-.92-.748-1.667-1.667-1.667zm-12.5 3.75a.417.417 0 01.417-.417h2.5a.417.417 0 01.416.417v1.667a.417.417 0 01-.416.416h-2.5a.417.417 0 01-.417-.416V7.084zm5 6.25h-5v-1.667h5v1.667zm6.667 0h-5v-1.667h5v1.667z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgPaymentCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgRecreationCategory = function SvgRecreationCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.165 3.334a5 5 0 015 5v3.333a5 5 0 01-5 5H5.832a5 5 0 01-5-5V8.334a5 5 0 015-5h8.333zM8.332 7.501H6.665v1.666H5v1.667h1.666v1.667h1.667v-1.667h1.667V9.167H8.332V7.501zm6.667 3.333h-1.667v1.667h1.667v-1.667zm-1.667-3.333h-1.667v1.666h1.667V7.501z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgRecreationCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgServiceCategory = function SvgServiceCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7.778 9.586h1.808a3.75 3.75 0 013.75 3.75H7.502v.834h6.667v-.833a4.65 4.65 0 00-.738-2.501h2.405c1.66 0 3.094.972 3.763 2.377-1.97 2.6-5.162 4.29-8.763 4.29-2.301 0-4.25-.492-5.834-1.354l.001-7.753a5.805 5.805 0 012.775 1.19zm-3.609 6.25c0 .46-.373.834-.833.834H1.669a.833.833 0 01-.833-.833v-7.5c0-.46.373-.834.833-.834h1.667c.46 0 .833.373.833.834v7.5zM15.003 4.17a2.5 2.5 0 110 5 2.5 2.5 0 010-5zm-5.834-2.5a2.5 2.5 0 110 5 2.5 2.5 0 010-5z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgServiceCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgShopsCategory = function SvgShopsCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.501 3.334h-15a.833.833 0 00-.833.833v11.667a1.667 1.667 0 001.667 1.667h13.333a1.667 1.667 0 001.667-1.667V4.167a.834.834 0 00-.834-.833zm-7.5 7.5c-2.757 0-5-2.243-5-5h1.667a3.337 3.337 0 003.333 3.333 3.337 3.337 0 003.334-3.333H15c0 2.757-2.242 5-5 5z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgShopsCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgTaxCategory = function SvgTaxCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.587 17.502a2.917 2.917 0 110-5.833 2.917 2.917 0 010 5.833zM5.421 8.335a2.917 2.917 0 110-5.833 2.917 2.917 0 010 5.833zm10.476-5.404l1.178 1.178L4.111 17.073l-1.178-1.178L15.896 2.93z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgTaxCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgTransferCategory = function SvgTransferCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.501 10l4.167-3.333-4.167-3.333v2.5H1.668V7.5h10.833V10zm5.834 2.5H7.5V10l-4.166 3.334L7.5 16.667v-2.5h10.834v-1.666z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgTransferCategory;","var _path;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React from \"react\";\nvar SvgTravelCategory = function SvgTravelCategory(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.846 11.482l-1.178 1.179 4.124 1.767 1.768 4.125 1.179-1.178-.59-2.947 2.762-2.76 3.008 6.42 1.116-1.117-.992-8.436L16.4 6.178a1.666 1.666 0 10-2.357-2.357l-2.42 2.42-8.435-.993-1.054 1.055 6.37 3.058-2.711 2.711-2.947-.59z\",\n fill: \"#10B395\"\n })));\n};\nexport default SvgTravelCategory;","import OtherCategoryIcon from '@icons/dice-category-other.svg';\nimport BankFeesCategoryIcon from '@icons/bank-fees-category.svg';\nimport CashAdvanceCategoryIcon from '@icons/cash-advance-category.svg';\nimport CommunityCategoryIcon from '@icons/community-category.svg';\nimport FoodAndDrinkCategoryIcon from '@icons/food-and-drink-category.svg';\nimport HealthcareCategoryIcon from '@icons/healthcare-category.svg';\nimport InterestCategoryIcon from '@icons/interest-category.svg';\nimport PaymentCategoryIcon from '@icons/payment-category.svg';\nimport RecreationCategoryIcon from '@icons/recreation-category.svg';\nimport ServiceCategoryIcon from '@icons/service-category.svg';\nimport ShopsCategoryIcon from '@icons/shops-category.svg';\nimport TaxCategoryIcon from '@icons/tax-category.svg';\nimport TransferCategoryIcon from '@icons/transfer-category.svg';\nimport TravelCategoryIcon from '@icons/travel-category.svg';\n\n// NOTE: this closely relates to the \"getMainCategoryKey\" function\n// in \"MonthlySpending\" component which is currently the parent component of this.\nconst CATEGORY_ICONS = {\n 'bank fees': BankFeesCategoryIcon,\n other: OtherCategoryIcon,\n 'cash advance': CashAdvanceCategoryIcon,\n community: CommunityCategoryIcon,\n 'food and drink': FoodAndDrinkCategoryIcon,\n healthcare: HealthcareCategoryIcon,\n interest: InterestCategoryIcon,\n payment: PaymentCategoryIcon,\n recreation: RecreationCategoryIcon,\n service: ServiceCategoryIcon,\n shops: ShopsCategoryIcon,\n tax: TaxCategoryIcon,\n transfer: TransferCategoryIcon,\n travel: TravelCategoryIcon,\n};\n\nexport const MonthlySpendingItem = ({\n category,\n mainCategoryKey,\n amount,\n percentage,\n}: {\n category: string;\n mainCategoryKey?: string;\n amount: number;\n percentage: number;\n}) => {\n const CategoryIcon = CATEGORY_ICONS[mainCategoryKey] || PaymentCategoryIcon;\n\n return (\n <div className=\"flex mb-8\">\n <div className=\"text-[#10B395] bg-[#CDFBE1] rounded-full mb-auto mr-3 h-10 w-10 flex justify-center items-center\">\n <CategoryIcon />\n </div>\n\n <div className=\"w-full\">\n <div className=\"flex justify-between text-sm font-semibold text-[#1C1A27] mb-3\">\n <div>{category}</div>\n <div className=\"ml-2\">${amount.toFixed(2)}</div>\n </div>\n <div className=\"h-1 w-full bg-[#DEDDE3] mb-3 rounded relative\">\n <div\n className={`h-1 bg-[#10B395] rounded absolute z-10 hello`}\n // NOTE: need to use this, as there's no clear way of how to pass\n // such a variable to tailwind\n style={{ width: `${percentage}%` }}\n />\n </div>\n <div className=\"text-[#635E7D] text-xs\">{percentage}%</div>\n </div>\n </div>\n );\n};\n","import { useQuery } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport { MonthlySpendingItem } from './monthly-spending-item';\nimport { Dayjs } from 'dayjs';\nimport { useEffect, useRef } from 'react';\nimport { Loading } from '@components/loading';\n\n// Note: so this function takes into account the way the current category\n// labels are formed and their icon key associations.\n// Changing one or the other might impact the icons being shown for the categories\nconst getMainCategoryKey = (category: string) =>\n category.includes('/')\n ? category.substring(0, category.indexOf(' /')).toLowerCase()\n : category.toLowerCase();\n\nexport const MonthlySpending = ({ selectedMonth }: { selectedMonth: Dayjs }) => {\n const mounted = useRef(false);\n\n const {\n data: expenses,\n isFetching,\n refetch,\n } = useQuery(\n ['buyer-plaid-items-expenses'],\n async () => {\n const resp = await ApiService.getBuyerPlaidExpenses(selectedMonth.format('YYYY-MM-DD'));\n\n let totalExpenses = resp.data.reduce((accum, currentValue) => accum + currentValue.amount, 0);\n\n return {\n totalExpenses,\n spendingByCategory: resp.data.map((expense) => ({\n ...expense,\n category: expense.category || 'Not provided',\n // we have the conditional statement here to avoid dividing by 0\n percentage: totalExpenses ? Math.round((100 * expense.amount) / totalExpenses) : 0,\n mainCategoryKey: expense.category && getMainCategoryKey(expense.category),\n })),\n };\n },\n {\n retry: 0,\n refetchOnWindowFocus: false,\n },\n );\n\n useEffect(() => {\n if (mounted.current) {\n refetch();\n } else {\n mounted.current = true;\n }\n }, [selectedMonth]);\n\n return (\n <div>\n <div className=\"text-xl text-[#1C1A27] font-medium mb-8\">Monthly Spending</div>\n <Loading isLoading={isFetching} />\n {expenses && expenses.spendingByCategory && (\n <>\n {expenses.spendingByCategory.length\n ? expenses.spendingByCategory.map((spending, index) => (\n <MonthlySpendingItem\n key={`spending-${index}`}\n category={spending.category}\n mainCategoryKey={spending.mainCategoryKey}\n amount={spending.amount}\n percentage={spending.percentage}\n />\n ))\n : 'No spending found'}\n </>\n )}\n </div>\n );\n};\n","import { FilterPill } from '@components';\nimport { useState } from 'react';\nimport { PastRangeOptions } from '@services/Api/controllers';\n\nexport const TransactionHistoryFilters = ({\n onSelect,\n defaultValue,\n}: {\n onSelect: Function;\n defaultValue?: PastRangeOptions;\n}) => {\n const [selected, setSelected] = useState<PastRangeOptions>(defaultValue || 'pastWeek');\n\n const handleSelect = (selectedFilter) => {\n setSelected(selectedFilter);\n onSelect(selectedFilter);\n };\n\n return (\n <div className=\"flex mb-8 w-80 justify-between\">\n <FilterPill\n text=\"Past Week\"\n active={selected === 'pastWeek'}\n onClick={() => handleSelect('pastWeek')}\n />\n <FilterPill\n text=\"Past Month\"\n active={selected === 'pastMonth'}\n onClick={() => handleSelect('pastMonth')}\n />\n <FilterPill\n text=\"Past Year\"\n active={selected === 'pastYear'}\n onClick={() => handleSelect('pastYear')}\n />\n </div>\n );\n};\n","export const CheckFilledIcon = ({\n backgroundColor = 'currentColor',\n pathColor = '#fff',\n width = 15,\n}: {\n backgroundColor?: string;\n pathColor?: string;\n width?: number;\n}) => (\n <svg viewBox=\"0 0 22 23\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\" width={width}>\n <circle\n cx={11}\n cy={11.5}\n r={10}\n fill={backgroundColor}\n stroke=\"currentColor\"\n strokeWidth={1.5}\n />\n <path d=\"m6 11.5 3.33 3.75L16 7.75\" fill=\"currentColor\" />\n <path\n d=\"m6 11.5 3.33 3.75L16 7.75\"\n stroke={pathColor}\n strokeWidth={1.5}\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n);\n","import clsx from 'clsx';\nimport { CheckFilledIcon } from '@iconComponents/CheckFilledIcon';\nimport CurrencyFormat from 'react-currency-format';\n\nconst CURRENCY_SYMBOLS = {\n USD: '$', // US Dollar\n EUR: '€', // Euro\n CRC: 'â‚¡', // Costa Rican Colón\n GBP: '£', // British Pound Sterling\n ILS: '₪', // Israeli New Sheqel\n INR: '₹', // Indian Rupee\n JPY: 'Â¥', // Japanese Yen\n KRW: 'â‚©', // South Korean Won\n NGN: '₦', // Nigerian Naira\n PHP: '₱', // Philippine Peso\n PLN: 'zÅ‚', // Polish Zloty\n PYG: '₲', // Paraguayan Guarani\n THB: '฿', // Thai Baht\n UAH: 'â‚´', // Ukrainian Hryvnia\n VND: 'â‚«', // Vietnamese Dong\n};\n\nexport const TransactionItem = ({\n name,\n currencyCode,\n amount,\n date,\n pending,\n}: {\n name: string;\n currencyCode: string;\n amount: Number;\n date: string;\n pending: boolean;\n}) => (\n <div>\n <div className=\"flex justify-between text-sm\">\n <div className=\"flex\">\n {pending ? (\n <div className=\"my-auto text-[#FFC235] w-10 h-10 rounded-full bg-[#FFF7D6] flex justify-center items-center\">\n <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M9.99984 1.66675C5.40484 1.66675 1.6665 5.40508 1.6665 10.0001C1.6665 14.5951 5.40484 18.3334 9.99984 18.3334C14.5948 18.3334 18.3332 14.5951 18.3332 10.0001C18.3332 5.40508 14.5948 1.66675 9.99984 1.66675ZM10.8332 14.1667H9.1665V9.16675H10.8332V14.1667ZM10.8332 7.50008H9.1665V5.83341H10.8332V7.50008Z\" fill=\"white\"/>\n </svg>\n\n </div>\n ) : (\n <div className=\"my-auto text-[#CDFBE1]\">\n <CheckFilledIcon pathColor=\"#10B395\" width={40} />\n </div>\n )}\n\n <div className=\"ml-3 flex flex-col\">\n <div className=\"font-semibold mb-1\">{name}</div>\n <div className=\"text-[#9F98BE]\">{date}</div>\n </div>\n </div>\n\n <div>\n <div className=\"font-semibold text-end mb-1\">\n <CurrencyFormat\n prefix={CURRENCY_SYMBOLS[currencyCode] || currencyCode}\n displayType=\"text\"\n value={`${amount.toFixed(2)}`}\n />\n </div>\n </div>\n </div>\n <div className=\"w-full h-[1px] bg-[#D0CAE9] my-2.5\" />\n </div>\n);\n","import { CustomPagination, Loading } from '@components';\nimport { useRef } from 'react';\nimport { useQuery } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport { PastRangeOptions } from '@services/Api/controllers';\nimport { TransactionHistoryFilters } from './transaction-history-filters';\nimport { TransactionItem } from './transaction-item';\n\nconst PAGE_SIZE = 8;\n\nexport const TransactionHistory = () => {\n const page = useRef(1);\n const rangeFilter = useRef<PastRangeOptions>('pastWeek');\n\n const { data: transactions, refetch } = useQuery(\n ['buyer-plaid-items-transactions'],\n async () => {\n const resp = await ApiService.getBuyerPlaidTransactions({\n page: page.current,\n pageSize: PAGE_SIZE,\n pastRange: rangeFilter.current,\n });\n\n return {\n ...resp.data,\n items: resp.data.items.map((transactionItem) => {\n const customDate = new Date(transactionItem.date);\n\n return {\n ...transactionItem,\n amount: transactionItem.amount * -1,\n date: customDate.toLocaleDateString('en-US', {\n year: 'numeric',\n month: 'short',\n day: 'numeric',\n }),\n };\n }),\n };\n },\n {\n retry: 0,\n refetchOnWindowFocus: false,\n },\n );\n\n const onChangePage = ({ selected }) => {\n page.current = selected + 1;\n refetch();\n };\n\n const onRangeFilterChange = (selectedFilter) => {\n page.current = 1;\n rangeFilter.current = selectedFilter;\n refetch();\n };\n\n return (\n <div>\n <div className=\"text-xl text-[#1C1A27] font-medium mb-8\">Transaction History</div>\n <TransactionHistoryFilters\n onSelect={onRangeFilterChange}\n defaultValue={rangeFilter.current}\n />\n\n {transactions && (\n <div className=\"min-h-[500px]\">\n {transactions.total ? (\n <>\n <div>\n {transactions.items.map((transactionItem) => (\n <TransactionItem\n key={transactionItem.transactionId}\n name={transactionItem.name}\n currencyCode={transactionItem.currencyCode}\n amount={transactionItem.amount}\n date={transactionItem.date}\n pending={transactionItem.pending}\n />\n ))}\n </div>\n {transactions.total > PAGE_SIZE && (\n <CustomPagination\n pageCount={Math.ceil(transactions.total / PAGE_SIZE)}\n onPageChange={onChangePage}\n // Note: this works with ref, because whenever the page changes\n // new data gets loaded, when new data gets loaded it rerenders this with the new ref\n currentPage={page.current - 1}\n />\n )}\n </>\n ) : (\n <div>No transactions</div>\n )}\n </div>\n )}\n </div>\n );\n};\n","import clsx from 'clsx';\n\nexport const CashFlowItem = ({\n isIncome,\n title,\n subTitle,\n amount,\n}: {\n isIncome?: boolean;\n title: string;\n subTitle: string;\n amount: number;\n}) => (\n <div className=\"p-4 mb-2 border rounded border-[#DEDDE3]\">\n <div className=\"flex justify-between mb-2\">\n <div className=\"flex\">\n <div\n className={clsx('w-5 h-2.5 my-auto', {\n 'bg-[#10B395]': isIncome,\n 'bg-[#FF9580]': !isIncome,\n })}\n />\n <div className=\"ml-2.5\">{title}</div>\n </div>\n <div>${amount}</div>\n </div>\n <div className=\"text-[#635E7D]\">{subTitle}</div>\n </div>\n);\n","import { useEffect, useRef } from 'react';\nimport { useQuery } from 'react-query';\nimport { Dayjs } from 'dayjs';\nimport { ApiService } from '@services/Api';\nimport { Loading } from '@components';\nimport clsx from 'clsx';\nimport CurrencyFormat from 'react-currency-format';\nimport { CashFlowItem } from './cash-flow-item';\n\nexport const CashFlow = ({ selectedMonth }: { selectedMonth: Dayjs }) => {\n const mounted = useRef(false);\n\n const {\n data: cashflow,\n isFetching,\n refetch,\n } = useQuery(\n ['buyer-plaid-items-cash-flow'],\n async () => {\n const resp = await ApiService.getBuyerPlaidCashflow(selectedMonth.format('YYYY-MM-DD'));\n\n return resp.data;\n },\n {\n retry: 0,\n refetchOnWindowFocus: false,\n },\n );\n\n useEffect(() => {\n if (mounted.current) {\n refetch();\n } else {\n mounted.current = true;\n }\n }, [selectedMonth]);\n\n return (\n <div>\n <Loading isLoading={isFetching} />\n <div className=\"text-xl text-[#1C1A27] font-medium mb-2\">Cash flow</div>\n <div className=\"text-sm text-[#635E7D] mb-8\">\n Net amount received and disbursed this month\n </div>\n {cashflow && (\n <>\n <div className=\"mb-8\">\n <CurrencyFormat\n prefix=\"$\"\n displayType=\"text\"\n thousandSeparator\n className=\"text-[#1C1A27] text-4xl\"\n value={`${cashflow.net}`}\n />\n </div>\n <div\n className={clsx('text-sm mb-8 ml-3', {\n 'text-[#10B395]': cashflow.vsLastMonthPercentage >= 0,\n 'text-[#FF9580]': cashflow.vsLastMonthPercentage < 0,\n })}\n >\n {cashflow.vsLastMonthPercentage >= 0 ? '+' : ''}\n {cashflow.vsLastMonthPercentage}% vs {cashflow.vsLastMonth}\n </div>\n <CashFlowItem\n isIncome\n title=\"Income\"\n subTitle=\"Money received\"\n amount={cashflow.income}\n />\n <CashFlowItem title=\"Expenses\" subTitle=\"Money spent\" amount={cashflow.expenses} />\n </>\n )}\n </div>\n );\n};\n","/*!\n * @kurkle/color v0.3.2\n * https://github.com/kurkle/color#readme\n * (c) 2023 Jukka Kurkela\n * Released under the MIT License\n */\nfunction round(v) {\n return v + 0.5 | 0;\n}\nconst lim = (v, l, h) => Math.max(Math.min(v, h), l);\nfunction p2b(v) {\n return lim(round(v * 2.55), 0, 255);\n}\nfunction b2p(v) {\n return lim(round(v / 2.55), 0, 100);\n}\nfunction n2b(v) {\n return lim(round(v * 255), 0, 255);\n}\nfunction b2n(v) {\n return lim(round(v / 2.55) / 100, 0, 1);\n}\nfunction n2p(v) {\n return lim(round(v * 100), 0, 100);\n}\n\nconst map$1 = {0: 0, 1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, A: 10, B: 11, C: 12, D: 13, E: 14, F: 15, a: 10, b: 11, c: 12, d: 13, e: 14, f: 15};\nconst hex = [...'0123456789ABCDEF'];\nconst h1 = b => hex[b & 0xF];\nconst h2 = b => hex[(b & 0xF0) >> 4] + hex[b & 0xF];\nconst eq = b => ((b & 0xF0) >> 4) === (b & 0xF);\nconst isShort = v => eq(v.r) && eq(v.g) && eq(v.b) && eq(v.a);\nfunction hexParse(str) {\n var len = str.length;\n var ret;\n if (str[0] === '#') {\n if (len === 4 || len === 5) {\n ret = {\n r: 255 & map$1[str[1]] * 17,\n g: 255 & map$1[str[2]] * 17,\n b: 255 & map$1[str[3]] * 17,\n a: len === 5 ? map$1[str[4]] * 17 : 255\n };\n } else if (len === 7 || len === 9) {\n ret = {\n r: map$1[str[1]] << 4 | map$1[str[2]],\n g: map$1[str[3]] << 4 | map$1[str[4]],\n b: map$1[str[5]] << 4 | map$1[str[6]],\n a: len === 9 ? (map$1[str[7]] << 4 | map$1[str[8]]) : 255\n };\n }\n }\n return ret;\n}\nconst alpha = (a, f) => a < 255 ? f(a) : '';\nfunction hexString(v) {\n var f = isShort(v) ? h1 : h2;\n return v\n ? '#' + f(v.r) + f(v.g) + f(v.b) + alpha(v.a, f)\n : undefined;\n}\n\nconst HUE_RE = /^(hsla?|hwb|hsv)\\(\\s*([-+.e\\d]+)(?:deg)?[\\s,]+([-+.e\\d]+)%[\\s,]+([-+.e\\d]+)%(?:[\\s,]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction hsl2rgbn(h, s, l) {\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return [f(0), f(8), f(4)];\n}\nfunction hsv2rgbn(h, s, v) {\n const f = (n, k = (n + h / 60) % 6) => v - v * s * Math.max(Math.min(k, 4 - k, 1), 0);\n return [f(5), f(3), f(1)];\n}\nfunction hwb2rgbn(h, w, b) {\n const rgb = hsl2rgbn(h, 1, 0.5);\n let i;\n if (w + b > 1) {\n i = 1 / (w + b);\n w *= i;\n b *= i;\n }\n for (i = 0; i < 3; i++) {\n rgb[i] *= 1 - w - b;\n rgb[i] += w;\n }\n return rgb;\n}\nfunction hueValue(r, g, b, d, max) {\n if (r === max) {\n return ((g - b) / d) + (g < b ? 6 : 0);\n }\n if (g === max) {\n return (b - r) / d + 2;\n }\n return (r - g) / d + 4;\n}\nfunction rgb2hsl(v) {\n const range = 255;\n const r = v.r / range;\n const g = v.g / range;\n const b = v.b / range;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n const l = (max + min) / 2;\n let h, s, d;\n if (max !== min) {\n d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n h = hueValue(r, g, b, d, max);\n h = h * 60 + 0.5;\n }\n return [h | 0, s || 0, l];\n}\nfunction calln(f, a, b, c) {\n return (\n Array.isArray(a)\n ? f(a[0], a[1], a[2])\n : f(a, b, c)\n ).map(n2b);\n}\nfunction hsl2rgb(h, s, l) {\n return calln(hsl2rgbn, h, s, l);\n}\nfunction hwb2rgb(h, w, b) {\n return calln(hwb2rgbn, h, w, b);\n}\nfunction hsv2rgb(h, s, v) {\n return calln(hsv2rgbn, h, s, v);\n}\nfunction hue(h) {\n return (h % 360 + 360) % 360;\n}\nfunction hueParse(str) {\n const m = HUE_RE.exec(str);\n let a = 255;\n let v;\n if (!m) {\n return;\n }\n if (m[5] !== v) {\n a = m[6] ? p2b(+m[5]) : n2b(+m[5]);\n }\n const h = hue(+m[2]);\n const p1 = +m[3] / 100;\n const p2 = +m[4] / 100;\n if (m[1] === 'hwb') {\n v = hwb2rgb(h, p1, p2);\n } else if (m[1] === 'hsv') {\n v = hsv2rgb(h, p1, p2);\n } else {\n v = hsl2rgb(h, p1, p2);\n }\n return {\n r: v[0],\n g: v[1],\n b: v[2],\n a: a\n };\n}\nfunction rotate(v, deg) {\n var h = rgb2hsl(v);\n h[0] = hue(h[0] + deg);\n h = hsl2rgb(h);\n v.r = h[0];\n v.g = h[1];\n v.b = h[2];\n}\nfunction hslString(v) {\n if (!v) {\n return;\n }\n const a = rgb2hsl(v);\n const h = a[0];\n const s = n2p(a[1]);\n const l = n2p(a[2]);\n return v.a < 255\n ? `hsla(${h}, ${s}%, ${l}%, ${b2n(v.a)})`\n : `hsl(${h}, ${s}%, ${l}%)`;\n}\n\nconst map = {\n x: 'dark',\n Z: 'light',\n Y: 're',\n X: 'blu',\n W: 'gr',\n V: 'medium',\n U: 'slate',\n A: 'ee',\n T: 'ol',\n S: 'or',\n B: 'ra',\n C: 'lateg',\n D: 'ights',\n R: 'in',\n Q: 'turquois',\n E: 'hi',\n P: 'ro',\n O: 'al',\n N: 'le',\n M: 'de',\n L: 'yello',\n F: 'en',\n K: 'ch',\n G: 'arks',\n H: 'ea',\n I: 'ightg',\n J: 'wh'\n};\nconst names$1 = {\n OiceXe: 'f0f8ff',\n antiquewEte: 'faebd7',\n aqua: 'ffff',\n aquamarRe: '7fffd4',\n azuY: 'f0ffff',\n beige: 'f5f5dc',\n bisque: 'ffe4c4',\n black: '0',\n blanKedOmond: 'ffebcd',\n Xe: 'ff',\n XeviTet: '8a2be2',\n bPwn: 'a52a2a',\n burlywood: 'deb887',\n caMtXe: '5f9ea0',\n KartYuse: '7fff00',\n KocTate: 'd2691e',\n cSO: 'ff7f50',\n cSnflowerXe: '6495ed',\n cSnsilk: 'fff8dc',\n crimson: 'dc143c',\n cyan: 'ffff',\n xXe: '8b',\n xcyan: '8b8b',\n xgTMnPd: 'b8860b',\n xWay: 'a9a9a9',\n xgYF: '6400',\n xgYy: 'a9a9a9',\n xkhaki: 'bdb76b',\n xmagFta: '8b008b',\n xTivegYF: '556b2f',\n xSange: 'ff8c00',\n xScEd: '9932cc',\n xYd: '8b0000',\n xsOmon: 'e9967a',\n xsHgYF: '8fbc8f',\n xUXe: '483d8b',\n xUWay: '2f4f4f',\n xUgYy: '2f4f4f',\n xQe: 'ced1',\n xviTet: '9400d3',\n dAppRk: 'ff1493',\n dApskyXe: 'bfff',\n dimWay: '696969',\n dimgYy: '696969',\n dodgerXe: '1e90ff',\n fiYbrick: 'b22222',\n flSOwEte: 'fffaf0',\n foYstWAn: '228b22',\n fuKsia: 'ff00ff',\n gaRsbSo: 'dcdcdc',\n ghostwEte: 'f8f8ff',\n gTd: 'ffd700',\n gTMnPd: 'daa520',\n Way: '808080',\n gYF: '8000',\n gYFLw: 'adff2f',\n gYy: '808080',\n honeyMw: 'f0fff0',\n hotpRk: 'ff69b4',\n RdianYd: 'cd5c5c',\n Rdigo: '4b0082',\n ivSy: 'fffff0',\n khaki: 'f0e68c',\n lavFMr: 'e6e6fa',\n lavFMrXsh: 'fff0f5',\n lawngYF: '7cfc00',\n NmoncEffon: 'fffacd',\n ZXe: 'add8e6',\n ZcSO: 'f08080',\n Zcyan: 'e0ffff',\n ZgTMnPdLw: 'fafad2',\n ZWay: 'd3d3d3',\n ZgYF: '90ee90',\n ZgYy: 'd3d3d3',\n ZpRk: 'ffb6c1',\n ZsOmon: 'ffa07a',\n ZsHgYF: '20b2aa',\n ZskyXe: '87cefa',\n ZUWay: '778899',\n ZUgYy: '778899',\n ZstAlXe: 'b0c4de',\n ZLw: 'ffffe0',\n lime: 'ff00',\n limegYF: '32cd32',\n lRF: 'faf0e6',\n magFta: 'ff00ff',\n maPon: '800000',\n VaquamarRe: '66cdaa',\n VXe: 'cd',\n VScEd: 'ba55d3',\n VpurpN: '9370db',\n VsHgYF: '3cb371',\n VUXe: '7b68ee',\n VsprRggYF: 'fa9a',\n VQe: '48d1cc',\n VviTetYd: 'c71585',\n midnightXe: '191970',\n mRtcYam: 'f5fffa',\n mistyPse: 'ffe4e1',\n moccasR: 'ffe4b5',\n navajowEte: 'ffdead',\n navy: '80',\n Tdlace: 'fdf5e6',\n Tive: '808000',\n TivedBb: '6b8e23',\n Sange: 'ffa500',\n SangeYd: 'ff4500',\n ScEd: 'da70d6',\n pOegTMnPd: 'eee8aa',\n pOegYF: '98fb98',\n pOeQe: 'afeeee',\n pOeviTetYd: 'db7093',\n papayawEp: 'ffefd5',\n pHKpuff: 'ffdab9',\n peru: 'cd853f',\n pRk: 'ffc0cb',\n plum: 'dda0dd',\n powMrXe: 'b0e0e6',\n purpN: '800080',\n YbeccapurpN: '663399',\n Yd: 'ff0000',\n Psybrown: 'bc8f8f',\n PyOXe: '4169e1',\n saddNbPwn: '8b4513',\n sOmon: 'fa8072',\n sandybPwn: 'f4a460',\n sHgYF: '2e8b57',\n sHshell: 'fff5ee',\n siFna: 'a0522d',\n silver: 'c0c0c0',\n skyXe: '87ceeb',\n UXe: '6a5acd',\n UWay: '708090',\n UgYy: '708090',\n snow: 'fffafa',\n sprRggYF: 'ff7f',\n stAlXe: '4682b4',\n tan: 'd2b48c',\n teO: '8080',\n tEstN: 'd8bfd8',\n tomato: 'ff6347',\n Qe: '40e0d0',\n viTet: 'ee82ee',\n JHt: 'f5deb3',\n wEte: 'ffffff',\n wEtesmoke: 'f5f5f5',\n Lw: 'ffff00',\n LwgYF: '9acd32'\n};\nfunction unpack() {\n const unpacked = {};\n const keys = Object.keys(names$1);\n const tkeys = Object.keys(map);\n let i, j, k, ok, nk;\n for (i = 0; i < keys.length; i++) {\n ok = nk = keys[i];\n for (j = 0; j < tkeys.length; j++) {\n k = tkeys[j];\n nk = nk.replace(k, map[k]);\n }\n k = parseInt(names$1[ok], 16);\n unpacked[nk] = [k >> 16 & 0xFF, k >> 8 & 0xFF, k & 0xFF];\n }\n return unpacked;\n}\n\nlet names;\nfunction nameParse(str) {\n if (!names) {\n names = unpack();\n names.transparent = [0, 0, 0, 0];\n }\n const a = names[str.toLowerCase()];\n return a && {\n r: a[0],\n g: a[1],\n b: a[2],\n a: a.length === 4 ? a[3] : 255\n };\n}\n\nconst RGB_RE = /^rgba?\\(\\s*([-+.\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?[\\s,]+([-+.e\\d]+)(%)?(?:[\\s,/]+([-+.e\\d]+)(%)?)?\\s*\\)$/;\nfunction rgbParse(str) {\n const m = RGB_RE.exec(str);\n let a = 255;\n let r, g, b;\n if (!m) {\n return;\n }\n if (m[7] !== r) {\n const v = +m[7];\n a = m[8] ? p2b(v) : lim(v * 255, 0, 255);\n }\n r = +m[1];\n g = +m[3];\n b = +m[5];\n r = 255 & (m[2] ? p2b(r) : lim(r, 0, 255));\n g = 255 & (m[4] ? p2b(g) : lim(g, 0, 255));\n b = 255 & (m[6] ? p2b(b) : lim(b, 0, 255));\n return {\n r: r,\n g: g,\n b: b,\n a: a\n };\n}\nfunction rgbString(v) {\n return v && (\n v.a < 255\n ? `rgba(${v.r}, ${v.g}, ${v.b}, ${b2n(v.a)})`\n : `rgb(${v.r}, ${v.g}, ${v.b})`\n );\n}\n\nconst to = v => v <= 0.0031308 ? v * 12.92 : Math.pow(v, 1.0 / 2.4) * 1.055 - 0.055;\nconst from = v => v <= 0.04045 ? v / 12.92 : Math.pow((v + 0.055) / 1.055, 2.4);\nfunction interpolate(rgb1, rgb2, t) {\n const r = from(b2n(rgb1.r));\n const g = from(b2n(rgb1.g));\n const b = from(b2n(rgb1.b));\n return {\n r: n2b(to(r + t * (from(b2n(rgb2.r)) - r))),\n g: n2b(to(g + t * (from(b2n(rgb2.g)) - g))),\n b: n2b(to(b + t * (from(b2n(rgb2.b)) - b))),\n a: rgb1.a + t * (rgb2.a - rgb1.a)\n };\n}\n\nfunction modHSL(v, i, ratio) {\n if (v) {\n let tmp = rgb2hsl(v);\n tmp[i] = Math.max(0, Math.min(tmp[i] + tmp[i] * ratio, i === 0 ? 360 : 1));\n tmp = hsl2rgb(tmp);\n v.r = tmp[0];\n v.g = tmp[1];\n v.b = tmp[2];\n }\n}\nfunction clone(v, proto) {\n return v ? Object.assign(proto || {}, v) : v;\n}\nfunction fromObject(input) {\n var v = {r: 0, g: 0, b: 0, a: 255};\n if (Array.isArray(input)) {\n if (input.length >= 3) {\n v = {r: input[0], g: input[1], b: input[2], a: 255};\n if (input.length > 3) {\n v.a = n2b(input[3]);\n }\n }\n } else {\n v = clone(input, {r: 0, g: 0, b: 0, a: 1});\n v.a = n2b(v.a);\n }\n return v;\n}\nfunction functionParse(str) {\n if (str.charAt(0) === 'r') {\n return rgbParse(str);\n }\n return hueParse(str);\n}\nclass Color {\n constructor(input) {\n if (input instanceof Color) {\n return input;\n }\n const type = typeof input;\n let v;\n if (type === 'object') {\n v = fromObject(input);\n } else if (type === 'string') {\n v = hexParse(input) || nameParse(input) || functionParse(input);\n }\n this._rgb = v;\n this._valid = !!v;\n }\n get valid() {\n return this._valid;\n }\n get rgb() {\n var v = clone(this._rgb);\n if (v) {\n v.a = b2n(v.a);\n }\n return v;\n }\n set rgb(obj) {\n this._rgb = fromObject(obj);\n }\n rgbString() {\n return this._valid ? rgbString(this._rgb) : undefined;\n }\n hexString() {\n return this._valid ? hexString(this._rgb) : undefined;\n }\n hslString() {\n return this._valid ? hslString(this._rgb) : undefined;\n }\n mix(color, weight) {\n if (color) {\n const c1 = this.rgb;\n const c2 = color.rgb;\n let w2;\n const p = weight === w2 ? 0.5 : weight;\n const w = 2 * p - 1;\n const a = c1.a - c2.a;\n const w1 = ((w * a === -1 ? w : (w + a) / (1 + w * a)) + 1) / 2.0;\n w2 = 1 - w1;\n c1.r = 0xFF & w1 * c1.r + w2 * c2.r + 0.5;\n c1.g = 0xFF & w1 * c1.g + w2 * c2.g + 0.5;\n c1.b = 0xFF & w1 * c1.b + w2 * c2.b + 0.5;\n c1.a = p * c1.a + (1 - p) * c2.a;\n this.rgb = c1;\n }\n return this;\n }\n interpolate(color, t) {\n if (color) {\n this._rgb = interpolate(this._rgb, color._rgb, t);\n }\n return this;\n }\n clone() {\n return new Color(this.rgb);\n }\n alpha(a) {\n this._rgb.a = n2b(a);\n return this;\n }\n clearer(ratio) {\n const rgb = this._rgb;\n rgb.a *= 1 - ratio;\n return this;\n }\n greyscale() {\n const rgb = this._rgb;\n const val = round(rgb.r * 0.3 + rgb.g * 0.59 + rgb.b * 0.11);\n rgb.r = rgb.g = rgb.b = val;\n return this;\n }\n opaquer(ratio) {\n const rgb = this._rgb;\n rgb.a *= 1 + ratio;\n return this;\n }\n negate() {\n const v = this._rgb;\n v.r = 255 - v.r;\n v.g = 255 - v.g;\n v.b = 255 - v.b;\n return this;\n }\n lighten(ratio) {\n modHSL(this._rgb, 2, ratio);\n return this;\n }\n darken(ratio) {\n modHSL(this._rgb, 2, -ratio);\n return this;\n }\n saturate(ratio) {\n modHSL(this._rgb, 1, ratio);\n return this;\n }\n desaturate(ratio) {\n modHSL(this._rgb, 1, -ratio);\n return this;\n }\n rotate(deg) {\n rotate(this._rgb, deg);\n return this;\n }\n}\n\nfunction index_esm(input) {\n return new Color(input);\n}\n\nexport { Color, b2n, b2p, index_esm as default, hexParse, hexString, hsl2rgb, hslString, hsv2rgb, hueParse, hwb2rgb, lim, n2b, n2p, nameParse, p2b, rgb2hsl, rgbParse, rgbString, rotate, round };\n","/*!\n * Chart.js v4.3.0\n * https://www.chartjs.org\n * (c) 2023 Chart.js Contributors\n * Released under the MIT License\n */\nimport { Color } from '@kurkle/color';\n\n/**\n * @namespace Chart.helpers\n */ /**\n * An empty function that can be used, for example, for optional callback.\n */ function noop() {\n/* noop */ }\n/**\n * Returns a unique id, sequentially generated from a global variable.\n */ const uid = (()=>{\n let id = 0;\n return ()=>id++;\n})();\n/**\n * Returns true if `value` is neither null nor undefined, else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isNullOrUndef(value) {\n return value === null || typeof value === 'undefined';\n}\n/**\n * Returns true if `value` is an array (including typed arrays), else returns false.\n * @param value - The value to test.\n * @function\n */ function isArray(value) {\n if (Array.isArray && Array.isArray(value)) {\n return true;\n }\n const type = Object.prototype.toString.call(value);\n if (type.slice(0, 7) === '[object' && type.slice(-6) === 'Array]') {\n return true;\n }\n return false;\n}\n/**\n * Returns true if `value` is an object (excluding null), else returns false.\n * @param value - The value to test.\n * @since 2.7.0\n */ function isObject(value) {\n return value !== null && Object.prototype.toString.call(value) === '[object Object]';\n}\n/**\n * Returns true if `value` is a finite number, else returns false\n * @param value - The value to test.\n */ function isNumberFinite(value) {\n return (typeof value === 'number' || value instanceof Number) && isFinite(+value);\n}\n/**\n * Returns `value` if finite, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is not finite.\n */ function finiteOrDefault(value, defaultValue) {\n return isNumberFinite(value) ? value : defaultValue;\n}\n/**\n * Returns `value` if defined, else returns `defaultValue`.\n * @param value - The value to return if defined.\n * @param defaultValue - The value to return if `value` is undefined.\n */ function valueOrDefault(value, defaultValue) {\n return typeof value === 'undefined' ? defaultValue : value;\n}\nconst toPercentage = (value, dimension)=>typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 : +value / dimension;\nconst toDimension = (value, dimension)=>typeof value === 'string' && value.endsWith('%') ? parseFloat(value) / 100 * dimension : +value;\n/**\n * Calls `fn` with the given `args` in the scope defined by `thisArg` and returns the\n * value returned by `fn`. If `fn` is not a function, this method returns undefined.\n * @param fn - The function to call.\n * @param args - The arguments with which `fn` should be called.\n * @param [thisArg] - The value of `this` provided for the call to `fn`.\n */ function callback(fn, args, thisArg) {\n if (fn && typeof fn.call === 'function') {\n return fn.apply(thisArg, args);\n }\n}\nfunction each(loopable, fn, thisArg, reverse) {\n let i, len, keys;\n if (isArray(loopable)) {\n len = loopable.length;\n if (reverse) {\n for(i = len - 1; i >= 0; i--){\n fn.call(thisArg, loopable[i], i);\n }\n } else {\n for(i = 0; i < len; i++){\n fn.call(thisArg, loopable[i], i);\n }\n }\n } else if (isObject(loopable)) {\n keys = Object.keys(loopable);\n len = keys.length;\n for(i = 0; i < len; i++){\n fn.call(thisArg, loopable[keys[i]], keys[i]);\n }\n }\n}\n/**\n * Returns true if the `a0` and `a1` arrays have the same content, else returns false.\n * @param a0 - The array to compare\n * @param a1 - The array to compare\n * @private\n */ function _elementsEqual(a0, a1) {\n let i, ilen, v0, v1;\n if (!a0 || !a1 || a0.length !== a1.length) {\n return false;\n }\n for(i = 0, ilen = a0.length; i < ilen; ++i){\n v0 = a0[i];\n v1 = a1[i];\n if (v0.datasetIndex !== v1.datasetIndex || v0.index !== v1.index) {\n return false;\n }\n }\n return true;\n}\n/**\n * Returns a deep copy of `source` without keeping references on objects and arrays.\n * @param source - The value to clone.\n */ function clone(source) {\n if (isArray(source)) {\n return source.map(clone);\n }\n if (isObject(source)) {\n const target = Object.create(null);\n const keys = Object.keys(source);\n const klen = keys.length;\n let k = 0;\n for(; k < klen; ++k){\n target[keys[k]] = clone(source[keys[k]]);\n }\n return target;\n }\n return source;\n}\nfunction isValidKey(key) {\n return [\n '__proto__',\n 'prototype',\n 'constructor'\n ].indexOf(key) === -1;\n}\n/**\n * The default merger when Chart.helpers.merge is called without merger option.\n * Note(SB): also used by mergeConfig and mergeScaleConfig as fallback.\n * @private\n */ function _merger(key, target, source, options) {\n if (!isValidKey(key)) {\n return;\n }\n const tval = target[key];\n const sval = source[key];\n if (isObject(tval) && isObject(sval)) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n merge(tval, sval, options);\n } else {\n target[key] = clone(sval);\n }\n}\nfunction merge(target, source, options) {\n const sources = isArray(source) ? source : [\n source\n ];\n const ilen = sources.length;\n if (!isObject(target)) {\n return target;\n }\n options = options || {};\n const merger = options.merger || _merger;\n let current;\n for(let i = 0; i < ilen; ++i){\n current = sources[i];\n if (!isObject(current)) {\n continue;\n }\n const keys = Object.keys(current);\n for(let k = 0, klen = keys.length; k < klen; ++k){\n merger(keys[k], target, current, options);\n }\n }\n return target;\n}\nfunction mergeIf(target, source) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return merge(target, source, {\n merger: _mergerIf\n });\n}\n/**\n * Merges source[key] in target[key] only if target[key] is undefined.\n * @private\n */ function _mergerIf(key, target, source) {\n if (!isValidKey(key)) {\n return;\n }\n const tval = target[key];\n const sval = source[key];\n if (isObject(tval) && isObject(sval)) {\n mergeIf(tval, sval);\n } else if (!Object.prototype.hasOwnProperty.call(target, key)) {\n target[key] = clone(sval);\n }\n}\n/**\n * @private\n */ function _deprecated(scope, value, previous, current) {\n if (value !== undefined) {\n console.warn(scope + ': \"' + previous + '\" is deprecated. Please use \"' + current + '\" instead');\n }\n}\n// resolveObjectKey resolver cache\nconst keyResolvers = {\n // Chart.helpers.core resolveObjectKey should resolve empty key to root object\n '': (v)=>v,\n // default resolvers\n x: (o)=>o.x,\n y: (o)=>o.y\n};\n/**\n * @private\n */ function _splitKey(key) {\n const parts = key.split('.');\n const keys = [];\n let tmp = '';\n for (const part of parts){\n tmp += part;\n if (tmp.endsWith('\\\\')) {\n tmp = tmp.slice(0, -1) + '.';\n } else {\n keys.push(tmp);\n tmp = '';\n }\n }\n return keys;\n}\nfunction _getKeyResolver(key) {\n const keys = _splitKey(key);\n return (obj)=>{\n for (const k of keys){\n if (k === '') {\n break;\n }\n obj = obj && obj[k];\n }\n return obj;\n };\n}\nfunction resolveObjectKey(obj, key) {\n const resolver = keyResolvers[key] || (keyResolvers[key] = _getKeyResolver(key));\n return resolver(obj);\n}\n/**\n * @private\n */ function _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n}\nconst defined = (value)=>typeof value !== 'undefined';\nconst isFunction = (value)=>typeof value === 'function';\n// Adapted from https://stackoverflow.com/questions/31128855/comparing-ecma6-sets-for-equality#31129384\nconst setsEqual = (a, b)=>{\n if (a.size !== b.size) {\n return false;\n }\n for (const item of a){\n if (!b.has(item)) {\n return false;\n }\n }\n return true;\n};\n/**\n * @param e - The event\n * @private\n */ function _isClickEvent(e) {\n return e.type === 'mouseup' || e.type === 'click' || e.type === 'contextmenu';\n}\n\n/**\n * @alias Chart.helpers.math\n * @namespace\n */ const PI = Math.PI;\nconst TAU = 2 * PI;\nconst PITAU = TAU + PI;\nconst INFINITY = Number.POSITIVE_INFINITY;\nconst RAD_PER_DEG = PI / 180;\nconst HALF_PI = PI / 2;\nconst QUARTER_PI = PI / 4;\nconst TWO_THIRDS_PI = PI * 2 / 3;\nconst log10 = Math.log10;\nconst sign = Math.sign;\nfunction almostEquals(x, y, epsilon) {\n return Math.abs(x - y) < epsilon;\n}\n/**\n * Implementation of the nice number algorithm used in determining where axis labels will go\n */ function niceNum(range) {\n const roundedRange = Math.round(range);\n range = almostEquals(range, roundedRange, range / 1000) ? roundedRange : range;\n const niceRange = Math.pow(10, Math.floor(log10(range)));\n const fraction = range / niceRange;\n const niceFraction = fraction <= 1 ? 1 : fraction <= 2 ? 2 : fraction <= 5 ? 5 : 10;\n return niceFraction * niceRange;\n}\n/**\n * Returns an array of factors sorted from 1 to sqrt(value)\n * @private\n */ function _factorize(value) {\n const result = [];\n const sqrt = Math.sqrt(value);\n let i;\n for(i = 1; i < sqrt; i++){\n if (value % i === 0) {\n result.push(i);\n result.push(value / i);\n }\n }\n if (sqrt === (sqrt | 0)) {\n result.push(sqrt);\n }\n result.sort((a, b)=>a - b).pop();\n return result;\n}\nfunction isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}\nfunction almostWhole(x, epsilon) {\n const rounded = Math.round(x);\n return rounded - epsilon <= x && rounded + epsilon >= x;\n}\n/**\n * @private\n */ function _setMinAndMaxByKey(array, target, property) {\n let i, ilen, value;\n for(i = 0, ilen = array.length; i < ilen; i++){\n value = array[i][property];\n if (!isNaN(value)) {\n target.min = Math.min(target.min, value);\n target.max = Math.max(target.max, value);\n }\n }\n}\nfunction toRadians(degrees) {\n return degrees * (PI / 180);\n}\nfunction toDegrees(radians) {\n return radians * (180 / PI);\n}\n/**\n * Returns the number of decimal places\n * i.e. the number of digits after the decimal point, of the value of this Number.\n * @param x - A number.\n * @returns The number of decimal places.\n * @private\n */ function _decimalPlaces(x) {\n if (!isNumberFinite(x)) {\n return;\n }\n let e = 1;\n let p = 0;\n while(Math.round(x * e) / e !== x){\n e *= 10;\n p++;\n }\n return p;\n}\n// Gets the angle from vertical upright to the point about a centre.\nfunction getAngleFromPoint(centrePoint, anglePoint) {\n const distanceFromXCenter = anglePoint.x - centrePoint.x;\n const distanceFromYCenter = anglePoint.y - centrePoint.y;\n const radialDistanceFromCenter = Math.sqrt(distanceFromXCenter * distanceFromXCenter + distanceFromYCenter * distanceFromYCenter);\n let angle = Math.atan2(distanceFromYCenter, distanceFromXCenter);\n if (angle < -0.5 * PI) {\n angle += TAU; // make sure the returned angle is in the range of (-PI/2, 3PI/2]\n }\n return {\n angle,\n distance: radialDistanceFromCenter\n };\n}\nfunction distanceBetweenPoints(pt1, pt2) {\n return Math.sqrt(Math.pow(pt2.x - pt1.x, 2) + Math.pow(pt2.y - pt1.y, 2));\n}\n/**\n * Shortest distance between angles, in either direction.\n * @private\n */ function _angleDiff(a, b) {\n return (a - b + PITAU) % TAU - PI;\n}\n/**\n * Normalize angle to be between 0 and 2*PI\n * @private\n */ function _normalizeAngle(a) {\n return (a % TAU + TAU) % TAU;\n}\n/**\n * @private\n */ function _angleBetween(angle, start, end, sameAngleIsFullCircle) {\n const a = _normalizeAngle(angle);\n const s = _normalizeAngle(start);\n const e = _normalizeAngle(end);\n const angleToStart = _normalizeAngle(s - a);\n const angleToEnd = _normalizeAngle(e - a);\n const startToAngle = _normalizeAngle(a - s);\n const endToAngle = _normalizeAngle(a - e);\n return a === s || a === e || sameAngleIsFullCircle && s === e || angleToStart > angleToEnd && startToAngle < endToAngle;\n}\n/**\n * Limit `value` between `min` and `max`\n * @param value\n * @param min\n * @param max\n * @private\n */ function _limitValue(value, min, max) {\n return Math.max(min, Math.min(max, value));\n}\n/**\n * @param {number} value\n * @private\n */ function _int16Range(value) {\n return _limitValue(value, -32768, 32767);\n}\n/**\n * @param value\n * @param start\n * @param end\n * @param [epsilon]\n * @private\n */ function _isBetween(value, start, end, epsilon = 1e-6) {\n return value >= Math.min(start, end) - epsilon && value <= Math.max(start, end) + epsilon;\n}\n\nfunction _lookup(table, value, cmp) {\n cmp = cmp || ((index)=>table[index] < value);\n let hi = table.length - 1;\n let lo = 0;\n let mid;\n while(hi - lo > 1){\n mid = lo + hi >> 1;\n if (cmp(mid)) {\n lo = mid;\n } else {\n hi = mid;\n }\n }\n return {\n lo,\n hi\n };\n}\n/**\n * Binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @param last - lookup last index\n * @private\n */ const _lookupByKey = (table, key, value, last)=>_lookup(table, value, last ? (index)=>{\n const ti = table[index][key];\n return ti < value || ti === value && table[index + 1][key] === value;\n } : (index)=>table[index][key] < value);\n/**\n * Reverse binary search\n * @param table - the table search. must be sorted!\n * @param key - property name for the value in each entry\n * @param value - value to find\n * @private\n */ const _rlookupByKey = (table, key, value)=>_lookup(table, value, (index)=>table[index][key] >= value);\n/**\n * Return subset of `values` between `min` and `max` inclusive.\n * Values are assumed to be in sorted order.\n * @param values - sorted array of values\n * @param min - min value\n * @param max - max value\n */ function _filterBetween(values, min, max) {\n let start = 0;\n let end = values.length;\n while(start < end && values[start] < min){\n start++;\n }\n while(end > start && values[end - 1] > max){\n end--;\n }\n return start > 0 || end < values.length ? values.slice(start, end) : values;\n}\nconst arrayEvents = [\n 'push',\n 'pop',\n 'shift',\n 'splice',\n 'unshift'\n];\nfunction listenArrayEvents(array, listener) {\n if (array._chartjs) {\n array._chartjs.listeners.push(listener);\n return;\n }\n Object.defineProperty(array, '_chartjs', {\n configurable: true,\n enumerable: false,\n value: {\n listeners: [\n listener\n ]\n }\n });\n arrayEvents.forEach((key)=>{\n const method = '_onData' + _capitalize(key);\n const base = array[key];\n Object.defineProperty(array, key, {\n configurable: true,\n enumerable: false,\n value (...args) {\n const res = base.apply(this, args);\n array._chartjs.listeners.forEach((object)=>{\n if (typeof object[method] === 'function') {\n object[method](...args);\n }\n });\n return res;\n }\n });\n });\n}\nfunction unlistenArrayEvents(array, listener) {\n const stub = array._chartjs;\n if (!stub) {\n return;\n }\n const listeners = stub.listeners;\n const index = listeners.indexOf(listener);\n if (index !== -1) {\n listeners.splice(index, 1);\n }\n if (listeners.length > 0) {\n return;\n }\n arrayEvents.forEach((key)=>{\n delete array[key];\n });\n delete array._chartjs;\n}\n/**\n * @param items\n */ function _arrayUnique(items) {\n const set = new Set(items);\n if (set.size === items.length) {\n return items;\n }\n return Array.from(set);\n}\n\nfunction fontString(pixelSize, fontStyle, fontFamily) {\n return fontStyle + ' ' + pixelSize + 'px ' + fontFamily;\n}\n/**\n* Request animation polyfill\n*/ const requestAnimFrame = function() {\n if (typeof window === 'undefined') {\n return function(callback) {\n return callback();\n };\n }\n return window.requestAnimationFrame;\n}();\n/**\n * Throttles calling `fn` once per animation frame\n * Latest arguments are used on the actual call\n */ function throttled(fn, thisArg) {\n let argsToUse = [];\n let ticking = false;\n return function(...args) {\n // Save the args for use later\n argsToUse = args;\n if (!ticking) {\n ticking = true;\n requestAnimFrame.call(window, ()=>{\n ticking = false;\n fn.apply(thisArg, argsToUse);\n });\n }\n };\n}\n/**\n * Debounces calling `fn` for `delay` ms\n */ function debounce(fn, delay) {\n let timeout;\n return function(...args) {\n if (delay) {\n clearTimeout(timeout);\n timeout = setTimeout(fn, delay, args);\n } else {\n fn.apply(this, args);\n }\n return delay;\n };\n}\n/**\n * Converts 'start' to 'left', 'end' to 'right' and others to 'center'\n * @private\n */ const _toLeftRightCenter = (align)=>align === 'start' ? 'left' : align === 'end' ? 'right' : 'center';\n/**\n * Returns `start`, `end` or `(start + end) / 2` depending on `align`. Defaults to `center`\n * @private\n */ const _alignStartEnd = (align, start, end)=>align === 'start' ? start : align === 'end' ? end : (start + end) / 2;\n/**\n * Returns `left`, `right` or `(left + right) / 2` depending on `align`. Defaults to `left`\n * @private\n */ const _textX = (align, left, right, rtl)=>{\n const check = rtl ? 'left' : 'right';\n return align === check ? right : align === 'center' ? (left + right) / 2 : left;\n};\n/**\n * Return start and count of visible points.\n * @private\n */ function _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled) {\n const pointCount = points.length;\n let start = 0;\n let count = pointCount;\n if (meta._sorted) {\n const { iScale , _parsed } = meta;\n const axis = iScale.axis;\n const { min , max , minDefined , maxDefined } = iScale.getUserBounds();\n if (minDefined) {\n start = _limitValue(Math.min(// @ts-expect-error Need to type _parsed\n _lookupByKey(_parsed, iScale.axis, min).lo, // @ts-expect-error Need to fix types on _lookupByKey\n animationsDisabled ? pointCount : _lookupByKey(points, axis, iScale.getPixelForValue(min)).lo), 0, pointCount - 1);\n }\n if (maxDefined) {\n count = _limitValue(Math.max(// @ts-expect-error Need to type _parsed\n _lookupByKey(_parsed, iScale.axis, max, true).hi + 1, // @ts-expect-error Need to fix types on _lookupByKey\n animationsDisabled ? 0 : _lookupByKey(points, axis, iScale.getPixelForValue(max), true).hi + 1), start, pointCount) - start;\n } else {\n count = pointCount - start;\n }\n }\n return {\n start,\n count\n };\n}\n/**\n * Checks if the scale ranges have changed.\n * @param {object} meta - dataset meta.\n * @returns {boolean}\n * @private\n */ function _scaleRangesChanged(meta) {\n const { xScale , yScale , _scaleRanges } = meta;\n const newRanges = {\n xmin: xScale.min,\n xmax: xScale.max,\n ymin: yScale.min,\n ymax: yScale.max\n };\n if (!_scaleRanges) {\n meta._scaleRanges = newRanges;\n return true;\n }\n const changed = _scaleRanges.xmin !== xScale.min || _scaleRanges.xmax !== xScale.max || _scaleRanges.ymin !== yScale.min || _scaleRanges.ymax !== yScale.max;\n Object.assign(_scaleRanges, newRanges);\n return changed;\n}\n\nconst atEdge = (t)=>t === 0 || t === 1;\nconst elasticIn = (t, s, p)=>-(Math.pow(2, 10 * (t -= 1)) * Math.sin((t - s) * TAU / p));\nconst elasticOut = (t, s, p)=>Math.pow(2, -10 * t) * Math.sin((t - s) * TAU / p) + 1;\n/**\n * Easing functions adapted from Robert Penner's easing equations.\n * @namespace Chart.helpers.easing.effects\n * @see http://www.robertpenner.com/easing/\n */ const effects = {\n linear: (t)=>t,\n easeInQuad: (t)=>t * t,\n easeOutQuad: (t)=>-t * (t - 2),\n easeInOutQuad: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t : -0.5 * (--t * (t - 2) - 1),\n easeInCubic: (t)=>t * t * t,\n easeOutCubic: (t)=>(t -= 1) * t * t + 1,\n easeInOutCubic: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t : 0.5 * ((t -= 2) * t * t + 2),\n easeInQuart: (t)=>t * t * t * t,\n easeOutQuart: (t)=>-((t -= 1) * t * t * t - 1),\n easeInOutQuart: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t * t : -0.5 * ((t -= 2) * t * t * t - 2),\n easeInQuint: (t)=>t * t * t * t * t,\n easeOutQuint: (t)=>(t -= 1) * t * t * t * t + 1,\n easeInOutQuint: (t)=>(t /= 0.5) < 1 ? 0.5 * t * t * t * t * t : 0.5 * ((t -= 2) * t * t * t * t + 2),\n easeInSine: (t)=>-Math.cos(t * HALF_PI) + 1,\n easeOutSine: (t)=>Math.sin(t * HALF_PI),\n easeInOutSine: (t)=>-0.5 * (Math.cos(PI * t) - 1),\n easeInExpo: (t)=>t === 0 ? 0 : Math.pow(2, 10 * (t - 1)),\n easeOutExpo: (t)=>t === 1 ? 1 : -Math.pow(2, -10 * t) + 1,\n easeInOutExpo: (t)=>atEdge(t) ? t : t < 0.5 ? 0.5 * Math.pow(2, 10 * (t * 2 - 1)) : 0.5 * (-Math.pow(2, -10 * (t * 2 - 1)) + 2),\n easeInCirc: (t)=>t >= 1 ? t : -(Math.sqrt(1 - t * t) - 1),\n easeOutCirc: (t)=>Math.sqrt(1 - (t -= 1) * t),\n easeInOutCirc: (t)=>(t /= 0.5) < 1 ? -0.5 * (Math.sqrt(1 - t * t) - 1) : 0.5 * (Math.sqrt(1 - (t -= 2) * t) + 1),\n easeInElastic: (t)=>atEdge(t) ? t : elasticIn(t, 0.075, 0.3),\n easeOutElastic: (t)=>atEdge(t) ? t : elasticOut(t, 0.075, 0.3),\n easeInOutElastic (t) {\n const s = 0.1125;\n const p = 0.45;\n return atEdge(t) ? t : t < 0.5 ? 0.5 * elasticIn(t * 2, s, p) : 0.5 + 0.5 * elasticOut(t * 2 - 1, s, p);\n },\n easeInBack (t) {\n const s = 1.70158;\n return t * t * ((s + 1) * t - s);\n },\n easeOutBack (t) {\n const s = 1.70158;\n return (t -= 1) * t * ((s + 1) * t + s) + 1;\n },\n easeInOutBack (t) {\n let s = 1.70158;\n if ((t /= 0.5) < 1) {\n return 0.5 * (t * t * (((s *= 1.525) + 1) * t - s));\n }\n return 0.5 * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2);\n },\n easeInBounce: (t)=>1 - effects.easeOutBounce(1 - t),\n easeOutBounce (t) {\n const m = 7.5625;\n const d = 2.75;\n if (t < 1 / d) {\n return m * t * t;\n }\n if (t < 2 / d) {\n return m * (t -= 1.5 / d) * t + 0.75;\n }\n if (t < 2.5 / d) {\n return m * (t -= 2.25 / d) * t + 0.9375;\n }\n return m * (t -= 2.625 / d) * t + 0.984375;\n },\n easeInOutBounce: (t)=>t < 0.5 ? effects.easeInBounce(t * 2) * 0.5 : effects.easeOutBounce(t * 2 - 1) * 0.5 + 0.5\n};\n\nfunction isPatternOrGradient(value) {\n if (value && typeof value === 'object') {\n const type = value.toString();\n return type === '[object CanvasPattern]' || type === '[object CanvasGradient]';\n }\n return false;\n}\nfunction color(value) {\n return isPatternOrGradient(value) ? value : new Color(value);\n}\nfunction getHoverColor(value) {\n return isPatternOrGradient(value) ? value : new Color(value).saturate(0.5).darken(0.1).hexString();\n}\n\nconst numbers = [\n 'x',\n 'y',\n 'borderWidth',\n 'radius',\n 'tension'\n];\nconst colors = [\n 'color',\n 'borderColor',\n 'backgroundColor'\n];\nfunction applyAnimationsDefaults(defaults) {\n defaults.set('animation', {\n delay: undefined,\n duration: 1000,\n easing: 'easeOutQuart',\n fn: undefined,\n from: undefined,\n loop: undefined,\n to: undefined,\n type: undefined\n });\n defaults.describe('animation', {\n _fallback: false,\n _indexable: false,\n _scriptable: (name)=>name !== 'onProgress' && name !== 'onComplete' && name !== 'fn'\n });\n defaults.set('animations', {\n colors: {\n type: 'color',\n properties: colors\n },\n numbers: {\n type: 'number',\n properties: numbers\n }\n });\n defaults.describe('animations', {\n _fallback: 'animation'\n });\n defaults.set('transitions', {\n active: {\n animation: {\n duration: 400\n }\n },\n resize: {\n animation: {\n duration: 0\n }\n },\n show: {\n animations: {\n colors: {\n from: 'transparent'\n },\n visible: {\n type: 'boolean',\n duration: 0\n }\n }\n },\n hide: {\n animations: {\n colors: {\n to: 'transparent'\n },\n visible: {\n type: 'boolean',\n easing: 'linear',\n fn: (v)=>v | 0\n }\n }\n }\n });\n}\n\nfunction applyLayoutsDefaults(defaults) {\n defaults.set('layout', {\n autoPadding: true,\n padding: {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n }\n });\n}\n\nconst intlCache = new Map();\nfunction getNumberFormat(locale, options) {\n options = options || {};\n const cacheKey = locale + JSON.stringify(options);\n let formatter = intlCache.get(cacheKey);\n if (!formatter) {\n formatter = new Intl.NumberFormat(locale, options);\n intlCache.set(cacheKey, formatter);\n }\n return formatter;\n}\nfunction formatNumber(num, locale, options) {\n return getNumberFormat(locale, options).format(num);\n}\n\nconst formatters = {\n values (value) {\n return isArray(value) ? value : '' + value;\n },\n numeric (tickValue, index, ticks) {\n if (tickValue === 0) {\n return '0';\n }\n const locale = this.chart.options.locale;\n let notation;\n let delta = tickValue;\n if (ticks.length > 1) {\n const maxTick = Math.max(Math.abs(ticks[0].value), Math.abs(ticks[ticks.length - 1].value));\n if (maxTick < 1e-4 || maxTick > 1e+15) {\n notation = 'scientific';\n }\n delta = calculateDelta(tickValue, ticks);\n }\n const logDelta = log10(Math.abs(delta));\n const numDecimal = isNaN(logDelta) ? 1 : Math.max(Math.min(-1 * Math.floor(logDelta), 20), 0);\n const options = {\n notation,\n minimumFractionDigits: numDecimal,\n maximumFractionDigits: numDecimal\n };\n Object.assign(options, this.options.ticks.format);\n return formatNumber(tickValue, locale, options);\n },\n logarithmic (tickValue, index, ticks) {\n if (tickValue === 0) {\n return '0';\n }\n const remain = ticks[index].significand || tickValue / Math.pow(10, Math.floor(log10(tickValue)));\n if ([\n 1,\n 2,\n 3,\n 5,\n 10,\n 15\n ].includes(remain) || index > 0.8 * ticks.length) {\n return formatters.numeric.call(this, tickValue, index, ticks);\n }\n return '';\n }\n};\nfunction calculateDelta(tickValue, ticks) {\n let delta = ticks.length > 3 ? ticks[2].value - ticks[1].value : ticks[1].value - ticks[0].value;\n if (Math.abs(delta) >= 1 && tickValue !== Math.floor(tickValue)) {\n delta = tickValue - Math.floor(tickValue);\n }\n return delta;\n}\n var Ticks = {\n formatters\n};\n\nfunction applyScaleDefaults(defaults) {\n defaults.set('scale', {\n display: true,\n offset: false,\n reverse: false,\n beginAtZero: false,\n bounds: 'ticks',\n grace: 0,\n grid: {\n display: true,\n lineWidth: 1,\n drawOnChartArea: true,\n drawTicks: true,\n tickLength: 8,\n tickWidth: (_ctx, options)=>options.lineWidth,\n tickColor: (_ctx, options)=>options.color,\n offset: false\n },\n border: {\n display: true,\n dash: [],\n dashOffset: 0.0,\n width: 1\n },\n title: {\n display: false,\n text: '',\n padding: {\n top: 4,\n bottom: 4\n }\n },\n ticks: {\n minRotation: 0,\n maxRotation: 50,\n mirror: false,\n textStrokeWidth: 0,\n textStrokeColor: '',\n padding: 3,\n display: true,\n autoSkip: true,\n autoSkipPadding: 3,\n labelOffset: 0,\n callback: Ticks.formatters.values,\n minor: {},\n major: {},\n align: 'center',\n crossAlign: 'near',\n showLabelBackdrop: false,\n backdropColor: 'rgba(255, 255, 255, 0.75)',\n backdropPadding: 2\n }\n });\n defaults.route('scale.ticks', 'color', '', 'color');\n defaults.route('scale.grid', 'color', '', 'borderColor');\n defaults.route('scale.border', 'color', '', 'borderColor');\n defaults.route('scale.title', 'color', '', 'color');\n defaults.describe('scale', {\n _fallback: false,\n _scriptable: (name)=>!name.startsWith('before') && !name.startsWith('after') && name !== 'callback' && name !== 'parser',\n _indexable: (name)=>name !== 'borderDash' && name !== 'tickBorderDash' && name !== 'dash'\n });\n defaults.describe('scales', {\n _fallback: 'scale'\n });\n defaults.describe('scale.ticks', {\n _scriptable: (name)=>name !== 'backdropPadding' && name !== 'callback',\n _indexable: (name)=>name !== 'backdropPadding'\n });\n}\n\nconst overrides = Object.create(null);\nconst descriptors = Object.create(null);\n function getScope$1(node, key) {\n if (!key) {\n return node;\n }\n const keys = key.split('.');\n for(let i = 0, n = keys.length; i < n; ++i){\n const k = keys[i];\n node = node[k] || (node[k] = Object.create(null));\n }\n return node;\n}\nfunction set(root, scope, values) {\n if (typeof scope === 'string') {\n return merge(getScope$1(root, scope), values);\n }\n return merge(getScope$1(root, ''), scope);\n}\n class Defaults {\n constructor(_descriptors, _appliers){\n this.animation = undefined;\n this.backgroundColor = 'rgba(0,0,0,0.1)';\n this.borderColor = 'rgba(0,0,0,0.1)';\n this.color = '#666';\n this.datasets = {};\n this.devicePixelRatio = (context)=>context.chart.platform.getDevicePixelRatio();\n this.elements = {};\n this.events = [\n 'mousemove',\n 'mouseout',\n 'click',\n 'touchstart',\n 'touchmove'\n ];\n this.font = {\n family: \"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif\",\n size: 12,\n style: 'normal',\n lineHeight: 1.2,\n weight: null\n };\n this.hover = {};\n this.hoverBackgroundColor = (ctx, options)=>getHoverColor(options.backgroundColor);\n this.hoverBorderColor = (ctx, options)=>getHoverColor(options.borderColor);\n this.hoverColor = (ctx, options)=>getHoverColor(options.color);\n this.indexAxis = 'x';\n this.interaction = {\n mode: 'nearest',\n intersect: true,\n includeInvisible: false\n };\n this.maintainAspectRatio = true;\n this.onHover = null;\n this.onClick = null;\n this.parsing = true;\n this.plugins = {};\n this.responsive = true;\n this.scale = undefined;\n this.scales = {};\n this.showLine = true;\n this.drawActiveElementsOnTop = true;\n this.describe(_descriptors);\n this.apply(_appliers);\n }\n set(scope, values) {\n return set(this, scope, values);\n }\n get(scope) {\n return getScope$1(this, scope);\n }\n describe(scope, values) {\n return set(descriptors, scope, values);\n }\n override(scope, values) {\n return set(overrides, scope, values);\n }\n route(scope, name, targetScope, targetName) {\n const scopeObject = getScope$1(this, scope);\n const targetScopeObject = getScope$1(this, targetScope);\n const privateName = '_' + name;\n Object.defineProperties(scopeObject, {\n [privateName]: {\n value: scopeObject[name],\n writable: true\n },\n [name]: {\n enumerable: true,\n get () {\n const local = this[privateName];\n const target = targetScopeObject[targetName];\n if (isObject(local)) {\n return Object.assign({}, target, local);\n }\n return valueOrDefault(local, target);\n },\n set (value) {\n this[privateName] = value;\n }\n }\n });\n }\n apply(appliers) {\n appliers.forEach((apply)=>apply(this));\n }\n}\nvar defaults = /* #__PURE__ */ new Defaults({\n _scriptable: (name)=>!name.startsWith('on'),\n _indexable: (name)=>name !== 'events',\n hover: {\n _fallback: 'interaction'\n },\n interaction: {\n _scriptable: false,\n _indexable: false\n }\n}, [\n applyAnimationsDefaults,\n applyLayoutsDefaults,\n applyScaleDefaults\n]);\n\n/**\n * Converts the given font object into a CSS font string.\n * @param font - A font object.\n * @return The CSS font string. See https://developer.mozilla.org/en-US/docs/Web/CSS/font\n * @private\n */ function toFontString(font) {\n if (!font || isNullOrUndef(font.size) || isNullOrUndef(font.family)) {\n return null;\n }\n return (font.style ? font.style + ' ' : '') + (font.weight ? font.weight + ' ' : '') + font.size + 'px ' + font.family;\n}\n/**\n * @private\n */ function _measureText(ctx, data, gc, longest, string) {\n let textWidth = data[string];\n if (!textWidth) {\n textWidth = data[string] = ctx.measureText(string).width;\n gc.push(string);\n }\n if (textWidth > longest) {\n longest = textWidth;\n }\n return longest;\n}\n/**\n * @private\n */ // eslint-disable-next-line complexity\nfunction _longestText(ctx, font, arrayOfThings, cache) {\n cache = cache || {};\n let data = cache.data = cache.data || {};\n let gc = cache.garbageCollect = cache.garbageCollect || [];\n if (cache.font !== font) {\n data = cache.data = {};\n gc = cache.garbageCollect = [];\n cache.font = font;\n }\n ctx.save();\n ctx.font = font;\n let longest = 0;\n const ilen = arrayOfThings.length;\n let i, j, jlen, thing, nestedThing;\n for(i = 0; i < ilen; i++){\n thing = arrayOfThings[i];\n // Undefined strings and arrays should not be measured\n if (thing !== undefined && thing !== null && !isArray(thing)) {\n longest = _measureText(ctx, data, gc, longest, thing);\n } else if (isArray(thing)) {\n // if it is an array lets measure each element\n // to do maybe simplify this function a bit so we can do this more recursively?\n for(j = 0, jlen = thing.length; j < jlen; j++){\n nestedThing = thing[j];\n // Undefined strings and arrays should not be measured\n if (nestedThing !== undefined && nestedThing !== null && !isArray(nestedThing)) {\n longest = _measureText(ctx, data, gc, longest, nestedThing);\n }\n }\n }\n }\n ctx.restore();\n const gcLen = gc.length / 2;\n if (gcLen > arrayOfThings.length) {\n for(i = 0; i < gcLen; i++){\n delete data[gc[i]];\n }\n gc.splice(0, gcLen);\n }\n return longest;\n}\n/**\n * Returns the aligned pixel value to avoid anti-aliasing blur\n * @param chart - The chart instance.\n * @param pixel - A pixel value.\n * @param width - The width of the element.\n * @returns The aligned pixel value.\n * @private\n */ function _alignPixel(chart, pixel, width) {\n const devicePixelRatio = chart.currentDevicePixelRatio;\n const halfWidth = width !== 0 ? Math.max(width / 2, 0.5) : 0;\n return Math.round((pixel - halfWidth) * devicePixelRatio) / devicePixelRatio + halfWidth;\n}\n/**\n * Clears the entire canvas.\n */ function clearCanvas(canvas, ctx) {\n ctx = ctx || canvas.getContext('2d');\n ctx.save();\n // canvas.width and canvas.height do not consider the canvas transform,\n // while clearRect does\n ctx.resetTransform();\n ctx.clearRect(0, 0, canvas.width, canvas.height);\n ctx.restore();\n}\nfunction drawPoint(ctx, options, x, y) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n drawPointLegend(ctx, options, x, y, null);\n}\n// eslint-disable-next-line complexity\nfunction drawPointLegend(ctx, options, x, y, w) {\n let type, xOffset, yOffset, size, cornerRadius, width, xOffsetW, yOffsetW;\n const style = options.pointStyle;\n const rotation = options.rotation;\n const radius = options.radius;\n let rad = (rotation || 0) * RAD_PER_DEG;\n if (style && typeof style === 'object') {\n type = style.toString();\n if (type === '[object HTMLImageElement]' || type === '[object HTMLCanvasElement]') {\n ctx.save();\n ctx.translate(x, y);\n ctx.rotate(rad);\n ctx.drawImage(style, -style.width / 2, -style.height / 2, style.width, style.height);\n ctx.restore();\n return;\n }\n }\n if (isNaN(radius) || radius <= 0) {\n return;\n }\n ctx.beginPath();\n switch(style){\n // Default includes circle\n default:\n if (w) {\n ctx.ellipse(x, y, w / 2, radius, 0, 0, TAU);\n } else {\n ctx.arc(x, y, radius, 0, TAU);\n }\n ctx.closePath();\n break;\n case 'triangle':\n width = w ? w / 2 : radius;\n ctx.moveTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n rad += TWO_THIRDS_PI;\n ctx.lineTo(x + Math.sin(rad) * width, y - Math.cos(rad) * radius);\n ctx.closePath();\n break;\n case 'rectRounded':\n // NOTE: the rounded rect implementation changed to use `arc` instead of\n // `quadraticCurveTo` since it generates better results when rect is\n // almost a circle. 0.516 (instead of 0.5) produces results with visually\n // closer proportion to the previous impl and it is inscribed in the\n // circle with `radius`. For more details, see the following PRs:\n // https://github.com/chartjs/Chart.js/issues/5597\n // https://github.com/chartjs/Chart.js/issues/5858\n cornerRadius = radius * 0.516;\n size = radius - cornerRadius;\n xOffset = Math.cos(rad + QUARTER_PI) * size;\n xOffsetW = Math.cos(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n yOffset = Math.sin(rad + QUARTER_PI) * size;\n yOffsetW = Math.sin(rad + QUARTER_PI) * (w ? w / 2 - cornerRadius : size);\n ctx.arc(x - xOffsetW, y - yOffset, cornerRadius, rad - PI, rad - HALF_PI);\n ctx.arc(x + yOffsetW, y - xOffset, cornerRadius, rad - HALF_PI, rad);\n ctx.arc(x + xOffsetW, y + yOffset, cornerRadius, rad, rad + HALF_PI);\n ctx.arc(x - yOffsetW, y + xOffset, cornerRadius, rad + HALF_PI, rad + PI);\n ctx.closePath();\n break;\n case 'rect':\n if (!rotation) {\n size = Math.SQRT1_2 * radius;\n width = w ? w / 2 : size;\n ctx.rect(x - width, y - size, 2 * width, 2 * size);\n break;\n }\n rad += QUARTER_PI;\n /* falls through */ case 'rectRot':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n ctx.closePath();\n break;\n case 'crossRot':\n rad += QUARTER_PI;\n /* falls through */ case 'cross':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n break;\n case 'star':\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n rad += QUARTER_PI;\n xOffsetW = Math.cos(rad) * (w ? w / 2 : radius);\n xOffset = Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n yOffsetW = Math.sin(rad) * (w ? w / 2 : radius);\n ctx.moveTo(x - xOffsetW, y - yOffset);\n ctx.lineTo(x + xOffsetW, y + yOffset);\n ctx.moveTo(x + yOffsetW, y - xOffset);\n ctx.lineTo(x - yOffsetW, y + xOffset);\n break;\n case 'line':\n xOffset = w ? w / 2 : Math.cos(rad) * radius;\n yOffset = Math.sin(rad) * radius;\n ctx.moveTo(x - xOffset, y - yOffset);\n ctx.lineTo(x + xOffset, y + yOffset);\n break;\n case 'dash':\n ctx.moveTo(x, y);\n ctx.lineTo(x + Math.cos(rad) * (w ? w / 2 : radius), y + Math.sin(rad) * radius);\n break;\n case false:\n ctx.closePath();\n break;\n }\n ctx.fill();\n if (options.borderWidth > 0) {\n ctx.stroke();\n }\n}\n/**\n * Returns true if the point is inside the rectangle\n * @param point - The point to test\n * @param area - The rectangle\n * @param margin - allowed margin\n * @private\n */ function _isPointInArea(point, area, margin) {\n margin = margin || 0.5; // margin - default is to match rounded decimals\n return !area || point && point.x > area.left - margin && point.x < area.right + margin && point.y > area.top - margin && point.y < area.bottom + margin;\n}\nfunction clipArea(ctx, area) {\n ctx.save();\n ctx.beginPath();\n ctx.rect(area.left, area.top, area.right - area.left, area.bottom - area.top);\n ctx.clip();\n}\nfunction unclipArea(ctx) {\n ctx.restore();\n}\n/**\n * @private\n */ function _steppedLineTo(ctx, previous, target, flip, mode) {\n if (!previous) {\n return ctx.lineTo(target.x, target.y);\n }\n if (mode === 'middle') {\n const midpoint = (previous.x + target.x) / 2.0;\n ctx.lineTo(midpoint, previous.y);\n ctx.lineTo(midpoint, target.y);\n } else if (mode === 'after' !== !!flip) {\n ctx.lineTo(previous.x, target.y);\n } else {\n ctx.lineTo(target.x, previous.y);\n }\n ctx.lineTo(target.x, target.y);\n}\n/**\n * @private\n */ function _bezierCurveTo(ctx, previous, target, flip) {\n if (!previous) {\n return ctx.lineTo(target.x, target.y);\n }\n ctx.bezierCurveTo(flip ? previous.cp1x : previous.cp2x, flip ? previous.cp1y : previous.cp2y, flip ? target.cp2x : target.cp1x, flip ? target.cp2y : target.cp1y, target.x, target.y);\n}\nfunction setRenderOpts(ctx, opts) {\n if (opts.translation) {\n ctx.translate(opts.translation[0], opts.translation[1]);\n }\n if (!isNullOrUndef(opts.rotation)) {\n ctx.rotate(opts.rotation);\n }\n if (opts.color) {\n ctx.fillStyle = opts.color;\n }\n if (opts.textAlign) {\n ctx.textAlign = opts.textAlign;\n }\n if (opts.textBaseline) {\n ctx.textBaseline = opts.textBaseline;\n }\n}\nfunction decorateText(ctx, x, y, line, opts) {\n if (opts.strikethrough || opts.underline) {\n /**\n * Now that IE11 support has been dropped, we can use more\n * of the TextMetrics object. The actual bounding boxes\n * are unflagged in Chrome, Firefox, Edge, and Safari so they\n * can be safely used.\n * See https://developer.mozilla.org/en-US/docs/Web/API/TextMetrics#Browser_compatibility\n */ const metrics = ctx.measureText(line);\n const left = x - metrics.actualBoundingBoxLeft;\n const right = x + metrics.actualBoundingBoxRight;\n const top = y - metrics.actualBoundingBoxAscent;\n const bottom = y + metrics.actualBoundingBoxDescent;\n const yDecoration = opts.strikethrough ? (top + bottom) / 2 : bottom;\n ctx.strokeStyle = ctx.fillStyle;\n ctx.beginPath();\n ctx.lineWidth = opts.decorationWidth || 2;\n ctx.moveTo(left, yDecoration);\n ctx.lineTo(right, yDecoration);\n ctx.stroke();\n }\n}\nfunction drawBackdrop(ctx, opts) {\n const oldColor = ctx.fillStyle;\n ctx.fillStyle = opts.color;\n ctx.fillRect(opts.left, opts.top, opts.width, opts.height);\n ctx.fillStyle = oldColor;\n}\n/**\n * Render text onto the canvas\n */ function renderText(ctx, text, x, y, font, opts = {}) {\n const lines = isArray(text) ? text : [\n text\n ];\n const stroke = opts.strokeWidth > 0 && opts.strokeColor !== '';\n let i, line;\n ctx.save();\n ctx.font = font.string;\n setRenderOpts(ctx, opts);\n for(i = 0; i < lines.length; ++i){\n line = lines[i];\n if (opts.backdrop) {\n drawBackdrop(ctx, opts.backdrop);\n }\n if (stroke) {\n if (opts.strokeColor) {\n ctx.strokeStyle = opts.strokeColor;\n }\n if (!isNullOrUndef(opts.strokeWidth)) {\n ctx.lineWidth = opts.strokeWidth;\n }\n ctx.strokeText(line, x, y, opts.maxWidth);\n }\n ctx.fillText(line, x, y, opts.maxWidth);\n decorateText(ctx, x, y, line, opts);\n y += Number(font.lineHeight);\n }\n ctx.restore();\n}\n/**\n * Add a path of a rectangle with rounded corners to the current sub-path\n * @param ctx - Context\n * @param rect - Bounding rect\n */ function addRoundedRectPath(ctx, rect) {\n const { x , y , w , h , radius } = rect;\n // top left arc\n ctx.arc(x + radius.topLeft, y + radius.topLeft, radius.topLeft, -HALF_PI, PI, true);\n // line from top left to bottom left\n ctx.lineTo(x, y + h - radius.bottomLeft);\n // bottom left arc\n ctx.arc(x + radius.bottomLeft, y + h - radius.bottomLeft, radius.bottomLeft, PI, HALF_PI, true);\n // line from bottom left to bottom right\n ctx.lineTo(x + w - radius.bottomRight, y + h);\n // bottom right arc\n ctx.arc(x + w - radius.bottomRight, y + h - radius.bottomRight, radius.bottomRight, HALF_PI, 0, true);\n // line from bottom right to top right\n ctx.lineTo(x + w, y + radius.topRight);\n // top right arc\n ctx.arc(x + w - radius.topRight, y + radius.topRight, radius.topRight, 0, -HALF_PI, true);\n // line from top right to top left\n ctx.lineTo(x + radius.topLeft, y);\n}\n\nconst LINE_HEIGHT = /^(normal|(\\d+(?:\\.\\d+)?)(px|em|%)?)$/;\nconst FONT_STYLE = /^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;\n/**\n * @alias Chart.helpers.options\n * @namespace\n */ /**\n * Converts the given line height `value` in pixels for a specific font `size`.\n * @param value - The lineHeight to parse (eg. 1.6, '14px', '75%', '1.6em').\n * @param size - The font size (in pixels) used to resolve relative `value`.\n * @returns The effective line height in pixels (size * 1.2 if value is invalid).\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/line-height\n * @since 2.7.0\n */ function toLineHeight(value, size) {\n const matches = ('' + value).match(LINE_HEIGHT);\n if (!matches || matches[1] === 'normal') {\n return size * 1.2;\n }\n value = +matches[2];\n switch(matches[3]){\n case 'px':\n return value;\n case '%':\n value /= 100;\n break;\n }\n return size * value;\n}\nconst numberOrZero = (v)=>+v || 0;\nfunction _readValueToProps(value, props) {\n const ret = {};\n const objProps = isObject(props);\n const keys = objProps ? Object.keys(props) : props;\n const read = isObject(value) ? objProps ? (prop)=>valueOrDefault(value[prop], value[props[prop]]) : (prop)=>value[prop] : ()=>value;\n for (const prop of keys){\n ret[prop] = numberOrZero(read(prop));\n }\n return ret;\n}\n/**\n * Converts the given value into a TRBL object.\n * @param value - If a number, set the value to all TRBL component,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left)\n * @since 3.0.0\n */ function toTRBL(value) {\n return _readValueToProps(value, {\n top: 'y',\n right: 'x',\n bottom: 'y',\n left: 'x'\n });\n}\n/**\n * Converts the given value into a TRBL corners object (similar with css border-radius).\n * @param value - If a number, set the value to all TRBL corner components,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * @returns The TRBL corner values (topLeft, topRight, bottomLeft, bottomRight)\n * @since 3.0.0\n */ function toTRBLCorners(value) {\n return _readValueToProps(value, [\n 'topLeft',\n 'topRight',\n 'bottomLeft',\n 'bottomRight'\n ]);\n}\n/**\n * Converts the given value into a padding object with pre-computed width/height.\n * @param value - If a number, set the value to all TRBL component,\n * else, if an object, use defined properties and sets undefined ones to 0.\n * x / y are shorthands for same value for left/right and top/bottom.\n * @returns The padding values (top, right, bottom, left, width, height)\n * @since 2.7.0\n */ function toPadding(value) {\n const obj = toTRBL(value);\n obj.width = obj.left + obj.right;\n obj.height = obj.top + obj.bottom;\n return obj;\n}\n/**\n * Parses font options and returns the font object.\n * @param options - A object that contains font options to be parsed.\n * @param fallback - A object that contains fallback font options.\n * @return The font object.\n * @private\n */ function toFont(options, fallback) {\n options = options || {};\n fallback = fallback || defaults.font;\n let size = valueOrDefault(options.size, fallback.size);\n if (typeof size === 'string') {\n size = parseInt(size, 10);\n }\n let style = valueOrDefault(options.style, fallback.style);\n if (style && !('' + style).match(FONT_STYLE)) {\n console.warn('Invalid font style specified: \"' + style + '\"');\n style = undefined;\n }\n const font = {\n family: valueOrDefault(options.family, fallback.family),\n lineHeight: toLineHeight(valueOrDefault(options.lineHeight, fallback.lineHeight), size),\n size,\n style,\n weight: valueOrDefault(options.weight, fallback.weight),\n string: ''\n };\n font.string = toFontString(font);\n return font;\n}\n/**\n * Evaluates the given `inputs` sequentially and returns the first defined value.\n * @param inputs - An array of values, falling back to the last value.\n * @param context - If defined and the current value is a function, the value\n * is called with `context` as first argument and the result becomes the new input.\n * @param index - If defined and the current value is an array, the value\n * at `index` become the new input.\n * @param info - object to return information about resolution in\n * @param info.cacheable - Will be set to `false` if option is not cacheable.\n * @since 2.7.0\n */ function resolve(inputs, context, index, info) {\n let cacheable = true;\n let i, ilen, value;\n for(i = 0, ilen = inputs.length; i < ilen; ++i){\n value = inputs[i];\n if (value === undefined) {\n continue;\n }\n if (context !== undefined && typeof value === 'function') {\n value = value(context);\n cacheable = false;\n }\n if (index !== undefined && isArray(value)) {\n value = value[index % value.length];\n cacheable = false;\n }\n if (value !== undefined) {\n if (info && !cacheable) {\n info.cacheable = false;\n }\n return value;\n }\n }\n}\n/**\n * @param minmax\n * @param grace\n * @param beginAtZero\n * @private\n */ function _addGrace(minmax, grace, beginAtZero) {\n const { min , max } = minmax;\n const change = toDimension(grace, (max - min) / 2);\n const keepZero = (value, add)=>beginAtZero && value === 0 ? 0 : value + add;\n return {\n min: keepZero(min, -Math.abs(change)),\n max: keepZero(max, change)\n };\n}\nfunction createContext(parentContext, context) {\n return Object.assign(Object.create(parentContext), context);\n}\n\n/**\n * Creates a Proxy for resolving raw values for options.\n * @param scopes - The option scopes to look for values, in resolution order\n * @param prefixes - The prefixes for values, in resolution order.\n * @param rootScopes - The root option scopes\n * @param fallback - Parent scopes fallback\n * @param getTarget - callback for getting the target for changed values\n * @returns Proxy\n * @private\n */ function _createResolver(scopes, prefixes = [\n ''\n], rootScopes, fallback, getTarget = ()=>scopes[0]) {\n const finalRootScopes = rootScopes || scopes;\n if (typeof fallback === 'undefined') {\n fallback = _resolve('_fallback', scopes);\n }\n const cache = {\n [Symbol.toStringTag]: 'Object',\n _cacheable: true,\n _scopes: scopes,\n _rootScopes: finalRootScopes,\n _fallback: fallback,\n _getTarget: getTarget,\n override: (scope)=>_createResolver([\n scope,\n ...scopes\n ], prefixes, finalRootScopes, fallback)\n };\n return new Proxy(cache, {\n /**\n * A trap for the delete operator.\n */ deleteProperty (target, prop) {\n delete target[prop]; // remove from cache\n delete target._keys; // remove cached keys\n delete scopes[0][prop]; // remove from top level scope\n return true;\n },\n /**\n * A trap for getting property values.\n */ get (target, prop) {\n return _cached(target, prop, ()=>_resolveWithPrefixes(prop, prefixes, scopes, target));\n },\n /**\n * A trap for Object.getOwnPropertyDescriptor.\n * Also used by Object.hasOwnProperty.\n */ getOwnPropertyDescriptor (target, prop) {\n return Reflect.getOwnPropertyDescriptor(target._scopes[0], prop);\n },\n /**\n * A trap for Object.getPrototypeOf.\n */ getPrototypeOf () {\n return Reflect.getPrototypeOf(scopes[0]);\n },\n /**\n * A trap for the in operator.\n */ has (target, prop) {\n return getKeysFromAllScopes(target).includes(prop);\n },\n /**\n * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n */ ownKeys (target) {\n return getKeysFromAllScopes(target);\n },\n /**\n * A trap for setting property values.\n */ set (target, prop, value) {\n const storage = target._storage || (target._storage = getTarget());\n target[prop] = storage[prop] = value; // set to top level scope + cache\n delete target._keys; // remove cached keys\n return true;\n }\n });\n}\n/**\n * Returns an Proxy for resolving option values with context.\n * @param proxy - The Proxy returned by `_createResolver`\n * @param context - Context object for scriptable/indexable options\n * @param subProxy - The proxy provided for scriptable options\n * @param descriptorDefaults - Defaults for descriptors\n * @private\n */ function _attachContext(proxy, context, subProxy, descriptorDefaults) {\n const cache = {\n _cacheable: false,\n _proxy: proxy,\n _context: context,\n _subProxy: subProxy,\n _stack: new Set(),\n _descriptors: _descriptors(proxy, descriptorDefaults),\n setContext: (ctx)=>_attachContext(proxy, ctx, subProxy, descriptorDefaults),\n override: (scope)=>_attachContext(proxy.override(scope), context, subProxy, descriptorDefaults)\n };\n return new Proxy(cache, {\n /**\n * A trap for the delete operator.\n */ deleteProperty (target, prop) {\n delete target[prop]; // remove from cache\n delete proxy[prop]; // remove from proxy\n return true;\n },\n /**\n * A trap for getting property values.\n */ get (target, prop, receiver) {\n return _cached(target, prop, ()=>_resolveWithContext(target, prop, receiver));\n },\n /**\n * A trap for Object.getOwnPropertyDescriptor.\n * Also used by Object.hasOwnProperty.\n */ getOwnPropertyDescriptor (target, prop) {\n return target._descriptors.allKeys ? Reflect.has(proxy, prop) ? {\n enumerable: true,\n configurable: true\n } : undefined : Reflect.getOwnPropertyDescriptor(proxy, prop);\n },\n /**\n * A trap for Object.getPrototypeOf.\n */ getPrototypeOf () {\n return Reflect.getPrototypeOf(proxy);\n },\n /**\n * A trap for the in operator.\n */ has (target, prop) {\n return Reflect.has(proxy, prop);\n },\n /**\n * A trap for Object.getOwnPropertyNames and Object.getOwnPropertySymbols.\n */ ownKeys () {\n return Reflect.ownKeys(proxy);\n },\n /**\n * A trap for setting property values.\n */ set (target, prop, value) {\n proxy[prop] = value; // set to proxy\n delete target[prop]; // remove from cache\n return true;\n }\n });\n}\n/**\n * @private\n */ function _descriptors(proxy, defaults = {\n scriptable: true,\n indexable: true\n}) {\n const { _scriptable =defaults.scriptable , _indexable =defaults.indexable , _allKeys =defaults.allKeys } = proxy;\n return {\n allKeys: _allKeys,\n scriptable: _scriptable,\n indexable: _indexable,\n isScriptable: isFunction(_scriptable) ? _scriptable : ()=>_scriptable,\n isIndexable: isFunction(_indexable) ? _indexable : ()=>_indexable\n };\n}\nconst readKey = (prefix, name)=>prefix ? prefix + _capitalize(name) : name;\nconst needsSubResolver = (prop, value)=>isObject(value) && prop !== 'adapters' && (Object.getPrototypeOf(value) === null || value.constructor === Object);\nfunction _cached(target, prop, resolve) {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n return target[prop];\n }\n const value = resolve();\n // cache the resolved value\n target[prop] = value;\n return value;\n}\nfunction _resolveWithContext(target, prop, receiver) {\n const { _proxy , _context , _subProxy , _descriptors: descriptors } = target;\n let value = _proxy[prop]; // resolve from proxy\n // resolve with context\n if (isFunction(value) && descriptors.isScriptable(prop)) {\n value = _resolveScriptable(prop, value, target, receiver);\n }\n if (isArray(value) && value.length) {\n value = _resolveArray(prop, value, target, descriptors.isIndexable);\n }\n if (needsSubResolver(prop, value)) {\n // if the resolved value is an object, create a sub resolver for it\n value = _attachContext(value, _context, _subProxy && _subProxy[prop], descriptors);\n }\n return value;\n}\nfunction _resolveScriptable(prop, getValue, target, receiver) {\n const { _proxy , _context , _subProxy , _stack } = target;\n if (_stack.has(prop)) {\n throw new Error('Recursion detected: ' + Array.from(_stack).join('->') + '->' + prop);\n }\n _stack.add(prop);\n let value = getValue(_context, _subProxy || receiver);\n _stack.delete(prop);\n if (needsSubResolver(prop, value)) {\n // When scriptable option returns an object, create a resolver on that.\n value = createSubResolver(_proxy._scopes, _proxy, prop, value);\n }\n return value;\n}\nfunction _resolveArray(prop, value, target, isIndexable) {\n const { _proxy , _context , _subProxy , _descriptors: descriptors } = target;\n if (typeof _context.index !== 'undefined' && isIndexable(prop)) {\n return value[_context.index % value.length];\n } else if (isObject(value[0])) {\n // Array of objects, return array or resolvers\n const arr = value;\n const scopes = _proxy._scopes.filter((s)=>s !== arr);\n value = [];\n for (const item of arr){\n const resolver = createSubResolver(scopes, _proxy, prop, item);\n value.push(_attachContext(resolver, _context, _subProxy && _subProxy[prop], descriptors));\n }\n }\n return value;\n}\nfunction resolveFallback(fallback, prop, value) {\n return isFunction(fallback) ? fallback(prop, value) : fallback;\n}\nconst getScope = (key, parent)=>key === true ? parent : typeof key === 'string' ? resolveObjectKey(parent, key) : undefined;\nfunction addScopes(set, parentScopes, key, parentFallback, value) {\n for (const parent of parentScopes){\n const scope = getScope(key, parent);\n if (scope) {\n set.add(scope);\n const fallback = resolveFallback(scope._fallback, key, value);\n if (typeof fallback !== 'undefined' && fallback !== key && fallback !== parentFallback) {\n // When we reach the descriptor that defines a new _fallback, return that.\n // The fallback will resume to that new scope.\n return fallback;\n }\n } else if (scope === false && typeof parentFallback !== 'undefined' && key !== parentFallback) {\n // Fallback to `false` results to `false`, when falling back to different key.\n // For example `interaction` from `hover` or `plugins.tooltip` and `animation` from `animations`\n return null;\n }\n }\n return false;\n}\nfunction createSubResolver(parentScopes, resolver, prop, value) {\n const rootScopes = resolver._rootScopes;\n const fallback = resolveFallback(resolver._fallback, prop, value);\n const allScopes = [\n ...parentScopes,\n ...rootScopes\n ];\n const set = new Set();\n set.add(value);\n let key = addScopesFromKey(set, allScopes, prop, fallback || prop, value);\n if (key === null) {\n return false;\n }\n if (typeof fallback !== 'undefined' && fallback !== prop) {\n key = addScopesFromKey(set, allScopes, fallback, key, value);\n if (key === null) {\n return false;\n }\n }\n return _createResolver(Array.from(set), [\n ''\n ], rootScopes, fallback, ()=>subGetTarget(resolver, prop, value));\n}\nfunction addScopesFromKey(set, allScopes, key, fallback, item) {\n while(key){\n key = addScopes(set, allScopes, key, fallback, item);\n }\n return key;\n}\nfunction subGetTarget(resolver, prop, value) {\n const parent = resolver._getTarget();\n if (!(prop in parent)) {\n parent[prop] = {};\n }\n const target = parent[prop];\n if (isArray(target) && isObject(value)) {\n // For array of objects, the object is used to store updated values\n return value;\n }\n return target || {};\n}\nfunction _resolveWithPrefixes(prop, prefixes, scopes, proxy) {\n let value;\n for (const prefix of prefixes){\n value = _resolve(readKey(prefix, prop), scopes);\n if (typeof value !== 'undefined') {\n return needsSubResolver(prop, value) ? createSubResolver(scopes, proxy, prop, value) : value;\n }\n }\n}\nfunction _resolve(key, scopes) {\n for (const scope of scopes){\n if (!scope) {\n continue;\n }\n const value = scope[key];\n if (typeof value !== 'undefined') {\n return value;\n }\n }\n}\nfunction getKeysFromAllScopes(target) {\n let keys = target._keys;\n if (!keys) {\n keys = target._keys = resolveKeysFromAllScopes(target._scopes);\n }\n return keys;\n}\nfunction resolveKeysFromAllScopes(scopes) {\n const set = new Set();\n for (const scope of scopes){\n for (const key of Object.keys(scope).filter((k)=>!k.startsWith('_'))){\n set.add(key);\n }\n }\n return Array.from(set);\n}\nfunction _parseObjectDataRadialScale(meta, data, start, count) {\n const { iScale } = meta;\n const { key ='r' } = this._parsing;\n const parsed = new Array(count);\n let i, ilen, index, item;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n item = data[index];\n parsed[i] = {\n r: iScale.parse(resolveObjectKey(item, key), index)\n };\n }\n return parsed;\n}\n\nconst EPSILON = Number.EPSILON || 1e-14;\nconst getPoint = (points, i)=>i < points.length && !points[i].skip && points[i];\nconst getValueAxis = (indexAxis)=>indexAxis === 'x' ? 'y' : 'x';\nfunction splineCurve(firstPoint, middlePoint, afterPoint, t) {\n // Props to Rob Spencer at scaled innovation for his post on splining between points\n // http://scaledinnovation.com/analytics/splines/aboutSplines.html\n // This function must also respect \"skipped\" points\n const previous = firstPoint.skip ? middlePoint : firstPoint;\n const current = middlePoint;\n const next = afterPoint.skip ? middlePoint : afterPoint;\n const d01 = distanceBetweenPoints(current, previous);\n const d12 = distanceBetweenPoints(next, current);\n let s01 = d01 / (d01 + d12);\n let s12 = d12 / (d01 + d12);\n // If all points are the same, s01 & s02 will be inf\n s01 = isNaN(s01) ? 0 : s01;\n s12 = isNaN(s12) ? 0 : s12;\n const fa = t * s01; // scaling factor for triangle Ta\n const fb = t * s12;\n return {\n previous: {\n x: current.x - fa * (next.x - previous.x),\n y: current.y - fa * (next.y - previous.y)\n },\n next: {\n x: current.x + fb * (next.x - previous.x),\n y: current.y + fb * (next.y - previous.y)\n }\n };\n}\n/**\n * Adjust tangents to ensure monotonic properties\n */ function monotoneAdjust(points, deltaK, mK) {\n const pointsLen = points.length;\n let alphaK, betaK, tauK, squaredMagnitude, pointCurrent;\n let pointAfter = getPoint(points, 0);\n for(let i = 0; i < pointsLen - 1; ++i){\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent || !pointAfter) {\n continue;\n }\n if (almostEquals(deltaK[i], 0, EPSILON)) {\n mK[i] = mK[i + 1] = 0;\n continue;\n }\n alphaK = mK[i] / deltaK[i];\n betaK = mK[i + 1] / deltaK[i];\n squaredMagnitude = Math.pow(alphaK, 2) + Math.pow(betaK, 2);\n if (squaredMagnitude <= 9) {\n continue;\n }\n tauK = 3 / Math.sqrt(squaredMagnitude);\n mK[i] = alphaK * tauK * deltaK[i];\n mK[i + 1] = betaK * tauK * deltaK[i];\n }\n}\nfunction monotoneCompute(points, mK, indexAxis = 'x') {\n const valueAxis = getValueAxis(indexAxis);\n const pointsLen = points.length;\n let delta, pointBefore, pointCurrent;\n let pointAfter = getPoint(points, 0);\n for(let i = 0; i < pointsLen; ++i){\n pointBefore = pointCurrent;\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent) {\n continue;\n }\n const iPixel = pointCurrent[indexAxis];\n const vPixel = pointCurrent[valueAxis];\n if (pointBefore) {\n delta = (iPixel - pointBefore[indexAxis]) / 3;\n pointCurrent[`cp1${indexAxis}`] = iPixel - delta;\n pointCurrent[`cp1${valueAxis}`] = vPixel - delta * mK[i];\n }\n if (pointAfter) {\n delta = (pointAfter[indexAxis] - iPixel) / 3;\n pointCurrent[`cp2${indexAxis}`] = iPixel + delta;\n pointCurrent[`cp2${valueAxis}`] = vPixel + delta * mK[i];\n }\n }\n}\n/**\n * This function calculates Bézier control points in a similar way than |splineCurve|,\n * but preserves monotonicity of the provided data and ensures no local extremums are added\n * between the dataset discrete points due to the interpolation.\n * See : https://en.wikipedia.org/wiki/Monotone_cubic_interpolation\n */ function splineCurveMonotone(points, indexAxis = 'x') {\n const valueAxis = getValueAxis(indexAxis);\n const pointsLen = points.length;\n const deltaK = Array(pointsLen).fill(0);\n const mK = Array(pointsLen);\n // Calculate slopes (deltaK) and initialize tangents (mK)\n let i, pointBefore, pointCurrent;\n let pointAfter = getPoint(points, 0);\n for(i = 0; i < pointsLen; ++i){\n pointBefore = pointCurrent;\n pointCurrent = pointAfter;\n pointAfter = getPoint(points, i + 1);\n if (!pointCurrent) {\n continue;\n }\n if (pointAfter) {\n const slopeDelta = pointAfter[indexAxis] - pointCurrent[indexAxis];\n // In the case of two points that appear at the same x pixel, slopeDeltaX is 0\n deltaK[i] = slopeDelta !== 0 ? (pointAfter[valueAxis] - pointCurrent[valueAxis]) / slopeDelta : 0;\n }\n mK[i] = !pointBefore ? deltaK[i] : !pointAfter ? deltaK[i - 1] : sign(deltaK[i - 1]) !== sign(deltaK[i]) ? 0 : (deltaK[i - 1] + deltaK[i]) / 2;\n }\n monotoneAdjust(points, deltaK, mK);\n monotoneCompute(points, mK, indexAxis);\n}\nfunction capControlPoint(pt, min, max) {\n return Math.max(Math.min(pt, max), min);\n}\nfunction capBezierPoints(points, area) {\n let i, ilen, point, inArea, inAreaPrev;\n let inAreaNext = _isPointInArea(points[0], area);\n for(i = 0, ilen = points.length; i < ilen; ++i){\n inAreaPrev = inArea;\n inArea = inAreaNext;\n inAreaNext = i < ilen - 1 && _isPointInArea(points[i + 1], area);\n if (!inArea) {\n continue;\n }\n point = points[i];\n if (inAreaPrev) {\n point.cp1x = capControlPoint(point.cp1x, area.left, area.right);\n point.cp1y = capControlPoint(point.cp1y, area.top, area.bottom);\n }\n if (inAreaNext) {\n point.cp2x = capControlPoint(point.cp2x, area.left, area.right);\n point.cp2y = capControlPoint(point.cp2y, area.top, area.bottom);\n }\n }\n}\n/**\n * @private\n */ function _updateBezierControlPoints(points, options, area, loop, indexAxis) {\n let i, ilen, point, controlPoints;\n // Only consider points that are drawn in case the spanGaps option is used\n if (options.spanGaps) {\n points = points.filter((pt)=>!pt.skip);\n }\n if (options.cubicInterpolationMode === 'monotone') {\n splineCurveMonotone(points, indexAxis);\n } else {\n let prev = loop ? points[points.length - 1] : points[0];\n for(i = 0, ilen = points.length; i < ilen; ++i){\n point = points[i];\n controlPoints = splineCurve(prev, point, points[Math.min(i + 1, ilen - (loop ? 0 : 1)) % ilen], options.tension);\n point.cp1x = controlPoints.previous.x;\n point.cp1y = controlPoints.previous.y;\n point.cp2x = controlPoints.next.x;\n point.cp2y = controlPoints.next.y;\n prev = point;\n }\n }\n if (options.capBezierPoints) {\n capBezierPoints(points, area);\n }\n}\n\n/**\n * Note: typedefs are auto-exported, so use a made-up `dom` namespace where\n * necessary to avoid duplicates with `export * from './helpers`; see\n * https://github.com/microsoft/TypeScript/issues/46011\n * @typedef { import('../core/core.controller.js').default } dom.Chart\n * @typedef { import('../../types').ChartEvent } ChartEvent\n */ /**\n * @private\n */ function _isDomSupported() {\n return typeof window !== 'undefined' && typeof document !== 'undefined';\n}\n/**\n * @private\n */ function _getParentNode(domNode) {\n let parent = domNode.parentNode;\n if (parent && parent.toString() === '[object ShadowRoot]') {\n parent = parent.host;\n }\n return parent;\n}\n/**\n * convert max-width/max-height values that may be percentages into a number\n * @private\n */ function parseMaxStyle(styleValue, node, parentProperty) {\n let valueInPixels;\n if (typeof styleValue === 'string') {\n valueInPixels = parseInt(styleValue, 10);\n if (styleValue.indexOf('%') !== -1) {\n // percentage * size in dimension\n valueInPixels = valueInPixels / 100 * node.parentNode[parentProperty];\n }\n } else {\n valueInPixels = styleValue;\n }\n return valueInPixels;\n}\nconst getComputedStyle = (element)=>element.ownerDocument.defaultView.getComputedStyle(element, null);\nfunction getStyle(el, property) {\n return getComputedStyle(el).getPropertyValue(property);\n}\nconst positions = [\n 'top',\n 'right',\n 'bottom',\n 'left'\n];\nfunction getPositionedStyle(styles, style, suffix) {\n const result = {};\n suffix = suffix ? '-' + suffix : '';\n for(let i = 0; i < 4; i++){\n const pos = positions[i];\n result[pos] = parseFloat(styles[style + '-' + pos + suffix]) || 0;\n }\n result.width = result.left + result.right;\n result.height = result.top + result.bottom;\n return result;\n}\nconst useOffsetPos = (x, y, target)=>(x > 0 || y > 0) && (!target || !target.shadowRoot);\n/**\n * @param e\n * @param canvas\n * @returns Canvas position\n */ function getCanvasPosition(e, canvas) {\n const touches = e.touches;\n const source = touches && touches.length ? touches[0] : e;\n const { offsetX , offsetY } = source;\n let box = false;\n let x, y;\n if (useOffsetPos(offsetX, offsetY, e.target)) {\n x = offsetX;\n y = offsetY;\n } else {\n const rect = canvas.getBoundingClientRect();\n x = source.clientX - rect.left;\n y = source.clientY - rect.top;\n box = true;\n }\n return {\n x,\n y,\n box\n };\n}\n/**\n * Gets an event's x, y coordinates, relative to the chart area\n * @param event\n * @param chart\n * @returns x and y coordinates of the event\n */ function getRelativePosition(event, chart) {\n if ('native' in event) {\n return event;\n }\n const { canvas , currentDevicePixelRatio } = chart;\n const style = getComputedStyle(canvas);\n const borderBox = style.boxSizing === 'border-box';\n const paddings = getPositionedStyle(style, 'padding');\n const borders = getPositionedStyle(style, 'border', 'width');\n const { x , y , box } = getCanvasPosition(event, canvas);\n const xOffset = paddings.left + (box && borders.left);\n const yOffset = paddings.top + (box && borders.top);\n let { width , height } = chart;\n if (borderBox) {\n width -= paddings.width + borders.width;\n height -= paddings.height + borders.height;\n }\n return {\n x: Math.round((x - xOffset) / width * canvas.width / currentDevicePixelRatio),\n y: Math.round((y - yOffset) / height * canvas.height / currentDevicePixelRatio)\n };\n}\nfunction getContainerSize(canvas, width, height) {\n let maxWidth, maxHeight;\n if (width === undefined || height === undefined) {\n const container = _getParentNode(canvas);\n if (!container) {\n width = canvas.clientWidth;\n height = canvas.clientHeight;\n } else {\n const rect = container.getBoundingClientRect(); // this is the border box of the container\n const containerStyle = getComputedStyle(container);\n const containerBorder = getPositionedStyle(containerStyle, 'border', 'width');\n const containerPadding = getPositionedStyle(containerStyle, 'padding');\n width = rect.width - containerPadding.width - containerBorder.width;\n height = rect.height - containerPadding.height - containerBorder.height;\n maxWidth = parseMaxStyle(containerStyle.maxWidth, container, 'clientWidth');\n maxHeight = parseMaxStyle(containerStyle.maxHeight, container, 'clientHeight');\n }\n }\n return {\n width,\n height,\n maxWidth: maxWidth || INFINITY,\n maxHeight: maxHeight || INFINITY\n };\n}\nconst round1 = (v)=>Math.round(v * 10) / 10;\n// eslint-disable-next-line complexity\nfunction getMaximumSize(canvas, bbWidth, bbHeight, aspectRatio) {\n const style = getComputedStyle(canvas);\n const margins = getPositionedStyle(style, 'margin');\n const maxWidth = parseMaxStyle(style.maxWidth, canvas, 'clientWidth') || INFINITY;\n const maxHeight = parseMaxStyle(style.maxHeight, canvas, 'clientHeight') || INFINITY;\n const containerSize = getContainerSize(canvas, bbWidth, bbHeight);\n let { width , height } = containerSize;\n if (style.boxSizing === 'content-box') {\n const borders = getPositionedStyle(style, 'border', 'width');\n const paddings = getPositionedStyle(style, 'padding');\n width -= paddings.width + borders.width;\n height -= paddings.height + borders.height;\n }\n width = Math.max(0, width - margins.width);\n height = Math.max(0, aspectRatio ? width / aspectRatio : height - margins.height);\n width = round1(Math.min(width, maxWidth, containerSize.maxWidth));\n height = round1(Math.min(height, maxHeight, containerSize.maxHeight));\n if (width && !height) {\n // https://github.com/chartjs/Chart.js/issues/4659\n // If the canvas has width, but no height, default to aspectRatio of 2 (canvas default)\n height = round1(width / 2);\n }\n const maintainHeight = bbWidth !== undefined || bbHeight !== undefined;\n if (maintainHeight && aspectRatio && containerSize.height && height > containerSize.height) {\n height = containerSize.height;\n width = round1(Math.floor(height * aspectRatio));\n }\n return {\n width,\n height\n };\n}\n/**\n * @param chart\n * @param forceRatio\n * @param forceStyle\n * @returns True if the canvas context size or transformation has changed.\n */ function retinaScale(chart, forceRatio, forceStyle) {\n const pixelRatio = forceRatio || 1;\n const deviceHeight = Math.floor(chart.height * pixelRatio);\n const deviceWidth = Math.floor(chart.width * pixelRatio);\n chart.height = Math.floor(chart.height);\n chart.width = Math.floor(chart.width);\n const canvas = chart.canvas;\n // If no style has been set on the canvas, the render size is used as display size,\n // making the chart visually bigger, so let's enforce it to the \"correct\" values.\n // See https://github.com/chartjs/Chart.js/issues/3575\n if (canvas.style && (forceStyle || !canvas.style.height && !canvas.style.width)) {\n canvas.style.height = `${chart.height}px`;\n canvas.style.width = `${chart.width}px`;\n }\n if (chart.currentDevicePixelRatio !== pixelRatio || canvas.height !== deviceHeight || canvas.width !== deviceWidth) {\n chart.currentDevicePixelRatio = pixelRatio;\n canvas.height = deviceHeight;\n canvas.width = deviceWidth;\n chart.ctx.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n return true;\n }\n return false;\n}\n/**\n * Detects support for options object argument in addEventListener.\n * https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#Safely_detecting_option_support\n * @private\n */ const supportsEventListenerOptions = function() {\n let passiveSupported = false;\n try {\n const options = {\n get passive () {\n passiveSupported = true;\n return false;\n }\n };\n window.addEventListener('test', null, options);\n window.removeEventListener('test', null, options);\n } catch (e) {\n // continue regardless of error\n }\n return passiveSupported;\n}();\n/**\n * The \"used\" size is the final value of a dimension property after all calculations have\n * been performed. This method uses the computed style of `element` but returns undefined\n * if the computed style is not expressed in pixels. That can happen in some cases where\n * `element` has a size relative to its parent and this last one is not yet displayed,\n * for example because of `display: none` on a parent node.\n * @see https://developer.mozilla.org/en-US/docs/Web/CSS/used_value\n * @returns Size in pixels or undefined if unknown.\n */ function readUsedSize(element, property) {\n const value = getStyle(element, property);\n const matches = value && value.match(/^(\\d+)(\\.\\d+)?px$/);\n return matches ? +matches[1] : undefined;\n}\n\n/**\n * @private\n */ function _pointInLine(p1, p2, t, mode) {\n return {\n x: p1.x + t * (p2.x - p1.x),\n y: p1.y + t * (p2.y - p1.y)\n };\n}\n/**\n * @private\n */ function _steppedInterpolation(p1, p2, t, mode) {\n return {\n x: p1.x + t * (p2.x - p1.x),\n y: mode === 'middle' ? t < 0.5 ? p1.y : p2.y : mode === 'after' ? t < 1 ? p1.y : p2.y : t > 0 ? p2.y : p1.y\n };\n}\n/**\n * @private\n */ function _bezierInterpolation(p1, p2, t, mode) {\n const cp1 = {\n x: p1.cp2x,\n y: p1.cp2y\n };\n const cp2 = {\n x: p2.cp1x,\n y: p2.cp1y\n };\n const a = _pointInLine(p1, cp1, t);\n const b = _pointInLine(cp1, cp2, t);\n const c = _pointInLine(cp2, p2, t);\n const d = _pointInLine(a, b, t);\n const e = _pointInLine(b, c, t);\n return _pointInLine(d, e, t);\n}\n\nconst getRightToLeftAdapter = function(rectX, width) {\n return {\n x (x) {\n return rectX + rectX + width - x;\n },\n setWidth (w) {\n width = w;\n },\n textAlign (align) {\n if (align === 'center') {\n return align;\n }\n return align === 'right' ? 'left' : 'right';\n },\n xPlus (x, value) {\n return x - value;\n },\n leftForLtr (x, itemWidth) {\n return x - itemWidth;\n }\n };\n};\nconst getLeftToRightAdapter = function() {\n return {\n x (x) {\n return x;\n },\n setWidth (w) {},\n textAlign (align) {\n return align;\n },\n xPlus (x, value) {\n return x + value;\n },\n leftForLtr (x, _itemWidth) {\n return x;\n }\n };\n};\nfunction getRtlAdapter(rtl, rectX, width) {\n return rtl ? getRightToLeftAdapter(rectX, width) : getLeftToRightAdapter();\n}\nfunction overrideTextDirection(ctx, direction) {\n let style, original;\n if (direction === 'ltr' || direction === 'rtl') {\n style = ctx.canvas.style;\n original = [\n style.getPropertyValue('direction'),\n style.getPropertyPriority('direction')\n ];\n style.setProperty('direction', direction, 'important');\n ctx.prevTextDirection = original;\n }\n}\nfunction restoreTextDirection(ctx, original) {\n if (original !== undefined) {\n delete ctx.prevTextDirection;\n ctx.canvas.style.setProperty('direction', original[0], original[1]);\n }\n}\n\nfunction propertyFn(property) {\n if (property === 'angle') {\n return {\n between: _angleBetween,\n compare: _angleDiff,\n normalize: _normalizeAngle\n };\n }\n return {\n between: _isBetween,\n compare: (a, b)=>a - b,\n normalize: (x)=>x\n };\n}\nfunction normalizeSegment({ start , end , count , loop , style }) {\n return {\n start: start % count,\n end: end % count,\n loop: loop && (end - start + 1) % count === 0,\n style\n };\n}\nfunction getSegment(segment, points, bounds) {\n const { property , start: startBound , end: endBound } = bounds;\n const { between , normalize } = propertyFn(property);\n const count = points.length;\n let { start , end , loop } = segment;\n let i, ilen;\n if (loop) {\n start += count;\n end += count;\n for(i = 0, ilen = count; i < ilen; ++i){\n if (!between(normalize(points[start % count][property]), startBound, endBound)) {\n break;\n }\n start--;\n end--;\n }\n start %= count;\n end %= count;\n }\n if (end < start) {\n end += count;\n }\n return {\n start,\n end,\n loop,\n style: segment.style\n };\n}\n function _boundSegment(segment, points, bounds) {\n if (!bounds) {\n return [\n segment\n ];\n }\n const { property , start: startBound , end: endBound } = bounds;\n const count = points.length;\n const { compare , between , normalize } = propertyFn(property);\n const { start , end , loop , style } = getSegment(segment, points, bounds);\n const result = [];\n let inside = false;\n let subStart = null;\n let value, point, prevValue;\n const startIsBefore = ()=>between(startBound, prevValue, value) && compare(startBound, prevValue) !== 0;\n const endIsBefore = ()=>compare(endBound, value) === 0 || between(endBound, prevValue, value);\n const shouldStart = ()=>inside || startIsBefore();\n const shouldStop = ()=>!inside || endIsBefore();\n for(let i = start, prev = start; i <= end; ++i){\n point = points[i % count];\n if (point.skip) {\n continue;\n }\n value = normalize(point[property]);\n if (value === prevValue) {\n continue;\n }\n inside = between(value, startBound, endBound);\n if (subStart === null && shouldStart()) {\n subStart = compare(value, startBound) === 0 ? i : prev;\n }\n if (subStart !== null && shouldStop()) {\n result.push(normalizeSegment({\n start: subStart,\n end: i,\n loop,\n count,\n style\n }));\n subStart = null;\n }\n prev = i;\n prevValue = value;\n }\n if (subStart !== null) {\n result.push(normalizeSegment({\n start: subStart,\n end,\n loop,\n count,\n style\n }));\n }\n return result;\n}\n function _boundSegments(line, bounds) {\n const result = [];\n const segments = line.segments;\n for(let i = 0; i < segments.length; i++){\n const sub = _boundSegment(segments[i], line.points, bounds);\n if (sub.length) {\n result.push(...sub);\n }\n }\n return result;\n}\n function findStartAndEnd(points, count, loop, spanGaps) {\n let start = 0;\n let end = count - 1;\n if (loop && !spanGaps) {\n while(start < count && !points[start].skip){\n start++;\n }\n }\n while(start < count && points[start].skip){\n start++;\n }\n start %= count;\n if (loop) {\n end += start;\n }\n while(end > start && points[end % count].skip){\n end--;\n }\n end %= count;\n return {\n start,\n end\n };\n}\n function solidSegments(points, start, max, loop) {\n const count = points.length;\n const result = [];\n let last = start;\n let prev = points[start];\n let end;\n for(end = start + 1; end <= max; ++end){\n const cur = points[end % count];\n if (cur.skip || cur.stop) {\n if (!prev.skip) {\n loop = false;\n result.push({\n start: start % count,\n end: (end - 1) % count,\n loop\n });\n start = last = cur.stop ? end : null;\n }\n } else {\n last = end;\n if (prev.skip) {\n start = end;\n }\n }\n prev = cur;\n }\n if (last !== null) {\n result.push({\n start: start % count,\n end: last % count,\n loop\n });\n }\n return result;\n}\n function _computeSegments(line, segmentOptions) {\n const points = line.points;\n const spanGaps = line.options.spanGaps;\n const count = points.length;\n if (!count) {\n return [];\n }\n const loop = !!line._loop;\n const { start , end } = findStartAndEnd(points, count, loop, spanGaps);\n if (spanGaps === true) {\n return splitByStyles(line, [\n {\n start,\n end,\n loop\n }\n ], points, segmentOptions);\n }\n const max = end < start ? end + count : end;\n const completeLoop = !!line._fullLoop && start === 0 && end === count - 1;\n return splitByStyles(line, solidSegments(points, start, max, completeLoop), points, segmentOptions);\n}\n function splitByStyles(line, segments, points, segmentOptions) {\n if (!segmentOptions || !segmentOptions.setContext || !points) {\n return segments;\n }\n return doSplitByStyles(line, segments, points, segmentOptions);\n}\n function doSplitByStyles(line, segments, points, segmentOptions) {\n const chartContext = line._chart.getContext();\n const baseStyle = readStyle(line.options);\n const { _datasetIndex: datasetIndex , options: { spanGaps } } = line;\n const count = points.length;\n const result = [];\n let prevStyle = baseStyle;\n let start = segments[0].start;\n let i = start;\n function addStyle(s, e, l, st) {\n const dir = spanGaps ? -1 : 1;\n if (s === e) {\n return;\n }\n s += count;\n while(points[s % count].skip){\n s -= dir;\n }\n while(points[e % count].skip){\n e += dir;\n }\n if (s % count !== e % count) {\n result.push({\n start: s % count,\n end: e % count,\n loop: l,\n style: st\n });\n prevStyle = st;\n start = e % count;\n }\n }\n for (const segment of segments){\n start = spanGaps ? start : segment.start;\n let prev = points[start % count];\n let style;\n for(i = start + 1; i <= segment.end; i++){\n const pt = points[i % count];\n style = readStyle(segmentOptions.setContext(createContext(chartContext, {\n type: 'segment',\n p0: prev,\n p1: pt,\n p0DataIndex: (i - 1) % count,\n p1DataIndex: i % count,\n datasetIndex\n })));\n if (styleChanged(style, prevStyle)) {\n addStyle(start, i - 1, segment.loop, prevStyle);\n }\n prev = pt;\n prevStyle = style;\n }\n if (start < i - 1) {\n addStyle(start, i - 1, segment.loop, prevStyle);\n }\n }\n return result;\n}\nfunction readStyle(options) {\n return {\n backgroundColor: options.backgroundColor,\n borderCapStyle: options.borderCapStyle,\n borderDash: options.borderDash,\n borderDashOffset: options.borderDashOffset,\n borderJoinStyle: options.borderJoinStyle,\n borderWidth: options.borderWidth,\n borderColor: options.borderColor\n };\n}\nfunction styleChanged(style, prevStyle) {\n if (!prevStyle) {\n return false;\n }\n const cache = [];\n const replacer = function(key, value) {\n if (!isPatternOrGradient(value)) {\n return value;\n }\n if (!cache.includes(value)) {\n cache.push(value);\n }\n return cache.indexOf(value);\n };\n return JSON.stringify(style, replacer) !== JSON.stringify(prevStyle, replacer);\n}\n\nexport { unclipArea as $, _rlookupByKey as A, _lookupByKey as B, _isPointInArea as C, getAngleFromPoint as D, toPadding as E, each as F, getMaximumSize as G, HALF_PI as H, _getParentNode as I, readUsedSize as J, supportsEventListenerOptions as K, throttled as L, _isDomSupported as M, _factorize as N, finiteOrDefault as O, PI as P, callback as Q, _addGrace as R, _limitValue as S, TAU as T, toDegrees as U, _measureText as V, _int16Range as W, _alignPixel as X, clipArea as Y, renderText as Z, _arrayUnique as _, resolve as a, fontString as a$, toFont as a0, _toLeftRightCenter as a1, _alignStartEnd as a2, overrides as a3, merge as a4, _capitalize as a5, descriptors as a6, isFunction as a7, _attachContext as a8, _createResolver as a9, overrideTextDirection as aA, _textX as aB, restoreTextDirection as aC, drawPointLegend as aD, distanceBetweenPoints as aE, noop as aF, _setMinAndMaxByKey as aG, niceNum as aH, almostWhole as aI, almostEquals as aJ, _decimalPlaces as aK, Ticks as aL, log10 as aM, _longestText as aN, _filterBetween as aO, _lookup as aP, isPatternOrGradient as aQ, getHoverColor as aR, clone as aS, _merger as aT, _mergerIf as aU, _deprecated as aV, _splitKey as aW, toFontString as aX, splineCurve as aY, splineCurveMonotone as aZ, getStyle as a_, _descriptors as aa, mergeIf as ab, uid as ac, debounce as ad, retinaScale as ae, clearCanvas as af, setsEqual as ag, _elementsEqual as ah, _isClickEvent as ai, _isBetween as aj, _readValueToProps as ak, _updateBezierControlPoints as al, _computeSegments as am, _boundSegments as an, _steppedInterpolation as ao, _bezierInterpolation as ap, _pointInLine as aq, _steppedLineTo as ar, _bezierCurveTo as as, drawPoint as at, addRoundedRectPath as au, toTRBL as av, toTRBLCorners as aw, _boundSegment as ax, _normalizeAngle as ay, getRtlAdapter as az, isArray as b, toLineHeight as b0, PITAU as b1, INFINITY as b2, RAD_PER_DEG as b3, QUARTER_PI as b4, TWO_THIRDS_PI as b5, _angleDiff as b6, color as c, defaults as d, effects as e, resolveObjectKey as f, isNumberFinite as g, defined as h, isObject as i, createContext as j, isNullOrUndef as k, listenArrayEvents as l, toPercentage as m, toDimension as n, formatNumber as o, _angleBetween as p, _getStartAndCountOfVisiblePoints as q, requestAnimFrame as r, sign as s, toRadians as t, unlistenArrayEvents as u, valueOrDefault as v, _scaleRangesChanged as w, isNumber as x, _parseObjectDataRadialScale as y, getRelativePosition as z };\n//# sourceMappingURL=helpers.segment.js.map\n","/*!\n * Chart.js v4.3.0\n * https://www.chartjs.org\n * (c) 2023 Chart.js Contributors\n * Released under the MIT License\n */\nimport { r as requestAnimFrame, a as resolve, e as effects, c as color, i as isObject, d as defaults, b as isArray, v as valueOrDefault, u as unlistenArrayEvents, l as listenArrayEvents, f as resolveObjectKey, g as isNumberFinite, h as defined, s as sign, j as createContext, k as isNullOrUndef, _ as _arrayUnique, t as toRadians, m as toPercentage, n as toDimension, T as TAU, o as formatNumber, p as _angleBetween, H as HALF_PI, P as PI, q as _getStartAndCountOfVisiblePoints, w as _scaleRangesChanged, x as isNumber, y as _parseObjectDataRadialScale, z as getRelativePosition, A as _rlookupByKey, B as _lookupByKey, C as _isPointInArea, D as getAngleFromPoint, E as toPadding, F as each, G as getMaximumSize, I as _getParentNode, J as readUsedSize, K as supportsEventListenerOptions, L as throttled, M as _isDomSupported, N as _factorize, O as finiteOrDefault, Q as callback, R as _addGrace, S as _limitValue, U as toDegrees, V as _measureText, W as _int16Range, X as _alignPixel, Y as clipArea, Z as renderText, $ as unclipArea, a0 as toFont, a1 as _toLeftRightCenter, a2 as _alignStartEnd, a3 as overrides, a4 as merge, a5 as _capitalize, a6 as descriptors, a7 as isFunction, a8 as _attachContext, a9 as _createResolver, aa as _descriptors, ab as mergeIf, ac as uid, ad as debounce, ae as retinaScale, af as clearCanvas, ag as setsEqual, ah as _elementsEqual, ai as _isClickEvent, aj as _isBetween, ak as _readValueToProps, al as _updateBezierControlPoints, am as _computeSegments, an as _boundSegments, ao as _steppedInterpolation, ap as _bezierInterpolation, aq as _pointInLine, ar as _steppedLineTo, as as _bezierCurveTo, at as drawPoint, au as addRoundedRectPath, av as toTRBL, aw as toTRBLCorners, ax as _boundSegment, ay as _normalizeAngle, az as getRtlAdapter, aA as overrideTextDirection, aB as _textX, aC as restoreTextDirection, aD as drawPointLegend, aE as distanceBetweenPoints, aF as noop, aG as _setMinAndMaxByKey, aH as niceNum, aI as almostWhole, aJ as almostEquals, aK as _decimalPlaces, aL as Ticks, aM as log10, aN as _longestText, aO as _filterBetween, aP as _lookup } from './chunks/helpers.segment.js';\nimport '@kurkle/color';\n\nclass Animator {\n constructor(){\n this._request = null;\n this._charts = new Map();\n this._running = false;\n this._lastDate = undefined;\n }\n _notify(chart, anims, date, type) {\n const callbacks = anims.listeners[type];\n const numSteps = anims.duration;\n callbacks.forEach((fn)=>fn({\n chart,\n initial: anims.initial,\n numSteps,\n currentStep: Math.min(date - anims.start, numSteps)\n }));\n }\n _refresh() {\n if (this._request) {\n return;\n }\n this._running = true;\n this._request = requestAnimFrame.call(window, ()=>{\n this._update();\n this._request = null;\n if (this._running) {\n this._refresh();\n }\n });\n }\n _update(date = Date.now()) {\n let remaining = 0;\n this._charts.forEach((anims, chart)=>{\n if (!anims.running || !anims.items.length) {\n return;\n }\n const items = anims.items;\n let i = items.length - 1;\n let draw = false;\n let item;\n for(; i >= 0; --i){\n item = items[i];\n if (item._active) {\n if (item._total > anims.duration) {\n anims.duration = item._total;\n }\n item.tick(date);\n draw = true;\n } else {\n items[i] = items[items.length - 1];\n items.pop();\n }\n }\n if (draw) {\n chart.draw();\n this._notify(chart, anims, date, 'progress');\n }\n if (!items.length) {\n anims.running = false;\n this._notify(chart, anims, date, 'complete');\n anims.initial = false;\n }\n remaining += items.length;\n });\n this._lastDate = date;\n if (remaining === 0) {\n this._running = false;\n }\n }\n _getAnims(chart) {\n const charts = this._charts;\n let anims = charts.get(chart);\n if (!anims) {\n anims = {\n running: false,\n initial: true,\n items: [],\n listeners: {\n complete: [],\n progress: []\n }\n };\n charts.set(chart, anims);\n }\n return anims;\n }\n listen(chart, event, cb) {\n this._getAnims(chart).listeners[event].push(cb);\n }\n add(chart, items) {\n if (!items || !items.length) {\n return;\n }\n this._getAnims(chart).items.push(...items);\n }\n has(chart) {\n return this._getAnims(chart).items.length > 0;\n }\n start(chart) {\n const anims = this._charts.get(chart);\n if (!anims) {\n return;\n }\n anims.running = true;\n anims.start = Date.now();\n anims.duration = anims.items.reduce((acc, cur)=>Math.max(acc, cur._duration), 0);\n this._refresh();\n }\n running(chart) {\n if (!this._running) {\n return false;\n }\n const anims = this._charts.get(chart);\n if (!anims || !anims.running || !anims.items.length) {\n return false;\n }\n return true;\n }\n stop(chart) {\n const anims = this._charts.get(chart);\n if (!anims || !anims.items.length) {\n return;\n }\n const items = anims.items;\n let i = items.length - 1;\n for(; i >= 0; --i){\n items[i].cancel();\n }\n anims.items = [];\n this._notify(chart, anims, Date.now(), 'complete');\n }\n remove(chart) {\n return this._charts.delete(chart);\n }\n}\nvar animator = /* #__PURE__ */ new Animator();\n\nconst transparent = 'transparent';\nconst interpolators = {\n boolean (from, to, factor) {\n return factor > 0.5 ? to : from;\n },\n color (from, to, factor) {\n const c0 = color(from || transparent);\n const c1 = c0.valid && color(to || transparent);\n return c1 && c1.valid ? c1.mix(c0, factor).hexString() : to;\n },\n number (from, to, factor) {\n return from + (to - from) * factor;\n }\n};\nclass Animation {\n constructor(cfg, target, prop, to){\n const currentValue = target[prop];\n to = resolve([\n cfg.to,\n to,\n currentValue,\n cfg.from\n ]);\n const from = resolve([\n cfg.from,\n currentValue,\n to\n ]);\n this._active = true;\n this._fn = cfg.fn || interpolators[cfg.type || typeof from];\n this._easing = effects[cfg.easing] || effects.linear;\n this._start = Math.floor(Date.now() + (cfg.delay || 0));\n this._duration = this._total = Math.floor(cfg.duration);\n this._loop = !!cfg.loop;\n this._target = target;\n this._prop = prop;\n this._from = from;\n this._to = to;\n this._promises = undefined;\n }\n active() {\n return this._active;\n }\n update(cfg, to, date) {\n if (this._active) {\n this._notify(false);\n const currentValue = this._target[this._prop];\n const elapsed = date - this._start;\n const remain = this._duration - elapsed;\n this._start = date;\n this._duration = Math.floor(Math.max(remain, cfg.duration));\n this._total += elapsed;\n this._loop = !!cfg.loop;\n this._to = resolve([\n cfg.to,\n to,\n currentValue,\n cfg.from\n ]);\n this._from = resolve([\n cfg.from,\n currentValue,\n to\n ]);\n }\n }\n cancel() {\n if (this._active) {\n this.tick(Date.now());\n this._active = false;\n this._notify(false);\n }\n }\n tick(date) {\n const elapsed = date - this._start;\n const duration = this._duration;\n const prop = this._prop;\n const from = this._from;\n const loop = this._loop;\n const to = this._to;\n let factor;\n this._active = from !== to && (loop || elapsed < duration);\n if (!this._active) {\n this._target[prop] = to;\n this._notify(true);\n return;\n }\n if (elapsed < 0) {\n this._target[prop] = from;\n return;\n }\n factor = elapsed / duration % 2;\n factor = loop && factor > 1 ? 2 - factor : factor;\n factor = this._easing(Math.min(1, Math.max(0, factor)));\n this._target[prop] = this._fn(from, to, factor);\n }\n wait() {\n const promises = this._promises || (this._promises = []);\n return new Promise((res, rej)=>{\n promises.push({\n res,\n rej\n });\n });\n }\n _notify(resolved) {\n const method = resolved ? 'res' : 'rej';\n const promises = this._promises || [];\n for(let i = 0; i < promises.length; i++){\n promises[i][method]();\n }\n }\n}\n\nclass Animations {\n constructor(chart, config){\n this._chart = chart;\n this._properties = new Map();\n this.configure(config);\n }\n configure(config) {\n if (!isObject(config)) {\n return;\n }\n const animationOptions = Object.keys(defaults.animation);\n const animatedProps = this._properties;\n Object.getOwnPropertyNames(config).forEach((key)=>{\n const cfg = config[key];\n if (!isObject(cfg)) {\n return;\n }\n const resolved = {};\n for (const option of animationOptions){\n resolved[option] = cfg[option];\n }\n (isArray(cfg.properties) && cfg.properties || [\n key\n ]).forEach((prop)=>{\n if (prop === key || !animatedProps.has(prop)) {\n animatedProps.set(prop, resolved);\n }\n });\n });\n }\n _animateOptions(target, values) {\n const newOptions = values.options;\n const options = resolveTargetOptions(target, newOptions);\n if (!options) {\n return [];\n }\n const animations = this._createAnimations(options, newOptions);\n if (newOptions.$shared) {\n awaitAll(target.options.$animations, newOptions).then(()=>{\n target.options = newOptions;\n }, ()=>{\n });\n }\n return animations;\n }\n _createAnimations(target, values) {\n const animatedProps = this._properties;\n const animations = [];\n const running = target.$animations || (target.$animations = {});\n const props = Object.keys(values);\n const date = Date.now();\n let i;\n for(i = props.length - 1; i >= 0; --i){\n const prop = props[i];\n if (prop.charAt(0) === '$') {\n continue;\n }\n if (prop === 'options') {\n animations.push(...this._animateOptions(target, values));\n continue;\n }\n const value = values[prop];\n let animation = running[prop];\n const cfg = animatedProps.get(prop);\n if (animation) {\n if (cfg && animation.active()) {\n animation.update(cfg, value, date);\n continue;\n } else {\n animation.cancel();\n }\n }\n if (!cfg || !cfg.duration) {\n target[prop] = value;\n continue;\n }\n running[prop] = animation = new Animation(cfg, target, prop, value);\n animations.push(animation);\n }\n return animations;\n }\n update(target, values) {\n if (this._properties.size === 0) {\n Object.assign(target, values);\n return;\n }\n const animations = this._createAnimations(target, values);\n if (animations.length) {\n animator.add(this._chart, animations);\n return true;\n }\n }\n}\nfunction awaitAll(animations, properties) {\n const running = [];\n const keys = Object.keys(properties);\n for(let i = 0; i < keys.length; i++){\n const anim = animations[keys[i]];\n if (anim && anim.active()) {\n running.push(anim.wait());\n }\n }\n return Promise.all(running);\n}\nfunction resolveTargetOptions(target, newOptions) {\n if (!newOptions) {\n return;\n }\n let options = target.options;\n if (!options) {\n target.options = newOptions;\n return;\n }\n if (options.$shared) {\n target.options = options = Object.assign({}, options, {\n $shared: false,\n $animations: {}\n });\n }\n return options;\n}\n\nfunction scaleClip(scale, allowedOverflow) {\n const opts = scale && scale.options || {};\n const reverse = opts.reverse;\n const min = opts.min === undefined ? allowedOverflow : 0;\n const max = opts.max === undefined ? allowedOverflow : 0;\n return {\n start: reverse ? max : min,\n end: reverse ? min : max\n };\n}\nfunction defaultClip(xScale, yScale, allowedOverflow) {\n if (allowedOverflow === false) {\n return false;\n }\n const x = scaleClip(xScale, allowedOverflow);\n const y = scaleClip(yScale, allowedOverflow);\n return {\n top: y.end,\n right: x.end,\n bottom: y.start,\n left: x.start\n };\n}\nfunction toClip(value) {\n let t, r, b, l;\n if (isObject(value)) {\n t = value.top;\n r = value.right;\n b = value.bottom;\n l = value.left;\n } else {\n t = r = b = l = value;\n }\n return {\n top: t,\n right: r,\n bottom: b,\n left: l,\n disabled: value === false\n };\n}\nfunction getSortedDatasetIndices(chart, filterVisible) {\n const keys = [];\n const metasets = chart._getSortedDatasetMetas(filterVisible);\n let i, ilen;\n for(i = 0, ilen = metasets.length; i < ilen; ++i){\n keys.push(metasets[i].index);\n }\n return keys;\n}\nfunction applyStack(stack, value, dsIndex, options = {}) {\n const keys = stack.keys;\n const singleMode = options.mode === 'single';\n let i, ilen, datasetIndex, otherValue;\n if (value === null) {\n return;\n }\n for(i = 0, ilen = keys.length; i < ilen; ++i){\n datasetIndex = +keys[i];\n if (datasetIndex === dsIndex) {\n if (options.all) {\n continue;\n }\n break;\n }\n otherValue = stack.values[datasetIndex];\n if (isNumberFinite(otherValue) && (singleMode || value === 0 || sign(value) === sign(otherValue))) {\n value += otherValue;\n }\n }\n return value;\n}\nfunction convertObjectDataToArray(data) {\n const keys = Object.keys(data);\n const adata = new Array(keys.length);\n let i, ilen, key;\n for(i = 0, ilen = keys.length; i < ilen; ++i){\n key = keys[i];\n adata[i] = {\n x: key,\n y: data[key]\n };\n }\n return adata;\n}\nfunction isStacked(scale, meta) {\n const stacked = scale && scale.options.stacked;\n return stacked || stacked === undefined && meta.stack !== undefined;\n}\nfunction getStackKey(indexScale, valueScale, meta) {\n return `${indexScale.id}.${valueScale.id}.${meta.stack || meta.type}`;\n}\nfunction getUserBounds(scale) {\n const { min , max , minDefined , maxDefined } = scale.getUserBounds();\n return {\n min: minDefined ? min : Number.NEGATIVE_INFINITY,\n max: maxDefined ? max : Number.POSITIVE_INFINITY\n };\n}\nfunction getOrCreateStack(stacks, stackKey, indexValue) {\n const subStack = stacks[stackKey] || (stacks[stackKey] = {});\n return subStack[indexValue] || (subStack[indexValue] = {});\n}\nfunction getLastIndexInStack(stack, vScale, positive, type) {\n for (const meta of vScale.getMatchingVisibleMetas(type).reverse()){\n const value = stack[meta.index];\n if (positive && value > 0 || !positive && value < 0) {\n return meta.index;\n }\n }\n return null;\n}\nfunction updateStacks(controller, parsed) {\n const { chart , _cachedMeta: meta } = controller;\n const stacks = chart._stacks || (chart._stacks = {});\n const { iScale , vScale , index: datasetIndex } = meta;\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const key = getStackKey(iScale, vScale, meta);\n const ilen = parsed.length;\n let stack;\n for(let i = 0; i < ilen; ++i){\n const item = parsed[i];\n const { [iAxis]: index , [vAxis]: value } = item;\n const itemStacks = item._stacks || (item._stacks = {});\n stack = itemStacks[vAxis] = getOrCreateStack(stacks, key, index);\n stack[datasetIndex] = value;\n stack._top = getLastIndexInStack(stack, vScale, true, meta.type);\n stack._bottom = getLastIndexInStack(stack, vScale, false, meta.type);\n const visualValues = stack._visualValues || (stack._visualValues = {});\n visualValues[datasetIndex] = value;\n }\n}\nfunction getFirstScaleId(chart, axis) {\n const scales = chart.scales;\n return Object.keys(scales).filter((key)=>scales[key].axis === axis).shift();\n}\nfunction createDatasetContext(parent, index) {\n return createContext(parent, {\n active: false,\n dataset: undefined,\n datasetIndex: index,\n index,\n mode: 'default',\n type: 'dataset'\n });\n}\nfunction createDataContext(parent, index, element) {\n return createContext(parent, {\n active: false,\n dataIndex: index,\n parsed: undefined,\n raw: undefined,\n element,\n index,\n mode: 'default',\n type: 'data'\n });\n}\nfunction clearStacks(meta, items) {\n const datasetIndex = meta.controller.index;\n const axis = meta.vScale && meta.vScale.axis;\n if (!axis) {\n return;\n }\n items = items || meta._parsed;\n for (const parsed of items){\n const stacks = parsed._stacks;\n if (!stacks || stacks[axis] === undefined || stacks[axis][datasetIndex] === undefined) {\n return;\n }\n delete stacks[axis][datasetIndex];\n if (stacks[axis]._visualValues !== undefined && stacks[axis]._visualValues[datasetIndex] !== undefined) {\n delete stacks[axis]._visualValues[datasetIndex];\n }\n }\n}\nconst isDirectUpdateMode = (mode)=>mode === 'reset' || mode === 'none';\nconst cloneIfNotShared = (cached, shared)=>shared ? cached : Object.assign({}, cached);\nconst createStack = (canStack, meta, chart)=>canStack && !meta.hidden && meta._stacked && {\n keys: getSortedDatasetIndices(chart, true),\n values: null\n };\nclass DatasetController {\n static defaults = {};\n static datasetElementType = null;\n static dataElementType = null;\n constructor(chart, datasetIndex){\n this.chart = chart;\n this._ctx = chart.ctx;\n this.index = datasetIndex;\n this._cachedDataOpts = {};\n this._cachedMeta = this.getMeta();\n this._type = this._cachedMeta.type;\n this.options = undefined;\n this._parsing = false;\n this._data = undefined;\n this._objectData = undefined;\n this._sharedOptions = undefined;\n this._drawStart = undefined;\n this._drawCount = undefined;\n this.enableOptionSharing = false;\n this.supportsDecimation = false;\n this.$context = undefined;\n this._syncList = [];\n this.datasetElementType = new.target.datasetElementType;\n this.dataElementType = new.target.dataElementType;\n this.initialize();\n }\n initialize() {\n const meta = this._cachedMeta;\n this.configure();\n this.linkScales();\n meta._stacked = isStacked(meta.vScale, meta);\n this.addElements();\n if (this.options.fill && !this.chart.isPluginEnabled('filler')) {\n console.warn(\"Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options\");\n }\n }\n updateIndex(datasetIndex) {\n if (this.index !== datasetIndex) {\n clearStacks(this._cachedMeta);\n }\n this.index = datasetIndex;\n }\n linkScales() {\n const chart = this.chart;\n const meta = this._cachedMeta;\n const dataset = this.getDataset();\n const chooseId = (axis, x, y, r)=>axis === 'x' ? x : axis === 'r' ? r : y;\n const xid = meta.xAxisID = valueOrDefault(dataset.xAxisID, getFirstScaleId(chart, 'x'));\n const yid = meta.yAxisID = valueOrDefault(dataset.yAxisID, getFirstScaleId(chart, 'y'));\n const rid = meta.rAxisID = valueOrDefault(dataset.rAxisID, getFirstScaleId(chart, 'r'));\n const indexAxis = meta.indexAxis;\n const iid = meta.iAxisID = chooseId(indexAxis, xid, yid, rid);\n const vid = meta.vAxisID = chooseId(indexAxis, yid, xid, rid);\n meta.xScale = this.getScaleForId(xid);\n meta.yScale = this.getScaleForId(yid);\n meta.rScale = this.getScaleForId(rid);\n meta.iScale = this.getScaleForId(iid);\n meta.vScale = this.getScaleForId(vid);\n }\n getDataset() {\n return this.chart.data.datasets[this.index];\n }\n getMeta() {\n return this.chart.getDatasetMeta(this.index);\n }\n getScaleForId(scaleID) {\n return this.chart.scales[scaleID];\n }\n _getOtherScale(scale) {\n const meta = this._cachedMeta;\n return scale === meta.iScale ? meta.vScale : meta.iScale;\n }\n reset() {\n this._update('reset');\n }\n _destroy() {\n const meta = this._cachedMeta;\n if (this._data) {\n unlistenArrayEvents(this._data, this);\n }\n if (meta._stacked) {\n clearStacks(meta);\n }\n }\n _dataCheck() {\n const dataset = this.getDataset();\n const data = dataset.data || (dataset.data = []);\n const _data = this._data;\n if (isObject(data)) {\n this._data = convertObjectDataToArray(data);\n } else if (_data !== data) {\n if (_data) {\n unlistenArrayEvents(_data, this);\n const meta = this._cachedMeta;\n clearStacks(meta);\n meta._parsed = [];\n }\n if (data && Object.isExtensible(data)) {\n listenArrayEvents(data, this);\n }\n this._syncList = [];\n this._data = data;\n }\n }\n addElements() {\n const meta = this._cachedMeta;\n this._dataCheck();\n if (this.datasetElementType) {\n meta.dataset = new this.datasetElementType();\n }\n }\n buildOrUpdateElements(resetNewElements) {\n const meta = this._cachedMeta;\n const dataset = this.getDataset();\n let stackChanged = false;\n this._dataCheck();\n const oldStacked = meta._stacked;\n meta._stacked = isStacked(meta.vScale, meta);\n if (meta.stack !== dataset.stack) {\n stackChanged = true;\n clearStacks(meta);\n meta.stack = dataset.stack;\n }\n this._resyncElements(resetNewElements);\n if (stackChanged || oldStacked !== meta._stacked) {\n updateStacks(this, meta._parsed);\n }\n }\n configure() {\n const config = this.chart.config;\n const scopeKeys = config.datasetScopeKeys(this._type);\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys, true);\n this.options = config.createResolver(scopes, this.getContext());\n this._parsing = this.options.parsing;\n this._cachedDataOpts = {};\n }\n parse(start, count) {\n const { _cachedMeta: meta , _data: data } = this;\n const { iScale , _stacked } = meta;\n const iAxis = iScale.axis;\n let sorted = start === 0 && count === data.length ? true : meta._sorted;\n let prev = start > 0 && meta._parsed[start - 1];\n let i, cur, parsed;\n if (this._parsing === false) {\n meta._parsed = data;\n meta._sorted = true;\n parsed = data;\n } else {\n if (isArray(data[start])) {\n parsed = this.parseArrayData(meta, data, start, count);\n } else if (isObject(data[start])) {\n parsed = this.parseObjectData(meta, data, start, count);\n } else {\n parsed = this.parsePrimitiveData(meta, data, start, count);\n }\n const isNotInOrderComparedToPrev = ()=>cur[iAxis] === null || prev && cur[iAxis] < prev[iAxis];\n for(i = 0; i < count; ++i){\n meta._parsed[i + start] = cur = parsed[i];\n if (sorted) {\n if (isNotInOrderComparedToPrev()) {\n sorted = false;\n }\n prev = cur;\n }\n }\n meta._sorted = sorted;\n }\n if (_stacked) {\n updateStacks(this, parsed);\n }\n }\n parsePrimitiveData(meta, data, start, count) {\n const { iScale , vScale } = meta;\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const labels = iScale.getLabels();\n const singleScale = iScale === vScale;\n const parsed = new Array(count);\n let i, ilen, index;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n parsed[i] = {\n [iAxis]: singleScale || iScale.parse(labels[index], index),\n [vAxis]: vScale.parse(data[index], index)\n };\n }\n return parsed;\n }\n parseArrayData(meta, data, start, count) {\n const { xScale , yScale } = meta;\n const parsed = new Array(count);\n let i, ilen, index, item;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n item = data[index];\n parsed[i] = {\n x: xScale.parse(item[0], index),\n y: yScale.parse(item[1], index)\n };\n }\n return parsed;\n }\n parseObjectData(meta, data, start, count) {\n const { xScale , yScale } = meta;\n const { xAxisKey ='x' , yAxisKey ='y' } = this._parsing;\n const parsed = new Array(count);\n let i, ilen, index, item;\n for(i = 0, ilen = count; i < ilen; ++i){\n index = i + start;\n item = data[index];\n parsed[i] = {\n x: xScale.parse(resolveObjectKey(item, xAxisKey), index),\n y: yScale.parse(resolveObjectKey(item, yAxisKey), index)\n };\n }\n return parsed;\n }\n getParsed(index) {\n return this._cachedMeta._parsed[index];\n }\n getDataElement(index) {\n return this._cachedMeta.data[index];\n }\n applyStack(scale, parsed, mode) {\n const chart = this.chart;\n const meta = this._cachedMeta;\n const value = parsed[scale.axis];\n const stack = {\n keys: getSortedDatasetIndices(chart, true),\n values: parsed._stacks[scale.axis]._visualValues\n };\n return applyStack(stack, value, meta.index, {\n mode\n });\n }\n updateRangeFromParsed(range, scale, parsed, stack) {\n const parsedValue = parsed[scale.axis];\n let value = parsedValue === null ? NaN : parsedValue;\n const values = stack && parsed._stacks[scale.axis];\n if (stack && values) {\n stack.values = values;\n value = applyStack(stack, parsedValue, this._cachedMeta.index);\n }\n range.min = Math.min(range.min, value);\n range.max = Math.max(range.max, value);\n }\n getMinMax(scale, canStack) {\n const meta = this._cachedMeta;\n const _parsed = meta._parsed;\n const sorted = meta._sorted && scale === meta.iScale;\n const ilen = _parsed.length;\n const otherScale = this._getOtherScale(scale);\n const stack = createStack(canStack, meta, this.chart);\n const range = {\n min: Number.POSITIVE_INFINITY,\n max: Number.NEGATIVE_INFINITY\n };\n const { min: otherMin , max: otherMax } = getUserBounds(otherScale);\n let i, parsed;\n function _skip() {\n parsed = _parsed[i];\n const otherValue = parsed[otherScale.axis];\n return !isNumberFinite(parsed[scale.axis]) || otherMin > otherValue || otherMax < otherValue;\n }\n for(i = 0; i < ilen; ++i){\n if (_skip()) {\n continue;\n }\n this.updateRangeFromParsed(range, scale, parsed, stack);\n if (sorted) {\n break;\n }\n }\n if (sorted) {\n for(i = ilen - 1; i >= 0; --i){\n if (_skip()) {\n continue;\n }\n this.updateRangeFromParsed(range, scale, parsed, stack);\n break;\n }\n }\n return range;\n }\n getAllParsedValues(scale) {\n const parsed = this._cachedMeta._parsed;\n const values = [];\n let i, ilen, value;\n for(i = 0, ilen = parsed.length; i < ilen; ++i){\n value = parsed[i][scale.axis];\n if (isNumberFinite(value)) {\n values.push(value);\n }\n }\n return values;\n }\n getMaxOverflow() {\n return false;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const iScale = meta.iScale;\n const vScale = meta.vScale;\n const parsed = this.getParsed(index);\n return {\n label: iScale ? '' + iScale.getLabelForValue(parsed[iScale.axis]) : '',\n value: vScale ? '' + vScale.getLabelForValue(parsed[vScale.axis]) : ''\n };\n }\n _update(mode) {\n const meta = this._cachedMeta;\n this.update(mode || 'default');\n meta._clip = toClip(valueOrDefault(this.options.clip, defaultClip(meta.xScale, meta.yScale, this.getMaxOverflow())));\n }\n update(mode) {}\n draw() {\n const ctx = this._ctx;\n const chart = this.chart;\n const meta = this._cachedMeta;\n const elements = meta.data || [];\n const area = chart.chartArea;\n const active = [];\n const start = this._drawStart || 0;\n const count = this._drawCount || elements.length - start;\n const drawActiveElementsOnTop = this.options.drawActiveElementsOnTop;\n let i;\n if (meta.dataset) {\n meta.dataset.draw(ctx, area, start, count);\n }\n for(i = start; i < start + count; ++i){\n const element = elements[i];\n if (element.hidden) {\n continue;\n }\n if (element.active && drawActiveElementsOnTop) {\n active.push(element);\n } else {\n element.draw(ctx, area);\n }\n }\n for(i = 0; i < active.length; ++i){\n active[i].draw(ctx, area);\n }\n }\n getStyle(index, active) {\n const mode = active ? 'active' : 'default';\n return index === undefined && this._cachedMeta.dataset ? this.resolveDatasetElementOptions(mode) : this.resolveDataElementOptions(index || 0, mode);\n }\n getContext(index, active, mode) {\n const dataset = this.getDataset();\n let context;\n if (index >= 0 && index < this._cachedMeta.data.length) {\n const element = this._cachedMeta.data[index];\n context = element.$context || (element.$context = createDataContext(this.getContext(), index, element));\n context.parsed = this.getParsed(index);\n context.raw = dataset.data[index];\n context.index = context.dataIndex = index;\n } else {\n context = this.$context || (this.$context = createDatasetContext(this.chart.getContext(), this.index));\n context.dataset = dataset;\n context.index = context.datasetIndex = this.index;\n }\n context.active = !!active;\n context.mode = mode;\n return context;\n }\n resolveDatasetElementOptions(mode) {\n return this._resolveElementOptions(this.datasetElementType.id, mode);\n }\n resolveDataElementOptions(index, mode) {\n return this._resolveElementOptions(this.dataElementType.id, mode, index);\n }\n _resolveElementOptions(elementType, mode = 'default', index) {\n const active = mode === 'active';\n const cache = this._cachedDataOpts;\n const cacheKey = elementType + '-' + mode;\n const cached = cache[cacheKey];\n const sharing = this.enableOptionSharing && defined(index);\n if (cached) {\n return cloneIfNotShared(cached, sharing);\n }\n const config = this.chart.config;\n const scopeKeys = config.datasetElementScopeKeys(this._type, elementType);\n const prefixes = active ? [\n `${elementType}Hover`,\n 'hover',\n elementType,\n ''\n ] : [\n elementType,\n ''\n ];\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n const names = Object.keys(defaults.elements[elementType]);\n const context = ()=>this.getContext(index, active, mode);\n const values = config.resolveNamedOptions(scopes, names, context, prefixes);\n if (values.$shared) {\n values.$shared = sharing;\n cache[cacheKey] = Object.freeze(cloneIfNotShared(values, sharing));\n }\n return values;\n }\n _resolveAnimations(index, transition, active) {\n const chart = this.chart;\n const cache = this._cachedDataOpts;\n const cacheKey = `animation-${transition}`;\n const cached = cache[cacheKey];\n if (cached) {\n return cached;\n }\n let options;\n if (chart.options.animation !== false) {\n const config = this.chart.config;\n const scopeKeys = config.datasetAnimationScopeKeys(this._type, transition);\n const scopes = config.getOptionScopes(this.getDataset(), scopeKeys);\n options = config.createResolver(scopes, this.getContext(index, active, transition));\n }\n const animations = new Animations(chart, options && options.animations);\n if (options && options._cacheable) {\n cache[cacheKey] = Object.freeze(animations);\n }\n return animations;\n }\n getSharedOptions(options) {\n if (!options.$shared) {\n return;\n }\n return this._sharedOptions || (this._sharedOptions = Object.assign({}, options));\n }\n includeOptions(mode, sharedOptions) {\n return !sharedOptions || isDirectUpdateMode(mode) || this.chart._animationsDisabled;\n }\n _getSharedOptions(start, mode) {\n const firstOpts = this.resolveDataElementOptions(start, mode);\n const previouslySharedOptions = this._sharedOptions;\n const sharedOptions = this.getSharedOptions(firstOpts);\n const includeOptions = this.includeOptions(mode, sharedOptions) || sharedOptions !== previouslySharedOptions;\n this.updateSharedOptions(sharedOptions, mode, firstOpts);\n return {\n sharedOptions,\n includeOptions\n };\n }\n updateElement(element, index, properties, mode) {\n if (isDirectUpdateMode(mode)) {\n Object.assign(element, properties);\n } else {\n this._resolveAnimations(index, mode).update(element, properties);\n }\n }\n updateSharedOptions(sharedOptions, mode, newOptions) {\n if (sharedOptions && !isDirectUpdateMode(mode)) {\n this._resolveAnimations(undefined, mode).update(sharedOptions, newOptions);\n }\n }\n _setStyle(element, index, mode, active) {\n element.active = active;\n const options = this.getStyle(index, active);\n this._resolveAnimations(index, mode, active).update(element, {\n options: !active && this.getSharedOptions(options) || options\n });\n }\n removeHoverStyle(element, datasetIndex, index) {\n this._setStyle(element, index, 'active', false);\n }\n setHoverStyle(element, datasetIndex, index) {\n this._setStyle(element, index, 'active', true);\n }\n _removeDatasetHoverStyle() {\n const element = this._cachedMeta.dataset;\n if (element) {\n this._setStyle(element, undefined, 'active', false);\n }\n }\n _setDatasetHoverStyle() {\n const element = this._cachedMeta.dataset;\n if (element) {\n this._setStyle(element, undefined, 'active', true);\n }\n }\n _resyncElements(resetNewElements) {\n const data = this._data;\n const elements = this._cachedMeta.data;\n for (const [method, arg1, arg2] of this._syncList){\n this[method](arg1, arg2);\n }\n this._syncList = [];\n const numMeta = elements.length;\n const numData = data.length;\n const count = Math.min(numData, numMeta);\n if (count) {\n this.parse(0, count);\n }\n if (numData > numMeta) {\n this._insertElements(numMeta, numData - numMeta, resetNewElements);\n } else if (numData < numMeta) {\n this._removeElements(numData, numMeta - numData);\n }\n }\n _insertElements(start, count, resetNewElements = true) {\n const meta = this._cachedMeta;\n const data = meta.data;\n const end = start + count;\n let i;\n const move = (arr)=>{\n arr.length += count;\n for(i = arr.length - 1; i >= end; i--){\n arr[i] = arr[i - count];\n }\n };\n move(data);\n for(i = start; i < end; ++i){\n data[i] = new this.dataElementType();\n }\n if (this._parsing) {\n move(meta._parsed);\n }\n this.parse(start, count);\n if (resetNewElements) {\n this.updateElements(data, start, count, 'reset');\n }\n }\n updateElements(element, start, count, mode) {}\n _removeElements(start, count) {\n const meta = this._cachedMeta;\n if (this._parsing) {\n const removed = meta._parsed.splice(start, count);\n if (meta._stacked) {\n clearStacks(meta, removed);\n }\n }\n meta.data.splice(start, count);\n }\n _sync(args) {\n if (this._parsing) {\n this._syncList.push(args);\n } else {\n const [method, arg1, arg2] = args;\n this[method](arg1, arg2);\n }\n this.chart._dataChanges.push([\n this.index,\n ...args\n ]);\n }\n _onDataPush() {\n const count = arguments.length;\n this._sync([\n '_insertElements',\n this.getDataset().data.length - count,\n count\n ]);\n }\n _onDataPop() {\n this._sync([\n '_removeElements',\n this._cachedMeta.data.length - 1,\n 1\n ]);\n }\n _onDataShift() {\n this._sync([\n '_removeElements',\n 0,\n 1\n ]);\n }\n _onDataSplice(start, count) {\n if (count) {\n this._sync([\n '_removeElements',\n start,\n count\n ]);\n }\n const newCount = arguments.length - 2;\n if (newCount) {\n this._sync([\n '_insertElements',\n start,\n newCount\n ]);\n }\n }\n _onDataUnshift() {\n this._sync([\n '_insertElements',\n 0,\n arguments.length\n ]);\n }\n}\n\nfunction getAllScaleValues(scale, type) {\n if (!scale._cache.$bar) {\n const visibleMetas = scale.getMatchingVisibleMetas(type);\n let values = [];\n for(let i = 0, ilen = visibleMetas.length; i < ilen; i++){\n values = values.concat(visibleMetas[i].controller.getAllParsedValues(scale));\n }\n scale._cache.$bar = _arrayUnique(values.sort((a, b)=>a - b));\n }\n return scale._cache.$bar;\n}\n function computeMinSampleSize(meta) {\n const scale = meta.iScale;\n const values = getAllScaleValues(scale, meta.type);\n let min = scale._length;\n let i, ilen, curr, prev;\n const updateMinAndPrev = ()=>{\n if (curr === 32767 || curr === -32768) {\n return;\n }\n if (defined(prev)) {\n min = Math.min(min, Math.abs(curr - prev) || min);\n }\n prev = curr;\n };\n for(i = 0, ilen = values.length; i < ilen; ++i){\n curr = scale.getPixelForValue(values[i]);\n updateMinAndPrev();\n }\n prev = undefined;\n for(i = 0, ilen = scale.ticks.length; i < ilen; ++i){\n curr = scale.getPixelForTick(i);\n updateMinAndPrev();\n }\n return min;\n}\n function computeFitCategoryTraits(index, ruler, options, stackCount) {\n const thickness = options.barThickness;\n let size, ratio;\n if (isNullOrUndef(thickness)) {\n size = ruler.min * options.categoryPercentage;\n ratio = options.barPercentage;\n } else {\n size = thickness * stackCount;\n ratio = 1;\n }\n return {\n chunk: size / stackCount,\n ratio,\n start: ruler.pixels[index] - size / 2\n };\n}\n function computeFlexCategoryTraits(index, ruler, options, stackCount) {\n const pixels = ruler.pixels;\n const curr = pixels[index];\n let prev = index > 0 ? pixels[index - 1] : null;\n let next = index < pixels.length - 1 ? pixels[index + 1] : null;\n const percent = options.categoryPercentage;\n if (prev === null) {\n prev = curr - (next === null ? ruler.end - ruler.start : next - curr);\n }\n if (next === null) {\n next = curr + curr - prev;\n }\n const start = curr - (curr - Math.min(prev, next)) / 2 * percent;\n const size = Math.abs(next - prev) / 2 * percent;\n return {\n chunk: size / stackCount,\n ratio: options.barPercentage,\n start\n };\n}\nfunction parseFloatBar(entry, item, vScale, i) {\n const startValue = vScale.parse(entry[0], i);\n const endValue = vScale.parse(entry[1], i);\n const min = Math.min(startValue, endValue);\n const max = Math.max(startValue, endValue);\n let barStart = min;\n let barEnd = max;\n if (Math.abs(min) > Math.abs(max)) {\n barStart = max;\n barEnd = min;\n }\n item[vScale.axis] = barEnd;\n item._custom = {\n barStart,\n barEnd,\n start: startValue,\n end: endValue,\n min,\n max\n };\n}\nfunction parseValue(entry, item, vScale, i) {\n if (isArray(entry)) {\n parseFloatBar(entry, item, vScale, i);\n } else {\n item[vScale.axis] = vScale.parse(entry, i);\n }\n return item;\n}\nfunction parseArrayOrPrimitive(meta, data, start, count) {\n const iScale = meta.iScale;\n const vScale = meta.vScale;\n const labels = iScale.getLabels();\n const singleScale = iScale === vScale;\n const parsed = [];\n let i, ilen, item, entry;\n for(i = start, ilen = start + count; i < ilen; ++i){\n entry = data[i];\n item = {};\n item[iScale.axis] = singleScale || iScale.parse(labels[i], i);\n parsed.push(parseValue(entry, item, vScale, i));\n }\n return parsed;\n}\nfunction isFloatBar(custom) {\n return custom && custom.barStart !== undefined && custom.barEnd !== undefined;\n}\nfunction barSign(size, vScale, actualBase) {\n if (size !== 0) {\n return sign(size);\n }\n return (vScale.isHorizontal() ? 1 : -1) * (vScale.min >= actualBase ? 1 : -1);\n}\nfunction borderProps(properties) {\n let reverse, start, end, top, bottom;\n if (properties.horizontal) {\n reverse = properties.base > properties.x;\n start = 'left';\n end = 'right';\n } else {\n reverse = properties.base < properties.y;\n start = 'bottom';\n end = 'top';\n }\n if (reverse) {\n top = 'end';\n bottom = 'start';\n } else {\n top = 'start';\n bottom = 'end';\n }\n return {\n start,\n end,\n reverse,\n top,\n bottom\n };\n}\nfunction setBorderSkipped(properties, options, stack, index) {\n let edge = options.borderSkipped;\n const res = {};\n if (!edge) {\n properties.borderSkipped = res;\n return;\n }\n if (edge === true) {\n properties.borderSkipped = {\n top: true,\n right: true,\n bottom: true,\n left: true\n };\n return;\n }\n const { start , end , reverse , top , bottom } = borderProps(properties);\n if (edge === 'middle' && stack) {\n properties.enableBorderRadius = true;\n if ((stack._top || 0) === index) {\n edge = top;\n } else if ((stack._bottom || 0) === index) {\n edge = bottom;\n } else {\n res[parseEdge(bottom, start, end, reverse)] = true;\n edge = top;\n }\n }\n res[parseEdge(edge, start, end, reverse)] = true;\n properties.borderSkipped = res;\n}\nfunction parseEdge(edge, a, b, reverse) {\n if (reverse) {\n edge = swap(edge, a, b);\n edge = startEnd(edge, b, a);\n } else {\n edge = startEnd(edge, a, b);\n }\n return edge;\n}\nfunction swap(orig, v1, v2) {\n return orig === v1 ? v2 : orig === v2 ? v1 : orig;\n}\nfunction startEnd(v, start, end) {\n return v === 'start' ? start : v === 'end' ? end : v;\n}\nfunction setInflateAmount(properties, { inflateAmount }, ratio) {\n properties.inflateAmount = inflateAmount === 'auto' ? ratio === 1 ? 0.33 : 0 : inflateAmount;\n}\nclass BarController extends DatasetController {\n static id = 'bar';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'bar',\n categoryPercentage: 0.8,\n barPercentage: 0.9,\n grouped: true,\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'base',\n 'width',\n 'height'\n ]\n }\n }\n };\n static overrides = {\n scales: {\n _index_: {\n type: 'category',\n offset: true,\n grid: {\n offset: true\n }\n },\n _value_: {\n type: 'linear',\n beginAtZero: true\n }\n }\n };\n parsePrimitiveData(meta, data, start, count) {\n return parseArrayOrPrimitive(meta, data, start, count);\n }\n parseArrayData(meta, data, start, count) {\n return parseArrayOrPrimitive(meta, data, start, count);\n }\n parseObjectData(meta, data, start, count) {\n const { iScale , vScale } = meta;\n const { xAxisKey ='x' , yAxisKey ='y' } = this._parsing;\n const iAxisKey = iScale.axis === 'x' ? xAxisKey : yAxisKey;\n const vAxisKey = vScale.axis === 'x' ? xAxisKey : yAxisKey;\n const parsed = [];\n let i, ilen, item, obj;\n for(i = start, ilen = start + count; i < ilen; ++i){\n obj = data[i];\n item = {};\n item[iScale.axis] = iScale.parse(resolveObjectKey(obj, iAxisKey), i);\n parsed.push(parseValue(resolveObjectKey(obj, vAxisKey), item, vScale, i));\n }\n return parsed;\n }\n updateRangeFromParsed(range, scale, parsed, stack) {\n super.updateRangeFromParsed(range, scale, parsed, stack);\n const custom = parsed._custom;\n if (custom && scale === this._cachedMeta.vScale) {\n range.min = Math.min(range.min, custom.min);\n range.max = Math.max(range.max, custom.max);\n }\n }\n getMaxOverflow() {\n return 0;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const { iScale , vScale } = meta;\n const parsed = this.getParsed(index);\n const custom = parsed._custom;\n const value = isFloatBar(custom) ? '[' + custom.start + ', ' + custom.end + ']' : '' + vScale.getLabelForValue(parsed[vScale.axis]);\n return {\n label: '' + iScale.getLabelForValue(parsed[iScale.axis]),\n value\n };\n }\n initialize() {\n this.enableOptionSharing = true;\n super.initialize();\n const meta = this._cachedMeta;\n meta.stack = this.getDataset().stack;\n }\n update(mode) {\n const meta = this._cachedMeta;\n this.updateElements(meta.data, 0, meta.data.length, mode);\n }\n updateElements(bars, start, count, mode) {\n const reset = mode === 'reset';\n const { index , _cachedMeta: { vScale } } = this;\n const base = vScale.getBasePixel();\n const horizontal = vScale.isHorizontal();\n const ruler = this._getRuler();\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n for(let i = start; i < start + count; i++){\n const parsed = this.getParsed(i);\n const vpixels = reset || isNullOrUndef(parsed[vScale.axis]) ? {\n base,\n head: base\n } : this._calculateBarValuePixels(i);\n const ipixels = this._calculateBarIndexPixels(i, ruler);\n const stack = (parsed._stacks || {})[vScale.axis];\n const properties = {\n horizontal,\n base: vpixels.base,\n enableBorderRadius: !stack || isFloatBar(parsed._custom) || index === stack._top || index === stack._bottom,\n x: horizontal ? vpixels.head : ipixels.center,\n y: horizontal ? ipixels.center : vpixels.head,\n height: horizontal ? ipixels.size : Math.abs(vpixels.size),\n width: horizontal ? Math.abs(vpixels.size) : ipixels.size\n };\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, bars[i].active ? 'active' : mode);\n }\n const options = properties.options || bars[i].options;\n setBorderSkipped(properties, options, stack, index);\n setInflateAmount(properties, options, ruler.ratio);\n this.updateElement(bars[i], i, properties, mode);\n }\n }\n _getStacks(last, dataIndex) {\n const { iScale } = this._cachedMeta;\n const metasets = iScale.getMatchingVisibleMetas(this._type).filter((meta)=>meta.controller.options.grouped);\n const stacked = iScale.options.stacked;\n const stacks = [];\n const skipNull = (meta)=>{\n const parsed = meta.controller.getParsed(dataIndex);\n const val = parsed && parsed[meta.vScale.axis];\n if (isNullOrUndef(val) || isNaN(val)) {\n return true;\n }\n };\n for (const meta of metasets){\n if (dataIndex !== undefined && skipNull(meta)) {\n continue;\n }\n if (stacked === false || stacks.indexOf(meta.stack) === -1 || stacked === undefined && meta.stack === undefined) {\n stacks.push(meta.stack);\n }\n if (meta.index === last) {\n break;\n }\n }\n if (!stacks.length) {\n stacks.push(undefined);\n }\n return stacks;\n }\n _getStackCount(index) {\n return this._getStacks(undefined, index).length;\n }\n _getStackIndex(datasetIndex, name, dataIndex) {\n const stacks = this._getStacks(datasetIndex, dataIndex);\n const index = name !== undefined ? stacks.indexOf(name) : -1;\n return index === -1 ? stacks.length - 1 : index;\n }\n _getRuler() {\n const opts = this.options;\n const meta = this._cachedMeta;\n const iScale = meta.iScale;\n const pixels = [];\n let i, ilen;\n for(i = 0, ilen = meta.data.length; i < ilen; ++i){\n pixels.push(iScale.getPixelForValue(this.getParsed(i)[iScale.axis], i));\n }\n const barThickness = opts.barThickness;\n const min = barThickness || computeMinSampleSize(meta);\n return {\n min,\n pixels,\n start: iScale._startPixel,\n end: iScale._endPixel,\n stackCount: this._getStackCount(),\n scale: iScale,\n grouped: opts.grouped,\n ratio: barThickness ? 1 : opts.categoryPercentage * opts.barPercentage\n };\n }\n _calculateBarValuePixels(index) {\n const { _cachedMeta: { vScale , _stacked , index: datasetIndex } , options: { base: baseValue , minBarLength } } = this;\n const actualBase = baseValue || 0;\n const parsed = this.getParsed(index);\n const custom = parsed._custom;\n const floating = isFloatBar(custom);\n let value = parsed[vScale.axis];\n let start = 0;\n let length = _stacked ? this.applyStack(vScale, parsed, _stacked) : value;\n let head, size;\n if (length !== value) {\n start = length - value;\n length = value;\n }\n if (floating) {\n value = custom.barStart;\n length = custom.barEnd - custom.barStart;\n if (value !== 0 && sign(value) !== sign(custom.barEnd)) {\n start = 0;\n }\n start += value;\n }\n const startValue = !isNullOrUndef(baseValue) && !floating ? baseValue : start;\n let base = vScale.getPixelForValue(startValue);\n if (this.chart.getDataVisibility(index)) {\n head = vScale.getPixelForValue(start + length);\n } else {\n head = base;\n }\n size = head - base;\n if (Math.abs(size) < minBarLength) {\n size = barSign(size, vScale, actualBase) * minBarLength;\n if (value === actualBase) {\n base -= size / 2;\n }\n const startPixel = vScale.getPixelForDecimal(0);\n const endPixel = vScale.getPixelForDecimal(1);\n const min = Math.min(startPixel, endPixel);\n const max = Math.max(startPixel, endPixel);\n base = Math.max(Math.min(base, max), min);\n head = base + size;\n if (_stacked && !floating) {\n parsed._stacks[vScale.axis]._visualValues[datasetIndex] = vScale.getValueForPixel(head) - vScale.getValueForPixel(base);\n }\n }\n if (base === vScale.getPixelForValue(actualBase)) {\n const halfGrid = sign(size) * vScale.getLineWidthForValue(actualBase) / 2;\n base += halfGrid;\n size -= halfGrid;\n }\n return {\n size,\n base,\n head,\n center: head + size / 2\n };\n }\n _calculateBarIndexPixels(index, ruler) {\n const scale = ruler.scale;\n const options = this.options;\n const skipNull = options.skipNull;\n const maxBarThickness = valueOrDefault(options.maxBarThickness, Infinity);\n let center, size;\n if (ruler.grouped) {\n const stackCount = skipNull ? this._getStackCount(index) : ruler.stackCount;\n const range = options.barThickness === 'flex' ? computeFlexCategoryTraits(index, ruler, options, stackCount) : computeFitCategoryTraits(index, ruler, options, stackCount);\n const stackIndex = this._getStackIndex(this.index, this._cachedMeta.stack, skipNull ? index : undefined);\n center = range.start + range.chunk * stackIndex + range.chunk / 2;\n size = Math.min(maxBarThickness, range.chunk * range.ratio);\n } else {\n center = scale.getPixelForValue(this.getParsed(index)[scale.axis], index);\n size = Math.min(maxBarThickness, ruler.min * ruler.ratio);\n }\n return {\n base: center - size / 2,\n head: center + size / 2,\n center,\n size\n };\n }\n draw() {\n const meta = this._cachedMeta;\n const vScale = meta.vScale;\n const rects = meta.data;\n const ilen = rects.length;\n let i = 0;\n for(; i < ilen; ++i){\n if (this.getParsed(i)[vScale.axis] !== null) {\n rects[i].draw(this._ctx);\n }\n }\n }\n}\n\nclass BubbleController extends DatasetController {\n static id = 'bubble';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'point',\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'borderWidth',\n 'radius'\n ]\n }\n }\n };\n static overrides = {\n scales: {\n x: {\n type: 'linear'\n },\n y: {\n type: 'linear'\n }\n }\n };\n initialize() {\n this.enableOptionSharing = true;\n super.initialize();\n }\n parsePrimitiveData(meta, data, start, count) {\n const parsed = super.parsePrimitiveData(meta, data, start, count);\n for(let i = 0; i < parsed.length; i++){\n parsed[i]._custom = this.resolveDataElementOptions(i + start).radius;\n }\n return parsed;\n }\n parseArrayData(meta, data, start, count) {\n const parsed = super.parseArrayData(meta, data, start, count);\n for(let i = 0; i < parsed.length; i++){\n const item = data[start + i];\n parsed[i]._custom = valueOrDefault(item[2], this.resolveDataElementOptions(i + start).radius);\n }\n return parsed;\n }\n parseObjectData(meta, data, start, count) {\n const parsed = super.parseObjectData(meta, data, start, count);\n for(let i = 0; i < parsed.length; i++){\n const item = data[start + i];\n parsed[i]._custom = valueOrDefault(item && item.r && +item.r, this.resolveDataElementOptions(i + start).radius);\n }\n return parsed;\n }\n getMaxOverflow() {\n const data = this._cachedMeta.data;\n let max = 0;\n for(let i = data.length - 1; i >= 0; --i){\n max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n }\n return max > 0 && max;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const labels = this.chart.data.labels || [];\n const { xScale , yScale } = meta;\n const parsed = this.getParsed(index);\n const x = xScale.getLabelForValue(parsed.x);\n const y = yScale.getLabelForValue(parsed.y);\n const r = parsed._custom;\n return {\n label: labels[index] || '',\n value: '(' + x + ', ' + y + (r ? ', ' + r : '') + ')'\n };\n }\n update(mode) {\n const points = this._cachedMeta.data;\n this.updateElements(points, 0, points.length, mode);\n }\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const { iScale , vScale } = this._cachedMeta;\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n for(let i = start; i < start + count; i++){\n const point = points[i];\n const parsed = !reset && this.getParsed(i);\n const properties = {};\n const iPixel = properties[iAxis] = reset ? iScale.getPixelForDecimal(0.5) : iScale.getPixelForValue(parsed[iAxis]);\n const vPixel = properties[vAxis] = reset ? vScale.getBasePixel() : vScale.getPixelForValue(parsed[vAxis]);\n properties.skip = isNaN(iPixel) || isNaN(vPixel);\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n if (reset) {\n properties.options.radius = 0;\n }\n }\n this.updateElement(point, i, properties, mode);\n }\n }\n resolveDataElementOptions(index, mode) {\n const parsed = this.getParsed(index);\n let values = super.resolveDataElementOptions(index, mode);\n if (values.$shared) {\n values = Object.assign({}, values, {\n $shared: false\n });\n }\n const radius = values.radius;\n if (mode !== 'active') {\n values.radius = 0;\n }\n values.radius += valueOrDefault(parsed && parsed._custom, radius);\n return values;\n }\n}\n\nfunction getRatioAndOffset(rotation, circumference, cutout) {\n let ratioX = 1;\n let ratioY = 1;\n let offsetX = 0;\n let offsetY = 0;\n if (circumference < TAU) {\n const startAngle = rotation;\n const endAngle = startAngle + circumference;\n const startX = Math.cos(startAngle);\n const startY = Math.sin(startAngle);\n const endX = Math.cos(endAngle);\n const endY = Math.sin(endAngle);\n const calcMax = (angle, a, b)=>_angleBetween(angle, startAngle, endAngle, true) ? 1 : Math.max(a, a * cutout, b, b * cutout);\n const calcMin = (angle, a, b)=>_angleBetween(angle, startAngle, endAngle, true) ? -1 : Math.min(a, a * cutout, b, b * cutout);\n const maxX = calcMax(0, startX, endX);\n const maxY = calcMax(HALF_PI, startY, endY);\n const minX = calcMin(PI, startX, endX);\n const minY = calcMin(PI + HALF_PI, startY, endY);\n ratioX = (maxX - minX) / 2;\n ratioY = (maxY - minY) / 2;\n offsetX = -(maxX + minX) / 2;\n offsetY = -(maxY + minY) / 2;\n }\n return {\n ratioX,\n ratioY,\n offsetX,\n offsetY\n };\n}\nclass DoughnutController extends DatasetController {\n static id = 'doughnut';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'arc',\n animation: {\n animateRotate: true,\n animateScale: false\n },\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'circumference',\n 'endAngle',\n 'innerRadius',\n 'outerRadius',\n 'startAngle',\n 'x',\n 'y',\n 'offset',\n 'borderWidth',\n 'spacing'\n ]\n }\n },\n cutout: '50%',\n rotation: 0,\n circumference: 360,\n radius: '100%',\n spacing: 0,\n indexAxis: 'r'\n };\n static descriptors = {\n _scriptable: (name)=>name !== 'spacing',\n _indexable: (name)=>name !== 'spacing' && !name.startsWith('borderDash') && !name.startsWith('hoverBorderDash')\n };\n static overrides = {\n aspectRatio: 1,\n plugins: {\n legend: {\n labels: {\n generateLabels (chart) {\n const data = chart.data;\n if (data.labels.length && data.datasets.length) {\n const { labels: { pointStyle , color } } = chart.legend.options;\n return data.labels.map((label, i)=>{\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i);\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n fontColor: color,\n lineWidth: style.borderWidth,\n pointStyle: pointStyle,\n hidden: !chart.getDataVisibility(i),\n index: i\n };\n });\n }\n return [];\n }\n },\n onClick (e, legendItem, legend) {\n legend.chart.toggleDataVisibility(legendItem.index);\n legend.chart.update();\n }\n }\n }\n };\n constructor(chart, datasetIndex){\n super(chart, datasetIndex);\n this.enableOptionSharing = true;\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n this.offsetX = undefined;\n this.offsetY = undefined;\n }\n linkScales() {}\n parse(start, count) {\n const data = this.getDataset().data;\n const meta = this._cachedMeta;\n if (this._parsing === false) {\n meta._parsed = data;\n } else {\n let getter = (i)=>+data[i];\n if (isObject(data[start])) {\n const { key ='value' } = this._parsing;\n getter = (i)=>+resolveObjectKey(data[i], key);\n }\n let i, ilen;\n for(i = start, ilen = start + count; i < ilen; ++i){\n meta._parsed[i] = getter(i);\n }\n }\n }\n _getRotation() {\n return toRadians(this.options.rotation - 90);\n }\n _getCircumference() {\n return toRadians(this.options.circumference);\n }\n _getRotationExtents() {\n let min = TAU;\n let max = -TAU;\n for(let i = 0; i < this.chart.data.datasets.length; ++i){\n if (this.chart.isDatasetVisible(i) && this.chart.getDatasetMeta(i).type === this._type) {\n const controller = this.chart.getDatasetMeta(i).controller;\n const rotation = controller._getRotation();\n const circumference = controller._getCircumference();\n min = Math.min(min, rotation);\n max = Math.max(max, rotation + circumference);\n }\n }\n return {\n rotation: min,\n circumference: max - min\n };\n }\n update(mode) {\n const chart = this.chart;\n const { chartArea } = chart;\n const meta = this._cachedMeta;\n const arcs = meta.data;\n const spacing = this.getMaxBorderWidth() + this.getMaxOffset(arcs) + this.options.spacing;\n const maxSize = Math.max((Math.min(chartArea.width, chartArea.height) - spacing) / 2, 0);\n const cutout = Math.min(toPercentage(this.options.cutout, maxSize), 1);\n const chartWeight = this._getRingWeight(this.index);\n const { circumference , rotation } = this._getRotationExtents();\n const { ratioX , ratioY , offsetX , offsetY } = getRatioAndOffset(rotation, circumference, cutout);\n const maxWidth = (chartArea.width - spacing) / ratioX;\n const maxHeight = (chartArea.height - spacing) / ratioY;\n const maxRadius = Math.max(Math.min(maxWidth, maxHeight) / 2, 0);\n const outerRadius = toDimension(this.options.radius, maxRadius);\n const innerRadius = Math.max(outerRadius * cutout, 0);\n const radiusLength = (outerRadius - innerRadius) / this._getVisibleDatasetWeightTotal();\n this.offsetX = offsetX * outerRadius;\n this.offsetY = offsetY * outerRadius;\n meta.total = this.calculateTotal();\n this.outerRadius = outerRadius - radiusLength * this._getRingWeightOffset(this.index);\n this.innerRadius = Math.max(this.outerRadius - radiusLength * chartWeight, 0);\n this.updateElements(arcs, 0, arcs.length, mode);\n }\n _circumference(i, reset) {\n const opts = this.options;\n const meta = this._cachedMeta;\n const circumference = this._getCircumference();\n if (reset && opts.animation.animateRotate || !this.chart.getDataVisibility(i) || meta._parsed[i] === null || meta.data[i].hidden) {\n return 0;\n }\n return this.calculateCircumference(meta._parsed[i] * circumference / TAU);\n }\n updateElements(arcs, start, count, mode) {\n const reset = mode === 'reset';\n const chart = this.chart;\n const chartArea = chart.chartArea;\n const opts = chart.options;\n const animationOpts = opts.animation;\n const centerX = (chartArea.left + chartArea.right) / 2;\n const centerY = (chartArea.top + chartArea.bottom) / 2;\n const animateScale = reset && animationOpts.animateScale;\n const innerRadius = animateScale ? 0 : this.innerRadius;\n const outerRadius = animateScale ? 0 : this.outerRadius;\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n let startAngle = this._getRotation();\n let i;\n for(i = 0; i < start; ++i){\n startAngle += this._circumference(i, reset);\n }\n for(i = start; i < start + count; ++i){\n const circumference = this._circumference(i, reset);\n const arc = arcs[i];\n const properties = {\n x: centerX + this.offsetX,\n y: centerY + this.offsetY,\n startAngle,\n endAngle: startAngle + circumference,\n circumference,\n outerRadius,\n innerRadius\n };\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, arc.active ? 'active' : mode);\n }\n startAngle += circumference;\n this.updateElement(arc, i, properties, mode);\n }\n }\n calculateTotal() {\n const meta = this._cachedMeta;\n const metaData = meta.data;\n let total = 0;\n let i;\n for(i = 0; i < metaData.length; i++){\n const value = meta._parsed[i];\n if (value !== null && !isNaN(value) && this.chart.getDataVisibility(i) && !metaData[i].hidden) {\n total += Math.abs(value);\n }\n }\n return total;\n }\n calculateCircumference(value) {\n const total = this._cachedMeta.total;\n if (total > 0 && !isNaN(value)) {\n return TAU * (Math.abs(value) / total);\n }\n return 0;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const chart = this.chart;\n const labels = chart.data.labels || [];\n const value = formatNumber(meta._parsed[index], chart.options.locale);\n return {\n label: labels[index] || '',\n value\n };\n }\n getMaxBorderWidth(arcs) {\n let max = 0;\n const chart = this.chart;\n let i, ilen, meta, controller, options;\n if (!arcs) {\n for(i = 0, ilen = chart.data.datasets.length; i < ilen; ++i){\n if (chart.isDatasetVisible(i)) {\n meta = chart.getDatasetMeta(i);\n arcs = meta.data;\n controller = meta.controller;\n break;\n }\n }\n }\n if (!arcs) {\n return 0;\n }\n for(i = 0, ilen = arcs.length; i < ilen; ++i){\n options = controller.resolveDataElementOptions(i);\n if (options.borderAlign !== 'inner') {\n max = Math.max(max, options.borderWidth || 0, options.hoverBorderWidth || 0);\n }\n }\n return max;\n }\n getMaxOffset(arcs) {\n let max = 0;\n for(let i = 0, ilen = arcs.length; i < ilen; ++i){\n const options = this.resolveDataElementOptions(i);\n max = Math.max(max, options.offset || 0, options.hoverOffset || 0);\n }\n return max;\n }\n _getRingWeightOffset(datasetIndex) {\n let ringWeightOffset = 0;\n for(let i = 0; i < datasetIndex; ++i){\n if (this.chart.isDatasetVisible(i)) {\n ringWeightOffset += this._getRingWeight(i);\n }\n }\n return ringWeightOffset;\n }\n _getRingWeight(datasetIndex) {\n return Math.max(valueOrDefault(this.chart.data.datasets[datasetIndex].weight, 1), 0);\n }\n _getVisibleDatasetWeightTotal() {\n return this._getRingWeightOffset(this.chart.data.datasets.length) || 1;\n }\n}\n\nclass LineController extends DatasetController {\n static id = 'line';\n static defaults = {\n datasetElementType: 'line',\n dataElementType: 'point',\n showLine: true,\n spanGaps: false\n };\n static overrides = {\n scales: {\n _index_: {\n type: 'category'\n },\n _value_: {\n type: 'linear'\n }\n }\n };\n initialize() {\n this.enableOptionSharing = true;\n this.supportsDecimation = true;\n super.initialize();\n }\n update(mode) {\n const meta = this._cachedMeta;\n const { dataset: line , data: points = [] , _dataset } = meta;\n const animationsDisabled = this.chart._animationsDisabled;\n let { start , count } = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n this._drawStart = start;\n this._drawCount = count;\n if (_scaleRangesChanged(meta)) {\n start = 0;\n count = points.length;\n }\n line._chart = this.chart;\n line._datasetIndex = this.index;\n line._decimated = !!_dataset._decimated;\n line.points = points;\n const options = this.resolveDatasetElementOptions(mode);\n if (!this.options.showLine) {\n options.borderWidth = 0;\n }\n options.segment = this.options.segment;\n this.updateElement(line, undefined, {\n animated: !animationsDisabled,\n options\n }, mode);\n this.updateElements(points, start, count, mode);\n }\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const { iScale , vScale , _stacked , _dataset } = this._cachedMeta;\n const { sharedOptions , includeOptions } = this._getSharedOptions(start, mode);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const { spanGaps , segment } = this.options;\n const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n const end = start + count;\n const pointsCount = points.length;\n let prevParsed = start > 0 && this.getParsed(start - 1);\n for(let i = 0; i < pointsCount; ++i){\n const point = points[i];\n const properties = directUpdate ? point : {};\n if (i < start || i >= end) {\n properties.skip = true;\n continue;\n }\n const parsed = this.getParsed(i);\n const nullData = isNullOrUndef(parsed[vAxis]);\n const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n if (segment) {\n properties.parsed = parsed;\n properties.raw = _dataset.data[i];\n }\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n }\n if (!directUpdate) {\n this.updateElement(point, i, properties, mode);\n }\n prevParsed = parsed;\n }\n }\n getMaxOverflow() {\n const meta = this._cachedMeta;\n const dataset = meta.dataset;\n const border = dataset.options && dataset.options.borderWidth || 0;\n const data = meta.data || [];\n if (!data.length) {\n return border;\n }\n const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n return Math.max(border, firstPoint, lastPoint) / 2;\n }\n draw() {\n const meta = this._cachedMeta;\n meta.dataset.updateControlPoints(this.chart.chartArea, meta.iScale.axis);\n super.draw();\n }\n}\n\nclass PolarAreaController extends DatasetController {\n static id = 'polarArea';\n static defaults = {\n dataElementType: 'arc',\n animation: {\n animateRotate: true,\n animateScale: true\n },\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius'\n ]\n }\n },\n indexAxis: 'r',\n startAngle: 0\n };\n static overrides = {\n aspectRatio: 1,\n plugins: {\n legend: {\n labels: {\n generateLabels (chart) {\n const data = chart.data;\n if (data.labels.length && data.datasets.length) {\n const { labels: { pointStyle , color } } = chart.legend.options;\n return data.labels.map((label, i)=>{\n const meta = chart.getDatasetMeta(0);\n const style = meta.controller.getStyle(i);\n return {\n text: label,\n fillStyle: style.backgroundColor,\n strokeStyle: style.borderColor,\n fontColor: color,\n lineWidth: style.borderWidth,\n pointStyle: pointStyle,\n hidden: !chart.getDataVisibility(i),\n index: i\n };\n });\n }\n return [];\n }\n },\n onClick (e, legendItem, legend) {\n legend.chart.toggleDataVisibility(legendItem.index);\n legend.chart.update();\n }\n }\n },\n scales: {\n r: {\n type: 'radialLinear',\n angleLines: {\n display: false\n },\n beginAtZero: true,\n grid: {\n circular: true\n },\n pointLabels: {\n display: false\n },\n startAngle: 0\n }\n }\n };\n constructor(chart, datasetIndex){\n super(chart, datasetIndex);\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n }\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const chart = this.chart;\n const labels = chart.data.labels || [];\n const value = formatNumber(meta._parsed[index].r, chart.options.locale);\n return {\n label: labels[index] || '',\n value\n };\n }\n parseObjectData(meta, data, start, count) {\n return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n }\n update(mode) {\n const arcs = this._cachedMeta.data;\n this._updateRadius();\n this.updateElements(arcs, 0, arcs.length, mode);\n }\n getMinMax() {\n const meta = this._cachedMeta;\n const range = {\n min: Number.POSITIVE_INFINITY,\n max: Number.NEGATIVE_INFINITY\n };\n meta.data.forEach((element, index)=>{\n const parsed = this.getParsed(index).r;\n if (!isNaN(parsed) && this.chart.getDataVisibility(index)) {\n if (parsed < range.min) {\n range.min = parsed;\n }\n if (parsed > range.max) {\n range.max = parsed;\n }\n }\n });\n return range;\n }\n _updateRadius() {\n const chart = this.chart;\n const chartArea = chart.chartArea;\n const opts = chart.options;\n const minSize = Math.min(chartArea.right - chartArea.left, chartArea.bottom - chartArea.top);\n const outerRadius = Math.max(minSize / 2, 0);\n const innerRadius = Math.max(opts.cutoutPercentage ? outerRadius / 100 * opts.cutoutPercentage : 1, 0);\n const radiusLength = (outerRadius - innerRadius) / chart.getVisibleDatasetCount();\n this.outerRadius = outerRadius - radiusLength * this.index;\n this.innerRadius = this.outerRadius - radiusLength;\n }\n updateElements(arcs, start, count, mode) {\n const reset = mode === 'reset';\n const chart = this.chart;\n const opts = chart.options;\n const animationOpts = opts.animation;\n const scale = this._cachedMeta.rScale;\n const centerX = scale.xCenter;\n const centerY = scale.yCenter;\n const datasetStartAngle = scale.getIndexAngle(0) - 0.5 * PI;\n let angle = datasetStartAngle;\n let i;\n const defaultAngle = 360 / this.countVisibleElements();\n for(i = 0; i < start; ++i){\n angle += this._computeAngle(i, mode, defaultAngle);\n }\n for(i = start; i < start + count; i++){\n const arc = arcs[i];\n let startAngle = angle;\n let endAngle = angle + this._computeAngle(i, mode, defaultAngle);\n let outerRadius = chart.getDataVisibility(i) ? scale.getDistanceFromCenterForValue(this.getParsed(i).r) : 0;\n angle = endAngle;\n if (reset) {\n if (animationOpts.animateScale) {\n outerRadius = 0;\n }\n if (animationOpts.animateRotate) {\n startAngle = endAngle = datasetStartAngle;\n }\n }\n const properties = {\n x: centerX,\n y: centerY,\n innerRadius: 0,\n outerRadius,\n startAngle,\n endAngle,\n options: this.resolveDataElementOptions(i, arc.active ? 'active' : mode)\n };\n this.updateElement(arc, i, properties, mode);\n }\n }\n countVisibleElements() {\n const meta = this._cachedMeta;\n let count = 0;\n meta.data.forEach((element, index)=>{\n if (!isNaN(this.getParsed(index).r) && this.chart.getDataVisibility(index)) {\n count++;\n }\n });\n return count;\n }\n _computeAngle(index, mode, defaultAngle) {\n return this.chart.getDataVisibility(index) ? toRadians(this.resolveDataElementOptions(index, mode).angle || defaultAngle) : 0;\n }\n}\n\nclass PieController extends DoughnutController {\n static id = 'pie';\n static defaults = {\n cutout: 0,\n rotation: 0,\n circumference: 360,\n radius: '100%'\n };\n}\n\nclass RadarController extends DatasetController {\n static id = 'radar';\n static defaults = {\n datasetElementType: 'line',\n dataElementType: 'point',\n indexAxis: 'r',\n showLine: true,\n elements: {\n line: {\n fill: 'start'\n }\n }\n };\n static overrides = {\n aspectRatio: 1,\n scales: {\n r: {\n type: 'radialLinear'\n }\n }\n };\n getLabelAndValue(index) {\n const vScale = this._cachedMeta.vScale;\n const parsed = this.getParsed(index);\n return {\n label: vScale.getLabels()[index],\n value: '' + vScale.getLabelForValue(parsed[vScale.axis])\n };\n }\n parseObjectData(meta, data, start, count) {\n return _parseObjectDataRadialScale.bind(this)(meta, data, start, count);\n }\n update(mode) {\n const meta = this._cachedMeta;\n const line = meta.dataset;\n const points = meta.data || [];\n const labels = meta.iScale.getLabels();\n line.points = points;\n if (mode !== 'resize') {\n const options = this.resolveDatasetElementOptions(mode);\n if (!this.options.showLine) {\n options.borderWidth = 0;\n }\n const properties = {\n _loop: true,\n _fullLoop: labels.length === points.length,\n options\n };\n this.updateElement(line, undefined, properties, mode);\n }\n this.updateElements(points, 0, points.length, mode);\n }\n updateElements(points, start, count, mode) {\n const scale = this._cachedMeta.rScale;\n const reset = mode === 'reset';\n for(let i = start; i < start + count; i++){\n const point = points[i];\n const options = this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n const pointPosition = scale.getPointPositionForValue(i, this.getParsed(i).r);\n const x = reset ? scale.xCenter : pointPosition.x;\n const y = reset ? scale.yCenter : pointPosition.y;\n const properties = {\n x,\n y,\n angle: pointPosition.angle,\n skip: isNaN(x) || isNaN(y),\n options\n };\n this.updateElement(point, i, properties, mode);\n }\n }\n}\n\nclass ScatterController extends DatasetController {\n static id = 'scatter';\n static defaults = {\n datasetElementType: false,\n dataElementType: 'point',\n showLine: false,\n fill: false\n };\n static overrides = {\n interaction: {\n mode: 'point'\n },\n scales: {\n x: {\n type: 'linear'\n },\n y: {\n type: 'linear'\n }\n }\n };\n getLabelAndValue(index) {\n const meta = this._cachedMeta;\n const labels = this.chart.data.labels || [];\n const { xScale , yScale } = meta;\n const parsed = this.getParsed(index);\n const x = xScale.getLabelForValue(parsed.x);\n const y = yScale.getLabelForValue(parsed.y);\n return {\n label: labels[index] || '',\n value: '(' + x + ', ' + y + ')'\n };\n }\n update(mode) {\n const meta = this._cachedMeta;\n const { data: points = [] } = meta;\n const animationsDisabled = this.chart._animationsDisabled;\n let { start , count } = _getStartAndCountOfVisiblePoints(meta, points, animationsDisabled);\n this._drawStart = start;\n this._drawCount = count;\n if (_scaleRangesChanged(meta)) {\n start = 0;\n count = points.length;\n }\n if (this.options.showLine) {\n const { dataset: line , _dataset } = meta;\n line._chart = this.chart;\n line._datasetIndex = this.index;\n line._decimated = !!_dataset._decimated;\n line.points = points;\n const options = this.resolveDatasetElementOptions(mode);\n options.segment = this.options.segment;\n this.updateElement(line, undefined, {\n animated: !animationsDisabled,\n options\n }, mode);\n }\n this.updateElements(points, start, count, mode);\n }\n addElements() {\n const { showLine } = this.options;\n if (!this.datasetElementType && showLine) {\n this.datasetElementType = this.chart.registry.getElement('line');\n }\n super.addElements();\n }\n updateElements(points, start, count, mode) {\n const reset = mode === 'reset';\n const { iScale , vScale , _stacked , _dataset } = this._cachedMeta;\n const firstOpts = this.resolveDataElementOptions(start, mode);\n const sharedOptions = this.getSharedOptions(firstOpts);\n const includeOptions = this.includeOptions(mode, sharedOptions);\n const iAxis = iScale.axis;\n const vAxis = vScale.axis;\n const { spanGaps , segment } = this.options;\n const maxGapLength = isNumber(spanGaps) ? spanGaps : Number.POSITIVE_INFINITY;\n const directUpdate = this.chart._animationsDisabled || reset || mode === 'none';\n let prevParsed = start > 0 && this.getParsed(start - 1);\n for(let i = start; i < start + count; ++i){\n const point = points[i];\n const parsed = this.getParsed(i);\n const properties = directUpdate ? point : {};\n const nullData = isNullOrUndef(parsed[vAxis]);\n const iPixel = properties[iAxis] = iScale.getPixelForValue(parsed[iAxis], i);\n const vPixel = properties[vAxis] = reset || nullData ? vScale.getBasePixel() : vScale.getPixelForValue(_stacked ? this.applyStack(vScale, parsed, _stacked) : parsed[vAxis], i);\n properties.skip = isNaN(iPixel) || isNaN(vPixel) || nullData;\n properties.stop = i > 0 && Math.abs(parsed[iAxis] - prevParsed[iAxis]) > maxGapLength;\n if (segment) {\n properties.parsed = parsed;\n properties.raw = _dataset.data[i];\n }\n if (includeOptions) {\n properties.options = sharedOptions || this.resolveDataElementOptions(i, point.active ? 'active' : mode);\n }\n if (!directUpdate) {\n this.updateElement(point, i, properties, mode);\n }\n prevParsed = parsed;\n }\n this.updateSharedOptions(sharedOptions, mode, firstOpts);\n }\n getMaxOverflow() {\n const meta = this._cachedMeta;\n const data = meta.data || [];\n if (!this.options.showLine) {\n let max = 0;\n for(let i = data.length - 1; i >= 0; --i){\n max = Math.max(max, data[i].size(this.resolveDataElementOptions(i)) / 2);\n }\n return max > 0 && max;\n }\n const dataset = meta.dataset;\n const border = dataset.options && dataset.options.borderWidth || 0;\n if (!data.length) {\n return border;\n }\n const firstPoint = data[0].size(this.resolveDataElementOptions(0));\n const lastPoint = data[data.length - 1].size(this.resolveDataElementOptions(data.length - 1));\n return Math.max(border, firstPoint, lastPoint) / 2;\n }\n}\n\nvar controllers = /*#__PURE__*/Object.freeze({\n__proto__: null,\nBarController: BarController,\nBubbleController: BubbleController,\nDoughnutController: DoughnutController,\nLineController: LineController,\nPieController: PieController,\nPolarAreaController: PolarAreaController,\nRadarController: RadarController,\nScatterController: ScatterController\n});\n\n/**\n * @namespace Chart._adapters\n * @since 2.8.0\n * @private\n */ function abstract() {\n throw new Error('This method is not implemented: Check that a complete date adapter is provided.');\n}\n/**\n * Date adapter (current used by the time scale)\n * @namespace Chart._adapters._date\n * @memberof Chart._adapters\n * @private\n */ class DateAdapterBase {\n /**\n * Override default date adapter methods.\n * Accepts type parameter to define options type.\n * @example\n * Chart._adapters._date.override<{myAdapterOption: string}>({\n * init() {\n * console.log(this.options.myAdapterOption);\n * }\n * })\n */ static override(members) {\n Object.assign(DateAdapterBase.prototype, members);\n }\n options;\n constructor(options){\n this.options = options || {};\n }\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n init() {}\n formats() {\n return abstract();\n }\n parse() {\n return abstract();\n }\n format() {\n return abstract();\n }\n add() {\n return abstract();\n }\n diff() {\n return abstract();\n }\n startOf() {\n return abstract();\n }\n endOf() {\n return abstract();\n }\n}\nvar adapters = {\n _date: DateAdapterBase\n};\n\nfunction binarySearch(metaset, axis, value, intersect) {\n const { controller , data , _sorted } = metaset;\n const iScale = controller._cachedMeta.iScale;\n if (iScale && axis === iScale.axis && axis !== 'r' && _sorted && data.length) {\n const lookupMethod = iScale._reversePixels ? _rlookupByKey : _lookupByKey;\n if (!intersect) {\n return lookupMethod(data, axis, value);\n } else if (controller._sharedOptions) {\n const el = data[0];\n const range = typeof el.getRange === 'function' && el.getRange(axis);\n if (range) {\n const start = lookupMethod(data, axis, value - range);\n const end = lookupMethod(data, axis, value + range);\n return {\n lo: start.lo,\n hi: end.hi\n };\n }\n }\n }\n return {\n lo: 0,\n hi: data.length - 1\n };\n}\n function evaluateInteractionItems(chart, axis, position, handler, intersect) {\n const metasets = chart.getSortedVisibleDatasetMetas();\n const value = position[axis];\n for(let i = 0, ilen = metasets.length; i < ilen; ++i){\n const { index , data } = metasets[i];\n const { lo , hi } = binarySearch(metasets[i], axis, value, intersect);\n for(let j = lo; j <= hi; ++j){\n const element = data[j];\n if (!element.skip) {\n handler(element, index, j);\n }\n }\n }\n}\n function getDistanceMetricForAxis(axis) {\n const useX = axis.indexOf('x') !== -1;\n const useY = axis.indexOf('y') !== -1;\n return function(pt1, pt2) {\n const deltaX = useX ? Math.abs(pt1.x - pt2.x) : 0;\n const deltaY = useY ? Math.abs(pt1.y - pt2.y) : 0;\n return Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2));\n };\n}\n function getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) {\n const items = [];\n if (!includeInvisible && !chart.isPointInArea(position)) {\n return items;\n }\n const evaluationFunc = function(element, datasetIndex, index) {\n if (!includeInvisible && !_isPointInArea(element, chart.chartArea, 0)) {\n return;\n }\n if (element.inRange(position.x, position.y, useFinalPosition)) {\n items.push({\n element,\n datasetIndex,\n index\n });\n }\n };\n evaluateInteractionItems(chart, axis, position, evaluationFunc, true);\n return items;\n}\n function getNearestRadialItems(chart, position, axis, useFinalPosition) {\n let items = [];\n function evaluationFunc(element, datasetIndex, index) {\n const { startAngle , endAngle } = element.getProps([\n 'startAngle',\n 'endAngle'\n ], useFinalPosition);\n const { angle } = getAngleFromPoint(element, {\n x: position.x,\n y: position.y\n });\n if (_angleBetween(angle, startAngle, endAngle)) {\n items.push({\n element,\n datasetIndex,\n index\n });\n }\n }\n evaluateInteractionItems(chart, axis, position, evaluationFunc);\n return items;\n}\n function getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n let items = [];\n const distanceMetric = getDistanceMetricForAxis(axis);\n let minDistance = Number.POSITIVE_INFINITY;\n function evaluationFunc(element, datasetIndex, index) {\n const inRange = element.inRange(position.x, position.y, useFinalPosition);\n if (intersect && !inRange) {\n return;\n }\n const center = element.getCenterPoint(useFinalPosition);\n const pointInArea = !!includeInvisible || chart.isPointInArea(center);\n if (!pointInArea && !inRange) {\n return;\n }\n const distance = distanceMetric(position, center);\n if (distance < minDistance) {\n items = [\n {\n element,\n datasetIndex,\n index\n }\n ];\n minDistance = distance;\n } else if (distance === minDistance) {\n items.push({\n element,\n datasetIndex,\n index\n });\n }\n }\n evaluateInteractionItems(chart, axis, position, evaluationFunc);\n return items;\n}\n function getNearestItems(chart, position, axis, intersect, useFinalPosition, includeInvisible) {\n if (!includeInvisible && !chart.isPointInArea(position)) {\n return [];\n }\n return axis === 'r' && !intersect ? getNearestRadialItems(chart, position, axis, useFinalPosition) : getNearestCartesianItems(chart, position, axis, intersect, useFinalPosition, includeInvisible);\n}\n function getAxisItems(chart, position, axis, intersect, useFinalPosition) {\n const items = [];\n const rangeMethod = axis === 'x' ? 'inXRange' : 'inYRange';\n let intersectsItem = false;\n evaluateInteractionItems(chart, axis, position, (element, datasetIndex, index)=>{\n if (element[rangeMethod](position[axis], useFinalPosition)) {\n items.push({\n element,\n datasetIndex,\n index\n });\n intersectsItem = intersectsItem || element.inRange(position.x, position.y, useFinalPosition);\n }\n });\n if (intersect && !intersectsItem) {\n return [];\n }\n return items;\n}\n var Interaction = {\n evaluateInteractionItems,\n modes: {\n index (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'x';\n const includeInvisible = options.includeInvisible || false;\n const items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n const elements = [];\n if (!items.length) {\n return [];\n }\n chart.getSortedVisibleDatasetMetas().forEach((meta)=>{\n const index = items[0].index;\n const element = meta.data[index];\n if (element && !element.skip) {\n elements.push({\n element,\n datasetIndex: meta.index,\n index\n });\n }\n });\n return elements;\n },\n dataset (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n let items = options.intersect ? getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible) : getNearestItems(chart, position, axis, false, useFinalPosition, includeInvisible);\n if (items.length > 0) {\n const datasetIndex = items[0].datasetIndex;\n const data = chart.getDatasetMeta(datasetIndex).data;\n items = [];\n for(let i = 0; i < data.length; ++i){\n items.push({\n element: data[i],\n datasetIndex,\n index: i\n });\n }\n }\n return items;\n },\n point (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n return getIntersectItems(chart, position, axis, useFinalPosition, includeInvisible);\n },\n nearest (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n const axis = options.axis || 'xy';\n const includeInvisible = options.includeInvisible || false;\n return getNearestItems(chart, position, axis, options.intersect, useFinalPosition, includeInvisible);\n },\n x (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n return getAxisItems(chart, position, 'x', options.intersect, useFinalPosition);\n },\n y (chart, e, options, useFinalPosition) {\n const position = getRelativePosition(e, chart);\n return getAxisItems(chart, position, 'y', options.intersect, useFinalPosition);\n }\n }\n};\n\nconst STATIC_POSITIONS = [\n 'left',\n 'top',\n 'right',\n 'bottom'\n];\nfunction filterByPosition(array, position) {\n return array.filter((v)=>v.pos === position);\n}\nfunction filterDynamicPositionByAxis(array, axis) {\n return array.filter((v)=>STATIC_POSITIONS.indexOf(v.pos) === -1 && v.box.axis === axis);\n}\nfunction sortByWeight(array, reverse) {\n return array.sort((a, b)=>{\n const v0 = reverse ? b : a;\n const v1 = reverse ? a : b;\n return v0.weight === v1.weight ? v0.index - v1.index : v0.weight - v1.weight;\n });\n}\nfunction wrapBoxes(boxes) {\n const layoutBoxes = [];\n let i, ilen, box, pos, stack, stackWeight;\n for(i = 0, ilen = (boxes || []).length; i < ilen; ++i){\n box = boxes[i];\n ({ position: pos , options: { stack , stackWeight =1 } } = box);\n layoutBoxes.push({\n index: i,\n box,\n pos,\n horizontal: box.isHorizontal(),\n weight: box.weight,\n stack: stack && pos + stack,\n stackWeight\n });\n }\n return layoutBoxes;\n}\nfunction buildStacks(layouts) {\n const stacks = {};\n for (const wrap of layouts){\n const { stack , pos , stackWeight } = wrap;\n if (!stack || !STATIC_POSITIONS.includes(pos)) {\n continue;\n }\n const _stack = stacks[stack] || (stacks[stack] = {\n count: 0,\n placed: 0,\n weight: 0,\n size: 0\n });\n _stack.count++;\n _stack.weight += stackWeight;\n }\n return stacks;\n}\n function setLayoutDims(layouts, params) {\n const stacks = buildStacks(layouts);\n const { vBoxMaxWidth , hBoxMaxHeight } = params;\n let i, ilen, layout;\n for(i = 0, ilen = layouts.length; i < ilen; ++i){\n layout = layouts[i];\n const { fullSize } = layout.box;\n const stack = stacks[layout.stack];\n const factor = stack && layout.stackWeight / stack.weight;\n if (layout.horizontal) {\n layout.width = factor ? factor * vBoxMaxWidth : fullSize && params.availableWidth;\n layout.height = hBoxMaxHeight;\n } else {\n layout.width = vBoxMaxWidth;\n layout.height = factor ? factor * hBoxMaxHeight : fullSize && params.availableHeight;\n }\n }\n return stacks;\n}\nfunction buildLayoutBoxes(boxes) {\n const layoutBoxes = wrapBoxes(boxes);\n const fullSize = sortByWeight(layoutBoxes.filter((wrap)=>wrap.box.fullSize), true);\n const left = sortByWeight(filterByPosition(layoutBoxes, 'left'), true);\n const right = sortByWeight(filterByPosition(layoutBoxes, 'right'));\n const top = sortByWeight(filterByPosition(layoutBoxes, 'top'), true);\n const bottom = sortByWeight(filterByPosition(layoutBoxes, 'bottom'));\n const centerHorizontal = filterDynamicPositionByAxis(layoutBoxes, 'x');\n const centerVertical = filterDynamicPositionByAxis(layoutBoxes, 'y');\n return {\n fullSize,\n leftAndTop: left.concat(top),\n rightAndBottom: right.concat(centerVertical).concat(bottom).concat(centerHorizontal),\n chartArea: filterByPosition(layoutBoxes, 'chartArea'),\n vertical: left.concat(right).concat(centerVertical),\n horizontal: top.concat(bottom).concat(centerHorizontal)\n };\n}\nfunction getCombinedMax(maxPadding, chartArea, a, b) {\n return Math.max(maxPadding[a], chartArea[a]) + Math.max(maxPadding[b], chartArea[b]);\n}\nfunction updateMaxPadding(maxPadding, boxPadding) {\n maxPadding.top = Math.max(maxPadding.top, boxPadding.top);\n maxPadding.left = Math.max(maxPadding.left, boxPadding.left);\n maxPadding.bottom = Math.max(maxPadding.bottom, boxPadding.bottom);\n maxPadding.right = Math.max(maxPadding.right, boxPadding.right);\n}\nfunction updateDims(chartArea, params, layout, stacks) {\n const { pos , box } = layout;\n const maxPadding = chartArea.maxPadding;\n if (!isObject(pos)) {\n if (layout.size) {\n chartArea[pos] -= layout.size;\n }\n const stack = stacks[layout.stack] || {\n size: 0,\n count: 1\n };\n stack.size = Math.max(stack.size, layout.horizontal ? box.height : box.width);\n layout.size = stack.size / stack.count;\n chartArea[pos] += layout.size;\n }\n if (box.getPadding) {\n updateMaxPadding(maxPadding, box.getPadding());\n }\n const newWidth = Math.max(0, params.outerWidth - getCombinedMax(maxPadding, chartArea, 'left', 'right'));\n const newHeight = Math.max(0, params.outerHeight - getCombinedMax(maxPadding, chartArea, 'top', 'bottom'));\n const widthChanged = newWidth !== chartArea.w;\n const heightChanged = newHeight !== chartArea.h;\n chartArea.w = newWidth;\n chartArea.h = newHeight;\n return layout.horizontal ? {\n same: widthChanged,\n other: heightChanged\n } : {\n same: heightChanged,\n other: widthChanged\n };\n}\nfunction handleMaxPadding(chartArea) {\n const maxPadding = chartArea.maxPadding;\n function updatePos(pos) {\n const change = Math.max(maxPadding[pos] - chartArea[pos], 0);\n chartArea[pos] += change;\n return change;\n }\n chartArea.y += updatePos('top');\n chartArea.x += updatePos('left');\n updatePos('right');\n updatePos('bottom');\n}\nfunction getMargins(horizontal, chartArea) {\n const maxPadding = chartArea.maxPadding;\n function marginForPositions(positions) {\n const margin = {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n };\n positions.forEach((pos)=>{\n margin[pos] = Math.max(chartArea[pos], maxPadding[pos]);\n });\n return margin;\n }\n return horizontal ? marginForPositions([\n 'left',\n 'right'\n ]) : marginForPositions([\n 'top',\n 'bottom'\n ]);\n}\nfunction fitBoxes(boxes, chartArea, params, stacks) {\n const refitBoxes = [];\n let i, ilen, layout, box, refit, changed;\n for(i = 0, ilen = boxes.length, refit = 0; i < ilen; ++i){\n layout = boxes[i];\n box = layout.box;\n box.update(layout.width || chartArea.w, layout.height || chartArea.h, getMargins(layout.horizontal, chartArea));\n const { same , other } = updateDims(chartArea, params, layout, stacks);\n refit |= same && refitBoxes.length;\n changed = changed || other;\n if (!box.fullSize) {\n refitBoxes.push(layout);\n }\n }\n return refit && fitBoxes(refitBoxes, chartArea, params, stacks) || changed;\n}\nfunction setBoxDims(box, left, top, width, height) {\n box.top = top;\n box.left = left;\n box.right = left + width;\n box.bottom = top + height;\n box.width = width;\n box.height = height;\n}\nfunction placeBoxes(boxes, chartArea, params, stacks) {\n const userPadding = params.padding;\n let { x , y } = chartArea;\n for (const layout of boxes){\n const box = layout.box;\n const stack = stacks[layout.stack] || {\n count: 1,\n placed: 0,\n weight: 1\n };\n const weight = layout.stackWeight / stack.weight || 1;\n if (layout.horizontal) {\n const width = chartArea.w * weight;\n const height = stack.size || box.height;\n if (defined(stack.start)) {\n y = stack.start;\n }\n if (box.fullSize) {\n setBoxDims(box, userPadding.left, y, params.outerWidth - userPadding.right - userPadding.left, height);\n } else {\n setBoxDims(box, chartArea.left + stack.placed, y, width, height);\n }\n stack.start = y;\n stack.placed += width;\n y = box.bottom;\n } else {\n const height = chartArea.h * weight;\n const width = stack.size || box.width;\n if (defined(stack.start)) {\n x = stack.start;\n }\n if (box.fullSize) {\n setBoxDims(box, x, userPadding.top, width, params.outerHeight - userPadding.bottom - userPadding.top);\n } else {\n setBoxDims(box, x, chartArea.top + stack.placed, width, height);\n }\n stack.start = x;\n stack.placed += height;\n x = box.right;\n }\n }\n chartArea.x = x;\n chartArea.y = y;\n}\nvar layouts = {\n addBox (chart, item) {\n if (!chart.boxes) {\n chart.boxes = [];\n }\n item.fullSize = item.fullSize || false;\n item.position = item.position || 'top';\n item.weight = item.weight || 0;\n item._layers = item._layers || function() {\n return [\n {\n z: 0,\n draw (chartArea) {\n item.draw(chartArea);\n }\n }\n ];\n };\n chart.boxes.push(item);\n },\n removeBox (chart, layoutItem) {\n const index = chart.boxes ? chart.boxes.indexOf(layoutItem) : -1;\n if (index !== -1) {\n chart.boxes.splice(index, 1);\n }\n },\n configure (chart, item, options) {\n item.fullSize = options.fullSize;\n item.position = options.position;\n item.weight = options.weight;\n },\n update (chart, width, height, minPadding) {\n if (!chart) {\n return;\n }\n const padding = toPadding(chart.options.layout.padding);\n const availableWidth = Math.max(width - padding.width, 0);\n const availableHeight = Math.max(height - padding.height, 0);\n const boxes = buildLayoutBoxes(chart.boxes);\n const verticalBoxes = boxes.vertical;\n const horizontalBoxes = boxes.horizontal;\n each(chart.boxes, (box)=>{\n if (typeof box.beforeLayout === 'function') {\n box.beforeLayout();\n }\n });\n const visibleVerticalBoxCount = verticalBoxes.reduce((total, wrap)=>wrap.box.options && wrap.box.options.display === false ? total : total + 1, 0) || 1;\n const params = Object.freeze({\n outerWidth: width,\n outerHeight: height,\n padding,\n availableWidth,\n availableHeight,\n vBoxMaxWidth: availableWidth / 2 / visibleVerticalBoxCount,\n hBoxMaxHeight: availableHeight / 2\n });\n const maxPadding = Object.assign({}, padding);\n updateMaxPadding(maxPadding, toPadding(minPadding));\n const chartArea = Object.assign({\n maxPadding,\n w: availableWidth,\n h: availableHeight,\n x: padding.left,\n y: padding.top\n }, padding);\n const stacks = setLayoutDims(verticalBoxes.concat(horizontalBoxes), params);\n fitBoxes(boxes.fullSize, chartArea, params, stacks);\n fitBoxes(verticalBoxes, chartArea, params, stacks);\n if (fitBoxes(horizontalBoxes, chartArea, params, stacks)) {\n fitBoxes(verticalBoxes, chartArea, params, stacks);\n }\n handleMaxPadding(chartArea);\n placeBoxes(boxes.leftAndTop, chartArea, params, stacks);\n chartArea.x += chartArea.w;\n chartArea.y += chartArea.h;\n placeBoxes(boxes.rightAndBottom, chartArea, params, stacks);\n chart.chartArea = {\n left: chartArea.left,\n top: chartArea.top,\n right: chartArea.left + chartArea.w,\n bottom: chartArea.top + chartArea.h,\n height: chartArea.h,\n width: chartArea.w\n };\n each(boxes.chartArea, (layout)=>{\n const box = layout.box;\n Object.assign(box, chart.chartArea);\n box.update(chartArea.w, chartArea.h, {\n left: 0,\n top: 0,\n right: 0,\n bottom: 0\n });\n });\n }\n};\n\nclass BasePlatform {\n acquireContext(canvas, aspectRatio) {}\n releaseContext(context) {\n return false;\n }\n addEventListener(chart, type, listener) {}\n removeEventListener(chart, type, listener) {}\n getDevicePixelRatio() {\n return 1;\n }\n getMaximumSize(element, width, height, aspectRatio) {\n width = Math.max(0, width || element.width);\n height = height || element.height;\n return {\n width,\n height: Math.max(0, aspectRatio ? Math.floor(width / aspectRatio) : height)\n };\n }\n isAttached(canvas) {\n return true;\n }\n updateConfig(config) {\n }\n}\n\nclass BasicPlatform extends BasePlatform {\n acquireContext(item) {\n return item && item.getContext && item.getContext('2d') || null;\n }\n updateConfig(config) {\n config.options.animation = false;\n }\n}\n\nconst EXPANDO_KEY = '$chartjs';\n const EVENT_TYPES = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup',\n pointerenter: 'mouseenter',\n pointerdown: 'mousedown',\n pointermove: 'mousemove',\n pointerup: 'mouseup',\n pointerleave: 'mouseout',\n pointerout: 'mouseout'\n};\nconst isNullOrEmpty = (value)=>value === null || value === '';\n function initCanvas(canvas, aspectRatio) {\n const style = canvas.style;\n const renderHeight = canvas.getAttribute('height');\n const renderWidth = canvas.getAttribute('width');\n canvas[EXPANDO_KEY] = {\n initial: {\n height: renderHeight,\n width: renderWidth,\n style: {\n display: style.display,\n height: style.height,\n width: style.width\n }\n }\n };\n style.display = style.display || 'block';\n style.boxSizing = style.boxSizing || 'border-box';\n if (isNullOrEmpty(renderWidth)) {\n const displayWidth = readUsedSize(canvas, 'width');\n if (displayWidth !== undefined) {\n canvas.width = displayWidth;\n }\n }\n if (isNullOrEmpty(renderHeight)) {\n if (canvas.style.height === '') {\n canvas.height = canvas.width / (aspectRatio || 2);\n } else {\n const displayHeight = readUsedSize(canvas, 'height');\n if (displayHeight !== undefined) {\n canvas.height = displayHeight;\n }\n }\n }\n return canvas;\n}\nconst eventListenerOptions = supportsEventListenerOptions ? {\n passive: true\n} : false;\nfunction addListener(node, type, listener) {\n node.addEventListener(type, listener, eventListenerOptions);\n}\nfunction removeListener(chart, type, listener) {\n chart.canvas.removeEventListener(type, listener, eventListenerOptions);\n}\nfunction fromNativeEvent(event, chart) {\n const type = EVENT_TYPES[event.type] || event.type;\n const { x , y } = getRelativePosition(event, chart);\n return {\n type,\n chart,\n native: event,\n x: x !== undefined ? x : null,\n y: y !== undefined ? y : null\n };\n}\nfunction nodeListContains(nodeList, canvas) {\n for (const node of nodeList){\n if (node === canvas || node.contains(canvas)) {\n return true;\n }\n }\n}\nfunction createAttachObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const observer = new MutationObserver((entries)=>{\n let trigger = false;\n for (const entry of entries){\n trigger = trigger || nodeListContains(entry.addedNodes, canvas);\n trigger = trigger && !nodeListContains(entry.removedNodes, canvas);\n }\n if (trigger) {\n listener();\n }\n });\n observer.observe(document, {\n childList: true,\n subtree: true\n });\n return observer;\n}\nfunction createDetachObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const observer = new MutationObserver((entries)=>{\n let trigger = false;\n for (const entry of entries){\n trigger = trigger || nodeListContains(entry.removedNodes, canvas);\n trigger = trigger && !nodeListContains(entry.addedNodes, canvas);\n }\n if (trigger) {\n listener();\n }\n });\n observer.observe(document, {\n childList: true,\n subtree: true\n });\n return observer;\n}\nconst drpListeningCharts = new Map();\nlet oldDevicePixelRatio = 0;\nfunction onWindowResize() {\n const dpr = window.devicePixelRatio;\n if (dpr === oldDevicePixelRatio) {\n return;\n }\n oldDevicePixelRatio = dpr;\n drpListeningCharts.forEach((resize, chart)=>{\n if (chart.currentDevicePixelRatio !== dpr) {\n resize();\n }\n });\n}\nfunction listenDevicePixelRatioChanges(chart, resize) {\n if (!drpListeningCharts.size) {\n window.addEventListener('resize', onWindowResize);\n }\n drpListeningCharts.set(chart, resize);\n}\nfunction unlistenDevicePixelRatioChanges(chart) {\n drpListeningCharts.delete(chart);\n if (!drpListeningCharts.size) {\n window.removeEventListener('resize', onWindowResize);\n }\n}\nfunction createResizeObserver(chart, type, listener) {\n const canvas = chart.canvas;\n const container = canvas && _getParentNode(canvas);\n if (!container) {\n return;\n }\n const resize = throttled((width, height)=>{\n const w = container.clientWidth;\n listener(width, height);\n if (w < container.clientWidth) {\n listener();\n }\n }, window);\n const observer = new ResizeObserver((entries)=>{\n const entry = entries[0];\n const width = entry.contentRect.width;\n const height = entry.contentRect.height;\n if (width === 0 && height === 0) {\n return;\n }\n resize(width, height);\n });\n observer.observe(container);\n listenDevicePixelRatioChanges(chart, resize);\n return observer;\n}\nfunction releaseObserver(chart, type, observer) {\n if (observer) {\n observer.disconnect();\n }\n if (type === 'resize') {\n unlistenDevicePixelRatioChanges(chart);\n }\n}\nfunction createProxyAndListen(chart, type, listener) {\n const canvas = chart.canvas;\n const proxy = throttled((event)=>{\n if (chart.ctx !== null) {\n listener(fromNativeEvent(event, chart));\n }\n }, chart);\n addListener(canvas, type, proxy);\n return proxy;\n}\n class DomPlatform extends BasePlatform {\n acquireContext(canvas, aspectRatio) {\n const context = canvas && canvas.getContext && canvas.getContext('2d');\n if (context && context.canvas === canvas) {\n initCanvas(canvas, aspectRatio);\n return context;\n }\n return null;\n }\n releaseContext(context) {\n const canvas = context.canvas;\n if (!canvas[EXPANDO_KEY]) {\n return false;\n }\n const initial = canvas[EXPANDO_KEY].initial;\n [\n 'height',\n 'width'\n ].forEach((prop)=>{\n const value = initial[prop];\n if (isNullOrUndef(value)) {\n canvas.removeAttribute(prop);\n } else {\n canvas.setAttribute(prop, value);\n }\n });\n const style = initial.style || {};\n Object.keys(style).forEach((key)=>{\n canvas.style[key] = style[key];\n });\n canvas.width = canvas.width;\n delete canvas[EXPANDO_KEY];\n return true;\n }\n addEventListener(chart, type, listener) {\n this.removeEventListener(chart, type);\n const proxies = chart.$proxies || (chart.$proxies = {});\n const handlers = {\n attach: createAttachObserver,\n detach: createDetachObserver,\n resize: createResizeObserver\n };\n const handler = handlers[type] || createProxyAndListen;\n proxies[type] = handler(chart, type, listener);\n }\n removeEventListener(chart, type) {\n const proxies = chart.$proxies || (chart.$proxies = {});\n const proxy = proxies[type];\n if (!proxy) {\n return;\n }\n const handlers = {\n attach: releaseObserver,\n detach: releaseObserver,\n resize: releaseObserver\n };\n const handler = handlers[type] || removeListener;\n handler(chart, type, proxy);\n proxies[type] = undefined;\n }\n getDevicePixelRatio() {\n return window.devicePixelRatio;\n }\n getMaximumSize(canvas, width, height, aspectRatio) {\n return getMaximumSize(canvas, width, height, aspectRatio);\n }\n isAttached(canvas) {\n const container = _getParentNode(canvas);\n return !!(container && container.isConnected);\n }\n}\n\nfunction _detectPlatform(canvas) {\n if (!_isDomSupported() || typeof OffscreenCanvas !== 'undefined' && canvas instanceof OffscreenCanvas) {\n return BasicPlatform;\n }\n return DomPlatform;\n}\n\nclass Element {\n static defaults = {};\n static defaultRoutes = undefined;\n x;\n y;\n active = false;\n options;\n $animations;\n tooltipPosition(useFinalPosition) {\n const { x , y } = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n return {\n x,\n y\n };\n }\n hasValue() {\n return isNumber(this.x) && isNumber(this.y);\n }\n getProps(props, final) {\n const anims = this.$animations;\n if (!final || !anims) {\n // let's not create an object, if not needed\n return this;\n }\n const ret = {};\n props.forEach((prop)=>{\n ret[prop] = anims[prop] && anims[prop].active() ? anims[prop]._to : this[prop];\n });\n return ret;\n }\n}\n\nfunction autoSkip(scale, ticks) {\n const tickOpts = scale.options.ticks;\n const determinedMaxTicks = determineMaxTicks(scale);\n const ticksLimit = Math.min(tickOpts.maxTicksLimit || determinedMaxTicks, determinedMaxTicks);\n const majorIndices = tickOpts.major.enabled ? getMajorIndices(ticks) : [];\n const numMajorIndices = majorIndices.length;\n const first = majorIndices[0];\n const last = majorIndices[numMajorIndices - 1];\n const newTicks = [];\n if (numMajorIndices > ticksLimit) {\n skipMajors(ticks, newTicks, majorIndices, numMajorIndices / ticksLimit);\n return newTicks;\n }\n const spacing = calculateSpacing(majorIndices, ticks, ticksLimit);\n if (numMajorIndices > 0) {\n let i, ilen;\n const avgMajorSpacing = numMajorIndices > 1 ? Math.round((last - first) / (numMajorIndices - 1)) : null;\n skip(ticks, newTicks, spacing, isNullOrUndef(avgMajorSpacing) ? 0 : first - avgMajorSpacing, first);\n for(i = 0, ilen = numMajorIndices - 1; i < ilen; i++){\n skip(ticks, newTicks, spacing, majorIndices[i], majorIndices[i + 1]);\n }\n skip(ticks, newTicks, spacing, last, isNullOrUndef(avgMajorSpacing) ? ticks.length : last + avgMajorSpacing);\n return newTicks;\n }\n skip(ticks, newTicks, spacing);\n return newTicks;\n}\nfunction determineMaxTicks(scale) {\n const offset = scale.options.offset;\n const tickLength = scale._tickSize();\n const maxScale = scale._length / tickLength + (offset ? 0 : 1);\n const maxChart = scale._maxLength / tickLength;\n return Math.floor(Math.min(maxScale, maxChart));\n}\n function calculateSpacing(majorIndices, ticks, ticksLimit) {\n const evenMajorSpacing = getEvenSpacing(majorIndices);\n const spacing = ticks.length / ticksLimit;\n if (!evenMajorSpacing) {\n return Math.max(spacing, 1);\n }\n const factors = _factorize(evenMajorSpacing);\n for(let i = 0, ilen = factors.length - 1; i < ilen; i++){\n const factor = factors[i];\n if (factor > spacing) {\n return factor;\n }\n }\n return Math.max(spacing, 1);\n}\n function getMajorIndices(ticks) {\n const result = [];\n let i, ilen;\n for(i = 0, ilen = ticks.length; i < ilen; i++){\n if (ticks[i].major) {\n result.push(i);\n }\n }\n return result;\n}\n function skipMajors(ticks, newTicks, majorIndices, spacing) {\n let count = 0;\n let next = majorIndices[0];\n let i;\n spacing = Math.ceil(spacing);\n for(i = 0; i < ticks.length; i++){\n if (i === next) {\n newTicks.push(ticks[i]);\n count++;\n next = majorIndices[count * spacing];\n }\n }\n}\n function skip(ticks, newTicks, spacing, majorStart, majorEnd) {\n const start = valueOrDefault(majorStart, 0);\n const end = Math.min(valueOrDefault(majorEnd, ticks.length), ticks.length);\n let count = 0;\n let length, i, next;\n spacing = Math.ceil(spacing);\n if (majorEnd) {\n length = majorEnd - majorStart;\n spacing = length / Math.floor(length / spacing);\n }\n next = start;\n while(next < 0){\n count++;\n next = Math.round(start + count * spacing);\n }\n for(i = Math.max(start, 0); i < end; i++){\n if (i === next) {\n newTicks.push(ticks[i]);\n count++;\n next = Math.round(start + count * spacing);\n }\n }\n}\n function getEvenSpacing(arr) {\n const len = arr.length;\n let i, diff;\n if (len < 2) {\n return false;\n }\n for(diff = arr[0], i = 1; i < len; ++i){\n if (arr[i] - arr[i - 1] !== diff) {\n return false;\n }\n }\n return diff;\n}\n\nconst reverseAlign = (align)=>align === 'left' ? 'right' : align === 'right' ? 'left' : align;\nconst offsetFromEdge = (scale, edge, offset)=>edge === 'top' || edge === 'left' ? scale[edge] + offset : scale[edge] - offset;\nconst getTicksLimit = (ticksLength, maxTicksLimit)=>Math.min(maxTicksLimit || ticksLength, ticksLength);\n function sample(arr, numItems) {\n const result = [];\n const increment = arr.length / numItems;\n const len = arr.length;\n let i = 0;\n for(; i < len; i += increment){\n result.push(arr[Math.floor(i)]);\n }\n return result;\n}\n function getPixelForGridLine(scale, index, offsetGridLines) {\n const length = scale.ticks.length;\n const validIndex = Math.min(index, length - 1);\n const start = scale._startPixel;\n const end = scale._endPixel;\n const epsilon = 1e-6;\n let lineValue = scale.getPixelForTick(validIndex);\n let offset;\n if (offsetGridLines) {\n if (length === 1) {\n offset = Math.max(lineValue - start, end - lineValue);\n } else if (index === 0) {\n offset = (scale.getPixelForTick(1) - lineValue) / 2;\n } else {\n offset = (lineValue - scale.getPixelForTick(validIndex - 1)) / 2;\n }\n lineValue += validIndex < index ? offset : -offset;\n if (lineValue < start - epsilon || lineValue > end + epsilon) {\n return;\n }\n }\n return lineValue;\n}\n function garbageCollect(caches, length) {\n each(caches, (cache)=>{\n const gc = cache.gc;\n const gcLen = gc.length / 2;\n let i;\n if (gcLen > length) {\n for(i = 0; i < gcLen; ++i){\n delete cache.data[gc[i]];\n }\n gc.splice(0, gcLen);\n }\n });\n}\n function getTickMarkLength(options) {\n return options.drawTicks ? options.tickLength : 0;\n}\n function getTitleHeight(options, fallback) {\n if (!options.display) {\n return 0;\n }\n const font = toFont(options.font, fallback);\n const padding = toPadding(options.padding);\n const lines = isArray(options.text) ? options.text.length : 1;\n return lines * font.lineHeight + padding.height;\n}\nfunction createScaleContext(parent, scale) {\n return createContext(parent, {\n scale,\n type: 'scale'\n });\n}\nfunction createTickContext(parent, index, tick) {\n return createContext(parent, {\n tick,\n index,\n type: 'tick'\n });\n}\nfunction titleAlign(align, position, reverse) {\n let ret = _toLeftRightCenter(align);\n if (reverse && position !== 'right' || !reverse && position === 'right') {\n ret = reverseAlign(ret);\n }\n return ret;\n}\nfunction titleArgs(scale, offset, position, align) {\n const { top , left , bottom , right , chart } = scale;\n const { chartArea , scales } = chart;\n let rotation = 0;\n let maxWidth, titleX, titleY;\n const height = bottom - top;\n const width = right - left;\n if (scale.isHorizontal()) {\n titleX = _alignStartEnd(align, left, right);\n if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n titleY = scales[positionAxisID].getPixelForValue(value) + height - offset;\n } else if (position === 'center') {\n titleY = (chartArea.bottom + chartArea.top) / 2 + height - offset;\n } else {\n titleY = offsetFromEdge(scale, position, offset);\n }\n maxWidth = right - left;\n } else {\n if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n titleX = scales[positionAxisID].getPixelForValue(value) - width + offset;\n } else if (position === 'center') {\n titleX = (chartArea.left + chartArea.right) / 2 - width + offset;\n } else {\n titleX = offsetFromEdge(scale, position, offset);\n }\n titleY = _alignStartEnd(align, bottom, top);\n rotation = position === 'left' ? -HALF_PI : HALF_PI;\n }\n return {\n titleX,\n titleY,\n maxWidth,\n rotation\n };\n}\nclass Scale extends Element {\n constructor(cfg){\n super();\n this.id = cfg.id;\n this.type = cfg.type;\n this.options = undefined;\n this.ctx = cfg.ctx;\n this.chart = cfg.chart;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.width = undefined;\n this.height = undefined;\n this._margins = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n };\n this.maxWidth = undefined;\n this.maxHeight = undefined;\n this.paddingTop = undefined;\n this.paddingBottom = undefined;\n this.paddingLeft = undefined;\n this.paddingRight = undefined;\n this.axis = undefined;\n this.labelRotation = undefined;\n this.min = undefined;\n this.max = undefined;\n this._range = undefined;\n this.ticks = [];\n this._gridLineItems = null;\n this._labelItems = null;\n this._labelSizes = null;\n this._length = 0;\n this._maxLength = 0;\n this._longestTextCache = {};\n this._startPixel = undefined;\n this._endPixel = undefined;\n this._reversePixels = false;\n this._userMax = undefined;\n this._userMin = undefined;\n this._suggestedMax = undefined;\n this._suggestedMin = undefined;\n this._ticksLength = 0;\n this._borderValue = 0;\n this._cache = {};\n this._dataLimitsCached = false;\n this.$context = undefined;\n }\n init(options) {\n this.options = options.setContext(this.getContext());\n this.axis = options.axis;\n this._userMin = this.parse(options.min);\n this._userMax = this.parse(options.max);\n this._suggestedMin = this.parse(options.suggestedMin);\n this._suggestedMax = this.parse(options.suggestedMax);\n }\n parse(raw, index) {\n return raw;\n }\n getUserBounds() {\n let { _userMin , _userMax , _suggestedMin , _suggestedMax } = this;\n _userMin = finiteOrDefault(_userMin, Number.POSITIVE_INFINITY);\n _userMax = finiteOrDefault(_userMax, Number.NEGATIVE_INFINITY);\n _suggestedMin = finiteOrDefault(_suggestedMin, Number.POSITIVE_INFINITY);\n _suggestedMax = finiteOrDefault(_suggestedMax, Number.NEGATIVE_INFINITY);\n return {\n min: finiteOrDefault(_userMin, _suggestedMin),\n max: finiteOrDefault(_userMax, _suggestedMax),\n minDefined: isNumberFinite(_userMin),\n maxDefined: isNumberFinite(_userMax)\n };\n }\n getMinMax(canStack) {\n let { min , max , minDefined , maxDefined } = this.getUserBounds();\n let range;\n if (minDefined && maxDefined) {\n return {\n min,\n max\n };\n }\n const metas = this.getMatchingVisibleMetas();\n for(let i = 0, ilen = metas.length; i < ilen; ++i){\n range = metas[i].controller.getMinMax(this, canStack);\n if (!minDefined) {\n min = Math.min(min, range.min);\n }\n if (!maxDefined) {\n max = Math.max(max, range.max);\n }\n }\n min = maxDefined && min > max ? max : min;\n max = minDefined && min > max ? min : max;\n return {\n min: finiteOrDefault(min, finiteOrDefault(max, min)),\n max: finiteOrDefault(max, finiteOrDefault(min, max))\n };\n }\n getPadding() {\n return {\n left: this.paddingLeft || 0,\n top: this.paddingTop || 0,\n right: this.paddingRight || 0,\n bottom: this.paddingBottom || 0\n };\n }\n getTicks() {\n return this.ticks;\n }\n getLabels() {\n const data = this.chart.data;\n return this.options.labels || (this.isHorizontal() ? data.xLabels : data.yLabels) || data.labels || [];\n }\n getLabelItems(chartArea = this.chart.chartArea) {\n const items = this._labelItems || (this._labelItems = this._computeLabelItems(chartArea));\n return items;\n }\n beforeLayout() {\n this._cache = {};\n this._dataLimitsCached = false;\n }\n beforeUpdate() {\n callback(this.options.beforeUpdate, [\n this\n ]);\n }\n update(maxWidth, maxHeight, margins) {\n const { beginAtZero , grace , ticks: tickOpts } = this.options;\n const sampleSize = tickOpts.sampleSize;\n this.beforeUpdate();\n this.maxWidth = maxWidth;\n this.maxHeight = maxHeight;\n this._margins = margins = Object.assign({\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n }, margins);\n this.ticks = null;\n this._labelSizes = null;\n this._gridLineItems = null;\n this._labelItems = null;\n this.beforeSetDimensions();\n this.setDimensions();\n this.afterSetDimensions();\n this._maxLength = this.isHorizontal() ? this.width + margins.left + margins.right : this.height + margins.top + margins.bottom;\n if (!this._dataLimitsCached) {\n this.beforeDataLimits();\n this.determineDataLimits();\n this.afterDataLimits();\n this._range = _addGrace(this, grace, beginAtZero);\n this._dataLimitsCached = true;\n }\n this.beforeBuildTicks();\n this.ticks = this.buildTicks() || [];\n this.afterBuildTicks();\n const samplingEnabled = sampleSize < this.ticks.length;\n this._convertTicksToLabels(samplingEnabled ? sample(this.ticks, sampleSize) : this.ticks);\n this.configure();\n this.beforeCalculateLabelRotation();\n this.calculateLabelRotation();\n this.afterCalculateLabelRotation();\n if (tickOpts.display && (tickOpts.autoSkip || tickOpts.source === 'auto')) {\n this.ticks = autoSkip(this, this.ticks);\n this._labelSizes = null;\n this.afterAutoSkip();\n }\n if (samplingEnabled) {\n this._convertTicksToLabels(this.ticks);\n }\n this.beforeFit();\n this.fit();\n this.afterFit();\n this.afterUpdate();\n }\n configure() {\n let reversePixels = this.options.reverse;\n let startPixel, endPixel;\n if (this.isHorizontal()) {\n startPixel = this.left;\n endPixel = this.right;\n } else {\n startPixel = this.top;\n endPixel = this.bottom;\n reversePixels = !reversePixels;\n }\n this._startPixel = startPixel;\n this._endPixel = endPixel;\n this._reversePixels = reversePixels;\n this._length = endPixel - startPixel;\n this._alignToPixels = this.options.alignToPixels;\n }\n afterUpdate() {\n callback(this.options.afterUpdate, [\n this\n ]);\n }\n beforeSetDimensions() {\n callback(this.options.beforeSetDimensions, [\n this\n ]);\n }\n setDimensions() {\n if (this.isHorizontal()) {\n this.width = this.maxWidth;\n this.left = 0;\n this.right = this.width;\n } else {\n this.height = this.maxHeight;\n this.top = 0;\n this.bottom = this.height;\n }\n this.paddingLeft = 0;\n this.paddingTop = 0;\n this.paddingRight = 0;\n this.paddingBottom = 0;\n }\n afterSetDimensions() {\n callback(this.options.afterSetDimensions, [\n this\n ]);\n }\n _callHooks(name) {\n this.chart.notifyPlugins(name, this.getContext());\n callback(this.options[name], [\n this\n ]);\n }\n beforeDataLimits() {\n this._callHooks('beforeDataLimits');\n }\n determineDataLimits() {}\n afterDataLimits() {\n this._callHooks('afterDataLimits');\n }\n beforeBuildTicks() {\n this._callHooks('beforeBuildTicks');\n }\n buildTicks() {\n return [];\n }\n afterBuildTicks() {\n this._callHooks('afterBuildTicks');\n }\n beforeTickToLabelConversion() {\n callback(this.options.beforeTickToLabelConversion, [\n this\n ]);\n }\n generateTickLabels(ticks) {\n const tickOpts = this.options.ticks;\n let i, ilen, tick;\n for(i = 0, ilen = ticks.length; i < ilen; i++){\n tick = ticks[i];\n tick.label = callback(tickOpts.callback, [\n tick.value,\n i,\n ticks\n ], this);\n }\n }\n afterTickToLabelConversion() {\n callback(this.options.afterTickToLabelConversion, [\n this\n ]);\n }\n beforeCalculateLabelRotation() {\n callback(this.options.beforeCalculateLabelRotation, [\n this\n ]);\n }\n calculateLabelRotation() {\n const options = this.options;\n const tickOpts = options.ticks;\n const numTicks = getTicksLimit(this.ticks.length, options.ticks.maxTicksLimit);\n const minRotation = tickOpts.minRotation || 0;\n const maxRotation = tickOpts.maxRotation;\n let labelRotation = minRotation;\n let tickWidth, maxHeight, maxLabelDiagonal;\n if (!this._isVisible() || !tickOpts.display || minRotation >= maxRotation || numTicks <= 1 || !this.isHorizontal()) {\n this.labelRotation = minRotation;\n return;\n }\n const labelSizes = this._getLabelSizes();\n const maxLabelWidth = labelSizes.widest.width;\n const maxLabelHeight = labelSizes.highest.height;\n const maxWidth = _limitValue(this.chart.width - maxLabelWidth, 0, this.maxWidth);\n tickWidth = options.offset ? this.maxWidth / numTicks : maxWidth / (numTicks - 1);\n if (maxLabelWidth + 6 > tickWidth) {\n tickWidth = maxWidth / (numTicks - (options.offset ? 0.5 : 1));\n maxHeight = this.maxHeight - getTickMarkLength(options.grid) - tickOpts.padding - getTitleHeight(options.title, this.chart.options.font);\n maxLabelDiagonal = Math.sqrt(maxLabelWidth * maxLabelWidth + maxLabelHeight * maxLabelHeight);\n labelRotation = toDegrees(Math.min(Math.asin(_limitValue((labelSizes.highest.height + 6) / tickWidth, -1, 1)), Math.asin(_limitValue(maxHeight / maxLabelDiagonal, -1, 1)) - Math.asin(_limitValue(maxLabelHeight / maxLabelDiagonal, -1, 1))));\n labelRotation = Math.max(minRotation, Math.min(maxRotation, labelRotation));\n }\n this.labelRotation = labelRotation;\n }\n afterCalculateLabelRotation() {\n callback(this.options.afterCalculateLabelRotation, [\n this\n ]);\n }\n afterAutoSkip() {}\n beforeFit() {\n callback(this.options.beforeFit, [\n this\n ]);\n }\n fit() {\n const minSize = {\n width: 0,\n height: 0\n };\n const { chart , options: { ticks: tickOpts , title: titleOpts , grid: gridOpts } } = this;\n const display = this._isVisible();\n const isHorizontal = this.isHorizontal();\n if (display) {\n const titleHeight = getTitleHeight(titleOpts, chart.options.font);\n if (isHorizontal) {\n minSize.width = this.maxWidth;\n minSize.height = getTickMarkLength(gridOpts) + titleHeight;\n } else {\n minSize.height = this.maxHeight;\n minSize.width = getTickMarkLength(gridOpts) + titleHeight;\n }\n if (tickOpts.display && this.ticks.length) {\n const { first , last , widest , highest } = this._getLabelSizes();\n const tickPadding = tickOpts.padding * 2;\n const angleRadians = toRadians(this.labelRotation);\n const cos = Math.cos(angleRadians);\n const sin = Math.sin(angleRadians);\n if (isHorizontal) {\n const labelHeight = tickOpts.mirror ? 0 : sin * widest.width + cos * highest.height;\n minSize.height = Math.min(this.maxHeight, minSize.height + labelHeight + tickPadding);\n } else {\n const labelWidth = tickOpts.mirror ? 0 : cos * widest.width + sin * highest.height;\n minSize.width = Math.min(this.maxWidth, minSize.width + labelWidth + tickPadding);\n }\n this._calculatePadding(first, last, sin, cos);\n }\n }\n this._handleMargins();\n if (isHorizontal) {\n this.width = this._length = chart.width - this._margins.left - this._margins.right;\n this.height = minSize.height;\n } else {\n this.width = minSize.width;\n this.height = this._length = chart.height - this._margins.top - this._margins.bottom;\n }\n }\n _calculatePadding(first, last, sin, cos) {\n const { ticks: { align , padding } , position } = this.options;\n const isRotated = this.labelRotation !== 0;\n const labelsBelowTicks = position !== 'top' && this.axis === 'x';\n if (this.isHorizontal()) {\n const offsetLeft = this.getPixelForTick(0) - this.left;\n const offsetRight = this.right - this.getPixelForTick(this.ticks.length - 1);\n let paddingLeft = 0;\n let paddingRight = 0;\n if (isRotated) {\n if (labelsBelowTicks) {\n paddingLeft = cos * first.width;\n paddingRight = sin * last.height;\n } else {\n paddingLeft = sin * first.height;\n paddingRight = cos * last.width;\n }\n } else if (align === 'start') {\n paddingRight = last.width;\n } else if (align === 'end') {\n paddingLeft = first.width;\n } else if (align !== 'inner') {\n paddingLeft = first.width / 2;\n paddingRight = last.width / 2;\n }\n this.paddingLeft = Math.max((paddingLeft - offsetLeft + padding) * this.width / (this.width - offsetLeft), 0);\n this.paddingRight = Math.max((paddingRight - offsetRight + padding) * this.width / (this.width - offsetRight), 0);\n } else {\n let paddingTop = last.height / 2;\n let paddingBottom = first.height / 2;\n if (align === 'start') {\n paddingTop = 0;\n paddingBottom = first.height;\n } else if (align === 'end') {\n paddingTop = last.height;\n paddingBottom = 0;\n }\n this.paddingTop = paddingTop + padding;\n this.paddingBottom = paddingBottom + padding;\n }\n }\n _handleMargins() {\n if (this._margins) {\n this._margins.left = Math.max(this.paddingLeft, this._margins.left);\n this._margins.top = Math.max(this.paddingTop, this._margins.top);\n this._margins.right = Math.max(this.paddingRight, this._margins.right);\n this._margins.bottom = Math.max(this.paddingBottom, this._margins.bottom);\n }\n }\n afterFit() {\n callback(this.options.afterFit, [\n this\n ]);\n }\n isHorizontal() {\n const { axis , position } = this.options;\n return position === 'top' || position === 'bottom' || axis === 'x';\n }\n isFullSize() {\n return this.options.fullSize;\n }\n _convertTicksToLabels(ticks) {\n this.beforeTickToLabelConversion();\n this.generateTickLabels(ticks);\n let i, ilen;\n for(i = 0, ilen = ticks.length; i < ilen; i++){\n if (isNullOrUndef(ticks[i].label)) {\n ticks.splice(i, 1);\n ilen--;\n i--;\n }\n }\n this.afterTickToLabelConversion();\n }\n _getLabelSizes() {\n let labelSizes = this._labelSizes;\n if (!labelSizes) {\n const sampleSize = this.options.ticks.sampleSize;\n let ticks = this.ticks;\n if (sampleSize < ticks.length) {\n ticks = sample(ticks, sampleSize);\n }\n this._labelSizes = labelSizes = this._computeLabelSizes(ticks, ticks.length, this.options.ticks.maxTicksLimit);\n }\n return labelSizes;\n }\n _computeLabelSizes(ticks, length, maxTicksLimit) {\n const { ctx , _longestTextCache: caches } = this;\n const widths = [];\n const heights = [];\n const increment = Math.floor(length / getTicksLimit(length, maxTicksLimit));\n let widestLabelSize = 0;\n let highestLabelSize = 0;\n let i, j, jlen, label, tickFont, fontString, cache, lineHeight, width, height, nestedLabel;\n for(i = 0; i < length; i += increment){\n label = ticks[i].label;\n tickFont = this._resolveTickFontOptions(i);\n ctx.font = fontString = tickFont.string;\n cache = caches[fontString] = caches[fontString] || {\n data: {},\n gc: []\n };\n lineHeight = tickFont.lineHeight;\n width = height = 0;\n if (!isNullOrUndef(label) && !isArray(label)) {\n width = _measureText(ctx, cache.data, cache.gc, width, label);\n height = lineHeight;\n } else if (isArray(label)) {\n for(j = 0, jlen = label.length; j < jlen; ++j){\n nestedLabel = label[j];\n if (!isNullOrUndef(nestedLabel) && !isArray(nestedLabel)) {\n width = _measureText(ctx, cache.data, cache.gc, width, nestedLabel);\n height += lineHeight;\n }\n }\n }\n widths.push(width);\n heights.push(height);\n widestLabelSize = Math.max(width, widestLabelSize);\n highestLabelSize = Math.max(height, highestLabelSize);\n }\n garbageCollect(caches, length);\n const widest = widths.indexOf(widestLabelSize);\n const highest = heights.indexOf(highestLabelSize);\n const valueAt = (idx)=>({\n width: widths[idx] || 0,\n height: heights[idx] || 0\n });\n return {\n first: valueAt(0),\n last: valueAt(length - 1),\n widest: valueAt(widest),\n highest: valueAt(highest),\n widths,\n heights\n };\n }\n getLabelForValue(value) {\n return value;\n }\n getPixelForValue(value, index) {\n return NaN;\n }\n getValueForPixel(pixel) {}\n getPixelForTick(index) {\n const ticks = this.ticks;\n if (index < 0 || index > ticks.length - 1) {\n return null;\n }\n return this.getPixelForValue(ticks[index].value);\n }\n getPixelForDecimal(decimal) {\n if (this._reversePixels) {\n decimal = 1 - decimal;\n }\n const pixel = this._startPixel + decimal * this._length;\n return _int16Range(this._alignToPixels ? _alignPixel(this.chart, pixel, 0) : pixel);\n }\n getDecimalForPixel(pixel) {\n const decimal = (pixel - this._startPixel) / this._length;\n return this._reversePixels ? 1 - decimal : decimal;\n }\n getBasePixel() {\n return this.getPixelForValue(this.getBaseValue());\n }\n getBaseValue() {\n const { min , max } = this;\n return min < 0 && max < 0 ? max : min > 0 && max > 0 ? min : 0;\n }\n getContext(index) {\n const ticks = this.ticks || [];\n if (index >= 0 && index < ticks.length) {\n const tick = ticks[index];\n return tick.$context || (tick.$context = createTickContext(this.getContext(), index, tick));\n }\n return this.$context || (this.$context = createScaleContext(this.chart.getContext(), this));\n }\n _tickSize() {\n const optionTicks = this.options.ticks;\n const rot = toRadians(this.labelRotation);\n const cos = Math.abs(Math.cos(rot));\n const sin = Math.abs(Math.sin(rot));\n const labelSizes = this._getLabelSizes();\n const padding = optionTicks.autoSkipPadding || 0;\n const w = labelSizes ? labelSizes.widest.width + padding : 0;\n const h = labelSizes ? labelSizes.highest.height + padding : 0;\n return this.isHorizontal() ? h * cos > w * sin ? w / cos : h / sin : h * sin < w * cos ? h / cos : w / sin;\n }\n _isVisible() {\n const display = this.options.display;\n if (display !== 'auto') {\n return !!display;\n }\n return this.getMatchingVisibleMetas().length > 0;\n }\n _computeGridLineItems(chartArea) {\n const axis = this.axis;\n const chart = this.chart;\n const options = this.options;\n const { grid , position , border } = options;\n const offset = grid.offset;\n const isHorizontal = this.isHorizontal();\n const ticks = this.ticks;\n const ticksLength = ticks.length + (offset ? 1 : 0);\n const tl = getTickMarkLength(grid);\n const items = [];\n const borderOpts = border.setContext(this.getContext());\n const axisWidth = borderOpts.display ? borderOpts.width : 0;\n const axisHalfWidth = axisWidth / 2;\n const alignBorderValue = function(pixel) {\n return _alignPixel(chart, pixel, axisWidth);\n };\n let borderValue, i, lineValue, alignedLineValue;\n let tx1, ty1, tx2, ty2, x1, y1, x2, y2;\n if (position === 'top') {\n borderValue = alignBorderValue(this.bottom);\n ty1 = this.bottom - tl;\n ty2 = borderValue - axisHalfWidth;\n y1 = alignBorderValue(chartArea.top) + axisHalfWidth;\n y2 = chartArea.bottom;\n } else if (position === 'bottom') {\n borderValue = alignBorderValue(this.top);\n y1 = chartArea.top;\n y2 = alignBorderValue(chartArea.bottom) - axisHalfWidth;\n ty1 = borderValue + axisHalfWidth;\n ty2 = this.top + tl;\n } else if (position === 'left') {\n borderValue = alignBorderValue(this.right);\n tx1 = this.right - tl;\n tx2 = borderValue - axisHalfWidth;\n x1 = alignBorderValue(chartArea.left) + axisHalfWidth;\n x2 = chartArea.right;\n } else if (position === 'right') {\n borderValue = alignBorderValue(this.left);\n x1 = chartArea.left;\n x2 = alignBorderValue(chartArea.right) - axisHalfWidth;\n tx1 = borderValue + axisHalfWidth;\n tx2 = this.left + tl;\n } else if (axis === 'x') {\n if (position === 'center') {\n borderValue = alignBorderValue((chartArea.top + chartArea.bottom) / 2 + 0.5);\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n }\n y1 = chartArea.top;\n y2 = chartArea.bottom;\n ty1 = borderValue + axisHalfWidth;\n ty2 = ty1 + tl;\n } else if (axis === 'y') {\n if (position === 'center') {\n borderValue = alignBorderValue((chartArea.left + chartArea.right) / 2);\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n borderValue = alignBorderValue(this.chart.scales[positionAxisID].getPixelForValue(value));\n }\n tx1 = borderValue - axisHalfWidth;\n tx2 = tx1 - tl;\n x1 = chartArea.left;\n x2 = chartArea.right;\n }\n const limit = valueOrDefault(options.ticks.maxTicksLimit, ticksLength);\n const step = Math.max(1, Math.ceil(ticksLength / limit));\n for(i = 0; i < ticksLength; i += step){\n const context = this.getContext(i);\n const optsAtIndex = grid.setContext(context);\n const optsAtIndexBorder = border.setContext(context);\n const lineWidth = optsAtIndex.lineWidth;\n const lineColor = optsAtIndex.color;\n const borderDash = optsAtIndexBorder.dash || [];\n const borderDashOffset = optsAtIndexBorder.dashOffset;\n const tickWidth = optsAtIndex.tickWidth;\n const tickColor = optsAtIndex.tickColor;\n const tickBorderDash = optsAtIndex.tickBorderDash || [];\n const tickBorderDashOffset = optsAtIndex.tickBorderDashOffset;\n lineValue = getPixelForGridLine(this, i, offset);\n if (lineValue === undefined) {\n continue;\n }\n alignedLineValue = _alignPixel(chart, lineValue, lineWidth);\n if (isHorizontal) {\n tx1 = tx2 = x1 = x2 = alignedLineValue;\n } else {\n ty1 = ty2 = y1 = y2 = alignedLineValue;\n }\n items.push({\n tx1,\n ty1,\n tx2,\n ty2,\n x1,\n y1,\n x2,\n y2,\n width: lineWidth,\n color: lineColor,\n borderDash,\n borderDashOffset,\n tickWidth,\n tickColor,\n tickBorderDash,\n tickBorderDashOffset\n });\n }\n this._ticksLength = ticksLength;\n this._borderValue = borderValue;\n return items;\n }\n _computeLabelItems(chartArea) {\n const axis = this.axis;\n const options = this.options;\n const { position , ticks: optionTicks } = options;\n const isHorizontal = this.isHorizontal();\n const ticks = this.ticks;\n const { align , crossAlign , padding , mirror } = optionTicks;\n const tl = getTickMarkLength(options.grid);\n const tickAndPadding = tl + padding;\n const hTickAndPadding = mirror ? -padding : tickAndPadding;\n const rotation = -toRadians(this.labelRotation);\n const items = [];\n let i, ilen, tick, label, x, y, textAlign, pixel, font, lineHeight, lineCount, textOffset;\n let textBaseline = 'middle';\n if (position === 'top') {\n y = this.bottom - hTickAndPadding;\n textAlign = this._getXAxisLabelAlignment();\n } else if (position === 'bottom') {\n y = this.top + hTickAndPadding;\n textAlign = this._getXAxisLabelAlignment();\n } else if (position === 'left') {\n const ret = this._getYAxisLabelAlignment(tl);\n textAlign = ret.textAlign;\n x = ret.x;\n } else if (position === 'right') {\n const ret = this._getYAxisLabelAlignment(tl);\n textAlign = ret.textAlign;\n x = ret.x;\n } else if (axis === 'x') {\n if (position === 'center') {\n y = (chartArea.top + chartArea.bottom) / 2 + tickAndPadding;\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n y = this.chart.scales[positionAxisID].getPixelForValue(value) + tickAndPadding;\n }\n textAlign = this._getXAxisLabelAlignment();\n } else if (axis === 'y') {\n if (position === 'center') {\n x = (chartArea.left + chartArea.right) / 2 - tickAndPadding;\n } else if (isObject(position)) {\n const positionAxisID = Object.keys(position)[0];\n const value = position[positionAxisID];\n x = this.chart.scales[positionAxisID].getPixelForValue(value);\n }\n textAlign = this._getYAxisLabelAlignment(tl).textAlign;\n }\n if (axis === 'y') {\n if (align === 'start') {\n textBaseline = 'top';\n } else if (align === 'end') {\n textBaseline = 'bottom';\n }\n }\n const labelSizes = this._getLabelSizes();\n for(i = 0, ilen = ticks.length; i < ilen; ++i){\n tick = ticks[i];\n label = tick.label;\n const optsAtIndex = optionTicks.setContext(this.getContext(i));\n pixel = this.getPixelForTick(i) + optionTicks.labelOffset;\n font = this._resolveTickFontOptions(i);\n lineHeight = font.lineHeight;\n lineCount = isArray(label) ? label.length : 1;\n const halfCount = lineCount / 2;\n const color = optsAtIndex.color;\n const strokeColor = optsAtIndex.textStrokeColor;\n const strokeWidth = optsAtIndex.textStrokeWidth;\n let tickTextAlign = textAlign;\n if (isHorizontal) {\n x = pixel;\n if (textAlign === 'inner') {\n if (i === ilen - 1) {\n tickTextAlign = !this.options.reverse ? 'right' : 'left';\n } else if (i === 0) {\n tickTextAlign = !this.options.reverse ? 'left' : 'right';\n } else {\n tickTextAlign = 'center';\n }\n }\n if (position === 'top') {\n if (crossAlign === 'near' || rotation !== 0) {\n textOffset = -lineCount * lineHeight + lineHeight / 2;\n } else if (crossAlign === 'center') {\n textOffset = -labelSizes.highest.height / 2 - halfCount * lineHeight + lineHeight;\n } else {\n textOffset = -labelSizes.highest.height + lineHeight / 2;\n }\n } else {\n if (crossAlign === 'near' || rotation !== 0) {\n textOffset = lineHeight / 2;\n } else if (crossAlign === 'center') {\n textOffset = labelSizes.highest.height / 2 - halfCount * lineHeight;\n } else {\n textOffset = labelSizes.highest.height - lineCount * lineHeight;\n }\n }\n if (mirror) {\n textOffset *= -1;\n }\n if (rotation !== 0 && !optsAtIndex.showLabelBackdrop) {\n x += lineHeight / 2 * Math.sin(rotation);\n }\n } else {\n y = pixel;\n textOffset = (1 - lineCount) * lineHeight / 2;\n }\n let backdrop;\n if (optsAtIndex.showLabelBackdrop) {\n const labelPadding = toPadding(optsAtIndex.backdropPadding);\n const height = labelSizes.heights[i];\n const width = labelSizes.widths[i];\n let top = textOffset - labelPadding.top;\n let left = 0 - labelPadding.left;\n switch(textBaseline){\n case 'middle':\n top -= height / 2;\n break;\n case 'bottom':\n top -= height;\n break;\n }\n switch(textAlign){\n case 'center':\n left -= width / 2;\n break;\n case 'right':\n left -= width;\n break;\n }\n backdrop = {\n left,\n top,\n width: width + labelPadding.width,\n height: height + labelPadding.height,\n color: optsAtIndex.backdropColor\n };\n }\n items.push({\n label,\n font,\n textOffset,\n options: {\n rotation,\n color,\n strokeColor,\n strokeWidth,\n textAlign: tickTextAlign,\n textBaseline,\n translation: [\n x,\n y\n ],\n backdrop\n }\n });\n }\n return items;\n }\n _getXAxisLabelAlignment() {\n const { position , ticks } = this.options;\n const rotation = -toRadians(this.labelRotation);\n if (rotation) {\n return position === 'top' ? 'left' : 'right';\n }\n let align = 'center';\n if (ticks.align === 'start') {\n align = 'left';\n } else if (ticks.align === 'end') {\n align = 'right';\n } else if (ticks.align === 'inner') {\n align = 'inner';\n }\n return align;\n }\n _getYAxisLabelAlignment(tl) {\n const { position , ticks: { crossAlign , mirror , padding } } = this.options;\n const labelSizes = this._getLabelSizes();\n const tickAndPadding = tl + padding;\n const widest = labelSizes.widest.width;\n let textAlign;\n let x;\n if (position === 'left') {\n if (mirror) {\n x = this.right + padding;\n if (crossAlign === 'near') {\n textAlign = 'left';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x += widest / 2;\n } else {\n textAlign = 'right';\n x += widest;\n }\n } else {\n x = this.right - tickAndPadding;\n if (crossAlign === 'near') {\n textAlign = 'right';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x -= widest / 2;\n } else {\n textAlign = 'left';\n x = this.left;\n }\n }\n } else if (position === 'right') {\n if (mirror) {\n x = this.left + padding;\n if (crossAlign === 'near') {\n textAlign = 'right';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x -= widest / 2;\n } else {\n textAlign = 'left';\n x -= widest;\n }\n } else {\n x = this.left + tickAndPadding;\n if (crossAlign === 'near') {\n textAlign = 'left';\n } else if (crossAlign === 'center') {\n textAlign = 'center';\n x += widest / 2;\n } else {\n textAlign = 'right';\n x = this.right;\n }\n }\n } else {\n textAlign = 'right';\n }\n return {\n textAlign,\n x\n };\n }\n _computeLabelArea() {\n if (this.options.ticks.mirror) {\n return;\n }\n const chart = this.chart;\n const position = this.options.position;\n if (position === 'left' || position === 'right') {\n return {\n top: 0,\n left: this.left,\n bottom: chart.height,\n right: this.right\n };\n }\n if (position === 'top' || position === 'bottom') {\n return {\n top: this.top,\n left: 0,\n bottom: this.bottom,\n right: chart.width\n };\n }\n }\n drawBackground() {\n const { ctx , options: { backgroundColor } , left , top , width , height } = this;\n if (backgroundColor) {\n ctx.save();\n ctx.fillStyle = backgroundColor;\n ctx.fillRect(left, top, width, height);\n ctx.restore();\n }\n }\n getLineWidthForValue(value) {\n const grid = this.options.grid;\n if (!this._isVisible() || !grid.display) {\n return 0;\n }\n const ticks = this.ticks;\n const index = ticks.findIndex((t)=>t.value === value);\n if (index >= 0) {\n const opts = grid.setContext(this.getContext(index));\n return opts.lineWidth;\n }\n return 0;\n }\n drawGrid(chartArea) {\n const grid = this.options.grid;\n const ctx = this.ctx;\n const items = this._gridLineItems || (this._gridLineItems = this._computeGridLineItems(chartArea));\n let i, ilen;\n const drawLine = (p1, p2, style)=>{\n if (!style.width || !style.color) {\n return;\n }\n ctx.save();\n ctx.lineWidth = style.width;\n ctx.strokeStyle = style.color;\n ctx.setLineDash(style.borderDash || []);\n ctx.lineDashOffset = style.borderDashOffset;\n ctx.beginPath();\n ctx.moveTo(p1.x, p1.y);\n ctx.lineTo(p2.x, p2.y);\n ctx.stroke();\n ctx.restore();\n };\n if (grid.display) {\n for(i = 0, ilen = items.length; i < ilen; ++i){\n const item = items[i];\n if (grid.drawOnChartArea) {\n drawLine({\n x: item.x1,\n y: item.y1\n }, {\n x: item.x2,\n y: item.y2\n }, item);\n }\n if (grid.drawTicks) {\n drawLine({\n x: item.tx1,\n y: item.ty1\n }, {\n x: item.tx2,\n y: item.ty2\n }, {\n color: item.tickColor,\n width: item.tickWidth,\n borderDash: item.tickBorderDash,\n borderDashOffset: item.tickBorderDashOffset\n });\n }\n }\n }\n }\n drawBorder() {\n const { chart , ctx , options: { border , grid } } = this;\n const borderOpts = border.setContext(this.getContext());\n const axisWidth = border.display ? borderOpts.width : 0;\n if (!axisWidth) {\n return;\n }\n const lastLineWidth = grid.setContext(this.getContext(0)).lineWidth;\n const borderValue = this._borderValue;\n let x1, x2, y1, y2;\n if (this.isHorizontal()) {\n x1 = _alignPixel(chart, this.left, axisWidth) - axisWidth / 2;\n x2 = _alignPixel(chart, this.right, lastLineWidth) + lastLineWidth / 2;\n y1 = y2 = borderValue;\n } else {\n y1 = _alignPixel(chart, this.top, axisWidth) - axisWidth / 2;\n y2 = _alignPixel(chart, this.bottom, lastLineWidth) + lastLineWidth / 2;\n x1 = x2 = borderValue;\n }\n ctx.save();\n ctx.lineWidth = borderOpts.width;\n ctx.strokeStyle = borderOpts.color;\n ctx.beginPath();\n ctx.moveTo(x1, y1);\n ctx.lineTo(x2, y2);\n ctx.stroke();\n ctx.restore();\n }\n drawLabels(chartArea) {\n const optionTicks = this.options.ticks;\n if (!optionTicks.display) {\n return;\n }\n const ctx = this.ctx;\n const area = this._computeLabelArea();\n if (area) {\n clipArea(ctx, area);\n }\n const items = this.getLabelItems(chartArea);\n for (const item of items){\n const renderTextOptions = item.options;\n const tickFont = item.font;\n const label = item.label;\n const y = item.textOffset;\n renderText(ctx, label, 0, y, tickFont, renderTextOptions);\n }\n if (area) {\n unclipArea(ctx);\n }\n }\n drawTitle() {\n const { ctx , options: { position , title , reverse } } = this;\n if (!title.display) {\n return;\n }\n const font = toFont(title.font);\n const padding = toPadding(title.padding);\n const align = title.align;\n let offset = font.lineHeight / 2;\n if (position === 'bottom' || position === 'center' || isObject(position)) {\n offset += padding.bottom;\n if (isArray(title.text)) {\n offset += font.lineHeight * (title.text.length - 1);\n }\n } else {\n offset += padding.top;\n }\n const { titleX , titleY , maxWidth , rotation } = titleArgs(this, offset, position, align);\n renderText(ctx, title.text, 0, 0, font, {\n color: title.color,\n maxWidth,\n rotation,\n textAlign: titleAlign(align, position, reverse),\n textBaseline: 'middle',\n translation: [\n titleX,\n titleY\n ]\n });\n }\n draw(chartArea) {\n if (!this._isVisible()) {\n return;\n }\n this.drawBackground();\n this.drawGrid(chartArea);\n this.drawBorder();\n this.drawTitle();\n this.drawLabels(chartArea);\n }\n _layers() {\n const opts = this.options;\n const tz = opts.ticks && opts.ticks.z || 0;\n const gz = valueOrDefault(opts.grid && opts.grid.z, -1);\n const bz = valueOrDefault(opts.border && opts.border.z, 0);\n if (!this._isVisible() || this.draw !== Scale.prototype.draw) {\n return [\n {\n z: tz,\n draw: (chartArea)=>{\n this.draw(chartArea);\n }\n }\n ];\n }\n return [\n {\n z: gz,\n draw: (chartArea)=>{\n this.drawBackground();\n this.drawGrid(chartArea);\n this.drawTitle();\n }\n },\n {\n z: bz,\n draw: ()=>{\n this.drawBorder();\n }\n },\n {\n z: tz,\n draw: (chartArea)=>{\n this.drawLabels(chartArea);\n }\n }\n ];\n }\n getMatchingVisibleMetas(type) {\n const metas = this.chart.getSortedVisibleDatasetMetas();\n const axisID = this.axis + 'AxisID';\n const result = [];\n let i, ilen;\n for(i = 0, ilen = metas.length; i < ilen; ++i){\n const meta = metas[i];\n if (meta[axisID] === this.id && (!type || meta.type === type)) {\n result.push(meta);\n }\n }\n return result;\n }\n _resolveTickFontOptions(index) {\n const opts = this.options.ticks.setContext(this.getContext(index));\n return toFont(opts.font);\n }\n _maxDigits() {\n const fontSize = this._resolveTickFontOptions(0).lineHeight;\n return (this.isHorizontal() ? this.width : this.height) / fontSize;\n }\n}\n\nclass TypedRegistry {\n constructor(type, scope, override){\n this.type = type;\n this.scope = scope;\n this.override = override;\n this.items = Object.create(null);\n }\n isForType(type) {\n return Object.prototype.isPrototypeOf.call(this.type.prototype, type.prototype);\n }\n register(item) {\n const proto = Object.getPrototypeOf(item);\n let parentScope;\n if (isIChartComponent(proto)) {\n parentScope = this.register(proto);\n }\n const items = this.items;\n const id = item.id;\n const scope = this.scope + '.' + id;\n if (!id) {\n throw new Error('class does not have id: ' + item);\n }\n if (id in items) {\n return scope;\n }\n items[id] = item;\n registerDefaults(item, scope, parentScope);\n if (this.override) {\n defaults.override(item.id, item.overrides);\n }\n return scope;\n }\n get(id) {\n return this.items[id];\n }\n unregister(item) {\n const items = this.items;\n const id = item.id;\n const scope = this.scope;\n if (id in items) {\n delete items[id];\n }\n if (scope && id in defaults[scope]) {\n delete defaults[scope][id];\n if (this.override) {\n delete overrides[id];\n }\n }\n }\n}\nfunction registerDefaults(item, scope, parentScope) {\n const itemDefaults = merge(Object.create(null), [\n parentScope ? defaults.get(parentScope) : {},\n defaults.get(scope),\n item.defaults\n ]);\n defaults.set(scope, itemDefaults);\n if (item.defaultRoutes) {\n routeDefaults(scope, item.defaultRoutes);\n }\n if (item.descriptors) {\n defaults.describe(scope, item.descriptors);\n }\n}\nfunction routeDefaults(scope, routes) {\n Object.keys(routes).forEach((property)=>{\n const propertyParts = property.split('.');\n const sourceName = propertyParts.pop();\n const sourceScope = [\n scope\n ].concat(propertyParts).join('.');\n const parts = routes[property].split('.');\n const targetName = parts.pop();\n const targetScope = parts.join('.');\n defaults.route(sourceScope, sourceName, targetScope, targetName);\n });\n}\nfunction isIChartComponent(proto) {\n return 'id' in proto && 'defaults' in proto;\n}\n\nclass Registry {\n constructor(){\n this.controllers = new TypedRegistry(DatasetController, 'datasets', true);\n this.elements = new TypedRegistry(Element, 'elements');\n this.plugins = new TypedRegistry(Object, 'plugins');\n this.scales = new TypedRegistry(Scale, 'scales');\n this._typedRegistries = [\n this.controllers,\n this.scales,\n this.elements\n ];\n }\n add(...args) {\n this._each('register', args);\n }\n remove(...args) {\n this._each('unregister', args);\n }\n addControllers(...args) {\n this._each('register', args, this.controllers);\n }\n addElements(...args) {\n this._each('register', args, this.elements);\n }\n addPlugins(...args) {\n this._each('register', args, this.plugins);\n }\n addScales(...args) {\n this._each('register', args, this.scales);\n }\n getController(id) {\n return this._get(id, this.controllers, 'controller');\n }\n getElement(id) {\n return this._get(id, this.elements, 'element');\n }\n getPlugin(id) {\n return this._get(id, this.plugins, 'plugin');\n }\n getScale(id) {\n return this._get(id, this.scales, 'scale');\n }\n removeControllers(...args) {\n this._each('unregister', args, this.controllers);\n }\n removeElements(...args) {\n this._each('unregister', args, this.elements);\n }\n removePlugins(...args) {\n this._each('unregister', args, this.plugins);\n }\n removeScales(...args) {\n this._each('unregister', args, this.scales);\n }\n _each(method, args, typedRegistry) {\n [\n ...args\n ].forEach((arg)=>{\n const reg = typedRegistry || this._getRegistryForType(arg);\n if (typedRegistry || reg.isForType(arg) || reg === this.plugins && arg.id) {\n this._exec(method, reg, arg);\n } else {\n each(arg, (item)=>{\n const itemReg = typedRegistry || this._getRegistryForType(item);\n this._exec(method, itemReg, item);\n });\n }\n });\n }\n _exec(method, registry, component) {\n const camelMethod = _capitalize(method);\n callback(component['before' + camelMethod], [], component);\n registry[method](component);\n callback(component['after' + camelMethod], [], component);\n }\n _getRegistryForType(type) {\n for(let i = 0; i < this._typedRegistries.length; i++){\n const reg = this._typedRegistries[i];\n if (reg.isForType(type)) {\n return reg;\n }\n }\n return this.plugins;\n }\n _get(id, typedRegistry, type) {\n const item = typedRegistry.get(id);\n if (item === undefined) {\n throw new Error('\"' + id + '\" is not a registered ' + type + '.');\n }\n return item;\n }\n}\nvar registry = /* #__PURE__ */ new Registry();\n\nclass PluginService {\n constructor(){\n this._init = [];\n }\n notify(chart, hook, args, filter) {\n if (hook === 'beforeInit') {\n this._init = this._createDescriptors(chart, true);\n this._notify(this._init, chart, 'install');\n }\n const descriptors = filter ? this._descriptors(chart).filter(filter) : this._descriptors(chart);\n const result = this._notify(descriptors, chart, hook, args);\n if (hook === 'afterDestroy') {\n this._notify(descriptors, chart, 'stop');\n this._notify(this._init, chart, 'uninstall');\n }\n return result;\n }\n _notify(descriptors, chart, hook, args) {\n args = args || {};\n for (const descriptor of descriptors){\n const plugin = descriptor.plugin;\n const method = plugin[hook];\n const params = [\n chart,\n args,\n descriptor.options\n ];\n if (callback(method, params, plugin) === false && args.cancelable) {\n return false;\n }\n }\n return true;\n }\n invalidate() {\n if (!isNullOrUndef(this._cache)) {\n this._oldCache = this._cache;\n this._cache = undefined;\n }\n }\n _descriptors(chart) {\n if (this._cache) {\n return this._cache;\n }\n const descriptors = this._cache = this._createDescriptors(chart);\n this._notifyStateChanges(chart);\n return descriptors;\n }\n _createDescriptors(chart, all) {\n const config = chart && chart.config;\n const options = valueOrDefault(config.options && config.options.plugins, {});\n const plugins = allPlugins(config);\n return options === false && !all ? [] : createDescriptors(chart, plugins, options, all);\n }\n _notifyStateChanges(chart) {\n const previousDescriptors = this._oldCache || [];\n const descriptors = this._cache;\n const diff = (a, b)=>a.filter((x)=>!b.some((y)=>x.plugin.id === y.plugin.id));\n this._notify(diff(previousDescriptors, descriptors), chart, 'stop');\n this._notify(diff(descriptors, previousDescriptors), chart, 'start');\n }\n}\n function allPlugins(config) {\n const localIds = {};\n const plugins = [];\n const keys = Object.keys(registry.plugins.items);\n for(let i = 0; i < keys.length; i++){\n plugins.push(registry.getPlugin(keys[i]));\n }\n const local = config.plugins || [];\n for(let i = 0; i < local.length; i++){\n const plugin = local[i];\n if (plugins.indexOf(plugin) === -1) {\n plugins.push(plugin);\n localIds[plugin.id] = true;\n }\n }\n return {\n plugins,\n localIds\n };\n}\nfunction getOpts(options, all) {\n if (!all && options === false) {\n return null;\n }\n if (options === true) {\n return {};\n }\n return options;\n}\nfunction createDescriptors(chart, { plugins , localIds }, options, all) {\n const result = [];\n const context = chart.getContext();\n for (const plugin of plugins){\n const id = plugin.id;\n const opts = getOpts(options[id], all);\n if (opts === null) {\n continue;\n }\n result.push({\n plugin,\n options: pluginOpts(chart.config, {\n plugin,\n local: localIds[id]\n }, opts, context)\n });\n }\n return result;\n}\nfunction pluginOpts(config, { plugin , local }, opts, context) {\n const keys = config.pluginScopeKeys(plugin);\n const scopes = config.getOptionScopes(opts, keys);\n if (local && plugin.defaults) {\n scopes.push(plugin.defaults);\n }\n return config.createResolver(scopes, context, [\n ''\n ], {\n scriptable: false,\n indexable: false,\n allKeys: true\n });\n}\n\nfunction getIndexAxis(type, options) {\n const datasetDefaults = defaults.datasets[type] || {};\n const datasetOptions = (options.datasets || {})[type] || {};\n return datasetOptions.indexAxis || options.indexAxis || datasetDefaults.indexAxis || 'x';\n}\nfunction getAxisFromDefaultScaleID(id, indexAxis) {\n let axis = id;\n if (id === '_index_') {\n axis = indexAxis;\n } else if (id === '_value_') {\n axis = indexAxis === 'x' ? 'y' : 'x';\n }\n return axis;\n}\nfunction getDefaultScaleIDFromAxis(axis, indexAxis) {\n return axis === indexAxis ? '_index_' : '_value_';\n}\nfunction idMatchesAxis(id) {\n if (id === 'x' || id === 'y' || id === 'r') {\n return id;\n }\n}\nfunction axisFromPosition(position) {\n if (position === 'top' || position === 'bottom') {\n return 'x';\n }\n if (position === 'left' || position === 'right') {\n return 'y';\n }\n}\nfunction determineAxis(id, ...scaleOptions) {\n if (idMatchesAxis(id)) {\n return id;\n }\n for (const opts of scaleOptions){\n const axis = opts.axis || axisFromPosition(opts.position) || id.length > 1 && idMatchesAxis(id[0].toLowerCase());\n if (axis) {\n return axis;\n }\n }\n throw new Error(`Cannot determine type of '${id}' axis. Please provide 'axis' or 'position' option.`);\n}\nfunction getAxisFromDataset(id, axis, dataset) {\n if (dataset[axis + 'AxisID'] === id) {\n return {\n axis\n };\n }\n}\nfunction retrieveAxisFromDatasets(id, config) {\n if (config.data && config.data.datasets) {\n const boundDs = config.data.datasets.filter((d)=>d.xAxisID === id || d.yAxisID === id);\n if (boundDs.length) {\n return getAxisFromDataset(id, 'x', boundDs[0]) || getAxisFromDataset(id, 'y', boundDs[0]);\n }\n }\n return {};\n}\nfunction mergeScaleConfig(config, options) {\n const chartDefaults = overrides[config.type] || {\n scales: {}\n };\n const configScales = options.scales || {};\n const chartIndexAxis = getIndexAxis(config.type, options);\n const scales = Object.create(null);\n Object.keys(configScales).forEach((id)=>{\n const scaleConf = configScales[id];\n if (!isObject(scaleConf)) {\n return console.error(`Invalid scale configuration for scale: ${id}`);\n }\n if (scaleConf._proxy) {\n return console.warn(`Ignoring resolver passed as options for scale: ${id}`);\n }\n const axis = determineAxis(id, scaleConf, retrieveAxisFromDatasets(id, config), defaults.scales[scaleConf.type]);\n const defaultId = getDefaultScaleIDFromAxis(axis, chartIndexAxis);\n const defaultScaleOptions = chartDefaults.scales || {};\n scales[id] = mergeIf(Object.create(null), [\n {\n axis\n },\n scaleConf,\n defaultScaleOptions[axis],\n defaultScaleOptions[defaultId]\n ]);\n });\n config.data.datasets.forEach((dataset)=>{\n const type = dataset.type || config.type;\n const indexAxis = dataset.indexAxis || getIndexAxis(type, options);\n const datasetDefaults = overrides[type] || {};\n const defaultScaleOptions = datasetDefaults.scales || {};\n Object.keys(defaultScaleOptions).forEach((defaultID)=>{\n const axis = getAxisFromDefaultScaleID(defaultID, indexAxis);\n const id = dataset[axis + 'AxisID'] || axis;\n scales[id] = scales[id] || Object.create(null);\n mergeIf(scales[id], [\n {\n axis\n },\n configScales[id],\n defaultScaleOptions[defaultID]\n ]);\n });\n });\n Object.keys(scales).forEach((key)=>{\n const scale = scales[key];\n mergeIf(scale, [\n defaults.scales[scale.type],\n defaults.scale\n ]);\n });\n return scales;\n}\nfunction initOptions(config) {\n const options = config.options || (config.options = {});\n options.plugins = valueOrDefault(options.plugins, {});\n options.scales = mergeScaleConfig(config, options);\n}\nfunction initData(data) {\n data = data || {};\n data.datasets = data.datasets || [];\n data.labels = data.labels || [];\n return data;\n}\nfunction initConfig(config) {\n config = config || {};\n config.data = initData(config.data);\n initOptions(config);\n return config;\n}\nconst keyCache = new Map();\nconst keysCached = new Set();\nfunction cachedKeys(cacheKey, generate) {\n let keys = keyCache.get(cacheKey);\n if (!keys) {\n keys = generate();\n keyCache.set(cacheKey, keys);\n keysCached.add(keys);\n }\n return keys;\n}\nconst addIfFound = (set, obj, key)=>{\n const opts = resolveObjectKey(obj, key);\n if (opts !== undefined) {\n set.add(opts);\n }\n};\nclass Config {\n constructor(config){\n this._config = initConfig(config);\n this._scopeCache = new Map();\n this._resolverCache = new Map();\n }\n get platform() {\n return this._config.platform;\n }\n get type() {\n return this._config.type;\n }\n set type(type) {\n this._config.type = type;\n }\n get data() {\n return this._config.data;\n }\n set data(data) {\n this._config.data = initData(data);\n }\n get options() {\n return this._config.options;\n }\n set options(options) {\n this._config.options = options;\n }\n get plugins() {\n return this._config.plugins;\n }\n update() {\n const config = this._config;\n this.clearCache();\n initOptions(config);\n }\n clearCache() {\n this._scopeCache.clear();\n this._resolverCache.clear();\n }\n datasetScopeKeys(datasetType) {\n return cachedKeys(datasetType, ()=>[\n [\n `datasets.${datasetType}`,\n ''\n ]\n ]);\n }\n datasetAnimationScopeKeys(datasetType, transition) {\n return cachedKeys(`${datasetType}.transition.${transition}`, ()=>[\n [\n `datasets.${datasetType}.transitions.${transition}`,\n `transitions.${transition}`\n ],\n [\n `datasets.${datasetType}`,\n ''\n ]\n ]);\n }\n datasetElementScopeKeys(datasetType, elementType) {\n return cachedKeys(`${datasetType}-${elementType}`, ()=>[\n [\n `datasets.${datasetType}.elements.${elementType}`,\n `datasets.${datasetType}`,\n `elements.${elementType}`,\n ''\n ]\n ]);\n }\n pluginScopeKeys(plugin) {\n const id = plugin.id;\n const type = this.type;\n return cachedKeys(`${type}-plugin-${id}`, ()=>[\n [\n `plugins.${id}`,\n ...plugin.additionalOptionScopes || []\n ]\n ]);\n }\n _cachedScopes(mainScope, resetCache) {\n const _scopeCache = this._scopeCache;\n let cache = _scopeCache.get(mainScope);\n if (!cache || resetCache) {\n cache = new Map();\n _scopeCache.set(mainScope, cache);\n }\n return cache;\n }\n getOptionScopes(mainScope, keyLists, resetCache) {\n const { options , type } = this;\n const cache = this._cachedScopes(mainScope, resetCache);\n const cached = cache.get(keyLists);\n if (cached) {\n return cached;\n }\n const scopes = new Set();\n keyLists.forEach((keys)=>{\n if (mainScope) {\n scopes.add(mainScope);\n keys.forEach((key)=>addIfFound(scopes, mainScope, key));\n }\n keys.forEach((key)=>addIfFound(scopes, options, key));\n keys.forEach((key)=>addIfFound(scopes, overrides[type] || {}, key));\n keys.forEach((key)=>addIfFound(scopes, defaults, key));\n keys.forEach((key)=>addIfFound(scopes, descriptors, key));\n });\n const array = Array.from(scopes);\n if (array.length === 0) {\n array.push(Object.create(null));\n }\n if (keysCached.has(keyLists)) {\n cache.set(keyLists, array);\n }\n return array;\n }\n chartOptionScopes() {\n const { options , type } = this;\n return [\n options,\n overrides[type] || {},\n defaults.datasets[type] || {},\n {\n type\n },\n defaults,\n descriptors\n ];\n }\n resolveNamedOptions(scopes, names, context, prefixes = [\n ''\n ]) {\n const result = {\n $shared: true\n };\n const { resolver , subPrefixes } = getResolver(this._resolverCache, scopes, prefixes);\n let options = resolver;\n if (needContext(resolver, names)) {\n result.$shared = false;\n context = isFunction(context) ? context() : context;\n const subResolver = this.createResolver(scopes, context, subPrefixes);\n options = _attachContext(resolver, context, subResolver);\n }\n for (const prop of names){\n result[prop] = options[prop];\n }\n return result;\n }\n createResolver(scopes, context, prefixes = [\n ''\n ], descriptorDefaults) {\n const { resolver } = getResolver(this._resolverCache, scopes, prefixes);\n return isObject(context) ? _attachContext(resolver, context, undefined, descriptorDefaults) : resolver;\n }\n}\nfunction getResolver(resolverCache, scopes, prefixes) {\n let cache = resolverCache.get(scopes);\n if (!cache) {\n cache = new Map();\n resolverCache.set(scopes, cache);\n }\n const cacheKey = prefixes.join();\n let cached = cache.get(cacheKey);\n if (!cached) {\n const resolver = _createResolver(scopes, prefixes);\n cached = {\n resolver,\n subPrefixes: prefixes.filter((p)=>!p.toLowerCase().includes('hover'))\n };\n cache.set(cacheKey, cached);\n }\n return cached;\n}\nconst hasFunction = (value)=>isObject(value) && Object.getOwnPropertyNames(value).reduce((acc, key)=>acc || isFunction(value[key]), false);\nfunction needContext(proxy, names) {\n const { isScriptable , isIndexable } = _descriptors(proxy);\n for (const prop of names){\n const scriptable = isScriptable(prop);\n const indexable = isIndexable(prop);\n const value = (indexable || scriptable) && proxy[prop];\n if (scriptable && (isFunction(value) || hasFunction(value)) || indexable && isArray(value)) {\n return true;\n }\n }\n return false;\n}\n\nvar version = \"4.3.0\";\n\nconst KNOWN_POSITIONS = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n 'chartArea'\n];\nfunction positionIsHorizontal(position, axis) {\n return position === 'top' || position === 'bottom' || KNOWN_POSITIONS.indexOf(position) === -1 && axis === 'x';\n}\nfunction compare2Level(l1, l2) {\n return function(a, b) {\n return a[l1] === b[l1] ? a[l2] - b[l2] : a[l1] - b[l1];\n };\n}\nfunction onAnimationsComplete(context) {\n const chart = context.chart;\n const animationOptions = chart.options.animation;\n chart.notifyPlugins('afterRender');\n callback(animationOptions && animationOptions.onComplete, [\n context\n ], chart);\n}\nfunction onAnimationProgress(context) {\n const chart = context.chart;\n const animationOptions = chart.options.animation;\n callback(animationOptions && animationOptions.onProgress, [\n context\n ], chart);\n}\n function getCanvas(item) {\n if (_isDomSupported() && typeof item === 'string') {\n item = document.getElementById(item);\n } else if (item && item.length) {\n item = item[0];\n }\n if (item && item.canvas) {\n item = item.canvas;\n }\n return item;\n}\nconst instances = {};\nconst getChart = (key)=>{\n const canvas = getCanvas(key);\n return Object.values(instances).filter((c)=>c.canvas === canvas).pop();\n};\nfunction moveNumericKeys(obj, start, move) {\n const keys = Object.keys(obj);\n for (const key of keys){\n const intKey = +key;\n if (intKey >= start) {\n const value = obj[key];\n delete obj[key];\n if (move > 0 || intKey > start) {\n obj[intKey + move] = value;\n }\n }\n }\n}\n function determineLastEvent(e, lastEvent, inChartArea, isClick) {\n if (!inChartArea || e.type === 'mouseout') {\n return null;\n }\n if (isClick) {\n return lastEvent;\n }\n return e;\n}\nfunction getDatasetArea(meta) {\n const { xScale , yScale } = meta;\n if (xScale && yScale) {\n return {\n left: xScale.left,\n right: xScale.right,\n top: yScale.top,\n bottom: yScale.bottom\n };\n }\n}\nclass Chart {\n static defaults = defaults;\n static instances = instances;\n static overrides = overrides;\n static registry = registry;\n static version = version;\n static getChart = getChart;\n static register(...items) {\n registry.add(...items);\n invalidatePlugins();\n }\n static unregister(...items) {\n registry.remove(...items);\n invalidatePlugins();\n }\n constructor(item, userConfig){\n const config = this.config = new Config(userConfig);\n const initialCanvas = getCanvas(item);\n const existingChart = getChart(initialCanvas);\n if (existingChart) {\n throw new Error('Canvas is already in use. Chart with ID \\'' + existingChart.id + '\\'' + ' must be destroyed before the canvas with ID \\'' + existingChart.canvas.id + '\\' can be reused.');\n }\n const options = config.createResolver(config.chartOptionScopes(), this.getContext());\n this.platform = new (config.platform || _detectPlatform(initialCanvas))();\n this.platform.updateConfig(config);\n const context = this.platform.acquireContext(initialCanvas, options.aspectRatio);\n const canvas = context && context.canvas;\n const height = canvas && canvas.height;\n const width = canvas && canvas.width;\n this.id = uid();\n this.ctx = context;\n this.canvas = canvas;\n this.width = width;\n this.height = height;\n this._options = options;\n this._aspectRatio = this.aspectRatio;\n this._layers = [];\n this._metasets = [];\n this._stacks = undefined;\n this.boxes = [];\n this.currentDevicePixelRatio = undefined;\n this.chartArea = undefined;\n this._active = [];\n this._lastEvent = undefined;\n this._listeners = {};\n this._responsiveListeners = undefined;\n this._sortedMetasets = [];\n this.scales = {};\n this._plugins = new PluginService();\n this.$proxies = {};\n this._hiddenIndices = {};\n this.attached = false;\n this._animationsDisabled = undefined;\n this.$context = undefined;\n this._doResize = debounce((mode)=>this.update(mode), options.resizeDelay || 0);\n this._dataChanges = [];\n instances[this.id] = this;\n if (!context || !canvas) {\n console.error(\"Failed to create chart: can't acquire context from the given item\");\n return;\n }\n animator.listen(this, 'complete', onAnimationsComplete);\n animator.listen(this, 'progress', onAnimationProgress);\n this._initialize();\n if (this.attached) {\n this.update();\n }\n }\n get aspectRatio() {\n const { options: { aspectRatio , maintainAspectRatio } , width , height , _aspectRatio } = this;\n if (!isNullOrUndef(aspectRatio)) {\n return aspectRatio;\n }\n if (maintainAspectRatio && _aspectRatio) {\n return _aspectRatio;\n }\n return height ? width / height : null;\n }\n get data() {\n return this.config.data;\n }\n set data(data) {\n this.config.data = data;\n }\n get options() {\n return this._options;\n }\n set options(options) {\n this.config.options = options;\n }\n get registry() {\n return registry;\n }\n _initialize() {\n this.notifyPlugins('beforeInit');\n if (this.options.responsive) {\n this.resize();\n } else {\n retinaScale(this, this.options.devicePixelRatio);\n }\n this.bindEvents();\n this.notifyPlugins('afterInit');\n return this;\n }\n clear() {\n clearCanvas(this.canvas, this.ctx);\n return this;\n }\n stop() {\n animator.stop(this);\n return this;\n }\n resize(width, height) {\n if (!animator.running(this)) {\n this._resize(width, height);\n } else {\n this._resizeBeforeDraw = {\n width,\n height\n };\n }\n }\n _resize(width, height) {\n const options = this.options;\n const canvas = this.canvas;\n const aspectRatio = options.maintainAspectRatio && this.aspectRatio;\n const newSize = this.platform.getMaximumSize(canvas, width, height, aspectRatio);\n const newRatio = options.devicePixelRatio || this.platform.getDevicePixelRatio();\n const mode = this.width ? 'resize' : 'attach';\n this.width = newSize.width;\n this.height = newSize.height;\n this._aspectRatio = this.aspectRatio;\n if (!retinaScale(this, newRatio, true)) {\n return;\n }\n this.notifyPlugins('resize', {\n size: newSize\n });\n callback(options.onResize, [\n this,\n newSize\n ], this);\n if (this.attached) {\n if (this._doResize(mode)) {\n this.render();\n }\n }\n }\n ensureScalesHaveIDs() {\n const options = this.options;\n const scalesOptions = options.scales || {};\n each(scalesOptions, (axisOptions, axisID)=>{\n axisOptions.id = axisID;\n });\n }\n buildOrUpdateScales() {\n const options = this.options;\n const scaleOpts = options.scales;\n const scales = this.scales;\n const updated = Object.keys(scales).reduce((obj, id)=>{\n obj[id] = false;\n return obj;\n }, {});\n let items = [];\n if (scaleOpts) {\n items = items.concat(Object.keys(scaleOpts).map((id)=>{\n const scaleOptions = scaleOpts[id];\n const axis = determineAxis(id, scaleOptions);\n const isRadial = axis === 'r';\n const isHorizontal = axis === 'x';\n return {\n options: scaleOptions,\n dposition: isRadial ? 'chartArea' : isHorizontal ? 'bottom' : 'left',\n dtype: isRadial ? 'radialLinear' : isHorizontal ? 'category' : 'linear'\n };\n }));\n }\n each(items, (item)=>{\n const scaleOptions = item.options;\n const id = scaleOptions.id;\n const axis = determineAxis(id, scaleOptions);\n const scaleType = valueOrDefault(scaleOptions.type, item.dtype);\n if (scaleOptions.position === undefined || positionIsHorizontal(scaleOptions.position, axis) !== positionIsHorizontal(item.dposition)) {\n scaleOptions.position = item.dposition;\n }\n updated[id] = true;\n let scale = null;\n if (id in scales && scales[id].type === scaleType) {\n scale = scales[id];\n } else {\n const scaleClass = registry.getScale(scaleType);\n scale = new scaleClass({\n id,\n type: scaleType,\n ctx: this.ctx,\n chart: this\n });\n scales[scale.id] = scale;\n }\n scale.init(scaleOptions, options);\n });\n each(updated, (hasUpdated, id)=>{\n if (!hasUpdated) {\n delete scales[id];\n }\n });\n each(scales, (scale)=>{\n layouts.configure(this, scale, scale.options);\n layouts.addBox(this, scale);\n });\n }\n _updateMetasets() {\n const metasets = this._metasets;\n const numData = this.data.datasets.length;\n const numMeta = metasets.length;\n metasets.sort((a, b)=>a.index - b.index);\n if (numMeta > numData) {\n for(let i = numData; i < numMeta; ++i){\n this._destroyDatasetMeta(i);\n }\n metasets.splice(numData, numMeta - numData);\n }\n this._sortedMetasets = metasets.slice(0).sort(compare2Level('order', 'index'));\n }\n _removeUnreferencedMetasets() {\n const { _metasets: metasets , data: { datasets } } = this;\n if (metasets.length > datasets.length) {\n delete this._stacks;\n }\n metasets.forEach((meta, index)=>{\n if (datasets.filter((x)=>x === meta._dataset).length === 0) {\n this._destroyDatasetMeta(index);\n }\n });\n }\n buildOrUpdateControllers() {\n const newControllers = [];\n const datasets = this.data.datasets;\n let i, ilen;\n this._removeUnreferencedMetasets();\n for(i = 0, ilen = datasets.length; i < ilen; i++){\n const dataset = datasets[i];\n let meta = this.getDatasetMeta(i);\n const type = dataset.type || this.config.type;\n if (meta.type && meta.type !== type) {\n this._destroyDatasetMeta(i);\n meta = this.getDatasetMeta(i);\n }\n meta.type = type;\n meta.indexAxis = dataset.indexAxis || getIndexAxis(type, this.options);\n meta.order = dataset.order || 0;\n meta.index = i;\n meta.label = '' + dataset.label;\n meta.visible = this.isDatasetVisible(i);\n if (meta.controller) {\n meta.controller.updateIndex(i);\n meta.controller.linkScales();\n } else {\n const ControllerClass = registry.getController(type);\n const { datasetElementType , dataElementType } = defaults.datasets[type];\n Object.assign(ControllerClass, {\n dataElementType: registry.getElement(dataElementType),\n datasetElementType: datasetElementType && registry.getElement(datasetElementType)\n });\n meta.controller = new ControllerClass(this, i);\n newControllers.push(meta.controller);\n }\n }\n this._updateMetasets();\n return newControllers;\n }\n _resetElements() {\n each(this.data.datasets, (dataset, datasetIndex)=>{\n this.getDatasetMeta(datasetIndex).controller.reset();\n }, this);\n }\n reset() {\n this._resetElements();\n this.notifyPlugins('reset');\n }\n update(mode) {\n const config = this.config;\n config.update();\n const options = this._options = config.createResolver(config.chartOptionScopes(), this.getContext());\n const animsDisabled = this._animationsDisabled = !options.animation;\n this._updateScales();\n this._checkEventBindings();\n this._updateHiddenIndices();\n this._plugins.invalidate();\n if (this.notifyPlugins('beforeUpdate', {\n mode,\n cancelable: true\n }) === false) {\n return;\n }\n const newControllers = this.buildOrUpdateControllers();\n this.notifyPlugins('beforeElementsUpdate');\n let minPadding = 0;\n for(let i = 0, ilen = this.data.datasets.length; i < ilen; i++){\n const { controller } = this.getDatasetMeta(i);\n const reset = !animsDisabled && newControllers.indexOf(controller) === -1;\n controller.buildOrUpdateElements(reset);\n minPadding = Math.max(+controller.getMaxOverflow(), minPadding);\n }\n minPadding = this._minPadding = options.layout.autoPadding ? minPadding : 0;\n this._updateLayout(minPadding);\n if (!animsDisabled) {\n each(newControllers, (controller)=>{\n controller.reset();\n });\n }\n this._updateDatasets(mode);\n this.notifyPlugins('afterUpdate', {\n mode\n });\n this._layers.sort(compare2Level('z', '_idx'));\n const { _active , _lastEvent } = this;\n if (_lastEvent) {\n this._eventHandler(_lastEvent, true);\n } else if (_active.length) {\n this._updateHoverStyles(_active, _active, true);\n }\n this.render();\n }\n _updateScales() {\n each(this.scales, (scale)=>{\n layouts.removeBox(this, scale);\n });\n this.ensureScalesHaveIDs();\n this.buildOrUpdateScales();\n }\n _checkEventBindings() {\n const options = this.options;\n const existingEvents = new Set(Object.keys(this._listeners));\n const newEvents = new Set(options.events);\n if (!setsEqual(existingEvents, newEvents) || !!this._responsiveListeners !== options.responsive) {\n this.unbindEvents();\n this.bindEvents();\n }\n }\n _updateHiddenIndices() {\n const { _hiddenIndices } = this;\n const changes = this._getUniformDataChanges() || [];\n for (const { method , start , count } of changes){\n const move = method === '_removeElements' ? -count : count;\n moveNumericKeys(_hiddenIndices, start, move);\n }\n }\n _getUniformDataChanges() {\n const _dataChanges = this._dataChanges;\n if (!_dataChanges || !_dataChanges.length) {\n return;\n }\n this._dataChanges = [];\n const datasetCount = this.data.datasets.length;\n const makeSet = (idx)=>new Set(_dataChanges.filter((c)=>c[0] === idx).map((c, i)=>i + ',' + c.splice(1).join(',')));\n const changeSet = makeSet(0);\n for(let i = 1; i < datasetCount; i++){\n if (!setsEqual(changeSet, makeSet(i))) {\n return;\n }\n }\n return Array.from(changeSet).map((c)=>c.split(',')).map((a)=>({\n method: a[1],\n start: +a[2],\n count: +a[3]\n }));\n }\n _updateLayout(minPadding) {\n if (this.notifyPlugins('beforeLayout', {\n cancelable: true\n }) === false) {\n return;\n }\n layouts.update(this, this.width, this.height, minPadding);\n const area = this.chartArea;\n const noArea = area.width <= 0 || area.height <= 0;\n this._layers = [];\n each(this.boxes, (box)=>{\n if (noArea && box.position === 'chartArea') {\n return;\n }\n if (box.configure) {\n box.configure();\n }\n this._layers.push(...box._layers());\n }, this);\n this._layers.forEach((item, index)=>{\n item._idx = index;\n });\n this.notifyPlugins('afterLayout');\n }\n _updateDatasets(mode) {\n if (this.notifyPlugins('beforeDatasetsUpdate', {\n mode,\n cancelable: true\n }) === false) {\n return;\n }\n for(let i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n this.getDatasetMeta(i).controller.configure();\n }\n for(let i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n this._updateDataset(i, isFunction(mode) ? mode({\n datasetIndex: i\n }) : mode);\n }\n this.notifyPlugins('afterDatasetsUpdate', {\n mode\n });\n }\n _updateDataset(index, mode) {\n const meta = this.getDatasetMeta(index);\n const args = {\n meta,\n index,\n mode,\n cancelable: true\n };\n if (this.notifyPlugins('beforeDatasetUpdate', args) === false) {\n return;\n }\n meta.controller._update(mode);\n args.cancelable = false;\n this.notifyPlugins('afterDatasetUpdate', args);\n }\n render() {\n if (this.notifyPlugins('beforeRender', {\n cancelable: true\n }) === false) {\n return;\n }\n if (animator.has(this)) {\n if (this.attached && !animator.running(this)) {\n animator.start(this);\n }\n } else {\n this.draw();\n onAnimationsComplete({\n chart: this\n });\n }\n }\n draw() {\n let i;\n if (this._resizeBeforeDraw) {\n const { width , height } = this._resizeBeforeDraw;\n this._resize(width, height);\n this._resizeBeforeDraw = null;\n }\n this.clear();\n if (this.width <= 0 || this.height <= 0) {\n return;\n }\n if (this.notifyPlugins('beforeDraw', {\n cancelable: true\n }) === false) {\n return;\n }\n const layers = this._layers;\n for(i = 0; i < layers.length && layers[i].z <= 0; ++i){\n layers[i].draw(this.chartArea);\n }\n this._drawDatasets();\n for(; i < layers.length; ++i){\n layers[i].draw(this.chartArea);\n }\n this.notifyPlugins('afterDraw');\n }\n _getSortedDatasetMetas(filterVisible) {\n const metasets = this._sortedMetasets;\n const result = [];\n let i, ilen;\n for(i = 0, ilen = metasets.length; i < ilen; ++i){\n const meta = metasets[i];\n if (!filterVisible || meta.visible) {\n result.push(meta);\n }\n }\n return result;\n }\n getSortedVisibleDatasetMetas() {\n return this._getSortedDatasetMetas(true);\n }\n _drawDatasets() {\n if (this.notifyPlugins('beforeDatasetsDraw', {\n cancelable: true\n }) === false) {\n return;\n }\n const metasets = this.getSortedVisibleDatasetMetas();\n for(let i = metasets.length - 1; i >= 0; --i){\n this._drawDataset(metasets[i]);\n }\n this.notifyPlugins('afterDatasetsDraw');\n }\n _drawDataset(meta) {\n const ctx = this.ctx;\n const clip = meta._clip;\n const useClip = !clip.disabled;\n const area = getDatasetArea(meta) || this.chartArea;\n const args = {\n meta,\n index: meta.index,\n cancelable: true\n };\n if (this.notifyPlugins('beforeDatasetDraw', args) === false) {\n return;\n }\n if (useClip) {\n clipArea(ctx, {\n left: clip.left === false ? 0 : area.left - clip.left,\n right: clip.right === false ? this.width : area.right + clip.right,\n top: clip.top === false ? 0 : area.top - clip.top,\n bottom: clip.bottom === false ? this.height : area.bottom + clip.bottom\n });\n }\n meta.controller.draw();\n if (useClip) {\n unclipArea(ctx);\n }\n args.cancelable = false;\n this.notifyPlugins('afterDatasetDraw', args);\n }\n isPointInArea(point) {\n return _isPointInArea(point, this.chartArea, this._minPadding);\n }\n getElementsAtEventForMode(e, mode, options, useFinalPosition) {\n const method = Interaction.modes[mode];\n if (typeof method === 'function') {\n return method(this, e, options, useFinalPosition);\n }\n return [];\n }\n getDatasetMeta(datasetIndex) {\n const dataset = this.data.datasets[datasetIndex];\n const metasets = this._metasets;\n let meta = metasets.filter((x)=>x && x._dataset === dataset).pop();\n if (!meta) {\n meta = {\n type: null,\n data: [],\n dataset: null,\n controller: null,\n hidden: null,\n xAxisID: null,\n yAxisID: null,\n order: dataset && dataset.order || 0,\n index: datasetIndex,\n _dataset: dataset,\n _parsed: [],\n _sorted: false\n };\n metasets.push(meta);\n }\n return meta;\n }\n getContext() {\n return this.$context || (this.$context = createContext(null, {\n chart: this,\n type: 'chart'\n }));\n }\n getVisibleDatasetCount() {\n return this.getSortedVisibleDatasetMetas().length;\n }\n isDatasetVisible(datasetIndex) {\n const dataset = this.data.datasets[datasetIndex];\n if (!dataset) {\n return false;\n }\n const meta = this.getDatasetMeta(datasetIndex);\n return typeof meta.hidden === 'boolean' ? !meta.hidden : !dataset.hidden;\n }\n setDatasetVisibility(datasetIndex, visible) {\n const meta = this.getDatasetMeta(datasetIndex);\n meta.hidden = !visible;\n }\n toggleDataVisibility(index) {\n this._hiddenIndices[index] = !this._hiddenIndices[index];\n }\n getDataVisibility(index) {\n return !this._hiddenIndices[index];\n }\n _updateVisibility(datasetIndex, dataIndex, visible) {\n const mode = visible ? 'show' : 'hide';\n const meta = this.getDatasetMeta(datasetIndex);\n const anims = meta.controller._resolveAnimations(undefined, mode);\n if (defined(dataIndex)) {\n meta.data[dataIndex].hidden = !visible;\n this.update();\n } else {\n this.setDatasetVisibility(datasetIndex, visible);\n anims.update(meta, {\n visible\n });\n this.update((ctx)=>ctx.datasetIndex === datasetIndex ? mode : undefined);\n }\n }\n hide(datasetIndex, dataIndex) {\n this._updateVisibility(datasetIndex, dataIndex, false);\n }\n show(datasetIndex, dataIndex) {\n this._updateVisibility(datasetIndex, dataIndex, true);\n }\n _destroyDatasetMeta(datasetIndex) {\n const meta = this._metasets[datasetIndex];\n if (meta && meta.controller) {\n meta.controller._destroy();\n }\n delete this._metasets[datasetIndex];\n }\n _stop() {\n let i, ilen;\n this.stop();\n animator.remove(this);\n for(i = 0, ilen = this.data.datasets.length; i < ilen; ++i){\n this._destroyDatasetMeta(i);\n }\n }\n destroy() {\n this.notifyPlugins('beforeDestroy');\n const { canvas , ctx } = this;\n this._stop();\n this.config.clearCache();\n if (canvas) {\n this.unbindEvents();\n clearCanvas(canvas, ctx);\n this.platform.releaseContext(ctx);\n this.canvas = null;\n this.ctx = null;\n }\n delete instances[this.id];\n this.notifyPlugins('afterDestroy');\n }\n toBase64Image(...args) {\n return this.canvas.toDataURL(...args);\n }\n bindEvents() {\n this.bindUserEvents();\n if (this.options.responsive) {\n this.bindResponsiveEvents();\n } else {\n this.attached = true;\n }\n }\n bindUserEvents() {\n const listeners = this._listeners;\n const platform = this.platform;\n const _add = (type, listener)=>{\n platform.addEventListener(this, type, listener);\n listeners[type] = listener;\n };\n const listener = (e, x, y)=>{\n e.offsetX = x;\n e.offsetY = y;\n this._eventHandler(e);\n };\n each(this.options.events, (type)=>_add(type, listener));\n }\n bindResponsiveEvents() {\n if (!this._responsiveListeners) {\n this._responsiveListeners = {};\n }\n const listeners = this._responsiveListeners;\n const platform = this.platform;\n const _add = (type, listener)=>{\n platform.addEventListener(this, type, listener);\n listeners[type] = listener;\n };\n const _remove = (type, listener)=>{\n if (listeners[type]) {\n platform.removeEventListener(this, type, listener);\n delete listeners[type];\n }\n };\n const listener = (width, height)=>{\n if (this.canvas) {\n this.resize(width, height);\n }\n };\n let detached;\n const attached = ()=>{\n _remove('attach', attached);\n this.attached = true;\n this.resize();\n _add('resize', listener);\n _add('detach', detached);\n };\n detached = ()=>{\n this.attached = false;\n _remove('resize', listener);\n this._stop();\n this._resize(0, 0);\n _add('attach', attached);\n };\n if (platform.isAttached(this.canvas)) {\n attached();\n } else {\n detached();\n }\n }\n unbindEvents() {\n each(this._listeners, (listener, type)=>{\n this.platform.removeEventListener(this, type, listener);\n });\n this._listeners = {};\n each(this._responsiveListeners, (listener, type)=>{\n this.platform.removeEventListener(this, type, listener);\n });\n this._responsiveListeners = undefined;\n }\n updateHoverStyle(items, mode, enabled) {\n const prefix = enabled ? 'set' : 'remove';\n let meta, item, i, ilen;\n if (mode === 'dataset') {\n meta = this.getDatasetMeta(items[0].datasetIndex);\n meta.controller['_' + prefix + 'DatasetHoverStyle']();\n }\n for(i = 0, ilen = items.length; i < ilen; ++i){\n item = items[i];\n const controller = item && this.getDatasetMeta(item.datasetIndex).controller;\n if (controller) {\n controller[prefix + 'HoverStyle'](item.element, item.datasetIndex, item.index);\n }\n }\n }\n getActiveElements() {\n return this._active || [];\n }\n setActiveElements(activeElements) {\n const lastActive = this._active || [];\n const active = activeElements.map(({ datasetIndex , index })=>{\n const meta = this.getDatasetMeta(datasetIndex);\n if (!meta) {\n throw new Error('No dataset found at index ' + datasetIndex);\n }\n return {\n datasetIndex,\n element: meta.data[index],\n index\n };\n });\n const changed = !_elementsEqual(active, lastActive);\n if (changed) {\n this._active = active;\n this._lastEvent = null;\n this._updateHoverStyles(active, lastActive);\n }\n }\n notifyPlugins(hook, args, filter) {\n return this._plugins.notify(this, hook, args, filter);\n }\n isPluginEnabled(pluginId) {\n return this._plugins._cache.filter((p)=>p.plugin.id === pluginId).length === 1;\n }\n _updateHoverStyles(active, lastActive, replay) {\n const hoverOptions = this.options.hover;\n const diff = (a, b)=>a.filter((x)=>!b.some((y)=>x.datasetIndex === y.datasetIndex && x.index === y.index));\n const deactivated = diff(lastActive, active);\n const activated = replay ? active : diff(active, lastActive);\n if (deactivated.length) {\n this.updateHoverStyle(deactivated, hoverOptions.mode, false);\n }\n if (activated.length && hoverOptions.mode) {\n this.updateHoverStyle(activated, hoverOptions.mode, true);\n }\n }\n _eventHandler(e, replay) {\n const args = {\n event: e,\n replay,\n cancelable: true,\n inChartArea: this.isPointInArea(e)\n };\n const eventFilter = (plugin)=>(plugin.options.events || this.options.events).includes(e.native.type);\n if (this.notifyPlugins('beforeEvent', args, eventFilter) === false) {\n return;\n }\n const changed = this._handleEvent(e, replay, args.inChartArea);\n args.cancelable = false;\n this.notifyPlugins('afterEvent', args, eventFilter);\n if (changed || args.changed) {\n this.render();\n }\n return this;\n }\n _handleEvent(e, replay, inChartArea) {\n const { _active: lastActive = [] , options } = this;\n const useFinalPosition = replay;\n const active = this._getActiveElements(e, lastActive, inChartArea, useFinalPosition);\n const isClick = _isClickEvent(e);\n const lastEvent = determineLastEvent(e, this._lastEvent, inChartArea, isClick);\n if (inChartArea) {\n this._lastEvent = null;\n callback(options.onHover, [\n e,\n active,\n this\n ], this);\n if (isClick) {\n callback(options.onClick, [\n e,\n active,\n this\n ], this);\n }\n }\n const changed = !_elementsEqual(active, lastActive);\n if (changed || replay) {\n this._active = active;\n this._updateHoverStyles(active, lastActive, replay);\n }\n this._lastEvent = lastEvent;\n return changed;\n }\n _getActiveElements(e, lastActive, inChartArea, useFinalPosition) {\n if (e.type === 'mouseout') {\n return [];\n }\n if (!inChartArea) {\n return lastActive;\n }\n const hoverOptions = this.options.hover;\n return this.getElementsAtEventForMode(e, hoverOptions.mode, hoverOptions, useFinalPosition);\n }\n}\nfunction invalidatePlugins() {\n return each(Chart.instances, (chart)=>chart._plugins.invalidate());\n}\n\nfunction clipArc(ctx, element, endAngle) {\n const { startAngle , pixelMargin , x , y , outerRadius , innerRadius } = element;\n let angleMargin = pixelMargin / outerRadius;\n // Draw an inner border by clipping the arc and drawing a double-width border\n // Enlarge the clipping arc by 0.33 pixels to eliminate glitches between borders\n ctx.beginPath();\n ctx.arc(x, y, outerRadius, startAngle - angleMargin, endAngle + angleMargin);\n if (innerRadius > pixelMargin) {\n angleMargin = pixelMargin / innerRadius;\n ctx.arc(x, y, innerRadius, endAngle + angleMargin, startAngle - angleMargin, true);\n } else {\n ctx.arc(x, y, pixelMargin, endAngle + HALF_PI, startAngle - HALF_PI);\n }\n ctx.closePath();\n ctx.clip();\n}\nfunction toRadiusCorners(value) {\n return _readValueToProps(value, [\n 'outerStart',\n 'outerEnd',\n 'innerStart',\n 'innerEnd'\n ]);\n}\n/**\n * Parse border radius from the provided options\n */ function parseBorderRadius$1(arc, innerRadius, outerRadius, angleDelta) {\n const o = toRadiusCorners(arc.options.borderRadius);\n const halfThickness = (outerRadius - innerRadius) / 2;\n const innerLimit = Math.min(halfThickness, angleDelta * innerRadius / 2);\n // Outer limits are complicated. We want to compute the available angular distance at\n // a radius of outerRadius - borderRadius because for small angular distances, this term limits.\n // We compute at r = outerRadius - borderRadius because this circle defines the center of the border corners.\n //\n // If the borderRadius is large, that value can become negative.\n // This causes the outer borders to lose their radius entirely, which is rather unexpected. To solve that, if borderRadius > outerRadius\n // we know that the thickness term will dominate and compute the limits at that point\n const computeOuterLimit = (val)=>{\n const outerArcLimit = (outerRadius - Math.min(halfThickness, val)) * angleDelta / 2;\n return _limitValue(val, 0, Math.min(halfThickness, outerArcLimit));\n };\n return {\n outerStart: computeOuterLimit(o.outerStart),\n outerEnd: computeOuterLimit(o.outerEnd),\n innerStart: _limitValue(o.innerStart, 0, innerLimit),\n innerEnd: _limitValue(o.innerEnd, 0, innerLimit)\n };\n}\n/**\n * Convert (r, ðœƒ) to (x, y)\n */ function rThetaToXY(r, theta, x, y) {\n return {\n x: x + r * Math.cos(theta),\n y: y + r * Math.sin(theta)\n };\n}\n/**\n * Path the arc, respecting border radius by separating into left and right halves.\n *\n * Start End\n *\n * 1--->a--->2 Outer\n * / \\\n * 8 3\n * | |\n * | |\n * 7 4\n * \\ /\n * 6<---b<---5 Inner\n */ function pathArc(ctx, element, offset, spacing, end, circular) {\n const { x , y , startAngle: start , pixelMargin , innerRadius: innerR } = element;\n const outerRadius = Math.max(element.outerRadius + spacing + offset - pixelMargin, 0);\n const innerRadius = innerR > 0 ? innerR + spacing + offset + pixelMargin : 0;\n let spacingOffset = 0;\n const alpha = end - start;\n if (spacing) {\n // When spacing is present, it is the same for all items\n // So we adjust the start and end angle of the arc such that\n // the distance is the same as it would be without the spacing\n const noSpacingInnerRadius = innerR > 0 ? innerR - spacing : 0;\n const noSpacingOuterRadius = outerRadius > 0 ? outerRadius - spacing : 0;\n const avNogSpacingRadius = (noSpacingInnerRadius + noSpacingOuterRadius) / 2;\n const adjustedAngle = avNogSpacingRadius !== 0 ? alpha * avNogSpacingRadius / (avNogSpacingRadius + spacing) : alpha;\n spacingOffset = (alpha - adjustedAngle) / 2;\n }\n const beta = Math.max(0.001, alpha * outerRadius - offset / PI) / outerRadius;\n const angleOffset = (alpha - beta) / 2;\n const startAngle = start + angleOffset + spacingOffset;\n const endAngle = end - angleOffset - spacingOffset;\n const { outerStart , outerEnd , innerStart , innerEnd } = parseBorderRadius$1(element, innerRadius, outerRadius, endAngle - startAngle);\n const outerStartAdjustedRadius = outerRadius - outerStart;\n const outerEndAdjustedRadius = outerRadius - outerEnd;\n const outerStartAdjustedAngle = startAngle + outerStart / outerStartAdjustedRadius;\n const outerEndAdjustedAngle = endAngle - outerEnd / outerEndAdjustedRadius;\n const innerStartAdjustedRadius = innerRadius + innerStart;\n const innerEndAdjustedRadius = innerRadius + innerEnd;\n const innerStartAdjustedAngle = startAngle + innerStart / innerStartAdjustedRadius;\n const innerEndAdjustedAngle = endAngle - innerEnd / innerEndAdjustedRadius;\n ctx.beginPath();\n if (circular) {\n // The first arc segments from point 1 to point a to point 2\n const outerMidAdjustedAngle = (outerStartAdjustedAngle + outerEndAdjustedAngle) / 2;\n ctx.arc(x, y, outerRadius, outerStartAdjustedAngle, outerMidAdjustedAngle);\n ctx.arc(x, y, outerRadius, outerMidAdjustedAngle, outerEndAdjustedAngle);\n // The corner segment from point 2 to point 3\n if (outerEnd > 0) {\n const pCenter = rThetaToXY(outerEndAdjustedRadius, outerEndAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, outerEnd, outerEndAdjustedAngle, endAngle + HALF_PI);\n }\n // The line from point 3 to point 4\n const p4 = rThetaToXY(innerEndAdjustedRadius, endAngle, x, y);\n ctx.lineTo(p4.x, p4.y);\n // The corner segment from point 4 to point 5\n if (innerEnd > 0) {\n const pCenter = rThetaToXY(innerEndAdjustedRadius, innerEndAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, innerEnd, endAngle + HALF_PI, innerEndAdjustedAngle + Math.PI);\n }\n // The inner arc from point 5 to point b to point 6\n const innerMidAdjustedAngle = (endAngle - innerEnd / innerRadius + (startAngle + innerStart / innerRadius)) / 2;\n ctx.arc(x, y, innerRadius, endAngle - innerEnd / innerRadius, innerMidAdjustedAngle, true);\n ctx.arc(x, y, innerRadius, innerMidAdjustedAngle, startAngle + innerStart / innerRadius, true);\n // The corner segment from point 6 to point 7\n if (innerStart > 0) {\n const pCenter = rThetaToXY(innerStartAdjustedRadius, innerStartAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, innerStart, innerStartAdjustedAngle + Math.PI, startAngle - HALF_PI);\n }\n // The line from point 7 to point 8\n const p8 = rThetaToXY(outerStartAdjustedRadius, startAngle, x, y);\n ctx.lineTo(p8.x, p8.y);\n // The corner segment from point 8 to point 1\n if (outerStart > 0) {\n const pCenter = rThetaToXY(outerStartAdjustedRadius, outerStartAdjustedAngle, x, y);\n ctx.arc(pCenter.x, pCenter.y, outerStart, startAngle - HALF_PI, outerStartAdjustedAngle);\n }\n } else {\n ctx.moveTo(x, y);\n const outerStartX = Math.cos(outerStartAdjustedAngle) * outerRadius + x;\n const outerStartY = Math.sin(outerStartAdjustedAngle) * outerRadius + y;\n ctx.lineTo(outerStartX, outerStartY);\n const outerEndX = Math.cos(outerEndAdjustedAngle) * outerRadius + x;\n const outerEndY = Math.sin(outerEndAdjustedAngle) * outerRadius + y;\n ctx.lineTo(outerEndX, outerEndY);\n }\n ctx.closePath();\n}\nfunction drawArc(ctx, element, offset, spacing, circular) {\n const { fullCircles , startAngle , circumference } = element;\n let endAngle = element.endAngle;\n if (fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n for(let i = 0; i < fullCircles; ++i){\n ctx.fill();\n }\n if (!isNaN(circumference)) {\n endAngle = startAngle + (circumference % TAU || TAU);\n }\n }\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n ctx.fill();\n return endAngle;\n}\nfunction drawBorder(ctx, element, offset, spacing, circular) {\n const { fullCircles , startAngle , circumference , options } = element;\n const { borderWidth , borderJoinStyle , borderDash , borderDashOffset } = options;\n const inner = options.borderAlign === 'inner';\n if (!borderWidth) {\n return;\n }\n ctx.setLineDash(borderDash || []);\n ctx.lineDashOffset = borderDashOffset;\n if (inner) {\n ctx.lineWidth = borderWidth * 2;\n ctx.lineJoin = borderJoinStyle || 'round';\n } else {\n ctx.lineWidth = borderWidth;\n ctx.lineJoin = borderJoinStyle || 'bevel';\n }\n let endAngle = element.endAngle;\n if (fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n for(let i = 0; i < fullCircles; ++i){\n ctx.stroke();\n }\n if (!isNaN(circumference)) {\n endAngle = startAngle + (circumference % TAU || TAU);\n }\n }\n if (inner) {\n clipArc(ctx, element, endAngle);\n }\n if (!fullCircles) {\n pathArc(ctx, element, offset, spacing, endAngle, circular);\n ctx.stroke();\n }\n}\nclass ArcElement extends Element {\n static id = 'arc';\n static defaults = {\n borderAlign: 'center',\n borderColor: '#fff',\n borderDash: [],\n borderDashOffset: 0,\n borderJoinStyle: undefined,\n borderRadius: 0,\n borderWidth: 2,\n offset: 0,\n spacing: 0,\n angle: undefined,\n circular: true\n };\n static defaultRoutes = {\n backgroundColor: 'backgroundColor'\n };\n static descriptors = {\n _scriptable: true,\n _indexable: (name)=>name !== 'borderDash'\n };\n circumference;\n endAngle;\n fullCircles;\n innerRadius;\n outerRadius;\n pixelMargin;\n startAngle;\n constructor(cfg){\n super();\n this.options = undefined;\n this.circumference = undefined;\n this.startAngle = undefined;\n this.endAngle = undefined;\n this.innerRadius = undefined;\n this.outerRadius = undefined;\n this.pixelMargin = 0;\n this.fullCircles = 0;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n inRange(chartX, chartY, useFinalPosition) {\n const point = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n const { angle , distance } = getAngleFromPoint(point, {\n x: chartX,\n y: chartY\n });\n const { startAngle , endAngle , innerRadius , outerRadius , circumference } = this.getProps([\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius',\n 'circumference'\n ], useFinalPosition);\n const rAdjust = (this.options.spacing + this.options.borderWidth) / 2;\n const _circumference = valueOrDefault(circumference, endAngle - startAngle);\n const betweenAngles = _circumference >= TAU || _angleBetween(angle, startAngle, endAngle);\n const withinRadius = _isBetween(distance, innerRadius + rAdjust, outerRadius + rAdjust);\n return betweenAngles && withinRadius;\n }\n getCenterPoint(useFinalPosition) {\n const { x , y , startAngle , endAngle , innerRadius , outerRadius } = this.getProps([\n 'x',\n 'y',\n 'startAngle',\n 'endAngle',\n 'innerRadius',\n 'outerRadius'\n ], useFinalPosition);\n const { offset , spacing } = this.options;\n const halfAngle = (startAngle + endAngle) / 2;\n const halfRadius = (innerRadius + outerRadius + spacing + offset) / 2;\n return {\n x: x + Math.cos(halfAngle) * halfRadius,\n y: y + Math.sin(halfAngle) * halfRadius\n };\n }\n tooltipPosition(useFinalPosition) {\n return this.getCenterPoint(useFinalPosition);\n }\n draw(ctx) {\n const { options , circumference } = this;\n const offset = (options.offset || 0) / 4;\n const spacing = (options.spacing || 0) / 2;\n const circular = options.circular;\n this.pixelMargin = options.borderAlign === 'inner' ? 0.33 : 0;\n this.fullCircles = circumference > TAU ? Math.floor(circumference / TAU) : 0;\n if (circumference === 0 || this.innerRadius < 0 || this.outerRadius < 0) {\n return;\n }\n ctx.save();\n const halfAngle = (this.startAngle + this.endAngle) / 2;\n ctx.translate(Math.cos(halfAngle) * offset, Math.sin(halfAngle) * offset);\n const fix = 1 - Math.sin(Math.min(PI, circumference || 0));\n const radiusOffset = offset * fix;\n ctx.fillStyle = options.backgroundColor;\n ctx.strokeStyle = options.borderColor;\n drawArc(ctx, this, radiusOffset, spacing, circular);\n drawBorder(ctx, this, radiusOffset, spacing, circular);\n ctx.restore();\n }\n}\n\nfunction setStyle(ctx, options, style = options) {\n ctx.lineCap = valueOrDefault(style.borderCapStyle, options.borderCapStyle);\n ctx.setLineDash(valueOrDefault(style.borderDash, options.borderDash));\n ctx.lineDashOffset = valueOrDefault(style.borderDashOffset, options.borderDashOffset);\n ctx.lineJoin = valueOrDefault(style.borderJoinStyle, options.borderJoinStyle);\n ctx.lineWidth = valueOrDefault(style.borderWidth, options.borderWidth);\n ctx.strokeStyle = valueOrDefault(style.borderColor, options.borderColor);\n}\nfunction lineTo(ctx, previous, target) {\n ctx.lineTo(target.x, target.y);\n}\n function getLineMethod(options) {\n if (options.stepped) {\n return _steppedLineTo;\n }\n if (options.tension || options.cubicInterpolationMode === 'monotone') {\n return _bezierCurveTo;\n }\n return lineTo;\n}\nfunction pathVars(points, segment, params = {}) {\n const count = points.length;\n const { start: paramsStart = 0 , end: paramsEnd = count - 1 } = params;\n const { start: segmentStart , end: segmentEnd } = segment;\n const start = Math.max(paramsStart, segmentStart);\n const end = Math.min(paramsEnd, segmentEnd);\n const outside = paramsStart < segmentStart && paramsEnd < segmentStart || paramsStart > segmentEnd && paramsEnd > segmentEnd;\n return {\n count,\n start,\n loop: segment.loop,\n ilen: end < start && !outside ? count + end - start : end - start\n };\n}\n function pathSegment(ctx, line, segment, params) {\n const { points , options } = line;\n const { count , start , loop , ilen } = pathVars(points, segment, params);\n const lineMethod = getLineMethod(options);\n let { move =true , reverse } = params || {};\n let i, point, prev;\n for(i = 0; i <= ilen; ++i){\n point = points[(start + (reverse ? ilen - i : i)) % count];\n if (point.skip) {\n continue;\n } else if (move) {\n ctx.moveTo(point.x, point.y);\n move = false;\n } else {\n lineMethod(ctx, prev, point, reverse, options.stepped);\n }\n prev = point;\n }\n if (loop) {\n point = points[(start + (reverse ? ilen : 0)) % count];\n lineMethod(ctx, prev, point, reverse, options.stepped);\n }\n return !!loop;\n}\n function fastPathSegment(ctx, line, segment, params) {\n const points = line.points;\n const { count , start , ilen } = pathVars(points, segment, params);\n const { move =true , reverse } = params || {};\n let avgX = 0;\n let countX = 0;\n let i, point, prevX, minY, maxY, lastY;\n const pointIndex = (index)=>(start + (reverse ? ilen - index : index)) % count;\n const drawX = ()=>{\n if (minY !== maxY) {\n ctx.lineTo(avgX, maxY);\n ctx.lineTo(avgX, minY);\n ctx.lineTo(avgX, lastY);\n }\n };\n if (move) {\n point = points[pointIndex(0)];\n ctx.moveTo(point.x, point.y);\n }\n for(i = 0; i <= ilen; ++i){\n point = points[pointIndex(i)];\n if (point.skip) {\n continue;\n }\n const x = point.x;\n const y = point.y;\n const truncX = x | 0;\n if (truncX === prevX) {\n if (y < minY) {\n minY = y;\n } else if (y > maxY) {\n maxY = y;\n }\n avgX = (countX * avgX + x) / ++countX;\n } else {\n drawX();\n ctx.lineTo(x, y);\n prevX = truncX;\n countX = 0;\n minY = maxY = y;\n }\n lastY = y;\n }\n drawX();\n}\n function _getSegmentMethod(line) {\n const opts = line.options;\n const borderDash = opts.borderDash && opts.borderDash.length;\n const useFastPath = !line._decimated && !line._loop && !opts.tension && opts.cubicInterpolationMode !== 'monotone' && !opts.stepped && !borderDash;\n return useFastPath ? fastPathSegment : pathSegment;\n}\n function _getInterpolationMethod(options) {\n if (options.stepped) {\n return _steppedInterpolation;\n }\n if (options.tension || options.cubicInterpolationMode === 'monotone') {\n return _bezierInterpolation;\n }\n return _pointInLine;\n}\nfunction strokePathWithCache(ctx, line, start, count) {\n let path = line._path;\n if (!path) {\n path = line._path = new Path2D();\n if (line.path(path, start, count)) {\n path.closePath();\n }\n }\n setStyle(ctx, line.options);\n ctx.stroke(path);\n}\nfunction strokePathDirect(ctx, line, start, count) {\n const { segments , options } = line;\n const segmentMethod = _getSegmentMethod(line);\n for (const segment of segments){\n setStyle(ctx, options, segment.style);\n ctx.beginPath();\n if (segmentMethod(ctx, line, segment, {\n start,\n end: start + count - 1\n })) {\n ctx.closePath();\n }\n ctx.stroke();\n }\n}\nconst usePath2D = typeof Path2D === 'function';\nfunction draw(ctx, line, start, count) {\n if (usePath2D && !line.options.segment) {\n strokePathWithCache(ctx, line, start, count);\n } else {\n strokePathDirect(ctx, line, start, count);\n }\n}\nclass LineElement extends Element {\n static id = 'line';\n static defaults = {\n borderCapStyle: 'butt',\n borderDash: [],\n borderDashOffset: 0,\n borderJoinStyle: 'miter',\n borderWidth: 3,\n capBezierPoints: true,\n cubicInterpolationMode: 'default',\n fill: false,\n spanGaps: false,\n stepped: false,\n tension: 0\n };\n static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n static descriptors = {\n _scriptable: true,\n _indexable: (name)=>name !== 'borderDash' && name !== 'fill'\n };\n constructor(cfg){\n super();\n this.animated = true;\n this.options = undefined;\n this._chart = undefined;\n this._loop = undefined;\n this._fullLoop = undefined;\n this._path = undefined;\n this._points = undefined;\n this._segments = undefined;\n this._decimated = false;\n this._pointsUpdated = false;\n this._datasetIndex = undefined;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n updateControlPoints(chartArea, indexAxis) {\n const options = this.options;\n if ((options.tension || options.cubicInterpolationMode === 'monotone') && !options.stepped && !this._pointsUpdated) {\n const loop = options.spanGaps ? this._loop : this._fullLoop;\n _updateBezierControlPoints(this._points, options, chartArea, loop, indexAxis);\n this._pointsUpdated = true;\n }\n }\n set points(points) {\n this._points = points;\n delete this._segments;\n delete this._path;\n this._pointsUpdated = false;\n }\n get points() {\n return this._points;\n }\n get segments() {\n return this._segments || (this._segments = _computeSegments(this, this.options.segment));\n }\n first() {\n const segments = this.segments;\n const points = this.points;\n return segments.length && points[segments[0].start];\n }\n last() {\n const segments = this.segments;\n const points = this.points;\n const count = segments.length;\n return count && points[segments[count - 1].end];\n }\n interpolate(point, property) {\n const options = this.options;\n const value = point[property];\n const points = this.points;\n const segments = _boundSegments(this, {\n property,\n start: value,\n end: value\n });\n if (!segments.length) {\n return;\n }\n const result = [];\n const _interpolate = _getInterpolationMethod(options);\n let i, ilen;\n for(i = 0, ilen = segments.length; i < ilen; ++i){\n const { start , end } = segments[i];\n const p1 = points[start];\n const p2 = points[end];\n if (p1 === p2) {\n result.push(p1);\n continue;\n }\n const t = Math.abs((value - p1[property]) / (p2[property] - p1[property]));\n const interpolated = _interpolate(p1, p2, t, options.stepped);\n interpolated[property] = point[property];\n result.push(interpolated);\n }\n return result.length === 1 ? result[0] : result;\n }\n pathSegment(ctx, segment, params) {\n const segmentMethod = _getSegmentMethod(this);\n return segmentMethod(ctx, this, segment, params);\n }\n path(ctx, start, count) {\n const segments = this.segments;\n const segmentMethod = _getSegmentMethod(this);\n let loop = this._loop;\n start = start || 0;\n count = count || this.points.length - start;\n for (const segment of segments){\n loop &= segmentMethod(ctx, this, segment, {\n start,\n end: start + count - 1\n });\n }\n return !!loop;\n }\n draw(ctx, chartArea, start, count) {\n const options = this.options || {};\n const points = this.points || [];\n if (points.length && options.borderWidth) {\n ctx.save();\n draw(ctx, this, start, count);\n ctx.restore();\n }\n if (this.animated) {\n this._pointsUpdated = false;\n this._path = undefined;\n }\n }\n}\n\nfunction inRange$1(el, pos, axis, useFinalPosition) {\n const options = el.options;\n const { [axis]: value } = el.getProps([\n axis\n ], useFinalPosition);\n return Math.abs(pos - value) < options.radius + options.hitRadius;\n}\nclass PointElement extends Element {\n static id = 'point';\n parsed;\n skip;\n stop;\n /**\n * @type {any}\n */ static defaults = {\n borderWidth: 1,\n hitRadius: 1,\n hoverBorderWidth: 1,\n hoverRadius: 4,\n pointStyle: 'circle',\n radius: 3,\n rotation: 0\n };\n /**\n * @type {any}\n */ static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n constructor(cfg){\n super();\n this.options = undefined;\n this.parsed = undefined;\n this.skip = undefined;\n this.stop = undefined;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n inRange(mouseX, mouseY, useFinalPosition) {\n const options = this.options;\n const { x , y } = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n return Math.pow(mouseX - x, 2) + Math.pow(mouseY - y, 2) < Math.pow(options.hitRadius + options.radius, 2);\n }\n inXRange(mouseX, useFinalPosition) {\n return inRange$1(this, mouseX, 'x', useFinalPosition);\n }\n inYRange(mouseY, useFinalPosition) {\n return inRange$1(this, mouseY, 'y', useFinalPosition);\n }\n getCenterPoint(useFinalPosition) {\n const { x , y } = this.getProps([\n 'x',\n 'y'\n ], useFinalPosition);\n return {\n x,\n y\n };\n }\n size(options) {\n options = options || this.options || {};\n let radius = options.radius || 0;\n radius = Math.max(radius, radius && options.hoverRadius || 0);\n const borderWidth = radius && options.borderWidth || 0;\n return (radius + borderWidth) * 2;\n }\n draw(ctx, area) {\n const options = this.options;\n if (this.skip || options.radius < 0.1 || !_isPointInArea(this, area, this.size(options) / 2)) {\n return;\n }\n ctx.strokeStyle = options.borderColor;\n ctx.lineWidth = options.borderWidth;\n ctx.fillStyle = options.backgroundColor;\n drawPoint(ctx, options, this.x, this.y);\n }\n getRange() {\n const options = this.options || {};\n // @ts-expect-error Fallbacks should never be hit in practice\n return options.radius + options.hitRadius;\n }\n}\n\nfunction getBarBounds(bar, useFinalPosition) {\n const { x , y , base , width , height } = bar.getProps([\n 'x',\n 'y',\n 'base',\n 'width',\n 'height'\n ], useFinalPosition);\n let left, right, top, bottom, half;\n if (bar.horizontal) {\n half = height / 2;\n left = Math.min(x, base);\n right = Math.max(x, base);\n top = y - half;\n bottom = y + half;\n } else {\n half = width / 2;\n left = x - half;\n right = x + half;\n top = Math.min(y, base);\n bottom = Math.max(y, base);\n }\n return {\n left,\n top,\n right,\n bottom\n };\n}\nfunction skipOrLimit(skip, value, min, max) {\n return skip ? 0 : _limitValue(value, min, max);\n}\nfunction parseBorderWidth(bar, maxW, maxH) {\n const value = bar.options.borderWidth;\n const skip = bar.borderSkipped;\n const o = toTRBL(value);\n return {\n t: skipOrLimit(skip.top, o.top, 0, maxH),\n r: skipOrLimit(skip.right, o.right, 0, maxW),\n b: skipOrLimit(skip.bottom, o.bottom, 0, maxH),\n l: skipOrLimit(skip.left, o.left, 0, maxW)\n };\n}\nfunction parseBorderRadius(bar, maxW, maxH) {\n const { enableBorderRadius } = bar.getProps([\n 'enableBorderRadius'\n ]);\n const value = bar.options.borderRadius;\n const o = toTRBLCorners(value);\n const maxR = Math.min(maxW, maxH);\n const skip = bar.borderSkipped;\n const enableBorder = enableBorderRadius || isObject(value);\n return {\n topLeft: skipOrLimit(!enableBorder || skip.top || skip.left, o.topLeft, 0, maxR),\n topRight: skipOrLimit(!enableBorder || skip.top || skip.right, o.topRight, 0, maxR),\n bottomLeft: skipOrLimit(!enableBorder || skip.bottom || skip.left, o.bottomLeft, 0, maxR),\n bottomRight: skipOrLimit(!enableBorder || skip.bottom || skip.right, o.bottomRight, 0, maxR)\n };\n}\nfunction boundingRects(bar) {\n const bounds = getBarBounds(bar);\n const width = bounds.right - bounds.left;\n const height = bounds.bottom - bounds.top;\n const border = parseBorderWidth(bar, width / 2, height / 2);\n const radius = parseBorderRadius(bar, width / 2, height / 2);\n return {\n outer: {\n x: bounds.left,\n y: bounds.top,\n w: width,\n h: height,\n radius\n },\n inner: {\n x: bounds.left + border.l,\n y: bounds.top + border.t,\n w: width - border.l - border.r,\n h: height - border.t - border.b,\n radius: {\n topLeft: Math.max(0, radius.topLeft - Math.max(border.t, border.l)),\n topRight: Math.max(0, radius.topRight - Math.max(border.t, border.r)),\n bottomLeft: Math.max(0, radius.bottomLeft - Math.max(border.b, border.l)),\n bottomRight: Math.max(0, radius.bottomRight - Math.max(border.b, border.r))\n }\n }\n };\n}\nfunction inRange(bar, x, y, useFinalPosition) {\n const skipX = x === null;\n const skipY = y === null;\n const skipBoth = skipX && skipY;\n const bounds = bar && !skipBoth && getBarBounds(bar, useFinalPosition);\n return bounds && (skipX || _isBetween(x, bounds.left, bounds.right)) && (skipY || _isBetween(y, bounds.top, bounds.bottom));\n}\nfunction hasRadius(radius) {\n return radius.topLeft || radius.topRight || radius.bottomLeft || radius.bottomRight;\n}\n function addNormalRectPath(ctx, rect) {\n ctx.rect(rect.x, rect.y, rect.w, rect.h);\n}\nfunction inflateRect(rect, amount, refRect = {}) {\n const x = rect.x !== refRect.x ? -amount : 0;\n const y = rect.y !== refRect.y ? -amount : 0;\n const w = (rect.x + rect.w !== refRect.x + refRect.w ? amount : 0) - x;\n const h = (rect.y + rect.h !== refRect.y + refRect.h ? amount : 0) - y;\n return {\n x: rect.x + x,\n y: rect.y + y,\n w: rect.w + w,\n h: rect.h + h,\n radius: rect.radius\n };\n}\nclass BarElement extends Element {\n static id = 'bar';\n static defaults = {\n borderSkipped: 'start',\n borderWidth: 0,\n borderRadius: 0,\n inflateAmount: 'auto',\n pointStyle: undefined\n };\n static defaultRoutes = {\n backgroundColor: 'backgroundColor',\n borderColor: 'borderColor'\n };\n constructor(cfg){\n super();\n this.options = undefined;\n this.horizontal = undefined;\n this.base = undefined;\n this.width = undefined;\n this.height = undefined;\n this.inflateAmount = undefined;\n if (cfg) {\n Object.assign(this, cfg);\n }\n }\n draw(ctx) {\n const { inflateAmount , options: { borderColor , backgroundColor } } = this;\n const { inner , outer } = boundingRects(this);\n const addRectPath = hasRadius(outer.radius) ? addRoundedRectPath : addNormalRectPath;\n ctx.save();\n if (outer.w !== inner.w || outer.h !== inner.h) {\n ctx.beginPath();\n addRectPath(ctx, inflateRect(outer, inflateAmount, inner));\n ctx.clip();\n addRectPath(ctx, inflateRect(inner, -inflateAmount, outer));\n ctx.fillStyle = borderColor;\n ctx.fill('evenodd');\n }\n ctx.beginPath();\n addRectPath(ctx, inflateRect(inner, inflateAmount));\n ctx.fillStyle = backgroundColor;\n ctx.fill();\n ctx.restore();\n }\n inRange(mouseX, mouseY, useFinalPosition) {\n return inRange(this, mouseX, mouseY, useFinalPosition);\n }\n inXRange(mouseX, useFinalPosition) {\n return inRange(this, mouseX, null, useFinalPosition);\n }\n inYRange(mouseY, useFinalPosition) {\n return inRange(this, null, mouseY, useFinalPosition);\n }\n getCenterPoint(useFinalPosition) {\n const { x , y , base , horizontal } = this.getProps([\n 'x',\n 'y',\n 'base',\n 'horizontal'\n ], useFinalPosition);\n return {\n x: horizontal ? (x + base) / 2 : x,\n y: horizontal ? y : (y + base) / 2\n };\n }\n getRange(axis) {\n return axis === 'x' ? this.width / 2 : this.height / 2;\n }\n}\n\nvar elements = /*#__PURE__*/Object.freeze({\n__proto__: null,\nArcElement: ArcElement,\nBarElement: BarElement,\nLineElement: LineElement,\nPointElement: PointElement\n});\n\nconst BORDER_COLORS = [\n 'rgb(54, 162, 235)',\n 'rgb(255, 99, 132)',\n 'rgb(255, 159, 64)',\n 'rgb(255, 205, 86)',\n 'rgb(75, 192, 192)',\n 'rgb(153, 102, 255)',\n 'rgb(201, 203, 207)' // grey\n];\n// Border colors with 50% transparency\nconst BACKGROUND_COLORS = /* #__PURE__ */ BORDER_COLORS.map((color)=>color.replace('rgb(', 'rgba(').replace(')', ', 0.5)'));\nfunction getBorderColor(i) {\n return BORDER_COLORS[i % BORDER_COLORS.length];\n}\nfunction getBackgroundColor(i) {\n return BACKGROUND_COLORS[i % BACKGROUND_COLORS.length];\n}\nfunction colorizeDefaultDataset(dataset, i) {\n dataset.borderColor = getBorderColor(i);\n dataset.backgroundColor = getBackgroundColor(i);\n return ++i;\n}\nfunction colorizeDoughnutDataset(dataset, i) {\n dataset.backgroundColor = dataset.data.map(()=>getBorderColor(i++));\n return i;\n}\nfunction colorizePolarAreaDataset(dataset, i) {\n dataset.backgroundColor = dataset.data.map(()=>getBackgroundColor(i++));\n return i;\n}\nfunction getColorizer(chart) {\n let i = 0;\n return (dataset, datasetIndex)=>{\n const controller = chart.getDatasetMeta(datasetIndex).controller;\n if (controller instanceof DoughnutController) {\n i = colorizeDoughnutDataset(dataset, i);\n } else if (controller instanceof PolarAreaController) {\n i = colorizePolarAreaDataset(dataset, i);\n } else if (controller) {\n i = colorizeDefaultDataset(dataset, i);\n }\n };\n}\nfunction containsColorsDefinitions(descriptors) {\n let k;\n for(k in descriptors){\n if (descriptors[k].borderColor || descriptors[k].backgroundColor) {\n return true;\n }\n }\n return false;\n}\nfunction containsColorsDefinition(descriptor) {\n return descriptor && (descriptor.borderColor || descriptor.backgroundColor);\n}\nvar plugin_colors = {\n id: 'colors',\n defaults: {\n enabled: true,\n forceOverride: false\n },\n beforeLayout (chart, _args, options) {\n if (!options.enabled) {\n return;\n }\n const { data: { datasets } , options: chartOptions } = chart.config;\n const { elements } = chartOptions;\n if (!options.forceOverride && (containsColorsDefinitions(datasets) || containsColorsDefinition(chartOptions) || elements && containsColorsDefinitions(elements))) {\n return;\n }\n const colorizer = getColorizer(chart);\n datasets.forEach(colorizer);\n }\n};\n\nfunction lttbDecimation(data, start, count, availableWidth, options) {\n const samples = options.samples || availableWidth;\n if (samples >= count) {\n return data.slice(start, start + count);\n }\n const decimated = [];\n const bucketWidth = (count - 2) / (samples - 2);\n let sampledIndex = 0;\n const endIndex = start + count - 1;\n let a = start;\n let i, maxAreaPoint, maxArea, area, nextA;\n decimated[sampledIndex++] = data[a];\n for(i = 0; i < samples - 2; i++){\n let avgX = 0;\n let avgY = 0;\n let j;\n const avgRangeStart = Math.floor((i + 1) * bucketWidth) + 1 + start;\n const avgRangeEnd = Math.min(Math.floor((i + 2) * bucketWidth) + 1, count) + start;\n const avgRangeLength = avgRangeEnd - avgRangeStart;\n for(j = avgRangeStart; j < avgRangeEnd; j++){\n avgX += data[j].x;\n avgY += data[j].y;\n }\n avgX /= avgRangeLength;\n avgY /= avgRangeLength;\n const rangeOffs = Math.floor(i * bucketWidth) + 1 + start;\n const rangeTo = Math.min(Math.floor((i + 1) * bucketWidth) + 1, count) + start;\n const { x: pointAx , y: pointAy } = data[a];\n maxArea = area = -1;\n for(j = rangeOffs; j < rangeTo; j++){\n area = 0.5 * Math.abs((pointAx - avgX) * (data[j].y - pointAy) - (pointAx - data[j].x) * (avgY - pointAy));\n if (area > maxArea) {\n maxArea = area;\n maxAreaPoint = data[j];\n nextA = j;\n }\n }\n decimated[sampledIndex++] = maxAreaPoint;\n a = nextA;\n }\n decimated[sampledIndex++] = data[endIndex];\n return decimated;\n}\nfunction minMaxDecimation(data, start, count, availableWidth) {\n let avgX = 0;\n let countX = 0;\n let i, point, x, y, prevX, minIndex, maxIndex, startIndex, minY, maxY;\n const decimated = [];\n const endIndex = start + count - 1;\n const xMin = data[start].x;\n const xMax = data[endIndex].x;\n const dx = xMax - xMin;\n for(i = start; i < start + count; ++i){\n point = data[i];\n x = (point.x - xMin) / dx * availableWidth;\n y = point.y;\n const truncX = x | 0;\n if (truncX === prevX) {\n if (y < minY) {\n minY = y;\n minIndex = i;\n } else if (y > maxY) {\n maxY = y;\n maxIndex = i;\n }\n avgX = (countX * avgX + point.x) / ++countX;\n } else {\n const lastIndex = i - 1;\n if (!isNullOrUndef(minIndex) && !isNullOrUndef(maxIndex)) {\n const intermediateIndex1 = Math.min(minIndex, maxIndex);\n const intermediateIndex2 = Math.max(minIndex, maxIndex);\n if (intermediateIndex1 !== startIndex && intermediateIndex1 !== lastIndex) {\n decimated.push({\n ...data[intermediateIndex1],\n x: avgX\n });\n }\n if (intermediateIndex2 !== startIndex && intermediateIndex2 !== lastIndex) {\n decimated.push({\n ...data[intermediateIndex2],\n x: avgX\n });\n }\n }\n if (i > 0 && lastIndex !== startIndex) {\n decimated.push(data[lastIndex]);\n }\n decimated.push(point);\n prevX = truncX;\n countX = 0;\n minY = maxY = y;\n minIndex = maxIndex = startIndex = i;\n }\n }\n return decimated;\n}\nfunction cleanDecimatedDataset(dataset) {\n if (dataset._decimated) {\n const data = dataset._data;\n delete dataset._decimated;\n delete dataset._data;\n Object.defineProperty(dataset, 'data', {\n configurable: true,\n enumerable: true,\n writable: true,\n value: data\n });\n }\n}\nfunction cleanDecimatedData(chart) {\n chart.data.datasets.forEach((dataset)=>{\n cleanDecimatedDataset(dataset);\n });\n}\nfunction getStartAndCountOfVisiblePointsSimplified(meta, points) {\n const pointCount = points.length;\n let start = 0;\n let count;\n const { iScale } = meta;\n const { min , max , minDefined , maxDefined } = iScale.getUserBounds();\n if (minDefined) {\n start = _limitValue(_lookupByKey(points, iScale.axis, min).lo, 0, pointCount - 1);\n }\n if (maxDefined) {\n count = _limitValue(_lookupByKey(points, iScale.axis, max).hi + 1, start, pointCount) - start;\n } else {\n count = pointCount - start;\n }\n return {\n start,\n count\n };\n}\nvar plugin_decimation = {\n id: 'decimation',\n defaults: {\n algorithm: 'min-max',\n enabled: false\n },\n beforeElementsUpdate: (chart, args, options)=>{\n if (!options.enabled) {\n cleanDecimatedData(chart);\n return;\n }\n const availableWidth = chart.width;\n chart.data.datasets.forEach((dataset, datasetIndex)=>{\n const { _data , indexAxis } = dataset;\n const meta = chart.getDatasetMeta(datasetIndex);\n const data = _data || dataset.data;\n if (resolve([\n indexAxis,\n chart.options.indexAxis\n ]) === 'y') {\n return;\n }\n if (!meta.controller.supportsDecimation) {\n return;\n }\n const xAxis = chart.scales[meta.xAxisID];\n if (xAxis.type !== 'linear' && xAxis.type !== 'time') {\n return;\n }\n if (chart.options.parsing) {\n return;\n }\n let { start , count } = getStartAndCountOfVisiblePointsSimplified(meta, data);\n const threshold = options.threshold || 4 * availableWidth;\n if (count <= threshold) {\n cleanDecimatedDataset(dataset);\n return;\n }\n if (isNullOrUndef(_data)) {\n dataset._data = data;\n delete dataset.data;\n Object.defineProperty(dataset, 'data', {\n configurable: true,\n enumerable: true,\n get: function() {\n return this._decimated;\n },\n set: function(d) {\n this._data = d;\n }\n });\n }\n let decimated;\n switch(options.algorithm){\n case 'lttb':\n decimated = lttbDecimation(data, start, count, availableWidth, options);\n break;\n case 'min-max':\n decimated = minMaxDecimation(data, start, count, availableWidth);\n break;\n default:\n throw new Error(`Unsupported decimation algorithm '${options.algorithm}'`);\n }\n dataset._decimated = decimated;\n });\n },\n destroy (chart) {\n cleanDecimatedData(chart);\n }\n};\n\nfunction _segments(line, target, property) {\n const segments = line.segments;\n const points = line.points;\n const tpoints = target.points;\n const parts = [];\n for (const segment of segments){\n let { start , end } = segment;\n end = _findSegmentEnd(start, end, points);\n const bounds = _getBounds(property, points[start], points[end], segment.loop);\n if (!target.segments) {\n parts.push({\n source: segment,\n target: bounds,\n start: points[start],\n end: points[end]\n });\n continue;\n }\n const targetSegments = _boundSegments(target, bounds);\n for (const tgt of targetSegments){\n const subBounds = _getBounds(property, tpoints[tgt.start], tpoints[tgt.end], tgt.loop);\n const fillSources = _boundSegment(segment, points, subBounds);\n for (const fillSource of fillSources){\n parts.push({\n source: fillSource,\n target: tgt,\n start: {\n [property]: _getEdge(bounds, subBounds, 'start', Math.max)\n },\n end: {\n [property]: _getEdge(bounds, subBounds, 'end', Math.min)\n }\n });\n }\n }\n }\n return parts;\n}\nfunction _getBounds(property, first, last, loop) {\n if (loop) {\n return;\n }\n let start = first[property];\n let end = last[property];\n if (property === 'angle') {\n start = _normalizeAngle(start);\n end = _normalizeAngle(end);\n }\n return {\n property,\n start,\n end\n };\n}\nfunction _pointsFromSegments(boundary, line) {\n const { x =null , y =null } = boundary || {};\n const linePoints = line.points;\n const points = [];\n line.segments.forEach(({ start , end })=>{\n end = _findSegmentEnd(start, end, linePoints);\n const first = linePoints[start];\n const last = linePoints[end];\n if (y !== null) {\n points.push({\n x: first.x,\n y\n });\n points.push({\n x: last.x,\n y\n });\n } else if (x !== null) {\n points.push({\n x,\n y: first.y\n });\n points.push({\n x,\n y: last.y\n });\n }\n });\n return points;\n}\nfunction _findSegmentEnd(start, end, points) {\n for(; end > start; end--){\n const point = points[end];\n if (!isNaN(point.x) && !isNaN(point.y)) {\n break;\n }\n }\n return end;\n}\nfunction _getEdge(a, b, prop, fn) {\n if (a && b) {\n return fn(a[prop], b[prop]);\n }\n return a ? a[prop] : b ? b[prop] : 0;\n}\n\nfunction _createBoundaryLine(boundary, line) {\n let points = [];\n let _loop = false;\n if (isArray(boundary)) {\n _loop = true;\n points = boundary;\n } else {\n points = _pointsFromSegments(boundary, line);\n }\n return points.length ? new LineElement({\n points,\n options: {\n tension: 0\n },\n _loop,\n _fullLoop: _loop\n }) : null;\n}\nfunction _shouldApplyFill(source) {\n return source && source.fill !== false;\n}\n\nfunction _resolveTarget(sources, index, propagate) {\n const source = sources[index];\n let fill = source.fill;\n const visited = [\n index\n ];\n let target;\n if (!propagate) {\n return fill;\n }\n while(fill !== false && visited.indexOf(fill) === -1){\n if (!isNumberFinite(fill)) {\n return fill;\n }\n target = sources[fill];\n if (!target) {\n return false;\n }\n if (target.visible) {\n return fill;\n }\n visited.push(fill);\n fill = target.fill;\n }\n return false;\n}\n function _decodeFill(line, index, count) {\n const fill = parseFillOption(line);\n if (isObject(fill)) {\n return isNaN(fill.value) ? false : fill;\n }\n let target = parseFloat(fill);\n if (isNumberFinite(target) && Math.floor(target) === target) {\n return decodeTargetIndex(fill[0], index, target, count);\n }\n return [\n 'origin',\n 'start',\n 'end',\n 'stack',\n 'shape'\n ].indexOf(fill) >= 0 && fill;\n}\nfunction decodeTargetIndex(firstCh, index, target, count) {\n if (firstCh === '-' || firstCh === '+') {\n target = index + target;\n }\n if (target === index || target < 0 || target >= count) {\n return false;\n }\n return target;\n}\n function _getTargetPixel(fill, scale) {\n let pixel = null;\n if (fill === 'start') {\n pixel = scale.bottom;\n } else if (fill === 'end') {\n pixel = scale.top;\n } else if (isObject(fill)) {\n pixel = scale.getPixelForValue(fill.value);\n } else if (scale.getBasePixel) {\n pixel = scale.getBasePixel();\n }\n return pixel;\n}\n function _getTargetValue(fill, scale, startValue) {\n let value;\n if (fill === 'start') {\n value = startValue;\n } else if (fill === 'end') {\n value = scale.options.reverse ? scale.min : scale.max;\n } else if (isObject(fill)) {\n value = fill.value;\n } else {\n value = scale.getBaseValue();\n }\n return value;\n}\n function parseFillOption(line) {\n const options = line.options;\n const fillOption = options.fill;\n let fill = valueOrDefault(fillOption && fillOption.target, fillOption);\n if (fill === undefined) {\n fill = !!options.backgroundColor;\n }\n if (fill === false || fill === null) {\n return false;\n }\n if (fill === true) {\n return 'origin';\n }\n return fill;\n}\n\nfunction _buildStackLine(source) {\n const { scale , index , line } = source;\n const points = [];\n const segments = line.segments;\n const sourcePoints = line.points;\n const linesBelow = getLinesBelow(scale, index);\n linesBelow.push(_createBoundaryLine({\n x: null,\n y: scale.bottom\n }, line));\n for(let i = 0; i < segments.length; i++){\n const segment = segments[i];\n for(let j = segment.start; j <= segment.end; j++){\n addPointsBelow(points, sourcePoints[j], linesBelow);\n }\n }\n return new LineElement({\n points,\n options: {}\n });\n}\n function getLinesBelow(scale, index) {\n const below = [];\n const metas = scale.getMatchingVisibleMetas('line');\n for(let i = 0; i < metas.length; i++){\n const meta = metas[i];\n if (meta.index === index) {\n break;\n }\n if (!meta.hidden) {\n below.unshift(meta.dataset);\n }\n }\n return below;\n}\n function addPointsBelow(points, sourcePoint, linesBelow) {\n const postponed = [];\n for(let j = 0; j < linesBelow.length; j++){\n const line = linesBelow[j];\n const { first , last , point } = findPoint(line, sourcePoint, 'x');\n if (!point || first && last) {\n continue;\n }\n if (first) {\n postponed.unshift(point);\n } else {\n points.push(point);\n if (!last) {\n break;\n }\n }\n }\n points.push(...postponed);\n}\n function findPoint(line, sourcePoint, property) {\n const point = line.interpolate(sourcePoint, property);\n if (!point) {\n return {};\n }\n const pointValue = point[property];\n const segments = line.segments;\n const linePoints = line.points;\n let first = false;\n let last = false;\n for(let i = 0; i < segments.length; i++){\n const segment = segments[i];\n const firstValue = linePoints[segment.start][property];\n const lastValue = linePoints[segment.end][property];\n if (_isBetween(pointValue, firstValue, lastValue)) {\n first = pointValue === firstValue;\n last = pointValue === lastValue;\n break;\n }\n }\n return {\n first,\n last,\n point\n };\n}\n\nclass simpleArc {\n constructor(opts){\n this.x = opts.x;\n this.y = opts.y;\n this.radius = opts.radius;\n }\n pathSegment(ctx, bounds, opts) {\n const { x , y , radius } = this;\n bounds = bounds || {\n start: 0,\n end: TAU\n };\n ctx.arc(x, y, radius, bounds.end, bounds.start, true);\n return !opts.bounds;\n }\n interpolate(point) {\n const { x , y , radius } = this;\n const angle = point.angle;\n return {\n x: x + Math.cos(angle) * radius,\n y: y + Math.sin(angle) * radius,\n angle\n };\n }\n}\n\nfunction _getTarget(source) {\n const { chart , fill , line } = source;\n if (isNumberFinite(fill)) {\n return getLineByIndex(chart, fill);\n }\n if (fill === 'stack') {\n return _buildStackLine(source);\n }\n if (fill === 'shape') {\n return true;\n }\n const boundary = computeBoundary(source);\n if (boundary instanceof simpleArc) {\n return boundary;\n }\n return _createBoundaryLine(boundary, line);\n}\n function getLineByIndex(chart, index) {\n const meta = chart.getDatasetMeta(index);\n const visible = meta && chart.isDatasetVisible(index);\n return visible ? meta.dataset : null;\n}\nfunction computeBoundary(source) {\n const scale = source.scale || {};\n if (scale.getPointPositionForValue) {\n return computeCircularBoundary(source);\n }\n return computeLinearBoundary(source);\n}\nfunction computeLinearBoundary(source) {\n const { scale ={} , fill } = source;\n const pixel = _getTargetPixel(fill, scale);\n if (isNumberFinite(pixel)) {\n const horizontal = scale.isHorizontal();\n return {\n x: horizontal ? pixel : null,\n y: horizontal ? null : pixel\n };\n }\n return null;\n}\nfunction computeCircularBoundary(source) {\n const { scale , fill } = source;\n const options = scale.options;\n const length = scale.getLabels().length;\n const start = options.reverse ? scale.max : scale.min;\n const value = _getTargetValue(fill, scale, start);\n const target = [];\n if (options.grid.circular) {\n const center = scale.getPointPositionForValue(0, start);\n return new simpleArc({\n x: center.x,\n y: center.y,\n radius: scale.getDistanceFromCenterForValue(value)\n });\n }\n for(let i = 0; i < length; ++i){\n target.push(scale.getPointPositionForValue(i, value));\n }\n return target;\n}\n\nfunction _drawfill(ctx, source, area) {\n const target = _getTarget(source);\n const { line , scale , axis } = source;\n const lineOpts = line.options;\n const fillOption = lineOpts.fill;\n const color = lineOpts.backgroundColor;\n const { above =color , below =color } = fillOption || {};\n if (target && line.points.length) {\n clipArea(ctx, area);\n doFill(ctx, {\n line,\n target,\n above,\n below,\n area,\n scale,\n axis\n });\n unclipArea(ctx);\n }\n}\nfunction doFill(ctx, cfg) {\n const { line , target , above , below , area , scale } = cfg;\n const property = line._loop ? 'angle' : cfg.axis;\n ctx.save();\n if (property === 'x' && below !== above) {\n clipVertical(ctx, target, area.top);\n fill(ctx, {\n line,\n target,\n color: above,\n scale,\n property\n });\n ctx.restore();\n ctx.save();\n clipVertical(ctx, target, area.bottom);\n }\n fill(ctx, {\n line,\n target,\n color: below,\n scale,\n property\n });\n ctx.restore();\n}\nfunction clipVertical(ctx, target, clipY) {\n const { segments , points } = target;\n let first = true;\n let lineLoop = false;\n ctx.beginPath();\n for (const segment of segments){\n const { start , end } = segment;\n const firstPoint = points[start];\n const lastPoint = points[_findSegmentEnd(start, end, points)];\n if (first) {\n ctx.moveTo(firstPoint.x, firstPoint.y);\n first = false;\n } else {\n ctx.lineTo(firstPoint.x, clipY);\n ctx.lineTo(firstPoint.x, firstPoint.y);\n }\n lineLoop = !!target.pathSegment(ctx, segment, {\n move: lineLoop\n });\n if (lineLoop) {\n ctx.closePath();\n } else {\n ctx.lineTo(lastPoint.x, clipY);\n }\n }\n ctx.lineTo(target.first().x, clipY);\n ctx.closePath();\n ctx.clip();\n}\nfunction fill(ctx, cfg) {\n const { line , target , property , color , scale } = cfg;\n const segments = _segments(line, target, property);\n for (const { source: src , target: tgt , start , end } of segments){\n const { style: { backgroundColor =color } = {} } = src;\n const notShape = target !== true;\n ctx.save();\n ctx.fillStyle = backgroundColor;\n clipBounds(ctx, scale, notShape && _getBounds(property, start, end));\n ctx.beginPath();\n const lineLoop = !!line.pathSegment(ctx, src);\n let loop;\n if (notShape) {\n if (lineLoop) {\n ctx.closePath();\n } else {\n interpolatedLineTo(ctx, target, end, property);\n }\n const targetLoop = !!target.pathSegment(ctx, tgt, {\n move: lineLoop,\n reverse: true\n });\n loop = lineLoop && targetLoop;\n if (!loop) {\n interpolatedLineTo(ctx, target, start, property);\n }\n }\n ctx.closePath();\n ctx.fill(loop ? 'evenodd' : 'nonzero');\n ctx.restore();\n }\n}\nfunction clipBounds(ctx, scale, bounds) {\n const { top , bottom } = scale.chart.chartArea;\n const { property , start , end } = bounds || {};\n if (property === 'x') {\n ctx.beginPath();\n ctx.rect(start, top, end - start, bottom - top);\n ctx.clip();\n }\n}\nfunction interpolatedLineTo(ctx, target, point, property) {\n const interpolatedPoint = target.interpolate(point, property);\n if (interpolatedPoint) {\n ctx.lineTo(interpolatedPoint.x, interpolatedPoint.y);\n }\n}\n\nvar index = {\n id: 'filler',\n afterDatasetsUpdate (chart, _args, options) {\n const count = (chart.data.datasets || []).length;\n const sources = [];\n let meta, i, line, source;\n for(i = 0; i < count; ++i){\n meta = chart.getDatasetMeta(i);\n line = meta.dataset;\n source = null;\n if (line && line.options && line instanceof LineElement) {\n source = {\n visible: chart.isDatasetVisible(i),\n index: i,\n fill: _decodeFill(line, i, count),\n chart,\n axis: meta.controller.options.indexAxis,\n scale: meta.vScale,\n line\n };\n }\n meta.$filler = source;\n sources.push(source);\n }\n for(i = 0; i < count; ++i){\n source = sources[i];\n if (!source || source.fill === false) {\n continue;\n }\n source.fill = _resolveTarget(sources, i, options.propagate);\n }\n },\n beforeDraw (chart, _args, options) {\n const draw = options.drawTime === 'beforeDraw';\n const metasets = chart.getSortedVisibleDatasetMetas();\n const area = chart.chartArea;\n for(let i = metasets.length - 1; i >= 0; --i){\n const source = metasets[i].$filler;\n if (!source) {\n continue;\n }\n source.line.updateControlPoints(area, source.axis);\n if (draw && source.fill) {\n _drawfill(chart.ctx, source, area);\n }\n }\n },\n beforeDatasetsDraw (chart, _args, options) {\n if (options.drawTime !== 'beforeDatasetsDraw') {\n return;\n }\n const metasets = chart.getSortedVisibleDatasetMetas();\n for(let i = metasets.length - 1; i >= 0; --i){\n const source = metasets[i].$filler;\n if (_shouldApplyFill(source)) {\n _drawfill(chart.ctx, source, chart.chartArea);\n }\n }\n },\n beforeDatasetDraw (chart, args, options) {\n const source = args.meta.$filler;\n if (!_shouldApplyFill(source) || options.drawTime !== 'beforeDatasetDraw') {\n return;\n }\n _drawfill(chart.ctx, source, chart.chartArea);\n },\n defaults: {\n propagate: true,\n drawTime: 'beforeDatasetDraw'\n }\n};\n\nconst getBoxSize = (labelOpts, fontSize)=>{\n let { boxHeight =fontSize , boxWidth =fontSize } = labelOpts;\n if (labelOpts.usePointStyle) {\n boxHeight = Math.min(boxHeight, fontSize);\n boxWidth = labelOpts.pointStyleWidth || Math.min(boxWidth, fontSize);\n }\n return {\n boxWidth,\n boxHeight,\n itemHeight: Math.max(fontSize, boxHeight)\n };\n};\nconst itemsEqual = (a, b)=>a !== null && b !== null && a.datasetIndex === b.datasetIndex && a.index === b.index;\nclass Legend extends Element {\n constructor(config){\n super();\n this._added = false;\n this.legendHitBoxes = [];\n this._hoveredItem = null;\n this.doughnutMode = false;\n this.chart = config.chart;\n this.options = config.options;\n this.ctx = config.ctx;\n this.legendItems = undefined;\n this.columnSizes = undefined;\n this.lineWidths = undefined;\n this.maxHeight = undefined;\n this.maxWidth = undefined;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.height = undefined;\n this.width = undefined;\n this._margins = undefined;\n this.position = undefined;\n this.weight = undefined;\n this.fullSize = undefined;\n }\n update(maxWidth, maxHeight, margins) {\n this.maxWidth = maxWidth;\n this.maxHeight = maxHeight;\n this._margins = margins;\n this.setDimensions();\n this.buildLabels();\n this.fit();\n }\n setDimensions() {\n if (this.isHorizontal()) {\n this.width = this.maxWidth;\n this.left = this._margins.left;\n this.right = this.width;\n } else {\n this.height = this.maxHeight;\n this.top = this._margins.top;\n this.bottom = this.height;\n }\n }\n buildLabels() {\n const labelOpts = this.options.labels || {};\n let legendItems = callback(labelOpts.generateLabels, [\n this.chart\n ], this) || [];\n if (labelOpts.filter) {\n legendItems = legendItems.filter((item)=>labelOpts.filter(item, this.chart.data));\n }\n if (labelOpts.sort) {\n legendItems = legendItems.sort((a, b)=>labelOpts.sort(a, b, this.chart.data));\n }\n if (this.options.reverse) {\n legendItems.reverse();\n }\n this.legendItems = legendItems;\n }\n fit() {\n const { options , ctx } = this;\n if (!options.display) {\n this.width = this.height = 0;\n return;\n }\n const labelOpts = options.labels;\n const labelFont = toFont(labelOpts.font);\n const fontSize = labelFont.size;\n const titleHeight = this._computeTitleHeight();\n const { boxWidth , itemHeight } = getBoxSize(labelOpts, fontSize);\n let width, height;\n ctx.font = labelFont.string;\n if (this.isHorizontal()) {\n width = this.maxWidth;\n height = this._fitRows(titleHeight, fontSize, boxWidth, itemHeight) + 10;\n } else {\n height = this.maxHeight;\n width = this._fitCols(titleHeight, labelFont, boxWidth, itemHeight) + 10;\n }\n this.width = Math.min(width, options.maxWidth || this.maxWidth);\n this.height = Math.min(height, options.maxHeight || this.maxHeight);\n }\n _fitRows(titleHeight, fontSize, boxWidth, itemHeight) {\n const { ctx , maxWidth , options: { labels: { padding } } } = this;\n const hitboxes = this.legendHitBoxes = [];\n const lineWidths = this.lineWidths = [\n 0\n ];\n const lineHeight = itemHeight + padding;\n let totalHeight = titleHeight;\n ctx.textAlign = 'left';\n ctx.textBaseline = 'middle';\n let row = -1;\n let top = -lineHeight;\n this.legendItems.forEach((legendItem, i)=>{\n const itemWidth = boxWidth + fontSize / 2 + ctx.measureText(legendItem.text).width;\n if (i === 0 || lineWidths[lineWidths.length - 1] + itemWidth + 2 * padding > maxWidth) {\n totalHeight += lineHeight;\n lineWidths[lineWidths.length - (i > 0 ? 0 : 1)] = 0;\n top += lineHeight;\n row++;\n }\n hitboxes[i] = {\n left: 0,\n top,\n row,\n width: itemWidth,\n height: itemHeight\n };\n lineWidths[lineWidths.length - 1] += itemWidth + padding;\n });\n return totalHeight;\n }\n _fitCols(titleHeight, labelFont, boxWidth, _itemHeight) {\n const { ctx , maxHeight , options: { labels: { padding } } } = this;\n const hitboxes = this.legendHitBoxes = [];\n const columnSizes = this.columnSizes = [];\n const heightLimit = maxHeight - titleHeight;\n let totalWidth = padding;\n let currentColWidth = 0;\n let currentColHeight = 0;\n let left = 0;\n let col = 0;\n this.legendItems.forEach((legendItem, i)=>{\n const { itemWidth , itemHeight } = calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight);\n if (i > 0 && currentColHeight + itemHeight + 2 * padding > heightLimit) {\n totalWidth += currentColWidth + padding;\n columnSizes.push({\n width: currentColWidth,\n height: currentColHeight\n });\n left += currentColWidth + padding;\n col++;\n currentColWidth = currentColHeight = 0;\n }\n hitboxes[i] = {\n left,\n top: currentColHeight,\n col,\n width: itemWidth,\n height: itemHeight\n };\n currentColWidth = Math.max(currentColWidth, itemWidth);\n currentColHeight += itemHeight + padding;\n });\n totalWidth += currentColWidth;\n columnSizes.push({\n width: currentColWidth,\n height: currentColHeight\n });\n return totalWidth;\n }\n adjustHitBoxes() {\n if (!this.options.display) {\n return;\n }\n const titleHeight = this._computeTitleHeight();\n const { legendHitBoxes: hitboxes , options: { align , labels: { padding } , rtl } } = this;\n const rtlHelper = getRtlAdapter(rtl, this.left, this.width);\n if (this.isHorizontal()) {\n let row = 0;\n let left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n for (const hitbox of hitboxes){\n if (row !== hitbox.row) {\n row = hitbox.row;\n left = _alignStartEnd(align, this.left + padding, this.right - this.lineWidths[row]);\n }\n hitbox.top += this.top + titleHeight + padding;\n hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(left), hitbox.width);\n left += hitbox.width + padding;\n }\n } else {\n let col = 0;\n let top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n for (const hitbox of hitboxes){\n if (hitbox.col !== col) {\n col = hitbox.col;\n top = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - this.columnSizes[col].height);\n }\n hitbox.top = top;\n hitbox.left += this.left + padding;\n hitbox.left = rtlHelper.leftForLtr(rtlHelper.x(hitbox.left), hitbox.width);\n top += hitbox.height + padding;\n }\n }\n }\n isHorizontal() {\n return this.options.position === 'top' || this.options.position === 'bottom';\n }\n draw() {\n if (this.options.display) {\n const ctx = this.ctx;\n clipArea(ctx, this);\n this._draw();\n unclipArea(ctx);\n }\n }\n _draw() {\n const { options: opts , columnSizes , lineWidths , ctx } = this;\n const { align , labels: labelOpts } = opts;\n const defaultColor = defaults.color;\n const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n const labelFont = toFont(labelOpts.font);\n const { padding } = labelOpts;\n const fontSize = labelFont.size;\n const halfFontSize = fontSize / 2;\n let cursor;\n this.drawTitle();\n ctx.textAlign = rtlHelper.textAlign('left');\n ctx.textBaseline = 'middle';\n ctx.lineWidth = 0.5;\n ctx.font = labelFont.string;\n const { boxWidth , boxHeight , itemHeight } = getBoxSize(labelOpts, fontSize);\n const drawLegendBox = function(x, y, legendItem) {\n if (isNaN(boxWidth) || boxWidth <= 0 || isNaN(boxHeight) || boxHeight < 0) {\n return;\n }\n ctx.save();\n const lineWidth = valueOrDefault(legendItem.lineWidth, 1);\n ctx.fillStyle = valueOrDefault(legendItem.fillStyle, defaultColor);\n ctx.lineCap = valueOrDefault(legendItem.lineCap, 'butt');\n ctx.lineDashOffset = valueOrDefault(legendItem.lineDashOffset, 0);\n ctx.lineJoin = valueOrDefault(legendItem.lineJoin, 'miter');\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = valueOrDefault(legendItem.strokeStyle, defaultColor);\n ctx.setLineDash(valueOrDefault(legendItem.lineDash, []));\n if (labelOpts.usePointStyle) {\n const drawOptions = {\n radius: boxHeight * Math.SQRT2 / 2,\n pointStyle: legendItem.pointStyle,\n rotation: legendItem.rotation,\n borderWidth: lineWidth\n };\n const centerX = rtlHelper.xPlus(x, boxWidth / 2);\n const centerY = y + halfFontSize;\n drawPointLegend(ctx, drawOptions, centerX, centerY, labelOpts.pointStyleWidth && boxWidth);\n } else {\n const yBoxTop = y + Math.max((fontSize - boxHeight) / 2, 0);\n const xBoxLeft = rtlHelper.leftForLtr(x, boxWidth);\n const borderRadius = toTRBLCorners(legendItem.borderRadius);\n ctx.beginPath();\n if (Object.values(borderRadius).some((v)=>v !== 0)) {\n addRoundedRectPath(ctx, {\n x: xBoxLeft,\n y: yBoxTop,\n w: boxWidth,\n h: boxHeight,\n radius: borderRadius\n });\n } else {\n ctx.rect(xBoxLeft, yBoxTop, boxWidth, boxHeight);\n }\n ctx.fill();\n if (lineWidth !== 0) {\n ctx.stroke();\n }\n }\n ctx.restore();\n };\n const fillText = function(x, y, legendItem) {\n renderText(ctx, legendItem.text, x, y + itemHeight / 2, labelFont, {\n strikethrough: legendItem.hidden,\n textAlign: rtlHelper.textAlign(legendItem.textAlign)\n });\n };\n const isHorizontal = this.isHorizontal();\n const titleHeight = this._computeTitleHeight();\n if (isHorizontal) {\n cursor = {\n x: _alignStartEnd(align, this.left + padding, this.right - lineWidths[0]),\n y: this.top + padding + titleHeight,\n line: 0\n };\n } else {\n cursor = {\n x: this.left + padding,\n y: _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[0].height),\n line: 0\n };\n }\n overrideTextDirection(this.ctx, opts.textDirection);\n const lineHeight = itemHeight + padding;\n this.legendItems.forEach((legendItem, i)=>{\n ctx.strokeStyle = legendItem.fontColor;\n ctx.fillStyle = legendItem.fontColor;\n const textWidth = ctx.measureText(legendItem.text).width;\n const textAlign = rtlHelper.textAlign(legendItem.textAlign || (legendItem.textAlign = labelOpts.textAlign));\n const width = boxWidth + halfFontSize + textWidth;\n let x = cursor.x;\n let y = cursor.y;\n rtlHelper.setWidth(this.width);\n if (isHorizontal) {\n if (i > 0 && x + width + padding > this.right) {\n y = cursor.y += lineHeight;\n cursor.line++;\n x = cursor.x = _alignStartEnd(align, this.left + padding, this.right - lineWidths[cursor.line]);\n }\n } else if (i > 0 && y + lineHeight > this.bottom) {\n x = cursor.x = x + columnSizes[cursor.line].width + padding;\n cursor.line++;\n y = cursor.y = _alignStartEnd(align, this.top + titleHeight + padding, this.bottom - columnSizes[cursor.line].height);\n }\n const realX = rtlHelper.x(x);\n drawLegendBox(realX, y, legendItem);\n x = _textX(textAlign, x + boxWidth + halfFontSize, isHorizontal ? x + width : this.right, opts.rtl);\n fillText(rtlHelper.x(x), y, legendItem);\n if (isHorizontal) {\n cursor.x += width + padding;\n } else if (typeof legendItem.text !== 'string') {\n const fontLineHeight = labelFont.lineHeight;\n cursor.y += calculateLegendItemHeight(legendItem, fontLineHeight);\n } else {\n cursor.y += lineHeight;\n }\n });\n restoreTextDirection(this.ctx, opts.textDirection);\n }\n drawTitle() {\n const opts = this.options;\n const titleOpts = opts.title;\n const titleFont = toFont(titleOpts.font);\n const titlePadding = toPadding(titleOpts.padding);\n if (!titleOpts.display) {\n return;\n }\n const rtlHelper = getRtlAdapter(opts.rtl, this.left, this.width);\n const ctx = this.ctx;\n const position = titleOpts.position;\n const halfFontSize = titleFont.size / 2;\n const topPaddingPlusHalfFontSize = titlePadding.top + halfFontSize;\n let y;\n let left = this.left;\n let maxWidth = this.width;\n if (this.isHorizontal()) {\n maxWidth = Math.max(...this.lineWidths);\n y = this.top + topPaddingPlusHalfFontSize;\n left = _alignStartEnd(opts.align, left, this.right - maxWidth);\n } else {\n const maxHeight = this.columnSizes.reduce((acc, size)=>Math.max(acc, size.height), 0);\n y = topPaddingPlusHalfFontSize + _alignStartEnd(opts.align, this.top, this.bottom - maxHeight - opts.labels.padding - this._computeTitleHeight());\n }\n const x = _alignStartEnd(position, left, left + maxWidth);\n ctx.textAlign = rtlHelper.textAlign(_toLeftRightCenter(position));\n ctx.textBaseline = 'middle';\n ctx.strokeStyle = titleOpts.color;\n ctx.fillStyle = titleOpts.color;\n ctx.font = titleFont.string;\n renderText(ctx, titleOpts.text, x, y, titleFont);\n }\n _computeTitleHeight() {\n const titleOpts = this.options.title;\n const titleFont = toFont(titleOpts.font);\n const titlePadding = toPadding(titleOpts.padding);\n return titleOpts.display ? titleFont.lineHeight + titlePadding.height : 0;\n }\n _getLegendItemAt(x, y) {\n let i, hitBox, lh;\n if (_isBetween(x, this.left, this.right) && _isBetween(y, this.top, this.bottom)) {\n lh = this.legendHitBoxes;\n for(i = 0; i < lh.length; ++i){\n hitBox = lh[i];\n if (_isBetween(x, hitBox.left, hitBox.left + hitBox.width) && _isBetween(y, hitBox.top, hitBox.top + hitBox.height)) {\n return this.legendItems[i];\n }\n }\n }\n return null;\n }\n handleEvent(e) {\n const opts = this.options;\n if (!isListened(e.type, opts)) {\n return;\n }\n const hoveredItem = this._getLegendItemAt(e.x, e.y);\n if (e.type === 'mousemove' || e.type === 'mouseout') {\n const previous = this._hoveredItem;\n const sameItem = itemsEqual(previous, hoveredItem);\n if (previous && !sameItem) {\n callback(opts.onLeave, [\n e,\n previous,\n this\n ], this);\n }\n this._hoveredItem = hoveredItem;\n if (hoveredItem && !sameItem) {\n callback(opts.onHover, [\n e,\n hoveredItem,\n this\n ], this);\n }\n } else if (hoveredItem) {\n callback(opts.onClick, [\n e,\n hoveredItem,\n this\n ], this);\n }\n }\n}\nfunction calculateItemSize(boxWidth, labelFont, ctx, legendItem, _itemHeight) {\n const itemWidth = calculateItemWidth(legendItem, boxWidth, labelFont, ctx);\n const itemHeight = calculateItemHeight(_itemHeight, legendItem, labelFont.lineHeight);\n return {\n itemWidth,\n itemHeight\n };\n}\nfunction calculateItemWidth(legendItem, boxWidth, labelFont, ctx) {\n let legendItemText = legendItem.text;\n if (legendItemText && typeof legendItemText !== 'string') {\n legendItemText = legendItemText.reduce((a, b)=>a.length > b.length ? a : b);\n }\n return boxWidth + labelFont.size / 2 + ctx.measureText(legendItemText).width;\n}\nfunction calculateItemHeight(_itemHeight, legendItem, fontLineHeight) {\n let itemHeight = _itemHeight;\n if (typeof legendItem.text !== 'string') {\n itemHeight = calculateLegendItemHeight(legendItem, fontLineHeight);\n }\n return itemHeight;\n}\nfunction calculateLegendItemHeight(legendItem, fontLineHeight) {\n const labelHeight = legendItem.text ? legendItem.text.length + 0.5 : 0;\n return fontLineHeight * labelHeight;\n}\nfunction isListened(type, opts) {\n if ((type === 'mousemove' || type === 'mouseout') && (opts.onHover || opts.onLeave)) {\n return true;\n }\n if (opts.onClick && (type === 'click' || type === 'mouseup')) {\n return true;\n }\n return false;\n}\nvar plugin_legend = {\n id: 'legend',\n _element: Legend,\n start (chart, _args, options) {\n const legend = chart.legend = new Legend({\n ctx: chart.ctx,\n options,\n chart\n });\n layouts.configure(chart, legend, options);\n layouts.addBox(chart, legend);\n },\n stop (chart) {\n layouts.removeBox(chart, chart.legend);\n delete chart.legend;\n },\n beforeUpdate (chart, _args, options) {\n const legend = chart.legend;\n layouts.configure(chart, legend, options);\n legend.options = options;\n },\n afterUpdate (chart) {\n const legend = chart.legend;\n legend.buildLabels();\n legend.adjustHitBoxes();\n },\n afterEvent (chart, args) {\n if (!args.replay) {\n chart.legend.handleEvent(args.event);\n }\n },\n defaults: {\n display: true,\n position: 'top',\n align: 'center',\n fullSize: true,\n reverse: false,\n weight: 1000,\n onClick (e, legendItem, legend) {\n const index = legendItem.datasetIndex;\n const ci = legend.chart;\n if (ci.isDatasetVisible(index)) {\n ci.hide(index);\n legendItem.hidden = true;\n } else {\n ci.show(index);\n legendItem.hidden = false;\n }\n },\n onHover: null,\n onLeave: null,\n labels: {\n color: (ctx)=>ctx.chart.options.color,\n boxWidth: 40,\n padding: 10,\n generateLabels (chart) {\n const datasets = chart.data.datasets;\n const { labels: { usePointStyle , pointStyle , textAlign , color , useBorderRadius , borderRadius } } = chart.legend.options;\n return chart._getSortedDatasetMetas().map((meta)=>{\n const style = meta.controller.getStyle(usePointStyle ? 0 : undefined);\n const borderWidth = toPadding(style.borderWidth);\n return {\n text: datasets[meta.index].label,\n fillStyle: style.backgroundColor,\n fontColor: color,\n hidden: !meta.visible,\n lineCap: style.borderCapStyle,\n lineDash: style.borderDash,\n lineDashOffset: style.borderDashOffset,\n lineJoin: style.borderJoinStyle,\n lineWidth: (borderWidth.width + borderWidth.height) / 4,\n strokeStyle: style.borderColor,\n pointStyle: pointStyle || style.pointStyle,\n rotation: style.rotation,\n textAlign: textAlign || style.textAlign,\n borderRadius: useBorderRadius && (borderRadius || style.borderRadius),\n datasetIndex: meta.index\n };\n }, this);\n }\n },\n title: {\n color: (ctx)=>ctx.chart.options.color,\n display: false,\n position: 'center',\n text: ''\n }\n },\n descriptors: {\n _scriptable: (name)=>!name.startsWith('on'),\n labels: {\n _scriptable: (name)=>![\n 'generateLabels',\n 'filter',\n 'sort'\n ].includes(name)\n }\n }\n};\n\nclass Title extends Element {\n constructor(config){\n super();\n this.chart = config.chart;\n this.options = config.options;\n this.ctx = config.ctx;\n this._padding = undefined;\n this.top = undefined;\n this.bottom = undefined;\n this.left = undefined;\n this.right = undefined;\n this.width = undefined;\n this.height = undefined;\n this.position = undefined;\n this.weight = undefined;\n this.fullSize = undefined;\n }\n update(maxWidth, maxHeight) {\n const opts = this.options;\n this.left = 0;\n this.top = 0;\n if (!opts.display) {\n this.width = this.height = this.right = this.bottom = 0;\n return;\n }\n this.width = this.right = maxWidth;\n this.height = this.bottom = maxHeight;\n const lineCount = isArray(opts.text) ? opts.text.length : 1;\n this._padding = toPadding(opts.padding);\n const textSize = lineCount * toFont(opts.font).lineHeight + this._padding.height;\n if (this.isHorizontal()) {\n this.height = textSize;\n } else {\n this.width = textSize;\n }\n }\n isHorizontal() {\n const pos = this.options.position;\n return pos === 'top' || pos === 'bottom';\n }\n _drawArgs(offset) {\n const { top , left , bottom , right , options } = this;\n const align = options.align;\n let rotation = 0;\n let maxWidth, titleX, titleY;\n if (this.isHorizontal()) {\n titleX = _alignStartEnd(align, left, right);\n titleY = top + offset;\n maxWidth = right - left;\n } else {\n if (options.position === 'left') {\n titleX = left + offset;\n titleY = _alignStartEnd(align, bottom, top);\n rotation = PI * -0.5;\n } else {\n titleX = right - offset;\n titleY = _alignStartEnd(align, top, bottom);\n rotation = PI * 0.5;\n }\n maxWidth = bottom - top;\n }\n return {\n titleX,\n titleY,\n maxWidth,\n rotation\n };\n }\n draw() {\n const ctx = this.ctx;\n const opts = this.options;\n if (!opts.display) {\n return;\n }\n const fontOpts = toFont(opts.font);\n const lineHeight = fontOpts.lineHeight;\n const offset = lineHeight / 2 + this._padding.top;\n const { titleX , titleY , maxWidth , rotation } = this._drawArgs(offset);\n renderText(ctx, opts.text, 0, 0, fontOpts, {\n color: opts.color,\n maxWidth,\n rotation,\n textAlign: _toLeftRightCenter(opts.align),\n textBaseline: 'middle',\n translation: [\n titleX,\n titleY\n ]\n });\n }\n}\nfunction createTitle(chart, titleOpts) {\n const title = new Title({\n ctx: chart.ctx,\n options: titleOpts,\n chart\n });\n layouts.configure(chart, title, titleOpts);\n layouts.addBox(chart, title);\n chart.titleBlock = title;\n}\nvar plugin_title = {\n id: 'title',\n _element: Title,\n start (chart, _args, options) {\n createTitle(chart, options);\n },\n stop (chart) {\n const titleBlock = chart.titleBlock;\n layouts.removeBox(chart, titleBlock);\n delete chart.titleBlock;\n },\n beforeUpdate (chart, _args, options) {\n const title = chart.titleBlock;\n layouts.configure(chart, title, options);\n title.options = options;\n },\n defaults: {\n align: 'center',\n display: false,\n font: {\n weight: 'bold'\n },\n fullSize: true,\n padding: 10,\n position: 'top',\n text: '',\n weight: 2000\n },\n defaultRoutes: {\n color: 'color'\n },\n descriptors: {\n _scriptable: true,\n _indexable: false\n }\n};\n\nconst map = new WeakMap();\nvar plugin_subtitle = {\n id: 'subtitle',\n start (chart, _args, options) {\n const title = new Title({\n ctx: chart.ctx,\n options,\n chart\n });\n layouts.configure(chart, title, options);\n layouts.addBox(chart, title);\n map.set(chart, title);\n },\n stop (chart) {\n layouts.removeBox(chart, map.get(chart));\n map.delete(chart);\n },\n beforeUpdate (chart, _args, options) {\n const title = map.get(chart);\n layouts.configure(chart, title, options);\n title.options = options;\n },\n defaults: {\n align: 'center',\n display: false,\n font: {\n weight: 'normal'\n },\n fullSize: true,\n padding: 0,\n position: 'top',\n text: '',\n weight: 1500\n },\n defaultRoutes: {\n color: 'color'\n },\n descriptors: {\n _scriptable: true,\n _indexable: false\n }\n};\n\nconst positioners = {\n average (items) {\n if (!items.length) {\n return false;\n }\n let i, len;\n let x = 0;\n let y = 0;\n let count = 0;\n for(i = 0, len = items.length; i < len; ++i){\n const el = items[i].element;\n if (el && el.hasValue()) {\n const pos = el.tooltipPosition();\n x += pos.x;\n y += pos.y;\n ++count;\n }\n }\n return {\n x: x / count,\n y: y / count\n };\n },\n nearest (items, eventPosition) {\n if (!items.length) {\n return false;\n }\n let x = eventPosition.x;\n let y = eventPosition.y;\n let minDistance = Number.POSITIVE_INFINITY;\n let i, len, nearestElement;\n for(i = 0, len = items.length; i < len; ++i){\n const el = items[i].element;\n if (el && el.hasValue()) {\n const center = el.getCenterPoint();\n const d = distanceBetweenPoints(eventPosition, center);\n if (d < minDistance) {\n minDistance = d;\n nearestElement = el;\n }\n }\n }\n if (nearestElement) {\n const tp = nearestElement.tooltipPosition();\n x = tp.x;\n y = tp.y;\n }\n return {\n x,\n y\n };\n }\n};\nfunction pushOrConcat(base, toPush) {\n if (toPush) {\n if (isArray(toPush)) {\n Array.prototype.push.apply(base, toPush);\n } else {\n base.push(toPush);\n }\n }\n return base;\n}\n function splitNewlines(str) {\n if ((typeof str === 'string' || str instanceof String) && str.indexOf('\\n') > -1) {\n return str.split('\\n');\n }\n return str;\n}\n function createTooltipItem(chart, item) {\n const { element , datasetIndex , index } = item;\n const controller = chart.getDatasetMeta(datasetIndex).controller;\n const { label , value } = controller.getLabelAndValue(index);\n return {\n chart,\n label,\n parsed: controller.getParsed(index),\n raw: chart.data.datasets[datasetIndex].data[index],\n formattedValue: value,\n dataset: controller.getDataset(),\n dataIndex: index,\n datasetIndex,\n element\n };\n}\n function getTooltipSize(tooltip, options) {\n const ctx = tooltip.chart.ctx;\n const { body , footer , title } = tooltip;\n const { boxWidth , boxHeight } = options;\n const bodyFont = toFont(options.bodyFont);\n const titleFont = toFont(options.titleFont);\n const footerFont = toFont(options.footerFont);\n const titleLineCount = title.length;\n const footerLineCount = footer.length;\n const bodyLineItemCount = body.length;\n const padding = toPadding(options.padding);\n let height = padding.height;\n let width = 0;\n let combinedBodyLength = body.reduce((count, bodyItem)=>count + bodyItem.before.length + bodyItem.lines.length + bodyItem.after.length, 0);\n combinedBodyLength += tooltip.beforeBody.length + tooltip.afterBody.length;\n if (titleLineCount) {\n height += titleLineCount * titleFont.lineHeight + (titleLineCount - 1) * options.titleSpacing + options.titleMarginBottom;\n }\n if (combinedBodyLength) {\n const bodyLineHeight = options.displayColors ? Math.max(boxHeight, bodyFont.lineHeight) : bodyFont.lineHeight;\n height += bodyLineItemCount * bodyLineHeight + (combinedBodyLength - bodyLineItemCount) * bodyFont.lineHeight + (combinedBodyLength - 1) * options.bodySpacing;\n }\n if (footerLineCount) {\n height += options.footerMarginTop + footerLineCount * footerFont.lineHeight + (footerLineCount - 1) * options.footerSpacing;\n }\n let widthPadding = 0;\n const maxLineWidth = function(line) {\n width = Math.max(width, ctx.measureText(line).width + widthPadding);\n };\n ctx.save();\n ctx.font = titleFont.string;\n each(tooltip.title, maxLineWidth);\n ctx.font = bodyFont.string;\n each(tooltip.beforeBody.concat(tooltip.afterBody), maxLineWidth);\n widthPadding = options.displayColors ? boxWidth + 2 + options.boxPadding : 0;\n each(body, (bodyItem)=>{\n each(bodyItem.before, maxLineWidth);\n each(bodyItem.lines, maxLineWidth);\n each(bodyItem.after, maxLineWidth);\n });\n widthPadding = 0;\n ctx.font = footerFont.string;\n each(tooltip.footer, maxLineWidth);\n ctx.restore();\n width += padding.width;\n return {\n width,\n height\n };\n}\nfunction determineYAlign(chart, size) {\n const { y , height } = size;\n if (y < height / 2) {\n return 'top';\n } else if (y > chart.height - height / 2) {\n return 'bottom';\n }\n return 'center';\n}\nfunction doesNotFitWithAlign(xAlign, chart, options, size) {\n const { x , width } = size;\n const caret = options.caretSize + options.caretPadding;\n if (xAlign === 'left' && x + width + caret > chart.width) {\n return true;\n }\n if (xAlign === 'right' && x - width - caret < 0) {\n return true;\n }\n}\nfunction determineXAlign(chart, options, size, yAlign) {\n const { x , width } = size;\n const { width: chartWidth , chartArea: { left , right } } = chart;\n let xAlign = 'center';\n if (yAlign === 'center') {\n xAlign = x <= (left + right) / 2 ? 'left' : 'right';\n } else if (x <= width / 2) {\n xAlign = 'left';\n } else if (x >= chartWidth - width / 2) {\n xAlign = 'right';\n }\n if (doesNotFitWithAlign(xAlign, chart, options, size)) {\n xAlign = 'center';\n }\n return xAlign;\n}\n function determineAlignment(chart, options, size) {\n const yAlign = size.yAlign || options.yAlign || determineYAlign(chart, size);\n return {\n xAlign: size.xAlign || options.xAlign || determineXAlign(chart, options, size, yAlign),\n yAlign\n };\n}\nfunction alignX(size, xAlign) {\n let { x , width } = size;\n if (xAlign === 'right') {\n x -= width;\n } else if (xAlign === 'center') {\n x -= width / 2;\n }\n return x;\n}\nfunction alignY(size, yAlign, paddingAndSize) {\n let { y , height } = size;\n if (yAlign === 'top') {\n y += paddingAndSize;\n } else if (yAlign === 'bottom') {\n y -= height + paddingAndSize;\n } else {\n y -= height / 2;\n }\n return y;\n}\n function getBackgroundPoint(options, size, alignment, chart) {\n const { caretSize , caretPadding , cornerRadius } = options;\n const { xAlign , yAlign } = alignment;\n const paddingAndSize = caretSize + caretPadding;\n const { topLeft , topRight , bottomLeft , bottomRight } = toTRBLCorners(cornerRadius);\n let x = alignX(size, xAlign);\n const y = alignY(size, yAlign, paddingAndSize);\n if (yAlign === 'center') {\n if (xAlign === 'left') {\n x += paddingAndSize;\n } else if (xAlign === 'right') {\n x -= paddingAndSize;\n }\n } else if (xAlign === 'left') {\n x -= Math.max(topLeft, bottomLeft) + caretSize;\n } else if (xAlign === 'right') {\n x += Math.max(topRight, bottomRight) + caretSize;\n }\n return {\n x: _limitValue(x, 0, chart.width - size.width),\n y: _limitValue(y, 0, chart.height - size.height)\n };\n}\nfunction getAlignedX(tooltip, align, options) {\n const padding = toPadding(options.padding);\n return align === 'center' ? tooltip.x + tooltip.width / 2 : align === 'right' ? tooltip.x + tooltip.width - padding.right : tooltip.x + padding.left;\n}\n function getBeforeAfterBodyLines(callback) {\n return pushOrConcat([], splitNewlines(callback));\n}\nfunction createTooltipContext(parent, tooltip, tooltipItems) {\n return createContext(parent, {\n tooltip,\n tooltipItems,\n type: 'tooltip'\n });\n}\nfunction overrideCallbacks(callbacks, context) {\n const override = context && context.dataset && context.dataset.tooltip && context.dataset.tooltip.callbacks;\n return override ? callbacks.override(override) : callbacks;\n}\nconst defaultCallbacks = {\n beforeTitle: noop,\n title (tooltipItems) {\n if (tooltipItems.length > 0) {\n const item = tooltipItems[0];\n const labels = item.chart.data.labels;\n const labelCount = labels ? labels.length : 0;\n if (this && this.options && this.options.mode === 'dataset') {\n return item.dataset.label || '';\n } else if (item.label) {\n return item.label;\n } else if (labelCount > 0 && item.dataIndex < labelCount) {\n return labels[item.dataIndex];\n }\n }\n return '';\n },\n afterTitle: noop,\n beforeBody: noop,\n beforeLabel: noop,\n label (tooltipItem) {\n if (this && this.options && this.options.mode === 'dataset') {\n return tooltipItem.label + ': ' + tooltipItem.formattedValue || tooltipItem.formattedValue;\n }\n let label = tooltipItem.dataset.label || '';\n if (label) {\n label += ': ';\n }\n const value = tooltipItem.formattedValue;\n if (!isNullOrUndef(value)) {\n label += value;\n }\n return label;\n },\n labelColor (tooltipItem) {\n const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n const options = meta.controller.getStyle(tooltipItem.dataIndex);\n return {\n borderColor: options.borderColor,\n backgroundColor: options.backgroundColor,\n borderWidth: options.borderWidth,\n borderDash: options.borderDash,\n borderDashOffset: options.borderDashOffset,\n borderRadius: 0\n };\n },\n labelTextColor () {\n return this.options.bodyColor;\n },\n labelPointStyle (tooltipItem) {\n const meta = tooltipItem.chart.getDatasetMeta(tooltipItem.datasetIndex);\n const options = meta.controller.getStyle(tooltipItem.dataIndex);\n return {\n pointStyle: options.pointStyle,\n rotation: options.rotation\n };\n },\n afterLabel: noop,\n afterBody: noop,\n beforeFooter: noop,\n footer: noop,\n afterFooter: noop\n};\n function invokeCallbackWithFallback(callbacks, name, ctx, arg) {\n const result = callbacks[name].call(ctx, arg);\n if (typeof result === 'undefined') {\n return defaultCallbacks[name].call(ctx, arg);\n }\n return result;\n}\nclass Tooltip extends Element {\n static positioners = positioners;\n constructor(config){\n super();\n this.opacity = 0;\n this._active = [];\n this._eventPosition = undefined;\n this._size = undefined;\n this._cachedAnimations = undefined;\n this._tooltipItems = [];\n this.$animations = undefined;\n this.$context = undefined;\n this.chart = config.chart;\n this.options = config.options;\n this.dataPoints = undefined;\n this.title = undefined;\n this.beforeBody = undefined;\n this.body = undefined;\n this.afterBody = undefined;\n this.footer = undefined;\n this.xAlign = undefined;\n this.yAlign = undefined;\n this.x = undefined;\n this.y = undefined;\n this.height = undefined;\n this.width = undefined;\n this.caretX = undefined;\n this.caretY = undefined;\n this.labelColors = undefined;\n this.labelPointStyles = undefined;\n this.labelTextColors = undefined;\n }\n initialize(options) {\n this.options = options;\n this._cachedAnimations = undefined;\n this.$context = undefined;\n }\n _resolveAnimations() {\n const cached = this._cachedAnimations;\n if (cached) {\n return cached;\n }\n const chart = this.chart;\n const options = this.options.setContext(this.getContext());\n const opts = options.enabled && chart.options.animation && options.animations;\n const animations = new Animations(this.chart, opts);\n if (opts._cacheable) {\n this._cachedAnimations = Object.freeze(animations);\n }\n return animations;\n }\n getContext() {\n return this.$context || (this.$context = createTooltipContext(this.chart.getContext(), this, this._tooltipItems));\n }\n getTitle(context, options) {\n const { callbacks } = options;\n const beforeTitle = invokeCallbackWithFallback(callbacks, 'beforeTitle', this, context);\n const title = invokeCallbackWithFallback(callbacks, 'title', this, context);\n const afterTitle = invokeCallbackWithFallback(callbacks, 'afterTitle', this, context);\n let lines = [];\n lines = pushOrConcat(lines, splitNewlines(beforeTitle));\n lines = pushOrConcat(lines, splitNewlines(title));\n lines = pushOrConcat(lines, splitNewlines(afterTitle));\n return lines;\n }\n getBeforeBody(tooltipItems, options) {\n return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'beforeBody', this, tooltipItems));\n }\n getBody(tooltipItems, options) {\n const { callbacks } = options;\n const bodyItems = [];\n each(tooltipItems, (context)=>{\n const bodyItem = {\n before: [],\n lines: [],\n after: []\n };\n const scoped = overrideCallbacks(callbacks, context);\n pushOrConcat(bodyItem.before, splitNewlines(invokeCallbackWithFallback(scoped, 'beforeLabel', this, context)));\n pushOrConcat(bodyItem.lines, invokeCallbackWithFallback(scoped, 'label', this, context));\n pushOrConcat(bodyItem.after, splitNewlines(invokeCallbackWithFallback(scoped, 'afterLabel', this, context)));\n bodyItems.push(bodyItem);\n });\n return bodyItems;\n }\n getAfterBody(tooltipItems, options) {\n return getBeforeAfterBodyLines(invokeCallbackWithFallback(options.callbacks, 'afterBody', this, tooltipItems));\n }\n getFooter(tooltipItems, options) {\n const { callbacks } = options;\n const beforeFooter = invokeCallbackWithFallback(callbacks, 'beforeFooter', this, tooltipItems);\n const footer = invokeCallbackWithFallback(callbacks, 'footer', this, tooltipItems);\n const afterFooter = invokeCallbackWithFallback(callbacks, 'afterFooter', this, tooltipItems);\n let lines = [];\n lines = pushOrConcat(lines, splitNewlines(beforeFooter));\n lines = pushOrConcat(lines, splitNewlines(footer));\n lines = pushOrConcat(lines, splitNewlines(afterFooter));\n return lines;\n }\n _createItems(options) {\n const active = this._active;\n const data = this.chart.data;\n const labelColors = [];\n const labelPointStyles = [];\n const labelTextColors = [];\n let tooltipItems = [];\n let i, len;\n for(i = 0, len = active.length; i < len; ++i){\n tooltipItems.push(createTooltipItem(this.chart, active[i]));\n }\n if (options.filter) {\n tooltipItems = tooltipItems.filter((element, index, array)=>options.filter(element, index, array, data));\n }\n if (options.itemSort) {\n tooltipItems = tooltipItems.sort((a, b)=>options.itemSort(a, b, data));\n }\n each(tooltipItems, (context)=>{\n const scoped = overrideCallbacks(options.callbacks, context);\n labelColors.push(invokeCallbackWithFallback(scoped, 'labelColor', this, context));\n labelPointStyles.push(invokeCallbackWithFallback(scoped, 'labelPointStyle', this, context));\n labelTextColors.push(invokeCallbackWithFallback(scoped, 'labelTextColor', this, context));\n });\n this.labelColors = labelColors;\n this.labelPointStyles = labelPointStyles;\n this.labelTextColors = labelTextColors;\n this.dataPoints = tooltipItems;\n return tooltipItems;\n }\n update(changed, replay) {\n const options = this.options.setContext(this.getContext());\n const active = this._active;\n let properties;\n let tooltipItems = [];\n if (!active.length) {\n if (this.opacity !== 0) {\n properties = {\n opacity: 0\n };\n }\n } else {\n const position = positioners[options.position].call(this, active, this._eventPosition);\n tooltipItems = this._createItems(options);\n this.title = this.getTitle(tooltipItems, options);\n this.beforeBody = this.getBeforeBody(tooltipItems, options);\n this.body = this.getBody(tooltipItems, options);\n this.afterBody = this.getAfterBody(tooltipItems, options);\n this.footer = this.getFooter(tooltipItems, options);\n const size = this._size = getTooltipSize(this, options);\n const positionAndSize = Object.assign({}, position, size);\n const alignment = determineAlignment(this.chart, options, positionAndSize);\n const backgroundPoint = getBackgroundPoint(options, positionAndSize, alignment, this.chart);\n this.xAlign = alignment.xAlign;\n this.yAlign = alignment.yAlign;\n properties = {\n opacity: 1,\n x: backgroundPoint.x,\n y: backgroundPoint.y,\n width: size.width,\n height: size.height,\n caretX: position.x,\n caretY: position.y\n };\n }\n this._tooltipItems = tooltipItems;\n this.$context = undefined;\n if (properties) {\n this._resolveAnimations().update(this, properties);\n }\n if (changed && options.external) {\n options.external.call(this, {\n chart: this.chart,\n tooltip: this,\n replay\n });\n }\n }\n drawCaret(tooltipPoint, ctx, size, options) {\n const caretPosition = this.getCaretPosition(tooltipPoint, size, options);\n ctx.lineTo(caretPosition.x1, caretPosition.y1);\n ctx.lineTo(caretPosition.x2, caretPosition.y2);\n ctx.lineTo(caretPosition.x3, caretPosition.y3);\n }\n getCaretPosition(tooltipPoint, size, options) {\n const { xAlign , yAlign } = this;\n const { caretSize , cornerRadius } = options;\n const { topLeft , topRight , bottomLeft , bottomRight } = toTRBLCorners(cornerRadius);\n const { x: ptX , y: ptY } = tooltipPoint;\n const { width , height } = size;\n let x1, x2, x3, y1, y2, y3;\n if (yAlign === 'center') {\n y2 = ptY + height / 2;\n if (xAlign === 'left') {\n x1 = ptX;\n x2 = x1 - caretSize;\n y1 = y2 + caretSize;\n y3 = y2 - caretSize;\n } else {\n x1 = ptX + width;\n x2 = x1 + caretSize;\n y1 = y2 - caretSize;\n y3 = y2 + caretSize;\n }\n x3 = x1;\n } else {\n if (xAlign === 'left') {\n x2 = ptX + Math.max(topLeft, bottomLeft) + caretSize;\n } else if (xAlign === 'right') {\n x2 = ptX + width - Math.max(topRight, bottomRight) - caretSize;\n } else {\n x2 = this.caretX;\n }\n if (yAlign === 'top') {\n y1 = ptY;\n y2 = y1 - caretSize;\n x1 = x2 - caretSize;\n x3 = x2 + caretSize;\n } else {\n y1 = ptY + height;\n y2 = y1 + caretSize;\n x1 = x2 + caretSize;\n x3 = x2 - caretSize;\n }\n y3 = y1;\n }\n return {\n x1,\n x2,\n x3,\n y1,\n y2,\n y3\n };\n }\n drawTitle(pt, ctx, options) {\n const title = this.title;\n const length = title.length;\n let titleFont, titleSpacing, i;\n if (length) {\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n pt.x = getAlignedX(this, options.titleAlign, options);\n ctx.textAlign = rtlHelper.textAlign(options.titleAlign);\n ctx.textBaseline = 'middle';\n titleFont = toFont(options.titleFont);\n titleSpacing = options.titleSpacing;\n ctx.fillStyle = options.titleColor;\n ctx.font = titleFont.string;\n for(i = 0; i < length; ++i){\n ctx.fillText(title[i], rtlHelper.x(pt.x), pt.y + titleFont.lineHeight / 2);\n pt.y += titleFont.lineHeight + titleSpacing;\n if (i + 1 === length) {\n pt.y += options.titleMarginBottom - titleSpacing;\n }\n }\n }\n }\n _drawColorBox(ctx, pt, i, rtlHelper, options) {\n const labelColor = this.labelColors[i];\n const labelPointStyle = this.labelPointStyles[i];\n const { boxHeight , boxWidth } = options;\n const bodyFont = toFont(options.bodyFont);\n const colorX = getAlignedX(this, 'left', options);\n const rtlColorX = rtlHelper.x(colorX);\n const yOffSet = boxHeight < bodyFont.lineHeight ? (bodyFont.lineHeight - boxHeight) / 2 : 0;\n const colorY = pt.y + yOffSet;\n if (options.usePointStyle) {\n const drawOptions = {\n radius: Math.min(boxWidth, boxHeight) / 2,\n pointStyle: labelPointStyle.pointStyle,\n rotation: labelPointStyle.rotation,\n borderWidth: 1\n };\n const centerX = rtlHelper.leftForLtr(rtlColorX, boxWidth) + boxWidth / 2;\n const centerY = colorY + boxHeight / 2;\n ctx.strokeStyle = options.multiKeyBackground;\n ctx.fillStyle = options.multiKeyBackground;\n drawPoint(ctx, drawOptions, centerX, centerY);\n ctx.strokeStyle = labelColor.borderColor;\n ctx.fillStyle = labelColor.backgroundColor;\n drawPoint(ctx, drawOptions, centerX, centerY);\n } else {\n ctx.lineWidth = isObject(labelColor.borderWidth) ? Math.max(...Object.values(labelColor.borderWidth)) : labelColor.borderWidth || 1;\n ctx.strokeStyle = labelColor.borderColor;\n ctx.setLineDash(labelColor.borderDash || []);\n ctx.lineDashOffset = labelColor.borderDashOffset || 0;\n const outerX = rtlHelper.leftForLtr(rtlColorX, boxWidth);\n const innerX = rtlHelper.leftForLtr(rtlHelper.xPlus(rtlColorX, 1), boxWidth - 2);\n const borderRadius = toTRBLCorners(labelColor.borderRadius);\n if (Object.values(borderRadius).some((v)=>v !== 0)) {\n ctx.beginPath();\n ctx.fillStyle = options.multiKeyBackground;\n addRoundedRectPath(ctx, {\n x: outerX,\n y: colorY,\n w: boxWidth,\n h: boxHeight,\n radius: borderRadius\n });\n ctx.fill();\n ctx.stroke();\n ctx.fillStyle = labelColor.backgroundColor;\n ctx.beginPath();\n addRoundedRectPath(ctx, {\n x: innerX,\n y: colorY + 1,\n w: boxWidth - 2,\n h: boxHeight - 2,\n radius: borderRadius\n });\n ctx.fill();\n } else {\n ctx.fillStyle = options.multiKeyBackground;\n ctx.fillRect(outerX, colorY, boxWidth, boxHeight);\n ctx.strokeRect(outerX, colorY, boxWidth, boxHeight);\n ctx.fillStyle = labelColor.backgroundColor;\n ctx.fillRect(innerX, colorY + 1, boxWidth - 2, boxHeight - 2);\n }\n }\n ctx.fillStyle = this.labelTextColors[i];\n }\n drawBody(pt, ctx, options) {\n const { body } = this;\n const { bodySpacing , bodyAlign , displayColors , boxHeight , boxWidth , boxPadding } = options;\n const bodyFont = toFont(options.bodyFont);\n let bodyLineHeight = bodyFont.lineHeight;\n let xLinePadding = 0;\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n const fillLineOfText = function(line) {\n ctx.fillText(line, rtlHelper.x(pt.x + xLinePadding), pt.y + bodyLineHeight / 2);\n pt.y += bodyLineHeight + bodySpacing;\n };\n const bodyAlignForCalculation = rtlHelper.textAlign(bodyAlign);\n let bodyItem, textColor, lines, i, j, ilen, jlen;\n ctx.textAlign = bodyAlign;\n ctx.textBaseline = 'middle';\n ctx.font = bodyFont.string;\n pt.x = getAlignedX(this, bodyAlignForCalculation, options);\n ctx.fillStyle = options.bodyColor;\n each(this.beforeBody, fillLineOfText);\n xLinePadding = displayColors && bodyAlignForCalculation !== 'right' ? bodyAlign === 'center' ? boxWidth / 2 + boxPadding : boxWidth + 2 + boxPadding : 0;\n for(i = 0, ilen = body.length; i < ilen; ++i){\n bodyItem = body[i];\n textColor = this.labelTextColors[i];\n ctx.fillStyle = textColor;\n each(bodyItem.before, fillLineOfText);\n lines = bodyItem.lines;\n if (displayColors && lines.length) {\n this._drawColorBox(ctx, pt, i, rtlHelper, options);\n bodyLineHeight = Math.max(bodyFont.lineHeight, boxHeight);\n }\n for(j = 0, jlen = lines.length; j < jlen; ++j){\n fillLineOfText(lines[j]);\n bodyLineHeight = bodyFont.lineHeight;\n }\n each(bodyItem.after, fillLineOfText);\n }\n xLinePadding = 0;\n bodyLineHeight = bodyFont.lineHeight;\n each(this.afterBody, fillLineOfText);\n pt.y -= bodySpacing;\n }\n drawFooter(pt, ctx, options) {\n const footer = this.footer;\n const length = footer.length;\n let footerFont, i;\n if (length) {\n const rtlHelper = getRtlAdapter(options.rtl, this.x, this.width);\n pt.x = getAlignedX(this, options.footerAlign, options);\n pt.y += options.footerMarginTop;\n ctx.textAlign = rtlHelper.textAlign(options.footerAlign);\n ctx.textBaseline = 'middle';\n footerFont = toFont(options.footerFont);\n ctx.fillStyle = options.footerColor;\n ctx.font = footerFont.string;\n for(i = 0; i < length; ++i){\n ctx.fillText(footer[i], rtlHelper.x(pt.x), pt.y + footerFont.lineHeight / 2);\n pt.y += footerFont.lineHeight + options.footerSpacing;\n }\n }\n }\n drawBackground(pt, ctx, tooltipSize, options) {\n const { xAlign , yAlign } = this;\n const { x , y } = pt;\n const { width , height } = tooltipSize;\n const { topLeft , topRight , bottomLeft , bottomRight } = toTRBLCorners(options.cornerRadius);\n ctx.fillStyle = options.backgroundColor;\n ctx.strokeStyle = options.borderColor;\n ctx.lineWidth = options.borderWidth;\n ctx.beginPath();\n ctx.moveTo(x + topLeft, y);\n if (yAlign === 'top') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + width - topRight, y);\n ctx.quadraticCurveTo(x + width, y, x + width, y + topRight);\n if (yAlign === 'center' && xAlign === 'right') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + width, y + height - bottomRight);\n ctx.quadraticCurveTo(x + width, y + height, x + width - bottomRight, y + height);\n if (yAlign === 'bottom') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x + bottomLeft, y + height);\n ctx.quadraticCurveTo(x, y + height, x, y + height - bottomLeft);\n if (yAlign === 'center' && xAlign === 'left') {\n this.drawCaret(pt, ctx, tooltipSize, options);\n }\n ctx.lineTo(x, y + topLeft);\n ctx.quadraticCurveTo(x, y, x + topLeft, y);\n ctx.closePath();\n ctx.fill();\n if (options.borderWidth > 0) {\n ctx.stroke();\n }\n }\n _updateAnimationTarget(options) {\n const chart = this.chart;\n const anims = this.$animations;\n const animX = anims && anims.x;\n const animY = anims && anims.y;\n if (animX || animY) {\n const position = positioners[options.position].call(this, this._active, this._eventPosition);\n if (!position) {\n return;\n }\n const size = this._size = getTooltipSize(this, options);\n const positionAndSize = Object.assign({}, position, this._size);\n const alignment = determineAlignment(chart, options, positionAndSize);\n const point = getBackgroundPoint(options, positionAndSize, alignment, chart);\n if (animX._to !== point.x || animY._to !== point.y) {\n this.xAlign = alignment.xAlign;\n this.yAlign = alignment.yAlign;\n this.width = size.width;\n this.height = size.height;\n this.caretX = position.x;\n this.caretY = position.y;\n this._resolveAnimations().update(this, point);\n }\n }\n }\n _willRender() {\n return !!this.opacity;\n }\n draw(ctx) {\n const options = this.options.setContext(this.getContext());\n let opacity = this.opacity;\n if (!opacity) {\n return;\n }\n this._updateAnimationTarget(options);\n const tooltipSize = {\n width: this.width,\n height: this.height\n };\n const pt = {\n x: this.x,\n y: this.y\n };\n opacity = Math.abs(opacity) < 1e-3 ? 0 : opacity;\n const padding = toPadding(options.padding);\n const hasTooltipContent = this.title.length || this.beforeBody.length || this.body.length || this.afterBody.length || this.footer.length;\n if (options.enabled && hasTooltipContent) {\n ctx.save();\n ctx.globalAlpha = opacity;\n this.drawBackground(pt, ctx, tooltipSize, options);\n overrideTextDirection(ctx, options.textDirection);\n pt.y += padding.top;\n this.drawTitle(pt, ctx, options);\n this.drawBody(pt, ctx, options);\n this.drawFooter(pt, ctx, options);\n restoreTextDirection(ctx, options.textDirection);\n ctx.restore();\n }\n }\n getActiveElements() {\n return this._active || [];\n }\n setActiveElements(activeElements, eventPosition) {\n const lastActive = this._active;\n const active = activeElements.map(({ datasetIndex , index })=>{\n const meta = this.chart.getDatasetMeta(datasetIndex);\n if (!meta) {\n throw new Error('Cannot find a dataset at index ' + datasetIndex);\n }\n return {\n datasetIndex,\n element: meta.data[index],\n index\n };\n });\n const changed = !_elementsEqual(lastActive, active);\n const positionChanged = this._positionChanged(active, eventPosition);\n if (changed || positionChanged) {\n this._active = active;\n this._eventPosition = eventPosition;\n this._ignoreReplayEvents = true;\n this.update(true);\n }\n }\n handleEvent(e, replay, inChartArea = true) {\n if (replay && this._ignoreReplayEvents) {\n return false;\n }\n this._ignoreReplayEvents = false;\n const options = this.options;\n const lastActive = this._active || [];\n const active = this._getActiveElements(e, lastActive, replay, inChartArea);\n const positionChanged = this._positionChanged(active, e);\n const changed = replay || !_elementsEqual(active, lastActive) || positionChanged;\n if (changed) {\n this._active = active;\n if (options.enabled || options.external) {\n this._eventPosition = {\n x: e.x,\n y: e.y\n };\n this.update(true, replay);\n }\n }\n return changed;\n }\n _getActiveElements(e, lastActive, replay, inChartArea) {\n const options = this.options;\n if (e.type === 'mouseout') {\n return [];\n }\n if (!inChartArea) {\n return lastActive;\n }\n const active = this.chart.getElementsAtEventForMode(e, options.mode, options, replay);\n if (options.reverse) {\n active.reverse();\n }\n return active;\n }\n _positionChanged(active, e) {\n const { caretX , caretY , options } = this;\n const position = positioners[options.position].call(this, active, e);\n return position !== false && (caretX !== position.x || caretY !== position.y);\n }\n}\nvar plugin_tooltip = {\n id: 'tooltip',\n _element: Tooltip,\n positioners,\n afterInit (chart, _args, options) {\n if (options) {\n chart.tooltip = new Tooltip({\n chart,\n options\n });\n }\n },\n beforeUpdate (chart, _args, options) {\n if (chart.tooltip) {\n chart.tooltip.initialize(options);\n }\n },\n reset (chart, _args, options) {\n if (chart.tooltip) {\n chart.tooltip.initialize(options);\n }\n },\n afterDraw (chart) {\n const tooltip = chart.tooltip;\n if (tooltip && tooltip._willRender()) {\n const args = {\n tooltip\n };\n if (chart.notifyPlugins('beforeTooltipDraw', {\n ...args,\n cancelable: true\n }) === false) {\n return;\n }\n tooltip.draw(chart.ctx);\n chart.notifyPlugins('afterTooltipDraw', args);\n }\n },\n afterEvent (chart, args) {\n if (chart.tooltip) {\n const useFinalPosition = args.replay;\n if (chart.tooltip.handleEvent(args.event, useFinalPosition, args.inChartArea)) {\n args.changed = true;\n }\n }\n },\n defaults: {\n enabled: true,\n external: null,\n position: 'average',\n backgroundColor: 'rgba(0,0,0,0.8)',\n titleColor: '#fff',\n titleFont: {\n weight: 'bold'\n },\n titleSpacing: 2,\n titleMarginBottom: 6,\n titleAlign: 'left',\n bodyColor: '#fff',\n bodySpacing: 2,\n bodyFont: {},\n bodyAlign: 'left',\n footerColor: '#fff',\n footerSpacing: 2,\n footerMarginTop: 6,\n footerFont: {\n weight: 'bold'\n },\n footerAlign: 'left',\n padding: 6,\n caretPadding: 2,\n caretSize: 5,\n cornerRadius: 6,\n boxHeight: (ctx, opts)=>opts.bodyFont.size,\n boxWidth: (ctx, opts)=>opts.bodyFont.size,\n multiKeyBackground: '#fff',\n displayColors: true,\n boxPadding: 0,\n borderColor: 'rgba(0,0,0,0)',\n borderWidth: 0,\n animation: {\n duration: 400,\n easing: 'easeOutQuart'\n },\n animations: {\n numbers: {\n type: 'number',\n properties: [\n 'x',\n 'y',\n 'width',\n 'height',\n 'caretX',\n 'caretY'\n ]\n },\n opacity: {\n easing: 'linear',\n duration: 200\n }\n },\n callbacks: defaultCallbacks\n },\n defaultRoutes: {\n bodyFont: 'font',\n footerFont: 'font',\n titleFont: 'font'\n },\n descriptors: {\n _scriptable: (name)=>name !== 'filter' && name !== 'itemSort' && name !== 'external',\n _indexable: false,\n callbacks: {\n _scriptable: false,\n _indexable: false\n },\n animation: {\n _fallback: false\n },\n animations: {\n _fallback: 'animation'\n }\n },\n additionalOptionScopes: [\n 'interaction'\n ]\n};\n\nvar plugins = /*#__PURE__*/Object.freeze({\n__proto__: null,\nColors: plugin_colors,\nDecimation: plugin_decimation,\nFiller: index,\nLegend: plugin_legend,\nSubTitle: plugin_subtitle,\nTitle: plugin_title,\nTooltip: plugin_tooltip\n});\n\nconst addIfString = (labels, raw, index, addedLabels)=>{\n if (typeof raw === 'string') {\n index = labels.push(raw) - 1;\n addedLabels.unshift({\n index,\n label: raw\n });\n } else if (isNaN(raw)) {\n index = null;\n }\n return index;\n};\nfunction findOrAddLabel(labels, raw, index, addedLabels) {\n const first = labels.indexOf(raw);\n if (first === -1) {\n return addIfString(labels, raw, index, addedLabels);\n }\n const last = labels.lastIndexOf(raw);\n return first !== last ? index : first;\n}\nconst validIndex = (index, max)=>index === null ? null : _limitValue(Math.round(index), 0, max);\nfunction _getLabelForValue(value) {\n const labels = this.getLabels();\n if (value >= 0 && value < labels.length) {\n return labels[value];\n }\n return value;\n}\nclass CategoryScale extends Scale {\n static id = 'category';\n static defaults = {\n ticks: {\n callback: _getLabelForValue\n }\n };\n constructor(cfg){\n super(cfg);\n this._startValue = undefined;\n this._valueRange = 0;\n this._addedLabels = [];\n }\n init(scaleOptions) {\n const added = this._addedLabels;\n if (added.length) {\n const labels = this.getLabels();\n for (const { index , label } of added){\n if (labels[index] === label) {\n labels.splice(index, 1);\n }\n }\n this._addedLabels = [];\n }\n super.init(scaleOptions);\n }\n parse(raw, index) {\n if (isNullOrUndef(raw)) {\n return null;\n }\n const labels = this.getLabels();\n index = isFinite(index) && labels[index] === raw ? index : findOrAddLabel(labels, raw, valueOrDefault(index, raw), this._addedLabels);\n return validIndex(index, labels.length - 1);\n }\n determineDataLimits() {\n const { minDefined , maxDefined } = this.getUserBounds();\n let { min , max } = this.getMinMax(true);\n if (this.options.bounds === 'ticks') {\n if (!minDefined) {\n min = 0;\n }\n if (!maxDefined) {\n max = this.getLabels().length - 1;\n }\n }\n this.min = min;\n this.max = max;\n }\n buildTicks() {\n const min = this.min;\n const max = this.max;\n const offset = this.options.offset;\n const ticks = [];\n let labels = this.getLabels();\n labels = min === 0 && max === labels.length - 1 ? labels : labels.slice(min, max + 1);\n this._valueRange = Math.max(labels.length - (offset ? 0 : 1), 1);\n this._startValue = this.min - (offset ? 0.5 : 0);\n for(let value = min; value <= max; value++){\n ticks.push({\n value\n });\n }\n return ticks;\n }\n getLabelForValue(value) {\n return _getLabelForValue.call(this, value);\n }\n configure() {\n super.configure();\n if (!this.isHorizontal()) {\n this._reversePixels = !this._reversePixels;\n }\n }\n getPixelForValue(value) {\n if (typeof value !== 'number') {\n value = this.parse(value);\n }\n return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n }\n getPixelForTick(index) {\n const ticks = this.ticks;\n if (index < 0 || index > ticks.length - 1) {\n return null;\n }\n return this.getPixelForValue(ticks[index].value);\n }\n getValueForPixel(pixel) {\n return Math.round(this._startValue + this.getDecimalForPixel(pixel) * this._valueRange);\n }\n getBasePixel() {\n return this.bottom;\n }\n}\n\nfunction generateTicks$1(generationOptions, dataRange) {\n const ticks = [];\n const MIN_SPACING = 1e-14;\n const { bounds , step , min , max , precision , count , maxTicks , maxDigits , includeBounds } = generationOptions;\n const unit = step || 1;\n const maxSpaces = maxTicks - 1;\n const { min: rmin , max: rmax } = dataRange;\n const minDefined = !isNullOrUndef(min);\n const maxDefined = !isNullOrUndef(max);\n const countDefined = !isNullOrUndef(count);\n const minSpacing = (rmax - rmin) / (maxDigits + 1);\n let spacing = niceNum((rmax - rmin) / maxSpaces / unit) * unit;\n let factor, niceMin, niceMax, numSpaces;\n if (spacing < MIN_SPACING && !minDefined && !maxDefined) {\n return [\n {\n value: rmin\n },\n {\n value: rmax\n }\n ];\n }\n numSpaces = Math.ceil(rmax / spacing) - Math.floor(rmin / spacing);\n if (numSpaces > maxSpaces) {\n spacing = niceNum(numSpaces * spacing / maxSpaces / unit) * unit;\n }\n if (!isNullOrUndef(precision)) {\n factor = Math.pow(10, precision);\n spacing = Math.ceil(spacing * factor) / factor;\n }\n if (bounds === 'ticks') {\n niceMin = Math.floor(rmin / spacing) * spacing;\n niceMax = Math.ceil(rmax / spacing) * spacing;\n } else {\n niceMin = rmin;\n niceMax = rmax;\n }\n if (minDefined && maxDefined && step && almostWhole((max - min) / step, spacing / 1000)) {\n numSpaces = Math.round(Math.min((max - min) / spacing, maxTicks));\n spacing = (max - min) / numSpaces;\n niceMin = min;\n niceMax = max;\n } else if (countDefined) {\n niceMin = minDefined ? min : niceMin;\n niceMax = maxDefined ? max : niceMax;\n numSpaces = count - 1;\n spacing = (niceMax - niceMin) / numSpaces;\n } else {\n numSpaces = (niceMax - niceMin) / spacing;\n if (almostEquals(numSpaces, Math.round(numSpaces), spacing / 1000)) {\n numSpaces = Math.round(numSpaces);\n } else {\n numSpaces = Math.ceil(numSpaces);\n }\n }\n const decimalPlaces = Math.max(_decimalPlaces(spacing), _decimalPlaces(niceMin));\n factor = Math.pow(10, isNullOrUndef(precision) ? decimalPlaces : precision);\n niceMin = Math.round(niceMin * factor) / factor;\n niceMax = Math.round(niceMax * factor) / factor;\n let j = 0;\n if (minDefined) {\n if (includeBounds && niceMin !== min) {\n ticks.push({\n value: min\n });\n if (niceMin < min) {\n j++;\n }\n if (almostEquals(Math.round((niceMin + j * spacing) * factor) / factor, min, relativeLabelSize(min, minSpacing, generationOptions))) {\n j++;\n }\n } else if (niceMin < min) {\n j++;\n }\n }\n for(; j < numSpaces; ++j){\n const tickValue = Math.round((niceMin + j * spacing) * factor) / factor;\n if (maxDefined && tickValue > max) {\n break;\n }\n ticks.push({\n value: tickValue\n });\n }\n if (maxDefined && includeBounds && niceMax !== max) {\n if (ticks.length && almostEquals(ticks[ticks.length - 1].value, max, relativeLabelSize(max, minSpacing, generationOptions))) {\n ticks[ticks.length - 1].value = max;\n } else {\n ticks.push({\n value: max\n });\n }\n } else if (!maxDefined || niceMax === max) {\n ticks.push({\n value: niceMax\n });\n }\n return ticks;\n}\nfunction relativeLabelSize(value, minSpacing, { horizontal , minRotation }) {\n const rad = toRadians(minRotation);\n const ratio = (horizontal ? Math.sin(rad) : Math.cos(rad)) || 0.001;\n const length = 0.75 * minSpacing * ('' + value).length;\n return Math.min(minSpacing / ratio, length);\n}\nclass LinearScaleBase extends Scale {\n constructor(cfg){\n super(cfg);\n this.start = undefined;\n this.end = undefined;\n this._startValue = undefined;\n this._endValue = undefined;\n this._valueRange = 0;\n }\n parse(raw, index) {\n if (isNullOrUndef(raw)) {\n return null;\n }\n if ((typeof raw === 'number' || raw instanceof Number) && !isFinite(+raw)) {\n return null;\n }\n return +raw;\n }\n handleTickRangeOptions() {\n const { beginAtZero } = this.options;\n const { minDefined , maxDefined } = this.getUserBounds();\n let { min , max } = this;\n const setMin = (v)=>min = minDefined ? min : v;\n const setMax = (v)=>max = maxDefined ? max : v;\n if (beginAtZero) {\n const minSign = sign(min);\n const maxSign = sign(max);\n if (minSign < 0 && maxSign < 0) {\n setMax(0);\n } else if (minSign > 0 && maxSign > 0) {\n setMin(0);\n }\n }\n if (min === max) {\n let offset = max === 0 ? 1 : Math.abs(max * 0.05);\n setMax(max + offset);\n if (!beginAtZero) {\n setMin(min - offset);\n }\n }\n this.min = min;\n this.max = max;\n }\n getTickLimit() {\n const tickOpts = this.options.ticks;\n let { maxTicksLimit , stepSize } = tickOpts;\n let maxTicks;\n if (stepSize) {\n maxTicks = Math.ceil(this.max / stepSize) - Math.floor(this.min / stepSize) + 1;\n if (maxTicks > 1000) {\n console.warn(`scales.${this.id}.ticks.stepSize: ${stepSize} would result generating up to ${maxTicks} ticks. Limiting to 1000.`);\n maxTicks = 1000;\n }\n } else {\n maxTicks = this.computeTickLimit();\n maxTicksLimit = maxTicksLimit || 11;\n }\n if (maxTicksLimit) {\n maxTicks = Math.min(maxTicksLimit, maxTicks);\n }\n return maxTicks;\n }\n computeTickLimit() {\n return Number.POSITIVE_INFINITY;\n }\n buildTicks() {\n const opts = this.options;\n const tickOpts = opts.ticks;\n let maxTicks = this.getTickLimit();\n maxTicks = Math.max(2, maxTicks);\n const numericGeneratorOptions = {\n maxTicks,\n bounds: opts.bounds,\n min: opts.min,\n max: opts.max,\n precision: tickOpts.precision,\n step: tickOpts.stepSize,\n count: tickOpts.count,\n maxDigits: this._maxDigits(),\n horizontal: this.isHorizontal(),\n minRotation: tickOpts.minRotation || 0,\n includeBounds: tickOpts.includeBounds !== false\n };\n const dataRange = this._range || this;\n const ticks = generateTicks$1(numericGeneratorOptions, dataRange);\n if (opts.bounds === 'ticks') {\n _setMinAndMaxByKey(ticks, this, 'value');\n }\n if (opts.reverse) {\n ticks.reverse();\n this.start = this.max;\n this.end = this.min;\n } else {\n this.start = this.min;\n this.end = this.max;\n }\n return ticks;\n }\n configure() {\n const ticks = this.ticks;\n let start = this.min;\n let end = this.max;\n super.configure();\n if (this.options.offset && ticks.length) {\n const offset = (end - start) / Math.max(ticks.length - 1, 1) / 2;\n start -= offset;\n end += offset;\n }\n this._startValue = start;\n this._endValue = end;\n this._valueRange = end - start;\n }\n getLabelForValue(value) {\n return formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n }\n}\n\nclass LinearScale extends LinearScaleBase {\n static id = 'linear';\n static defaults = {\n ticks: {\n callback: Ticks.formatters.numeric\n }\n };\n determineDataLimits() {\n const { min , max } = this.getMinMax(true);\n this.min = isNumberFinite(min) ? min : 0;\n this.max = isNumberFinite(max) ? max : 1;\n this.handleTickRangeOptions();\n }\n computeTickLimit() {\n const horizontal = this.isHorizontal();\n const length = horizontal ? this.width : this.height;\n const minRotation = toRadians(this.options.ticks.minRotation);\n const ratio = (horizontal ? Math.sin(minRotation) : Math.cos(minRotation)) || 0.001;\n const tickFont = this._resolveTickFontOptions(0);\n return Math.ceil(length / Math.min(40, tickFont.lineHeight / ratio));\n }\n getPixelForValue(value) {\n return value === null ? NaN : this.getPixelForDecimal((value - this._startValue) / this._valueRange);\n }\n getValueForPixel(pixel) {\n return this._startValue + this.getDecimalForPixel(pixel) * this._valueRange;\n }\n}\n\nconst log10Floor = (v)=>Math.floor(log10(v));\nconst changeExponent = (v, m)=>Math.pow(10, log10Floor(v) + m);\nfunction isMajor(tickVal) {\n const remain = tickVal / Math.pow(10, log10Floor(tickVal));\n return remain === 1;\n}\nfunction steps(min, max, rangeExp) {\n const rangeStep = Math.pow(10, rangeExp);\n const start = Math.floor(min / rangeStep);\n const end = Math.ceil(max / rangeStep);\n return end - start;\n}\nfunction startExp(min, max) {\n const range = max - min;\n let rangeExp = log10Floor(range);\n while(steps(min, max, rangeExp) > 10){\n rangeExp++;\n }\n while(steps(min, max, rangeExp) < 10){\n rangeExp--;\n }\n return Math.min(rangeExp, log10Floor(min));\n}\n function generateTicks(generationOptions, { min , max }) {\n min = finiteOrDefault(generationOptions.min, min);\n const ticks = [];\n const minExp = log10Floor(min);\n let exp = startExp(min, max);\n let precision = exp < 0 ? Math.pow(10, Math.abs(exp)) : 1;\n const stepSize = Math.pow(10, exp);\n const base = minExp > exp ? Math.pow(10, minExp) : 0;\n const start = Math.round((min - base) * precision) / precision;\n const offset = Math.floor((min - base) / stepSize / 10) * stepSize * 10;\n let significand = Math.floor((start - offset) / Math.pow(10, exp));\n let value = finiteOrDefault(generationOptions.min, Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision);\n while(value < max){\n ticks.push({\n value,\n major: isMajor(value),\n significand\n });\n if (significand >= 10) {\n significand = significand < 15 ? 15 : 20;\n } else {\n significand++;\n }\n if (significand >= 20) {\n exp++;\n significand = 2;\n precision = exp >= 0 ? 1 : precision;\n }\n value = Math.round((base + offset + significand * Math.pow(10, exp)) * precision) / precision;\n }\n const lastTick = finiteOrDefault(generationOptions.max, value);\n ticks.push({\n value: lastTick,\n major: isMajor(lastTick),\n significand\n });\n return ticks;\n}\nclass LogarithmicScale extends Scale {\n static id = 'logarithmic';\n static defaults = {\n ticks: {\n callback: Ticks.formatters.logarithmic,\n major: {\n enabled: true\n }\n }\n };\n constructor(cfg){\n super(cfg);\n this.start = undefined;\n this.end = undefined;\n this._startValue = undefined;\n this._valueRange = 0;\n }\n parse(raw, index) {\n const value = LinearScaleBase.prototype.parse.apply(this, [\n raw,\n index\n ]);\n if (value === 0) {\n this._zero = true;\n return undefined;\n }\n return isNumberFinite(value) && value > 0 ? value : null;\n }\n determineDataLimits() {\n const { min , max } = this.getMinMax(true);\n this.min = isNumberFinite(min) ? Math.max(0, min) : null;\n this.max = isNumberFinite(max) ? Math.max(0, max) : null;\n if (this.options.beginAtZero) {\n this._zero = true;\n }\n if (this._zero && this.min !== this._suggestedMin && !isNumberFinite(this._userMin)) {\n this.min = min === changeExponent(this.min, 0) ? changeExponent(this.min, -1) : changeExponent(this.min, 0);\n }\n this.handleTickRangeOptions();\n }\n handleTickRangeOptions() {\n const { minDefined , maxDefined } = this.getUserBounds();\n let min = this.min;\n let max = this.max;\n const setMin = (v)=>min = minDefined ? min : v;\n const setMax = (v)=>max = maxDefined ? max : v;\n if (min === max) {\n if (min <= 0) {\n setMin(1);\n setMax(10);\n } else {\n setMin(changeExponent(min, -1));\n setMax(changeExponent(max, +1));\n }\n }\n if (min <= 0) {\n setMin(changeExponent(max, -1));\n }\n if (max <= 0) {\n setMax(changeExponent(min, +1));\n }\n this.min = min;\n this.max = max;\n }\n buildTicks() {\n const opts = this.options;\n const generationOptions = {\n min: this._userMin,\n max: this._userMax\n };\n const ticks = generateTicks(generationOptions, this);\n if (opts.bounds === 'ticks') {\n _setMinAndMaxByKey(ticks, this, 'value');\n }\n if (opts.reverse) {\n ticks.reverse();\n this.start = this.max;\n this.end = this.min;\n } else {\n this.start = this.min;\n this.end = this.max;\n }\n return ticks;\n }\n getLabelForValue(value) {\n return value === undefined ? '0' : formatNumber(value, this.chart.options.locale, this.options.ticks.format);\n }\n configure() {\n const start = this.min;\n super.configure();\n this._startValue = log10(start);\n this._valueRange = log10(this.max) - log10(start);\n }\n getPixelForValue(value) {\n if (value === undefined || value === 0) {\n value = this.min;\n }\n if (value === null || isNaN(value)) {\n return NaN;\n }\n return this.getPixelForDecimal(value === this.min ? 0 : (log10(value) - this._startValue) / this._valueRange);\n }\n getValueForPixel(pixel) {\n const decimal = this.getDecimalForPixel(pixel);\n return Math.pow(10, this._startValue + decimal * this._valueRange);\n }\n}\n\nfunction getTickBackdropHeight(opts) {\n const tickOpts = opts.ticks;\n if (tickOpts.display && opts.display) {\n const padding = toPadding(tickOpts.backdropPadding);\n return valueOrDefault(tickOpts.font && tickOpts.font.size, defaults.font.size) + padding.height;\n }\n return 0;\n}\nfunction measureLabelSize(ctx, font, label) {\n label = isArray(label) ? label : [\n label\n ];\n return {\n w: _longestText(ctx, font.string, label),\n h: label.length * font.lineHeight\n };\n}\nfunction determineLimits(angle, pos, size, min, max) {\n if (angle === min || angle === max) {\n return {\n start: pos - size / 2,\n end: pos + size / 2\n };\n } else if (angle < min || angle > max) {\n return {\n start: pos - size,\n end: pos\n };\n }\n return {\n start: pos,\n end: pos + size\n };\n}\n function fitWithPointLabels(scale) {\n const orig = {\n l: scale.left + scale._padding.left,\n r: scale.right - scale._padding.right,\n t: scale.top + scale._padding.top,\n b: scale.bottom - scale._padding.bottom\n };\n const limits = Object.assign({}, orig);\n const labelSizes = [];\n const padding = [];\n const valueCount = scale._pointLabels.length;\n const pointLabelOpts = scale.options.pointLabels;\n const additionalAngle = pointLabelOpts.centerPointLabels ? PI / valueCount : 0;\n for(let i = 0; i < valueCount; i++){\n const opts = pointLabelOpts.setContext(scale.getPointLabelContext(i));\n padding[i] = opts.padding;\n const pointPosition = scale.getPointPosition(i, scale.drawingArea + padding[i], additionalAngle);\n const plFont = toFont(opts.font);\n const textSize = measureLabelSize(scale.ctx, plFont, scale._pointLabels[i]);\n labelSizes[i] = textSize;\n const angleRadians = _normalizeAngle(scale.getIndexAngle(i) + additionalAngle);\n const angle = Math.round(toDegrees(angleRadians));\n const hLimits = determineLimits(angle, pointPosition.x, textSize.w, 0, 180);\n const vLimits = determineLimits(angle, pointPosition.y, textSize.h, 90, 270);\n updateLimits(limits, orig, angleRadians, hLimits, vLimits);\n }\n scale.setCenterPoint(orig.l - limits.l, limits.r - orig.r, orig.t - limits.t, limits.b - orig.b);\n scale._pointLabelItems = buildPointLabelItems(scale, labelSizes, padding);\n}\nfunction updateLimits(limits, orig, angle, hLimits, vLimits) {\n const sin = Math.abs(Math.sin(angle));\n const cos = Math.abs(Math.cos(angle));\n let x = 0;\n let y = 0;\n if (hLimits.start < orig.l) {\n x = (orig.l - hLimits.start) / sin;\n limits.l = Math.min(limits.l, orig.l - x);\n } else if (hLimits.end > orig.r) {\n x = (hLimits.end - orig.r) / sin;\n limits.r = Math.max(limits.r, orig.r + x);\n }\n if (vLimits.start < orig.t) {\n y = (orig.t - vLimits.start) / cos;\n limits.t = Math.min(limits.t, orig.t - y);\n } else if (vLimits.end > orig.b) {\n y = (vLimits.end - orig.b) / cos;\n limits.b = Math.max(limits.b, orig.b + y);\n }\n}\nfunction createPointLabelItem(scale, index, itemOpts) {\n const outerDistance = scale.drawingArea;\n const { extra , additionalAngle , padding , size } = itemOpts;\n const pointLabelPosition = scale.getPointPosition(index, outerDistance + extra + padding, additionalAngle);\n const angle = Math.round(toDegrees(_normalizeAngle(pointLabelPosition.angle + HALF_PI)));\n const y = yForAngle(pointLabelPosition.y, size.h, angle);\n const textAlign = getTextAlignForAngle(angle);\n const left = leftForTextAlign(pointLabelPosition.x, size.w, textAlign);\n return {\n visible: true,\n x: pointLabelPosition.x,\n y,\n textAlign,\n left,\n top: y,\n right: left + size.w,\n bottom: y + size.h\n };\n}\nfunction isNotOverlapped(item, area) {\n if (!area) {\n return true;\n }\n const { left , top , right , bottom } = item;\n const apexesInArea = _isPointInArea({\n x: left,\n y: top\n }, area) || _isPointInArea({\n x: left,\n y: bottom\n }, area) || _isPointInArea({\n x: right,\n y: top\n }, area) || _isPointInArea({\n x: right,\n y: bottom\n }, area);\n return !apexesInArea;\n}\nfunction buildPointLabelItems(scale, labelSizes, padding) {\n const items = [];\n const valueCount = scale._pointLabels.length;\n const opts = scale.options;\n const { centerPointLabels , display } = opts.pointLabels;\n const itemOpts = {\n extra: getTickBackdropHeight(opts) / 2,\n additionalAngle: centerPointLabels ? PI / valueCount : 0\n };\n let area;\n for(let i = 0; i < valueCount; i++){\n itemOpts.padding = padding[i];\n itemOpts.size = labelSizes[i];\n const item = createPointLabelItem(scale, i, itemOpts);\n items.push(item);\n if (display === 'auto') {\n item.visible = isNotOverlapped(item, area);\n if (item.visible) {\n area = item;\n }\n }\n }\n return items;\n}\nfunction getTextAlignForAngle(angle) {\n if (angle === 0 || angle === 180) {\n return 'center';\n } else if (angle < 180) {\n return 'left';\n }\n return 'right';\n}\nfunction leftForTextAlign(x, w, align) {\n if (align === 'right') {\n x -= w;\n } else if (align === 'center') {\n x -= w / 2;\n }\n return x;\n}\nfunction yForAngle(y, h, angle) {\n if (angle === 90 || angle === 270) {\n y -= h / 2;\n } else if (angle > 270 || angle < 90) {\n y -= h;\n }\n return y;\n}\nfunction drawPointLabelBox(ctx, opts, item) {\n const { left , top , right , bottom } = item;\n const { backdropColor } = opts;\n if (!isNullOrUndef(backdropColor)) {\n const borderRadius = toTRBLCorners(opts.borderRadius);\n const padding = toPadding(opts.backdropPadding);\n ctx.fillStyle = backdropColor;\n const backdropLeft = left - padding.left;\n const backdropTop = top - padding.top;\n const backdropWidth = right - left + padding.width;\n const backdropHeight = bottom - top + padding.height;\n if (Object.values(borderRadius).some((v)=>v !== 0)) {\n ctx.beginPath();\n addRoundedRectPath(ctx, {\n x: backdropLeft,\n y: backdropTop,\n w: backdropWidth,\n h: backdropHeight,\n radius: borderRadius\n });\n ctx.fill();\n } else {\n ctx.fillRect(backdropLeft, backdropTop, backdropWidth, backdropHeight);\n }\n }\n}\nfunction drawPointLabels(scale, labelCount) {\n const { ctx , options: { pointLabels } } = scale;\n for(let i = labelCount - 1; i >= 0; i--){\n const item = scale._pointLabelItems[i];\n if (!item.visible) {\n continue;\n }\n const optsAtIndex = pointLabels.setContext(scale.getPointLabelContext(i));\n drawPointLabelBox(ctx, optsAtIndex, item);\n const plFont = toFont(optsAtIndex.font);\n const { x , y , textAlign } = item;\n renderText(ctx, scale._pointLabels[i], x, y + plFont.lineHeight / 2, plFont, {\n color: optsAtIndex.color,\n textAlign: textAlign,\n textBaseline: 'middle'\n });\n }\n}\nfunction pathRadiusLine(scale, radius, circular, labelCount) {\n const { ctx } = scale;\n if (circular) {\n ctx.arc(scale.xCenter, scale.yCenter, radius, 0, TAU);\n } else {\n let pointPosition = scale.getPointPosition(0, radius);\n ctx.moveTo(pointPosition.x, pointPosition.y);\n for(let i = 1; i < labelCount; i++){\n pointPosition = scale.getPointPosition(i, radius);\n ctx.lineTo(pointPosition.x, pointPosition.y);\n }\n }\n}\nfunction drawRadiusLine(scale, gridLineOpts, radius, labelCount, borderOpts) {\n const ctx = scale.ctx;\n const circular = gridLineOpts.circular;\n const { color , lineWidth } = gridLineOpts;\n if (!circular && !labelCount || !color || !lineWidth || radius < 0) {\n return;\n }\n ctx.save();\n ctx.strokeStyle = color;\n ctx.lineWidth = lineWidth;\n ctx.setLineDash(borderOpts.dash);\n ctx.lineDashOffset = borderOpts.dashOffset;\n ctx.beginPath();\n pathRadiusLine(scale, radius, circular, labelCount);\n ctx.closePath();\n ctx.stroke();\n ctx.restore();\n}\nfunction createPointLabelContext(parent, index, label) {\n return createContext(parent, {\n label,\n index,\n type: 'pointLabel'\n });\n}\nclass RadialLinearScale extends LinearScaleBase {\n static id = 'radialLinear';\n static defaults = {\n display: true,\n animate: true,\n position: 'chartArea',\n angleLines: {\n display: true,\n lineWidth: 1,\n borderDash: [],\n borderDashOffset: 0.0\n },\n grid: {\n circular: false\n },\n startAngle: 0,\n ticks: {\n showLabelBackdrop: true,\n callback: Ticks.formatters.numeric\n },\n pointLabels: {\n backdropColor: undefined,\n backdropPadding: 2,\n display: true,\n font: {\n size: 10\n },\n callback (label) {\n return label;\n },\n padding: 5,\n centerPointLabels: false\n }\n };\n static defaultRoutes = {\n 'angleLines.color': 'borderColor',\n 'pointLabels.color': 'color',\n 'ticks.color': 'color'\n };\n static descriptors = {\n angleLines: {\n _fallback: 'grid'\n }\n };\n constructor(cfg){\n super(cfg);\n this.xCenter = undefined;\n this.yCenter = undefined;\n this.drawingArea = undefined;\n this._pointLabels = [];\n this._pointLabelItems = [];\n }\n setDimensions() {\n const padding = this._padding = toPadding(getTickBackdropHeight(this.options) / 2);\n const w = this.width = this.maxWidth - padding.width;\n const h = this.height = this.maxHeight - padding.height;\n this.xCenter = Math.floor(this.left + w / 2 + padding.left);\n this.yCenter = Math.floor(this.top + h / 2 + padding.top);\n this.drawingArea = Math.floor(Math.min(w, h) / 2);\n }\n determineDataLimits() {\n const { min , max } = this.getMinMax(false);\n this.min = isNumberFinite(min) && !isNaN(min) ? min : 0;\n this.max = isNumberFinite(max) && !isNaN(max) ? max : 0;\n this.handleTickRangeOptions();\n }\n computeTickLimit() {\n return Math.ceil(this.drawingArea / getTickBackdropHeight(this.options));\n }\n generateTickLabels(ticks) {\n LinearScaleBase.prototype.generateTickLabels.call(this, ticks);\n this._pointLabels = this.getLabels().map((value, index)=>{\n const label = callback(this.options.pointLabels.callback, [\n value,\n index\n ], this);\n return label || label === 0 ? label : '';\n }).filter((v, i)=>this.chart.getDataVisibility(i));\n }\n fit() {\n const opts = this.options;\n if (opts.display && opts.pointLabels.display) {\n fitWithPointLabels(this);\n } else {\n this.setCenterPoint(0, 0, 0, 0);\n }\n }\n setCenterPoint(leftMovement, rightMovement, topMovement, bottomMovement) {\n this.xCenter += Math.floor((leftMovement - rightMovement) / 2);\n this.yCenter += Math.floor((topMovement - bottomMovement) / 2);\n this.drawingArea -= Math.min(this.drawingArea / 2, Math.max(leftMovement, rightMovement, topMovement, bottomMovement));\n }\n getIndexAngle(index) {\n const angleMultiplier = TAU / (this._pointLabels.length || 1);\n const startAngle = this.options.startAngle || 0;\n return _normalizeAngle(index * angleMultiplier + toRadians(startAngle));\n }\n getDistanceFromCenterForValue(value) {\n if (isNullOrUndef(value)) {\n return NaN;\n }\n const scalingFactor = this.drawingArea / (this.max - this.min);\n if (this.options.reverse) {\n return (this.max - value) * scalingFactor;\n }\n return (value - this.min) * scalingFactor;\n }\n getValueForDistanceFromCenter(distance) {\n if (isNullOrUndef(distance)) {\n return NaN;\n }\n const scaledDistance = distance / (this.drawingArea / (this.max - this.min));\n return this.options.reverse ? this.max - scaledDistance : this.min + scaledDistance;\n }\n getPointLabelContext(index) {\n const pointLabels = this._pointLabels || [];\n if (index >= 0 && index < pointLabels.length) {\n const pointLabel = pointLabels[index];\n return createPointLabelContext(this.getContext(), index, pointLabel);\n }\n }\n getPointPosition(index, distanceFromCenter, additionalAngle = 0) {\n const angle = this.getIndexAngle(index) - HALF_PI + additionalAngle;\n return {\n x: Math.cos(angle) * distanceFromCenter + this.xCenter,\n y: Math.sin(angle) * distanceFromCenter + this.yCenter,\n angle\n };\n }\n getPointPositionForValue(index, value) {\n return this.getPointPosition(index, this.getDistanceFromCenterForValue(value));\n }\n getBasePosition(index) {\n return this.getPointPositionForValue(index || 0, this.getBaseValue());\n }\n getPointLabelPosition(index) {\n const { left , top , right , bottom } = this._pointLabelItems[index];\n return {\n left,\n top,\n right,\n bottom\n };\n }\n drawBackground() {\n const { backgroundColor , grid: { circular } } = this.options;\n if (backgroundColor) {\n const ctx = this.ctx;\n ctx.save();\n ctx.beginPath();\n pathRadiusLine(this, this.getDistanceFromCenterForValue(this._endValue), circular, this._pointLabels.length);\n ctx.closePath();\n ctx.fillStyle = backgroundColor;\n ctx.fill();\n ctx.restore();\n }\n }\n drawGrid() {\n const ctx = this.ctx;\n const opts = this.options;\n const { angleLines , grid , border } = opts;\n const labelCount = this._pointLabels.length;\n let i, offset, position;\n if (opts.pointLabels.display) {\n drawPointLabels(this, labelCount);\n }\n if (grid.display) {\n this.ticks.forEach((tick, index)=>{\n if (index !== 0) {\n offset = this.getDistanceFromCenterForValue(tick.value);\n const context = this.getContext(index);\n const optsAtIndex = grid.setContext(context);\n const optsAtIndexBorder = border.setContext(context);\n drawRadiusLine(this, optsAtIndex, offset, labelCount, optsAtIndexBorder);\n }\n });\n }\n if (angleLines.display) {\n ctx.save();\n for(i = labelCount - 1; i >= 0; i--){\n const optsAtIndex = angleLines.setContext(this.getPointLabelContext(i));\n const { color , lineWidth } = optsAtIndex;\n if (!lineWidth || !color) {\n continue;\n }\n ctx.lineWidth = lineWidth;\n ctx.strokeStyle = color;\n ctx.setLineDash(optsAtIndex.borderDash);\n ctx.lineDashOffset = optsAtIndex.borderDashOffset;\n offset = this.getDistanceFromCenterForValue(opts.ticks.reverse ? this.min : this.max);\n position = this.getPointPosition(i, offset);\n ctx.beginPath();\n ctx.moveTo(this.xCenter, this.yCenter);\n ctx.lineTo(position.x, position.y);\n ctx.stroke();\n }\n ctx.restore();\n }\n }\n drawBorder() {}\n drawLabels() {\n const ctx = this.ctx;\n const opts = this.options;\n const tickOpts = opts.ticks;\n if (!tickOpts.display) {\n return;\n }\n const startAngle = this.getIndexAngle(0);\n let offset, width;\n ctx.save();\n ctx.translate(this.xCenter, this.yCenter);\n ctx.rotate(startAngle);\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n this.ticks.forEach((tick, index)=>{\n if (index === 0 && !opts.reverse) {\n return;\n }\n const optsAtIndex = tickOpts.setContext(this.getContext(index));\n const tickFont = toFont(optsAtIndex.font);\n offset = this.getDistanceFromCenterForValue(this.ticks[index].value);\n if (optsAtIndex.showLabelBackdrop) {\n ctx.font = tickFont.string;\n width = ctx.measureText(tick.label).width;\n ctx.fillStyle = optsAtIndex.backdropColor;\n const padding = toPadding(optsAtIndex.backdropPadding);\n ctx.fillRect(-width / 2 - padding.left, -offset - tickFont.size / 2 - padding.top, width + padding.width, tickFont.size + padding.height);\n }\n renderText(ctx, tick.label, 0, -offset, tickFont, {\n color: optsAtIndex.color\n });\n });\n ctx.restore();\n }\n drawTitle() {}\n}\n\nconst INTERVALS = {\n millisecond: {\n common: true,\n size: 1,\n steps: 1000\n },\n second: {\n common: true,\n size: 1000,\n steps: 60\n },\n minute: {\n common: true,\n size: 60000,\n steps: 60\n },\n hour: {\n common: true,\n size: 3600000,\n steps: 24\n },\n day: {\n common: true,\n size: 86400000,\n steps: 30\n },\n week: {\n common: false,\n size: 604800000,\n steps: 4\n },\n month: {\n common: true,\n size: 2.628e9,\n steps: 12\n },\n quarter: {\n common: false,\n size: 7.884e9,\n steps: 4\n },\n year: {\n common: true,\n size: 3.154e10\n }\n};\n const UNITS = /* #__PURE__ */ Object.keys(INTERVALS);\n function sorter(a, b) {\n return a - b;\n}\n function parse(scale, input) {\n if (isNullOrUndef(input)) {\n return null;\n }\n const adapter = scale._adapter;\n const { parser , round , isoWeekday } = scale._parseOpts;\n let value = input;\n if (typeof parser === 'function') {\n value = parser(value);\n }\n if (!isNumberFinite(value)) {\n value = typeof parser === 'string' ? adapter.parse(value, parser) : adapter.parse(value);\n }\n if (value === null) {\n return null;\n }\n if (round) {\n value = round === 'week' && (isNumber(isoWeekday) || isoWeekday === true) ? adapter.startOf(value, 'isoWeek', isoWeekday) : adapter.startOf(value, round);\n }\n return +value;\n}\n function determineUnitForAutoTicks(minUnit, min, max, capacity) {\n const ilen = UNITS.length;\n for(let i = UNITS.indexOf(minUnit); i < ilen - 1; ++i){\n const interval = INTERVALS[UNITS[i]];\n const factor = interval.steps ? interval.steps : Number.MAX_SAFE_INTEGER;\n if (interval.common && Math.ceil((max - min) / (factor * interval.size)) <= capacity) {\n return UNITS[i];\n }\n }\n return UNITS[ilen - 1];\n}\n function determineUnitForFormatting(scale, numTicks, minUnit, min, max) {\n for(let i = UNITS.length - 1; i >= UNITS.indexOf(minUnit); i--){\n const unit = UNITS[i];\n if (INTERVALS[unit].common && scale._adapter.diff(max, min, unit) >= numTicks - 1) {\n return unit;\n }\n }\n return UNITS[minUnit ? UNITS.indexOf(minUnit) : 0];\n}\n function determineMajorUnit(unit) {\n for(let i = UNITS.indexOf(unit) + 1, ilen = UNITS.length; i < ilen; ++i){\n if (INTERVALS[UNITS[i]].common) {\n return UNITS[i];\n }\n }\n}\n function addTick(ticks, time, timestamps) {\n if (!timestamps) {\n ticks[time] = true;\n } else if (timestamps.length) {\n const { lo , hi } = _lookup(timestamps, time);\n const timestamp = timestamps[lo] >= time ? timestamps[lo] : timestamps[hi];\n ticks[timestamp] = true;\n }\n}\n function setMajorTicks(scale, ticks, map, majorUnit) {\n const adapter = scale._adapter;\n const first = +adapter.startOf(ticks[0].value, majorUnit);\n const last = ticks[ticks.length - 1].value;\n let major, index;\n for(major = first; major <= last; major = +adapter.add(major, 1, majorUnit)){\n index = map[major];\n if (index >= 0) {\n ticks[index].major = true;\n }\n }\n return ticks;\n}\n function ticksFromTimestamps(scale, values, majorUnit) {\n const ticks = [];\n const map = {};\n const ilen = values.length;\n let i, value;\n for(i = 0; i < ilen; ++i){\n value = values[i];\n map[value] = i;\n ticks.push({\n value,\n major: false\n });\n }\n return ilen === 0 || !majorUnit ? ticks : setMajorTicks(scale, ticks, map, majorUnit);\n}\nclass TimeScale extends Scale {\n static id = 'time';\n static defaults = {\n bounds: 'data',\n adapters: {},\n time: {\n parser: false,\n unit: false,\n round: false,\n isoWeekday: false,\n minUnit: 'millisecond',\n displayFormats: {}\n },\n ticks: {\n source: 'auto',\n callback: false,\n major: {\n enabled: false\n }\n }\n };\n constructor(props){\n super(props);\n this._cache = {\n data: [],\n labels: [],\n all: []\n };\n this._unit = 'day';\n this._majorUnit = undefined;\n this._offsets = {};\n this._normalized = false;\n this._parseOpts = undefined;\n }\n init(scaleOpts, opts = {}) {\n const time = scaleOpts.time || (scaleOpts.time = {});\n const adapter = this._adapter = new adapters._date(scaleOpts.adapters.date);\n adapter.init(opts);\n mergeIf(time.displayFormats, adapter.formats());\n this._parseOpts = {\n parser: time.parser,\n round: time.round,\n isoWeekday: time.isoWeekday\n };\n super.init(scaleOpts);\n this._normalized = opts.normalized;\n }\n parse(raw, index) {\n if (raw === undefined) {\n return null;\n }\n return parse(this, raw);\n }\n beforeLayout() {\n super.beforeLayout();\n this._cache = {\n data: [],\n labels: [],\n all: []\n };\n }\n determineDataLimits() {\n const options = this.options;\n const adapter = this._adapter;\n const unit = options.time.unit || 'day';\n let { min , max , minDefined , maxDefined } = this.getUserBounds();\n function _applyBounds(bounds) {\n if (!minDefined && !isNaN(bounds.min)) {\n min = Math.min(min, bounds.min);\n }\n if (!maxDefined && !isNaN(bounds.max)) {\n max = Math.max(max, bounds.max);\n }\n }\n if (!minDefined || !maxDefined) {\n _applyBounds(this._getLabelBounds());\n if (options.bounds !== 'ticks' || options.ticks.source !== 'labels') {\n _applyBounds(this.getMinMax(false));\n }\n }\n min = isNumberFinite(min) && !isNaN(min) ? min : +adapter.startOf(Date.now(), unit);\n max = isNumberFinite(max) && !isNaN(max) ? max : +adapter.endOf(Date.now(), unit) + 1;\n this.min = Math.min(min, max - 1);\n this.max = Math.max(min + 1, max);\n }\n _getLabelBounds() {\n const arr = this.getLabelTimestamps();\n let min = Number.POSITIVE_INFINITY;\n let max = Number.NEGATIVE_INFINITY;\n if (arr.length) {\n min = arr[0];\n max = arr[arr.length - 1];\n }\n return {\n min,\n max\n };\n }\n buildTicks() {\n const options = this.options;\n const timeOpts = options.time;\n const tickOpts = options.ticks;\n const timestamps = tickOpts.source === 'labels' ? this.getLabelTimestamps() : this._generate();\n if (options.bounds === 'ticks' && timestamps.length) {\n this.min = this._userMin || timestamps[0];\n this.max = this._userMax || timestamps[timestamps.length - 1];\n }\n const min = this.min;\n const max = this.max;\n const ticks = _filterBetween(timestamps, min, max);\n this._unit = timeOpts.unit || (tickOpts.autoSkip ? determineUnitForAutoTicks(timeOpts.minUnit, this.min, this.max, this._getLabelCapacity(min)) : determineUnitForFormatting(this, ticks.length, timeOpts.minUnit, this.min, this.max));\n this._majorUnit = !tickOpts.major.enabled || this._unit === 'year' ? undefined : determineMajorUnit(this._unit);\n this.initOffsets(timestamps);\n if (options.reverse) {\n ticks.reverse();\n }\n return ticksFromTimestamps(this, ticks, this._majorUnit);\n }\n afterAutoSkip() {\n if (this.options.offsetAfterAutoskip) {\n this.initOffsets(this.ticks.map((tick)=>+tick.value));\n }\n }\n initOffsets(timestamps = []) {\n let start = 0;\n let end = 0;\n let first, last;\n if (this.options.offset && timestamps.length) {\n first = this.getDecimalForValue(timestamps[0]);\n if (timestamps.length === 1) {\n start = 1 - first;\n } else {\n start = (this.getDecimalForValue(timestamps[1]) - first) / 2;\n }\n last = this.getDecimalForValue(timestamps[timestamps.length - 1]);\n if (timestamps.length === 1) {\n end = last;\n } else {\n end = (last - this.getDecimalForValue(timestamps[timestamps.length - 2])) / 2;\n }\n }\n const limit = timestamps.length < 3 ? 0.5 : 0.25;\n start = _limitValue(start, 0, limit);\n end = _limitValue(end, 0, limit);\n this._offsets = {\n start,\n end,\n factor: 1 / (start + 1 + end)\n };\n }\n _generate() {\n const adapter = this._adapter;\n const min = this.min;\n const max = this.max;\n const options = this.options;\n const timeOpts = options.time;\n const minor = timeOpts.unit || determineUnitForAutoTicks(timeOpts.minUnit, min, max, this._getLabelCapacity(min));\n const stepSize = valueOrDefault(options.ticks.stepSize, 1);\n const weekday = minor === 'week' ? timeOpts.isoWeekday : false;\n const hasWeekday = isNumber(weekday) || weekday === true;\n const ticks = {};\n let first = min;\n let time, count;\n if (hasWeekday) {\n first = +adapter.startOf(first, 'isoWeek', weekday);\n }\n first = +adapter.startOf(first, hasWeekday ? 'day' : minor);\n if (adapter.diff(max, min, minor) > 100000 * stepSize) {\n throw new Error(min + ' and ' + max + ' are too far apart with stepSize of ' + stepSize + ' ' + minor);\n }\n const timestamps = options.ticks.source === 'data' && this.getDataTimestamps();\n for(time = first, count = 0; time < max; time = +adapter.add(time, stepSize, minor), count++){\n addTick(ticks, time, timestamps);\n }\n if (time === max || options.bounds === 'ticks' || count === 1) {\n addTick(ticks, time, timestamps);\n }\n return Object.keys(ticks).sort((a, b)=>a - b).map((x)=>+x);\n }\n getLabelForValue(value) {\n const adapter = this._adapter;\n const timeOpts = this.options.time;\n if (timeOpts.tooltipFormat) {\n return adapter.format(value, timeOpts.tooltipFormat);\n }\n return adapter.format(value, timeOpts.displayFormats.datetime);\n }\n format(value, format) {\n const options = this.options;\n const formats = options.time.displayFormats;\n const unit = this._unit;\n const fmt = format || formats[unit];\n return this._adapter.format(value, fmt);\n }\n _tickFormatFunction(time, index, ticks, format) {\n const options = this.options;\n const formatter = options.ticks.callback;\n if (formatter) {\n return callback(formatter, [\n time,\n index,\n ticks\n ], this);\n }\n const formats = options.time.displayFormats;\n const unit = this._unit;\n const majorUnit = this._majorUnit;\n const minorFormat = unit && formats[unit];\n const majorFormat = majorUnit && formats[majorUnit];\n const tick = ticks[index];\n const major = majorUnit && majorFormat && tick && tick.major;\n return this._adapter.format(time, format || (major ? majorFormat : minorFormat));\n }\n generateTickLabels(ticks) {\n let i, ilen, tick;\n for(i = 0, ilen = ticks.length; i < ilen; ++i){\n tick = ticks[i];\n tick.label = this._tickFormatFunction(tick.value, i, ticks);\n }\n }\n getDecimalForValue(value) {\n return value === null ? NaN : (value - this.min) / (this.max - this.min);\n }\n getPixelForValue(value) {\n const offsets = this._offsets;\n const pos = this.getDecimalForValue(value);\n return this.getPixelForDecimal((offsets.start + pos) * offsets.factor);\n }\n getValueForPixel(pixel) {\n const offsets = this._offsets;\n const pos = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n return this.min + pos * (this.max - this.min);\n }\n _getLabelSize(label) {\n const ticksOpts = this.options.ticks;\n const tickLabelWidth = this.ctx.measureText(label).width;\n const angle = toRadians(this.isHorizontal() ? ticksOpts.maxRotation : ticksOpts.minRotation);\n const cosRotation = Math.cos(angle);\n const sinRotation = Math.sin(angle);\n const tickFontSize = this._resolveTickFontOptions(0).size;\n return {\n w: tickLabelWidth * cosRotation + tickFontSize * sinRotation,\n h: tickLabelWidth * sinRotation + tickFontSize * cosRotation\n };\n }\n _getLabelCapacity(exampleTime) {\n const timeOpts = this.options.time;\n const displayFormats = timeOpts.displayFormats;\n const format = displayFormats[timeOpts.unit] || displayFormats.millisecond;\n const exampleLabel = this._tickFormatFunction(exampleTime, 0, ticksFromTimestamps(this, [\n exampleTime\n ], this._majorUnit), format);\n const size = this._getLabelSize(exampleLabel);\n const capacity = Math.floor(this.isHorizontal() ? this.width / size.w : this.height / size.h) - 1;\n return capacity > 0 ? capacity : 1;\n }\n getDataTimestamps() {\n let timestamps = this._cache.data || [];\n let i, ilen;\n if (timestamps.length) {\n return timestamps;\n }\n const metas = this.getMatchingVisibleMetas();\n if (this._normalized && metas.length) {\n return this._cache.data = metas[0].controller.getAllParsedValues(this);\n }\n for(i = 0, ilen = metas.length; i < ilen; ++i){\n timestamps = timestamps.concat(metas[i].controller.getAllParsedValues(this));\n }\n return this._cache.data = this.normalize(timestamps);\n }\n getLabelTimestamps() {\n const timestamps = this._cache.labels || [];\n let i, ilen;\n if (timestamps.length) {\n return timestamps;\n }\n const labels = this.getLabels();\n for(i = 0, ilen = labels.length; i < ilen; ++i){\n timestamps.push(parse(this, labels[i]));\n }\n return this._cache.labels = this._normalized ? timestamps : this.normalize(timestamps);\n }\n normalize(values) {\n return _arrayUnique(values.sort(sorter));\n }\n}\n\nfunction interpolate(table, val, reverse) {\n let lo = 0;\n let hi = table.length - 1;\n let prevSource, nextSource, prevTarget, nextTarget;\n if (reverse) {\n if (val >= table[lo].pos && val <= table[hi].pos) {\n ({ lo , hi } = _lookupByKey(table, 'pos', val));\n }\n ({ pos: prevSource , time: prevTarget } = table[lo]);\n ({ pos: nextSource , time: nextTarget } = table[hi]);\n } else {\n if (val >= table[lo].time && val <= table[hi].time) {\n ({ lo , hi } = _lookupByKey(table, 'time', val));\n }\n ({ time: prevSource , pos: prevTarget } = table[lo]);\n ({ time: nextSource , pos: nextTarget } = table[hi]);\n }\n const span = nextSource - prevSource;\n return span ? prevTarget + (nextTarget - prevTarget) * (val - prevSource) / span : prevTarget;\n}\nclass TimeSeriesScale extends TimeScale {\n static id = 'timeseries';\n static defaults = TimeScale.defaults;\n constructor(props){\n super(props);\n this._table = [];\n this._minPos = undefined;\n this._tableRange = undefined;\n }\n initOffsets() {\n const timestamps = this._getTimestampsForTable();\n const table = this._table = this.buildLookupTable(timestamps);\n this._minPos = interpolate(table, this.min);\n this._tableRange = interpolate(table, this.max) - this._minPos;\n super.initOffsets(timestamps);\n }\n buildLookupTable(timestamps) {\n const { min , max } = this;\n const items = [];\n const table = [];\n let i, ilen, prev, curr, next;\n for(i = 0, ilen = timestamps.length; i < ilen; ++i){\n curr = timestamps[i];\n if (curr >= min && curr <= max) {\n items.push(curr);\n }\n }\n if (items.length < 2) {\n return [\n {\n time: min,\n pos: 0\n },\n {\n time: max,\n pos: 1\n }\n ];\n }\n for(i = 0, ilen = items.length; i < ilen; ++i){\n next = items[i + 1];\n prev = items[i - 1];\n curr = items[i];\n if (Math.round((next + prev) / 2) !== curr) {\n table.push({\n time: curr,\n pos: i / (ilen - 1)\n });\n }\n }\n return table;\n }\n _getTimestampsForTable() {\n let timestamps = this._cache.all || [];\n if (timestamps.length) {\n return timestamps;\n }\n const data = this.getDataTimestamps();\n const label = this.getLabelTimestamps();\n if (data.length && label.length) {\n timestamps = this.normalize(data.concat(label));\n } else {\n timestamps = data.length ? data : label;\n }\n timestamps = this._cache.all = timestamps;\n return timestamps;\n }\n getDecimalForValue(value) {\n return (interpolate(this._table, value) - this._minPos) / this._tableRange;\n }\n getValueForPixel(pixel) {\n const offsets = this._offsets;\n const decimal = this.getDecimalForPixel(pixel) / offsets.factor - offsets.end;\n return interpolate(this._table, decimal * this._tableRange + this._minPos, true);\n }\n}\n\nvar scales = /*#__PURE__*/Object.freeze({\n__proto__: null,\nCategoryScale: CategoryScale,\nLinearScale: LinearScale,\nLogarithmicScale: LogarithmicScale,\nRadialLinearScale: RadialLinearScale,\nTimeScale: TimeScale,\nTimeSeriesScale: TimeSeriesScale\n});\n\nconst registerables = [\n controllers,\n elements,\n plugins,\n scales\n];\n\nexport { Animation, Animations, ArcElement, BarController, BarElement, BasePlatform, BasicPlatform, BubbleController, CategoryScale, Chart, plugin_colors as Colors, DatasetController, plugin_decimation as Decimation, DomPlatform, DoughnutController, Element, index as Filler, Interaction, plugin_legend as Legend, LineController, LineElement, LinearScale, LogarithmicScale, PieController, PointElement, PolarAreaController, RadarController, RadialLinearScale, Scale, ScatterController, plugin_subtitle as SubTitle, Ticks, TimeScale, TimeSeriesScale, plugin_title as Title, plugin_tooltip as Tooltip, adapters as _adapters, _detectPlatform, animator, controllers, defaults, elements, layouts, plugins, registerables, registry, scales };\n//# sourceMappingURL=chart.js.map\n","import React, { forwardRef, useRef, useEffect } from 'react';\nimport { Chart as Chart$1, LineController, BarController, RadarController, DoughnutController, PolarAreaController, BubbleController, PieController, ScatterController } from 'chart.js';\n\nconst defaultDatasetIdKey = \"label\";\nfunction reforwardRef(ref, value) {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}\nfunction setOptions(chart, nextOptions) {\n const options = chart.options;\n if (options && nextOptions) {\n Object.assign(options, nextOptions);\n }\n}\nfunction setLabels(currentData, nextLabels) {\n currentData.labels = nextLabels;\n}\nfunction setDatasets(currentData, nextDatasets) {\n let datasetIdKey = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : defaultDatasetIdKey;\n const addedDatasets = [];\n currentData.datasets = nextDatasets.map((nextDataset)=>{\n // given the new set, find it's current match\n const currentDataset = currentData.datasets.find((dataset)=>dataset[datasetIdKey] === nextDataset[datasetIdKey]);\n // There is no original to update, so simply add new one\n if (!currentDataset || !nextDataset.data || addedDatasets.includes(currentDataset)) {\n return {\n ...nextDataset\n };\n }\n addedDatasets.push(currentDataset);\n Object.assign(currentDataset, nextDataset);\n return currentDataset;\n });\n}\nfunction cloneData(data) {\n let datasetIdKey = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : defaultDatasetIdKey;\n const nextData = {\n labels: [],\n datasets: []\n };\n setLabels(nextData, data.labels);\n setDatasets(nextData, data.datasets, datasetIdKey);\n return nextData;\n}\n/**\n * Get dataset from mouse click event\n * @param chart - Chart.js instance\n * @param event - Mouse click event\n * @returns Dataset\n */ function getDatasetAtEvent(chart, event) {\n return chart.getElementsAtEventForMode(event.nativeEvent, \"dataset\", {\n intersect: true\n }, false);\n}\n/**\n * Get single dataset element from mouse click event\n * @param chart - Chart.js instance\n * @param event - Mouse click event\n * @returns Dataset\n */ function getElementAtEvent(chart, event) {\n return chart.getElementsAtEventForMode(event.nativeEvent, \"nearest\", {\n intersect: true\n }, false);\n}\n/**\n * Get all dataset elements from mouse click event\n * @param chart - Chart.js instance\n * @param event - Mouse click event\n * @returns Dataset\n */ function getElementsAtEvent(chart, event) {\n return chart.getElementsAtEventForMode(event.nativeEvent, \"index\", {\n intersect: true\n }, false);\n}\n\nfunction ChartComponent(props, ref) {\n const { height =150 , width =300 , redraw =false , datasetIdKey , type , data , options , plugins =[] , fallbackContent , updateMode , ...canvasProps } = props;\n const canvasRef = useRef(null);\n const chartRef = useRef();\n const renderChart = ()=>{\n if (!canvasRef.current) return;\n chartRef.current = new Chart$1(canvasRef.current, {\n type,\n data: cloneData(data, datasetIdKey),\n options: options && {\n ...options\n },\n plugins\n });\n reforwardRef(ref, chartRef.current);\n };\n const destroyChart = ()=>{\n reforwardRef(ref, null);\n if (chartRef.current) {\n chartRef.current.destroy();\n chartRef.current = null;\n }\n };\n useEffect(()=>{\n if (!redraw && chartRef.current && options) {\n setOptions(chartRef.current, options);\n }\n }, [\n redraw,\n options\n ]);\n useEffect(()=>{\n if (!redraw && chartRef.current) {\n setLabels(chartRef.current.config.data, data.labels);\n }\n }, [\n redraw,\n data.labels\n ]);\n useEffect(()=>{\n if (!redraw && chartRef.current && data.datasets) {\n setDatasets(chartRef.current.config.data, data.datasets, datasetIdKey);\n }\n }, [\n redraw,\n data.datasets\n ]);\n useEffect(()=>{\n if (!chartRef.current) return;\n if (redraw) {\n destroyChart();\n setTimeout(renderChart);\n } else {\n chartRef.current.update(updateMode);\n }\n }, [\n redraw,\n options,\n data.labels,\n data.datasets,\n updateMode\n ]);\n useEffect(()=>{\n if (!chartRef.current) return;\n destroyChart();\n setTimeout(renderChart);\n }, [\n type\n ]);\n useEffect(()=>{\n renderChart();\n return ()=>destroyChart();\n }, []);\n return /*#__PURE__*/ React.createElement(\"canvas\", Object.assign({\n ref: canvasRef,\n role: \"img\",\n height: height,\n width: width\n }, canvasProps), fallbackContent);\n}\nconst Chart = /*#__PURE__*/ forwardRef(ChartComponent);\n\nfunction createTypedChart(type, registerables) {\n Chart$1.register(registerables);\n return /*#__PURE__*/ forwardRef((props, ref)=>/*#__PURE__*/ React.createElement(Chart, Object.assign({}, props, {\n ref: ref,\n type: type\n })));\n}\nconst Line = /* #__PURE__ */ createTypedChart(\"line\", LineController);\nconst Bar = /* #__PURE__ */ createTypedChart(\"bar\", BarController);\nconst Radar = /* #__PURE__ */ createTypedChart(\"radar\", RadarController);\nconst Doughnut = /* #__PURE__ */ createTypedChart(\"doughnut\", DoughnutController);\nconst PolarArea = /* #__PURE__ */ createTypedChart(\"polarArea\", PolarAreaController);\nconst Bubble = /* #__PURE__ */ createTypedChart(\"bubble\", BubbleController);\nconst Pie = /* #__PURE__ */ createTypedChart(\"pie\", PieController);\nconst Scatter = /* #__PURE__ */ createTypedChart(\"scatter\", ScatterController);\n\nexport { Bar, Bubble, Chart, Doughnut, Line, Pie, PolarArea, Radar, Scatter, getDatasetAtEvent, getElementAtEvent, getElementsAtEvent };\n//# sourceMappingURL=index.js.map\n","import { useQuery } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport dayjs from 'dayjs';\nimport {\n Chart as ChartJS,\n CategoryScale,\n LinearScale,\n BarElement,\n Title,\n Tooltip,\n Legend,\n} from 'chart.js';\nimport { Bar } from 'react-chartjs-2';\n\nChartJS.register(CategoryScale, LinearScale, BarElement, Title, Tooltip, Legend);\n\nconst options = {\n responsive: true,\n plugins: {\n legend: {\n display: false,\n },\n },\n scales: {\n x: {\n stacked: true,\n grid: {\n display: false,\n },\n },\n y: {\n stacked: true,\n border: {\n display: false,\n },\n ticks: {\n maxTicksLimit: 5,\n callback: (val) => (val !== 0 && val % 1000 === 0 ? `${val / 1000}k` : val),\n },\n },\n },\n};\n\nexport const IncomeExpensesChart = () => {\n const { data: incomeExpensesChartData } = useQuery(\n ['buyer-plaid-items-income-expenses-range'],\n async () => {\n const date = dayjs();\n\n const resp = await ApiService.getIncomeExpensesRange(\n date.subtract(6, 'months').format('YYYY-MM-DD'),\n date.subtract(1, 'months').format('YYYY-MM-DD'),\n );\n\n const incomes = [];\n const expenses = [];\n const monthLabels = [];\n\n resp.data.forEach((incomeExpenseItem) => {\n incomes.push(incomeExpenseItem.income);\n expenses.push(incomeExpenseItem.expenses * -1);\n monthLabels.push(dayjs(incomeExpenseItem.monthDate).format('MMM').toUpperCase());\n });\n\n return {\n labels: monthLabels,\n datasets: [\n {\n data: incomes,\n backgroundColor: '#42D1A9',\n borderRadius: 4,\n },\n {\n data: expenses,\n backgroundColor: '#FF9580',\n borderRadius: 4,\n },\n ],\n };\n },\n {\n retry: 0,\n refetchOnWindowFocus: false,\n },\n );\n\n return (\n <div>{incomeExpensesChartData && <Bar options={options} data={incomeExpensesChartData} />}</div>\n );\n};\n","import { BuyerLayout } from '@components/layout/buyer-layout';\nimport { MonthPicker, Empty } from '@components';\nimport { MonthlySpending } from './monthly-spending';\nimport { TransactionHistory } from './transaction-history';\nimport dayjs from 'dayjs';\nimport { useState } from 'react';\nimport { CashFlow } from './cash-flow';\nimport { IncomeExpensesChart } from './income-expenses-chart';\nimport { ApiService } from '@services/Api';\nimport { useQuery } from 'react-query';\nimport Link from 'next/link';\nimport { commonRoutes } from '@utils';\nimport { useTranslation } from 'react-i18next';\n\nconst maxDate = dayjs().subtract(1, 'month');\n\nexport const Finances = () => {\n const [selectedDate, setSelectedDate] = useState(maxDate);\n const { t } = useTranslation();\n\n // NOTE: since this whole finances page calculations are dependant\n // on transactions. We'll check if any transactions exist and show \"Empty\" accordingly\n const { data: dataExists } = useQuery(\n ['buyer-plaid-items-transactions-exists'],\n async () => {\n const resp = await ApiService.getBuyerPlaidTransactions({\n page: 1,\n pageSize: 1,\n });\n\n return !!resp.data.total;\n },\n {\n retry: 0,\n refetchOnWindowFocus: false,\n },\n );\n\n return (\n (<BuyerLayout headerContainerClassName=\"block\">\n <div className=\"mt-16 mx-3.5 sm:ml-11 sm:mr-7\">\n {dataExists && (\n <>\n <div className=\"flex mb-6\">\n <h1 className=\"font-medium text-2xl text-gray-900 my-auto mr-3\">{t('Finances')}</h1>\n <MonthPicker\n maxDate={maxDate}\n selectedDate={selectedDate}\n setSelectedDate={setSelectedDate}\n />\n </div>\n\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-x-20\">\n <div>\n <MonthlySpending selectedMonth={selectedDate} />\n <div className=\"hidden md:block\">\n <TransactionHistory />\n </div>\n </div>\n\n <div>\n <div className=\"mb-8\">\n <CashFlow selectedMonth={selectedDate} />\n </div>\n <IncomeExpensesChart />\n </div>\n\n <div className=\"block md:hidden mt-12\">\n <TransactionHistory />\n </div>\n </div>\n </>\n )}\n\n {dataExists === false && (\n <Empty\n main={t('Not enough bank accounts linked')}\n flavor={\n <>\n {t(\"That's strange, how about\")}{' '}\n <Link\n href={commonRoutes.buyer.auth.accounts}\n className=\"text-[#10B395] hover:underline\">\n {t('adding one')}\n </Link>\n ?\n </>\n }\n />\n )}\n </div>\n </BuyerLayout>)\n );\n};\n","import clsx from 'clsx';\nimport { MouseEventHandler } from 'react';\n\nexport const FilterPill = ({\n text,\n active,\n onClick,\n}: {\n text: string;\n active: boolean;\n onClick: MouseEventHandler;\n}) => (\n <div\n className={clsx(\n 'px-[14px] py-1 text-[12px] leading-4 font-plusJakarta rounded-full flex items-center justify-center cursor-pointer',\n {\n 'bg-[#E7E3F4] text-[#01130F] hover:bg-[#D0CAE9] rounded': !active,\n 'bg-[#1C1A27] text-white pointer-events-none': active,\n },\n )}\n onClick={onClick}\n >\n {text}\n </div>\n);\n","import ReactPaginate from 'react-paginate';\n\nconst pageItemClassName = 'text-[#9F98BE] hover:text-[#0AAA82]';\n\nexport const CustomPagination = ({\n onPageChange,\n pageCount,\n currentPage,\n}: {\n onPageChange: (selectedItem: { selected: number }) => void;\n pageCount: number;\n currentPage: number;\n}) => {\n return (\n <div>\n <ReactPaginate\n className=\"flex w-full justify-between items-center\"\n breakClassName={pageItemClassName}\n breakLabel=\"...\"\n nextClassName={pageItemClassName}\n nextLabel={\n <svg width={20} className=\"rotate-90\" viewBox=\"0 0 20 20\">\n <path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\" />\n </svg>\n }\n onPageChange={onPageChange}\n pageRangeDisplayed={3}\n pageCount={pageCount}\n previousClassName={pageItemClassName}\n previousLabel={\n <svg width={20} className=\"rotate-[270deg]\" viewBox=\"0 0 20 20\">\n <path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\" />\n </svg>\n }\n renderOnZeroPageCount={null}\n pageClassName={pageItemClassName}\n activeClassName=\"text-[#0AAA82]\"\n marginPagesDisplayed={1}\n forcePage={currentPage}\n />\n </div>\n );\n};\n","import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';\nimport { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';\nimport { YearCalendar } from '@mui/x-date-pickers/YearCalendar';\nimport { MonthCalendar } from '@mui/x-date-pickers/MonthCalendar';\nimport 'dayjs/locale/es-us';\nimport { Dayjs } from 'dayjs';\n\nexport const MonthModalContent = ({\n selectedDate,\n maxDate,\n onChange,\n}: {\n maxDate?: Dayjs;\n selectedDate: Dayjs;\n onChange: (value: Dayjs) => void;\n}) => {\n const handleChange = (selDate) => {\n if (\n selDate.get('year') === maxDate.get('year') &&\n maxDate.get('month') < selDate.get('month')\n ) {\n onChange(maxDate);\n } else {\n onChange(selDate);\n }\n };\n\n return (\n <div className=\"flex\">\n <LocalizationProvider dateAdapter={AdapterDayjs} adapterLocale=\"us\">\n <YearCalendar maxDate={maxDate} value={selectedDate} onChange={handleChange} />\n <MonthCalendar\n // need to disable future months like this as playing around with maxDate\n // state changes doesn't seem to work properly\n shouldDisableMonth={(monthDate: Dayjs) => {\n if (\n monthDate.get('year') === maxDate.get('year') &&\n maxDate.get('month') < monthDate.get('month')\n ) {\n return true;\n }\n\n return false;\n }}\n value={selectedDate}\n onChange={handleChange}\n />\n </LocalizationProvider>\n </div>\n );\n};\n","import { GenericModal } from '@components/modal/generic-modal';\nimport { useEffect, useState } from 'react';\nimport { MonthModalContent } from './month-modal-content';\nimport { Dayjs } from 'dayjs';\nimport clsx from 'clsx';\n\nexport const MonthPicker = ({\n maxDate,\n selectedDate,\n setSelectedDate,\n}: {\n maxDate?: Dayjs;\n selectedDate: Dayjs;\n setSelectedDate: Function;\n}) => {\n const [showModal, setShowModal] = useState(false);\n\n const [tempDate, setTempDate] = useState(maxDate);\n\n const handleClose = () => {\n setTempDate(selectedDate);\n setShowModal(false);\n };\n\n useEffect(() => {\n setTempDate(selectedDate);\n }, [selectedDate]);\n\n const handleSubmit = () => {\n setSelectedDate(tempDate);\n handleClose();\n };\n\n return (\n <>\n <div className=\"flex justify-between text-[#635E7D] w-60\">\n <button\n onClick={() => setSelectedDate(selectedDate.subtract(1, 'month'))}\n className=\"hover:text-[#14121B] p-3\"\n >\n <svg width={20} className=\"rotate-[270deg]\" viewBox=\"0 0 20 20\">\n <path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\" />\n </svg>\n </button>\n <button onClick={() => setShowModal(true)} className=\"hover:text-[#14121B]\">\n {selectedDate.format('MMMM')}, {selectedDate.format('YYYY')}\n </button>\n <button\n onClick={() => setSelectedDate(selectedDate.add(1, 'month'))}\n className={clsx('hover:text-[#14121B] p-3', {\n invisible: maxDate && maxDate.isSame(selectedDate),\n })}\n >\n <svg width={20} className=\"rotate-90\" viewBox=\"0 0 20 20\">\n <path d=\"M10.707 7.05L10 6.343 4.343 12l1.414 1.414L10 9.172l4.243 4.242L15.657 12z\" />\n </svg>\n </button>\n </div>\n {showModal && (\n <GenericModal\n title=\"Pick a month\"\n content={\n <MonthModalContent\n maxDate={maxDate}\n selectedDate={tempDate}\n onChange={(selDate) => setTempDate(selDate)}\n />\n }\n cancelActionTitle=\"Cancel\"\n cancelAction={handleClose}\n onClose={handleClose}\n actionTitle=\"Submit\"\n onActionClick={handleSubmit}\n />\n )}\n </>\n );\n};\n","export * from './buyer-plaid-oauth-page';\nexport * from './modal';\nexport * from './layout';\nexport * from './layout/buyer-layout';\nexport * from './code-input-modal';\nexport * from './icon-button';\nexport * from './error-message';\nexport * from './button';\nexport * from './send-code-modal';\nexport * from './divider';\nexport * from './input';\nexport * from './route-protector';\nexport * from './form';\nexport * from './loading';\nexport * from './custom-input';\nexport * from './switch';\nexport * from './case';\nexport * from './form';\nexport * from './form/step-components';\nexport * from './buyer-signin-form';\nexport * from './buyer-signup-form';\nexport * from './suggested-skills';\nexport * from './skill-tags';\n// export * from './waitlist';\nexport * from './skills-combobox';\nexport * from './skill-pills';\nexport * from './form-wrapper';\nexport * from './modal/full-modal';\nexport * from './progress';\nexport * from './step-highlight';\nexport * from './error-state';\nexport * from './suggestions';\nexport * from './analyzing-data';\nexport * from './thank-you';\nexport * from './app-wrapper';\nexport * from './array-credit-alerts';\nexport * from './finances';\nexport * from './filter-pill';\nexport * from './pagination';\nexport * from './month-picker';\nexport * from './empty';\nexport * from './messages';\n","import { commonRoutes } from '@utils';\nimport { Button } from '@components/button';\nimport { TermsModal, useOpenTermsModal } from '@components/modal/terms-modal';\nimport Image from 'next/image';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport { useIntl } from 'react-intl';\nimport { useMediaQuery } from 'react-responsive';\nimport LanguageSelectOnbording from '@components/common/LanguageSelectOnbording';\nimport { useTranslation } from 'react-i18next';\nimport LanguageSelect from '@components/common/LanguageSelect';\nexport const DesktopIntroduction = () => {\n const { setOpenTermsModal } = useOpenTermsModal();\n const intl = useIntl();\n const router = useRouter();\n const isMobile = useMediaQuery({ minWidth: 1024 });\n const { t } = useTranslation();\n return (\n <div className=\"h-full px-4 mx-auto max-w-7xl\">\n <TermsModal />\n {isMobile ? (\n <div className=\"mx-[9.375rem] h-full min-w-[320px]\">\n <div className=\"flex flex-col basis-1/2\">\n <header className=\"py-6 flex flex-row justify-between w-full items-center\">\n <Link href={commonRoutes.buyer.getStarted}>\n <Image\n src=\"https://mhp-icons.s3.amazonaws.com/mint-lockup.png\"\n alt=\"Logo\"\n width={180}\n height={80}\n style={{\n objectFit: 'contain',\n }}\n />\n </Link>\n <div className=\"flex items-end\">\n {/* <LanguageSelectOnbording /> */}\n <LanguageSelect />\n </div>\n </header>\n <div className=\"items-center flex flex-row mb-[3.125rem] mt-[6.25rem] min-w-[450px] min-h-[450px]\">\n <div className=\"rounded-2xl mr-20 min-w-[300px] min-h-[400px] pt-[3rem]\">\n <Image\n priority\n alt={t('My Home Pathway')}\n width={520}\n height={450}\n className={'rounded-2xl'}\n src=\"/images/getstarted.png\"\n quality={100}\n style={{\n objectFit: 'contain',\n }}\n />\n </div>\n\n <div>\n <h1 className=\"font-normal text-4xl font-slab w-[520px] leading-[47px] mb-5\">\n {t('Achieve Your Dream of Homeownership with')}\n </h1>\n <h1 className=\"font-bold text-4xl text-primary font-slab w-[400px] leading-[47px] mb-5\">\n {t('My Home Pathway')}\n </h1>\n <p>\n {t('Helping you achieve financial freedom through homeownership with the tools and education you need to succeed')}\n </p>\n <div>\n <Button\n onClick={() => {\n router.push(commonRoutes.buyer.welcome);\n }}\n className=\"w-[199px] mt-10\"\n >\n {t('GET STARTED')}\n </Button>\n </div>\n </div>\n </div>\n\n <div className=\"bg-card rounded-md shadow-[0_10px_15px_rgba(14, 52, 42, 0.08)] items-center justify-center p-4 mb-11\">\n <p className=\"my-2 text-sm text-center\">{t('As seen in')}</p>\n <div className=\"flex items-center flex-shrink my-2 container-default justify-evenly\">\n <Link\n href={commonRoutes.forbes}\n passHref\n target=\"_blank\"\n className=\"w-[81px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={81}\n height={30}\n src=\"/images/forbes.png\"\n />\n </Link>\n\n <Link\n href={commonRoutes.refinery}\n passHref\n target=\"_blank\"\n className=\"w-[95px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={95}\n height={30}\n className={''}\n src=\"/images/refinery.png\"\n />\n </Link>\n\n <Link\n href={commonRoutes.realSimple}\n passHref\n target=\"_blank\"\n className=\"w-[126px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={126}\n height={30}\n src=\"/images/realsimple.png\"\n />\n </Link>\n </div>\n <div className=\"flex items-center flex-shrink my-2 container-default justify-evenly\">\n <Link\n href={commonRoutes.next}\n passHref\n target=\"_blank\"\n className=\"w-[95px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={95}\n height={30}\n src=\"/images/next.png\"\n />\n </Link>\n <Link\n href={commonRoutes.nationalmortgageprofessional}\n passHref\n target=\"_blank\"\n className=\"w-[500px] h-[18px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={500}\n height={18}\n src=\"/images/nationalmortgage.png\"\n />\n </Link>\n <Link\n href={commonRoutes.housingWire}\n passHref\n target=\"_blank\"\n className=\"w-[30px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={30}\n height={30}\n src=\"/images/hw.png\"\n />\n </Link>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className=\"h-full px-4 mx-auto max-w-7xl\">\n <div className=\"w-full h-full mx-4 lg:mx-auto lg:max-w-screen-md xs:mx-2\">\n <div className=\"flex flex-col\">\n <header className=\"py-6\">\n <Link href={commonRoutes.buyer.getStarted}>\n <Image\n src=\"https://mhp-icons.s3.amazonaws.com/mint-lockup.png\"\n alt=\"Logo\"\n width={120}\n height={60}\n style={{\n objectFit: 'contain',\n }}\n />\n </Link>\n </header>\n <div className=\"flex mb-[3.125rem] xs:mb-[2.725rem] mt-[4rem] xs:mt-[2rem] flex-col md:flex-row items-center justify-center \">\n <div className=\"rounded-2xl mb-6 w-full md:w-1/2 lg:min-w-[250px] lg:min-h-[275] lg:scale-90 sm:scale-75 mx-auto md:mx-0\">\n <Image\n priority\n alt={t('My Home Pathway')}\n width={520}\n height={450}\n className=\"rounded-2xl\"\n src=\"/images/getstarted.png\"\n quality={100}\n style={{\n objectFit: 'contain',\n }}\n />\n </div>\n\n <div className=\"w-full text-center md:w-1/2 md:pl-4 md:text-left\">\n <h1 className=\"font-normal text-4xl sm:text-3xl xs:text-3xl font-slab w-full md:w-[520px] leading-[47px] xs:leading-[25px] sm:leading-[30px] mb-5\">\n {t('Achieve Your Dream of Homeownership with')}\n </h1>\n <h1 className=\"font-bold text-4xl sm:text-3xl xs:text-3xl text-primary font-slab w-full md:w-[400px] leading-[47px] sm:leading-[30px] xs:leading-[25px] mb-5\">\n {t('My Home Pathway')}\n </h1>\n <p>\n {t(\n 'Helping you achieve financial freedom through homeownership with the tools and education you need to succeed'\n )}\n </p>\n <div>\n <Button\n onClick={() => {\n router.push(commonRoutes.buyer.welcome);\n }}\n className=\"w-[199px] mt-10 mx-auto md:mx-0\"\n >\n {t('GET STARTED')}\n </Button>\n </div>\n </div>\n </div>\n </div>\n\n <div className=\"bg-card rounded-md shadow-[0_10px_15px_rgba(14, 52, 42, 0.08)] items-center justify-center p-4 mb-11\">\n <p className=\"my-2 text-sm text-center\">{t('As seen in')}</p>\n <div className=\"flex items-center flex-shrink my-2 container-default justify-evenly\">\n <Link\n href={commonRoutes.forbes}\n passHref\n target=\"_blank\"\n className=\"w-[81px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={81}\n height={30}\n src=\"/images/forbes.png\"\n />\n </Link>\n\n <Link\n href={commonRoutes.refinery}\n passHref\n target=\"_blank\"\n className=\"w-[95px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={95}\n height={30}\n className={''}\n src=\"/images/refinery.png\"\n />\n </Link>\n\n <Link\n href={commonRoutes.realSimple}\n passHref\n target=\"_blank\"\n className=\"w-[126px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={126}\n height={30}\n src=\"/images/realsimple.png\"\n />\n </Link>\n </div>\n <div className=\"flex items-center flex-shrink my-2 container-default justify-evenly\">\n <Link\n href={commonRoutes.next}\n passHref\n target=\"_blank\"\n className=\"w-[95px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={95}\n height={30}\n src=\"/images/next.png\"\n />\n </Link>\n <Link\n href={commonRoutes.nationalmortgageprofessional}\n passHref\n target=\"_blank\"\n className=\"w-[500px] h-[18px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={500}\n height={18}\n src=\"/images/nationalmortgage.png\"\n />\n </Link>\n <Link\n href={commonRoutes.housingWire}\n passHref\n target=\"_blank\"\n className=\"w-[30px] h-[30px]\"\n >\n <Image\n alt={t('My Home Pathway')}\n width={30}\n height={30}\n src=\"/images/hw.png\"\n />\n </Link>\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n );\n};\n","import { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\nimport { useAuthUser, useIsMounted } from '@hooks';\nimport { MobileIntroduction } from './mobile-introduction';\nimport { DesktopIntroduction } from './desktop-introduction';\nimport { Loading } from '@components/loading';\n\ninterface IntroductionState {\n step: number;\n completed: boolean;\n agreedToTerms: boolean;\n}\n\ninterface IntroductionUpdaters {\n setIntroduction: (state: Partial<IntroductionState>) => void;\n}\n\ntype IntroductionStore = IntroductionState & IntroductionUpdaters;\n\nexport const useIntroduction = create(\n persist<IntroductionStore>(\n (set) => ({\n step: 1,\n completed: false,\n agreedToTerms: false,\n setIntroduction: (state) => {\n set(state);\n },\n }),\n { name: 'use-introduction' },\n ),\n);\n\nexport const introductionStepQuantity = 3;\n\nexport const Introduction = () => {\n const { isLoadingUserInfo } = useAuthUser();\n const isMounted = useIsMounted();\n return (\n isMounted && (\n <div className=\"h-full\">\n <Loading isLoading={isLoadingUserInfo} />\n <div className=\"h-full \"> \n <DesktopIntroduction />\n </div>\n </div>\n )\n );\n};\n","import Image from \"next/image\";\nimport { ReactNode } from 'react';\n\ninterface IntroductionStepProps {\n title: ReactNode;\n description: ReactNode;\n image: string;\n priority?: boolean;\n}\n\nexport const IntroductionStep = ({\n title,\n description,\n image,\n priority,\n}: IntroductionStepProps) => {\n return (\n (<div className=\"relative flex flex-col lg:bg-gray-50 lg:mx-auto lg:max-w-[600px]\">\n <div className=\"overflow-hidden image-container relative mix-blend-multiply\">\n <Image\n className=\"flex w-full object-contain max-h-[inherit]\"\n src={image}\n alt=\"\"\n priority={priority}\n fill\n width={100}\n height={100}\n sizes=\"100vw\" />\n </div>\n <div className=\"container-default lg:text-center\">\n <h1 className=\"text-2xl font-medium font-slab\">{title} </h1>\n <div className=\"flex flex-col gap-12 mt-4\">\n <p className=\"text-sm leading-6 text-gray-600\">{description}</p>\n </div>\n </div>\n <style jsx>\n {`\n .image-container {\n min-height: calc(20vh + 50px);\n margin-bottom: 24px;\n }\n\n @media (min-height: 600px) {\n .image-container {\n min-height: calc(30vh + 50px);\n margin-bottom: 24px;\n }\n }\n\n @media (min-height: 750px) {\n .image-container {\n min-height: 375px;\n margin-bottom: 60px;\n }\n }\n\n @media (min-width: 992px) and (min-height: 600px) {\n .image-container {\n margin-top: -30px;\n min-height: 350px;\n margin-bottom: 40px;\n }\n }\n\n @media (min-width: 992px) and (min-height: 800px) {\n .image-container {\n min-height: 400px;\n margin-bottom: 40px;\n }\n }\n `}\n </style>\n </div>)\n );\n};\n","export const FinancialLiteracyIcon = () => (\n <svg width={20} height={21} fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M16.668 3H3.33464C2.41547 3 1.66797 3.7475 1.66797 4.66667V16.3333C1.66797 17.2525 2.41547 18 3.33464 18H16.668C17.5871 18 18.3346 17.2525 18.3346 16.3333V4.66667C18.3346 3.7475 17.5871 3 16.668 3ZM15.8346 6.33333V8H11.668V6.33333H15.8346ZM11.668 9.66667H15.8346V11.3333H11.668V9.66667ZM3.33464 16.3333V4.66667H9.16797V16.3333H3.33464Z\"\n fill=\"#635E7D\"\n />\n </svg>\n);\n","export const MessagesIcon = () => (\n <svg\n width=\"24\"\n height=\"25\"\n viewBox=\"0 0 24 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M2 8.5C2 6.29086 3.79086 4.5 6 4.5H18C20.2091 4.5 22 6.29086 22 8.5V16.5C22 18.7091 20.2091 20.5 18 20.5H6C3.79086 20.5 2 18.7091 2 16.5V8.5ZM6 6.5C4.89543 6.5 4 7.39543 4 8.5V16.5C4 17.6046 4.89543 18.5 6 18.5H18C19.1046 18.5 20 17.6046 20 16.5V8.5C20 7.39543 19.1046 6.5 18 6.5H6Z\"\n fill=\"black\"\n />\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M6.21917 8.8753C6.56418 8.44404 7.19347 8.37412 7.62473 8.71913L12 12.2194L16.3753 8.71913C16.8066 8.37412 17.4359 8.44404 17.7809 8.8753C18.1259 9.30657 18.056 9.93586 17.6247 10.2809L12 14.7806L6.37534 10.2809C5.94408 9.93586 5.87416 9.30657 6.21917 8.8753Z\"\n fill=\"black\"\n />\n </svg>\n);\n","import clsx from 'clsx';\nimport Link from 'next/link';\nimport { MouseEventHandler, ReactNode } from 'react';\nimport { useRouter } from 'next/router';\nimport { cloneElement } from 'react';\n\nexport const MenuLink = ({\n children,\n href,\n icon,\n active,\n onClick,\n toggleMenu,\n collapsed,\n isMobile,\n}: {\n children: ReactNode;\n href?: string;\n icon: any;\n active?: boolean;\n onClick?: MouseEventHandler;\n toggleMenu?: MouseEventHandler;\n collapsed?: boolean;\n isMobile?: boolean;\n}) => {\n const router = useRouter();\n const isActive = active !== undefined ? active : router.pathname === href;\n\n const content = (\n <div\n className={clsx(\n 'flex items-center transition-all duration-200 ',\n children === 'Dashboard' ? 'mt-5' : '',\n collapsed ? 'justify-center p-2 mx-auto' : 'gap-3 p-[10px] pl-[5px]',\n 'hover:bg-gray-50 rounded-lg w-full h-[40px]',\n {\n 'bg-[#64C39C] text-white hover:bg-[#64C39C] font-semibold ': isActive,\n }\n )}\n >\n <div \n className={clsx(\n 'flex items-center justify-center',\n collapsed ? 'w-6 h-6' : '',\n { 'text-white': isActive }\n )}\n >\n {cloneElement(icon, {\n height: collapsed ? 22 : 20,\n className: clsx('keep-color'),\n })}\n </div>\n {!collapsed && (\n <span className={clsx('transition-opacity duration-200', { 'text-white': isActive })}>\n {children}\n </span>\n )}\n </div>\n );\n\n if (href) {\n return (\n <li\n className={clsx('rounded flex', {\n 'text-[#333333]': !isActive,\n 'text-[#0AAA82]': isActive,\n 'mb-0 p-[5px]': isMobile,\n 'mb-[10px]': !isMobile,\n 'px-0': collapsed,\n 'px-[0px]': !collapsed,\n })}\n >\n <Link\n href={href}\n onClick={(e) => {\n if (onClick) {\n e.preventDefault();\n onClick(e);\n }\n if (isActive && toggleMenu) {\n toggleMenu(e);\n }\n }}\n className=\"block w-full\"\n >\n {content}\n </Link>\n </li>\n );\n }\n\n return (\n <li\n className={clsx('rounded flex', {\n 'text-[#333333]': !isActive,\n 'text-[#0AAA82]': isActive,\n 'mb-0 p-[5px]': isMobile,\n 'mb-[20px]': !isMobile,\n 'px-0': collapsed,\n 'px-[0px]': !collapsed,\n })}\n >\n <button\n type=\"button\"\n onClick={(e) => {\n if (onClick) {\n onClick(e);\n }\n if (isActive && toggleMenu) {\n toggleMenu(e);\n }\n }}\n className=\"w-full text-left\"\n >\n {content}\n </button>\n </li>\n );\n};\n","import { commonRoutes } from '@utils';\nimport clsx from 'clsx';\nimport MenuBookOutlinedIcon from '@mui/icons-material/MenuBookOutlined';\nimport WalletOutlinedIcon from '@mui/icons-material/WalletOutlined';\nimport { FinancialLiteracyIcon } from 'iconComponents/FinancialLiteracyIcon';\nimport AccountBalanceOutlinedIcon from '@mui/icons-material/AccountBalanceOutlined';\nimport EmojiEventsOutlinedIcon from '@mui/icons-material/EmojiEventsOutlined';\nimport SettingsOutlinedIcon from '@mui/icons-material/SettingsOutlined';\nimport ArrowCircleRightOutlinedIcon from '@mui/icons-material/ArrowCircleRightOutlined';\nimport EmergencyIcon from '@mui/icons-material/Emergency';\nimport { MessagesIcon } from 'iconComponents/MessagesIcon';\nimport { useRouter } from 'next/router';\nimport { MouseEventHandler, useState } from 'react';\nimport { MenuLink } from '../menu-link';\nimport Image from 'next/image';\nimport { useSidebarContext } from 'contexts/sidebar-context';\nimport { useRoute } from '../../../../context/RouteContext';\nimport { useTranslation } from 'react-i18next';\nimport ChevronLeftIcon from '@mui/icons-material/ChevronLeft';\nimport { Box, Tooltip } from '@mui/material';\n\nexport const BuyerLayoutMenu = ({\n welcomTitle,\n logout,\n hide,\n toggleMenu,\n showMenu,\n setShowMenu,\n}: {\n welcomTitle: string;\n logout: Function;\n hide?: boolean;\n toggleMenu: MouseEventHandler;\n showMenu: boolean;\n setShowMenu: React.Dispatch<React.SetStateAction<boolean>>;\n}) => {\n const router = useRouter();\n const { setCurrentRoute } = useRoute();\n const { setIsSectionSelected } = useSidebarContext();\n const [isCollapsed, setIsCollapsed] = useState(true);\n const { t } = useTranslation();\n\n const handleNavigation = (path: string, name: string) => {\n console.log('Navigating to:', path, 'with name:', name);\n setCurrentRoute({ name, path });\n router.push(path);\n };\n\n const SmallScreenMenu = () => {\n return (\n <Box\n className={clsx(\n 'mt-7 bg-white z-[999] h-[100vh] w-[272px] fixed -top-8 left-0 shadow-xl p-8 !pb-10 mb-5',\n {\n hidden: hide,\n },\n )}\n >\n <button\n onClick={() => setShowMenu(false)}\n className=\"absolute -right-3 top-6 p-1 w-[32px] h-[32px] rounded-full bg-[#64C39C] text-white cursor-pointer hover:scale-90 transition-all flex items-center justify-center z-[1000]\"\n >\n <ChevronLeftIcon\n className={clsx(\n 'transition-transform duration-300',\n // isCollapsed ? 'rotate-180' : 'rotate-180'\n )}\n fontSize=\"small\"\n />\n </button>\n\n <ul className=\"text-[15px] font-normal space-y-3 mt-[6px] -ml-4\">\n <li className=\"mb-[10px] font-semibold ml-4\">\n {/* Welcome, <span className=\"opacity-[0.7]\">{welcomTitle}!</span> */}\n <Image src=\"/images/MHP_Lockup_Mint.png\" alt=\"logo\" width={133} height={55} />\n </li>\n <MenuLink\n icon={<EmergencyIcon />}\n href={commonRoutes.buyer.auth.summary}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.summary, t('Dashboard'))}\n active={router.pathname === commonRoutes.buyer.auth.summary}\n toggleMenu={toggleMenu}\n >\n {t('Dashboard')}\n </MenuLink>\n <MenuLink\n icon={<FinancialLiteracyIcon />}\n href={commonRoutes.buyer.auth.financialliteracy}\n onClick={() => {\n handleNavigation(commonRoutes.buyer.auth.financialliteracy, t('Financial Literacy'));\n setIsSectionSelected(false);\n if (typeof window !== 'undefined') {\n const event = new CustomEvent('refetchFinancialLiteracyCourses');\n window.dispatchEvent(event);\n }\n }}\n active={router.pathname === commonRoutes.buyer.auth.financialliteracy}\n toggleMenu={toggleMenu}\n >\n {t('Financial Literacy')}\n </MenuLink>\n <MenuLink\n icon={<WalletOutlinedIcon />}\n href={commonRoutes.buyer.auth.finances}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.finances, t('Finances'))}\n active={router.pathname === commonRoutes.buyer.auth.finances}\n toggleMenu={toggleMenu}\n >\n {t('Finances')}\n </MenuLink>\n <MenuLink\n icon={<AccountBalanceOutlinedIcon />}\n href={commonRoutes.buyer.auth.accounts}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.accounts, t('Accounts'))}\n active={router.pathname === commonRoutes.buyer.auth.accounts}\n toggleMenu={toggleMenu}\n >\n {t('Accounts')}\n </MenuLink>\n <MenuLink\n icon={<EmojiEventsOutlinedIcon />}\n href={commonRoutes.buyer.auth.rewards}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.rewards, t('Rewards'))}\n active={router.pathname === commonRoutes.buyer.auth.rewards}\n toggleMenu={toggleMenu}\n >\n {t('Rewards')}\n </MenuLink>\n <MenuLink\n icon={<MenuBookOutlinedIcon />}\n href={commonRoutes.buyer.auth.additionalresources}\n onClick={() =>\n handleNavigation(\n commonRoutes.buyer.auth.additionalresources,\n t('Additional Resources'),\n )\n }\n active={router.pathname === commonRoutes.buyer.auth.additionalresources}\n toggleMenu={toggleMenu}\n >\n {t('Additional Resources')}\n </MenuLink>\n <MenuLink\n icon={<MessagesIcon />}\n href={commonRoutes.buyer.auth.messages}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.messages, t('Messages'))}\n active={router.pathname === commonRoutes.buyer.auth.messages}\n toggleMenu={toggleMenu}\n >\n {t('Messages')}\n </MenuLink>\n <MenuLink\n icon={<SettingsOutlinedIcon />}\n href={commonRoutes.buyer.auth.settings}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.settings, t('Settings'))}\n active={router.pathname === commonRoutes.buyer.auth.settings}\n toggleMenu={toggleMenu}\n >\n {t('Settings')}\n </MenuLink>\n\n <li className=\"text-red\">\n <button\n type=\"button\"\n className=\"p-[15px] flex gap-3 items-center hover:opacity-50 -mt-[7px] -ml-[11px]\"\n onClick={() => {\n logout();\n router.push('/user/sign-in');\n }}\n >\n <ArrowCircleRightOutlinedIcon />\n {t('SIGN OUT')}\n </button>\n </li>\n </ul>\n </Box>\n );\n };\n\n const DefaultMenu = () => {\n return (\n <Box\n className={clsx(\n 'relative transition-all duration-300 ease-in-out',\n 'mt-7 lg:mt-0 lg:ml-10 p-4 !pb-10 mb-5 bg-white rounded-lg shadow-sm',\n {\n hidden: hide,\n 'w-[272px]': !isCollapsed,\n 'w-[64px]': isCollapsed,\n },\n )}\n >\n <button\n onClick={() => setIsCollapsed(!isCollapsed)}\n className={clsx(\n 'absolute -right-3 top-6 p-1.5 w-[32px] h-[32px] rounded-full bg-[#64C39C] text-white cursor-pointer hover:scale-90 transition-all',\n 'shadow-sm flex items-center justify-center z-[1000]',\n )}\n >\n <ChevronLeftIcon\n className={clsx('transition-transform duration-300', isCollapsed ? 'rotate-180' : '')}\n fontSize=\"small\"\n />\n </button>\n\n <ul className={clsx('text-[15px] font-normal space-y-3', {\n 'mt-[85px]': isCollapsed,\n })}>\n <li className={clsx('mb-[30px]', isCollapsed ? 'text-center' : '')}>\n {!isCollapsed && (\n <Image\n src=\"/images/MHP_Lockup_Mint.png\"\n alt=\"logo\"\n width={133}\n height={55}\n className=\"mx-auto\"\n />\n )}\n </li>\n {isCollapsed ? (\n <Tooltip title={t('Dashboard')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<EmergencyIcon />}\n href={commonRoutes.buyer.auth.summary}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.summary, t('Dashboard'))}\n active={router.pathname === commonRoutes.buyer.auth.summary}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Dashboard')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<EmergencyIcon />}\n href={commonRoutes.buyer.auth.summary}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.summary, t('Dashboard'))}\n active={router.pathname === commonRoutes.buyer.auth.summary}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Dashboard')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Financial Literacy')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<FinancialLiteracyIcon />}\n href={commonRoutes.buyer.auth.financialliteracy}\n onClick={() => {\n handleNavigation(commonRoutes.buyer.auth.financialliteracy, t('Financial Literacy'));\n setIsSectionSelected(false);\n if (typeof window !== 'undefined') {\n const event = new CustomEvent('refetchFinancialLiteracyCourses');\n window.dispatchEvent(event);\n }\n }}\n active={router.pathname === commonRoutes.buyer.auth.financialliteracy}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Financial Literacy')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<FinancialLiteracyIcon />}\n href={commonRoutes.buyer.auth.financialliteracy}\n onClick={() => {\n handleNavigation(commonRoutes.buyer.auth.financialliteracy, t('Financial Literacy'));\n setIsSectionSelected(false);\n if (typeof window !== 'undefined') {\n const event = new CustomEvent('refetchFinancialLiteracyCourses');\n window.dispatchEvent(event);\n }\n }}\n active={router.pathname === commonRoutes.buyer.auth.financialliteracy}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Financial Literacy')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Finances')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<WalletOutlinedIcon />}\n href={commonRoutes.buyer.auth.finances}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.finances, t('Finances'))}\n active={router.pathname === commonRoutes.buyer.auth.finances}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Finances')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<WalletOutlinedIcon />}\n href={commonRoutes.buyer.auth.finances}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.finances, t('Finances'))}\n active={router.pathname === commonRoutes.buyer.auth.finances}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Finances')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Accounts')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<AccountBalanceOutlinedIcon />}\n href={commonRoutes.buyer.auth.accounts}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.accounts, t('Accounts'))}\n active={router.pathname === commonRoutes.buyer.auth.accounts}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Accounts')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<AccountBalanceOutlinedIcon />}\n href={commonRoutes.buyer.auth.accounts}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.accounts, t('Accounts'))}\n active={router.pathname === commonRoutes.buyer.auth.accounts}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Accounts')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Rewards')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<EmojiEventsOutlinedIcon />}\n href={commonRoutes.buyer.auth.rewards}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.rewards, t('Rewards'))}\n active={router.pathname === commonRoutes.buyer.auth.rewards}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Rewards')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<EmojiEventsOutlinedIcon />}\n href={commonRoutes.buyer.auth.rewards}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.rewards, t('Rewards'))}\n active={router.pathname === commonRoutes.buyer.auth.rewards}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Rewards')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Additional Resources')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<MenuBookOutlinedIcon />}\n href={commonRoutes.buyer.auth.additionalresources}\n onClick={() =>\n handleNavigation(\n commonRoutes.buyer.auth.additionalresources,\n t('Additional Resources'),\n )\n }\n active={router.pathname === commonRoutes.buyer.auth.additionalresources}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Additional Resources')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<MenuBookOutlinedIcon />}\n href={commonRoutes.buyer.auth.additionalresources}\n onClick={() =>\n handleNavigation(\n commonRoutes.buyer.auth.additionalresources,\n t('Additional Resources'),\n )\n }\n active={router.pathname === commonRoutes.buyer.auth.additionalresources}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Additional Resources')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Messages')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<MessagesIcon />}\n href={commonRoutes.buyer.auth.messages}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.messages, t('Messages'))}\n active={router.pathname === commonRoutes.buyer.auth.messages}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Messages')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<MessagesIcon />}\n href={commonRoutes.buyer.auth.messages}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.messages, t('Messages'))}\n active={router.pathname === commonRoutes.buyer.auth.messages}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Messages')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Settings')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<SettingsOutlinedIcon />}\n href={commonRoutes.buyer.auth.settings}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.settings, t('Settings'))}\n active={router.pathname === commonRoutes.buyer.auth.settings}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Settings')}\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<SettingsOutlinedIcon />}\n href={commonRoutes.buyer.auth.settings}\n onClick={() => handleNavigation(commonRoutes.buyer.auth.settings, t('Settings'))}\n active={router.pathname === commonRoutes.buyer.auth.settings}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n {t('Settings')}\n </MenuLink>\n )}\n\n {isCollapsed ? (\n <Tooltip title={t('Sign Out')} placement=\"right\" arrow>\n <li>\n <MenuLink\n icon={<ArrowCircleRightOutlinedIcon />}\n onClick={() => {\n logout();\n router.push('https://myhomepathway.squarespace.com/');\n }}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n <span className=\"text-red font-semibold\">{t('Sign Out')}</span>\n </MenuLink>\n </li>\n </Tooltip>\n ) : (\n <MenuLink\n icon={<ArrowCircleRightOutlinedIcon />}\n onClick={() => {\n logout();\n router.push('https://myhomepathway.squarespace.com/');\n }}\n toggleMenu={toggleMenu}\n collapsed={isCollapsed}\n >\n <span className=\"text-red font-semibold\">{t('Sign Out')}</span>\n </MenuLink>\n )}\n </ul>\n </Box>\n );\n };\n\n return <>{showMenu ? <SmallScreenMenu /> : <DefaultMenu />}</>;\n};\n","import { Button } from '@components/button';\nimport { Modal } from '@components/modal';\nimport { FullModal } from '@components/modal/full-modal';\nimport { FeedbackContent } from '@components/settings/settings-feedback';\nimport { useMutation } from 'react-query';\nimport { useState } from 'react';\nimport { Loading } from '@components/loading';\nimport { ApiService, EUserFeedbackReason } from '@services/Api';\n\nexport const FeedbackModal = ({ onClose, open }: { open?: boolean; onClose?: () => void }) => {\n const [showSuccessModal, setShowSuccessModal] = useState(false);\n const mutation = useMutation(\n async (values: { reason: EUserFeedbackReason; feedback: string }) => {\n await ApiService.sendFeedback(values.reason, values.feedback);\n },\n {\n onSuccess: () => {\n onClose();\n setShowSuccessModal(true);\n },\n },\n );\n\n const onSubmit = (values) => {\n mutation.mutate(values);\n };\n return (\n <>\n <Loading isLoading={mutation.isLoading} />\n <FullModal\n onClose={() => {\n onClose();\n }}\n open={open}\n title=\"Give us feedback\"\n onClickBackButton={onClose != null ? onClose : undefined}\n >\n <FeedbackContent\n onSubmit={(values) => {\n onSubmit(values);\n }}\n />\n </FullModal>\n <Modal\n open={showSuccessModal}\n onClose={() => {\n setShowSuccessModal(false);\n }}\n wrapperClassName=\"flex min-h-[100%] items-center justify-center p-4 text-center\"\n panelClassName=\"w-full lg:max-w-[400px] rounded-lg pt-8 px-6 text-center\"\n >\n <div className=\"mb-8 mx-auto w-max\">\n <div className=\"mix-blend-multiply\">\n {/* <Helpingout className=\"keep-color\" /> */}\n HelpingOut Icon\n </div>\n </div>\n <h2 className=\"text-2xl font-medium mb-3\">Thanks for helping out!</h2>\n <p className=\"text-sm text-gray-600 mb-8\">\n We're always searching for ways to improve My Home Pathway, and your input is an\n important part of that.\n </p>\n <Button\n type=\"button\"\n className=\"mb-8\"\n onClick={() => {\n setShowSuccessModal(false);\n }}\n >\n Go back\n </Button>\n </Modal>\n </>\n );\n};\n","import { defaultErrorMessage, Toast } from '@utils';\nimport { Button } from '@components/button';\nimport { CustomInput } from '@components/custom-input';\nimport { Form } from '@components/form';\nimport { Loading } from '@components/loading';\nimport { useForm } from 'react-hook-form';\nimport { useMutation } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport { Modal } from '..';\nimport { Dispatch, SetStateAction } from 'react';\nimport { AxiosRequestConfig } from 'axios';\nimport toast from 'react-hot-toast';\n\nexport const ShareModal = ({\n isShareOpen,\n setIsShareOpen,\n description = \"You'll be contributing to the growth and improvement of our services!\",\n}: {\n isShareOpen: boolean;\n setIsShareOpen: Dispatch<SetStateAction<boolean>>;\n description?: string;\n}) => {\n const methods = useForm({\n defaultValues: {\n phone: '',\n },\n });\n\n const onSuccess = () => {\n setIsShareOpen(false);\n Toast({ text: 'Message sent.' });\n methods.reset();\n };\n\n const sendReferralLinkMutation = useMutation(\n async (phone: string) => {\n if (!phone) {\n toast.error('Please enter a phone number');\n return;\n }\n const formattedPhone = phone?.replace(/[^\\d]/g, '');\n await ApiService.sendReferralLink(formattedPhone);\n },\n {\n onSuccess,\n onError: (error: AxiosRequestConfig) => {\n Toast({\n text:\n error.data?.statusCode === 400\n ? 'This phone number is invalid. Please, try again.'\n : defaultErrorMessage,\n variant: 'error',\n });\n },\n },\n );\n return (\n <Modal\n open={isShareOpen}\n onClose={() => {\n setIsShareOpen(false);\n }}\n wrapperClassName=\"flex flex-col lg:flex-row lg:min-h-[90%] min-h-[100%] lg:p-4 items-center justify-center text-center\"\n panelClassName=\"w-full lg:max-w-[480px] lg:rounded-lg text-left flex flex-col flex-grow lg:block\"\n >\n <Loading isLoading={sendReferralLinkMutation.isLoading} />\n <Form\n id=\"invite-sms\"\n wrapperClassName=\"flex flex-col flex-grow\"\n className=\"flex flex-col flex-grow\"\n onSubmit={methods.handleSubmit((values: any) => {\n sendReferralLinkMutation.mutate(values.phone);\n })}\n methods={methods}\n >\n <div className=\"flex items-center py-4 lg:py-6 px-6\">\n <button\n className=\"lg:hidden z-[1]\"\n onClick={() => {\n setIsShareOpen(false);\n }}\n type=\"button\"\n >\n {/* <ArrowLeft /> */}\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.5 12H6M6 12L12 6M6 12L12 18\"\n stroke=\"#212121\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>{' '}\n <p className=\"mx-auto lg:mx-0 w-max font-medium font-slab text-gray-900 pr-5 lg:text-xl\">\n Invite a friend\n </p>\n <button\n className=\"lg:block ml-auto hidden\"\n onClick={() => setIsShareOpen(false)}\n type=\"button\"\n >\n {/* <CloseIcon strokeWidth={2} width={20} /> */}\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n <div className=\"p-6 pb-6 md:pb-0 border-t border-t-gray-200\">\n <p className=\"text-sm text-gray-900 mb-6 lg:mb-4\">{description}</p>\n <CustomInput.CountryPhone required />\n </div>\n <div className=\"\">\n <div className=\"flex flex-col lg:flex-row-reverse gap-4 ml-auto p-6 pb-12 lg:pb-6\">\n <Button className=\"!w-full lg:!w-max\" type=\"submit\">\n Invite\n </Button>\n <Button\n onClick={() => {\n setIsShareOpen(false);\n }}\n className=\"!w-full lg:!w-max\"\n variant=\"white\"\n >\n Cancel\n </Button>\n </div>\n </div>\n </Form>\n </Modal>\n );\n};\n","import { useAuthUser } from '@hooks';\nimport { Toast } from '@utils';\n\nexport const useHandleReferralLink = () => {\n const { id } = useAuthUser(true);\n\n const handleReferralLink = () => {\n const origin = window.location.origin;\n navigator.clipboard.writeText(`${origin}/user/sign-in?referredBy=${id}`).then(() => {\n Toast({ text: 'Referral link copied to clipboard.' });\n });\n };\n\n return handleReferralLink;\n};\n","import React, { useState } from 'react';\nimport { useRouter } from 'next/router';\nimport { ArrayCreditAlerts } from '@components/array-credit-alerts';\nimport { useAuthUser } from '@hooks/use-auth';\nimport { useTranslation } from 'react-i18next';\nimport CloseIcon from '@mui/icons-material/Close';\nimport NotInterestedIcon from '@mui/icons-material/NotInterested';\nimport Tooltip from '@mui/material/Tooltip';\nimport { Box, CircularProgress } from '@mui/material';\nimport NotificationsIcon from '@mui/icons-material/Notifications';\nimport HourglassEmptyIcon from '@mui/icons-material/HourglassEmpty';\nimport toast from 'react-hot-toast';\n\nconst NotificationScreen = ({ onClose, notifications, onClear, isLoading }) => {\n const router = useRouter();\n const [isMessagesOpen, setIsMessagesOpen] = useState(false);\n const { profile } = useAuthUser();\n const { t } = useTranslation();\n\n const handleClearNotifications = async () => {\n try {\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_API_URL}/notifications/clear/${profile.userId}`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n\n if (response.ok) {\n onClear(); \n toast.success('Notifications cleared successfully');\n } else {\n console.error('Failed to clear notifications');\n }\n } catch (error) {\n console.error('Error clearing notifications:', error);\n }\n };\n\n return (\n <div className=\"py-10 px-4 h-full\" onClick={(e) => e.stopPropagation()}>\n <div className=\"flex justify-between mb-4\">\n <h2 className=\"text-lg flex items-center gap-2 font-semibold\">\n <NotificationsIcon className=\"text-primary\" fontSize=\"small\" />\n {t('Notifications')}\n {notifications.length > 0 && (\n <span className=\"text-primary\">({notifications.length})</span>\n )}\n </h2>\n <div className=\"flex gap-4\">\n <Tooltip title={t('Clear Notifications')} placement=\"bottom\">\n <button\n onClick={handleClearNotifications}\n className=\"text-right text-[#635E7D] hover:text-[#4a465f]\"\n >\n {/* {t('Clear')} */}\n <NotInterestedIcon className=\"hover:text-primary \" />\n </button>\n </Tooltip>\n <Tooltip title={t('Close')} placement=\"bottom\">\n <button onClick={onClose} className=\"text-right text-[#635E7D] hover:text-[#4a465f]\">\n {/* {t('Close')} */}\n <CloseIcon />\n </button>\n </Tooltip>\n </div>\n </div>\n\n {isLoading ? (\n <Box display=\"flex\" justifyContent=\"center\" alignItems=\"center\" minHeight=\"200px\">\n <CircularProgress color=\"primary\" />\n </Box>\n ) : (\n <>\n {notifications?.length === 0 ? (\n <Box className=\"mt-5 p-5 flex flex-col text-[12px] items-center justify-center rounded-xl shadow-lg gap-5 border border-gray-300\">\n <HourglassEmptyIcon className=\"text-primary\" />\n <p>{t('No Notifications')}</p>\n </Box>\n ) : (\n <div className=\"mt-10\">\n {notifications?.map((notification, index) => {\n const { title, message, link } = JSON.parse(notification.notification);\n const notificationType = notification.notificationType;\n if (notificationType === 'seen') {\n return null; // Do not render this notification\n }\n if (\n notificationType === 'Equifax Alert' &&\n notification.receiverID !== profile.id\n ) {\n return null;\n }\n if (notificationType === 'userscore' && notification.receiverID !== profile.id) {\n return null;\n }\n const handleClick = () => {\n // Handle redirection based on notification type\n if (notificationType === 'message') {\n // Redirect to message page for message notifications\n router.push(\n `/user/messages?id=${notification.senderID}&name=${encodeURIComponent(\n title || '',\n )}`,\n );\n } else if (notificationType === 'setupIncomplete') {\n router.push('/user/settings/accounts');\n\n onClose();\n } else if (link) {\n router.push(link);\n }\n // Do nothing if the notification type doesn't need redirection\n };\n\n return (\n <Box className=\"flex justify-between w-full items-start mb-2 p-3 text-left hover:shadow-md hover:border-primary cursor-pointer text-[12px] border border-gray-300 rounded-xl\">\n <div\n key={index}\n className=\"\"\n onClick={handleClick} // Attach the click handler\n style={{\n cursor: 'pointer',\n wordWrap: 'break-word',\n maxWidth: '100%',\n overflow: 'hidden',\n }} // Added styles\n >\n <p className=\"font-semibold pb-1\">{title || 'My Home Pathway'}</p>\n <p dangerouslySetInnerHTML={{ __html: message }} />\n <p className=\"text-[10px] font-semibold text-right mt-2 text-gray-500\">\n {t('Received:')} {new Date(notification.createdAt).toLocaleString()}\n </p>\n <p className=\"text-xs text-gray-500\">\n {/* {notification.notificationType}\n {notification.senderID} */}\n </p>\n <p className=\"text-xs text-gray-500\">\n {/* {notification.receiverID} || {profile.id} */}\n </p>\n <p className=\"font-semibold\">{notification.title}</p>\n </div>\n <NotificationsIcon className=\"text-primary\" style={{ fontSize: '15px' }} />\n </Box>\n );\n })}\n </div>\n )}\n </>\n )}\n\n <ArrayCreditAlerts closeArrayAlerts={() => setIsMessagesOpen(false)} />\n </div>\n );\n};\n\nexport default NotificationScreen;\n","import { useAuthUser, useClickOutside } from '@hooks';\nimport NotificationsOutlinedIcon from '@mui/icons-material/NotificationsOutlined';\nimport { commonRoutes } from '@utils';\nimport clsx from 'clsx';\nimport { ArrayCreditAlerts } from '@components/array-credit-alerts';\nimport { UserLogo } from '@components/layout/header/user-logo';\nimport { DashboardInfoModal } from '@components/modal/dashboard-info-modal';\nimport { FeedbackModal } from '@components/modal/feedback-modal';\nimport { ShareModal } from '@components/modal/share-modal';\nimport { useHandleReferralLink } from '@hooks/use-handle-referral-link';\nimport { SignOutMenuIcon } from '@iconComponents/SignOutMenuIcon';\nimport { useRouter } from 'next/router';\nimport { MouseEventHandler, useEffect, useRef, useState } from 'react';\nimport { useMediaQuery } from 'react-responsive';\nimport { io } from 'socket.io-client';\nimport NotificationScreen from './notification-menu';\nimport { EOnboardingStepStatus } from '../../../../services/Api';\nimport InboxIcon from '@components/icons/InboxIcon';\nimport Image from 'next/image';\nimport LanguageSelect from '@components/common/LanguageSelect';\nimport { useTranslation } from 'react-i18next';\nimport { link } from 'fs';\n\nconst ProfileDropdownItem = ({\n // Icon = () => null,\n children,\n text,\n onClick,\n ...props\n}: {\n // Icon: (props: any) => React.ReactElement;\n children: React.ReactNode;\n text: string;\n onClick: MouseEventHandler;\n}) => (\n <button\n type=\"button\"\n className=\"flex text-[#1C1A27] mb-[20px] hover:bg-gray-50\"\n onClick={onClick}\n >\n {/* <Icon /> */}\n {children}\n\n <div className=\"ml-[10px] text-[15px] font-normal whitespace-nowrap\">{text}</div>\n </button>\n);\n\nlet newSocket = null;\n\nexport const BuyerLayoutProfileMenu = () => {\n const { t } = useTranslation();\n const { firstName, lastName, email, isLoadingUserInfo, profile, logout } = useAuthUser(true);\n const [isUserInfoOpenDesktop, setIsUserInfoOpenDesktop] = useState(false);\n const [isShareOpen, setIsShareOpen] = useState(false);\n const [isFeedbackOpen, setIsFeedbackOpen] = useState(false);\n const [isMessagesOpen, setIsMessagesOpen] = useState(false);\n const [isNotificationOpen, setIsNotificationOpen] = useState(false);\n const [notifications, setNotifications] = useState([]); // Store multiple notifications\n const [hasUnreadNotifications, setHasUnreadNotifications] = useState(false);\n const [isLoading, setIsLoading] = useState(false);\n\n const refClickOutSideUserInfoDesktop = useRef<HTMLDivElement | null>(null);\n\n useClickOutside(refClickOutSideUserInfoDesktop, () => {\n setIsUserInfoOpenDesktop(false);\n });\n\n const router = useRouter();\n const handleReferralLink = useHandleReferralLink();\n const isDesktop = useMediaQuery({ minWidth: 1024 });\n const user = useAuthUser();\n\n const checkIncompleteSetup = () => {\n const incompleteSteps = {\n transactionAccount:\n profile?.onboardingTransactionAccountStatus !== EOnboardingStepStatus.completed,\n creditReport: profile?.onboardingCreditReportStatus !== EOnboardingStepStatus.completed,\n incomeAccount: profile?.onboardingIncomeAccountStatus !== EOnboardingStepStatus.completed,\n };\n\n const incompleteStepNames = Object.entries(incompleteSteps)\n .filter(([_, isIncomplete]) => isIncomplete)\n .map(([step]) => {\n switch (step) {\n case 'transactionAccount':\n return 'Transaction Account';\n case 'creditReport':\n return 'Credit Report';\n case 'incomeAccount':\n return 'Income Account';\n default:\n return '';\n }\n });\n\n return {\n hasIncomplete: incompleteStepNames.length > 0,\n incompleteSteps: incompleteStepNames,\n };\n };\n\n const fetchNotifications = async () => {\n try {\n setIsLoading(true);\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_API_URL}/notifications/notifications-list/${user.id}`,\n );\n const result = await response.json();\n const notifications = Array.isArray(result?.data) ? result.data : [];\n setNotifications(notifications);\n\n const seenNotifications = notifications.filter(\n (notification) => notification && notification.notificationType === 'seen',\n );\n\n if (seenNotifications.length > 0) {\n const latestSeenNotification = seenNotifications.reduce((latest, current) => {\n return new Date(latest.createdAt) > new Date(current.createdAt) ? latest : current;\n });\n\n console.log('Latest seen notification:', latestSeenNotification);\n\n // Check for notifications created after the latest \"seen\" notification\n const newerNotifications = notifications.filter(\n (notification) =>\n notification &&\n notification.notificationType !== 'seen' &&\n new Date(notification.createdAt) > new Date(latestSeenNotification.createdAt),\n );\n\n if (newerNotifications.length > 0) {\n setHasUnreadNotifications(true);\n console.log(\n 'Newer notifications found after the latest seen notification:',\n newerNotifications,\n );\n } else {\n console.log('No notifications found after the latest seen notification.');\n }\n } else {\n console.log('No seen notifications found.');\n }\n // Check if the account setup is incomplete\n const setupStatus = checkIncompleteSetup();\n if (setupStatus.hasIncomplete) {\n // const isOnlyTransactionAccount = setupStatus.incompleteSteps.length === 1 &&\n // setupStatus.incompleteSteps[0] === 'Transaction Account';\n\n const setupIncompleteNotification = {\n notification: JSON.stringify({\n message: `Your account setup is incomplete. Please complete: ${setupStatus.incompleteSteps.join(\n ', ',\n )}.`,\n }),\n link: '/user/settings/accounts',\n createdAt: new Date().toISOString(),\n notificationType: 'setupIncomplete',\n // onlyTransactionAccount: isOnlyTransactionAccount\n };\n\n // Add the setup incomplete notification on top\n notifications.unshift(setupIncompleteNotification);\n setHasUnreadNotifications(true);\n }\n\n // Set notifications\n setNotifications(notifications);\n setIsLoading(false);\n } catch (error) {\n console.error('Error fetching notifications:', error);\n setIsLoading(false);\n }\n };\n const sendNotification = async () => {\n try {\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_API_URL}/notifications/seen/${user.id}`,\n {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n },\n );\n\n const result = await response.json();\n setHasUnreadNotifications(false);\n return result;\n } catch (error) {\n console.error('Error sending notification:', error);\n throw error;\n }\n };\n useEffect(() => {\n console.log('Rendering WebSocket connection...');\n\n if (newSocket == null && !newSocket?.connected) {\n newSocket = io(`${process.env.NEXT_PUBLIC_API_URL}`, {\n transports: ['websocket'],\n });\n\n newSocket.on('connect', () => {\n console.log('Connected to WebSocket server');\n });\n\n newSocket.on('disconnect', () => {\n console.log('Disconnected from server.');\n });\n\n newSocket.on('notification', (message) => {\n console.log('Received notification:', message);\n setHasUnreadNotifications(true);\n\n if (message.notificationType === 'message' && message.receiverID === user.id) {\n const notification = {\n notification: JSON.stringify({ message: message.text || `You have a new message!` }),\n senderID: message.senderID || null,\n receiverID: user.id,\n notificationType: 'message',\n createdAt: new Date(),\n };\n setHasUnreadNotifications(true);\n\n setNotifications((prevNotifications) => {\n const updatedNotifications = [notification, ...prevNotifications];\n return updatedNotifications.sort(\n (a, b) => new Date(b.createdAt).getTime() - new Date(a.createdAt).getTime(),\n );\n });\n\n console.log('Notification of message:', notification);\n } else {\n console.log('You can’t see the notification');\n }\n });\n }\n fetchNotifications();\n }, [user.id]);\n\n const handleNotificationClick = (e) => {\n e.stopPropagation();\n\n setIsNotificationOpen(!isNotificationOpen);\n // fetchNotifications();\n\n if (!isNotificationOpen) {\n sendNotification();\n setHasUnreadNotifications(false);\n }\n };\n\n const handleCloseNotification = () => {\n setIsNotificationOpen(false);\n };\n\n const handleUserAvatar = () => {\n setIsUserInfoOpenDesktop((o) => !o);\n };\n\n const handleClearNotifications = () => {\n setNotifications([]);\n setHasUnreadNotifications(false);\n setIsNotificationOpen(false);\n };\n\n return (\n <>\n <div className=\"\">\n <div className=\"relative flex \" ref={refClickOutSideUserInfoDesktop}>\n <div className=\"flex items-center gap-2 cursor-pointer select-none\">\n {!isDesktop && <div></div>}\n <div className=\"hidden md:flex\">{/* <LanguageSelect /> */}</div>\n\n {/* <button\n type=\"button\"\n className=\"text-[#635E7D] hover:text-[#D0CAE9]\"\n onClick={(e) => {\n e.stopPropagation();\n setIsMessagesOpen(true);\n }}\n >\n <Bell className=\"w-8\" />\n </button> */}\n\n <div\n className=\"relative\"\n style={{ color: '#10B395' }}\n onClick={handleNotificationClick}\n >\n {hasUnreadNotifications && (\n <span className=\"absolute right-0 top-1 w-4 h-4 text-[10px] rounded-full text-white-50 flex justify-center items-center bg-red-500\">\n {notifications?.length}\n </span>\n )}\n\n {isNotificationOpen && (\n <div\n className={`fixed top-0 right-0 h-full w-80 bg-white shadow-lg overflow-y-auto z-50 transition-transform transform ${\n isNotificationOpen ? 'translate-x-0' : 'translate-x-full'\n }`}\n >\n <NotificationScreen\n notifications={notifications}\n onClose={handleCloseNotification}\n onClear={handleClearNotifications}\n isLoading={isLoading}\n />\n </div>\n )}\n {/* <NotificationsOutlinedIcon className=\"mr-2\" /> */}\n {/* <InboxIcon /> */}\n <Image\n width={38}\n height={38}\n alt=\"notification\"\n src=\"/new-notification.png\"\n className=\"mr-2\"\n />\n </div>\n\n {/* {isDesktop && (\n <div className=\"text-[15px] text-[#1C1A27] text-right mr-[4px]\">\n <div>\n {firstName} {lastName}\n </div>\n <div className=\"text-[#635E7D]\">{email}</div>\n </div>\n )} */}\n\n <UserLogo firstName={firstName} lastName={lastName} handleClick={handleUserAvatar} />\n {/* <ChevronUp\n width={20}\n className={clsx('keep-color ml-1.5 text-[#1C1A27] transition-transform', {\n 'rotate-[0deg]': isUserInfoOpenDesktop,\n 'rotate-[180deg]': !isUserInfoOpenDesktop,\n })}\n /> */}\n </div>\n\n <div\n className={clsx(\n ' absolute shadow-[0px_20px_25px_-5px_rgba(0,_0,_0,_0.1)] rounded-lg filter-[drop-shadow(0px_10px_10px_rgba(0,_0,_0,_0.04))] flex flex-col min-w-[201px] right-0 top-10 bg-white transition font-medium z-[10]',\n 'top-14 pt-[20px] pl-[20px] pr-[20px]',\n { 'visible opacity-100': isUserInfoOpenDesktop },\n { 'invisible opacity-0': !isUserInfoOpenDesktop },\n )}\n >\n <ProfileDropdownItem\n onClick={() => {\n setIsUserInfoOpenDesktop(false);\n router.push(commonRoutes.buyer.auth.settings);\n }}\n text={t('Profile')}\n >\n <svg\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M6.25 5.91675C6.25 7.98425 7.9325 9.66675 10 9.66675C12.0675 9.66675 13.75 7.98425 13.75 5.91675C13.75 3.84925 12.0675 2.16675 10 2.16675C7.9325 2.16675 6.25 3.84925 6.25 5.91675ZM16.6667 18.0001H17.5V17.1667C17.5 13.9509 14.8825 11.3334 11.6667 11.3334H8.33333C5.11667 11.3334 2.5 13.9509 2.5 17.1667V18.0001H16.6667Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </ProfileDropdownItem>\n\n <ProfileDropdownItem\n onClick={() => {\n setIsShareOpen(true);\n setIsUserInfoOpenDesktop(false);\n }}\n text={t('Invite with SMS')}\n >\n <svg\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M13.3334 2.16675H6.66675C3.90925 2.16675 1.66675 4.40925 1.66675 7.16675V18.0001C1.66675 18.2211 1.75455 18.4331 1.91083 18.5893C2.06711 18.7456 2.27907 18.8334 2.50008 18.8334H13.3334C16.0909 18.8334 18.3334 16.5909 18.3334 13.8334V7.16675C18.3334 4.40925 16.0909 2.16675 13.3334 2.16675ZM11.6667 13.0001H5.83341V11.3334H11.6667V13.0001ZM14.1667 9.66675H5.83341V8.00008H14.1667V9.66675Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </ProfileDropdownItem>\n <ProfileDropdownItem\n onClick={() => {\n handleReferralLink();\n setIsUserInfoOpenDesktop(false);\n }}\n text={t('Copy Referral Link')}\n >\n <svg\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M16.6667 2.16675H8.33341C7.89139 2.16675 7.46746 2.34234 7.1549 2.6549C6.84234 2.96746 6.66675 3.39139 6.66675 3.83341V5.50008H13.3334C13.7754 5.50008 14.1994 5.67568 14.5119 5.98824C14.8245 6.3008 15.0001 6.72472 15.0001 7.16675V13.8334H16.6667C17.1088 13.8334 17.5327 13.6578 17.8453 13.3453C18.1578 13.0327 18.3334 12.6088 18.3334 12.1667V3.83341C18.3334 3.39139 18.1578 2.96746 17.8453 2.6549C17.5327 2.34234 17.1088 2.16675 16.6667 2.16675Z\"\n fill=\"#1C1A27\"\n />\n <path\n d=\"M3.33341 18.8334H11.6667C12.5859 18.8334 13.3334 18.0859 13.3334 17.1667V8.83341C13.3334 7.91425 12.5859 7.16675 11.6667 7.16675H3.33341C2.41425 7.16675 1.66675 7.91425 1.66675 8.83341V17.1667C1.66675 18.0859 2.41425 18.8334 3.33341 18.8334ZM5.00008 10.5001H10.0001V12.1667H5.00008V10.5001ZM5.00008 13.8334H10.0001V15.5001H5.00008V13.8334Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </ProfileDropdownItem>\n\n <ProfileDropdownItem\n onClick={() => {\n setIsFeedbackOpen(true);\n setIsUserInfoOpenDesktop(false);\n }}\n text={t('Give Feedback')}\n >\n <svg\n width=\"20\"\n height=\"21\"\n viewBox=\"0 0 20 21\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7.08333 15.5001L10 18.8334L12.9167 15.5001H15.8333C16.7525 15.5001 17.5 14.7526 17.5 13.8334V3.83341C17.5 2.91425 16.7525 2.16675 15.8333 2.16675H4.16667C3.2475 2.16675 2.5 2.91425 2.5 3.83341V13.8334C2.5 14.7526 3.2475 15.5001 4.16667 15.5001H7.08333ZM5.83333 6.33341H14.1667V8.00008H5.83333V6.33341ZM5.83333 9.66675H11.6667V11.3334H5.83333V9.66675Z\"\n fill=\"#1C1A27\"\n />\n </svg>\n </ProfileDropdownItem>\n\n {!isDesktop && (\n <ProfileDropdownItem\n onClick={() => {\n logout();\n setIsUserInfoOpenDesktop(false);\n router.push('/user/sign-in');\n }}\n // Icon={() => (\n\n // )}\n text={t('Sign out')}\n >\n <svg width={20} height={21} fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M15 2.167H5A.833.833 0 0 0 4.167 3v7.5l4.166-3.333v2.5h5v1.666h-5v2.5L4.166 10.5V18a.833.833 0 0 0 .834.833h10a.833.833 0 0 0 .833-.833V3A.833.833 0 0 0 15 2.167Z\"\n fill=\"#FF7E6D\"\n />\n </svg>\n </ProfileDropdownItem>\n )}\n </div>\n </div>\n <FeedbackModal\n open={isFeedbackOpen}\n onClose={() => {\n setIsFeedbackOpen(false);\n }}\n />\n <ShareModal isShareOpen={isShareOpen} setIsShareOpen={setIsShareOpen} />\n {isMessagesOpen && (\n <DashboardInfoModal title=\"Alerts\" open onClose={() => setIsMessagesOpen(false)}>\n <ArrayCreditAlerts closeArrayAlerts={() => setIsMessagesOpen(false)} />\n </DashboardInfoModal>\n )}\n </div>\n </>\n );\n};\n","import { useAuthUser } from '@hooks';\nimport { ReactNode, useState } from 'react';\nimport { ProfileLayout } from '..';\nimport clsx from 'clsx';\n\nimport { Loading } from '@components/loading';\nimport { BuyerLayoutMenu } from './buyer-layout-menu';\nimport { BuyerLayoutProfileMenu } from './buyer-layout-profile-menu';\nimport { commonRoutes } from '@utils';\nimport { useMediaQuery } from 'react-responsive';\nimport RewardsPopUpWrapper from '@components/rewards/rewards-pop-up-wrapper';\n\nimport Script from 'next/script';\n\nexport const BuyerLayout = ({\n children,\n headerContainerClassName = 'hidden lg:flex',\n mainClassName,\n showNeedHelp,\n headerClassName,\n logoLink = commonRoutes.buyer.auth.summary,\n hideProfile,\n alwaysShowLogo,\n customHeader,\n}: {\n children: ReactNode;\n headerContainerClassName?: string;\n mainClassName?: string;\n showNeedHelp?: boolean;\n logoLink?: string;\n headerClassName?: string;\n hideProfile?: boolean;\n alwaysShowLogo?: boolean;\n customHeader?: ReactNode;\n}) => {\n const { firstName, isLoadingUserInfo, profile, logout } = useAuthUser(true);\n\n const [showMenu, setShowMenu] = useState(false);\n\n const isDesktop = useMediaQuery({ minWidth: 1024 });\n\n return (\n <>\n <Script\n async\n id=\"ze-snippet\"\n src=\"https://static.zdassets.com/ekr/snippet.js?key=c7282538-59a4-42c4-b6ab-5111398252fd\"\n />\n\n <div\n className={clsx(\n 'min-h-full bg-white' ,\n true ? 'bg-gray-100' : 'bg-cover bg-center bg-sign-up-bg py-5',\n )}\n >\n <RewardsPopUpWrapper>\n <ProfileLayout\n logoLink={logoLink}\n mainClassName={mainClassName}\n headerClassName={headerClassName}\n alwaysShowLogo={alwaysShowLogo}\n headerContainerClassName={headerContainerClassName}\n leftMenu={\n <BuyerLayoutMenu\n hide={!isDesktop}\n welcomTitle={firstName}\n logout={logout}\n toggleMenu={() => setShowMenu((prevMenu) => !prevMenu)}\n showMenu={showMenu}\n setShowMenu={setShowMenu}\n />\n }\n rightMenu={!hideProfile && <BuyerLayoutProfileMenu />}\n customHeader={customHeader}\n toggleMenu={() => setShowMenu((prevMenu) => !prevMenu)}\n toggleHeaderLogo={() => setShowMenu(showMenu === false ? true : null)}\n >\n <Loading isLoading={isLoadingUserInfo} />\n\n {profile?.isInitialDataFetched && (\n <BuyerLayoutMenu\n hide={isDesktop || !showMenu}\n welcomTitle={firstName}\n logout={logout}\n toggleMenu={() => setShowMenu((prevMenu) => !prevMenu)}\n showMenu={showMenu}\n setShowMenu={setShowMenu}\n />\n )}\n\n <div\n // className={clsx({\n // hidden: !isDesktop && showMenu,\n // })}\n >\n <div className='px-5 pt-5 overflow-hidden' >\n {children}\n </div>\n </div>\n </ProfileLayout>\n </RewardsPopUpWrapper>\n </div>\n </>\n );\n};\n","import { useAuthUser } from '@hooks';\nimport { getBase64Src } from '@utils';\nimport clsx from 'clsx';\nimport Image from 'next/image';\nimport { ReactNode } from 'react';\nimport { useFormContext } from 'react-hook-form';\n\nexport type UserLogoProps = {\n firstName?: string;\n lastName?: string;\n className?: string;\n children?: ReactNode;\n handleClick?: () => void;\n};\n\nconst styles = {\n base: 'rounded-full w-[40px] h-[40px] flex items-center justify-center text-sm bg-primary-100 font-bold text-primary-500 flex-shrink-0',\n};\n\nexport const UserLogo = ({ className, children, handleClick }: UserLogoProps) => {\n const { image, profile, lastName, firstName } = useAuthUser();\n const methods = useFormContext();\n return (\n <div className={clsx(styles.base, className)} onClick={handleClick}>\n <>\n {firstName ? (\n <p className=\"uppercase text-[10px] md:text-[14px]\">\n {firstName[0]}\n {lastName[0]}\n </p>\n ) : (\n children\n )}\n </>\n </div>\n );\n};\n","import clsx from 'clsx';\nimport { useIntl } from 'react-intl';\nimport Link from 'next/link';\nimport { useAuthUser, useIsMounted, useTheme } from '@hooks';\nimport { useState } from 'react';\nimport { useRouter } from 'next/router';\nimport { IconButton, Modal } from '@components';\n\nexport const styles = {\n base: 'py-4 lg:py-5 pb-7 lg:mb-1 lg:pb-4 w-full lg:border-t lg:border-gray lg:dark:border-black-dark',\n menu_item: 'mt-6 flex items-center justify-between ',\n menu_item_text: 'text-black text-sm dark:text-white',\n};\n\nconst customNavs = [\n { label: 'Support', link: '/' },\n { label: 'Privacy', link: '/' },\n {\n label: 'Terms',\n link: '/',\n },\n];\n\ninterface SmallFooterProps {\n className?: string;\n}\n\nconst SmallFooter = ({ className = 'container-default' }: SmallFooterProps) => {\n const { mode, toggle } = useTheme();\n const intl = useIntl();\n return (\n (<div className={clsx('flex justify-between items', className)}>\n <div className=\"flex flex-col items-start justify-center w-full gap-4 lg:justify-start lg:flex-row lg:items-center\">\n <div className=\"flex lg:items-center justify-between w-full lg:w-[max-content] lg:mr-3\">\n <div>\n <nav className=\"flex gap-[30px] w-full\">\n {customNavs.map((nav) => (\n <Link\n href={nav.link!}\n target=\"_blank\"\n rel=\"noreferrer\"\n key={nav.label}\n className=\"text-xs font-bold text-default\">\n {nav.label}\n </Link>\n ))}\n </nav>\n <p className=\"mt-4 text-xs text-neutral-gray-web-500 lg:hidden\">\n {intl.formatMessage({ id: 'layout.footer.all-rights' })}\n </p>\n </div>\n <div className=\"border rounded-full max-w-[40px] h-[40px] border-neutral-ghost-white lg:hidden\">\n <IconButton\n className=\"min-w-[38px] h-[38px] flex justify-center items-center !p-0\"\n color=\"transparent\"\n onClick={toggle}\n icon={mode === 'light' ? <svg width=\"12\" height=\"16\" viewBox=\"0 0 12 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.98828 1.98828C7.29297 1.98828 10 4.69531 10 8C10 11.3047 7.29297 14.0117 3.98828 14.0117C3.74219 14.0117 3.49609 13.9766 3.25 13.9414C4.69141 12.3242 5.5 10.2148 5.5 8C5.5 5.78516 4.69141 3.67578 3.25 2.05859C3.49609 2.02344 3.74219 1.98828 3.98828 1.98828ZM3.98828 0.511719C2.65234 0.511719 1.35156 0.863281 0.261719 1.49609C2.47656 2.79688 3.98828 5.22266 3.98828 8C3.98828 10.7773 2.47656 13.2031 0.261719 14.5039C1.35156 15.1367 2.65234 15.4883 3.98828 15.4883C8.13672 15.4883 11.5117 12.1484 11.5117 8C11.5117 3.85156 8.13672 0.511719 3.98828 0.511719Z\" fill=\"#292929\" />\n </svg> : \n <svg className=\"!w-4 dark:text-white\" viewBox=\"0 0 45.16 45.16\">\n <path d=\"M22.58,11.269c-6.237,0-11.311,5.075-11.311,11.312s5.074,11.312,11.311,11.312c6.236,0,11.311-5.074,11.311-11.312\n S28.816,11.269,22.58,11.269z\" />\n\n <path d=\"M22.58,7.944c-1.219,0-2.207-0.988-2.207-2.206V2.207C20.373,0.988,21.361,0,22.58,0c1.219,0,2.207,0.988,2.207,2.207\n v3.531C24.787,6.956,23.798,7.944,22.58,7.944z\" />\n\n <path d=\"M22.58,37.215c-1.219,0-2.207,0.988-2.207,2.207v3.53c0,1.22,0.988,2.208,2.207,2.208c1.219,0,2.207-0.988,2.207-2.208\n v-3.53C24.787,38.203,23.798,37.215,22.58,37.215z\" />\n\n <path d=\"M32.928,12.231c-0.861-0.862-0.861-2.259,0-3.121l2.497-2.497c0.861-0.861,2.259-0.861,3.121,0\n c0.862,0.862,0.862,2.26,0,3.121l-2.497,2.497C35.188,13.093,33.791,13.093,32.928,12.231z\" />\n\n <path d=\"M12.231,32.93c-0.862-0.863-2.259-0.863-3.121,0l-2.497,2.496c-0.861,0.861-0.862,2.26,0,3.121\n c0.862,0.861,2.26,0.861,3.121,0l2.497-2.498C13.093,35.188,13.093,33.79,12.231,32.93z\" />\n\n <path d=\"M37.215,22.58c0-1.219,0.988-2.207,2.207-2.207h3.531c1.219,0,2.207,0.988,2.207,2.207c0,1.219-0.988,2.206-2.207,2.206\n h-3.531C38.203,24.786,37.215,23.799,37.215,22.58z\" />\n\n <path d=\"M7.944,22.58c0-1.219-0.988-2.207-2.207-2.207h-3.53C0.988,20.373,0,21.361,0,22.58c0,1.219,0.988,2.206,2.207,2.206\n h3.531C6.956,24.786,7.944,23.799,7.944,22.58z\" />\n\n <path d=\"M32.928,32.93c0.862-0.861,2.26-0.861,3.121,0l2.497,2.497c0.862,0.86,0.862,2.259,0,3.12s-2.259,0.861-3.121,0\n l-2.497-2.497C32.066,35.188,32.066,33.791,32.928,32.93z\" />\n\n <path d=\"M12.231,12.231c0.862-0.862,0.862-2.259,0-3.121L9.734,6.614c-0.862-0.862-2.259-0.862-3.121,0\n c-0.862,0.861-0.862,2.259,0,3.12l2.497,2.497C9.972,13.094,11.369,13.094,12.231,12.231z\" />\n </svg>\n }\n />\n </div>\n </div>\n <p className=\"hidden text-xs text-neutral-gray-web-500 lg:block\">\n {intl.formatMessage({ id: 'layout.footer.all-rights' })}\n </p>\n </div>\n <div className=\"hidden lg:flex\">\n <button className=\"flex items-center mr-5\" type=\"button\">\n <span className=\"mr-2 text-xs font-bold\">English</span> <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"15\" viewBox=\"0 0 15 15\">\n <path d=\"M7.5 0.0117188C3.35156 0.0117188 0.0117188 3.35156 0.0117188 7.5C0.0117188 11.6484 3.35156 14.9883 7.5 14.9883C11.6484 14.9883 14.9883 11.6484 14.9883 7.5C14.9883 3.35156 11.6484 0.0117188 7.5 0.0117188ZM1.48828 7.5C1.48828 7.04297 1.55859 6.58594 1.66406 6.16406L5.25 9.75V10.4883C5.25 11.332 5.91797 12 6.72656 12V13.4414C3.80859 13.0898 1.48828 10.5586 1.48828 7.5ZM11.9297 11.543C11.7188 10.9453 11.1562 10.4883 10.4883 10.4883H9.75V8.23828C9.75 7.85156 9.39844 7.5 8.97656 7.5H4.47656V5.98828H5.98828C6.41016 5.98828 6.72656 5.67188 6.72656 5.25V3.73828H8.23828C9.08203 3.73828 9.75 3.07031 9.75 2.26172V1.94531C11.9297 2.82422 13.5117 5.00391 13.5117 7.5C13.5117 9.04688 12.8789 10.4883 11.9297 11.543Z\" />\n</svg>\n </button>\n <div className=\"hidden border rounded-full border-neutral-ghost-white lg:block max-w-[40px] h-[40px]\">\n <IconButton\n className=\"min-w-[38px] h-[38px] flex justify-center items-center p-0\"\n color=\"transparent\"\n onClick={toggle}\n icon={mode === 'light' ? <svg width=\"12\" height=\"16\" viewBox=\"0 0 12 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.98828 1.98828C7.29297 1.98828 10 4.69531 10 8C10 11.3047 7.29297 14.0117 3.98828 14.0117C3.74219 14.0117 3.49609 13.9766 3.25 13.9414C4.69141 12.3242 5.5 10.2148 5.5 8C5.5 5.78516 4.69141 3.67578 3.25 2.05859C3.49609 2.02344 3.74219 1.98828 3.98828 1.98828ZM3.98828 0.511719C2.65234 0.511719 1.35156 0.863281 0.261719 1.49609C2.47656 2.79688 3.98828 5.22266 3.98828 8C3.98828 10.7773 2.47656 13.2031 0.261719 14.5039C1.35156 15.1367 2.65234 15.4883 3.98828 15.4883C8.13672 15.4883 11.5117 12.1484 11.5117 8C11.5117 3.85156 8.13672 0.511719 3.98828 0.511719Z\" fill=\"#292929\" />\n </svg> : \n <svg className=\"!w-4 dark:text-white\" viewBox=\"0 0 45.16 45.16\">\n <path d=\"M22.58,11.269c-6.237,0-11.311,5.075-11.311,11.312s5.074,11.312,11.311,11.312c6.236,0,11.311-5.074,11.311-11.312\n S28.816,11.269,22.58,11.269z\" />\n\n <path d=\"M22.58,7.944c-1.219,0-2.207-0.988-2.207-2.206V2.207C20.373,0.988,21.361,0,22.58,0c1.219,0,2.207,0.988,2.207,2.207\n v3.531C24.787,6.956,23.798,7.944,22.58,7.944z\" />\n\n <path d=\"M22.58,37.215c-1.219,0-2.207,0.988-2.207,2.207v3.53c0,1.22,0.988,2.208,2.207,2.208c1.219,0,2.207-0.988,2.207-2.208\n v-3.53C24.787,38.203,23.798,37.215,22.58,37.215z\" />\n\n <path d=\"M32.928,12.231c-0.861-0.862-0.861-2.259,0-3.121l2.497-2.497c0.861-0.861,2.259-0.861,3.121,0\n c0.862,0.862,0.862,2.26,0,3.121l-2.497,2.497C35.188,13.093,33.791,13.093,32.928,12.231z\" />\n\n <path d=\"M12.231,32.93c-0.862-0.863-2.259-0.863-3.121,0l-2.497,2.496c-0.861,0.861-0.862,2.26,0,3.121\n c0.862,0.861,2.26,0.861,3.121,0l2.497-2.498C13.093,35.188,13.093,33.79,12.231,32.93z\" />\n\n <path d=\"M37.215,22.58c0-1.219,0.988-2.207,2.207-2.207h3.531c1.219,0,2.207,0.988,2.207,2.207c0,1.219-0.988,2.206-2.207,2.206\n h-3.531C38.203,24.786,37.215,23.799,37.215,22.58z\" />\n\n <path d=\"M7.944,22.58c0-1.219-0.988-2.207-2.207-2.207h-3.53C0.988,20.373,0,21.361,0,22.58c0,1.219,0.988,2.206,2.207,2.206\n h3.531C6.956,24.786,7.944,23.799,7.944,22.58z\" />\n\n <path d=\"M32.928,32.93c0.862-0.861,2.26-0.861,3.121,0l2.497,2.497c0.862,0.86,0.862,2.259,0,3.12s-2.259,0.861-3.121,0\n l-2.497-2.497C32.066,35.188,32.066,33.791,32.928,32.93z\" />\n\n <path d=\"M12.231,12.231c0.862-0.862,0.862-2.259,0-3.121L9.734,6.614c-0.862-0.862-2.259-0.862-3.121,0\n c-0.862,0.861-0.862,2.259,0,3.12l2.497,2.497C9.972,13.094,11.369,13.094,12.231,12.231z\" />\n </svg>\n }\n />\n </div>\n </div>\n </div>)\n );\n};\n\nconst MobileMenu = () => {\n const intl = useIntl();\n const router = useRouter();\n const { mode, toggle } = useTheme();\n\n const { logout } = useAuthUser();\n\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const MENU_ITEMS = [\n {\n icon: <svg width={20} viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M8.82167 8.82167L14.125 5.875L11.1783 11.1783L5.875 14.125L8.82167 8.82167V8.82167Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M10.0003 18.3334C14.6028 18.3334 18.3337 14.6026 18.3337 10.0001C18.3337 5.39758 14.6028 1.66675 10.0003 1.66675C5.39783 1.66675 1.66699 5.39758 1.66699 10.0001C1.66699 14.6026 5.39783 18.3334 10.0003 18.3334Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>,\n text: 'page.settings.menu.discover',\n slug: 'discover',\n link: '/user/sign-in',\n },\n {\n icon: <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M14.1666 9.16732H15C15.221 9.16732 15.433 9.07952 15.5892 8.92324C15.7455 8.76696 15.8333 8.555 15.8333 8.33398V7.50065C15.8333 7.27964 15.7455 7.06768 15.5892 6.9114C15.433 6.75512 15.221 6.66732 15 6.66732H14.1666C13.9456 6.66732 13.7337 6.75512 13.5774 6.9114C13.4211 7.06768 13.3333 7.27964 13.3333 7.50065V8.33398C13.3333 8.555 13.4211 8.76696 13.5774 8.92324C13.7337 9.07952 13.9456 9.16732 14.1666 9.16732ZM4.99998 10.0007H9.16665C9.38766 10.0007 9.59962 9.91285 9.7559 9.75657C9.91218 9.60029 9.99998 9.38833 9.99998 9.16732C9.99998 8.9463 9.91218 8.73434 9.7559 8.57806C9.59962 8.42178 9.38766 8.33398 9.16665 8.33398H4.99998C4.77897 8.33398 4.567 8.42178 4.41072 8.57806C4.25444 8.73434 4.16665 8.9463 4.16665 9.16732C4.16665 9.38833 4.25444 9.60029 4.41072 9.75657C4.567 9.91285 4.77897 10.0007 4.99998 10.0007ZM18.3333 3.33398H1.66665C1.44563 3.33398 1.23367 3.42178 1.07739 3.57806C0.92111 3.73434 0.833313 3.9463 0.833313 4.16732V15.834C0.833313 16.055 0.92111 16.267 1.07739 16.4232C1.23367 16.5795 1.44563 16.6673 1.66665 16.6673H18.3333C18.5543 16.6673 18.7663 16.5795 18.9226 16.4232C19.0788 16.267 19.1666 16.055 19.1666 15.834V4.16732C19.1666 3.9463 19.0788 3.73434 18.9226 3.57806C18.7663 3.42178 18.5543 3.33398 18.3333 3.33398ZM17.5 15.0007H2.49998V5.00065H17.5V15.0007ZM4.99998 13.334H9.16665C9.38766 13.334 9.59962 13.2462 9.7559 13.0899C9.91218 12.9336 9.99998 12.7217 9.99998 12.5007C9.99998 12.2796 9.91218 12.0677 9.7559 11.9114C9.59962 11.7551 9.38766 11.6673 9.16665 11.6673H4.99998C4.77897 11.6673 4.567 11.7551 4.41072 11.9114C4.25444 12.0677 4.16665 12.2796 4.16665 12.5007C4.16665 12.7217 4.25444 12.9336 4.41072 13.0899C4.567 13.2462 4.77897 13.334 4.99998 13.334Z\" />\n </svg>,\n text: 'cmpt.user-menu.strategy',\n slug: 'strategy',\n link: '#',\n },\n {\n icon: <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M5.83333 13.3327C6.16485 13.3327 6.4828 13.201 6.71722 12.9666C6.95164 12.7321 7.08333 12.4142 7.08333 12.0827C7.0874 12.0411 7.0874 11.9993 7.08333 11.9577L9.40833 9.63268H9.6H9.79167L11.1333 10.9743C11.1333 10.9743 11.1333 11.016 11.1333 11.041C11.1333 11.3725 11.265 11.6905 11.4994 11.9249C11.7339 12.1593 12.0518 12.291 12.3833 12.291C12.7149 12.291 13.0328 12.1593 13.2672 11.9249C13.5016 11.6905 13.6333 11.3725 13.6333 11.041V10.9743L16.6667 7.91602C16.9139 7.91602 17.1556 7.84271 17.3611 7.70535C17.5667 7.568 17.7269 7.37278 17.8215 7.14437C17.9161 6.91596 17.9409 6.66463 17.8926 6.42215C17.8444 6.17968 17.7254 5.95695 17.5505 5.78213C17.3757 5.60732 17.153 5.48827 16.9105 5.44003C16.6681 5.3918 16.4167 5.41656 16.1883 5.51117C15.9599 5.60578 15.7647 5.76599 15.6273 5.97155C15.49 6.17711 15.4167 6.41879 15.4167 6.66602C15.4126 6.70758 15.4126 6.74945 15.4167 6.79102L12.4083 9.79935H12.275L10.8333 8.33268C10.8333 8.00116 10.7016 7.68322 10.4672 7.4488C10.2328 7.21438 9.91485 7.08268 9.58333 7.08268C9.25181 7.08268 8.93387 7.21438 8.69945 7.4488C8.46503 7.68322 8.33333 8.00116 8.33333 8.33268L5.83333 10.8327C5.50181 10.8327 5.18387 10.9644 4.94945 11.1988C4.71503 11.4332 4.58333 11.7512 4.58333 12.0827C4.58333 12.4142 4.71503 12.7321 4.94945 12.9666C5.18387 13.201 5.50181 13.3327 5.83333 13.3327V13.3327ZM17.0833 16.666H2.91667V2.49935C2.91667 2.27834 2.82887 2.06637 2.67259 1.91009C2.51631 1.75381 2.30435 1.66602 2.08333 1.66602C1.86232 1.66602 1.65036 1.75381 1.49408 1.91009C1.3378 2.06637 1.25 2.27834 1.25 2.49935V17.4993C1.25 17.7204 1.3378 17.9323 1.49408 18.0886C1.65036 18.2449 1.86232 18.3327 2.08333 18.3327H17.0833C17.3043 18.3327 17.5163 18.2449 17.6726 18.0886C17.8289 17.9323 17.9167 17.7204 17.9167 17.4993C17.9167 17.2783 17.8289 17.0664 17.6726 16.9101C17.5163 16.7538 17.3043 16.666 17.0833 16.666Z\" />\n </svg>,\n text: 'cmpt.user-menu.brokerage',\n slug: 'brokerage',\n link: '#',\n },\n {\n icon: <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13.0917 10.5917C13.9087 9.94891 14.505 9.06746 14.7977 8.06997C15.0904 7.07249 15.0649 6.00858 14.7248 5.02625C14.3847 4.04391 13.7469 3.19202 12.9001 2.58907C12.0532 1.98612 11.0395 1.66211 10 1.66211C8.96045 1.66211 7.94676 1.98612 7.09994 2.58907C6.25312 3.19202 5.61528 4.04391 5.27517 5.02625C4.93506 6.00858 4.90959 7.07249 5.2023 8.06997C5.49501 9.06746 6.09134 9.94891 6.90833 10.5917C5.5084 11.1526 4.2869 12.0828 3.37407 13.2833C2.46125 14.4838 1.8913 15.9094 1.725 17.4084C1.71296 17.5178 1.72259 17.6285 1.75335 17.7342C1.78411 17.8399 1.83539 17.9386 1.90426 18.0245C2.04335 18.1979 2.24565 18.309 2.46666 18.3334C2.68768 18.3577 2.9093 18.2932 3.08277 18.1541C3.25624 18.015 3.36735 17.8127 3.39166 17.5917C3.57465 15.9627 4.3514 14.4582 5.57351 13.3657C6.79562 12.2732 8.37741 11.6692 10.0167 11.6692C11.6559 11.6692 13.2377 12.2732 14.4598 13.3657C15.6819 14.4582 16.4587 15.9627 16.6417 17.5917C16.6643 17.7965 16.762 17.9856 16.9159 18.1225C17.0698 18.2595 17.269 18.3346 17.475 18.3334H17.5667C17.7851 18.3082 17.9848 18.1978 18.1221 18.0261C18.2595 17.8544 18.3234 17.6353 18.3 17.4167C18.1329 15.9135 17.5599 14.4842 16.6424 13.2819C15.7249 12.0795 14.4974 11.1496 13.0917 10.5917ZM10 10C9.34073 10 8.69626 9.80453 8.1481 9.43825C7.59993 9.07198 7.17269 8.55139 6.9204 7.9423C6.66811 7.33321 6.6021 6.66299 6.73071 6.01639C6.85933 5.36979 7.1768 4.77584 7.64297 4.30967C8.10915 3.84349 8.70309 3.52602 9.3497 3.39741C9.9963 3.26879 10.6665 3.3348 11.2756 3.58709C11.8847 3.83938 12.4053 4.26662 12.7716 4.81479C13.1378 5.36295 13.3333 6.00742 13.3333 6.66669C13.3333 7.55074 12.9821 8.39859 12.357 9.02371C11.7319 9.64883 10.8841 10 10 10Z\" />\n </svg>,\n text: 'page.settings.menu.settings',\n slug: 'user',\n link: '/settings/user',\n },\n {\n icon: <svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M2.5 10H17.5\" stroke=\"currentColor\" strokeWidth=\"1.66667\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M2.5 5H17.5\" stroke=\"currentColor\" strokeWidth=\"1.66667\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M2.5 15H17.5\" stroke=\"currentColor\" strokeWidth=\"1.66667\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n </svg>,\n text: 'cmpt.user-menu.more',\n slug: 'support',\n onClick: () => {\n setIsMenuOpen(true);\n },\n },\n ];\n\n return (<>\n <div className=\"fixed bottom-0 left-0 z-10 flex w-full py-4 bg-white border-t border-black-divider dark:border-black-dark justify-evenly lg:hidden dark:bg-black-background\">\n {MENU_ITEMS.map((item) => {\n const isActive = item.link === router.asPath;\n return item.onClick ? (\n <button\n className={clsx('flex flex-col', {\n 'text-blue-ribbon': isActive,\n 'text-black dark:text-white': !isActive,\n })}\n onClick={item.onClick}\n key={item.text}\n type=\"button\"\n >\n <div className=\"flex justify-center w-full mb-2\">{item.icon}</div>\n <span className=\"text-xs font-medium text-center \">\n {intl.formatMessage({ id: item.text as any })}\n </span>\n </button>\n ) : (\n <Link\n key={item.text}\n href={item.link}\n className={clsx('flex flex-col', {\n 'text-blue-ribbon': isActive,\n 'text-black dark:text-white': !isActive,\n })}>\n\n <div className=\"flex justify-center w-full mb-2\">{item.icon}</div>\n <span className=\"text-xs font-medium text-center\">\n {intl.formatMessage({ id: item.text as any })}\n </span>\n\n </Link>\n );\n })}\n </div>\n <Modal\n wrapperClassName=\"h-full\"\n panelClassName=\"h-full w-full\"\n dialogClassName=\"z-50\"\n open={isMenuOpen}\n onClose={() => {\n setIsMenuOpen(false);\n }}\n >\n <div className=\"px-6 mt-11\">\n <button\n className=\"block mb-10 ml-auto dark:text-white\"\n onClick={() => setIsMenuOpen(false)}\n type=\"button\"\n >\n <svg width={20} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </button>\n\n <Link\n href={process.env.NEXT_PUBLIC_API_DOCS_URL}\n prefetch={false}\n className={clsx(styles.menu_item)}>\n\n <div className=\"flex items-center \">\n <svg className=\"mr-4 text-neutral-manatee dark:text-neutral-manatee keep-color\" width=\"18\" height=\"23\" viewBox=\"0 0 18 23\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M17.25 9.79785V19.6875C17.25 20.334 16.9932 20.954 16.5361 21.4111C16.079 21.8682 15.459 22.125 14.8125 22.125H3.4375C2.79103 22.125 2.17105 21.8682 1.71393 21.4111C1.25681 20.954 1 20.334 1 19.6875V3.4375C1 2.79103 1.25681 2.17105 1.71393 1.71393C2.17105 1.25681 2.79103 1 3.4375 1H8.45215C8.88298 1.00007 9.29614 1.17121 9.60082 1.47582L16.7742 8.64918C17.0788 8.95386 17.2499 9.36702 17.25 9.79785Z\" stroke=\"#9C9EAD\" strokeWidth=\"1.5\" strokeLinejoin=\"round\" fill=\"transparent\" />\n <path d=\"M5.0625 17.25H13.1875M9.125 1.40625V7.5C9.125 7.93098 9.29621 8.3443 9.60095 8.64905C9.9057 8.95379 10.319 9.125 10.75 9.125H16.8438L9.125 1.40625ZM5.0625 13.1875H13.1875H5.0625Z\" stroke=\"#9C9EAD\" strokeWidth=\"1.5\" strokeLinecap=\"round\" strokeLinejoin=\"round\" fill=\"transparent\" />\n </svg>\n <p className={clsx(styles.menu_item_text)}>\n {intl.formatMessage({ id: 'cmpt.user-menu.api' })}\n </p>\n </div>\n <svg className=\"dark:text-white\" width={16} xmlns=\"http://www.w3.org/2000/svg\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fillRule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\" />\n </svg>\n\n </Link>\n\n <Link href=\"/user/\" prefetch={false} className={clsx(styles.menu_item)}>\n\n <div className=\"flex items-center \">\n <svg width={18}\n className=\"mr-4 text-neutral-manatee dark:text-neutral-manatee\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16.6667 10.9833V9.16667C16.6667 7.39856 15.9643 5.70286 14.7141 4.45262C13.4638 3.20238 11.7681 2.5 10 2.5C8.23191 2.5 6.53622 3.20238 5.28598 4.45262C4.03573 5.70286 3.33335 7.39856 3.33335 9.16667V10.9833C2.84706 11.1553 2.42585 11.4734 2.12747 11.8941C1.82909 12.3148 1.66814 12.8175 1.66669 13.3333V15C1.66669 15.663 1.93008 16.2989 2.39892 16.7678C2.86776 17.2366 3.50365 17.5 4.16669 17.5H6.66669C6.8877 17.5 7.09966 17.4122 7.25594 17.2559C7.41222 17.0996 7.50002 16.8877 7.50002 16.6667V11.6667C7.50002 11.4457 7.41222 11.2337 7.25594 11.0774C7.09966 10.9211 6.8877 10.8333 6.66669 10.8333H5.00002V9.16667C5.00002 7.84058 5.5268 6.56881 6.46449 5.63113C7.40217 4.69345 8.67394 4.16667 10 4.16667C11.3261 4.16667 12.5979 4.69345 13.5356 5.63113C14.4732 6.56881 15 7.84058 15 9.16667V10.8333H13.3334C13.1123 10.8333 12.9004 10.9211 12.7441 11.0774C12.5878 11.2337 12.5 11.4457 12.5 11.6667V16.6667C12.5 16.8877 12.5878 17.0996 12.7441 17.2559C12.9004 17.4122 13.1123 17.5 13.3334 17.5H15.8334C16.4964 17.5 17.1323 17.2366 17.6011 16.7678C18.07 16.2989 18.3334 15.663 18.3334 15V13.3333C18.3319 12.8175 18.171 12.3148 17.8726 11.8941C17.5742 11.4734 17.153 11.1553 16.6667 10.9833ZM5.83335 12.5V15.8333H4.16669C3.94567 15.8333 3.73371 15.7455 3.57743 15.5893C3.42115 15.433 3.33335 15.221 3.33335 15V13.3333C3.33335 13.1123 3.42115 12.9004 3.57743 12.7441C3.73371 12.5878 3.94567 12.5 4.16669 12.5H5.83335ZM16.6667 15C16.6667 15.221 16.5789 15.433 16.4226 15.5893C16.2663 15.7455 16.0544 15.8333 15.8334 15.8333H14.1667V12.5H15.8334C16.0544 12.5 16.2663 12.5878 16.4226 12.7441C16.5789 12.9004 16.6667 13.1123 16.6667 13.3333V15Z\" />\n </svg>\n <p className={clsx(styles.menu_item_text)}>\n {intl.formatMessage({ id: 'cmpt.user-menu.support' })}\n </p>\n </div>\n <svg className=\"dark:text-white\" width={16} xmlns=\"http://www.w3.org/2000/svg\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fillRule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\" />\n </svg>\n\n </Link>\n\n <button\n type=\"button\"\n onClick={() => {\n logout();\n router.push('/user/sign-in');\n }}\n className={clsx(styles.menu_item)}\n >\n <div className=\"flex items-center text-red-500 dark:text-red-500\">\n <svg className=\"mr-4 stroke-red-500 keep-color\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M17.4375 14.62L19.9975 12.06L17.4375 9.5\" fill=\"currentColor\" />\n <path d=\"M17.4375 14.62L19.9975 12.06L17.4375 9.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M9.75781 12.0601H19.9278\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M11.7578 20C7.33781 20 3.75781 17 3.75781 12C3.75781 7 7.33781 4 11.7578 4\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n <span className={clsx(styles.menu_item_text, 'text-red-500 dark:text-red-500')}>\n {intl.formatMessage({ id: 'general.logout' })}\n </span>\n </div>\n </button>\n\n <div className={clsx('justify-between items container-default !px-0 mt-14')}>\n <div className=\"flex items-center justify-between mb-9\">\n <button className=\"flex items-center\" type=\"button\">\n <span className=\"mr-2 text-xs font-bold\">English</span> <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"15\" viewBox=\"0 0 15 15\">\n <path d=\"M7.5 0.0117188C3.35156 0.0117188 0.0117188 3.35156 0.0117188 7.5C0.0117188 11.6484 3.35156 14.9883 7.5 14.9883C11.6484 14.9883 14.9883 11.6484 14.9883 7.5C14.9883 3.35156 11.6484 0.0117188 7.5 0.0117188ZM1.48828 7.5C1.48828 7.04297 1.55859 6.58594 1.66406 6.16406L5.25 9.75V10.4883C5.25 11.332 5.91797 12 6.72656 12V13.4414C3.80859 13.0898 1.48828 10.5586 1.48828 7.5ZM11.9297 11.543C11.7188 10.9453 11.1562 10.4883 10.4883 10.4883H9.75V8.23828C9.75 7.85156 9.39844 7.5 8.97656 7.5H4.47656V5.98828H5.98828C6.41016 5.98828 6.72656 5.67188 6.72656 5.25V3.73828H8.23828C9.08203 3.73828 9.75 3.07031 9.75 2.26172V1.94531C11.9297 2.82422 13.5117 5.00391 13.5117 7.5C13.5117 9.04688 12.8789 10.4883 11.9297 11.543Z\" />\n</svg>\n </button>\n <div className=\"border rounded-full border-neutral-ghost-white max-w-[40px] h-[40px]\">\n <IconButton\n className=\"min-w-[38px] h-[38px] flex justify-center items-center p-0\"\n color=\"transparent\"\n onClick={toggle}\n icon={mode === 'light' ? <svg width=\"12\" height=\"16\" viewBox=\"0 0 12 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.98828 1.98828C7.29297 1.98828 10 4.69531 10 8C10 11.3047 7.29297 14.0117 3.98828 14.0117C3.74219 14.0117 3.49609 13.9766 3.25 13.9414C4.69141 12.3242 5.5 10.2148 5.5 8C5.5 5.78516 4.69141 3.67578 3.25 2.05859C3.49609 2.02344 3.74219 1.98828 3.98828 1.98828ZM3.98828 0.511719C2.65234 0.511719 1.35156 0.863281 0.261719 1.49609C2.47656 2.79688 3.98828 5.22266 3.98828 8C3.98828 10.7773 2.47656 13.2031 0.261719 14.5039C1.35156 15.1367 2.65234 15.4883 3.98828 15.4883C8.13672 15.4883 11.5117 12.1484 11.5117 8C11.5117 3.85156 8.13672 0.511719 3.98828 0.511719Z\" fill=\"#292929\" />\n </svg> : \n <svg className=\"!w-4 text-white\" viewBox=\"0 0 45.16 45.16\">\n <path d=\"M22.58,11.269c-6.237,0-11.311,5.075-11.311,11.312s5.074,11.312,11.311,11.312c6.236,0,11.311-5.074,11.311-11.312\n S28.816,11.269,22.58,11.269z\" />\n\n <path d=\"M22.58,7.944c-1.219,0-2.207-0.988-2.207-2.206V2.207C20.373,0.988,21.361,0,22.58,0c1.219,0,2.207,0.988,2.207,2.207\n v3.531C24.787,6.956,23.798,7.944,22.58,7.944z\" />\n\n <path d=\"M22.58,37.215c-1.219,0-2.207,0.988-2.207,2.207v3.53c0,1.22,0.988,2.208,2.207,2.208c1.219,0,2.207-0.988,2.207-2.208\n v-3.53C24.787,38.203,23.798,37.215,22.58,37.215z\" />\n\n <path d=\"M32.928,12.231c-0.861-0.862-0.861-2.259,0-3.121l2.497-2.497c0.861-0.861,2.259-0.861,3.121,0\n c0.862,0.862,0.862,2.26,0,3.121l-2.497,2.497C35.188,13.093,33.791,13.093,32.928,12.231z\" />\n\n <path d=\"M12.231,32.93c-0.862-0.863-2.259-0.863-3.121,0l-2.497,2.496c-0.861,0.861-0.862,2.26,0,3.121\n c0.862,0.861,2.26,0.861,3.121,0l2.497-2.498C13.093,35.188,13.093,33.79,12.231,32.93z\" />\n\n <path d=\"M37.215,22.58c0-1.219,0.988-2.207,2.207-2.207h3.531c1.219,0,2.207,0.988,2.207,2.207c0,1.219-0.988,2.206-2.207,2.206\n h-3.531C38.203,24.786,37.215,23.799,37.215,22.58z\" />\n\n <path d=\"M7.944,22.58c0-1.219-0.988-2.207-2.207-2.207h-3.53C0.988,20.373,0,21.361,0,22.58c0,1.219,0.988,2.206,2.207,2.206\n h3.531C6.956,24.786,7.944,23.799,7.944,22.58z\" />\n\n <path d=\"M32.928,32.93c0.862-0.861,2.26-0.861,3.121,0l2.497,2.497c0.862,0.86,0.862,2.259,0,3.12s-2.259,0.861-3.121,0\n l-2.497-2.497C32.066,35.188,32.066,33.791,32.928,32.93z\" />\n\n <path d=\"M12.231,12.231c0.862-0.862,0.862-2.259,0-3.121L9.734,6.614c-0.862-0.862-2.259-0.862-3.121,0\n c-0.862,0.861-0.862,2.259,0,3.12l2.497,2.497C9.972,13.094,11.369,13.094,12.231,12.231z\" />\n </svg>\n }\n />\n </div>\n </div>\n <div className=\"flex flex-col items-start justify-center gap-4 lg:flex-row lg:items-center\">\n <nav className=\"flex gap-[30px]\">\n {customNavs.map((nav) => (\n <Link\n href={nav.link!}\n target=\"_blank\"\n rel=\"noreferrer\"\n key={nav.label}\n className=\"text-xs font-bold text-default\">\n {nav.label}\n </Link>\n ))}\n </nav>\n <p className=\"text-xs text-neutral-gray-web-500\">\n {intl.formatMessage({ id: 'layout.footer.all-rights' })}\n </p>\n </div>\n </div>\n </div>\n </Modal>\n </>);\n};\n\ninterface FooterProps {\n className?: string;\n}\n\nexport const Footer = ({ className }: FooterProps) => {\n const { signedIn } = useAuthUser();\n const isMounted = useIsMounted();\n return (\n <footer className={clsx(styles.base)}>\n {signedIn && isMounted && <MobileMenu />}\n {isMounted && <SmallFooter className={className} />}\n </footer>\n );\n};\n\nconst CustomMobileMenu = () => {\n const intl = useIntl();\n\n const { logout } = useAuthUser();\n\n const [isMenuOpen, setIsMenuOpen] = useState(false);\n const { mode, toggle } = useTheme();\n\n return (<>\n <Modal\n wrapperClassName=\"h-full\"\n panelClassName=\"h-full w-full\"\n dialogClassName=\"z-50\"\n open={isMenuOpen}\n onClose={() => {\n setIsMenuOpen(false);\n }}\n >\n <div className=\"px-6 mt-11\">\n <button\n className=\"block mb-10 ml-auto dark:text-white\"\n onClick={() => setIsMenuOpen(false)}\n type=\"button\"\n >\n <svg width={20} className=\"keep-color\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n </button>\n\n <Link href=\"/user\" prefetch={false} className={clsx(styles.menu_item)}>\n\n <div className=\"flex items-center \">\n <svg width={18}\n className=\"mr-4 text-neutral-manatee dark:text-neutral-manatee\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M16.6667 10.9833V9.16667C16.6667 7.39856 15.9643 5.70286 14.7141 4.45262C13.4638 3.20238 11.7681 2.5 10 2.5C8.23191 2.5 6.53622 3.20238 5.28598 4.45262C4.03573 5.70286 3.33335 7.39856 3.33335 9.16667V10.9833C2.84706 11.1553 2.42585 11.4734 2.12747 11.8941C1.82909 12.3148 1.66814 12.8175 1.66669 13.3333V15C1.66669 15.663 1.93008 16.2989 2.39892 16.7678C2.86776 17.2366 3.50365 17.5 4.16669 17.5H6.66669C6.8877 17.5 7.09966 17.4122 7.25594 17.2559C7.41222 17.0996 7.50002 16.8877 7.50002 16.6667V11.6667C7.50002 11.4457 7.41222 11.2337 7.25594 11.0774C7.09966 10.9211 6.8877 10.8333 6.66669 10.8333H5.00002V9.16667C5.00002 7.84058 5.5268 6.56881 6.46449 5.63113C7.40217 4.69345 8.67394 4.16667 10 4.16667C11.3261 4.16667 12.5979 4.69345 13.5356 5.63113C14.4732 6.56881 15 7.84058 15 9.16667V10.8333H13.3334C13.1123 10.8333 12.9004 10.9211 12.7441 11.0774C12.5878 11.2337 12.5 11.4457 12.5 11.6667V16.6667C12.5 16.8877 12.5878 17.0996 12.7441 17.2559C12.9004 17.4122 13.1123 17.5 13.3334 17.5H15.8334C16.4964 17.5 17.1323 17.2366 17.6011 16.7678C18.07 16.2989 18.3334 15.663 18.3334 15V13.3333C18.3319 12.8175 18.171 12.3148 17.8726 11.8941C17.5742 11.4734 17.153 11.1553 16.6667 10.9833ZM5.83335 12.5V15.8333H4.16669C3.94567 15.8333 3.73371 15.7455 3.57743 15.5893C3.42115 15.433 3.33335 15.221 3.33335 15V13.3333C3.33335 13.1123 3.42115 12.9004 3.57743 12.7441C3.73371 12.5878 3.94567 12.5 4.16669 12.5H5.83335ZM16.6667 15C16.6667 15.221 16.5789 15.433 16.4226 15.5893C16.2663 15.7455 16.0544 15.8333 15.8334 15.8333H14.1667V12.5H15.8334C16.0544 12.5 16.2663 12.5878 16.4226 12.7441C16.5789 12.9004 16.6667 13.1123 16.6667 13.3333V15Z\" />\n </svg>\n <p className={clsx(styles.menu_item_text)}>\n {intl.formatMessage({ id: 'cmpt.user-menu.support' })}\n </p>\n </div>\n <svg className=\"dark:text-white\" width={16} xmlns=\"http://www.w3.org/2000/svg\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\">\n <path fillRule=\"evenodd\" d=\"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z\" />\n </svg>\n\n </Link>\n\n <button\n type=\"button\"\n onClick={() => {\n logout();\n }}\n className={clsx(styles.menu_item)}\n >\n <div className=\"flex items-center \">\n <svg className=\"mr-4 text-neutral-manatee dark:text-white keep-color\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M17.4375 14.62L19.9975 12.06L17.4375 9.5\" fill=\"currentColor\" />\n <path d=\"M17.4375 14.62L19.9975 12.06L17.4375 9.5\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M9.75781 12.0601H19.9278\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M11.7578 20C7.33781 20 3.75781 17 3.75781 12C3.75781 7 7.33781 4 11.7578 4\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-miterlimit=\"10\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n <span className={clsx(styles.menu_item_text)}>\n {intl.formatMessage({ id: 'general.logout' })}\n </span>\n </div>\n </button>\n\n <div className={clsx('justify-between items container-default !px-0 mt-14')}>\n <div className=\"flex items-center justify-between mb-9\">\n <button className=\"flex items-center\" type=\"button\">\n <span className=\"mr-2 text-xs font-bold\">English</span> <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"15\" viewBox=\"0 0 15 15\">\n <path d=\"M7.5 0.0117188C3.35156 0.0117188 0.0117188 3.35156 0.0117188 7.5C0.0117188 11.6484 3.35156 14.9883 7.5 14.9883C11.6484 14.9883 14.9883 11.6484 14.9883 7.5C14.9883 3.35156 11.6484 0.0117188 7.5 0.0117188ZM1.48828 7.5C1.48828 7.04297 1.55859 6.58594 1.66406 6.16406L5.25 9.75V10.4883C5.25 11.332 5.91797 12 6.72656 12V13.4414C3.80859 13.0898 1.48828 10.5586 1.48828 7.5ZM11.9297 11.543C11.7188 10.9453 11.1562 10.4883 10.4883 10.4883H9.75V8.23828C9.75 7.85156 9.39844 7.5 8.97656 7.5H4.47656V5.98828H5.98828C6.41016 5.98828 6.72656 5.67188 6.72656 5.25V3.73828H8.23828C9.08203 3.73828 9.75 3.07031 9.75 2.26172V1.94531C11.9297 2.82422 13.5117 5.00391 13.5117 7.5C13.5117 9.04688 12.8789 10.4883 11.9297 11.543Z\" />\n</svg>\n </button>\n <div className=\"border rounded-full border-neutral-ghost-white max-w-[40px] h-[40px]\">\n <IconButton\n className=\"min-w-[38px] h-[38px] flex justify-center items-center p-0\"\n color=\"transparent\"\n onClick={toggle}\n icon={mode === 'light' ? <svg width=\"12\" height=\"16\" viewBox=\"0 0 12 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.98828 1.98828C7.29297 1.98828 10 4.69531 10 8C10 11.3047 7.29297 14.0117 3.98828 14.0117C3.74219 14.0117 3.49609 13.9766 3.25 13.9414C4.69141 12.3242 5.5 10.2148 5.5 8C5.5 5.78516 4.69141 3.67578 3.25 2.05859C3.49609 2.02344 3.74219 1.98828 3.98828 1.98828ZM3.98828 0.511719C2.65234 0.511719 1.35156 0.863281 0.261719 1.49609C2.47656 2.79688 3.98828 5.22266 3.98828 8C3.98828 10.7773 2.47656 13.2031 0.261719 14.5039C1.35156 15.1367 2.65234 15.4883 3.98828 15.4883C8.13672 15.4883 11.5117 12.1484 11.5117 8C11.5117 3.85156 8.13672 0.511719 3.98828 0.511719Z\" fill=\"#292929\" />\n </svg> : \n <svg className=\"!w-4 text-white\" viewBox=\"0 0 45.16 45.16\">\n <path d=\"M22.58,11.269c-6.237,0-11.311,5.075-11.311,11.312s5.074,11.312,11.311,11.312c6.236,0,11.311-5.074,11.311-11.312\n S28.816,11.269,22.58,11.269z\" />\n\n <path d=\"M22.58,7.944c-1.219,0-2.207-0.988-2.207-2.206V2.207C20.373,0.988,21.361,0,22.58,0c1.219,0,2.207,0.988,2.207,2.207\n v3.531C24.787,6.956,23.798,7.944,22.58,7.944z\" />\n\n <path d=\"M22.58,37.215c-1.219,0-2.207,0.988-2.207,2.207v3.53c0,1.22,0.988,2.208,2.207,2.208c1.219,0,2.207-0.988,2.207-2.208\n v-3.53C24.787,38.203,23.798,37.215,22.58,37.215z\" />\n\n <path d=\"M32.928,12.231c-0.861-0.862-0.861-2.259,0-3.121l2.497-2.497c0.861-0.861,2.259-0.861,3.121,0\n c0.862,0.862,0.862,2.26,0,3.121l-2.497,2.497C35.188,13.093,33.791,13.093,32.928,12.231z\" />\n\n <path d=\"M12.231,32.93c-0.862-0.863-2.259-0.863-3.121,0l-2.497,2.496c-0.861,0.861-0.862,2.26,0,3.121\n c0.862,0.861,2.26,0.861,3.121,0l2.497-2.498C13.093,35.188,13.093,33.79,12.231,32.93z\" />\n\n <path d=\"M37.215,22.58c0-1.219,0.988-2.207,2.207-2.207h3.531c1.219,0,2.207,0.988,2.207,2.207c0,1.219-0.988,2.206-2.207,2.206\n h-3.531C38.203,24.786,37.215,23.799,37.215,22.58z\" />\n\n <path d=\"M7.944,22.58c0-1.219-0.988-2.207-2.207-2.207h-3.53C0.988,20.373,0,21.361,0,22.58c0,1.219,0.988,2.206,2.207,2.206\n h3.531C6.956,24.786,7.944,23.799,7.944,22.58z\" />\n\n <path d=\"M32.928,32.93c0.862-0.861,2.26-0.861,3.121,0l2.497,2.497c0.862,0.86,0.862,2.259,0,3.12s-2.259,0.861-3.121,0\n l-2.497-2.497C32.066,35.188,32.066,33.791,32.928,32.93z\" />\n\n <path d=\"M12.231,12.231c0.862-0.862,0.862-2.259,0-3.121L9.734,6.614c-0.862-0.862-2.259-0.862-3.121,0\n c-0.862,0.861-0.862,2.259,0,3.12l2.497,2.497C9.972,13.094,11.369,13.094,12.231,12.231z\" />\n </svg>\n }\n />\n </div>\n </div>\n <div className=\"flex flex-col items-start justify-center gap-4 lg:flex-row lg:items-center\">\n <nav className=\"flex gap-[30px]\">\n {customNavs.map((nav) => (\n <Link\n href={nav.link!}\n target=\"_blank\"\n rel=\"noreferrer\"\n key={nav.label}\n className=\"text-xs font-bold text-default\">\n {nav.label}\n </Link>\n ))}\n </nav>\n <p className=\"text-xs text-neutral-gray-web-500\">\n © My Home Pathway, 2022. All rights reserved.\n </p>\n </div>\n </div>\n </div>\n </Modal>\n </>);\n};\n\nexport const CustomSmallFooter = ({ className = 'container-default' }: SmallFooterProps) => {\n const { mode, toggle } = useTheme();\n return (\n (<div className={clsx('flex justify-between items', className)}>\n <div className=\"flex flex-col items-start justify-center w-full gap-4 lg:justify-start lg:flex-row lg:items-center\">\n <div className=\"flex lg:items-center justify-between w-full lg:w-[max-content] lg:mr-3\">\n <div>\n <nav className=\"flex gap-[30px] w-full\">\n {customNavs.map((nav) => (\n <Link\n href={nav.link!}\n target=\"_blank\"\n rel=\"noreferrer\"\n key={nav.label}\n className=\"text-xs font-bold text-default\">\n {nav.label}\n </Link>\n ))}\n </nav>\n <p className=\"mt-4 text-xs text-neutral-gray-web-500 lg:hidden\">\n © My Home Pathway, 2022. All rights reserved.\n </p>\n </div>\n <div className=\"border rounded-full max-w-[40px] h-[40px] border-neutral-ghost-white lg:hidden\">\n <IconButton\n className=\"min-w-[38px] h-[38px] flex justify-center items-center !p-0\"\n color=\"transparent\"\n onClick={toggle}\n icon={mode === 'light' ? <svg width=\"12\" height=\"16\" viewBox=\"0 0 12 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.98828 1.98828C7.29297 1.98828 10 4.69531 10 8C10 11.3047 7.29297 14.0117 3.98828 14.0117C3.74219 14.0117 3.49609 13.9766 3.25 13.9414C4.69141 12.3242 5.5 10.2148 5.5 8C5.5 5.78516 4.69141 3.67578 3.25 2.05859C3.49609 2.02344 3.74219 1.98828 3.98828 1.98828ZM3.98828 0.511719C2.65234 0.511719 1.35156 0.863281 0.261719 1.49609C2.47656 2.79688 3.98828 5.22266 3.98828 8C3.98828 10.7773 2.47656 13.2031 0.261719 14.5039C1.35156 15.1367 2.65234 15.4883 3.98828 15.4883C8.13672 15.4883 11.5117 12.1484 11.5117 8C11.5117 3.85156 8.13672 0.511719 3.98828 0.511719Z\" fill=\"#292929\" />\n </svg> :\n <svg className=\"!w-4 dark:text-white\" viewBox=\"0 0 45.16 45.16\">\n <path d=\"M22.58,11.269c-6.237,0-11.311,5.075-11.311,11.312s5.074,11.312,11.311,11.312c6.236,0,11.311-5.074,11.311-11.312\n S28.816,11.269,22.58,11.269z\" />\n\n <path d=\"M22.58,7.944c-1.219,0-2.207-0.988-2.207-2.206V2.207C20.373,0.988,21.361,0,22.58,0c1.219,0,2.207,0.988,2.207,2.207\n v3.531C24.787,6.956,23.798,7.944,22.58,7.944z\" />\n\n <path d=\"M22.58,37.215c-1.219,0-2.207,0.988-2.207,2.207v3.53c0,1.22,0.988,2.208,2.207,2.208c1.219,0,2.207-0.988,2.207-2.208\n v-3.53C24.787,38.203,23.798,37.215,22.58,37.215z\" />\n\n <path d=\"M32.928,12.231c-0.861-0.862-0.861-2.259,0-3.121l2.497-2.497c0.861-0.861,2.259-0.861,3.121,0\n c0.862,0.862,0.862,2.26,0,3.121l-2.497,2.497C35.188,13.093,33.791,13.093,32.928,12.231z\" />\n\n <path d=\"M12.231,32.93c-0.862-0.863-2.259-0.863-3.121,0l-2.497,2.496c-0.861,0.861-0.862,2.26,0,3.121\n c0.862,0.861,2.26,0.861,3.121,0l2.497-2.498C13.093,35.188,13.093,33.79,12.231,32.93z\" />\n\n <path d=\"M37.215,22.58c0-1.219,0.988-2.207,2.207-2.207h3.531c1.219,0,2.207,0.988,2.207,2.207c0,1.219-0.988,2.206-2.207,2.206\n h-3.531C38.203,24.786,37.215,23.799,37.215,22.58z\" />\n\n <path d=\"M7.944,22.58c0-1.219-0.988-2.207-2.207-2.207h-3.53C0.988,20.373,0,21.361,0,22.58c0,1.219,0.988,2.206,2.207,2.206\n h3.531C6.956,24.786,7.944,23.799,7.944,22.58z\" />\n\n <path d=\"M32.928,32.93c0.862-0.861,2.26-0.861,3.121,0l2.497,2.497c0.862,0.86,0.862,2.259,0,3.12s-2.259,0.861-3.121,0\n l-2.497-2.497C32.066,35.188,32.066,33.791,32.928,32.93z\" />\n\n <path d=\"M12.231,12.231c0.862-0.862,0.862-2.259,0-3.121L9.734,6.614c-0.862-0.862-2.259-0.862-3.121,0\n c-0.862,0.861-0.862,2.259,0,3.12l2.497,2.497C9.972,13.094,11.369,13.094,12.231,12.231z\" />\n </svg>\n }\n />\n </div>\n </div>\n <p className=\"hidden text-xs text-neutral-gray-web-500 lg:block\">\n © My Home Pathway, 2022. All rights reserved.\n </p>\n </div>\n <div className=\"hidden lg:flex\">\n <button className=\"flex items-center mr-5\" type=\"button\">\n <span className=\"mr-2 text-xs font-bold\">English</span> <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"15\" viewBox=\"0 0 15 15\">\n <path d=\"M7.5 0.0117188C3.35156 0.0117188 0.0117188 3.35156 0.0117188 7.5C0.0117188 11.6484 3.35156 14.9883 7.5 14.9883C11.6484 14.9883 14.9883 11.6484 14.9883 7.5C14.9883 3.35156 11.6484 0.0117188 7.5 0.0117188ZM1.48828 7.5C1.48828 7.04297 1.55859 6.58594 1.66406 6.16406L5.25 9.75V10.4883C5.25 11.332 5.91797 12 6.72656 12V13.4414C3.80859 13.0898 1.48828 10.5586 1.48828 7.5ZM11.9297 11.543C11.7188 10.9453 11.1562 10.4883 10.4883 10.4883H9.75V8.23828C9.75 7.85156 9.39844 7.5 8.97656 7.5H4.47656V5.98828H5.98828C6.41016 5.98828 6.72656 5.67188 6.72656 5.25V3.73828H8.23828C9.08203 3.73828 9.75 3.07031 9.75 2.26172V1.94531C11.9297 2.82422 13.5117 5.00391 13.5117 7.5C13.5117 9.04688 12.8789 10.4883 11.9297 11.543Z\" />\n</svg>\n </button>\n <div className=\"hidden border rounded-full border-neutral-ghost-white lg:block max-w-[40px] h-[40px]\">\n <IconButton\n className=\"min-w-[38px] h-[38px] flex justify-center items-center p-0\"\n color=\"transparent\"\n onClick={toggle}\n icon={mode === 'light' ? <svg width=\"12\" height=\"16\" viewBox=\"0 0 12 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M3.98828 1.98828C7.29297 1.98828 10 4.69531 10 8C10 11.3047 7.29297 14.0117 3.98828 14.0117C3.74219 14.0117 3.49609 13.9766 3.25 13.9414C4.69141 12.3242 5.5 10.2148 5.5 8C5.5 5.78516 4.69141 3.67578 3.25 2.05859C3.49609 2.02344 3.74219 1.98828 3.98828 1.98828ZM3.98828 0.511719C2.65234 0.511719 1.35156 0.863281 0.261719 1.49609C2.47656 2.79688 3.98828 5.22266 3.98828 8C3.98828 10.7773 2.47656 13.2031 0.261719 14.5039C1.35156 15.1367 2.65234 15.4883 3.98828 15.4883C8.13672 15.4883 11.5117 12.1484 11.5117 8C11.5117 3.85156 8.13672 0.511719 3.98828 0.511719Z\" fill=\"#292929\" />\n </svg> : \n <svg className=\"!w-4 dark:text-white\" viewBox=\"0 0 45.16 45.16\">\n <path d=\"M22.58,11.269c-6.237,0-11.311,5.075-11.311,11.312s5.074,11.312,11.311,11.312c6.236,0,11.311-5.074,11.311-11.312\n S28.816,11.269,22.58,11.269z\" />\n\n <path d=\"M22.58,7.944c-1.219,0-2.207-0.988-2.207-2.206V2.207C20.373,0.988,21.361,0,22.58,0c1.219,0,2.207,0.988,2.207,2.207\n v3.531C24.787,6.956,23.798,7.944,22.58,7.944z\" />\n\n <path d=\"M22.58,37.215c-1.219,0-2.207,0.988-2.207,2.207v3.53c0,1.22,0.988,2.208,2.207,2.208c1.219,0,2.207-0.988,2.207-2.208\n v-3.53C24.787,38.203,23.798,37.215,22.58,37.215z\" />\n\n <path d=\"M32.928,12.231c-0.861-0.862-0.861-2.259,0-3.121l2.497-2.497c0.861-0.861,2.259-0.861,3.121,0\n c0.862,0.862,0.862,2.26,0,3.121l-2.497,2.497C35.188,13.093,33.791,13.093,32.928,12.231z\" />\n\n <path d=\"M12.231,32.93c-0.862-0.863-2.259-0.863-3.121,0l-2.497,2.496c-0.861,0.861-0.862,2.26,0,3.121\n c0.862,0.861,2.26,0.861,3.121,0l2.497-2.498C13.093,35.188,13.093,33.79,12.231,32.93z\" />\n\n <path d=\"M37.215,22.58c0-1.219,0.988-2.207,2.207-2.207h3.531c1.219,0,2.207,0.988,2.207,2.207c0,1.219-0.988,2.206-2.207,2.206\n h-3.531C38.203,24.786,37.215,23.799,37.215,22.58z\" />\n\n <path d=\"M7.944,22.58c0-1.219-0.988-2.207-2.207-2.207h-3.53C0.988,20.373,0,21.361,0,22.58c0,1.219,0.988,2.206,2.207,2.206\n h3.531C6.956,24.786,7.944,23.799,7.944,22.58z\" />\n\n <path d=\"M32.928,32.93c0.862-0.861,2.26-0.861,3.121,0l2.497,2.497c0.862,0.86,0.862,2.259,0,3.12s-2.259,0.861-3.121,0\n l-2.497-2.497C32.066,35.188,32.066,33.791,32.928,32.93z\" />\n\n <path d=\"M12.231,12.231c0.862-0.862,0.862-2.259,0-3.121L9.734,6.614c-0.862-0.862-2.259-0.862-3.121,0\n c-0.862,0.861-0.862,2.259,0,3.12l2.497,2.497C9.972,13.094,11.369,13.094,12.231,12.231z\" />\n </svg>\n }\n />\n </div>\n </div>\n </div>)\n );\n};\n","import { useUserStore } from '@hooks';\nimport axios, { AxiosRequestConfig, InternalAxiosRequestConfig } from 'axios';\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n 'x-api-key': process.env.NEXT_PUBLIC_SERVER_API_KEY || '',\n};\n\n/**\n * Base Axios instance to be used in all requests\n */\nexport const client = axios.create({\n timeout: 60 * 1 * 1000, // 1 minute\n headers: defaultHeaders,\n});\n\n// Ref: https://axios-http.com/docs/interceptors\nclient.interceptors.request.use((config: InternalAxiosRequestConfig) => {\n const accessToken = useUserStore?.getState?.()?.accessToken;\n if (accessToken) {\n config.headers.Authorization = `Bearer ${accessToken}`;\n }\n return config;\n});\n\n// Add a response interceptor\nclient.interceptors.response.use(\n (response) => {\n // Any status code that lie within the range of 2xx cause this function to trigger\n // Do something with response data\n\n return response;\n },\n async (error) => {\n // Any status codes that falls outside the range of 2xx cause this function to trigger\n // Do something with response error\n\n if (error.response) {\n // The request was made and the server responded with a status code\n // that falls out of the range of 2xx\n const errorData = error.response;\n return Promise.reject(errorData);\n } else if (error.request) {\n // The request was made but no response was received\n // `error.request` is an instance of XMLHttpRequest in the browser and an instance of\n // http.ClientRequest in node.js\n return Promise.reject(error.request);\n } else {\n // Something happened in setting up the request that triggered an Error\n return Promise.reject(error.message);\n }\n },\n);\n","export * from './client';\n","import { Button, CodeInputModal, Loading, SendCodeModal } from '@components';\nimport { useAuthUser, useIsMounted } from '@hooks';\nimport InboxIcon from '../../../components/icons/InboxIcon';\nimport { client } from '@services';\nimport { commonRoutes } from '@utils';\nimport { AxiosRequestConfig } from 'axios';\nimport clsx from 'clsx';\nimport { E164Number } from 'libphonenumber-js';\nimport Image from 'next/image';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport { MouseEventHandler, ReactNode, useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport { useMutation } from 'react-query';\nimport { useMediaQuery } from 'react-responsive';\nimport { UserLogo } from './user-logo';\nimport { UserMenu } from './user-menu';\nimport { useRoute } from '../../../context/RouteContext';\nimport { useTranslation } from 'react-i18next';\n\nexport const styles = {\n base: 'w-full border-0 lg:border-b dark:border-b-black-dark lg:border-gray',\n newbase: 'w-full border-0',\n};\n\nexport interface HeaderProps {\n className?: string;\n containerClassName?: string;\n logo?: ReactNode;\n loginButton?: ReactNode;\n logoLink?: string;\n rightMenu?: ReactNode;\n alwaysShowLogo?: boolean;\n toggleMenu: MouseEventHandler;\n toggleHeaderLogo: MouseEventHandler;\n}\n\nexport const Header = ({\n className,\n logo = (\n <div>\n {/* eslint-disable-next-line @next/next/no-img-element */}\n <Image\n src=\"https://mhp-icons.s3.amazonaws.com/white-lockup.png\"\n alt=\"Logo\"\n width={180}\n height={90}\n style={{\n objectFit: 'contain',\n }}\n />\n </div>\n ),\n loginButton,\n containerClassName,\n logoLink = commonRoutes.getStarted,\n rightMenu: rightMenu,\n alwaysShowLogo,\n toggleMenu,\n toggleHeaderLogo,\n}: HeaderProps) => {\n const intl = useIntl();\n const router = useRouter();\n const {\n phoneNumber,\n updateUserInfo,\n authenticationId,\n signedIn,\n firstName,\n lastName,\n userName,\n image,\n email,\n selectedAuth,\n profile,\n } = useAuthUser();\n\n const [openSendModal, setOpenSendModal] = useState<boolean>(false);\n const [openCodeInput, setOpenCodeInput] = useState<boolean>(false);\n const [openMenu, setOpenMenu] = useState<boolean>(false);\n\n const isDesktop = useMediaQuery({ minWidth: 1024 });\n\n const { mutate: mutateSendCode, error: errorCode } = useMutation<\n { authenticationId: string; type: string },\n AxiosRequestConfig,\n { phone?: string; email?: string }\n >(async (body) => {\n const { data } = await client.post<{\n authenticationId: string;\n type: string;\n }>(`${process.env.NEXT_PUBLIC_API_URL}/auth/${selectedAuth}`, body);\n return data;\n });\n\n const {\n mutate: mutateResendCode,\n error: errorResendCode,\n reset: resetResendCode,\n } = useMutation<unknown, AxiosRequestConfig, { id: string; type: string }>(\n (body: { id: string; type: string }) =>\n client.post(`${process.env.NEXT_PUBLIC_API_URL}/auth/resend-code`, body),\n );\n\n const {\n mutate: mutateVerifyCode,\n error: errorVerifyCode,\n reset: resetVerifyCode,\n } = useMutation<unknown, AxiosRequestConfig, { authenticationId: string; code: string }>(\n async (body: { authenticationId: string; code: string }) => {\n const { data } = await client.post(\n `${process.env.NEXT_PUBLIC_API_URL}/auth/sign-up/verify`,\n body,\n );\n\n return data;\n },\n );\n\n const { mutate: mutateVerifyCodeSignIn, error: errorSignin } = useMutation<\n { accessToken: string },\n AxiosRequestConfig,\n { authenticationId: string; code: string }\n >(async (body) => {\n const { data } = await client.post<{ accessToken: string }>(\n `${process.env.NEXT_PUBLIC_API_URL}/auth/sign-in`,\n body,\n );\n return data;\n });\n\n const [type, setType] = useState(null);\n\n const [isFakeLoading, setIsFakeLoading] = useState(false);\n\n const verifyCode = (code: string) => {\n setIsFakeLoading(true);\n if (type === 'signin') {\n mutateVerifyCodeSignIn(\n { authenticationId, code },\n {\n onSuccess: (data) => {\n setTimeout(() => {\n setIsFakeLoading(false);\n updateUserInfo({\n accessToken: data.accessToken,\n signedIn: true,\n });\n setOpenCodeInput(false);\n }, 2500);\n },\n onError: () => {\n setIsFakeLoading(false);\n },\n },\n );\n } else {\n mutateVerifyCode(\n {\n authenticationId,\n code,\n },\n {\n onSuccess: () => {\n setTimeout(() => {\n setIsFakeLoading(false);\n setOpenCodeInput(false);\n router.push('/account');\n }, 2500);\n },\n onError: () => {\n setIsFakeLoading(false);\n },\n },\n );\n }\n };\n\n const onPhoneSubmit = (phone: E164Number | undefined | string) => {\n if (phone) {\n mutateSendCode(\n { phone: phone as string },\n {\n onSuccess: (data) => {\n if (data.authenticationId) {\n updateUserInfo({\n authenticationId: data.authenticationId,\n phoneNumber: phone,\n });\n setType(data.type);\n setOpenSendModal(false);\n setOpenCodeInput(true);\n }\n },\n },\n );\n }\n };\n\n const onEmailSubmit = (email: string) => {\n if (email) {\n mutateSendCode(\n { email },\n {\n onSuccess: (data) => {\n if (data.authenticationId) {\n updateUserInfo({\n authenticationId: data.authenticationId,\n email,\n });\n setType(data.type);\n setOpenSendModal(false);\n setOpenCodeInput(true);\n }\n },\n },\n );\n }\n };\n\n const isMounted = useIsMounted();\n const { t } = useTranslation();\n\n return (\n <header\n className={clsx(\n // styles.base\n styles.newbase,\n containerClassName,\n 'relative flex flex-col w-full pt-5 px-5',\n )}\n >\n {/* <div className=\"absolute top-0 left-0 w-full h-full\">\n <Image\n className=\"object-cover w-full h-full lg:rounded-3xl\"\n src={'/images/headerImage.png'}\n // NOTE: these width & height props don't really control the\n // dimensions of the picture, they're just required by next Image\n // and maybe used for something else internally in the Image component\n // main thing controlling dimensions is the className\n width={500}\n height={500}\n layout=\"fill\"\n alt=\"House\"\n />\n </div> */}\n\n <Loading isLoading={isFakeLoading} />\n\n <div className=\"flex items-center justify-between ps-5 lg:ps-0 gap-7 w-[100%]\">\n <div className=\"z-10 flex flex-col gap-1 w-fit justify-center items-start\">\n {!isDesktop && (\n <button type=\"button\" className=\"mr-2.5 bg-[#222B36] text-white p-1 rounded-lg \" onClick={toggleMenu}>\n {/* <MenuIcon /> */}\n <svg\n width=\"25\"\n height=\"25\"\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"hover:transform hover:-scale-y-125 duration-300\"\n >\n <path\n d=\"M3.16797 5H15.8346V6.66667H3.16797V5ZM3.16797 9.16667H15.8346V10.8333H3.16797V9.16667ZM3.16797 13.3333H15.8346V15H3.16797V13.3333Z\"\n fill=\"white\"\n />\n </svg>\n </button>\n )}\n\n <p className=\"antialiased capitalize tracking-wide pt-2 lg:pt-0 font-medium text-[12px] md:text-[18px] font-plusJakarta leading-6\">\n {t('Hello')},{firstName} {lastName}\n </p>\n <p className=\" text-[11px] md:text-[14px] tracking-wide font-normal leading-4 font-plusJakarta\">\n {' '}\n {t('You Came from')} {profile?.partnerName || profile?.lenderName || 'My Home Pathway'}{' '}\n </p>\n </div>\n {isDesktop && (\n <div>\n <h1 className=\"text-[20px] font-medium leading-6 font-plusJakarta tracking-wide\">\n {t(useRoute().currentRoute.name)}\n </h1>\n </div>\n )}\n <section className=\"\">\n <div\n className={clsx(\n 'w-full flex',\n {\n 'justify-end': alwaysShowLogo,\n },\n className,\n 'w-full',\n )}\n >\n {/* <div className=\"w-full md:flex h-fit\">\n <Link prefetch={false} href={logoLink} className=\"\">\n <a className=\"flex items-center \" onClick={toggleHeaderLogo}>\n <Image\n src=\"https://mhp-icons.s3.amazonaws.com/white-lockup.png\"\n width={130}\n height={50}\n className=\"absolute z-10 text-white xs:top-12 top-6 left-7 xs:scale-9\"\n alt=\"mhp-logo\"\n />\n </a>\n </Link>\n </div> */}\n {isMounted && (\n <>\n {loginButton ? (\n <>{loginButton}</>\n ) : (\n <>\n {!signedIn && router.pathname !== '/account' && (\n <Button\n className=\"py-3 !h-auto text-xs lg:text-[13px]\"\n onClick={() => setOpenSendModal(true)}\n >\n {intl.formatMessage({ id: 'layout.header.login' })}\n </Button>\n )}\n </>\n )}\n\n {rightMenu\n ? rightMenu\n : profile?.isOnboarded && (\n <>\n <div className=\"relative border border-red \">\n <div className=\"flex items-center cursor-pointer\">\n <button\n className=\"flex items-center p-2 bg-white rounded-full\"\n type=\"button\"\n onClick={() => setOpenMenu((old) => !old)}\n >\n <UserLogo\n firstName={firstName}\n lastName={lastName}\n className=\"hidden mr-3 lg:flex\"\n />\n <div className=\"items-center hidden lg:flex\">\n <p className=\"mr-3 font-medium tracking-[0.2px] text-sm\">\n {firstName}\n </p>\n {/* <ChevronDownIcon className=\"keep-color\" /> */}\n </div>\n </button>\n </div>\n {/* <UserMenu\n open={openMenu}\n firstName={firstName}\n lastName={lastName}\n userName={userName}\n image={image}\n setOpenMenu={setOpenMenu}\n className=\"absolute hidden top-12 right-px lg:block\"\n /> */}\n </div>\n </>\n )}\n </>\n )}\n\n <SendCodeModal\n open={openSendModal}\n onClose={() => setOpenSendModal(false)}\n onSubmit={(value) => {\n if (selectedAuth === 'phone') {\n onPhoneSubmit(value);\n } else {\n onEmailSubmit(value);\n }\n }}\n error={errorCode}\n />\n <CodeInputModal\n error={errorCode || errorVerifyCode || errorSignin || errorResendCode}\n open={openCodeInput}\n onClose={() => {\n setOpenCodeInput(false);\n resetVerifyCode();\n resetResendCode();\n }}\n phoneNumber={selectedAuth === 'phone' ? phoneNumber : undefined}\n onCodeResent={() => {\n mutateResendCode({\n id: authenticationId,\n type: 'authentication',\n });\n }}\n verifyCode={verifyCode}\n email={selectedAuth === 'email' ? email : undefined}\n />\n </div>\n </section>\n </div>\n </header>\n );\n};\n","import { useArrayInfo, useAuthUser, useIsMounted } from '@hooks';\nimport clsx from 'clsx';\nimport { ReactElement, ReactNode } from 'react';\nimport { Footer } from './footer';\nimport { Header, HeaderProps } from './header';\nimport { Avatar, Box, Container, Grid, Typography } from '@mui/material';\nimport Script from 'next/script';\nimport { BackButtonComponent } from '@components/buyer-signup-form-v3/BackButtonComponent';\nimport { TourProvider } from 'contexts/tour-guide';\nimport LanguageSelect from '@components/common/LanguageSelect';\n\nexport interface LayoutProps {\n children?: ReactNode;\n headerClassName?: string;\n mainClassName?: string;\n leftMenu?: ReactNode;\n}\n\nexport const Layout = ({ children, headerClassName }: LayoutProps) => {\n return (\n <>\n <Header\n className={headerClassName}\n toggleMenu={() => console.info('TODO: remove this component it doesnt seem to be used')}\n toggleHeaderLogo={() =>\n console.info('TODO: remove this component it doesnt seem to be used')\n }\n />\n\n <main className=\"flex flex-col w-full overflow-hidden mx-auto min-h-[calc(100%-209px)] lg:min-h-[calc(100%-165px)] pb-16 lg:pb-0 bg-gradient-to-tr\">\n {children}\n </main>\n <Footer />\n </>\n );\n};\n\nexport const getDefaultLayout = (page: ReactElement) => {\n return <Layout>{page}</Layout>;\n};\n\ninterface SignLayoutProps {\n children: ReactNode;\n mainClassName?: string;\n}\n\nexport const SignLayout = ({ children, mainClassName }: SignLayoutProps) => {\n const isMounted = useIsMounted();\n return (\n <main\n className={clsx(\n 'flex flex-col w-full mx-auto min-h-full overflow-hidden bg-cover bg-center bg-sign-up-bg',\n mainClassName,\n )}\n >\n {isMounted && <>{children}</>}\n </main>\n );\n};\n\nexport const AuthLayout = ({ children, mainClassName }: SignLayoutProps) => {\n const isMounted = useIsMounted();\n\n const backgroundStyle = {\n backgroundImage: \"url('/images/signup-bg.png')\",\n\n // height: 'auto',\n\n backgroundPosition: 'center',\n backgroundRepeat: 'no-repeat',\n backgroundSize: 'cover',\n paddingY: '3rem',\n };\n\n return (\n <>\n {/* <div style={backgroundStyle}></div> */}\n <Script\n async\n id=\"ze-snippet\"\n src=\"https://static.zdassets.com/ekr/snippet.js?key=c7282538-59a4-42c4-b6ab-5111398252fd\"\n />\n\n <main\n className={clsx(\n 'flex flex-col w-full mx-auto min-h-full bg-cover overflow-auto bg-center signup-bg h-full md:h-auto',\n mainClassName,\n )}\n style={backgroundStyle}\n >\n {isMounted && <>{children}</>}\n </main>\n </>\n );\n};\n\nexport const OnboardingLayout = ({ children, mainClassName }: SignLayoutProps) => {\n const isMounted = useIsMounted();\n const { signedIn, firstName } = useAuthUser();\n const { appKey } = useArrayInfo();\n\n return (\n <>\n <Script src={`https://embed.array.io/cms/array-web-component.js?appKey=${appKey}`} />\n <Script src={`https://embed.array.io/cms/array-authentication-kba.js?appKey=${appKey}`} />\n <Script\n async\n id=\"ze-snippet\"\n src=\"https://static.zdassets.com/ekr/snippet.js?key=6299ab1c-69d0-4c61-ab89-c06dab7dacb7\"\n />\n\n <main\n className={clsx(\n 'flex flex-col w-full overflow-hidden mx-auto min-h-full bg-cover bg-center',\n mainClassName,\n )}\n style={{\n background: 'white',\n }}\n >\n {isMounted && (\n <Container\n maxWidth=\"xl\"\n sx={{\n paddingY: {\n xs: '0.25rem',\n sm: '0.5rem',\n md: '2rem',\n lg: '3rem',\n },\n }}\n >\n <Grid container spacing={2}>\n <Grid item xs={12}>\n <div className=\"flex items-center justify-between\">\n <BackButtonComponent />\n {/* <Avatar\n sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n height: '43px',\n width: '43px',\n border: '1px solid #C5C5C5',\n backgroundColor: 'transparent',\n marginLeft: 'auto',\n cursor: 'pointer',\n }}\n >\n <Typography\n variant=\"h1\"\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '20px',\n fontWeight: 400,\n lineHeight: '25.2px',\n textAlign: 'center',\n color: '#C5C5C5',\n paddingBottom: '6px',\n }}\n >\n {signedIn ? firstName?.charAt(0) : ''}\n </Typography>\n </Avatar> */}\n </div>\n </Grid>\n </Grid>\n\n {children}\n </Container>\n )}\n </main>\n </>\n );\n};\n\nexport const getSignLayout = (page: ReactElement) => {\n return <SignLayout>{page}</SignLayout>;\n};\n\nexport const ProfileLayout = ({\n children,\n headerClassName,\n headerContainerClassName,\n loginButton = <></>,\n rightMenu,\n leftMenu,\n mainClassName,\n logoLink,\n alwaysShowLogo,\n customHeader,\n toggleMenu,\n toggleHeaderLogo,\n}: LayoutProps &\n HeaderProps & {\n headerContainerClassName?: string;\n alwaysShowLogo?: boolean;\n customHeader?: ReactNode;\n }) => {\n const isMounted = useIsMounted();\n const { signedIn } = useAuthUser();\n return (\n <>\n {customHeader ? customHeader : <div></div>}\n\n <TourProvider>\n <div className=\"flex bg-[#fff]\">\n {isMounted && <div className=\"-ml-10 bg-[#F6F5F8]\">{leftMenu}</div>}\n\n {isMounted && (\n <main\n className={clsx(\n 'flex flex-col w-full mx-auto overflow-hidden h-full min-h-[calc(100%-201px)] lg:min-h-[calc(100%-162px)]',\n mainClassName,\n { 'pb-[78px]': signedIn, 'pb-16': !signedIn },\n )}\n >\n <Header\n logoLink={logoLink}\n className={clsx(headerClassName)}\n containerClassName={clsx('flex items-center border-none', headerContainerClassName)}\n rightMenu={rightMenu}\n loginButton={loginButton}\n alwaysShowLogo={alwaysShowLogo}\n toggleMenu={toggleMenu}\n toggleHeaderLogo={toggleHeaderLogo}\n />\n {children}\n\n <Box className=\"fixed bottom-5 right-[100px]\">\n <LanguageSelect />\n </Box>\n\n </main>\n )}\n </div>\n </TourProvider>\n </>\n );\n};\n","import clsx from 'clsx';\nimport { createPortal } from 'react-dom';\nimport styles from './loading.module.scss';\n\ninterface LoadingProps {\n isLoading: boolean;\n fullscreen?: boolean;\n size?: number;\n loadingClassName?: string;\n}\n\nexport const Loading = ({ isLoading, fullscreen = true, loadingClassName }: LoadingProps) => {\n\n return isLoading ? (\n fullscreen ? (\n createPortal(\n <div className={styles.loadingContainer}>\n <div className={clsx(styles.loading)} />\n </div>,\n document.body,\n 'loading',\n )\n ) : (\n <div className=\"flex justify-center\">\n <div className={clsx(styles.loading, '!border-gray-50', loadingClassName)} />\n </div>\n )\n ) : null;\n};\n","import { Box, Divider, List, ListItem, Typography, Avatar, IconButton } from '@mui/material';\nimport StarIcon from '@mui/icons-material/Star';\nimport ArchiveIcon from '@mui/icons-material/Archive';\nimport CloseIcon from '@mui/icons-material/Close';\nimport PersonOutlineIcon from '@mui/icons-material/PersonOutline';\nimport StarOutlineIcon from '@mui/icons-material/StarOutline';\nimport ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined';\nimport { useEffect, useState } from 'react';\nimport { useTranslation } from 'react-i18next';\n\nexport const RightPanel = ({\n starredThreads,\n archivedThreads,\n handleChatItemClick,\n handleToggleStar,\n handleToggleArchive,\n toggleStarred,\n setToggleStarred,\n fetchStarredLoading,\n fetchArchivedLoading,\n setUserId,\n setAdminMsgID,\n}) => {\n const { t } = useTranslation();\n const [selectedAdminUserId, setSelectedAdminUserId] = useState(null);\n useEffect(() => {\n if (starredThreads?.length === 0 && archivedThreads?.length === 0) {\n setToggleStarred(false);\n } else {\n setToggleStarred(true);\n }\n }, [starredThreads, archivedThreads]);\n\n return (\n <div\n className={`hidden md:flex flex-col transition-all duration-400 ${\n !toggleStarred ? 'w-[5rem]' : 'w-[25%]'\n } overflow-hidden`}\n >\n \n {toggleStarred && (\n <div className=\"flex justify-end\">\n <CloseIcon\n fontSize=\"medium\"\n sx={{ cursor: 'pointer' }}\n onClick={() => setToggleStarred(!toggleStarred)}\n />\n </div>\n )}\n\n {!toggleStarred && (\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: '20px',\n // paddingLeft: 1,\n marginTop: 15,\n cursor: 'pointer',\n }}\n onClick={() => setToggleStarred(!toggleStarred)}\n >\n <Box className=\"flex flex-col justify-center items-center gap-2\">\n <StarIcon fontSize=\"medium\" />\n <Typography\n sx={{\n color: '#222B36',\n fontFamily: 'PlusJakartaSans',\n fontSize: '10px',\n textAlign: 'center',\n }}\n >\n {t('Starred Chats')}\n </Typography>\n </Box>\n <Divider sx={{ width: '100%', backgroundColor: '#C5C5C5' }} />\n\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'center',\n alignItems: 'center',\n gap: '10px',\n }}\n >\n <ArchiveIcon fontSize=\"medium\" />\n <Typography\n sx={{\n color: '#222B36',\n fontFamily: 'PlusJakartaSans',\n fontSize: '10px',\n textAlign: 'center',\n }}\n >\n {t('Archived Chats')}\n </Typography>\n </Box>\n </Box>\n )}\n\n {/* Archived Section */}\n {toggleStarred && (\n <Box\n sx={{\n padding: 1,\n display: 'flex',\n flexDirection: 'column',\n gap: 0,\n width: '100%',\n }}\n >\n {/* if starred threads are empty */}\n {starredThreads?.length === 0 && (\n <Box\n className=\"flex flex-col bg-[#EFEFEF] p-5 rounded-xl justify-center items-center gap-2\"\n onClick={() => setToggleStarred(!toggleStarred)}\n >\n <PersonOutlineIcon fontSize=\"medium\" />\n <Typography\n sx={{\n color: '#222B36',\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n textAlign: 'center',\n }}\n >\n {t('No Starred Chats')}\n </Typography>\n </Box>\n )}\n {/* Starred Section - Only show if there are starred chats */}\n {starredThreads.length > 0 && (\n <>\n {/* Starred Header */}\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: '5px',\n backgroundColor: '#EFEFEF',\n border: '0.5px solid #C5C5C5',\n borderRadius: '100px',\n padding: '10px',\n width: 'fit-content',\n marginTop: '10px',\n marginBottom: '0px',\n }}\n onClick={() => setToggleStarred(!toggleStarred)}\n >\n <CloseIcon\n sx={{\n color: '#222B36',\n fontSize: 16,\n fontWeight: 300,\n }}\n />\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n fontWeight: 500,\n color: '#222B36',\n }}\n >\n {t('Starred')}\n </Typography>\n </Box>\n\n {/* Starred Chats List */}\n {toggleStarred && (\n <List\n component={Box}\n sx={{\n flex: 1,\n overflowY: 'auto',\n overflowX: 'hidden',\n width: '100%',\n maxHeight: '200px',\n // backgroundColor: '#EFEFEF',\n // border: '0.5px solid #C5C5C5',\n // borderRadius: '10px',\n padding: '10px',\n marginTop: '10px',\n '&::-webkit-scrollbar': {\n width: '4px',\n },\n '&::-webkit-scrollbar-track': {\n background: '#f1f1f1',\n },\n '&::-webkit-scrollbar-thumb': {\n background: '#888',\n borderRadius: '4px',\n },\n }}\n >\n {fetchStarredLoading ? (\n <Box className=\"flex justify-center items-center min-h-[250px]\">\n <div className=\"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-[#9F98BE]\"></div>\n </Box>\n ) : (\n starredThreads.map((user: any, index: number) => (\n <ListItem\n key={index}\n component=\"button\"\n onClick={() => {\n setSelectedAdminUserId(user.id);\n setAdminMsgID(user.id);\n setUserId(user.id);\n handleChatItemClick(user.id, user.title);\n }}\n sx={{\n padding: '12px',\n display: 'flex',\n alignItems: 'flex-start',\n gap: '12px',\n width: { xs: '55%', md:'100%', xl: '100%' },\n textAlign: 'left',\n\n ':hover': {\n backgroundColor: '#EFEFEF',\n },\n position: 'relative',\n borderBottom: '0.5px solid #C5C5C5',\n translate: '0px 0px',\n transition: 'all 0.3s ease',\n '&:hover': {\n translate: '0px -5px',\n },\n }}\n >\n <Box sx={{ position: 'relative' }}>\n <Avatar\n sx={{\n bgcolor: '#000000',\n width: { xs: 20, xl: 40 },\n height: { xs: 20, xl: 40 },\n color: '#ffffff',\n fontFamily: 'PlusJakartaSans',\n }}\n >\n <PersonOutlineIcon sx={{ fontSize: { xs: 16, xl: 24 } }} />\n </Avatar>\n {(user.lenderCode || user.partnerCode) && (\n <StarOutlineIcon\n sx={{\n position: 'absolute',\n bottom: -4,\n right: -4,\n fontSize: 14,\n color: '#000000',\n backgroundColor: '#FFD700',\n borderRadius: '50%',\n padding: '2px',\n zIndex: 1,\n width: '16px',\n height: '16px',\n }}\n />\n )}\n </Box>\n <Box\n sx={{\n flex: 1,\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n gap: '2px',\n }}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n }}\n >\n <Box>\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: { xs: 12, xl: 16 },\n fontWeight: 600,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {user?.title}\n </Typography>\n <Typography\n sx={{\n color: '#475467',\n fontSize: '14px',\n fontWeight: 400,\n fontFamily: 'PlusJakartaSans',\n whiteSpace: 'nowrap',\n maxWidth: '280px',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {user?.subtitle}\n </Typography>\n </Box>\n <IconButton\n onClick={(e) => handleToggleStar(user.id, e)}\n sx={{\n padding: '4px',\n '&:hover': {\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n },\n }}\n >\n <StarIcon\n sx={{\n fontSize: 18,\n color: '#0776FF',\n }}\n />\n </IconButton>\n </Box>\n </Box>\n </ListItem>\n ))\n )}\n </List>\n )}\n </>\n )}\n\n {archivedThreads?.length === 0 && (\n <Box\n className=\"flex flex-col bg-[#EFEFEF] p-5 mt-5 rounded-xl justify-center items-center gap-2\"\n onClick={() => setToggleStarred(!toggleStarred)}\n >\n <PersonOutlineIcon fontSize=\"medium\" />\n <Typography\n sx={{\n color: '#222B36',\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n textAlign: 'center',\n }}\n >\n {t('No Archived Chats')}\n </Typography>\n </Box>\n )}\n {/* Archived Section - Only show if there are archived chats */}\n {archivedThreads?.length > 0 && (\n <div className=\"w-full mt-5 overflow-hidden\">\n {/* Archived Header */}\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: '5px',\n backgroundColor: '#EFEFEF',\n border: '0.5px solid #C5C5C5',\n borderRadius: '100px',\n padding: '10px',\n width: 'fit-content',\n marginTop: '15px',\n }}\n >\n <CloseIcon\n sx={{\n color: '#222B36',\n fontSize: 16,\n fontWeight: 300,\n }}\n />\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n fontWeight: 500,\n color: '#222B36',\n }}\n >\n {t('Archived')}\n </Typography>\n </Box>\n\n {/* Archived Chats List */}\n {toggleStarred && (\n <List\n component={Box}\n sx={{\n flex: 1,\n overflowY: 'auto',\n overflowX: 'hidden',\n width: '100%',\n '&::-webkit-scrollbar': {\n width: '4px',\n },\n '&::-webkit-scrollbar-track': {\n background: '#f1f1f1',\n },\n '&::-webkit-scrollbar-thumb': {\n background: '#888',\n borderRadius: '4px',\n },\n }}\n >\n {fetchArchivedLoading ? (\n <Box className=\"flex justify-center items-center min-h-[250px]\">\n <div className=\"animate-spin rounded-full h-8 w-8 border-t-2 border-b-2 border-[#9F98BE]\"></div>\n </Box>\n ) : (\n archivedThreads.map((user: any, index: number) => (\n <ListItem\n key={index}\n component=\"button\"\n onClick={() => {\n setUserId(user.id);\n handleChatItemClick(user.id, user.title);\n setAdminMsgID(user.id);\n }}\n sx={{\n padding: '12px',\n display: 'flex',\n marginBottom: '10px',\n alignItems: 'flex-start',\n gap: '12px',\n width: { xs: '55%', md:'100%', xl: '100%' },\n textAlign: 'left',\n position: 'relative',\n borderBottom: '0.5px solid #C5C5C5',\n translate: '0px 0px',\n transition: 'all 0.3s ease',\n '&:hover': {\n translate: '0px -5px',\n },\n }}\n >\n <Box sx={{ position: 'relative' }}>\n <Avatar\n sx={{\n bgcolor: '#000000',\n width: { xs: 30, xl: 40 },\n height: { xs: 30, xl: 40 },\n color: '#ffffff',\n fontFamily: 'PlusJakartaSans',\n }}\n >\n <PersonOutlineIcon sx={{ fontSize: { xs: 17, xl: 24 } }} />\n </Avatar>\n {(user.lenderCode || user.partnerCode) && (\n <StarOutlineIcon\n sx={{\n position: 'absolute',\n bottom: -4,\n right: -4,\n fontSize: 14,\n color: '#000000',\n backgroundColor: '#FFD700',\n borderRadius: '50%',\n padding: '2px',\n zIndex: 1,\n width: '16px',\n height: '16px',\n }}\n />\n )}\n </Box>\n <Box\n sx={{\n flex: 1,\n minWidth: 0,\n display: 'flex',\n flexDirection: 'column',\n gap: '2px',\n }}\n >\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n width: '100%',\n }}\n >\n <Box>\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: { xs: 12, xl: 16 },\n fontWeight: 600,\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {user.title}\n </Typography>\n <Typography\n sx={{\n color: '#475467',\n fontSize: '14px',\n fontWeight: 400,\n fontFamily: 'PlusJakartaSans',\n maxWidth: '300px',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {user?.subtitle}\n </Typography>\n </Box>\n <IconButton\n onClick={(e) => handleToggleArchive(user.id, e)}\n sx={{\n padding: '4px',\n '&:hover': {\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n },\n }}\n >\n <ArchiveOutlinedIcon\n sx={{\n fontSize: 18,\n color: '#696767',\n }}\n />\n </IconButton>\n </Box>\n </Box>\n </ListItem>\n ))\n )}\n </List>\n )}\n </div>\n )}\n </Box>\n )}\n </div>\n );\n};\n","import { Box, Button, Typography } from '@mui/material';\nimport ForumOutlinedIcon from '@mui/icons-material/ForumOutlined';\nimport { useTranslation } from 'react-i18next';\n\nconst StartConversation = () => {\n const { t } = useTranslation();\n\n return (\n <Box\n sx={{\n padding: '20px',\n paddingBottom: '40px',\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'center',\n justifyContent: 'center',\n height: '100%',\n minHeight: 'calc(100vh - 175px)',\n }}\n >\n <ForumOutlinedIcon\n sx={{\n fontSize: { xs: 50, sm: 60, md: 68 },\n color: '#33333340',\n mb: 1,\n }}\n />\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '14px',\n fontWeight: 600,\n color: '#333',\n marginTop: '8px',\n marginBottom: '4px',\n }}\n >\n {t('Chats')}\n </Typography>\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n fontWeight: 400,\n color: '#333',\n marginBottom: '20px',\n width: { xs: '14rem', lg: '20rem' },\n textAlign: 'center',\n }}\n >\n {t('Start Conversation with a Leads follow up with them on their progress and requests')}\n </Typography>\n <Button\n variant=\"contained\"\n sx={{\n fontFamily: 'PlusJakartaSans',\n backgroundColor: 'black',\n boxShadow: 'none',\n color: 'white',\n borderRadius: '100px',\n padding: '16px 20px',\n display: 'flex',\n alignItems: 'center',\n textTransform: 'none',\n justifyContent: 'center',\n '&:hover': {\n backgroundColor: '#333',\n boxShadow: 'none',\n },\n }}\n >\n <Typography\n sx={{\n fontWeight: '600',\n color: 'white',\n marginRight: '4px',\n fontFamily: 'PlusJakartaSans',\n fontSize: '16px',\n }}\n >\n {t('Chat')}\n </Typography>\n <Typography\n sx={{\n fontWeight: 'normal',\n color: 'lightgray',\n marginLeft: '2px',\n fontFamily: 'PlusJakartaSans',\n }}\n >\n -\n </Typography>\n <Typography\n sx={{\n fontWeight: 'normal',\n color: 'lightgray',\n marginLeft: '4px',\n fontFamily: 'PlusJakartaSans',\n fontSize: { xs: '14px', lg: '16px' },\n }}\n >\n {t('Select a Conversation')}\n </Typography>\n </Button>\n </Box>\n );\n};\n\nexport default StartConversation;\n","import React, { useEffect, useRef, useState } from 'react';\nimport { useRouter } from 'next/router';\nimport { useAuthUser, useIsMounted } from '@hooks';\nimport { ApiService } from '@services/Api';\nimport { BuyerLayout } from '../layout/buyer-layout';\nimport 'react-chat-elements/dist/main.css';\nimport { MessageType, IChatItemProps } from 'react-chat-elements';\nimport { io } from 'socket.io-client';\nimport Image from 'next/image';\nimport StarIcon from '@mui/icons-material/Star';\nimport StarOutlineIcon from '@mui/icons-material/StarOutline';\n\nimport { styled } from '@mui/material/styles';\nimport {\n Paper,\n Box,\n Divider,\n TextField,\n Typography,\n List,\n ListItem,\n ListItemIcon,\n ListItemText,\n Avatar,\n Fab,\n AvatarGroup,\n IconButton,\n Button,\n} from '@mui/material';\nimport SendIcon from '@mui/icons-material/Send';\nimport ChatIcon from '@mui/icons-material/Chat';\nimport PersonOutlineIcon from '@mui/icons-material/PersonOutline';\nimport PushPinOutlinedIcon from '@mui/icons-material/PushPinOutlined';\nimport ArchiveOutlinedIcon from '@mui/icons-material/ArchiveOutlined';\nimport SendOutlinedIcon from '@mui/icons-material/SendOutlined';\n\nimport { RightPanel } from './RightPanel';\nimport { toggleArchiveMessage, toggleStarMessage } from '@services/Api/controllers';\nimport StartConversation from './StartConversation';\nimport ChatV1 from './messagesV1/index-v1';\nimport toast from 'react-hot-toast';\nimport { useTranslation } from 'react-i18next';\n\nlet newSocket = null;\n\ninterface ISelectedAdminUser {\n id: any;\n name: string;\n isPinned?: boolean;\n isStarred?: boolean;\n isArchived?: boolean;\n}\n\ninterface ISelectedUser {\n id: any;\n name: string;\n adminId: string;\n reciverId: string;\n lastMessageTime: string;\n}\n\nconst ChatSection = styled(Paper)({\n width: '100%',\n height: '100vh',\n display: 'flex',\n flexDirection: 'row',\n gap: '10px',\n borderLeft: '0px solid red',\n});\n\nconst BorderRight500 = styled(Box)({\n border: '1px solid #e0e0e0',\n borderRadius: '25px 25px 25px ',\n width: '25%',\n padding: '15px',\n height: '100%',\n overflowY: 'auto',\n});\n\n// const MessageArea = styled(List)({\n// height: 'calc(100vh - 160px)',\n// overflowY: 'auto',\n// border: '1px solid #e0e0e0',\n// borderRadius: '25px',\n// });\n\nconst MessageArea = styled(List)({\n height: '72vh',\n overflowY: 'auto',\n scrollbarWidth: 'none',\n});\n\ninterface IChatItemPropsChild extends IChatItemProps {\n adminId?: string;\n lastMessageTime: string;\n userId: string | number;\n userName: string;\n latestMessage: string;\n isPinned?: boolean;\n isStarred?: boolean;\n isArchived?: boolean;\n}\n\nfunction createThread(\n userId: string | number,\n userName: string,\n latestMessage: string,\n date: Date,\n adminId?: string,\n isPinned?: boolean,\n isStarred?: boolean,\n isArchived?: boolean,\n): IChatItemPropsChild {\n return {\n id: adminId || '',\n avatar: '',\n alt: '',\n title: userName,\n subtitle: latestMessage,\n date: date,\n unread: 0,\n statusColor: '#AABBAA',\n lastMessageTime: date ? date.toISOString() : new Date().toISOString(),\n userId: userId,\n userName: userName,\n latestMessage: latestMessage,\n adminId,\n isPinned,\n isStarred,\n isArchived,\n };\n}\n\ninterface IMessageType {\n receiverID: string | number;\n senderID: string | number;\n text: string;\n date: Date;\n userSenderName: string;\n userReceiverName: string;\n displayName: string;\n}\nfunction createTextMessage(\n receiverID: string | number,\n senderID: string | number,\n text: string,\n date: Date,\n\n userSenderName: string,\n userReceiverName: string,\n displayName: string,\n): IMessageType {\n return {\n receiverID,\n senderID,\n text,\n date,\n userSenderName,\n userReceiverName,\n displayName,\n };\n}\n\nexport const MessagesDashboard = () => {\n const router = useRouter();\n const [filteredThreads, setFilteredThreads] = useState<IChatItemPropsChild[]>([]);\n\n const [threads, setThreads] = useState<IChatItemPropsChild[]>([]);\n const [messages, setMessages] = useState<IMessageType[]>([]);\n const [selectedAdminUser, setSelectedAdminUser] = useState<ISelectedAdminUser | null>(null);\n console.log(\"🚀 ~ selectedAdminUser:\", selectedAdminUser?.isArchived)\n const [inputValue, setInputValue] = useState('');\n const isMounted = useIsMounted();\n const [searchTerm, setSearchTerm] = useState('');\n const [socket, setSocket] = useState<any>(null);\n const [adminMsgID, setAdminMsgID] = useState<string | number | null>(null);\n const [userId, setUserId] = useState<any | null>(null);\n const [adminUserName, setAdminUserName] = useState<any | null>(null);\n\n const [archivedThreads, setArchivedThreads] = useState<IChatItemPropsChild[]>([]);\n // Add new state for toggleStarred\n const [toggleStarred, setToggleStarred] = useState<boolean>(false);\n // Add new state for toggleArchived\n const [toggleArchived, setToggleArchived] = useState<boolean>(false);\n const [selectedUser, setSelectedUser] = useState<ISelectedUser | null>(null);\n const [isMessagesLoading, setIsMessagesLoading] = useState<boolean>(false);\n const [showThreadSidebar, setShowThreadSidebar] = useState<boolean>(false);\n const [showExclusiveChats, setShowExclusiveChats] = useState(false);\n const [isStarred, setIsStarred] = useState<boolean>(false);\n const [isArchived, setIsArchived] = useState<boolean>(false);\n const [fetchStarredLoading, setFetchStarredLoading] = useState<boolean>(false);\n const [fetchArchivedLoading, setFetchArchivedLoading] = useState<boolean>(false);\n const [archivedThreadsList, setArchivedThreadsList] = useState<IChatItemPropsChild[]>([]);\n const [starredThreadsList, setStarredThreadsList] = useState<IChatItemPropsChild[]>([]);\n //const [userName, setUserName] = useState<any | null>(null);\n const [mostLatestMsg, setMostLatestMsg] = useState<IMessageType>(null);\n //const [latestMessage, setLatestMessage] = useState<any | null>(null);\n\n\n const handleChatItemClick = async (id: string | number, name: string) => {\n try {\n // Ensure both IDs are available\n setShowThreadSidebar(false);\n setIsMessagesLoading(true);\n\n // Set selected admin user with all necessary properties\n setSelectedAdminUser({\n id: id,\n name: name,\n isPinned: threads.find((t) => t.id === id)?.isPinned,\n isStarred: threads.find((t) => t.id === id)?.isStarred,\n isArchived: threads.find((t) => t.id === id)?.isArchived,\n });\n\n // Fetch messages for this chat\n await fetchThreads();\n await fetchMessages();\n } catch (error) {\n console.error('Error in handleChatItemClick:', error);\n } finally {\n setIsMessagesLoading(false);\n }\n };\n\n const isChatPinned =\n threads.find((thread) => thread.id === selectedAdminUser?.id)?.isPinned || false;\n const isChatStarred =\n threads.find((thread) => thread.id === selectedAdminUser?.id)?.isStarred || false;\n const isChatArchived =\n threads.find((thread) => thread.id === selectedAdminUser?.id)?.isArchived || false;\n\n // const handleUserSelect = async (userId: string | number, userName: string) => {\n // const selectedThread = threads.find((thread) => thread.userId === userId);\n // setSelectedAdminUser({\n // id: userId,\n // name: userName,\n // isPinned: selectedThread?.isPinned || false,\n // });\n // setSelectedUser({ id: userId, name: userName });\n\n // try {\n // setIsMessagesLoading(true);\n // const response = await ApiService.listMessages(userId.toString());\n // const data = response.data;\n // console.log(data);\n // // Map the fetched data to match the expected format\n // const sendingDate = new Date();\n // console.log('data', data);\n // // Map the fetched data to match the expected format\n // const formattedMessages = data.map((message) =>\n // createTextMessage(\n // user.id,\n // adminMsgID,\n // message.message,\n // sendingDate,\n // user.firstName,\n // adminUserName,\n // message.userName,\n // ),\n // );\n\n // setMessages(formattedMessages);\n // messageMarkAsRead();\n // } catch (error) {\n // console.error('Error fetching messages:', error);\n // } finally {\n // setIsMessagesLoading(false);\n // }\n // };\n\n const handleChatPining = async () => {\n if (!selectedAdminUser?.id) return;\n\n try {\n const res = await ApiService.togglePinMessage(selectedAdminUser.id);\n console.log('🚀 ~ handleChatPining ~ res:', res?.data?.message);\n if (res) {\n toast.success(res?.data?.message);\n // Update the selected admin user's pin status\n setSelectedAdminUser((prev) => ({\n ...prev,\n isPinned: !prev.isPinned,\n }));\n await fetchThreads();\n }\n } catch (error) {\n console.error('Error toggling pin status:', error);\n toast.error('Error toggling pin status');\n }\n };\n\n const handleArchiveChat = async () => {\n if (!selectedAdminUser?.id) return;\n setFetchArchivedLoading(true);\n try {\n const res = await ApiService.toggleArchiveMessage(selectedAdminUser.id);\n if (res) {\n // Update the selected admin user's pin status\n setSelectedAdminUser((prev) => ({\n ...prev,\n isArchived: !prev?.isArchived,\n }));\n setFetchArchivedLoading(false);\n await fetchThreads();\n toast.success(res?.data?.message);\n }\n } catch (error) {\n console.error('Error toggling archive status:', error);\n toast.error('Error toggling archive status');\n setFetchArchivedLoading(false);\n }\n };\n\n const handleChatStar = async () => {\n if (!selectedAdminUser?.id) return;\n setFetchStarredLoading(true);\n \n try {\n const res = await ApiService.toggleStarMessage(selectedAdminUser.id);\n if (res && res.data) {\n // Update the threads array to reflect the new star status\n setThreads((prevThreads) =>\n prevThreads.map((thread) =>\n thread.id === selectedAdminUser.id\n ? { ...thread, isStarred: res.data.isStarredByClient }\n : thread\n )\n );\n \n // Update selected admin user\n setSelectedAdminUser((prev) => ({\n ...prev,\n isStarred: res.data.isStarredByClient,\n }));\n \n toast.success(res.data.message);\n }\n } catch (error) {\n console.error('Error toggling star status:', error);\n toast.error('Error toggling star status');\n } finally {\n setFetchStarredLoading(false);\n }\n };\n \n\n const handleToggleStar = async (userId: string | number, event: React.MouseEvent) => {\n event.stopPropagation();\n setFetchStarredLoading(true);\n try {\n const res = await toggleStarMessage(userId.toString());\n if (res) {\n setFetchStarredLoading(false);\n toast.success(res?.data?.message);\n }\n // Refresh both starred and regular chat lists\n if (showExclusiveChats) {\n // fetchExclusiveStarredChats();\n // fetchExclusiveChats();\n } else {\n // fetchStarredThreads();\n fetchThreads();\n }\n\n // Update center div state if this is the currently selected chat\n if (selectedUser && selectedUser.id === userId) {\n setIsStarred(false); // Since we're unstarring from the right panel\n fetchMessages(); // Refetch messages to get updated status\n }\n } catch (error) {\n console.error('Error toggling star status:', error);\n setFetchStarredLoading(false);\n }\n };\n // Add this function near your other API functions\n const handleToggleArchive = async (userId: string | number, event: React.MouseEvent) => {\n event.stopPropagation(); // Prevent chat selection when clicking archive icon\n setFetchArchivedLoading(true);\n try {\n const res = await toggleArchiveMessage(userId.toString());\n if (res) {\n setFetchArchivedLoading(false);\n toast.success(res?.data?.message);\n }\n\n // Refresh both archived and regular chat lists\n if (showExclusiveChats) {\n // fetchExclusiveArchivedChats();\n // fetchExclusiveChats();\n // fetchExclusiveStarredChats();\n } else {\n // fetchArchivedThreads();\n fetchThreads();\n // fetchStarredThreads();\n }\n\n // Update center div state if this is the currently selected chat\n if (selectedUser && selectedUser.id === userId) {\n fetchMessages(); // Refetch messages to get updated status\n setIsArchived(false); // Since we're unarchiving from the right panel\n }\n } catch (error) {\n console.error('Error toggling archive status:', error);\n setFetchArchivedLoading(false);\n }\n };\n const user = useAuthUser();\n const { id, name } = router.query; // Extract 'id' from URL query parameters\n\n const { t } = useTranslation();\n\n useEffect(() => {\n fetchThreads();\n if (newSocket == null && !newSocket?.connected) {\n newSocket = io(`${process.env.NEXT_PUBLIC_API_URL}`, {\n transports: ['websocket'],\n });\n\n newSocket.on('connect', () => {\n console.log('Connected to WebSocket server');\n });\n\n newSocket.on('disconnect', () => {\n console.log('Disconnected from server.');\n });\n\n newSocket.on('message', (message) => {\n if (message.userId === user.id) {\n console.log('Received message:', message);\n\n const sendingDate = new Date();\n console.log(messages);\n console.log(threads);\n setMessages((prevMessages) => [\n ...prevMessages,\n // createTextMessage(\n // message.messageText,\n // message.isSenderAdmin,\n // message.isSenderAdmin\n // ? `${user.firstName} ${user.lastName}`\n // : \"User\",\n // new Date(message.createdAt)\n // ),\n createTextMessage(\n user.id,\n adminMsgID,\n message.messageText,\n sendingDate,\n user.firstName,\n adminUserName,\n message.userName,\n ),\n ]);\n\n // setMostLatestMsg(\n // createTextMessage(\n // adminMsgID,\n // userId,\n // message.messageText,\n // sendingDate,\n // message.username,\n // user.firstName,\n // ),\n // );\n\n setThreads((prevThreads) => {\n console.log('prevThreads');\n console.log(prevThreads);\n // Create a deep copy of the previous threads\n const newThreads = prevThreads.map((thread) => ({ ...thread }));\n\n let selectedThread = null;\n let selectedIndex = -1;\n\n // Find the matching thread and its index\n for (let i = 0; i <newThreads.length; i++) {\n console.log('loop 1');\n console.log(newThreads[i].id);\n console.log(message.adminId);\n\n console.log('loop 1 ends');\n if (newThreads[i].id === message.adminId) {\n selectedThread = { ...newThreads[i] }; // Make a copy of the selected thread to avoid mutation\n selectedIndex = i;\n break; // Exit loop once the thread is found\n }\n }\n\n // If a matching thread is found, move it to the top\n if (selectedThread !== null) {\n console.log('matched');\n selectedThread.latestMessage = message.messageText;\n selectedThread.subtitle = message.messageText; // Keep subtitle in sync for backward compatibility\n newThreads.splice(selectedIndex, 1); // Remove the thread from its current position\n newThreads.unshift(selectedThread); // Add the copied thread to the top of the array\n }\n\n // Return the updated threads array to update the state\n console.log('newThreads');\n console.log(newThreads);\n return newThreads;\n });\n\n // if (selectedUser && message.userId === selectedUser.id) {\n\n // }\n\n // fetchThreads();\n } else {\n console.log('You cant see the message');\n }\n });\n }\n }, []);\n\n // return () => {\n // if (newSocket) {\n // newSocket.close();\n // }\n // };\n\n // Create a ref for the message container\n const messageEndRef = useRef<null | HTMLDivElement>(null);\n\n useEffect(() => {\n if (messageEndRef.current) {\n messageEndRef.current.scrollIntoView({ block: 'end' });\n }\n }, [messages]);\n // Dependency on messages to scroll every time messages update\n\n const fetchThreads = async () => {\n console.log('fetching threads');\n try {\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_API_URL}/messages/user-sorted?userId=${user.id}`,\n // `${process.env.NEXT_PUBLIC_API_URL}/messages/user-sorted?userId=fec6330b-fb4e-4ab4-a767-2cbfbd4fa231`,\n );\n const result = await response.json();\n\n // Log the entire response to verify its structure\n console.log('API Response:', result); // Pass only the user ID\n // affiliatedUsersResponse.data is the actual array of users\n\n if (!result) return;\n let data = result?.map((thread) =>\n createThread(\n thread.adminId || '',\n thread.adminName,\n thread.latestMessage || '',\n new Date(thread.time),\n thread.adminId,\n thread.isPinned,\n thread.isStarred,\n thread.isArchived,\n ),\n );\n data = data.filter((thread) => thread.title != null);\n console.log('data Response:');\n console.log('dddd', data);\n // Sort threads to show pinned chats at the top\n const sortedData = data.sort((a, b) => {\n if (a.isPinned && !b.isPinned) return -1;\n if (!a.isPinned && b.isPinned) return 1;\n // If both are pinned or both are not pinned, sort by date\n return new Date(b.lastMessageTime).getTime() - new Date(a.lastMessageTime).getTime();\n });\n setThreads(sortedData);\n } catch (error) {\n console.error('Error fetching Users:', error);\n }\n };\n\n useEffect(() => {\n setStarredThreadsList(threads?.filter((message: any) => message?.isStarred));\n setArchivedThreadsList(threads?.filter((message: any) => message?.isArchived));\n }, [threads]);\n\n // useEffect(() => {\n // const newSocket = io(`${process.env.NEXT_PUBLIC_API_URL}`, {\n // transports: ['websocket'],\n // });\n\n // newSocket.on('connect', () => {\n // console.log('Connected to WebSocket server');\n // setSocket(newSocket);\n\n // });\n\n // newSocket.on('message', (message) => {\n // if (message.userId === user.id) {\n // console.log('Received message:', message);\n\n // const sendingDate = new Date();\n\n // setMessages((prevMessages) => [\n // ...prevMessages,\n // // createTextMessage(\n // // message.messageText,import StarOutlineIcon from \"@mui/icons-material/StarOutline\";\n\n // createTextMessage(adminMsgID, userId, message.messageText, sendingDate, message.username, user.firstName)\n\n // ]);\n\n // setMostLatestMsg(\n // createTextMessage(adminMsgID, userId, message.messageText, sendingDate, message.username, user.firstName)\n\n // );\n\n // const newThreads = [...threads];\n\n // let selectedThread = null;\n // let selectedIndex = -1;\n\n // // Find the matching thread and its index\n // for (let i = 0; i < newThreads.length; i++) {\n // if (newThreads[i].id === message.userId) {\n // selectedThread = newThreads[i];\n // selectedIndex = i;\n // break; // Exit loop once the thread is found\n // }\n // }\n\n // // If a matching thread is found, move it to the top\n // if (selectedThread !== null) {\n // selectedThread.subtitle = message.messageText;\n // newThreads.splice(selectedIndex, 1); // Remove the thread from its current position\n // newThreads.unshift(selectedThread); // Add the thread to the top of the array\n // }\n // // Update the state with the new threads array\n // setThreads(newThreads);\n\n // // if (selectedUser && message.userId === selectedUser.id) {\n\n // // }\n // setThreads((prevThreads) => [\n // ...prevThreads,\n // createThread(\n // user.id,\n // user.firstName,\n // message.messageText,\n // new Date(message.createdAt)\n // )\n // ])\n // // fetchThreads();\n // } else {\n // console.log(\"You cant see the message\");\n // }\n // });\n\n // newSocket.on('disconnect', () => {\n // console.log('Disconnected from server.');\n // });\n\n // return () => {\n // if (newSocket) {\n // newSocket.close();\n // }\n // };\n // }, [user.id]);\n\n // THREADS\n\n // Add this utility function to format the date\n const formatLastMessageTime = (dateInput: string | Date | undefined) => {\n if (!dateInput) return '';\n\n const date = typeof dateInput === 'string' ? new Date(dateInput) : dateInput;\n return date.toLocaleDateString('en-US', {\n weekday: 'long',\n year: 'numeric',\n month: 'long',\n day: 'numeric',\n });\n };\n const formatMessageTime = (date: Date) => {\n return date.toLocaleTimeString('en-US', {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n });\n };\n\n const formatCustomTime = (date: Date) => {\n const d = new Date(date);\n const hours = d.getHours() % 12 || 12; // Convert to 12-hour format\n const minutes = d.getMinutes().toString().padStart(2, '0');\n const seconds = d.getSeconds().toString().padStart(2, '0');\n const ampm = d.getHours() >= 12 ? 'PM' : 'AM';\n\n return `${hours}:${minutes}:${seconds} ${ampm}`;\n };\n\n // const createTextMessage = (\n // message: string,\n // isAdmin: boolean,\n // adminUserName: string,\n // time: any,\n // ): MessageType => {\n // return {\n // type: 'text',\n // id: String(Math.random()),\n // position: 'left',\n // text: message,\n // title: isAdmin ? adminUserName : `${user.firstName} ${user.lastName}`,\n // focus: true,\n // date: time,\n // titleColor: '#BBBBBB',\n // forwarded: false,\n // replyButton: false,\n // removeButton: false,\n // status: 'received',\n // statusTitle: 'MHP',\n // notch: false,\n // copiableDate: true,\n // retracted: false,\n // className: '',\n // };\n // };\n\n const fetchMessages = async () => {\n if (selectedAdminUser && user) {\n // Ensure both IDs are available\n try {\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_API_URL}/messages/conversation?adminId=${selectedAdminUser.id}&userId=${user.id}`,\n );\n const data = await response.json();\n // Map the fetched data to match the expected format\n const sendingDate = new Date();\n // Map the fetched data to match the expected format\n const formattedMessages = data.map((message) =>\n // console.log('qwewqwewqwew',\n // user.id,\n // selectedUser.id,\n // message.message,\n // sendingDate,\n // user.firstName,\n // selectedUser.name\n // ),\n\n createTextMessage(\n user.id,\n adminMsgID,\n message.message,\n sendingDate,\n user.firstName,\n adminUserName,\n message.userName,\n ),\n );\n\n setMessages(formattedMessages);\n messageMarkAsRead();\n } catch (error) {\n console.error('Failed to fetch messages:', error);\n }\n }\n };\n\n const messageMarkAsRead = async () => {\n try {\n const response = await fetch(\n `${process.env.NEXT_PUBLIC_API_URL}/messages/mark-read?senderId=${selectedAdminUser?.id}&receiverId=${user?.id}`,\n );\n // const data = await response.json();\n\n // setMessages(data);\n } catch (error) {\n console.error('Failed to fetch messages:', error);\n }\n };\n\n useEffect(() => {\n // Fetch messages from the backend API\n\n fetchMessages();\n }, [adminMsgID, userId]); // Trigger fetching when selectedAdminUser or user changes\n\n const handleKeyPress = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n handleSendMessage();\n }\n };\n\n const handleSendMessage = () => {\n if (newSocket && inputValue.trim() !== '' && adminMsgID) {\n // Emit message only once\n const sendingDate = new Date();\n\n newSocket.emit('message', {\n reciverId: adminMsgID,\n username: user.firstName + ' ' + user.lastName || 'me',\n senderId: user.id,\n text: inputValue,\n });\n console.log('fdsafdsafdsafdsa');\n console.log({\n reciverId: adminMsgID,\n username: user.firstName + ' ' + user.lastName || 'me',\n senderId: user.id,\n text: inputValue,\n });\n // setMostLatestMsg(\n // createTextMessage(\n // user.id,\n // adminMsgID,\n // inputValue,\n // sendingDate,\n // user.firstName,\n // adminUserName,\n // ),\n // );\n\n // // fetchThreads();\n // threads.forEach((thread) => {\n // if (thread.id === selectedUser.id) {\n // thread.subtitle = inputValue;\n\n // }\n // })\n\n const newThreads = [...threads];\n\n let selectedThread = null;\n let selectedIndex = -1;\n\n // Find the matching thread and its index\n for (let i = 0; i < newThreads.length; i++) {\n if (newThreads[i].id === adminMsgID) {\n selectedThread = newThreads[i];\n selectedIndex = i;\n break; // Exit loop once the thread is found\n }\n }\n\n // If a matching thread is found, move it to the top\n if (selectedThread !== null) {\n selectedThread.latestMessage = inputValue;\n selectedThread.subtitle = inputValue; // Keep subtitle in sync for backward compatibility\n newThreads.splice(selectedIndex, 1); // Remove the thread from its current position\n newThreads.unshift(selectedThread); // Add the thread to the top of the array\n }\n // Update the state with the new threads array\n setThreads(newThreads);\n\n /*end*/\n console.log('user user anme', user.firstName);\n // Update message list in state with only the new message\n setMessages((prevMessages) => [\n ...prevMessages,\n createTextMessage(\n user.id,\n adminMsgID,\n inputValue,\n sendingDate,\n user.firstName,\n adminUserName,\n user.firstName + ' ' + user.lastName,\n ),\n ]);\n // setThreads((prevThreads) => [\n // ...prevThreads,\n // createThread(\n // adminMsgID,\n // adminUserName,\n // inputValue,\n // sendingDate\n // )\n // ])\n\n setInputValue('');\n }\n };\n\n useEffect(() => {\n if (searchTerm.trim() === '') {\n const unArchivedThreads = threads.filter((thread) => !thread.isArchived && !thread.isStarred);\n setFilteredThreads(unArchivedThreads);\n } else {\n const unArchivedThreads = threads.filter(\n (thread) =>\n thread.userName.toLowerCase().includes(searchTerm.toLowerCase()) ||\n thread.subtitle.toLowerCase().includes(searchTerm.toLowerCase()),\n );\n setFilteredThreads(unArchivedThreads);\n }\n }, [searchTerm, threads]);\n\n const handleSearchChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n setSearchTerm(event.target.value);\n };\n\n const filteredUsers = threads.filter((user) =>\n user.title.toLowerCase().includes(searchTerm.toLowerCase()),\n );\n\n useEffect(() => {\n if (id) {\n fetchMessages();\n\n // Directly set the ID or simulate fetching user data\n setAdminMsgID(id as string);\n setSelectedAdminUser({ id: id, name: name as string }); // Replace with actual logic if needed\n // Replace with actual logic if needed\n }\n }, [id]);\n\n return (\n isMounted && (\n <BuyerLayout headerContainerClassName=\"block p-0 h-full \">\n <div className=\"flex justify-end\">\n {/* search */}\n <div className=\"relative\">\n <div className=\"absolute left-3 top-[15px] -translate-y-1/4\">\n <Image src=\"/search-icon-1.png\" alt=\"search\" width={16} height={16} />\n </div>\n <input\n type=\"text\"\n placeholder={t('Search')}\n className=\"w-[189px] pl-10 pr-12 py-2 rounded-full border border-[#DADCE0] focus:border-[#1A73E8] focus:ring-1 focus:ring-[#1A73E8] text-sm\"\n onChange={(e) => {\n setSearchTerm(e.target.value);\n }}\n />\n <div className=\"absolute right-5 top-[15px] -translate-y-1/4 flex items-center\">\n <Image src=\"/searchk.png\" alt=\"search\" width={16} height={16} />\n </div>\n </div>\n {/* search end*/}\n </div>\n {/* <ChatV1 /> */}\n <Box className=\" flex h-[100vh] pt-10 gap-2 \">\n {/* left panel */}\n <BorderRight500>\n {/* <TextField\n id=\"outlined-basic-email\"\n label=\"Search\"\n variant=\"outlined\"\n onChange={handleSearchChange}\n fullWidth\n style={{ margin: '10px 0' }}\n sx={{\n '& .MuiOutlinedInput-root': {\n '&.Mui-focused .MuiOutlinedInput-notchedOutline': {\n borderColor: 'rgba(10, 170, 130, 1)',\n },\n },\n '& .MuiInputLabel-root': {\n '&.Mui-focused': {\n color: 'rgba(10, 170, 130, 1)',\n },\n },\n }}\n />\n <Divider /> */}\n <List component={Box}>\n {filteredThreads.length === 0 ? (\n <ListItem\n sx={{\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n height: '100px',\n backgroundColor: '#f5f5f5',\n borderRadius: '10px',\n }}\n >\n <Typography>{t('No chats found')}</Typography>\n </ListItem>\n ) : (\n filteredThreads.map((thread) => (\n <Box\n sx={{\n padding: '6px',\n // display: 'flex',\n // alignItems: 'flex-start',\n gap: '12px',\n width: '100%',\n textAlign: 'left',\n borderBottom: '1px solid #EAECF0',\n translate: '0px 0px',\n transition: 'all 0.3s ease',\n '&:hover': {\n translate: '0px -5px',\n },\n }}\n >\n <ListItem\n component=\"button\"\n key={thread.id}\n onClick={() => {\n setSelectedAdminUser({\n id: thread?.id,\n name: thread?.title,\n isPinned: thread?.isPinned,\n isStarred: thread?.isStarred,\n isArchived: thread?.isArchived,\n });\n setAdminMsgID(thread?.id);\n setUserId(user.id);\n setAdminUserName(thread?.title);\n }}\n sx={{\n // padding: '16px 24px',\n display: 'flex',\n alignItems: 'flex-start',\n gap: '12px',\n width: '100%',\n textAlign: 'left',\n overflow: 'hidden',\n backgroundColor:\n selectedAdminUser?.id === thread.id ? '#EFEFEF' : 'transparent',\n border: selectedAdminUser?.id === thread.id ? '1px solid #2F2F2F' : 'none',\n color: selectedAdminUser?.id === thread.id ? 'white' : 'inherit',\n '&:hover': {\n backgroundColor: '#f5f5f5',\n },\n borderRadius: '8px',\n }}\n >\n <Box sx={{ position: 'relative' }}>\n <Avatar\n sx={{\n bgcolor: '#000000',\n width: { xs: 30, xl: 40 },\n height: { xs: 30, xl: 40 },\n color: '#ffffff',\n fontFamily: 'PlusJakartaSans',\n }}\n >\n <PersonOutlineIcon sx={{ fontSize: { xs: 17, xl: 24 } }} />\n </Avatar>\n {thread?.isPinned && (\n <Box\n sx={{\n position: 'absolute',\n top: -4,\n left: -4,\n backgroundColor: 'orange',\n borderRadius: '50%',\n width: 18,\n height: 18,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n border: '1.5px solid #000',\n boxShadow: '0px 1px 2px rgba(0, 0, 0, 0.1)',\n }}\n >\n <PushPinOutlinedIcon\n sx={{\n fontSize: 12,\n color: '#000',\n }}\n />\n </Box>\n )}\n </Box>\n <ListItemText\n primary={\n <Box className=\"flex justify-between gap-1 w-full items-center\">\n <Typography\n sx={{\n color: '#101828',\n fontSize: '14px',\n fontWeight: 600,\n fontFamily: 'PlusJakartaSans',\n }}\n >\n {thread.title}\n </Typography>\n <Typography\n sx={{\n color: '#475467',\n fontSize: '10px',\n fontWeight: 400,\n fontFamily: 'PlusJakartaSans',\n }}\n >\n {formatLastMessageTime(thread?.lastMessageTime)}\n </Typography>\n </Box>\n }\n secondary={\n <Typography\n sx={{\n color: '#475467',\n fontSize: '14px',\n fontWeight: 400,\n maxWidth: '230px',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n fontFamily: 'PlusJakartaSans',\n }}\n >\n {thread.latestMessage || ''}\n </Typography>\n }\n sx={{\n margin: 0,\n '& .MuiListItemText-primary': {\n marginBottom: '4px',\n },\n }}\n />\n </ListItem>\n </Box>\n ))\n )}\n </List>\n </BorderRight500>\n\n {/* center panel */}\n {!adminMsgID ? (\n <Box className=\"flex flex-col flex-1 border border-[#e0e0e0] rounded-xl bg-blue-200 p-4\">\n {/* <Box className=\"flex flex-col justify-center items-center h-[70%] text-[#1C1A27] \">\n <ChatIcon sx={{ fontSize: '50px' }} />\n <Typography variant=\"h6\" align=\"center\" >\n {t('Select a user to chat')}\n </Typography>\n \n </Box> */}\n <StartConversation />\n </Box>\n ) : (\n <Box\n sx={{\n flex: 1,\n padding: '20px',\n maxHeight: '100%',\n display: 'flex',\n flexDirection: 'column',\n justifyContent: 'space-between',\n overflowY: 'auto',\n scrollbarWidth: 'none',\n border: '1px solid #e0e0e0',\n borderRadius: '25px',\n }}\n >\n <Box className=\"flex justify-between items-center mb-5 text-[#1C1A27]\">\n <Box\n sx={{\n display: 'flex',\n alignItems: 'center',\n gap: '1rem',\n }}\n >\n <Typography\n className=\"capitalize tracking-wide\"\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '16px',\n fontWeight: '600',\n maxWidth: '172px',\n whiteSpace: 'nowrap',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n }}\n >\n {t('Chat with')} {selectedAdminUser?.name}\n </Typography>\n {messages.length > 0 && !isChatArchived && (\n <IconButton\n onClick={handleChatStar}\n sx={{\n padding: '4px',\n '&:hover': {\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n },\n }}\n >\n {isChatStarred ? (\n <StarIcon\n sx={{\n fontSize: 24,\n color: '#0776FF',\n padding: '2px',\n }}\n />\n ) : (\n <StarOutlineIcon\n sx={{\n fontSize: 24,\n padding: '2px',\n }}\n />\n )}\n </IconButton>\n )}\n\n {selectedUser?.lastMessageTime && (\n <Box\n sx={{\n backgroundColor: '#F6F5F8',\n borderRadius: '35px',\n padding: '10px',\n }}\n >\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n color: '#696767',\n }}\n >\n {formatLastMessageTime(selectedUser?.lastMessageTime)}\n </Typography>\n </Box>\n )}\n </Box>\n {/* Right side - buttons */}\n <Box className=\"flex flex-wrap gap-3\">\n {messages.length > 0 && !isChatArchived && (\n <Button\n startIcon={\n <PushPinOutlinedIcon\n sx={{\n fontSize: 20,\n color: selectedAdminUser?.isPinned ? '#000000' : '#344054',\n }}\n />\n }\n onClick={handleChatPining}\n sx={{\n borderRadius: '100px',\n padding: '10px 20px',\n backgroundColor: selectedAdminUser?.isPinned ? '#FFA500' : '',\n border: '0.5px solid #C5C5C5',\n boxShadow: 'none',\n '&:hover': {\n backgroundColor: selectedAdminUser?.isPinned ? '#FF8C00' : '#E5E7EB',\n boxShadow: 'none',\n },\n gap: '4px',\n }}\n >\n <Typography\n sx={{\n fontSize: '14px',\n fontWeight: 500,\n color: selectedAdminUser?.isPinned ? '#000000' : '#344054',\n textTransform: 'none',\n fontFamily: 'PlusJakartaSans',\n lineHeight: '20px',\n }}\n >\n {selectedAdminUser?.isPinned ? t('Unpin') : t('Pin')}\n </Typography>\n </Button>\n )}\n\n {messages.length > 0 &&\n !selectedAdminUser?.isPinned &&\n !selectedAdminUser?.isStarred && (\n <Button\n endIcon={\n <ArchiveOutlinedIcon\n sx={{\n fontSize: 20,\n }}\n />\n }\n onClick={handleArchiveChat}\n sx={{\n borderRadius: '100px',\n padding: '10px 20px',\n gap: '5px',\n border: '0.5px solid #C5C5C5',\n textTransform: 'none',\n backgroundColor: selectedAdminUser?.isArchived ? '#FFA500' : '',\n color: '#000',\n '&:hover': {\n border: '0.5px solid #C5C5C5',\n backgroundColor: 'rgba(0, 0, 0, 0.04)',\n },\n }}\n >\n <Typography\n sx={{\n fontFamily: 'PlusJakartaSans',\n fontSize: '14px',\n fontWeight: 500,\n }}\n >\n {selectedAdminUser?.isArchived === true ? t('Unarchive') : t('Archive')}\n </Typography>\n </Button>\n )}\n </Box>\n </Box>\n\n {/* <Typography variant=\"h6\" align=\"center\" gutterBottom>\n {selectedAdminUser\n ? `${t('Chatting with')} ${selectedAdminUser.name} `\n : t('Select a user to chat')}\n </Typography> */}\n\n <MessageArea>\n {messages?.length === 0 && (\n <Typography\n variant=\"body1\"\n color=\"textPrimary\"\n style={{\n display: 'block',\n textAlign: 'center',\n }}\n >\n {t('No messages')}\n </Typography>\n )}\n {messages?.map((message, index) => {\n console.log('🚀 ~ {messages?.map ~ message:', message);\n const userName = user.firstName + ' ' + user.lastName;\n const isUserMessage = message.displayName === userName || message.displayName === 'me';\n console.log('🚀 ~ {messages?.map ~ isUserMessage:', isUserMessage);\n return (\n <ListItem key={index} sx={{\n display: 'flex',\n justifyContent: isUserMessage ? 'end' : 'start',\n padding: '8px 16px',\n }}>\n <div>\n\n <ListItemText\n primary={\n <div className={`flex gap-1 items-center ${isUserMessage ? 'flex-row-reverse' : ''} `}>\n <Avatar\n sx={{\n bgcolor: '#000000',\n width: 32,\n height: 32,\n color: '#ffffff',\n fontFamily: 'PlusJakartaSans',\n }}\n >\n <PersonOutlineIcon sx={{ fontSize: 20 }} />\n </Avatar>\n <div className={`${isUserMessage ? 'text-right' : 'text-left'}`}>\n <Typography\n variant=\"body1\"\n color=\"textSecondary\"\n style={{\n backgroundColor: isUserMessage ? '#F5EFDA' : '#E8F5E9',\n padding: '12px',\n width: '100%',\n borderRadius: isUserMessage\n ? '12px 12px 0px 12px'\n : '12px 12px 12px 0px',\n minHeight: '40px',\n display: 'inline-block',\n wordBreak: 'break-word',\n whiteSpace: 'pre-wrap',\n overflowWrap: 'break-word',\n }}\n >\n {message.text}\n </Typography>\n <div className={`flex items-center pt-1 gap-1 ${isUserMessage ? 'justify-end' : ''}`}>\n <p\n style={{\n display: 'block',\n fontSize: '12px',\n fontWeight: '500',\n }}\n >\n {message.displayName === null ? t('sender') : message.displayName}\n </p>\n <Typography\n variant=\"caption\"\n color=\"textSecondary\"\n >\n {formatMessageTime(message.date)}\n </Typography>\n </div>\n </div>\n </div>\n }\n />\n </div>\n\n </ListItem>\n );\n })}\n <div ref={messageEndRef} />\n </MessageArea>\n\n {/* <Divider /> */}\n {/* message input */}\n <Box\n sx={{\n width: '100%',\n padding: '0 2rem',\n backgroundColor: 'white',\n paddingBottom: '1rem',\n paddingTop: '1rem',\n borderTop: '1px solid #e0e0e0',\n }}\n >\n <TextField\n fullWidth\n placeholder={t('Write something here')}\n value={inputValue}\n onChange={(e) => setInputValue(e.target.value)}\n onKeyPress={handleKeyPress}\n InputProps={{\n endAdornment: (\n <Button\n onClick={handleSendMessage}\n sx={{\n backgroundColor: '#2CE25D',\n borderRadius: '35px',\n padding: '10px 20px',\n gap: '6px',\n minWidth: 'auto',\n height: '45px',\n marginRight: '8px',\n '&:hover': {\n backgroundColor: '#25c951',\n },\n display: 'flex',\n alignItems: 'center',\n }}\n >\n <Typography\n sx={{\n color: '#222B36',\n fontSize: '14px',\n fontWeight: 600,\n fontFamily: 'PlusJakartaSans',\n textTransform: 'none',\n }}\n >\n {t('Send')}\n </Typography>\n <SendOutlinedIcon\n sx={{\n fontSize: '19px',\n color: '#222B36',\n transform: 'rotate(-45deg)',\n marginLeft: '2px',\n }}\n />\n </Button>\n ),\n sx: {\n height: '73px',\n borderRadius: '100px',\n border: '0.5px solid #C5C5C5',\n paddingLeft: '20px',\n paddingRight: '10px',\n '&.MuiInputBase-input': {\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n fontWeight: 400,\n color: '#000000',\n '&::placeholder': {\n color: '#000000',\n opacity: 1,\n fontFamily: 'PlusJakartaSans',\n fontWeight: 400,\n },\n },\n '& .MuiOutlinedInput-root': {\n '& fieldset': {\n borderColor: '#C5C5C5',\n borderWidth: '0.5px',\n },\n },\n },\n }}\n sx={{\n '& .MuiInputBase-input': {\n fontFamily: 'PlusJakartaSans',\n fontSize: '12px',\n fontWeight: 400,\n color: '#000000',\n '&::placeholder': {\n color: '#000000',\n opacity: 1,\n fontFamily: 'PlusJakartaSans',\n fontWeight: 400,\n },\n },\n '& .MuiOutlinedInput-root': {\n '& fieldset': {\n borderColor: '#C5C5C5',\n borderWidth: '0.5px',\n },\n },\n }}\n />\n </Box>\n </Box>\n )}\n\n {/* right panel */}\n <RightPanel\n starredThreads={starredThreadsList}\n archivedThreads={archivedThreadsList}\n handleChatItemClick={handleChatItemClick}\n handleToggleStar={handleToggleStar}\n handleToggleArchive={handleToggleArchive}\n toggleStarred={toggleStarred}\n setToggleStarred={setToggleStarred}\n fetchStarredLoading={fetchStarredLoading}\n fetchArchivedLoading={fetchArchivedLoading}\n setUserId={setUserId}\n setAdminMsgID={setAdminMsgID}\n />\n </Box>\n </BuyerLayout>\n )\n );\n};\n","import { Modal } from '@components/modal';\nimport { ReactNode } from 'react';\nimport clsx from 'clsx';\nimport { useDashboardModal } from '@hooks';\n\nexport const DashboardInfoModal = ({\n onClose: onCloseProp,\n open,\n children,\n panelClassName,\n title,\n onBackButton,\n rightSideButton = <div className=\"w-[24px]\"></div>,\n}: {\n onClose: () => void;\n open: boolean;\n children: ReactNode;\n panelClassName?: string;\n title: ReactNode;\n rightSideButton?: ReactNode;\n onBackButton?: () => void;\n}) => {\n const { setCurrentModal } = useDashboardModal();\n const onClose = () => {\n if (onCloseProp) {\n onCloseProp();\n } else {\n setCurrentModal(null);\n }\n };\n\n return (\n <Modal\n open={open}\n onClose={onClose}\n wrapperClassName=\"flex flex-col min-h-[100%] lg:p-4 items-center justify-center text-center lg:items-end lg:p-0\"\n panelClassName={clsx(\n 'w-full lg:max-w-[480px] text-left flex flex-col flex-grow lg:flex lg:overflow-visible',\n panelClassName,\n )}\n >\n <div className=\"flex items-center py-5 lg:py-6 px-6 border-b border-b-gray-200\">\n <button\n className={clsx('z-[1]', {\n 'lg:hidden': !onBackButton,\n })}\n onClick={() => {\n if (onBackButton) {\n onBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.5 12H6M6 12L12 6M6 12L12 18\" stroke=\"#212121\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n\n </button>\n\n <div\n className={clsx('mx-auto lg:mx-0 lg:mr-auto w-max font-medium text-gray-900 lg:text-xl', {\n 'lg:ml-3': onBackButton,\n })}\n >\n {title}\n </div>\n {rightSideButton}\n <button\n className={clsx('z-[1] lg:ml-4', {\n 'lg:hidden': onBackButton,\n 'hidden lg:block': !onBackButton,\n })}\n onClick={() => {\n onClose();\n }}\n type=\"button\"\n >\n <svg width={24} strokeWidth={2} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n </div>\n {children}\n </Modal>\n );\n};\n","import { useOnboarding } from '@hooks';\nimport { commonRoutes } from '@utils';\nimport clsx from 'clsx';\nimport { Button } from '@components/button';\nimport { Form } from '@components/form';\nimport { Modal } from '@components/modal';\nimport { useRouter } from 'next/router';\nimport { ReactNode } from 'react';\n\nexport const FullModal = ({\n onClose,\n open,\n methods,\n onSubmit,\n modelShow = true,\n children,\n title,\n header,\n onClickBackButton,\n alwaysShowCloseButton,\n alwaysShowBackButton,\n panelClassName,\n titleClassName,\n showFeedbackButton,\n canSkip = false,\n onSkip = () => null,\n}: {\n onClose: () => void;\n open: boolean;\n alwaysShowCloseButton?: boolean;\n alwaysShowBackButton?: boolean;\n methods?: any;\n onSubmit?: any;\n modelShow?: boolean;\n\n children: ReactNode;\n title?: string;\n header?: ReactNode;\n onClickBackButton?: () => void;\n panelClassName?: string;\n titleClassName?: string;\n showFeedbackButton?: boolean;\n canSkip?: boolean;\n onSkip?: () => void;\n}) => {\n const Element = methods && onSubmit ? Form : 'div';\n const { setCurrentModal } = useOnboarding();\n const router = useRouter();\n const isOnSettings = router.pathname.includes('settings');\n\n\n return (\n <>\n {/* {modelShow ? (\n <Modal\n open={open}\n onClose={onClose}\n wrapperClassName=\"flex flex-col lg:flex-row lg:min-h-[90%] min-h-[100%] lg:p-4 items-center justify-center text-center\"\n panelClassName={clsx(\n 'w-full lg:rounded-lg text-left flex flex-col flex-grow lg:block lg:overflow-visible',\n panelClassName,\n )}\n >\n <Element\n wrapperClassName=\"h-full flex flex-col flex-grow \"\n className=\"h-full flex flex-col flex-grow\"\n onSubmit={onSubmit}\n methods={methods}\n >\n <div className=\"flex items-center py-5 lg:py-6 px-6 z-20\">\n {alwaysShowBackButton ? (\n <button\n className=\"z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.5 12H6M6 12L12 6M6 12L12 18\" stroke=\"#212121\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n\n </button>\n ) : (\n <button\n className=\"lg:hidden z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.5 12H6M6 12L12 6M6 12L12 18\" stroke=\"#212121\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n\n </button>\n )}\n\n {showFeedbackButton ? (\n <div className=\"flex justify-between w-full border border-red\">\n <p className=\"mx-auto lg:mx-0 w-max font-medium font-slab text-gray-900 pr-5 lg:text-xl text-center \">\n {title}\n </p>\n <button\n onClick={() => {\n if (isOnSettings) {\n router.push(commonRoutes.buyer.auth.feedback);\n } else {\n setCurrentModal('feedback');\n }\n }}\n className=\"lg:ml-auto lg:mr-4\"\n type=\"button\"\n >\n <svg viewBox=\"0 0 24 24\" width={24} className=\"keep-color\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 8V12M12 16.01L12.01 15.999M12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2C6.477 2 2 6.477 2 12C2 13.821 2.487 15.53 3.338 17L2.5 21.5L7 20.662C8.51954 21.5411 10.2445 22.0027 12 22V22Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n\n </button>\n </div>\n ) : header ? (\n header\n ) : (\n <p className=\"mx-auto lg:mx-0 font-medium font-slab text-gray-900 pr-5 lg:text-xl w-full text-center\">\n {title}\n </p>\n )}\n\n {alwaysShowCloseButton ? (\n <button className=\"ml-auto\" onClick={() => onClose()} type=\"button\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" strokeWidth={2} width={20} viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg>\n </button>\n ) : (\n <button\n className=\"lg:block hidden\"\n onClick={() => {\n onClose();\n }}\n type=\"button\"\n >\n \n </button>\n )}\n </div>\n \n {children}\n </Element>\n </Modal>\n ) : (\n <>\n <Element\n wrapperClassName=\"h-full bg-red flex w-full flex-col flex-grow\"\n className=\"h-full bg-red w-full flex flex-col flex-grow\"\n onSubmit={onSubmit}\n methods={methods}\n >\n <div className={clsx('flex items-center py-5 lg:py-6 px-2', titleClassName)}>\n {alwaysShowBackButton ? (\n <button\n className=\"z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.5 12H6M6 12L12 6M6 12L12 18\" stroke=\"#212121\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n\n </button>\n ) : (\n <button\n className=\"lg:hidden z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n \n\n </button>\n )}\n\n {showFeedbackButton ? (\n <div className=\"flex justify-between w-full\">\n <p className=\"mx-auto lg:mx-0 w-max font-medium text-center font-slab text-gray-900 pr-5 lg:text-xl\">\n {title}\n </p>\n <button\n onClick={() => {\n if (isOnSettings) {\n router.push(commonRoutes.buyer.auth.feedback);\n } else {\n setCurrentModal('feedback');\n }\n }}\n className=\"lg:ml-auto lg:mr-4\"\n type=\"button\"\n >\n <svg viewBox=\"0 0 24 24\" width={24} className=\"keep-color\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M12 8V12M12 16.01L12.01 15.999M12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2C6.477 2 2 6.477 2 12C2 13.821 2.487 15.53 3.338 17L2.5 21.5L7 20.662C8.51954 21.5411 10.2445 22.0027 12 22V22Z\"\n stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg>\n </button>\n </div>\n ) : header ? (\n header\n ) : (\n <div className={clsx('text-[25px] text-center w-full font-bold')}>{title} </div>\n )}\n {canSkip && (\n <Button className=\"lg:hidden\" type=\"button\" variant=\"text-primary\" onClick={onSkip}>\n skip\n </Button>\n )}\n \n </div>\n 123\n {children}\n </Element>\n </>\n )} */}\n \n <Modal\n open={open}\n onClose={onClose}\n wrapperClassName=\"flex flex-col lg:flex-row lg:min-h-[90%] min-h-[100%] lg:p-4 items-center justify-center text-center\"\n panelClassName={clsx(\n 'w-full lg:rounded-lg text-left flex flex-col flex-grow lg:block lg:overflow-visible',\n panelClassName,\n )}\n >\n <Element\n wrapperClassName=\"h-full flex flex-col flex-grow \"\n className=\"h-full flex flex-col flex-grow\"\n onSubmit={onSubmit}\n methods={methods}\n >\n <div className=\"flex items-center py-5 lg:py-6 px-6 z-20\">\n {alwaysShowBackButton ? (\n <button\n className=\"z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.5 12H6M6 12L12 6M6 12L12 18\"\n stroke=\"#212121\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n ) : (\n <button\n className=\"lg:hidden z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M18.5 12H6M6 12L12 6M6 12L12 18\"\n stroke=\"#212121\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n )}\n\n {showFeedbackButton ? (\n <div className=\"flex justify-between w-full border border-red\">\n <p className=\"mx-auto lg:mx-0 w-max font-medium font-slab text-gray-900 pr-5 lg:text-xl text-center \">\n {title}\n </p>\n <button\n onClick={() => {\n if (isOnSettings) {\n router.push(commonRoutes.buyer.auth.feedback);\n } else {\n setCurrentModal('feedback');\n }\n }}\n className=\"lg:ml-auto lg:mr-4\"\n type=\"button\"\n >\n <svg\n viewBox=\"0 0 24 24\"\n width={24}\n className=\"keep-color\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12 8V12M12 16.01L12.01 15.999M12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2C6.477 2 2 6.477 2 12C2 13.821 2.487 15.53 3.338 17L2.5 21.5L7 20.662C8.51954 21.5411 10.2445 22.0027 12 22V22Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n ) : header ? (\n header\n ) : (\n <p className=\"mx-auto lg:mx-0 font-medium font-slab text-gray-900 pr-5 lg:text-xl w-full text-center\">\n {title}\n </p>\n )}\n\n {alwaysShowCloseButton ? (\n <button className=\"ml-auto\" onClick={() => onClose()} type=\"button\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n strokeWidth={2}\n width={20}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n />\n </svg>\n </button>\n ) : (\n <button\n className=\"lg:block hidden\"\n onClick={() => {\n onClose();\n }}\n type=\"button\"\n >\n {/* <svg xmlns=\"http://www.w3.org/2000/svg\" strokeWidth={2} width={20} viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg> */}\n </button>\n )}\n </div>\n\n {children}\n </Element>\n </Modal>\n </>\n );\n};\n\nexport const CompleteModal = ({\n onClose,\n open,\n children,\n panelClassName,\n}: {\n onClose: () => void;\n open: boolean;\n children: ReactNode;\n panelClassName?: string;\n}) => {\n return (\n <Modal\n open={open}\n onClose={onClose}\n wrapperClassName=\"flex flex-col lg:flex-row lg:min-h-[90%] min-h-[100%] lg:p-4 items-center justify-center text-center\"\n panelClassName={clsx(\n 'w-full lg:max-w-[480px] lg:rounded-lg text-left flex flex-col flex-grow lg:block lg:overflow-visible',\n panelClassName,\n )}\n >\n {children}\n </Modal>\n );\n};\n\nexport const CompleteModalForm = ({\n onClose,\n methods,\n onSubmit,\n children,\n title,\n header,\n onClickBackButton,\n alwaysShowCloseButton,\n alwaysShowBackButton,\n hideBackButton,\n}: {\n onClose: () => void;\n alwaysShowCloseButton?: boolean;\n alwaysShowBackButton?: boolean;\n methods?: any;\n onSubmit?: any;\n children: ReactNode;\n title?: string;\n header?: ReactNode;\n onClickBackButton?: () => void;\n hideBackButton?: boolean;\n}) => {\n return (\n <Form\n wrapperClassName=\"h-full flex flex-col flex-grow\"\n className=\"h-full flex flex-col flex-grow \"\n onSubmit={onSubmit}\n methods={methods}\n >\n <div className=\"flex items-center py-5 lg:py-6 \">\n {' '}\n {/* removed code border-b border-b-gray-200 */}\n {!hideBackButton && (\n <>\n {alwaysShowBackButton ? (\n <button\n className=\"z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n {/* <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.5 12H6M6 12L12 6M6 12L12 18\" stroke=\"#212121\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg> */}\n </button>\n ) : (\n <button\n className=\"lg:hidden z-[1]\"\n onClick={() => {\n if (onClickBackButton) {\n onClickBackButton();\n } else {\n onClose();\n }\n }}\n type=\"button\"\n >\n {/* <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M18.5 12H6M6 12L12 6M6 12L12 18\" stroke=\"#212121\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n </svg> */}\n </button>\n )}\n </>\n )}\n {header ? (\n header\n ) : (\n <p className=\"mx-auto lg:mx-0 w-max font-medium font-slab text-gray-900 pr-5 lg:text-xl\">\n {title}\n </p>\n )}\n {alwaysShowCloseButton ? (\n <button className=\"ml-auto z-20\" onClick={() => onClose()} type=\"button\">\n {/* <svg xmlns=\"http://www.w3.org/2000/svg\" strokeWidth={2} width={20} viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg> */}\n </button>\n ) : (\n alwaysShowCloseButton && (\n <button\n className=\"lg:block ml-auto z-20 hidden\"\n onClick={() => onClose()}\n type=\"button\"\n >\n {/* <svg xmlns=\"http://www.w3.org/2000/svg\" strokeWidth={2} width={20} viewBox=\"0 0 24 24\" fill=\"none\">\n <path d=\"M18 6L6 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n <path d=\"M6 6L18 18\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n </svg> */}\n </button>\n )\n )}\n </div>\n {children}\n </Form>\n );\n};\n","import { CleanModal } from 'components/modal';\nimport CloseOutlinedIcon from '@mui/icons-material/CloseOutlined';\nimport { Button } from 'components/button';\nimport { MouseEventHandler, ReactNode } from 'react';\n\nexport const GenericModal = ({\n title,\n content,\n actionTitle,\n onActionClick,\n cancelActionTitle,\n cancelAction,\n actionForm,\n onClose,\n}: {\n title: ReactNode | string;\n content: ReactNode;\n actionTitle?: string;\n cancelActionTitle?: string;\n cancelAction?: MouseEventHandler;\n onActionClick?: MouseEventHandler;\n actionForm?: string;\n onClose?: Function;\n}) => {\n return (\n <CleanModal\n open\n onClose={() => !!onClose && onClose()}\n wrapperClassName=\"p-2 md:!items-center \"\n panelClassName=\"w-full w-[450px] rounded-[35px]\"\n >\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center justify-between w-full mb-[0px]\">\n <h3 className=\" text-[25px] font-bold text-[#1C1A27]\">{title}</h3>\n {/* {!!onClose && (\n <button onClick={() => onClose()} type=\"button\">\n <CloseOutlinedIcon />\n </button>\n )} */}\n </div>\n </div>\n <div className=\"text-[15px] text-[#635E7D] leading-[22px]\">\n <div className=\"mb-[30px] p-2 md:p-10\">{content}</div>\n <div className=\"flex\">\n {cancelActionTitle && (\n <Button variant=\"white\" className=\"mr-[20px] outline-black\" type=\"button\" onClick={cancelAction}>\n {cancelActionTitle}\n </Button>\n )}\n {actionTitle && (\n <Button\n form={actionForm}\n type={actionForm ? 'submit' : 'button'}\n variant=\"primary\"\n onClick={onActionClick}\n >\n {actionTitle}\n </Button>\n )}\n </div>\n </div>\n </CleanModal>\n );\n};\n","import{useRef as t}from\"react\";import{useWindowEvent as a}from'./use-window-event.js';var s=(r=>(r[r.Forwards=0]=\"Forwards\",r[r.Backwards=1]=\"Backwards\",r))(s||{});function n(){let e=t(0);return a(\"keydown\",o=>{o.key===\"Tab\"&&(e.current=o.shiftKey?1:0)},!0),e}export{s as Direction,n as useTabDirection};\n","import{useMemo as t}from\"react\";import{getOwnerDocument as o}from'../utils/owner.js';function n(...e){return t(()=>o(...e),[...e])}export{n as useOwnerDocument};\n","import{useEffect as d}from\"react\";import{useLatestValue as s}from'./use-latest-value.js';function E(n,e,a,t){let i=s(a);d(()=>{n=n!=null?n:window;function r(o){i.current(o)}return n.addEventListener(e,r,t),()=>n.removeEventListener(e,r,t)},[n,e,t])}export{E as useEventListener};\n","function t(n){function e(){document.readyState!==\"loading\"&&(n(),document.removeEventListener(\"DOMContentLoaded\",e))}typeof window!=\"undefined\"&&typeof document!=\"undefined\"&&(document.addEventListener(\"DOMContentLoaded\",e),e())}export{t as onDocumentReady};\n","import{useRef as u,useEffect as n}from\"react\";import{microTask as o}from'../utils/micro-task.js';import{useEvent as f}from'./use-event.js';function c(t){let r=f(t),e=u(!1);n(()=>(e.current=!1,()=>{e.current=!0,o(()=>{e.current&&r()})}),[r])}export{c as useOnUnmount};\n","import E,{useRef as L}from\"react\";import{forwardRefWithAs as U,render as N}from'../../utils/render.js';import{useServerHandoffComplete as I}from'../../hooks/use-server-handoff-complete.js';import{useSyncRefs as x}from'../../hooks/use-sync-refs.js';import{Features as R,Hidden as g}from'../../internal/hidden.js';import{focusElement as f,focusIn as M,Focus as p,FocusResult as w}from'../../utils/focus-management.js';import{match as k}from'../../utils/match.js';import{useEvent as A}from'../../hooks/use-event.js';import{useTabDirection as G,Direction as H}from'../../hooks/use-tab-direction.js';import{useIsMounted as C}from'../../hooks/use-is-mounted.js';import{useOwnerDocument as K}from'../../hooks/use-owner.js';import{useEventListener as W}from'../../hooks/use-event-listener.js';import{microTask as O}from'../../utils/micro-task.js';import{useWatch as F}from'../../hooks/use-watch.js';import{useDisposables as V}from'../../hooks/use-disposables.js';import{onDocumentReady as q}from'../../utils/document-ready.js';import{useOnUnmount as D}from'../../hooks/use-on-unmount.js';function P(t){if(!t)return new Set;if(typeof t==\"function\")return new Set(t());let r=new Set;for(let e of t.current)e.current instanceof HTMLElement&&r.add(e.current);return r}let J=\"div\";var h=(n=>(n[n.None=1]=\"None\",n[n.InitialFocus=2]=\"InitialFocus\",n[n.TabLock=4]=\"TabLock\",n[n.FocusLock=8]=\"FocusLock\",n[n.RestoreFocus=16]=\"RestoreFocus\",n[n.All=30]=\"All\",n))(h||{});function X(t,r){let e=L(null),o=x(e,r),{initialFocus:u,containers:i,features:n=30,...l}=t;I()||(n=1);let m=K(e);Y({ownerDocument:m},Boolean(n&16));let c=Z({ownerDocument:m,container:e,initialFocus:u},Boolean(n&2));$({ownerDocument:m,container:e,containers:i,previousActiveElement:c},Boolean(n&8));let v=G(),y=A(s=>{let T=e.current;if(!T)return;(B=>B())(()=>{k(v.current,{[H.Forwards]:()=>{M(T,p.First,{skipElements:[s.relatedTarget]})},[H.Backwards]:()=>{M(T,p.Last,{skipElements:[s.relatedTarget]})}})})}),_=V(),b=L(!1),j={ref:o,onKeyDown(s){s.key==\"Tab\"&&(b.current=!0,_.requestAnimationFrame(()=>{b.current=!1}))},onBlur(s){let T=P(i);e.current instanceof HTMLElement&&T.add(e.current);let d=s.relatedTarget;d instanceof HTMLElement&&d.dataset.headlessuiFocusGuard!==\"true\"&&(S(T,d)||(b.current?M(e.current,k(v.current,{[H.Forwards]:()=>p.Next,[H.Backwards]:()=>p.Previous})|p.WrapAround,{relativeTo:s.target}):s.target instanceof HTMLElement&&f(s.target)))}};return E.createElement(E.Fragment,null,Boolean(n&4)&&E.createElement(g,{as:\"button\",type:\"button\",\"data-headlessui-focus-guard\":!0,onFocus:y,features:R.Focusable}),N({ourProps:j,theirProps:l,defaultTag:J,name:\"FocusTrap\"}),Boolean(n&4)&&E.createElement(g,{as:\"button\",type:\"button\",\"data-headlessui-focus-guard\":!0,onFocus:y,features:R.Focusable}))}let z=U(X),ge=Object.assign(z,{features:h}),a=[];q(()=>{function t(r){r.target instanceof HTMLElement&&r.target!==document.body&&a[0]!==r.target&&(a.unshift(r.target),a=a.filter(e=>e!=null&&e.isConnected),a.splice(10))}window.addEventListener(\"click\",t,{capture:!0}),window.addEventListener(\"mousedown\",t,{capture:!0}),window.addEventListener(\"focus\",t,{capture:!0}),document.body.addEventListener(\"click\",t,{capture:!0}),document.body.addEventListener(\"mousedown\",t,{capture:!0}),document.body.addEventListener(\"focus\",t,{capture:!0})});function Q(t=!0){let r=L(a.slice());return F(([e],[o])=>{o===!0&&e===!1&&O(()=>{r.current.splice(0)}),o===!1&&e===!0&&(r.current=a.slice())},[t,a,r]),A(()=>{var e;return(e=r.current.find(o=>o!=null&&o.isConnected))!=null?e:null})}function Y({ownerDocument:t},r){let e=Q(r);F(()=>{r||(t==null?void 0:t.activeElement)===(t==null?void 0:t.body)&&f(e())},[r]),D(()=>{r&&f(e())})}function Z({ownerDocument:t,container:r,initialFocus:e},o){let u=L(null),i=C();return F(()=>{if(!o)return;let n=r.current;n&&O(()=>{if(!i.current)return;let l=t==null?void 0:t.activeElement;if(e!=null&&e.current){if((e==null?void 0:e.current)===l){u.current=l;return}}else if(n.contains(l)){u.current=l;return}e!=null&&e.current?f(e.current):M(n,p.First)===w.Error&&console.warn(\"There are no focusable elements inside the <FocusTrap />\"),u.current=t==null?void 0:t.activeElement})},[o]),u}function $({ownerDocument:t,container:r,containers:e,previousActiveElement:o},u){let i=C();W(t==null?void 0:t.defaultView,\"focus\",n=>{if(!u||!i.current)return;let l=P(e);r.current instanceof HTMLElement&&l.add(r.current);let m=o.current;if(!m)return;let c=n.target;c&&c instanceof HTMLElement?S(l,c)?(o.current=c,f(c)):(n.preventDefault(),n.stopPropagation(),f(m)):f(o.current)},!0)}function S(t,r){for(let e of t)if(e.contains(r))return!0;return!1}export{ge as FocusTrap};\n","import t,{createContext as r,useContext as c}from\"react\";let e=r(!1);function l(){return c(e)}function P(o){return t.createElement(e.Provider,{value:o.force},o.children)}export{P as ForcePortalRoot,l as usePortalRoot};\n","import T,{Fragment as P,createContext as m,useContext as s,useEffect as d,useRef as g,useState as R,useMemo as E}from\"react\";import{createPortal as H}from\"react-dom\";import{forwardRefWithAs as c,render as y}from'../../utils/render.js';import{useIsoMorphicEffect as x}from'../../hooks/use-iso-morphic-effect.js';import{usePortalRoot as b}from'../../internal/portal-force-root.js';import{useServerHandoffComplete as h}from'../../hooks/use-server-handoff-complete.js';import{optionalRef as O,useSyncRefs as L}from'../../hooks/use-sync-refs.js';import{useOnUnmount as _}from'../../hooks/use-on-unmount.js';import{useOwnerDocument as A}from'../../hooks/use-owner.js';import{env as G}from'../../utils/env.js';import{useEvent as M}from'../../hooks/use-event.js';function F(p){let l=b(),n=s(v),e=A(p),[a,o]=R(()=>{if(!l&&n!==null||G.isServer)return null;let t=e==null?void 0:e.getElementById(\"headlessui-portal-root\");if(t)return t;if(e===null)return null;let r=e.createElement(\"div\");return r.setAttribute(\"id\",\"headlessui-portal-root\"),e.body.appendChild(r)});return d(()=>{a!==null&&(e!=null&&e.body.contains(a)||e==null||e.body.appendChild(a))},[a,e]),d(()=>{l||n!==null&&o(n.current)},[n,o,l]),a}let U=P;function N(p,l){let n=p,e=g(null),a=L(O(u=>{e.current=u}),l),o=A(e),t=F(e),[r]=R(()=>{var u;return G.isServer?null:(u=o==null?void 0:o.createElement(\"div\"))!=null?u:null}),i=s(f),C=h();return x(()=>{!t||!r||t.contains(r)||(r.setAttribute(\"data-headlessui-portal\",\"\"),t.appendChild(r))},[t,r]),x(()=>{if(r&&i)return i.register(r)},[i,r]),_(()=>{var u;!t||!r||(r instanceof Node&&t.contains(r)&&t.removeChild(r),t.childNodes.length<=0&&((u=t.parentElement)==null||u.removeChild(t)))}),C?!t||!r?null:H(y({ourProps:{ref:a},theirProps:n,defaultTag:U,name:\"Portal\"}),r):null}let S=P,v=m(null);function j(p,l){let{target:n,...e}=p,o={ref:L(l)};return T.createElement(v.Provider,{value:n},y({ourProps:o,theirProps:e,defaultTag:S,name:\"Popover.Group\"}))}let f=m(null);function ae(){let p=s(f),l=g([]),n=M(o=>(l.current.push(o),p&&p.register(o),()=>e(o))),e=M(o=>{let t=l.current.indexOf(o);t!==-1&&l.current.splice(t,1),p&&p.unregister(o)}),a=E(()=>({register:n,unregister:e,portals:l}),[n,e,l]);return[l,E(()=>function({children:t}){return T.createElement(f.Provider,{value:a},t)},[a])]}let D=c(N),I=c(j),pe=Object.assign(D,{Group:I});export{pe as Portal,ae as useNestedPortals};\n","import d,{createContext as c,useContext as m}from\"react\";import{useIsoMorphicEffect as f}from'../hooks/use-iso-morphic-effect.js';import{useEvent as p}from'../hooks/use-event.js';let a=c(()=>{});a.displayName=\"StackContext\";var s=(e=>(e[e.Add=0]=\"Add\",e[e.Remove=1]=\"Remove\",e))(s||{});function x(){return m(a)}function M({children:i,onUpdate:r,type:e,element:n,enabled:u}){let l=x(),o=p((...t)=>{r==null||r(...t),l(...t)});return f(()=>{let t=u===void 0||u===!0;return t&&o(0,e,n),()=>{t&&o(1,e,n)}},[o,e,n,u]),d.createElement(a.Provider,{value:o},i)}export{s as StackMessage,M as StackProvider,x as useStackContext};\n","import*as l from\"react\";function i(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const d=typeof Object.is==\"function\"?Object.is:i,{useState:u,useEffect:h,useLayoutEffect:f,useDebugValue:p}=l;let S=!1,_=!1;function y(e,t,c){const a=t(),[{inst:n},o]=u({inst:{value:a,getSnapshot:t}});return f(()=>{n.value=a,n.getSnapshot=t,r(n)&&o({inst:n})},[e,a,t]),h(()=>(r(n)&&o({inst:n}),e(()=>{r(n)&&o({inst:n})})),[e]),p(a),a}function r(e){const t=e.getSnapshot,c=e.value;try{const a=t();return!d(c,a)}catch{return!0}}export{y as useSyncExternalStore};\n","function t(r,e,n){return e()}export{t as useSyncExternalStore};\n","import*as e from\"react\";import{useSyncExternalStore as t}from'./useSyncExternalStoreShimClient.js';import{useSyncExternalStore as o}from'./useSyncExternalStoreShimServer.js';const r=typeof window!=\"undefined\"&&typeof window.document!=\"undefined\"&&typeof window.document.createElement!=\"undefined\",s=!r,c=s?o:t,a=\"useSyncExternalStore\"in e?(n=>n.useSyncExternalStore)(e):c;export{a as useSyncExternalStore};\n","import{useSyncExternalStore as r}from'../use-sync-external-store-shim/index.js';function S(t){return r(t.subscribe,t.getSnapshot,t.getSnapshot)}export{S as useStore};\n","function a(o,r){let t=o(),n=new Set;return{getSnapshot(){return t},subscribe(e){return n.add(e),()=>n.delete(e)},dispatch(e,...s){let i=r[e].call(t,...s);i&&(t=i,n.forEach(c=>c()))}}}export{a as createStore};\n","function c(){let o;return{before({doc:e}){var l;let n=e.documentElement;o=((l=e.defaultView)!=null?l:window).innerWidth-n.clientWidth},after({doc:e,d:n}){let t=e.documentElement,l=t.clientWidth-t.offsetWidth,r=o-l;n.style(t,\"paddingRight\",`${r}px`)}}}export{c as adjustScrollbarPadding};\n","import{isIOS as f}from'../../utils/platform.js';function p(){if(!f())return{};let o;return{before(){o=window.pageYOffset},after({doc:r,d:l,meta:s}){function i(e){return s.containers.flatMap(t=>t()).some(t=>t.contains(e))}l.style(r.body,\"marginTop\",`-${o}px`),window.scrollTo(0,0);let n=null;l.addEventListener(r,\"click\",e=>{if(e.target instanceof HTMLElement)try{let t=e.target.closest(\"a\");if(!t)return;let{hash:c}=new URL(t.href),a=r.querySelector(c);a&&!i(a)&&(n=a)}catch{}},!0),l.addEventListener(r,\"touchmove\",e=>{e.target instanceof HTMLElement&&!i(e.target)&&e.preventDefault()},{passive:!1}),l.add(()=>{window.scrollTo(0,window.pageYOffset+o),n&&n.isConnected&&(n.scrollIntoView({block:\"nearest\"}),n=null)})}}}export{p as handleIOSLocking};\n","function l(){return{before({doc:e,d:o}){o.style(e.documentElement,\"overflow\",\"hidden\")}}}export{l as preventScroll};\n","import{disposables as s}from'../../utils/disposables.js';import{createStore as i}from'../../utils/store.js';import{adjustScrollbarPadding as l}from'./adjust-scrollbar-padding.js';import{handleIOSLocking as d}from'./handle-ios-locking.js';import{preventScroll as p}from'./prevent-scroll.js';function m(e){let n={};for(let t of e)Object.assign(n,t(n));return n}let a=i(()=>new Map,{PUSH(e,n){var o;let t=(o=this.get(e))!=null?o:{doc:e,count:0,d:s(),meta:new Set};return t.count++,t.meta.add(n),this.set(e,t),this},POP(e,n){let t=this.get(e);return t&&(t.count--,t.meta.delete(n)),this},SCROLL_PREVENT({doc:e,d:n,meta:t}){let o={doc:e,d:n,meta:m(t)},c=[d(),l(),p()];c.forEach(({before:r})=>r==null?void 0:r(o)),c.forEach(({after:r})=>r==null?void 0:r(o))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});a.subscribe(()=>{let e=a.getSnapshot(),n=new Map;for(let[t]of e)n.set(t,t.documentElement.style.overflow);for(let t of e.values()){let o=n.get(t.doc)===\"hidden\",c=t.count!==0;(c&&!o||!c&&o)&&a.dispatch(t.count>0?\"SCROLL_PREVENT\":\"SCROLL_ALLOW\",t),t.count===0&&a.dispatch(\"TEARDOWN\",t)}});export{a as overflows};\n","import{useIsoMorphicEffect as u}from'../use-iso-morphic-effect.js';import{useStore as s}from'../../hooks/use-store.js';import{overflows as t}from'./overflow-store.js';function p(e,r,n){let f=s(t),o=e?f.get(e):void 0,i=o?o.count>0:!1;return u(()=>{if(!(!e||!r))return t.dispatch(\"PUSH\",e,n),()=>t.dispatch(\"POP\",e,n)},[r,e]),i}export{p as useDocumentOverflowLockedEffect};\n","import{useIsoMorphicEffect as s}from'./use-iso-morphic-effect.js';let u=new Map,t=new Map;function h(r,l=!0){s(()=>{var o;if(!l)return;let e=typeof r==\"function\"?r():r.current;if(!e)return;function a(){var d;if(!e)return;let i=(d=t.get(e))!=null?d:1;if(i===1?t.delete(e):t.set(e,i-1),i!==1)return;let n=u.get(e);n&&(n[\"aria-hidden\"]===null?e.removeAttribute(\"aria-hidden\"):e.setAttribute(\"aria-hidden\",n[\"aria-hidden\"]),e.inert=n.inert,u.delete(e))}let f=(o=t.get(e))!=null?o:0;return t.set(e,f+1),f!==0||(u.set(e,{\"aria-hidden\":e.getAttribute(\"aria-hidden\"),inert:e.inert}),e.setAttribute(\"aria-hidden\",\"true\"),e.inert=!0),a},[r,l])}export{h as useInert};\n","import s,{useRef as a,useMemo as m}from\"react\";import{Hidden as d,Features as M}from'../internal/hidden.js';import{useEvent as l}from'./use-event.js';import{useOwnerDocument as H}from'./use-owner.js';function p({defaultContainers:f=[],portals:o}={}){let t=a(null),i=H(t),u=l(()=>{var r;let n=[];for(let e of f)e!==null&&(e instanceof HTMLElement?n.push(e):\"current\"in e&&e.current instanceof HTMLElement&&n.push(e.current));if(o!=null&&o.current)for(let e of o.current)n.push(e);for(let e of(r=i==null?void 0:i.querySelectorAll(\"html > *, body > *\"))!=null?r:[])e!==document.body&&e!==document.head&&e instanceof HTMLElement&&e.id!==\"headlessui-portal-root\"&&(e.contains(t.current)||n.some(c=>e.contains(c))||n.push(e));return n});return{resolveContainers:u,contains:l(n=>u().some(r=>r.contains(n))),mainTreeNodeRef:t,MainTreeNode:m(()=>function(){return s.createElement(d,{features:M.Hidden,ref:t})},[t])}}export{p as useRootContainers};\n","import u,{createContext as ce,createRef as De,useCallback as j,useContext as K,useEffect as w,useMemo as y,useReducer as me,useRef as Pe,useState as ye}from\"react\";import{match as B}from'../../utils/match.js';import{forwardRefWithAs as E,render as A,Features as V}from'../../utils/render.js';import{useSyncRefs as R}from'../../hooks/use-sync-refs.js';import{Keys as Ee}from'../keyboard.js';import{isDisabledReactIssue7711 as Ae}from'../../utils/bugs.js';import{useId as C}from'../../hooks/use-id.js';import{FocusTrap as v}from'../../components/focus-trap/focus-trap.js';import{Portal as H,useNestedPortals as Re}from'../../components/portal/portal.js';import{ForcePortalRoot as G}from'../../internal/portal-force-root.js';import{Description as Ce,useDescriptions as ve}from'../description/description.js';import{useOpenClosed as Oe,State as _}from'../../internal/open-closed.js';import{useServerHandoffComplete as be}from'../../hooks/use-server-handoff-complete.js';import{StackProvider as he,StackMessage as q}from'../../internal/stack-context.js';import{useOutsideClick as Se}from'../../hooks/use-outside-click.js';import{useOwnerDocument as Le}from'../../hooks/use-owner.js';import{useEventListener as Fe}from'../../hooks/use-event-listener.js';import{useEvent as O}from'../../hooks/use-event.js';import{useDocumentOverflowLockedEffect as ke}from'../../hooks/document-overflow/use-document-overflow.js';import{useInert as z}from'../../hooks/use-inert.js';import{useRootContainers as xe}from'../../hooks/use-root-containers.js';var _e=(o=>(o[o.Open=0]=\"Open\",o[o.Closed=1]=\"Closed\",o))(_e||{}),Ie=(e=>(e[e.SetTitleId=0]=\"SetTitleId\",e))(Ie||{});let Me={[0](t,e){return t.titleId===e.id?t:{...t,titleId:e.id}}},I=ce(null);I.displayName=\"DialogContext\";function b(t){let e=K(I);if(e===null){let o=new Error(`<${t} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,b),o}return e}function we(t,e,o=()=>[document.body]){ke(t,e,i=>{var n;return{containers:[...(n=i.containers)!=null?n:[],o]}})}function Be(t,e){return B(e.type,Me,t,e)}let He=\"div\",Ge=V.RenderStrategy|V.Static;function Ne(t,e){var X;let o=C(),{id:i=`headlessui-dialog-${o}`,open:n,onClose:l,initialFocus:s,__demoMode:g=!1,...T}=t,[m,h]=ye(0),a=Oe();n===void 0&&a!==null&&(n=(a&_.Open)===_.Open);let D=Pe(null),Q=R(D,e),f=Le(D),N=t.hasOwnProperty(\"open\")||a!==null,U=t.hasOwnProperty(\"onClose\");if(!N&&!U)throw new Error(\"You have to provide an `open` and an `onClose` prop to the `Dialog` component.\");if(!N)throw new Error(\"You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.\");if(!U)throw new Error(\"You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.\");if(typeof n!=\"boolean\")throw new Error(`You provided an \\`open\\` prop to the \\`Dialog\\`, but the value is not a boolean. Received: ${n}`);if(typeof l!=\"function\")throw new Error(`You provided an \\`onClose\\` prop to the \\`Dialog\\`, but the value is not a function. Received: ${l}`);let p=n?0:1,[S,Z]=me(Be,{titleId:null,descriptionId:null,panelRef:De()}),P=O(()=>l(!1)),W=O(r=>Z({type:0,id:r})),L=be()?g?!1:p===0:!1,F=m>1,Y=K(I)!==null,[ee,te]=Re(),{resolveContainers:M,mainTreeNodeRef:k,MainTreeNode:oe}=xe({portals:ee,defaultContainers:[(X=S.panelRef.current)!=null?X:D.current]}),re=F?\"parent\":\"leaf\",$=a!==null?(a&_.Closing)===_.Closing:!1,ne=(()=>Y||$?!1:L)(),le=j(()=>{var r,c;return(c=Array.from((r=f==null?void 0:f.querySelectorAll(\"body > *\"))!=null?r:[]).find(d=>d.id===\"headlessui-portal-root\"?!1:d.contains(k.current)&&d instanceof HTMLElement))!=null?c:null},[k]);z(le,ne);let ae=(()=>F?!0:L)(),ie=j(()=>{var r,c;return(c=Array.from((r=f==null?void 0:f.querySelectorAll(\"[data-headlessui-portal]\"))!=null?r:[]).find(d=>d.contains(k.current)&&d instanceof HTMLElement))!=null?c:null},[k]);z(ie,ae);let se=(()=>!(!L||F))();Se(M,P,se);let pe=(()=>!(F||p!==0))();Fe(f==null?void 0:f.defaultView,\"keydown\",r=>{pe&&(r.defaultPrevented||r.key===Ee.Escape&&(r.preventDefault(),r.stopPropagation(),P()))});let de=(()=>!($||p!==0||Y))();we(f,de,M),w(()=>{if(p!==0||!D.current)return;let r=new ResizeObserver(c=>{for(let d of c){let x=d.target.getBoundingClientRect();x.x===0&&x.y===0&&x.width===0&&x.height===0&&P()}});return r.observe(D.current),()=>r.disconnect()},[p,D,P]);let[ue,fe]=ve(),ge=y(()=>[{dialogState:p,close:P,setTitleId:W},S],[p,S,P,W]),J=y(()=>({open:p===0}),[p]),Te={ref:Q,id:i,role:\"dialog\",\"aria-modal\":p===0?!0:void 0,\"aria-labelledby\":S.titleId,\"aria-describedby\":ue};return u.createElement(he,{type:\"Dialog\",enabled:p===0,element:D,onUpdate:O((r,c)=>{c===\"Dialog\"&&B(r,{[q.Add]:()=>h(d=>d+1),[q.Remove]:()=>h(d=>d-1)})})},u.createElement(G,{force:!0},u.createElement(H,null,u.createElement(I.Provider,{value:ge},u.createElement(H.Group,{target:D},u.createElement(G,{force:!1},u.createElement(fe,{slot:J,name:\"Dialog.Description\"},u.createElement(v,{initialFocus:s,containers:M,features:L?B(re,{parent:v.features.RestoreFocus,leaf:v.features.All&~v.features.FocusLock}):v.features.None},u.createElement(te,null,A({ourProps:Te,theirProps:T,slot:J,defaultTag:He,features:Ge,visible:p===0,name:\"Dialog\"}))))))))),u.createElement(oe,null))}let Ue=\"div\";function We(t,e){let o=C(),{id:i=`headlessui-dialog-overlay-${o}`,...n}=t,[{dialogState:l,close:s}]=b(\"Dialog.Overlay\"),g=R(e),T=O(a=>{if(a.target===a.currentTarget){if(Ae(a.currentTarget))return a.preventDefault();a.preventDefault(),a.stopPropagation(),s()}}),m=y(()=>({open:l===0}),[l]);return A({ourProps:{ref:g,id:i,\"aria-hidden\":!0,onClick:T},theirProps:n,slot:m,defaultTag:Ue,name:\"Dialog.Overlay\"})}let Ye=\"div\";function $e(t,e){let o=C(),{id:i=`headlessui-dialog-backdrop-${o}`,...n}=t,[{dialogState:l},s]=b(\"Dialog.Backdrop\"),g=R(e);w(()=>{if(s.panelRef.current===null)throw new Error(\"A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.\")},[s.panelRef]);let T=y(()=>({open:l===0}),[l]);return u.createElement(G,{force:!0},u.createElement(H,null,A({ourProps:{ref:g,id:i,\"aria-hidden\":!0},theirProps:n,slot:T,defaultTag:Ye,name:\"Dialog.Backdrop\"})))}let Je=\"div\";function Xe(t,e){let o=C(),{id:i=`headlessui-dialog-panel-${o}`,...n}=t,[{dialogState:l},s]=b(\"Dialog.Panel\"),g=R(e,s.panelRef),T=y(()=>({open:l===0}),[l]),m=O(a=>{a.stopPropagation()});return A({ourProps:{ref:g,id:i,onClick:m},theirProps:n,slot:T,defaultTag:Je,name:\"Dialog.Panel\"})}let je=\"h2\";function Ke(t,e){let o=C(),{id:i=`headlessui-dialog-title-${o}`,...n}=t,[{dialogState:l,setTitleId:s}]=b(\"Dialog.Title\"),g=R(e);w(()=>(s(i),()=>s(null)),[i,s]);let T=y(()=>({open:l===0}),[l]);return A({ourProps:{ref:g,id:i},theirProps:n,slot:T,defaultTag:je,name:\"Dialog.Title\"})}let Ve=E(Ne),qe=E($e),ze=E(Xe),Qe=E(We),Ze=E(Ke),_t=Object.assign(Ve,{Backdrop:qe,Panel:ze,Overlay:Qe,Title:Ze,Description:Ce});export{_t as Dialog};\n","import { Dialog, Transition } from '@headlessui/react';\nimport clsx from 'clsx';\nimport { Fragment, ReactNode, useEffect, useState } from 'react';\nimport ReactDOM from 'react-dom';\n\nexport interface ModalProps {\n open: boolean;\n onClose: () => void;\n title?: ReactNode;\n description?: string;\n children?: ReactNode;\n className?: string;\n panelClassName?: string;\n wrapperClassName?: string;\n dialogClassName?: string;\n containerClassName?: string;\n zIndex?: number; // Prop to control z-index for nested modals\n}\n\nexport const styles = {\n dialog: 'relative',\n scrollable: 'fixed inset-0 flex items-center justify-center p-4',\n center: 'flex min-h-full items-center justify-center',\n panel: 'bg-card p-12 rounded-[20px] h-[calc(100vh-80px)] overflow-y-auto overflow-x-hidden',\n title: 'text-[22px] font-medium text-default',\n description: 'text-sm text-default',\n};\n\nconst ModalPortal: React.FC<{ children: ReactNode }> = ({ children }) => {\n const [modalRoot, setModalRoot] = useState<HTMLElement | null>(null);\n\n useEffect(() => {\n const root = document.createElement('div');\n document.body.appendChild(root);\n setModalRoot(root);\n return () => {\n document.body.removeChild(root);\n };\n }, []);\n\n return modalRoot ? ReactDOM.createPortal(children, modalRoot) : null;\n};\n\nexport const Modal = ({\n open,\n onClose,\n children,\n title,\n wrapperClassName = 'flex min-h-[90%] items-center justify-center p-4 text-center',\n panelClassName = 'w-full max-w-xl rounded-2xl py-10 px-8 text-left',\n dialogClassName = '',\n containerClassName,\n zIndex = 1000,\n}: ModalProps) => {\n const [isTransitioning, setIsTransitioning] = useState(false);\n\n useEffect(() => {\n if (open) {\n setIsTransitioning(true);\n document.body.style.overflow = 'hidden';\n } else {\n const timeout = setTimeout(() => {\n setIsTransitioning(false);\n document.body.style.overflow = 'unset';\n }, 200);\n return () => clearTimeout(timeout);\n }\n return () => {\n document.body.style.overflow = 'unset';\n };\n }, [open]);\n\n if (!open && !isTransitioning) return null;\n\n const modalContent = (\n <Transition appear={open} show={open} as={Fragment}>\n <Dialog\n as=\"div\"\n open={open}\n className={clsx(styles.dialog, dialogClassName, `z-${zIndex}`)}\n onClose={onClose}\n >\n {/* Backdrop */}\n <Transition.Child\n as={Fragment}\n enter=\"ease-out duration-300\"\n enterFrom=\"opacity-0\"\n enterTo=\"opacity-100\"\n leave=\"ease-in duration-200\"\n leaveFrom=\"opacity-100\"\n leaveTo=\"opacity-0\"\n >\n <div\n className={clsx(\n 'fixed inset-0 bg-black bg-opacity-25 dark:bg-black-dark dark:bg-opacity-90 modal-backdrop',\n `z-${zIndex - 10}`,\n )}\n />\n </Transition.Child>\n\n {/* Modal Content */}\n <Transition.Child\n as={Fragment}\n enter=\"ease-out duration-300\"\n enterFrom=\"opacity-0\"\n enterTo=\"opacity-100\"\n leave=\"ease-in duration-200\"\n leaveFrom=\"opacity-100\"\n leaveTo=\"opacity-0\"\n >\n <div\n className={clsx(\n 'fixed inset-0 overflow-y-auto modal-content',\n `z-${zIndex}`,\n containerClassName,\n )}\n >\n <div className={wrapperClassName}>\n <Dialog.Panel\n className={clsx(\n 'shadow-xl transform overflow-hidden bg-white dark:bg-black-background',\n panelClassName,\n )}\n >\n <Dialog.Title\n as=\"h3\"\n className=\"font-semibold flex justify-between items-center leading-6 text-gray-900 dark:text-white lg:text-2xl\"\n >\n <span>{title || ''}</span>\n </Dialog.Title>\n {children}\n </Dialog.Panel>\n </div>\n </div>\n </Transition.Child>\n </Dialog>\n </Transition>\n );\n\n return <ModalPortal>{modalContent}</ModalPortal>;\n};\n\nexport const CleanModal = (props: ModalProps) => {\n return (\n props.open && (\n <Modal\n {...props}\n wrapperClassName={clsx(\n 'flex min-h-[100%] items-center justify-center p-4 text-center',\n props?.wrapperClassName,\n )}\n panelClassName={clsx('w-full max-w-xl px-8 py-6 text-left', props?.panelClassName)}\n dialogClassName={clsx(props?.dialogClassName)}\n />\n )\n );\n};\n","import { commonRoutes } from '@utils';\nimport { Button } from '@components/button';\nimport { Modal } from '@components/modal';\nimport { useRouter } from 'next/router';\nimport { useIntl } from 'react-intl';\nimport { useIntroduction } from '@components/introduction';\nimport { useMediaQuery } from 'react-responsive';\nimport { useIsMounted } from '@hooks';\nimport { create } from 'zustand';\nimport { useState, useEffect } from 'react';\nexport const useOpenTermsModal = create<{\n openTermsModal: boolean;\n setOpenTermsModal: (openTermsModal: boolean) => void;\n}>((set) => ({\n openTermsModal: false,\n setOpenTermsModal: (openTermsModal) => set({ openTermsModal }),\n}));\n\nexport const TermsModal = () => {\n const { openTermsModal, setOpenTermsModal } = useOpenTermsModal();\n const [bottom, setBottom] = useState(true);\n\n const intl = useIntl();\n const router = useRouter();\n const query = router.isReady && router.query;\n\n const { setIntroduction } = useIntroduction();\n const isDesktop = useMediaQuery({ minWidth: 992 });\n const isMounted = useIsMounted();\n\n // const handleScroll = (e) => {\n // const bottomcheck = e.target.scrollHeight - e.target.scrollTop === e.target.clientHeight;\n // if(bottomcheck===true){\n // setBottom(false)\n // }\n // };\n let btn_class: string = bottom ? 'primary' : 'white';\n useEffect(() => {\n const timer1 = setTimeout(() => setBottom(false), 3000);\n return () => {\n clearTimeout(timer1);\n };\n }, []);\n return (\n isMounted && (\n <>\n {isDesktop ? (\n <Modal\n wrapperClassName=\"flex min-h-[100%] items-center justify-center text-center\"\n panelClassName=\"w-full lg:max-w-xl py-6 text-left h-full rounded-lg\"\n onClose={() => setOpenTermsModal(false)}\n open={openTermsModal}\n >\n <div className=\"flex justify-between px-6 pb-6 mb-6 border-b border-b-gray-300\">\n <h2 className=\"font-medium text-2xl font-slab text-gray-900\">\n Before we continue, please read our terms\n </h2>{' '}\n <button\n className=\"block ml-auto dark:text-white\"\n onClick={() => setOpenTermsModal(false)}\n type=\"button\"\n >\n <svg\n strokeWidth={2}\n width={20}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n <div className='relative after:content-[\"\"] px-6'>\n <div className=\"text-xs flex flex-col gap-5 overflow-auto max-h-[285px] pb-6\">\n <p>{intl.formatMessage({ id: 'terms.last-updated' })}</p>\n <p>{intl.formatMessage({ id: 'terms.pre-intro' })}</p>\n <p>{intl.formatMessage({ id: 'terms.intro-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.intro-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.statement-of-courage-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.statement-of-courage' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Information-Collection-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.registeration-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.registeration' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Account-Deletion-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Account-Deletion' })}</p>\n <p>{intl.formatMessage({ id: 'terms.updating-your-personal-info-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.updating-your-personal-info' })}</p>\n <p>{intl.formatMessage({ id: 'terms.transactions-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.transactions' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Site-Access-Activity-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Site-Access-Activity' })}</p>\n <p>{intl.formatMessage({ id: 'terms.public-content-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.public-content' })}</p>\n <p>{intl.formatMessage({ id: 'terms.location-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.location' })}</p>\n <p>{intl.formatMessage({ id: 'terms.messages-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.messages' })}</p>\n <p>{intl.formatMessage({ id: 'terms.mobile-application-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.mobile-application' })}</p>\n <p>{intl.formatMessage({ id: 'terms.other-sites-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.other-sites' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-by-third-parties-about-you-h' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-by-third-parties-about-you' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-to-third-parties-about-you-h' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-to-third-parties-about-you' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-two' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-three' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.customer-service-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.customer-service' })}</p>\n <p>{intl.formatMessage({ id: 'terms.children-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.children' })}</p>\n <p>{intl.formatMessage({ id: 'terms.data-protection-and-security-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.data-protection-and-security' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information' })}</p>\n <ul className=\"list-disc pl-4\">\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-one' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-two' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-three' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-four' })}\n </li>\n </ul>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-five' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-six' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-seven' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-eight' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-nine' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-ten' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-eleven' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-twelve' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-thirteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-fourteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-fifteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-sixteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-seventeen' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.Safeguarding-Communications-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Safeguarding-Communications' })}</p>\n <p>{intl.formatMessage({ id: 'terms.cookies-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.cookies' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-three' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-four' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-five' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-six' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-seven' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Data-Rentetion-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Data-Rentetion' })}</p>\n <p>{intl.formatMessage({ id: 'terms.changes-to-this-privacy-policy-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.changes-to-this-privacy-policy' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Questions-Suggestions-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Questions-Suggestions' })}</p>\n <ul>\n <li>{intl.formatMessage({ id: 'terms.about-to' })}</li>\n <li>{intl.formatMessage({ id: 'terms.about-to-one' })}</li>\n <li>{intl.formatMessage({ id: 'terms.about-to-two' })}</li>\n </ul>\n </div>\n </div>\n <div className=\"ml-auto flex gap-4 pt-6 border-t border-t-gray-300\">\n <div className=\"px-6 w-max ml-auto flex gap-4\">\n <Button\n className=\"w-max\"\n variant=\"white\"\n onClick={() => {\n setOpenTermsModal(false);\n }}\n >\n {intl.formatMessage({ id: 'getstarted.back' })}\n </Button>{' '}\n <Button\n className=\"w-max\"\n variant={bottom ? 'red' : 'primary'}\n onClick={async () => {\n await router.push({ pathname: commonRoutes.buyer.signup, query });\n setIntroduction({ agreedToTerms: true });\n setOpenTermsModal(false);\n }}\n disabled={bottom}\n >\n {intl.formatMessage({ id: 'getstarted.agreeTerms' })}\n </Button>\n </div>\n </div>\n </Modal>\n ) : (\n <Modal\n wrapperClassName=\"flex min-h-[100%] items-center justify-center text-center\"\n panelClassName=\"w-full lg:max-w-xl py-4 px-6 text-left h-full rounded-tl-lg rounded-tr-lg\"\n containerClassName=\"top-[unset] bottom-0 h-[inherit] w-full max-h-[88vh] overflow-y-hidden absolute\"\n onClose={() => setOpenTermsModal(false)}\n open={openTermsModal}\n >\n <button\n className=\"block mb-4 ml-auto dark:text-white\"\n onClick={() => setOpenTermsModal(false)}\n type=\"button\"\n >\n <svg\n strokeWidth={2}\n width={20}\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n <h2 className=\"font-medium text-2xl font-slab text-gray-900 mb-6\">\n Before we continue, <br /> please read our terms\n </h2>\n <div className=\"relative\">\n <div className=\"text-xs flex flex-col gap-5 overflow-auto pb-9 terms-container\">\n <p>{intl.formatMessage({ id: 'terms.last-updated' })}</p>\n <p>{intl.formatMessage({ id: 'terms.pre-intro' })}</p>\n <p>{intl.formatMessage({ id: 'terms.intro-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.intro-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.statement-of-courage-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.statement-of-courage' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Information-Collection-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general' })}</p>\n <p>{intl.formatMessage({ id: 'terms.general-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.registeration-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.registeration' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Account-Deletion-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Account-Deletion' })}</p>\n <p>{intl.formatMessage({ id: 'terms.updating-your-personal-info-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.updating-your-personal-info' })}</p>\n <p>{intl.formatMessage({ id: 'terms.transactions-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.transactions' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Site-Access-Activity-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Site-Access-Activity' })}</p>\n <p>{intl.formatMessage({ id: 'terms.public-content-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.public-content' })}</p>\n <p>{intl.formatMessage({ id: 'terms.location-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.location' })}</p>\n <p>{intl.formatMessage({ id: 'terms.messages-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.messages' })}</p>\n <p>{intl.formatMessage({ id: 'terms.mobile-application-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.mobile-application' })}</p>\n <p>{intl.formatMessage({ id: 'terms.other-sites-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.other-sites' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-by-third-parties-about-you-h' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-by-third-parties-about-you' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-to-third-parties-about-you-h' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-provided-to-third-parties-about-you' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-two' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.info-you provide-about-a-third-party-three' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.customer-service-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.customer-service' })}</p>\n <p>{intl.formatMessage({ id: 'terms.children-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.children' })}</p>\n <p>{intl.formatMessage({ id: 'terms.data-protection-and-security-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.data-protection-and-security' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information' })}</p>\n <ul className=\"list-disc pl-4\">\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-one' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-two' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-three' })}\n </li>\n <li>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-four' })}\n </li>\n </ul>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-five' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-six' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-seven' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-eight' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-nine' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-ten' })}</p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-eleven' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-twelve' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-thirteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-fourteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-fifteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-sixteen' })}\n </p>\n <p>\n {intl.formatMessage({ id: 'terms.Disclosure-sharing-of-information-seventeen' })}\n </p>\n <p>{intl.formatMessage({ id: 'terms.Safeguarding-Communications-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Safeguarding-Communications' })}</p>\n <p>{intl.formatMessage({ id: 'terms.cookies-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.cookies' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-two' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-three' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-four' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-five' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-six' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Confidentiality-Security-seven' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Data-Rentetion-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Data-Rentetion' })}</p>\n <p>{intl.formatMessage({ id: 'terms.changes-to-this-privacy-policy-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.changes-to-this-privacy-policy' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Questions-Suggestions-h' })}</p>\n <p>{intl.formatMessage({ id: 'terms.Questions-Suggestions' })}</p>\n <ul>\n <li>{intl.formatMessage({ id: 'terms.about-to' })}</li>\n <li>{intl.formatMessage({ id: 'terms.about-to-one' })}</li>\n <li>{intl.formatMessage({ id: 'terms.about-to-two' })}</li>\n </ul>\n </div>\n </div>\n <div className=\"flex flex-col gap-4 py-6\">\n <Button\n variant={bottom ? 'red' : 'primary'}\n onClick={() => {\n router.push({ pathname: commonRoutes.buyer.signup, query });\n }}\n disabled={bottom}\n >\n {intl.formatMessage({ id: 'getstarted.agreeTerms' })}\n </Button>\n <Button\n variant=\"white\"\n onClick={() => {\n setOpenTermsModal(false);\n }}\n >\n {intl.formatMessage({ id: 'getstarted.back' })}\n </Button>\n </div>\n <style jsx global>{`\n .terms-container {\n max-height: 20vh;\n }\n\n @media (min-height: 500px) {\n .terms-container {\n max-height: 30vh;\n }\n }\n\n @media (min-height: 600px) {\n .terms-container {\n max-height: 40vh;\n }\n }\n\n @media (min-height: 800px) {\n .terms-container {\n max-height: 50vh;\n }\n }\n `}</style>\n </Modal>\n )}\n </>\n )\n );\n};\n","const visuallyHidden = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n};\nexport default visuallyHidden;","function areArraysEqual(array1, array2, itemComparer = (a, b) => a === b) {\n return array1.length === array2.length && array1.every((value, index) => itemComparer(value, array2[index]));\n}\nexport default areArraysEqual;","'use client';\n\nimport * as React from 'react';\nimport { unstable_ownerDocument as ownerDocument, unstable_useControlled as useControlled, unstable_useEnhancedEffect as useEnhancedEffect, unstable_useEventCallback as useEventCallback, unstable_useForkRef as useForkRef, unstable_isFocusVisible as isFocusVisible, visuallyHidden, clamp } from '@mui/utils';\nimport extractEventHandlers from '@mui/utils/extractEventHandlers';\nimport areArraysEqual from \"../utils/areArraysEqual.js\";\nconst INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;\nfunction asc(a, b) {\n return a - b;\n}\nfunction findClosest(values, currentValue) {\n const {\n index: closestIndex\n } = values.reduce((acc, value, index) => {\n const distance = Math.abs(currentValue - value);\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance,\n index\n };\n }\n return acc;\n }, null) ?? {};\n return closestIndex;\n}\nfunction trackFinger(event, touchId) {\n // The event is TouchEvent\n if (touchId.current !== undefined && event.changedTouches) {\n const touchEvent = event;\n for (let i = 0; i < touchEvent.changedTouches.length; i += 1) {\n const touch = touchEvent.changedTouches[i];\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n return false;\n }\n\n // The event is MouseEvent\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\nexport function valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\nfunction percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n const parts = num.toExponential().split('e-');\n const matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + parseInt(parts[1], 10);\n }\n const decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\nfunction roundValueToStep(value, step, min) {\n const nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\nfunction setValueIndex({\n values,\n newValue,\n index\n}) {\n const output = values.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\nfunction focusThumb({\n sliderRef,\n activeIndex,\n setActive\n}) {\n const doc = ownerDocument(sliderRef.current);\n if (!sliderRef.current?.contains(doc.activeElement) || Number(doc?.activeElement?.getAttribute('data-index')) !== activeIndex) {\n sliderRef.current?.querySelector(`[type=\"range\"][data-index=\"${activeIndex}\"]`).focus();\n }\n if (setActive) {\n setActive(activeIndex);\n }\n}\nfunction areValuesEqual(newValue, oldValue) {\n if (typeof newValue === 'number' && typeof oldValue === 'number') {\n return newValue === oldValue;\n }\n if (typeof newValue === 'object' && typeof oldValue === 'object') {\n return areArraysEqual(newValue, oldValue);\n }\n return false;\n}\nconst axisProps = {\n horizontal: {\n offset: percent => ({\n left: `${percent}%`\n }),\n leap: percent => ({\n width: `${percent}%`\n })\n },\n 'horizontal-reverse': {\n offset: percent => ({\n right: `${percent}%`\n }),\n leap: percent => ({\n width: `${percent}%`\n })\n },\n vertical: {\n offset: percent => ({\n bottom: `${percent}%`\n }),\n leap: percent => ({\n height: `${percent}%`\n })\n }\n};\nexport const Identity = x => x;\n\n// TODO: remove support for Safari < 13.\n// https://caniuse.com/#search=touch-action\n//\n// Safari, on iOS, supports touch action since v13.\n// Over 80% of the iOS phones are compatible\n// in August 2020.\n// Utilizing the CSS.supports method to check if touch-action is supported.\n// Since CSS.supports is supported on all but Edge@12 and IE and touch-action\n// is supported on both Edge@12 and IE if CSS.supports is not available that means that\n// touch-action will be supported\nlet cachedSupportsTouchActionNone;\nfunction doesSupportTouchActionNone() {\n if (cachedSupportsTouchActionNone === undefined) {\n if (typeof CSS !== 'undefined' && typeof CSS.supports === 'function') {\n cachedSupportsTouchActionNone = CSS.supports('touch-action', 'none');\n } else {\n cachedSupportsTouchActionNone = true;\n }\n }\n return cachedSupportsTouchActionNone;\n}\n/**\n *\n * Demos:\n *\n * - [Slider](https://mui.com/base-ui/react-slider/#hook)\n *\n * API:\n *\n * - [useSlider API](https://mui.com/base-ui/react-slider/hooks-api/#use-slider)\n */\nexport function useSlider(parameters) {\n const {\n 'aria-labelledby': ariaLabelledby,\n defaultValue,\n disabled = false,\n disableSwap = false,\n isRtl = false,\n marks: marksProp = false,\n max = 100,\n min = 0,\n name,\n onChange,\n onChangeCommitted,\n orientation = 'horizontal',\n rootRef: ref,\n scale = Identity,\n step = 1,\n shiftStep = 10,\n tabIndex,\n value: valueProp\n } = parameters;\n const touchId = React.useRef(undefined);\n // We can't use the :active browser pseudo-classes.\n // - The active state isn't triggered when clicking on the rail.\n // - The active state isn't transferred when inversing a range slider.\n const [active, setActive] = React.useState(-1);\n const [open, setOpen] = React.useState(-1);\n const [dragging, setDragging] = React.useState(false);\n const moveCount = React.useRef(0);\n const [valueDerived, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue ?? min,\n name: 'Slider'\n });\n const handleChange = onChange && ((event, value, thumbIndex) => {\n // Redefine target to allow name and value to be read.\n // This allows seamless integration with the most popular form libraries.\n // https://github.com/mui/material-ui/issues/13485#issuecomment-676048492\n // Clone the event to not override `target` of the original event.\n const nativeEvent = event.nativeEvent || event;\n // @ts-ignore The nativeEvent is function, not object\n const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);\n Object.defineProperty(clonedEvent, 'target', {\n writable: true,\n value: {\n value,\n name\n }\n });\n onChange(clonedEvent, value, thumbIndex);\n });\n const range = Array.isArray(valueDerived);\n let values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n values = values.map(value => value == null ? min : clamp(value, min, max));\n const marks = marksProp === true && step !== null ? [...Array(Math.floor((max - min) / step) + 1)].map((_, index) => ({\n value: min + step * index\n })) : marksProp || [];\n const marksValues = marks.map(mark => mark.value);\n const [focusedThumbIndex, setFocusedThumbIndex] = React.useState(-1);\n const sliderRef = React.useRef(null);\n const handleRef = useForkRef(ref, sliderRef);\n const createHandleHiddenInputFocus = otherHandlers => event => {\n const index = Number(event.currentTarget.getAttribute('data-index'));\n if (isFocusVisible(event.target)) {\n setFocusedThumbIndex(index);\n }\n setOpen(index);\n otherHandlers?.onFocus?.(event);\n };\n const createHandleHiddenInputBlur = otherHandlers => event => {\n if (!isFocusVisible(event.target)) {\n setFocusedThumbIndex(-1);\n }\n setOpen(-1);\n otherHandlers?.onBlur?.(event);\n };\n const changeValue = (event, valueInput) => {\n const index = Number(event.currentTarget.getAttribute('data-index'));\n const value = values[index];\n const marksIndex = marksValues.indexOf(value);\n let newValue = valueInput;\n if (marks && step == null) {\n const maxMarksValue = marksValues[marksValues.length - 1];\n if (newValue > maxMarksValue) {\n newValue = maxMarksValue;\n } else if (newValue < marksValues[0]) {\n newValue = marksValues[0];\n } else {\n newValue = newValue < value ? marksValues[marksIndex - 1] : marksValues[marksIndex + 1];\n }\n }\n newValue = clamp(newValue, min, max);\n if (range) {\n // Bound the new value to the thumb's neighbours.\n if (disableSwap) {\n newValue = clamp(newValue, values[index - 1] || -Infinity, values[index + 1] || Infinity);\n }\n const previousValue = newValue;\n newValue = setValueIndex({\n values,\n newValue,\n index\n });\n let activeIndex = index;\n\n // Potentially swap the index if needed.\n if (!disableSwap) {\n activeIndex = newValue.indexOf(previousValue);\n }\n focusThumb({\n sliderRef,\n activeIndex\n });\n }\n setValueState(newValue);\n setFocusedThumbIndex(index);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(event, newValue, index);\n }\n if (onChangeCommitted) {\n onChangeCommitted(event, newValue);\n }\n };\n const createHandleHiddenInputKeyDown = otherHandlers => event => {\n // The Shift + Up/Down keyboard shortcuts for moving the slider makes sense to be supported\n // only if the step is defined. If the step is null, this means tha the marks are used for specifying the valid values.\n if (step !== null) {\n const index = Number(event.currentTarget.getAttribute('data-index'));\n const value = values[index];\n let newValue = null;\n if ((event.key === 'ArrowLeft' || event.key === 'ArrowDown') && event.shiftKey || event.key === 'PageDown') {\n newValue = Math.max(value - shiftStep, min);\n } else if ((event.key === 'ArrowRight' || event.key === 'ArrowUp') && event.shiftKey || event.key === 'PageUp') {\n newValue = Math.min(value + shiftStep, max);\n }\n if (newValue !== null) {\n changeValue(event, newValue);\n event.preventDefault();\n }\n }\n otherHandlers?.onKeyDown?.(event);\n };\n useEnhancedEffect(() => {\n if (disabled && sliderRef.current.contains(document.activeElement)) {\n // This is necessary because Firefox and Safari will keep focus\n // on a disabled element:\n // https://codesandbox.io/p/sandbox/mui-pr-22247-forked-h151h?file=/src/App.js\n // @ts-ignore\n document.activeElement?.blur();\n }\n }, [disabled]);\n if (disabled && active !== -1) {\n setActive(-1);\n }\n if (disabled && focusedThumbIndex !== -1) {\n setFocusedThumbIndex(-1);\n }\n const createHandleHiddenInputChange = otherHandlers => event => {\n otherHandlers.onChange?.(event);\n // @ts-ignore\n changeValue(event, event.target.valueAsNumber);\n };\n const previousIndex = React.useRef(undefined);\n let axis = orientation;\n if (isRtl && orientation === 'horizontal') {\n axis += '-reverse';\n }\n const getFingerNewValue = ({\n finger,\n move = false\n }) => {\n const {\n current: slider\n } = sliderRef;\n const {\n width,\n height,\n bottom,\n left\n } = slider.getBoundingClientRect();\n let percent;\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n if (axis.indexOf('-reverse') !== -1) {\n percent = 1 - percent;\n }\n let newValue;\n newValue = percentToValue(percent, min, max);\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n } else {\n const closestIndex = findClosest(marksValues, newValue);\n newValue = marksValues[closestIndex];\n }\n newValue = clamp(newValue, min, max);\n let activeIndex = 0;\n if (range) {\n if (!move) {\n activeIndex = findClosest(values, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n\n // Bound the new value to the thumb's neighbours.\n if (disableSwap) {\n newValue = clamp(newValue, values[activeIndex - 1] || -Infinity, values[activeIndex + 1] || Infinity);\n }\n const previousValue = newValue;\n newValue = setValueIndex({\n values,\n newValue,\n index: activeIndex\n });\n\n // Potentially swap the index if needed.\n if (!(disableSwap && move)) {\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n }\n return {\n newValue,\n activeIndex\n };\n };\n const handleTouchMove = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId);\n if (!finger) {\n return;\n }\n moveCount.current += 1;\n\n // Cancel move in case some other element consumed a mouseup event and it was not fired.\n // @ts-ignore buttons doesn't not exists on touch event\n if (nativeEvent.type === 'mousemove' && nativeEvent.buttons === 0) {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n handleTouchEnd(nativeEvent);\n return;\n }\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger,\n move: true\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (!dragging && moveCount.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) {\n setDragging(true);\n }\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(nativeEvent, newValue, activeIndex);\n }\n });\n const handleTouchEnd = useEventCallback(nativeEvent => {\n const finger = trackFinger(nativeEvent, touchId);\n setDragging(false);\n if (!finger) {\n return;\n }\n const {\n newValue\n } = getFingerNewValue({\n finger,\n move: true\n });\n setActive(-1);\n if (nativeEvent.type === 'touchend') {\n setOpen(-1);\n }\n if (onChangeCommitted) {\n onChangeCommitted(nativeEvent, newValue);\n }\n touchId.current = undefined;\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n stopListening();\n });\n const handleTouchStart = useEventCallback(nativeEvent => {\n if (disabled) {\n return;\n }\n // If touch-action: none; is not supported we need to prevent the scroll manually.\n if (!doesSupportTouchActionNone()) {\n nativeEvent.preventDefault();\n }\n const touch = nativeEvent.changedTouches[0];\n if (touch != null) {\n // A number that uniquely identifies the current finger in the touch session.\n touchId.current = touch.identifier;\n }\n const finger = trackFinger(nativeEvent, touchId);\n if (finger !== false) {\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(nativeEvent, newValue, activeIndex);\n }\n }\n moveCount.current = 0;\n const doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove, {\n passive: true\n });\n doc.addEventListener('touchend', handleTouchEnd, {\n passive: true\n });\n });\n const stopListening = React.useCallback(() => {\n const doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n }, [handleTouchEnd, handleTouchMove]);\n React.useEffect(() => {\n const {\n current: slider\n } = sliderRef;\n slider.addEventListener('touchstart', handleTouchStart, {\n passive: doesSupportTouchActionNone()\n });\n return () => {\n slider.removeEventListener('touchstart', handleTouchStart);\n stopListening();\n };\n }, [stopListening, handleTouchStart]);\n React.useEffect(() => {\n if (disabled) {\n stopListening();\n }\n }, [disabled, stopListening]);\n const createHandleMouseDown = otherHandlers => event => {\n otherHandlers.onMouseDown?.(event);\n if (disabled) {\n return;\n }\n if (event.defaultPrevented) {\n return;\n }\n\n // Only handle left clicks\n if (event.button !== 0) {\n return;\n }\n\n // Avoid text selection\n event.preventDefault();\n const finger = trackFinger(event, touchId);\n if (finger !== false) {\n const {\n newValue,\n activeIndex\n } = getFingerNewValue({\n finger\n });\n focusThumb({\n sliderRef,\n activeIndex,\n setActive\n });\n setValueState(newValue);\n if (handleChange && !areValuesEqual(newValue, valueDerived)) {\n handleChange(event, newValue, activeIndex);\n }\n }\n moveCount.current = 0;\n const doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove, {\n passive: true\n });\n doc.addEventListener('mouseup', handleTouchEnd);\n };\n const trackOffset = valueToPercent(range ? values[0] : min, min, max);\n const trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n const getRootProps = (externalProps = {}) => {\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onMouseDown: createHandleMouseDown(externalHandlers || {})\n };\n const mergedEventHandlers = {\n ...externalHandlers,\n ...ownEventHandlers\n };\n return {\n ...externalProps,\n ref: handleRef,\n ...mergedEventHandlers\n };\n };\n const createHandleMouseOver = otherHandlers => event => {\n otherHandlers.onMouseOver?.(event);\n const index = Number(event.currentTarget.getAttribute('data-index'));\n setOpen(index);\n };\n const createHandleMouseLeave = otherHandlers => event => {\n otherHandlers.onMouseLeave?.(event);\n setOpen(-1);\n };\n const getThumbProps = (externalProps = {}) => {\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onMouseOver: createHandleMouseOver(externalHandlers || {}),\n onMouseLeave: createHandleMouseLeave(externalHandlers || {})\n };\n return {\n ...externalProps,\n ...externalHandlers,\n ...ownEventHandlers\n };\n };\n const getThumbStyle = index => {\n return {\n // So the non active thumb doesn't show its label on hover.\n pointerEvents: active !== -1 && active !== index ? 'none' : undefined\n };\n };\n const getHiddenInputProps = (externalProps = {}) => {\n const externalHandlers = extractEventHandlers(externalProps);\n const ownEventHandlers = {\n onChange: createHandleHiddenInputChange(externalHandlers || {}),\n onFocus: createHandleHiddenInputFocus(externalHandlers || {}),\n onBlur: createHandleHiddenInputBlur(externalHandlers || {}),\n onKeyDown: createHandleHiddenInputKeyDown(externalHandlers || {})\n };\n const mergedEventHandlers = {\n ...externalHandlers,\n ...ownEventHandlers\n };\n return {\n tabIndex,\n 'aria-labelledby': ariaLabelledby,\n 'aria-orientation': orientation,\n 'aria-valuemax': scale(max),\n 'aria-valuemin': scale(min),\n name,\n type: 'range',\n min: parameters.min,\n max: parameters.max,\n step: parameters.step === null && parameters.marks ? 'any' : parameters.step ?? undefined,\n disabled,\n ...externalProps,\n ...mergedEventHandlers,\n style: {\n ...visuallyHidden,\n direction: isRtl ? 'rtl' : 'ltr',\n // So that VoiceOver's focus indicator matches the thumb's dimensions\n width: '100%',\n height: '100%'\n }\n };\n };\n return {\n active,\n axis: axis,\n axisProps,\n dragging,\n focusedThumbIndex,\n getHiddenInputProps,\n getRootProps,\n getThumbProps,\n marks: marks,\n open,\n range,\n rootRef: handleRef,\n trackLeap,\n trackOffset,\n values,\n getThumbStyle\n };\n}","import isHostComponent from \"./isHostComponent.js\";\nconst shouldSpreadAdditionalProps = Slot => {\n return !Slot || !isHostComponent(Slot);\n};\nexport default shouldSpreadAdditionalProps;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSliderUtilityClass(slot) {\n return generateUtilityClass('MuiSlider', slot);\n}\nconst sliderClasses = generateUtilityClasses('MuiSlider', ['root', 'active', 'colorPrimary', 'colorSecondary', 'colorError', 'colorInfo', 'colorSuccess', 'colorWarning', 'disabled', 'dragging', 'focusVisible', 'mark', 'markActive', 'marked', 'markLabel', 'markLabelActive', 'rail', 'sizeSmall', 'thumb', 'thumbColorPrimary', 'thumbColorSecondary', 'thumbColorError', 'thumbColorSuccess', 'thumbColorInfo', 'thumbColorWarning', 'track', 'trackInverted', 'trackFalse', 'thumbSizeSmall', 'valueLabel', 'valueLabelOpen', 'valueLabelCircle', 'valueLabelLabel', 'vertical']);\nexport default sliderClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport sliderClasses from \"./sliderClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useValueLabelClasses = props => {\n const {\n open\n } = props;\n const utilityClasses = {\n offset: clsx(open && sliderClasses.valueLabelOpen),\n circle: sliderClasses.valueLabelCircle,\n label: sliderClasses.valueLabelLabel\n };\n return utilityClasses;\n};\n\n/**\n * @ignore - internal component.\n */\nexport default function SliderValueLabel(props) {\n const {\n children,\n className,\n value\n } = props;\n const classes = useValueLabelClasses(props);\n if (!children) {\n return null;\n }\n return /*#__PURE__*/React.cloneElement(children, {\n className: clsx(children.props.className)\n }, /*#__PURE__*/_jsxs(React.Fragment, {\n children: [children.props.children, /*#__PURE__*/_jsx(\"span\", {\n className: clsx(classes.offset, className),\n \"aria-hidden\": true,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: classes.circle,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: classes.label,\n children: value\n })\n })\n })]\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? SliderValueLabel.propTypes = {\n children: PropTypes.element.isRequired,\n className: PropTypes.string,\n value: PropTypes.node\n} : void 0;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha, lighten, darken } from '@mui/system/colorManipulator';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport { useSlider, valueToPercent } from \"./useSlider.js\";\nimport isHostComponent from \"../utils/isHostComponent.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport slotShouldForwardProp from \"../styles/slotShouldForwardProp.js\";\nimport shouldSpreadAdditionalProps from \"../utils/shouldSpreadAdditionalProps.js\";\nimport capitalize from \"../utils/capitalize.js\";\nimport BaseSliderValueLabel from \"./SliderValueLabel.js\";\nimport sliderClasses, { getSliderUtilityClass } from \"./sliderClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nfunction Identity(x) {\n return x;\n}\nexport const SliderRoot = styled('span', {\n name: 'MuiSlider',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[`color${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`size${capitalize(ownerState.size)}`], ownerState.marked && styles.marked, ownerState.orientation === 'vertical' && styles.vertical, ownerState.track === 'inverted' && styles.trackInverted, ownerState.track === false && styles.trackFalse];\n }\n})(memoTheme(({\n theme\n}) => ({\n borderRadius: 12,\n boxSizing: 'content-box',\n display: 'inline-block',\n position: 'relative',\n cursor: 'pointer',\n touchAction: 'none',\n WebkitTapHighlightColor: 'transparent',\n '@media print': {\n colorAdjust: 'exact'\n },\n [`&.${sliderClasses.disabled}`]: {\n pointerEvents: 'none',\n cursor: 'default',\n color: (theme.vars || theme).palette.grey[400]\n },\n [`&.${sliderClasses.dragging}`]: {\n [`& .${sliderClasses.thumb}, & .${sliderClasses.track}`]: {\n transition: 'none'\n }\n },\n variants: [...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars || theme).palette[color].main\n }\n })), {\n props: {\n orientation: 'horizontal'\n },\n style: {\n height: 4,\n width: '100%',\n padding: '13px 0',\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '20px 0'\n }\n }\n }, {\n props: {\n orientation: 'horizontal',\n size: 'small'\n },\n style: {\n height: 2\n }\n }, {\n props: {\n orientation: 'horizontal',\n marked: true\n },\n style: {\n marginBottom: 20\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n height: '100%',\n width: 4,\n padding: '0 13px',\n // The primary input mechanism of the device includes a pointing device of limited accuracy.\n '@media (pointer: coarse)': {\n // Reach 42px touch target, about ~8mm on screen.\n padding: '0 20px'\n }\n }\n }, {\n props: {\n orientation: 'vertical',\n size: 'small'\n },\n style: {\n width: 2\n }\n }, {\n props: {\n orientation: 'vertical',\n marked: true\n },\n style: {\n marginRight: 44\n }\n }]\n})));\nexport const SliderRail = styled('span', {\n name: 'MuiSlider',\n slot: 'Rail',\n overridesResolver: (props, styles) => styles.rail\n})({\n display: 'block',\n position: 'absolute',\n borderRadius: 'inherit',\n backgroundColor: 'currentColor',\n opacity: 0.38,\n variants: [{\n props: {\n orientation: 'horizontal'\n },\n style: {\n width: '100%',\n height: 'inherit',\n top: '50%',\n transform: 'translateY(-50%)'\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n height: '100%',\n width: 'inherit',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n }, {\n props: {\n track: 'inverted'\n },\n style: {\n opacity: 1\n }\n }]\n});\nexport const SliderTrack = styled('span', {\n name: 'MuiSlider',\n slot: 'Track',\n overridesResolver: (props, styles) => styles.track\n})(memoTheme(({\n theme\n}) => {\n return {\n display: 'block',\n position: 'absolute',\n borderRadius: 'inherit',\n border: '1px solid currentColor',\n backgroundColor: 'currentColor',\n transition: theme.transitions.create(['left', 'width', 'bottom', 'height'], {\n duration: theme.transitions.duration.shortest\n }),\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n border: 'none'\n }\n }, {\n props: {\n orientation: 'horizontal'\n },\n style: {\n height: 'inherit',\n top: '50%',\n transform: 'translateY(-50%)'\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n width: 'inherit',\n left: '50%',\n transform: 'translateX(-50%)'\n }\n }, {\n props: {\n track: false\n },\n style: {\n display: 'none'\n }\n }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({\n props: {\n color,\n track: 'inverted'\n },\n style: {\n ...(theme.vars ? {\n backgroundColor: theme.vars.palette.Slider[`${color}Track`],\n borderColor: theme.vars.palette.Slider[`${color}Track`]\n } : {\n backgroundColor: lighten(theme.palette[color].main, 0.62),\n borderColor: lighten(theme.palette[color].main, 0.62),\n ...theme.applyStyles('dark', {\n backgroundColor: darken(theme.palette[color].main, 0.5)\n }),\n ...theme.applyStyles('dark', {\n borderColor: darken(theme.palette[color].main, 0.5)\n })\n })\n }\n }))]\n };\n}));\nexport const SliderThumb = styled('span', {\n name: 'MuiSlider',\n slot: 'Thumb',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.thumb, styles[`thumbColor${capitalize(ownerState.color)}`], ownerState.size !== 'medium' && styles[`thumbSize${capitalize(ownerState.size)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'absolute',\n width: 20,\n height: 20,\n boxSizing: 'border-box',\n borderRadius: '50%',\n outline: 0,\n backgroundColor: 'currentColor',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n transition: theme.transitions.create(['box-shadow', 'left', 'bottom'], {\n duration: theme.transitions.duration.shortest\n }),\n '&::before': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: 'inherit',\n width: '100%',\n height: '100%',\n boxShadow: (theme.vars || theme).shadows[2]\n },\n '&::after': {\n position: 'absolute',\n content: '\"\"',\n borderRadius: '50%',\n // 42px is the hit target\n width: 42,\n height: 42,\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)'\n },\n [`&.${sliderClasses.disabled}`]: {\n '&:hover': {\n boxShadow: 'none'\n }\n },\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n width: 12,\n height: 12,\n '&::before': {\n boxShadow: 'none'\n }\n }\n }, {\n props: {\n orientation: 'horizontal'\n },\n style: {\n top: '50%',\n transform: 'translate(-50%, -50%)'\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n left: '50%',\n transform: 'translate(-50%, 50%)'\n }\n }, ...Object.entries(theme.palette).filter(([, palette]) => palette && palette.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n [`&:hover, &.${sliderClasses.focusVisible}`]: {\n ...(theme.vars ? {\n boxShadow: `0px 0px 0px 8px rgba(${theme.vars.palette[color].mainChannel} / 0.16)`\n } : {\n boxShadow: `0px 0px 0px 8px ${alpha(theme.palette[color].main, 0.16)}`\n }),\n '@media (hover: none)': {\n boxShadow: 'none'\n }\n },\n [`&.${sliderClasses.active}`]: {\n ...(theme.vars ? {\n boxShadow: `0px 0px 0px 14px rgba(${theme.vars.palette[color].mainChannel} / 0.16)`\n } : {\n boxShadow: `0px 0px 0px 14px ${alpha(theme.palette[color].main, 0.16)}`\n })\n }\n }\n }))]\n})));\nexport const SliderValueLabel = styled(BaseSliderValueLabel, {\n name: 'MuiSlider',\n slot: 'ValueLabel',\n overridesResolver: (props, styles) => styles.valueLabel\n})(memoTheme(({\n theme\n}) => ({\n zIndex: 1,\n whiteSpace: 'nowrap',\n ...theme.typography.body2,\n fontWeight: 500,\n transition: theme.transitions.create(['transform'], {\n duration: theme.transitions.duration.shortest\n }),\n position: 'absolute',\n backgroundColor: (theme.vars || theme).palette.grey[600],\n borderRadius: 2,\n color: (theme.vars || theme).palette.common.white,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n padding: '0.25rem 0.75rem',\n variants: [{\n props: {\n orientation: 'horizontal'\n },\n style: {\n transform: 'translateY(-100%) scale(0)',\n top: '-10px',\n transformOrigin: 'bottom center',\n '&::before': {\n position: 'absolute',\n content: '\"\"',\n width: 8,\n height: 8,\n transform: 'translate(-50%, 50%) rotate(45deg)',\n backgroundColor: 'inherit',\n bottom: 0,\n left: '50%'\n },\n [`&.${sliderClasses.valueLabelOpen}`]: {\n transform: 'translateY(-100%) scale(1)'\n }\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n transform: 'translateY(-50%) scale(0)',\n right: '30px',\n top: '50%',\n transformOrigin: 'right center',\n '&::before': {\n position: 'absolute',\n content: '\"\"',\n width: 8,\n height: 8,\n transform: 'translate(-50%, -50%) rotate(45deg)',\n backgroundColor: 'inherit',\n right: -8,\n top: '50%'\n },\n [`&.${sliderClasses.valueLabelOpen}`]: {\n transform: 'translateY(-50%) scale(1)'\n }\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n fontSize: theme.typography.pxToRem(12),\n padding: '0.25rem 0.5rem'\n }\n }, {\n props: {\n orientation: 'vertical',\n size: 'small'\n },\n style: {\n right: '20px'\n }\n }]\n})));\nexport const SliderMark = styled('span', {\n name: 'MuiSlider',\n slot: 'Mark',\n shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markActive',\n overridesResolver: (props, styles) => {\n const {\n markActive\n } = props;\n return [styles.mark, markActive && styles.markActive];\n }\n})(memoTheme(({\n theme\n}) => ({\n position: 'absolute',\n width: 2,\n height: 2,\n borderRadius: 1,\n backgroundColor: 'currentColor',\n variants: [{\n props: {\n orientation: 'horizontal'\n },\n style: {\n top: '50%',\n transform: 'translate(-1px, -50%)'\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n left: '50%',\n transform: 'translate(-50%, 1px)'\n }\n }, {\n props: {\n markActive: true\n },\n style: {\n backgroundColor: (theme.vars || theme).palette.background.paper,\n opacity: 0.8\n }\n }]\n})));\nexport const SliderMarkLabel = styled('span', {\n name: 'MuiSlider',\n slot: 'MarkLabel',\n shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'markLabelActive',\n overridesResolver: (props, styles) => styles.markLabel\n})(memoTheme(({\n theme\n}) => ({\n ...theme.typography.body2,\n color: (theme.vars || theme).palette.text.secondary,\n position: 'absolute',\n whiteSpace: 'nowrap',\n variants: [{\n props: {\n orientation: 'horizontal'\n },\n style: {\n top: 30,\n transform: 'translateX(-50%)',\n '@media (pointer: coarse)': {\n top: 40\n }\n }\n }, {\n props: {\n orientation: 'vertical'\n },\n style: {\n left: 36,\n transform: 'translateY(50%)',\n '@media (pointer: coarse)': {\n left: 44\n }\n }\n }, {\n props: {\n markLabelActive: true\n },\n style: {\n color: (theme.vars || theme).palette.text.primary\n }\n }]\n})));\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n dragging,\n marked,\n orientation,\n track,\n classes,\n color,\n size\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', dragging && 'dragging', marked && 'marked', orientation === 'vertical' && 'vertical', track === 'inverted' && 'trackInverted', track === false && 'trackFalse', color && `color${capitalize(color)}`, size && `size${capitalize(size)}`],\n rail: ['rail'],\n track: ['track'],\n mark: ['mark'],\n markActive: ['markActive'],\n markLabel: ['markLabel'],\n markLabelActive: ['markLabelActive'],\n valueLabel: ['valueLabel'],\n thumb: ['thumb', disabled && 'disabled', size && `thumbSize${capitalize(size)}`, color && `thumbColor${capitalize(color)}`],\n active: ['active'],\n disabled: ['disabled'],\n focusVisible: ['focusVisible']\n };\n return composeClasses(slots, getSliderUtilityClass, classes);\n};\nconst Forward = ({\n children\n}) => children;\nconst Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {\n const props = useDefaultProps({\n props: inputProps,\n name: 'MuiSlider'\n });\n const isRtl = useRtl();\n const {\n 'aria-label': ariaLabel,\n 'aria-valuetext': ariaValuetext,\n 'aria-labelledby': ariaLabelledby,\n // eslint-disable-next-line react/prop-types\n component = 'span',\n components = {},\n componentsProps = {},\n color = 'primary',\n classes: classesProp,\n className,\n disableSwap = false,\n disabled = false,\n getAriaLabel,\n getAriaValueText,\n marks: marksProp = false,\n max = 100,\n min = 0,\n name,\n onChange,\n onChangeCommitted,\n orientation = 'horizontal',\n shiftStep = 10,\n size = 'medium',\n step = 1,\n scale = Identity,\n slotProps,\n slots,\n tabIndex,\n track = 'normal',\n value: valueProp,\n valueLabelDisplay = 'off',\n valueLabelFormat = Identity,\n ...other\n } = props;\n const ownerState = {\n ...props,\n isRtl,\n max,\n min,\n classes: classesProp,\n disabled,\n disableSwap,\n orientation,\n marks: marksProp,\n color,\n size,\n step,\n shiftStep,\n scale,\n track,\n valueLabelDisplay,\n valueLabelFormat\n };\n const {\n axisProps,\n getRootProps,\n getHiddenInputProps,\n getThumbProps,\n open,\n active,\n axis,\n focusedThumbIndex,\n range,\n dragging,\n marks,\n values,\n trackOffset,\n trackLeap,\n getThumbStyle\n } = useSlider({\n ...ownerState,\n rootRef: ref\n });\n ownerState.marked = marks.length > 0 && marks.some(mark => mark.label);\n ownerState.dragging = dragging;\n ownerState.focusedThumbIndex = focusedThumbIndex;\n const classes = useUtilityClasses(ownerState);\n\n // support both `slots` and `components` for backward compatibility\n const RootSlot = slots?.root ?? components.Root ?? SliderRoot;\n const RailSlot = slots?.rail ?? components.Rail ?? SliderRail;\n const TrackSlot = slots?.track ?? components.Track ?? SliderTrack;\n const ThumbSlot = slots?.thumb ?? components.Thumb ?? SliderThumb;\n const ValueLabelSlot = slots?.valueLabel ?? components.ValueLabel ?? SliderValueLabel;\n const MarkSlot = slots?.mark ?? components.Mark ?? SliderMark;\n const MarkLabelSlot = slots?.markLabel ?? components.MarkLabel ?? SliderMarkLabel;\n const InputSlot = slots?.input ?? components.Input ?? 'input';\n const rootSlotProps = slotProps?.root ?? componentsProps.root;\n const railSlotProps = slotProps?.rail ?? componentsProps.rail;\n const trackSlotProps = slotProps?.track ?? componentsProps.track;\n const thumbSlotProps = slotProps?.thumb ?? componentsProps.thumb;\n const valueLabelSlotProps = slotProps?.valueLabel ?? componentsProps.valueLabel;\n const markSlotProps = slotProps?.mark ?? componentsProps.mark;\n const markLabelSlotProps = slotProps?.markLabel ?? componentsProps.markLabel;\n const inputSlotProps = slotProps?.input ?? componentsProps.input;\n const rootProps = useSlotProps({\n elementType: RootSlot,\n getSlotProps: getRootProps,\n externalSlotProps: rootSlotProps,\n externalForwardedProps: other,\n additionalProps: {\n ...(shouldSpreadAdditionalProps(RootSlot) && {\n as: component\n })\n },\n ownerState: {\n ...ownerState,\n ...rootSlotProps?.ownerState\n },\n className: [classes.root, className]\n });\n const railProps = useSlotProps({\n elementType: RailSlot,\n externalSlotProps: railSlotProps,\n ownerState,\n className: classes.rail\n });\n const trackProps = useSlotProps({\n elementType: TrackSlot,\n externalSlotProps: trackSlotProps,\n additionalProps: {\n style: {\n ...axisProps[axis].offset(trackOffset),\n ...axisProps[axis].leap(trackLeap)\n }\n },\n ownerState: {\n ...ownerState,\n ...trackSlotProps?.ownerState\n },\n className: classes.track\n });\n const thumbProps = useSlotProps({\n elementType: ThumbSlot,\n getSlotProps: getThumbProps,\n externalSlotProps: thumbSlotProps,\n ownerState: {\n ...ownerState,\n ...thumbSlotProps?.ownerState\n },\n className: classes.thumb\n });\n const valueLabelProps = useSlotProps({\n elementType: ValueLabelSlot,\n externalSlotProps: valueLabelSlotProps,\n ownerState: {\n ...ownerState,\n ...valueLabelSlotProps?.ownerState\n },\n className: classes.valueLabel\n });\n const markProps = useSlotProps({\n elementType: MarkSlot,\n externalSlotProps: markSlotProps,\n ownerState,\n className: classes.mark\n });\n const markLabelProps = useSlotProps({\n elementType: MarkLabelSlot,\n externalSlotProps: markLabelSlotProps,\n ownerState,\n className: classes.markLabel\n });\n const inputSliderProps = useSlotProps({\n elementType: InputSlot,\n getSlotProps: getHiddenInputProps,\n externalSlotProps: inputSlotProps,\n ownerState\n });\n return /*#__PURE__*/_jsxs(RootSlot, {\n ...rootProps,\n children: [/*#__PURE__*/_jsx(RailSlot, {\n ...railProps\n }), /*#__PURE__*/_jsx(TrackSlot, {\n ...trackProps\n }), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {\n const percent = valueToPercent(mark.value, min, max);\n const style = axisProps[axis].offset(percent);\n let markActive;\n if (track === false) {\n markActive = values.includes(mark.value);\n } else {\n markActive = track === 'normal' && (range ? mark.value >= values[0] && mark.value <= values[values.length - 1] : mark.value <= values[0]) || track === 'inverted' && (range ? mark.value <= values[0] || mark.value >= values[values.length - 1] : mark.value >= values[0]);\n }\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(MarkSlot, {\n \"data-index\": index,\n ...markProps,\n ...(!isHostComponent(MarkSlot) && {\n markActive\n }),\n style: {\n ...style,\n ...markProps.style\n },\n className: clsx(markProps.className, markActive && classes.markActive)\n }), mark.label != null ? /*#__PURE__*/_jsx(MarkLabelSlot, {\n \"aria-hidden\": true,\n \"data-index\": index,\n ...markLabelProps,\n ...(!isHostComponent(MarkLabelSlot) && {\n markLabelActive: markActive\n }),\n style: {\n ...style,\n ...markLabelProps.style\n },\n className: clsx(classes.markLabel, markLabelProps.className, markActive && classes.markLabelActive),\n children: mark.label\n }) : null]\n }, index);\n }), values.map((value, index) => {\n const percent = valueToPercent(value, min, max);\n const style = axisProps[axis].offset(percent);\n const ValueLabelComponent = valueLabelDisplay === 'off' ? Forward : ValueLabelSlot;\n return (\n /*#__PURE__*/\n /* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */\n _jsx(ValueLabelComponent, {\n ...(!isHostComponent(ValueLabelComponent) && {\n valueLabelFormat,\n valueLabelDisplay,\n value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,\n index,\n open: open === index || active === index || valueLabelDisplay === 'on',\n disabled\n }),\n ...valueLabelProps,\n children: /*#__PURE__*/_jsx(ThumbSlot, {\n \"data-index\": index,\n ...thumbProps,\n className: clsx(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),\n style: {\n ...style,\n ...getThumbStyle(index),\n ...thumbProps.style\n },\n children: /*#__PURE__*/_jsx(InputSlot, {\n \"data-index\": index,\n \"aria-label\": getAriaLabel ? getAriaLabel(index) : ariaLabel,\n \"aria-valuenow\": scale(value),\n \"aria-labelledby\": ariaLabelledby,\n \"aria-valuetext\": getAriaValueText ? getAriaValueText(scale(value), index) : ariaValuetext,\n value: values[index],\n ...inputSliderProps\n })\n })\n }, index)\n );\n })]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Slider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The label of the slider.\n */\n 'aria-label': chainPropTypes(PropTypes.string, props => {\n const range = Array.isArray(props.value || props.defaultValue);\n if (range && props['aria-label'] != null) {\n return new Error('MUI: You need to use the `getAriaLabel` prop instead of `aria-label` when using a range slider.');\n }\n return null;\n }),\n /**\n * The id of the element containing a label for the slider.\n */\n 'aria-labelledby': PropTypes.string,\n /**\n * A string value that provides a user-friendly name for the current value of the slider.\n */\n 'aria-valuetext': chainPropTypes(PropTypes.string, props => {\n const range = Array.isArray(props.value || props.defaultValue);\n if (range && props['aria-valuetext'] != null) {\n return new Error('MUI: You need to use the `getAriaValueText` prop instead of `aria-valuetext` when using a range slider.');\n }\n return null;\n }),\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The components used for each slot inside.\n *\n * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n components: PropTypes.shape({\n Input: PropTypes.elementType,\n Mark: PropTypes.elementType,\n MarkLabel: PropTypes.elementType,\n Rail: PropTypes.elementType,\n Root: PropTypes.elementType,\n Thumb: PropTypes.elementType,\n Track: PropTypes.elementType,\n ValueLabel: PropTypes.elementType\n }),\n /**\n * The extra props for the slot components.\n * You can override the existing props or add new ones.\n *\n * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.\n *\n * @default {}\n */\n componentsProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n children: PropTypes.element,\n className: PropTypes.string,\n open: PropTypes.bool,\n style: PropTypes.object,\n value: PropTypes.number,\n valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])\n })])\n }),\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, the active thumb doesn't swap when moving pointer over a thumb while dragging another thumb.\n * @default false\n */\n disableSwap: PropTypes.bool,\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the thumb labels of the slider.\n * This is important for screen reader users.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaLabel: PropTypes.func,\n /**\n * Accepts a function which returns a string value that provides a user-friendly name for the current value of the slider.\n * This is important for screen reader users.\n * @param {number} value The thumb label's value to format.\n * @param {number} index The thumb label's index to format.\n * @returns {string}\n */\n getAriaValueText: PropTypes.func,\n /**\n * Marks indicate predetermined values to which the user can move the slider.\n * If `true` the marks are spaced according the value of the `step` prop.\n * If an array, it should contain objects with `value` and an optional `label` keys.\n * @default false\n */\n marks: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.shape({\n label: PropTypes.node,\n value: PropTypes.number.isRequired\n })), PropTypes.bool]),\n /**\n * The maximum allowed value of the slider.\n * Should not be equal to min.\n * @default 100\n */\n max: PropTypes.number,\n /**\n * The minimum allowed value of the slider.\n * Should not be equal to max.\n * @default 0\n */\n min: PropTypes.number,\n /**\n * Name attribute of the hidden `input` element.\n */\n name: PropTypes.string,\n /**\n * Callback function that is fired when the slider's value changed.\n *\n * @param {Event} event The event source of the callback.\n * You can pull out the new value by accessing `event.target.value` (any).\n * **Warning**: This is a generic event not a change event.\n * @param {number | number[]} value The new value.\n * @param {number} activeThumb Index of the currently moved thumb.\n */\n onChange: PropTypes.func,\n /**\n * Callback function that is fired when the `mouseup` is triggered.\n *\n * @param {React.SyntheticEvent | Event} event The event source of the callback. **Warning**: This is a generic event not a change event.\n * @param {number | number[]} value The new value.\n */\n onChangeCommitted: PropTypes.func,\n /**\n * The component orientation.\n * @default 'horizontal'\n */\n orientation: PropTypes.oneOf(['horizontal', 'vertical']),\n /**\n * A transformation function, to change the scale of the slider.\n * @param {any} x\n * @returns {any}\n * @default function Identity(x) {\n * return x;\n * }\n */\n scale: PropTypes.func,\n /**\n * The granularity with which the slider can step through values when using Page Up/Page Down or Shift + Arrow Up/Arrow Down.\n * @default 10\n */\n shiftStep: PropTypes.number,\n /**\n * The size of the slider.\n * @default 'medium'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['small', 'medium']), PropTypes.string]),\n /**\n * The props used for each slot inside the Slider.\n * @default {}\n */\n slotProps: PropTypes.shape({\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n children: PropTypes.element,\n className: PropTypes.string,\n open: PropTypes.bool,\n style: PropTypes.object,\n value: PropTypes.number,\n valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])\n })])\n }),\n /**\n * The components used for each slot inside the Slider.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n slots: PropTypes.shape({\n input: PropTypes.elementType,\n mark: PropTypes.elementType,\n markLabel: PropTypes.elementType,\n rail: PropTypes.elementType,\n root: PropTypes.elementType,\n thumb: PropTypes.elementType,\n track: PropTypes.elementType,\n valueLabel: PropTypes.elementType\n }),\n /**\n * The granularity with which the slider can step through values. (A \"discrete\" slider.)\n * The `min` prop serves as the origin for the valid values.\n * We recommend (max - min) to be evenly divisible by the step.\n *\n * When step is `null`, the thumb can only be slid onto marks provided with the `marks` prop.\n * @default 1\n */\n step: PropTypes.number,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Tab index attribute of the hidden `input` element.\n */\n tabIndex: PropTypes.number,\n /**\n * The track presentation:\n *\n * - `normal` the track will render a bar representing the slider value.\n * - `inverted` the track will render a bar representing the remaining slider value.\n * - `false` the track will render without a bar.\n * @default 'normal'\n */\n track: PropTypes.oneOf(['inverted', 'normal', false]),\n /**\n * The value of the slider.\n * For ranged sliders, provide an array with two values.\n */\n value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.number), PropTypes.number]),\n /**\n * Controls when the value label is displayed:\n *\n * - `auto` the value label will display when the thumb is hovered or focused.\n * - `on` will display persistently.\n * - `off` will never display.\n * @default 'off'\n */\n valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on']),\n /**\n * The format function the value label's value.\n *\n * When a function is provided, it should have the following signature:\n *\n * - {number} value The value label's value to format\n * - {number} index The value label's index to format\n * @param {any} x\n * @returns {any}\n * @default function Identity(x) {\n * return x;\n * }\n */\n valueLabelFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string])\n} : void 0;\nexport default Slider;","import Slider from '@mui/material/Slider';\nimport clsx from 'clsx';\nimport Image from \"next/image\";\nimport { useMemo } from 'react';\nimport { ConfigItem, ScoreResult } from '@services/Api';\n\nconst getMarkValue = (i, length) => {\n return (i / (length - 1)) * 100;\n};\n\nconst colors = {\n green: '#2CE25D',\n greenLight: '#64E25F',\n yellow: '#FEBA65',\n red: '#FE6A00',\n};\n\nenum Grade {\n A = 'A',\n A_MINUS = 'A-',\n B_PLUS = 'B+',\n B = 'B',\n B_MINUS = 'B-',\n C_PLUS = 'C+',\n C = 'C',\n C_MINUS = 'C-',\n D_PLUS = 'D+',\n D = 'D',\n}\n\nexport const gradeInfo = {\n [Grade.A]: {\n color: colors.green,\n status: 'mastery',\n },\n [Grade.A_MINUS]: {\n color: colors.green,\n status: 'mastery',\n },\n [Grade.B_PLUS]: {\n color: colors.greenLight,\n status: 'ready',\n },\n [Grade.B]: {\n color: colors.greenLight,\n status: 'ready',\n },\n [Grade.B_MINUS]: {\n color: colors.greenLight,\n status: 'ready',\n },\n [Grade.C_PLUS]: {\n color: colors.yellow,\n status: 'improving',\n },\n [Grade.C]: {\n color: colors.yellow,\n status: 'improving',\n },\n [Grade.C_MINUS]: {\n color: colors.yellow,\n status: 'improving',\n },\n [Grade.D_PLUS]: {\n color: colors.red,\n status: 'not_ready',\n },\n [Grade.D]: {\n color: colors.red,\n status: 'not_ready',\n },\n};\n\nexport interface ProgressProps extends Omit<ScoreResult, 'updatedAt'> {\n minRangeLabel?: string | number;\n maxRangeLabel?: string | number;\n config: ConfigItem[];\n fullProgress?: boolean;\n reverse?: boolean;\n valueLabel?: string | number;\n isUnavailable?: boolean;\n grayBar?: boolean;\n usePills?: boolean;\n}\n\nexport const Progress = ({\n value: valueFromProps,\n valueLabel,\n pointRangeMin,\n nextGrade,\n grade,\n minRangeLabel,\n maxRangeLabel,\n config,\n fullProgress,\n reverse,\n isUnavailable,\n grayBar,\n usePills = false,\n}: ProgressProps) => {\n let min = pointRangeMin;\n let max = nextGrade?.pointRangeMin;\n\n if (reverse && fullProgress) {\n min = config?.[config?.length - 1]?.min;\n max = config?.[0]?.max;\n } else if (fullProgress) {\n min = config?.[0]?.min;\n max = config?.[config?.length - 1]?.min;\n }\n\n const value = ((valueFromProps - min) * 100) / (max - min);\n\n const hasMaxValue =\n (reverse ? valueFromProps <= config?.[0]?.max : nextGrade?.grade == null) && config?.length > 0;\n\n const marks = useMemo(() => {\n if (fullProgress) {\n return ['D', 'C', 'B', 'A'];\n }\n\n if (hasMaxValue) {\n return reverse\n ? [config[1]?.grade, config[0]?.grade || 'A']\n : [config[config?.length - 2]?.grade, config[config?.length - 1]?.grade];\n }\n\n return [grade, nextGrade?.grade];\n }, [config, fullProgress, grade, hasMaxValue, nextGrade?.grade, reverse]);\n\n const isGradeActive = (mark: string) => {\n const gradeConfig = config?.find((item) => item.grade === mark);\n if (!gradeConfig) return false;\n return valueFromProps >= gradeConfig.min || valueFromProps >= gradeConfig.max;\n };\n\n let color = isUnavailable\n ? '#FFFFFF'\n : hasMaxValue\n ? gradeInfo['A-']?.color\n : gradeInfo[grade]?.color || '#9AF19A';\n return (\n (<div>\n <div className=\"h-[31px] group px-7\">\n <div className=\"px-[20px]\">\n <Slider\n disabled\n value={value}\n marks={marks.map((mark, i, arr) => {\n return {\n label: (\n <div\n className={clsx(\n 'flex items-center justify-between px-4 h-12 rounded-full border-2 border-[#EDF0F2]',\n {\n 'w-24': usePills,\n 'w-12': !usePills,\n },\n )}\n style={{\n background:\n isGradeActive(mark) && !isUnavailable ? gradeInfo[mark]?.color : '#FFFFFF',\n borderColor:\n isGradeActive(mark) && !isUnavailable ? gradeInfo[mark]?.color : '#EDF0F2',\n }}\n >\n {usePills && (\n <span className=\"flex-shrink-0 mt-1 w-8 h-8\">\n <Image\n src=\"/images/arrow-right.png\"\n alt=\">\"\n width={10}\n height={10}\n className=\"transform rotate-180 mt-2\"\n />\n </span>\n )}\n <span className=\"text-[#222B36]\">{mark}</span>\n </div>\n ),\n value: getMarkValue(i, arr.length),\n };\n })}\n sx={{\n marginBottom: 0,\n padding: '0 !important',\n '.MuiSlider-rail': {\n height: 3,\n opacity: 1,\n color: hasMaxValue ? color : grayBar ? '#EDF0F2' : '#FFFFFF',\n },\n '.MuiSlider-track': {\n color,\n height: 6,\n },\n '.MuiSlider-thumb': {\n display: 'none',\n },\n '.MuiSlider-mark': {\n display: 'none',\n },\n '.MuiSlider-markLabel.MuiSlider-markLabelActive': {\n color: isUnavailable ? 'unset' : '#2CE25D',\n background: color,\n },\n '.MuiSlider-markLabel': {\n background: hasMaxValue ? color : grayBar ? '#EDF0F2' : '#FFFFFF',\n fontWeight: usePills ? '400' : '500',\n fontSize: usePills ? '18px' : '14px',\n borderRadius: '50%',\n width: usePills ? '6rem' : 29,\n height: 29,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n color: hasMaxValue ? 'white' : '#635E7D',\n top: '-12px',\n },\n }}\n />\n </div>\n {!fullProgress && (\n <div className=\"mx-[14px] relative\">\n <div\n style={{\n left: `${hasMaxValue ? '100' : value}%`,\n backgroundColor: color,\n }}\n className=\"absolute -translate-x-1/2 text-white font-medium text-sm opacity-0 invisible transition-all group-hover:opacity-100 group-hover:visible lg:group-hover:block py-2 px-3 text-left !leading-tight-[150%] bg-gray-700 rounded z-10 before -top-[70px]\"\n >\n <div className=\"w-[18px] overflow-hidden inline-block absolute -bottom-[12px] left-1/2 -translate-x-1/2 rotate-180\">\n <div\n style={{\n backgroundColor: color,\n }}\n className=\"h-[13px] w-[13px] bg-gray-700 rotate-45 transform origin-bottom-left\"\n />\n </div>\n {valueLabel}\n </div>\n </div>\n )}\n </div>\n {minRangeLabel != null && (\n <div className=\"flex justify-between mt-5\">\n <div className=\"text-left text-gray-900 text-sm font-medium\">{minRangeLabel}</div>\n\n <div className=\"text-right text-gray-600 text-sm font-medium\">\n {maxRangeLabel} {minRangeLabel != null && !maxRangeLabel ? 'Ready!' : ''}\n </div>\n </div>\n )}\n </div>)\n );\n};\n","import { AxiosResponse } from 'axios';\nimport { FC, ReactNode } from 'react';\nimport toast from 'react-hot-toast';\nimport { useMutation, useQuery, useQueryClient } from 'react-query';\nimport { getNotPoppedRewards, markPoppedRewards } from '@services/Api/controllers/rewards';\n\n/**\n * use this hook to refetch the pop up rewards\n * as the rewards are awarded in the backend\n * we can call the returned function where we might complete a event.\n * if the award is completed in time then we would get the current rewards\n * thus the problem of the new rewards not showing might get solved.\n * @returns function\n */\nexport const useRefetchRewards = () => {\n const queryClient = useQueryClient();\n return async () => {\n await new Promise((resolve) => setTimeout(resolve, 1000));\n queryClient.invalidateQueries(['not-popped-rewards']);\n };\n};\n\nconst RewardsPopUpWrapper: FC<{ children: ReactNode }> = ({ children }) => {\n const onSuccess: (\n data: AxiosResponse<{\n items: Array<{\n id: number;\n points: number;\n hasPoppedUp: boolean;\n reward: {\n id: string;\n name: string;\n description: string;\n imageUrl: string;\n };\n }>;\n }>,\n ) => Promise<void> = async (data) => {\n const { items } = data.data;\n // items.forEach((item) => {\n // toast.success(`You have earned ${item.points} points for ${item.reward.name} reward.`, {\n // position: 'bottom-center',\n // duration: 3000,\n // });\n // });\n if (items.length)\n await mutateAsync({\n data: {\n rewardsIds: items.map((e) => e.id),\n },\n });\n };\n\n const { mutateAsync } = useMutation({\n mutationFn: ({\n data,\n }: {\n data: {\n rewardsIds: number[];\n };\n }) => markPoppedRewards({ data }),\n mutationKey: ['mark-popped-rewards'],\n });\n useQuery({\n queryFn: () => getNotPoppedRewards(),\n queryKey: ['not-popped-rewards'],\n onSuccess,\n refetchOnWindowFocus: false,\n refetchOnReconnect: false,\n retry: false,\n });\n\n return <div >{children}</div>;\n};\n\nexport default RewardsPopUpWrapper;\n","import { useAuthUser } from '@hooks';\nimport { commonRoutes } from '@utils';\nimport { BuyerLayout } from '@components/layout/buyer-layout';\nimport { ReactNode } from 'react';\n\nexport const SettingsDesktopLayout = ({\n children,\n className,\n}: {\n children: ReactNode;\n className?: any;\n}) => {\n const { profile } = useAuthUser();\n\n return (\n <BuyerLayout\n logoLink={commonRoutes.buyer.auth.summary}\n showNeedHelp\n mainClassName=\"h-full lg:h-[calc(100%-85px)] lg:!pb-32 \"\n headerContainerClassName={'undefined'}\n >\n <div className=\"flex\">\n <div className=\"w-full flex\">\n <div\n className={\n className ? className : 'w-full max-w-[640px] flex justify-center mt-5 p-10 md:p-0 '\n }\n >\n {children}\n </div>\n </div>\n </div>\n </BuyerLayout>\n );\n};\n","import { useIsMounted, useUpdateProfile } from '@hooks';\nimport { CustomInput } from '@components/custom-input';\nimport { Form } from '@components/form';\nimport { FullModal } from '@components/modal/full-modal';\nimport { useForm } from 'react-hook-form';\nimport { commonRoutes, mockApi } from '@utils';\nimport { Loading } from '@components/loading';\nimport { useRouter } from 'next/router';\nimport { useSettingsModal } from '../settings-profile';\nimport { Button } from '@components/button';\nimport { Modal } from '@components/modal';\nimport HelpOutlineIcon from '@mui/icons-material/HelpOutline';\nimport { persist } from 'zustand/middleware';\nimport { create } from 'zustand';\nimport { useMediaQuery } from 'react-responsive';\nimport { SettingsDesktopLayout } from '../settings-desktop-layout';\nimport { useMutation } from 'react-query';\nimport { ApiService, EUserFeedbackReason } from '@services/Api';\n\nexport const useSuccessModal = create(\n persist<{ showSuccessModal: boolean; setShowSuccessModal: (showSuccessModal: boolean) => void }>(\n (set) => ({\n showSuccessModal: false,\n setShowSuccessModal: (showSuccessModal) => set({ showSuccessModal }),\n }),\n {\n name: 'mhp-settings',\n },\n ),\n);\n\ninterface FeedbackForm {\n reason: string;\n feedback: string;\n}\n\nexport const FeedbackContent = ({\n onSubmit,\n isModal = true,\n}: {\n onSubmit: any;\n isModal?: boolean;\n}) => {\n const methods = useForm<FeedbackForm>({\n defaultValues: {\n reason: '',\n feedback: '',\n },\n });\n\n return (\n <Form\n onSubmit={methods.handleSubmit((values) => {\n onSubmit(values);\n })}\n methods={methods}\n className=\"h-full flex flex-col flex-grow\"\n wrapperClassName=\"h-full flex flex-col flex-grow\"\n >\n <div className=\"lg:p-0 flex-grow h-full flex flex-col\">\n <div className=\"p-6 flex flex-col gap-6\">\n <CustomInput.Select\n name=\"reason\"\n label=\"Why are you reaching out?\"\n options={[\n { label: 'Bug', value: EUserFeedbackReason.bug },\n { label: 'Suggestion', value: EUserFeedbackReason.comment },\n { label: 'Question', value: EUserFeedbackReason.question },\n { label: 'Comment', value: EUserFeedbackReason.comment },\n ]}\n />\n <CustomInput.TextArea\n name=\"feedback\"\n label=\"Share your experience\"\n placeholder=\"Write here...\"\n maxLength={250}\n rows={4}\n validations={{ required: true }}\n />\n </div>\n {isModal ? (\n <div className=\"p-6 pb-12 lg:pb-6 border-t border-t-gray-300 mt-auto flex flex-col gap-4\">\n <Button className=\"mt-auto\">Send feedback</Button>\n </div>\n ) : (\n <div className=\"px-6\">\n <Button className=\"mt-auto\">Send feedback</Button>\n </div>\n )}\n </div>\n </Form>\n );\n};\n\nexport const SettingsFeedback = () => {\n const { setSettingsModalOpen } = useSettingsModal();\n const { showSuccessModal, setShowSuccessModal } = useSuccessModal();\n\n const isMounted = useIsMounted();\n\n const router = useRouter();\n const isDesktop = useMediaQuery({ minWidth: 992 });\n\n const mutation = useMutation(\n async (values: { reason: EUserFeedbackReason; feedback: string }) => {\n await ApiService.sendFeedback(values.reason, values.feedback);\n },\n {\n onSuccess: () => {\n setShowSuccessModal(true);\n },\n },\n );\n\n const onSubmit = (values) => {\n mutation.mutate(values);\n };\n\n return (\n isMounted && (\n <>\n <Loading isLoading={mutation.isLoading} />\n {!isDesktop && (\n <FullModal\n onClose={() => {\n setSettingsModalOpen(null);\n\n router.push(commonRoutes.buyer.auth.settings);\n }}\n open\n title=\"Give us feedback\"\n >\n <FeedbackContent\n onSubmit={(values) => {\n onSubmit(values);\n }}\n />\n </FullModal>\n )}\n <SettingsDesktopLayout>\n <div className=\"mt-6\">\n <h1 className=\"text-2xl font-medium mx-10\">Give us feedback</h1>\n <div className=\"mx-5\">\n <FeedbackContent isModal={false} onSubmit={onSubmit} />\n </div>\n </div>\n </SettingsDesktopLayout>\n {showSuccessModal && (\n <Modal\n open={showSuccessModal}\n onClose={() => {\n setShowSuccessModal(false);\n }}\n wrapperClassName=\"flex min-h-[100%] items-center justify-center p-4 text-center\"\n panelClassName=\"w-full lg:max-w-[400px] rounded-lg pt-8 px-6 text-center\"\n >\n <div className=\"mb-8 mx-auto w-max\">\n <div className=\"mix-blend-multiply\">\n <HelpOutlineIcon className=\"keep-color\" />\n \n </div>\n </div>\n <h2 className=\"text-2xl font-medium mb-3\">Thanks for helping out!</h2>\n <p className=\"text-sm text-gray-600 mb-8\">\n We're always searching for ways to improve My Home Pathway, and your input is an\n important part of that.\n </p>\n <Button\n type=\"button\"\n className=\"mb-8\"\n onClick={() => {\n setShowSuccessModal(false);\n }}\n >\n Go back\n </Button>\n </Modal>\n )}\n </>\n )\n );\n};\n","import { Button } from '@components/button';\nimport { Modal, ModalProps } from '@components/modal';\nimport DeleteAccount from '../../../../public/icons/delete-account.svg';\nimport { useMutation } from 'react-query';\nimport { Toast } from '@utils';\nimport { useAuthUser } from '@hooks';\nimport { Loading } from '@components/loading';\nimport { ApiService } from '@services/Api';\nimport Image from 'next/image';\n\nexport const DeleteAccountModal = (props: ModalProps) => {\n const { logout } = useAuthUser();\n\n const deleteAccountMutation = useMutation(\n async () => {\n await ApiService.deleteBuyer();\n },\n {\n onSuccess: () => {\n // Clear all cookies\n document.cookie.split(';').forEach(cookie => {\n document.cookie = cookie\n .replace(/^ +/, '')\n .replace(/=.*/, '=;expires=' + new Date().toUTCString() + ';path=/');\n });\n \n // Clear local storage\n localStorage.clear();\n \n // Clear session storage\n sessionStorage.clear();\n \n // Clear cache if supported\n if ('caches' in window) {\n caches.keys().then(keys => {\n keys.forEach(key => caches.delete(key));\n });\n }\n\n Toast({\n text: 'Your account has been deleted',\n });\n \n // Logout after clearing everything\n logout();\n window.location.reload();\n },\n onError: () => {\n Toast({\n text: 'Something went wrong, please try again later, or contact our support',\n variant: 'error',\n });\n },\n },\n );\n\n return (\n <>\n <Loading isLoading={deleteAccountMutation.isLoading} />\n <Modal {...props} panelClassName=\"w-[90%] lg:max-w-[400px] rounded-lg py-10 px-8 flex flex-col \">\n <div className=\"flex justify-center\">\n <div className=\"mix-blend-multiply\">\n {/* <DeleteAccount className=\"keep-color\" /> */}\n {/* delete icon */}\n <Image\n src=\"/icons/delete-account.svg\"\n alt=\"Logo\"\n width={320}\n height={267}\n objectFit=\"contain\"\n />\n \n </div>\n </div>\n <h2 className=\"text-2xl font-medium mt-6 mb-3\">Are you sure?</h2>\n <p className=\"text-sm text-gray-600 mb-8 max-w-[400px] \">\n We realize we're not perfect, but we'd like you to continue with us until we\n are. Your account and all of its data will be deleted.\n </p>\n\n <div className=\"flex flex-col gap-4\">\n <Button\n onClick={() => {\n deleteAccountMutation.mutate();\n }}\n variant=\"red\"\n >\n Delete account\n </Button>\n <Button\n type=\"button\"\n onClick={() => {\n props.onClose();\n }}\n variant=\"white\"\n >\n Cancel\n </Button>\n </div>\n </Modal>\n </>\n );\n};\n","import React, { Dispatch, SetStateAction, memo, useRef, useState } from 'react';\nimport { FilePond, registerPlugin } from 'react-filepond';\nimport FilePondPluginImagePreview from 'filepond-plugin-image-preview';\nimport 'filepond-plugin-image-preview/dist/filepond-plugin-image-preview.css';\nimport 'filepond/dist/filepond.min.css';\nimport FilePondPluginFileEncode from 'filepond-plugin-file-encode';\nimport FilePondPluginFileValidateSize from 'filepond-plugin-file-validate-size';\nimport { Toast } from '@utils';\nimport { AxiosRequestHeaders } from 'axios';\nimport FilePondPluginFileValidateType from 'filepond-plugin-file-validate-type';\nimport clsx from 'clsx';\n\n// Register the plugins\nregisterPlugin(\n FilePondPluginImagePreview,\n FilePondPluginFileEncode,\n FilePondPluginFileValidateSize,\n FilePondPluginFileValidateType,\n);\n\nexport const AvatarUpload = ({\n onFileUpload,\n className,\n setLoading,\n onFileRemoved,\n}: {\n onFileUpload: (string) => void;\n onFileRemoved?: () => void;\n className?: string;\n setLoading?: Dispatch<SetStateAction<boolean>>;\n}) => {\n const filePondRef = useRef(null);\n const handleFileProcess = (error, file) => {\n if (!error) {\n const fileURL = JSON.parse(file.serverId);\n onFileUpload(fileURL.url as string);\n if (setLoading) setLoading(false);\n } else {\n Toast({\n text: error.body ?? 'File size is too large',\n variant: 'error',\n duration: 5000,\n });\n }\n };\n\n const defaultHeaders = {\n 'Content-Type': 'application/json',\n 'x-api-key': process.env.NEXT_PUBLIC_SERVER_API_KEY || '',\n };\n return (\n <div className={clsx(' w-20 rounded-full cursor-pointer ', className)}>\n <FilePond\n ref={filePondRef}\n maxFileSize=\"5MB\"\n imagePreviewMaxHeight={100}\n imagePreviewMinHeight={100}\n stylePanelLayout=\"compact circle\"\n styleLoadIndicatorPosition=\"center\"\n styleButtonRemoveItemPosition=\"center\"\n styleButtonProcessItemPosition=\"center\"\n styleProgressIndicatorPosition=\"center\"\n allowMultiple={false}\n server={{\n process: {\n url: `${process.env.NEXT_PUBLIC_API_URL}/buyer/upload`,\n method: 'POST',\n },\n headers: defaultHeaders,\n }}\n onaddfile={() => {\n if (setLoading) setLoading(true);\n }}\n onprocessfile={handleFileProcess}\n onremovefile={onFileRemoved}\n name=\"avatar\"\n labelIdle=\"\"\n acceptedFileTypes={['image/png', 'image/jpeg', 'image/jpg']}\n onerror={handleFileProcess}\n />\n </div>\n );\n};\n","import React, { useCallback, useEffect, useState } from 'react';\nimport { DashboardInfoModal } from '../dashboard-info-modal';\nimport { Button } from '@components/button';\nimport { AvatarUpload } from '@components/avatar-upload';\nimport { useFormContext } from 'react-hook-form';\nimport { useAuthUser } from '@hooks';\n\nexport const UploadImage = () => {\n const [open, setOpen] = useState(false);\n const [url, setURL] = useState('');\n const methods = useFormContext();\n const { profile } = useAuthUser();\n\n const onClose = () => setOpen(false);\n const onOpen = () => setOpen(true);\n\n const onUpload = useCallback((url: string) => setURL(url), [setURL]);\n\n const onSave = () => {\n methods.setValue('avatar', url, { shouldTouch: true, shouldDirty: true });\n methods.trigger('avatar');\n onClose();\n };\n\n return (\n <>\n <div onClick={onOpen} className=\"text-primary-500 cursor-pointer uppercase\">\n {profile?.avatar ? `Change` : `Upload`} Picture\n </div>\n <DashboardInfoModal title=\"Upload Picture\" open={open} onClose={onClose}>\n <div className=\"flex flex-col justify-between items-center min-h-full\">\n <div className=\"w-56 ml-auto mr-auto mt-10 border-1 border-red flex flex-col justify-center items-center \">\n <AvatarUpload onFileUpload={onUpload} />\n <div className=\"text-black-100 text-xs mt-2 ml-6\">Upload a file size of max 5MB</div>\n </div>\n <Button onClick={onSave} className=\" w-96 m-auto mt-12 \" disabled={!!!url}>\n Save\n </Button>\n </div>\n </DashboardInfoModal>\n </>\n );\n};\n","import { useState, useEffect } from 'react';\nimport usePlacesService from 'react-google-autocomplete/lib/usePlacesAutocompleteService';\nimport { CustomInput } from '@components';\nimport { useFormContext } from 'react-hook-form';\n\ninterface AddressComponent {\n long_name: string;\n types: string[];\n}\ninterface SelectedPlace {\n street: string;\n city: string;\n state: string;\n zipCode: string;\n}\ninterface PlaceDetails {\n address_components?: AddressComponent[];\n}\nexport const Address = () => {\n const methods = useFormContext();\n const { placesService, placePredictions, getPlacePredictions, isPlacePredictionsLoading } =\n usePlacesService({\n debounce: 200,\n language: 'en',\n apiKey: process.env.NEXT_PUBLIC_MAPS_API,\n options: {\n componentRestrictions: { country: 'us' },\n types: ['address'],\n },\n });\n const [address, setAddress] = useState(null);\n const [selectedPlace, setSelectedPlace] = useState(null);\n const [showmodal, setModal] = useState(false);\n useEffect(() => {\n if (placePredictions.length) {\n const selectedPrediction = placePredictions.find(\n (prediction) => prediction.place_id === address.place_id,\n );\n if (selectedPrediction) {\n placesService?.getDetails(\n {\n placeId: selectedPrediction.place_id,\n },\n (placeDetails) => savePlaceDetailsToState(placeDetails),\n );\n // methods.setValue('street',, {\n // shouldDirty: true,\n // });\n }\n }\n }, [address]);\n\n const savePlaceDetailsToState = (placeDetails: PlaceDetails): void => {\n const addressComponents = placeDetails?.address_components || [];\n const street = getStreetName(addressComponents);\n const city = getAddressComponentValue(addressComponents, 'locality');\n const state = getAddressComponentValue(addressComponents, 'administrative_area_level_1');\n const zipCode = getAddressComponentValue(addressComponents, 'postal_code');\n const selectedPlace: SelectedPlace = { street, city, state, zipCode };\n setSelectedPlace(selectedPlace);\n };\n const getAddressComponentValue = (addressComponents: AddressComponent[], type: string) => {\n const component = addressComponents.find((component) => component.types.includes(type));\n return component ? component.long_name : '';\n };\n function getStreetName(addressComponents: AddressComponent[]): string {\n const streetNumberComponent = addressComponents.find((component) =>\n component.types.includes('street_number'),\n );\n const streetNumber = streetNumberComponent?.long_name || '';\n\n const streetNameComponent = addressComponents.find((component) =>\n component.types.includes('route'),\n );\n const streetName = streetNameComponent?.long_name || '';\n\n return streetNumber + ' ' + streetName;\n }\n\n const handleChange = (event) => {\n getPlacePredictions({\n input: event.target.value,\n });\n setSelectedPlace({\n ...selectedPlace,\n street: event.target.name === 'street' ? event.target.value : selectedPlace?.street,\n });\n methods.setValue('street', selectedPlace?.street);\n // methods.trigger(['street', 'city', 'state', 'zipCode']);\n setModal(true);\n };\n\n const handleManualChange = (event) => {\n setSelectedPlace({\n ...selectedPlace,\n city: event.target.name === 'city' ? event.target.value : selectedPlace?.city,\n state: event.target.name === 'state' ? event.target.value : selectedPlace?.state,\n zipCode: event.target.name === 'zipCode' ? event.target.value : selectedPlace?.zipCode,\n });\n methods.setValue(\n 'city',\n event.target.name === 'city' ? event.target.value : selectedPlace?.city,\n );\n methods.setValue(\n 'state',\n event.target.name === 'state' ? event.target.value : selectedPlace?.state,\n );\n methods.setValue(\n 'zipCode',\n event.target.name === 'zipCode' ? event.target.value : selectedPlace?.zipCode,\n );\n methods.trigger(['city', 'state', 'zipCode']);\n };\n\n return (\n <div className=\"pb-8 flex flex-col gap-6 mt-6\">\n <div className=\"relative\">\n <CustomInput.Input\n label=\"Street\"\n placeholder=\"Street and number, Apt, Unit, etc.\"\n className=\"w-full\"\n name=\"street\"\n value={selectedPlace?.street}\n // validations={{ required: true }}\n onChange={handleChange}\n autoComplete=\"true\"\n />\n {placePredictions.length > 0 && showmodal === true ? (\n <div className=\"absolute z-10 w-full mt-1 bg-white-100 border border-gray-300 rounded-md shadow-lg overflow-y-auto max-h-[250px]\">\n {placePredictions.map((prediction) => (\n <div\n key={prediction.place_id}\n className=\"px-4 py-2 hover:bg-gray-100 cursor-pointer\"\n onClick={() => {\n setAddress(prediction);\n setModal(false);\n }}\n >\n {prediction.description}\n </div>\n ))}\n </div>\n ) : null}\n </div>\n <CustomInput.Input\n label=\"Apartment / Suite / Unit\"\n placeholder=\"Enter Apartment / Suite / Unit Number\"\n className=\"w-full\"\n name=\"apartment\"\n autoComplete=\"true\"\n />\n <CustomInput.Input\n label=\"City\"\n placeholder=\"Enter city\"\n className=\"w-full\"\n name=\"city\"\n // validations={{ required: true }}\n autoComplete=\"true\"\n value={selectedPlace?.city}\n onChange={handleManualChange}\n />\n\n <div className=\"grid grid-cols-2 gap-4\">\n {/* <CustomInput.State value={address.state} /> */}\n <CustomInput.Input\n placeholder=\"Enter State\"\n name=\"state\"\n label=\"State\"\n // validations={{ required: true }}\n autoComplete=\"true\"\n value={selectedPlace?.state}\n onChange={handleManualChange}\n />\n <CustomInput.Input\n mask=\"99999\"\n placeholder=\"Enter your ZIP\"\n name=\"zipCode\"\n label=\"ZIP code\"\n // validations={{ required: true }}\n value={selectedPlace?.zipCode}\n onChange={handleManualChange}\n />\n </div>\n </div>\n );\n};\n","import { useAuthUser } from '@hooks';\nimport { Toast, commonRoutes } from '@utils';\nimport { Button } from '@components/button';\nimport { CustomInput } from '@components/custom-input';\nimport { InviteCoBorrower } from '@components/custom-input/co-borrower';\nimport { Form } from '@components/form';\nimport dayjs from 'dayjs';\nimport { useCallback, useMemo } from 'react';\nimport { useForm } from 'react-hook-form';\nimport CoBorrowerDetails from './co-borrower-details';\n\ninterface IInviteCoBorrowerFields {\n coBorrowersFirstName: string;\n coBorrowersLastName: string;\n coBorrowersEmail: string;\n inviteeUserId: string;\n}\n\nconst CoBorrowerInviteDisplay = () => {\n const { profile } = useAuthUser(true);\n\n const canResend = useMemo(\n () => dayjs().diff(profile.coBorrowerInvite?.createdAt, 'hours') >= 6,\n [profile?.coBorrowerInvite],\n );\n\n const link = useMemo(\n () =>\n `${window.location.origin}${commonRoutes.coBorrower.invite}/${profile.coBorrowerInvite.id}`,\n [profile?.coBorrowerInvite?.id],\n );\n\n const handleCopyLink = useCallback(() => {\n navigator.clipboard.writeText(link).then(() => {\n Toast({ text: 'Referral link copied to clipboard.' });\n });\n }, [link]);\n\n if (!profile.coBorrowerInvited) return null;\n\n return (\n <>\n <CoBorrowerDetails />\n\n <Button\n variant=\"white\"\n onClick={() => {\n handleCopyLink();\n }}\n type=\"button\"\n >\n <div className=\"flex items-center gap-3\">\n <svg className=\"keep-color\" width={20} height={20} viewBox=\"0 0 16 16\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M14.1667 14.6667H6C5.86739 14.6667 5.74021 14.614 5.64645 14.5202C5.55268 14.4265 5.5 14.2993 5.5 14.1667V6C5.5 5.86739 5.55268 5.74021 5.64645 5.64645C5.74021 5.55268 5.86739 5.5 6 5.5H14.1667C14.2993 5.5 14.4265 5.55268 14.5202 5.64645C14.614 5.74021 14.6667 5.86739 14.6667 6V14.1667C14.6667 14.2993 14.614 14.4265 14.5202 14.5202C14.4265 14.614 14.2993 14.6667 14.1667 14.6667Z\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n <path d=\"M10.4997 5.50016V1.8335C10.4997 1.70089 10.447 1.57371 10.3532 1.47994C10.2595 1.38617 10.1323 1.3335 9.99967 1.3335H1.83301C1.7004 1.3335 1.57322 1.38617 1.47945 1.47994C1.38569 1.57371 1.33301 1.70089 1.33301 1.8335V10.0002C1.33301 10.1328 1.38569 10.2599 1.47945 10.3537C1.57322 10.4475 1.7004 10.5002 1.83301 10.5002H5.49967\" stroke=\"currentColor\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n </svg>\n <div className=\"mx-auto pr-5\">Copy referral link</div>\n </div>\n </Button>\n <p>\n Last invite sent at: {dayjs(profile?.coBorrowerInvite?.createdAt).format('MM/DD/YYYY H:mm')}\n </p>\n <InviteCoBorrower label=\"Resend Code\" disabled={!canResend} />\n <p className=\"text-sm\">You can resend links 6 hours from last invite sent.</p>\n </>\n );\n};\n\nexport default CoBorrowerInviteDisplay;\n","import { useAuthUser } from '@hooks';\nimport React from 'react';\nimport CoBorrowerDetails from './co-borrower-details';\nimport { DisAssociateCoBorrower } from './disassociation-consent';\nimport CoBorrowerInviteDisplay from './invite-display';\nimport { InviteCoBorrower } from './InviteCoBorrower';\n\nconst CoBorrowerWrapper = () => {\n const user = useAuthUser();\n return user?.profile?.coBorrower ? (\n <>\n <CoBorrowerDetails />\n <DisAssociateCoBorrower />\n </>\n ) : user?.profile?.coBorrowerInvited ? (\n <CoBorrowerInviteDisplay />\n ) : (\n <InviteCoBorrower />\n );\n};\n\nexport default CoBorrowerWrapper;\n","export * from './InviteCoBorrower';\nexport * from './disassociation-consent';\nexport * from './CoBorrowerWrapper';\n","import { useAuthUser } from '@hooks';\nimport { Button } from '@components/button';\nimport { CustomInput } from '@components/custom-input';\nimport { UserLogo } from '@components/layout/header/user-logo';\nimport states from '@data/states.json';\nimport { SearchLocation } from '@components/buyer-signup-form/step7';\nimport { ErrorMessage } from '@components/error-message';\nimport { useFormContext } from 'react-hook-form';\nimport { useIntl } from 'react-intl';\nimport { useState } from 'react';\nimport { DeleteAccountModal } from '../delete-account-modal';\nimport { extractNumbers } from '@utils';\nimport { UploadImage } from '@components/modal/upload-picture-modal';\nimport { Address } from '@components/address';\nimport { InviteCoBorrower } from '@components/custom-input/co-borrower';\nimport CoBorrowerInviteDisplay from '@components/co-borrower/invite-display';\nimport CoBorrowerDetails from '@components/co-borrower/co-borrower-details';\nimport { DisAssociateCoBorrower } from '@components/co-borrower';\nimport { EMonthlyRent } from '@services/Api';\nimport { useTranslation } from 'react-i18next';\nimport { Typography, Grid, Button as MuiButton } from '@mui/material';\n\nconst EmailSettingsOptions = [\n {\n label: 'Recommendations',\n value: 'recommendations',\n },\n {\n label: 'Account Setup',\n value: 'account_setup',\n },\n {\n label: 'Journey Notifications',\n value: 'journey_notifications',\n },\n {\n label: 'Marketing',\n value: 'marketing',\n disabled: true,\n },\n];\n\nconst SmsSettingsOptions = [\n {\n label: 'Recommendations',\n value: 'recommendations',\n },\n {\n label: 'Marketing',\n value: 'marketing',\n disabled: true,\n },\n];\n\nexport const SettingsContent = () => {\n const { t } = useTranslation();\n const methods = useFormContext();\n const user = useAuthUser();\n const [showDeleteAccount, setShowDeleteAccount] = useState(false);\n return (\n \n <div className=\"bg-gray-50\">\n <div className=\"bg-white p-6 lg:pb-10 lg:px-8 border-b border-b-gray-200 lg:border-0\">\n <h3 className=\"lg:text-2xl text-xl font-medium\">{t('Profile')}</h3>\n <div className=\"flex gap-16 items-center mt-6\">\n <UserLogo\n className=\"!w-[64px] !h-[64px] lg:!w-[80px] lg:!h-[80px] text-2xl\"\n firstName={user.firstName}\n lastName={user.lastName}\n />\n <UploadImage />\n </div>\n <div className=\"flex flex-col gap-6 mt-6\">\n {methods.getValues()?.accessCode && (\n <CustomInput.Input\n icon={null}\n labelClassName=\"!text-gray-900\"\n name=\"accessCode\"\n label=\"Access code\"\n disabled\n />\n )}\n <div className=\"grid grid-cols-2 gap-4\">\n <CustomInput.Name disabled />\n <CustomInput.Name name=\"lastName\" disabled />\n </div>\n\n <CustomInput.Gender />\n <CustomInput.Race />\n <CustomInput.HispanicOrigin />\n <CustomInput.ChildrenSelect />\n <CustomInput.BirthDate />\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2 items-center\">\n <CustomInput.Occupation required={false} />\n <CustomInput.MilitaryStatus showRequired={false} />\n </div>\n {/* make this a component */}\n <CustomInput.Select\n name=\"houseRent\"\n options={[\n {\n label: '$1 - $1,000',\n value: EMonthlyRent.one_to_one_thousand,\n },\n {\n label: '$1,001 - $2,000',\n value: EMonthlyRent.one_thousand_and_one_to_two_thousand,\n },\n {\n label: '$2,001 - $3,000',\n value: EMonthlyRent.two_thousand_and_one_to_three_thousand,\n },\n {\n label: '$3,001 - $4,000',\n value: EMonthlyRent.three_thousand_and_one_to_four_thousand,\n },\n {\n label: 'Above $4,000',\n value: EMonthlyRent.above_four_thousand,\n },\n {\n label: 'None of the above',\n value: EMonthlyRent.na,\n },\n ]}\n label=\"Monthly Rent\"\n showRequired={false}\n />\n </div>\n </div>\n\n <div\n className=\"mt-2 lg:mt-0 bg-white p-6 lg:pb-10 lg:pt-0 lg:px-8 border-y lg:border-0 border-y-gray-200\"\n id=\"step4\"\n >\n <h3 className=\"lg:text-2xl text-xl font-medium mb-6\">{t('Co-Borrower')}</h3>\n <div className=\"flex flex-col gap-6\">\n {user?.profile?.coBorrower ? (\n <>\n <CoBorrowerDetails />\n <DisAssociateCoBorrower />\n </>\n ) : user?.profile?.coBorrowerInvited ? (\n <CoBorrowerInviteDisplay />\n ) : (\n <InviteCoBorrower />\n )}\n </div>\n </div>\n\n <div className=\"mt-2 lg:mt-0 bg-white p-6 lg:pb-10 lg:pt-0 lg:px-8 border-y lg:border-0 border-y-gray-200\">\n <h3 className=\"lg:text-2xl text-xl font-medium mb-6\">{t('Contact')}</h3>\n <div className=\"flex flex-col gap-6\">\n <CustomInput.CountryPhone\n onKeyPress={(e) => {\n if (e.key === 'Enter') {\n e.preventDefault();\n }\n }}\n />\n <CustomInput.Email icon={null} name=\"email\" label=\"Email\" disabled />\n </div>\n </div>\n\n <div className=\"mt-2 lg:mt-0 bg-white p-6 lg:pb-10 lg:pt-0 lg:px-8 border-y lg:border-0 border-y-gray-200\">\n <h3 className=\"lg:text-2xl text-xl font-medium mb-6\">{t('Email & Text settings')}</h3>\n <div className=\"grid grid-cols-1 sm:grid-cols-2\">\n <CustomInput.CheckBoxOptions\n nameOnForm=\"allowedEmails\"\n options={EmailSettingsOptions}\n label=\"Emails: \"\n />\n <CustomInput.CheckBoxOptions\n nameOnForm=\"allowedSms\"\n options={SmsSettingsOptions}\n label=\"Text: \"\n />\n </div>\n </div>\n\n <div className=\"mt-2 lg:mt-0 bg-white lg:border-0 p-6 lg:pb-10 lg:pt-0 lg:px-8 border-t border-t-gray-200\">\n <h3 className=\"lg:text-2xl text-xl font-medium\">{t('Current address')}</h3>\n <Address />\n </div>\n\n <div className=\"bg-white p-6 lg:pt-0 lg:pb-10 lg:px-8 border-t border-t-gray-200 lg:border-0\">\n <h3 className=\"text-xl font-medium\">{t('Target address')}</h3>\n\n <div className=\"flex flex-col gap-6 mt-6\">\n <CustomInput.WishedLocation required={false} />\n {methods.formState.errors.wishedLocations && (\n <ErrorMessage\n className=\"-mt-1\"\n error={methods.formState.errors.wishedLocations?.message as string}\n />\n )}\n </div>\n </div>\n <div className=\"bg-white p-6 lg:pt-0 lg:pb-10 lg:px-8 border-y border-y-gray-200 lg:border-0\">\n <Typography\n variant=\"body1\"\n sx={{\n fontSize: '16px',\n fontWeight: 600,\n marginBottom: '8px',\n fontFamily: 'PlusJakartaSans',\n }}\n >\n {t('Why are you purchasing a home?')}\n </Typography>\n\n <Grid container spacing={2}>\n {(() => {\n const reasonOptions = {\n build_wealth: t('Build Wealth'),\n better_schools: t('Better Schools'),\n place_to_raise_family: t('Place to Raise Family'),\n safer_neighborhood: t('Safer Neighborhood'),\n stop_paying_rent: t('Stop Paying Rent'),\n tax_benefits: t('Tax Benefits'),\n other: t('Others'),\n };\n\n const reasonForPurchase = methods.watch('reasonForPurchase') || [];\n\n const handleSelect = (option) => {\n const currentValues = [...reasonForPurchase];\n const newValues = currentValues.includes(option)\n ? currentValues.filter((reason) => reason !== option)\n : [...currentValues, option];\n\n methods.setValue('reasonForPurchase', newValues, {\n shouldDirty: true,\n shouldValidate: true,\n });\n };\n\n return Object.keys(reasonOptions).map((key, index) => (\n <Grid item xs={6} key={index}>\n <MuiButton\n variant=\"outlined\"\n onClick={() => handleSelect(key)}\n sx={{\n width: '100%',\n borderRadius: '35px',\n padding: '10px 5px',\n borderColor: reasonForPurchase.includes(key) ? '#00A15C' : '#e0e0e0',\n color: reasonForPurchase.includes(key) ? '#00A15C' : 'inherit',\n textTransform: 'none',\n fontSize: '16px',\n fontWeight: 400,\n fontFamily: 'PlusJakartaSans',\n }}\n >\n {reasonOptions[key]}\n </MuiButton>\n </Grid>\n ));\n })()}\n </Grid>\n\n </div>\n <div className=\"h-[8px] bg-gray-50 lg:hidden\"></div>\n <div className=\"p-6 pb-10 lg:pt-0 lg:px-8 lg:pb-12 bg-white\">\n <p className=\"font-medium text-sm mb-2\">{t('Erase all my data')}</p>\n <Button\n type=\"button\"\n className=\"lg:w-max\"\n onClick={() => {\n setShowDeleteAccount(true);\n }}\n variant=\"red\"\n >\n {t('DELETE ACCOUNT')}\n </Button>\n </div>\n <DeleteAccountModal\n open={showDeleteAccount}\n onClose={() => {\n setShowDeleteAccount(false);\n }}\n />\n </div>\n );\n};\n\nexport const SettingsSave = () => {\n const methods = useFormContext();\n const intl = useIntl();\n const isValid = Object.keys(methods.formState.errors).length === 0;\n const copyDirtyFields = { ...methods.formState.dirtyFields };\n const phone = methods.watch('phone');\n const { profile } = useAuthUser();\n if (extractNumbers(phone).trim() === extractNumbers(profile?.phone).trim()) {\n delete copyDirtyFields?.phone;\n }\n const isDirty = Object.keys(copyDirtyFields).length > 0;\n\n return (\n isDirty &&\n isValid && (\n <div className=\"rounded flex items-center justify-between bg-black-slate px-4 fixed text-xs text-white py-[10px] min-w-[350px] bottom-[calc(77px+50px)] lg:bottom-[50px] left-1/2 -translate-x-1/2 z-30\">\n <p>{intl.formatMessage({ id: 'page.settings.user.unsaved' })}</p>\n <Button\n className=\"rounded-[4px] bg-primary-500 hover:bg-primary-600 w-max !min-h-[40px]\"\n type=\"submit\"\n >\n {intl.formatMessage({ id: 'general.save' })}\n </Button>\n </div>\n )\n );\n};\n","import { useAuthUser, useIsMounted } from '@hooks';\nimport { Toast, commonRoutes, extractNumbers } from '@utils';\nimport { Form } from '@components/form';\nimport { Loading } from '@components/loading';\nimport { SettingsContent, SettingsSave } from '@components/settings/settings-content';\nimport { CountryCode } from 'libphonenumber-js';\nimport { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\nimport { useForm } from 'react-hook-form';\nimport { useMutation } from 'react-query';\nimport { ApiService, BuyerProfile, EMonthlyRent, WishedLocation } from '@services/Api';\nimport { SettingsDesktopLayout } from '../settings-desktop-layout';\nimport Tabs from '@mui/material/Tabs';\nimport Tab from '@mui/material/Tab';\nimport Box from '@mui/material/Box';\nimport { BuyerLayout } from '@components/layout/buyer-layout';\nimport { DashboardBreakdown } from '@components/summary/dashboard/dashboard-breakdown';\nexport type SettingModal = 'profile' | 'accounts' | 'feedback' | 'income';\n\nexport const useSettingsModal = () => {\n const router = useRouter();\n const setSettingsModalOpen = async (currentSettingsModal: SettingModal | null) => {\n await router.push(\n currentSettingsModal === 'profile'\n ? commonRoutes.buyer.auth.account\n : currentSettingsModal\n ? commonRoutes.buyer[currentSettingsModal]\n : commonRoutes.buyer.auth.settings,\n );\n };\n\n return { setSettingsModalOpen };\n};\n\nexport const SettingsProfileForm = () => {\n const { profile, isLoadingUserInfo, refetchUserInfo } = useAuthUser();\n const isMounted = useIsMounted();\n\n //Testing global keypress event\n useEffect(() => {\n const handleKeyPress = (e) => {};\n\n window.addEventListener('keypress', handleKeyPress);\n\n return () => {\n window.removeEventListener('keypress', handleKeyPress);\n };\n }, []);\n\n const methods = useForm<\n Omit<BuyerProfile, 'children' | 'hispanicOrigin' | 'coBorrower'> & {\n countryCode: CountryCode;\n children: 'yes' | 'no';\n hispanicOrigin?: 'yes' | 'no';\n locationsSearch: string;\n dateOfBirth: string;\n accessCode?: string;\n avatar?: string;\n coBorrower: 'yes' | 'no';\n coBorrowersFirstName?: string;\n coBorrowersLastName?: string;\n coBorrowersEmail?: string;\n }\n >({\n mode: 'onChange',\n defaultValues: {\n email: profile?.email,\n firstName: profile?.firstName,\n accessCode: profile?.accessCode,\n avatar: profile?.avatar,\n lastName: profile?.lastName,\n phone: profile?.phone || '',\n occupation: profile?.occupation,\n reasonForPurchase: profile?.reasonForPurchase,\n gender: profile?.gender,\n race: profile?.race,\n hispanicOrigin: profile?.hispanicOrigin ? 'yes' : 'no',\n children: profile?.children ? 'yes' : 'no',\n childrenUnder18Count: profile?.childrenUnder18Count,\n wishedLocations: profile?.wishedLocations,\n street: profile?.street,\n apartment: profile?.apartment,\n city: profile?.city,\n militaryStatus: profile?.militaryStatus,\n state: profile?.state,\n zipCode: profile?.zipCode,\n locationsSearch: '',\n dateOfBirth: profile?.dateOfBirth,\n allowedEmails: profile?.allowedEmails || [],\n allowedSms: profile?.allowedSms || [],\n coBorrower: profile?.coBorrower ? 'yes' : 'no',\n coBorrowersFirstName: profile?.coBorrowersFirstName,\n coBorrowersLastName: profile?.coBorrowersLastName,\n coBorrowersEmail: profile?.coBorrowersEmail,\n houseRent: profile?.houseRent,\n },\n });\n\n const updateProfileMutation = useMutation(\n async (values: Partial<BuyerProfile>) => {\n const { data } = await ApiService.updateBuyer(values);\n return data;\n },\n {\n onSuccess: async ({ profile }) => {\n await refetchUserInfo();\n await router.push(commonRoutes.buyer.auth.account);\n Toast({ variant: 'primary', text: 'Profile updated' });\n methods.reset({\n email: profile?.email,\n firstName: profile?.firstName,\n accessCode: profile?.accessCode,\n avatar: profile?.avatar,\n lastName: profile?.lastName,\n phone: profile?.phone,\n occupation: profile?.occupation,\n reasonForPurchase: profile?.reasonForPurchase,\n gender: profile?.gender,\n race: profile?.race,\n hispanicOrigin: profile?.hispanicOrigin ? 'yes' : 'no',\n children: profile?.children ? 'yes' : 'no',\n childrenUnder18Count: profile?.childrenUnder18Count,\n wishedLocations: profile?.wishedLocations,\n street: profile?.street,\n apartment: profile?.apartment,\n city: profile?.city,\n militaryStatus: profile?.militaryStatus,\n state: profile?.state,\n zipCode: profile?.zipCode,\n locationsSearch: '',\n dateOfBirth: profile?.dateOfBirth,\n allowedEmails: profile?.allowedEmails || [],\n allowedSms: profile?.allowedSms || [],\n coBorrower: profile?.coBorrower ? 'yes' : 'no',\n coBorrowersFirstName: profile?.coBorrowersFirstName,\n coBorrowersLastName: profile?.coBorrowersLastName,\n coBorrowersEmail: profile?.coBorrowersEmail,\n houseRent: profile?.houseRent,\n });\n },\n },\n );\n\n const onSubmit = methods.handleSubmit(\n (\n fields: Omit<BuyerProfile, 'children' | 'hispanicOrigin' | 'coBorrower'> & {\n countryCode: CountryCode;\n children: 'yes' | 'no';\n hispanicOrigin?: 'yes' | 'no';\n locationsSearch: string;\n accessCode?: string;\n avatar?: string;\n coBorrower: 'yes' | 'no';\n coBorrowersFirstName?: string;\n coBorrowersLastName?: string;\n coBorrowersEmail?: string;\n houseRent?: EMonthlyRent;\n },\n ) => {\n const children = fields.children === 'yes';\n const hispanicOrigin = fields.hispanicOrigin === 'yes';\n const coBorrower = fields.coBorrower === 'yes';\n\n const childrenUnder18Count = children ? fields.childrenUnder18Count : null;\n\n const phone =\n Number(extractNumbers(fields.phone)) > 1 ? `${extractNumbers(fields.phone)}` : null;\n\n const wishedLocations: WishedLocation[] = fields.wishedLocations.map((location) => {\n if (typeof location === 'string') {\n return {\n country: 'United States',\n state: location,\n };\n }\n\n return {\n country: 'United States',\n state: location.state,\n city: location.city,\n };\n });\n\n const values = {\n firstName: fields.firstName,\n lastName: fields.lastName,\n gender: fields.gender,\n race: fields.race,\n hispanicOrigin,\n avatar: fields.avatar || null,\n children,\n childrenUnder18Count,\n dateOfBirth: fields.dateOfBirth,\n wishedLocations,\n street: fields.street,\n apartment: fields.apartment,\n city: fields.city,\n state: fields.state,\n zipCode: fields.zipCode,\n militaryStatus: fields.militaryStatus,\n occupation: fields.occupation,\n reasonForPurchase: fields.reasonForPurchase,\n phone,\n allowedEmails: fields.allowedEmails,\n allowedSms: fields.allowedSms,\n coBorrower,\n coBorrowersFirstName: fields.coBorrowersFirstName,\n coBorrowersLastName: fields.coBorrowersLastName,\n coBorrowersEmail: fields.coBorrowersEmail,\n houseRent: fields.houseRent,\n };\n\n updateProfileMutation.mutate(values);\n },\n );\n\n const router = useRouter();\n const formId = 'settings-form';\n\n return (\n isMounted && (\n <>\n <Loading isLoading={isLoadingUserInfo || updateProfileMutation?.isLoading} />\n\n <Form\n id={formId}\n onSubmit={(e) => {\n const target = e.target as { id?: string };\n const id = target?.id;\n e.preventDefault();\n e.stopPropagation();\n if (id === formId) {\n onSubmit(e);\n }\n }}\n methods={methods}\n >\n {/* <SettingsDesktopLayout> */}\n <SettingsContent />\n {/* </SettingsDesktopLayout> */}\n <SettingsSave />\n </Form>\n </>\n )\n );\n};\n\nexport const SettingsProfile = () => {\n const [activeTab, setActiveTab] = useState(0);\n const router = useRouter();\n const { tab } = router.query;\n\n useEffect(() => {\n if (tab === 'next-steps') {\n setActiveTab(1); // Index 1 corresponds to the Next Steps tab\n }\n }, [tab]);\n\n const tabs = [\n { label: 'Profile', content: <SettingsProfileForm /> },\n // { label: 'Next Steps', content: <DashboardBreakdown /> },\n ];\n\n const handleTabChange = (index) => {\n setActiveTab(index);\n const newTab = index === 1 ? 'next-steps' : 'profile';\n router.push(`/user/settings?tab=${newTab}`, undefined, { shallow: true });\n };\n\n return (\n <SettingsDesktopLayout>\n <div className=\"w-full\">\n {/* Tab Headers */}\n <div className=\"border-b border-gray-300 flex\">\n {tabs.map((tab, index) => (\n <button\n key={index}\n onClick={() => handleTabChange(index)}\n className={`px-4 py-2 text-sm font-medium \n ${\n activeTab === index\n ? 'border-b-2 border-green-500 text-green-500'\n : 'text-gray-500 hover:text-gray-800'\n }\n `}\n >\n {tab.label}\n </button>\n ))}\n </div>\n\n {/* Tab Content */}\n <div className=\"p-4\">{tabs[activeTab]?.content}</div>\n </div>\n </SettingsDesktopLayout>\n );\n};\n","/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Firebase constants. Some of these (@defines) can be overridden at compile-time.\r\n */\r\nconst CONSTANTS = {\r\n /**\r\n * @define {boolean} Whether this is the client Node.js SDK.\r\n */\r\n NODE_CLIENT: false,\r\n /**\r\n * @define {boolean} Whether this is the Admin Node.js SDK.\r\n */\r\n NODE_ADMIN: false,\r\n /**\r\n * Firebase SDK Version\r\n */\r\n SDK_VERSION: '${JSCORE_VERSION}'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Throws an error if the provided assertion is falsy\r\n */\r\nconst assert = function (assertion, message) {\r\n if (!assertion) {\r\n throw assertionError(message);\r\n }\r\n};\r\n/**\r\n * Returns an Error object suitable for throwing.\r\n */\r\nconst assertionError = function (message) {\r\n return new Error('Firebase Database (' +\r\n CONSTANTS.SDK_VERSION +\r\n ') INTERNAL ASSERT FAILED: ' +\r\n message);\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst stringToByteArray$1 = function (str) {\r\n // TODO(user): Use native implementations if/when available\r\n const out = [];\r\n let p = 0;\r\n for (let i = 0; i < str.length; i++) {\r\n let c = str.charCodeAt(i);\r\n if (c < 128) {\r\n out[p++] = c;\r\n }\r\n else if (c < 2048) {\r\n out[p++] = (c >> 6) | 192;\r\n out[p++] = (c & 63) | 128;\r\n }\r\n else if ((c & 0xfc00) === 0xd800 &&\r\n i + 1 < str.length &&\r\n (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\r\n // Surrogate Pair\r\n c = 0x10000 + ((c & 0x03ff) << 10) + (str.charCodeAt(++i) & 0x03ff);\r\n out[p++] = (c >> 18) | 240;\r\n out[p++] = ((c >> 12) & 63) | 128;\r\n out[p++] = ((c >> 6) & 63) | 128;\r\n out[p++] = (c & 63) | 128;\r\n }\r\n else {\r\n out[p++] = (c >> 12) | 224;\r\n out[p++] = ((c >> 6) & 63) | 128;\r\n out[p++] = (c & 63) | 128;\r\n }\r\n }\r\n return out;\r\n};\r\n/**\r\n * Turns an array of numbers into the string given by the concatenation of the\r\n * characters to which the numbers correspond.\r\n * @param bytes Array of numbers representing characters.\r\n * @return Stringification of the array.\r\n */\r\nconst byteArrayToString = function (bytes) {\r\n // TODO(user): Use native implementations if/when available\r\n const out = [];\r\n let pos = 0, c = 0;\r\n while (pos < bytes.length) {\r\n const c1 = bytes[pos++];\r\n if (c1 < 128) {\r\n out[c++] = String.fromCharCode(c1);\r\n }\r\n else if (c1 > 191 && c1 < 224) {\r\n const c2 = bytes[pos++];\r\n out[c++] = String.fromCharCode(((c1 & 31) << 6) | (c2 & 63));\r\n }\r\n else if (c1 > 239 && c1 < 365) {\r\n // Surrogate Pair\r\n const c2 = bytes[pos++];\r\n const c3 = bytes[pos++];\r\n const c4 = bytes[pos++];\r\n const u = (((c1 & 7) << 18) | ((c2 & 63) << 12) | ((c3 & 63) << 6) | (c4 & 63)) -\r\n 0x10000;\r\n out[c++] = String.fromCharCode(0xd800 + (u >> 10));\r\n out[c++] = String.fromCharCode(0xdc00 + (u & 1023));\r\n }\r\n else {\r\n const c2 = bytes[pos++];\r\n const c3 = bytes[pos++];\r\n out[c++] = String.fromCharCode(((c1 & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));\r\n }\r\n }\r\n return out.join('');\r\n};\r\n// We define it as an object literal instead of a class because a class compiled down to es5 can't\r\n// be treeshaked. https://github.com/rollup/rollup/issues/1691\r\n// Static lookup maps, lazily populated by init_()\r\nconst base64 = {\r\n /**\r\n * Maps bytes to characters.\r\n */\r\n byteToCharMap_: null,\r\n /**\r\n * Maps characters to bytes.\r\n */\r\n charToByteMap_: null,\r\n /**\r\n * Maps bytes to websafe characters.\r\n * @private\r\n */\r\n byteToCharMapWebSafe_: null,\r\n /**\r\n * Maps websafe characters to bytes.\r\n * @private\r\n */\r\n charToByteMapWebSafe_: null,\r\n /**\r\n * Our default alphabet, shared between\r\n * ENCODED_VALS and ENCODED_VALS_WEBSAFE\r\n */\r\n ENCODED_VALS_BASE: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' + 'abcdefghijklmnopqrstuvwxyz' + '0123456789',\r\n /**\r\n * Our default alphabet. Value 64 (=) is special; it means \"nothing.\"\r\n */\r\n get ENCODED_VALS() {\r\n return this.ENCODED_VALS_BASE + '+/=';\r\n },\r\n /**\r\n * Our websafe alphabet.\r\n */\r\n get ENCODED_VALS_WEBSAFE() {\r\n return this.ENCODED_VALS_BASE + '-_.';\r\n },\r\n /**\r\n * Whether this browser supports the atob and btoa functions. This extension\r\n * started at Mozilla but is now implemented by many browsers. We use the\r\n * ASSUME_* variables to avoid pulling in the full useragent detection library\r\n * but still allowing the standard per-browser compilations.\r\n *\r\n */\r\n HAS_NATIVE_SUPPORT: typeof atob === 'function',\r\n /**\r\n * Base64-encode an array of bytes.\r\n *\r\n * @param input An array of bytes (numbers with\r\n * value in [0, 255]) to encode.\r\n * @param webSafe Boolean indicating we should use the\r\n * alternative alphabet.\r\n * @return The base64 encoded string.\r\n */\r\n encodeByteArray(input, webSafe) {\r\n if (!Array.isArray(input)) {\r\n throw Error('encodeByteArray takes an array as a parameter');\r\n }\r\n this.init_();\r\n const byteToCharMap = webSafe\r\n ? this.byteToCharMapWebSafe_\r\n : this.byteToCharMap_;\r\n const output = [];\r\n for (let i = 0; i < input.length; i += 3) {\r\n const byte1 = input[i];\r\n const haveByte2 = i + 1 < input.length;\r\n const byte2 = haveByte2 ? input[i + 1] : 0;\r\n const haveByte3 = i + 2 < input.length;\r\n const byte3 = haveByte3 ? input[i + 2] : 0;\r\n const outByte1 = byte1 >> 2;\r\n const outByte2 = ((byte1 & 0x03) << 4) | (byte2 >> 4);\r\n let outByte3 = ((byte2 & 0x0f) << 2) | (byte3 >> 6);\r\n let outByte4 = byte3 & 0x3f;\r\n if (!haveByte3) {\r\n outByte4 = 64;\r\n if (!haveByte2) {\r\n outByte3 = 64;\r\n }\r\n }\r\n output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3], byteToCharMap[outByte4]);\r\n }\r\n return output.join('');\r\n },\r\n /**\r\n * Base64-encode a string.\r\n *\r\n * @param input A string to encode.\r\n * @param webSafe If true, we should use the\r\n * alternative alphabet.\r\n * @return The base64 encoded string.\r\n */\r\n encodeString(input, webSafe) {\r\n // Shortcut for Mozilla browsers that implement\r\n // a native base64 encoder in the form of \"btoa/atob\"\r\n if (this.HAS_NATIVE_SUPPORT && !webSafe) {\r\n return btoa(input);\r\n }\r\n return this.encodeByteArray(stringToByteArray$1(input), webSafe);\r\n },\r\n /**\r\n * Base64-decode a string.\r\n *\r\n * @param input to decode.\r\n * @param webSafe True if we should use the\r\n * alternative alphabet.\r\n * @return string representing the decoded value.\r\n */\r\n decodeString(input, webSafe) {\r\n // Shortcut for Mozilla browsers that implement\r\n // a native base64 encoder in the form of \"btoa/atob\"\r\n if (this.HAS_NATIVE_SUPPORT && !webSafe) {\r\n return atob(input);\r\n }\r\n return byteArrayToString(this.decodeStringToByteArray(input, webSafe));\r\n },\r\n /**\r\n * Base64-decode a string.\r\n *\r\n * In base-64 decoding, groups of four characters are converted into three\r\n * bytes. If the encoder did not apply padding, the input length may not\r\n * be a multiple of 4.\r\n *\r\n * In this case, the last group will have fewer than 4 characters, and\r\n * padding will be inferred. If the group has one or two characters, it decodes\r\n * to one byte. If the group has three characters, it decodes to two bytes.\r\n *\r\n * @param input Input to decode.\r\n * @param webSafe True if we should use the web-safe alphabet.\r\n * @return bytes representing the decoded value.\r\n */\r\n decodeStringToByteArray(input, webSafe) {\r\n this.init_();\r\n const charToByteMap = webSafe\r\n ? this.charToByteMapWebSafe_\r\n : this.charToByteMap_;\r\n const output = [];\r\n for (let i = 0; i < input.length;) {\r\n const byte1 = charToByteMap[input.charAt(i++)];\r\n const haveByte2 = i < input.length;\r\n const byte2 = haveByte2 ? charToByteMap[input.charAt(i)] : 0;\r\n ++i;\r\n const haveByte3 = i < input.length;\r\n const byte3 = haveByte3 ? charToByteMap[input.charAt(i)] : 64;\r\n ++i;\r\n const haveByte4 = i < input.length;\r\n const byte4 = haveByte4 ? charToByteMap[input.charAt(i)] : 64;\r\n ++i;\r\n if (byte1 == null || byte2 == null || byte3 == null || byte4 == null) {\r\n throw new DecodeBase64StringError();\r\n }\r\n const outByte1 = (byte1 << 2) | (byte2 >> 4);\r\n output.push(outByte1);\r\n if (byte3 !== 64) {\r\n const outByte2 = ((byte2 << 4) & 0xf0) | (byte3 >> 2);\r\n output.push(outByte2);\r\n if (byte4 !== 64) {\r\n const outByte3 = ((byte3 << 6) & 0xc0) | byte4;\r\n output.push(outByte3);\r\n }\r\n }\r\n }\r\n return output;\r\n },\r\n /**\r\n * Lazy static initialization function. Called before\r\n * accessing any of the static map variables.\r\n * @private\r\n */\r\n init_() {\r\n if (!this.byteToCharMap_) {\r\n this.byteToCharMap_ = {};\r\n this.charToByteMap_ = {};\r\n this.byteToCharMapWebSafe_ = {};\r\n this.charToByteMapWebSafe_ = {};\r\n // We want quick mappings back and forth, so we precompute two maps.\r\n for (let i = 0; i < this.ENCODED_VALS.length; i++) {\r\n this.byteToCharMap_[i] = this.ENCODED_VALS.charAt(i);\r\n this.charToByteMap_[this.byteToCharMap_[i]] = i;\r\n this.byteToCharMapWebSafe_[i] = this.ENCODED_VALS_WEBSAFE.charAt(i);\r\n this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[i]] = i;\r\n // Be forgiving when decoding and correctly decode both encodings.\r\n if (i >= this.ENCODED_VALS_BASE.length) {\r\n this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(i)] = i;\r\n this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(i)] = i;\r\n }\r\n }\r\n }\r\n }\r\n};\r\n/**\r\n * An error encountered while decoding base64 string.\r\n */\r\nclass DecodeBase64StringError extends Error {\r\n constructor() {\r\n super(...arguments);\r\n this.name = 'DecodeBase64StringError';\r\n }\r\n}\r\n/**\r\n * URL-safe base64 encoding\r\n */\r\nconst base64Encode = function (str) {\r\n const utf8Bytes = stringToByteArray$1(str);\r\n return base64.encodeByteArray(utf8Bytes, true);\r\n};\r\n/**\r\n * URL-safe base64 encoding (without \".\" padding in the end).\r\n * e.g. Used in JSON Web Token (JWT) parts.\r\n */\r\nconst base64urlEncodeWithoutPadding = function (str) {\r\n // Use base64url encoding and remove padding in the end (dot characters).\r\n return base64Encode(str).replace(/\\./g, '');\r\n};\r\n/**\r\n * URL-safe base64 decoding\r\n *\r\n * NOTE: DO NOT use the global atob() function - it does NOT support the\r\n * base64Url variant encoding.\r\n *\r\n * @param str To be decoded\r\n * @return Decoded result, if possible\r\n */\r\nconst base64Decode = function (str) {\r\n try {\r\n return base64.decodeString(str, true);\r\n }\r\n catch (e) {\r\n console.error('base64Decode failed: ', e);\r\n }\r\n return null;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Do a deep-copy of basic JavaScript Objects or Arrays.\r\n */\r\nfunction deepCopy(value) {\r\n return deepExtend(undefined, value);\r\n}\r\n/**\r\n * Copy properties from source to target (recursively allows extension\r\n * of Objects and Arrays). Scalar values in the target are over-written.\r\n * If target is undefined, an object of the appropriate type will be created\r\n * (and returned).\r\n *\r\n * We recursively copy all child properties of plain Objects in the source- so\r\n * that namespace- like dictionaries are merged.\r\n *\r\n * Note that the target can be a function, in which case the properties in\r\n * the source Object are copied onto it as static properties of the Function.\r\n *\r\n * Note: we don't merge __proto__ to prevent prototype pollution\r\n */\r\nfunction deepExtend(target, source) {\r\n if (!(source instanceof Object)) {\r\n return source;\r\n }\r\n switch (source.constructor) {\r\n case Date:\r\n // Treat Dates like scalars; if the target date object had any child\r\n // properties - they will be lost!\r\n const dateValue = source;\r\n return new Date(dateValue.getTime());\r\n case Object:\r\n if (target === undefined) {\r\n target = {};\r\n }\r\n break;\r\n case Array:\r\n // Always copy the array source and overwrite the target.\r\n target = [];\r\n break;\r\n default:\r\n // Not a plain Object - treat it as a scalar.\r\n return source;\r\n }\r\n for (const prop in source) {\r\n // use isValidKey to guard against prototype pollution. See https://snyk.io/vuln/SNYK-JS-LODASH-450202\r\n if (!source.hasOwnProperty(prop) || !isValidKey(prop)) {\r\n continue;\r\n }\r\n target[prop] = deepExtend(target[prop], source[prop]);\r\n }\r\n return target;\r\n}\r\nfunction isValidKey(key) {\r\n return key !== '__proto__';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Polyfill for `globalThis` object.\r\n * @returns the `globalThis` object for the given environment.\r\n * @public\r\n */\r\nfunction getGlobal() {\r\n if (typeof self !== 'undefined') {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined') {\r\n return window;\r\n }\r\n if (typeof global !== 'undefined') {\r\n return global;\r\n }\r\n throw new Error('Unable to locate global object.');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst getDefaultsFromGlobal = () => getGlobal().__FIREBASE_DEFAULTS__;\r\n/**\r\n * Attempt to read defaults from a JSON string provided to\r\n * process(.)env(.)__FIREBASE_DEFAULTS__ or a JSON file whose path is in\r\n * process(.)env(.)__FIREBASE_DEFAULTS_PATH__\r\n * The dots are in parens because certain compilers (Vite?) cannot\r\n * handle seeing that variable in comments.\r\n * See https://github.com/firebase/firebase-js-sdk/issues/6838\r\n */\r\nconst getDefaultsFromEnvVariable = () => {\r\n if (typeof process === 'undefined' || typeof process.env === 'undefined') {\r\n return;\r\n }\r\n const defaultsJsonString = process.env.__FIREBASE_DEFAULTS__;\r\n if (defaultsJsonString) {\r\n return JSON.parse(defaultsJsonString);\r\n }\r\n};\r\nconst getDefaultsFromCookie = () => {\r\n if (typeof document === 'undefined') {\r\n return;\r\n }\r\n let match;\r\n try {\r\n match = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);\r\n }\r\n catch (e) {\r\n // Some environments such as Angular Universal SSR have a\r\n // `document` object but error on accessing `document.cookie`.\r\n return;\r\n }\r\n const decoded = match && base64Decode(match[1]);\r\n return decoded && JSON.parse(decoded);\r\n};\r\n/**\r\n * Get the __FIREBASE_DEFAULTS__ object. It checks in order:\r\n * (1) if such an object exists as a property of `globalThis`\r\n * (2) if such an object was provided on a shell environment variable\r\n * (3) if such an object exists in a cookie\r\n * @public\r\n */\r\nconst getDefaults = () => {\r\n try {\r\n return (getDefaultsFromGlobal() ||\r\n getDefaultsFromEnvVariable() ||\r\n getDefaultsFromCookie());\r\n }\r\n catch (e) {\r\n /**\r\n * Catch-all for being unable to get __FIREBASE_DEFAULTS__ due\r\n * to any environment case we have not accounted for. Log to\r\n * info instead of swallowing so we can find these unknown cases\r\n * and add paths for them if needed.\r\n */\r\n console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${e}`);\r\n return;\r\n }\r\n};\r\n/**\r\n * Returns emulator host stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a URL host formatted like `127.0.0.1:9999` or `[::1]:4000` if available\r\n * @public\r\n */\r\nconst getDefaultEmulatorHost = (productName) => { var _a, _b; return (_b = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.emulatorHosts) === null || _b === void 0 ? void 0 : _b[productName]; };\r\n/**\r\n * Returns emulator hostname and port stored in the __FIREBASE_DEFAULTS__ object\r\n * for the given product.\r\n * @returns a pair of hostname and port like `[\"::1\", 4000]` if available\r\n * @public\r\n */\r\nconst getDefaultEmulatorHostnameAndPort = (productName) => {\r\n const host = getDefaultEmulatorHost(productName);\r\n if (!host) {\r\n return undefined;\r\n }\r\n const separatorIndex = host.lastIndexOf(':'); // Finding the last since IPv6 addr also has colons.\r\n if (separatorIndex <= 0 || separatorIndex + 1 === host.length) {\r\n throw new Error(`Invalid host ${host} with no separate hostname and port!`);\r\n }\r\n // eslint-disable-next-line no-restricted-globals\r\n const port = parseInt(host.substring(separatorIndex + 1), 10);\r\n if (host[0] === '[') {\r\n // Bracket-quoted `[ipv6addr]:port` => return \"ipv6addr\" (without brackets).\r\n return [host.substring(1, separatorIndex - 1), port];\r\n }\r\n else {\r\n return [host.substring(0, separatorIndex), port];\r\n }\r\n};\r\n/**\r\n * Returns Firebase app config stored in the __FIREBASE_DEFAULTS__ object.\r\n * @public\r\n */\r\nconst getDefaultAppConfig = () => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.config; };\r\n/**\r\n * Returns an experimental setting on the __FIREBASE_DEFAULTS__ object (properties\r\n * prefixed by \"_\")\r\n * @public\r\n */\r\nconst getExperimentalSetting = (name) => { var _a; return (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a[`_${name}`]; };\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass Deferred {\r\n constructor() {\r\n this.reject = () => { };\r\n this.resolve = () => { };\r\n this.promise = new Promise((resolve, reject) => {\r\n this.resolve = resolve;\r\n this.reject = reject;\r\n });\r\n }\r\n /**\r\n * Our API internals are not promiseified and cannot because our callback APIs have subtle expectations around\r\n * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback\r\n * and returns a node-style callback which will resolve or reject the Deferred's promise.\r\n */\r\n wrapCallback(callback) {\r\n return (error, value) => {\r\n if (error) {\r\n this.reject(error);\r\n }\r\n else {\r\n this.resolve(value);\r\n }\r\n if (typeof callback === 'function') {\r\n // Attaching noop handler just in case developer wasn't expecting\r\n // promises\r\n this.promise.catch(() => { });\r\n // Some of our callbacks don't expect a value and our own tests\r\n // assert that the parameter length is 1\r\n if (callback.length === 1) {\r\n callback(error);\r\n }\r\n else {\r\n callback(error, value);\r\n }\r\n }\r\n };\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction createMockUserToken(token, projectId) {\r\n if (token.uid) {\r\n throw new Error('The \"uid\" field is no longer supported by mockUserToken. Please use \"sub\" instead for Firebase Auth User ID.');\r\n }\r\n // Unsecured JWTs use \"none\" as the algorithm.\r\n const header = {\r\n alg: 'none',\r\n type: 'JWT'\r\n };\r\n const project = projectId || 'demo-project';\r\n const iat = token.iat || 0;\r\n const sub = token.sub || token.user_id;\r\n if (!sub) {\r\n throw new Error(\"mockUserToken must contain 'sub' or 'user_id' field!\");\r\n }\r\n const payload = Object.assign({ \r\n // Set all required fields to decent defaults\r\n iss: `https://securetoken.google.com/${project}`, aud: project, iat, exp: iat + 3600, auth_time: iat, sub, user_id: sub, firebase: {\r\n sign_in_provider: 'custom',\r\n identities: {}\r\n } }, token);\r\n // Unsecured JWTs use the empty string as a signature.\r\n const signature = '';\r\n return [\r\n base64urlEncodeWithoutPadding(JSON.stringify(header)),\r\n base64urlEncodeWithoutPadding(JSON.stringify(payload)),\r\n signature\r\n ].join('.');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns navigator.userAgent string or '' if it's not defined.\r\n * @return user agent string\r\n */\r\nfunction getUA() {\r\n if (typeof navigator !== 'undefined' &&\r\n typeof navigator['userAgent'] === 'string') {\r\n return navigator['userAgent'];\r\n }\r\n else {\r\n return '';\r\n }\r\n}\r\n/**\r\n * Detect Cordova / PhoneGap / Ionic frameworks on a mobile device.\r\n *\r\n * Deliberately does not rely on checking `file://` URLs (as this fails PhoneGap\r\n * in the Ripple emulator) nor Cordova `onDeviceReady`, which would normally\r\n * wait for a callback.\r\n */\r\nfunction isMobileCordova() {\r\n return (typeof window !== 'undefined' &&\r\n // @ts-ignore Setting up an broadly applicable index signature for Window\r\n // just to deal with this case would probably be a bad idea.\r\n !!(window['cordova'] || window['phonegap'] || window['PhoneGap']) &&\r\n /ios|iphone|ipod|ipad|android|blackberry|iemobile/i.test(getUA()));\r\n}\r\n/**\r\n * Detect Node.js.\r\n *\r\n * @return true if Node.js environment is detected or specified.\r\n */\r\n// Node detection logic from: https://github.com/iliakan/detect-node/\r\nfunction isNode() {\r\n var _a;\r\n const forceEnvironment = (_a = getDefaults()) === null || _a === void 0 ? void 0 : _a.forceEnvironment;\r\n if (forceEnvironment === 'node') {\r\n return true;\r\n }\r\n else if (forceEnvironment === 'browser') {\r\n return false;\r\n }\r\n try {\r\n return (Object.prototype.toString.call(global.process) === '[object process]');\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n}\r\n/**\r\n * Detect Browser Environment\r\n */\r\nfunction isBrowser() {\r\n return typeof self === 'object' && self.self === self;\r\n}\r\nfunction isBrowserExtension() {\r\n const runtime = typeof chrome === 'object'\r\n ? chrome.runtime\r\n : typeof browser === 'object'\r\n ? browser.runtime\r\n : undefined;\r\n return typeof runtime === 'object' && runtime.id !== undefined;\r\n}\r\n/**\r\n * Detect React Native.\r\n *\r\n * @return true if ReactNative environment is detected.\r\n */\r\nfunction isReactNative() {\r\n return (typeof navigator === 'object' && navigator['product'] === 'ReactNative');\r\n}\r\n/** Detects Electron apps. */\r\nfunction isElectron() {\r\n return getUA().indexOf('Electron/') >= 0;\r\n}\r\n/** Detects Internet Explorer. */\r\nfunction isIE() {\r\n const ua = getUA();\r\n return ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0;\r\n}\r\n/** Detects Universal Windows Platform apps. */\r\nfunction isUWP() {\r\n return getUA().indexOf('MSAppHost/') >= 0;\r\n}\r\n/**\r\n * Detect whether the current SDK build is the Node version.\r\n *\r\n * @return true if it's the Node SDK build.\r\n */\r\nfunction isNodeSdk() {\r\n return CONSTANTS.NODE_CLIENT === true || CONSTANTS.NODE_ADMIN === true;\r\n}\r\n/** Returns true if we are running in Safari. */\r\nfunction isSafari() {\r\n return (!isNode() &&\r\n navigator.userAgent.includes('Safari') &&\r\n !navigator.userAgent.includes('Chrome'));\r\n}\r\n/**\r\n * This method checks if indexedDB is supported by current browser/service worker context\r\n * @return true if indexedDB is supported by current browser/service worker context\r\n */\r\nfunction isIndexedDBAvailable() {\r\n try {\r\n return typeof indexedDB === 'object';\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n}\r\n/**\r\n * This method validates browser/sw context for indexedDB by opening a dummy indexedDB database and reject\r\n * if errors occur during the database open operation.\r\n *\r\n * @throws exception if current browser/sw context can't run idb.open (ex: Safari iframe, Firefox\r\n * private browsing)\r\n */\r\nfunction validateIndexedDBOpenable() {\r\n return new Promise((resolve, reject) => {\r\n try {\r\n let preExist = true;\r\n const DB_CHECK_NAME = 'validate-browser-context-for-indexeddb-analytics-module';\r\n const request = self.indexedDB.open(DB_CHECK_NAME);\r\n request.onsuccess = () => {\r\n request.result.close();\r\n // delete database only when it doesn't pre-exist\r\n if (!preExist) {\r\n self.indexedDB.deleteDatabase(DB_CHECK_NAME);\r\n }\r\n resolve(true);\r\n };\r\n request.onupgradeneeded = () => {\r\n preExist = false;\r\n };\r\n request.onerror = () => {\r\n var _a;\r\n reject(((_a = request.error) === null || _a === void 0 ? void 0 : _a.message) || '');\r\n };\r\n }\r\n catch (error) {\r\n reject(error);\r\n }\r\n });\r\n}\r\n/**\r\n *\r\n * This method checks whether cookie is enabled within current browser\r\n * @return true if cookie is enabled within current browser\r\n */\r\nfunction areCookiesEnabled() {\r\n if (typeof navigator === 'undefined' || !navigator.cookieEnabled) {\r\n return false;\r\n }\r\n return true;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview Standardized Firebase Error.\r\n *\r\n * Usage:\r\n *\r\n * // Typescript string literals for type-safe codes\r\n * type Err =\r\n * 'unknown' |\r\n * 'object-not-found'\r\n * ;\r\n *\r\n * // Closure enum for type-safe error codes\r\n * // at-enum {string}\r\n * var Err = {\r\n * UNKNOWN: 'unknown',\r\n * OBJECT_NOT_FOUND: 'object-not-found',\r\n * }\r\n *\r\n * let errors: Map<Err, string> = {\r\n * 'generic-error': \"Unknown error\",\r\n * 'file-not-found': \"Could not find file: {$file}\",\r\n * };\r\n *\r\n * // Type-safe function - must pass a valid error code as param.\r\n * let error = new ErrorFactory<Err>('service', 'Service', errors);\r\n *\r\n * ...\r\n * throw error.create(Err.GENERIC);\r\n * ...\r\n * throw error.create(Err.FILE_NOT_FOUND, {'file': fileName});\r\n * ...\r\n * // Service: Could not file file: foo.txt (service/file-not-found).\r\n *\r\n * catch (e) {\r\n * assert(e.message === \"Could not find file: foo.txt.\");\r\n * if ((e as FirebaseError)?.code === 'service/file-not-found') {\r\n * console.log(\"Could not read file: \" + e['file']);\r\n * }\r\n * }\r\n */\r\nconst ERROR_NAME = 'FirebaseError';\r\n// Based on code from:\r\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Custom_Error_Types\r\nclass FirebaseError extends Error {\r\n constructor(\r\n /** The error code for this error. */\r\n code, message, \r\n /** Custom data for this error. */\r\n customData) {\r\n super(message);\r\n this.code = code;\r\n this.customData = customData;\r\n /** The custom name for all FirebaseErrors. */\r\n this.name = ERROR_NAME;\r\n // Fix For ES5\r\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\r\n Object.setPrototypeOf(this, FirebaseError.prototype);\r\n // Maintains proper stack trace for where our error was thrown.\r\n // Only available on V8.\r\n if (Error.captureStackTrace) {\r\n Error.captureStackTrace(this, ErrorFactory.prototype.create);\r\n }\r\n }\r\n}\r\nclass ErrorFactory {\r\n constructor(service, serviceName, errors) {\r\n this.service = service;\r\n this.serviceName = serviceName;\r\n this.errors = errors;\r\n }\r\n create(code, ...data) {\r\n const customData = data[0] || {};\r\n const fullCode = `${this.service}/${code}`;\r\n const template = this.errors[code];\r\n const message = template ? replaceTemplate(template, customData) : 'Error';\r\n // Service Name: Error message (service/code).\r\n const fullMessage = `${this.serviceName}: ${message} (${fullCode}).`;\r\n const error = new FirebaseError(fullCode, fullMessage, customData);\r\n return error;\r\n }\r\n}\r\nfunction replaceTemplate(template, data) {\r\n return template.replace(PATTERN, (_, key) => {\r\n const value = data[key];\r\n return value != null ? String(value) : `<${key}?>`;\r\n });\r\n}\r\nconst PATTERN = /\\{\\$([^}]+)}/g;\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Evaluates a JSON string into a javascript object.\r\n *\r\n * @param {string} str A string containing JSON.\r\n * @return {*} The javascript object representing the specified JSON.\r\n */\r\nfunction jsonEval(str) {\r\n return JSON.parse(str);\r\n}\r\n/**\r\n * Returns JSON representing a javascript object.\r\n * @param {*} data Javascript object to be stringified.\r\n * @return {string} The JSON contents of the object.\r\n */\r\nfunction stringify(data) {\r\n return JSON.stringify(data);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Decodes a Firebase auth. token into constituent parts.\r\n *\r\n * Notes:\r\n * - May return with invalid / incomplete claims if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst decode = function (token) {\r\n let header = {}, claims = {}, data = {}, signature = '';\r\n try {\r\n const parts = token.split('.');\r\n header = jsonEval(base64Decode(parts[0]) || '');\r\n claims = jsonEval(base64Decode(parts[1]) || '');\r\n signature = parts[2];\r\n data = claims['d'] || {};\r\n delete claims['d'];\r\n }\r\n catch (e) { }\r\n return {\r\n header,\r\n claims,\r\n data,\r\n signature\r\n };\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its time-based claims. Will return true if the\r\n * token is within the time window authorized by the 'nbf' (not-before) and 'iat' (issued-at) claims.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isValidTimestamp = function (token) {\r\n const claims = decode(token).claims;\r\n const now = Math.floor(new Date().getTime() / 1000);\r\n let validSince = 0, validUntil = 0;\r\n if (typeof claims === 'object') {\r\n if (claims.hasOwnProperty('nbf')) {\r\n validSince = claims['nbf'];\r\n }\r\n else if (claims.hasOwnProperty('iat')) {\r\n validSince = claims['iat'];\r\n }\r\n if (claims.hasOwnProperty('exp')) {\r\n validUntil = claims['exp'];\r\n }\r\n else {\r\n // token will expire after 24h by default\r\n validUntil = validSince + 86400;\r\n }\r\n }\r\n return (!!now &&\r\n !!validSince &&\r\n !!validUntil &&\r\n now >= validSince &&\r\n now <= validUntil);\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and returns its issued at time if valid, null otherwise.\r\n *\r\n * Notes:\r\n * - May return null if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst issuedAtTime = function (token) {\r\n const claims = decode(token).claims;\r\n if (typeof claims === 'object' && claims.hasOwnProperty('iat')) {\r\n return claims['iat'];\r\n }\r\n return null;\r\n};\r\n/**\r\n * Decodes a Firebase auth. token and checks the validity of its format. Expects a valid issued-at time.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isValidFormat = function (token) {\r\n const decoded = decode(token), claims = decoded.claims;\r\n return !!claims && typeof claims === 'object' && claims.hasOwnProperty('iat');\r\n};\r\n/**\r\n * Attempts to peer into an auth token and determine if it's an admin auth token by looking at the claims portion.\r\n *\r\n * Notes:\r\n * - May return a false negative if there's no native base64 decoding support.\r\n * - Doesn't check if the token is actually valid.\r\n */\r\nconst isAdmin = function (token) {\r\n const claims = decode(token).claims;\r\n return typeof claims === 'object' && claims['admin'] === true;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction contains(obj, key) {\r\n return Object.prototype.hasOwnProperty.call(obj, key);\r\n}\r\nfunction safeGet(obj, key) {\r\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n return obj[key];\r\n }\r\n else {\r\n return undefined;\r\n }\r\n}\r\nfunction isEmpty(obj) {\r\n for (const key in obj) {\r\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction map(obj, fn, contextObj) {\r\n const res = {};\r\n for (const key in obj) {\r\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\r\n res[key] = fn.call(contextObj, obj[key], key, obj);\r\n }\r\n }\r\n return res;\r\n}\r\n/**\r\n * Deep equal two objects. Support Arrays and Objects.\r\n */\r\nfunction deepEqual(a, b) {\r\n if (a === b) {\r\n return true;\r\n }\r\n const aKeys = Object.keys(a);\r\n const bKeys = Object.keys(b);\r\n for (const k of aKeys) {\r\n if (!bKeys.includes(k)) {\r\n return false;\r\n }\r\n const aProp = a[k];\r\n const bProp = b[k];\r\n if (isObject(aProp) && isObject(bProp)) {\r\n if (!deepEqual(aProp, bProp)) {\r\n return false;\r\n }\r\n }\r\n else if (aProp !== bProp) {\r\n return false;\r\n }\r\n }\r\n for (const k of bKeys) {\r\n if (!aKeys.includes(k)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\nfunction isObject(thing) {\r\n return thing !== null && typeof thing === 'object';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Rejects if the given promise doesn't resolve in timeInMS milliseconds.\r\n * @internal\r\n */\r\nfunction promiseWithTimeout(promise, timeInMS = 2000) {\r\n const deferredPromise = new Deferred();\r\n setTimeout(() => deferredPromise.reject('timeout!'), timeInMS);\r\n promise.then(deferredPromise.resolve, deferredPromise.reject);\r\n return deferredPromise.promise;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns a querystring-formatted string (e.g. &arg=val&arg2=val2) from a\r\n * params object (e.g. {arg: 'val', arg2: 'val2'})\r\n * Note: You must prepend it with ? when adding it to a URL.\r\n */\r\nfunction querystring(querystringParams) {\r\n const params = [];\r\n for (const [key, value] of Object.entries(querystringParams)) {\r\n if (Array.isArray(value)) {\r\n value.forEach(arrayVal => {\r\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(arrayVal));\r\n });\r\n }\r\n else {\r\n params.push(encodeURIComponent(key) + '=' + encodeURIComponent(value));\r\n }\r\n }\r\n return params.length ? '&' + params.join('&') : '';\r\n}\r\n/**\r\n * Decodes a querystring (e.g. ?arg=val&arg2=val2) into a params object\r\n * (e.g. {arg: 'val', arg2: 'val2'})\r\n */\r\nfunction querystringDecode(querystring) {\r\n const obj = {};\r\n const tokens = querystring.replace(/^\\?/, '').split('&');\r\n tokens.forEach(token => {\r\n if (token) {\r\n const [key, value] = token.split('=');\r\n obj[decodeURIComponent(key)] = decodeURIComponent(value);\r\n }\r\n });\r\n return obj;\r\n}\r\n/**\r\n * Extract the query string part of a URL, including the leading question mark (if present).\r\n */\r\nfunction extractQuerystring(url) {\r\n const queryStart = url.indexOf('?');\r\n if (!queryStart) {\r\n return '';\r\n }\r\n const fragmentStart = url.indexOf('#', queryStart);\r\n return url.substring(queryStart, fragmentStart > 0 ? fragmentStart : undefined);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @fileoverview SHA-1 cryptographic hash.\r\n * Variable names follow the notation in FIPS PUB 180-3:\r\n * http://csrc.nist.gov/publications/fips/fips180-3/fips180-3_final.pdf.\r\n *\r\n * Usage:\r\n * var sha1 = new sha1();\r\n * sha1.update(bytes);\r\n * var hash = sha1.digest();\r\n *\r\n * Performance:\r\n * Chrome 23: ~400 Mbit/s\r\n * Firefox 16: ~250 Mbit/s\r\n *\r\n */\r\n/**\r\n * SHA-1 cryptographic hash constructor.\r\n *\r\n * The properties declared here are discussed in the above algorithm document.\r\n * @constructor\r\n * @final\r\n * @struct\r\n */\r\nclass Sha1 {\r\n constructor() {\r\n /**\r\n * Holds the previous values of accumulated variables a-e in the compress_\r\n * function.\r\n * @private\r\n */\r\n this.chain_ = [];\r\n /**\r\n * A buffer holding the partially computed hash result.\r\n * @private\r\n */\r\n this.buf_ = [];\r\n /**\r\n * An array of 80 bytes, each a part of the message to be hashed. Referred to\r\n * as the message schedule in the docs.\r\n * @private\r\n */\r\n this.W_ = [];\r\n /**\r\n * Contains data needed to pad messages less than 64 bytes.\r\n * @private\r\n */\r\n this.pad_ = [];\r\n /**\r\n * @private {number}\r\n */\r\n this.inbuf_ = 0;\r\n /**\r\n * @private {number}\r\n */\r\n this.total_ = 0;\r\n this.blockSize = 512 / 8;\r\n this.pad_[0] = 128;\r\n for (let i = 1; i < this.blockSize; ++i) {\r\n this.pad_[i] = 0;\r\n }\r\n this.reset();\r\n }\r\n reset() {\r\n this.chain_[0] = 0x67452301;\r\n this.chain_[1] = 0xefcdab89;\r\n this.chain_[2] = 0x98badcfe;\r\n this.chain_[3] = 0x10325476;\r\n this.chain_[4] = 0xc3d2e1f0;\r\n this.inbuf_ = 0;\r\n this.total_ = 0;\r\n }\r\n /**\r\n * Internal compress helper function.\r\n * @param buf Block to compress.\r\n * @param offset Offset of the block in the buffer.\r\n * @private\r\n */\r\n compress_(buf, offset) {\r\n if (!offset) {\r\n offset = 0;\r\n }\r\n const W = this.W_;\r\n // get 16 big endian words\r\n if (typeof buf === 'string') {\r\n for (let i = 0; i < 16; i++) {\r\n // TODO(user): [bug 8140122] Recent versions of Safari for Mac OS and iOS\r\n // have a bug that turns the post-increment ++ operator into pre-increment\r\n // during JIT compilation. We have code that depends heavily on SHA-1 for\r\n // correctness and which is affected by this bug, so I've removed all uses\r\n // of post-increment ++ in which the result value is used. We can revert\r\n // this change once the Safari bug\r\n // (https://bugs.webkit.org/show_bug.cgi?id=109036) has been fixed and\r\n // most clients have been updated.\r\n W[i] =\r\n (buf.charCodeAt(offset) << 24) |\r\n (buf.charCodeAt(offset + 1) << 16) |\r\n (buf.charCodeAt(offset + 2) << 8) |\r\n buf.charCodeAt(offset + 3);\r\n offset += 4;\r\n }\r\n }\r\n else {\r\n for (let i = 0; i < 16; i++) {\r\n W[i] =\r\n (buf[offset] << 24) |\r\n (buf[offset + 1] << 16) |\r\n (buf[offset + 2] << 8) |\r\n buf[offset + 3];\r\n offset += 4;\r\n }\r\n }\r\n // expand to 80 words\r\n for (let i = 16; i < 80; i++) {\r\n const t = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];\r\n W[i] = ((t << 1) | (t >>> 31)) & 0xffffffff;\r\n }\r\n let a = this.chain_[0];\r\n let b = this.chain_[1];\r\n let c = this.chain_[2];\r\n let d = this.chain_[3];\r\n let e = this.chain_[4];\r\n let f, k;\r\n // TODO(user): Try to unroll this loop to speed up the computation.\r\n for (let i = 0; i < 80; i++) {\r\n if (i < 40) {\r\n if (i < 20) {\r\n f = d ^ (b & (c ^ d));\r\n k = 0x5a827999;\r\n }\r\n else {\r\n f = b ^ c ^ d;\r\n k = 0x6ed9eba1;\r\n }\r\n }\r\n else {\r\n if (i < 60) {\r\n f = (b & c) | (d & (b | c));\r\n k = 0x8f1bbcdc;\r\n }\r\n else {\r\n f = b ^ c ^ d;\r\n k = 0xca62c1d6;\r\n }\r\n }\r\n const t = (((a << 5) | (a >>> 27)) + f + e + k + W[i]) & 0xffffffff;\r\n e = d;\r\n d = c;\r\n c = ((b << 30) | (b >>> 2)) & 0xffffffff;\r\n b = a;\r\n a = t;\r\n }\r\n this.chain_[0] = (this.chain_[0] + a) & 0xffffffff;\r\n this.chain_[1] = (this.chain_[1] + b) & 0xffffffff;\r\n this.chain_[2] = (this.chain_[2] + c) & 0xffffffff;\r\n this.chain_[3] = (this.chain_[3] + d) & 0xffffffff;\r\n this.chain_[4] = (this.chain_[4] + e) & 0xffffffff;\r\n }\r\n update(bytes, length) {\r\n // TODO(johnlenz): tighten the function signature and remove this check\r\n if (bytes == null) {\r\n return;\r\n }\r\n if (length === undefined) {\r\n length = bytes.length;\r\n }\r\n const lengthMinusBlock = length - this.blockSize;\r\n let n = 0;\r\n // Using local instead of member variables gives ~5% speedup on Firefox 16.\r\n const buf = this.buf_;\r\n let inbuf = this.inbuf_;\r\n // The outer while loop should execute at most twice.\r\n while (n < length) {\r\n // When we have no data in the block to top up, we can directly process the\r\n // input buffer (assuming it contains sufficient data). This gives ~25%\r\n // speedup on Chrome 23 and ~15% speedup on Firefox 16, but requires that\r\n // the data is provided in large chunks (or in multiples of 64 bytes).\r\n if (inbuf === 0) {\r\n while (n <= lengthMinusBlock) {\r\n this.compress_(bytes, n);\r\n n += this.blockSize;\r\n }\r\n }\r\n if (typeof bytes === 'string') {\r\n while (n < length) {\r\n buf[inbuf] = bytes.charCodeAt(n);\r\n ++inbuf;\r\n ++n;\r\n if (inbuf === this.blockSize) {\r\n this.compress_(buf);\r\n inbuf = 0;\r\n // Jump to the outer loop so we use the full-block optimization.\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n while (n < length) {\r\n buf[inbuf] = bytes[n];\r\n ++inbuf;\r\n ++n;\r\n if (inbuf === this.blockSize) {\r\n this.compress_(buf);\r\n inbuf = 0;\r\n // Jump to the outer loop so we use the full-block optimization.\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n this.inbuf_ = inbuf;\r\n this.total_ += length;\r\n }\r\n /** @override */\r\n digest() {\r\n const digest = [];\r\n let totalBits = this.total_ * 8;\r\n // Add pad 0x80 0x00*.\r\n if (this.inbuf_ < 56) {\r\n this.update(this.pad_, 56 - this.inbuf_);\r\n }\r\n else {\r\n this.update(this.pad_, this.blockSize - (this.inbuf_ - 56));\r\n }\r\n // Add # bits.\r\n for (let i = this.blockSize - 1; i >= 56; i--) {\r\n this.buf_[i] = totalBits & 255;\r\n totalBits /= 256; // Don't use bit-shifting here!\r\n }\r\n this.compress_(this.buf_);\r\n let n = 0;\r\n for (let i = 0; i < 5; i++) {\r\n for (let j = 24; j >= 0; j -= 8) {\r\n digest[n] = (this.chain_[i] >> j) & 255;\r\n ++n;\r\n }\r\n }\r\n return digest;\r\n }\r\n}\n\n/**\r\n * Helper to make a Subscribe function (just like Promise helps make a\r\n * Thenable).\r\n *\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\r\nfunction createSubscribe(executor, onNoObservers) {\r\n const proxy = new ObserverProxy(executor, onNoObservers);\r\n return proxy.subscribe.bind(proxy);\r\n}\r\n/**\r\n * Implement fan-out for any number of Observers attached via a subscribe\r\n * function.\r\n */\r\nclass ObserverProxy {\r\n /**\r\n * @param executor Function which can make calls to a single Observer\r\n * as a proxy.\r\n * @param onNoObservers Callback when count of Observers goes to zero.\r\n */\r\n constructor(executor, onNoObservers) {\r\n this.observers = [];\r\n this.unsubscribes = [];\r\n this.observerCount = 0;\r\n // Micro-task scheduling by calling task.then().\r\n this.task = Promise.resolve();\r\n this.finalized = false;\r\n this.onNoObservers = onNoObservers;\r\n // Call the executor asynchronously so subscribers that are called\r\n // synchronously after the creation of the subscribe function\r\n // can still receive the very first value generated in the executor.\r\n this.task\r\n .then(() => {\r\n executor(this);\r\n })\r\n .catch(e => {\r\n this.error(e);\r\n });\r\n }\r\n next(value) {\r\n this.forEachObserver((observer) => {\r\n observer.next(value);\r\n });\r\n }\r\n error(error) {\r\n this.forEachObserver((observer) => {\r\n observer.error(error);\r\n });\r\n this.close(error);\r\n }\r\n complete() {\r\n this.forEachObserver((observer) => {\r\n observer.complete();\r\n });\r\n this.close();\r\n }\r\n /**\r\n * Subscribe function that can be used to add an Observer to the fan-out list.\r\n *\r\n * - We require that no event is sent to a subscriber sychronously to their\r\n * call to subscribe().\r\n */\r\n subscribe(nextOrObserver, error, complete) {\r\n let observer;\r\n if (nextOrObserver === undefined &&\r\n error === undefined &&\r\n complete === undefined) {\r\n throw new Error('Missing Observer.');\r\n }\r\n // Assemble an Observer object when passed as callback functions.\r\n if (implementsAnyMethods(nextOrObserver, [\r\n 'next',\r\n 'error',\r\n 'complete'\r\n ])) {\r\n observer = nextOrObserver;\r\n }\r\n else {\r\n observer = {\r\n next: nextOrObserver,\r\n error,\r\n complete\r\n };\r\n }\r\n if (observer.next === undefined) {\r\n observer.next = noop;\r\n }\r\n if (observer.error === undefined) {\r\n observer.error = noop;\r\n }\r\n if (observer.complete === undefined) {\r\n observer.complete = noop;\r\n }\r\n const unsub = this.unsubscribeOne.bind(this, this.observers.length);\r\n // Attempt to subscribe to a terminated Observable - we\r\n // just respond to the Observer with the final error or complete\r\n // event.\r\n if (this.finalized) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.task.then(() => {\r\n try {\r\n if (this.finalError) {\r\n observer.error(this.finalError);\r\n }\r\n else {\r\n observer.complete();\r\n }\r\n }\r\n catch (e) {\r\n // nothing\r\n }\r\n return;\r\n });\r\n }\r\n this.observers.push(observer);\r\n return unsub;\r\n }\r\n // Unsubscribe is synchronous - we guarantee that no events are sent to\r\n // any unsubscribed Observer.\r\n unsubscribeOne(i) {\r\n if (this.observers === undefined || this.observers[i] === undefined) {\r\n return;\r\n }\r\n delete this.observers[i];\r\n this.observerCount -= 1;\r\n if (this.observerCount === 0 && this.onNoObservers !== undefined) {\r\n this.onNoObservers(this);\r\n }\r\n }\r\n forEachObserver(fn) {\r\n if (this.finalized) {\r\n // Already closed by previous event....just eat the additional values.\r\n return;\r\n }\r\n // Since sendOne calls asynchronously - there is no chance that\r\n // this.observers will become undefined.\r\n for (let i = 0; i < this.observers.length; i++) {\r\n this.sendOne(i, fn);\r\n }\r\n }\r\n // Call the Observer via one of it's callback function. We are careful to\r\n // confirm that the observe has not been unsubscribed since this asynchronous\r\n // function had been queued.\r\n sendOne(i, fn) {\r\n // Execute the callback asynchronously\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.task.then(() => {\r\n if (this.observers !== undefined && this.observers[i] !== undefined) {\r\n try {\r\n fn(this.observers[i]);\r\n }\r\n catch (e) {\r\n // Ignore exceptions raised in Observers or missing methods of an\r\n // Observer.\r\n // Log error to console. b/31404806\r\n if (typeof console !== 'undefined' && console.error) {\r\n console.error(e);\r\n }\r\n }\r\n }\r\n });\r\n }\r\n close(err) {\r\n if (this.finalized) {\r\n return;\r\n }\r\n this.finalized = true;\r\n if (err !== undefined) {\r\n this.finalError = err;\r\n }\r\n // Proxy is no longer needed - garbage collect references\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.task.then(() => {\r\n this.observers = undefined;\r\n this.onNoObservers = undefined;\r\n });\r\n }\r\n}\r\n/** Turn synchronous function into one called asynchronously. */\r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\nfunction async(fn, onError) {\r\n return (...args) => {\r\n Promise.resolve(true)\r\n .then(() => {\r\n fn(...args);\r\n })\r\n .catch((error) => {\r\n if (onError) {\r\n onError(error);\r\n }\r\n });\r\n };\r\n}\r\n/**\r\n * Return true if the object passed in implements any of the named methods.\r\n */\r\nfunction implementsAnyMethods(obj, methods) {\r\n if (typeof obj !== 'object' || obj === null) {\r\n return false;\r\n }\r\n for (const method of methods) {\r\n if (method in obj && typeof obj[method] === 'function') {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}\r\nfunction noop() {\r\n // do nothing\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Check to make sure the appropriate number of arguments are provided for a public function.\r\n * Throws an error if it fails.\r\n *\r\n * @param fnName The function name\r\n * @param minCount The minimum number of arguments to allow for the function call\r\n * @param maxCount The maximum number of argument to allow for the function call\r\n * @param argCount The actual number of arguments provided.\r\n */\r\nconst validateArgCount = function (fnName, minCount, maxCount, argCount) {\r\n let argError;\r\n if (argCount < minCount) {\r\n argError = 'at least ' + minCount;\r\n }\r\n else if (argCount > maxCount) {\r\n argError = maxCount === 0 ? 'none' : 'no more than ' + maxCount;\r\n }\r\n if (argError) {\r\n const error = fnName +\r\n ' failed: Was called with ' +\r\n argCount +\r\n (argCount === 1 ? ' argument.' : ' arguments.') +\r\n ' Expects ' +\r\n argError +\r\n '.';\r\n throw new Error(error);\r\n }\r\n};\r\n/**\r\n * Generates a string to prefix an error message about failed argument validation\r\n *\r\n * @param fnName The function name\r\n * @param argName The name of the argument\r\n * @return The prefix to add to the error thrown for validation.\r\n */\r\nfunction errorPrefix(fnName, argName) {\r\n return `${fnName} failed: ${argName} argument `;\r\n}\r\n/**\r\n * @param fnName\r\n * @param argumentNumber\r\n * @param namespace\r\n * @param optional\r\n */\r\nfunction validateNamespace(fnName, namespace, optional) {\r\n if (optional && !namespace) {\r\n return;\r\n }\r\n if (typeof namespace !== 'string') {\r\n //TODO: I should do more validation here. We only allow certain chars in namespaces.\r\n throw new Error(errorPrefix(fnName, 'namespace') + 'must be a valid firebase namespace.');\r\n }\r\n}\r\nfunction validateCallback(fnName, argumentName, \r\n// eslint-disable-next-line @typescript-eslint/ban-types\r\ncallback, optional) {\r\n if (optional && !callback) {\r\n return;\r\n }\r\n if (typeof callback !== 'function') {\r\n throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid function.');\r\n }\r\n}\r\nfunction validateContextObject(fnName, argumentName, context, optional) {\r\n if (optional && !context) {\r\n return;\r\n }\r\n if (typeof context !== 'object' || context === null) {\r\n throw new Error(errorPrefix(fnName, argumentName) + 'must be a valid context object.');\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// Code originally came from goog.crypt.stringToUtf8ByteArray, but for some reason they\r\n// automatically replaced '\\r\\n' with '\\n', and they didn't handle surrogate pairs,\r\n// so it's been modified.\r\n// Note that not all Unicode characters appear as single characters in JavaScript strings.\r\n// fromCharCode returns the UTF-16 encoding of a character - so some Unicode characters\r\n// use 2 characters in Javascript. All 4-byte UTF-8 characters begin with a first\r\n// character in the range 0xD800 - 0xDBFF (the first character of a so-called surrogate\r\n// pair).\r\n// See http://www.ecma-international.org/ecma-262/5.1/#sec-15.1.3\r\n/**\r\n * @param {string} str\r\n * @return {Array}\r\n */\r\nconst stringToByteArray = function (str) {\r\n const out = [];\r\n let p = 0;\r\n for (let i = 0; i < str.length; i++) {\r\n let c = str.charCodeAt(i);\r\n // Is this the lead surrogate in a surrogate pair?\r\n if (c >= 0xd800 && c <= 0xdbff) {\r\n const high = c - 0xd800; // the high 10 bits.\r\n i++;\r\n assert(i < str.length, 'Surrogate pair missing trail surrogate.');\r\n const low = str.charCodeAt(i) - 0xdc00; // the low 10 bits.\r\n c = 0x10000 + (high << 10) + low;\r\n }\r\n if (c < 128) {\r\n out[p++] = c;\r\n }\r\n else if (c < 2048) {\r\n out[p++] = (c >> 6) | 192;\r\n out[p++] = (c & 63) | 128;\r\n }\r\n else if (c < 65536) {\r\n out[p++] = (c >> 12) | 224;\r\n out[p++] = ((c >> 6) & 63) | 128;\r\n out[p++] = (c & 63) | 128;\r\n }\r\n else {\r\n out[p++] = (c >> 18) | 240;\r\n out[p++] = ((c >> 12) & 63) | 128;\r\n out[p++] = ((c >> 6) & 63) | 128;\r\n out[p++] = (c & 63) | 128;\r\n }\r\n }\r\n return out;\r\n};\r\n/**\r\n * Calculate length without actually converting; useful for doing cheaper validation.\r\n * @param {string} str\r\n * @return {number}\r\n */\r\nconst stringLength = function (str) {\r\n let p = 0;\r\n for (let i = 0; i < str.length; i++) {\r\n const c = str.charCodeAt(i);\r\n if (c < 128) {\r\n p++;\r\n }\r\n else if (c < 2048) {\r\n p += 2;\r\n }\r\n else if (c >= 0xd800 && c <= 0xdbff) {\r\n // Lead surrogate of a surrogate pair. The pair together will take 4 bytes to represent.\r\n p += 4;\r\n i++; // skip trail surrogate.\r\n }\r\n else {\r\n p += 3;\r\n }\r\n }\r\n return p;\r\n};\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Copied from https://stackoverflow.com/a/2117523\r\n * Generates a new uuid.\r\n * @public\r\n */\r\nconst uuidv4 = function () {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {\r\n const r = (Math.random() * 16) | 0, v = c === 'x' ? r : (r & 0x3) | 0x8;\r\n return v.toString(16);\r\n });\r\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The amount of milliseconds to exponentially increase.\r\n */\r\nconst DEFAULT_INTERVAL_MILLIS = 1000;\r\n/**\r\n * The factor to backoff by.\r\n * Should be a number greater than 1.\r\n */\r\nconst DEFAULT_BACKOFF_FACTOR = 2;\r\n/**\r\n * The maximum milliseconds to increase to.\r\n *\r\n * <p>Visible for testing\r\n */\r\nconst MAX_VALUE_MILLIS = 4 * 60 * 60 * 1000; // Four hours, like iOS and Android.\r\n/**\r\n * The percentage of backoff time to randomize by.\r\n * See\r\n * http://go/safe-client-behavior#step-1-determine-the-appropriate-retry-interval-to-handle-spike-traffic\r\n * for context.\r\n *\r\n * <p>Visible for testing\r\n */\r\nconst RANDOM_FACTOR = 0.5;\r\n/**\r\n * Based on the backoff method from\r\n * https://github.com/google/closure-library/blob/master/closure/goog/math/exponentialbackoff.js.\r\n * Extracted here so we don't need to pass metadata and a stateful ExponentialBackoff object around.\r\n */\r\nfunction calculateBackoffMillis(backoffCount, intervalMillis = DEFAULT_INTERVAL_MILLIS, backoffFactor = DEFAULT_BACKOFF_FACTOR) {\r\n // Calculates an exponentially increasing value.\r\n // Deviation: calculates value from count and a constant interval, so we only need to save value\r\n // and count to restore state.\r\n const currBaseValue = intervalMillis * Math.pow(backoffFactor, backoffCount);\r\n // A random \"fuzz\" to avoid waves of retries.\r\n // Deviation: randomFactor is required.\r\n const randomWait = Math.round(\r\n // A fraction of the backoff value to add/subtract.\r\n // Deviation: changes multiplication order to improve readability.\r\n RANDOM_FACTOR *\r\n currBaseValue *\r\n // A random float (rounded to int by Math.round above) in the range [-1, 1]. Determines\r\n // if we add or subtract.\r\n (Math.random() - 0.5) *\r\n 2);\r\n // Limits backoff to max to avoid effectively permanent backoff.\r\n return Math.min(MAX_VALUE_MILLIS, currBaseValue + randomWait);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provide English ordinal letters after a number\r\n */\r\nfunction ordinal(i) {\r\n if (!Number.isFinite(i)) {\r\n return `${i}`;\r\n }\r\n return i + indicator(i);\r\n}\r\nfunction indicator(i) {\r\n i = Math.abs(i);\r\n const cent = i % 100;\r\n if (cent >= 10 && cent <= 20) {\r\n return 'th';\r\n }\r\n const dec = i % 10;\r\n if (dec === 1) {\r\n return 'st';\r\n }\r\n if (dec === 2) {\r\n return 'nd';\r\n }\r\n if (dec === 3) {\r\n return 'rd';\r\n }\r\n return 'th';\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction getModularInstance(service) {\r\n if (service && service._delegate) {\r\n return service._delegate;\r\n }\r\n else {\r\n return service;\r\n }\r\n}\n\nexport { CONSTANTS, DecodeBase64StringError, Deferred, ErrorFactory, FirebaseError, MAX_VALUE_MILLIS, RANDOM_FACTOR, Sha1, areCookiesEnabled, assert, assertionError, async, base64, base64Decode, base64Encode, base64urlEncodeWithoutPadding, calculateBackoffMillis, contains, createMockUserToken, createSubscribe, decode, deepCopy, deepEqual, deepExtend, errorPrefix, extractQuerystring, getDefaultAppConfig, getDefaultEmulatorHost, getDefaultEmulatorHostnameAndPort, getDefaults, getExperimentalSetting, getGlobal, getModularInstance, getUA, isAdmin, isBrowser, isBrowserExtension, isElectron, isEmpty, isIE, isIndexedDBAvailable, isMobileCordova, isNode, isNodeSdk, isReactNative, isSafari, isUWP, isValidFormat, isValidTimestamp, issuedAtTime, jsonEval, map, ordinal, promiseWithTimeout, querystring, querystringDecode, safeGet, stringLength, stringToByteArray, stringify, uuidv4, validateArgCount, validateCallback, validateContextObject, validateIndexedDBOpenable, validateNamespace };\n//# sourceMappingURL=index.esm2017.js.map\n","import { Deferred } from '@firebase/util';\n\n/**\r\n * Component for service name T, e.g. `auth`, `auth-internal`\r\n */\r\nclass Component {\r\n /**\r\n *\r\n * @param name The public service name, e.g. app, auth, firestore, database\r\n * @param instanceFactory Service factory responsible for creating the public interface\r\n * @param type whether the service provided by the component is public or private\r\n */\r\n constructor(name, instanceFactory, type) {\r\n this.name = name;\r\n this.instanceFactory = instanceFactory;\r\n this.type = type;\r\n this.multipleInstances = false;\r\n /**\r\n * Properties to be added to the service namespace\r\n */\r\n this.serviceProps = {};\r\n this.instantiationMode = \"LAZY\" /* InstantiationMode.LAZY */;\r\n this.onInstanceCreated = null;\r\n }\r\n setInstantiationMode(mode) {\r\n this.instantiationMode = mode;\r\n return this;\r\n }\r\n setMultipleInstances(multipleInstances) {\r\n this.multipleInstances = multipleInstances;\r\n return this;\r\n }\r\n setServiceProps(props) {\r\n this.serviceProps = props;\r\n return this;\r\n }\r\n setInstanceCreatedCallback(callback) {\r\n this.onInstanceCreated = callback;\r\n return this;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for instance for service name T, e.g. 'auth', 'auth-internal'\r\n * NameServiceMapping[T] is an alias for the type of the instance\r\n */\r\nclass Provider {\r\n constructor(name, container) {\r\n this.name = name;\r\n this.container = container;\r\n this.component = null;\r\n this.instances = new Map();\r\n this.instancesDeferred = new Map();\r\n this.instancesOptions = new Map();\r\n this.onInitCallbacks = new Map();\r\n }\r\n /**\r\n * @param identifier A provider can provide mulitple instances of a service\r\n * if this.component.multipleInstances is true.\r\n */\r\n get(identifier) {\r\n // if multipleInstances is not supported, use the default name\r\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\r\n if (!this.instancesDeferred.has(normalizedIdentifier)) {\r\n const deferred = new Deferred();\r\n this.instancesDeferred.set(normalizedIdentifier, deferred);\r\n if (this.isInitialized(normalizedIdentifier) ||\r\n this.shouldAutoInitialize()) {\r\n // initialize the service if it can be auto-initialized\r\n try {\r\n const instance = this.getOrInitializeService({\r\n instanceIdentifier: normalizedIdentifier\r\n });\r\n if (instance) {\r\n deferred.resolve(instance);\r\n }\r\n }\r\n catch (e) {\r\n // when the instance factory throws an exception during get(), it should not cause\r\n // a fatal error. We just return the unresolved promise in this case.\r\n }\r\n }\r\n }\r\n return this.instancesDeferred.get(normalizedIdentifier).promise;\r\n }\r\n getImmediate(options) {\r\n var _a;\r\n // if multipleInstances is not supported, use the default name\r\n const normalizedIdentifier = this.normalizeInstanceIdentifier(options === null || options === void 0 ? void 0 : options.identifier);\r\n const optional = (_a = options === null || options === void 0 ? void 0 : options.optional) !== null && _a !== void 0 ? _a : false;\r\n if (this.isInitialized(normalizedIdentifier) ||\r\n this.shouldAutoInitialize()) {\r\n try {\r\n return this.getOrInitializeService({\r\n instanceIdentifier: normalizedIdentifier\r\n });\r\n }\r\n catch (e) {\r\n if (optional) {\r\n return null;\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n }\r\n else {\r\n // In case a component is not initialized and should/can not be auto-initialized at the moment, return null if the optional flag is set, or throw\r\n if (optional) {\r\n return null;\r\n }\r\n else {\r\n throw Error(`Service ${this.name} is not available`);\r\n }\r\n }\r\n }\r\n getComponent() {\r\n return this.component;\r\n }\r\n setComponent(component) {\r\n if (component.name !== this.name) {\r\n throw Error(`Mismatching Component ${component.name} for Provider ${this.name}.`);\r\n }\r\n if (this.component) {\r\n throw Error(`Component for ${this.name} has already been provided`);\r\n }\r\n this.component = component;\r\n // return early without attempting to initialize the component if the component requires explicit initialization (calling `Provider.initialize()`)\r\n if (!this.shouldAutoInitialize()) {\r\n return;\r\n }\r\n // if the service is eager, initialize the default instance\r\n if (isComponentEager(component)) {\r\n try {\r\n this.getOrInitializeService({ instanceIdentifier: DEFAULT_ENTRY_NAME });\r\n }\r\n catch (e) {\r\n // when the instance factory for an eager Component throws an exception during the eager\r\n // initialization, it should not cause a fatal error.\r\n // TODO: Investigate if we need to make it configurable, because some component may want to cause\r\n // a fatal error in this case?\r\n }\r\n }\r\n // Create service instances for the pending promises and resolve them\r\n // NOTE: if this.multipleInstances is false, only the default instance will be created\r\n // and all promises with resolve with it regardless of the identifier.\r\n for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\r\n const normalizedIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\r\n try {\r\n // `getOrInitializeService()` should always return a valid instance since a component is guaranteed. use ! to make typescript happy.\r\n const instance = this.getOrInitializeService({\r\n instanceIdentifier: normalizedIdentifier\r\n });\r\n instanceDeferred.resolve(instance);\r\n }\r\n catch (e) {\r\n // when the instance factory throws an exception, it should not cause\r\n // a fatal error. We just leave the promise unresolved.\r\n }\r\n }\r\n }\r\n clearInstance(identifier = DEFAULT_ENTRY_NAME) {\r\n this.instancesDeferred.delete(identifier);\r\n this.instancesOptions.delete(identifier);\r\n this.instances.delete(identifier);\r\n }\r\n // app.delete() will call this method on every provider to delete the services\r\n // TODO: should we mark the provider as deleted?\r\n async delete() {\r\n const services = Array.from(this.instances.values());\r\n await Promise.all([\r\n ...services\r\n .filter(service => 'INTERNAL' in service) // legacy services\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map(service => service.INTERNAL.delete()),\r\n ...services\r\n .filter(service => '_delete' in service) // modularized services\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n .map(service => service._delete())\r\n ]);\r\n }\r\n isComponentSet() {\r\n return this.component != null;\r\n }\r\n isInitialized(identifier = DEFAULT_ENTRY_NAME) {\r\n return this.instances.has(identifier);\r\n }\r\n getOptions(identifier = DEFAULT_ENTRY_NAME) {\r\n return this.instancesOptions.get(identifier) || {};\r\n }\r\n initialize(opts = {}) {\r\n const { options = {} } = opts;\r\n const normalizedIdentifier = this.normalizeInstanceIdentifier(opts.instanceIdentifier);\r\n if (this.isInitialized(normalizedIdentifier)) {\r\n throw Error(`${this.name}(${normalizedIdentifier}) has already been initialized`);\r\n }\r\n if (!this.isComponentSet()) {\r\n throw Error(`Component ${this.name} has not been registered yet`);\r\n }\r\n const instance = this.getOrInitializeService({\r\n instanceIdentifier: normalizedIdentifier,\r\n options\r\n });\r\n // resolve any pending promise waiting for the service instance\r\n for (const [instanceIdentifier, instanceDeferred] of this.instancesDeferred.entries()) {\r\n const normalizedDeferredIdentifier = this.normalizeInstanceIdentifier(instanceIdentifier);\r\n if (normalizedIdentifier === normalizedDeferredIdentifier) {\r\n instanceDeferred.resolve(instance);\r\n }\r\n }\r\n return instance;\r\n }\r\n /**\r\n *\r\n * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().\r\n * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.\r\n *\r\n * @param identifier An optional instance identifier\r\n * @returns a function to unregister the callback\r\n */\r\n onInit(callback, identifier) {\r\n var _a;\r\n const normalizedIdentifier = this.normalizeInstanceIdentifier(identifier);\r\n const existingCallbacks = (_a = this.onInitCallbacks.get(normalizedIdentifier)) !== null && _a !== void 0 ? _a : new Set();\r\n existingCallbacks.add(callback);\r\n this.onInitCallbacks.set(normalizedIdentifier, existingCallbacks);\r\n const existingInstance = this.instances.get(normalizedIdentifier);\r\n if (existingInstance) {\r\n callback(existingInstance, normalizedIdentifier);\r\n }\r\n return () => {\r\n existingCallbacks.delete(callback);\r\n };\r\n }\r\n /**\r\n * Invoke onInit callbacks synchronously\r\n * @param instance the service instance`\r\n */\r\n invokeOnInitCallbacks(instance, identifier) {\r\n const callbacks = this.onInitCallbacks.get(identifier);\r\n if (!callbacks) {\r\n return;\r\n }\r\n for (const callback of callbacks) {\r\n try {\r\n callback(instance, identifier);\r\n }\r\n catch (_a) {\r\n // ignore errors in the onInit callback\r\n }\r\n }\r\n }\r\n getOrInitializeService({ instanceIdentifier, options = {} }) {\r\n let instance = this.instances.get(instanceIdentifier);\r\n if (!instance && this.component) {\r\n instance = this.component.instanceFactory(this.container, {\r\n instanceIdentifier: normalizeIdentifierForFactory(instanceIdentifier),\r\n options\r\n });\r\n this.instances.set(instanceIdentifier, instance);\r\n this.instancesOptions.set(instanceIdentifier, options);\r\n /**\r\n * Invoke onInit listeners.\r\n * Note this.component.onInstanceCreated is different, which is used by the component creator,\r\n * while onInit listeners are registered by consumers of the provider.\r\n */\r\n this.invokeOnInitCallbacks(instance, instanceIdentifier);\r\n /**\r\n * Order is important\r\n * onInstanceCreated() should be called after this.instances.set(instanceIdentifier, instance); which\r\n * makes `isInitialized()` return true.\r\n */\r\n if (this.component.onInstanceCreated) {\r\n try {\r\n this.component.onInstanceCreated(this.container, instanceIdentifier, instance);\r\n }\r\n catch (_a) {\r\n // ignore errors in the onInstanceCreatedCallback\r\n }\r\n }\r\n }\r\n return instance || null;\r\n }\r\n normalizeInstanceIdentifier(identifier = DEFAULT_ENTRY_NAME) {\r\n if (this.component) {\r\n return this.component.multipleInstances ? identifier : DEFAULT_ENTRY_NAME;\r\n }\r\n else {\r\n return identifier; // assume multiple instances are supported before the component is provided.\r\n }\r\n }\r\n shouldAutoInitialize() {\r\n return (!!this.component &&\r\n this.component.instantiationMode !== \"EXPLICIT\" /* InstantiationMode.EXPLICIT */);\r\n }\r\n}\r\n// undefined should be passed to the service factory for the default instance\r\nfunction normalizeIdentifierForFactory(identifier) {\r\n return identifier === DEFAULT_ENTRY_NAME ? undefined : identifier;\r\n}\r\nfunction isComponentEager(component) {\r\n return component.instantiationMode === \"EAGER\" /* InstantiationMode.EAGER */;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * ComponentContainer that provides Providers for service name T, e.g. `auth`, `auth-internal`\r\n */\r\nclass ComponentContainer {\r\n constructor(name) {\r\n this.name = name;\r\n this.providers = new Map();\r\n }\r\n /**\r\n *\r\n * @param component Component being added\r\n * @param overwrite When a component with the same name has already been registered,\r\n * if overwrite is true: overwrite the existing component with the new component and create a new\r\n * provider with the new component. It can be useful in tests where you want to use different mocks\r\n * for different tests.\r\n * if overwrite is false: throw an exception\r\n */\r\n addComponent(component) {\r\n const provider = this.getProvider(component.name);\r\n if (provider.isComponentSet()) {\r\n throw new Error(`Component ${component.name} has already been registered with ${this.name}`);\r\n }\r\n provider.setComponent(component);\r\n }\r\n addOrOverwriteComponent(component) {\r\n const provider = this.getProvider(component.name);\r\n if (provider.isComponentSet()) {\r\n // delete the existing provider from the container, so we can register the new component\r\n this.providers.delete(component.name);\r\n }\r\n this.addComponent(component);\r\n }\r\n /**\r\n * getProvider provides a type safe interface where it can only be called with a field name\r\n * present in NameServiceMapping interface.\r\n *\r\n * Firebase SDKs providing services should extend NameServiceMapping interface to register\r\n * themselves.\r\n */\r\n getProvider(name) {\r\n if (this.providers.has(name)) {\r\n return this.providers.get(name);\r\n }\r\n // create a Provider for a service that hasn't registered with Firebase\r\n const provider = new Provider(name, this);\r\n this.providers.set(name, provider);\r\n return provider;\r\n }\r\n getProviders() {\r\n return Array.from(this.providers.values());\r\n }\r\n}\n\nexport { Component, ComponentContainer, Provider };\n//# sourceMappingURL=index.esm2017.js.map\n","/**\r\n * @license\r\n * Copyright 2017 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * A container for all of the Logger instances\r\n */\r\nconst instances = [];\r\n/**\r\n * The JS SDK supports 5 log levels and also allows a user the ability to\r\n * silence the logs altogether.\r\n *\r\n * The order is a follows:\r\n * DEBUG < VERBOSE < INFO < WARN < ERROR\r\n *\r\n * All of the log types above the current log level will be captured (i.e. if\r\n * you set the log level to `INFO`, errors will still be logged, but `DEBUG` and\r\n * `VERBOSE` logs will not)\r\n */\r\nvar LogLevel;\r\n(function (LogLevel) {\r\n LogLevel[LogLevel[\"DEBUG\"] = 0] = \"DEBUG\";\r\n LogLevel[LogLevel[\"VERBOSE\"] = 1] = \"VERBOSE\";\r\n LogLevel[LogLevel[\"INFO\"] = 2] = \"INFO\";\r\n LogLevel[LogLevel[\"WARN\"] = 3] = \"WARN\";\r\n LogLevel[LogLevel[\"ERROR\"] = 4] = \"ERROR\";\r\n LogLevel[LogLevel[\"SILENT\"] = 5] = \"SILENT\";\r\n})(LogLevel || (LogLevel = {}));\r\nconst levelStringToEnum = {\r\n 'debug': LogLevel.DEBUG,\r\n 'verbose': LogLevel.VERBOSE,\r\n 'info': LogLevel.INFO,\r\n 'warn': LogLevel.WARN,\r\n 'error': LogLevel.ERROR,\r\n 'silent': LogLevel.SILENT\r\n};\r\n/**\r\n * The default log level\r\n */\r\nconst defaultLogLevel = LogLevel.INFO;\r\n/**\r\n * By default, `console.debug` is not displayed in the developer console (in\r\n * chrome). To avoid forcing users to have to opt-in to these logs twice\r\n * (i.e. once for firebase, and once in the console), we are sending `DEBUG`\r\n * logs to the `console.log` function.\r\n */\r\nconst ConsoleMethod = {\r\n [LogLevel.DEBUG]: 'log',\r\n [LogLevel.VERBOSE]: 'log',\r\n [LogLevel.INFO]: 'info',\r\n [LogLevel.WARN]: 'warn',\r\n [LogLevel.ERROR]: 'error'\r\n};\r\n/**\r\n * The default log handler will forward DEBUG, VERBOSE, INFO, WARN, and ERROR\r\n * messages on to their corresponding console counterparts (if the log method\r\n * is supported by the current log level)\r\n */\r\nconst defaultLogHandler = (instance, logType, ...args) => {\r\n if (logType < instance.logLevel) {\r\n return;\r\n }\r\n const now = new Date().toISOString();\r\n const method = ConsoleMethod[logType];\r\n if (method) {\r\n console[method](`[${now}] ${instance.name}:`, ...args);\r\n }\r\n else {\r\n throw new Error(`Attempted to log a message with an invalid logType (value: ${logType})`);\r\n }\r\n};\r\nclass Logger {\r\n /**\r\n * Gives you an instance of a Logger to capture messages according to\r\n * Firebase's logging scheme.\r\n *\r\n * @param name The name that the logs will be associated with\r\n */\r\n constructor(name) {\r\n this.name = name;\r\n /**\r\n * The log level of the given Logger instance.\r\n */\r\n this._logLevel = defaultLogLevel;\r\n /**\r\n * The main (internal) log handler for the Logger instance.\r\n * Can be set to a new function in internal package code but not by user.\r\n */\r\n this._logHandler = defaultLogHandler;\r\n /**\r\n * The optional, additional, user-defined log handler for the Logger instance.\r\n */\r\n this._userLogHandler = null;\r\n /**\r\n * Capture the current instance for later use\r\n */\r\n instances.push(this);\r\n }\r\n get logLevel() {\r\n return this._logLevel;\r\n }\r\n set logLevel(val) {\r\n if (!(val in LogLevel)) {\r\n throw new TypeError(`Invalid value \"${val}\" assigned to \\`logLevel\\``);\r\n }\r\n this._logLevel = val;\r\n }\r\n // Workaround for setter/getter having to be the same type.\r\n setLogLevel(val) {\r\n this._logLevel = typeof val === 'string' ? levelStringToEnum[val] : val;\r\n }\r\n get logHandler() {\r\n return this._logHandler;\r\n }\r\n set logHandler(val) {\r\n if (typeof val !== 'function') {\r\n throw new TypeError('Value assigned to `logHandler` must be a function');\r\n }\r\n this._logHandler = val;\r\n }\r\n get userLogHandler() {\r\n return this._userLogHandler;\r\n }\r\n set userLogHandler(val) {\r\n this._userLogHandler = val;\r\n }\r\n /**\r\n * The functions below are all based on the `console` interface\r\n */\r\n debug(...args) {\r\n this._userLogHandler && this._userLogHandler(this, LogLevel.DEBUG, ...args);\r\n this._logHandler(this, LogLevel.DEBUG, ...args);\r\n }\r\n log(...args) {\r\n this._userLogHandler &&\r\n this._userLogHandler(this, LogLevel.VERBOSE, ...args);\r\n this._logHandler(this, LogLevel.VERBOSE, ...args);\r\n }\r\n info(...args) {\r\n this._userLogHandler && this._userLogHandler(this, LogLevel.INFO, ...args);\r\n this._logHandler(this, LogLevel.INFO, ...args);\r\n }\r\n warn(...args) {\r\n this._userLogHandler && this._userLogHandler(this, LogLevel.WARN, ...args);\r\n this._logHandler(this, LogLevel.WARN, ...args);\r\n }\r\n error(...args) {\r\n this._userLogHandler && this._userLogHandler(this, LogLevel.ERROR, ...args);\r\n this._logHandler(this, LogLevel.ERROR, ...args);\r\n }\r\n}\r\nfunction setLogLevel(level) {\r\n instances.forEach(inst => {\r\n inst.setLogLevel(level);\r\n });\r\n}\r\nfunction setUserLogHandler(logCallback, options) {\r\n for (const instance of instances) {\r\n let customLogLevel = null;\r\n if (options && options.level) {\r\n customLogLevel = levelStringToEnum[options.level];\r\n }\r\n if (logCallback === null) {\r\n instance.userLogHandler = null;\r\n }\r\n else {\r\n instance.userLogHandler = (instance, level, ...args) => {\r\n const message = args\r\n .map(arg => {\r\n if (arg == null) {\r\n return null;\r\n }\r\n else if (typeof arg === 'string') {\r\n return arg;\r\n }\r\n else if (typeof arg === 'number' || typeof arg === 'boolean') {\r\n return arg.toString();\r\n }\r\n else if (arg instanceof Error) {\r\n return arg.message;\r\n }\r\n else {\r\n try {\r\n return JSON.stringify(arg);\r\n }\r\n catch (ignored) {\r\n return null;\r\n }\r\n }\r\n })\r\n .filter(arg => arg)\r\n .join(' ');\r\n if (level >= (customLogLevel !== null && customLogLevel !== void 0 ? customLogLevel : instance.logLevel)) {\r\n logCallback({\r\n level: LogLevel[level].toLowerCase(),\r\n message,\r\n args,\r\n type: instance.name\r\n });\r\n }\r\n };\r\n }\r\n }\r\n}\n\nexport { LogLevel, Logger, setLogLevel, setUserLogHandler };\n//# sourceMappingURL=index.esm2017.js.map\n","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction), event);\n });\n }\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event.newVersion, event));\n }\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking) {\n db.addEventListener('versionchange', (event) => blocking(event.oldVersion, event.newVersion, event));\n }\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked) {\n request.addEventListener('blocked', (event) => blocked(\n // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405\n event.oldVersion, event));\n }\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","import { Component, ComponentContainer } from '@firebase/component';\nimport { Logger, setUserLogHandler, setLogLevel as setLogLevel$1 } from '@firebase/logger';\nimport { ErrorFactory, getDefaultAppConfig, deepEqual, FirebaseError, base64urlEncodeWithoutPadding, isIndexedDBAvailable, validateIndexedDBOpenable } from '@firebase/util';\nexport { FirebaseError } from '@firebase/util';\nimport { openDB } from 'idb';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass PlatformLoggerServiceImpl {\r\n constructor(container) {\r\n this.container = container;\r\n }\r\n // In initial implementation, this will be called by installations on\r\n // auth token refresh, and installations will send this string.\r\n getPlatformInfoString() {\r\n const providers = this.container.getProviders();\r\n // Loop through providers and get library/version pairs from any that are\r\n // version components.\r\n return providers\r\n .map(provider => {\r\n if (isVersionServiceProvider(provider)) {\r\n const service = provider.getImmediate();\r\n return `${service.library}/${service.version}`;\r\n }\r\n else {\r\n return null;\r\n }\r\n })\r\n .filter(logString => logString)\r\n .join(' ');\r\n }\r\n}\r\n/**\r\n *\r\n * @param provider check if this provider provides a VersionService\r\n *\r\n * NOTE: Using Provider<'app-version'> is a hack to indicate that the provider\r\n * provides VersionService. The provider is not necessarily a 'app-version'\r\n * provider.\r\n */\r\nfunction isVersionServiceProvider(provider) {\r\n const component = provider.getComponent();\r\n return (component === null || component === void 0 ? void 0 : component.type) === \"VERSION\" /* ComponentType.VERSION */;\r\n}\n\nconst name$o = \"@firebase/app\";\nconst version$1 = \"0.9.16\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst logger = new Logger('@firebase/app');\n\nconst name$n = \"@firebase/app-compat\";\n\nconst name$m = \"@firebase/analytics-compat\";\n\nconst name$l = \"@firebase/analytics\";\n\nconst name$k = \"@firebase/app-check-compat\";\n\nconst name$j = \"@firebase/app-check\";\n\nconst name$i = \"@firebase/auth\";\n\nconst name$h = \"@firebase/auth-compat\";\n\nconst name$g = \"@firebase/database\";\n\nconst name$f = \"@firebase/database-compat\";\n\nconst name$e = \"@firebase/functions\";\n\nconst name$d = \"@firebase/functions-compat\";\n\nconst name$c = \"@firebase/installations\";\n\nconst name$b = \"@firebase/installations-compat\";\n\nconst name$a = \"@firebase/messaging\";\n\nconst name$9 = \"@firebase/messaging-compat\";\n\nconst name$8 = \"@firebase/performance\";\n\nconst name$7 = \"@firebase/performance-compat\";\n\nconst name$6 = \"@firebase/remote-config\";\n\nconst name$5 = \"@firebase/remote-config-compat\";\n\nconst name$4 = \"@firebase/storage\";\n\nconst name$3 = \"@firebase/storage-compat\";\n\nconst name$2 = \"@firebase/firestore\";\n\nconst name$1 = \"@firebase/firestore-compat\";\n\nconst name = \"firebase\";\nconst version = \"10.2.0\";\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The default app name\r\n *\r\n * @internal\r\n */\r\nconst DEFAULT_ENTRY_NAME = '[DEFAULT]';\r\nconst PLATFORM_LOG_STRING = {\r\n [name$o]: 'fire-core',\r\n [name$n]: 'fire-core-compat',\r\n [name$l]: 'fire-analytics',\r\n [name$m]: 'fire-analytics-compat',\r\n [name$j]: 'fire-app-check',\r\n [name$k]: 'fire-app-check-compat',\r\n [name$i]: 'fire-auth',\r\n [name$h]: 'fire-auth-compat',\r\n [name$g]: 'fire-rtdb',\r\n [name$f]: 'fire-rtdb-compat',\r\n [name$e]: 'fire-fn',\r\n [name$d]: 'fire-fn-compat',\r\n [name$c]: 'fire-iid',\r\n [name$b]: 'fire-iid-compat',\r\n [name$a]: 'fire-fcm',\r\n [name$9]: 'fire-fcm-compat',\r\n [name$8]: 'fire-perf',\r\n [name$7]: 'fire-perf-compat',\r\n [name$6]: 'fire-rc',\r\n [name$5]: 'fire-rc-compat',\r\n [name$4]: 'fire-gcs',\r\n [name$3]: 'fire-gcs-compat',\r\n [name$2]: 'fire-fst',\r\n [name$1]: 'fire-fst-compat',\r\n 'fire-js': 'fire-js',\r\n [name]: 'fire-js-all'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * @internal\r\n */\r\nconst _apps = new Map();\r\n/**\r\n * Registered components.\r\n *\r\n * @internal\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\r\nconst _components = new Map();\r\n/**\r\n * @param component - the component being added to this app's container\r\n *\r\n * @internal\r\n */\r\nfunction _addComponent(app, component) {\r\n try {\r\n app.container.addComponent(component);\r\n }\r\n catch (e) {\r\n logger.debug(`Component ${component.name} failed to register with FirebaseApp ${app.name}`, e);\r\n }\r\n}\r\n/**\r\n *\r\n * @internal\r\n */\r\nfunction _addOrOverwriteComponent(app, component) {\r\n app.container.addOrOverwriteComponent(component);\r\n}\r\n/**\r\n *\r\n * @param component - the component to register\r\n * @returns whether or not the component is registered successfully\r\n *\r\n * @internal\r\n */\r\nfunction _registerComponent(component) {\r\n const componentName = component.name;\r\n if (_components.has(componentName)) {\r\n logger.debug(`There were multiple attempts to register component ${componentName}.`);\r\n return false;\r\n }\r\n _components.set(componentName, component);\r\n // add the component to existing app instances\r\n for (const app of _apps.values()) {\r\n _addComponent(app, component);\r\n }\r\n return true;\r\n}\r\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n *\r\n * @returns the provider for the service with the matching name\r\n *\r\n * @internal\r\n */\r\nfunction _getProvider(app, name) {\r\n const heartbeatController = app.container\r\n .getProvider('heartbeat')\r\n .getImmediate({ optional: true });\r\n if (heartbeatController) {\r\n void heartbeatController.triggerHeartbeat();\r\n }\r\n return app.container.getProvider(name);\r\n}\r\n/**\r\n *\r\n * @param app - FirebaseApp instance\r\n * @param name - service name\r\n * @param instanceIdentifier - service instance identifier in case the service supports multiple instances\r\n *\r\n * @internal\r\n */\r\nfunction _removeServiceInstance(app, name, instanceIdentifier = DEFAULT_ENTRY_NAME) {\r\n _getProvider(app, name).clearInstance(instanceIdentifier);\r\n}\r\n/**\r\n * Test only\r\n *\r\n * @internal\r\n */\r\nfunction _clearComponents() {\r\n _components.clear();\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst ERRORS = {\r\n [\"no-app\" /* AppError.NO_APP */]: \"No Firebase App '{$appName}' has been created - \" +\r\n 'call initializeApp() first',\r\n [\"bad-app-name\" /* AppError.BAD_APP_NAME */]: \"Illegal App name: '{$appName}\",\r\n [\"duplicate-app\" /* AppError.DUPLICATE_APP */]: \"Firebase App named '{$appName}' already exists with different options or config\",\r\n [\"app-deleted\" /* AppError.APP_DELETED */]: \"Firebase App named '{$appName}' already deleted\",\r\n [\"no-options\" /* AppError.NO_OPTIONS */]: 'Need to provide options, when not being deployed to hosting via source.',\r\n [\"invalid-app-argument\" /* AppError.INVALID_APP_ARGUMENT */]: 'firebase.{$appName}() takes either no argument or a ' +\r\n 'Firebase App instance.',\r\n [\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */]: 'First argument to `onLog` must be null or a function.',\r\n [\"idb-open\" /* AppError.IDB_OPEN */]: 'Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.',\r\n [\"idb-get\" /* AppError.IDB_GET */]: 'Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.',\r\n [\"idb-set\" /* AppError.IDB_WRITE */]: 'Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.',\r\n [\"idb-delete\" /* AppError.IDB_DELETE */]: 'Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.'\r\n};\r\nconst ERROR_FACTORY = new ErrorFactory('app', 'Firebase', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass FirebaseAppImpl {\r\n constructor(options, config, container) {\r\n this._isDeleted = false;\r\n this._options = Object.assign({}, options);\r\n this._config = Object.assign({}, config);\r\n this._name = config.name;\r\n this._automaticDataCollectionEnabled =\r\n config.automaticDataCollectionEnabled;\r\n this._container = container;\r\n this.container.addComponent(new Component('app', () => this, \"PUBLIC\" /* ComponentType.PUBLIC */));\r\n }\r\n get automaticDataCollectionEnabled() {\r\n this.checkDestroyed();\r\n return this._automaticDataCollectionEnabled;\r\n }\r\n set automaticDataCollectionEnabled(val) {\r\n this.checkDestroyed();\r\n this._automaticDataCollectionEnabled = val;\r\n }\r\n get name() {\r\n this.checkDestroyed();\r\n return this._name;\r\n }\r\n get options() {\r\n this.checkDestroyed();\r\n return this._options;\r\n }\r\n get config() {\r\n this.checkDestroyed();\r\n return this._config;\r\n }\r\n get container() {\r\n return this._container;\r\n }\r\n get isDeleted() {\r\n return this._isDeleted;\r\n }\r\n set isDeleted(val) {\r\n this._isDeleted = val;\r\n }\r\n /**\r\n * This function will throw an Error if the App has already been deleted -\r\n * use before performing API actions on the App.\r\n */\r\n checkDestroyed() {\r\n if (this.isDeleted) {\r\n throw ERROR_FACTORY.create(\"app-deleted\" /* AppError.APP_DELETED */, { appName: this._name });\r\n }\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The current SDK version.\r\n *\r\n * @public\r\n */\r\nconst SDK_VERSION = version;\r\nfunction initializeApp(_options, rawConfig = {}) {\r\n let options = _options;\r\n if (typeof rawConfig !== 'object') {\r\n const name = rawConfig;\r\n rawConfig = { name };\r\n }\r\n const config = Object.assign({ name: DEFAULT_ENTRY_NAME, automaticDataCollectionEnabled: false }, rawConfig);\r\n const name = config.name;\r\n if (typeof name !== 'string' || !name) {\r\n throw ERROR_FACTORY.create(\"bad-app-name\" /* AppError.BAD_APP_NAME */, {\r\n appName: String(name)\r\n });\r\n }\r\n options || (options = getDefaultAppConfig());\r\n if (!options) {\r\n throw ERROR_FACTORY.create(\"no-options\" /* AppError.NO_OPTIONS */);\r\n }\r\n const existingApp = _apps.get(name);\r\n if (existingApp) {\r\n // return the existing app if options and config deep equal the ones in the existing app.\r\n if (deepEqual(options, existingApp.options) &&\r\n deepEqual(config, existingApp.config)) {\r\n return existingApp;\r\n }\r\n else {\r\n throw ERROR_FACTORY.create(\"duplicate-app\" /* AppError.DUPLICATE_APP */, { appName: name });\r\n }\r\n }\r\n const container = new ComponentContainer(name);\r\n for (const component of _components.values()) {\r\n container.addComponent(component);\r\n }\r\n const newApp = new FirebaseAppImpl(options, config, container);\r\n _apps.set(name, newApp);\r\n return newApp;\r\n}\r\n/**\r\n * Retrieves a {@link @firebase/app#FirebaseApp} instance.\r\n *\r\n * When called with no arguments, the default app is returned. When an app name\r\n * is provided, the app corresponding to that name is returned.\r\n *\r\n * An exception is thrown if the app being retrieved has not yet been\r\n * initialized.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return the default app\r\n * const app = getApp();\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Return a named app\r\n * const otherApp = getApp(\"otherApp\");\r\n * ```\r\n *\r\n * @param name - Optional name of the app to return. If no name is\r\n * provided, the default is `\"[DEFAULT]\"`.\r\n *\r\n * @returns The app corresponding to the provided app name.\r\n * If no app name is provided, the default app is returned.\r\n *\r\n * @public\r\n */\r\nfunction getApp(name = DEFAULT_ENTRY_NAME) {\r\n const app = _apps.get(name);\r\n if (!app && name === DEFAULT_ENTRY_NAME && getDefaultAppConfig()) {\r\n return initializeApp();\r\n }\r\n if (!app) {\r\n throw ERROR_FACTORY.create(\"no-app\" /* AppError.NO_APP */, { appName: name });\r\n }\r\n return app;\r\n}\r\n/**\r\n * A (read-only) array of all initialized apps.\r\n * @public\r\n */\r\nfunction getApps() {\r\n return Array.from(_apps.values());\r\n}\r\n/**\r\n * Renders this app unusable and frees the resources of all associated\r\n * services.\r\n *\r\n * @example\r\n * ```javascript\r\n * deleteApp(app)\r\n * .then(function() {\r\n * console.log(\"App deleted successfully\");\r\n * })\r\n * .catch(function(error) {\r\n * console.log(\"Error deleting app:\", error);\r\n * });\r\n * ```\r\n *\r\n * @public\r\n */\r\nasync function deleteApp(app) {\r\n const name = app.name;\r\n if (_apps.has(name)) {\r\n _apps.delete(name);\r\n await Promise.all(app.container\r\n .getProviders()\r\n .map(provider => provider.delete()));\r\n app.isDeleted = true;\r\n }\r\n}\r\n/**\r\n * Registers a library's name and version for platform logging purposes.\r\n * @param library - Name of 1p or 3p library (e.g. firestore, angularfire)\r\n * @param version - Current version of that library.\r\n * @param variant - Bundle variant, e.g., node, rn, etc.\r\n *\r\n * @public\r\n */\r\nfunction registerVersion(libraryKeyOrName, version, variant) {\r\n var _a;\r\n // TODO: We can use this check to whitelist strings when/if we set up\r\n // a good whitelist system.\r\n let library = (_a = PLATFORM_LOG_STRING[libraryKeyOrName]) !== null && _a !== void 0 ? _a : libraryKeyOrName;\r\n if (variant) {\r\n library += `-${variant}`;\r\n }\r\n const libraryMismatch = library.match(/\\s|\\//);\r\n const versionMismatch = version.match(/\\s|\\//);\r\n if (libraryMismatch || versionMismatch) {\r\n const warning = [\r\n `Unable to register library \"${library}\" with version \"${version}\":`\r\n ];\r\n if (libraryMismatch) {\r\n warning.push(`library name \"${library}\" contains illegal characters (whitespace or \"/\")`);\r\n }\r\n if (libraryMismatch && versionMismatch) {\r\n warning.push('and');\r\n }\r\n if (versionMismatch) {\r\n warning.push(`version name \"${version}\" contains illegal characters (whitespace or \"/\")`);\r\n }\r\n logger.warn(warning.join(' '));\r\n return;\r\n }\r\n _registerComponent(new Component(`${library}-version`, () => ({ library, version }), \"VERSION\" /* ComponentType.VERSION */));\r\n}\r\n/**\r\n * Sets log handler for all Firebase SDKs.\r\n * @param logCallback - An optional custom log handler that executes user code whenever\r\n * the Firebase SDK makes a logging call.\r\n *\r\n * @public\r\n */\r\nfunction onLog(logCallback, options) {\r\n if (logCallback !== null && typeof logCallback !== 'function') {\r\n throw ERROR_FACTORY.create(\"invalid-log-argument\" /* AppError.INVALID_LOG_ARGUMENT */);\r\n }\r\n setUserLogHandler(logCallback, options);\r\n}\r\n/**\r\n * Sets log level for all Firebase SDKs.\r\n *\r\n * All of the log types above the current log level are captured (i.e. if\r\n * you set the log level to `info`, errors are logged, but `debug` and\r\n * `verbose` logs are not).\r\n *\r\n * @public\r\n */\r\nfunction setLogLevel(logLevel) {\r\n setLogLevel$1(logLevel);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DB_NAME = 'firebase-heartbeat-database';\r\nconst DB_VERSION = 1;\r\nconst STORE_NAME = 'firebase-heartbeat-store';\r\nlet dbPromise = null;\r\nfunction getDbPromise() {\r\n if (!dbPromise) {\r\n dbPromise = openDB(DB_NAME, DB_VERSION, {\r\n upgrade: (db, oldVersion) => {\r\n // We don't use 'break' in this switch statement, the fall-through\r\n // behavior is what we want, because if there are multiple versions between\r\n // the old version and the current version, we want ALL the migrations\r\n // that correspond to those versions to run, not only the last one.\r\n // eslint-disable-next-line default-case\r\n switch (oldVersion) {\r\n case 0:\r\n db.createObjectStore(STORE_NAME);\r\n }\r\n }\r\n }).catch(e => {\r\n throw ERROR_FACTORY.create(\"idb-open\" /* AppError.IDB_OPEN */, {\r\n originalErrorMessage: e.message\r\n });\r\n });\r\n }\r\n return dbPromise;\r\n}\r\nasync function readHeartbeatsFromIndexedDB(app) {\r\n try {\r\n const db = await getDbPromise();\r\n const result = await db\r\n .transaction(STORE_NAME)\r\n .objectStore(STORE_NAME)\r\n .get(computeKey(app));\r\n return result;\r\n }\r\n catch (e) {\r\n if (e instanceof FirebaseError) {\r\n logger.warn(e.message);\r\n }\r\n else {\r\n const idbGetError = ERROR_FACTORY.create(\"idb-get\" /* AppError.IDB_GET */, {\r\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\r\n });\r\n logger.warn(idbGetError.message);\r\n }\r\n }\r\n}\r\nasync function writeHeartbeatsToIndexedDB(app, heartbeatObject) {\r\n try {\r\n const db = await getDbPromise();\r\n const tx = db.transaction(STORE_NAME, 'readwrite');\r\n const objectStore = tx.objectStore(STORE_NAME);\r\n await objectStore.put(heartbeatObject, computeKey(app));\r\n await tx.done;\r\n }\r\n catch (e) {\r\n if (e instanceof FirebaseError) {\r\n logger.warn(e.message);\r\n }\r\n else {\r\n const idbGetError = ERROR_FACTORY.create(\"idb-set\" /* AppError.IDB_WRITE */, {\r\n originalErrorMessage: e === null || e === void 0 ? void 0 : e.message\r\n });\r\n logger.warn(idbGetError.message);\r\n }\r\n }\r\n}\r\nfunction computeKey(app) {\r\n return `${app.name}!${app.options.appId}`;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst MAX_HEADER_BYTES = 1024;\r\n// 30 days\r\nconst STORED_HEARTBEAT_RETENTION_MAX_MILLIS = 30 * 24 * 60 * 60 * 1000;\r\nclass HeartbeatServiceImpl {\r\n constructor(container) {\r\n this.container = container;\r\n /**\r\n * In-memory cache for heartbeats, used by getHeartbeatsHeader() to generate\r\n * the header string.\r\n * Stores one record per date. This will be consolidated into the standard\r\n * format of one record per user agent string before being sent as a header.\r\n * Populated from indexedDB when the controller is instantiated and should\r\n * be kept in sync with indexedDB.\r\n * Leave public for easier testing.\r\n */\r\n this._heartbeatsCache = null;\r\n const app = this.container.getProvider('app').getImmediate();\r\n this._storage = new HeartbeatStorageImpl(app);\r\n this._heartbeatsCachePromise = this._storage.read().then(result => {\r\n this._heartbeatsCache = result;\r\n return result;\r\n });\r\n }\r\n /**\r\n * Called to report a heartbeat. The function will generate\r\n * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it\r\n * to IndexedDB.\r\n * Note that we only store one heartbeat per day. So if a heartbeat for today is\r\n * already logged, subsequent calls to this function in the same day will be ignored.\r\n */\r\n async triggerHeartbeat() {\r\n const platformLogger = this.container\r\n .getProvider('platform-logger')\r\n .getImmediate();\r\n // This is the \"Firebase user agent\" string from the platform logger\r\n // service, not the browser user agent.\r\n const agent = platformLogger.getPlatformInfoString();\r\n const date = getUTCDateString();\r\n if (this._heartbeatsCache === null) {\r\n this._heartbeatsCache = await this._heartbeatsCachePromise;\r\n }\r\n // Do not store a heartbeat if one is already stored for this day\r\n // or if a header has already been sent today.\r\n if (this._heartbeatsCache.lastSentHeartbeatDate === date ||\r\n this._heartbeatsCache.heartbeats.some(singleDateHeartbeat => singleDateHeartbeat.date === date)) {\r\n return;\r\n }\r\n else {\r\n // There is no entry for this date. Create one.\r\n this._heartbeatsCache.heartbeats.push({ date, agent });\r\n }\r\n // Remove entries older than 30 days.\r\n this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter(singleDateHeartbeat => {\r\n const hbTimestamp = new Date(singleDateHeartbeat.date).valueOf();\r\n const now = Date.now();\r\n return now - hbTimestamp <= STORED_HEARTBEAT_RETENTION_MAX_MILLIS;\r\n });\r\n return this._storage.overwrite(this._heartbeatsCache);\r\n }\r\n /**\r\n * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.\r\n * It also clears all heartbeats from memory as well as in IndexedDB.\r\n *\r\n * NOTE: Consuming product SDKs should not send the header if this method\r\n * returns an empty string.\r\n */\r\n async getHeartbeatsHeader() {\r\n if (this._heartbeatsCache === null) {\r\n await this._heartbeatsCachePromise;\r\n }\r\n // If it's still null or the array is empty, there is no data to send.\r\n if (this._heartbeatsCache === null ||\r\n this._heartbeatsCache.heartbeats.length === 0) {\r\n return '';\r\n }\r\n const date = getUTCDateString();\r\n // Extract as many heartbeats from the cache as will fit under the size limit.\r\n const { heartbeatsToSend, unsentEntries } = extractHeartbeatsForHeader(this._heartbeatsCache.heartbeats);\r\n const headerString = base64urlEncodeWithoutPadding(JSON.stringify({ version: 2, heartbeats: heartbeatsToSend }));\r\n // Store last sent date to prevent another being logged/sent for the same day.\r\n this._heartbeatsCache.lastSentHeartbeatDate = date;\r\n if (unsentEntries.length > 0) {\r\n // Store any unsent entries if they exist.\r\n this._heartbeatsCache.heartbeats = unsentEntries;\r\n // This seems more likely than emptying the array (below) to lead to some odd state\r\n // since the cache isn't empty and this will be called again on the next request,\r\n // and is probably safest if we await it.\r\n await this._storage.overwrite(this._heartbeatsCache);\r\n }\r\n else {\r\n this._heartbeatsCache.heartbeats = [];\r\n // Do not wait for this, to reduce latency.\r\n void this._storage.overwrite(this._heartbeatsCache);\r\n }\r\n return headerString;\r\n }\r\n}\r\nfunction getUTCDateString() {\r\n const today = new Date();\r\n // Returns date format 'YYYY-MM-DD'\r\n return today.toISOString().substring(0, 10);\r\n}\r\nfunction extractHeartbeatsForHeader(heartbeatsCache, maxSize = MAX_HEADER_BYTES) {\r\n // Heartbeats grouped by user agent in the standard format to be sent in\r\n // the header.\r\n const heartbeatsToSend = [];\r\n // Single date format heartbeats that are not sent.\r\n let unsentEntries = heartbeatsCache.slice();\r\n for (const singleDateHeartbeat of heartbeatsCache) {\r\n // Look for an existing entry with the same user agent.\r\n const heartbeatEntry = heartbeatsToSend.find(hb => hb.agent === singleDateHeartbeat.agent);\r\n if (!heartbeatEntry) {\r\n // If no entry for this user agent exists, create one.\r\n heartbeatsToSend.push({\r\n agent: singleDateHeartbeat.agent,\r\n dates: [singleDateHeartbeat.date]\r\n });\r\n if (countBytes(heartbeatsToSend) > maxSize) {\r\n // If the header would exceed max size, remove the added heartbeat\r\n // entry and stop adding to the header.\r\n heartbeatsToSend.pop();\r\n break;\r\n }\r\n }\r\n else {\r\n heartbeatEntry.dates.push(singleDateHeartbeat.date);\r\n // If the header would exceed max size, remove the added date\r\n // and stop adding to the header.\r\n if (countBytes(heartbeatsToSend) > maxSize) {\r\n heartbeatEntry.dates.pop();\r\n break;\r\n }\r\n }\r\n // Pop unsent entry from queue. (Skipped if adding the entry exceeded\r\n // quota and the loop breaks early.)\r\n unsentEntries = unsentEntries.slice(1);\r\n }\r\n return {\r\n heartbeatsToSend,\r\n unsentEntries\r\n };\r\n}\r\nclass HeartbeatStorageImpl {\r\n constructor(app) {\r\n this.app = app;\r\n this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();\r\n }\r\n async runIndexedDBEnvironmentCheck() {\r\n if (!isIndexedDBAvailable()) {\r\n return false;\r\n }\r\n else {\r\n return validateIndexedDBOpenable()\r\n .then(() => true)\r\n .catch(() => false);\r\n }\r\n }\r\n /**\r\n * Read all heartbeats.\r\n */\r\n async read() {\r\n const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n if (!canUseIndexedDB) {\r\n return { heartbeats: [] };\r\n }\r\n else {\r\n const idbHeartbeatObject = await readHeartbeatsFromIndexedDB(this.app);\r\n return idbHeartbeatObject || { heartbeats: [] };\r\n }\r\n }\r\n // overwrite the storage with the provided heartbeats\r\n async overwrite(heartbeatsObject) {\r\n var _a;\r\n const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n if (!canUseIndexedDB) {\r\n return;\r\n }\r\n else {\r\n const existingHeartbeatsObject = await this.read();\r\n return writeHeartbeatsToIndexedDB(this.app, {\r\n lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\r\n heartbeats: heartbeatsObject.heartbeats\r\n });\r\n }\r\n }\r\n // add heartbeats\r\n async add(heartbeatsObject) {\r\n var _a;\r\n const canUseIndexedDB = await this._canUseIndexedDBPromise;\r\n if (!canUseIndexedDB) {\r\n return;\r\n }\r\n else {\r\n const existingHeartbeatsObject = await this.read();\r\n return writeHeartbeatsToIndexedDB(this.app, {\r\n lastSentHeartbeatDate: (_a = heartbeatsObject.lastSentHeartbeatDate) !== null && _a !== void 0 ? _a : existingHeartbeatsObject.lastSentHeartbeatDate,\r\n heartbeats: [\r\n ...existingHeartbeatsObject.heartbeats,\r\n ...heartbeatsObject.heartbeats\r\n ]\r\n });\r\n }\r\n }\r\n}\r\n/**\r\n * Calculate bytes of a HeartbeatsByUserAgent array after being wrapped\r\n * in a platform logging header JSON object, stringified, and converted\r\n * to base 64.\r\n */\r\nfunction countBytes(heartbeatsCache) {\r\n // base64 has a restricted set of characters, all of which should be 1 byte.\r\n return base64urlEncodeWithoutPadding(\r\n // heartbeatsCache wrapper properties\r\n JSON.stringify({ version: 2, heartbeats: heartbeatsCache })).length;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction registerCoreComponents(variant) {\r\n _registerComponent(new Component('platform-logger', container => new PlatformLoggerServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\r\n _registerComponent(new Component('heartbeat', container => new HeartbeatServiceImpl(container), \"PRIVATE\" /* ComponentType.PRIVATE */));\r\n // Register `app` package.\r\n registerVersion(name$o, version$1, variant);\r\n // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\r\n registerVersion(name$o, version$1, 'esm2017');\r\n // Register platform SDK identifier (no version).\r\n registerVersion('fire-js', '');\r\n}\n\n/**\r\n * Firebase App\r\n *\r\n * @remarks This package coordinates the communication between the different Firebase components\r\n * @packageDocumentation\r\n */\r\nregisterCoreComponents('');\n\nexport { SDK_VERSION, DEFAULT_ENTRY_NAME as _DEFAULT_ENTRY_NAME, _addComponent, _addOrOverwriteComponent, _apps, _clearComponents, _components, _getProvider, _registerComponent, _removeServiceInstance, deleteApp, getApp, getApps, initializeApp, onLog, registerVersion, setLogLevel };\n//# sourceMappingURL=index.esm2017.js.map\n","import { ErrorFactory, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, getModularInstance, base64Decode, getUA, isIE, createSubscribe, deepEqual, querystringDecode, extractQuerystring, isEmpty, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';\nimport { SDK_VERSION, _getProvider, _registerComponent, registerVersion, getApp } from '@firebase/app';\nimport { Logger, LogLevel } from '@firebase/logger';\nimport { __rest } from 'tslib';\nimport { Component } from '@firebase/component';\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * An enum of factors that may be used for multifactor authentication.\r\n *\r\n * @public\r\n */\r\nconst FactorId = {\r\n /** Phone as second factor */\r\n PHONE: 'phone',\r\n TOTP: 'totp'\r\n};\r\n/**\r\n * Enumeration of supported providers.\r\n *\r\n * @public\r\n */\r\nconst ProviderId = {\r\n /** Facebook provider ID */\r\n FACEBOOK: 'facebook.com',\r\n /** GitHub provider ID */\r\n GITHUB: 'github.com',\r\n /** Google provider ID */\r\n GOOGLE: 'google.com',\r\n /** Password provider */\r\n PASSWORD: 'password',\r\n /** Phone provider */\r\n PHONE: 'phone',\r\n /** Twitter provider ID */\r\n TWITTER: 'twitter.com'\r\n};\r\n/**\r\n * Enumeration of supported sign-in methods.\r\n *\r\n * @public\r\n */\r\nconst SignInMethod = {\r\n /** Email link sign in method */\r\n EMAIL_LINK: 'emailLink',\r\n /** Email/password sign in method */\r\n EMAIL_PASSWORD: 'password',\r\n /** Facebook sign in method */\r\n FACEBOOK: 'facebook.com',\r\n /** GitHub sign in method */\r\n GITHUB: 'github.com',\r\n /** Google sign in method */\r\n GOOGLE: 'google.com',\r\n /** Phone sign in method */\r\n PHONE: 'phone',\r\n /** Twitter sign in method */\r\n TWITTER: 'twitter.com'\r\n};\r\n/**\r\n * Enumeration of supported operation types.\r\n *\r\n * @public\r\n */\r\nconst OperationType = {\r\n /** Operation involving linking an additional provider to an already signed-in user. */\r\n LINK: 'link',\r\n /** Operation involving using a provider to reauthenticate an already signed-in user. */\r\n REAUTHENTICATE: 'reauthenticate',\r\n /** Operation involving signing in a user. */\r\n SIGN_IN: 'signIn'\r\n};\r\n/**\r\n * An enumeration of the possible email action types.\r\n *\r\n * @public\r\n */\r\nconst ActionCodeOperation = {\r\n /** The email link sign-in action. */\r\n EMAIL_SIGNIN: 'EMAIL_SIGNIN',\r\n /** The password reset action. */\r\n PASSWORD_RESET: 'PASSWORD_RESET',\r\n /** The email revocation action. */\r\n RECOVER_EMAIL: 'RECOVER_EMAIL',\r\n /** The revert second factor addition email action. */\r\n REVERT_SECOND_FACTOR_ADDITION: 'REVERT_SECOND_FACTOR_ADDITION',\r\n /** The revert second factor addition email action. */\r\n VERIFY_AND_CHANGE_EMAIL: 'VERIFY_AND_CHANGE_EMAIL',\r\n /** The email verification action. */\r\n VERIFY_EMAIL: 'VERIFY_EMAIL'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction isV2(grecaptcha) {\r\n return (grecaptcha !== undefined &&\r\n grecaptcha.getResponse !== undefined);\r\n}\r\nfunction isEnterprise(grecaptcha) {\r\n return (grecaptcha !== undefined &&\r\n grecaptcha.enterprise !== undefined);\r\n}\r\nclass RecaptchaConfig {\r\n constructor(response) {\r\n /**\r\n * The reCAPTCHA site key.\r\n */\r\n this.siteKey = '';\r\n /**\r\n * The reCAPTCHA enablement status of the {@link EmailAuthProvider} for the current tenant.\r\n */\r\n this.emailPasswordEnabled = false;\r\n if (response.recaptchaKey === undefined) {\r\n throw new Error('recaptchaKey undefined');\r\n }\r\n // Example response.recaptchaKey: \"projects/proj123/keys/sitekey123\"\r\n this.siteKey = response.recaptchaKey.split('/')[3];\r\n this.emailPasswordEnabled = response.recaptchaEnforcementState.some(enforcementState => enforcementState.provider === 'EMAIL_PASSWORD_PROVIDER' &&\r\n enforcementState.enforcementState !== 'OFF');\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _debugErrorMap() {\r\n return {\r\n [\"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */]: 'This operation is restricted to administrators only.',\r\n [\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */]: '',\r\n [\"app-not-authorized\" /* AuthErrorCode.APP_NOT_AUTHORIZED */]: \"This app, identified by the domain where it's hosted, is not \" +\r\n 'authorized to use Firebase Authentication with the provided API key. ' +\r\n 'Review your key configuration in the Google API console.',\r\n [\"app-not-installed\" /* AuthErrorCode.APP_NOT_INSTALLED */]: 'The requested mobile application corresponding to the identifier (' +\r\n 'Android package name or iOS bundle ID) provided is not installed on ' +\r\n 'this device.',\r\n [\"captcha-check-failed\" /* AuthErrorCode.CAPTCHA_CHECK_FAILED */]: 'The reCAPTCHA response token provided is either invalid, expired, ' +\r\n 'already used or the domain associated with it does not match the list ' +\r\n 'of whitelisted domains.',\r\n [\"code-expired\" /* AuthErrorCode.CODE_EXPIRED */]: 'The SMS code has expired. Please re-send the verification code to try ' +\r\n 'again.',\r\n [\"cordova-not-ready\" /* AuthErrorCode.CORDOVA_NOT_READY */]: 'Cordova framework is not ready.',\r\n [\"cors-unsupported\" /* AuthErrorCode.CORS_UNSUPPORTED */]: 'This browser is not supported.',\r\n [\"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */]: 'This credential is already associated with a different user account.',\r\n [\"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */]: 'The custom token corresponds to a different audience.',\r\n [\"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: 'This operation is sensitive and requires recent authentication. Log in ' +\r\n 'again before retrying this request.',\r\n [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' +\r\n 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' +\r\n 'starting any other Firebase SDK.',\r\n [\"dynamic-link-not-activated\" /* AuthErrorCode.DYNAMIC_LINK_NOT_ACTIVATED */]: 'Please activate Dynamic Links in the Firebase Console and agree to the terms and ' +\r\n 'conditions.',\r\n [\"email-change-needs-verification\" /* AuthErrorCode.EMAIL_CHANGE_NEEDS_VERIFICATION */]: 'Multi-factor users must always have a verified email.',\r\n [\"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */]: 'The email address is already in use by another account.',\r\n [\"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */]: 'Auth instance has already been used to make a network call. Auth can ' +\r\n 'no longer be configured to use the emulator. Try calling ' +\r\n '\"connectAuthEmulator()\" sooner.',\r\n [\"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */]: 'The action code has expired.',\r\n [\"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */]: 'This operation has been cancelled due to another conflicting popup being opened.',\r\n [\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */]: 'An internal AuthError has occurred.',\r\n [\"invalid-app-credential\" /* AuthErrorCode.INVALID_APP_CREDENTIAL */]: 'The phone verification request contains an invalid application verifier.' +\r\n ' The reCAPTCHA token response is either invalid or expired.',\r\n [\"invalid-app-id\" /* AuthErrorCode.INVALID_APP_ID */]: 'The mobile app identifier is not registed for the current project.',\r\n [\"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */]: \"This user's credential isn't valid for this project. This can happen \" +\r\n \"if the user's token has been tampered with, or if the user isn't for \" +\r\n 'the project associated with this API key.',\r\n [\"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */]: 'An internal AuthError has occurred.',\r\n [\"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */]: 'The SMS verification code used to create the phone auth credential is ' +\r\n 'invalid. Please resend the verification code sms and be sure to use the ' +\r\n 'verification code provided by the user.',\r\n [\"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */]: 'The continue URL provided in the request is invalid.',\r\n [\"invalid-cordova-configuration\" /* AuthErrorCode.INVALID_CORDOVA_CONFIGURATION */]: 'The following Cordova plugins must be installed to enable OAuth sign-in: ' +\r\n 'cordova-plugin-buildinfo, cordova-universal-links-plugin, ' +\r\n 'cordova-plugin-browsertab, cordova-plugin-inappbrowser and ' +\r\n 'cordova-plugin-customurlscheme.',\r\n [\"invalid-custom-token\" /* AuthErrorCode.INVALID_CUSTOM_TOKEN */]: 'The custom token format is incorrect. Please check the documentation.',\r\n [\"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */]: 'The provided dynamic link domain is not configured or authorized for the current project.',\r\n [\"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */]: 'The email address is badly formatted.',\r\n [\"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */]: 'Emulator URL must start with a valid scheme (http:// or https://).',\r\n [\"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */]: 'Your API key is invalid, please check you have copied it correctly.',\r\n [\"invalid-cert-hash\" /* AuthErrorCode.INVALID_CERT_HASH */]: 'The SHA-1 certificate hash provided is invalid.',\r\n [\"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */]: 'The supplied auth credential is malformed or has expired.',\r\n [\"invalid-message-payload\" /* AuthErrorCode.INVALID_MESSAGE_PAYLOAD */]: 'The email template corresponding to this action contains invalid characters in its message. ' +\r\n 'Please fix by going to the Auth email templates section in the Firebase Console.',\r\n [\"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */]: 'The request does not contain a valid proof of first factor successful sign-in.',\r\n [\"invalid-oauth-provider\" /* AuthErrorCode.INVALID_OAUTH_PROVIDER */]: 'EmailAuthProvider is not supported for this operation. This operation ' +\r\n 'only supports OAuth providers.',\r\n [\"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */]: 'The OAuth client ID provided is either invalid or does not match the ' +\r\n 'specified API key.',\r\n [\"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */]: 'This domain is not authorized for OAuth operations for your Firebase ' +\r\n 'project. Edit the list of authorized domains from the Firebase console.',\r\n [\"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */]: 'The action code is invalid. This can happen if the code is malformed, ' +\r\n 'expired, or has already been used.',\r\n [\"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */]: 'The password is invalid or the user does not have a password.',\r\n [\"invalid-persistence-type\" /* AuthErrorCode.INVALID_PERSISTENCE */]: 'The specified persistence type is invalid. It can only be local, session or none.',\r\n [\"invalid-phone-number\" /* AuthErrorCode.INVALID_PHONE_NUMBER */]: 'The format of the phone number provided is incorrect. Please enter the ' +\r\n 'phone number in a format that can be parsed into E.164 format. E.164 ' +\r\n 'phone numbers are written in the format [+][country code][subscriber ' +\r\n 'number including area code].',\r\n [\"invalid-provider-id\" /* AuthErrorCode.INVALID_PROVIDER_ID */]: 'The specified provider ID is invalid.',\r\n [\"invalid-recipient-email\" /* AuthErrorCode.INVALID_RECIPIENT_EMAIL */]: 'The email corresponding to this action failed to send as the provided ' +\r\n 'recipient email address is invalid.',\r\n [\"invalid-sender\" /* AuthErrorCode.INVALID_SENDER */]: 'The email template corresponding to this action contains an invalid sender email or name. ' +\r\n 'Please fix by going to the Auth email templates section in the Firebase Console.',\r\n [\"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */]: 'The verification ID used to create the phone auth credential is invalid.',\r\n [\"invalid-tenant-id\" /* AuthErrorCode.INVALID_TENANT_ID */]: \"The Auth instance's tenant ID is invalid.\",\r\n [\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */]: 'Login blocked by user-provided method: {$originalMessage}',\r\n [\"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */]: 'An Android Package Name must be provided if the Android App is required to be installed.',\r\n [\"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */]: 'Be sure to include authDomain when calling firebase.initializeApp(), ' +\r\n 'by following the instructions in the Firebase console.',\r\n [\"missing-app-credential\" /* AuthErrorCode.MISSING_APP_CREDENTIAL */]: 'The phone verification request is missing an application verifier ' +\r\n 'assertion. A reCAPTCHA response token needs to be provided.',\r\n [\"missing-verification-code\" /* AuthErrorCode.MISSING_CODE */]: 'The phone auth credential was created with an empty SMS verification code.',\r\n [\"missing-continue-uri\" /* AuthErrorCode.MISSING_CONTINUE_URI */]: 'A continue URL must be provided in the request.',\r\n [\"missing-iframe-start\" /* AuthErrorCode.MISSING_IFRAME_START */]: 'An internal AuthError has occurred.',\r\n [\"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */]: 'An iOS Bundle ID must be provided if an App Store ID is provided.',\r\n [\"missing-or-invalid-nonce\" /* AuthErrorCode.MISSING_OR_INVALID_NONCE */]: 'The request does not contain a valid nonce. This can occur if the ' +\r\n 'SHA-256 hash of the provided raw nonce does not match the hashed nonce ' +\r\n 'in the ID token payload.',\r\n [\"missing-password\" /* AuthErrorCode.MISSING_PASSWORD */]: 'A non-empty password must be provided',\r\n [\"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */]: 'No second factor identifier is provided.',\r\n [\"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */]: 'The request is missing proof of first factor successful sign-in.',\r\n [\"missing-phone-number\" /* AuthErrorCode.MISSING_PHONE_NUMBER */]: 'To send verification codes, provide a phone number for the recipient.',\r\n [\"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */]: 'The phone auth credential was created with an empty verification ID.',\r\n [\"app-deleted\" /* AuthErrorCode.MODULE_DESTROYED */]: 'This instance of FirebaseApp has been deleted.',\r\n [\"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */]: 'The user does not have a second factor matching the identifier provided.',\r\n [\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */]: 'Proof of ownership of a second factor is required to complete sign-in.',\r\n [\"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */]: 'An account already exists with the same email address but different ' +\r\n 'sign-in credentials. Sign in using a provider associated with this ' +\r\n 'email address.',\r\n [\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */]: 'A network AuthError (such as timeout, interrupted connection or unreachable host) has occurred.',\r\n [\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */]: 'An internal AuthError has occurred.',\r\n [\"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */]: 'User was not linked to an account with the given provider.',\r\n [\"null-user\" /* AuthErrorCode.NULL_USER */]: 'A null user object was provided as the argument for an operation which ' +\r\n 'requires a non-null user object.',\r\n [\"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */]: 'The given sign-in provider is disabled for this Firebase project. ' +\r\n 'Enable it in the Firebase console, under the sign-in method tab of the ' +\r\n 'Auth section.',\r\n [\"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */]: 'This operation is not supported in the environment this application is ' +\r\n 'running on. \"location.protocol\" must be http, https or chrome-extension' +\r\n ' and web storage must be enabled.',\r\n [\"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */]: 'Unable to establish a connection with the popup. It may have been blocked by the browser.',\r\n [\"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */]: 'The popup has been closed by the user before finalizing the operation.',\r\n [\"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */]: 'User can only be linked to one identity for the given provider.',\r\n [\"quota-exceeded\" /* AuthErrorCode.QUOTA_EXCEEDED */]: \"The project's quota for this operation has been exceeded.\",\r\n [\"redirect-cancelled-by-user\" /* AuthErrorCode.REDIRECT_CANCELLED_BY_USER */]: 'The redirect operation has been cancelled by the user before finalizing.',\r\n [\"redirect-operation-pending\" /* AuthErrorCode.REDIRECT_OPERATION_PENDING */]: 'A redirect sign-in operation is already pending.',\r\n [\"rejected-credential\" /* AuthErrorCode.REJECTED_CREDENTIAL */]: 'The request contains malformed or mismatching credentials.',\r\n [\"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */]: 'The second factor is already enrolled on this account.',\r\n [\"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */]: 'The maximum allowed number of second factors on a user has been exceeded.',\r\n [\"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */]: \"The provided tenant ID does not match the Auth instance's tenant ID\",\r\n [\"timeout\" /* AuthErrorCode.TIMEOUT */]: 'The operation has timed out.',\r\n [\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */]: \"The user's credential is no longer valid. The user must sign in again.\",\r\n [\"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */]: 'We have blocked all requests from this device due to unusual activity. ' +\r\n 'Try again later.',\r\n [\"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */]: 'The domain of the continue URL is not whitelisted. Please whitelist ' +\r\n 'the domain in the Firebase console.',\r\n [\"unsupported-first-factor\" /* AuthErrorCode.UNSUPPORTED_FIRST_FACTOR */]: 'Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.',\r\n [\"unsupported-persistence-type\" /* AuthErrorCode.UNSUPPORTED_PERSISTENCE */]: 'The current environment does not support the specified persistence type.',\r\n [\"unsupported-tenant-operation\" /* AuthErrorCode.UNSUPPORTED_TENANT_OPERATION */]: 'This operation is not supported in a multi-tenant context.',\r\n [\"unverified-email\" /* AuthErrorCode.UNVERIFIED_EMAIL */]: 'The operation requires a verified email.',\r\n [\"user-cancelled\" /* AuthErrorCode.USER_CANCELLED */]: 'The user did not grant your application the permissions it requested.',\r\n [\"user-not-found\" /* AuthErrorCode.USER_DELETED */]: 'There is no user record corresponding to this identifier. The user may ' +\r\n 'have been deleted.',\r\n [\"user-disabled\" /* AuthErrorCode.USER_DISABLED */]: 'The user account has been disabled by an administrator.',\r\n [\"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */]: 'The supplied credentials do not correspond to the previously signed in user.',\r\n [\"user-signed-out\" /* AuthErrorCode.USER_SIGNED_OUT */]: '',\r\n [\"weak-password\" /* AuthErrorCode.WEAK_PASSWORD */]: 'The password must be 6 characters long or more.',\r\n [\"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */]: 'This browser is not supported or 3rd party cookies and data may be disabled.',\r\n [\"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */]: 'initializeAuth() has already been called with ' +\r\n 'different options. To avoid this error, call initializeAuth() with the ' +\r\n 'same options as when it was originally called, or call getAuth() to return the' +\r\n ' already initialized instance.',\r\n [\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */]: 'The reCAPTCHA token is missing when sending request to the backend.',\r\n [\"invalid-recaptcha-token\" /* AuthErrorCode.INVALID_RECAPTCHA_TOKEN */]: 'The reCAPTCHA token is invalid when sending request to the backend.',\r\n [\"invalid-recaptcha-action\" /* AuthErrorCode.INVALID_RECAPTCHA_ACTION */]: 'The reCAPTCHA action is invalid when sending request to the backend.',\r\n [\"recaptcha-not-enabled\" /* AuthErrorCode.RECAPTCHA_NOT_ENABLED */]: 'reCAPTCHA Enterprise integration is not enabled for this project.',\r\n [\"missing-client-type\" /* AuthErrorCode.MISSING_CLIENT_TYPE */]: 'The reCAPTCHA client type is missing when sending request to the backend.',\r\n [\"missing-recaptcha-version\" /* AuthErrorCode.MISSING_RECAPTCHA_VERSION */]: 'The reCAPTCHA version is missing when sending request to the backend.',\r\n [\"invalid-req-type\" /* AuthErrorCode.INVALID_REQ_TYPE */]: 'Invalid request parameters.',\r\n [\"invalid-recaptcha-version\" /* AuthErrorCode.INVALID_RECAPTCHA_VERSION */]: 'The reCAPTCHA version is invalid when sending request to the backend.',\r\n [\"unsupported-password-policy-schema-version\" /* AuthErrorCode.UNSUPPORTED_PASSWORD_POLICY_SCHEMA_VERSION */]: 'The password policy received from the backend uses a schema version that is not supported by this version of the Firebase SDK.',\r\n [\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */]: 'The password does not meet the requirements.'\r\n };\r\n}\r\nfunction _prodErrorMap() {\r\n // We will include this one message in the prod error map since by the very\r\n // nature of this error, developers will never be able to see the message\r\n // using the debugErrorMap (which is installed during auth initialization).\r\n return {\r\n [\"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */]: 'Another Firebase SDK was initialized and is trying to use Auth before Auth is ' +\r\n 'initialized. Please be sure to call `initializeAuth` or `getAuth` before ' +\r\n 'starting any other Firebase SDK.'\r\n };\r\n}\r\n/**\r\n * A verbose error map with detailed descriptions for most error codes.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\r\nconst debugErrorMap = _debugErrorMap;\r\n/**\r\n * A minimal error map with all verbose error messages stripped.\r\n *\r\n * See discussion at {@link AuthErrorMap}\r\n *\r\n * @public\r\n */\r\nconst prodErrorMap = _prodErrorMap;\r\nconst _DEFAULT_AUTH_ERROR_FACTORY = new ErrorFactory('auth', 'Firebase', _prodErrorMap());\r\n/**\r\n * A map of potential `Auth` error codes, for easier comparison with errors\r\n * thrown by the SDK.\r\n *\r\n * @remarks\r\n * Note that you can't tree-shake individual keys\r\n * in the map, so by using the map you might substantially increase your\r\n * bundle size.\r\n *\r\n * @public\r\n */\r\nconst AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY = {\r\n ADMIN_ONLY_OPERATION: 'auth/admin-restricted-operation',\r\n ARGUMENT_ERROR: 'auth/argument-error',\r\n APP_NOT_AUTHORIZED: 'auth/app-not-authorized',\r\n APP_NOT_INSTALLED: 'auth/app-not-installed',\r\n CAPTCHA_CHECK_FAILED: 'auth/captcha-check-failed',\r\n CODE_EXPIRED: 'auth/code-expired',\r\n CORDOVA_NOT_READY: 'auth/cordova-not-ready',\r\n CORS_UNSUPPORTED: 'auth/cors-unsupported',\r\n CREDENTIAL_ALREADY_IN_USE: 'auth/credential-already-in-use',\r\n CREDENTIAL_MISMATCH: 'auth/custom-token-mismatch',\r\n CREDENTIAL_TOO_OLD_LOGIN_AGAIN: 'auth/requires-recent-login',\r\n DEPENDENT_SDK_INIT_BEFORE_AUTH: 'auth/dependent-sdk-initialized-before-auth',\r\n DYNAMIC_LINK_NOT_ACTIVATED: 'auth/dynamic-link-not-activated',\r\n EMAIL_CHANGE_NEEDS_VERIFICATION: 'auth/email-change-needs-verification',\r\n EMAIL_EXISTS: 'auth/email-already-in-use',\r\n EMULATOR_CONFIG_FAILED: 'auth/emulator-config-failed',\r\n EXPIRED_OOB_CODE: 'auth/expired-action-code',\r\n EXPIRED_POPUP_REQUEST: 'auth/cancelled-popup-request',\r\n INTERNAL_ERROR: 'auth/internal-error',\r\n INVALID_API_KEY: 'auth/invalid-api-key',\r\n INVALID_APP_CREDENTIAL: 'auth/invalid-app-credential',\r\n INVALID_APP_ID: 'auth/invalid-app-id',\r\n INVALID_AUTH: 'auth/invalid-user-token',\r\n INVALID_AUTH_EVENT: 'auth/invalid-auth-event',\r\n INVALID_CERT_HASH: 'auth/invalid-cert-hash',\r\n INVALID_CODE: 'auth/invalid-verification-code',\r\n INVALID_CONTINUE_URI: 'auth/invalid-continue-uri',\r\n INVALID_CORDOVA_CONFIGURATION: 'auth/invalid-cordova-configuration',\r\n INVALID_CUSTOM_TOKEN: 'auth/invalid-custom-token',\r\n INVALID_DYNAMIC_LINK_DOMAIN: 'auth/invalid-dynamic-link-domain',\r\n INVALID_EMAIL: 'auth/invalid-email',\r\n INVALID_EMULATOR_SCHEME: 'auth/invalid-emulator-scheme',\r\n INVALID_IDP_RESPONSE: 'auth/invalid-credential',\r\n INVALID_MESSAGE_PAYLOAD: 'auth/invalid-message-payload',\r\n INVALID_MFA_SESSION: 'auth/invalid-multi-factor-session',\r\n INVALID_OAUTH_CLIENT_ID: 'auth/invalid-oauth-client-id',\r\n INVALID_OAUTH_PROVIDER: 'auth/invalid-oauth-provider',\r\n INVALID_OOB_CODE: 'auth/invalid-action-code',\r\n INVALID_ORIGIN: 'auth/unauthorized-domain',\r\n INVALID_PASSWORD: 'auth/wrong-password',\r\n INVALID_PERSISTENCE: 'auth/invalid-persistence-type',\r\n INVALID_PHONE_NUMBER: 'auth/invalid-phone-number',\r\n INVALID_PROVIDER_ID: 'auth/invalid-provider-id',\r\n INVALID_RECIPIENT_EMAIL: 'auth/invalid-recipient-email',\r\n INVALID_SENDER: 'auth/invalid-sender',\r\n INVALID_SESSION_INFO: 'auth/invalid-verification-id',\r\n INVALID_TENANT_ID: 'auth/invalid-tenant-id',\r\n MFA_INFO_NOT_FOUND: 'auth/multi-factor-info-not-found',\r\n MFA_REQUIRED: 'auth/multi-factor-auth-required',\r\n MISSING_ANDROID_PACKAGE_NAME: 'auth/missing-android-pkg-name',\r\n MISSING_APP_CREDENTIAL: 'auth/missing-app-credential',\r\n MISSING_AUTH_DOMAIN: 'auth/auth-domain-config-required',\r\n MISSING_CODE: 'auth/missing-verification-code',\r\n MISSING_CONTINUE_URI: 'auth/missing-continue-uri',\r\n MISSING_IFRAME_START: 'auth/missing-iframe-start',\r\n MISSING_IOS_BUNDLE_ID: 'auth/missing-ios-bundle-id',\r\n MISSING_OR_INVALID_NONCE: 'auth/missing-or-invalid-nonce',\r\n MISSING_MFA_INFO: 'auth/missing-multi-factor-info',\r\n MISSING_MFA_SESSION: 'auth/missing-multi-factor-session',\r\n MISSING_PHONE_NUMBER: 'auth/missing-phone-number',\r\n MISSING_SESSION_INFO: 'auth/missing-verification-id',\r\n MODULE_DESTROYED: 'auth/app-deleted',\r\n NEED_CONFIRMATION: 'auth/account-exists-with-different-credential',\r\n NETWORK_REQUEST_FAILED: 'auth/network-request-failed',\r\n NULL_USER: 'auth/null-user',\r\n NO_AUTH_EVENT: 'auth/no-auth-event',\r\n NO_SUCH_PROVIDER: 'auth/no-such-provider',\r\n OPERATION_NOT_ALLOWED: 'auth/operation-not-allowed',\r\n OPERATION_NOT_SUPPORTED: 'auth/operation-not-supported-in-this-environment',\r\n POPUP_BLOCKED: 'auth/popup-blocked',\r\n POPUP_CLOSED_BY_USER: 'auth/popup-closed-by-user',\r\n PROVIDER_ALREADY_LINKED: 'auth/provider-already-linked',\r\n QUOTA_EXCEEDED: 'auth/quota-exceeded',\r\n REDIRECT_CANCELLED_BY_USER: 'auth/redirect-cancelled-by-user',\r\n REDIRECT_OPERATION_PENDING: 'auth/redirect-operation-pending',\r\n REJECTED_CREDENTIAL: 'auth/rejected-credential',\r\n SECOND_FACTOR_ALREADY_ENROLLED: 'auth/second-factor-already-in-use',\r\n SECOND_FACTOR_LIMIT_EXCEEDED: 'auth/maximum-second-factor-count-exceeded',\r\n TENANT_ID_MISMATCH: 'auth/tenant-id-mismatch',\r\n TIMEOUT: 'auth/timeout',\r\n TOKEN_EXPIRED: 'auth/user-token-expired',\r\n TOO_MANY_ATTEMPTS_TRY_LATER: 'auth/too-many-requests',\r\n UNAUTHORIZED_DOMAIN: 'auth/unauthorized-continue-uri',\r\n UNSUPPORTED_FIRST_FACTOR: 'auth/unsupported-first-factor',\r\n UNSUPPORTED_PERSISTENCE: 'auth/unsupported-persistence-type',\r\n UNSUPPORTED_TENANT_OPERATION: 'auth/unsupported-tenant-operation',\r\n UNVERIFIED_EMAIL: 'auth/unverified-email',\r\n USER_CANCELLED: 'auth/user-cancelled',\r\n USER_DELETED: 'auth/user-not-found',\r\n USER_DISABLED: 'auth/user-disabled',\r\n USER_MISMATCH: 'auth/user-mismatch',\r\n USER_SIGNED_OUT: 'auth/user-signed-out',\r\n WEAK_PASSWORD: 'auth/weak-password',\r\n WEB_STORAGE_UNSUPPORTED: 'auth/web-storage-unsupported',\r\n ALREADY_INITIALIZED: 'auth/already-initialized',\r\n RECAPTCHA_NOT_ENABLED: 'auth/recaptcha-not-enabled',\r\n MISSING_RECAPTCHA_TOKEN: 'auth/missing-recaptcha-token',\r\n INVALID_RECAPTCHA_TOKEN: 'auth/invalid-recaptcha-token',\r\n INVALID_RECAPTCHA_ACTION: 'auth/invalid-recaptcha-action',\r\n MISSING_CLIENT_TYPE: 'auth/missing-client-type',\r\n MISSING_RECAPTCHA_VERSION: 'auth/missing-recaptcha-version',\r\n INVALID_RECAPTCHA_VERSION: 'auth/invalid-recaptcha-version',\r\n INVALID_REQ_TYPE: 'auth/invalid-req-type'\r\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst logClient = new Logger('@firebase/auth');\r\nfunction _logWarn(msg, ...args) {\r\n if (logClient.logLevel <= LogLevel.WARN) {\r\n logClient.warn(`Auth (${SDK_VERSION}): ${msg}`, ...args);\r\n }\r\n}\r\nfunction _logError(msg, ...args) {\r\n if (logClient.logLevel <= LogLevel.ERROR) {\r\n logClient.error(`Auth (${SDK_VERSION}): ${msg}`, ...args);\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _fail(authOrCode, ...rest) {\r\n throw createErrorInternal(authOrCode, ...rest);\r\n}\r\nfunction _createError(authOrCode, ...rest) {\r\n return createErrorInternal(authOrCode, ...rest);\r\n}\r\nfunction _errorWithCustomMessage(auth, code, message) {\r\n const errorMap = Object.assign(Object.assign({}, prodErrorMap()), { [code]: message });\r\n const factory = new ErrorFactory('auth', 'Firebase', errorMap);\r\n return factory.create(code, {\r\n appName: auth.name\r\n });\r\n}\r\nfunction _assertInstanceOf(auth, object, instance) {\r\n const constructorInstance = instance;\r\n if (!(object instanceof constructorInstance)) {\r\n if (constructorInstance.name !== object.constructor.name) {\r\n _fail(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n }\r\n throw _errorWithCustomMessage(auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, `Type of ${object.constructor.name} does not match expected instance.` +\r\n `Did you pass a reference from a different Auth SDK?`);\r\n }\r\n}\r\nfunction createErrorInternal(authOrCode, ...rest) {\r\n if (typeof authOrCode !== 'string') {\r\n const code = rest[0];\r\n const fullParams = [...rest.slice(1)];\r\n if (fullParams[0]) {\r\n fullParams[0].appName = authOrCode.name;\r\n }\r\n return authOrCode._errorFactory.create(code, ...fullParams);\r\n }\r\n return _DEFAULT_AUTH_ERROR_FACTORY.create(authOrCode, ...rest);\r\n}\r\nfunction _assert(assertion, authOrCode, ...rest) {\r\n if (!assertion) {\r\n throw createErrorInternal(authOrCode, ...rest);\r\n }\r\n}\r\n/**\r\n * Unconditionally fails, throwing an internal error with the given message.\r\n *\r\n * @param failure type of failure encountered\r\n * @throws Error\r\n */\r\nfunction debugFail(failure) {\r\n // Log the failure in addition to throw an exception, just in case the\r\n // exception is swallowed.\r\n const message = `INTERNAL ASSERTION FAILED: ` + failure;\r\n _logError(message);\r\n // NOTE: We don't use FirebaseError here because these are internal failures\r\n // that cannot be handled by the user. (Also it would create a circular\r\n // dependency between the error and assert modules which doesn't work.)\r\n throw new Error(message);\r\n}\r\n/**\r\n * Fails if the given assertion condition is false, throwing an Error with the\r\n * given message if it did.\r\n *\r\n * @param assertion\r\n * @param message\r\n */\r\nfunction debugAssert(assertion, message) {\r\n if (!assertion) {\r\n debugFail(message);\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _getCurrentUrl() {\r\n var _a;\r\n return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.href)) || '';\r\n}\r\nfunction _isHttpOrHttps() {\r\n return _getCurrentScheme() === 'http:' || _getCurrentScheme() === 'https:';\r\n}\r\nfunction _getCurrentScheme() {\r\n var _a;\r\n return (typeof self !== 'undefined' && ((_a = self.location) === null || _a === void 0 ? void 0 : _a.protocol)) || null;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Determine whether the browser is working online\r\n */\r\nfunction _isOnline() {\r\n if (typeof navigator !== 'undefined' &&\r\n navigator &&\r\n 'onLine' in navigator &&\r\n typeof navigator.onLine === 'boolean' &&\r\n // Apply only for traditional web apps and Chrome extensions.\r\n // This is especially true for Cordova apps which have unreliable\r\n // navigator.onLine behavior unless cordova-plugin-network-information is\r\n // installed which overwrites the native navigator.onLine value and\r\n // defines navigator.connection.\r\n (_isHttpOrHttps() || isBrowserExtension() || 'connection' in navigator)) {\r\n return navigator.onLine;\r\n }\r\n // If we can't determine the state, assume it is online.\r\n return true;\r\n}\r\nfunction _getUserLanguage() {\r\n if (typeof navigator === 'undefined') {\r\n return null;\r\n }\r\n const navigatorLanguage = navigator;\r\n return (\r\n // Most reliable, but only supported in Chrome/Firefox.\r\n (navigatorLanguage.languages && navigatorLanguage.languages[0]) ||\r\n // Supported in most browsers, but returns the language of the browser\r\n // UI, not the language set in browser settings.\r\n navigatorLanguage.language ||\r\n // Couldn't determine language.\r\n null);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * A structure to help pick between a range of long and short delay durations\r\n * depending on the current environment. In general, the long delay is used for\r\n * mobile environments whereas short delays are used for desktop environments.\r\n */\r\nclass Delay {\r\n constructor(shortDelay, longDelay) {\r\n this.shortDelay = shortDelay;\r\n this.longDelay = longDelay;\r\n // Internal error when improperly initialized.\r\n debugAssert(longDelay > shortDelay, 'Short delay should be less than long delay!');\r\n this.isMobile = isMobileCordova() || isReactNative();\r\n }\r\n get() {\r\n if (!_isOnline()) {\r\n // Pick the shorter timeout.\r\n return Math.min(5000 /* DelayMin.OFFLINE */, this.shortDelay);\r\n }\r\n // If running in a mobile environment, return the long delay, otherwise\r\n // return the short delay.\r\n // This could be improved in the future to dynamically change based on other\r\n // variables instead of just reading the current environment.\r\n return this.isMobile ? this.longDelay : this.shortDelay;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _emulatorUrl(config, path) {\r\n debugAssert(config.emulator, 'Emulator should always be set here');\r\n const { url } = config.emulator;\r\n if (!path) {\r\n return url;\r\n }\r\n return `${url}${path.startsWith('/') ? path.slice(1) : path}`;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass FetchProvider {\r\n static initialize(fetchImpl, headersImpl, responseImpl) {\r\n this.fetchImpl = fetchImpl;\r\n if (headersImpl) {\r\n this.headersImpl = headersImpl;\r\n }\r\n if (responseImpl) {\r\n this.responseImpl = responseImpl;\r\n }\r\n }\r\n static fetch() {\r\n if (this.fetchImpl) {\r\n return this.fetchImpl;\r\n }\r\n if (typeof self !== 'undefined' && 'fetch' in self) {\r\n return self.fetch;\r\n }\r\n debugFail('Could not find fetch implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\r\n }\r\n static headers() {\r\n if (this.headersImpl) {\r\n return this.headersImpl;\r\n }\r\n if (typeof self !== 'undefined' && 'Headers' in self) {\r\n return self.Headers;\r\n }\r\n debugFail('Could not find Headers implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\r\n }\r\n static response() {\r\n if (this.responseImpl) {\r\n return this.responseImpl;\r\n }\r\n if (typeof self !== 'undefined' && 'Response' in self) {\r\n return self.Response;\r\n }\r\n debugFail('Could not find Response implementation, make sure you call FetchProvider.initialize() with an appropriate polyfill');\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Map from errors returned by the server to errors to developer visible errors\r\n */\r\nconst SERVER_ERROR_MAP = {\r\n // Custom token errors.\r\n [\"CREDENTIAL_MISMATCH\" /* ServerError.CREDENTIAL_MISMATCH */]: \"custom-token-mismatch\" /* AuthErrorCode.CREDENTIAL_MISMATCH */,\r\n // This can only happen if the SDK sends a bad request.\r\n [\"MISSING_CUSTOM_TOKEN\" /* ServerError.MISSING_CUSTOM_TOKEN */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\r\n // Create Auth URI errors.\r\n [\"INVALID_IDENTIFIER\" /* ServerError.INVALID_IDENTIFIER */]: \"invalid-email\" /* AuthErrorCode.INVALID_EMAIL */,\r\n // This can only happen if the SDK sends a bad request.\r\n [\"MISSING_CONTINUE_URI\" /* ServerError.MISSING_CONTINUE_URI */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\r\n // Sign in with email and password errors (some apply to sign up too).\r\n [\"INVALID_PASSWORD\" /* ServerError.INVALID_PASSWORD */]: \"wrong-password\" /* AuthErrorCode.INVALID_PASSWORD */,\r\n // This can only happen if the SDK sends a bad request.\r\n [\"MISSING_PASSWORD\" /* ServerError.MISSING_PASSWORD */]: \"missing-password\" /* AuthErrorCode.MISSING_PASSWORD */,\r\n // Sign up with email and password errors.\r\n [\"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */]: \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */,\r\n [\"PASSWORD_LOGIN_DISABLED\" /* ServerError.PASSWORD_LOGIN_DISABLED */]: \"operation-not-allowed\" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,\r\n // Verify assertion for sign in with credential errors:\r\n [\"INVALID_IDP_RESPONSE\" /* ServerError.INVALID_IDP_RESPONSE */]: \"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */,\r\n [\"INVALID_PENDING_TOKEN\" /* ServerError.INVALID_PENDING_TOKEN */]: \"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */,\r\n [\"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */]: \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */,\r\n // This can only happen if the SDK sends a bad request.\r\n [\"MISSING_REQ_TYPE\" /* ServerError.MISSING_REQ_TYPE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\r\n // Send Password reset email errors:\r\n [\"EMAIL_NOT_FOUND\" /* ServerError.EMAIL_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */,\r\n [\"RESET_PASSWORD_EXCEED_LIMIT\" /* ServerError.RESET_PASSWORD_EXCEED_LIMIT */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\r\n [\"EXPIRED_OOB_CODE\" /* ServerError.EXPIRED_OOB_CODE */]: \"expired-action-code\" /* AuthErrorCode.EXPIRED_OOB_CODE */,\r\n [\"INVALID_OOB_CODE\" /* ServerError.INVALID_OOB_CODE */]: \"invalid-action-code\" /* AuthErrorCode.INVALID_OOB_CODE */,\r\n // This can only happen if the SDK sends a bad request.\r\n [\"MISSING_OOB_CODE\" /* ServerError.MISSING_OOB_CODE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\r\n // Operations that require ID token in request:\r\n [\"CREDENTIAL_TOO_OLD_LOGIN_AGAIN\" /* ServerError.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */]: \"requires-recent-login\" /* AuthErrorCode.CREDENTIAL_TOO_OLD_LOGIN_AGAIN */,\r\n [\"INVALID_ID_TOKEN\" /* ServerError.INVALID_ID_TOKEN */]: \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */,\r\n [\"TOKEN_EXPIRED\" /* ServerError.TOKEN_EXPIRED */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\r\n [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */,\r\n // Other errors.\r\n [\"TOO_MANY_ATTEMPTS_TRY_LATER\" /* ServerError.TOO_MANY_ATTEMPTS_TRY_LATER */]: \"too-many-requests\" /* AuthErrorCode.TOO_MANY_ATTEMPTS_TRY_LATER */,\r\n [\"PASSWORD_DOES_NOT_MEET_REQUIREMENTS\" /* ServerError.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */]: \"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */,\r\n // Phone Auth related errors.\r\n [\"INVALID_CODE\" /* ServerError.INVALID_CODE */]: \"invalid-verification-code\" /* AuthErrorCode.INVALID_CODE */,\r\n [\"INVALID_SESSION_INFO\" /* ServerError.INVALID_SESSION_INFO */]: \"invalid-verification-id\" /* AuthErrorCode.INVALID_SESSION_INFO */,\r\n [\"INVALID_TEMPORARY_PROOF\" /* ServerError.INVALID_TEMPORARY_PROOF */]: \"invalid-credential\" /* AuthErrorCode.INVALID_IDP_RESPONSE */,\r\n [\"MISSING_SESSION_INFO\" /* ServerError.MISSING_SESSION_INFO */]: \"missing-verification-id\" /* AuthErrorCode.MISSING_SESSION_INFO */,\r\n [\"SESSION_EXPIRED\" /* ServerError.SESSION_EXPIRED */]: \"code-expired\" /* AuthErrorCode.CODE_EXPIRED */,\r\n // Other action code errors when additional settings passed.\r\n // MISSING_CONTINUE_URI is getting mapped to INTERNAL_ERROR above.\r\n // This is OK as this error will be caught by client side validation.\r\n [\"MISSING_ANDROID_PACKAGE_NAME\" /* ServerError.MISSING_ANDROID_PACKAGE_NAME */]: \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */,\r\n [\"UNAUTHORIZED_DOMAIN\" /* ServerError.UNAUTHORIZED_DOMAIN */]: \"unauthorized-continue-uri\" /* AuthErrorCode.UNAUTHORIZED_DOMAIN */,\r\n // getProjectConfig errors when clientId is passed.\r\n [\"INVALID_OAUTH_CLIENT_ID\" /* ServerError.INVALID_OAUTH_CLIENT_ID */]: \"invalid-oauth-client-id\" /* AuthErrorCode.INVALID_OAUTH_CLIENT_ID */,\r\n // User actions (sign-up or deletion) disabled errors.\r\n [\"ADMIN_ONLY_OPERATION\" /* ServerError.ADMIN_ONLY_OPERATION */]: \"admin-restricted-operation\" /* AuthErrorCode.ADMIN_ONLY_OPERATION */,\r\n // Multi factor related errors.\r\n [\"INVALID_MFA_PENDING_CREDENTIAL\" /* ServerError.INVALID_MFA_PENDING_CREDENTIAL */]: \"invalid-multi-factor-session\" /* AuthErrorCode.INVALID_MFA_SESSION */,\r\n [\"MFA_ENROLLMENT_NOT_FOUND\" /* ServerError.MFA_ENROLLMENT_NOT_FOUND */]: \"multi-factor-info-not-found\" /* AuthErrorCode.MFA_INFO_NOT_FOUND */,\r\n [\"MISSING_MFA_ENROLLMENT_ID\" /* ServerError.MISSING_MFA_ENROLLMENT_ID */]: \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */,\r\n [\"MISSING_MFA_PENDING_CREDENTIAL\" /* ServerError.MISSING_MFA_PENDING_CREDENTIAL */]: \"missing-multi-factor-session\" /* AuthErrorCode.MISSING_MFA_SESSION */,\r\n [\"SECOND_FACTOR_EXISTS\" /* ServerError.SECOND_FACTOR_EXISTS */]: \"second-factor-already-in-use\" /* AuthErrorCode.SECOND_FACTOR_ALREADY_ENROLLED */,\r\n [\"SECOND_FACTOR_LIMIT_EXCEEDED\" /* ServerError.SECOND_FACTOR_LIMIT_EXCEEDED */]: \"maximum-second-factor-count-exceeded\" /* AuthErrorCode.SECOND_FACTOR_LIMIT_EXCEEDED */,\r\n // Blocking functions related errors.\r\n [\"BLOCKING_FUNCTION_ERROR_RESPONSE\" /* ServerError.BLOCKING_FUNCTION_ERROR_RESPONSE */]: \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */,\r\n // Recaptcha related errors.\r\n [\"RECAPTCHA_NOT_ENABLED\" /* ServerError.RECAPTCHA_NOT_ENABLED */]: \"recaptcha-not-enabled\" /* AuthErrorCode.RECAPTCHA_NOT_ENABLED */,\r\n [\"MISSING_RECAPTCHA_TOKEN\" /* ServerError.MISSING_RECAPTCHA_TOKEN */]: \"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */,\r\n [\"INVALID_RECAPTCHA_TOKEN\" /* ServerError.INVALID_RECAPTCHA_TOKEN */]: \"invalid-recaptcha-token\" /* AuthErrorCode.INVALID_RECAPTCHA_TOKEN */,\r\n [\"INVALID_RECAPTCHA_ACTION\" /* ServerError.INVALID_RECAPTCHA_ACTION */]: \"invalid-recaptcha-action\" /* AuthErrorCode.INVALID_RECAPTCHA_ACTION */,\r\n [\"MISSING_CLIENT_TYPE\" /* ServerError.MISSING_CLIENT_TYPE */]: \"missing-client-type\" /* AuthErrorCode.MISSING_CLIENT_TYPE */,\r\n [\"MISSING_RECAPTCHA_VERSION\" /* ServerError.MISSING_RECAPTCHA_VERSION */]: \"missing-recaptcha-version\" /* AuthErrorCode.MISSING_RECAPTCHA_VERSION */,\r\n [\"INVALID_RECAPTCHA_VERSION\" /* ServerError.INVALID_RECAPTCHA_VERSION */]: \"invalid-recaptcha-version\" /* AuthErrorCode.INVALID_RECAPTCHA_VERSION */,\r\n [\"INVALID_REQ_TYPE\" /* ServerError.INVALID_REQ_TYPE */]: \"invalid-req-type\" /* AuthErrorCode.INVALID_REQ_TYPE */\r\n};\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DEFAULT_API_TIMEOUT_MS = new Delay(30000, 60000);\r\nfunction _addTidIfNecessary(auth, request) {\r\n if (auth.tenantId && !request.tenantId) {\r\n return Object.assign(Object.assign({}, request), { tenantId: auth.tenantId });\r\n }\r\n return request;\r\n}\r\nasync function _performApiRequest(auth, method, path, request, customErrorMap = {}) {\r\n return _performFetchWithErrorHandling(auth, customErrorMap, async () => {\r\n let body = {};\r\n let params = {};\r\n if (request) {\r\n if (method === \"GET\" /* HttpMethod.GET */) {\r\n params = request;\r\n }\r\n else {\r\n body = {\r\n body: JSON.stringify(request)\r\n };\r\n }\r\n }\r\n const query = querystring(Object.assign({ key: auth.config.apiKey }, params)).slice(1);\r\n const headers = await auth._getAdditionalHeaders();\r\n headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/json';\r\n if (auth.languageCode) {\r\n headers[\"X-Firebase-Locale\" /* HttpHeader.X_FIREBASE_LOCALE */] = auth.languageCode;\r\n }\r\n return FetchProvider.fetch()(_getFinalTarget(auth, auth.config.apiHost, path, query), Object.assign({ method,\r\n headers, referrerPolicy: 'no-referrer' }, body));\r\n });\r\n}\r\nasync function _performFetchWithErrorHandling(auth, customErrorMap, fetchFn) {\r\n auth._canInitEmulator = false;\r\n const errorMap = Object.assign(Object.assign({}, SERVER_ERROR_MAP), customErrorMap);\r\n try {\r\n const networkTimeout = new NetworkTimeout(auth);\r\n const response = await Promise.race([\r\n fetchFn(),\r\n networkTimeout.promise\r\n ]);\r\n // If we've reached this point, the fetch succeeded and the networkTimeout\r\n // didn't throw; clear the network timeout delay so that Node won't hang\r\n networkTimeout.clearNetworkTimeout();\r\n const json = await response.json();\r\n if ('needConfirmation' in json) {\r\n throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, json);\r\n }\r\n if (response.ok && !('errorMessage' in json)) {\r\n return json;\r\n }\r\n else {\r\n const errorMessage = response.ok ? json.errorMessage : json.error.message;\r\n const [serverErrorCode, serverErrorMessage] = errorMessage.split(' : ');\r\n if (serverErrorCode === \"FEDERATED_USER_ID_ALREADY_LINKED\" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */) {\r\n throw _makeTaggedError(auth, \"credential-already-in-use\" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */, json);\r\n }\r\n else if (serverErrorCode === \"EMAIL_EXISTS\" /* ServerError.EMAIL_EXISTS */) {\r\n throw _makeTaggedError(auth, \"email-already-in-use\" /* AuthErrorCode.EMAIL_EXISTS */, json);\r\n }\r\n else if (serverErrorCode === \"USER_DISABLED\" /* ServerError.USER_DISABLED */) {\r\n throw _makeTaggedError(auth, \"user-disabled\" /* AuthErrorCode.USER_DISABLED */, json);\r\n }\r\n const authError = errorMap[serverErrorCode] ||\r\n serverErrorCode\r\n .toLowerCase()\r\n .replace(/[_\\s]+/g, '-');\r\n if (serverErrorMessage) {\r\n throw _errorWithCustomMessage(auth, authError, serverErrorMessage);\r\n }\r\n else {\r\n _fail(auth, authError);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n if (e instanceof FirebaseError) {\r\n throw e;\r\n }\r\n // Changing this to a different error code will log user out when there is a network error\r\n // because we treat any error other than NETWORK_REQUEST_FAILED as token is invalid.\r\n // https://github.com/firebase/firebase-js-sdk/blob/4fbc73610d70be4e0852e7de63a39cb7897e8546/packages/auth/src/core/auth/auth_impl.ts#L309-L316\r\n _fail(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */, { 'message': String(e) });\r\n }\r\n}\r\nasync function _performSignInRequest(auth, method, path, request, customErrorMap = {}) {\r\n const serverResponse = (await _performApiRequest(auth, method, path, request, customErrorMap));\r\n if ('mfaPendingCredential' in serverResponse) {\r\n _fail(auth, \"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */, {\r\n _serverResponse: serverResponse\r\n });\r\n }\r\n return serverResponse;\r\n}\r\nfunction _getFinalTarget(auth, host, path, query) {\r\n const base = `${host}${path}?${query}`;\r\n if (!auth.config.emulator) {\r\n return `${auth.config.apiScheme}://${base}`;\r\n }\r\n return _emulatorUrl(auth.config, base);\r\n}\r\nclass NetworkTimeout {\r\n constructor(auth) {\r\n this.auth = auth;\r\n // Node timers and browser timers are fundamentally incompatible, but we\r\n // don't care about the value here\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n this.timer = null;\r\n this.promise = new Promise((_, reject) => {\r\n this.timer = setTimeout(() => {\r\n return reject(_createError(this.auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\r\n }, DEFAULT_API_TIMEOUT_MS.get());\r\n });\r\n }\r\n clearNetworkTimeout() {\r\n clearTimeout(this.timer);\r\n }\r\n}\r\nfunction _makeTaggedError(auth, code, response) {\r\n const errorParams = {\r\n appName: auth.name\r\n };\r\n if (response.email) {\r\n errorParams.email = response.email;\r\n }\r\n if (response.phoneNumber) {\r\n errorParams.phoneNumber = response.phoneNumber;\r\n }\r\n const error = _createError(auth, code, errorParams);\r\n // We know customData is defined on error because errorParams is defined\r\n error.customData._tokenResponse = response;\r\n return error;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function getRecaptchaParams(auth) {\r\n return ((await _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/recaptchaParams\" /* Endpoint.GET_RECAPTCHA_PARAM */)).recaptchaSiteKey || '');\r\n}\r\nasync function getRecaptchaConfig(auth, request) {\r\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v2/recaptchaConfig\" /* Endpoint.GET_RECAPTCHA_CONFIG */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function deleteAccount(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:delete\" /* Endpoint.DELETE_ACCOUNT */, request);\r\n}\r\nasync function deleteLinkedAccounts(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\r\n}\r\nasync function getAccountInfo(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:lookup\" /* Endpoint.GET_ACCOUNT_INFO */, request);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction utcTimestampToDateString(utcTimestamp) {\r\n if (!utcTimestamp) {\r\n return undefined;\r\n }\r\n try {\r\n // Convert to date object.\r\n const date = new Date(Number(utcTimestamp));\r\n // Test date is valid.\r\n if (!isNaN(date.getTime())) {\r\n // Convert to UTC date string.\r\n return date.toUTCString();\r\n }\r\n }\r\n catch (e) {\r\n // Do nothing. undefined will be returned.\r\n }\r\n return undefined;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Returns a JSON Web Token (JWT) used to identify the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\r\nfunction getIdToken(user, forceRefresh = false) {\r\n return getModularInstance(user).getIdToken(forceRefresh);\r\n}\r\n/**\r\n * Returns a deserialized JSON Web Token (JWT) used to identify the user to a Firebase service.\r\n *\r\n * @remarks\r\n * Returns the current token if it has not expired or if it will not expire in the next five\r\n * minutes. Otherwise, this will refresh the token and return a new one.\r\n *\r\n * @param user - The user.\r\n * @param forceRefresh - Force refresh regardless of token expiration.\r\n *\r\n * @public\r\n */\r\nasync function getIdTokenResult(user, forceRefresh = false) {\r\n const userInternal = getModularInstance(user);\r\n const token = await userInternal.getIdToken(forceRefresh);\r\n const claims = _parseToken(token);\r\n _assert(claims && claims.exp && claims.auth_time && claims.iat, userInternal.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const firebase = typeof claims.firebase === 'object' ? claims.firebase : undefined;\r\n const signInProvider = firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_provider'];\r\n return {\r\n claims,\r\n token,\r\n authTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.auth_time)),\r\n issuedAtTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.iat)),\r\n expirationTime: utcTimestampToDateString(secondsStringToMilliseconds(claims.exp)),\r\n signInProvider: signInProvider || null,\r\n signInSecondFactor: (firebase === null || firebase === void 0 ? void 0 : firebase['sign_in_second_factor']) || null\r\n };\r\n}\r\nfunction secondsStringToMilliseconds(seconds) {\r\n return Number(seconds) * 1000;\r\n}\r\nfunction _parseToken(token) {\r\n const [algorithm, payload, signature] = token.split('.');\r\n if (algorithm === undefined ||\r\n payload === undefined ||\r\n signature === undefined) {\r\n _logError('JWT malformed, contained fewer than 3 sections');\r\n return null;\r\n }\r\n try {\r\n const decoded = base64Decode(payload);\r\n if (!decoded) {\r\n _logError('Failed to decode base64 JWT payload');\r\n return null;\r\n }\r\n return JSON.parse(decoded);\r\n }\r\n catch (e) {\r\n _logError('Caught error parsing JWT payload as JSON', e === null || e === void 0 ? void 0 : e.toString());\r\n return null;\r\n }\r\n}\r\n/**\r\n * Extract expiresIn TTL from a token by subtracting the expiration from the issuance.\r\n */\r\nfunction _tokenExpiresIn(token) {\r\n const parsedToken = _parseToken(token);\r\n _assert(parsedToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n _assert(typeof parsedToken.exp !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n _assert(typeof parsedToken.iat !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return Number(parsedToken.exp) - Number(parsedToken.iat);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function _logoutIfInvalidated(user, promise, bypassAuthState = false) {\r\n if (bypassAuthState) {\r\n return promise;\r\n }\r\n try {\r\n return await promise;\r\n }\r\n catch (e) {\r\n if (e instanceof FirebaseError && isUserInvalidated(e)) {\r\n if (user.auth.currentUser === user) {\r\n await user.auth.signOut();\r\n }\r\n }\r\n throw e;\r\n }\r\n}\r\nfunction isUserInvalidated({ code }) {\r\n return (code === `auth/${\"user-disabled\" /* AuthErrorCode.USER_DISABLED */}` ||\r\n code === `auth/${\"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */}`);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass ProactiveRefresh {\r\n constructor(user) {\r\n this.user = user;\r\n this.isRunning = false;\r\n // Node timers and browser timers return fundamentally different types.\r\n // We don't actually care what the value is but TS won't accept unknown and\r\n // we can't cast properly in both environments.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n this.timerId = null;\r\n this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\r\n }\r\n _start() {\r\n if (this.isRunning) {\r\n return;\r\n }\r\n this.isRunning = true;\r\n this.schedule();\r\n }\r\n _stop() {\r\n if (!this.isRunning) {\r\n return;\r\n }\r\n this.isRunning = false;\r\n if (this.timerId !== null) {\r\n clearTimeout(this.timerId);\r\n }\r\n }\r\n getInterval(wasError) {\r\n var _a;\r\n if (wasError) {\r\n const interval = this.errorBackoff;\r\n this.errorBackoff = Math.min(this.errorBackoff * 2, 960000 /* Duration.RETRY_BACKOFF_MAX */);\r\n return interval;\r\n }\r\n else {\r\n // Reset the error backoff\r\n this.errorBackoff = 30000 /* Duration.RETRY_BACKOFF_MIN */;\r\n const expTime = (_a = this.user.stsTokenManager.expirationTime) !== null && _a !== void 0 ? _a : 0;\r\n const interval = expTime - Date.now() - 300000 /* Duration.OFFSET */;\r\n return Math.max(0, interval);\r\n }\r\n }\r\n schedule(wasError = false) {\r\n if (!this.isRunning) {\r\n // Just in case...\r\n return;\r\n }\r\n const interval = this.getInterval(wasError);\r\n this.timerId = setTimeout(async () => {\r\n await this.iteration();\r\n }, interval);\r\n }\r\n async iteration() {\r\n try {\r\n await this.user.getIdToken(true);\r\n }\r\n catch (e) {\r\n // Only retry on network errors\r\n if ((e === null || e === void 0 ? void 0 : e.code) ===\r\n `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\r\n this.schedule(/* wasError */ true);\r\n }\r\n return;\r\n }\r\n this.schedule();\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass UserMetadata {\r\n constructor(createdAt, lastLoginAt) {\r\n this.createdAt = createdAt;\r\n this.lastLoginAt = lastLoginAt;\r\n this._initializeTime();\r\n }\r\n _initializeTime() {\r\n this.lastSignInTime = utcTimestampToDateString(this.lastLoginAt);\r\n this.creationTime = utcTimestampToDateString(this.createdAt);\r\n }\r\n _copy(metadata) {\r\n this.createdAt = metadata.createdAt;\r\n this.lastLoginAt = metadata.lastLoginAt;\r\n this._initializeTime();\r\n }\r\n toJSON() {\r\n return {\r\n createdAt: this.createdAt,\r\n lastLoginAt: this.lastLoginAt\r\n };\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function _reloadWithoutSaving(user) {\r\n var _a;\r\n const auth = user.auth;\r\n const idToken = await user.getIdToken();\r\n const response = await _logoutIfInvalidated(user, getAccountInfo(auth, { idToken }));\r\n _assert(response === null || response === void 0 ? void 0 : response.users.length, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const coreAccount = response.users[0];\r\n user._notifyReloadListener(coreAccount);\r\n const newProviderData = ((_a = coreAccount.providerUserInfo) === null || _a === void 0 ? void 0 : _a.length)\r\n ? extractProviderData(coreAccount.providerUserInfo)\r\n : [];\r\n const providerData = mergeProviderData(user.providerData, newProviderData);\r\n // Preserves the non-nonymous status of the stored user, even if no more\r\n // credentials (federated or email/password) are linked to the user. If\r\n // the user was previously anonymous, then use provider data to update.\r\n // On the other hand, if it was not anonymous before, it should never be\r\n // considered anonymous now.\r\n const oldIsAnonymous = user.isAnonymous;\r\n const newIsAnonymous = !(user.email && coreAccount.passwordHash) && !(providerData === null || providerData === void 0 ? void 0 : providerData.length);\r\n const isAnonymous = !oldIsAnonymous ? false : newIsAnonymous;\r\n const updates = {\r\n uid: coreAccount.localId,\r\n displayName: coreAccount.displayName || null,\r\n photoURL: coreAccount.photoUrl || null,\r\n email: coreAccount.email || null,\r\n emailVerified: coreAccount.emailVerified || false,\r\n phoneNumber: coreAccount.phoneNumber || null,\r\n tenantId: coreAccount.tenantId || null,\r\n providerData,\r\n metadata: new UserMetadata(coreAccount.createdAt, coreAccount.lastLoginAt),\r\n isAnonymous\r\n };\r\n Object.assign(user, updates);\r\n}\r\n/**\r\n * Reloads user account data, if signed in.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\r\nasync function reload(user) {\r\n const userInternal = getModularInstance(user);\r\n await _reloadWithoutSaving(userInternal);\r\n // Even though the current user hasn't changed, update\r\n // current user will trigger a persistence update w/ the\r\n // new info.\r\n await userInternal.auth._persistUserIfCurrent(userInternal);\r\n userInternal.auth._notifyListenersIfCurrent(userInternal);\r\n}\r\nfunction mergeProviderData(original, newData) {\r\n const deduped = original.filter(o => !newData.some(n => n.providerId === o.providerId));\r\n return [...deduped, ...newData];\r\n}\r\nfunction extractProviderData(providers) {\r\n return providers.map((_a) => {\r\n var { providerId } = _a, provider = __rest(_a, [\"providerId\"]);\r\n return {\r\n providerId,\r\n uid: provider.rawId || '',\r\n displayName: provider.displayName || null,\r\n email: provider.email || null,\r\n phoneNumber: provider.phoneNumber || null,\r\n photoURL: provider.photoUrl || null\r\n };\r\n });\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function requestStsToken(auth, refreshToken) {\r\n const response = await _performFetchWithErrorHandling(auth, {}, async () => {\r\n const body = querystring({\r\n 'grant_type': 'refresh_token',\r\n 'refresh_token': refreshToken\r\n }).slice(1);\r\n const { tokenApiHost, apiKey } = auth.config;\r\n const url = _getFinalTarget(auth, tokenApiHost, \"/v1/token\" /* Endpoint.TOKEN */, `key=${apiKey}`);\r\n const headers = await auth._getAdditionalHeaders();\r\n headers[\"Content-Type\" /* HttpHeader.CONTENT_TYPE */] = 'application/x-www-form-urlencoded';\r\n return FetchProvider.fetch()(url, {\r\n method: \"POST\" /* HttpMethod.POST */,\r\n headers,\r\n body\r\n });\r\n });\r\n // The response comes back in snake_case. Convert to camel:\r\n return {\r\n accessToken: response.access_token,\r\n expiresIn: response.expires_in,\r\n refreshToken: response.refresh_token\r\n };\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * We need to mark this class as internal explicitly to exclude it in the public typings, because\r\n * it references AuthInternal which has a circular dependency with UserInternal.\r\n *\r\n * @internal\r\n */\r\nclass StsTokenManager {\r\n constructor() {\r\n this.refreshToken = null;\r\n this.accessToken = null;\r\n this.expirationTime = null;\r\n }\r\n get isExpired() {\r\n return (!this.expirationTime ||\r\n Date.now() > this.expirationTime - 30000 /* Buffer.TOKEN_REFRESH */);\r\n }\r\n updateFromServerResponse(response) {\r\n _assert(response.idToken, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n _assert(typeof response.idToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n _assert(typeof response.refreshToken !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const expiresIn = 'expiresIn' in response && typeof response.expiresIn !== 'undefined'\r\n ? Number(response.expiresIn)\r\n : _tokenExpiresIn(response.idToken);\r\n this.updateTokensAndExpiration(response.idToken, response.refreshToken, expiresIn);\r\n }\r\n async getToken(auth, forceRefresh = false) {\r\n _assert(!this.accessToken || this.refreshToken, auth, \"user-token-expired\" /* AuthErrorCode.TOKEN_EXPIRED */);\r\n if (!forceRefresh && this.accessToken && !this.isExpired) {\r\n return this.accessToken;\r\n }\r\n if (this.refreshToken) {\r\n await this.refresh(auth, this.refreshToken);\r\n return this.accessToken;\r\n }\r\n return null;\r\n }\r\n clearRefreshToken() {\r\n this.refreshToken = null;\r\n }\r\n async refresh(auth, oldToken) {\r\n const { accessToken, refreshToken, expiresIn } = await requestStsToken(auth, oldToken);\r\n this.updateTokensAndExpiration(accessToken, refreshToken, Number(expiresIn));\r\n }\r\n updateTokensAndExpiration(accessToken, refreshToken, expiresInSec) {\r\n this.refreshToken = refreshToken || null;\r\n this.accessToken = accessToken || null;\r\n this.expirationTime = Date.now() + expiresInSec * 1000;\r\n }\r\n static fromJSON(appName, object) {\r\n const { refreshToken, accessToken, expirationTime } = object;\r\n const manager = new StsTokenManager();\r\n if (refreshToken) {\r\n _assert(typeof refreshToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\r\n appName\r\n });\r\n manager.refreshToken = refreshToken;\r\n }\r\n if (accessToken) {\r\n _assert(typeof accessToken === 'string', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\r\n appName\r\n });\r\n manager.accessToken = accessToken;\r\n }\r\n if (expirationTime) {\r\n _assert(typeof expirationTime === 'number', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, {\r\n appName\r\n });\r\n manager.expirationTime = expirationTime;\r\n }\r\n return manager;\r\n }\r\n toJSON() {\r\n return {\r\n refreshToken: this.refreshToken,\r\n accessToken: this.accessToken,\r\n expirationTime: this.expirationTime\r\n };\r\n }\r\n _assign(stsTokenManager) {\r\n this.accessToken = stsTokenManager.accessToken;\r\n this.refreshToken = stsTokenManager.refreshToken;\r\n this.expirationTime = stsTokenManager.expirationTime;\r\n }\r\n _clone() {\r\n return Object.assign(new StsTokenManager(), this.toJSON());\r\n }\r\n _performRefresh() {\r\n return debugFail('not implemented');\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction assertStringOrUndefined(assertion, appName) {\r\n _assert(typeof assertion === 'string' || typeof assertion === 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */, { appName });\r\n}\r\nclass UserImpl {\r\n constructor(_a) {\r\n var { uid, auth, stsTokenManager } = _a, opt = __rest(_a, [\"uid\", \"auth\", \"stsTokenManager\"]);\r\n // For the user object, provider is always Firebase.\r\n this.providerId = \"firebase\" /* ProviderId.FIREBASE */;\r\n this.proactiveRefresh = new ProactiveRefresh(this);\r\n this.reloadUserInfo = null;\r\n this.reloadListener = null;\r\n this.uid = uid;\r\n this.auth = auth;\r\n this.stsTokenManager = stsTokenManager;\r\n this.accessToken = stsTokenManager.accessToken;\r\n this.displayName = opt.displayName || null;\r\n this.email = opt.email || null;\r\n this.emailVerified = opt.emailVerified || false;\r\n this.phoneNumber = opt.phoneNumber || null;\r\n this.photoURL = opt.photoURL || null;\r\n this.isAnonymous = opt.isAnonymous || false;\r\n this.tenantId = opt.tenantId || null;\r\n this.providerData = opt.providerData ? [...opt.providerData] : [];\r\n this.metadata = new UserMetadata(opt.createdAt || undefined, opt.lastLoginAt || undefined);\r\n }\r\n async getIdToken(forceRefresh) {\r\n const accessToken = await _logoutIfInvalidated(this, this.stsTokenManager.getToken(this.auth, forceRefresh));\r\n _assert(accessToken, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n if (this.accessToken !== accessToken) {\r\n this.accessToken = accessToken;\r\n await this.auth._persistUserIfCurrent(this);\r\n this.auth._notifyListenersIfCurrent(this);\r\n }\r\n return accessToken;\r\n }\r\n getIdTokenResult(forceRefresh) {\r\n return getIdTokenResult(this, forceRefresh);\r\n }\r\n reload() {\r\n return reload(this);\r\n }\r\n _assign(user) {\r\n if (this === user) {\r\n return;\r\n }\r\n _assert(this.uid === user.uid, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n this.displayName = user.displayName;\r\n this.photoURL = user.photoURL;\r\n this.email = user.email;\r\n this.emailVerified = user.emailVerified;\r\n this.phoneNumber = user.phoneNumber;\r\n this.isAnonymous = user.isAnonymous;\r\n this.tenantId = user.tenantId;\r\n this.providerData = user.providerData.map(userInfo => (Object.assign({}, userInfo)));\r\n this.metadata._copy(user.metadata);\r\n this.stsTokenManager._assign(user.stsTokenManager);\r\n }\r\n _clone(auth) {\r\n const newUser = new UserImpl(Object.assign(Object.assign({}, this), { auth, stsTokenManager: this.stsTokenManager._clone() }));\r\n newUser.metadata._copy(this.metadata);\r\n return newUser;\r\n }\r\n _onReload(callback) {\r\n // There should only ever be one listener, and that is a single instance of MultiFactorUser\r\n _assert(!this.reloadListener, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n this.reloadListener = callback;\r\n if (this.reloadUserInfo) {\r\n this._notifyReloadListener(this.reloadUserInfo);\r\n this.reloadUserInfo = null;\r\n }\r\n }\r\n _notifyReloadListener(userInfo) {\r\n if (this.reloadListener) {\r\n this.reloadListener(userInfo);\r\n }\r\n else {\r\n // If no listener is subscribed yet, save the result so it's available when they do subscribe\r\n this.reloadUserInfo = userInfo;\r\n }\r\n }\r\n _startProactiveRefresh() {\r\n this.proactiveRefresh._start();\r\n }\r\n _stopProactiveRefresh() {\r\n this.proactiveRefresh._stop();\r\n }\r\n async _updateTokensIfNecessary(response, reload = false) {\r\n let tokensRefreshed = false;\r\n if (response.idToken &&\r\n response.idToken !== this.stsTokenManager.accessToken) {\r\n this.stsTokenManager.updateFromServerResponse(response);\r\n tokensRefreshed = true;\r\n }\r\n if (reload) {\r\n await _reloadWithoutSaving(this);\r\n }\r\n await this.auth._persistUserIfCurrent(this);\r\n if (tokensRefreshed) {\r\n this.auth._notifyListenersIfCurrent(this);\r\n }\r\n }\r\n async delete() {\r\n const idToken = await this.getIdToken();\r\n await _logoutIfInvalidated(this, deleteAccount(this.auth, { idToken }));\r\n this.stsTokenManager.clearRefreshToken();\r\n // TODO: Determine if cancellable-promises are necessary to use in this class so that delete()\r\n // cancels pending actions...\r\n return this.auth.signOut();\r\n }\r\n toJSON() {\r\n return Object.assign(Object.assign({ uid: this.uid, email: this.email || undefined, emailVerified: this.emailVerified, displayName: this.displayName || undefined, isAnonymous: this.isAnonymous, photoURL: this.photoURL || undefined, phoneNumber: this.phoneNumber || undefined, tenantId: this.tenantId || undefined, providerData: this.providerData.map(userInfo => (Object.assign({}, userInfo))), stsTokenManager: this.stsTokenManager.toJSON(), \r\n // Redirect event ID must be maintained in case there is a pending\r\n // redirect event.\r\n _redirectEventId: this._redirectEventId }, this.metadata.toJSON()), { \r\n // Required for compatibility with the legacy SDK (go/firebase-auth-sdk-persistence-parsing):\r\n apiKey: this.auth.config.apiKey, appName: this.auth.name });\r\n }\r\n get refreshToken() {\r\n return this.stsTokenManager.refreshToken || '';\r\n }\r\n static _fromJSON(auth, object) {\r\n var _a, _b, _c, _d, _e, _f, _g, _h;\r\n const displayName = (_a = object.displayName) !== null && _a !== void 0 ? _a : undefined;\r\n const email = (_b = object.email) !== null && _b !== void 0 ? _b : undefined;\r\n const phoneNumber = (_c = object.phoneNumber) !== null && _c !== void 0 ? _c : undefined;\r\n const photoURL = (_d = object.photoURL) !== null && _d !== void 0 ? _d : undefined;\r\n const tenantId = (_e = object.tenantId) !== null && _e !== void 0 ? _e : undefined;\r\n const _redirectEventId = (_f = object._redirectEventId) !== null && _f !== void 0 ? _f : undefined;\r\n const createdAt = (_g = object.createdAt) !== null && _g !== void 0 ? _g : undefined;\r\n const lastLoginAt = (_h = object.lastLoginAt) !== null && _h !== void 0 ? _h : undefined;\r\n const { uid, emailVerified, isAnonymous, providerData, stsTokenManager: plainObjectTokenManager } = object;\r\n _assert(uid && plainObjectTokenManager, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const stsTokenManager = StsTokenManager.fromJSON(this.name, plainObjectTokenManager);\r\n _assert(typeof uid === 'string', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n assertStringOrUndefined(displayName, auth.name);\r\n assertStringOrUndefined(email, auth.name);\r\n _assert(typeof emailVerified === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n _assert(typeof isAnonymous === 'boolean', auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n assertStringOrUndefined(phoneNumber, auth.name);\r\n assertStringOrUndefined(photoURL, auth.name);\r\n assertStringOrUndefined(tenantId, auth.name);\r\n assertStringOrUndefined(_redirectEventId, auth.name);\r\n assertStringOrUndefined(createdAt, auth.name);\r\n assertStringOrUndefined(lastLoginAt, auth.name);\r\n const user = new UserImpl({\r\n uid,\r\n auth,\r\n email,\r\n emailVerified,\r\n displayName,\r\n isAnonymous,\r\n photoURL,\r\n phoneNumber,\r\n tenantId,\r\n stsTokenManager,\r\n createdAt,\r\n lastLoginAt\r\n });\r\n if (providerData && Array.isArray(providerData)) {\r\n user.providerData = providerData.map(userInfo => (Object.assign({}, userInfo)));\r\n }\r\n if (_redirectEventId) {\r\n user._redirectEventId = _redirectEventId;\r\n }\r\n return user;\r\n }\r\n /**\r\n * Initialize a User from an idToken server response\r\n * @param auth\r\n * @param idTokenResponse\r\n */\r\n static async _fromIdTokenResponse(auth, idTokenResponse, isAnonymous = false) {\r\n const stsTokenManager = new StsTokenManager();\r\n stsTokenManager.updateFromServerResponse(idTokenResponse);\r\n // Initialize the Firebase Auth user.\r\n const user = new UserImpl({\r\n uid: idTokenResponse.localId,\r\n auth,\r\n stsTokenManager,\r\n isAnonymous\r\n });\r\n // Updates the user info and data and resolves with a user instance.\r\n await _reloadWithoutSaving(user);\r\n return user;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst instanceCache = new Map();\r\nfunction _getInstance(cls) {\r\n debugAssert(cls instanceof Function, 'Expected a class definition');\r\n let instance = instanceCache.get(cls);\r\n if (instance) {\r\n debugAssert(instance instanceof cls, 'Instance stored in cache mismatched with class');\r\n return instance;\r\n }\r\n instance = new cls();\r\n instanceCache.set(cls, instance);\r\n return instance;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass InMemoryPersistence {\r\n constructor() {\r\n this.type = \"NONE\" /* PersistenceType.NONE */;\r\n this.storage = {};\r\n }\r\n async _isAvailable() {\r\n return true;\r\n }\r\n async _set(key, value) {\r\n this.storage[key] = value;\r\n }\r\n async _get(key) {\r\n const value = this.storage[key];\r\n return value === undefined ? null : value;\r\n }\r\n async _remove(key) {\r\n delete this.storage[key];\r\n }\r\n _addListener(_key, _listener) {\r\n // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\r\n return;\r\n }\r\n _removeListener(_key, _listener) {\r\n // Listeners are not supported for in-memory storage since it cannot be shared across windows/workers\r\n return;\r\n }\r\n}\r\nInMemoryPersistence.type = 'NONE';\r\n/**\r\n * An implementation of {@link Persistence} of type 'NONE'.\r\n *\r\n * @public\r\n */\r\nconst inMemoryPersistence = InMemoryPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _persistenceKeyName(key, apiKey, appName) {\r\n return `${\"firebase\" /* Namespace.PERSISTENCE */}:${key}:${apiKey}:${appName}`;\r\n}\r\nclass PersistenceUserManager {\r\n constructor(persistence, auth, userKey) {\r\n this.persistence = persistence;\r\n this.auth = auth;\r\n this.userKey = userKey;\r\n const { config, name } = this.auth;\r\n this.fullUserKey = _persistenceKeyName(this.userKey, config.apiKey, name);\r\n this.fullPersistenceKey = _persistenceKeyName(\"persistence\" /* KeyName.PERSISTENCE_USER */, config.apiKey, name);\r\n this.boundEventHandler = auth._onStorageEvent.bind(auth);\r\n this.persistence._addListener(this.fullUserKey, this.boundEventHandler);\r\n }\r\n setCurrentUser(user) {\r\n return this.persistence._set(this.fullUserKey, user.toJSON());\r\n }\r\n async getCurrentUser() {\r\n const blob = await this.persistence._get(this.fullUserKey);\r\n return blob ? UserImpl._fromJSON(this.auth, blob) : null;\r\n }\r\n removeCurrentUser() {\r\n return this.persistence._remove(this.fullUserKey);\r\n }\r\n savePersistenceForRedirect() {\r\n return this.persistence._set(this.fullPersistenceKey, this.persistence.type);\r\n }\r\n async setPersistence(newPersistence) {\r\n if (this.persistence === newPersistence) {\r\n return;\r\n }\r\n const currentUser = await this.getCurrentUser();\r\n await this.removeCurrentUser();\r\n this.persistence = newPersistence;\r\n if (currentUser) {\r\n return this.setCurrentUser(currentUser);\r\n }\r\n }\r\n delete() {\r\n this.persistence._removeListener(this.fullUserKey, this.boundEventHandler);\r\n }\r\n static async create(auth, persistenceHierarchy, userKey = \"authUser\" /* KeyName.AUTH_USER */) {\r\n if (!persistenceHierarchy.length) {\r\n return new PersistenceUserManager(_getInstance(inMemoryPersistence), auth, userKey);\r\n }\r\n // Eliminate any persistences that are not available\r\n const availablePersistences = (await Promise.all(persistenceHierarchy.map(async (persistence) => {\r\n if (await persistence._isAvailable()) {\r\n return persistence;\r\n }\r\n return undefined;\r\n }))).filter(persistence => persistence);\r\n // Fall back to the first persistence listed, or in memory if none available\r\n let selectedPersistence = availablePersistences[0] ||\r\n _getInstance(inMemoryPersistence);\r\n const key = _persistenceKeyName(userKey, auth.config.apiKey, auth.name);\r\n // Pull out the existing user, setting the chosen persistence to that\r\n // persistence if the user exists.\r\n let userToMigrate = null;\r\n // Note, here we check for a user in _all_ persistences, not just the\r\n // ones deemed available. If we can migrate a user out of a broken\r\n // persistence, we will (but only if that persistence supports migration).\r\n for (const persistence of persistenceHierarchy) {\r\n try {\r\n const blob = await persistence._get(key);\r\n if (blob) {\r\n const user = UserImpl._fromJSON(auth, blob); // throws for unparsable blob (wrong format)\r\n if (persistence !== selectedPersistence) {\r\n userToMigrate = user;\r\n }\r\n selectedPersistence = persistence;\r\n break;\r\n }\r\n }\r\n catch (_a) { }\r\n }\r\n // If we find the user in a persistence that does support migration, use\r\n // that migration path (of only persistences that support migration)\r\n const migrationHierarchy = availablePersistences.filter(p => p._shouldAllowMigration);\r\n // If the persistence does _not_ allow migration, just finish off here\r\n if (!selectedPersistence._shouldAllowMigration ||\r\n !migrationHierarchy.length) {\r\n return new PersistenceUserManager(selectedPersistence, auth, userKey);\r\n }\r\n selectedPersistence = migrationHierarchy[0];\r\n if (userToMigrate) {\r\n // This normally shouldn't throw since chosenPersistence.isAvailable() is true, but if it does\r\n // we'll just let it bubble to surface the error.\r\n await selectedPersistence._set(key, userToMigrate.toJSON());\r\n }\r\n // Attempt to clear the key in other persistences but ignore errors. This helps prevent issues\r\n // such as users getting stuck with a previous account after signing out and refreshing the tab.\r\n await Promise.all(persistenceHierarchy.map(async (persistence) => {\r\n if (persistence !== selectedPersistence) {\r\n try {\r\n await persistence._remove(key);\r\n }\r\n catch (_a) { }\r\n }\r\n }));\r\n return new PersistenceUserManager(selectedPersistence, auth, userKey);\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Determine the browser for the purposes of reporting usage to the API\r\n */\r\nfunction _getBrowserName(userAgent) {\r\n const ua = userAgent.toLowerCase();\r\n if (ua.includes('opera/') || ua.includes('opr/') || ua.includes('opios/')) {\r\n return \"Opera\" /* BrowserName.OPERA */;\r\n }\r\n else if (_isIEMobile(ua)) {\r\n // Windows phone IEMobile browser.\r\n return \"IEMobile\" /* BrowserName.IEMOBILE */;\r\n }\r\n else if (ua.includes('msie') || ua.includes('trident/')) {\r\n return \"IE\" /* BrowserName.IE */;\r\n }\r\n else if (ua.includes('edge/')) {\r\n return \"Edge\" /* BrowserName.EDGE */;\r\n }\r\n else if (_isFirefox(ua)) {\r\n return \"Firefox\" /* BrowserName.FIREFOX */;\r\n }\r\n else if (ua.includes('silk/')) {\r\n return \"Silk\" /* BrowserName.SILK */;\r\n }\r\n else if (_isBlackBerry(ua)) {\r\n // Blackberry browser.\r\n return \"Blackberry\" /* BrowserName.BLACKBERRY */;\r\n }\r\n else if (_isWebOS(ua)) {\r\n // WebOS default browser.\r\n return \"Webos\" /* BrowserName.WEBOS */;\r\n }\r\n else if (_isSafari(ua)) {\r\n return \"Safari\" /* BrowserName.SAFARI */;\r\n }\r\n else if ((ua.includes('chrome/') || _isChromeIOS(ua)) &&\r\n !ua.includes('edge/')) {\r\n return \"Chrome\" /* BrowserName.CHROME */;\r\n }\r\n else if (_isAndroid(ua)) {\r\n // Android stock browser.\r\n return \"Android\" /* BrowserName.ANDROID */;\r\n }\r\n else {\r\n // Most modern browsers have name/version at end of user agent string.\r\n const re = /([a-zA-Z\\d\\.]+)\\/[a-zA-Z\\d\\.]*$/;\r\n const matches = userAgent.match(re);\r\n if ((matches === null || matches === void 0 ? void 0 : matches.length) === 2) {\r\n return matches[1];\r\n }\r\n }\r\n return \"Other\" /* BrowserName.OTHER */;\r\n}\r\nfunction _isFirefox(ua = getUA()) {\r\n return /firefox\\//i.test(ua);\r\n}\r\nfunction _isSafari(userAgent = getUA()) {\r\n const ua = userAgent.toLowerCase();\r\n return (ua.includes('safari/') &&\r\n !ua.includes('chrome/') &&\r\n !ua.includes('crios/') &&\r\n !ua.includes('android'));\r\n}\r\nfunction _isChromeIOS(ua = getUA()) {\r\n return /crios\\//i.test(ua);\r\n}\r\nfunction _isIEMobile(ua = getUA()) {\r\n return /iemobile/i.test(ua);\r\n}\r\nfunction _isAndroid(ua = getUA()) {\r\n return /android/i.test(ua);\r\n}\r\nfunction _isBlackBerry(ua = getUA()) {\r\n return /blackberry/i.test(ua);\r\n}\r\nfunction _isWebOS(ua = getUA()) {\r\n return /webos/i.test(ua);\r\n}\r\nfunction _isIOS(ua = getUA()) {\r\n return (/iphone|ipad|ipod/i.test(ua) ||\r\n (/macintosh/i.test(ua) && /mobile/i.test(ua)));\r\n}\r\nfunction _isIOS7Or8(ua = getUA()) {\r\n return (/(iPad|iPhone|iPod).*OS 7_\\d/i.test(ua) ||\r\n /(iPad|iPhone|iPod).*OS 8_\\d/i.test(ua));\r\n}\r\nfunction _isIOSStandalone(ua = getUA()) {\r\n var _a;\r\n return _isIOS(ua) && !!((_a = window.navigator) === null || _a === void 0 ? void 0 : _a.standalone);\r\n}\r\nfunction _isIE10() {\r\n return isIE() && document.documentMode === 10;\r\n}\r\nfunction _isMobileBrowser(ua = getUA()) {\r\n // TODO: implement getBrowserName equivalent for OS.\r\n return (_isIOS(ua) ||\r\n _isAndroid(ua) ||\r\n _isWebOS(ua) ||\r\n _isBlackBerry(ua) ||\r\n /windows phone/i.test(ua) ||\r\n _isIEMobile(ua));\r\n}\r\nfunction _isIframe() {\r\n try {\r\n // Check that the current window is not the top window.\r\n // If so, return true.\r\n return !!(window && window !== window.top);\r\n }\r\n catch (e) {\r\n return false;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/*\r\n * Determine the SDK version string\r\n */\r\nfunction _getClientVersion(clientPlatform, frameworks = []) {\r\n let reportedPlatform;\r\n switch (clientPlatform) {\r\n case \"Browser\" /* ClientPlatform.BROWSER */:\r\n // In a browser environment, report the browser name.\r\n reportedPlatform = _getBrowserName(getUA());\r\n break;\r\n case \"Worker\" /* ClientPlatform.WORKER */:\r\n // Technically a worker runs from a browser but we need to differentiate a\r\n // worker from a browser.\r\n // For example: Chrome-Worker/JsCore/4.9.1/FirebaseCore-web.\r\n reportedPlatform = `${_getBrowserName(getUA())}-${clientPlatform}`;\r\n break;\r\n default:\r\n reportedPlatform = clientPlatform;\r\n }\r\n const reportedFrameworks = frameworks.length\r\n ? frameworks.join(',')\r\n : 'FirebaseCore-web'; /* default value if no other framework is used */\r\n return `${reportedPlatform}/${\"JsCore\" /* ClientImplementation.CORE */}/${SDK_VERSION}/${reportedFrameworks}`;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2022 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass AuthMiddlewareQueue {\r\n constructor(auth) {\r\n this.auth = auth;\r\n this.queue = [];\r\n }\r\n pushCallback(callback, onAbort) {\r\n // The callback could be sync or async. Wrap it into a\r\n // function that is always async.\r\n const wrappedCallback = (user) => new Promise((resolve, reject) => {\r\n try {\r\n const result = callback(user);\r\n // Either resolve with existing promise or wrap a non-promise\r\n // return value into a promise.\r\n resolve(result);\r\n }\r\n catch (e) {\r\n // Sync callback throws.\r\n reject(e);\r\n }\r\n });\r\n // Attach the onAbort if present\r\n wrappedCallback.onAbort = onAbort;\r\n this.queue.push(wrappedCallback);\r\n const index = this.queue.length - 1;\r\n return () => {\r\n // Unsubscribe. Replace with no-op. Do not remove from array, or it will disturb\r\n // indexing of other elements.\r\n this.queue[index] = () => Promise.resolve();\r\n };\r\n }\r\n async runMiddleware(nextUser) {\r\n if (this.auth.currentUser === nextUser) {\r\n return;\r\n }\r\n // While running the middleware, build a temporary stack of onAbort\r\n // callbacks to call if one middleware callback rejects.\r\n const onAbortStack = [];\r\n try {\r\n for (const beforeStateCallback of this.queue) {\r\n await beforeStateCallback(nextUser);\r\n // Only push the onAbort if the callback succeeds\r\n if (beforeStateCallback.onAbort) {\r\n onAbortStack.push(beforeStateCallback.onAbort);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n // Run all onAbort, with separate try/catch to ignore any errors and\r\n // continue\r\n onAbortStack.reverse();\r\n for (const onAbort of onAbortStack) {\r\n try {\r\n onAbort();\r\n }\r\n catch (_) {\r\n /* swallow error */\r\n }\r\n }\r\n throw this.auth._errorFactory.create(\"login-blocked\" /* AuthErrorCode.LOGIN_BLOCKED */, {\r\n originalMessage: e === null || e === void 0 ? void 0 : e.message\r\n });\r\n }\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2023 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Fetches the password policy for the currently set tenant or the project if no tenant is set.\r\n *\r\n * @param auth Auth object.\r\n * @param request Password policy request.\r\n * @returns Password policy response.\r\n */\r\nasync function _getPasswordPolicy(auth, request = {}) {\r\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v2/passwordPolicy\" /* Endpoint.GET_PASSWORD_POLICY */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2023 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// Minimum min password length enforced by the backend, even if no minimum length is set.\r\nconst MINIMUM_MIN_PASSWORD_LENGTH = 6;\r\n/**\r\n * Stores password policy requirements and provides password validation against the policy.\r\n *\r\n * @internal\r\n */\r\nclass PasswordPolicyImpl {\r\n constructor(response) {\r\n var _a, _b, _c, _d;\r\n // Only include custom strength options defined in the response.\r\n const responseOptions = response.customStrengthOptions;\r\n this.customStrengthOptions = {};\r\n // TODO: Remove once the backend is updated to include the minimum min password length instead of undefined when there is no minimum length set.\r\n this.customStrengthOptions.minPasswordLength =\r\n (_a = responseOptions.minPasswordLength) !== null && _a !== void 0 ? _a : MINIMUM_MIN_PASSWORD_LENGTH;\r\n if (responseOptions.maxPasswordLength) {\r\n this.customStrengthOptions.maxPasswordLength =\r\n responseOptions.maxPasswordLength;\r\n }\r\n if (responseOptions.containsLowercaseCharacter !== undefined) {\r\n this.customStrengthOptions.containsLowercaseLetter =\r\n responseOptions.containsLowercaseCharacter;\r\n }\r\n if (responseOptions.containsUppercaseCharacter !== undefined) {\r\n this.customStrengthOptions.containsUppercaseLetter =\r\n responseOptions.containsUppercaseCharacter;\r\n }\r\n if (responseOptions.containsNumericCharacter !== undefined) {\r\n this.customStrengthOptions.containsNumericCharacter =\r\n responseOptions.containsNumericCharacter;\r\n }\r\n if (responseOptions.containsNonAlphanumericCharacter !== undefined) {\r\n this.customStrengthOptions.containsNonAlphanumericCharacter =\r\n responseOptions.containsNonAlphanumericCharacter;\r\n }\r\n this.enforcementState = response.enforcementState;\r\n if (this.enforcementState === 'ENFORCEMENT_STATE_UNSPECIFIED') {\r\n this.enforcementState = 'OFF';\r\n }\r\n // Use an empty string if no non-alphanumeric characters are specified in the response.\r\n this.allowedNonAlphanumericCharacters =\r\n (_c = (_b = response.allowedNonAlphanumericCharacters) === null || _b === void 0 ? void 0 : _b.join('')) !== null && _c !== void 0 ? _c : '';\r\n this.forceUpgradeOnSignin = (_d = response.forceUpgradeOnSignin) !== null && _d !== void 0 ? _d : false;\r\n this.schemaVersion = response.schemaVersion;\r\n }\r\n validatePassword(password) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const status = {\r\n isValid: true,\r\n passwordPolicy: this\r\n };\r\n // Check the password length and character options.\r\n this.validatePasswordLengthOptions(password, status);\r\n this.validatePasswordCharacterOptions(password, status);\r\n // Combine the status into single isValid property.\r\n status.isValid && (status.isValid = (_a = status.meetsMinPasswordLength) !== null && _a !== void 0 ? _a : true);\r\n status.isValid && (status.isValid = (_b = status.meetsMaxPasswordLength) !== null && _b !== void 0 ? _b : true);\r\n status.isValid && (status.isValid = (_c = status.containsLowercaseLetter) !== null && _c !== void 0 ? _c : true);\r\n status.isValid && (status.isValid = (_d = status.containsUppercaseLetter) !== null && _d !== void 0 ? _d : true);\r\n status.isValid && (status.isValid = (_e = status.containsNumericCharacter) !== null && _e !== void 0 ? _e : true);\r\n status.isValid && (status.isValid = (_f = status.containsNonAlphanumericCharacter) !== null && _f !== void 0 ? _f : true);\r\n return status;\r\n }\r\n /**\r\n * Validates that the password meets the length options for the policy.\r\n *\r\n * @param password Password to validate.\r\n * @param status Validation status.\r\n */\r\n validatePasswordLengthOptions(password, status) {\r\n const minPasswordLength = this.customStrengthOptions.minPasswordLength;\r\n const maxPasswordLength = this.customStrengthOptions.maxPasswordLength;\r\n if (minPasswordLength) {\r\n status.meetsMinPasswordLength = password.length >= minPasswordLength;\r\n }\r\n if (maxPasswordLength) {\r\n status.meetsMaxPasswordLength = password.length <= maxPasswordLength;\r\n }\r\n }\r\n /**\r\n * Validates that the password meets the character options for the policy.\r\n *\r\n * @param password Password to validate.\r\n * @param status Validation status.\r\n */\r\n validatePasswordCharacterOptions(password, status) {\r\n // Assign statuses for requirements even if the password is an empty string.\r\n this.updatePasswordCharacterOptionsStatuses(status, \r\n /* containsLowercaseCharacter= */ false, \r\n /* containsUppercaseCharacter= */ false, \r\n /* containsNumericCharacter= */ false, \r\n /* containsNonAlphanumericCharacter= */ false);\r\n let passwordChar;\r\n for (let i = 0; i < password.length; i++) {\r\n passwordChar = password.charAt(i);\r\n this.updatePasswordCharacterOptionsStatuses(status, \r\n /* containsLowercaseCharacter= */ passwordChar >= 'a' &&\r\n passwordChar <= 'z', \r\n /* containsUppercaseCharacter= */ passwordChar >= 'A' &&\r\n passwordChar <= 'Z', \r\n /* containsNumericCharacter= */ passwordChar >= '0' &&\r\n passwordChar <= '9', \r\n /* containsNonAlphanumericCharacter= */ this.allowedNonAlphanumericCharacters.includes(passwordChar));\r\n }\r\n }\r\n /**\r\n * Updates the running validation status with the statuses for the character options.\r\n * Expected to be called each time a character is processed to update each option status\r\n * based on the current character.\r\n *\r\n * @param status Validation status.\r\n * @param containsLowercaseCharacter Whether the character is a lowercase letter.\r\n * @param containsUppercaseCharacter Whether the character is an uppercase letter.\r\n * @param containsNumericCharacter Whether the character is a numeric character.\r\n * @param containsNonAlphanumericCharacter Whether the character is a non-alphanumeric character.\r\n */\r\n updatePasswordCharacterOptionsStatuses(status, containsLowercaseCharacter, containsUppercaseCharacter, containsNumericCharacter, containsNonAlphanumericCharacter) {\r\n if (this.customStrengthOptions.containsLowercaseLetter) {\r\n status.containsLowercaseLetter || (status.containsLowercaseLetter = containsLowercaseCharacter);\r\n }\r\n if (this.customStrengthOptions.containsUppercaseLetter) {\r\n status.containsUppercaseLetter || (status.containsUppercaseLetter = containsUppercaseCharacter);\r\n }\r\n if (this.customStrengthOptions.containsNumericCharacter) {\r\n status.containsNumericCharacter || (status.containsNumericCharacter = containsNumericCharacter);\r\n }\r\n if (this.customStrengthOptions.containsNonAlphanumericCharacter) {\r\n status.containsNonAlphanumericCharacter || (status.containsNonAlphanumericCharacter = containsNonAlphanumericCharacter);\r\n }\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass AuthImpl {\r\n constructor(app, heartbeatServiceProvider, appCheckServiceProvider, config) {\r\n this.app = app;\r\n this.heartbeatServiceProvider = heartbeatServiceProvider;\r\n this.appCheckServiceProvider = appCheckServiceProvider;\r\n this.config = config;\r\n this.currentUser = null;\r\n this.emulatorConfig = null;\r\n this.operations = Promise.resolve();\r\n this.authStateSubscription = new Subscription(this);\r\n this.idTokenSubscription = new Subscription(this);\r\n this.beforeStateQueue = new AuthMiddlewareQueue(this);\r\n this.redirectUser = null;\r\n this.isProactiveRefreshEnabled = false;\r\n this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION = 1;\r\n // Any network calls will set this to true and prevent subsequent emulator\r\n // initialization\r\n this._canInitEmulator = true;\r\n this._isInitialized = false;\r\n this._deleted = false;\r\n this._initializationPromise = null;\r\n this._popupRedirectResolver = null;\r\n this._errorFactory = _DEFAULT_AUTH_ERROR_FACTORY;\r\n this._agentRecaptchaConfig = null;\r\n this._tenantRecaptchaConfigs = {};\r\n this._projectPasswordPolicy = null;\r\n this._tenantPasswordPolicies = {};\r\n // Tracks the last notified UID for state change listeners to prevent\r\n // repeated calls to the callbacks. Undefined means it's never been\r\n // called, whereas null means it's been called with a signed out user\r\n this.lastNotifiedUid = undefined;\r\n this.languageCode = null;\r\n this.tenantId = null;\r\n this.settings = { appVerificationDisabledForTesting: false };\r\n this.frameworks = [];\r\n this.name = app.name;\r\n this.clientVersion = config.sdkClientVersion;\r\n }\r\n _initializeWithPersistence(persistenceHierarchy, popupRedirectResolver) {\r\n if (popupRedirectResolver) {\r\n this._popupRedirectResolver = _getInstance(popupRedirectResolver);\r\n }\r\n // Have to check for app deletion throughout initialization (after each\r\n // promise resolution)\r\n this._initializationPromise = this.queue(async () => {\r\n var _a, _b;\r\n if (this._deleted) {\r\n return;\r\n }\r\n this.persistenceManager = await PersistenceUserManager.create(this, persistenceHierarchy);\r\n if (this._deleted) {\r\n return;\r\n }\r\n // Initialize the resolver early if necessary (only applicable to web:\r\n // this will cause the iframe to load immediately in certain cases)\r\n if ((_a = this._popupRedirectResolver) === null || _a === void 0 ? void 0 : _a._shouldInitProactively) {\r\n // If this fails, don't halt auth loading\r\n try {\r\n await this._popupRedirectResolver._initialize(this);\r\n }\r\n catch (e) {\r\n /* Ignore the error */\r\n }\r\n }\r\n await this.initializeCurrentUser(popupRedirectResolver);\r\n this.lastNotifiedUid = ((_b = this.currentUser) === null || _b === void 0 ? void 0 : _b.uid) || null;\r\n if (this._deleted) {\r\n return;\r\n }\r\n this._isInitialized = true;\r\n });\r\n return this._initializationPromise;\r\n }\r\n /**\r\n * If the persistence is changed in another window, the user manager will let us know\r\n */\r\n async _onStorageEvent() {\r\n if (this._deleted) {\r\n return;\r\n }\r\n const user = await this.assertedPersistence.getCurrentUser();\r\n if (!this.currentUser && !user) {\r\n // No change, do nothing (was signed out and remained signed out).\r\n return;\r\n }\r\n // If the same user is to be synchronized.\r\n if (this.currentUser && user && this.currentUser.uid === user.uid) {\r\n // Data update, simply copy data changes.\r\n this._currentUser._assign(user);\r\n // If tokens changed from previous user tokens, this will trigger\r\n // notifyAuthListeners_.\r\n await this.currentUser.getIdToken();\r\n return;\r\n }\r\n // Update current Auth state. Either a new login or logout.\r\n // Skip blocking callbacks, they should not apply to a change in another tab.\r\n await this._updateCurrentUser(user, /* skipBeforeStateCallbacks */ true);\r\n }\r\n async initializeCurrentUser(popupRedirectResolver) {\r\n var _a;\r\n // First check to see if we have a pending redirect event.\r\n const previouslyStoredUser = (await this.assertedPersistence.getCurrentUser());\r\n let futureCurrentUser = previouslyStoredUser;\r\n let needsTocheckMiddleware = false;\r\n if (popupRedirectResolver && this.config.authDomain) {\r\n await this.getOrInitRedirectPersistenceManager();\r\n const redirectUserEventId = (_a = this.redirectUser) === null || _a === void 0 ? void 0 : _a._redirectEventId;\r\n const storedUserEventId = futureCurrentUser === null || futureCurrentUser === void 0 ? void 0 : futureCurrentUser._redirectEventId;\r\n const result = await this.tryRedirectSignIn(popupRedirectResolver);\r\n // If the stored user (i.e. the old \"currentUser\") has a redirectId that\r\n // matches the redirect user, then we want to initially sign in with the\r\n // new user object from result.\r\n // TODO(samgho): More thoroughly test all of this\r\n if ((!redirectUserEventId || redirectUserEventId === storedUserEventId) &&\r\n (result === null || result === void 0 ? void 0 : result.user)) {\r\n futureCurrentUser = result.user;\r\n needsTocheckMiddleware = true;\r\n }\r\n }\r\n // If no user in persistence, there is no current user. Set to null.\r\n if (!futureCurrentUser) {\r\n return this.directlySetCurrentUser(null);\r\n }\r\n if (!futureCurrentUser._redirectEventId) {\r\n // This isn't a redirect link operation, we can reload and bail.\r\n // First though, ensure that we check the middleware is happy.\r\n if (needsTocheckMiddleware) {\r\n try {\r\n await this.beforeStateQueue.runMiddleware(futureCurrentUser);\r\n }\r\n catch (e) {\r\n futureCurrentUser = previouslyStoredUser;\r\n // We know this is available since the bit is only set when the\r\n // resolver is available\r\n this._popupRedirectResolver._overrideRedirectResult(this, () => Promise.reject(e));\r\n }\r\n }\r\n if (futureCurrentUser) {\r\n return this.reloadAndSetCurrentUserOrClear(futureCurrentUser);\r\n }\r\n else {\r\n return this.directlySetCurrentUser(null);\r\n }\r\n }\r\n _assert(this._popupRedirectResolver, this, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n await this.getOrInitRedirectPersistenceManager();\r\n // If the redirect user's event ID matches the current user's event ID,\r\n // DO NOT reload the current user, otherwise they'll be cleared from storage.\r\n // This is important for the reauthenticateWithRedirect() flow.\r\n if (this.redirectUser &&\r\n this.redirectUser._redirectEventId === futureCurrentUser._redirectEventId) {\r\n return this.directlySetCurrentUser(futureCurrentUser);\r\n }\r\n return this.reloadAndSetCurrentUserOrClear(futureCurrentUser);\r\n }\r\n async tryRedirectSignIn(redirectResolver) {\r\n // The redirect user needs to be checked (and signed in if available)\r\n // during auth initialization. All of the normal sign in and link/reauth\r\n // flows call back into auth and push things onto the promise queue. We\r\n // need to await the result of the redirect sign in *inside the promise\r\n // queue*. This presents a problem: we run into deadlock. See:\r\n // ┌> [Initialization] ─────â”\r\n // ┌> [<other queue tasks>] │\r\n // └─ [getRedirectResult] <─┘\r\n // where [] are tasks on the queue and arrows denote awaits\r\n // Initialization will never complete because it's waiting on something\r\n // that's waiting for initialization to complete!\r\n //\r\n // Instead, this method calls getRedirectResult() (stored in\r\n // _completeRedirectFn) with an optional parameter that instructs all of\r\n // the underlying auth operations to skip anything that mutates auth state.\r\n let result = null;\r\n try {\r\n // We know this._popupRedirectResolver is set since redirectResolver\r\n // is passed in. The _completeRedirectFn expects the unwrapped extern.\r\n result = await this._popupRedirectResolver._completeRedirectFn(this, redirectResolver, true);\r\n }\r\n catch (e) {\r\n // Swallow any errors here; the code can retrieve them in\r\n // getRedirectResult().\r\n await this._setRedirectUser(null);\r\n }\r\n return result;\r\n }\r\n async reloadAndSetCurrentUserOrClear(user) {\r\n try {\r\n await _reloadWithoutSaving(user);\r\n }\r\n catch (e) {\r\n if ((e === null || e === void 0 ? void 0 : e.code) !==\r\n `auth/${\"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */}`) {\r\n // Something's wrong with the user's token. Log them out and remove\r\n // them from storage\r\n return this.directlySetCurrentUser(null);\r\n }\r\n }\r\n return this.directlySetCurrentUser(user);\r\n }\r\n useDeviceLanguage() {\r\n this.languageCode = _getUserLanguage();\r\n }\r\n async _delete() {\r\n this._deleted = true;\r\n }\r\n async updateCurrentUser(userExtern) {\r\n // The public updateCurrentUser method needs to make a copy of the user,\r\n // and also check that the project matches\r\n const user = userExtern\r\n ? getModularInstance(userExtern)\r\n : null;\r\n if (user) {\r\n _assert(user.auth.config.apiKey === this.config.apiKey, this, \"invalid-user-token\" /* AuthErrorCode.INVALID_AUTH */);\r\n }\r\n return this._updateCurrentUser(user && user._clone(this));\r\n }\r\n async _updateCurrentUser(user, skipBeforeStateCallbacks = false) {\r\n if (this._deleted) {\r\n return;\r\n }\r\n if (user) {\r\n _assert(this.tenantId === user.tenantId, this, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\r\n }\r\n if (!skipBeforeStateCallbacks) {\r\n await this.beforeStateQueue.runMiddleware(user);\r\n }\r\n return this.queue(async () => {\r\n await this.directlySetCurrentUser(user);\r\n this.notifyAuthListeners();\r\n });\r\n }\r\n async signOut() {\r\n // Run first, to block _setRedirectUser() if any callbacks fail.\r\n await this.beforeStateQueue.runMiddleware(null);\r\n // Clear the redirect user when signOut is called\r\n if (this.redirectPersistenceManager || this._popupRedirectResolver) {\r\n await this._setRedirectUser(null);\r\n }\r\n // Prevent callbacks from being called again in _updateCurrentUser, as\r\n // they were already called in the first line.\r\n return this._updateCurrentUser(null, /* skipBeforeStateCallbacks */ true);\r\n }\r\n setPersistence(persistence) {\r\n return this.queue(async () => {\r\n await this.assertedPersistence.setPersistence(_getInstance(persistence));\r\n });\r\n }\r\n _getRecaptchaConfig() {\r\n if (this.tenantId == null) {\r\n return this._agentRecaptchaConfig;\r\n }\r\n else {\r\n return this._tenantRecaptchaConfigs[this.tenantId];\r\n }\r\n }\r\n async validatePassword(password) {\r\n if (!this._getPasswordPolicyInternal()) {\r\n await this._updatePasswordPolicy();\r\n }\r\n // Password policy will be defined after fetching.\r\n const passwordPolicy = this._getPasswordPolicyInternal();\r\n // Check that the policy schema version is supported by the SDK.\r\n // TODO: Update this logic to use a max supported policy schema version once we have multiple schema versions.\r\n if (passwordPolicy.schemaVersion !==\r\n this.EXPECTED_PASSWORD_POLICY_SCHEMA_VERSION) {\r\n return Promise.reject(this._errorFactory.create(\"unsupported-password-policy-schema-version\" /* AuthErrorCode.UNSUPPORTED_PASSWORD_POLICY_SCHEMA_VERSION */, {}));\r\n }\r\n return passwordPolicy.validatePassword(password);\r\n }\r\n _getPasswordPolicyInternal() {\r\n if (this.tenantId === null) {\r\n return this._projectPasswordPolicy;\r\n }\r\n else {\r\n return this._tenantPasswordPolicies[this.tenantId];\r\n }\r\n }\r\n async _updatePasswordPolicy() {\r\n const response = await _getPasswordPolicy(this);\r\n const passwordPolicy = new PasswordPolicyImpl(response);\r\n if (this.tenantId === null) {\r\n this._projectPasswordPolicy = passwordPolicy;\r\n }\r\n else {\r\n this._tenantPasswordPolicies[this.tenantId] = passwordPolicy;\r\n }\r\n }\r\n _getPersistence() {\r\n return this.assertedPersistence.persistence.type;\r\n }\r\n _updateErrorMap(errorMap) {\r\n this._errorFactory = new ErrorFactory('auth', 'Firebase', errorMap());\r\n }\r\n onAuthStateChanged(nextOrObserver, error, completed) {\r\n return this.registerStateListener(this.authStateSubscription, nextOrObserver, error, completed);\r\n }\r\n beforeAuthStateChanged(callback, onAbort) {\r\n return this.beforeStateQueue.pushCallback(callback, onAbort);\r\n }\r\n onIdTokenChanged(nextOrObserver, error, completed) {\r\n return this.registerStateListener(this.idTokenSubscription, nextOrObserver, error, completed);\r\n }\r\n authStateReady() {\r\n return new Promise((resolve, reject) => {\r\n if (this.currentUser) {\r\n resolve();\r\n }\r\n else {\r\n const unsubscribe = this.onAuthStateChanged(() => {\r\n unsubscribe();\r\n resolve();\r\n }, reject);\r\n }\r\n });\r\n }\r\n toJSON() {\r\n var _a;\r\n return {\r\n apiKey: this.config.apiKey,\r\n authDomain: this.config.authDomain,\r\n appName: this.name,\r\n currentUser: (_a = this._currentUser) === null || _a === void 0 ? void 0 : _a.toJSON()\r\n };\r\n }\r\n async _setRedirectUser(user, popupRedirectResolver) {\r\n const redirectManager = await this.getOrInitRedirectPersistenceManager(popupRedirectResolver);\r\n return user === null\r\n ? redirectManager.removeCurrentUser()\r\n : redirectManager.setCurrentUser(user);\r\n }\r\n async getOrInitRedirectPersistenceManager(popupRedirectResolver) {\r\n if (!this.redirectPersistenceManager) {\r\n const resolver = (popupRedirectResolver && _getInstance(popupRedirectResolver)) ||\r\n this._popupRedirectResolver;\r\n _assert(resolver, this, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n this.redirectPersistenceManager = await PersistenceUserManager.create(this, [_getInstance(resolver._redirectPersistence)], \"redirectUser\" /* KeyName.REDIRECT_USER */);\r\n this.redirectUser =\r\n await this.redirectPersistenceManager.getCurrentUser();\r\n }\r\n return this.redirectPersistenceManager;\r\n }\r\n async _redirectUserForId(id) {\r\n var _a, _b;\r\n // Make sure we've cleared any pending persistence actions if we're not in\r\n // the initializer\r\n if (this._isInitialized) {\r\n await this.queue(async () => { });\r\n }\r\n if (((_a = this._currentUser) === null || _a === void 0 ? void 0 : _a._redirectEventId) === id) {\r\n return this._currentUser;\r\n }\r\n if (((_b = this.redirectUser) === null || _b === void 0 ? void 0 : _b._redirectEventId) === id) {\r\n return this.redirectUser;\r\n }\r\n return null;\r\n }\r\n async _persistUserIfCurrent(user) {\r\n if (user === this.currentUser) {\r\n return this.queue(async () => this.directlySetCurrentUser(user));\r\n }\r\n }\r\n /** Notifies listeners only if the user is current */\r\n _notifyListenersIfCurrent(user) {\r\n if (user === this.currentUser) {\r\n this.notifyAuthListeners();\r\n }\r\n }\r\n _key() {\r\n return `${this.config.authDomain}:${this.config.apiKey}:${this.name}`;\r\n }\r\n _startProactiveRefresh() {\r\n this.isProactiveRefreshEnabled = true;\r\n if (this.currentUser) {\r\n this._currentUser._startProactiveRefresh();\r\n }\r\n }\r\n _stopProactiveRefresh() {\r\n this.isProactiveRefreshEnabled = false;\r\n if (this.currentUser) {\r\n this._currentUser._stopProactiveRefresh();\r\n }\r\n }\r\n /** Returns the current user cast as the internal type */\r\n get _currentUser() {\r\n return this.currentUser;\r\n }\r\n notifyAuthListeners() {\r\n var _a, _b;\r\n if (!this._isInitialized) {\r\n return;\r\n }\r\n this.idTokenSubscription.next(this.currentUser);\r\n const currentUid = (_b = (_a = this.currentUser) === null || _a === void 0 ? void 0 : _a.uid) !== null && _b !== void 0 ? _b : null;\r\n if (this.lastNotifiedUid !== currentUid) {\r\n this.lastNotifiedUid = currentUid;\r\n this.authStateSubscription.next(this.currentUser);\r\n }\r\n }\r\n registerStateListener(subscription, nextOrObserver, error, completed) {\r\n if (this._deleted) {\r\n return () => { };\r\n }\r\n const cb = typeof nextOrObserver === 'function'\r\n ? nextOrObserver\r\n : nextOrObserver.next.bind(nextOrObserver);\r\n let isUnsubscribed = false;\r\n const promise = this._isInitialized\r\n ? Promise.resolve()\r\n : this._initializationPromise;\r\n _assert(promise, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n // The callback needs to be called asynchronously per the spec.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n promise.then(() => {\r\n if (isUnsubscribed) {\r\n return;\r\n }\r\n cb(this.currentUser);\r\n });\r\n if (typeof nextOrObserver === 'function') {\r\n const unsubscribe = subscription.addObserver(nextOrObserver, error, completed);\r\n return () => {\r\n isUnsubscribed = true;\r\n unsubscribe();\r\n };\r\n }\r\n else {\r\n const unsubscribe = subscription.addObserver(nextOrObserver);\r\n return () => {\r\n isUnsubscribed = true;\r\n unsubscribe();\r\n };\r\n }\r\n }\r\n /**\r\n * Unprotected (from race conditions) method to set the current user. This\r\n * should only be called from within a queued callback. This is necessary\r\n * because the queue shouldn't rely on another queued callback.\r\n */\r\n async directlySetCurrentUser(user) {\r\n if (this.currentUser && this.currentUser !== user) {\r\n this._currentUser._stopProactiveRefresh();\r\n }\r\n if (user && this.isProactiveRefreshEnabled) {\r\n user._startProactiveRefresh();\r\n }\r\n this.currentUser = user;\r\n if (user) {\r\n await this.assertedPersistence.setCurrentUser(user);\r\n }\r\n else {\r\n await this.assertedPersistence.removeCurrentUser();\r\n }\r\n }\r\n queue(action) {\r\n // In case something errors, the callback still should be called in order\r\n // to keep the promise chain alive\r\n this.operations = this.operations.then(action, action);\r\n return this.operations;\r\n }\r\n get assertedPersistence() {\r\n _assert(this.persistenceManager, this, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return this.persistenceManager;\r\n }\r\n _logFramework(framework) {\r\n if (!framework || this.frameworks.includes(framework)) {\r\n return;\r\n }\r\n this.frameworks.push(framework);\r\n // Sort alphabetically so that \"FirebaseCore-web,FirebaseUI-web\" and\r\n // \"FirebaseUI-web,FirebaseCore-web\" aren't viewed as different.\r\n this.frameworks.sort();\r\n this.clientVersion = _getClientVersion(this.config.clientPlatform, this._getFrameworks());\r\n }\r\n _getFrameworks() {\r\n return this.frameworks;\r\n }\r\n async _getAdditionalHeaders() {\r\n var _a;\r\n // Additional headers on every request\r\n const headers = {\r\n [\"X-Client-Version\" /* HttpHeader.X_CLIENT_VERSION */]: this.clientVersion\r\n };\r\n if (this.app.options.appId) {\r\n headers[\"X-Firebase-gmpid\" /* HttpHeader.X_FIREBASE_GMPID */] = this.app.options.appId;\r\n }\r\n // If the heartbeat service exists, add the heartbeat string\r\n const heartbeatsHeader = await ((_a = this.heartbeatServiceProvider\r\n .getImmediate({\r\n optional: true\r\n })) === null || _a === void 0 ? void 0 : _a.getHeartbeatsHeader());\r\n if (heartbeatsHeader) {\r\n headers[\"X-Firebase-Client\" /* HttpHeader.X_FIREBASE_CLIENT */] = heartbeatsHeader;\r\n }\r\n // If the App Check service exists, add the App Check token in the headers\r\n const appCheckToken = await this._getAppCheckToken();\r\n if (appCheckToken) {\r\n headers[\"X-Firebase-AppCheck\" /* HttpHeader.X_FIREBASE_APP_CHECK */] = appCheckToken;\r\n }\r\n return headers;\r\n }\r\n async _getAppCheckToken() {\r\n var _a;\r\n const appCheckTokenResult = await ((_a = this.appCheckServiceProvider\r\n .getImmediate({ optional: true })) === null || _a === void 0 ? void 0 : _a.getToken());\r\n if (appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.error) {\r\n // Context: appCheck.getToken() will never throw even if an error happened.\r\n // In the error case, a dummy token will be returned along with an error field describing\r\n // the error. In general, we shouldn't care about the error condition and just use\r\n // the token (actual or dummy) to send requests.\r\n _logWarn(`Error while retrieving App Check token: ${appCheckTokenResult.error}`);\r\n }\r\n return appCheckTokenResult === null || appCheckTokenResult === void 0 ? void 0 : appCheckTokenResult.token;\r\n }\r\n}\r\n/**\r\n * Method to be used to cast down to our private implmentation of Auth.\r\n * It will also handle unwrapping from the compat type if necessary\r\n *\r\n * @param auth Auth object passed in from developer\r\n */\r\nfunction _castAuth(auth) {\r\n return getModularInstance(auth);\r\n}\r\n/** Helper class to wrap subscriber logic */\r\nclass Subscription {\r\n constructor(auth) {\r\n this.auth = auth;\r\n this.observer = null;\r\n this.addObserver = createSubscribe(observer => (this.observer = observer));\r\n }\r\n get next() {\r\n _assert(this.observer, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return this.observer.next.bind(this.observer);\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction getScriptParentElement() {\r\n var _a, _b;\r\n return (_b = (_a = document.getElementsByTagName('head')) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : document;\r\n}\r\nfunction _loadJS(url) {\r\n // TODO: consider adding timeout support & cancellation\r\n return new Promise((resolve, reject) => {\r\n const el = document.createElement('script');\r\n el.setAttribute('src', url);\r\n el.onload = resolve;\r\n el.onerror = e => {\r\n const error = _createError(\"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n error.customData = e;\r\n reject(error);\r\n };\r\n el.type = 'text/javascript';\r\n el.charset = 'UTF-8';\r\n getScriptParentElement().appendChild(el);\r\n });\r\n}\r\nfunction _generateCallbackName(prefix) {\r\n return `__${prefix}${Math.floor(Math.random() * 1000000)}`;\r\n}\n\n/* eslint-disable @typescript-eslint/no-require-imports */\r\nconst RECAPTCHA_ENTERPRISE_URL = 'https://www.google.com/recaptcha/enterprise.js?render=';\r\nconst RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = 'recaptcha-enterprise';\r\nconst FAKE_TOKEN = 'NO_RECAPTCHA';\r\nclass RecaptchaEnterpriseVerifier {\r\n /**\r\n *\r\n * @param authExtern - The corresponding Firebase {@link Auth} instance.\r\n *\r\n */\r\n constructor(authExtern) {\r\n /**\r\n * Identifies the type of application verifier (e.g. \"recaptcha-enterprise\").\r\n */\r\n this.type = RECAPTCHA_ENTERPRISE_VERIFIER_TYPE;\r\n this.auth = _castAuth(authExtern);\r\n }\r\n /**\r\n * Executes the verification process.\r\n *\r\n * @returns A Promise for a token that can be used to assert the validity of a request.\r\n */\r\n async verify(action = 'verify', forceRefresh = false) {\r\n async function retrieveSiteKey(auth) {\r\n if (!forceRefresh) {\r\n if (auth.tenantId == null && auth._agentRecaptchaConfig != null) {\r\n return auth._agentRecaptchaConfig.siteKey;\r\n }\r\n if (auth.tenantId != null &&\r\n auth._tenantRecaptchaConfigs[auth.tenantId] !== undefined) {\r\n return auth._tenantRecaptchaConfigs[auth.tenantId].siteKey;\r\n }\r\n }\r\n return new Promise(async (resolve, reject) => {\r\n getRecaptchaConfig(auth, {\r\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */,\r\n version: \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\r\n })\r\n .then(response => {\r\n if (response.recaptchaKey === undefined) {\r\n reject(new Error('recaptcha Enterprise site key undefined'));\r\n }\r\n else {\r\n const config = new RecaptchaConfig(response);\r\n if (auth.tenantId == null) {\r\n auth._agentRecaptchaConfig = config;\r\n }\r\n else {\r\n auth._tenantRecaptchaConfigs[auth.tenantId] = config;\r\n }\r\n return resolve(config.siteKey);\r\n }\r\n })\r\n .catch(error => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n function retrieveRecaptchaToken(siteKey, resolve, reject) {\r\n const grecaptcha = window.grecaptcha;\r\n if (isEnterprise(grecaptcha)) {\r\n grecaptcha.enterprise.ready(() => {\r\n grecaptcha.enterprise\r\n .execute(siteKey, { action })\r\n .then(token => {\r\n resolve(token);\r\n })\r\n .catch(() => {\r\n resolve(FAKE_TOKEN);\r\n });\r\n });\r\n }\r\n else {\r\n reject(Error('No reCAPTCHA enterprise script loaded.'));\r\n }\r\n }\r\n return new Promise((resolve, reject) => {\r\n retrieveSiteKey(this.auth)\r\n .then(siteKey => {\r\n if (!forceRefresh && isEnterprise(window.grecaptcha)) {\r\n retrieveRecaptchaToken(siteKey, resolve, reject);\r\n }\r\n else {\r\n if (typeof window === 'undefined') {\r\n reject(new Error('RecaptchaVerifier is only supported in browser'));\r\n return;\r\n }\r\n _loadJS(RECAPTCHA_ENTERPRISE_URL + siteKey)\r\n .then(() => {\r\n retrieveRecaptchaToken(siteKey, resolve, reject);\r\n })\r\n .catch(error => {\r\n reject(error);\r\n });\r\n }\r\n })\r\n .catch(error => {\r\n reject(error);\r\n });\r\n });\r\n }\r\n}\r\nasync function injectRecaptchaFields(auth, request, action, captchaResp = false) {\r\n const verifier = new RecaptchaEnterpriseVerifier(auth);\r\n let captchaResponse;\r\n try {\r\n captchaResponse = await verifier.verify(action);\r\n }\r\n catch (error) {\r\n captchaResponse = await verifier.verify(action, true);\r\n }\r\n const newRequest = Object.assign({}, request);\r\n if (!captchaResp) {\r\n Object.assign(newRequest, { captchaResponse });\r\n }\r\n else {\r\n Object.assign(newRequest, { 'captchaResp': captchaResponse });\r\n }\r\n Object.assign(newRequest, { 'clientType': \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */ });\r\n Object.assign(newRequest, {\r\n 'recaptchaVersion': \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\r\n });\r\n return newRequest;\r\n}\r\nasync function _initializeRecaptchaConfig(auth) {\r\n const authInternal = _castAuth(auth);\r\n const response = await getRecaptchaConfig(authInternal, {\r\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */,\r\n version: \"RECAPTCHA_ENTERPRISE\" /* RecaptchaVersion.ENTERPRISE */\r\n });\r\n const config = new RecaptchaConfig(response);\r\n if (authInternal.tenantId == null) {\r\n authInternal._agentRecaptchaConfig = config;\r\n }\r\n else {\r\n authInternal._tenantRecaptchaConfigs[authInternal.tenantId] = config;\r\n }\r\n if (config.emailPasswordEnabled) {\r\n const verifier = new RecaptchaEnterpriseVerifier(authInternal);\r\n void verifier.verify();\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Initializes an {@link Auth} instance with fine-grained control over\r\n * {@link Dependencies}.\r\n *\r\n * @remarks\r\n *\r\n * This function allows more control over the {@link Auth} instance than\r\n * {@link getAuth}. `getAuth` uses platform-specific defaults to supply\r\n * the {@link Dependencies}. In general, `getAuth` is the easiest way to\r\n * initialize Auth and works for most use cases. Use `initializeAuth` if you\r\n * need control over which persistence layer is used, or to minimize bundle\r\n * size if you're not using either `signInWithPopup` or `signInWithRedirect`.\r\n *\r\n * For example, if your app only uses anonymous accounts and you only want\r\n * accounts saved for the current session, initialize `Auth` with:\r\n *\r\n * ```js\r\n * const auth = initializeAuth(app, {\r\n * persistence: browserSessionPersistence,\r\n * popupRedirectResolver: undefined,\r\n * });\r\n * ```\r\n *\r\n * @public\r\n */\r\nfunction initializeAuth(app, deps) {\r\n const provider = _getProvider(app, 'auth');\r\n if (provider.isInitialized()) {\r\n const auth = provider.getImmediate();\r\n const initialOptions = provider.getOptions();\r\n if (deepEqual(initialOptions, deps !== null && deps !== void 0 ? deps : {})) {\r\n return auth;\r\n }\r\n else {\r\n _fail(auth, \"already-initialized\" /* AuthErrorCode.ALREADY_INITIALIZED */);\r\n }\r\n }\r\n const auth = provider.initialize({ options: deps });\r\n return auth;\r\n}\r\nfunction _initializeAuthInstance(auth, deps) {\r\n const persistence = (deps === null || deps === void 0 ? void 0 : deps.persistence) || [];\r\n const hierarchy = (Array.isArray(persistence) ? persistence : [persistence]).map(_getInstance);\r\n if (deps === null || deps === void 0 ? void 0 : deps.errorMap) {\r\n auth._updateErrorMap(deps.errorMap);\r\n }\r\n // This promise is intended to float; auth initialization happens in the\r\n // background, meanwhile the auth object may be used by the app.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n auth._initializeWithPersistence(hierarchy, deps === null || deps === void 0 ? void 0 : deps.popupRedirectResolver);\r\n}\n\n/**\r\n * Changes the {@link Auth} instance to communicate with the Firebase Auth Emulator, instead of production\r\n * Firebase Auth services.\r\n *\r\n * @remarks\r\n * This must be called synchronously immediately following the first call to\r\n * {@link initializeAuth}. Do not use with production credentials as emulator\r\n * traffic is not encrypted.\r\n *\r\n *\r\n * @example\r\n * ```javascript\r\n * connectAuthEmulator(auth, 'http://127.0.0.1:9099', { disableWarnings: true });\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param url - The URL at which the emulator is running (eg, 'http://localhost:9099').\r\n * @param options - Optional. `options.disableWarnings` defaults to `false`. Set it to\r\n * `true` to disable the warning banner attached to the DOM.\r\n *\r\n * @public\r\n */\r\nfunction connectAuthEmulator(auth, url, options) {\r\n const authInternal = _castAuth(auth);\r\n _assert(authInternal._canInitEmulator, authInternal, \"emulator-config-failed\" /* AuthErrorCode.EMULATOR_CONFIG_FAILED */);\r\n _assert(/^https?:\\/\\//.test(url), authInternal, \"invalid-emulator-scheme\" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */);\r\n const disableWarnings = !!(options === null || options === void 0 ? void 0 : options.disableWarnings);\r\n const protocol = extractProtocol(url);\r\n const { host, port } = extractHostAndPort(url);\r\n const portStr = port === null ? '' : `:${port}`;\r\n // Always replace path with \"/\" (even if input url had no path at all, or had a different one).\r\n authInternal.config.emulator = { url: `${protocol}//${host}${portStr}/` };\r\n authInternal.settings.appVerificationDisabledForTesting = true;\r\n authInternal.emulatorConfig = Object.freeze({\r\n host,\r\n port,\r\n protocol: protocol.replace(':', ''),\r\n options: Object.freeze({ disableWarnings })\r\n });\r\n if (!disableWarnings) {\r\n emitEmulatorWarning();\r\n }\r\n}\r\nfunction extractProtocol(url) {\r\n const protocolEnd = url.indexOf(':');\r\n return protocolEnd < 0 ? '' : url.substr(0, protocolEnd + 1);\r\n}\r\nfunction extractHostAndPort(url) {\r\n const protocol = extractProtocol(url);\r\n const authority = /(\\/\\/)?([^?#/]+)/.exec(url.substr(protocol.length)); // Between // and /, ? or #.\r\n if (!authority) {\r\n return { host: '', port: null };\r\n }\r\n const hostAndPort = authority[2].split('@').pop() || ''; // Strip out \"username:password@\".\r\n const bracketedIPv6 = /^(\\[[^\\]]+\\])(:|$)/.exec(hostAndPort);\r\n if (bracketedIPv6) {\r\n const host = bracketedIPv6[1];\r\n return { host, port: parsePort(hostAndPort.substr(host.length + 1)) };\r\n }\r\n else {\r\n const [host, port] = hostAndPort.split(':');\r\n return { host, port: parsePort(port) };\r\n }\r\n}\r\nfunction parsePort(portStr) {\r\n if (!portStr) {\r\n return null;\r\n }\r\n const port = Number(portStr);\r\n if (isNaN(port)) {\r\n return null;\r\n }\r\n return port;\r\n}\r\nfunction emitEmulatorWarning() {\r\n function attachBanner() {\r\n const el = document.createElement('p');\r\n const sty = el.style;\r\n el.innerText =\r\n 'Running in emulator mode. Do not use with production credentials.';\r\n sty.position = 'fixed';\r\n sty.width = '100%';\r\n sty.backgroundColor = '#ffffff';\r\n sty.border = '.1em solid #000000';\r\n sty.color = '#b50000';\r\n sty.bottom = '0px';\r\n sty.left = '0px';\r\n sty.margin = '0px';\r\n sty.zIndex = '10000';\r\n sty.textAlign = 'center';\r\n el.classList.add('firebase-emulator-warning');\r\n document.body.appendChild(el);\r\n }\r\n if (typeof console !== 'undefined' && typeof console.info === 'function') {\r\n console.info('WARNING: You are using the Auth Emulator,' +\r\n ' which is intended for local testing only. Do not use with' +\r\n ' production credentials.');\r\n }\r\n if (typeof window !== 'undefined' && typeof document !== 'undefined') {\r\n if (document.readyState === 'loading') {\r\n window.addEventListener('DOMContentLoaded', attachBanner);\r\n }\r\n else {\r\n attachBanner();\r\n }\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Interface that represents the credentials returned by an {@link AuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\r\nclass AuthCredential {\r\n /** @internal */\r\n constructor(\r\n /**\r\n * The authentication provider ID for the credential.\r\n *\r\n * @remarks\r\n * For example, 'facebook.com', or 'google.com'.\r\n */\r\n providerId, \r\n /**\r\n * The authentication sign in method for the credential.\r\n *\r\n * @remarks\r\n * For example, {@link SignInMethod}.EMAIL_PASSWORD, or\r\n * {@link SignInMethod}.EMAIL_LINK. This corresponds to the sign-in method\r\n * identifier as returned in {@link fetchSignInMethodsForEmail}.\r\n */\r\n signInMethod) {\r\n this.providerId = providerId;\r\n this.signInMethod = signInMethod;\r\n }\r\n /**\r\n * Returns a JSON-serializable representation of this object.\r\n *\r\n * @returns a JSON-serializable representation of this object.\r\n */\r\n toJSON() {\r\n return debugFail('not implemented');\r\n }\r\n /** @internal */\r\n _getIdTokenResponse(_auth) {\r\n return debugFail('not implemented');\r\n }\r\n /** @internal */\r\n _linkToIdToken(_auth, _idToken) {\r\n return debugFail('not implemented');\r\n }\r\n /** @internal */\r\n _getReauthenticationResolver(_auth) {\r\n return debugFail('not implemented');\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function resetPassword(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:resetPassword\" /* Endpoint.RESET_PASSWORD */, _addTidIfNecessary(auth, request));\r\n}\r\nasync function updateEmailPassword(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\r\n}\r\nasync function applyActionCode$1(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function signInWithPassword(auth, request) {\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPassword\" /* Endpoint.SIGN_IN_WITH_PASSWORD */, _addTidIfNecessary(auth, request));\r\n}\r\nasync function sendOobCode(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendOobCode\" /* Endpoint.SEND_OOB_CODE */, _addTidIfNecessary(auth, request));\r\n}\r\nasync function sendEmailVerification$1(auth, request) {\r\n return sendOobCode(auth, request);\r\n}\r\nasync function sendPasswordResetEmail$1(auth, request) {\r\n return sendOobCode(auth, request);\r\n}\r\nasync function sendSignInLinkToEmail$1(auth, request) {\r\n return sendOobCode(auth, request);\r\n}\r\nasync function verifyAndChangeEmail(auth, request) {\r\n return sendOobCode(auth, request);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function signInWithEmailLink$1(auth, request) {\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\r\n}\r\nasync function signInWithEmailLinkForLinking(auth, request) {\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithEmailLink\" /* Endpoint.SIGN_IN_WITH_EMAIL_LINK */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Interface that represents the credentials returned by {@link EmailAuthProvider} for\r\n * {@link ProviderId}.PASSWORD\r\n *\r\n * @remarks\r\n * Covers both {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @public\r\n */\r\nclass EmailAuthCredential extends AuthCredential {\r\n /** @internal */\r\n constructor(\r\n /** @internal */\r\n _email, \r\n /** @internal */\r\n _password, signInMethod, \r\n /** @internal */\r\n _tenantId = null) {\r\n super(\"password\" /* ProviderId.PASSWORD */, signInMethod);\r\n this._email = _email;\r\n this._password = _password;\r\n this._tenantId = _tenantId;\r\n }\r\n /** @internal */\r\n static _fromEmailAndPassword(email, password) {\r\n return new EmailAuthCredential(email, password, \"password\" /* SignInMethod.EMAIL_PASSWORD */);\r\n }\r\n /** @internal */\r\n static _fromEmailAndCode(email, oobCode, tenantId = null) {\r\n return new EmailAuthCredential(email, oobCode, \"emailLink\" /* SignInMethod.EMAIL_LINK */, tenantId);\r\n }\r\n /** {@inheritdoc AuthCredential.toJSON} */\r\n toJSON() {\r\n return {\r\n email: this._email,\r\n password: this._password,\r\n signInMethod: this.signInMethod,\r\n tenantId: this._tenantId\r\n };\r\n }\r\n /**\r\n * Static method to deserialize a JSON representation of an object into an {@link AuthCredential}.\r\n *\r\n * @param json - Either `object` or the stringified representation of the object. When string is\r\n * provided, `JSON.parse` would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\r\n static fromJSON(json) {\r\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\r\n if ((obj === null || obj === void 0 ? void 0 : obj.email) && (obj === null || obj === void 0 ? void 0 : obj.password)) {\r\n if (obj.signInMethod === \"password\" /* SignInMethod.EMAIL_PASSWORD */) {\r\n return this._fromEmailAndPassword(obj.email, obj.password);\r\n }\r\n else if (obj.signInMethod === \"emailLink\" /* SignInMethod.EMAIL_LINK */) {\r\n return this._fromEmailAndCode(obj.email, obj.password, obj.tenantId);\r\n }\r\n }\r\n return null;\r\n }\r\n /** @internal */\r\n async _getIdTokenResponse(auth) {\r\n var _a;\r\n switch (this.signInMethod) {\r\n case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\r\n const request = {\r\n returnSecureToken: true,\r\n email: this._email,\r\n password: this._password,\r\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\r\n };\r\n if ((_a = auth._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.emailPasswordEnabled) {\r\n const requestWithRecaptcha = await injectRecaptchaFields(auth, request, \"signInWithPassword\" /* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */);\r\n return signInWithPassword(auth, requestWithRecaptcha);\r\n }\r\n else {\r\n return signInWithPassword(auth, request).catch(async (error) => {\r\n if (error.code === `auth/${\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}`) {\r\n console.log('Sign-in with email address and password is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.');\r\n const requestWithRecaptcha = await injectRecaptchaFields(auth, request, \"signInWithPassword\" /* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */);\r\n return signInWithPassword(auth, requestWithRecaptcha);\r\n }\r\n else {\r\n return Promise.reject(error);\r\n }\r\n });\r\n }\r\n case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\r\n return signInWithEmailLink$1(auth, {\r\n email: this._email,\r\n oobCode: this._password\r\n });\r\n default:\r\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }\r\n }\r\n /** @internal */\r\n async _linkToIdToken(auth, idToken) {\r\n switch (this.signInMethod) {\r\n case \"password\" /* SignInMethod.EMAIL_PASSWORD */:\r\n return updateEmailPassword(auth, {\r\n idToken,\r\n returnSecureToken: true,\r\n email: this._email,\r\n password: this._password\r\n });\r\n case \"emailLink\" /* SignInMethod.EMAIL_LINK */:\r\n return signInWithEmailLinkForLinking(auth, {\r\n idToken,\r\n email: this._email,\r\n oobCode: this._password\r\n });\r\n default:\r\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }\r\n }\r\n /** @internal */\r\n _getReauthenticationResolver(auth) {\r\n return this._getIdTokenResponse(auth);\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function signInWithIdp(auth, request) {\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithIdp\" /* Endpoint.SIGN_IN_WITH_IDP */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst IDP_REQUEST_URI$1 = 'http://localhost';\r\n/**\r\n * Represents the OAuth credentials returned by an {@link OAuthProvider}.\r\n *\r\n * @remarks\r\n * Implementations specify the details about each auth provider's credential requirements.\r\n *\r\n * @public\r\n */\r\nclass OAuthCredential extends AuthCredential {\r\n constructor() {\r\n super(...arguments);\r\n this.pendingToken = null;\r\n }\r\n /** @internal */\r\n static _fromParams(params) {\r\n const cred = new OAuthCredential(params.providerId, params.signInMethod);\r\n if (params.idToken || params.accessToken) {\r\n // OAuth 2 and either ID token or access token.\r\n if (params.idToken) {\r\n cred.idToken = params.idToken;\r\n }\r\n if (params.accessToken) {\r\n cred.accessToken = params.accessToken;\r\n }\r\n // Add nonce if available and no pendingToken is present.\r\n if (params.nonce && !params.pendingToken) {\r\n cred.nonce = params.nonce;\r\n }\r\n if (params.pendingToken) {\r\n cred.pendingToken = params.pendingToken;\r\n }\r\n }\r\n else if (params.oauthToken && params.oauthTokenSecret) {\r\n // OAuth 1 and OAuth token with token secret\r\n cred.accessToken = params.oauthToken;\r\n cred.secret = params.oauthTokenSecret;\r\n }\r\n else {\r\n _fail(\"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n }\r\n return cred;\r\n }\r\n /** {@inheritdoc AuthCredential.toJSON} */\r\n toJSON() {\r\n return {\r\n idToken: this.idToken,\r\n accessToken: this.accessToken,\r\n secret: this.secret,\r\n nonce: this.nonce,\r\n pendingToken: this.pendingToken,\r\n providerId: this.providerId,\r\n signInMethod: this.signInMethod\r\n };\r\n }\r\n /**\r\n * Static method to deserialize a JSON representation of an object into an\r\n * {@link AuthCredential}.\r\n *\r\n * @param json - Input can be either Object or the stringified representation of the object.\r\n * When string is provided, JSON.parse would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\r\n static fromJSON(json) {\r\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\r\n const { providerId, signInMethod } = obj, rest = __rest(obj, [\"providerId\", \"signInMethod\"]);\r\n if (!providerId || !signInMethod) {\r\n return null;\r\n }\r\n const cred = new OAuthCredential(providerId, signInMethod);\r\n cred.idToken = rest.idToken || undefined;\r\n cred.accessToken = rest.accessToken || undefined;\r\n cred.secret = rest.secret;\r\n cred.nonce = rest.nonce;\r\n cred.pendingToken = rest.pendingToken || null;\r\n return cred;\r\n }\r\n /** @internal */\r\n _getIdTokenResponse(auth) {\r\n const request = this.buildRequest();\r\n return signInWithIdp(auth, request);\r\n }\r\n /** @internal */\r\n _linkToIdToken(auth, idToken) {\r\n const request = this.buildRequest();\r\n request.idToken = idToken;\r\n return signInWithIdp(auth, request);\r\n }\r\n /** @internal */\r\n _getReauthenticationResolver(auth) {\r\n const request = this.buildRequest();\r\n request.autoCreate = false;\r\n return signInWithIdp(auth, request);\r\n }\r\n buildRequest() {\r\n const request = {\r\n requestUri: IDP_REQUEST_URI$1,\r\n returnSecureToken: true\r\n };\r\n if (this.pendingToken) {\r\n request.pendingToken = this.pendingToken;\r\n }\r\n else {\r\n const postBody = {};\r\n if (this.idToken) {\r\n postBody['id_token'] = this.idToken;\r\n }\r\n if (this.accessToken) {\r\n postBody['access_token'] = this.accessToken;\r\n }\r\n if (this.secret) {\r\n postBody['oauth_token_secret'] = this.secret;\r\n }\r\n postBody['providerId'] = this.providerId;\r\n if (this.nonce && !this.pendingToken) {\r\n postBody['nonce'] = this.nonce;\r\n }\r\n request.postBody = querystring(postBody);\r\n }\r\n return request;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function sendPhoneVerificationCode(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:sendVerificationCode\" /* Endpoint.SEND_VERIFICATION_CODE */, _addTidIfNecessary(auth, request));\r\n}\r\nasync function signInWithPhoneNumber$1(auth, request) {\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\r\n}\r\nasync function linkWithPhoneNumber$1(auth, request) {\r\n const response = await _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, request));\r\n if (response.temporaryProof) {\r\n throw _makeTaggedError(auth, \"account-exists-with-different-credential\" /* AuthErrorCode.NEED_CONFIRMATION */, response);\r\n }\r\n return response;\r\n}\r\nconst VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_ = {\r\n [\"USER_NOT_FOUND\" /* ServerError.USER_NOT_FOUND */]: \"user-not-found\" /* AuthErrorCode.USER_DELETED */\r\n};\r\nasync function verifyPhoneNumberForExisting(auth, request) {\r\n const apiRequest = Object.assign(Object.assign({}, request), { operation: 'REAUTH' });\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithPhoneNumber\" /* Endpoint.SIGN_IN_WITH_PHONE_NUMBER */, _addTidIfNecessary(auth, apiRequest), VERIFY_PHONE_NUMBER_FOR_EXISTING_ERROR_MAP_);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Represents the credentials returned by {@link PhoneAuthProvider}.\r\n *\r\n * @public\r\n */\r\nclass PhoneAuthCredential extends AuthCredential {\r\n constructor(params) {\r\n super(\"phone\" /* ProviderId.PHONE */, \"phone\" /* SignInMethod.PHONE */);\r\n this.params = params;\r\n }\r\n /** @internal */\r\n static _fromVerification(verificationId, verificationCode) {\r\n return new PhoneAuthCredential({ verificationId, verificationCode });\r\n }\r\n /** @internal */\r\n static _fromTokenResponse(phoneNumber, temporaryProof) {\r\n return new PhoneAuthCredential({ phoneNumber, temporaryProof });\r\n }\r\n /** @internal */\r\n _getIdTokenResponse(auth) {\r\n return signInWithPhoneNumber$1(auth, this._makeVerificationRequest());\r\n }\r\n /** @internal */\r\n _linkToIdToken(auth, idToken) {\r\n return linkWithPhoneNumber$1(auth, Object.assign({ idToken }, this._makeVerificationRequest()));\r\n }\r\n /** @internal */\r\n _getReauthenticationResolver(auth) {\r\n return verifyPhoneNumberForExisting(auth, this._makeVerificationRequest());\r\n }\r\n /** @internal */\r\n _makeVerificationRequest() {\r\n const { temporaryProof, phoneNumber, verificationId, verificationCode } = this.params;\r\n if (temporaryProof && phoneNumber) {\r\n return { temporaryProof, phoneNumber };\r\n }\r\n return {\r\n sessionInfo: verificationId,\r\n code: verificationCode\r\n };\r\n }\r\n /** {@inheritdoc AuthCredential.toJSON} */\r\n toJSON() {\r\n const obj = {\r\n providerId: this.providerId\r\n };\r\n if (this.params.phoneNumber) {\r\n obj.phoneNumber = this.params.phoneNumber;\r\n }\r\n if (this.params.temporaryProof) {\r\n obj.temporaryProof = this.params.temporaryProof;\r\n }\r\n if (this.params.verificationCode) {\r\n obj.verificationCode = this.params.verificationCode;\r\n }\r\n if (this.params.verificationId) {\r\n obj.verificationId = this.params.verificationId;\r\n }\r\n return obj;\r\n }\r\n /** Generates a phone credential based on a plain object or a JSON string. */\r\n static fromJSON(json) {\r\n if (typeof json === 'string') {\r\n json = JSON.parse(json);\r\n }\r\n const { verificationId, verificationCode, phoneNumber, temporaryProof } = json;\r\n if (!verificationCode &&\r\n !verificationId &&\r\n !phoneNumber &&\r\n !temporaryProof) {\r\n return null;\r\n }\r\n return new PhoneAuthCredential({\r\n verificationId,\r\n verificationCode,\r\n phoneNumber,\r\n temporaryProof\r\n });\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Maps the mode string in action code URL to Action Code Info operation.\r\n *\r\n * @param mode\r\n */\r\nfunction parseMode(mode) {\r\n switch (mode) {\r\n case 'recoverEmail':\r\n return \"RECOVER_EMAIL\" /* ActionCodeOperation.RECOVER_EMAIL */;\r\n case 'resetPassword':\r\n return \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */;\r\n case 'signIn':\r\n return \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\r\n case 'verifyEmail':\r\n return \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */;\r\n case 'verifyAndChangeEmail':\r\n return \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */;\r\n case 'revertSecondFactorAddition':\r\n return \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */;\r\n default:\r\n return null;\r\n }\r\n}\r\n/**\r\n * Helper to parse FDL links\r\n *\r\n * @param url\r\n */\r\nfunction parseDeepLink(url) {\r\n const link = querystringDecode(extractQuerystring(url))['link'];\r\n // Double link case (automatic redirect).\r\n const doubleDeepLink = link\r\n ? querystringDecode(extractQuerystring(link))['deep_link_id']\r\n : null;\r\n // iOS custom scheme links.\r\n const iOSDeepLink = querystringDecode(extractQuerystring(url))['deep_link_id'];\r\n const iOSDoubleDeepLink = iOSDeepLink\r\n ? querystringDecode(extractQuerystring(iOSDeepLink))['link']\r\n : null;\r\n return iOSDoubleDeepLink || iOSDeepLink || doubleDeepLink || link || url;\r\n}\r\n/**\r\n * A utility class to parse email action URLs such as password reset, email verification,\r\n * email link sign in, etc.\r\n *\r\n * @public\r\n */\r\nclass ActionCodeURL {\r\n /**\r\n * @param actionLink - The link from which to extract the URL.\r\n * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n *\r\n * @internal\r\n */\r\n constructor(actionLink) {\r\n var _a, _b, _c, _d, _e, _f;\r\n const searchParams = querystringDecode(extractQuerystring(actionLink));\r\n const apiKey = (_a = searchParams[\"apiKey\" /* QueryField.API_KEY */]) !== null && _a !== void 0 ? _a : null;\r\n const code = (_b = searchParams[\"oobCode\" /* QueryField.CODE */]) !== null && _b !== void 0 ? _b : null;\r\n const operation = parseMode((_c = searchParams[\"mode\" /* QueryField.MODE */]) !== null && _c !== void 0 ? _c : null);\r\n // Validate API key, code and mode.\r\n _assert(apiKey && code && operation, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n this.apiKey = apiKey;\r\n this.operation = operation;\r\n this.code = code;\r\n this.continueUrl = (_d = searchParams[\"continueUrl\" /* QueryField.CONTINUE_URL */]) !== null && _d !== void 0 ? _d : null;\r\n this.languageCode = (_e = searchParams[\"languageCode\" /* QueryField.LANGUAGE_CODE */]) !== null && _e !== void 0 ? _e : null;\r\n this.tenantId = (_f = searchParams[\"tenantId\" /* QueryField.TENANT_ID */]) !== null && _f !== void 0 ? _f : null;\r\n }\r\n /**\r\n * Parses the email action link string and returns an {@link ActionCodeURL} if the link is valid,\r\n * otherwise returns null.\r\n *\r\n * @param link - The email action link string.\r\n * @returns The {@link ActionCodeURL} object, or null if the link is invalid.\r\n *\r\n * @public\r\n */\r\n static parseLink(link) {\r\n const actionLink = parseDeepLink(link);\r\n try {\r\n return new ActionCodeURL(actionLink);\r\n }\r\n catch (_a) {\r\n return null;\r\n }\r\n }\r\n}\r\n/**\r\n * Parses the email action link string and returns an {@link ActionCodeURL} if\r\n * the link is valid, otherwise returns null.\r\n *\r\n * @public\r\n */\r\nfunction parseActionCodeURL(link) {\r\n return ActionCodeURL.parseLink(link);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for generating {@link EmailAuthCredential}.\r\n *\r\n * @public\r\n */\r\nclass EmailAuthProvider {\r\n constructor() {\r\n /**\r\n * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n */\r\n this.providerId = EmailAuthProvider.PROVIDER_ID;\r\n }\r\n /**\r\n * Initialize an {@link AuthCredential} using an email and password.\r\n *\r\n * @example\r\n * ```javascript\r\n * const authCredential = EmailAuthProvider.credential(email, password);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * const userCredential = await signInWithEmailAndPassword(auth, email, password);\r\n * ```\r\n *\r\n * @param email - Email address.\r\n * @param password - User account password.\r\n * @returns The auth provider credential.\r\n */\r\n static credential(email, password) {\r\n return EmailAuthCredential._fromEmailAndPassword(email, password);\r\n }\r\n /**\r\n * Initialize an {@link AuthCredential} using an email and an email link after a sign in with\r\n * email link operation.\r\n *\r\n * @example\r\n * ```javascript\r\n * const authCredential = EmailAuthProvider.credentialWithLink(auth, email, emailLink);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * await sendSignInLinkToEmail(auth, email);\r\n * // Obtain emailLink from user.\r\n * const userCredential = await signInWithEmailLink(auth, email, emailLink);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance used to verify the link.\r\n * @param email - Email address.\r\n * @param emailLink - Sign-in email link.\r\n * @returns - The auth provider credential.\r\n */\r\n static credentialWithLink(email, emailLink) {\r\n const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\r\n _assert(actionCodeUrl, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n return EmailAuthCredential._fromEmailAndCode(email, actionCodeUrl.code, actionCodeUrl.tenantId);\r\n }\r\n}\r\n/**\r\n * Always set to {@link ProviderId}.PASSWORD, even for email link.\r\n */\r\nEmailAuthProvider.PROVIDER_ID = \"password\" /* ProviderId.PASSWORD */;\r\n/**\r\n * Always set to {@link SignInMethod}.EMAIL_PASSWORD.\r\n */\r\nEmailAuthProvider.EMAIL_PASSWORD_SIGN_IN_METHOD = \"password\" /* SignInMethod.EMAIL_PASSWORD */;\r\n/**\r\n * Always set to {@link SignInMethod}.EMAIL_LINK.\r\n */\r\nEmailAuthProvider.EMAIL_LINK_SIGN_IN_METHOD = \"emailLink\" /* SignInMethod.EMAIL_LINK */;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The base class for all Federated providers (OAuth (including OIDC), SAML).\r\n *\r\n * This class is not meant to be instantiated directly.\r\n *\r\n * @public\r\n */\r\nclass FederatedAuthProvider {\r\n /**\r\n * Constructor for generic OAuth providers.\r\n *\r\n * @param providerId - Provider for which credentials should be generated.\r\n */\r\n constructor(providerId) {\r\n this.providerId = providerId;\r\n /** @internal */\r\n this.defaultLanguageCode = null;\r\n /** @internal */\r\n this.customParameters = {};\r\n }\r\n /**\r\n * Set the language gode.\r\n *\r\n * @param languageCode - language code\r\n */\r\n setDefaultLanguage(languageCode) {\r\n this.defaultLanguageCode = languageCode;\r\n }\r\n /**\r\n * Sets the OAuth custom parameters to pass in an OAuth request for popup and redirect sign-in\r\n * operations.\r\n *\r\n * @remarks\r\n * For a detailed list, check the reserved required OAuth 2.0 parameters such as `client_id`,\r\n * `redirect_uri`, `scope`, `response_type`, and `state` are not allowed and will be ignored.\r\n *\r\n * @param customOAuthParameters - The custom OAuth parameters to pass in the OAuth request.\r\n */\r\n setCustomParameters(customOAuthParameters) {\r\n this.customParameters = customOAuthParameters;\r\n return this;\r\n }\r\n /**\r\n * Retrieve the current list of {@link CustomParameters}.\r\n */\r\n getCustomParameters() {\r\n return this.customParameters;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Common code to all OAuth providers. This is separate from the\r\n * {@link OAuthProvider} so that child providers (like\r\n * {@link GoogleAuthProvider}) don't inherit the `credential` instance method.\r\n * Instead, they rely on a static `credential` method.\r\n */\r\nclass BaseOAuthProvider extends FederatedAuthProvider {\r\n constructor() {\r\n super(...arguments);\r\n /** @internal */\r\n this.scopes = [];\r\n }\r\n /**\r\n * Add an OAuth scope to the credential.\r\n *\r\n * @param scope - Provider OAuth scope to add.\r\n */\r\n addScope(scope) {\r\n // If not already added, add scope to list.\r\n if (!this.scopes.includes(scope)) {\r\n this.scopes.push(scope);\r\n }\r\n return this;\r\n }\r\n /**\r\n * Retrieve the current list of OAuth scopes.\r\n */\r\n getScopes() {\r\n return [...this.scopes];\r\n }\r\n}\r\n/**\r\n * Provider for generating generic {@link OAuthCredential}.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new OAuthProvider('google.com');\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a OAuth Access Token for the provider.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new OAuthProvider('google.com');\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a OAuth Access Token for the provider.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n * @public\r\n */\r\nclass OAuthProvider extends BaseOAuthProvider {\r\n /**\r\n * Creates an {@link OAuthCredential} from a JSON string or a plain object.\r\n * @param json - A plain object or a JSON string\r\n */\r\n static credentialFromJSON(json) {\r\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\r\n _assert('providerId' in obj && 'signInMethod' in obj, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n return OAuthCredential._fromParams(obj);\r\n }\r\n /**\r\n * Creates a {@link OAuthCredential} from a generic OAuth provider's access token or ID token.\r\n *\r\n * @remarks\r\n * The raw nonce is required when an ID token with a nonce field is provided. The SHA-256 hash of\r\n * the raw nonce must match the nonce field in the ID token.\r\n *\r\n * @example\r\n * ```javascript\r\n * // `googleUser` from the onsuccess Google Sign In callback.\r\n * // Initialize a generate OAuth provider with a `google.com` providerId.\r\n * const provider = new OAuthProvider('google.com');\r\n * const credential = provider.credential({\r\n * idToken: googleUser.getAuthResponse().id_token,\r\n * });\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param params - Either the options object containing the ID token, access token and raw nonce\r\n * or the ID token string.\r\n */\r\n credential(params) {\r\n return this._credential(Object.assign(Object.assign({}, params), { nonce: params.rawNonce }));\r\n }\r\n /** An internal credential method that accepts more permissive options */\r\n _credential(params) {\r\n _assert(params.idToken || params.accessToken, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n // For OAuthCredential, sign in method is same as providerId.\r\n return OAuthCredential._fromParams(Object.assign(Object.assign({}, params), { providerId: this.providerId, signInMethod: this.providerId }));\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromResult(userCredential) {\r\n return OAuthProvider.oauthCredentialFromTaggedObject(userCredential);\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromError(error) {\r\n return OAuthProvider.oauthCredentialFromTaggedObject((error.customData || {}));\r\n }\r\n static oauthCredentialFromTaggedObject({ _tokenResponse: tokenResponse }) {\r\n if (!tokenResponse) {\r\n return null;\r\n }\r\n const { oauthIdToken, oauthAccessToken, oauthTokenSecret, pendingToken, nonce, providerId } = tokenResponse;\r\n if (!oauthAccessToken &&\r\n !oauthTokenSecret &&\r\n !oauthIdToken &&\r\n !pendingToken) {\r\n return null;\r\n }\r\n if (!providerId) {\r\n return null;\r\n }\r\n try {\r\n return new OAuthProvider(providerId)._credential({\r\n idToken: oauthIdToken,\r\n accessToken: oauthAccessToken,\r\n nonce,\r\n pendingToken\r\n });\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.FACEBOOK.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('user_birthday');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = FacebookAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * provider.addScope('user_birthday');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = FacebookAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @public\r\n */\r\nclass FacebookAuthProvider extends BaseOAuthProvider {\r\n constructor() {\r\n super(\"facebook.com\" /* ProviderId.FACEBOOK */);\r\n }\r\n /**\r\n * Creates a credential for Facebook.\r\n *\r\n * @example\r\n * ```javascript\r\n * // `event` from the Facebook auth.authResponseChange callback.\r\n * const credential = FacebookAuthProvider.credential(event.authResponse.accessToken);\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param accessToken - Facebook access token.\r\n */\r\n static credential(accessToken) {\r\n return OAuthCredential._fromParams({\r\n providerId: FacebookAuthProvider.PROVIDER_ID,\r\n signInMethod: FacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD,\r\n accessToken\r\n });\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromResult(userCredential) {\r\n return FacebookAuthProvider.credentialFromTaggedObject(userCredential);\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromError(error) {\r\n return FacebookAuthProvider.credentialFromTaggedObject((error.customData || {}));\r\n }\r\n static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {\r\n if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\r\n return null;\r\n }\r\n if (!tokenResponse.oauthAccessToken) {\r\n return null;\r\n }\r\n try {\r\n return FacebookAuthProvider.credential(tokenResponse.oauthAccessToken);\r\n }\r\n catch (_a) {\r\n return null;\r\n }\r\n }\r\n}\r\n/** Always set to {@link SignInMethod}.FACEBOOK. */\r\nFacebookAuthProvider.FACEBOOK_SIGN_IN_METHOD = \"facebook.com\" /* SignInMethod.FACEBOOK */;\r\n/** Always set to {@link ProviderId}.FACEBOOK. */\r\nFacebookAuthProvider.PROVIDER_ID = \"facebook.com\" /* ProviderId.FACEBOOK */;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for generating an an {@link OAuthCredential} for {@link ProviderId}.GOOGLE.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new GoogleAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Google Access Token.\r\n * const credential = GoogleAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new GoogleAuthProvider();\r\n * provider.addScope('profile');\r\n * provider.addScope('email');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Google Access Token.\r\n * const credential = GoogleAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @public\r\n */\r\nclass GoogleAuthProvider extends BaseOAuthProvider {\r\n constructor() {\r\n super(\"google.com\" /* ProviderId.GOOGLE */);\r\n this.addScope('profile');\r\n }\r\n /**\r\n * Creates a credential for Google. At least one of ID token and access token is required.\r\n *\r\n * @example\r\n * ```javascript\r\n * // \\`googleUser\\` from the onsuccess Google Sign In callback.\r\n * const credential = GoogleAuthProvider.credential(googleUser.getAuthResponse().id_token);\r\n * const result = await signInWithCredential(credential);\r\n * ```\r\n *\r\n * @param idToken - Google ID token.\r\n * @param accessToken - Google access token.\r\n */\r\n static credential(idToken, accessToken) {\r\n return OAuthCredential._fromParams({\r\n providerId: GoogleAuthProvider.PROVIDER_ID,\r\n signInMethod: GoogleAuthProvider.GOOGLE_SIGN_IN_METHOD,\r\n idToken,\r\n accessToken\r\n });\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromResult(userCredential) {\r\n return GoogleAuthProvider.credentialFromTaggedObject(userCredential);\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromError(error) {\r\n return GoogleAuthProvider.credentialFromTaggedObject((error.customData || {}));\r\n }\r\n static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {\r\n if (!tokenResponse) {\r\n return null;\r\n }\r\n const { oauthIdToken, oauthAccessToken } = tokenResponse;\r\n if (!oauthIdToken && !oauthAccessToken) {\r\n // This could be an oauth 1 credential or a phone credential\r\n return null;\r\n }\r\n try {\r\n return GoogleAuthProvider.credential(oauthIdToken, oauthAccessToken);\r\n }\r\n catch (_a) {\r\n return null;\r\n }\r\n }\r\n}\r\n/** Always set to {@link SignInMethod}.GOOGLE. */\r\nGoogleAuthProvider.GOOGLE_SIGN_IN_METHOD = \"google.com\" /* SignInMethod.GOOGLE */;\r\n/** Always set to {@link ProviderId}.GOOGLE. */\r\nGoogleAuthProvider.PROVIDER_ID = \"google.com\" /* ProviderId.GOOGLE */;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.GITHUB.\r\n *\r\n * @remarks\r\n * GitHub requires an OAuth 2.0 redirect, so you can either handle the redirect directly, or use\r\n * the {@link signInWithPopup} handler:\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new GithubAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * provider.addScope('repo');\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Github Access Token.\r\n * const credential = GithubAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new GithubAuthProvider();\r\n * provider.addScope('repo');\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Github Access Token.\r\n * const credential = GithubAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * ```\r\n * @public\r\n */\r\nclass GithubAuthProvider extends BaseOAuthProvider {\r\n constructor() {\r\n super(\"github.com\" /* ProviderId.GITHUB */);\r\n }\r\n /**\r\n * Creates a credential for Github.\r\n *\r\n * @param accessToken - Github access token.\r\n */\r\n static credential(accessToken) {\r\n return OAuthCredential._fromParams({\r\n providerId: GithubAuthProvider.PROVIDER_ID,\r\n signInMethod: GithubAuthProvider.GITHUB_SIGN_IN_METHOD,\r\n accessToken\r\n });\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromResult(userCredential) {\r\n return GithubAuthProvider.credentialFromTaggedObject(userCredential);\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromError(error) {\r\n return GithubAuthProvider.credentialFromTaggedObject((error.customData || {}));\r\n }\r\n static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {\r\n if (!tokenResponse || !('oauthAccessToken' in tokenResponse)) {\r\n return null;\r\n }\r\n if (!tokenResponse.oauthAccessToken) {\r\n return null;\r\n }\r\n try {\r\n return GithubAuthProvider.credential(tokenResponse.oauthAccessToken);\r\n }\r\n catch (_a) {\r\n return null;\r\n }\r\n }\r\n}\r\n/** Always set to {@link SignInMethod}.GITHUB. */\r\nGithubAuthProvider.GITHUB_SIGN_IN_METHOD = \"github.com\" /* SignInMethod.GITHUB */;\r\n/** Always set to {@link ProviderId}.GITHUB. */\r\nGithubAuthProvider.PROVIDER_ID = \"github.com\" /* ProviderId.GITHUB */;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst IDP_REQUEST_URI = 'http://localhost';\r\n/**\r\n * @public\r\n */\r\nclass SAMLAuthCredential extends AuthCredential {\r\n /** @internal */\r\n constructor(providerId, pendingToken) {\r\n super(providerId, providerId);\r\n this.pendingToken = pendingToken;\r\n }\r\n /** @internal */\r\n _getIdTokenResponse(auth) {\r\n const request = this.buildRequest();\r\n return signInWithIdp(auth, request);\r\n }\r\n /** @internal */\r\n _linkToIdToken(auth, idToken) {\r\n const request = this.buildRequest();\r\n request.idToken = idToken;\r\n return signInWithIdp(auth, request);\r\n }\r\n /** @internal */\r\n _getReauthenticationResolver(auth) {\r\n const request = this.buildRequest();\r\n request.autoCreate = false;\r\n return signInWithIdp(auth, request);\r\n }\r\n /** {@inheritdoc AuthCredential.toJSON} */\r\n toJSON() {\r\n return {\r\n signInMethod: this.signInMethod,\r\n providerId: this.providerId,\r\n pendingToken: this.pendingToken\r\n };\r\n }\r\n /**\r\n * Static method to deserialize a JSON representation of an object into an\r\n * {@link AuthCredential}.\r\n *\r\n * @param json - Input can be either Object or the stringified representation of the object.\r\n * When string is provided, JSON.parse would be called first.\r\n *\r\n * @returns If the JSON input does not represent an {@link AuthCredential}, null is returned.\r\n */\r\n static fromJSON(json) {\r\n const obj = typeof json === 'string' ? JSON.parse(json) : json;\r\n const { providerId, signInMethod, pendingToken } = obj;\r\n if (!providerId ||\r\n !signInMethod ||\r\n !pendingToken ||\r\n providerId !== signInMethod) {\r\n return null;\r\n }\r\n return new SAMLAuthCredential(providerId, pendingToken);\r\n }\r\n /**\r\n * Helper static method to avoid exposing the constructor to end users.\r\n *\r\n * @internal\r\n */\r\n static _create(providerId, pendingToken) {\r\n return new SAMLAuthCredential(providerId, pendingToken);\r\n }\r\n buildRequest() {\r\n return {\r\n requestUri: IDP_REQUEST_URI,\r\n returnSecureToken: true,\r\n pendingToken: this.pendingToken\r\n };\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst SAML_PROVIDER_PREFIX = 'saml.';\r\n/**\r\n * An {@link AuthProvider} for SAML.\r\n *\r\n * @public\r\n */\r\nclass SAMLAuthProvider extends FederatedAuthProvider {\r\n /**\r\n * Constructor. The providerId must start with \"saml.\"\r\n * @param providerId - SAML provider ID.\r\n */\r\n constructor(providerId) {\r\n _assert(providerId.startsWith(SAML_PROVIDER_PREFIX), \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n super(providerId);\r\n }\r\n /**\r\n * Generates an {@link AuthCredential} from a {@link UserCredential} after a\r\n * successful SAML flow completes.\r\n *\r\n * @remarks\r\n *\r\n * For example, to get an {@link AuthCredential}, you could write the\r\n * following code:\r\n *\r\n * ```js\r\n * const userCredential = await signInWithPopup(auth, samlProvider);\r\n * const credential = SAMLAuthProvider.credentialFromResult(userCredential);\r\n * ```\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromResult(userCredential) {\r\n return SAMLAuthProvider.samlCredentialFromTaggedObject(userCredential);\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromError(error) {\r\n return SAMLAuthProvider.samlCredentialFromTaggedObject((error.customData || {}));\r\n }\r\n /**\r\n * Creates an {@link AuthCredential} from a JSON string or a plain object.\r\n * @param json - A plain object or a JSON string\r\n */\r\n static credentialFromJSON(json) {\r\n const credential = SAMLAuthCredential.fromJSON(json);\r\n _assert(credential, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n return credential;\r\n }\r\n static samlCredentialFromTaggedObject({ _tokenResponse: tokenResponse }) {\r\n if (!tokenResponse) {\r\n return null;\r\n }\r\n const { pendingToken, providerId } = tokenResponse;\r\n if (!pendingToken || !providerId) {\r\n return null;\r\n }\r\n try {\r\n return SAMLAuthCredential._create(providerId, pendingToken);\r\n }\r\n catch (e) {\r\n return null;\r\n }\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for generating an {@link OAuthCredential} for {@link ProviderId}.TWITTER.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new TwitterAuthProvider();\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Twitter Access Token and Secret.\r\n * const credential = TwitterAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * const secret = credential.secret;\r\n * }\r\n * ```\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new TwitterAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Twitter Access Token and Secret.\r\n * const credential = TwitterAuthProvider.credentialFromResult(result);\r\n * const token = credential.accessToken;\r\n * const secret = credential.secret;\r\n * ```\r\n *\r\n * @public\r\n */\r\nclass TwitterAuthProvider extends BaseOAuthProvider {\r\n constructor() {\r\n super(\"twitter.com\" /* ProviderId.TWITTER */);\r\n }\r\n /**\r\n * Creates a credential for Twitter.\r\n *\r\n * @param token - Twitter access token.\r\n * @param secret - Twitter secret.\r\n */\r\n static credential(token, secret) {\r\n return OAuthCredential._fromParams({\r\n providerId: TwitterAuthProvider.PROVIDER_ID,\r\n signInMethod: TwitterAuthProvider.TWITTER_SIGN_IN_METHOD,\r\n oauthToken: token,\r\n oauthTokenSecret: secret\r\n });\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link UserCredential}.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromResult(userCredential) {\r\n return TwitterAuthProvider.credentialFromTaggedObject(userCredential);\r\n }\r\n /**\r\n * Used to extract the underlying {@link OAuthCredential} from a {@link AuthError} which was\r\n * thrown during a sign-in, link, or reauthenticate operation.\r\n *\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromError(error) {\r\n return TwitterAuthProvider.credentialFromTaggedObject((error.customData || {}));\r\n }\r\n static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {\r\n if (!tokenResponse) {\r\n return null;\r\n }\r\n const { oauthAccessToken, oauthTokenSecret } = tokenResponse;\r\n if (!oauthAccessToken || !oauthTokenSecret) {\r\n return null;\r\n }\r\n try {\r\n return TwitterAuthProvider.credential(oauthAccessToken, oauthTokenSecret);\r\n }\r\n catch (_a) {\r\n return null;\r\n }\r\n }\r\n}\r\n/** Always set to {@link SignInMethod}.TWITTER. */\r\nTwitterAuthProvider.TWITTER_SIGN_IN_METHOD = \"twitter.com\" /* SignInMethod.TWITTER */;\r\n/** Always set to {@link ProviderId}.TWITTER. */\r\nTwitterAuthProvider.PROVIDER_ID = \"twitter.com\" /* ProviderId.TWITTER */;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function signUp(auth, request) {\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signUp\" /* Endpoint.SIGN_UP */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass UserCredentialImpl {\r\n constructor(params) {\r\n this.user = params.user;\r\n this.providerId = params.providerId;\r\n this._tokenResponse = params._tokenResponse;\r\n this.operationType = params.operationType;\r\n }\r\n static async _fromIdTokenResponse(auth, operationType, idTokenResponse, isAnonymous = false) {\r\n const user = await UserImpl._fromIdTokenResponse(auth, idTokenResponse, isAnonymous);\r\n const providerId = providerIdForResponse(idTokenResponse);\r\n const userCred = new UserCredentialImpl({\r\n user,\r\n providerId,\r\n _tokenResponse: idTokenResponse,\r\n operationType\r\n });\r\n return userCred;\r\n }\r\n static async _forOperation(user, operationType, response) {\r\n await user._updateTokensIfNecessary(response, /* reload */ true);\r\n const providerId = providerIdForResponse(response);\r\n return new UserCredentialImpl({\r\n user,\r\n providerId,\r\n _tokenResponse: response,\r\n operationType\r\n });\r\n }\r\n}\r\nfunction providerIdForResponse(response) {\r\n if (response.providerId) {\r\n return response.providerId;\r\n }\r\n if ('phoneNumber' in response) {\r\n return \"phone\" /* ProviderId.PHONE */;\r\n }\r\n return null;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Asynchronously signs in as an anonymous user.\r\n *\r\n * @remarks\r\n * If there is already an anonymous user signed in, that user will be returned; otherwise, a\r\n * new anonymous user identity will be created and returned.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\r\nasync function signInAnonymously(auth) {\r\n var _a;\r\n const authInternal = _castAuth(auth);\r\n await authInternal._initializationPromise;\r\n if ((_a = authInternal.currentUser) === null || _a === void 0 ? void 0 : _a.isAnonymous) {\r\n // If an anonymous user is already signed in, no need to sign them in again.\r\n return new UserCredentialImpl({\r\n user: authInternal.currentUser,\r\n providerId: null,\r\n operationType: \"signIn\" /* OperationType.SIGN_IN */\r\n });\r\n }\r\n const response = await signUp(authInternal, {\r\n returnSecureToken: true\r\n });\r\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response, true);\r\n await authInternal._updateCurrentUser(userCredential.user);\r\n return userCredential;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass MultiFactorError extends FirebaseError {\r\n constructor(auth, error, operationType, user) {\r\n var _a;\r\n super(error.code, error.message);\r\n this.operationType = operationType;\r\n this.user = user;\r\n // https://github.com/Microsoft/TypeScript-wiki/blob/master/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\r\n Object.setPrototypeOf(this, MultiFactorError.prototype);\r\n this.customData = {\r\n appName: auth.name,\r\n tenantId: (_a = auth.tenantId) !== null && _a !== void 0 ? _a : undefined,\r\n _serverResponse: error.customData._serverResponse,\r\n operationType\r\n };\r\n }\r\n static _fromErrorAndOperation(auth, error, operationType, user) {\r\n return new MultiFactorError(auth, error, operationType, user);\r\n }\r\n}\r\nfunction _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user) {\r\n const idTokenProvider = operationType === \"reauthenticate\" /* OperationType.REAUTHENTICATE */\r\n ? credential._getReauthenticationResolver(auth)\r\n : credential._getIdTokenResponse(auth);\r\n return idTokenProvider.catch(error => {\r\n if (error.code === `auth/${\"multi-factor-auth-required\" /* AuthErrorCode.MFA_REQUIRED */}`) {\r\n throw MultiFactorError._fromErrorAndOperation(auth, error, operationType, user);\r\n }\r\n throw error;\r\n });\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Takes a set of UserInfo provider data and converts it to a set of names\r\n */\r\nfunction providerDataAsNames(providerData) {\r\n return new Set(providerData\r\n .map(({ providerId }) => providerId)\r\n .filter(pid => !!pid));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Unlinks a provider from a user account.\r\n *\r\n * @param user - The user.\r\n * @param providerId - The provider to unlink.\r\n *\r\n * @public\r\n */\r\nasync function unlink(user, providerId) {\r\n const userInternal = getModularInstance(user);\r\n await _assertLinkedStatus(true, userInternal, providerId);\r\n const { providerUserInfo } = await deleteLinkedAccounts(userInternal.auth, {\r\n idToken: await userInternal.getIdToken(),\r\n deleteProvider: [providerId]\r\n });\r\n const providersLeft = providerDataAsNames(providerUserInfo || []);\r\n userInternal.providerData = userInternal.providerData.filter(pd => providersLeft.has(pd.providerId));\r\n if (!providersLeft.has(\"phone\" /* ProviderId.PHONE */)) {\r\n userInternal.phoneNumber = null;\r\n }\r\n await userInternal.auth._persistUserIfCurrent(userInternal);\r\n return userInternal;\r\n}\r\nasync function _link$1(user, credential, bypassAuthState = false) {\r\n const response = await _logoutIfInvalidated(user, credential._linkToIdToken(user.auth, await user.getIdToken()), bypassAuthState);\r\n return UserCredentialImpl._forOperation(user, \"link\" /* OperationType.LINK */, response);\r\n}\r\nasync function _assertLinkedStatus(expected, user, provider) {\r\n await _reloadWithoutSaving(user);\r\n const providerIds = providerDataAsNames(user.providerData);\r\n const code = expected === false\r\n ? \"provider-already-linked\" /* AuthErrorCode.PROVIDER_ALREADY_LINKED */\r\n : \"no-such-provider\" /* AuthErrorCode.NO_SUCH_PROVIDER */;\r\n _assert(providerIds.has(provider) === expected, user.auth, code);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function _reauthenticate(user, credential, bypassAuthState = false) {\r\n const { auth } = user;\r\n const operationType = \"reauthenticate\" /* OperationType.REAUTHENTICATE */;\r\n try {\r\n const response = await _logoutIfInvalidated(user, _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential, user), bypassAuthState);\r\n _assert(response.idToken, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const parsed = _parseToken(response.idToken);\r\n _assert(parsed, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const { sub: localId } = parsed;\r\n _assert(user.uid === localId, auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\r\n return UserCredentialImpl._forOperation(user, operationType, response);\r\n }\r\n catch (e) {\r\n // Convert user deleted error into user mismatch\r\n if ((e === null || e === void 0 ? void 0 : e.code) === `auth/${\"user-not-found\" /* AuthErrorCode.USER_DELETED */}`) {\r\n _fail(auth, \"user-mismatch\" /* AuthErrorCode.USER_MISMATCH */);\r\n }\r\n throw e;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function _signInWithCredential(auth, credential, bypassAuthState = false) {\r\n const operationType = \"signIn\" /* OperationType.SIGN_IN */;\r\n const response = await _processCredentialSavingMfaContextIfNecessary(auth, operationType, credential);\r\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(auth, operationType, response);\r\n if (!bypassAuthState) {\r\n await auth._updateCurrentUser(userCredential.user);\r\n }\r\n return userCredential;\r\n}\r\n/**\r\n * Asynchronously signs in with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\r\nasync function signInWithCredential(auth, credential) {\r\n return _signInWithCredential(_castAuth(auth), credential);\r\n}\r\n/**\r\n * Links the user account with the given credentials.\r\n *\r\n * @remarks\r\n * An {@link AuthProvider} can be used to generate the credential.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\r\nasync function linkWithCredential(user, credential) {\r\n const userInternal = getModularInstance(user);\r\n await _assertLinkedStatus(false, userInternal, credential.providerId);\r\n return _link$1(userInternal, credential);\r\n}\r\n/**\r\n * Re-authenticates a user using a fresh credential.\r\n *\r\n * @remarks\r\n * Use before operations such as {@link updatePassword} that require tokens from recent sign-in\r\n * attempts. This method can be used to recover from a `CREDENTIAL_TOO_OLD_LOGIN_AGAIN` error\r\n * or a `TOKEN_EXPIRED` error.\r\n *\r\n * @param user - The user.\r\n * @param credential - The auth credential.\r\n *\r\n * @public\r\n */\r\nasync function reauthenticateWithCredential(user, credential) {\r\n return _reauthenticate(getModularInstance(user), credential);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function signInWithCustomToken$1(auth, request) {\r\n return _performSignInRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:signInWithCustomToken\" /* Endpoint.SIGN_IN_WITH_CUSTOM_TOKEN */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Asynchronously signs in using a custom token.\r\n *\r\n * @remarks\r\n * Custom tokens are used to integrate Firebase Auth with existing auth systems, and must\r\n * be generated by an auth backend using the\r\n * {@link https://firebase.google.com/docs/reference/admin/node/admin.auth.Auth#createcustomtoken | createCustomToken}\r\n * method in the {@link https://firebase.google.com/docs/auth/admin | Admin SDK} .\r\n *\r\n * Fails with an error if the token is invalid, expired, or not accepted by the Firebase Auth service.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param customToken - The custom token to sign in with.\r\n *\r\n * @public\r\n */\r\nasync function signInWithCustomToken(auth, customToken) {\r\n const authInternal = _castAuth(auth);\r\n const response = await signInWithCustomToken$1(authInternal, {\r\n token: customToken,\r\n returnSecureToken: true\r\n });\r\n const cred = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\r\n await authInternal._updateCurrentUser(cred.user);\r\n return cred;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass MultiFactorInfoImpl {\r\n constructor(factorId, response) {\r\n this.factorId = factorId;\r\n this.uid = response.mfaEnrollmentId;\r\n this.enrollmentTime = new Date(response.enrolledAt).toUTCString();\r\n this.displayName = response.displayName;\r\n }\r\n static _fromServerResponse(auth, enrollment) {\r\n if ('phoneInfo' in enrollment) {\r\n return PhoneMultiFactorInfoImpl._fromServerResponse(auth, enrollment);\r\n }\r\n else if ('totpInfo' in enrollment) {\r\n return TotpMultiFactorInfoImpl._fromServerResponse(auth, enrollment);\r\n }\r\n return _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }\r\n}\r\nclass PhoneMultiFactorInfoImpl extends MultiFactorInfoImpl {\r\n constructor(response) {\r\n super(\"phone\" /* FactorId.PHONE */, response);\r\n this.phoneNumber = response.phoneInfo;\r\n }\r\n static _fromServerResponse(_auth, enrollment) {\r\n return new PhoneMultiFactorInfoImpl(enrollment);\r\n }\r\n}\r\nclass TotpMultiFactorInfoImpl extends MultiFactorInfoImpl {\r\n constructor(response) {\r\n super(\"totp\" /* FactorId.TOTP */, response);\r\n }\r\n static _fromServerResponse(_auth, enrollment) {\r\n return new TotpMultiFactorInfoImpl(enrollment);\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _setActionCodeSettingsOnRequest(auth, request, actionCodeSettings) {\r\n var _a;\r\n _assert(((_a = actionCodeSettings.url) === null || _a === void 0 ? void 0 : _a.length) > 0, auth, \"invalid-continue-uri\" /* AuthErrorCode.INVALID_CONTINUE_URI */);\r\n _assert(typeof actionCodeSettings.dynamicLinkDomain === 'undefined' ||\r\n actionCodeSettings.dynamicLinkDomain.length > 0, auth, \"invalid-dynamic-link-domain\" /* AuthErrorCode.INVALID_DYNAMIC_LINK_DOMAIN */);\r\n request.continueUrl = actionCodeSettings.url;\r\n request.dynamicLinkDomain = actionCodeSettings.dynamicLinkDomain;\r\n request.canHandleCodeInApp = actionCodeSettings.handleCodeInApp;\r\n if (actionCodeSettings.iOS) {\r\n _assert(actionCodeSettings.iOS.bundleId.length > 0, auth, \"missing-ios-bundle-id\" /* AuthErrorCode.MISSING_IOS_BUNDLE_ID */);\r\n request.iOSBundleId = actionCodeSettings.iOS.bundleId;\r\n }\r\n if (actionCodeSettings.android) {\r\n _assert(actionCodeSettings.android.packageName.length > 0, auth, \"missing-android-pkg-name\" /* AuthErrorCode.MISSING_ANDROID_PACKAGE_NAME */);\r\n request.androidInstallApp = actionCodeSettings.android.installApp;\r\n request.androidMinimumVersionCode =\r\n actionCodeSettings.android.minimumVersion;\r\n request.androidPackageName = actionCodeSettings.android.packageName;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Updates the password policy cached in the {@link Auth} instance if a policy is already\r\n * cached for the project or tenant.\r\n *\r\n * @remarks\r\n * We only fetch the password policy if the password did not meet policy requirements and\r\n * there is an existing policy cached. A developer must call validatePassword at least\r\n * once for the cache to be automatically updated.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @private\r\n */\r\nasync function recachePasswordPolicy(auth) {\r\n const authInternal = _castAuth(auth);\r\n if (authInternal._getPasswordPolicyInternal()) {\r\n await authInternal._updatePasswordPolicy();\r\n }\r\n}\r\n/**\r\n * Sends a password reset email to the given email address.\r\n *\r\n * @remarks\r\n * To complete the password reset, call {@link confirmPasswordReset} with the code supplied in\r\n * the email sent to the user, along with the new password specified by the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendPasswordResetEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain code from user.\r\n * await confirmPasswordReset('user@example.com', code);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\r\nasync function sendPasswordResetEmail(auth, email, actionCodeSettings) {\r\n var _a;\r\n const authInternal = _castAuth(auth);\r\n const request = {\r\n requestType: \"PASSWORD_RESET\" /* ActionCodeOperation.PASSWORD_RESET */,\r\n email,\r\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\r\n };\r\n if ((_a = authInternal._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.emailPasswordEnabled) {\r\n const requestWithRecaptcha = await injectRecaptchaFields(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, true);\r\n if (actionCodeSettings) {\r\n _setActionCodeSettingsOnRequest(authInternal, requestWithRecaptcha, actionCodeSettings);\r\n }\r\n await sendPasswordResetEmail$1(authInternal, requestWithRecaptcha);\r\n }\r\n else {\r\n if (actionCodeSettings) {\r\n _setActionCodeSettingsOnRequest(authInternal, request, actionCodeSettings);\r\n }\r\n await sendPasswordResetEmail$1(authInternal, request)\r\n .catch(async (error) => {\r\n if (error.code === `auth/${\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}`) {\r\n console.log('Password resets are protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the password reset flow.');\r\n const requestWithRecaptcha = await injectRecaptchaFields(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, true);\r\n if (actionCodeSettings) {\r\n _setActionCodeSettingsOnRequest(authInternal, requestWithRecaptcha, actionCodeSettings);\r\n }\r\n await sendPasswordResetEmail$1(authInternal, requestWithRecaptcha);\r\n }\r\n else {\r\n return Promise.reject(error);\r\n }\r\n });\r\n }\r\n}\r\n/**\r\n * Completes the password reset process, given a confirmation code and new password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A confirmation code sent to the user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\r\nasync function confirmPasswordReset(auth, oobCode, newPassword) {\r\n await resetPassword(getModularInstance(auth), {\r\n oobCode,\r\n newPassword\r\n })\r\n .catch(async (error) => {\r\n if (error.code ===\r\n `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\r\n void recachePasswordPolicy(auth);\r\n }\r\n throw error;\r\n });\r\n // Do not return the email.\r\n}\r\n/**\r\n * Applies a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\r\nasync function applyActionCode(auth, oobCode) {\r\n await applyActionCode$1(getModularInstance(auth), { oobCode });\r\n}\r\n/**\r\n * Checks a verification code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns metadata about the code.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param oobCode - A verification code sent to the user.\r\n *\r\n * @public\r\n */\r\nasync function checkActionCode(auth, oobCode) {\r\n const authModular = getModularInstance(auth);\r\n const response = await resetPassword(authModular, { oobCode });\r\n // Email could be empty only if the request type is EMAIL_SIGNIN or\r\n // VERIFY_AND_CHANGE_EMAIL.\r\n // New email should not be empty if the request type is\r\n // VERIFY_AND_CHANGE_EMAIL.\r\n // Multi-factor info could not be empty if the request type is\r\n // REVERT_SECOND_FACTOR_ADDITION.\r\n const operation = response.requestType;\r\n _assert(operation, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n switch (operation) {\r\n case \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */:\r\n break;\r\n case \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */:\r\n _assert(response.newEmail, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n break;\r\n case \"REVERT_SECOND_FACTOR_ADDITION\" /* ActionCodeOperation.REVERT_SECOND_FACTOR_ADDITION */:\r\n _assert(response.mfaInfo, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n // fall through\r\n default:\r\n _assert(response.email, authModular, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }\r\n // The multi-factor info for revert second factor addition\r\n let multiFactorInfo = null;\r\n if (response.mfaInfo) {\r\n multiFactorInfo = MultiFactorInfoImpl._fromServerResponse(_castAuth(authModular), response.mfaInfo);\r\n }\r\n return {\r\n data: {\r\n email: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */\r\n ? response.newEmail\r\n : response.email) || null,\r\n previousEmail: (response.requestType === \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */\r\n ? response.email\r\n : response.newEmail) || null,\r\n multiFactorInfo\r\n },\r\n operation\r\n };\r\n}\r\n/**\r\n * Checks a password reset code sent to the user by email or other out-of-band mechanism.\r\n *\r\n * @returns the user's email address if valid.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param code - A verification code sent to the user.\r\n *\r\n * @public\r\n */\r\nasync function verifyPasswordResetCode(auth, code) {\r\n const { data } = await checkActionCode(getModularInstance(auth), code);\r\n // Email should always be present since a code was sent to it\r\n return data.email;\r\n}\r\n/**\r\n * Creates a new user account associated with the specified email address and password.\r\n *\r\n * @remarks\r\n * On successful creation of the user account, this user will also be signed in to your application.\r\n *\r\n * User account creation can fail if the account already exists or the password is invalid.\r\n *\r\n * Note: The email address acts as a unique identifier for the user and enables an email-based\r\n * password reset. This function will create a new user account and set the initial user password.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param password - The user's chosen password.\r\n *\r\n * @public\r\n */\r\nasync function createUserWithEmailAndPassword(auth, email, password) {\r\n var _a;\r\n const authInternal = _castAuth(auth);\r\n const request = {\r\n returnSecureToken: true,\r\n email,\r\n password,\r\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\r\n };\r\n let signUpResponse;\r\n if ((_a = authInternal._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.emailPasswordEnabled) {\r\n const requestWithRecaptcha = await injectRecaptchaFields(authInternal, request, \"signUpPassword\" /* RecaptchaActionName.SIGN_UP_PASSWORD */);\r\n signUpResponse = signUp(authInternal, requestWithRecaptcha);\r\n }\r\n else {\r\n signUpResponse = signUp(authInternal, request).catch(async (error) => {\r\n if (error.code === `auth/${\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}`) {\r\n console.log('Sign-up is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-up flow.');\r\n const requestWithRecaptcha = await injectRecaptchaFields(authInternal, request, \"signUpPassword\" /* RecaptchaActionName.SIGN_UP_PASSWORD */);\r\n return signUp(authInternal, requestWithRecaptcha);\r\n }\r\n throw error;\r\n });\r\n }\r\n const response = await signUpResponse.catch(error => {\r\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\r\n void recachePasswordPolicy(auth);\r\n }\r\n throw error;\r\n });\r\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(authInternal, \"signIn\" /* OperationType.SIGN_IN */, response);\r\n await authInternal._updateCurrentUser(userCredential.user);\r\n return userCredential;\r\n}\r\n/**\r\n * Asynchronously signs in using an email and password.\r\n *\r\n * @remarks\r\n * Fails with an error if the email address and password do not match.\r\n *\r\n * Note: The user's password is NOT the password used to access the user's email account. The\r\n * email address serves as a unique identifier for the user, and the password is used to access\r\n * the user's account in your Firebase project. See also: {@link createUserWithEmailAndPassword}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The users email address.\r\n * @param password - The users password.\r\n *\r\n * @public\r\n */\r\nfunction signInWithEmailAndPassword(auth, email, password) {\r\n return signInWithCredential(getModularInstance(auth), EmailAuthProvider.credential(email, password)).catch(async (error) => {\r\n if (error.code === `auth/${\"password-does-not-meet-requirements\" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {\r\n void recachePasswordPolicy(auth);\r\n }\r\n throw error;\r\n });\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Sends a sign-in email link to the user with the specified email.\r\n *\r\n * @remarks\r\n * The sign-in operation has to always be completed in the app unlike other out of band email\r\n * actions (password reset and email verifications). This is because, at the end of the flow,\r\n * the user is expected to be signed in and their Auth state persisted within the app.\r\n *\r\n * To complete sign in with the email link, call {@link signInWithEmailLink} with the email\r\n * address and the email link supplied in the email sent to the user.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n * await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param authInternal - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\r\nasync function sendSignInLinkToEmail(auth, email, actionCodeSettings) {\r\n var _a;\r\n const authInternal = _castAuth(auth);\r\n const request = {\r\n requestType: \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */,\r\n email,\r\n clientType: \"CLIENT_TYPE_WEB\" /* RecaptchaClientType.WEB */\r\n };\r\n function setActionCodeSettings(request, actionCodeSettings) {\r\n _assert(actionCodeSettings.handleCodeInApp, authInternal, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n if (actionCodeSettings) {\r\n _setActionCodeSettingsOnRequest(authInternal, request, actionCodeSettings);\r\n }\r\n }\r\n if ((_a = authInternal._getRecaptchaConfig()) === null || _a === void 0 ? void 0 : _a.emailPasswordEnabled) {\r\n const requestWithRecaptcha = await injectRecaptchaFields(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, true);\r\n setActionCodeSettings(requestWithRecaptcha, actionCodeSettings);\r\n await sendSignInLinkToEmail$1(authInternal, requestWithRecaptcha);\r\n }\r\n else {\r\n setActionCodeSettings(request, actionCodeSettings);\r\n await sendSignInLinkToEmail$1(authInternal, request)\r\n .catch(async (error) => {\r\n if (error.code === `auth/${\"missing-recaptcha-token\" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}`) {\r\n console.log('Email link sign-in is protected by reCAPTCHA for this project. Automatically triggering the reCAPTCHA flow and restarting the sign-in flow.');\r\n const requestWithRecaptcha = await injectRecaptchaFields(authInternal, request, \"getOobCode\" /* RecaptchaActionName.GET_OOB_CODE */, true);\r\n setActionCodeSettings(requestWithRecaptcha, actionCodeSettings);\r\n await sendSignInLinkToEmail$1(authInternal, requestWithRecaptcha);\r\n }\r\n else {\r\n return Promise.reject(error);\r\n }\r\n });\r\n }\r\n}\r\n/**\r\n * Checks if an incoming link is a sign-in with email link suitable for {@link signInWithEmailLink}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\r\nfunction isSignInWithEmailLink(auth, emailLink) {\r\n const actionCodeUrl = ActionCodeURL.parseLink(emailLink);\r\n return (actionCodeUrl === null || actionCodeUrl === void 0 ? void 0 : actionCodeUrl.operation) === \"EMAIL_SIGNIN\" /* ActionCodeOperation.EMAIL_SIGNIN */;\r\n}\r\n/**\r\n * Asynchronously signs in using an email and sign-in email link.\r\n *\r\n * @remarks\r\n * If no link is passed, the link is inferred from the current URL.\r\n *\r\n * Fails with an error if the email address is invalid or OTP in email link expires.\r\n *\r\n * Note: Confirm the link is a sign-in email link before calling this method firebase.auth.Auth.isSignInWithEmailLink.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendSignInLinkToEmail(auth, 'user@example.com', actionCodeSettings);\r\n * // Obtain emailLink from the user.\r\n * if(isSignInWithEmailLink(auth, emailLink)) {\r\n * await signInWithEmailLink(auth, 'user@example.com', emailLink);\r\n * }\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n * @param emailLink - The link sent to the user's email address.\r\n *\r\n * @public\r\n */\r\nasync function signInWithEmailLink(auth, email, emailLink) {\r\n const authModular = getModularInstance(auth);\r\n const credential = EmailAuthProvider.credentialWithLink(email, emailLink || _getCurrentUrl());\r\n // Check if the tenant ID in the email link matches the tenant ID on Auth\r\n // instance.\r\n _assert(credential._tenantId === (authModular.tenantId || null), authModular, \"tenant-id-mismatch\" /* AuthErrorCode.TENANT_ID_MISMATCH */);\r\n return signInWithCredential(authModular, credential);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function createAuthUri(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:createAuthUri\" /* Endpoint.CREATE_AUTH_URI */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Gets the list of possible sign in methods for the given email address.\r\n *\r\n * @remarks\r\n * This is useful to differentiate methods of sign-in for the same provider, eg.\r\n * {@link EmailAuthProvider} which has 2 methods of sign-in,\r\n * {@link SignInMethod}.EMAIL_PASSWORD and\r\n * {@link SignInMethod}.EMAIL_LINK.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param email - The user's email address.\r\n *\r\n * @public\r\n */\r\nasync function fetchSignInMethodsForEmail(auth, email) {\r\n // createAuthUri returns an error if continue URI is not http or https.\r\n // For environments like Cordova, Chrome extensions, native frameworks, file\r\n // systems, etc, use http://localhost as continue URL.\r\n const continueUri = _isHttpOrHttps() ? _getCurrentUrl() : 'http://localhost';\r\n const request = {\r\n identifier: email,\r\n continueUri\r\n };\r\n const { signinMethods } = await createAuthUri(getModularInstance(auth), request);\r\n return signinMethods || [];\r\n}\r\n/**\r\n * Sends a verification email to a user.\r\n *\r\n * @remarks\r\n * The verification process is completed by calling {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await sendEmailVerification(user, actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\r\nasync function sendEmailVerification(user, actionCodeSettings) {\r\n const userInternal = getModularInstance(user);\r\n const idToken = await user.getIdToken();\r\n const request = {\r\n requestType: \"VERIFY_EMAIL\" /* ActionCodeOperation.VERIFY_EMAIL */,\r\n idToken\r\n };\r\n if (actionCodeSettings) {\r\n _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\r\n }\r\n const { email } = await sendEmailVerification$1(userInternal.auth, request);\r\n if (email !== user.email) {\r\n await user.reload();\r\n }\r\n}\r\n/**\r\n * Sends a verification email to a new email address.\r\n *\r\n * @remarks\r\n * The user's email will be updated to the new one after being verified.\r\n *\r\n * If you have a custom email action handler, you can complete the verification process by calling\r\n * {@link applyActionCode}.\r\n *\r\n * @example\r\n * ```javascript\r\n * const actionCodeSettings = {\r\n * url: 'https://www.example.com/?email=user@example.com',\r\n * iOS: {\r\n * bundleId: 'com.example.ios'\r\n * },\r\n * android: {\r\n * packageName: 'com.example.android',\r\n * installApp: true,\r\n * minimumVersion: '12'\r\n * },\r\n * handleCodeInApp: true\r\n * };\r\n * await verifyBeforeUpdateEmail(user, 'newemail@example.com', actionCodeSettings);\r\n * // Obtain code from the user.\r\n * await applyActionCode(auth, code);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address to be verified before update.\r\n * @param actionCodeSettings - The {@link ActionCodeSettings}.\r\n *\r\n * @public\r\n */\r\nasync function verifyBeforeUpdateEmail(user, newEmail, actionCodeSettings) {\r\n const userInternal = getModularInstance(user);\r\n const idToken = await user.getIdToken();\r\n const request = {\r\n requestType: \"VERIFY_AND_CHANGE_EMAIL\" /* ActionCodeOperation.VERIFY_AND_CHANGE_EMAIL */,\r\n idToken,\r\n newEmail\r\n };\r\n if (actionCodeSettings) {\r\n _setActionCodeSettingsOnRequest(userInternal.auth, request, actionCodeSettings);\r\n }\r\n const { email } = await verifyAndChangeEmail(userInternal.auth, request);\r\n if (email !== user.email) {\r\n // If the local copy of the email on user is outdated, reload the\r\n // user.\r\n await user.reload();\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function updateProfile$1(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v1/accounts:update\" /* Endpoint.SET_ACCOUNT_INFO */, request);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Updates a user's profile data.\r\n *\r\n * @param user - The user.\r\n * @param profile - The profile's `displayName` and `photoURL` to update.\r\n *\r\n * @public\r\n */\r\nasync function updateProfile(user, { displayName, photoURL: photoUrl }) {\r\n if (displayName === undefined && photoUrl === undefined) {\r\n return;\r\n }\r\n const userInternal = getModularInstance(user);\r\n const idToken = await userInternal.getIdToken();\r\n const profileRequest = {\r\n idToken,\r\n displayName,\r\n photoUrl,\r\n returnSecureToken: true\r\n };\r\n const response = await _logoutIfInvalidated(userInternal, updateProfile$1(userInternal.auth, profileRequest));\r\n userInternal.displayName = response.displayName || null;\r\n userInternal.photoURL = response.photoUrl || null;\r\n // Update the password provider as well\r\n const passwordProvider = userInternal.providerData.find(({ providerId }) => providerId === \"password\" /* ProviderId.PASSWORD */);\r\n if (passwordProvider) {\r\n passwordProvider.displayName = userInternal.displayName;\r\n passwordProvider.photoURL = userInternal.photoURL;\r\n }\r\n await userInternal._updateTokensIfNecessary(response);\r\n}\r\n/**\r\n * Updates the user's email address.\r\n *\r\n * @remarks\r\n * An email will be sent to the original email address (if it was set) that allows to revoke the\r\n * email address change, in order to protect them from account hijacking.\r\n *\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newEmail - The new email address.\r\n *\r\n * @public\r\n */\r\nfunction updateEmail(user, newEmail) {\r\n return updateEmailOrPassword(getModularInstance(user), newEmail, null);\r\n}\r\n/**\r\n * Updates the user's password.\r\n *\r\n * @remarks\r\n * Important: this is a security sensitive operation that requires the user to have recently signed\r\n * in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n * @param newPassword - The new password.\r\n *\r\n * @public\r\n */\r\nfunction updatePassword(user, newPassword) {\r\n return updateEmailOrPassword(getModularInstance(user), null, newPassword);\r\n}\r\nasync function updateEmailOrPassword(user, email, password) {\r\n const { auth } = user;\r\n const idToken = await user.getIdToken();\r\n const request = {\r\n idToken,\r\n returnSecureToken: true\r\n };\r\n if (email) {\r\n request.email = email;\r\n }\r\n if (password) {\r\n request.password = password;\r\n }\r\n const response = await _logoutIfInvalidated(user, updateEmailPassword(auth, request));\r\n await user._updateTokensIfNecessary(response, /* reload */ true);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Parse the `AdditionalUserInfo` from the ID token response.\r\n *\r\n */\r\nfunction _fromIdTokenResponse(idTokenResponse) {\r\n var _a, _b;\r\n if (!idTokenResponse) {\r\n return null;\r\n }\r\n const { providerId } = idTokenResponse;\r\n const profile = idTokenResponse.rawUserInfo\r\n ? JSON.parse(idTokenResponse.rawUserInfo)\r\n : {};\r\n const isNewUser = idTokenResponse.isNewUser ||\r\n idTokenResponse.kind === \"identitytoolkit#SignupNewUserResponse\" /* IdTokenResponseKind.SignupNewUser */;\r\n if (!providerId && (idTokenResponse === null || idTokenResponse === void 0 ? void 0 : idTokenResponse.idToken)) {\r\n const signInProvider = (_b = (_a = _parseToken(idTokenResponse.idToken)) === null || _a === void 0 ? void 0 : _a.firebase) === null || _b === void 0 ? void 0 : _b['sign_in_provider'];\r\n if (signInProvider) {\r\n const filteredProviderId = signInProvider !== \"anonymous\" /* ProviderId.ANONYMOUS */ &&\r\n signInProvider !== \"custom\" /* ProviderId.CUSTOM */\r\n ? signInProvider\r\n : null;\r\n // Uses generic class in accordance with the legacy SDK.\r\n return new GenericAdditionalUserInfo(isNewUser, filteredProviderId);\r\n }\r\n }\r\n if (!providerId) {\r\n return null;\r\n }\r\n switch (providerId) {\r\n case \"facebook.com\" /* ProviderId.FACEBOOK */:\r\n return new FacebookAdditionalUserInfo(isNewUser, profile);\r\n case \"github.com\" /* ProviderId.GITHUB */:\r\n return new GithubAdditionalUserInfo(isNewUser, profile);\r\n case \"google.com\" /* ProviderId.GOOGLE */:\r\n return new GoogleAdditionalUserInfo(isNewUser, profile);\r\n case \"twitter.com\" /* ProviderId.TWITTER */:\r\n return new TwitterAdditionalUserInfo(isNewUser, profile, idTokenResponse.screenName || null);\r\n case \"custom\" /* ProviderId.CUSTOM */:\r\n case \"anonymous\" /* ProviderId.ANONYMOUS */:\r\n return new GenericAdditionalUserInfo(isNewUser, null);\r\n default:\r\n return new GenericAdditionalUserInfo(isNewUser, providerId, profile);\r\n }\r\n}\r\nclass GenericAdditionalUserInfo {\r\n constructor(isNewUser, providerId, profile = {}) {\r\n this.isNewUser = isNewUser;\r\n this.providerId = providerId;\r\n this.profile = profile;\r\n }\r\n}\r\nclass FederatedAdditionalUserInfoWithUsername extends GenericAdditionalUserInfo {\r\n constructor(isNewUser, providerId, profile, username) {\r\n super(isNewUser, providerId, profile);\r\n this.username = username;\r\n }\r\n}\r\nclass FacebookAdditionalUserInfo extends GenericAdditionalUserInfo {\r\n constructor(isNewUser, profile) {\r\n super(isNewUser, \"facebook.com\" /* ProviderId.FACEBOOK */, profile);\r\n }\r\n}\r\nclass GithubAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\r\n constructor(isNewUser, profile) {\r\n super(isNewUser, \"github.com\" /* ProviderId.GITHUB */, profile, typeof (profile === null || profile === void 0 ? void 0 : profile.login) === 'string' ? profile === null || profile === void 0 ? void 0 : profile.login : null);\r\n }\r\n}\r\nclass GoogleAdditionalUserInfo extends GenericAdditionalUserInfo {\r\n constructor(isNewUser, profile) {\r\n super(isNewUser, \"google.com\" /* ProviderId.GOOGLE */, profile);\r\n }\r\n}\r\nclass TwitterAdditionalUserInfo extends FederatedAdditionalUserInfoWithUsername {\r\n constructor(isNewUser, profile, screenName) {\r\n super(isNewUser, \"twitter.com\" /* ProviderId.TWITTER */, profile, screenName);\r\n }\r\n}\r\n/**\r\n * Extracts provider specific {@link AdditionalUserInfo} for the given credential.\r\n *\r\n * @param userCredential - The user credential.\r\n *\r\n * @public\r\n */\r\nfunction getAdditionalUserInfo(userCredential) {\r\n const { user, _tokenResponse } = userCredential;\r\n if (user.isAnonymous && !_tokenResponse) {\r\n // Handle the special case where signInAnonymously() gets called twice.\r\n // No network call is made so there's nothing to actually fill this in\r\n return {\r\n providerId: null,\r\n isNewUser: false,\r\n profile: null\r\n };\r\n }\r\n return _fromIdTokenResponse(_tokenResponse);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// Non-optional auth methods.\r\n/**\r\n * Changes the type of persistence on the {@link Auth} instance for the currently saved\r\n * `Auth` session and applies this type of persistence for future sign-in requests, including\r\n * sign-in with redirect requests.\r\n *\r\n * @remarks\r\n * This makes it easy for a user signing in to specify whether their session should be\r\n * remembered or not. It also makes it easier to never persist the `Auth` state for applications\r\n * that are shared by other users or have sensitive data.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * setPersistence(auth, browserSessionPersistence);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param persistence - The {@link Persistence} to use.\r\n * @returns A `Promise` that resolves once the persistence change has completed\r\n *\r\n * @public\r\n */\r\nfunction setPersistence(auth, persistence) {\r\n return getModularInstance(auth).setPersistence(persistence);\r\n}\r\n/**\r\n * Loads the reCAPTCHA configuration into the `Auth` instance.\r\n *\r\n * @remarks\r\n * This will load the reCAPTCHA config, which indicates whether the reCAPTCHA\r\n * verification flow should be triggered for each auth provider, into the\r\n * current Auth session.\r\n *\r\n * If initializeRecaptchaConfig() is not invoked, the auth flow will always start\r\n * without reCAPTCHA verification. If the provider is configured to require reCAPTCHA\r\n * verification, the SDK will transparently load the reCAPTCHA config and restart the\r\n * auth flows.\r\n *\r\n * Thus, by calling this optional method, you will reduce the latency of future auth flows.\r\n * Loading the reCAPTCHA config early will also enhance the signal collected by reCAPTCHA.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * initializeRecaptchaConfig(auth);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\r\nfunction initializeRecaptchaConfig(auth) {\r\n return _initializeRecaptchaConfig(auth);\r\n}\r\n/**\r\n * Validates the password against the password policy configured for the project or tenant.\r\n *\r\n * @remarks\r\n * If no tenant ID is set on the `Auth` instance, then this method will use the password\r\n * policy configured for the project. Otherwise, this method will use the policy configured\r\n * for the tenant. If a password policy has not been configured, then the default policy\r\n * configured for all projects will be used.\r\n *\r\n * If an auth flow fails because a submitted password does not meet the password policy\r\n * requirements and this method has previously been called, then this method will use the\r\n * most recent policy available when called again.\r\n *\r\n * @example\r\n * ```javascript\r\n * validatePassword(auth, 'some-password');\r\n * ```\r\n *\r\n * @param auth The {@link Auth} instance.\r\n * @param password The password to validate.\r\n *\r\n * @public\r\n */\r\nasync function validatePassword(auth, password) {\r\n const authInternal = _castAuth(auth);\r\n return authInternal.validatePassword(password);\r\n}\r\n/**\r\n * Adds an observer for changes to the signed-in user's ID token.\r\n *\r\n * @remarks\r\n * This includes sign-in, sign-out, and token refresh events.\r\n * This will not be triggered automatically upon ID token expiration. Use {@link User.getIdToken} to refresh the ID token.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\r\nfunction onIdTokenChanged(auth, nextOrObserver, error, completed) {\r\n return getModularInstance(auth).onIdTokenChanged(nextOrObserver, error, completed);\r\n}\r\n/**\r\n * Adds a blocking callback that runs before an auth state change\r\n * sets a new user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param callback - callback triggered before new user value is set.\r\n * If this throws, it blocks the user from being set.\r\n * @param onAbort - callback triggered if a later `beforeAuthStateChanged()`\r\n * callback throws, allowing you to undo any side effects.\r\n */\r\nfunction beforeAuthStateChanged(auth, callback, onAbort) {\r\n return getModularInstance(auth).beforeAuthStateChanged(callback, onAbort);\r\n}\r\n/**\r\n * Adds an observer for changes to the user's sign-in state.\r\n *\r\n * @remarks\r\n * To keep the old behavior, see {@link onIdTokenChanged}.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param nextOrObserver - callback triggered on change.\r\n * @param error - Deprecated. This callback is never triggered. Errors\r\n * on signing in/out can be caught in promises returned from\r\n * sign-in/sign-out functions.\r\n * @param completed - Deprecated. This callback is never triggered.\r\n *\r\n * @public\r\n */\r\nfunction onAuthStateChanged(auth, nextOrObserver, error, completed) {\r\n return getModularInstance(auth).onAuthStateChanged(nextOrObserver, error, completed);\r\n}\r\n/**\r\n * Sets the current language to the default device/browser preference.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\r\nfunction useDeviceLanguage(auth) {\r\n getModularInstance(auth).useDeviceLanguage();\r\n}\r\n/**\r\n * Asynchronously sets the provided user as {@link Auth.currentUser} on the\r\n * {@link Auth} instance.\r\n *\r\n * @remarks\r\n * A new instance copy of the user provided will be made and set as currentUser.\r\n *\r\n * This will trigger {@link onAuthStateChanged} and {@link onIdTokenChanged} listeners\r\n * like other sign in methods.\r\n *\r\n * The operation fails with an error if the user to be updated belongs to a different Firebase\r\n * project.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param user - The new {@link User}.\r\n *\r\n * @public\r\n */\r\nfunction updateCurrentUser(auth, user) {\r\n return getModularInstance(auth).updateCurrentUser(user);\r\n}\r\n/**\r\n * Signs out the current user.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n *\r\n * @public\r\n */\r\nfunction signOut(auth) {\r\n return getModularInstance(auth).signOut();\r\n}\r\n/**\r\n * Deletes and signs out the user.\r\n *\r\n * @remarks\r\n * Important: this is a security-sensitive operation that requires the user to have recently\r\n * signed in. If this requirement isn't met, ask the user to authenticate again and then call\r\n * {@link reauthenticateWithCredential}.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\r\nasync function deleteUser(user) {\r\n return getModularInstance(user).delete();\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass MultiFactorSessionImpl {\r\n constructor(type, credential, user) {\r\n this.type = type;\r\n this.credential = credential;\r\n this.user = user;\r\n }\r\n static _fromIdtoken(idToken, user) {\r\n return new MultiFactorSessionImpl(\"enroll\" /* MultiFactorSessionType.ENROLL */, idToken, user);\r\n }\r\n static _fromMfaPendingCredential(mfaPendingCredential) {\r\n return new MultiFactorSessionImpl(\"signin\" /* MultiFactorSessionType.SIGN_IN */, mfaPendingCredential);\r\n }\r\n toJSON() {\r\n const key = this.type === \"enroll\" /* MultiFactorSessionType.ENROLL */\r\n ? 'idToken'\r\n : 'pendingCredential';\r\n return {\r\n multiFactorSession: {\r\n [key]: this.credential\r\n }\r\n };\r\n }\r\n static fromJSON(obj) {\r\n var _a, _b;\r\n if (obj === null || obj === void 0 ? void 0 : obj.multiFactorSession) {\r\n if ((_a = obj.multiFactorSession) === null || _a === void 0 ? void 0 : _a.pendingCredential) {\r\n return MultiFactorSessionImpl._fromMfaPendingCredential(obj.multiFactorSession.pendingCredential);\r\n }\r\n else if ((_b = obj.multiFactorSession) === null || _b === void 0 ? void 0 : _b.idToken) {\r\n return MultiFactorSessionImpl._fromIdtoken(obj.multiFactorSession.idToken);\r\n }\r\n }\r\n return null;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass MultiFactorResolverImpl {\r\n constructor(session, hints, signInResolver) {\r\n this.session = session;\r\n this.hints = hints;\r\n this.signInResolver = signInResolver;\r\n }\r\n /** @internal */\r\n static _fromError(authExtern, error) {\r\n const auth = _castAuth(authExtern);\r\n const serverResponse = error.customData._serverResponse;\r\n const hints = (serverResponse.mfaInfo || []).map(enrollment => MultiFactorInfoImpl._fromServerResponse(auth, enrollment));\r\n _assert(serverResponse.mfaPendingCredential, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const session = MultiFactorSessionImpl._fromMfaPendingCredential(serverResponse.mfaPendingCredential);\r\n return new MultiFactorResolverImpl(session, hints, async (assertion) => {\r\n const mfaResponse = await assertion._process(auth, session);\r\n // Clear out the unneeded fields from the old login response\r\n delete serverResponse.mfaInfo;\r\n delete serverResponse.mfaPendingCredential;\r\n // Use in the new token & refresh token in the old response\r\n const idTokenResponse = Object.assign(Object.assign({}, serverResponse), { idToken: mfaResponse.idToken, refreshToken: mfaResponse.refreshToken });\r\n // TODO: we should collapse this switch statement into UserCredentialImpl._forOperation and have it support the SIGN_IN case\r\n switch (error.operationType) {\r\n case \"signIn\" /* OperationType.SIGN_IN */:\r\n const userCredential = await UserCredentialImpl._fromIdTokenResponse(auth, error.operationType, idTokenResponse);\r\n await auth._updateCurrentUser(userCredential.user);\r\n return userCredential;\r\n case \"reauthenticate\" /* OperationType.REAUTHENTICATE */:\r\n _assert(error.user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return UserCredentialImpl._forOperation(error.user, error.operationType, idTokenResponse);\r\n default:\r\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }\r\n });\r\n }\r\n async resolveSignIn(assertionExtern) {\r\n const assertion = assertionExtern;\r\n return this.signInResolver(assertion);\r\n }\r\n}\r\n/**\r\n * Provides a {@link MultiFactorResolver} suitable for completion of a\r\n * multi-factor flow.\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param error - The {@link MultiFactorError} raised during a sign-in, or\r\n * reauthentication operation.\r\n *\r\n * @public\r\n */\r\nfunction getMultiFactorResolver(auth, error) {\r\n var _a;\r\n const authModular = getModularInstance(auth);\r\n const errorInternal = error;\r\n _assert(error.customData.operationType, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n _assert((_a = errorInternal.customData._serverResponse) === null || _a === void 0 ? void 0 : _a.mfaPendingCredential, authModular, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n return MultiFactorResolverImpl._fromError(authModular, errorInternal);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction startEnrollPhoneMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:start\" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\r\n}\r\nfunction finalizeEnrollPhoneMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:finalize\" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\r\n}\r\nfunction startEnrollTotpMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:start\" /* Endpoint.START_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\r\n}\r\nfunction finalizeEnrollTotpMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:finalize\" /* Endpoint.FINALIZE_MFA_ENROLLMENT */, _addTidIfNecessary(auth, request));\r\n}\r\nfunction withdrawMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaEnrollment:withdraw\" /* Endpoint.WITHDRAW_MFA */, _addTidIfNecessary(auth, request));\r\n}\n\nclass MultiFactorUserImpl {\r\n constructor(user) {\r\n this.user = user;\r\n this.enrolledFactors = [];\r\n user._onReload(userInfo => {\r\n if (userInfo.mfaInfo) {\r\n this.enrolledFactors = userInfo.mfaInfo.map(enrollment => MultiFactorInfoImpl._fromServerResponse(user.auth, enrollment));\r\n }\r\n });\r\n }\r\n static _fromUser(user) {\r\n return new MultiFactorUserImpl(user);\r\n }\r\n async getSession() {\r\n return MultiFactorSessionImpl._fromIdtoken(await this.user.getIdToken(), this.user);\r\n }\r\n async enroll(assertionExtern, displayName) {\r\n const assertion = assertionExtern;\r\n const session = (await this.getSession());\r\n const finalizeMfaResponse = await _logoutIfInvalidated(this.user, assertion._process(this.user.auth, session, displayName));\r\n // New tokens will be issued after enrollment of the new second factors.\r\n // They need to be updated on the user.\r\n await this.user._updateTokensIfNecessary(finalizeMfaResponse);\r\n // The user needs to be reloaded to get the new multi-factor information\r\n // from server. USER_RELOADED event will be triggered and `enrolledFactors`\r\n // will be updated.\r\n return this.user.reload();\r\n }\r\n async unenroll(infoOrUid) {\r\n const mfaEnrollmentId = typeof infoOrUid === 'string' ? infoOrUid : infoOrUid.uid;\r\n const idToken = await this.user.getIdToken();\r\n try {\r\n const idTokenResponse = await _logoutIfInvalidated(this.user, withdrawMfa(this.user.auth, {\r\n idToken,\r\n mfaEnrollmentId\r\n }));\r\n // Remove the second factor from the user's list.\r\n this.enrolledFactors = this.enrolledFactors.filter(({ uid }) => uid !== mfaEnrollmentId);\r\n // Depending on whether the backend decided to revoke the user's session,\r\n // the tokenResponse may be empty. If the tokens were not updated (and they\r\n // are now invalid), reloading the user will discover this and invalidate\r\n // the user's state accordingly.\r\n await this.user._updateTokensIfNecessary(idTokenResponse);\r\n await this.user.reload();\r\n }\r\n catch (e) {\r\n throw e;\r\n }\r\n }\r\n}\r\nconst multiFactorUserCache = new WeakMap();\r\n/**\r\n * The {@link MultiFactorUser} corresponding to the user.\r\n *\r\n * @remarks\r\n * This is used to access all multi-factor properties and operations related to the user.\r\n *\r\n * @param user - The user.\r\n *\r\n * @public\r\n */\r\nfunction multiFactor(user) {\r\n const userModular = getModularInstance(user);\r\n if (!multiFactorUserCache.has(userModular)) {\r\n multiFactorUserCache.set(userModular, MultiFactorUserImpl._fromUser(userModular));\r\n }\r\n return multiFactorUserCache.get(userModular);\r\n}\n\nconst STORAGE_AVAILABLE_KEY = '__sak';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// There are two different browser persistence types: local and session.\r\n// Both have the same implementation but use a different underlying storage\r\n// object.\r\nclass BrowserPersistenceClass {\r\n constructor(storageRetriever, type) {\r\n this.storageRetriever = storageRetriever;\r\n this.type = type;\r\n }\r\n _isAvailable() {\r\n try {\r\n if (!this.storage) {\r\n return Promise.resolve(false);\r\n }\r\n this.storage.setItem(STORAGE_AVAILABLE_KEY, '1');\r\n this.storage.removeItem(STORAGE_AVAILABLE_KEY);\r\n return Promise.resolve(true);\r\n }\r\n catch (_a) {\r\n return Promise.resolve(false);\r\n }\r\n }\r\n _set(key, value) {\r\n this.storage.setItem(key, JSON.stringify(value));\r\n return Promise.resolve();\r\n }\r\n _get(key) {\r\n const json = this.storage.getItem(key);\r\n return Promise.resolve(json ? JSON.parse(json) : null);\r\n }\r\n _remove(key) {\r\n this.storage.removeItem(key);\r\n return Promise.resolve();\r\n }\r\n get storage() {\r\n return this.storageRetriever();\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _iframeCannotSyncWebStorage() {\r\n const ua = getUA();\r\n return _isSafari(ua) || _isIOS(ua);\r\n}\r\n// The polling period in case events are not supported\r\nconst _POLLING_INTERVAL_MS$1 = 1000;\r\n// The IE 10 localStorage cross tab synchronization delay in milliseconds\r\nconst IE10_LOCAL_STORAGE_SYNC_DELAY = 10;\r\nclass BrowserLocalPersistence extends BrowserPersistenceClass {\r\n constructor() {\r\n super(() => window.localStorage, \"LOCAL\" /* PersistenceType.LOCAL */);\r\n this.boundEventHandler = (event, poll) => this.onStorageEvent(event, poll);\r\n this.listeners = {};\r\n this.localCache = {};\r\n // setTimeout return value is platform specific\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n this.pollTimer = null;\r\n // Safari or iOS browser and embedded in an iframe.\r\n this.safariLocalStorageNotSynced = _iframeCannotSyncWebStorage() && _isIframe();\r\n // Whether to use polling instead of depending on window events\r\n this.fallbackToPolling = _isMobileBrowser();\r\n this._shouldAllowMigration = true;\r\n }\r\n forAllChangedKeys(cb) {\r\n // Check all keys with listeners on them.\r\n for (const key of Object.keys(this.listeners)) {\r\n // Get value from localStorage.\r\n const newValue = this.storage.getItem(key);\r\n const oldValue = this.localCache[key];\r\n // If local map value does not match, trigger listener with storage event.\r\n // Differentiate this simulated event from the real storage event.\r\n if (newValue !== oldValue) {\r\n cb(key, oldValue, newValue);\r\n }\r\n }\r\n }\r\n onStorageEvent(event, poll = false) {\r\n // Key would be null in some situations, like when localStorage is cleared\r\n if (!event.key) {\r\n this.forAllChangedKeys((key, _oldValue, newValue) => {\r\n this.notifyListeners(key, newValue);\r\n });\r\n return;\r\n }\r\n const key = event.key;\r\n // Check the mechanism how this event was detected.\r\n // The first event will dictate the mechanism to be used.\r\n if (poll) {\r\n // Environment detects storage changes via polling.\r\n // Remove storage event listener to prevent possible event duplication.\r\n this.detachListener();\r\n }\r\n else {\r\n // Environment detects storage changes via storage event listener.\r\n // Remove polling listener to prevent possible event duplication.\r\n this.stopPolling();\r\n }\r\n // Safari embedded iframe. Storage event will trigger with the delta\r\n // changes but no changes will be applied to the iframe localStorage.\r\n if (this.safariLocalStorageNotSynced) {\r\n // Get current iframe page value.\r\n const storedValue = this.storage.getItem(key);\r\n // Value not synchronized, synchronize manually.\r\n if (event.newValue !== storedValue) {\r\n if (event.newValue !== null) {\r\n // Value changed from current value.\r\n this.storage.setItem(key, event.newValue);\r\n }\r\n else {\r\n // Current value deleted.\r\n this.storage.removeItem(key);\r\n }\r\n }\r\n else if (this.localCache[key] === event.newValue && !poll) {\r\n // Already detected and processed, do not trigger listeners again.\r\n return;\r\n }\r\n }\r\n const triggerListeners = () => {\r\n // Keep local map up to date in case storage event is triggered before\r\n // poll.\r\n const storedValue = this.storage.getItem(key);\r\n if (!poll && this.localCache[key] === storedValue) {\r\n // Real storage event which has already been detected, do nothing.\r\n // This seems to trigger in some IE browsers for some reason.\r\n return;\r\n }\r\n this.notifyListeners(key, storedValue);\r\n };\r\n const storedValue = this.storage.getItem(key);\r\n if (_isIE10() &&\r\n storedValue !== event.newValue &&\r\n event.newValue !== event.oldValue) {\r\n // IE 10 has this weird bug where a storage event would trigger with the\r\n // correct key, oldValue and newValue but localStorage.getItem(key) does\r\n // not yield the updated value until a few milliseconds. This ensures\r\n // this recovers from that situation.\r\n setTimeout(triggerListeners, IE10_LOCAL_STORAGE_SYNC_DELAY);\r\n }\r\n else {\r\n triggerListeners();\r\n }\r\n }\r\n notifyListeners(key, value) {\r\n this.localCache[key] = value;\r\n const listeners = this.listeners[key];\r\n if (listeners) {\r\n for (const listener of Array.from(listeners)) {\r\n listener(value ? JSON.parse(value) : value);\r\n }\r\n }\r\n }\r\n startPolling() {\r\n this.stopPolling();\r\n this.pollTimer = setInterval(() => {\r\n this.forAllChangedKeys((key, oldValue, newValue) => {\r\n this.onStorageEvent(new StorageEvent('storage', {\r\n key,\r\n oldValue,\r\n newValue\r\n }), \r\n /* poll */ true);\r\n });\r\n }, _POLLING_INTERVAL_MS$1);\r\n }\r\n stopPolling() {\r\n if (this.pollTimer) {\r\n clearInterval(this.pollTimer);\r\n this.pollTimer = null;\r\n }\r\n }\r\n attachListener() {\r\n window.addEventListener('storage', this.boundEventHandler);\r\n }\r\n detachListener() {\r\n window.removeEventListener('storage', this.boundEventHandler);\r\n }\r\n _addListener(key, listener) {\r\n if (Object.keys(this.listeners).length === 0) {\r\n // Whether browser can detect storage event when it had already been pushed to the background.\r\n // This may happen in some mobile browsers. A localStorage change in the foreground window\r\n // will not be detected in the background window via the storage event.\r\n // This was detected in iOS 7.x mobile browsers\r\n if (this.fallbackToPolling) {\r\n this.startPolling();\r\n }\r\n else {\r\n this.attachListener();\r\n }\r\n }\r\n if (!this.listeners[key]) {\r\n this.listeners[key] = new Set();\r\n // Populate the cache to avoid spuriously triggering on first poll.\r\n this.localCache[key] = this.storage.getItem(key);\r\n }\r\n this.listeners[key].add(listener);\r\n }\r\n _removeListener(key, listener) {\r\n if (this.listeners[key]) {\r\n this.listeners[key].delete(listener);\r\n if (this.listeners[key].size === 0) {\r\n delete this.listeners[key];\r\n }\r\n }\r\n if (Object.keys(this.listeners).length === 0) {\r\n this.detachListener();\r\n this.stopPolling();\r\n }\r\n }\r\n // Update local cache on base operations:\r\n async _set(key, value) {\r\n await super._set(key, value);\r\n this.localCache[key] = JSON.stringify(value);\r\n }\r\n async _get(key) {\r\n const value = await super._get(key);\r\n this.localCache[key] = JSON.stringify(value);\r\n return value;\r\n }\r\n async _remove(key) {\r\n await super._remove(key);\r\n delete this.localCache[key];\r\n }\r\n}\r\nBrowserLocalPersistence.type = 'LOCAL';\r\n/**\r\n * An implementation of {@link Persistence} of type `LOCAL` using `localStorage`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\r\nconst browserLocalPersistence = BrowserLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass BrowserSessionPersistence extends BrowserPersistenceClass {\r\n constructor() {\r\n super(() => window.sessionStorage, \"SESSION\" /* PersistenceType.SESSION */);\r\n }\r\n _addListener(_key, _listener) {\r\n // Listeners are not supported for session storage since it cannot be shared across windows\r\n return;\r\n }\r\n _removeListener(_key, _listener) {\r\n // Listeners are not supported for session storage since it cannot be shared across windows\r\n return;\r\n }\r\n}\r\nBrowserSessionPersistence.type = 'SESSION';\r\n/**\r\n * An implementation of {@link Persistence} of `SESSION` using `sessionStorage`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\r\nconst browserSessionPersistence = BrowserSessionPersistence;\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Shim for Promise.allSettled, note the slightly different format of `fulfilled` vs `status`.\r\n *\r\n * @param promises - Array of promises to wait on.\r\n */\r\nfunction _allSettled(promises) {\r\n return Promise.all(promises.map(async (promise) => {\r\n try {\r\n const value = await promise;\r\n return {\r\n fulfilled: true,\r\n value\r\n };\r\n }\r\n catch (reason) {\r\n return {\r\n fulfilled: false,\r\n reason\r\n };\r\n }\r\n }));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Interface class for receiving messages.\r\n *\r\n */\r\nclass Receiver {\r\n constructor(eventTarget) {\r\n this.eventTarget = eventTarget;\r\n this.handlersMap = {};\r\n this.boundEventHandler = this.handleEvent.bind(this);\r\n }\r\n /**\r\n * Obtain an instance of a Receiver for a given event target, if none exists it will be created.\r\n *\r\n * @param eventTarget - An event target (such as window or self) through which the underlying\r\n * messages will be received.\r\n */\r\n static _getInstance(eventTarget) {\r\n // The results are stored in an array since objects can't be keys for other\r\n // objects. In addition, setting a unique property on an event target as a\r\n // hash map key may not be allowed due to CORS restrictions.\r\n const existingInstance = this.receivers.find(receiver => receiver.isListeningto(eventTarget));\r\n if (existingInstance) {\r\n return existingInstance;\r\n }\r\n const newInstance = new Receiver(eventTarget);\r\n this.receivers.push(newInstance);\r\n return newInstance;\r\n }\r\n isListeningto(eventTarget) {\r\n return this.eventTarget === eventTarget;\r\n }\r\n /**\r\n * Fans out a MessageEvent to the appropriate listeners.\r\n *\r\n * @remarks\r\n * Sends an {@link Status.ACK} upon receipt and a {@link Status.DONE} once all handlers have\r\n * finished processing.\r\n *\r\n * @param event - The MessageEvent.\r\n *\r\n */\r\n async handleEvent(event) {\r\n const messageEvent = event;\r\n const { eventId, eventType, data } = messageEvent.data;\r\n const handlers = this.handlersMap[eventType];\r\n if (!(handlers === null || handlers === void 0 ? void 0 : handlers.size)) {\r\n return;\r\n }\r\n messageEvent.ports[0].postMessage({\r\n status: \"ack\" /* _Status.ACK */,\r\n eventId,\r\n eventType\r\n });\r\n const promises = Array.from(handlers).map(async (handler) => handler(messageEvent.origin, data));\r\n const response = await _allSettled(promises);\r\n messageEvent.ports[0].postMessage({\r\n status: \"done\" /* _Status.DONE */,\r\n eventId,\r\n eventType,\r\n response\r\n });\r\n }\r\n /**\r\n * Subscribe an event handler for a particular event.\r\n *\r\n * @param eventType - Event name to subscribe to.\r\n * @param eventHandler - The event handler which should receive the events.\r\n *\r\n */\r\n _subscribe(eventType, eventHandler) {\r\n if (Object.keys(this.handlersMap).length === 0) {\r\n this.eventTarget.addEventListener('message', this.boundEventHandler);\r\n }\r\n if (!this.handlersMap[eventType]) {\r\n this.handlersMap[eventType] = new Set();\r\n }\r\n this.handlersMap[eventType].add(eventHandler);\r\n }\r\n /**\r\n * Unsubscribe an event handler from a particular event.\r\n *\r\n * @param eventType - Event name to unsubscribe from.\r\n * @param eventHandler - Optinoal event handler, if none provided, unsubscribe all handlers on this event.\r\n *\r\n */\r\n _unsubscribe(eventType, eventHandler) {\r\n if (this.handlersMap[eventType] && eventHandler) {\r\n this.handlersMap[eventType].delete(eventHandler);\r\n }\r\n if (!eventHandler || this.handlersMap[eventType].size === 0) {\r\n delete this.handlersMap[eventType];\r\n }\r\n if (Object.keys(this.handlersMap).length === 0) {\r\n this.eventTarget.removeEventListener('message', this.boundEventHandler);\r\n }\r\n }\r\n}\r\nReceiver.receivers = [];\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _generateEventId(prefix = '', digits = 10) {\r\n let random = '';\r\n for (let i = 0; i < digits; i++) {\r\n random += Math.floor(Math.random() * 10);\r\n }\r\n return prefix + random;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Interface for sending messages and waiting for a completion response.\r\n *\r\n */\r\nclass Sender {\r\n constructor(target) {\r\n this.target = target;\r\n this.handlers = new Set();\r\n }\r\n /**\r\n * Unsubscribe the handler and remove it from our tracking Set.\r\n *\r\n * @param handler - The handler to unsubscribe.\r\n */\r\n removeMessageHandler(handler) {\r\n if (handler.messageChannel) {\r\n handler.messageChannel.port1.removeEventListener('message', handler.onMessage);\r\n handler.messageChannel.port1.close();\r\n }\r\n this.handlers.delete(handler);\r\n }\r\n /**\r\n * Send a message to the Receiver located at {@link target}.\r\n *\r\n * @remarks\r\n * We'll first wait a bit for an ACK , if we get one we will wait significantly longer until the\r\n * receiver has had a chance to fully process the event.\r\n *\r\n * @param eventType - Type of event to send.\r\n * @param data - The payload of the event.\r\n * @param timeout - Timeout for waiting on an ACK from the receiver.\r\n *\r\n * @returns An array of settled promises from all the handlers that were listening on the receiver.\r\n */\r\n async _send(eventType, data, timeout = 50 /* _TimeoutDuration.ACK */) {\r\n const messageChannel = typeof MessageChannel !== 'undefined' ? new MessageChannel() : null;\r\n if (!messageChannel) {\r\n throw new Error(\"connection_unavailable\" /* _MessageError.CONNECTION_UNAVAILABLE */);\r\n }\r\n // Node timers and browser timers return fundamentally different types.\r\n // We don't actually care what the value is but TS won't accept unknown and\r\n // we can't cast properly in both environments.\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n let completionTimer;\r\n let handler;\r\n return new Promise((resolve, reject) => {\r\n const eventId = _generateEventId('', 20);\r\n messageChannel.port1.start();\r\n const ackTimer = setTimeout(() => {\r\n reject(new Error(\"unsupported_event\" /* _MessageError.UNSUPPORTED_EVENT */));\r\n }, timeout);\r\n handler = {\r\n messageChannel,\r\n onMessage(event) {\r\n const messageEvent = event;\r\n if (messageEvent.data.eventId !== eventId) {\r\n return;\r\n }\r\n switch (messageEvent.data.status) {\r\n case \"ack\" /* _Status.ACK */:\r\n // The receiver should ACK first.\r\n clearTimeout(ackTimer);\r\n completionTimer = setTimeout(() => {\r\n reject(new Error(\"timeout\" /* _MessageError.TIMEOUT */));\r\n }, 3000 /* _TimeoutDuration.COMPLETION */);\r\n break;\r\n case \"done\" /* _Status.DONE */:\r\n // Once the receiver's handlers are finished we will get the results.\r\n clearTimeout(completionTimer);\r\n resolve(messageEvent.data.response);\r\n break;\r\n default:\r\n clearTimeout(ackTimer);\r\n clearTimeout(completionTimer);\r\n reject(new Error(\"invalid_response\" /* _MessageError.INVALID_RESPONSE */));\r\n break;\r\n }\r\n }\r\n };\r\n this.handlers.add(handler);\r\n messageChannel.port1.addEventListener('message', handler.onMessage);\r\n this.target.postMessage({\r\n eventType,\r\n eventId,\r\n data\r\n }, [messageChannel.port2]);\r\n }).finally(() => {\r\n if (handler) {\r\n this.removeMessageHandler(handler);\r\n }\r\n });\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Lazy accessor for window, since the compat layer won't tree shake this out,\r\n * we need to make sure not to mess with window unless we have to\r\n */\r\nfunction _window() {\r\n return window;\r\n}\r\nfunction _setWindowLocation(url) {\r\n _window().location.href = url;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction _isWorker() {\r\n return (typeof _window()['WorkerGlobalScope'] !== 'undefined' &&\r\n typeof _window()['importScripts'] === 'function');\r\n}\r\nasync function _getActiveServiceWorker() {\r\n if (!(navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker)) {\r\n return null;\r\n }\r\n try {\r\n const registration = await navigator.serviceWorker.ready;\r\n return registration.active;\r\n }\r\n catch (_a) {\r\n return null;\r\n }\r\n}\r\nfunction _getServiceWorkerController() {\r\n var _a;\r\n return ((_a = navigator === null || navigator === void 0 ? void 0 : navigator.serviceWorker) === null || _a === void 0 ? void 0 : _a.controller) || null;\r\n}\r\nfunction _getWorkerGlobalScope() {\r\n return _isWorker() ? self : null;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DB_NAME = 'firebaseLocalStorageDb';\r\nconst DB_VERSION = 1;\r\nconst DB_OBJECTSTORE_NAME = 'firebaseLocalStorage';\r\nconst DB_DATA_KEYPATH = 'fbase_key';\r\n/**\r\n * Promise wrapper for IDBRequest\r\n *\r\n * Unfortunately we can't cleanly extend Promise<T> since promises are not callable in ES6\r\n *\r\n */\r\nclass DBPromise {\r\n constructor(request) {\r\n this.request = request;\r\n }\r\n toPromise() {\r\n return new Promise((resolve, reject) => {\r\n this.request.addEventListener('success', () => {\r\n resolve(this.request.result);\r\n });\r\n this.request.addEventListener('error', () => {\r\n reject(this.request.error);\r\n });\r\n });\r\n }\r\n}\r\nfunction getObjectStore(db, isReadWrite) {\r\n return db\r\n .transaction([DB_OBJECTSTORE_NAME], isReadWrite ? 'readwrite' : 'readonly')\r\n .objectStore(DB_OBJECTSTORE_NAME);\r\n}\r\nfunction _deleteDatabase() {\r\n const request = indexedDB.deleteDatabase(DB_NAME);\r\n return new DBPromise(request).toPromise();\r\n}\r\nfunction _openDatabase() {\r\n const request = indexedDB.open(DB_NAME, DB_VERSION);\r\n return new Promise((resolve, reject) => {\r\n request.addEventListener('error', () => {\r\n reject(request.error);\r\n });\r\n request.addEventListener('upgradeneeded', () => {\r\n const db = request.result;\r\n try {\r\n db.createObjectStore(DB_OBJECTSTORE_NAME, { keyPath: DB_DATA_KEYPATH });\r\n }\r\n catch (e) {\r\n reject(e);\r\n }\r\n });\r\n request.addEventListener('success', async () => {\r\n const db = request.result;\r\n // Strange bug that occurs in Firefox when multiple tabs are opened at the\r\n // same time. The only way to recover seems to be deleting the database\r\n // and re-initializing it.\r\n // https://github.com/firebase/firebase-js-sdk/issues/634\r\n if (!db.objectStoreNames.contains(DB_OBJECTSTORE_NAME)) {\r\n // Need to close the database or else you get a `blocked` event\r\n db.close();\r\n await _deleteDatabase();\r\n resolve(await _openDatabase());\r\n }\r\n else {\r\n resolve(db);\r\n }\r\n });\r\n });\r\n}\r\nasync function _putObject(db, key, value) {\r\n const request = getObjectStore(db, true).put({\r\n [DB_DATA_KEYPATH]: key,\r\n value\r\n });\r\n return new DBPromise(request).toPromise();\r\n}\r\nasync function getObject(db, key) {\r\n const request = getObjectStore(db, false).get(key);\r\n const data = await new DBPromise(request).toPromise();\r\n return data === undefined ? null : data.value;\r\n}\r\nfunction _deleteObject(db, key) {\r\n const request = getObjectStore(db, true).delete(key);\r\n return new DBPromise(request).toPromise();\r\n}\r\nconst _POLLING_INTERVAL_MS = 800;\r\nconst _TRANSACTION_RETRY_COUNT = 3;\r\nclass IndexedDBLocalPersistence {\r\n constructor() {\r\n this.type = \"LOCAL\" /* PersistenceType.LOCAL */;\r\n this._shouldAllowMigration = true;\r\n this.listeners = {};\r\n this.localCache = {};\r\n // setTimeout return value is platform specific\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n this.pollTimer = null;\r\n this.pendingWrites = 0;\r\n this.receiver = null;\r\n this.sender = null;\r\n this.serviceWorkerReceiverAvailable = false;\r\n this.activeServiceWorker = null;\r\n // Fire & forget the service worker registration as it may never resolve\r\n this._workerInitializationPromise =\r\n this.initializeServiceWorkerMessaging().then(() => { }, () => { });\r\n }\r\n async _openDb() {\r\n if (this.db) {\r\n return this.db;\r\n }\r\n this.db = await _openDatabase();\r\n return this.db;\r\n }\r\n async _withRetries(op) {\r\n let numAttempts = 0;\r\n while (true) {\r\n try {\r\n const db = await this._openDb();\r\n return await op(db);\r\n }\r\n catch (e) {\r\n if (numAttempts++ > _TRANSACTION_RETRY_COUNT) {\r\n throw e;\r\n }\r\n if (this.db) {\r\n this.db.close();\r\n this.db = undefined;\r\n }\r\n // TODO: consider adding exponential backoff\r\n }\r\n }\r\n }\r\n /**\r\n * IndexedDB events do not propagate from the main window to the worker context. We rely on a\r\n * postMessage interface to send these events to the worker ourselves.\r\n */\r\n async initializeServiceWorkerMessaging() {\r\n return _isWorker() ? this.initializeReceiver() : this.initializeSender();\r\n }\r\n /**\r\n * As the worker we should listen to events from the main window.\r\n */\r\n async initializeReceiver() {\r\n this.receiver = Receiver._getInstance(_getWorkerGlobalScope());\r\n // Refresh from persistence if we receive a KeyChanged message.\r\n this.receiver._subscribe(\"keyChanged\" /* _EventType.KEY_CHANGED */, async (_origin, data) => {\r\n const keys = await this._poll();\r\n return {\r\n keyProcessed: keys.includes(data.key)\r\n };\r\n });\r\n // Let the sender know that we are listening so they give us more timeout.\r\n this.receiver._subscribe(\"ping\" /* _EventType.PING */, async (_origin, _data) => {\r\n return [\"keyChanged\" /* _EventType.KEY_CHANGED */];\r\n });\r\n }\r\n /**\r\n * As the main window, we should let the worker know when keys change (set and remove).\r\n *\r\n * @remarks\r\n * {@link https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorkerContainer/ready | ServiceWorkerContainer.ready}\r\n * may not resolve.\r\n */\r\n async initializeSender() {\r\n var _a, _b;\r\n // Check to see if there's an active service worker.\r\n this.activeServiceWorker = await _getActiveServiceWorker();\r\n if (!this.activeServiceWorker) {\r\n return;\r\n }\r\n this.sender = new Sender(this.activeServiceWorker);\r\n // Ping the service worker to check what events they can handle.\r\n const results = await this.sender._send(\"ping\" /* _EventType.PING */, {}, 800 /* _TimeoutDuration.LONG_ACK */);\r\n if (!results) {\r\n return;\r\n }\r\n if (((_a = results[0]) === null || _a === void 0 ? void 0 : _a.fulfilled) &&\r\n ((_b = results[0]) === null || _b === void 0 ? void 0 : _b.value.includes(\"keyChanged\" /* _EventType.KEY_CHANGED */))) {\r\n this.serviceWorkerReceiverAvailable = true;\r\n }\r\n }\r\n /**\r\n * Let the worker know about a changed key, the exact key doesn't technically matter since the\r\n * worker will just trigger a full sync anyway.\r\n *\r\n * @remarks\r\n * For now, we only support one service worker per page.\r\n *\r\n * @param key - Storage key which changed.\r\n */\r\n async notifyServiceWorker(key) {\r\n if (!this.sender ||\r\n !this.activeServiceWorker ||\r\n _getServiceWorkerController() !== this.activeServiceWorker) {\r\n return;\r\n }\r\n try {\r\n await this.sender._send(\"keyChanged\" /* _EventType.KEY_CHANGED */, { key }, \r\n // Use long timeout if receiver has previously responded to a ping from us.\r\n this.serviceWorkerReceiverAvailable\r\n ? 800 /* _TimeoutDuration.LONG_ACK */\r\n : 50 /* _TimeoutDuration.ACK */);\r\n }\r\n catch (_a) {\r\n // This is a best effort approach. Ignore errors.\r\n }\r\n }\r\n async _isAvailable() {\r\n try {\r\n if (!indexedDB) {\r\n return false;\r\n }\r\n const db = await _openDatabase();\r\n await _putObject(db, STORAGE_AVAILABLE_KEY, '1');\r\n await _deleteObject(db, STORAGE_AVAILABLE_KEY);\r\n return true;\r\n }\r\n catch (_a) { }\r\n return false;\r\n }\r\n async _withPendingWrite(write) {\r\n this.pendingWrites++;\r\n try {\r\n await write();\r\n }\r\n finally {\r\n this.pendingWrites--;\r\n }\r\n }\r\n async _set(key, value) {\r\n return this._withPendingWrite(async () => {\r\n await this._withRetries((db) => _putObject(db, key, value));\r\n this.localCache[key] = value;\r\n return this.notifyServiceWorker(key);\r\n });\r\n }\r\n async _get(key) {\r\n const obj = (await this._withRetries((db) => getObject(db, key)));\r\n this.localCache[key] = obj;\r\n return obj;\r\n }\r\n async _remove(key) {\r\n return this._withPendingWrite(async () => {\r\n await this._withRetries((db) => _deleteObject(db, key));\r\n delete this.localCache[key];\r\n return this.notifyServiceWorker(key);\r\n });\r\n }\r\n async _poll() {\r\n // TODO: check if we need to fallback if getAll is not supported\r\n const result = await this._withRetries((db) => {\r\n const getAllRequest = getObjectStore(db, false).getAll();\r\n return new DBPromise(getAllRequest).toPromise();\r\n });\r\n if (!result) {\r\n return [];\r\n }\r\n // If we have pending writes in progress abort, we'll get picked up on the next poll\r\n if (this.pendingWrites !== 0) {\r\n return [];\r\n }\r\n const keys = [];\r\n const keysInResult = new Set();\r\n for (const { fbase_key: key, value } of result) {\r\n keysInResult.add(key);\r\n if (JSON.stringify(this.localCache[key]) !== JSON.stringify(value)) {\r\n this.notifyListeners(key, value);\r\n keys.push(key);\r\n }\r\n }\r\n for (const localKey of Object.keys(this.localCache)) {\r\n if (this.localCache[localKey] && !keysInResult.has(localKey)) {\r\n // Deleted\r\n this.notifyListeners(localKey, null);\r\n keys.push(localKey);\r\n }\r\n }\r\n return keys;\r\n }\r\n notifyListeners(key, newValue) {\r\n this.localCache[key] = newValue;\r\n const listeners = this.listeners[key];\r\n if (listeners) {\r\n for (const listener of Array.from(listeners)) {\r\n listener(newValue);\r\n }\r\n }\r\n }\r\n startPolling() {\r\n this.stopPolling();\r\n this.pollTimer = setInterval(async () => this._poll(), _POLLING_INTERVAL_MS);\r\n }\r\n stopPolling() {\r\n if (this.pollTimer) {\r\n clearInterval(this.pollTimer);\r\n this.pollTimer = null;\r\n }\r\n }\r\n _addListener(key, listener) {\r\n if (Object.keys(this.listeners).length === 0) {\r\n this.startPolling();\r\n }\r\n if (!this.listeners[key]) {\r\n this.listeners[key] = new Set();\r\n // Populate the cache to avoid spuriously triggering on first poll.\r\n void this._get(key); // This can happen in the background async and we can return immediately.\r\n }\r\n this.listeners[key].add(listener);\r\n }\r\n _removeListener(key, listener) {\r\n if (this.listeners[key]) {\r\n this.listeners[key].delete(listener);\r\n if (this.listeners[key].size === 0) {\r\n delete this.listeners[key];\r\n }\r\n }\r\n if (Object.keys(this.listeners).length === 0) {\r\n this.stopPolling();\r\n }\r\n }\r\n}\r\nIndexedDBLocalPersistence.type = 'LOCAL';\r\n/**\r\n * An implementation of {@link Persistence} of type `LOCAL` using `indexedDB`\r\n * for the underlying storage.\r\n *\r\n * @public\r\n */\r\nconst indexedDBLocalPersistence = IndexedDBLocalPersistence;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction startSignInPhoneMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:start\" /* Endpoint.START_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\r\n}\r\nfunction finalizeSignInPhoneMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:finalize\" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\r\n}\r\nfunction finalizeSignInTotpMfa(auth, request) {\r\n return _performApiRequest(auth, \"POST\" /* HttpMethod.POST */, \"/v2/accounts/mfaSignIn:finalize\" /* Endpoint.FINALIZE_MFA_SIGN_IN */, _addTidIfNecessary(auth, request));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst _SOLVE_TIME_MS = 500;\r\nconst _EXPIRATION_TIME_MS = 60000;\r\nconst _WIDGET_ID_START = 1000000000000;\r\nclass MockReCaptcha {\r\n constructor(auth) {\r\n this.auth = auth;\r\n this.counter = _WIDGET_ID_START;\r\n this._widgets = new Map();\r\n }\r\n render(container, parameters) {\r\n const id = this.counter;\r\n this._widgets.set(id, new MockWidget(container, this.auth.name, parameters || {}));\r\n this.counter++;\r\n return id;\r\n }\r\n reset(optWidgetId) {\r\n var _a;\r\n const id = optWidgetId || _WIDGET_ID_START;\r\n void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.delete());\r\n this._widgets.delete(id);\r\n }\r\n getResponse(optWidgetId) {\r\n var _a;\r\n const id = optWidgetId || _WIDGET_ID_START;\r\n return ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.getResponse()) || '';\r\n }\r\n async execute(optWidgetId) {\r\n var _a;\r\n const id = optWidgetId || _WIDGET_ID_START;\r\n void ((_a = this._widgets.get(id)) === null || _a === void 0 ? void 0 : _a.execute());\r\n return '';\r\n }\r\n}\r\nclass MockWidget {\r\n constructor(containerOrId, appName, params) {\r\n this.params = params;\r\n this.timerId = null;\r\n this.deleted = false;\r\n this.responseToken = null;\r\n this.clickHandler = () => {\r\n this.execute();\r\n };\r\n const container = typeof containerOrId === 'string'\r\n ? document.getElementById(containerOrId)\r\n : containerOrId;\r\n _assert(container, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */, { appName });\r\n this.container = container;\r\n this.isVisible = this.params.size !== 'invisible';\r\n if (this.isVisible) {\r\n this.execute();\r\n }\r\n else {\r\n this.container.addEventListener('click', this.clickHandler);\r\n }\r\n }\r\n getResponse() {\r\n this.checkIfDeleted();\r\n return this.responseToken;\r\n }\r\n delete() {\r\n this.checkIfDeleted();\r\n this.deleted = true;\r\n if (this.timerId) {\r\n clearTimeout(this.timerId);\r\n this.timerId = null;\r\n }\r\n this.container.removeEventListener('click', this.clickHandler);\r\n }\r\n execute() {\r\n this.checkIfDeleted();\r\n if (this.timerId) {\r\n return;\r\n }\r\n this.timerId = window.setTimeout(() => {\r\n this.responseToken = generateRandomAlphaNumericString(50);\r\n const { callback, 'expired-callback': expiredCallback } = this.params;\r\n if (callback) {\r\n try {\r\n callback(this.responseToken);\r\n }\r\n catch (e) { }\r\n }\r\n this.timerId = window.setTimeout(() => {\r\n this.timerId = null;\r\n this.responseToken = null;\r\n if (expiredCallback) {\r\n try {\r\n expiredCallback();\r\n }\r\n catch (e) { }\r\n }\r\n if (this.isVisible) {\r\n this.execute();\r\n }\r\n }, _EXPIRATION_TIME_MS);\r\n }, _SOLVE_TIME_MS);\r\n }\r\n checkIfDeleted() {\r\n if (this.deleted) {\r\n throw new Error('reCAPTCHA mock was already deleted!');\r\n }\r\n }\r\n}\r\nfunction generateRandomAlphaNumericString(len) {\r\n const chars = [];\r\n const allowedChars = '1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n for (let i = 0; i < len; i++) {\r\n chars.push(allowedChars.charAt(Math.floor(Math.random() * allowedChars.length)));\r\n }\r\n return chars.join('');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// ReCaptcha will load using the same callback, so the callback function needs\r\n// to be kept around\r\nconst _JSLOAD_CALLBACK = _generateCallbackName('rcb');\r\nconst NETWORK_TIMEOUT_DELAY = new Delay(30000, 60000);\r\nconst RECAPTCHA_BASE = 'https://www.google.com/recaptcha/api.js?';\r\n/**\r\n * Loader for the GReCaptcha library. There should only ever be one of this.\r\n */\r\nclass ReCaptchaLoaderImpl {\r\n constructor() {\r\n var _a;\r\n this.hostLanguage = '';\r\n this.counter = 0;\r\n /**\r\n * Check for `render()` method. `window.grecaptcha` will exist if the Enterprise\r\n * version of the ReCAPTCHA script was loaded by someone else (e.g. App Check) but\r\n * `window.grecaptcha.render()` will not. Another load will add it.\r\n */\r\n this.librarySeparatelyLoaded = !!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render);\r\n }\r\n load(auth, hl = '') {\r\n _assert(isHostLanguageValid(hl), auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n if (this.shouldResolveImmediately(hl) && isV2(_window().grecaptcha)) {\r\n return Promise.resolve(_window().grecaptcha);\r\n }\r\n return new Promise((resolve, reject) => {\r\n const networkTimeout = _window().setTimeout(() => {\r\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\r\n }, NETWORK_TIMEOUT_DELAY.get());\r\n _window()[_JSLOAD_CALLBACK] = () => {\r\n _window().clearTimeout(networkTimeout);\r\n delete _window()[_JSLOAD_CALLBACK];\r\n const recaptcha = _window().grecaptcha;\r\n if (!recaptcha || !isV2(recaptcha)) {\r\n reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\r\n return;\r\n }\r\n // Wrap the greptcha render function so that we know if the developer has\r\n // called it separately\r\n const render = recaptcha.render;\r\n recaptcha.render = (container, params) => {\r\n const widgetId = render(container, params);\r\n this.counter++;\r\n return widgetId;\r\n };\r\n this.hostLanguage = hl;\r\n resolve(recaptcha);\r\n };\r\n const url = `${RECAPTCHA_BASE}?${querystring({\r\n onload: _JSLOAD_CALLBACK,\r\n render: 'explicit',\r\n hl\r\n })}`;\r\n _loadJS(url).catch(() => {\r\n clearTimeout(networkTimeout);\r\n reject(_createError(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */));\r\n });\r\n });\r\n }\r\n clearedOneInstance() {\r\n this.counter--;\r\n }\r\n shouldResolveImmediately(hl) {\r\n var _a;\r\n // We can resolve immediately if:\r\n // • grecaptcha is already defined AND (\r\n // 1. the requested language codes are the same OR\r\n // 2. there exists already a ReCaptcha on the page\r\n // 3. the library was already loaded by the app\r\n // In cases (2) and (3), we _can't_ reload as it would break the recaptchas\r\n // that are already in the page\r\n return (!!((_a = _window().grecaptcha) === null || _a === void 0 ? void 0 : _a.render) &&\r\n (hl === this.hostLanguage ||\r\n this.counter > 0 ||\r\n this.librarySeparatelyLoaded));\r\n }\r\n}\r\nfunction isHostLanguageValid(hl) {\r\n return hl.length <= 6 && /^\\s*[a-zA-Z0-9\\-]*\\s*$/.test(hl);\r\n}\r\nclass MockReCaptchaLoaderImpl {\r\n async load(auth) {\r\n return new MockReCaptcha(auth);\r\n }\r\n clearedOneInstance() { }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst RECAPTCHA_VERIFIER_TYPE = 'recaptcha';\r\nconst DEFAULT_PARAMS = {\r\n theme: 'light',\r\n type: 'image'\r\n};\r\n/**\r\n * An {@link https://www.google.com/recaptcha/ | reCAPTCHA}-based application verifier.\r\n *\r\n * @remarks\r\n * `RecaptchaVerifier` does not work in a Node.js environment.\r\n *\r\n * @public\r\n */\r\nclass RecaptchaVerifier {\r\n /**\r\n * @param authExtern - The corresponding Firebase {@link Auth} instance.\r\n *\r\n * @param containerOrId - The reCAPTCHA container parameter.\r\n *\r\n * @remarks\r\n * This has different meaning depending on whether the reCAPTCHA is hidden or visible. For a\r\n * visible reCAPTCHA the container must be empty. If a string is used, it has to correspond to\r\n * an element ID. The corresponding element must also must be in the DOM at the time of\r\n * initialization.\r\n *\r\n * @param parameters - The optional reCAPTCHA parameters.\r\n *\r\n * @remarks\r\n * Check the reCAPTCHA docs for a comprehensive list. All parameters are accepted except for\r\n * the sitekey. Firebase Auth backend provisions a reCAPTCHA for each project and will\r\n * configure this upon rendering. For an invisible reCAPTCHA, a size key must have the value\r\n * 'invisible'.\r\n */\r\n constructor(authExtern, containerOrId, parameters = Object.assign({}, DEFAULT_PARAMS)) {\r\n this.parameters = parameters;\r\n /**\r\n * The application verifier type.\r\n *\r\n * @remarks\r\n * For a reCAPTCHA verifier, this is 'recaptcha'.\r\n */\r\n this.type = RECAPTCHA_VERIFIER_TYPE;\r\n this.destroyed = false;\r\n this.widgetId = null;\r\n this.tokenChangeListeners = new Set();\r\n this.renderPromise = null;\r\n this.recaptcha = null;\r\n this.auth = _castAuth(authExtern);\r\n this.isInvisible = this.parameters.size === 'invisible';\r\n _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\r\n const container = typeof containerOrId === 'string'\r\n ? document.getElementById(containerOrId)\r\n : containerOrId;\r\n _assert(container, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n this.container = container;\r\n this.parameters.callback = this.makeTokenCallback(this.parameters.callback);\r\n this._recaptchaLoader = this.auth.settings.appVerificationDisabledForTesting\r\n ? new MockReCaptchaLoaderImpl()\r\n : new ReCaptchaLoaderImpl();\r\n this.validateStartingState();\r\n // TODO: Figure out if sdk version is needed\r\n }\r\n /**\r\n * Waits for the user to solve the reCAPTCHA and resolves with the reCAPTCHA token.\r\n *\r\n * @returns A Promise for the reCAPTCHA token.\r\n */\r\n async verify() {\r\n this.assertNotDestroyed();\r\n const id = await this.render();\r\n const recaptcha = this.getAssertedRecaptcha();\r\n const response = recaptcha.getResponse(id);\r\n if (response) {\r\n return response;\r\n }\r\n return new Promise(resolve => {\r\n const tokenChange = (token) => {\r\n if (!token) {\r\n return; // Ignore token expirations.\r\n }\r\n this.tokenChangeListeners.delete(tokenChange);\r\n resolve(token);\r\n };\r\n this.tokenChangeListeners.add(tokenChange);\r\n if (this.isInvisible) {\r\n recaptcha.execute(id);\r\n }\r\n });\r\n }\r\n /**\r\n * Renders the reCAPTCHA widget on the page.\r\n *\r\n * @returns A Promise that resolves with the reCAPTCHA widget ID.\r\n */\r\n render() {\r\n try {\r\n this.assertNotDestroyed();\r\n }\r\n catch (e) {\r\n // This method returns a promise. Since it's not async (we want to return the\r\n // _same_ promise if rendering is still occurring), the API surface should\r\n // reject with the error rather than just throw\r\n return Promise.reject(e);\r\n }\r\n if (this.renderPromise) {\r\n return this.renderPromise;\r\n }\r\n this.renderPromise = this.makeRenderPromise().catch(e => {\r\n this.renderPromise = null;\r\n throw e;\r\n });\r\n return this.renderPromise;\r\n }\r\n /** @internal */\r\n _reset() {\r\n this.assertNotDestroyed();\r\n if (this.widgetId !== null) {\r\n this.getAssertedRecaptcha().reset(this.widgetId);\r\n }\r\n }\r\n /**\r\n * Clears the reCAPTCHA widget from the page and destroys the instance.\r\n */\r\n clear() {\r\n this.assertNotDestroyed();\r\n this.destroyed = true;\r\n this._recaptchaLoader.clearedOneInstance();\r\n if (!this.isInvisible) {\r\n this.container.childNodes.forEach(node => {\r\n this.container.removeChild(node);\r\n });\r\n }\r\n }\r\n validateStartingState() {\r\n _assert(!this.parameters.sitekey, this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n _assert(this.isInvisible || !this.container.hasChildNodes(), this.auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n _assert(typeof document !== 'undefined', this.auth, \"operation-not-supported-in-this-environment\" /* AuthErrorCode.OPERATION_NOT_SUPPORTED */);\r\n }\r\n makeTokenCallback(existing) {\r\n return token => {\r\n this.tokenChangeListeners.forEach(listener => listener(token));\r\n if (typeof existing === 'function') {\r\n existing(token);\r\n }\r\n else if (typeof existing === 'string') {\r\n const globalFunc = _window()[existing];\r\n if (typeof globalFunc === 'function') {\r\n globalFunc(token);\r\n }\r\n }\r\n };\r\n }\r\n assertNotDestroyed() {\r\n _assert(!this.destroyed, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }\r\n async makeRenderPromise() {\r\n await this.init();\r\n if (!this.widgetId) {\r\n let container = this.container;\r\n if (!this.isInvisible) {\r\n const guaranteedEmpty = document.createElement('div');\r\n container.appendChild(guaranteedEmpty);\r\n container = guaranteedEmpty;\r\n }\r\n this.widgetId = this.getAssertedRecaptcha().render(container, this.parameters);\r\n }\r\n return this.widgetId;\r\n }\r\n async init() {\r\n _assert(_isHttpOrHttps() && !_isWorker(), this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n await domReady();\r\n this.recaptcha = await this._recaptchaLoader.load(this.auth, this.auth.languageCode || undefined);\r\n const siteKey = await getRecaptchaParams(this.auth);\r\n _assert(siteKey, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n this.parameters.sitekey = siteKey;\r\n }\r\n getAssertedRecaptcha() {\r\n _assert(this.recaptcha, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return this.recaptcha;\r\n }\r\n}\r\nfunction domReady() {\r\n let resolver = null;\r\n return new Promise(resolve => {\r\n if (document.readyState === 'complete') {\r\n resolve();\r\n return;\r\n }\r\n // Document not ready, wait for load before resolving.\r\n // Save resolver, so we can remove listener in case it was externally\r\n // cancelled.\r\n resolver = () => resolve();\r\n window.addEventListener('load', resolver);\r\n }).catch(e => {\r\n if (resolver) {\r\n window.removeEventListener('load', resolver);\r\n }\r\n throw e;\r\n });\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass ConfirmationResultImpl {\r\n constructor(verificationId, onConfirmation) {\r\n this.verificationId = verificationId;\r\n this.onConfirmation = onConfirmation;\r\n }\r\n confirm(verificationCode) {\r\n const authCredential = PhoneAuthCredential._fromVerification(this.verificationId, verificationCode);\r\n return this.onConfirmation(authCredential);\r\n }\r\n}\r\n/**\r\n * Asynchronously signs in using a phone number.\r\n *\r\n * @remarks\r\n * This method sends a code via SMS to the given\r\n * phone number, and returns a {@link ConfirmationResult}. After the user\r\n * provides the code sent to their phone, call {@link ConfirmationResult.confirm}\r\n * with the code to sign the user in.\r\n *\r\n * For abuse prevention, this method also requires a {@link ApplicationVerifier}.\r\n * This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.\r\n * This function can work on other platforms that do not support the\r\n * {@link RecaptchaVerifier} (like React Native), but you need to use a\r\n * third-party {@link ApplicationVerifier} implementation.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');\r\n * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain a verificationCode from the user.\r\n * const credential = await confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\r\nasync function signInWithPhoneNumber(auth, phoneNumber, appVerifier) {\r\n const authInternal = _castAuth(auth);\r\n const verificationId = await _verifyPhoneNumber(authInternal, phoneNumber, getModularInstance(appVerifier));\r\n return new ConfirmationResultImpl(verificationId, cred => signInWithCredential(authInternal, cred));\r\n}\r\n/**\r\n * Links the user account with the given phone number.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\r\nasync function linkWithPhoneNumber(user, phoneNumber, appVerifier) {\r\n const userInternal = getModularInstance(user);\r\n await _assertLinkedStatus(false, userInternal, \"phone\" /* ProviderId.PHONE */);\r\n const verificationId = await _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\r\n return new ConfirmationResultImpl(verificationId, cred => linkWithCredential(userInternal, cred));\r\n}\r\n/**\r\n * Re-authenticates a user using a fresh phone credential.\r\n *\r\n * @remarks\r\n * Use before operations such as {@link updatePassword} that require tokens from recent sign-in attempts.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param user - The user.\r\n * @param phoneNumber - The user's phone number in E.164 format (e.g. +16505550101).\r\n * @param appVerifier - The {@link ApplicationVerifier}.\r\n *\r\n * @public\r\n */\r\nasync function reauthenticateWithPhoneNumber(user, phoneNumber, appVerifier) {\r\n const userInternal = getModularInstance(user);\r\n const verificationId = await _verifyPhoneNumber(userInternal.auth, phoneNumber, getModularInstance(appVerifier));\r\n return new ConfirmationResultImpl(verificationId, cred => reauthenticateWithCredential(userInternal, cred));\r\n}\r\n/**\r\n * Returns a verification ID to be used in conjunction with the SMS code that is sent.\r\n *\r\n */\r\nasync function _verifyPhoneNumber(auth, options, verifier) {\r\n var _a;\r\n const recaptchaToken = await verifier.verify();\r\n try {\r\n _assert(typeof recaptchaToken === 'string', auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n _assert(verifier.type === RECAPTCHA_VERIFIER_TYPE, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n let phoneInfoOptions;\r\n if (typeof options === 'string') {\r\n phoneInfoOptions = {\r\n phoneNumber: options\r\n };\r\n }\r\n else {\r\n phoneInfoOptions = options;\r\n }\r\n if ('session' in phoneInfoOptions) {\r\n const session = phoneInfoOptions.session;\r\n if ('phoneNumber' in phoneInfoOptions) {\r\n _assert(session.type === \"enroll\" /* MultiFactorSessionType.ENROLL */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const response = await startEnrollPhoneMfa(auth, {\r\n idToken: session.credential,\r\n phoneEnrollmentInfo: {\r\n phoneNumber: phoneInfoOptions.phoneNumber,\r\n recaptchaToken\r\n }\r\n });\r\n return response.phoneSessionInfo.sessionInfo;\r\n }\r\n else {\r\n _assert(session.type === \"signin\" /* MultiFactorSessionType.SIGN_IN */, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const mfaEnrollmentId = ((_a = phoneInfoOptions.multiFactorHint) === null || _a === void 0 ? void 0 : _a.uid) ||\r\n phoneInfoOptions.multiFactorUid;\r\n _assert(mfaEnrollmentId, auth, \"missing-multi-factor-info\" /* AuthErrorCode.MISSING_MFA_INFO */);\r\n const response = await startSignInPhoneMfa(auth, {\r\n mfaPendingCredential: session.credential,\r\n mfaEnrollmentId,\r\n phoneSignInInfo: {\r\n recaptchaToken\r\n }\r\n });\r\n return response.phoneResponseInfo.sessionInfo;\r\n }\r\n }\r\n else {\r\n const { sessionInfo } = await sendPhoneVerificationCode(auth, {\r\n phoneNumber: phoneInfoOptions.phoneNumber,\r\n recaptchaToken\r\n });\r\n return sessionInfo;\r\n }\r\n }\r\n finally {\r\n verifier._reset();\r\n }\r\n}\r\n/**\r\n * Updates the user's phone number.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * await updatePhoneNumber(user, phoneCredential);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param credential - A credential authenticating the new phone number.\r\n *\r\n * @public\r\n */\r\nasync function updatePhoneNumber(user, credential) {\r\n await _link$1(getModularInstance(user), credential);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Provider for generating an {@link PhoneAuthCredential}.\r\n *\r\n * @remarks\r\n * `PhoneAuthProvider` does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // 'recaptcha-container' is the ID of an element in the DOM.\r\n * const applicationVerifier = new RecaptchaVerifier('recaptcha-container');\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);\r\n * // Obtain the verificationCode from the user.\r\n * const phoneCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = await signInWithCredential(auth, phoneCredential);\r\n * ```\r\n *\r\n * @public\r\n */\r\nclass PhoneAuthProvider {\r\n /**\r\n * @param auth - The Firebase {@link Auth} instance in which sign-ins should occur.\r\n *\r\n */\r\n constructor(auth) {\r\n /** Always set to {@link ProviderId}.PHONE. */\r\n this.providerId = PhoneAuthProvider.PROVIDER_ID;\r\n this.auth = _castAuth(auth);\r\n }\r\n /**\r\n *\r\n * Starts a phone number authentication flow by sending a verification code to the given phone\r\n * number.\r\n *\r\n * @example\r\n * ```javascript\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = await signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n * ```javascript\r\n * const confirmationResult = signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const userCredential = confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param phoneInfoOptions - The user's {@link PhoneInfoOptions}. The phone number should be in\r\n * E.164 format (e.g. +16505550101).\r\n * @param applicationVerifier - For abuse prevention, this method also requires a\r\n * {@link ApplicationVerifier}. This SDK includes a reCAPTCHA-based implementation,\r\n * {@link RecaptchaVerifier}.\r\n *\r\n * @returns A Promise for a verification ID that can be passed to\r\n * {@link PhoneAuthProvider.credential} to identify this flow..\r\n */\r\n verifyPhoneNumber(phoneOptions, applicationVerifier) {\r\n return _verifyPhoneNumber(this.auth, phoneOptions, getModularInstance(applicationVerifier));\r\n }\r\n /**\r\n * Creates a phone auth credential, given the verification ID from\r\n * {@link PhoneAuthProvider.verifyPhoneNumber} and the code that was sent to the user's\r\n * mobile device.\r\n *\r\n * @example\r\n * ```javascript\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = provider.verifyPhoneNumber(phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const authCredential = PhoneAuthProvider.credential(verificationId, verificationCode);\r\n * const userCredential = signInWithCredential(auth, authCredential);\r\n * ```\r\n *\r\n * @example\r\n * An alternative flow is provided using the `signInWithPhoneNumber` method.\r\n * ```javascript\r\n * const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);\r\n * // Obtain verificationCode from the user.\r\n * const userCredential = await confirmationResult.confirm(verificationCode);\r\n * ```\r\n *\r\n * @param verificationId - The verification ID returned from {@link PhoneAuthProvider.verifyPhoneNumber}.\r\n * @param verificationCode - The verification code sent to the user's mobile device.\r\n *\r\n * @returns The auth provider credential.\r\n */\r\n static credential(verificationId, verificationCode) {\r\n return PhoneAuthCredential._fromVerification(verificationId, verificationCode);\r\n }\r\n /**\r\n * Generates an {@link AuthCredential} from a {@link UserCredential}.\r\n * @param userCredential - The user credential.\r\n */\r\n static credentialFromResult(userCredential) {\r\n const credential = userCredential;\r\n return PhoneAuthProvider.credentialFromTaggedObject(credential);\r\n }\r\n /**\r\n * Returns an {@link AuthCredential} when passed an error.\r\n *\r\n * @remarks\r\n *\r\n * This method works for errors like\r\n * `auth/account-exists-with-different-credentials`. This is useful for\r\n * recovering when attempting to set a user's phone number but the number\r\n * in question is already tied to another account. For example, the following\r\n * code tries to update the current user's phone number, and if that\r\n * fails, links the user with the account associated with that number:\r\n *\r\n * ```js\r\n * const provider = new PhoneAuthProvider(auth);\r\n * const verificationId = await provider.verifyPhoneNumber(number, verifier);\r\n * try {\r\n * const code = ''; // Prompt the user for the verification code\r\n * await updatePhoneNumber(\r\n * auth.currentUser,\r\n * PhoneAuthProvider.credential(verificationId, code));\r\n * } catch (e) {\r\n * if ((e as FirebaseError)?.code === 'auth/account-exists-with-different-credential') {\r\n * const cred = PhoneAuthProvider.credentialFromError(e);\r\n * await linkWithCredential(auth.currentUser, cred);\r\n * }\r\n * }\r\n *\r\n * // At this point, auth.currentUser.phoneNumber === number.\r\n * ```\r\n *\r\n * @param error - The error to generate a credential from.\r\n */\r\n static credentialFromError(error) {\r\n return PhoneAuthProvider.credentialFromTaggedObject((error.customData || {}));\r\n }\r\n static credentialFromTaggedObject({ _tokenResponse: tokenResponse }) {\r\n if (!tokenResponse) {\r\n return null;\r\n }\r\n const { phoneNumber, temporaryProof } = tokenResponse;\r\n if (phoneNumber && temporaryProof) {\r\n return PhoneAuthCredential._fromTokenResponse(phoneNumber, temporaryProof);\r\n }\r\n return null;\r\n }\r\n}\r\n/** Always set to {@link ProviderId}.PHONE. */\r\nPhoneAuthProvider.PROVIDER_ID = \"phone\" /* ProviderId.PHONE */;\r\n/** Always set to {@link SignInMethod}.PHONE. */\r\nPhoneAuthProvider.PHONE_SIGN_IN_METHOD = \"phone\" /* SignInMethod.PHONE */;\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Chooses a popup/redirect resolver to use. This prefers the override (which\r\n * is directly passed in), and falls back to the property set on the auth\r\n * object. If neither are available, this function errors w/ an argument error.\r\n */\r\nfunction _withDefaultResolver(auth, resolverOverride) {\r\n if (resolverOverride) {\r\n return _getInstance(resolverOverride);\r\n }\r\n _assert(auth._popupRedirectResolver, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n return auth._popupRedirectResolver;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass IdpCredential extends AuthCredential {\r\n constructor(params) {\r\n super(\"custom\" /* ProviderId.CUSTOM */, \"custom\" /* ProviderId.CUSTOM */);\r\n this.params = params;\r\n }\r\n _getIdTokenResponse(auth) {\r\n return signInWithIdp(auth, this._buildIdpRequest());\r\n }\r\n _linkToIdToken(auth, idToken) {\r\n return signInWithIdp(auth, this._buildIdpRequest(idToken));\r\n }\r\n _getReauthenticationResolver(auth) {\r\n return signInWithIdp(auth, this._buildIdpRequest());\r\n }\r\n _buildIdpRequest(idToken) {\r\n const request = {\r\n requestUri: this.params.requestUri,\r\n sessionId: this.params.sessionId,\r\n postBody: this.params.postBody,\r\n tenantId: this.params.tenantId,\r\n pendingToken: this.params.pendingToken,\r\n returnSecureToken: true,\r\n returnIdpCredential: true\r\n };\r\n if (idToken) {\r\n request.idToken = idToken;\r\n }\r\n return request;\r\n }\r\n}\r\nfunction _signIn(params) {\r\n return _signInWithCredential(params.auth, new IdpCredential(params), params.bypassAuthState);\r\n}\r\nfunction _reauth(params) {\r\n const { auth, user } = params;\r\n _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return _reauthenticate(user, new IdpCredential(params), params.bypassAuthState);\r\n}\r\nasync function _link(params) {\r\n const { auth, user } = params;\r\n _assert(user, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return _link$1(user, new IdpCredential(params), params.bypassAuthState);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n */\r\nclass AbstractPopupRedirectOperation {\r\n constructor(auth, filter, resolver, user, bypassAuthState = false) {\r\n this.auth = auth;\r\n this.resolver = resolver;\r\n this.user = user;\r\n this.bypassAuthState = bypassAuthState;\r\n this.pendingPromise = null;\r\n this.eventManager = null;\r\n this.filter = Array.isArray(filter) ? filter : [filter];\r\n }\r\n execute() {\r\n return new Promise(async (resolve, reject) => {\r\n this.pendingPromise = { resolve, reject };\r\n try {\r\n this.eventManager = await this.resolver._initialize(this.auth);\r\n await this.onExecution();\r\n this.eventManager.registerConsumer(this);\r\n }\r\n catch (e) {\r\n this.reject(e);\r\n }\r\n });\r\n }\r\n async onAuthEvent(event) {\r\n const { urlResponse, sessionId, postBody, tenantId, error, type } = event;\r\n if (error) {\r\n this.reject(error);\r\n return;\r\n }\r\n const params = {\r\n auth: this.auth,\r\n requestUri: urlResponse,\r\n sessionId: sessionId,\r\n tenantId: tenantId || undefined,\r\n postBody: postBody || undefined,\r\n user: this.user,\r\n bypassAuthState: this.bypassAuthState\r\n };\r\n try {\r\n this.resolve(await this.getIdpTask(type)(params));\r\n }\r\n catch (e) {\r\n this.reject(e);\r\n }\r\n }\r\n onError(error) {\r\n this.reject(error);\r\n }\r\n getIdpTask(type) {\r\n switch (type) {\r\n case \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */:\r\n case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\r\n return _signIn;\r\n case \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */:\r\n case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\r\n return _link;\r\n case \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */:\r\n case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\r\n return _reauth;\r\n default:\r\n _fail(this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }\r\n }\r\n resolve(cred) {\r\n debugAssert(this.pendingPromise, 'Pending promise was never set');\r\n this.pendingPromise.resolve(cred);\r\n this.unregisterAndCleanUp();\r\n }\r\n reject(error) {\r\n debugAssert(this.pendingPromise, 'Pending promise was never set');\r\n this.pendingPromise.reject(error);\r\n this.unregisterAndCleanUp();\r\n }\r\n unregisterAndCleanUp() {\r\n if (this.eventManager) {\r\n this.eventManager.unregisterConsumer(this);\r\n }\r\n this.pendingPromise = null;\r\n this.cleanUp();\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst _POLL_WINDOW_CLOSE_TIMEOUT = new Delay(2000, 10000);\r\n/**\r\n * Authenticates a Firebase client using a popup-based OAuth authentication flow.\r\n *\r\n * @remarks\r\n * If succeeds, returns the signed in user along with the provider's credential. If sign in was\r\n * unsuccessful, returns an error object containing additional information about the error.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n *\r\n * // The signed-in user info.\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\r\nasync function signInWithPopup(auth, provider, resolver) {\r\n const authInternal = _castAuth(auth);\r\n _assertInstanceOf(auth, provider, FederatedAuthProvider);\r\n const resolverInternal = _withDefaultResolver(authInternal, resolver);\r\n const action = new PopupOperation(authInternal, \"signInViaPopup\" /* AuthEventType.SIGN_IN_VIA_POPUP */, provider, resolverInternal);\r\n return action.executeNotNull();\r\n}\r\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a pop-up based\r\n * OAuth flow.\r\n *\r\n * @remarks\r\n * If the reauthentication is successful, the returned result will contain the user and the\r\n * provider's credential.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithPopup(auth, provider);\r\n * // Reauthenticate using a popup.\r\n * await reauthenticateWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\r\nasync function reauthenticateWithPopup(user, provider, resolver) {\r\n const userInternal = getModularInstance(user);\r\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\r\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\r\n const action = new PopupOperation(userInternal.auth, \"reauthViaPopup\" /* AuthEventType.REAUTH_VIA_POPUP */, provider, resolverInternal, userInternal);\r\n return action.executeNotNull();\r\n}\r\n/**\r\n * Links the authenticated provider to the user account using a pop-up based OAuth flow.\r\n *\r\n * @remarks\r\n * If the linking is successful, the returned result will contain the user and the provider's credential.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a popup.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithPopup(result.user, provider);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\r\nasync function linkWithPopup(user, provider, resolver) {\r\n const userInternal = getModularInstance(user);\r\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\r\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\r\n const action = new PopupOperation(userInternal.auth, \"linkViaPopup\" /* AuthEventType.LINK_VIA_POPUP */, provider, resolverInternal, userInternal);\r\n return action.executeNotNull();\r\n}\r\n/**\r\n * Popup event manager. Handles the popup's entire lifecycle; listens to auth\r\n * events\r\n *\r\n */\r\nclass PopupOperation extends AbstractPopupRedirectOperation {\r\n constructor(auth, filter, provider, resolver, user) {\r\n super(auth, filter, resolver, user);\r\n this.provider = provider;\r\n this.authWindow = null;\r\n this.pollId = null;\r\n if (PopupOperation.currentPopupAction) {\r\n PopupOperation.currentPopupAction.cancel();\r\n }\r\n PopupOperation.currentPopupAction = this;\r\n }\r\n async executeNotNull() {\r\n const result = await this.execute();\r\n _assert(result, this.auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return result;\r\n }\r\n async onExecution() {\r\n debugAssert(this.filter.length === 1, 'Popup operations only handle one event');\r\n const eventId = _generateEventId();\r\n this.authWindow = await this.resolver._openPopup(this.auth, this.provider, this.filter[0], // There's always one, see constructor\r\n eventId);\r\n this.authWindow.associatedEvent = eventId;\r\n // Check for web storage support and origin validation _after_ the popup is\r\n // loaded. These operations are slow (~1 second or so) Rather than\r\n // waiting on them before opening the window, optimistically open the popup\r\n // and check for storage support at the same time. If storage support is\r\n // not available, this will cause the whole thing to reject properly. It\r\n // will also close the popup, but since the promise has already rejected,\r\n // the popup closed by user poll will reject into the void.\r\n this.resolver._originValidation(this.auth).catch(e => {\r\n this.reject(e);\r\n });\r\n this.resolver._isIframeWebStorageSupported(this.auth, isSupported => {\r\n if (!isSupported) {\r\n this.reject(_createError(this.auth, \"web-storage-unsupported\" /* AuthErrorCode.WEB_STORAGE_UNSUPPORTED */));\r\n }\r\n });\r\n // Handle user closure. Notice this does *not* use await\r\n this.pollUserCancellation();\r\n }\r\n get eventId() {\r\n var _a;\r\n return ((_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.associatedEvent) || null;\r\n }\r\n cancel() {\r\n this.reject(_createError(this.auth, \"cancelled-popup-request\" /* AuthErrorCode.EXPIRED_POPUP_REQUEST */));\r\n }\r\n cleanUp() {\r\n if (this.authWindow) {\r\n this.authWindow.close();\r\n }\r\n if (this.pollId) {\r\n window.clearTimeout(this.pollId);\r\n }\r\n this.authWindow = null;\r\n this.pollId = null;\r\n PopupOperation.currentPopupAction = null;\r\n }\r\n pollUserCancellation() {\r\n const poll = () => {\r\n var _a, _b;\r\n if ((_b = (_a = this.authWindow) === null || _a === void 0 ? void 0 : _a.window) === null || _b === void 0 ? void 0 : _b.closed) {\r\n // Make sure that there is sufficient time for whatever action to\r\n // complete. The window could have closed but the sign in network\r\n // call could still be in flight. This is specifically true for\r\n // Firefox or if the opener is in an iframe, in which case the oauth\r\n // helper closes the popup.\r\n this.pollId = window.setTimeout(() => {\r\n this.pollId = null;\r\n this.reject(_createError(this.auth, \"popup-closed-by-user\" /* AuthErrorCode.POPUP_CLOSED_BY_USER */));\r\n }, 8000 /* _Timeout.AUTH_EVENT */);\r\n return;\r\n }\r\n this.pollId = window.setTimeout(poll, _POLL_WINDOW_CLOSE_TIMEOUT.get());\r\n };\r\n poll();\r\n }\r\n}\r\n// Only one popup is ever shown at once. The lifecycle of the current popup\r\n// can be managed / cancelled by the constructor.\r\nPopupOperation.currentPopupAction = null;\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst PENDING_REDIRECT_KEY = 'pendingRedirect';\r\n// We only get one redirect outcome for any one auth, so just store it\r\n// in here.\r\nconst redirectOutcomeMap = new Map();\r\nclass RedirectAction extends AbstractPopupRedirectOperation {\r\n constructor(auth, resolver, bypassAuthState = false) {\r\n super(auth, [\r\n \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */,\r\n \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */,\r\n \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */,\r\n \"unknown\" /* AuthEventType.UNKNOWN */\r\n ], resolver, undefined, bypassAuthState);\r\n this.eventId = null;\r\n }\r\n /**\r\n * Override the execute function; if we already have a redirect result, then\r\n * just return it.\r\n */\r\n async execute() {\r\n let readyOutcome = redirectOutcomeMap.get(this.auth._key());\r\n if (!readyOutcome) {\r\n try {\r\n const hasPendingRedirect = await _getAndClearPendingRedirectStatus(this.resolver, this.auth);\r\n const result = hasPendingRedirect ? await super.execute() : null;\r\n readyOutcome = () => Promise.resolve(result);\r\n }\r\n catch (e) {\r\n readyOutcome = () => Promise.reject(e);\r\n }\r\n redirectOutcomeMap.set(this.auth._key(), readyOutcome);\r\n }\r\n // If we're not bypassing auth state, the ready outcome should be set to\r\n // null.\r\n if (!this.bypassAuthState) {\r\n redirectOutcomeMap.set(this.auth._key(), () => Promise.resolve(null));\r\n }\r\n return readyOutcome();\r\n }\r\n async onAuthEvent(event) {\r\n if (event.type === \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */) {\r\n return super.onAuthEvent(event);\r\n }\r\n else if (event.type === \"unknown\" /* AuthEventType.UNKNOWN */) {\r\n // This is a sentinel value indicating there's no pending redirect\r\n this.resolve(null);\r\n return;\r\n }\r\n if (event.eventId) {\r\n const user = await this.auth._redirectUserForId(event.eventId);\r\n if (user) {\r\n this.user = user;\r\n return super.onAuthEvent(event);\r\n }\r\n else {\r\n this.resolve(null);\r\n }\r\n }\r\n }\r\n async onExecution() { }\r\n cleanUp() { }\r\n}\r\nasync function _getAndClearPendingRedirectStatus(resolver, auth) {\r\n const key = pendingRedirectKey(auth);\r\n const persistence = resolverPersistence(resolver);\r\n if (!(await persistence._isAvailable())) {\r\n return false;\r\n }\r\n const hasPendingRedirect = (await persistence._get(key)) === 'true';\r\n await persistence._remove(key);\r\n return hasPendingRedirect;\r\n}\r\nasync function _setPendingRedirectStatus(resolver, auth) {\r\n return resolverPersistence(resolver)._set(pendingRedirectKey(auth), 'true');\r\n}\r\nfunction _clearRedirectOutcomes() {\r\n redirectOutcomeMap.clear();\r\n}\r\nfunction _overrideRedirectResult(auth, result) {\r\n redirectOutcomeMap.set(auth._key(), result);\r\n}\r\nfunction resolverPersistence(resolver) {\r\n return _getInstance(resolver._redirectPersistence);\r\n}\r\nfunction pendingRedirectKey(auth) {\r\n return _persistenceKeyName(PENDING_REDIRECT_KEY, auth.config.apiKey, auth.name);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Authenticates a Firebase client using a full-page redirect flow.\r\n *\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link signInWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\r\nfunction signInWithRedirect(auth, provider, resolver) {\r\n return _signInWithRedirect(auth, provider, resolver);\r\n}\r\nasync function _signInWithRedirect(auth, provider, resolver) {\r\n const authInternal = _castAuth(auth);\r\n _assertInstanceOf(auth, provider, FederatedAuthProvider);\r\n // Wait for auth initialization to complete, this will process pending redirects and clear the\r\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\r\n // redirect and creating a PENDING_REDIRECT_KEY entry.\r\n await authInternal._initializationPromise;\r\n const resolverInternal = _withDefaultResolver(authInternal, resolver);\r\n await _setPendingRedirectStatus(resolverInternal, authInternal);\r\n return resolverInternal._openRedirect(authInternal, provider, \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */);\r\n}\r\n/**\r\n * Reauthenticates the current user with the specified {@link OAuthProvider} using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link reauthenticateWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * const result = await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * // Reauthenticate using a redirect.\r\n * await reauthenticateWithRedirect(result.user, provider);\r\n * // This will again trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\r\nfunction reauthenticateWithRedirect(user, provider, resolver) {\r\n return _reauthenticateWithRedirect(user, provider, resolver);\r\n}\r\nasync function _reauthenticateWithRedirect(user, provider, resolver) {\r\n const userInternal = getModularInstance(user);\r\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\r\n // Wait for auth initialization to complete, this will process pending redirects and clear the\r\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\r\n // redirect and creating a PENDING_REDIRECT_KEY entry.\r\n await userInternal.auth._initializationPromise;\r\n // Allow the resolver to error before persisting the redirect user\r\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\r\n await _setPendingRedirectStatus(resolverInternal, userInternal.auth);\r\n const eventId = await prepareUserForRedirect(userInternal);\r\n return resolverInternal._openRedirect(userInternal.auth, provider, \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */, eventId);\r\n}\r\n/**\r\n * Links the {@link OAuthProvider} to the user account using a full-page redirect flow.\r\n * @remarks\r\n * To handle the results and errors for this operation, refer to {@link getRedirectResult}.\r\n * Follow the {@link https://firebase.google.com/docs/auth/web/redirect-best-practices\r\n * | best practices} when using {@link linkWithRedirect}.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using some other provider.\r\n * const result = await signInWithEmailAndPassword(auth, email, password);\r\n * // Link using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * await linkWithRedirect(result.user, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * ```\r\n *\r\n * @param user - The user.\r\n * @param provider - The provider to authenticate. The provider has to be an {@link OAuthProvider}.\r\n * Non-OAuth providers like {@link EmailAuthProvider} will throw an error.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\r\nfunction linkWithRedirect(user, provider, resolver) {\r\n return _linkWithRedirect(user, provider, resolver);\r\n}\r\nasync function _linkWithRedirect(user, provider, resolver) {\r\n const userInternal = getModularInstance(user);\r\n _assertInstanceOf(userInternal.auth, provider, FederatedAuthProvider);\r\n // Wait for auth initialization to complete, this will process pending redirects and clear the\r\n // PENDING_REDIRECT_KEY in persistence. This should be completed before starting a new\r\n // redirect and creating a PENDING_REDIRECT_KEY entry.\r\n await userInternal.auth._initializationPromise;\r\n // Allow the resolver to error before persisting the redirect user\r\n const resolverInternal = _withDefaultResolver(userInternal.auth, resolver);\r\n await _assertLinkedStatus(false, userInternal, provider.providerId);\r\n await _setPendingRedirectStatus(resolverInternal, userInternal.auth);\r\n const eventId = await prepareUserForRedirect(userInternal);\r\n return resolverInternal._openRedirect(userInternal.auth, provider, \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */, eventId);\r\n}\r\n/**\r\n * Returns a {@link UserCredential} from the redirect-based sign-in flow.\r\n *\r\n * @remarks\r\n * If sign-in succeeded, returns the signed in user. If sign-in was unsuccessful, fails with an\r\n * error. If no redirect operation was called, returns `null`.\r\n *\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @example\r\n * ```javascript\r\n * // Sign in using a redirect.\r\n * const provider = new FacebookAuthProvider();\r\n * // You can add additional scopes to the provider:\r\n * provider.addScope('user_birthday');\r\n * // Start a sign in process for an unauthenticated user.\r\n * await signInWithRedirect(auth, provider);\r\n * // This will trigger a full page redirect away from your app\r\n *\r\n * // After returning from the redirect when your app initializes you can obtain the result\r\n * const result = await getRedirectResult(auth);\r\n * if (result) {\r\n * // This is the signed-in user\r\n * const user = result.user;\r\n * // This gives you a Facebook Access Token.\r\n * const credential = provider.credentialFromResult(auth, result);\r\n * const token = credential.accessToken;\r\n * }\r\n * // As this API can be used for sign-in, linking and reauthentication,\r\n * // check the operationType to determine what triggered this redirect\r\n * // operation.\r\n * const operationType = result.operationType;\r\n * ```\r\n *\r\n * @param auth - The {@link Auth} instance.\r\n * @param resolver - An instance of {@link PopupRedirectResolver}, optional\r\n * if already supplied to {@link initializeAuth} or provided by {@link getAuth}.\r\n *\r\n * @public\r\n */\r\nasync function getRedirectResult(auth, resolver) {\r\n await _castAuth(auth)._initializationPromise;\r\n return _getRedirectResult(auth, resolver, false);\r\n}\r\nasync function _getRedirectResult(auth, resolverExtern, bypassAuthState = false) {\r\n const authInternal = _castAuth(auth);\r\n const resolver = _withDefaultResolver(authInternal, resolverExtern);\r\n const action = new RedirectAction(authInternal, resolver, bypassAuthState);\r\n const result = await action.execute();\r\n if (result && !bypassAuthState) {\r\n delete result.user._redirectEventId;\r\n await authInternal._persistUserIfCurrent(result.user);\r\n await authInternal._setRedirectUser(null, resolverExtern);\r\n }\r\n return result;\r\n}\r\nasync function prepareUserForRedirect(user) {\r\n const eventId = _generateEventId(`${user.uid}:::`);\r\n user._redirectEventId = eventId;\r\n await user.auth._setRedirectUser(user);\r\n await user.auth._persistUserIfCurrent(user);\r\n return eventId;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n// The amount of time to store the UIDs of seen events; this is\r\n// set to 10 min by default\r\nconst EVENT_DUPLICATION_CACHE_DURATION_MS = 10 * 60 * 1000;\r\nclass AuthEventManager {\r\n constructor(auth) {\r\n this.auth = auth;\r\n this.cachedEventUids = new Set();\r\n this.consumers = new Set();\r\n this.queuedRedirectEvent = null;\r\n this.hasHandledPotentialRedirect = false;\r\n this.lastProcessedEventTime = Date.now();\r\n }\r\n registerConsumer(authEventConsumer) {\r\n this.consumers.add(authEventConsumer);\r\n if (this.queuedRedirectEvent &&\r\n this.isEventForConsumer(this.queuedRedirectEvent, authEventConsumer)) {\r\n this.sendToConsumer(this.queuedRedirectEvent, authEventConsumer);\r\n this.saveEventToCache(this.queuedRedirectEvent);\r\n this.queuedRedirectEvent = null;\r\n }\r\n }\r\n unregisterConsumer(authEventConsumer) {\r\n this.consumers.delete(authEventConsumer);\r\n }\r\n onEvent(event) {\r\n // Check if the event has already been handled\r\n if (this.hasEventBeenHandled(event)) {\r\n return false;\r\n }\r\n let handled = false;\r\n this.consumers.forEach(consumer => {\r\n if (this.isEventForConsumer(event, consumer)) {\r\n handled = true;\r\n this.sendToConsumer(event, consumer);\r\n this.saveEventToCache(event);\r\n }\r\n });\r\n if (this.hasHandledPotentialRedirect || !isRedirectEvent(event)) {\r\n // If we've already seen a redirect before, or this is a popup event,\r\n // bail now\r\n return handled;\r\n }\r\n this.hasHandledPotentialRedirect = true;\r\n // If the redirect wasn't handled, hang on to it\r\n if (!handled) {\r\n this.queuedRedirectEvent = event;\r\n handled = true;\r\n }\r\n return handled;\r\n }\r\n sendToConsumer(event, consumer) {\r\n var _a;\r\n if (event.error && !isNullRedirectEvent(event)) {\r\n const code = ((_a = event.error.code) === null || _a === void 0 ? void 0 : _a.split('auth/')[1]) ||\r\n \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */;\r\n consumer.onError(_createError(this.auth, code));\r\n }\r\n else {\r\n consumer.onAuthEvent(event);\r\n }\r\n }\r\n isEventForConsumer(event, consumer) {\r\n const eventIdMatches = consumer.eventId === null ||\r\n (!!event.eventId && event.eventId === consumer.eventId);\r\n return consumer.filter.includes(event.type) && eventIdMatches;\r\n }\r\n hasEventBeenHandled(event) {\r\n if (Date.now() - this.lastProcessedEventTime >=\r\n EVENT_DUPLICATION_CACHE_DURATION_MS) {\r\n this.cachedEventUids.clear();\r\n }\r\n return this.cachedEventUids.has(eventUid(event));\r\n }\r\n saveEventToCache(event) {\r\n this.cachedEventUids.add(eventUid(event));\r\n this.lastProcessedEventTime = Date.now();\r\n }\r\n}\r\nfunction eventUid(e) {\r\n return [e.type, e.eventId, e.sessionId, e.tenantId].filter(v => v).join('-');\r\n}\r\nfunction isNullRedirectEvent({ type, error }) {\r\n return (type === \"unknown\" /* AuthEventType.UNKNOWN */ &&\r\n (error === null || error === void 0 ? void 0 : error.code) === `auth/${\"no-auth-event\" /* AuthErrorCode.NO_AUTH_EVENT */}`);\r\n}\r\nfunction isRedirectEvent(event) {\r\n switch (event.type) {\r\n case \"signInViaRedirect\" /* AuthEventType.SIGN_IN_VIA_REDIRECT */:\r\n case \"linkViaRedirect\" /* AuthEventType.LINK_VIA_REDIRECT */:\r\n case \"reauthViaRedirect\" /* AuthEventType.REAUTH_VIA_REDIRECT */:\r\n return true;\r\n case \"unknown\" /* AuthEventType.UNKNOWN */:\r\n return isNullRedirectEvent(event);\r\n default:\r\n return false;\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function _getProjectConfig(auth, request = {}) {\r\n return _performApiRequest(auth, \"GET\" /* HttpMethod.GET */, \"/v1/projects\" /* Endpoint.GET_PROJECT_CONFIG */, request);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst IP_ADDRESS_REGEX = /^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}$/;\r\nconst HTTP_REGEX = /^https?/;\r\nasync function _validateOrigin(auth) {\r\n // Skip origin validation if we are in an emulated environment\r\n if (auth.config.emulator) {\r\n return;\r\n }\r\n const { authorizedDomains } = await _getProjectConfig(auth);\r\n for (const domain of authorizedDomains) {\r\n try {\r\n if (matchDomain(domain)) {\r\n return;\r\n }\r\n }\r\n catch (_a) {\r\n // Do nothing if there's a URL error; just continue searching\r\n }\r\n }\r\n // In the old SDK, this error also provides helpful messages.\r\n _fail(auth, \"unauthorized-domain\" /* AuthErrorCode.INVALID_ORIGIN */);\r\n}\r\nfunction matchDomain(expected) {\r\n const currentUrl = _getCurrentUrl();\r\n const { protocol, hostname } = new URL(currentUrl);\r\n if (expected.startsWith('chrome-extension://')) {\r\n const ceUrl = new URL(expected);\r\n if (ceUrl.hostname === '' && hostname === '') {\r\n // For some reason we're not parsing chrome URLs properly\r\n return (protocol === 'chrome-extension:' &&\r\n expected.replace('chrome-extension://', '') ===\r\n currentUrl.replace('chrome-extension://', ''));\r\n }\r\n return protocol === 'chrome-extension:' && ceUrl.hostname === hostname;\r\n }\r\n if (!HTTP_REGEX.test(protocol)) {\r\n return false;\r\n }\r\n if (IP_ADDRESS_REGEX.test(expected)) {\r\n // The domain has to be exactly equal to the pattern, as an IP domain will\r\n // only contain the IP, no extra character.\r\n return hostname === expected;\r\n }\r\n // Dots in pattern should be escaped.\r\n const escapedDomainPattern = expected.replace(/\\./g, '\\\\.');\r\n // Non ip address domains.\r\n // domain.com = *.domain.com OR domain.com\r\n const re = new RegExp('^(.+\\\\.' + escapedDomainPattern + '|' + escapedDomainPattern + ')$', 'i');\r\n return re.test(hostname);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst NETWORK_TIMEOUT = new Delay(30000, 60000);\r\n/**\r\n * Reset unlaoded GApi modules. If gapi.load fails due to a network error,\r\n * it will stop working after a retrial. This is a hack to fix this issue.\r\n */\r\nfunction resetUnloadedGapiModules() {\r\n // Clear last failed gapi.load state to force next gapi.load to first\r\n // load the failed gapi.iframes module.\r\n // Get gapix.beacon context.\r\n const beacon = _window().___jsl;\r\n // Get current hint.\r\n if (beacon === null || beacon === void 0 ? void 0 : beacon.H) {\r\n // Get gapi hint.\r\n for (const hint of Object.keys(beacon.H)) {\r\n // Requested modules.\r\n beacon.H[hint].r = beacon.H[hint].r || [];\r\n // Loaded modules.\r\n beacon.H[hint].L = beacon.H[hint].L || [];\r\n // Set requested modules to a copy of the loaded modules.\r\n beacon.H[hint].r = [...beacon.H[hint].L];\r\n // Clear pending callbacks.\r\n if (beacon.CP) {\r\n for (let i = 0; i < beacon.CP.length; i++) {\r\n // Remove all failed pending callbacks.\r\n beacon.CP[i] = null;\r\n }\r\n }\r\n }\r\n }\r\n}\r\nfunction loadGapi(auth) {\r\n return new Promise((resolve, reject) => {\r\n var _a, _b, _c;\r\n // Function to run when gapi.load is ready.\r\n function loadGapiIframe() {\r\n // The developer may have tried to previously run gapi.load and failed.\r\n // Run this to fix that.\r\n resetUnloadedGapiModules();\r\n gapi.load('gapi.iframes', {\r\n callback: () => {\r\n resolve(gapi.iframes.getContext());\r\n },\r\n ontimeout: () => {\r\n // The above reset may be sufficient, but having this reset after\r\n // failure ensures that if the developer calls gapi.load after the\r\n // connection is re-established and before another attempt to embed\r\n // the iframe, it would work and would not be broken because of our\r\n // failed attempt.\r\n // Timeout when gapi.iframes.Iframe not loaded.\r\n resetUnloadedGapiModules();\r\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\r\n },\r\n timeout: NETWORK_TIMEOUT.get()\r\n });\r\n }\r\n if ((_b = (_a = _window().gapi) === null || _a === void 0 ? void 0 : _a.iframes) === null || _b === void 0 ? void 0 : _b.Iframe) {\r\n // If gapi.iframes.Iframe available, resolve.\r\n resolve(gapi.iframes.getContext());\r\n }\r\n else if (!!((_c = _window().gapi) === null || _c === void 0 ? void 0 : _c.load)) {\r\n // Gapi loader ready, load gapi.iframes.\r\n loadGapiIframe();\r\n }\r\n else {\r\n // Create a new iframe callback when this is called so as not to overwrite\r\n // any previous defined callback. This happens if this method is called\r\n // multiple times in parallel and could result in the later callback\r\n // overwriting the previous one. This would end up with a iframe\r\n // timeout.\r\n const cbName = _generateCallbackName('iframefcb');\r\n // GApi loader not available, dynamically load platform.js.\r\n _window()[cbName] = () => {\r\n // GApi loader should be ready.\r\n if (!!gapi.load) {\r\n loadGapiIframe();\r\n }\r\n else {\r\n // Gapi loader failed, throw error.\r\n reject(_createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */));\r\n }\r\n };\r\n // Load GApi loader.\r\n return _loadJS(`https://apis.google.com/js/api.js?onload=${cbName}`)\r\n .catch(e => reject(e));\r\n }\r\n }).catch(error => {\r\n // Reset cached promise to allow for retrial.\r\n cachedGApiLoader = null;\r\n throw error;\r\n });\r\n}\r\nlet cachedGApiLoader = null;\r\nfunction _loadGapi(auth) {\r\n cachedGApiLoader = cachedGApiLoader || loadGapi(auth);\r\n return cachedGApiLoader;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst PING_TIMEOUT = new Delay(5000, 15000);\r\nconst IFRAME_PATH = '__/auth/iframe';\r\nconst EMULATED_IFRAME_PATH = 'emulator/auth/iframe';\r\nconst IFRAME_ATTRIBUTES = {\r\n style: {\r\n position: 'absolute',\r\n top: '-100px',\r\n width: '1px',\r\n height: '1px'\r\n },\r\n 'aria-hidden': 'true',\r\n tabindex: '-1'\r\n};\r\n// Map from apiHost to endpoint ID for passing into iframe. In current SDK, apiHost can be set to\r\n// anything (not from a list of endpoints with IDs as in legacy), so this is the closest we can get.\r\nconst EID_FROM_APIHOST = new Map([\r\n [\"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */, 'p'],\r\n ['staging-identitytoolkit.sandbox.googleapis.com', 's'],\r\n ['test-identitytoolkit.sandbox.googleapis.com', 't'] // test\r\n]);\r\nfunction getIframeUrl(auth) {\r\n const config = auth.config;\r\n _assert(config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\r\n const url = config.emulator\r\n ? _emulatorUrl(config, EMULATED_IFRAME_PATH)\r\n : `https://${auth.config.authDomain}/${IFRAME_PATH}`;\r\n const params = {\r\n apiKey: config.apiKey,\r\n appName: auth.name,\r\n v: SDK_VERSION\r\n };\r\n const eid = EID_FROM_APIHOST.get(auth.config.apiHost);\r\n if (eid) {\r\n params.eid = eid;\r\n }\r\n const frameworks = auth._getFrameworks();\r\n if (frameworks.length) {\r\n params.fw = frameworks.join(',');\r\n }\r\n return `${url}?${querystring(params).slice(1)}`;\r\n}\r\nasync function _openIframe(auth) {\r\n const context = await _loadGapi(auth);\r\n const gapi = _window().gapi;\r\n _assert(gapi, auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n return context.open({\r\n where: document.body,\r\n url: getIframeUrl(auth),\r\n messageHandlersFilter: gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER,\r\n attributes: IFRAME_ATTRIBUTES,\r\n dontclear: true\r\n }, (iframe) => new Promise(async (resolve, reject) => {\r\n await iframe.restyle({\r\n // Prevent iframe from closing on mouse out.\r\n setHideOnLeave: false\r\n });\r\n const networkError = _createError(auth, \"network-request-failed\" /* AuthErrorCode.NETWORK_REQUEST_FAILED */);\r\n // Confirm iframe is correctly loaded.\r\n // To fallback on failure, set a timeout.\r\n const networkErrorTimer = _window().setTimeout(() => {\r\n reject(networkError);\r\n }, PING_TIMEOUT.get());\r\n // Clear timer and resolve pending iframe ready promise.\r\n function clearTimerAndResolve() {\r\n _window().clearTimeout(networkErrorTimer);\r\n resolve(iframe);\r\n }\r\n // This returns an IThenable. However the reject part does not call\r\n // when the iframe is not loaded.\r\n iframe.ping(clearTimerAndResolve).then(clearTimerAndResolve, () => {\r\n reject(networkError);\r\n });\r\n }));\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst BASE_POPUP_OPTIONS = {\r\n location: 'yes',\r\n resizable: 'yes',\r\n statusbar: 'yes',\r\n toolbar: 'no'\r\n};\r\nconst DEFAULT_WIDTH = 500;\r\nconst DEFAULT_HEIGHT = 600;\r\nconst TARGET_BLANK = '_blank';\r\nconst FIREFOX_EMPTY_URL = 'http://localhost';\r\nclass AuthPopup {\r\n constructor(window) {\r\n this.window = window;\r\n this.associatedEvent = null;\r\n }\r\n close() {\r\n if (this.window) {\r\n try {\r\n this.window.close();\r\n }\r\n catch (e) { }\r\n }\r\n }\r\n}\r\nfunction _open(auth, url, name, width = DEFAULT_WIDTH, height = DEFAULT_HEIGHT) {\r\n const top = Math.max((window.screen.availHeight - height) / 2, 0).toString();\r\n const left = Math.max((window.screen.availWidth - width) / 2, 0).toString();\r\n let target = '';\r\n const options = Object.assign(Object.assign({}, BASE_POPUP_OPTIONS), { width: width.toString(), height: height.toString(), top,\r\n left });\r\n // Chrome iOS 7 and 8 is returning an undefined popup win when target is\r\n // specified, even though the popup is not necessarily blocked.\r\n const ua = getUA().toLowerCase();\r\n if (name) {\r\n target = _isChromeIOS(ua) ? TARGET_BLANK : name;\r\n }\r\n if (_isFirefox(ua)) {\r\n // Firefox complains when invalid URLs are popped out. Hacky way to bypass.\r\n url = url || FIREFOX_EMPTY_URL;\r\n // Firefox disables by default scrolling on popup windows, which can create\r\n // issues when the user has many Google accounts, for instance.\r\n options.scrollbars = 'yes';\r\n }\r\n const optionsString = Object.entries(options).reduce((accum, [key, value]) => `${accum}${key}=${value},`, '');\r\n if (_isIOSStandalone(ua) && target !== '_self') {\r\n openAsNewWindowIOS(url || '', target);\r\n return new AuthPopup(null);\r\n }\r\n // about:blank getting sanitized causing browsers like IE/Edge to display\r\n // brief error message before redirecting to handler.\r\n const newWin = window.open(url || '', target, optionsString);\r\n _assert(newWin, auth, \"popup-blocked\" /* AuthErrorCode.POPUP_BLOCKED */);\r\n // Flaky on IE edge, encapsulate with a try and catch.\r\n try {\r\n newWin.focus();\r\n }\r\n catch (e) { }\r\n return new AuthPopup(newWin);\r\n}\r\nfunction openAsNewWindowIOS(url, target) {\r\n const el = document.createElement('a');\r\n el.href = url;\r\n el.target = target;\r\n const click = document.createEvent('MouseEvent');\r\n click.initMouseEvent('click', true, true, window, 1, 0, 0, 0, 0, false, false, false, false, 1, null);\r\n el.dispatchEvent(click);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * URL for Authentication widget which will initiate the OAuth handshake\r\n *\r\n * @internal\r\n */\r\nconst WIDGET_PATH = '__/auth/handler';\r\n/**\r\n * URL for emulated environment\r\n *\r\n * @internal\r\n */\r\nconst EMULATOR_WIDGET_PATH = 'emulator/auth/handler';\r\n/**\r\n * Fragment name for the App Check token that gets passed to the widget\r\n *\r\n * @internal\r\n */\r\nconst FIREBASE_APP_CHECK_FRAGMENT_ID = encodeURIComponent('fac');\r\nasync function _getRedirectUrl(auth, provider, authType, redirectUrl, eventId, additionalParams) {\r\n _assert(auth.config.authDomain, auth, \"auth-domain-config-required\" /* AuthErrorCode.MISSING_AUTH_DOMAIN */);\r\n _assert(auth.config.apiKey, auth, \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */);\r\n const params = {\r\n apiKey: auth.config.apiKey,\r\n appName: auth.name,\r\n authType,\r\n redirectUrl,\r\n v: SDK_VERSION,\r\n eventId\r\n };\r\n if (provider instanceof FederatedAuthProvider) {\r\n provider.setDefaultLanguage(auth.languageCode);\r\n params.providerId = provider.providerId || '';\r\n if (!isEmpty(provider.getCustomParameters())) {\r\n params.customParameters = JSON.stringify(provider.getCustomParameters());\r\n }\r\n // TODO set additionalParams from the provider as well?\r\n for (const [key, value] of Object.entries(additionalParams || {})) {\r\n params[key] = value;\r\n }\r\n }\r\n if (provider instanceof BaseOAuthProvider) {\r\n const scopes = provider.getScopes().filter(scope => scope !== '');\r\n if (scopes.length > 0) {\r\n params.scopes = scopes.join(',');\r\n }\r\n }\r\n if (auth.tenantId) {\r\n params.tid = auth.tenantId;\r\n }\r\n // TODO: maybe set eid as endipointId\r\n // TODO: maybe set fw as Frameworks.join(\",\")\r\n const paramsDict = params;\r\n for (const key of Object.keys(paramsDict)) {\r\n if (paramsDict[key] === undefined) {\r\n delete paramsDict[key];\r\n }\r\n }\r\n // Sets the App Check token to pass to the widget\r\n const appCheckToken = await auth._getAppCheckToken();\r\n const appCheckTokenFragment = appCheckToken\r\n ? `#${FIREBASE_APP_CHECK_FRAGMENT_ID}=${encodeURIComponent(appCheckToken)}`\r\n : '';\r\n // Start at index 1 to skip the leading '&' in the query string\r\n return `${getHandlerBase(auth)}?${querystring(paramsDict).slice(1)}${appCheckTokenFragment}`;\r\n}\r\nfunction getHandlerBase({ config }) {\r\n if (!config.emulator) {\r\n return `https://${config.authDomain}/${WIDGET_PATH}`;\r\n }\r\n return _emulatorUrl(config, EMULATOR_WIDGET_PATH);\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * The special web storage event\r\n *\r\n */\r\nconst WEB_STORAGE_SUPPORT_KEY = 'webStorageSupport';\r\nclass BrowserPopupRedirectResolver {\r\n constructor() {\r\n this.eventManagers = {};\r\n this.iframes = {};\r\n this.originValidationPromises = {};\r\n this._redirectPersistence = browserSessionPersistence;\r\n this._completeRedirectFn = _getRedirectResult;\r\n this._overrideRedirectResult = _overrideRedirectResult;\r\n }\r\n // Wrapping in async even though we don't await anywhere in order\r\n // to make sure errors are raised as promise rejections\r\n async _openPopup(auth, provider, authType, eventId) {\r\n var _a;\r\n debugAssert((_a = this.eventManagers[auth._key()]) === null || _a === void 0 ? void 0 : _a.manager, '_initialize() not called before _openPopup()');\r\n const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);\r\n return _open(auth, url, _generateEventId());\r\n }\r\n async _openRedirect(auth, provider, authType, eventId) {\r\n await this._originValidation(auth);\r\n const url = await _getRedirectUrl(auth, provider, authType, _getCurrentUrl(), eventId);\r\n _setWindowLocation(url);\r\n return new Promise(() => { });\r\n }\r\n _initialize(auth) {\r\n const key = auth._key();\r\n if (this.eventManagers[key]) {\r\n const { manager, promise } = this.eventManagers[key];\r\n if (manager) {\r\n return Promise.resolve(manager);\r\n }\r\n else {\r\n debugAssert(promise, 'If manager is not set, promise should be');\r\n return promise;\r\n }\r\n }\r\n const promise = this.initAndGetManager(auth);\r\n this.eventManagers[key] = { promise };\r\n // If the promise is rejected, the key should be removed so that the\r\n // operation can be retried later.\r\n promise.catch(() => {\r\n delete this.eventManagers[key];\r\n });\r\n return promise;\r\n }\r\n async initAndGetManager(auth) {\r\n const iframe = await _openIframe(auth);\r\n const manager = new AuthEventManager(auth);\r\n iframe.register('authEvent', (iframeEvent) => {\r\n _assert(iframeEvent === null || iframeEvent === void 0 ? void 0 : iframeEvent.authEvent, auth, \"invalid-auth-event\" /* AuthErrorCode.INVALID_AUTH_EVENT */);\r\n // TODO: Consider splitting redirect and popup events earlier on\r\n const handled = manager.onEvent(iframeEvent.authEvent);\r\n return { status: handled ? \"ACK\" /* GapiOutcome.ACK */ : \"ERROR\" /* GapiOutcome.ERROR */ };\r\n }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\r\n this.eventManagers[auth._key()] = { manager };\r\n this.iframes[auth._key()] = iframe;\r\n return manager;\r\n }\r\n _isIframeWebStorageSupported(auth, cb) {\r\n const iframe = this.iframes[auth._key()];\r\n iframe.send(WEB_STORAGE_SUPPORT_KEY, { type: WEB_STORAGE_SUPPORT_KEY }, result => {\r\n var _a;\r\n const isSupported = (_a = result === null || result === void 0 ? void 0 : result[0]) === null || _a === void 0 ? void 0 : _a[WEB_STORAGE_SUPPORT_KEY];\r\n if (isSupported !== undefined) {\r\n cb(!!isSupported);\r\n }\r\n _fail(auth, \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n }, gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER);\r\n }\r\n _originValidation(auth) {\r\n const key = auth._key();\r\n if (!this.originValidationPromises[key]) {\r\n this.originValidationPromises[key] = _validateOrigin(auth);\r\n }\r\n return this.originValidationPromises[key];\r\n }\r\n get _shouldInitProactively() {\r\n // Mobile browsers and Safari need to optimistically initialize\r\n return _isMobileBrowser() || _isSafari() || _isIOS();\r\n }\r\n}\r\n/**\r\n * An implementation of {@link PopupRedirectResolver} suitable for browser\r\n * based applications.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @public\r\n */\r\nconst browserPopupRedirectResolver = BrowserPopupRedirectResolver;\n\nclass MultiFactorAssertionImpl {\r\n constructor(factorId) {\r\n this.factorId = factorId;\r\n }\r\n _process(auth, session, displayName) {\r\n switch (session.type) {\r\n case \"enroll\" /* MultiFactorSessionType.ENROLL */:\r\n return this._finalizeEnroll(auth, session.credential, displayName);\r\n case \"signin\" /* MultiFactorSessionType.SIGN_IN */:\r\n return this._finalizeSignIn(auth, session.credential);\r\n default:\r\n return debugFail('unexpected MultiFactorSessionType');\r\n }\r\n }\r\n}\n\n/**\r\n * {@inheritdoc PhoneMultiFactorAssertion}\r\n *\r\n * @public\r\n */\r\nclass PhoneMultiFactorAssertionImpl extends MultiFactorAssertionImpl {\r\n constructor(credential) {\r\n super(\"phone\" /* FactorId.PHONE */);\r\n this.credential = credential;\r\n }\r\n /** @internal */\r\n static _fromCredential(credential) {\r\n return new PhoneMultiFactorAssertionImpl(credential);\r\n }\r\n /** @internal */\r\n _finalizeEnroll(auth, idToken, displayName) {\r\n return finalizeEnrollPhoneMfa(auth, {\r\n idToken,\r\n displayName,\r\n phoneVerificationInfo: this.credential._makeVerificationRequest()\r\n });\r\n }\r\n /** @internal */\r\n _finalizeSignIn(auth, mfaPendingCredential) {\r\n return finalizeSignInPhoneMfa(auth, {\r\n mfaPendingCredential,\r\n phoneVerificationInfo: this.credential._makeVerificationRequest()\r\n });\r\n }\r\n}\r\n/**\r\n * Provider for generating a {@link PhoneMultiFactorAssertion}.\r\n *\r\n * @public\r\n */\r\nclass PhoneMultiFactorGenerator {\r\n constructor() { }\r\n /**\r\n * Provides a {@link PhoneMultiFactorAssertion} to confirm ownership of the phone second factor.\r\n *\r\n * @remarks\r\n * This method does not work in a Node.js environment.\r\n *\r\n * @param phoneAuthCredential - A credential provided by {@link PhoneAuthProvider.credential}.\r\n * @returns A {@link PhoneMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorResolver.resolveSignIn}\r\n */\r\n static assertion(credential) {\r\n return PhoneMultiFactorAssertionImpl._fromCredential(credential);\r\n }\r\n}\r\n/**\r\n * The identifier of the phone second factor: `phone`.\r\n */\r\nPhoneMultiFactorGenerator.FACTOR_ID = 'phone';\n\n/**\r\n * Provider for generating a {@link TotpMultiFactorAssertion}.\r\n *\r\n * @public\r\n */\r\nclass TotpMultiFactorGenerator {\r\n /**\r\n * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of\r\n * the TOTP (time-based one-time password) second factor.\r\n * This assertion is used to complete enrollment in TOTP second factor.\r\n *\r\n * @param secret A {@link TotpSecret} containing the shared secret key and other TOTP parameters.\r\n * @param oneTimePassword One-time password from TOTP App.\r\n * @returns A {@link TotpMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorUser.enroll}.\r\n */\r\n static assertionForEnrollment(secret, oneTimePassword) {\r\n return TotpMultiFactorAssertionImpl._fromSecret(secret, oneTimePassword);\r\n }\r\n /**\r\n * Provides a {@link TotpMultiFactorAssertion} to confirm ownership of the TOTP second factor.\r\n * This assertion is used to complete signIn with TOTP as the second factor.\r\n *\r\n * @param enrollmentId identifies the enrolled TOTP second factor.\r\n * @param oneTimePassword One-time password from TOTP App.\r\n * @returns A {@link TotpMultiFactorAssertion} which can be used with\r\n * {@link MultiFactorResolver.resolveSignIn}.\r\n */\r\n static assertionForSignIn(enrollmentId, oneTimePassword) {\r\n return TotpMultiFactorAssertionImpl._fromEnrollmentId(enrollmentId, oneTimePassword);\r\n }\r\n /**\r\n * Returns a promise to {@link TotpSecret} which contains the TOTP shared secret key and other parameters.\r\n * Creates a TOTP secret as part of enrolling a TOTP second factor.\r\n * Used for generating a QR code URL or inputting into a TOTP app.\r\n * This method uses the auth instance corresponding to the user in the multiFactorSession.\r\n *\r\n * @param session The {@link MultiFactorSession} that the user is part of.\r\n * @returns A promise to {@link TotpSecret}.\r\n */\r\n static async generateSecret(session) {\r\n var _a;\r\n const mfaSession = session;\r\n _assert(typeof ((_a = mfaSession.user) === null || _a === void 0 ? void 0 : _a.auth) !== 'undefined', \"internal-error\" /* AuthErrorCode.INTERNAL_ERROR */);\r\n const response = await startEnrollTotpMfa(mfaSession.user.auth, {\r\n idToken: mfaSession.credential,\r\n totpEnrollmentInfo: {}\r\n });\r\n return TotpSecret._fromStartTotpMfaEnrollmentResponse(response, mfaSession.user.auth);\r\n }\r\n}\r\n/**\r\n * The identifier of the TOTP second factor: `totp`.\r\n */\r\nTotpMultiFactorGenerator.FACTOR_ID = \"totp\" /* FactorId.TOTP */;\r\nclass TotpMultiFactorAssertionImpl extends MultiFactorAssertionImpl {\r\n constructor(otp, enrollmentId, secret) {\r\n super(\"totp\" /* FactorId.TOTP */);\r\n this.otp = otp;\r\n this.enrollmentId = enrollmentId;\r\n this.secret = secret;\r\n }\r\n /** @internal */\r\n static _fromSecret(secret, otp) {\r\n return new TotpMultiFactorAssertionImpl(otp, undefined, secret);\r\n }\r\n /** @internal */\r\n static _fromEnrollmentId(enrollmentId, otp) {\r\n return new TotpMultiFactorAssertionImpl(otp, enrollmentId);\r\n }\r\n /** @internal */\r\n async _finalizeEnroll(auth, idToken, displayName) {\r\n _assert(typeof this.secret !== 'undefined', auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n return finalizeEnrollTotpMfa(auth, {\r\n idToken,\r\n displayName,\r\n totpVerificationInfo: this.secret._makeTotpVerificationInfo(this.otp)\r\n });\r\n }\r\n /** @internal */\r\n async _finalizeSignIn(auth, mfaPendingCredential) {\r\n _assert(this.enrollmentId !== undefined && this.otp !== undefined, auth, \"argument-error\" /* AuthErrorCode.ARGUMENT_ERROR */);\r\n const totpVerificationInfo = { verificationCode: this.otp };\r\n return finalizeSignInTotpMfa(auth, {\r\n mfaPendingCredential,\r\n mfaEnrollmentId: this.enrollmentId,\r\n totpVerificationInfo\r\n });\r\n }\r\n}\r\n/**\r\n * Provider for generating a {@link TotpMultiFactorAssertion}.\r\n *\r\n * Stores the shared secret key and other parameters to generate time-based OTPs.\r\n * Implements methods to retrieve the shared secret key and generate a QR code URL.\r\n * @public\r\n */\r\nclass TotpSecret {\r\n // The public members are declared outside the constructor so the docs can be generated.\r\n constructor(secretKey, hashingAlgorithm, codeLength, codeIntervalSeconds, enrollmentCompletionDeadline, sessionInfo, auth) {\r\n this.sessionInfo = sessionInfo;\r\n this.auth = auth;\r\n this.secretKey = secretKey;\r\n this.hashingAlgorithm = hashingAlgorithm;\r\n this.codeLength = codeLength;\r\n this.codeIntervalSeconds = codeIntervalSeconds;\r\n this.enrollmentCompletionDeadline = enrollmentCompletionDeadline;\r\n }\r\n /** @internal */\r\n static _fromStartTotpMfaEnrollmentResponse(response, auth) {\r\n return new TotpSecret(response.totpSessionInfo.sharedSecretKey, response.totpSessionInfo.hashingAlgorithm, response.totpSessionInfo.verificationCodeLength, response.totpSessionInfo.periodSec, new Date(response.totpSessionInfo.finalizeEnrollmentTime).toUTCString(), response.totpSessionInfo.sessionInfo, auth);\r\n }\r\n /** @internal */\r\n _makeTotpVerificationInfo(otp) {\r\n return { sessionInfo: this.sessionInfo, verificationCode: otp };\r\n }\r\n /**\r\n * Returns a QR code URL as described in\r\n * https://github.com/google/google-authenticator/wiki/Key-Uri-Format\r\n * This can be displayed to the user as a QR code to be scanned into a TOTP app like Google Authenticator.\r\n * If the optional parameters are unspecified, an accountName of <userEmail> and issuer of <firebaseAppName> are used.\r\n *\r\n * @param accountName the name of the account/app along with a user identifier.\r\n * @param issuer issuer of the TOTP (likely the app name).\r\n * @returns A QR code URL string.\r\n */\r\n generateQrCodeUrl(accountName, issuer) {\r\n var _a;\r\n let useDefaults = false;\r\n if (_isEmptyString(accountName) || _isEmptyString(issuer)) {\r\n useDefaults = true;\r\n }\r\n if (useDefaults) {\r\n if (_isEmptyString(accountName)) {\r\n accountName = ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.email) || 'unknownuser';\r\n }\r\n if (_isEmptyString(issuer)) {\r\n issuer = this.auth.name;\r\n }\r\n }\r\n return `otpauth://totp/${issuer}:${accountName}?secret=${this.secretKey}&issuer=${issuer}&algorithm=${this.hashingAlgorithm}&digits=${this.codeLength}`;\r\n }\r\n}\r\n/** @internal */\r\nfunction _isEmptyString(input) {\r\n return typeof input === 'undefined' || (input === null || input === void 0 ? void 0 : input.length) === 0;\r\n}\n\nvar name = \"@firebase/auth\";\nvar version = \"1.2.0\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nclass AuthInterop {\r\n constructor(auth) {\r\n this.auth = auth;\r\n this.internalListeners = new Map();\r\n }\r\n getUid() {\r\n var _a;\r\n this.assertAuthConfigured();\r\n return ((_a = this.auth.currentUser) === null || _a === void 0 ? void 0 : _a.uid) || null;\r\n }\r\n async getToken(forceRefresh) {\r\n this.assertAuthConfigured();\r\n await this.auth._initializationPromise;\r\n if (!this.auth.currentUser) {\r\n return null;\r\n }\r\n const accessToken = await this.auth.currentUser.getIdToken(forceRefresh);\r\n return { accessToken };\r\n }\r\n addAuthTokenListener(listener) {\r\n this.assertAuthConfigured();\r\n if (this.internalListeners.has(listener)) {\r\n return;\r\n }\r\n const unsubscribe = this.auth.onIdTokenChanged(user => {\r\n listener((user === null || user === void 0 ? void 0 : user.stsTokenManager.accessToken) || null);\r\n });\r\n this.internalListeners.set(listener, unsubscribe);\r\n this.updateProactiveRefresh();\r\n }\r\n removeAuthTokenListener(listener) {\r\n this.assertAuthConfigured();\r\n const unsubscribe = this.internalListeners.get(listener);\r\n if (!unsubscribe) {\r\n return;\r\n }\r\n this.internalListeners.delete(listener);\r\n unsubscribe();\r\n this.updateProactiveRefresh();\r\n }\r\n assertAuthConfigured() {\r\n _assert(this.auth._initializationPromise, \"dependent-sdk-initialized-before-auth\" /* AuthErrorCode.DEPENDENT_SDK_INIT_BEFORE_AUTH */);\r\n }\r\n updateProactiveRefresh() {\r\n if (this.internalListeners.size > 0) {\r\n this.auth._startProactiveRefresh();\r\n }\r\n else {\r\n this.auth._stopProactiveRefresh();\r\n }\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nfunction getVersionForPlatform(clientPlatform) {\r\n switch (clientPlatform) {\r\n case \"Node\" /* ClientPlatform.NODE */:\r\n return 'node';\r\n case \"ReactNative\" /* ClientPlatform.REACT_NATIVE */:\r\n return 'rn';\r\n case \"Worker\" /* ClientPlatform.WORKER */:\r\n return 'webworker';\r\n case \"Cordova\" /* ClientPlatform.CORDOVA */:\r\n return 'cordova';\r\n default:\r\n return undefined;\r\n }\r\n}\r\n/** @internal */\r\nfunction registerAuth(clientPlatform) {\r\n _registerComponent(new Component(\"auth\" /* _ComponentName.AUTH */, (container, { options: deps }) => {\r\n const app = container.getProvider('app').getImmediate();\r\n const heartbeatServiceProvider = container.getProvider('heartbeat');\r\n const appCheckServiceProvider = container.getProvider('app-check-internal');\r\n const { apiKey, authDomain } = app.options;\r\n _assert(apiKey && !apiKey.includes(':'), \"invalid-api-key\" /* AuthErrorCode.INVALID_API_KEY */, { appName: app.name });\r\n const config = {\r\n apiKey,\r\n authDomain,\r\n clientPlatform,\r\n apiHost: \"identitytoolkit.googleapis.com\" /* DefaultConfig.API_HOST */,\r\n tokenApiHost: \"securetoken.googleapis.com\" /* DefaultConfig.TOKEN_API_HOST */,\r\n apiScheme: \"https\" /* DefaultConfig.API_SCHEME */,\r\n sdkClientVersion: _getClientVersion(clientPlatform)\r\n };\r\n const authInstance = new AuthImpl(app, heartbeatServiceProvider, appCheckServiceProvider, config);\r\n _initializeAuthInstance(authInstance, deps);\r\n return authInstance;\r\n }, \"PUBLIC\" /* ComponentType.PUBLIC */)\r\n /**\r\n * Auth can only be initialized by explicitly calling getAuth() or initializeAuth()\r\n * For why we do this, See go/firebase-next-auth-init\r\n */\r\n .setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */)\r\n /**\r\n * Because all firebase products that depend on auth depend on auth-internal directly,\r\n * we need to initialize auth-internal after auth is initialized to make it available to other firebase products.\r\n */\r\n .setInstanceCreatedCallback((container, _instanceIdentifier, _instance) => {\r\n const authInternalProvider = container.getProvider(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */);\r\n authInternalProvider.initialize();\r\n }));\r\n _registerComponent(new Component(\"auth-internal\" /* _ComponentName.AUTH_INTERNAL */, container => {\r\n const auth = _castAuth(container.getProvider(\"auth\" /* _ComponentName.AUTH */).getImmediate());\r\n return (auth => new AuthInterop(auth))(auth);\r\n }, \"PRIVATE\" /* ComponentType.PRIVATE */).setInstantiationMode(\"EXPLICIT\" /* InstantiationMode.EXPLICIT */));\r\n registerVersion(name, version, getVersionForPlatform(clientPlatform));\r\n // BUILD_TARGET will be replaced by values like esm5, esm2017, cjs5, etc during the compilation\r\n registerVersion(name, version, 'esm2017');\r\n}\n\n/**\r\n * @license\r\n * Copyright 2021 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst DEFAULT_ID_TOKEN_MAX_AGE = 5 * 60;\r\nconst authIdTokenMaxAge = getExperimentalSetting('authIdTokenMaxAge') || DEFAULT_ID_TOKEN_MAX_AGE;\r\nlet lastPostedIdToken = null;\r\nconst mintCookieFactory = (url) => async (user) => {\r\n const idTokenResult = user && (await user.getIdTokenResult());\r\n const idTokenAge = idTokenResult &&\r\n (new Date().getTime() - Date.parse(idTokenResult.issuedAtTime)) / 1000;\r\n if (idTokenAge && idTokenAge > authIdTokenMaxAge) {\r\n return;\r\n }\r\n // Specifically trip null => undefined when logged out, to delete any existing cookie\r\n const idToken = idTokenResult === null || idTokenResult === void 0 ? void 0 : idTokenResult.token;\r\n if (lastPostedIdToken === idToken) {\r\n return;\r\n }\r\n lastPostedIdToken = idToken;\r\n await fetch(url, {\r\n method: idToken ? 'POST' : 'DELETE',\r\n headers: idToken\r\n ? {\r\n 'Authorization': `Bearer ${idToken}`\r\n }\r\n : {}\r\n });\r\n};\r\n/**\r\n * Returns the Auth instance associated with the provided {@link @firebase/app#FirebaseApp}.\r\n * If no instance exists, initializes an Auth instance with platform-specific default dependencies.\r\n *\r\n * @param app - The Firebase App.\r\n *\r\n * @public\r\n */\r\nfunction getAuth(app = getApp()) {\r\n const provider = _getProvider(app, 'auth');\r\n if (provider.isInitialized()) {\r\n return provider.getImmediate();\r\n }\r\n const auth = initializeAuth(app, {\r\n popupRedirectResolver: browserPopupRedirectResolver,\r\n persistence: [\r\n indexedDBLocalPersistence,\r\n browserLocalPersistence,\r\n browserSessionPersistence\r\n ]\r\n });\r\n const authTokenSyncUrl = getExperimentalSetting('authTokenSyncURL');\r\n if (authTokenSyncUrl) {\r\n const mintCookie = mintCookieFactory(authTokenSyncUrl);\r\n beforeAuthStateChanged(auth, mintCookie, () => mintCookie(auth.currentUser));\r\n onIdTokenChanged(auth, user => mintCookie(user));\r\n }\r\n const authEmulatorHost = getDefaultEmulatorHost('auth');\r\n if (authEmulatorHost) {\r\n connectAuthEmulator(auth, `http://${authEmulatorHost}`);\r\n }\r\n return auth;\r\n}\r\nregisterAuth(\"Browser\" /* ClientPlatform.BROWSER */);\n\nexport { signInAnonymously as $, ActionCodeOperation as A, updateCurrentUser as B, signOut as C, deleteUser as D, debugErrorMap as E, FactorId as F, prodErrorMap as G, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as H, initializeAuth as I, connectAuthEmulator as J, AuthCredential as K, EmailAuthCredential as L, OAuthCredential as M, PhoneAuthCredential as N, OperationType as O, PhoneAuthProvider as P, inMemoryPersistence as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, EmailAuthProvider as U, FacebookAuthProvider as V, GoogleAuthProvider as W, GithubAuthProvider as X, OAuthProvider as Y, SAMLAuthProvider as Z, TwitterAuthProvider as _, browserSessionPersistence as a, signInWithCredential as a0, linkWithCredential as a1, reauthenticateWithCredential as a2, signInWithCustomToken as a3, sendPasswordResetEmail as a4, confirmPasswordReset as a5, applyActionCode as a6, checkActionCode as a7, verifyPasswordResetCode as a8, createUserWithEmailAndPassword as a9, _createError as aA, _assert as aB, AuthEventManager as aC, _getInstance as aD, _persistenceKeyName as aE, _getRedirectResult as aF, _overrideRedirectResult as aG, _clearRedirectOutcomes as aH, _castAuth as aI, UserImpl as aJ, AuthImpl as aK, _getClientVersion as aL, _generateEventId as aM, AuthPopup as aN, FetchProvider as aO, SAMLAuthCredential as aP, signInWithEmailAndPassword as aa, sendSignInLinkToEmail as ab, isSignInWithEmailLink as ac, signInWithEmailLink as ad, fetchSignInMethodsForEmail as ae, sendEmailVerification as af, verifyBeforeUpdateEmail as ag, ActionCodeURL as ah, parseActionCodeURL as ai, updateProfile as aj, updateEmail as ak, updatePassword as al, getIdToken as am, getIdTokenResult as an, unlink as ao, getAdditionalUserInfo as ap, reload as aq, getMultiFactorResolver as ar, multiFactor as as, debugAssert as at, _isIOS as au, _isAndroid as av, _fail as aw, _getRedirectUrl as ax, _getProjectConfig as ay, _isIOS7Or8 as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, validatePassword as v, onIdTokenChanged as w, beforeAuthStateChanged as x, onAuthStateChanged as y, useDeviceLanguage as z };\n//# sourceMappingURL=index-81415345.js.map\n","export { A as ActionCodeOperation, ah as ActionCodeURL, K as AuthCredential, H as AuthErrorCodes, L as EmailAuthCredential, U as EmailAuthProvider, V as FacebookAuthProvider, F as FactorId, X as GithubAuthProvider, W as GoogleAuthProvider, M as OAuthCredential, Y as OAuthProvider, O as OperationType, N as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, Z as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, _ as TwitterAuthProvider, a6 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a7 as checkActionCode, a5 as confirmPasswordReset, J as connectAuthEmulator, a9 as createUserWithEmailAndPassword, E as debugErrorMap, D as deleteUser, ae as fetchSignInMethodsForEmail, ap as getAdditionalUserInfo, o as getAuth, am as getIdToken, an as getIdTokenResult, ar as getMultiFactorResolver, j as getRedirectResult, Q as inMemoryPersistence, i as indexedDBLocalPersistence, I as initializeAuth, t as initializeRecaptchaConfig, ac as isSignInWithEmailLink, a1 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, as as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, ai as parseActionCodeURL, G as prodErrorMap, a2 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, aq as reload, af as sendEmailVerification, a4 as sendPasswordResetEmail, ab as sendSignInLinkToEmail, q as setPersistence, $ as signInAnonymously, a0 as signInWithCredential, a3 as signInWithCustomToken, aa as signInWithEmailAndPassword, ad as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ao as unlink, B as updateCurrentUser, ak as updateEmail, al as updatePassword, u as updatePhoneNumber, aj as updateProfile, z as useDeviceLanguage, v as validatePassword, ag as verifyBeforeUpdateEmail, a8 as verifyPasswordResetCode } from './index-81415345.js';\nimport '@firebase/util';\nimport '@firebase/app';\nimport '@firebase/logger';\nimport 'tslib';\nimport '@firebase/component';\n//# sourceMappingURL=index.js.map\n","export * from '@firebase/auth';\n//# sourceMappingURL=index.esm.js.map\n","import { registerVersion } from '@firebase/app';\nexport * from '@firebase/app';\n\nvar name = \"firebase\";\nvar version = \"10.2.0\";\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nregisterVersion(name, version, 'app');\n//# sourceMappingURL=index.esm.js.map\n","// Import the functions you need from the SDKs you need\nimport { getApp, getApps, initializeApp } from 'firebase/app';\nimport { getAuth, initializeAuth } from 'firebase/auth';\n\nconst firebaseConfig = {\n apiKey: process.env.NEXT_PUBLIC_FIREBASE_API_KEY,\n authDomain: process.env.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,\n projectId: process.env.NEXT_PUBLIC_FIREBASE_PROJECT_ID,\n appId: process.env.NEXT_PUBLIC_FIREBASE_APP_ID,\n};\n// Initialize Firebase\nlet app;\n// prevents multi initialization errors on firebase\ntry {\n app = initializeApp(firebaseConfig);\n} catch (e) {\n console.error(e);\n} finally {\n app = getApp();\n}\nexport const firebaseApp = app;\n","import { useAuthUser, useBuyerSignupInfo } from '@hooks';\nimport { commonRoutes, isValidUrl, localStorageDataRef } from '@utils';\nimport { Button } from '@components/button';\nimport { ErrorMessage } from '@components/error-message';\nimport { Loading } from '@components/loading';\nimport dayjs from 'dayjs';\nimport { GoogleAuthProvider, OAuthProvider, getAuth, signInWithPopup } from 'firebase/auth';\nimport { firebaseApp } from '@lib/firebase';\nimport * as gtag from '@lib/gtag';\nimport Image from 'next/image';\nimport { useRouter } from 'next/router';\nimport { memo, useCallback, useMemo, useState } from 'react';\nimport { useMutation } from 'react-query';\nimport { ApiService, EAuthenticationType, EUserType } from '@services/Api';\nimport { useTranslation } from 'react-i18next';\nimport toast from 'react-hot-toast';\nimport UerSignUpPhoneModal from '@components/buyer-signup-form-v3/UserPhoneModal';\nimport VerificationCodeInput from '@components/buyer-signup-form-v3/setup/VerificationInputCodeComponent';\nimport TrackingService, {\n TrackingSourceType,\n TrackingEventType,\n TrackingAuthType,\n} from '@services/tracking';\n\ninterface InputProps {\n token: string;\n provider: 'google' | 'apple';\n firstName?: string;\n lastName?: string;\n}\n\nconst GoogleIcon = memo(function googleIcon() {\n return <Image src={'/icons/google.png'} alt=\"google\" width={24} height={24} />;\n});\n\nconst AppleIcon = memo(function appleIcon() {\n return <Image src={'/icons/apple.png'} alt=\"google\" width={24} height={24} />;\n});\n\nexport const BuyerSocialSigninV2 = ({\n skipToThirdStep,\n actionLabelProp = null,\n buttonStyle = {},\n signup = null,\n}: {\n skipToThirdStep?: Function;\n actionLabelProp?: string;\n buttonStyle?: React.CSSProperties;\n signup?: Function | null;\n}) => {\n const { setBuyerInfo, authenticationId, step, email, firstName, lastName, ...rest } =\n useBuyerSignupInfo();\n const [isLoading, setIsLoading] = useState(false);\n\n const [provider, setProvider] = useState<'google' | 'apple'>(null);\n\n const [signUpPhone, setSignUpPhone] = useState(false);\n\n const { updateUserInfo, signedIn } = useAuthUser();\n\n const router = useRouter();\n\n const { t } = useTranslation();\n\n const onMutationSuccess = useCallback(\n async (result) => {\n console.log('🚀 ~ result:', result);\n\n const hasRedirect = router.query?.redirect && isValidUrl(router.query?.redirect as string);\n\n try {\n const inviteId = localStorage.getItem(localStorageDataRef.acceptInvite);\n const inviteDate = localStorage.getItem(localStorageDataRef.acceptInviteDate);\n let inviteValid = false;\n\n if (inviteId && inviteDate) {\n const diff = dayjs(Date.now()).diff(new Date(inviteDate), 'days');\n inviteValid = diff <= 2;\n }\n\n if (result.authType === 'sign-in') {\n setBuyerInfo({ authenticationId: null });\n const remappedUserType = result.user.userType === 'buyer' ? 'buyer' : 'partner';\n\n if (!signedIn && result.accessToken) {\n gtag.event({\n action: 'login',\n value: {\n user_id: result.user.id,\n provider,\n },\n });\n }\n\n await updateUserInfo({\n ...result.user,\n userType: remappedUserType,\n accessToken: result.accessToken,\n signedIn: true,\n });\n\n // toast.success(t('Successfully signed in'));\n if (hasRedirect) {\n return router.push(router.query?.redirect as string);\n }\n return router.push(commonRoutes.buyer.auth.account);\n } else {\n if (!rest?.associateIdStatus && !rest?.partnerCodeStatus && !inviteValid) {\n setIsLoading(true);\n try {\n await ApiService.savePartialSignUpForm({\n authenticationId: result.authenticationId,\n email: result.email,\n userType: EUserType.buyer,\n partialSignupForm: {\n values: {\n email: result.email,\n firstName: result.firstName,\n lastName: result.lastName,\n userType: result.userType,\n provider: result.provider,\n partnerCode: rest?.partnerCode,\n lenderCode: rest?.lenderCode,\n partnerCodeStatus: rest?.partnerCodeStatus,\n },\n } as any,\n });\n } catch (error) {\n console.error('Failed to save partial signup form:', error);\n toast.error(t('Failed to save signup information'));\n return;\n }\n }\n\n setBuyerInfo({\n ...(result.partialSignupForm?.values ?? {}),\n email: result.email,\n authenticationId: result.authenticationId,\n firstName: result.firstName,\n lastName: result.lastName,\n userType: result.userType,\n provider: result.provider,\n partnerCode: rest?.partnerCode || '',\n lenderCode: rest?.lenderCode || '',\n partnerCodeStatus: rest?.partnerCodeStatus || '',\n });\n\n if (signup) {\n try {\n // Get the source from the URL query parameters\n const { ln, v_id, e, m, f } = router.query;\n let source = TrackingSourceType.UNKNOWN;\n\n if (ln === '1') source = TrackingSourceType.LANDING_PAGE_1;\n else if (ln === '2') source = TrackingSourceType.LANDING_PAGE_2;\n else if (ln === 'cal') source = TrackingSourceType.MORTGAGE_CALCULATOR;\n else if (ln === 'hn') source = TrackingSourceType.HOME_NURTURE;\n\n // Track button click before signup\n await TrackingService.trackSignupButtonClick(\n source,\n v_id as string,\n e ? 'Email Campaign' : m ? 'Mailer Campaign' : null,\n m ? (m as string) : (e as string),\n f as string,\n );\n\n // Add tracking metadata\n const trackingMetadata = {\n source,\n visitorId: v_id,\n };\n\n await signup({\n authenticationId: result.authenticationId,\n firstName: result.firstName,\n lastName: result.lastName,\n userType: result.userType,\n email: result.email,\n accessCode: rest.accessCode ?? undefined,\n partnerCode: rest.partnerCode ?? undefined,\n lenderCode: rest.lenderCode ?? undefined,\n associateId: rest.associateIdStatus ? rest.associateId : undefined,\n housePriceGoal: 0,\n expectedPurchaseMonthsPeriod: 0,\n phone: null,\n wishedLocations: [],\n provider: result.provider,\n inviteId: localStorage.getItem(localStorageDataRef.acceptInvite),\n metadata: trackingMetadata,\n } as any);\n\n // Track completed signup\n const authType =\n result.provider === 'google' ? TrackingAuthType.GOOGLE : TrackingAuthType.APPLE;\n\n await TrackingService.trackSignupCompleted(\n source,\n authType,\n result.email,\n v_id as string,\n e ? 'Email Campaign' : m ? 'Mailer Campaign' : null,\n m ? (m as string) : (e as string),\n f as string,\n );\n\n toast.success(t('Successfully signed up'));\n } catch (error) {\n console.error('Failed to complete signup:', error);\n toast.error(t('Failed to complete signup'));\n return;\n }\n }\n\n setIsLoading(false);\n skipToThirdStep && skipToThirdStep();\n }\n } catch (error) {\n console.error('Error in mutation success handler:', error);\n toast.error(t('An unexpected error occurred'));\n setIsLoading(false);\n }\n },\n [\n rest?.lenderCode,\n rest?.partnerCode,\n rest?.partnerCodeStatus,\n rest?.associateIdStatus,\n router,\n setBuyerInfo,\n skipToThirdStep,\n updateUserInfo,\n t,\n ],\n );\n\n const startSSOMutation = useMutation(\n async (values: InputProps) => {\n try {\n setProvider(values.provider);\n const resp = await ApiService.startSSOLogin({\n token: values.token,\n userType: EUserType.buyer,\n type: ['/user/sign-up', '/user/sign-up-v2'].includes(router.pathname)\n ? EAuthenticationType.signup\n : EAuthenticationType.signin,\n provider: values.provider,\n referredBy: '',\n firstName: values?.firstName || '',\n lastName: values?.lastName || '',\n });\n return resp.data;\n } catch (error) {\n console.error('SSO login error:', error);\n throw error?.data?.message || t('We encountered an error. Please try again later.');\n }\n },\n {\n onSuccess: onMutationSuccess,\n onError: (error: string) => {\n toast.error(error);\n setIsLoading(false);\n },\n },\n );\n\n const onClick = async (providerData: 'apple' | 'google') => {\n try {\n setIsLoading(true);\n const auth = getAuth(firebaseApp);\n\n if (providerData === 'google') {\n const provider = new GoogleAuthProvider();\n provider.setCustomParameters({\n prompt: 'select_account',\n });\n await signInWithPopup(auth, provider);\n }\n\n if (providerData === 'apple') {\n const provider = new OAuthProvider('apple.com');\n provider.addScope('email');\n provider.addScope('name');\n await signInWithPopup(auth, provider);\n }\n\n if (!auth?.currentUser) {\n throw new Error(t('Authentication failed. Please try again.'));\n }\n\n const token = await auth.currentUser.getIdToken();\n const { displayName } = auth.currentUser;\n let firstName = '',\n lastName = '';\n\n if (displayName) {\n const names = displayName.split(' ');\n firstName = names[0] || '';\n lastName = names.slice(1).join(' ') || '';\n }\n\n await startSSOMutation.mutateAsync({\n token,\n provider: providerData,\n firstName,\n lastName,\n });\n } catch (error) {\n console.error('Social login error:', error);\n toast.error(t('Failed to authenticate. Please try again.'));\n setIsLoading(false);\n }\n };\n\n const handleComplete = (code: string) => {\n console.log('Verification code:', code);\n };\n\n const actionLabel = useMemo(() => {\n if (actionLabelProp) {\n return actionLabelProp;\n }\n\n if (router.pathname === '/user/sign-in') {\n return t('Sign in');\n }\n return t('Sign up');\n }, [router.pathname, t]);\n\n return (\n <>\n <div className=\"text-center flex flex-col gap-4\">\n <div>\n <button\n type=\"button\"\n disabled={isLoading}\n className=\"w-full p-4 items-center align-middle justify-center border-1 border-gray-900 shadow-lg rounded-md flex \"\n onClick={() => onClick('google')}\n style={buttonStyle}\n >\n <GoogleIcon />\n <span className=\"!w-full\">\n {actionLabel} {t('with Google')}\n </span>\n </button>\n {startSSOMutation.isError && provider === 'google' && (\n <ErrorMessage error={startSSOMutation.error && (startSSOMutation.error as string)} />\n )}\n </div>\n <div>\n <button\n type=\"button\"\n disabled={isLoading}\n className=\"w-full p-4 items-center align-middle justify-center border-1 border-gray-900 shadow-lg rounded-md flex \"\n onClick={() => onClick('apple')}\n style={buttonStyle}\n >\n <AppleIcon />\n <span className=\"w-full ml-[-13px]\">\n {actionLabel} {t('with Apple')}\n </span>\n </button>\n {startSSOMutation.isError && provider === 'apple' && (\n <ErrorMessage error={startSSOMutation.error && (startSSOMutation.error as string)} />\n )}\n </div>\n </div>\n <Loading isLoading={startSSOMutation.isLoading} />\n {/* <UerSignUpPhoneModal\n title={t('Please Enter Your Phone Number')}\n content={\n <VerificationCodeInput\n setStep={null}\n length={6}\n onComplete={handleComplete}\n errorField={''}\n phone={signUpPhone}\n />\n }\n actionTitle={t('Submit')}\n onActionClick={() => handleComplete}\n cancelActionTitle={t('Cancel')}\n /> */}\n </>\n );\n};\n","const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return '' + object;\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.indexOf('###') > -1 ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (prop in target) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nvar _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => nsSeparator.indexOf(c) < 0 && keySeparator.indexOf(c) < 0);\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = function (obj, path) {\n let keySeparator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '.';\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].indexOf(typeof next) > -1 && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace('_', '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.init(concreteLogger, options);\n }\n init(concreteLogger) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n return this.forward(args, 'log', '', true);\n }\n warn() {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n return this.forward(args, 'warn', '', true);\n }\n error() {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n return this.forward(args, 'error', '');\n }\n deprecate() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n emit(event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(_ref => {\n let [observer, numTimesAdded] = _ref;\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(_ref2 => {\n let [observer, numTimesAdded] = _ref2;\n for (let i = 0; i < numTimesAdded; i++) {\n observer.apply(observer, [event, ...args]);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n ns: ['translation'],\n defaultNS: 'translation'\n };\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (this.options.ns.indexOf(ns) < 0) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.indexOf('.') > -1) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value) {\n let options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {\n silent: false\n };\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {\n silent: false\n };\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite) {\n let options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {\n silent: false,\n skipCopy: false\n };\n let path = [lng, ns];\n if (lng.indexOf('.') > -1) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst checkedLoadedFor = {};\nclass Translator extends EventEmitter {\n constructor(services) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n interpolation: {}\n };\n if (key == null) {\n return false;\n }\n const resolved = this.resolve(key, options);\n return resolved?.res !== undefined;\n }\n extractFromKey(key, options) {\n let nsSeparator = options.nsSeparator !== undefined ? options.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let namespaces = options.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.indexOf(nsSeparator) > -1;\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !options.keySeparator && !this.options.userDefinedNsSeparator && !options.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.indexOf(parts[0]) > -1) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, options, lastKey) {\n if (typeof options !== 'object' && this.options.overloadTranslationOptionHandler) {\n options = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof options === 'object') options = {\n ...options\n };\n if (!options) options = {};\n if (keys == null) return '';\n if (!Array.isArray(keys)) keys = [String(keys)];\n const returnDetails = options.returnDetails !== undefined ? options.returnDetails : this.options.returnDetails;\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], options);\n const namespace = namespaces[namespaces.length - 1];\n const lng = options.lng || this.language;\n const appendNamespaceToCIMode = options.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n const nsSeparator = options.nsSeparator || this.options.nsSeparator;\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(options)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(options)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, options);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const resType = Object.prototype.toString.apply(res);\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = options.joinArrays !== undefined ? options.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const handleAsObject = !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\n if (handleAsObjectInI18nFormat && res && handleAsObject && noObject.indexOf(resType) < 0 && !(isString(joinArrays) && Array.isArray(res))) {\n if (!options.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, res, {\n ...options,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(options);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(res);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in res) {\n if (Object.prototype.hasOwnProperty.call(res, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n copy[m] = this.translate(deepKey, {\n ...options,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n if (copy[m] === deepKey) copy[m] = res[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, options, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n const needsPluralHandling = options.count !== undefined && !isString(options.count);\n const hasDefaultValue = Translator.hasDefaultValue(options);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, options) : '';\n const defaultValueSuffixOrdinalFallback = options.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, options.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;\n const defaultValue = needsZeroSuffixLookup && options[`defaultValue${this.options.pluralSeparator}zero`] || options[`defaultValue${defaultValueSuffix}`] || options[`defaultValue${defaultValueSuffixOrdinalFallback}`] || options.defaultValue;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = options.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...options,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, options.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(options.lng || this.language);\n } else {\n lngs.push(options.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, options);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, options);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, options);\n if (needsZeroSuffixLookup && options[`defaultValue${this.options.pluralSeparator}zero`] && suffixes.indexOf(`${this.options.pluralSeparator}zero`) < 0) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, options[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, options, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) res = `${namespace}:${key}`;\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}:${key}` : key, usedDefault ? res : undefined);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(options);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, options, resolved, lastKey) {\n var _this = this;\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...options\n }, options.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!options.skipInterpolation) {\n if (options.interpolation) this.interpolator.init({\n ...options,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...options.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = options.replace && !isString(options.replace) ? options.replace : options;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, options.lng || this.language || resolved.usedLng, options);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) options.nest = false;\n }\n if (!options.lng && resolved && resolved.res) options.lng = this.language || resolved.usedLng;\n if (options.nest !== false) res = this.interpolator.nest(res, function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (lastKey?.[0] === args[0] && !options.context) {\n _this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return _this.translate(...args, key);\n }, options);\n if (options.interpolation) this.interpolator.reset();\n }\n const postProcess = options.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && options.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(options)\n },\n ...options\n } : options, this);\n }\n return res;\n }\n resolve(keys) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, options);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = options.count !== undefined && !isString(options.count);\n const needsZeroSuffixLookup = needsPluralHandling && !options.ordinal && options.count === 0;\n const needsContextHandling = options.context !== undefined && (isString(options.context) || typeof options.context === 'number') && options.context !== '';\n const codes = options.lngs ? options.lngs : this.languageUtils.toResolveHierarchy(options.lng || this.language, options.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, options);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, options.count, options);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n finalKeys.push(key + pluralSuffix);\n if (options.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator}${options.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n finalKeys.push(contextKey + pluralSuffix);\n if (options.ordinal && pluralSuffix.indexOf(ordinalPrefix) === 0) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, options);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data.count = options.count;\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && prefix === option.substring(0, prefix.length) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || code.indexOf('-') < 0) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.indexOf('-') > -1) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.indexOf(code) > -1;\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return supportedLng;\n if (supportedLng.indexOf('-') < 0 && lngOnly.indexOf('-') < 0) return;\n if (supportedLng.indexOf('-') > 0 && lngOnly.indexOf('-') < 0 && supportedLng.substring(0, supportedLng.indexOf('-')) === lngOnly) return supportedLng;\n if (supportedLng.indexOf(lngOnly) === 0 && lngOnly.length > 1) return supportedLng;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes(fallbackCode || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.indexOf('-') > -1 || code.indexOf('_') > -1)) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (codes.indexOf(fc) < 0) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n addRule(lng, obj) {\n this.rules[lng] = obj;\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (!Intl) {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = function (data, defaultData, key) {\n let keySeparator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '.';\n let ignoreJSONStructure = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix || '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix || '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}(.+?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (key.indexOf(this.formatSeparator) < 0) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => regexSafe(val)\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? regexSafe(this.escape(val)) : regexSafe(val)\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], safeValue);\n if (skipOnVariables) {\n todo.regex.lastIndex += value.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (key.indexOf(sep) < 0) return key;\n const c = key.split(new RegExp(`${sep}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || matchedDoubleQuotes.length % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.indexOf(this.prefix) > -1) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n let doReduce = false;\n if (match[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(match[1])) {\n const r = match[1].split(this.formatSeparator).map(elem => elem.trim());\n match[1] = r.shift();\n formatters = r;\n doReduce = true;\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (doReduce) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.indexOf('(') > -1) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].substring(0, p[1].length - 1);\n if (formatName === 'currency' && optStr.indexOf(':') < 0) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && optStr.indexOf(':') < 0) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (val, lng, options) => {\n let optForCache = options;\n if (options && options.interpolationkey && options.formatParams && options.formatParams[options.interpolationkey] && options[options.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [options.interpolationkey]: undefined\n };\n }\n const key = lng + JSON.stringify(optForCache);\n let formatter = cache[key];\n if (!formatter) {\n formatter = fn(getCleanedCode(lng), options);\n cache[key] = formatter;\n }\n return formatter(val);\n };\n};\nclass Formatter {\n constructor() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.formats = {\n number: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: createCachedFormatter((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n this.init(options);\n }\n init(services) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {\n interpolation: {}\n };\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n const formats = format.split(this.formatSeparator);\n if (formats.length > 1 && formats[0].indexOf('(') > 1 && formats[0].indexOf(')') < 0 && formats.find(f => f.indexOf(')') > -1)) {\n const lastIndex = formats.findIndex(f => f.indexOf(')') > -1);\n formats[0] = [formats[0], ...formats.splice(1, lastIndex)].join(this.formatSeparator);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName) {\n let tried = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;\n let wait = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : this.retryTimeout;\n let callback = arguments.length > 5 ? arguments[5] : undefined;\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read.call(this, lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n let callback = arguments.length > 3 ? arguments[3] : undefined;\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name) {\n let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate) {\n let options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};\n let clb = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : () => {};\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n simplifyPluralSuffix: true,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n format: value => value,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n }\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs?.indexOf?.('cimode') < 0) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n if (typeof options.initImmediate === 'boolean') options.initAsync = options.initImmediate;\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nclass I18n extends EventEmitter {\n constructor() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 ? arguments[1] : undefined;\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init() {\n var _this = this;\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 ? arguments[1] : undefined;\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (options.ns.indexOf('translation') < 0) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator,\n simplifyPluralSuffix: this.options.simplifyPluralSuffix\n });\n if (formatter && (!this.options.interpolation.format || this.options.interpolation.format === defOpts.interpolation.format)) {\n s.formatter = createClassOnDemand(formatter);\n s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', function (event) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n _this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', function (event) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n _this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = function () {\n return _this.store[fcName](...arguments);\n };\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = function () {\n _this.store[fcName](...arguments);\n return _this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if (this.languages && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language) {\n let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (toLoad.indexOf(l) < 0) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].indexOf(l) > -1) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].indexOf(lngInLngs) > -1) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n }\n changeLanguage(lng, callback) {\n var _this2 = this;\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve(function () {\n return _this2.t(...arguments);\n });\n if (callback) callback(err, function () {\n return _this2.t(...arguments);\n });\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const l = isString(lngs) ? lngs : this.services.languageUtils.getBestMatchFromCodes(lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix) {\n var _this3 = this;\n const fixedT = function (key, opts) {\n let options;\n if (typeof opts !== 'object') {\n for (var _len3 = arguments.length, rest = new Array(_len3 > 2 ? _len3 - 2 : 0), _key3 = 2; _key3 < _len3; _key3++) {\n rest[_key3 - 2] = arguments[_key3];\n }\n options = _this3.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n options = {\n ...opts\n };\n }\n options.lng = options.lng || fixedT.lng;\n options.lngs = options.lngs || fixedT.lngs;\n options.ns = options.ns || fixedT.ns;\n if (options.keyPrefix !== '') options.keyPrefix = options.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const keySeparator = _this3.options.keySeparator || '.';\n let resultKey;\n if (options.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => `${options.keyPrefix}${keySeparator}${k}`);\n } else {\n resultKey = options.keyPrefix ? `${options.keyPrefix}${keySeparator}${key}` : key;\n }\n return _this3.t(resultKey, options);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t() {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n return this.translator?.translate(...args);\n }\n exists() {\n for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n args[_key5] = arguments[_key5];\n }\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (this.options.ns.indexOf(n) < 0) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => preloaded.indexOf(lng) < 0 && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n return rtlLngs.indexOf(languageUtils.getLanguagePartFromCode(lng)) > -1 || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 ? arguments[1] : undefined;\n return new I18n(options, callback);\n }\n cloneInstance() {\n let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n let callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : noop;\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n return Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, {});\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', function (event) {\n for (var _len6 = arguments.length, args = new Array(_len6 > 1 ? _len6 - 1 : 0), _key6 = 1; _key6 < _len6; _key6++) {\n args[_key6 - 1] = arguments[_key6];\n }\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\ninstance.createInstance = I18n.createInstance;\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","import i18n from 'i18next';\nimport { initReactI18next } from 'react-i18next';\nimport enTranslations from './translations/en.json';\nimport esTranslations from './translations/es.json';\nimport Cookies from 'js-cookie';\n\nconst resources = {\n en: {\n translation: enTranslations\n },\n es: {\n translation: esTranslations\n }\n};\n\ni18n\n .use(initReactI18next) // passes i18n down to react-i18next\n .init({\n resources,\n lng: Cookies.get('language') || 'en', // default language\n keySeparator: false, // we do not use keys in form messages.welcome\n interpolation: {\n escapeValue: false // react already safes from xss\n }\n });\n\nexport default i18n;\n","import React, { createContext, useContext, useState, ReactNode } from 'react';\nimport i18n from '../i18n/config';\nimport Cookies from 'js-cookie';\n\ninterface LanguageContextProps {\n language: string;\n setLanguage: (language: string) => void;\n}\n\nconst LanguageContext = createContext<LanguageContextProps | undefined>(undefined);\n\nexport const LanguageProvider: React.FC<{ children: ReactNode }> = ({ children }) => {\n const [language, setLanguage] = useState(() => {\n const cookieLanguage = Cookies.get('language');\n return cookieLanguage || 'en'; // Add default fallback to 'en'\n });\n \n\n const changeLanguage = (lng: string) => {\n console.log('Changing language to:', lng);\n i18n.changeLanguage(lng);\n setLanguage(lng);\n Cookies.set('language', lng, { \n expires: 365,\n path: '/',\n sameSite: 'strict'\n }); // Set cookie for 1 year with proper options\n console.log('Current cookie after change:', Cookies.get('language'));\n };\n\n return (\n <LanguageContext.Provider value={{ language, setLanguage: changeLanguage }}>\n {children}\n </LanguageContext.Provider>\n );\n};\n\nexport const useLanguage = () => {\n const context = useContext(LanguageContext);\n if (!context) {\n throw new Error('useLanguage must be used within a LanguageProvider');\n }\n return context;\n};\n","import React, { createContext, useContext, useState, ReactNode, useEffect } from 'react';\nimport { useRouter } from 'next/router';\n\ninterface RouteItem {\n name: string;\n path: string;\n}\n\ninterface RouteContextType {\n currentRoute: RouteItem;\n setCurrentRoute: (route: RouteItem) => void;\n routeMap: Record<string, string>;\n}\n\nconst defaultRouteMap = {\n '/user/summary': 'Dashboard',\n '/user/financialLiteracy': 'Financial Literacy',\n '/user/finances': 'Finances',\n '/user/settings/accounts': 'Accounts',\n '/user/rewards': 'Rewards',\n '/user/messages': 'Messages',\n '/user/settings': 'Settings',\n '/user/additional-resources': 'Additional Resources'\n};\n\nconst RouteContext = createContext<RouteContextType | undefined>(undefined);\n\nexport const RouteProvider: React.FC<{ children: ReactNode }> = ({ children }) => {\n const router = useRouter();\n const [currentRoute, setCurrentRoute] = useState<RouteItem>({\n name: defaultRouteMap['/user/summary'],\n path: '/user/summary'\n });\n\n useEffect(() => {\n const path = router.pathname;\n // console.log('Current path:', path);\n const routeName = defaultRouteMap[path] || '';\n // console.log('Route name:', routeName);\n setCurrentRoute({ name: routeName, path });\n }, [router.pathname]);\n\n const value = {\n currentRoute,\n setCurrentRoute,\n routeMap: defaultRouteMap\n };\n\n return (\n <RouteContext.Provider value={value}>\n {children}\n </RouteContext.Provider>\n );\n};\n\nexport const useRoute = () => {\n const context = useContext(RouteContext);\n if (context === undefined) {\n throw new Error('useRoute must be used within a RouteProvider');\n }\n return context;\n};\n","import React, { createContext, useContext, useState, ReactNode } from 'react';\n\n// Define the shape of the context\ninterface SidebarContextType {\n isSectionSelected: boolean;\n setIsSectionSelected: (selected: boolean) => void;\n}\n\n// Create the context\nconst SidebarContext = createContext<SidebarContextType | undefined>(undefined);\n\n// Provider component\nexport const SidebarProvider = ({ children }: { children: ReactNode }) => {\n const [isSectionSelected, setIsSectionSelected] = useState<boolean>(false);\n\n return (\n <SidebarContext.Provider value={{ isSectionSelected, setIsSectionSelected }}>\n {children}\n </SidebarContext.Provider>\n );\n};\n\n// Custom hook for accessing the context\nexport const useSidebarContext = (): SidebarContextType => {\n const context = useContext(SidebarContext);\n if (!context) {\n throw new Error('useSidebarContext must be used within a SidebarProvider');\n }\n return context;\n};\n","/*!\n * Intro.js v7.2.0\n * https://introjs.com\n *\n * Copyright (C) 2012-2023 Afshin Mehrabani (@afshinmeh).\n * https://introjs.com\n *\n * Date: Mon, 14 Aug 2023 19:47:14 GMT\n */\nfunction t(e){return t=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&\"function\"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?\"symbol\":typeof t},t(e)}function e(t,e,n,o){return new(n||(n=Promise))((function(i,r){function s(t){try{l(o.next(t))}catch(t){r(t)}}function a(t){try{l(o.throw(t))}catch(t){r(t)}}function l(t){var e;t.done?i(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((o=o.apply(t,e||[])).next())}))}function n(t,e){var n,o,i,r,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},\"function\"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(l){return function(a){if(n)throw new TypeError(\"Generator is already executing.\");for(;r&&(r=0,a[0]&&(s=0)),s;)try{if(n=1,o&&(i=2&a[0]?o.return:a[0]?o.throw||((i=o.return)&&i.call(o),0):o.next)&&!(i=i.call(o,a[1])).done)return i;switch(o=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){s.label=a[1];break}if(6===a[0]&&s.label<i[1]){s.label=i[1],i=a;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(a);break}i[2]&&s.ops.pop(),s.trys.pop();continue}a=e.call(t,s)}catch(t){a=[6,t],o=0}finally{n=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function o(t,e,n){var o,r=((o={})[t]=e,o.path=\"/\",o.expires=void 0,o);if(n){var s=new Date;s.setTime(s.getTime()+24*n*60*60*1e3),r.expires=s.toUTCString()}var a=[];for(var l in r)a.push(\"\".concat(l,\"=\").concat(r[l]));return document.cookie=a.join(\"; \"),i(t)}function i(t){return(e={},document.cookie.split(\";\").forEach((function(t){var n=t.split(\"=\"),o=n[0],i=n[1];e[o.trim()]=i})),e)[t];var e}\"function\"==typeof SuppressedError&&SuppressedError;function r(t,e){e?o(t._options.dontShowAgainCookie,\"true\",t._options.dontShowAgainCookieDays):o(t._options.dontShowAgainCookie,\"\",-1)}var s,a=(s={},function(t,e){return void 0===e&&(e=\"introjs-stamp\"),s[e]=s[e]||0,void 0===t[e]&&(t[e]=s[e]++),t[e]}),l=new(function(){function t(){this.events_key=\"introjs_event\"}return t.prototype._id=function(t,e,n){return t+a(e)+(n?\"_\".concat(a(n)):\"\")},t.prototype.on=function(t,e,n,o,i){var r=this._id(e,n,o),s=function(e){return n(o||t,e||window.event)};\"addEventListener\"in t?t.addEventListener(e,s,i):\"attachEvent\"in t&&t.attachEvent(\"on\".concat(e),s),t[this.events_key]=t[this.events_key]||{},t[this.events_key][r]=s},t.prototype.off=function(t,e,n,o,i){var r=this._id(e,n,o),s=t[this.events_key]&&t[this.events_key][r];s&&(\"removeEventListener\"in t?t.removeEventListener(e,s,i):\"detachEvent\"in t&&t.detachEvent(\"on\".concat(e),s),t[this.events_key][r]=null)},t}()),c=function(t){return\"function\"==typeof t};function u(t,e){if(t instanceof SVGElement){var n=t.getAttribute(\"class\")||\"\";n.match(e)||t.setAttribute(\"class\",\"\".concat(n,\" \").concat(e))}else if(void 0!==t.classList)for(var o=0,i=e.split(\" \");o<i.length;o++){var r=i[o];t.classList.add(r)}else t.className.match(e)||(t.className+=\" \".concat(e))}function p(t,e){var n=\"\";return\"currentStyle\"in t?n=t.currentStyle[e]:document.defaultView&&document.defaultView.getComputedStyle&&(n=document.defaultView.getComputedStyle(t,null).getPropertyValue(e)),n&&n.toLowerCase?n.toLowerCase():n}function h(t,e){if(t){var n=function(t){var e=window.getComputedStyle(t),n=\"absolute\"===e.position,o=/(auto|scroll)/;if(\"fixed\"===e.position)return document.body;for(var i=t;i=i.parentElement;)if(e=window.getComputedStyle(i),(!n||\"static\"!==e.position)&&o.test(e.overflow+e.overflowY+e.overflowX))return i;return document.body}(e);n!==document.body&&(n.scrollTop=e.offsetTop-n.offsetTop)}}function d(){if(void 0!==window.innerWidth)return{width:window.innerWidth,height:window.innerHeight};var t=document.documentElement;return{width:t.clientWidth,height:t.clientHeight}}function f(t,e,n,o,i){var r;if(\"off\"!==e&&(t&&(r=\"tooltip\"===e?i.getBoundingClientRect():o.getBoundingClientRect(),!function(t){var e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom+80<=window.innerHeight&&e.right<=window.innerWidth}(o)))){var s=d().height;r.bottom-(r.bottom-r.top)<0||o.clientHeight>s?window.scrollBy(0,r.top-(s/2-r.height/2)-n):window.scrollBy(0,r.top-(s/2-r.height/2)+n)}}function b(t){t.setAttribute(\"role\",\"button\"),t.tabIndex=0}function m(t){var e=t.parentElement;return!(!e||\"HTML\"===e.nodeName)&&(\"fixed\"===p(t,\"position\")||m(e))}function g(t,e){var n=document.body,o=document.documentElement,i=window.pageYOffset||o.scrollTop||n.scrollTop,r=window.pageXOffset||o.scrollLeft||n.scrollLeft;e=e||n;var s=t.getBoundingClientRect(),a=e.getBoundingClientRect(),l=p(e,\"position\"),c={width:s.width,height:s.height};return\"body\"!==e.tagName.toLowerCase()&&\"relative\"===l||\"sticky\"===l?Object.assign(c,{top:s.top-a.top,left:s.left-a.left}):m(t)?Object.assign(c,{top:s.top,left:s.left}):Object.assign(c,{top:s.top+i,left:s.left+r})}function v(t,e){if(t instanceof SVGElement){var n=t.getAttribute(\"class\")||\"\";t.setAttribute(\"class\",n.replace(e,\"\").replace(/^\\s+|\\s+$/g,\"\"))}else t.className=t.className.replace(e,\"\").replace(/^\\s+|\\s+$/g,\"\")}function y(t,e){var n=\"\";if(t.style.cssText&&(n+=t.style.cssText),\"string\"==typeof e)n+=e;else for(var o in e)n+=\"\".concat(o,\":\").concat(e[o],\";\");t.style.cssText=n}function w(t,e,n){if(n&&e){var o=g(e.element,t._targetElement),i=t._options.helperElementPadding;e.element instanceof Element&&m(e.element)?u(n,\"introjs-fixedTooltip\"):v(n,\"introjs-fixedTooltip\"),\"floating\"===e.position&&(i=0),y(n,{width:\"\".concat(o.width+i,\"px\"),height:\"\".concat(o.height+i,\"px\"),top:\"\".concat(o.top-i/2,\"px\"),left:\"\".concat(o.left-i/2,\"px\")})}}function _(t,e,n,o,i){return t.left+e+n.width>o.width?(i.style.left=\"\".concat(o.width-n.width-t.left,\"px\"),!1):(i.style.left=\"\".concat(e,\"px\"),!0)}function C(t,e,n,o){return t.left+t.width-e-n.width<0?(o.style.left=\"\".concat(-t.left,\"px\"),!1):(o.style.right=\"\".concat(e,\"px\"),!0)}function S(t,e){t.includes(e)&&t.splice(t.indexOf(e),1)}function k(t,e,n,o){var i=t.slice(),r=d(),s=g(n).height+10,a=g(n).width+20,l=e.getBoundingClientRect(),c=\"floating\";if(l.bottom+s>r.height&&S(i,\"bottom\"),l.top-s<0&&S(i,\"top\"),l.right+a>r.width&&S(i,\"right\"),l.left-a<0&&S(i,\"left\"),o&&(o=o.split(\"-\")[0]),i.length&&(c=i[0],i.includes(o)&&(c=o)),\"top\"===c||\"bottom\"===c){var u=void 0,p=[];\"top\"===c?(u=\"top-middle-aligned\",p=[\"top-left-aligned\",\"top-middle-aligned\",\"top-right-aligned\"]):(u=\"bottom-middle-aligned\",p=[\"bottom-left-aligned\",\"bottom-middle-aligned\",\"bottom-right-aligned\"]),c=function(t,e,n,o){var i=e/2,r=Math.min(n,window.screen.width);return r-t<e&&(S(o,\"top-left-aligned\"),S(o,\"bottom-left-aligned\")),(t<i||r-t<i)&&(S(o,\"top-middle-aligned\"),S(o,\"bottom-middle-aligned\")),t<e&&(S(o,\"top-right-aligned\"),S(o,\"bottom-right-aligned\")),o.length?o[0]:null}(l.left,a,r.width,p)||u}return c}function j(t,e,n,o,i){if(void 0===i&&(i=!1),e){var r,s,a,l,c=\"\";n.style.top=\"\",n.style.right=\"\",n.style.bottom=\"\",n.style.left=\"\",n.style.marginLeft=\"\",n.style.marginTop=\"\",o.style.display=\"inherit\",c=\"string\"==typeof e.tooltipClass?e.tooltipClass:t._options.tooltipClass,n.className=[\"introjs-tooltip\",c].filter(Boolean).join(\" \"),n.setAttribute(\"role\",\"dialog\"),\"floating\"!==(l=e.position)&&t._options.autoPosition&&(l=k(t._options.positionPrecedence,e.element,n,l)),s=g(e.element),r=g(n),a=d(),u(n,\"introjs-\".concat(l));var p=s.width/2-r.width/2;switch(l){case\"top-right-aligned\":o.className=\"introjs-arrow bottom-right\";var h=0;C(s,h,r,n),n.style.bottom=\"\".concat(s.height+20,\"px\");break;case\"top-middle-aligned\":o.className=\"introjs-arrow bottom-middle\",i&&(p+=5),C(s,p,r,n)&&(n.style.right=\"\",_(s,p,r,a,n)),n.style.bottom=\"\".concat(s.height+20,\"px\");break;case\"top-left-aligned\":case\"top\":o.className=\"introjs-arrow bottom\",_(s,i?0:15,r,a,n),n.style.bottom=\"\".concat(s.height+20,\"px\");break;case\"right\":n.style.left=\"\".concat(s.width+20,\"px\"),s.top+r.height>a.height?(o.className=\"introjs-arrow left-bottom\",n.style.top=\"-\".concat(r.height-s.height-20,\"px\")):o.className=\"introjs-arrow left\";break;case\"left\":i||!0!==t._options.showStepNumbers||(n.style.top=\"15px\"),s.top+r.height>a.height?(n.style.top=\"-\".concat(r.height-s.height-20,\"px\"),o.className=\"introjs-arrow right-bottom\"):o.className=\"introjs-arrow right\",n.style.right=\"\".concat(s.width+20,\"px\");break;case\"floating\":o.style.display=\"none\",n.style.left=\"50%\",n.style.top=\"50%\",n.style.marginLeft=\"-\".concat(r.width/2,\"px\"),n.style.marginTop=\"-\".concat(r.height/2,\"px\");break;case\"bottom-right-aligned\":o.className=\"introjs-arrow top-right\",C(s,h=0,r,n),n.style.top=\"\".concat(s.height+20,\"px\");break;case\"bottom-middle-aligned\":o.className=\"introjs-arrow top-middle\",i&&(p+=5),C(s,p,r,n)&&(n.style.right=\"\",_(s,p,r,a,n)),n.style.top=\"\".concat(s.height+20,\"px\");break;default:o.className=\"introjs-arrow top\",_(s,0,r,a,n),n.style.top=\"\".concat(s.height+20,\"px\")}}}function A(){for(var t=0,e=Array.from(document.querySelectorAll(\".introjs-showElement\"));t<e.length;t++){v(e[t],/introjs-[a-zA-Z]+/g)}}function x(t,e){var n=document.createElement(t);e=e||{};var o=/^(?:role|data-|aria-)/;for(var i in e){var r=e[i];\"style\"===i&&\"function\"!=typeof r?y(n,r):\"string\"==typeof r&&i.match(o)?n.setAttribute(i,r):n[i]=r}return n}function N(t,e,n){if(void 0===n&&(n=!1),n){var o=e.style.opacity||\"1\";y(e,{opacity:\"0\"}),window.setTimeout((function(){y(e,{opacity:o})}),10)}t.appendChild(e)}function E(t,e){return(t+1)/e*100}function T(t,e){var n=x(\"div\",{className:\"introjs-bullets\"});!1===t._options.showBullets&&(n.style.display=\"none\");var o=x(\"ul\");o.setAttribute(\"role\",\"tablist\");for(var i=function(){var e=this.getAttribute(\"data-step-number\");null!=e&&t.goToStep(parseInt(e,10))},r=0;r<t._introItems.length;r++){var s=t._introItems[r].step,a=x(\"li\"),l=x(\"a\");a.setAttribute(\"role\",\"presentation\"),l.setAttribute(\"role\",\"tab\"),l.onclick=i,r===e.step-1&&(l.className=\"active\"),b(l),l.innerHTML=\" \",l.setAttribute(\"data-step-number\",s.toString()),a.appendChild(l),o.appendChild(a)}return n.appendChild(o),n}function I(t,e,n){var o=t.querySelector(\".introjs-progress .introjs-progressbar\");if(o){var i=E(e,n);o.style.cssText=\"width:\".concat(i,\"%;\"),o.setAttribute(\"aria-valuenow\",i.toString())}}function L(t,o){return e(this,void 0,void 0,(function(){var i,r,s,a,l,d,m,g,v,_,C,S,k,L,P,q,R,O,M,D,F,V,z,G,W=this;return n(this,(function(Q){switch(Q.label){case 0:return c(t._introChangeCallback)?[4,t._introChangeCallback.call(t,o.element)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return i=document.querySelector(\".introjs-helperLayer\"),r=document.querySelector(\".introjs-tooltipReferenceLayer\"),s=\"introjs-helperLayer\",\"string\"==typeof o.highlightClass&&(s+=\" \".concat(o.highlightClass)),\"string\"==typeof t._options.highlightClass&&(s+=\" \".concat(t._options.highlightClass)),null!==i&&null!==r?(m=r.querySelector(\".introjs-helperNumberLayer\"),g=r.querySelector(\".introjs-tooltiptext\"),v=r.querySelector(\".introjs-tooltip-title\"),_=r.querySelector(\".introjs-arrow\"),C=r.querySelector(\".introjs-tooltip\"),d=r.querySelector(\".introjs-skipbutton\"),l=r.querySelector(\".introjs-prevbutton\"),a=r.querySelector(\".introjs-nextbutton\"),i.className=s,C.style.opacity=\"0\",C.style.display=\"none\",h(t._options.scrollToElement,o.element),w(t,o,i),w(t,o,r),A(),t._lastShowElementTimer&&window.clearTimeout(t._lastShowElementTimer),t._lastShowElementTimer=window.setTimeout((function(){null!==m&&(m.innerHTML=\"\".concat(o.step,\" \").concat(t._options.stepNumbersOfLabel,\" \").concat(t._introItems.length)),g.innerHTML=o.intro||\"\",v.innerHTML=o.title||\"\",C.style.display=\"block\",j(t,o,C,_),function(t,e,n){if(t){var o=e.querySelector(\".introjs-bullets li > a.active\"),i=e.querySelector('.introjs-bullets li > a[data-step-number=\"'.concat(n.step,'\"]'));o&&i&&(o.className=\"\",i.className=\"active\")}}(t._options.showBullets,r,o),I(r,t._currentStep,t._introItems.length),C.style.opacity=\"1\",(null!=a&&/introjs-donebutton/gi.test(a.className)||null!=a)&&a.focus(),f(t._options.scrollToElement,o.scrollTo,t._options.scrollPadding,o.element,g)}),350)):(S=x(\"div\",{className:s}),k=x(\"div\",{className:\"introjs-tooltipReferenceLayer\"}),L=x(\"div\",{className:\"introjs-arrow\"}),P=x(\"div\",{className:\"introjs-tooltip\"}),q=x(\"div\",{className:\"introjs-tooltiptext\"}),R=x(\"div\",{className:\"introjs-tooltip-header\"}),O=x(\"h1\",{className:\"introjs-tooltip-title\"}),M=x(\"div\"),y(S,{\"box-shadow\":\"0 0 1px 2px rgba(33, 33, 33, 0.8), rgba(33, 33, 33, \".concat(t._options.overlayOpacity.toString(),\") 0 0 0 5000px\")}),h(t._options.scrollToElement,o.element),w(t,o,S),w(t,o,k),N(t._targetElement,S,!0),N(t._targetElement,k),q.innerHTML=o.intro,O.innerHTML=o.title,M.className=\"introjs-tooltipbuttons\",!1===t._options.showButtons&&(M.style.display=\"none\"),R.appendChild(O),P.appendChild(R),P.appendChild(q),t._options.dontShowAgain&&(D=x(\"div\",{className:\"introjs-dontShowAgain\"}),(F=x(\"input\",{type:\"checkbox\",id:\"introjs-dontShowAgain\",name:\"introjs-dontShowAgain\"})).onchange=function(e){t.setDontShowAgain(e.target.checked)},(V=x(\"label\",{htmlFor:\"introjs-dontShowAgain\"})).innerText=t._options.dontShowAgainLabel,D.appendChild(F),D.appendChild(V),P.appendChild(D)),P.appendChild(T(t,o)),P.appendChild(function(t){var e=x(\"div\");e.className=\"introjs-progress\",!1===t._options.showProgress&&(e.style.display=\"none\");var n=x(\"div\",{className:\"introjs-progressbar\"});t._options.progressBarAdditionalClass&&(n.className+=\" \"+t._options.progressBarAdditionalClass);var o=E(t._currentStep,t._introItems.length);return n.setAttribute(\"role\",\"progress\"),n.setAttribute(\"aria-valuemin\",\"0\"),n.setAttribute(\"aria-valuemax\",\"100\"),n.setAttribute(\"aria-valuenow\",o.toString()),n.style.cssText=\"width:\".concat(o,\"%;\"),e.appendChild(n),e}(t)),z=x(\"div\"),!0===t._options.showStepNumbers&&(z.className=\"introjs-helperNumberLayer\",z.innerHTML=\"\".concat(o.step,\" \").concat(t._options.stepNumbersOfLabel,\" \").concat(t._introItems.length),P.appendChild(z)),P.appendChild(L),k.appendChild(P),(a=x(\"a\")).onclick=function(){return e(W,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return t._introItems.length-1===t._currentStep?[3,2]:[4,B(t)];case 1:return e.sent(),[3,6];case 2:return/introjs-donebutton/gi.test(a.className)?c(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,\"done\")]:[3,4]:[3,6];case 3:e.sent(),e.label=4;case 4:return[4,et(t,t._targetElement)];case 5:e.sent(),e.label=6;case 6:return[2]}}))}))},b(a),a.innerHTML=t._options.nextLabel,(l=x(\"a\")).onclick=function(){return e(W,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return t._currentStep>0?[4,H(t)]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},b(l),l.innerHTML=t._options.prevLabel,b(d=x(\"a\",{className:\"introjs-skipbutton\"})),d.innerHTML=t._options.skipLabel,d.onclick=function(){return e(W,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return t._introItems.length-1===t._currentStep&&c(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,\"skip\")]:[3,2];case 1:e.sent(),e.label=2;case 2:return c(t._introSkipCallback)?[4,t._introSkipCallback.call(t,t._currentStep)]:[3,4];case 3:e.sent(),e.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return e.sent(),[2]}}))}))},R.appendChild(d),t._introItems.length>1&&M.appendChild(l),M.appendChild(a),P.appendChild(M),j(t,o,P,L),f(t._options.scrollToElement,o.scrollTo,t._options.scrollPadding,o.element,P)),(G=t._targetElement.querySelector(\".introjs-disableInteraction\"))&&G.parentNode&&G.parentNode.removeChild(G),o.disableInteraction&&function(t,e){var n=document.querySelector(\".introjs-disableInteraction\");null===n&&(n=x(\"div\",{className:\"introjs-disableInteraction\"}),t._targetElement.appendChild(n)),w(t,e,n)}(t,o),0===t._currentStep&&t._introItems.length>1?(null!=a&&(a.className=\"\".concat(t._options.buttonClass,\" introjs-nextbutton\"),a.innerHTML=t._options.nextLabel),!0===t._options.hidePrev?(null!=l&&(l.className=\"\".concat(t._options.buttonClass,\" introjs-prevbutton introjs-hidden\")),null!=a&&u(a,\"introjs-fullbutton\")):null!=l&&(l.className=\"\".concat(t._options.buttonClass,\" introjs-prevbutton introjs-disabled\"))):t._introItems.length-1===t._currentStep||1===t._introItems.length?(null!=l&&(l.className=\"\".concat(t._options.buttonClass,\" introjs-prevbutton\")),!0===t._options.hideNext?(null!=a&&(a.className=\"\".concat(t._options.buttonClass,\" introjs-nextbutton introjs-hidden\")),null!=l&&u(l,\"introjs-fullbutton\")):null!=a&&(!0===t._options.nextToDone?(a.innerHTML=t._options.doneLabel,u(a,\"\".concat(t._options.buttonClass,\" introjs-nextbutton introjs-donebutton\"))):a.className=\"\".concat(t._options.buttonClass,\" introjs-nextbutton introjs-disabled\"))):(null!=l&&(l.className=\"\".concat(t._options.buttonClass,\" introjs-prevbutton\")),null!=a&&(a.className=\"\".concat(t._options.buttonClass,\" introjs-nextbutton\"),a.innerHTML=t._options.nextLabel)),null!=l&&l.setAttribute(\"role\",\"button\"),null!=a&&a.setAttribute(\"role\",\"button\"),null!=d&&d.setAttribute(\"role\",\"button\"),null!=a&&a.focus(),function(t){u(t,\"introjs-showElement\");var e=p(t,\"position\");\"absolute\"!==e&&\"relative\"!==e&&\"sticky\"!==e&&\"fixed\"!==e&&u(t,\"introjs-relativePosition\")}(o.element),c(t._introAfterChangeCallback)?[4,t._introAfterChangeCallback.call(t,o.element)]:[3,4];case 3:Q.sent(),Q.label=4;case 4:return[2]}}))}))}function P(t,o){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return t._currentStep=o-2,void 0===t._introItems?[3,2]:[4,B(t)];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))}function q(t,o){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return t._currentStepNumber=o,void 0===t._introItems?[3,2]:[4,B(t)];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))}function B(t){return e(this,void 0,void 0,(function(){var e,o,i;return n(this,(function(n){switch(n.label){case 0:if(t._direction=\"forward\",void 0!==t._currentStepNumber)for(e=0;e<t._introItems.length;e++)t._introItems[e].step===t._currentStepNumber&&(t._currentStep=e-1,t._currentStepNumber=void 0);return-1===t._currentStep?t._currentStep=0:++t._currentStep,o=t._introItems[t._currentStep],i=!0,c(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,o&&o.element,t._currentStep,t._direction)]:[3,2];case 1:i=n.sent(),n.label=2;case 2:return!1===i?(--t._currentStep,[2,!1]):t._introItems.length<=t._currentStep?c(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,\"end\")]:[3,4]:[3,6];case 3:n.sent(),n.label=4;case 4:return[4,et(t,t._targetElement)];case 5:return n.sent(),[2,!1];case 6:return[4,L(t,o)];case 7:return n.sent(),[2,!0]}}))}))}function H(t){return e(this,void 0,void 0,(function(){var e,o;return n(this,(function(n){switch(n.label){case 0:return t._direction=\"backward\",t._currentStep<=0?[2,!1]:(--t._currentStep,e=t._introItems[t._currentStep],o=!0,c(t._introBeforeChangeCallback)?[4,t._introBeforeChangeCallback.call(t,e&&e.element,t._currentStep,t._direction)]:[3,2]);case 1:o=n.sent(),n.label=2;case 2:return!1===o?(++t._currentStep,[2,!1]):[4,L(t,e)];case 3:return n.sent(),[2,!0]}}))}))}function R(t,o){return e(this,void 0,void 0,(function(){var e,i;return n(this,(function(n){switch(n.label){case 0:return null===(e=void 0===o.code?o.which:o.code)&&(e=null===o.charCode?o.keyCode:o.charCode),\"Escape\"!==e&&27!==e||!0!==t._options.exitOnEsc?[3,2]:[4,et(t,t._targetElement)];case 1:return n.sent(),[3,16];case 2:return\"ArrowLeft\"!==e&&37!==e?[3,4]:[4,H(t)];case 3:return n.sent(),[3,16];case 4:return\"ArrowRight\"!==e&&39!==e?[3,6]:[4,B(t)];case 5:return n.sent(),[3,16];case 6:return\"Enter\"!==e&&\"NumpadEnter\"!==e&&13!==e?[3,16]:(i=o.target||o.srcElement)&&i.className.match(\"introjs-prevbutton\")?[4,H(t)]:[3,8];case 7:return n.sent(),[3,15];case 8:return i&&i.className.match(\"introjs-skipbutton\")?t._introItems.length-1===t._currentStep&&c(t._introCompleteCallback)?[4,t._introCompleteCallback.call(t,t._currentStep,\"skip\")]:[3,10]:[3,12];case 9:n.sent(),n.label=10;case 10:return[4,et(t,t._targetElement)];case 11:return n.sent(),[3,15];case 12:return i&&i.getAttribute(\"data-step-number\")?(i.click(),[3,15]):[3,13];case 13:return[4,B(t)];case 14:n.sent(),n.label=15;case 15:o.preventDefault?o.preventDefault():o.returnValue=!1,n.label=16;case 16:return[2]}}))}))}function O(e){if(null===e||\"object\"!==t(e)||\"nodeType\"in e)return e;var n={};for(var o in e)\"jQuery\"in window&&e[o]instanceof window.jQuery?n[o]=e[o]:n[o]=O(e[o]);return n}function M(t){var e=document.querySelector(\".introjs-hints\");return e?Array.from(e.querySelectorAll(t)):[]}function D(t,o){return e(this,void 0,void 0,(function(){var e;return n(this,(function(n){switch(n.label){case 0:return e=M('.introjs-hint[data-step=\"'.concat(o,'\"]'))[0],Y(),e&&u(e,\"introjs-hidehint\"),c(t._hintCloseCallback)?[4,t._hintCloseCallback.call(t,o)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}}))}))}function F(t){return e(this,void 0,void 0,(function(){var e,o,i,r,s;return n(this,(function(n){switch(n.label){case 0:e=M(\".introjs-hint\"),o=0,i=e,n.label=1;case 1:return o<i.length?(r=i[o],(s=r.getAttribute(\"data-step\"))?[4,D(t,parseInt(s,10))]:[3,3]):[3,4];case 2:n.sent(),n.label=3;case 3:return o++,[3,1];case 4:return[2]}}))}))}function V(t){return e(this,void 0,void 0,(function(){var e,o,i,r,s;return n(this,(function(n){switch(n.label){case 0:if(!(e=M(\".introjs-hint\"))||!e.length)return[3,1];for(o=0,i=e;o<i.length;o++)r=i[o],(s=r.getAttribute(\"data-step\"))&&z(parseInt(s,10));return[3,3];case 1:return[4,$(t,t._targetElement)];case 2:n.sent(),n.label=3;case 3:return[2]}}))}))}function z(t){var e=M('.introjs-hint[data-step=\"'.concat(t,'\"]'))[0];e&&v(e,/introjs-hidehint/g)}function G(t){var e=M('.introjs-hint[data-step=\"'.concat(t,'\"]'))[0];e&&e.parentNode&&e.parentNode.removeChild(e)}function W(t){return e(this,void 0,void 0,(function(){var e,o,i,r,s,a,p;return n(this,(function(n){switch(n.label){case 0:for(null===(e=document.querySelector(\".introjs-hints\"))&&(e=x(\"div\",{className:\"introjs-hints\"})),o=function(e){return function(n){var o=n||window.event;o&&o.stopPropagation&&o.stopPropagation(),o&&null!==o.cancelBubble&&(o.cancelBubble=!0),X(t,e)}},i=0;i<t._hintItems.length;i++){if(r=t._hintItems[i],document.querySelector('.introjs-hint[data-step=\"'.concat(i,'\"]')))return[2];b(s=x(\"a\",{className:\"introjs-hint\"})),s.onclick=o(i),r.hintAnimation||u(s,\"introjs-hint-no-anim\"),m(r.element)&&u(s,\"introjs-fixedhint\"),a=x(\"div\",{className:\"introjs-hint-dot\"}),p=x(\"div\",{className:\"introjs-hint-pulse\"}),s.appendChild(a),s.appendChild(p),s.setAttribute(\"data-step\",i.toString()),r.hintTargetElement=r.element,r.element=s,Q(r.hintPosition,s,r.hintTargetElement),e.appendChild(s)}return document.body.appendChild(e),c(t._hintsAddedCallback)?[4,t._hintsAddedCallback.call(t)]:[3,2];case 1:n.sent(),n.label=2;case 2:return t._options.hintAutoRefreshInterval>=0&&(t._hintsAutoRefreshFunction=(h=function(){return U(t)},d=t._options.hintAutoRefreshInterval,function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];window.clearTimeout(f),f=window.setTimeout((function(){h(t)}),d)}),l.on(window,\"scroll\",t._hintsAutoRefreshFunction,t,!0)),[2]}var h,d,f}))}))}function Q(t,e,n){if(void 0!==n){var o=g(n),i=20,r=20;switch(t){default:case\"top-left\":e.style.left=\"\".concat(o.left,\"px\"),e.style.top=\"\".concat(o.top,\"px\");break;case\"top-right\":e.style.left=\"\".concat(o.left+o.width-i,\"px\"),e.style.top=\"\".concat(o.top,\"px\");break;case\"bottom-left\":e.style.left=\"\".concat(o.left,\"px\"),e.style.top=\"\".concat(o.top+o.height-r,\"px\");break;case\"bottom-right\":e.style.left=\"\".concat(o.left+o.width-i,\"px\"),e.style.top=\"\".concat(o.top+o.height-r,\"px\");break;case\"middle-left\":e.style.left=\"\".concat(o.left,\"px\"),e.style.top=\"\".concat(o.top+(o.height-r)/2,\"px\");break;case\"middle-right\":e.style.left=\"\".concat(o.left+o.width-i,\"px\"),e.style.top=\"\".concat(o.top+(o.height-r)/2,\"px\");break;case\"middle-middle\":e.style.left=\"\".concat(o.left+(o.width-i)/2,\"px\"),e.style.top=\"\".concat(o.top+(o.height-r)/2,\"px\");break;case\"bottom-middle\":e.style.left=\"\".concat(o.left+(o.width-i)/2,\"px\"),e.style.top=\"\".concat(o.top+o.height-r,\"px\");break;case\"top-middle\":e.style.left=\"\".concat(o.left+(o.width-i)/2,\"px\"),e.style.top=\"\".concat(o.top,\"px\")}}}function X(t,o){return e(this,void 0,void 0,(function(){var e,i,r,s,a,l,u,p,h,d,f;return n(this,(function(n){switch(n.label){case 0:return e=document.querySelector('.introjs-hint[data-step=\"'.concat(o,'\"]')),i=t._hintItems[o],c(t._hintClickCallback)?[4,t._hintClickCallback.call(t,e,i,o)]:[3,2];case 1:n.sent(),n.label=2;case 2:return void 0!==(r=Y())&&parseInt(r,10)===o||(s=x(\"div\",{className:\"introjs-tooltip\"}),a=x(\"div\"),l=x(\"div\"),u=x(\"div\"),s.onclick=function(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0},a.className=\"introjs-tooltiptext\",(p=x(\"p\")).innerHTML=i.hint||\"\",a.appendChild(p),t._options.hintShowButton&&((h=x(\"a\")).className=t._options.buttonClass,h.setAttribute(\"role\",\"button\"),h.innerHTML=t._options.hintButtonLabel,h.onclick=function(){return D(t,o)},a.appendChild(h)),l.className=\"introjs-arrow\",s.appendChild(l),s.appendChild(a),d=e.getAttribute(\"data-step\")||\"\",t._currentStep=parseInt(d,10),f=t._hintItems[t._currentStep],u.className=\"introjs-tooltipReferenceLayer introjs-hintReference\",u.setAttribute(\"data-step\",d),w(t,f,u),u.appendChild(s),document.body.appendChild(u),j(t,f,s,l,!0)),[2]}}))}))}function Y(){var t=document.querySelector(\".introjs-hintReference\");if(t&&t.parentNode){var e=t.getAttribute(\"data-step\");if(!e)return;return t.parentNode.removeChild(t),e}}function $(t,o){return e(this,void 0,void 0,(function(){var e,i,r,s,a,c,u,p,h,d;return n(this,(function(n){switch(n.label){case 0:if(t._hintItems=[],t._options.hints&&t._options.hints.length>0)for(e=0,i=t._options.hints;e<i.length;e++)r=i[e],\"string\"==typeof(s=O(r)).element&&(s.element=document.querySelector(s.element)),s.hintPosition=s.hintPosition||t._options.hintPosition,s.hintAnimation=s.hintAnimation||t._options.hintAnimation,null!==s.element&&t._hintItems.push(s);else{if(!(a=Array.from(o.querySelectorAll(\"*[data-hint]\")))||!a.length)return[2,!1];for(c=0,u=a;c<u.length;c++)p=u[c],h=p.getAttribute(\"data-hint-animation\"),d=t._options.hintAnimation,h&&(d=\"true\"===h),t._hintItems.push({element:p,hint:p.getAttribute(\"data-hint\")||\"\",hintPosition:p.getAttribute(\"data-hint-position\")||t._options.hintPosition,hintAnimation:d,tooltipClass:p.getAttribute(\"data-tooltip-class\")||void 0,position:p.getAttribute(\"data-position\")||t._options.tooltipPosition})}return[4,W(t)];case 1:return n.sent(),l.on(document,\"click\",Y,t,!1),l.on(window,\"resize\",U,t,!0),[2,!0]}}))}))}function U(t){for(var e=0,n=t._hintItems;e<n.length;e++){var o=n[e],i=o.hintTargetElement;Q(o.hintPosition,o.element,i)}}function Z(t,e){var n=Array.from(e.querySelectorAll(\"*[data-intro]\")),o=[];if(t._options.steps&&t._options.steps.length)for(var i=0,r=t._options.steps;i<r.length;i++){var s=O(h=r[i]);if(s.step=o.length+1,s.title=s.title||\"\",\"string\"==typeof s.element&&(s.element=document.querySelector(s.element)||void 0),void 0===s.element||null===s.element){var a=document.querySelector(\".introjsFloatingElement\");null===a&&(a=x(\"div\",{className:\"introjsFloatingElement\"}),document.body.appendChild(a)),s.element=a,s.position=\"floating\"}s.position=s.position||t._options.tooltipPosition,s.scrollTo=s.scrollTo||t._options.scrollTo,void 0===s.disableInteraction&&(s.disableInteraction=t._options.disableInteraction),null!==s.element&&o.push(s)}else{var l=void 0;if(n.length<1)return[];for(var c=0,u=n;c<u.length;c++){var p=u[c];if((!t._options.group||p.getAttribute(\"data-intro-group\")===t._options.group)&&\"none\"!==p.style.display){var h=parseInt(p.getAttribute(\"data-step\")||\"\",10);l=t._options.disableInteraction,p.hasAttribute(\"data-disable-interaction\")&&(l=!!p.getAttribute(\"data-disable-interaction\")),h>0&&(o[h-1]={step:h,element:p,title:p.getAttribute(\"data-title\")||\"\",intro:p.getAttribute(\"data-intro\")||\"\",tooltipClass:p.getAttribute(\"data-tooltip-class\")||void 0,highlightClass:p.getAttribute(\"data-highlight-class\")||void 0,position:p.getAttribute(\"data-position\")||t._options.tooltipPosition,scrollTo:p.getAttribute(\"data-scroll-to\")||t._options.scrollTo,disableInteraction:l})}}for(var d=0,f=0,b=n;f<b.length;f++){p=b[f];if((!t._options.group||p.getAttribute(\"data-intro-group\")===t._options.group)&&null===p.getAttribute(\"data-step\")){for(;void 0!==o[d];)d++;l=p.hasAttribute(\"data-disable-interaction\")?!!p.getAttribute(\"data-disable-interaction\"):t._options.disableInteraction,o[d]={element:p,title:p.getAttribute(\"data-title\")||\"\",intro:p.getAttribute(\"data-intro\")||\"\",step:d+1,tooltipClass:p.getAttribute(\"data-tooltip-class\")||void 0,highlightClass:p.getAttribute(\"data-highlight-class\")||void 0,position:p.getAttribute(\"data-position\")||t._options.tooltipPosition,scrollTo:p.getAttribute(\"data-scroll-to\")||t._options.scrollTo,disableInteraction:l}}}}for(var m=[],g=0;g<o.length;g++)o[g]&&m.push(o[g]);return(o=m).sort((function(t,e){return t.step-e.step})),o}function J(t,e){var n=t._currentStep;if(null!=n&&-1!=n){var o=t._introItems[n],i=document.querySelector(\".introjs-tooltipReferenceLayer\"),r=document.querySelector(\".introjs-helperLayer\"),s=document.querySelector(\".introjs-disableInteraction\");w(t,o,r),w(t,o,i),w(t,o,s),e&&(t._introItems=Z(t,t._targetElement),function(t,e){if(t._options.showBullets){var n=document.querySelector(\".introjs-bullets\");n&&n.parentNode&&n.parentNode.replaceChild(T(t,e),n)}}(t,o),I(i,n,t._introItems.length));var a=document.querySelector(\".introjs-arrow\"),l=document.querySelector(\".introjs-tooltip\");return l&&a&&j(t,t._introItems[n],l,a),U(t),t}}function K(t){J(t)}function tt(t,e){if(void 0===e&&(e=!1),t&&t.parentElement){var n=t.parentElement;e?(y(t,{opacity:\"0\"}),window.setTimeout((function(){try{n.removeChild(t)}catch(t){}}),500)):n.removeChild(t)}}function et(t,o,i){return void 0===i&&(i=!1),e(this,void 0,void 0,(function(){var e,r,s,a;return n(this,(function(n){switch(n.label){case 0:return e=!0,void 0===t._introBeforeExitCallback?[3,2]:[4,t._introBeforeExitCallback.call(t,o)];case 1:e=n.sent(),n.label=2;case 2:if(!i&&!1===e)return[2];if((r=Array.from(o.querySelectorAll(\".introjs-overlay\")))&&r.length)for(s=0,a=r;s<a.length;s++)tt(a[s]);return tt(o.querySelector(\".introjs-helperLayer\"),!0),tt(o.querySelector(\".introjs-tooltipReferenceLayer\")),tt(o.querySelector(\".introjs-disableInteraction\")),tt(document.querySelector(\".introjsFloatingElement\")),A(),l.off(window,\"keydown\",R,t,!0),l.off(window,\"resize\",K,t,!0),c(t._introExitCallback)?[4,t._introExitCallback.call(t)]:[3,4];case 3:n.sent(),n.label=4;case 4:return t._currentStep=-1,[2]}}))}))}function nt(t,o){return e(this,void 0,void 0,(function(){var i;return n(this,(function(r){switch(r.label){case 0:return t.isActive()?c(t._introStartCallback)?[4,t._introStartCallback.call(t,o)]:[3,2]:[2,!1];case 1:r.sent(),r.label=2;case 2:return 0===(i=Z(t,o)).length?[2,!1]:(t._introItems=i,function(t,o){var i=this,r=x(\"div\",{className:\"introjs-overlay\"});y(r,{top:0,bottom:0,left:0,right:0,position:\"fixed\"}),o.appendChild(r),!0===t._options.exitOnOverlayClick&&(y(r,{cursor:\"pointer\"}),r.onclick=function(){return e(i,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,et(t,o)];case 1:return e.sent(),[2]}}))}))})}(t,o),[4,B(t)]);case 3:r.sent(),o.addEventListener,t._options.keyboardNavigation&&l.on(window,\"keydown\",R,t,!0),l.on(window,\"resize\",K,t,!0),r.label=4;case 4:return[2,!1]}}))}))}function ot(t,e,n){return t[e]=n,t}var it=function(){function t(t){this._currentStep=-1,this._introItems=[],this._hintItems=[],this._targetElement=t,this._options={steps:[],hints:[],isActive:!0,nextLabel:\"Next\",prevLabel:\"Back\",skipLabel:\"×\",doneLabel:\"Done\",hidePrev:!1,hideNext:!1,nextToDone:!0,tooltipPosition:\"bottom\",tooltipClass:\"\",group:\"\",highlightClass:\"\",exitOnEsc:!0,exitOnOverlayClick:!0,showStepNumbers:!1,stepNumbersOfLabel:\"of\",keyboardNavigation:!0,showButtons:!0,showBullets:!0,showProgress:!1,scrollToElement:!0,scrollTo:\"element\",scrollPadding:30,overlayOpacity:.5,autoPosition:!0,positionPrecedence:[\"bottom\",\"top\",\"right\",\"left\"],disableInteraction:!1,dontShowAgain:!1,dontShowAgainLabel:\"Don't show this again\",dontShowAgainCookie:\"introjs-dontShowAgain\",dontShowAgainCookieDays:365,helperElementPadding:10,hintPosition:\"top-middle\",hintButtonLabel:\"Got it\",hintShowButton:!0,hintAutoRefreshInterval:10,hintAnimation:!0,buttonClass:\"introjs-button\",progressBarAdditionalClass:!1}}return t.prototype.isActive=function(){return(!this._options.dontShowAgain||\"\"===(t=i(this._options.dontShowAgainCookie))||\"true\"!==t)&&this._options.isActive;var t},t.prototype.clone=function(){return new t(this._targetElement)},t.prototype.setOption=function(t,e){return this._options=ot(this._options,t,e),this},t.prototype.setOptions=function(t){return this._options=function(t,e){for(var n=0,o=Object.entries(e);n<o.length;n++){var i=o[n];t=ot(t,i[0],i[1])}return t}(this._options,t),this},t.prototype.start=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,nt(this,this._targetElement)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.goToStep=function(t){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,P(this,t)];case 1:return e.sent(),[2,this]}}))}))},t.prototype.addStep=function(t){return this._options.steps||(this._options.steps=[]),this._options.steps.push(t),this},t.prototype.addSteps=function(t){if(!t.length)return this;for(var e=0;e<t.length;e++)this.addStep(t[e]);return this},t.prototype.goToStepNumber=function(t){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,q(this,t)];case 1:return e.sent(),[2,this]}}))}))},t.prototype.nextStep=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,B(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.previousStep=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,H(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.currentStep=function(){return this._currentStep},t.prototype.exit=function(t){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,et(this,this._targetElement,t)];case 1:return e.sent(),[2,this]}}))}))},t.prototype.refresh=function(t){return J(this,t),this},t.prototype.setDontShowAgain=function(t){return r(this,t),this},t.prototype.onbeforechange=function(t){if(!c(t))throw new Error(\"Provided callback for onbeforechange was not a function\");return this._introBeforeChangeCallback=t,this},t.prototype.onchange=function(t){if(!c(t))throw new Error(\"Provided callback for onchange was not a function.\");return this._introChangeCallback=t,this},t.prototype.onafterchange=function(t){if(!c(t))throw new Error(\"Provided callback for onafterchange was not a function\");return this._introAfterChangeCallback=t,this},t.prototype.oncomplete=function(t){if(!c(t))throw new Error(\"Provided callback for oncomplete was not a function.\");return this._introCompleteCallback=t,this},t.prototype.onhintsadded=function(t){if(!c(t))throw new Error(\"Provided callback for onhintsadded was not a function.\");return this._hintsAddedCallback=t,this},t.prototype.onhintclick=function(t){if(!c(t))throw new Error(\"Provided callback for onhintclick was not a function.\");return this._hintClickCallback=t,this},t.prototype.onhintclose=function(t){if(!c(t))throw new Error(\"Provided callback for onhintclose was not a function.\");return this._hintCloseCallback=t,this},t.prototype.onstart=function(t){if(!c(t))throw new Error(\"Provided callback for onstart was not a function.\");return this._introStartCallback=t,this},t.prototype.onexit=function(t){if(!c(t))throw new Error(\"Provided callback for onexit was not a function.\");return this._introExitCallback=t,this},t.prototype.onskip=function(t){if(!c(t))throw new Error(\"Provided callback for onskip was not a function.\");return this._introSkipCallback=t,this},t.prototype.onbeforeexit=function(t){if(!c(t))throw new Error(\"Provided callback for onbeforeexit was not a function.\");return this._introBeforeExitCallback=t,this},t.prototype.addHints=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,$(this,this._targetElement)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.hideHint=function(t){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,D(this,t)];case 1:return e.sent(),[2,this]}}))}))},t.prototype.hideHints=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,F(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.showHint=function(t){return z(t),this},t.prototype.showHints=function(){return e(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return[4,V(this)];case 1:return t.sent(),[2,this]}}))}))},t.prototype.removeHints=function(){return function(t){for(var e=0,n=M(\".introjs-hint\");e<n.length;e++){var o=n[e].getAttribute(\"data-step\");o&&G(parseInt(o,10))}l.off(document,\"click\",Y,t,!1),l.off(window,\"resize\",U,t,!0),t._hintsAutoRefreshFunction&&l.off(window,\"scroll\",t._hintsAutoRefreshFunction,t,!0)}(this),this},t.prototype.removeHint=function(t){return G(t),this},t.prototype.showHintDialog=function(t){return e(this,void 0,void 0,(function(){return n(this,(function(e){switch(e.label){case 0:return[4,X(this,t)];case 1:return e.sent(),[2,this]}}))}))},t}(),rt=function e(n){var o;if(\"object\"===t(n))o=new it(n);else if(\"string\"==typeof n){var i=document.querySelector(n);if(!i)throw new Error(\"There is no element with given selector.\");o=new it(i)}else o=new it(document.body);return e.instances[a(o,\"introjs-instance\")]=o,o};rt.version=\"7.2.0\",rt.instances={};export{rt as default};\n//# sourceMappingURL=intro.module.js.map\n","// context/TourContext.js\nimport { createContext, useContext, useState } from 'react';\nimport introJs from 'intro.js';\nimport 'intro.js/introjs.css';\nimport { useRouter } from 'next/router';\nimport { useAuthUser } from '@hooks/use-auth';\nimport { useMutation } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport index from 'pages/user/rewards';\n\nconst TourContext = createContext({\n startTour: (steps: any[]) => {},\n isTourActive: false,\n});\n\nexport const RenderContent = ({ title, content }) => {\n return (\n <div className=\"flex flex-col gap-3\">\n <h1 className=\"text-2xl font-medium text-gray-900 dark:text-white font-plusJakarta\">\n {title}\n </h1>\n <p className=\"text-gray-600 dark:text-white font-plusJakarta\">{content}</p>\n </div>\n );\n};\n\nexport const TourProvider = ({ children }) => {\n const { refetchUserInfo, profile } = useAuthUser();\n\n const updateProfileMutation = useMutation(\n async () => {\n const { data } = await ApiService.updateBuyer({ isWelcomeFlashCardsShown: true });\n return data;\n },\n {\n onSuccess: async ({ profile }) => {\n await refetchUserInfo();\n },\n },\n );\n\n const [isTourActive, setIsTourActive] = useState(false);\n const router = useRouter();\n const intro = introJs();\n const startTour = (steps) => {\n setIsTourActive(true);\n intro\n .setOptions({\n steps: steps.map((step, idx) => ({\n ...step,\n intro: step.intro(),\n nextlabel:'Next',\n prevLabel: idx === 0 ? 'ok' : 'Previous',\n })),\n exitOnOverlayClick: false,\n overlayOpacity: 0.8,\n keyboardNavigation: true,\n disableInteraction: true,\n // skipLabel: 'Skip Tour',\n nextLabel: 'Next',\n prevLabel: 'Previous',\n doneLabel: 'Close',\n tooltipClass: 'introjs-tooltip-custom',\n showStepNumbers: true,\n })\n .onbeforechange((targetElement) => {\n if (targetElement.id === 'step2') {\n window.scrollBy(0, 250);\n }\n\n return true;\n })\n .onexit(() => {\n updateProfileMutation.mutate();\n\n setIsTourActive(false);\n })\n .start();\n };\n\n return (\n <TourContext.Provider value={{ startTour, isTourActive }}>{children}</TourContext.Provider>\n );\n};\n\nexport const useTour = () => useContext(TourContext);\n","import { create } from 'zustand';\nimport { persist } from 'zustand/middleware';\n\ntype State = {\n mode: 'light' | 'dark';\n};\n\ntype Methods = {\n toggle: () => void;\n};\n\ntype Store = State & Methods;\n\nconst initialState: State = {\n mode: 'light',\n};\n\nexport const useTheme = create(\n persist<Store>(\n (set) => ({\n ...initialState,\n toggle: () =>\n set((state) => {\n if (state.mode === 'light') {\n return { mode: 'dark' };\n }\n\n return { mode: 'light' };\n }),\n }),\n { name: 'dark-mode' },\n ),\n);\n","import { RefObject, useEffect } from 'react';\n\nexport const useClickOutside = <T extends HTMLElement = HTMLElement>(\n ref: RefObject<T>,\n handler: (event: Event) => void\n) => {\n useEffect(() => {\n const listener = (event: Event) => {\n const el = ref?.current;\n if (!el || el.contains((event?.target as Node) || null)) {\n return;\n }\n\n handler(event); // Call the handler only if the click is outside of the element passed.\n };\n\n document.addEventListener('mousedown', listener);\n document.addEventListener('touchstart', listener);\n\n return () => {\n document.removeEventListener('mousedown', listener);\n document.removeEventListener('touchstart', listener);\n };\n }, [ref, handler]); // Reload only if ref or handler changes\n};\n","import { mockApi } from '@utils';\nimport { useMutation } from 'react-query';\n\nexport const useUpdateProfile = () => {\n const mutation = useMutation(async (values) => {\n await mockApi({ values });\n });\n\n const onSubmit = (values) => {\n mutation.mutate(values);\n };\n\n return { mutation, onSubmit };\n};\n","export const useArrayInfo = () => {\n // TODO: Check if should get this from .env\n return {\n appKey: '0DDE0E09-E247-424B-9D6D-D374202183D9',\n };\n};\n","import { useMutation } from 'react-query';\nimport { ApiService } from '@services/Api';\nimport { create } from 'zustand';\nimport { useAuthUser } from '@hooks/use-auth';\nimport { useDebtsQuery, useIncomeQuery, useSavingsQuery } from '../use-dashboard-queries';\n\nexport const useSyncStore = create<{\n isOpenSyncModal: boolean;\n setIsOpenSyncModal: (isOpenSyncModal: boolean) => void;\n setSyncStatus: (status: 'idle' | 'loading' | 'error' | 'successful') => void;\n syncStatus: 'idle' | 'loading' | 'error' | 'successful';\n}>((set) => ({\n isOpenSyncModal: false,\n setIsOpenSyncModal: (isOpenSyncModal: boolean) => set({ isOpenSyncModal }),\n setSyncStatus: (status) => set({ syncStatus: status }),\n syncStatus: 'idle',\n}));\n\nexport const useSyncData = (fetchMoneyDataOnMount = true) => {\n const { refetchUserInfo, updateUserInfo } = useAuthUser();\n const { setSyncStatus } = useSyncStore();\n const incomeQuery = useIncomeQuery(fetchMoneyDataOnMount);\n const debtsQuery = useDebtsQuery(fetchMoneyDataOnMount);\n const savingsQuery = useSavingsQuery(fetchMoneyDataOnMount);\n\n const mutation = useMutation(\n async () => {\n setSyncStatus('loading');\n\n // This will update the profile state to show the user that the data is being fetched\n const interval = setInterval(() => {\n refetchUserInfo();\n clearInterval(interval);\n }, 1000); // This is 100 because we want it to go off immediately\n\n const resp = await ApiService.syncVerifiedData();\n return resp.data;\n },\n {\n onSettled: () => {\n updateUserInfo({ dataSynced: true });\n refetchUserInfo();\n incomeQuery.refetch();\n debtsQuery.refetch();\n savingsQuery.refetch();\n },\n },\n );\n\n return mutation;\n};\n","import { useCalculateScore } from '@hooks/use-calculate-score';\n\nexport const useIsDataReady = () => {\n const query = useCalculateScore();\n\n return {\n isDataReady: Boolean(query.data?.grades?.totalScore?.value),\n isDataLoading: query.isLoading,\n isDataError: query.isError,\n };\n};\n","import { useEffect, useState } from 'react';\nimport { useRouter } from 'next/router'; // Assuming you're using Next.js for routing\n\ninterface CustomNotification {\n title: string;\n body: string;\n icon?: string;\n timestamp: Date;\n senderName?: string; // Optional: sender's name\n messageContent?: string; // Optional: message content\n}\n\nexport const useNotification = () => {\n const [notifications, setNotifications] = useState<CustomNotification[]>([]);\n const router = useRouter(); // Use router for navigation\n\n const addNotification = (\n title: string,\n options?: NotificationOptions,\n senderName?: string,\n messageContent?: string\n ) => {\n if (Notification.permission === 'granted') {\n const notification = new Notification(title, options);\n\n notification.onclick = () => {\n window.focus();\n // Redirect to messages page (you might need to adjust the path)\n router.push('/messages');\n };\n\n const newNotification: CustomNotification = {\n title,\n body: options?.body || '',\n icon: options?.icon || '',\n timestamp: new Date(),\n senderName,\n messageContent,\n };\n\n setNotifications((prev) => [...prev, newNotification]);\n } else if (Notification.permission === 'default') {\n Notification.requestPermission().then((permission) => {\n if (permission === 'granted') {\n addNotification(title, options, senderName, messageContent); // Retry adding the notification\n }\n });\n }\n };\n\n useEffect(() => {\n if (Notification.permission === 'default') {\n Notification.requestPermission();\n }\n }, []);\n\n return { notifications, addNotification };\n};\n","export * from './use-theme';\nexport * from './use-auth';\nexport * from './use-is-mounted';\nexport * from './use-click-outside';\nexport * from './use-buyer-sign-info';\nexport * from './use-onboarding';\nexport * from './use-update-profile';\nexport * from './use-calculate-score';\nexport * from './use-dashboard-modal';\nexport * from './use-array-info';\nexport * from './use-sync-data';\nexport * from './use-is-data-ready';\nexport * from './use-dashboard-queries';\nexport * from './use-notification';\n\n","import { UseMutationOptions, useMutation } from 'react-query';\nimport {\n ApiService,\n BuyerOnboardingStatus,\n ChildrenUnder18CountOptions,\n EGender,\n EMilitaryStatus,\n EOnboardingStepStatus,\n EReasonForPurchase,\n WishedLocation,\n} from '@services/Api';\nimport {\n RefreshBuyerOnboardingStatusBody,\n refreshBuyerOnboardingStatus,\n} from '@services/Api/controllers';\nimport { create } from 'zustand';\nimport { devtools, persist } from 'zustand/middleware';\n\nexport interface CompleteProfileFields {\n firstName: string;\n lastName: string;\n phone: string;\n birthMonth: string;\n birthDay: string;\n birthYear: string;\n gender: EGender;\n race: string;\n hispanicOrigin: 'yes' | 'no';\n children: 'yes' | 'no';\n childrenUnder18Count: ChildrenUnder18CountOptions;\n city: string;\n apartment: string;\n state: string;\n zipCode: string;\n occupation: string;\n militaryStatus: EMilitaryStatus;\n reasonForPurchase: EReasonForPurchase;\n wishedLocations: WishedLocation | any;\n expectedPurchaseMonthsPeriod: number;\n housePriceGoal: number;\n street: string;\n avatar: string;\n coBorrower: 'yes' | 'no';\n coBorrowersFirstName: string;\n coBorrowersLastName: string;\n coBorrowersEmail: string;\n houseRent: string;\n email: string;\n allowedEmails: string[];\n allowedSMS: string[];\n onboardingProfileStatus?: EOnboardingStepStatus;\n}\n\nexport type CompleteModalType =\n | 'completeProfile'\n | 'addTransactionItem'\n | 'generateCreditReport'\n | 'feedback'\n | 'createCreditReportUser'\n | 'successFeedback'\n | 'addIncome';\n\nexport const useCompleteModal = create(\n devtools(\n persist<\n {\n currentModal: CompleteModalType;\n setCurrentModal: (currentModal: CompleteModalType) => void;\n setCurrentStep: (step: number) => void;\n setValues: (values: CompleteProfileFields) => void;\n reset: () => void;\n updateUserData: () => void;\n step: number;\n } & CompleteProfileFields\n >(\n (set, get) => ({\n currentModal: null,\n step: 1,\n setCurrentModal: (currentModal: CompleteModalType) => set({ currentModal }),\n setCurrentStep: (step: number) => set({ step }),\n setValues: (values: Partial<CompleteProfileFields>) => set(values, false),\n firstName: undefined,\n lastName: undefined,\n phone: undefined,\n birthMonth: undefined,\n birthDay: undefined,\n birthYear: undefined,\n children: undefined,\n childrenUnder18Count: null,\n street: undefined,\n apartment: undefined,\n city: undefined,\n state: undefined,\n zipCode: undefined,\n militaryStatus: undefined,\n occupation: undefined,\n reasonForPurchase: undefined,\n wishedLocations: undefined,\n expectedPurchaseMonthsPeriod: undefined,\n housePriceGoal: undefined,\n gender: undefined,\n race: undefined,\n hispanicOrigin: undefined,\n ssn: undefined,\n avatar: undefined,\n coBorrower: 'no',\n coBorrowersFirstName: undefined,\n coBorrowersLastName: undefined,\n coBorrowersEmail: undefined,\n houseRent: undefined,\n email: undefined,\n allowedEmails: ['recommendations', 'account_setup', 'marketing'],\n allowedSMS: [],\n reset: () => {\n set({\n currentModal: null,\n firstName: undefined,\n lastName: undefined,\n phone: undefined,\n birthMonth: undefined,\n birthDay: undefined,\n birthYear: undefined,\n children: undefined,\n childrenUnder18Count: null,\n street: undefined,\n city: undefined,\n state: undefined,\n zipCode: undefined,\n militaryStatus: undefined,\n occupation: undefined,\n reasonForPurchase: undefined,\n wishedLocations: undefined,\n expectedPurchaseMonthsPeriod: undefined,\n housePriceGoal: undefined,\n gender: undefined,\n race: undefined,\n hispanicOrigin: undefined,\n avatar: undefined,\n step: 1,\n coBorrower: 'no',\n coBorrowersFirstName: undefined,\n coBorrowersLastName: undefined,\n coBorrowersEmail: undefined,\n houseRent: undefined,\n email: undefined,\n allowedEmails: ['recommendations', 'account_setup', 'marketing'],\n allowedSMS: [],\n });\n },\n updateUserData: async () => {\n const data = Object.fromEntries(\n Object.entries(JSON.parse(JSON.stringify({ ...get() })))\n .map(([key, value]) => {\n if (!value) return null;\n if (['yes', 'no'].includes(value as string)) {\n value = value === 'yes' ? true : false;\n }\n return [key, value];\n })\n .filter((e) => e),\n );\n const res = await ApiService.updateBuyer(data);\n },\n }),\n { name: 'mhp-complete-modal' },\n ),\n { name: 'mhp-complete-modal' },\n ),\n);\n\nexport const useSkipOnboardingSteps = () => {\n const skipMutation = useMutation(async (body: RefreshBuyerOnboardingStatusBody) => {\n const { data } = await refreshBuyerOnboardingStatus(body);\n return data;\n });\n return {\n skip: (\n body: RefreshBuyerOnboardingStatusBody,\n options?: Omit<\n UseMutationOptions<\n BuyerOnboardingStatus,\n unknown,\n RefreshBuyerOnboardingStatusBody,\n unknown\n >,\n 'mutationFn'\n >,\n ) => skipMutation.mutate(body, options),\n skipMutation,\n };\n};\n","import { commonRoutes, isValidUrl } from '@utils';\nimport { AxiosResponse } from 'axios';\nimport { useCompleteModal } from '@hooks/use-complete-modal';\nimport { useRouter } from 'next/router';\nimport { useCallback, useEffect } from 'react';\nimport { useQuery } from 'react-query';\nimport {\n ApiService,\n BuyerProfile,\n CoBorrowerProfile,\n EApprovalStatus,\n EOnboardingPathTaken,\n EOnboardingStepStatus,\n GoogleBuyerProfile,\n} from '@services/Api';\nimport { create } from 'zustand';\nimport { devtools, persist } from 'zustand/middleware';\nimport * as gtag from '@lib/gtag';\nexport interface UserResponse {\n id: string;\n firstName: string;\n lastName: string;\n username: string;\n email: string;\n phone: string;\n isEmailVerified: boolean | null;\n isPhoneVerified: boolean | null;\n agreedToTerms: boolean | null;\n}\n\nexport type UserInfo = Omit<UserResponse, 'username'> & {\n phoneNumber: string;\n firstName: string;\n lastName: string;\n userName: string;\n email: string;\n authenticationId: string;\n accessToken: string;\n updateUserInfo: (userInfo: Partial<UserInfo>) => void;\n logout: () => void;\n signedIn: boolean;\n partnerCodeStatus: boolean;\n image?: string;\n userType?: 'buyer' | 'partner';\n selectedAuth: 'phone' | 'email' | 'google';\n dataSynced?: boolean;\n profile: BuyerProfile | GoogleBuyerProfile | null;\n};\n\nconst initialUserData: Omit<UserInfo, 'updateUserInfo' | 'logout'> = {\n firstName: '',\n lastName: '',\n userName: '',\n email: '',\n phoneNumber: '',\n authenticationId: '',\n accessToken: '',\n signedIn: false,\n partnerCodeStatus: null,\n image: '',\n id: '',\n phone: '',\n isEmailVerified: null,\n isPhoneVerified: null,\n agreedToTerms: null,\n userType: 'buyer',\n selectedAuth: 'phone',\n profile: null,\n dataSynced: false,\n};\n\nexport const useUserStore = create(\n devtools(\n persist<UserInfo>(\n (set) => ({\n ...initialUserData,\n logout: () => {\n // if not logged in previously send login event to ga\n gtag.event({\n action: 'logout',\n category: 'engagement',\n label: 'Logout',\n });\n gtag.removeUserId();\n localStorage.clear();\n set(initialUserData);\n },\n updateUserInfo: (store: Partial<UserInfo>) => set(store, false),\n }),\n {\n name: 'userAuth',\n partialize: (state) => {\n const { userType, ...restState } = state;\n return { ...restState };\n },\n },\n ),\n {\n name: 'user-auth',\n },\n ),\n);\n\nexport const useAuthUser = (authored?: boolean) => {\n const { updateUserInfo, ...userInfo } = useUserStore();\n const router = useRouter();\n const { reset: resetCompleteForm } = useCompleteModal();\n\n const logout = useCallback(() => {\n resetCompleteForm();\n userInfo.logout();\n }, [resetCompleteForm, userInfo]);\n const {\n isLoading: isLoadingUserInfo,\n isSuccess: isSuccessUserInfo,\n refetch: refetchUserInfo,\n isRefetching: isRefetchingUserInfo,\n } = useQuery<{ profile: BuyerProfile }, AxiosResponse>(\n ['user'],\n async () => {\n const resp = await ApiService.getProfile();\n return resp.data;\n },\n {\n enabled: Boolean(userInfo?.accessToken),\n // refetchOnMount: userInfo.profile ? false : true,\n refetchOnWindowFocus: false,\n onSuccess: (data) => {\n const { profile } = data;\n const remappedUserType = profile.userType === 'buyer' ? 'buyer' : 'partner';\n updateUserInfo({\n firstName: profile.firstName,\n lastName: profile.lastName,\n email: profile.email,\n phoneNumber: profile.phone,\n userType: remappedUserType,\n signedIn: true,\n profile,\n });\n const isInitialRoute = router.pathname === commonRoutes.buyer.getStarted;\n const isSignInRoute = router.pathname === commonRoutes.buyer.signin;\n\n // TODO: Change this on deployment\n const isSignUpRoute = router.pathname === commonRoutes.buyer.signup;\n const areOnboardingRoutes = router.pathname.startsWith(commonRoutes.buyer.auth.onboarding);\n const isQuickSetupRoute = router.pathname === '/user/onboarding/quick-setup';\n\n const isWaitlistRoute = false;\n const hasRedirect = router.query?.redirect && isValidUrl(router.query?.redirect as string);\n\n if (profile?.approvalStatus === EApprovalStatus.approved) {\n if (isSignUpRoute) {\n return router.push(commonRoutes.buyer.auth.onboarding);\n } else {\n if ((isInitialRoute || isSignInRoute || isSignUpRoute) && !hasRedirect) {\n return window.location.replace(commonRoutes.buyer.auth.summary);\n } else if (hasRedirect) {\n return router.push(router.query?.redirect as string);\n }\n }\n } else {\n if (profile.isOnboarded && (isSignUpRoute || areOnboardingRoutes || isSignInRoute)) {\n if (hasRedirect) {\n return router.push(router.query?.redirect as string);\n }\n return window.location.replace(commonRoutes.buyer.auth.summary);\n } else if (hasRedirect) {\n return router.push(router.query?.redirect as string);\n }\n \n // if (isSignUpRoute) {\n // return setTimeout(() => router.push(commonRoutes.buyer.auth.onboarding), 3000);\n // }\n } \n // if (profile && (isSignInRoute || isSignUpRoute || isInitialRoute)) {\n // return router.back();\n // }\n },\n onError: (data) => {\n if (data?.status === 401) {\n logout();\n }\n },\n },\n );\n\n useEffect(() => {\n if (\n router.isReady &&\n authored &&\n !userInfo.signedIn &&\n userInfo.partnerCodeStatus !== false &&\n userInfo.partnerCodeStatus !== null\n ) {\n const isInitialRoute = router.pathname === commonRoutes.buyer.getStarted;\n if (!isInitialRoute) {\n router.push(commonRoutes.buyer.getStarted);\n }\n }\n }, [userInfo, authored, router]);\n\n useEffect(() => {\n if (!userInfo.signedIn) return;\n gtag.addUserId(userInfo.id);\n }, [userInfo.signedIn, userInfo.id]);\n\n return {\n ...userInfo,\n isLoadingUserInfo,\n isSuccessUserInfo,\n updateUserInfo,\n refetchUserInfo,\n isRefetchingUserInfo,\n };\n};\n","import { create } from 'zustand';\nimport { ApiService } from '@services/Api';\nimport { useQuery } from 'react-query';\nimport { persist } from 'zustand/middleware';\nimport { useIsMounted } from '@hooks/use-is-mounted';\nimport { useAuthUser } from '@hooks/use-auth';\nimport { TrackingService } from '@services/tracking';\n\nconst useBuyerCreditScoreStore = create(\n persist<{\n creditScore: number;\n expiresAt: string;\n lastUpdatedAt: string;\n setBuyerCreditScore: (creditScore: number, lastUpdatedAt: string) => void;\n getBuyerCreditScore: () => { creditScore: number; expiresAt: string };\n clearBuyerCreditScore: () => void;\n }>(\n (set) => ({\n creditScore: null,\n expiresAt: null,\n lastUpdatedAt: null,\n\n setBuyerCreditScore: (creditScore: number, lastUpdatedAt: string) => {\n const date = new Date();\n date.setDate(date.getDate() + 14);\n set({ creditScore, expiresAt: date.toISOString(), lastUpdatedAt });\n },\n getBuyerCreditScore: () => {\n const { creditScore, expiresAt, lastUpdatedAt } = useBuyerCreditScoreStore.getState();\n\n if (expiresAt && new Date(expiresAt).getTime() <= new Date().getTime()) {\n set({ creditScore: null, expiresAt: null });\n return null;\n }\n\n if (!creditScore) {\n return null;\n }\n\n if (!lastUpdatedAt) {\n return null;\n }\n\n return { creditScore, expiresAt, lastUpdatedAt };\n },\n clearBuyerCreditScore: () => {\n set({ creditScore: null, expiresAt: null, lastUpdatedAt: null });\n },\n }),\n {\n name: 'buyer-credit-score',\n },\n ),\n);\nexport const useBuyerCreditScore = (ignoreCache = false) => {\n const isMounted = useIsMounted();\n const { profile } = useAuthUser();\n\n const { getBuyerCreditScore, setBuyerCreditScore, clearBuyerCreditScore } =\n useBuyerCreditScoreStore();\n\n const retrieveCreditReportQuery = useQuery(\n ['buyer', 'credit-report'],\n async () => {\n if (!ignoreCache) {\n const cachedCreditScore = getBuyerCreditScore();\n\n if (cachedCreditScore) {\n return cachedCreditScore;\n }\n }\n\n const resp = await ApiService.retrieveBuyerCreditReport();\n\n const lastUpdatedAt = resp.data.creditReport.CREDIT_RESPONSE.CREDIT_SCORE['@_Date'];\n setBuyerCreditScore(resp.data.score, lastUpdatedAt);\n return getBuyerCreditScore();\n },\n {\n onError: async () => {\n clearBuyerCreditScore();\n },\n enabled: isMounted && profile?.isOnboarded,\n refetchOnWindowFocus: false,\n retry: false,\n },\n );\n\n return retrieveCreditReportQuery;\n};\n","import { ApiService } from '@services/Api';\nimport { create } from 'zustand';\nimport { devtools, persist } from 'zustand/middleware';\n\nexport type BuyerFormFields = ApiService.SignUpBuyerBody;\n\nexport interface BuyerState extends Partial<BuyerFormFields> {\n setBuyerInfo: (state) => void;\n setBuyerResetPasswordInfo: (state) => void;\n reset: () => void;\n step: number;\n email: string;\n partnerCodeStatus: boolean;\n}\n\nconst initialState = {\n email: '',\n step: 1,\n partnerCodeStatus: false,\n associateIdStatus: false,\n firstName: '',\n lastName: '',\n userType: '',\n provider: '',\n authenticationId: '',\n};\n\nexport const useBuyerSignupInfo = create<BuyerState>()(\n devtools(\n persist(\n (set) => ({\n ...initialState,\n setBuyerInfo: (state) => set(state, false, 'buyer-signup-info/setBuyerInfo'),\n setBuyerResetPasswordInfo: (state) =>\n set(state, false, 'buyer-signup-info/setBuyerResetPasswordInfo'),\n reset: () => set(initialState, false, 'buyer-signup-info/reset'),\n }),\n { name: 'buyer-signup-info' },\n ),\n { name: 'buyer-signup-info' },\n ),\n);\n\ntype BuyerSigninState = {\n authenticationId: string;\n} & Pick<BuyerState, 'step' | 'setBuyerInfo' | 'email'>;\nexport const useBuyerSigninInfo = create(\n persist<BuyerSigninState>(\n (set) => ({\n email: '',\n authenticationId: '',\n setBuyerInfo: (state) => set(state),\n step: 1,\n }),\n { name: 'buyer-signin-info' },\n ),\n);\n\ntype BuyerResetPasswordState = {\n authenticationId: string;\n} & Pick<BuyerState, 'step' | 'setBuyerResetPasswordInfo' | 'email'>;\nexport const useBuyerResetPassword = create(\n devtools(\n persist<BuyerResetPasswordState>(\n (set) => ({\n email: '',\n authenticationId: '',\n setBuyerResetPasswordInfo: (state) => set(state),\n step: 1,\n }),\n { name: 'buyer-reset-password-info' },\n ),\n { name: 'buyer-reset-password-info' },\n ),\n);\n","import { commonRoutes, toUSD } from '@utils';\nimport { AxiosRequestConfig } from 'axios';\nimport { useBuyerCreditScore } from '@hooks/use-buyer-credit-score';\nimport { useMemo } from 'react';\nimport { useQuery } from 'react-query';\nimport { ApiService, CalculateScoreResponse } from '@services/Api';\n\nexport const useCalculateScore = (options?) => {\n const creditScoreQuery = useBuyerCreditScore(true);\n const creditScore = creditScoreQuery.data?.creditScore || null;\n const scoreUpdatedAt = creditScoreQuery.data?.lastUpdatedAt || null;\n\n const query = useQuery<CalculateScoreResponse, AxiosRequestConfig>(\n ['buyer-calculate-score'],\n async () => {\n const resp = await ApiService.calculateScore({\n creditScore,\n });\n return resp.data;\n },\n {\n retry: false,\n refetchOnWindowFocus: false,\n enabled: creditScoreQuery.isError || creditScoreQuery.isSuccess,\n ...options,\n },\n );\n const isUnavailable = !query?.data;\n\n console.log(creditScoreQuery.data);\n\n return {\n ...query,\n scoreUpdatedAt,\n error: creditScoreQuery?.error || query?.error,\n isUnavailable,\n };\n};\n\nexport const useScoreProps = () => {\n const { data } = useCalculateScore();\n\n const props = useMemo(() => {\n return {\n debtToIncomeProps: {\n ...data?.grades?.debtToIncome,\n minRangeLabel:\n data?.grades?.debtToIncome?.pointRangeMax != null\n ? `${Math.round(data?.grades?.debtToIncome?.pointRangeMax * 100)}%`\n : '',\n maxRangeLabel:\n data?.grades?.debtToIncome?.nextGrade?.pointRangeMax != null\n ? `${Math.round(data?.grades?.debtToIncome?.nextGrade?.pointRangeMax * 100)}%`\n : '',\n pointRangeMax: data?.grades?.debtToIncome?.nextGrade?.pointRangeMax,\n pointRangeMin:\n data?.grades?.debtToIncome?.pointRangeMax ??\n data?.config?.debtToIncome?.[data?.config?.debtToIncome?.length - 1]?.min,\n nextGrade: {\n ...data?.grades?.debtToIncome?.nextGrade,\n pointRangeMin: data?.grades?.debtToIncome?.nextGrade?.pointRangeMax,\n },\n config: data?.config?.debtToIncome,\n reverse: true,\n valueLabel:\n data?.grades?.debtToIncome?.value != null\n ? `${Math.round(data?.grades?.debtToIncome?.value * 100)}%`\n : '',\n },\n grossIncomeProps: {\n ...data?.grades?.grossIncome,\n minRangeLabel:\n data?.grades?.grossIncome?.pointRangeMin != null\n ? toUSD(data?.grades?.grossIncome?.pointRangeMin)\n : '',\n maxRangeLabel:\n data?.grades?.grossIncome?.nextGrade?.pointRangeMin != null\n ? toUSD(data?.grades?.grossIncome?.nextGrade?.pointRangeMin)\n : '',\n config: data?.config?.grossIncome,\n valueLabel:\n data?.grades?.grossIncome?.value != null ? toUSD(data?.grades?.grossIncome?.value) : '',\n },\n creditScoreProps: {\n ...data?.grades?.creditScore,\n minRangeLabel:\n data?.grades?.creditScore?.pointRangeMin != null\n ? data?.grades?.creditScore?.pointRangeMin\n : '',\n valueLabel: data?.grades?.creditScore?.value,\n maxRangeLabel:\n data?.grades?.creditScore?.nextGrade?.pointRangeMin != null\n ? data?.grades?.creditScore?.nextGrade?.pointRangeMin\n : '',\n config: data?.config?.creditScore,\n },\n downpaymentProps: {\n ...data?.grades?.downpaymentPercentageSaved,\n minRangeLabel:\n data?.grades?.downpaymentPercentageSaved?.pointRangeMin != null\n ? `${Math.round(data?.grades?.downpaymentPercentageSaved?.pointRangeMin * 100)}%`\n : '',\n maxRangeLabel:\n data?.grades?.downpaymentPercentageSaved?.nextGrade?.pointRangeMin != null\n ? `${Math.round(\n data?.grades?.downpaymentPercentageSaved?.nextGrade?.pointRangeMin * 100,\n )}%`\n : '',\n config: data?.config?.downpaymentPercentageSaved,\n valueLabel:\n data?.grades?.downpaymentPercentageSaved?.value != null\n ? `${Math.round(data?.grades?.downpaymentPercentageSaved?.value * 100)}%`\n : '',\n },\n };\n }, [\n data?.config?.creditScore,\n data?.config?.debtToIncome,\n data?.config?.downpaymentPercentageSaved,\n data?.config?.grossIncome,\n data?.grades?.creditScore,\n data?.grades?.debtToIncome,\n data?.grades?.downpaymentPercentageSaved,\n data?.grades?.grossIncome,\n ]);\n\n return props;\n};\n","import { create } from 'zustand';\n\nexport type DashboardModalType =\n | 'editGoal'\n | 'infoModal'\n | 'creditScoreGrade'\n | 'creditScoreGrading'\n | 'creditScoreDetails'\n | 'incomeGrade'\n | 'incomeGrading'\n | 'incomeDetails'\n | 'downpaymentGrade'\n | 'downpaymentGrading'\n | 'downpaymentDetails'\n | 'debtToIncomeGrade'\n | 'debtToIncomeGrading'\n | 'debtToIncomeDetails'\n | 'generateCreditReport'\n | 'createCreditReportUser'\n | 'addIncome'\n | 'addTransactionItem';\n\nexport const useDashboardModal = create<{\n currentModal: DashboardModalType;\n setCurrentModal: (currentModal: DashboardModalType) => void;\n}>((set) => ({\n currentModal: null,\n\n setCurrentModal: (currentModal: DashboardModalType) => set({ currentModal }),\n}));\n","import { useQuery } from 'react-query';\nimport { ApiService } from '@services/Api';\n\nexport const useIncomeQuery = (fetchOnMount = true) => {\n const incomesQuery = useQuery(\n ['buyer', 'incomes'],\n async () => {\n const resp = await ApiService.listBuyerIncomes();\n return resp.data.items;\n },\n {\n refetchOnWindowFocus: false,\n enabled: fetchOnMount,\n },\n );\n\n return incomesQuery;\n};\n\nexport const useDebtsQuery = (fetchOnMount = true) => {\n const debtsQuery = useQuery(\n ['buyer', 'debts'],\n async () => {\n const resp = await ApiService.listBuyerDebts();\n return resp.data.items;\n },\n {\n refetchOnWindowFocus: false,\n enabled: fetchOnMount,\n },\n );\n return debtsQuery;\n};\n\nexport const useSavingsQuery = (fetchOnMount = true) => {\n const savingsQuery = useQuery(\n ['buyer', 'savings'],\n async () => {\n const resp = await ApiService.listBuyerSavings();\n return resp.data.items;\n },\n {\n refetchOnWindowFocus: false,\n enabled: fetchOnMount,\n },\n );\n return savingsQuery;\n};\n","import { useEffect, useState } from 'react';\n\nexport const useIsMounted = () => {\n const [isMounted, setIsMounted] = useState(false);\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n return isMounted;\n};\n","import { UseMutationOptions, useMutation } from 'react-query';\nimport {\n ApiService,\n BuyerOnboardingStatus,\n ChildrenUnder18CountOptions,\n EGender,\n EMilitaryStatus,\n EOnboardingStepStatus,\n EReasonForPurchase,\n WishedLocation,\n} from '@services/Api';\nimport {\n RefreshBuyerOnboardingStatusBody,\n refreshBuyerOnboardingStatus,\n} from '@services/Api/controllers';\nimport { create } from 'zustand';\nimport { devtools, persist } from 'zustand/middleware';\n\nexport interface CompleteProfileFields {\n firstName: string;\n lastName: string;\n phone: string;\n dateOfBirth: string;\n gender: EGender;\n race: string;\n hispanicOrigin: 'yes' | 'no';\n children: 'yes' | 'no';\n childrenUnder18Count: ChildrenUnder18CountOptions;\n city: string;\n apartment: string;\n state: string;\n zipCode: string;\n occupation: string;\n militaryStatus: EMilitaryStatus;\n reasonForPurchase: EReasonForPurchase;\n wishedLocations: WishedLocation | any;\n expectedPurchaseMonthsPeriod: number;\n housePriceGoal: number;\n street: string;\n avatar: string;\n coBorrower: 'yes' | 'no';\n coBorrowersFirstName: string;\n coBorrowersLastName: string;\n coBorrowersEmail: string;\n houseRent: string;\n email: string;\n allowedEmails: string[];\n allowedSms: string[];\n onboardingProfileStatus?: EOnboardingStepStatus;\n}\n\nexport type CompleteModalType =\n | 'completeProfile'\n | 'addTransactionItem'\n | 'generateCreditReport'\n | 'feedback'\n | 'createCreditReportUser'\n | 'successFeedback'\n | 'addIncome';\n\nexport const useOnboarding = create(\n devtools(\n persist<\n {\n currentModal: CompleteModalType;\n setCurrentModal: (currentModal: CompleteModalType) => void;\n setCurrentStep: (step: number) => void;\n setValues: (values: CompleteProfileFields) => void;\n reset: () => void;\n updateUserData: () => Promise<void>;\n step: number;\n } & CompleteProfileFields\n >(\n (set, get) => ({\n currentModal: null,\n step: 1,\n setCurrentModal: (currentModal: CompleteModalType) => set({ currentModal }),\n setCurrentStep: (step: number) => set({ step }),\n setValues: (values: Partial<CompleteProfileFields>) => set(values, false),\n firstName: undefined,\n lastName: undefined,\n phone: undefined,\n dateOfBirth: undefined,\n children: undefined,\n childrenUnder18Count: null,\n street: undefined,\n apartment: undefined,\n city: undefined,\n state: undefined,\n zipCode: undefined,\n militaryStatus: undefined,\n occupation: undefined,\n reasonForPurchase: undefined,\n wishedLocations: undefined,\n expectedPurchaseMonthsPeriod: undefined,\n housePriceGoal: undefined,\n gender: undefined,\n race: undefined,\n hispanicOrigin: undefined,\n ssn: undefined,\n avatar: undefined,\n coBorrower: 'no',\n coBorrowersFirstName: undefined,\n coBorrowersLastName: undefined,\n coBorrowersEmail: undefined,\n houseRent: undefined,\n email: undefined,\n allowedEmails: [],\n allowedSms: [],\n reset: () => {\n set({\n currentModal: null,\n firstName: undefined,\n lastName: undefined,\n phone: undefined,\n dateOfBirth: undefined,\n children: undefined,\n childrenUnder18Count: null,\n street: undefined,\n city: undefined,\n state: undefined,\n zipCode: undefined,\n militaryStatus: undefined,\n occupation: undefined,\n reasonForPurchase: undefined,\n wishedLocations: undefined,\n expectedPurchaseMonthsPeriod: undefined,\n housePriceGoal: undefined,\n gender: undefined,\n race: undefined,\n hispanicOrigin: undefined,\n avatar: undefined,\n step: 1,\n coBorrower: 'no',\n coBorrowersFirstName: undefined,\n coBorrowersLastName: undefined,\n coBorrowersEmail: undefined,\n houseRent: undefined,\n email: undefined,\n allowedEmails: [],\n allowedSms: [],\n onboardingProfileStatus: undefined,\n });\n },\n updateUserData: async () => {\n const data = Object.fromEntries(\n Object.entries(JSON.parse(JSON.stringify({ ...get() })))\n .map(([key, value]) => {\n if (!value) return null;\n if (['yes', 'no'].includes(value as string)) {\n value = value === 'yes' ? true : false;\n }\n return [key, value];\n })\n .filter((e) => e),\n );\n const res = await ApiService.updateBuyer(data);\n },\n }),\n { name: 'onboarding' },\n ),\n { name: 'onboarding' },\n ),\n);\n\nexport const useSkipOnboardingSteps = () => {\n const skipMutation = useMutation(async (body: RefreshBuyerOnboardingStatusBody) => {\n const { data } = await refreshBuyerOnboardingStatus(body);\n return data;\n });\n return {\n skip: (\n body: RefreshBuyerOnboardingStatusBody,\n options?: Omit<\n UseMutationOptions<\n BuyerOnboardingStatus,\n unknown,\n RefreshBuyerOnboardingStatusBody,\n unknown\n >,\n 'mutationFn'\n >,\n ) => skipMutation.mutate(body, options),\n skipMutation,\n };\n};\n","export const GA_TRACKING_ID = process.env.NEXT_PUBLIC_GA_ID;\n\n// https://developers.google.com/analytics/devguides/collection/gtagjs/pages\nexport const pageView = (url: string,) => {\n window.gtag(\"config\", GA_TRACKING_ID, {\n page_path: url,\n\n });\n};\n\nexport const addUserId = (userId: string) => {\n if (!userId) return\n window.gtag('set', GA_TRACKING_ID, {\n user_id: userId\n })\n}\n\nexport const removeUserId = () => {\n window.gtag('set', GA_TRACKING_ID, {\n user_id: ''\n })\n}\n\n\n\n// https://developers.google.com/analytics/devguides/collection/gtagjs/events\nexport const event = ({ action, category, label, value }: {\n action: Gtag.EventNames | (string & {}),\n label?: string,\n category?: string,\n value?: Gtag.ControlParams | Gtag.EventParams | Gtag.CustomParams\n}) => {\n window.gtag(\"event\", action, {\n event_category: category,\n event_label: label,\n ...value,\n });\n}\nexport const setUserProperties = ({ label, value }: { label: string, value: Record<string, any> }) => {\n window.gtag(\"set\", 'user_properties', value);\n}\nexport const g = {\n pageView,\n addUserId,\n event,\n setUserProperties,\n}","import { __assign } from \"tslib\";\nimport { TYPE } from '@formatjs/icu-messageformat-parser';\nimport { IntlMessageFormat, } from 'intl-messageformat';\nimport { MessageFormatError, MissingTranslationError } from './error';\nimport { invariant } from './utils';\nfunction setTimeZoneInOptions(opts, timeZone) {\n return Object.keys(opts).reduce(function (all, k) {\n all[k] = __assign({ timeZone: timeZone }, opts[k]);\n return all;\n }, {});\n}\nfunction deepMergeOptions(opts1, opts2) {\n var keys = Object.keys(__assign(__assign({}, opts1), opts2));\n return keys.reduce(function (all, k) {\n all[k] = __assign(__assign({}, (opts1[k] || {})), (opts2[k] || {}));\n return all;\n }, {});\n}\nfunction deepMergeFormatsAndSetTimeZone(f1, timeZone) {\n if (!timeZone) {\n return f1;\n }\n var mfFormats = IntlMessageFormat.formats;\n return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });\n}\nexport var formatMessage = function (_a, state, messageDescriptor, values, opts) {\n var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, fallbackOnEmptyString = _a.fallbackOnEmptyString, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;\n if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }\n var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;\n // `id` is a required field of a Message Descriptor.\n invariant(!!msgId, \"[@formatjs/intl] An `id` must be provided to format a message. You can either:\\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.github.io/docs/tooling/babel-plugin)\\nor [@formatjs/ts-transformer](https://formatjs.github.io/docs/tooling/ts-transformer) OR\\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.github.io/docs/tooling/linter#enforce-id)\\nto autofix this issue\");\n var id = String(msgId);\n var message = \n // In case messages is Object.create(null)\n // e.g import('foo.json') from webpack)\n // See https://github.com/formatjs/formatjs/issues/1914\n messages &&\n Object.prototype.hasOwnProperty.call(messages, id) &&\n messages[id];\n // IMPORTANT: Hot path if `message` is AST with a single literal node\n if (Array.isArray(message) &&\n message.length === 1 &&\n message[0].type === TYPE.literal) {\n return message[0].value;\n }\n // IMPORTANT: Hot path straight lookup for performance\n if (!values &&\n message &&\n typeof message === 'string' &&\n !defaultRichTextElements) {\n return message.replace(/'\\{(.*?)\\}'/gi, \"{$1}\");\n }\n values = __assign(__assign({}, defaultRichTextElements), (values || {}));\n formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);\n defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);\n if (!message) {\n if (fallbackOnEmptyString === false && message === '') {\n return message;\n }\n if (!defaultMessage ||\n (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {\n // This prevents warnings from littering the console in development\n // when no `messages` are passed into the <IntlProvider> for the\n // default locale.\n onError(new MissingTranslationError(messageDescriptor, locale));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting default message for: \\\"\".concat(id, \"\\\", rendering default message verbatim\"), locale, messageDescriptor, e));\n return typeof defaultMessage === 'string' ? defaultMessage : id;\n }\n }\n return id;\n }\n // We have the translated message\n try {\n var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, (opts || {})));\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting message: \\\"\".concat(id, \"\\\", using \").concat(defaultMessage ? 'default message' : 'id', \" as fallback.\"), locale, messageDescriptor, e));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting the default message for: \\\"\".concat(id, \"\\\", rendering message verbatim\"), locale, messageDescriptor, e));\n }\n }\n if (typeof message === 'string') {\n return message;\n }\n if (typeof defaultMessage === 'string') {\n return defaultMessage;\n }\n return id;\n};\n","import { __assign } from \"tslib\";\nimport { IntlFormatError } from './error';\nimport { filterProps, getNamedFormat } from './utils';\nvar DATE_TIME_FORMAT_OPTIONS = [\n 'formatMatcher',\n 'timeZone',\n 'hour12',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'hourCycle',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n // 'dayPeriod',\n 'numberingSystem',\n 'fractionalSecondDigits',\n];\nexport function getFormatter(_a, type, getDateTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError, timeZone = _a.timeZone;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);\n if (type === 'time' &&\n !filteredOptions.hour &&\n !filteredOptions.minute &&\n !filteredOptions.second &&\n !filteredOptions.timeStyle &&\n !filteredOptions.dateStyle) {\n // Add default formatting options if hour, minute, or second isn't defined.\n filteredOptions = __assign(__assign({}, filteredOptions), { hour: 'numeric', minute: 'numeric' });\n }\n return getDateTimeFormat(locale, filteredOptions);\n}\nexport function formatDate(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting date.', config.locale, e));\n }\n return String(date);\n}\nexport function formatTime(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting time.', config.locale, e));\n }\n return String(date);\n}\nexport function formatDateTimeRange(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var from = _a[0], to = _a[1], _b = _a[2], options = _b === void 0 ? {} : _b;\n var fromDate = typeof from === 'string' ? new Date(from || 0) : from;\n var toDate = typeof to === 'string' ? new Date(to || 0) : to;\n try {\n return getFormatter(config, 'dateTimeRange', getDateTimeFormat, options).formatRange(fromDate, toDate);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting date time range.', config.locale, e));\n }\n return String(fromDate);\n}\nexport function formatDateToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date); // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting date.', config.locale, e));\n }\n return [];\n}\nexport function formatTimeToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date); // TODO: remove this when https://github.com/microsoft/TypeScript/pull/50402 is merged\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting time.', config.locale, e));\n }\n return [];\n}\n","import { filterProps } from './utils';\nimport { ErrorCode, FormatError } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nvar DISPLAY_NAMES_OPTONS = [\n 'style',\n 'type',\n 'fallback',\n 'languageDisplay',\n];\nexport function formatDisplayName(_a, getDisplayNames, value, options) {\n var locale = _a.locale, onError = _a.onError;\n var DisplayNames = Intl.DisplayNames;\n if (!DisplayNames) {\n onError(new FormatError(\"Intl.DisplayNames is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-displaynames\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);\n try {\n return getDisplayNames(locale, filteredOptions).of(value);\n }\n catch (e) {\n onError(new IntlFormatError('Error formatting display name.', locale, e));\n }\n}\n","import { __assign } from \"tslib\";\nimport { ErrorCode, FormatError } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nimport { filterProps } from './utils';\nvar LIST_FORMAT_OPTIONS = [\n 'type',\n 'style',\n];\nvar now = Date.now();\nfunction generateToken(i) {\n return \"\".concat(now, \"_\").concat(i, \"_\").concat(now);\n}\nexport function formatList(opts, getListFormat, values, options) {\n if (options === void 0) { options = {}; }\n var results = formatListToParts(opts, getListFormat, values, options).reduce(function (all, el) {\n var val = el.value;\n if (typeof val !== 'string') {\n all.push(val);\n }\n else if (typeof all[all.length - 1] === 'string') {\n all[all.length - 1] += val;\n }\n else {\n all.push(val);\n }\n return all;\n }, []);\n return results.length === 1 ? results[0] : results.length === 0 ? '' : results;\n}\nexport function formatListToParts(_a, getListFormat, values, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var ListFormat = Intl.ListFormat;\n if (!ListFormat) {\n onError(new FormatError(\"Intl.ListFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-listformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);\n try {\n var richValues_1 = {};\n var serializedValues = values.map(function (v, i) {\n if (typeof v === 'object') {\n var id = generateToken(i);\n richValues_1[id] = v;\n return id;\n }\n return String(v);\n });\n return getListFormat(locale, filteredOptions)\n .formatToParts(serializedValues)\n .map(function (part) {\n return (part.type === 'literal'\n ? part\n : __assign(__assign({}, part), { value: richValues_1[part.value] || part.value }));\n });\n }\n catch (e) {\n onError(new IntlFormatError('Error formatting list.', locale, e));\n }\n // @ts-ignore\n return values;\n}\n","import { IntlFormatError } from './error';\nimport { filterProps, getNamedFormat } from './utils';\nvar NUMBER_FORMAT_OPTIONS = [\n 'style',\n 'currency',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n // ES2020 NumberFormat\n 'compactDisplay',\n 'currencyDisplay',\n 'currencySign',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n 'numberingSystem',\n // ES2023 NumberFormat\n 'trailingZeroDisplay',\n 'roundingPriority',\n 'roundingIncrement',\n 'roundingMode',\n];\nexport function getFormatter(_a, getNumberFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = ((format &&\n getNamedFormat(formats, 'number', format, onError)) ||\n {});\n var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);\n return getNumberFormat(locale, filteredOptions);\n}\nexport function formatNumber(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).format(value);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting number.', config.locale, e));\n }\n return String(value);\n}\nexport function formatNumberToParts(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).formatToParts(value);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting number.', config.locale, e));\n }\n return [];\n}\n","import { ErrorCode, FormatError } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nimport { filterProps } from './utils';\nvar PLURAL_FORMAT_OPTIONS = ['type'];\nexport function formatPlural(_a, getPluralRules, value, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n if (!Intl.PluralRules) {\n onError(new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);\n try {\n return getPluralRules(locale, filteredOptions).select(value);\n }\n catch (e) {\n onError(new IntlFormatError('Error formatting plural.', locale, e));\n }\n return 'other';\n}\n","import { getNamedFormat, filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nvar RELATIVE_TIME_FORMAT_OPTIONS = ['numeric', 'style'];\nfunction getFormatter(_a, getRelativeTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = (!!format && getNamedFormat(formats, 'relative', format, onError)) || {};\n var filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);\n return getRelativeTimeFormat(locale, filteredOptions);\n}\nexport function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options) {\n if (options === void 0) { options = {}; }\n if (!unit) {\n unit = 'second';\n }\n var RelativeTimeFormat = Intl.RelativeTimeFormat;\n if (!RelativeTimeFormat) {\n config.onError(new FormatError(\"Intl.RelativeTimeFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-relativetimeformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n try {\n return getFormatter(config, getRelativeTimeFormat, options).format(value, unit);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));\n }\n return String(value);\n}\n","import { __assign } from \"tslib\";\nimport { formatDate, formatDateTimeRange, formatDateToParts, formatTime, formatTimeToParts, } from './dateTime';\nimport { formatDisplayName } from './displayName';\nimport { InvalidConfigError, MissingDataError } from './error';\nimport { formatList, formatListToParts } from './list';\nimport { formatMessage } from './message';\nimport { formatNumber, formatNumberToParts } from './number';\nimport { formatPlural } from './plural';\nimport { formatRelativeTime } from './relativeTime';\nimport { createFormatters, DEFAULT_INTL_CONFIG } from './utils';\nfunction messagesContainString(messages) {\n var firstMessage = messages ? messages[Object.keys(messages)[0]] : undefined;\n return typeof firstMessage === 'string';\n}\nfunction verifyConfigMessages(config) {\n if (config.onWarn &&\n config.defaultRichTextElements &&\n messagesContainString(config.messages || {})) {\n config.onWarn(\"[@formatjs/intl] \\\"defaultRichTextElements\\\" was specified but \\\"message\\\" was not pre-compiled. \\nPlease consider using \\\"@formatjs/cli\\\" to pre-compile your messages for performance.\\nFor more details see https://formatjs.github.io/docs/getting-started/message-distribution\");\n }\n}\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport function createIntl(config, cache) {\n var formatters = createFormatters(cache);\n var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG), config);\n var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;\n if (!locale) {\n if (onError) {\n onError(new InvalidConfigError(\"\\\"locale\\\" was not configured, using \\\"\".concat(defaultLocale, \"\\\" as fallback. See https://formatjs.github.io/docs/react-intl/api#intlshape for more details\")));\n }\n // Since there's no registered locale data for `locale`, this will\n // fallback to the `defaultLocale` to make sure things can render.\n // The `messages` are overridden to the `defaultProps` empty object\n // to maintain referential equality across re-renders. It's assumed\n // each <FormattedMessage> contains a `defaultMessage` prop.\n resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';\n }\n else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\".concat(locale, \"\\\" in Intl.NumberFormat. Using default locale: \\\"\").concat(defaultLocale, \"\\\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details\")));\n }\n else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\n onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\".concat(locale, \"\\\" in Intl.DateTimeFormat. Using default locale: \\\"\").concat(defaultLocale, \"\\\" as fallback. See https://formatjs.github.io/docs/react-intl#runtime-requirements for more details\")));\n }\n verifyConfigMessages(resolvedConfig);\n return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), $t: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });\n}\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __assign, __rest, __spreadArray } from \"tslib\";\nimport { createIntl as coreCreateIntl, formatMessage as coreFormatMessage, } from '@formatjs/intl';\nimport { isFormatXMLElementFn, } from 'intl-messageformat';\nimport * as React from 'react';\nimport { DEFAULT_INTL_CONFIG, assignUniqueKeysToParts } from '../utils';\nfunction assignUniqueKeysToFormatXMLElementFnArgument(values) {\n if (!values) {\n return values;\n }\n return Object.keys(values).reduce(function (acc, k) {\n var v = values[k];\n acc[k] = isFormatXMLElementFn(v)\n ? assignUniqueKeysToParts(v)\n : v;\n return acc;\n }, {});\n}\nvar formatMessage = function (config, formatters, descriptor, rawValues) {\n var rest = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n rest[_i - 4] = arguments[_i];\n }\n var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);\n var chunks = coreFormatMessage.apply(void 0, __spreadArray([config,\n formatters,\n descriptor,\n values], rest, false));\n if (Array.isArray(chunks)) {\n return React.Children.toArray(chunks);\n }\n return chunks;\n};\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport var createIntl = function (_a, cache) {\n var rawDefaultRichTextElements = _a.defaultRichTextElements, config = __rest(_a, [\"defaultRichTextElements\"]);\n var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);\n var coreIntl = coreCreateIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG), config), { defaultRichTextElements: defaultRichTextElements }), cache);\n var resolvedConfig = {\n locale: coreIntl.locale,\n timeZone: coreIntl.timeZone,\n fallbackOnEmptyString: coreIntl.fallbackOnEmptyString,\n formats: coreIntl.formats,\n defaultLocale: coreIntl.defaultLocale,\n defaultFormats: coreIntl.defaultFormats,\n messages: coreIntl.messages,\n onError: coreIntl.onError,\n defaultRichTextElements: defaultRichTextElements,\n };\n return __assign(__assign({}, coreIntl), { formatMessage: formatMessage.bind(null, resolvedConfig, coreIntl.formatters), $t: formatMessage.bind(null, resolvedConfig, coreIntl.formatters) });\n};\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __extends } from \"tslib\";\nimport { createIntlCache } from '@formatjs/intl';\nimport * as React from 'react';\nimport { DEFAULT_INTL_CONFIG, invariantIntlContext, shallowEqual, } from '../utils';\nimport { createIntl } from './createIntl';\nimport { Provider } from './injectIntl';\nfunction processIntlConfig(config) {\n return {\n locale: config.locale,\n timeZone: config.timeZone,\n fallbackOnEmptyString: config.fallbackOnEmptyString,\n formats: config.formats,\n textComponent: config.textComponent,\n messages: config.messages,\n defaultLocale: config.defaultLocale,\n defaultFormats: config.defaultFormats,\n onError: config.onError,\n onWarn: config.onWarn,\n wrapRichTextChunksInFragment: config.wrapRichTextChunksInFragment,\n defaultRichTextElements: config.defaultRichTextElements,\n };\n}\nvar IntlProvider = /** @class */ (function (_super) {\n __extends(IntlProvider, _super);\n function IntlProvider() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cache = createIntlCache();\n _this.state = {\n cache: _this.cache,\n intl: createIntl(processIntlConfig(_this.props), _this.cache),\n prevConfig: processIntlConfig(_this.props),\n };\n return _this;\n }\n IntlProvider.getDerivedStateFromProps = function (props, _a) {\n var prevConfig = _a.prevConfig, cache = _a.cache;\n var config = processIntlConfig(props);\n if (!shallowEqual(prevConfig, config)) {\n return {\n intl: createIntl(config, cache),\n prevConfig: config,\n };\n }\n return null;\n };\n IntlProvider.prototype.render = function () {\n invariantIntlContext(this.state.intl);\n return React.createElement(Provider, { value: this.state.intl }, this.props.children);\n };\n IntlProvider.displayName = 'IntlProvider';\n IntlProvider.defaultProps = DEFAULT_INTL_CONFIG;\n return IntlProvider;\n}(React.PureComponent));\nexport default IntlProvider;\n","const companyName = process.env.NEXT_PUBLIC_COMPANY_NAME;\n\nexport const enLocales = {\n /** GENERAL */\n 'general.subscribe': 'Subscribe',\n 'general.algorithm': 'Algorithm',\n 'general.try-again': 'Try again',\n 'general.apply': 'Apply',\n 'general.privacy-policy': 'Privacy Policy',\n 'general.agree': 'I agree to the ',\n 'general.and': 'and',\n 'general.terms': 'Terms & Conditions',\n 'general.cancel': 'Cancel',\n 'general.allow': 'Allow access',\n 'general.logout': 'Logout',\n 'general.save': 'Save',\n\n 'getstarted.title': 'Achieve Your Dream of Homeownership with',\n 'getstarted.siteTitle': 'My Home Pathway',\n 'getstarted.button': 'GET STARTED',\n 'getstarted.hasAccount': 'Already have an account?',\n 'getstarted.noAccount': 'Don’t have an account?',\n 'getstarted.login': 'SIGN IN',\n 'getstarted.signupbutton': 'CREATE AN ACCOUNT',\n 'getstarted.forgotpassword': 'Forgot Password?',\n 'getstarted.logintitle': 'Login in to My Home Pathway',\n 'getstarted.agreeTerms': 'Agree to terms',\n 'getstarted.back': 'Back',\n 'getstarted.skip': 'Skip',\n 'getstarted.continue': 'Continue',\n 'getstarted.image-alt': 'My Home Pathway',\n signup: 'Sign up',\n 'signup.welcome': 'Create an Account',\n signin: 'Log in',\n otp_verified: 'OTP verification successful.',\n\n 'terms.shortdesc': 'Before we continue, please read our terms',\n 'terms.intro':\n 'PLEASE READ THESE TERMS AND CONDITIONS CAREFULLY. BY ACCESSING THIS WEBSITE YOU AGREE TO BE BOUND BY THE TERMS AND CONDITIONS BELOW. THESE TERMS AND CONDITIONS ARE SUBJECT TO CHANGE. ANY CHANGES WILL BE INCORPORATED INTO THE TERMS AND CONDITIONS POSTED FROM TIME TO TIME.',\n 'terms.first-section':\n \"Unauthorized use of My Home Pathway's Websites and systems, including but not limited to unauthorized entry into My Home Pathway's systems, misuse of passwords, posting of objectionable or offensive content or your unauthorized use of legally protected third party content, or misuse of any information posted to a site, is strictly prohibited.\",\n 'terms.second-section':\n 'You acknowledge that My Home Pathway may disclose and transfer any information that you provide through this Website to (i) any company within the My Home Pathway group, its affiliates agents or information providers; (ii) to any other person or entity with your consent; or (iii) if we have a right or duty to disclose or are permitted or compelled to so disclose such information by law. You consent to the transmission, transfer or processing of such information to, or through, any country in the world, as we deem necessary or appropriate (including to countries outside the EEA), and by using and providing information through this Website you agree to such transfers. Use of this Website, including any patterns or characteristics concerning your interaction with it, may be monitored, tracked and recorded. Anyone using this Website expressly consents to such monitoring, tracking and recording. You agree not to attempt to log on to the Website from any country under sanctions by the Office of Foreign Assets Control (OFAC). Information regarding which countries are under sanctions may be obtained on the U.S. Department of the Treasury website. Any attempt to log on to the Website from one of these countries may result in your access being restricted and/or terminated.',\n\n 'terms.last-updated': 'Last Updated February 19, 2023',\n 'terms.pre-intro':\n 'BY ACCESSING AND USING ANY OF MY HOME PATHWAY’S PRODUCTS OR SERVICES, INCLUDING WWW.MYHOMEPATHWAY.COM, YOU AGREE TO BE BOUND BY THIS PRIVACY POLICY. IF YOU DO NOT AGREE TO BE BOUND BY ALL OF THE TERMS IN THIS POLICY, PLEASE EXIT THE SITES, MOBILE APPLICATIONS OR OTHER SERVICES IMMEDIATELY AND DO NOT USE THEM IN ANY WAY',\n 'terms.intro-h': 'Introduction',\n 'terms.intro-two':\n 'At MY HOME PATHWAY, Inc., (MY HOME PATHWAY, We, Us, or Our), our relationship with you is our most valuable asset. We understand and appreciate that you are entrusting us with your information, and as such, we are committed to being transparent about how we collect, use and display it. This Privacy Policy applies to all of the products, services, mobile applications and websites (e.g. WWW.MYHOMEPATHWAY.COM or Mobile Applications) offered by MY HOME PATHWAY or its subsidiaries or affiliated companies (collectively, the Site). This policy describes the information MY HOME PATHWAY collects when you register for, use, access or otherwise interact with any of our websites, applications, products or services (collectively, the “Servicesâ€). By using any of the Services provided by MY HOME PATHWAY, you consent to this Policy, including your consent to our use and disclosure of information about you as required under current federal, state, and/or local law, as well as in the manner described below in this Policy.',\n 'terms.statement-of-courage-h': 'Statement of Coverage',\n 'terms.statement-of-courage':\n 'Personal information†is information that you provide to us that personally identifies you, such as your name, email address, Social Security number, billing information, or other data which can be reasonably linked to such information by MY HOME PATHWAY. This Privacy Policy covers how MY HOME PATHWAY uses the information we collect and receive, including personal information and information associated with your past and current use of our products and services. This Privacy Policy is intended to cover collection of information on our websites from residents of the United States. The Services and websites provided by MY HOME PATHWAY are intended for U.S. citizens and residents. If you are visiting our websites from outside the United States, please be aware that your information may be transferred to, stored and processed in the United States where our servers are located and our central database is operated. The data protection and other laws of the United States might not be as comprehensive as those in your country. By using our Services or websites, you understand that your information may be transferred to our facilities and those third parties with whom we share it as described in this Privacy Policy. This Privacy Policy neither applies to the practices of companies not owned or controlled by MY HOME PATHWAY nor to people not employed or managed by MY HOME PATHWAY. When you use MY HOME PATHWAY’s Services, you consent to our collection, use, and disclosure of your information as described in this Privacy Policy.',\n 'terms.Information-Collection-h': 'Information Collection & Use',\n 'terms.general-h': 'General',\n 'terms.general':\n 'MY HOME PATHWAY may collect and store information about you when you register with MY HOME PATHWAY, when you use MY HOME PATHWAY’s Services, when you visit MY HOME PATHWAY pages or the pages of MY HOME PATHWAY properties (e.g. www.myhomepathway.com) or the pages of certain MY HOME PATHWAY partners, and when you enter promotions or sweepstakes conducted, endorsed, or advertised by MY HOME PATHWAY. MY HOME PATHWAY may combine the information we have about you with information obtained from business partners, other companies, and other users',\n 'terms.general-two':\n 'MY HOME PATHWAY uses information for the following general purposes: providing, maintaining, optimizing, and improving our services, developing new services, enhancing the user experience, customizing the advertising, offers and content you see, fulfilling your product and service requests, conducting research, managing your customer relationship with us, providing you customer support, contacting you, and providing reports for our internal and external clients and partners. We do not store your Personal Information in cookies or log files on your device, but identifiers in such cookies or log files may be tied to your Personal Information in our systems',\n 'terms.registeration-h': 'Registeration',\n 'terms.registeration':\n 'Upon registering with MY HOME PATHWAY, information such as your full name, email address, birth date, gender, or ZIP code may be requested. Certain products and services may ask you for additional information, such as your address, phone number, income, Social Security number, details about the financial products you use, driver’s license number or information about your assets. Some of the Personal Information we collect when you register, like your Social Security number, is required by the credit bureau to verify your identity so we can fulfill your request for a credit score and credit report. When requesting your credit report and score on your behalf, we do not do a hard inquiry; rather, we do a soft inquiry of your credit report. We may also collect Personal Information or other information directly from you through various other forms and places throughout the Services, including “Contact Us†forms, or when you otherwise interact with us to provide or enhance our Services. You are not anonymous to us when you register with MY HOME PATHWAY and sign in to our Services.',\n 'terms.Account-Deletion-h': 'Account Deletion',\n 'terms.Account-Deletion':\n 'You have the right at any time to request deletion of your account and any data associated with your account from the My Home Pathway platform. We will confirm your request for account deletion and also provide confirmation of account deletion. The user Data will be removed from our servers and you will no longer be able to access that data after a 24 hour period. If account deletion is requested in error, you may request reactivation of your account within the 24 hour period after account deletion request. In case that request to reinstate the account falls outside of that period you will have to create a new account.',\n 'terms.updating-your-personal-info-h':\n 'Updating Your Personal Information & Communication Preferences',\n 'terms.updating-your-personal-info':\n 'You can at any time correct or update the personal information that you provided and that we maintain on you by logging into MY HOME PATHWAY Application on your device and going to the “Settings†page. You can also change your communication preferences on this page. MY HOME PATHWAY is not responsible for and cannot amend the information in your credit report, which is produced by one or more credit reporting agencies. If you believe that some of the information in your credit report is inaccurate, you must contact the applicable credit reporting agency directly. Information on how to contact the credit reporting agency may be contained in the settings section.',\n 'terms.transactions-h': 'Transactions',\n 'terms.transactions':\n 'MY HOME PATHWAY collects information about your transactions with our company and some of our partners. This includes billing and payment information and information about your use of our products and service offerings. This information will only be shared with third parties who perform tasks required to complete purchase transactions (such as fulfilling orders and processing credit card payments).',\n 'terms.Site-Access-Activity-h': 'Site Access & Activity:',\n 'terms.Site-Access-Activity':\n 'MY HOME PATHWAY automatically collects and records certain information from the computer, mobile phone, or other device you use to access the Site, including your MY HOME PATHWAY cookie information, device type, IP address, browser type, browser language, the Web pages you request, location information, and the date and time of your request. Our third-party service providers may also collect such information. We receive data about you whenever you interact with the Site, such as when you look at or search for a topic, product, or other information contained on the site. When you post things like photos or videos on the Site, we may also receive additional related data (or metadata), such as the time, date, and place you took the photo or video.',\n 'terms.public-content-h': 'Public Content',\n 'terms.public-content':\n 'Your reviews, comments, questions and answers, posts, followers, groups, businesses and professionals that you have done business with, topics and users you follow, profile information (including your name), and any other information that you post to the Site are meant for public consumption. We may display this content on the Site, collect and store it, and further distribute it to a wider audience through third party sites and services. Please also keep in mind that whenever you voluntarily make other personal information (e.g. your home address) available online for viewing by third parties by posting it on the Site, that information is public and can be seen, collected and used by others besides us. We cannot be responsible for any unauthorized third party use of such information.',\n 'terms.location-h': 'Location',\n 'terms.location':\n 'We may collect and store information about your location if you enable your computer or mobile device to send us location information. MY HOME PATHWAY will not collect your specific location information without your consent. However, we may ask your consent to using location-enabled services on your Device so that we can collect, share and process information about your specific location to enhance our Services and provide better offers to you, using things like GPS or Wi-Fi access point information. You may be able to change the settings on your computer or mobile device to prevent it from providing us with such information. We may also use information like your IP address or other Device Identifiers for approximate location information, like your city or state. Contacts: When you invite your friends to join the Site by providing their contact information or allowing us to use your address book from your computer, mobile device, or other sites, we may use and store your friends contact information long enough to process your requests.',\n 'terms.messages-h': 'Messages',\n 'terms.messages':\n 'When you send email or other communications to MY HOME PATHWAY, we may retain those communications in order to process your inquiries, respond to your requests and improve our services. As part of our credit educational or other services, you may also receive SMS text messages, push alerts on your phone, and emails when there is a new action or related item from our platform alert. These alert messages will also be logged.',\n 'terms.mobile-application-h': 'Mobile Application',\n 'terms.mobile-application':\n 'Some of our Services may be provided through an application on your mobile, tablet computer, or similar device (Mobile Application). Our Mobile Application may collect the same types of information described above, including Personal Information or other information that you provide (e.g. name, age, gender, address), or Usage Information that is automatically collected and stored. We may also collect and use technical data and related information, including but not limited to, preferred language, phone number or other unique Device Identifiers assigned to your mobile device, technical information about your mobile device, system and application software, and peripherals, that is gathered periodically to facilitate the provision of software updates, product support and other services to you (if any) related to such Mobile Applications. We may associate your unique Device Identifier or Mobile Application Usage Information with any Personal Information you provide',\n 'terms.other-sites-h': 'Other Sites',\n 'terms.other-sites':\n 'We offer some of our services on or through other websites. Personal information that you provide to those sites may be sent to MY HOME PATHWAY in order to deliver the service. We process such information under this Privacy Policy. The Site includes links to other web sites and provides access to products and services (for example, widgets and applications) offered by third parties, whose privacy policies we do not control. When you access another web site or purchase third party products or services through the Site, use of any information you provide is governed by the privacy policy of the operator of the site you are visiting or the provider of such products or services. The privacy policy of our provider partners may differ from ours. We do not exercise control over these third party sites and they may place their own cookies or other files on your Device, collect data, web site usage information and your Device Identifier, or solicit Personal Information from you. We are not responsible for the privacy practices of any third party. We encourage you to note when you leave our Services and to read the privacy policies and terms of service of all third party web sites or applications before submitting any Personal Information to third parties. You can also connect your MY HOME PATHWAY account to your accounts on third party services like Google, Facebook, LinkedIn or Twitter, in which case we may collect and store information identifying your account with the third party service as well as other information from these third party services that you have given us permission to access (e.g. name, date of birth, profile picture and friends birthdays). These features may collect your IP address, which page you are visiting on our site, and may set a cookie to enable the feature to function properly. Social media features and widgets are either hosted by a third party or hosted directly on our site. Your interactions with these features are governed by the privacy policy of the company providing the feature. We use the information to help you connect and share public content with your friends and followers. You can always disconnect your accounts on these third party services from your MY HOME PATHWAY account by visiting those services directly.',\n 'terms.info-provided-by-third-parties-about-you-h':\n 'Information Provided by Third Parties about You',\n 'terms.info-provided-by-third-parties-about-you':\n 'MY HOME PATHWAY may supplement the information we collect about you with information from third parties in order to enhance our ability to serve you, to tailor our content to you and to offer you opportunities to consider financial products or services that we believe may be of interest to you. This includes, for example, the free credit report and free credit score we may obtain on your behalf when you register for the Service. We may combine the information we receive from outside sources with information we collect through our Services. We treat all information about you, whether received from you or from a third party, in accordance with this Privacy Policy and our Terms of Service.',\n 'terms.info-provided-to-third-parties-about-you-h':\n 'Information Provided to Third Parties about You',\n 'terms.info-provided-to-third-parties-about-you':\n 'MY HOME PATHWAY may provide our partners with your credit data and other relevant information provided by you while using the Services as a way to match you with offers for products and services from those partners. Generally, we will display these offers when you access our web or mobile Services, but we or our partners will occasionally send you information on products, services, special deals, or promotions, by email or other electronic messaging. It is always your choice whether or not to apply for an offered product or service and we will never submit an application for a financial product or service on your behalf without your express consent.',\n 'terms.info-you provide-about-a-third-party-h': 'Information You Provide about a Third Party',\n 'terms.info-you provide-about-a-third-party':\n 'If you choose to use our referral program to tell a friend about our Services, we will ask you for your friends name and email address. We will send your friend an email inviting him or her to visit the site. MY HOME PATHWAY stores the information you provide for the sole purpose of sending this email and tracking the success of our referral program. The information you provide will not be used for any other marketing purpose unless your friend signs up for an account or we otherwise obtain consent from that person. Please be aware that when you use any referral functionality through our Services, your name and email address may be included in the communication sent to your friend.',\n 'terms.info-you provide-about-a-third-party-two':\n 'Service-Related Announcements: We may send you service-related announcements. For instance, if our service is temporarily suspended for maintenance, we might send you an email. Generally, you may not opt-out of these non-promotional communications. If you do not wish to receive them, you have the option to terminate your account.',\n 'terms.info-you provide-about-a-third-party-three':\n 'Push Notifications: If you use our Mobile Applications, we may send you push notifications from time-to-time via our Mobile Application in order to provide or alert you to service-related announcements or information on products, services, special deals, or promotions. If you do not wish to receive these types of communications, you may turn them off in your mobile Device settings.',\n 'terms.customer-service-h': 'Customer Service',\n 'terms.customer-service':\n 'When you first register for the Services, we may send you an introductory email welcoming you to MY HOME PATHWAY. We may also communicate with you via email or other means in response to your inquiries and to manage your account. As described above in “Information You Provide about a Third Party,†we may also use information you provide about others to send invitation emails as part of our referral program.',\n 'terms.children-h': 'Children',\n 'terms.children':\n 'At MY HOME PATHWAY we are committed to protecting the privacy of children. Our Services are not intended for anyone under the age of 18. We will not knowingly or intentionally collect any Personal Information online from children under the age of 13. If a child under the age of 13 has provided us with Personal Information, please let us know by filling out our contact form. Once received, we will remove that information from our site. Security of Your Personal Information.',\n 'terms.data-protection-and-security-h': 'Data Protection and Security',\n 'terms.data-protection-and-security':\n 'MY HOME PATHWAY takes precautions to secure your personal information. If and when we ask you to provide your personal information, we do so through a connection that uses Secure Sockets Layer (SSL) protocol. This protocol provides security for your information by encrypting it as it travels from your computer to our computer. For security purposes, we then move all of the personal information that we collect or obtain about you to a secure environment on our proprietary network that has controls in place to limit access to and secure the data maintained within it.',\n 'terms.Disclosure-sharing-of-information-h': 'Disclosure & Sharing of Information',\n 'terms.Disclosure-sharing-of-information':\n 'Under data protection law, we can only use your personal information if we have a proper reason for doing so, e.g.,:',\n 'terms.Disclosure-sharing-of-information-one':\n 'To comply with our legal and regulatory obligations;',\n 'terms.Disclosure-sharing-of-information-two':\n 'For the performance of our contract with you or to take steps at your request before entering into a contract;',\n 'terms.Disclosure-sharing-of-information-three':\n 'For our legitimate interests or those of a third party; or',\n 'terms.Disclosure-sharing-of-information-four': 'Where you have given consent.',\n 'terms.Disclosure-sharing-of-information-five':\n 'A legitimate interest is when we have a business or commercial reason to use your information, so long as this is not overridden by your own rights and interests.',\n 'terms.Disclosure-sharing-of-information-six':\n 'We may share information that you have provided during use of our Services to match you with products or services from our partners, or under the following circumstances: ',\n 'terms.Disclosure-sharing-of-information-seven':\n 'As part of the Services, you may be presented with opportunities for additional financial products or services that may require submitting information to unaffiliated third parties. For example, you may be asked to respond to offers provided by our marketing partners or presented with co-branded services we provide in association with third parties such as our marketing partners, business partners, or sponsors. These opportunities vary from day to day, but we will identify the relevant third party and in general, if you are interested in a particular offer or co-branded service, you will be taken to a third party site to complete the transaction or asked to submit information to the third party through a form on our site. When you are asked to provide information to a third party in connection with such offers or co-branded services, you may be providing your information to both us and the third party. We will treat information we collect in connection with a particular offer or co-branded service in accordance with this Privacy Policy but we are not responsible for the privacy practices of such third parties. For more information, see Information Collection & Use: Other Sites.',\n 'terms.Disclosure-sharing-of-information-eight':\n 'When MY HOME PATHWAY shares information about you with third-party partners, some of those third parties may also perform a soft inquiry or promotional inquiry on your credit file based on the information MY HOME PATHWAY shares with them. These inquiries will not affect your credit. However, if you apply for a line of credit or a loan directly with one or more of our third-party lender partners, those lenders may make a hard credit inquiry of your credit file before approving your application.',\n 'terms.Disclosure-sharing-of-information-nine':\n 'The Services may permit you to submit ideas, questions, comments, suggestions or other content, including Personal Information (collectively, User Content), that is publicly viewable (such as the public portions of your user profile or comments you post on our publicly accessible blog). We or others may reproduce, publish, distribute or otherwise use User Content online or offline in any media or format (currently existing or hereafter developed). Third parties may have access to this User Content and may have the ability to share it further with third parties across the Internet. Please think carefully before deciding what information you share, including Personal Information, in connection with your User Content. MY HOME PATHWAY does not control who will have access to the information that you choose to make public, and cannot ensure that parties who have access to such publicly available information will respect your privacy or keep it secure. This Privacy Policy does not apply to any information that you disclose publicly or share with others, whether through the Services or otherwise.',\n 'terms.Disclosure-sharing-of-information-ten':\n 'Under confidentiality agreements, we provide information to trusted partners working with or on behalf of MY HOME PATHWAY. These companies may use your information to help us communicate offers from our company and our partner companies to you. These companies, however, have no independent right to share this information.',\n 'terms.Disclosure-sharing-of-information-eleven':\n 'We may use third party service providers or vendors to support or perform certain aspects of the Services on our or your behalf, such as hosting the Services, designing or operating the Services’ features, tracking the Services’ analytics, providing data used, directly or indirectly, in connection with the Services, marketing the Services, enabling MY HOME PATHWAY to contact you with offers or performing other administrative services. We may provide these third party service providers or vendors with access to user information, including Personal Information, in connection with the services they are performing for you or for us. In connection with our Services, these third party service providers or vendors may also set and access their own cookies, web beacons and embedded scripts on your Device, and they may otherwise collect or have access to information about you.',\n 'terms.Disclosure-sharing-of-information-twelve':\n 'When we may offer sweepstakes, contests, and other promotions (each a Promotion) through the Services or through social media or other channels. By participating in a Promotion, you are agreeing to official rules that govern that Promotion, which may contain specific requirements of you, including allowing the sponsor of the Promotion to use your name, voice and/or likeness in advertising or marketing associated with the Promotion.',\n 'terms.Disclosure-sharing-of-information-thirteen':\n 'While responding to subpoenas, court orders, legal processes, establishing or exercising our legal rights, or defending against legal claims if in our good faith opinion such action is required or permitted by law.',\n 'terms.Disclosure-sharing-of-information-fourteen':\n 'When we believe it is necessary to share information to investigate, prevent, or take action against illegal activities, potential threats to any persons physical safety, violations of our Terms of Service, suspected fraud, or as otherwise required by law.',\n 'terms.Disclosure-sharing-of-information-fifteen':\n 'To protect the safety, integrity, rights, property or security of our Services or equipment or those of any third party or to detect, prevent or otherwise address fraud, security or technical issues. Further, we may use IP addresses or other Device Identifiers to identify users, and may do so in cooperation with third parties such as copyright owners, internet service providers, wireless service providers and law enforcement agencies, including disclosing such information to third parties, all at our discretion. Any such access, use, preservation, transfer or disclosure may be carried out without notice to you.',\n 'terms.Disclosure-sharing-of-information-sixteen':\n 'After we have removed your name or any other personally identifying information from it, or have combined it with other people’s data in a way that it is no longer associated with you.',\n 'terms.Disclosure-sharing-of-information-seventeen':\n 'If another company becomes an owner, co-owner, or operator of MY HOME PATHWAY or one of its properties or Services (for example, WWW.MYHOMEPATHWAY.COM), that company will possess the information associated with it, and will assume the rights and obligations with respect to that information as described in this Privacy Policy.',\n 'terms.Safeguarding-Communications-h': 'Safeguarding Communications: ',\n 'terms.Safeguarding-Communications':\n 'MY HOME PATHWAY may through its Services send you email, text messages or mobile device push notifications from time to time. These communications may contain sensitive credit information, such as your credit score, creditor names, personalized savings offers, or other information about your credit. Safeguarding the information contained in any communications sent to you by MY HOME PATHWAY is solely your responsibility. MY HOME PATHWAY is not responsible for safeguarding the communications once sent to you. You may change your notification preferences on the settings page at any time.',\n 'terms.cookies-h': 'Cookies',\n 'terms.cookies':\n 'At this time, MY HOME PATHWAY does not respond to automated signals regarding tracking mechanisms, including “do not track†instructions from your browser. However, you may change the privacy preferences in your browser to prevent or limit the use of cookies or similar technologies. Be aware that Flash cookies operate differently than other browser cookies and various browsers may offer their own management tools for removing Flash cookies. To manage Flash cookies, please click here. Please note that blocking cookies, Flash cookies or similar technologies may affect your browsing experience on many sites and may prevent your ability to use certain MY HOME PATHWAY Services, including many of the personalized features we provide for our members. MY HOME PATHWAY uses web beacons to access MY HOME PATHWAY cookies inside and outside our network of web sites and in connection with MY HOME PATHWAY products and services',\n 'terms.Confidentiality-Security-h': 'Confidentiality & Security',\n 'terms.Confidentiality-Security':\n 'MY HOME PATHWAY takes your privacy and security very seriously, and we follow generally accepted industry standards to protect against unauthorized access to or unauthorized alteration, disclosure or destruction of data, both during transmission and once we receive it. In particular, we:',\n 'terms.Confidentiality-Security-two':\n 'We limit access to personal information about you to employees, contractors, and agents who we believe reasonably need to come into contact with that information to provide products or services to you or in order to do their jobs.',\n 'terms.Confidentiality-Security-three':\n 'We limit access to Social Security numbers to help protect against their loss or misuse and do not disclose Social Security numbers to third parties except where such disclosure is required or permitted by law.',\n 'terms.Confidentiality-Security-four':\n 'We regularly back up the information we collect online to protect against loss.',\n 'terms.Confidentiality-Security-five':\n 'We have physical, electronic, and procedural safeguards to protect personal information about you. Some of the safeguards that we use include: SSL encryption, firewalls and password protections.',\n 'terms.Confidentiality-Security-six':\n 'However, no data transmission over the Internet, mobile device or information storage technology can be guaranteed to be 100% secure. Therefore, while we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.',\n 'terms.Confidentiality-Security-seven':\n 'If you believe your MY HOME PATHWAY account has been compromised, please report the incident using our support form. If you have been contacted by someone about your MY HOME PATHWAY account asking for a password, birth date or other personal information, please do NOT respond and forward the email to contact@myhomepathway.com. In the event that you believe that your personal safety is at risk or if you believe that you may be the victim of identity theft or other illegal conduct, please contact the appropriate federal, state or local law enforcement agencies directly.',\n 'terms.Data-Rentetion-h': 'Data Retention',\n 'terms.Data-Rentetion':\n 'The information we obtain from or about you may be processed and stored in the United States of America. We may keep it as long as is permitted or required under the law. If you terminate your account, we may retain your data for a period of five years (or longer if required by law) in our active systems in order to ensure our ability to satisfy the authorized uses under this Privacy Policy. For example, we may use retained data to prevent, investigate, or identify possible wrongdoing in connection with the Site or to comply with legal obligations. Please note that information may exist in backup storage even after it has been removed from our active databases. You can request that your account be terminated here. Once your account is terminated, we will disable your account, which will be inactive and not accessible to anyone other than MY HOME PATHWAY authorized personnel. Moreover, once your account is terminated, you will not receive any further product or service related communications from MY HOME PATHWAY',\n 'terms.changes-to-this-privacy-policy-h': 'Changes to this Privacy Policy ',\n 'terms.changes-to-this-privacy-policy':\n 'MY HOME PATHWAY may update this policy at any time without notice to you. Changes or additions to this Privacy Policy will be available in this section of the website. You can always come to this section to learn what information we gather, how we might use that information and whether we will disclose it to anyone. If we make material changes to this policy, we will notify you here, by email, or by means of a notice on our home page.',\n 'terms.Questions-Suggestions-h': 'Questions & Suggestions',\n 'terms.Questions-Suggestions':\n 'Because we want to demonstrate our commitment to your privacy, we have agreed to disclose our information practices. If you have questions or suggestions, please complete a feedback form. You may also contact us by sending postal mail to:',\n 'terms.about-to': 'MY HOME PATHWAY Inc.',\n 'terms.about-to-one': '1313 N. Market Street, Suite 5100',\n 'terms.about-to-two': 'Wilmington, DE 19801',\n\n /** Consents*/\n 'communication-consent':\n 'I consent for My Home Pathway communicating with me via the options below to help me build my risk profile, marketing and promotional services. I understand that my information will not be shared externally with other parties or companies without my consent to do so.',\n 'consent-mobile-phone-accept':\n 'I consent for My Home Pathway communicating with the options above to help me build my risk profile, marketing and promotional services. I understand that my information will not be share externally with other parties or companies without my express consent to do so.',\n 'consent-mobile-phone-decline':\n 'I decline to provide consent for My Home Pathway to contact me with the options above to help me build my risk profile.',\n 'consent-ssn':\n 'You understand that by [checking this box and] clicking on the ‘I Accept’ to the terms and conditions, acknowledge receipt of our privacy policy and you are providing ‘written instructions’ under the FCRA to MyHomePathway authorizing Array Inc to obtain information from your personal credit profile from each credit reporting agency. You authorize MyHomePathway to obtain such information solely to confirm your identity and display your credit data to you.',\n /** LAYOUTS */\n 'layout.header.login': 'Sign up / Sign in',\n 'layout.footer.all-rights': '© My Home Pathway, 2022. All rights reserved.',\n\n /** COMPONENTs */\n 'cmpt.strategy-card.active-since': 'Active since {date}',\n 'cmpt.strategy-card.asset-class': 'Asset Class',\n 'cmpt.strategy-card.sub-asset-class': 'Sub Asset Class',\n 'cmpt.strategy-card.industry': 'Industry',\n 'cmpt.strategy-card.risk-tolerance': 'Risk Tolerance',\n 'cmpt.strategy-card.overview': 'Overview',\n 'cmpt.strategy-card.summary-statistics': 'Summary Statistics',\n 'cmpt.strategy-card.portfolio-holdings': 'Portfolio Holdings',\n 'cmpt.strategy-card.trade-activity': 'Trade Activity',\n\n 'cmpt.phone-input.title': `Welcome to ${companyName}`,\n 'cmpt.phone-input.narrator':\n 'Enter your phone number to get started. We use passwordless sign up and authentication.',\n 'cmpt.email.narrator':\n 'Enter your email to get started. We use passwordless sign up and authentication.',\n 'cmpt.phone-input.description':\n \"We'll text to confirm your number. Standard message and data rates apply.\",\n 'cmpt.email.description': \"We'll text to confirm your email.\",\n 'cmpt.phone-input.button': 'Next',\n 'cmpt.phone-input.country': 'Country/Region',\n 'cmpt.phone-input.number': 'Phone number',\n\n 'cmpt.password.validation': 'This password is invaild,please try again.',\n 'cmpt.password.charcheck': 'Both upper and lowercase letters.',\n 'cmpt.password.alhacheck': 'At least 8 characters.',\n 'cmpt.password.numbercheck': 'At least 1 number.',\n 'cmpt.confirmpassword.validation': 'Passwords do not match.',\n\n 'cmpt.code-input.title': 'Confirm your number',\n 'cmpt.code-input.title-email': 'Confirm your email',\n 'cmpt.code-input.phone-number': 'We have sent you a code to your phone number ',\n 'cmpt.code-input.email': 'We have sent you a code to your email',\n 'cmpt.code-input.no-received': \"Didn't receive it?\",\n 'cmpt.code-input.resend': 'Resend',\n\n 'cmpt.portfolios.title': 'All Portfolios',\n 'cmpt.portfolios.description':\n 'Search, filter, and discover all of strategies by risk of tolerance, investment preference, and other metrics.',\n\n 'cmpt.connect.brokerage.modal.title': `Connect ${companyName} to `,\n 'cmpt.connect.brokerage.modal.direction': `Allow ${companyName} to: `,\n 'cmpt.connect.brokerage.modal.condition': 'You must select at least one option to continue.',\n 'cmpt.connect.brokerage.modal.first-condition':\n 'View transactions, general account information, balances and other historical data.',\n 'cmpt.connect.brokerage.modal.second-condition': 'Execute, write, and place trade orders',\n 'cmpt.connect.brokerage.modal.result':\n 'By connecting this application to your account, you accept its ',\n\n 'cmpt.user-menu.strategy': 'Page 1',\n 'cmpt.user-menu.strategy-desc': 'Text 1',\n 'cmpt.user-menu.brokerage': 'Page 2',\n 'cmpt.user-menu.brokerage-desc': 'Text 2',\n 'cmpt.user-menu.settings': 'Account',\n 'cmpt.user-menu.more': 'More',\n 'cmpt.user-menu.api': 'API Docs',\n 'cmpt.user-menu.support': 'Support & Help',\n\n 'page.settings.menu.discover': 'Home',\n 'page.settings.menu.strategies': 'My Strategies',\n 'page.settings.menu.brokerage': 'Brokerages',\n 'page.settings.menu.settings': 'Settings',\n 'page.settings.menu.support': 'Support & Help',\n 'page.settings.user.title': 'Manage your account and notifications',\n 'page.settings.user.personal': 'Personal information',\n 'page.settings.user.not-verified-email': 'Email is not verified',\n 'page.settings.user.verified-email': 'Email verified',\n 'page.settings.user.not-verified-phone': 'Phone number is not verified',\n 'page.settings.user.verified-phone': 'Phone number verified',\n 'page.settings.user.verify': 'Click here to verify',\n 'page.settings.user.notification': 'Notification',\n 'page.settings.user.phone': 'Phone number',\n 'page.settings.user.unsaved': 'You have unsaved changes.',\n 'page.settings.location': 'Location',\n\n /** PAGES */\n // home \"/\"\n 'page.home.head.title': `${companyName} | Home`,\n 'page.home.head.description': `${companyName} homepage.`,\n\n // Add account.\n 'page.account.title': `Welcome to ${companyName}! Lets set up your account`,\n 'page.account.profile': 'Profile',\n 'page.account.connect': 'Connect',\n 'page.account.firstName': 'First name',\n 'page.account.lastName': 'Last name',\n 'page.account.continue': 'Continue',\n 'page.account.email': 'Email',\n 'page.account.password': 'Password',\n 'page.account.re-password': 'Re-enter Password',\n 'page.account.userName': 'Username',\n 'page.account.next': 'Next',\n 'page.account.expectedPurchaseMonthsPeriod': 'When do you hope to purchase a home?',\n 'page.account.otherAmountSelect': 'Other amount',\n 'page.account.description': 'Finish signing up',\n 'page.account.button': 'Finish Signing Up',\n 'page.account.connect.title': 'Connect your brokerage account',\n 'page.account.signin': 'Sign in',\n 'page.account.createanaccount': 'Create an account',\n 'page.account.createyouraccount': 'CREATE YOUR ACCOUNT',\n 'page.account.welcomeback': 'Welcome Back!',\n 'page.account.signinmessage': 'Securely sign in to your My Home Pathway account',\n 'page.account.mobilesignin': 'Enter your email address to create an account',\n 'page.account.backToDashboard': 'GO TO DASHBOARD',\n 'page.account.accountSetUp': 'ACCOUNT SET-UP',\n 'page.account.successMessage':\n 'Your account has been successfully created. To start enjoying our platform and access all features, please complete your account set-up',\n\n // Reset password \"/\"\n 'page.reset-password.title': 'Reset password',\n 'page.reset-password.resetpasswordbtn': 'RESET PASSWORD',\n 'page.reset-password.submit': 'SUBMIT',\n 'page.reset-password.backtosign': 'Back to Sign in',\n 'page.reset-password.successmessage': 'You have successfully created a new password.',\n 'page.reset-password.message':\n 'Your new password must be different from your previously used passwords',\n 'page.reset-password.description': 'Enter your email address to receive a code',\n 'credit.caution.header': 'Please note...',\n 'credit.caution.intro':\n 'The questionnaire you are about to fill out is required to gather your credit score information. You will be asked a series of questions based on your private credit information.',\n 'credit.caution.p.1':\n 'If you fail to answer the questions correctly or answer too many questions with \"None of the above\" you will be asked another series of questions.',\n 'credit.caution.p.2':\n 'If you are asked 3 sets of questions and have not been able to answer them correctly you will receive an \"Unauthorized access\" error message.',\n 'credit.caution.p.3':\n 'If you fail to answer the questions correctly after the 3 sets of questions you will also be locked out of the authorization process for 72 hours.',\n 'credit.caution.p.4':\n 'Ensure that you have entered the correct personal information including accurate name, address, date of birth and social security number to be able to access the questionnaire.',\n 'credit.caution.support':\n 'Please let us know if you encounter any problems answering the questions by contacting us at',\n 'credit.error.header': 'Error',\n 'credit.error.content':\n 'It looks like we could not authenticate your account at this time with the credit bureau. Please try again in 24 hours. Also please note if you have tried for more than 2 times within 24 hours, please refrain from retrying as you might get blocked by the bureau for 72 hours.',\n 'credit.error.p.header': 'Possible reason for this error would be - ',\n 'credit.error.p.1': 'You did not choose the correct options for the questions presented to you.',\n 'credit.error.p.2':\n 'You are blocked for 72 hours by the bureau for 72hours (if tried more than or equal to 3 times in 24 hours).',\n\n 'credit.error.support': 'If you have any more questions, please feel free to reach out at',\n};\n","export { enLocales as en } from './en';\nexport type { Locale } from './locale';\n","import { ReactNode } from 'react';\nimport { IntlProvider } from 'react-intl';\nimport { en } from './locales';\n\nexport interface LocaleProviderProps {\n /**\n * defines the locale settings of the provider\n */\n locale?: string;\n /**\n * defines the default locale settings of the provider\n */\n defaultLocale?: string;\n /**\n * react children prop\n */\n children?: ReactNode;\n}\n\nexport const LocaleProvider = ({\n children,\n locale = 'en',\n defaultLocale = 'en',\n}: LocaleProviderProps) => {\n return (\n <IntlProvider locale={locale} defaultLocale={defaultLocale} messages={en}>\n {children}\n </IntlProvider>\n );\n};\n\n","export * from './locale-provider';\n","import * as React from 'react';\nconst ThemeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\nexport default ThemeContext;","import * as React from 'react';\nimport ThemeContext from \"./ThemeContext.js\";\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- It's not required to run React.useDebugValue in production\n React.useDebugValue(theme);\n }\n return theme;\n}","const hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@mui/utils';\nimport ThemeContext from \"../useTheme/ThemeContext.js\";\nimport useTheme from \"../useTheme/index.js\";\nimport nested from \"./nested.js\";\n\n// To support composition of theme.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(outerTheme);\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['MUI: You should return an object from your theme function, i.e.', '<ThemeProvider theme={() => ({})} />'].join('\\n'));\n }\n }\n return mergedTheme;\n }\n return {\n ...outerTheme,\n ...localTheme\n };\n}\n\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n const outerTheme = useTheme();\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const theme = React.useMemo(() => {\n const output = outerTheme === null ? {\n ...localTheme\n } : mergeOuterLocalTheme(outerTheme, localTheme);\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/_jsx(ThemeContext.Provider, {\n value: theme,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '@mui/private-theming';\nimport exactProp from '@mui/utils/exactProp';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nimport RtlProvider from \"../RtlProvider/index.js\";\nimport DefaultPropsProvider from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return React.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? {\n ...upperTheme,\n [themeId]: mergedTheme\n } : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? {\n ...upperTheme,\n [themeId]: localTheme\n } : {\n ...upperTheme,\n ...localTheme\n };\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * <ThemeProvider theme={theme}> // existing use case\n * <ThemeProvider theme={{ id: theme }}> // theme scoping\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = useThemeWithoutDefault(EMPTY_THEME);\n const upperPrivateTheme = usePrivateTheme() || EMPTY_THEME;\n if (process.env.NODE_ENV !== 'production') {\n if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n const rtlValue = engineTheme.direction === 'rtl';\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: engineTheme,\n children: /*#__PURE__*/_jsx(RtlProvider, {\n value: rtlValue,\n children: /*#__PURE__*/_jsx(DefaultPropsProvider, {\n value: engineTheme?.components,\n children: children\n })\n })\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────â”\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n /**\n * The design system's unique id for getting the corresponded theme when there are multiple design systems.\n */\n themeId: PropTypes.string\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","'use client';\n\nimport * as React from 'react';\nimport { ThemeProvider as SystemThemeProvider } from '@mui/system';\nimport THEME_ID from \"./identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function ThemeProviderNoVars({\n theme: themeInput,\n ...props\n}) {\n const scopedTheme = THEME_ID in themeInput ? themeInput[THEME_ID] : undefined;\n return /*#__PURE__*/_jsx(SystemThemeProvider, {\n ...props,\n themeId: scopedTheme ? THEME_ID : undefined,\n theme: scopedTheme || themeInput\n });\n}","/**\n * Split this component for RSC import\n */\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_MODE_STORAGE_KEY = 'mode';\nexport const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';\nexport const DEFAULT_ATTRIBUTE = 'data-color-scheme';\nexport default function InitColorSchemeScript(options) {\n const {\n defaultLightColorScheme = 'light',\n defaultDarkColorScheme = 'dark',\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n attribute: initialAttribute = DEFAULT_ATTRIBUTE,\n colorSchemeNode = 'document.documentElement',\n nonce\n } = options || {};\n let setter = '';\n let attribute = initialAttribute;\n if (initialAttribute === 'class') {\n attribute = '.%s';\n }\n if (initialAttribute === 'data') {\n attribute = '[data-%s]';\n }\n if (attribute.startsWith('.')) {\n const selector = attribute.substring(1);\n setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark));\n ${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`;\n }\n const matches = attribute.match(/\\[([^\\]]+)\\]/); // case [data-color-scheme=%s] or [data-color-scheme]\n if (matches) {\n const [attr, value] = matches[1].split('=');\n if (!value) {\n setter += `${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', light));\n ${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', dark));`;\n }\n setter += `\n ${colorSchemeNode}.setAttribute('${attr}'.replace('%s', colorScheme), ${value ? `${value}.replace('%s', colorScheme)` : '\"\"'});`;\n } else {\n setter += `${colorSchemeNode}.setAttribute('${attribute}', colorScheme);`;\n }\n return /*#__PURE__*/_jsx(\"script\", {\n suppressHydrationWarning: true,\n nonce: typeof window === 'undefined' ? nonce : ''\n // eslint-disable-next-line react/no-danger\n ,\n dangerouslySetInnerHTML: {\n __html: `(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${modeStorageKey}') || 'system';\n const dark = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';\n const light = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${setter}\n }\n} catch(e){}})();`\n }\n }, \"mui-color-scheme-init\");\n}","'use client';\n\nimport * as React from 'react';\nimport { DEFAULT_MODE_STORAGE_KEY, DEFAULT_COLOR_SCHEME_STORAGE_KEY } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nexport function getSystemMode(mode) {\n if (typeof window !== 'undefined' && typeof window.matchMedia === 'function' && mode === 'system') {\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n return 'dark';\n }\n return 'light';\n }\n return undefined;\n}\nfunction processState(state, callback) {\n if (state.mode === 'light' || state.mode === 'system' && state.systemMode === 'light') {\n return callback('light');\n }\n if (state.mode === 'dark' || state.mode === 'system' && state.systemMode === 'dark') {\n return callback('dark');\n }\n return undefined;\n}\nexport function getColorScheme(state) {\n return processState(state, mode => {\n if (mode === 'light') {\n return state.lightColorScheme;\n }\n if (mode === 'dark') {\n return state.darkColorScheme;\n }\n return undefined;\n });\n}\nfunction initializeValue(key, defaultValue) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n let value;\n try {\n value = localStorage.getItem(key) || undefined;\n if (!value) {\n // the first time that user enters the site.\n localStorage.setItem(key, defaultValue);\n }\n } catch (e) {\n // Unsupported\n }\n return value || defaultValue;\n}\nexport default function useCurrentColorScheme(options) {\n const {\n defaultMode = 'light',\n defaultLightColorScheme,\n defaultDarkColorScheme,\n supportedColorSchemes = [],\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n storageWindow = typeof window === 'undefined' ? undefined : window\n } = options;\n const joinedColorSchemes = supportedColorSchemes.join(',');\n const isMultiSchemes = supportedColorSchemes.length > 1;\n const [state, setState] = React.useState(() => {\n const initialMode = initializeValue(modeStorageKey, defaultMode);\n const lightColorScheme = initializeValue(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);\n const darkColorScheme = initializeValue(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);\n return {\n mode: initialMode,\n systemMode: getSystemMode(initialMode),\n lightColorScheme,\n darkColorScheme\n };\n });\n // This could be improved with `React.useSyncExternalStore` in the future.\n const [, setHasMounted] = React.useState(false);\n const hasMounted = React.useRef(false);\n React.useEffect(() => {\n if (isMultiSchemes) {\n setHasMounted(true); // to rerender the component after hydration\n }\n hasMounted.current = true;\n }, [isMultiSchemes]);\n const colorScheme = getColorScheme(state);\n const setMode = React.useCallback(mode => {\n setState(currentState => {\n if (mode === currentState.mode) {\n // do nothing if mode does not change\n return currentState;\n }\n const newMode = mode ?? defaultMode;\n try {\n localStorage.setItem(modeStorageKey, newMode);\n } catch (e) {\n // Unsupported\n }\n return {\n ...currentState,\n mode: newMode,\n systemMode: getSystemMode(newMode)\n };\n });\n }, [modeStorageKey, defaultMode]);\n const setColorScheme = React.useCallback(value => {\n if (!value) {\n setState(currentState => {\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);\n localStorage.setItem(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);\n } catch (e) {\n // Unsupported\n }\n return {\n ...currentState,\n lightColorScheme: defaultLightColorScheme,\n darkColorScheme: defaultDarkColorScheme\n };\n });\n } else if (typeof value === 'string') {\n if (value && !joinedColorSchemes.includes(value)) {\n console.error(`\\`${value}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n setState(currentState => {\n const newState = {\n ...currentState\n };\n processState(currentState, mode => {\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-${mode}`, value);\n } catch (e) {\n // Unsupported\n }\n if (mode === 'light') {\n newState.lightColorScheme = value;\n }\n if (mode === 'dark') {\n newState.darkColorScheme = value;\n }\n });\n return newState;\n });\n }\n } else {\n setState(currentState => {\n const newState = {\n ...currentState\n };\n const newLightColorScheme = value.light === null ? defaultLightColorScheme : value.light;\n const newDarkColorScheme = value.dark === null ? defaultDarkColorScheme : value.dark;\n if (newLightColorScheme) {\n if (!joinedColorSchemes.includes(newLightColorScheme)) {\n console.error(`\\`${newLightColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.lightColorScheme = newLightColorScheme;\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-light`, newLightColorScheme);\n } catch (error) {\n // Unsupported\n }\n }\n }\n if (newDarkColorScheme) {\n if (!joinedColorSchemes.includes(newDarkColorScheme)) {\n console.error(`\\`${newDarkColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.darkColorScheme = newDarkColorScheme;\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-dark`, newDarkColorScheme);\n } catch (error) {\n // Unsupported\n }\n }\n }\n return newState;\n });\n }\n }, [joinedColorSchemes, colorSchemeStorageKey, defaultLightColorScheme, defaultDarkColorScheme]);\n const handleMediaQuery = React.useCallback(event => {\n if (state.mode === 'system') {\n setState(currentState => {\n const systemMode = event?.matches ? 'dark' : 'light';\n\n // Early exit, nothing changed.\n if (currentState.systemMode === systemMode) {\n return currentState;\n }\n return {\n ...currentState,\n systemMode\n };\n });\n }\n }, [state.mode]);\n\n // Ref hack to avoid adding handleMediaQuery as a dep\n const mediaListener = React.useRef(handleMediaQuery);\n mediaListener.current = handleMediaQuery;\n React.useEffect(() => {\n if (typeof window.matchMedia !== 'function' || !isMultiSchemes) {\n return undefined;\n }\n const handler = (...args) => mediaListener.current(...args);\n\n // Always listen to System preference\n const media = window.matchMedia('(prefers-color-scheme: dark)');\n\n // Intentionally use deprecated listener methods to support iOS & old browsers\n media.addListener(handler);\n handler(media);\n return () => {\n media.removeListener(handler);\n };\n }, [isMultiSchemes]);\n\n // Handle when localStorage has changed\n React.useEffect(() => {\n if (storageWindow && isMultiSchemes) {\n const handleStorage = event => {\n const value = event.newValue;\n if (typeof event.key === 'string' && event.key.startsWith(colorSchemeStorageKey) && (!value || joinedColorSchemes.match(value))) {\n // If the key is deleted, value will be null then reset color scheme to the default one.\n if (event.key.endsWith('light')) {\n setColorScheme({\n light: value\n });\n }\n if (event.key.endsWith('dark')) {\n setColorScheme({\n dark: value\n });\n }\n }\n if (event.key === modeStorageKey && (!value || ['light', 'dark', 'system'].includes(value))) {\n setMode(value || defaultMode);\n }\n };\n // For syncing color-scheme changes between iframes\n storageWindow.addEventListener('storage', handleStorage);\n return () => {\n storageWindow.removeEventListener('storage', handleStorage);\n };\n }\n return undefined;\n }, [setColorScheme, setMode, modeStorageKey, colorSchemeStorageKey, joinedColorSchemes, defaultMode, storageWindow, isMultiSchemes]);\n return {\n ...state,\n mode: hasMounted.current || !isMultiSchemes ? state.mode : undefined,\n systemMode: hasMounted.current || !isMultiSchemes ? state.systemMode : undefined,\n colorScheme: hasMounted.current || !isMultiSchemes ? colorScheme : undefined,\n setMode,\n setColorScheme\n };\n}","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles } from '@mui/styled-engine';\nimport { useTheme as muiUseTheme } from '@mui/private-theming';\nimport ThemeProvider from \"../ThemeProvider/index.js\";\nimport InitColorSchemeScript, { DEFAULT_COLOR_SCHEME_STORAGE_KEY, DEFAULT_MODE_STORAGE_KEY } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport useCurrentColorScheme from \"./useCurrentColorScheme.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';\nexport default function createCssVarsProvider(options) {\n const {\n themeId,\n /**\n * This `theme` object needs to follow a certain structure to\n * be used correctly by the finel `CssVarsProvider`. It should have a\n * `colorSchemes` key with the light and dark (and any other) palette.\n * It should also ideally have a vars object created using `prepareCssVars`.\n */\n theme: defaultTheme = {},\n modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n disableTransitionOnChange: designSystemTransitionOnChange = false,\n defaultColorScheme,\n resolveTheme\n } = options;\n const defaultContext = {\n allColorSchemes: [],\n colorScheme: undefined,\n darkColorScheme: undefined,\n lightColorScheme: undefined,\n mode: undefined,\n setColorScheme: () => {},\n setMode: () => {},\n systemMode: undefined\n };\n const ColorSchemeContext = /*#__PURE__*/React.createContext(undefined);\n if (process.env.NODE_ENV !== 'production') {\n ColorSchemeContext.displayName = 'ColorSchemeContext';\n }\n const useColorScheme = () => React.useContext(ColorSchemeContext) || defaultContext;\n function CssVarsProvider(props) {\n const {\n children,\n theme: themeProp,\n modeStorageKey = defaultModeStorageKey,\n colorSchemeStorageKey = defaultColorSchemeStorageKey,\n disableTransitionOnChange = designSystemTransitionOnChange,\n storageWindow = typeof window === 'undefined' ? undefined : window,\n documentNode = typeof document === 'undefined' ? undefined : document,\n colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,\n disableNestedContext = false,\n disableStyleSheetGeneration = false\n } = props;\n const hasMounted = React.useRef(false);\n const upperTheme = muiUseTheme();\n const ctx = React.useContext(ColorSchemeContext);\n const nested = !!ctx && !disableNestedContext;\n const initialTheme = React.useMemo(() => {\n if (themeProp) {\n return themeProp;\n }\n return typeof defaultTheme === 'function' ? defaultTheme() : defaultTheme;\n }, [themeProp]);\n const scopedTheme = initialTheme[themeId];\n const {\n colorSchemes = {},\n components = {},\n cssVarPrefix,\n ...restThemeProp\n } = scopedTheme || initialTheme;\n const joinedColorSchemes = Object.keys(colorSchemes).filter(k => !!colorSchemes[k]).join(',');\n const allColorSchemes = React.useMemo(() => joinedColorSchemes.split(','), [joinedColorSchemes]);\n const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;\n const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;\n const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ? 'system' : colorSchemes[restThemeProp.defaultColorScheme]?.palette?.mode || restThemeProp.palette?.mode;\n\n // 1. Get the data about the `mode`, `colorScheme`, and setter functions.\n const {\n mode: stateMode,\n setMode,\n systemMode,\n lightColorScheme,\n darkColorScheme,\n colorScheme: stateColorScheme,\n setColorScheme\n } = useCurrentColorScheme({\n supportedColorSchemes: allColorSchemes,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey,\n colorSchemeStorageKey,\n defaultMode,\n storageWindow\n });\n let mode = stateMode;\n let colorScheme = stateColorScheme;\n if (nested) {\n mode = ctx.mode;\n colorScheme = ctx.colorScheme;\n }\n\n // `colorScheme` is undefined on the server and hydration phase\n const calculatedColorScheme = colorScheme || restThemeProp.defaultColorScheme;\n\n // 2. get the `vars` object that refers to the CSS custom properties\n const themeVars = restThemeProp.generateThemeVars?.() || restThemeProp.vars;\n\n // 3. Start composing the theme object\n const theme = {\n ...restThemeProp,\n components,\n colorSchemes,\n cssVarPrefix,\n vars: themeVars\n };\n if (typeof theme.generateSpacing === 'function') {\n theme.spacing = theme.generateSpacing();\n }\n\n // 4. Resolve the color scheme and merge it to the theme\n if (calculatedColorScheme) {\n const scheme = colorSchemes[calculatedColorScheme];\n if (scheme && typeof scheme === 'object') {\n // 4.1 Merge the selected color scheme to the theme\n Object.keys(scheme).forEach(schemeKey => {\n if (scheme[schemeKey] && typeof scheme[schemeKey] === 'object') {\n // shallow merge the 1st level structure of the theme.\n theme[schemeKey] = {\n ...theme[schemeKey],\n ...scheme[schemeKey]\n };\n } else {\n theme[schemeKey] = scheme[schemeKey];\n }\n });\n }\n }\n\n // 5. Declaring effects\n // 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.\n const colorSchemeSelector = restThemeProp.colorSchemeSelector;\n React.useEffect(() => {\n if (colorScheme && colorSchemeNode && colorSchemeSelector && colorSchemeSelector !== 'media') {\n const selector = colorSchemeSelector;\n let rule = colorSchemeSelector;\n if (selector === 'class') {\n rule = `.%s`;\n }\n if (selector === 'data') {\n rule = `[data-%s]`;\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (rule.startsWith('.')) {\n colorSchemeNode.classList.remove(...allColorSchemes.map(scheme => rule.substring(1).replace('%s', scheme)));\n colorSchemeNode.classList.add(rule.substring(1).replace('%s', colorScheme));\n } else {\n const matches = rule.replace('%s', colorScheme).match(/\\[([^\\]]+)\\]/);\n if (matches) {\n const [attr, value] = matches[1].split('=');\n if (!value) {\n // for attributes like `data-theme-dark`, `data-theme-light`\n // remove all the existing data attributes before setting the new one\n allColorSchemes.forEach(scheme => {\n colorSchemeNode.removeAttribute(attr.replace(colorScheme, scheme));\n });\n }\n colorSchemeNode.setAttribute(attr, value ? value.replace(/\"|'/g, '') : '');\n } else {\n colorSchemeNode.setAttribute(rule, colorScheme);\n }\n }\n }\n }, [colorScheme, colorSchemeSelector, colorSchemeNode, allColorSchemes]);\n\n // 5.2 Remove the CSS transition when color scheme changes to create instant experience.\n // credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313\n React.useEffect(() => {\n let timer;\n if (disableTransitionOnChange && hasMounted.current && documentNode) {\n const css = documentNode.createElement('style');\n css.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION));\n documentNode.head.appendChild(css);\n\n // Force browser repaint\n (() => window.getComputedStyle(documentNode.body))();\n timer = setTimeout(() => {\n documentNode.head.removeChild(css);\n }, 1);\n }\n return () => {\n clearTimeout(timer);\n };\n }, [colorScheme, disableTransitionOnChange, documentNode]);\n React.useEffect(() => {\n hasMounted.current = true;\n return () => {\n hasMounted.current = false;\n };\n }, []);\n const contextValue = React.useMemo(() => ({\n allColorSchemes,\n colorScheme,\n darkColorScheme,\n lightColorScheme,\n mode,\n setColorScheme,\n setMode,\n systemMode\n }), [allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode]);\n let shouldGenerateStyleSheet = true;\n if (disableStyleSheetGeneration || restThemeProp.cssVariables === false || nested && upperTheme?.cssVarPrefix === cssVarPrefix) {\n shouldGenerateStyleSheet = false;\n }\n const element = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [shouldGenerateStyleSheet && /*#__PURE__*/_jsx(React.Fragment, {\n children: (theme.generateStyleSheets?.() || []).map((styles, index) => /*#__PURE__*/_jsx(GlobalStyles, {\n styles: styles\n }, index))\n }), /*#__PURE__*/_jsx(ThemeProvider, {\n themeId: scopedTheme ? themeId : undefined,\n theme: resolveTheme ? resolveTheme(theme) : theme,\n children: children\n })]\n });\n if (nested) {\n return element;\n }\n return /*#__PURE__*/_jsx(ColorSchemeContext.Provider, {\n value: contextValue,\n children: element\n });\n }\n process.env.NODE_ENV !== \"production\" ? CssVarsProvider.propTypes = {\n /**\n * The component tree.\n */\n children: PropTypes.node,\n /**\n * The node used to attach the color-scheme attribute\n */\n colorSchemeNode: PropTypes.any,\n /**\n * localStorage key used to store `colorScheme`\n */\n colorSchemeStorageKey: PropTypes.string,\n /**\n * If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.\n */\n disableNestedContext: PropTypes.bool,\n /**\n * If `true`, the style sheet won't be generated.\n *\n * This is useful for controlling nested CssVarsProvider behavior.\n */\n disableStyleSheetGeneration: PropTypes.bool,\n /**\n * Disable CSS transitions when switching between modes or color schemes.\n */\n disableTransitionOnChange: PropTypes.bool,\n /**\n * The document to attach the attribute to.\n */\n documentNode: PropTypes.any,\n /**\n * The key in the local storage used to store current color scheme.\n */\n modeStorageKey: PropTypes.string,\n /**\n * The window that attaches the 'storage' event listener.\n * @default window\n */\n storageWindow: PropTypes.any,\n /**\n * The calculated theme object that will be passed through context.\n */\n theme: PropTypes.object\n } : void 0;\n const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;\n const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;\n const getInitColorSchemeScript = params => InitColorSchemeScript({\n colorSchemeStorageKey: defaultColorSchemeStorageKey,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey: defaultModeStorageKey,\n ...params\n });\n return {\n CssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript\n };\n}","import * as React from 'react';\nimport SystemInitColorSchemeScript from '@mui/system/InitColorSchemeScript';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const defaultConfig = {\n attribute: 'data-mui-color-scheme',\n colorSchemeStorageKey: 'mui-color-scheme',\n defaultLightColorScheme: 'light',\n defaultDarkColorScheme: 'dark',\n modeStorageKey: 'mui-mode'\n};\nexport default (function InitColorSchemeScript(props) {\n return /*#__PURE__*/_jsx(SystemInitColorSchemeScript, {\n ...defaultConfig,\n ...props\n });\n});","'use client';\n\nimport * as React from 'react';\nimport styleFunctionSx from '@mui/system/styleFunctionSx';\nimport { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';\nimport createTheme from \"./createTheme.js\";\nimport createTypography from \"./createTypography.js\";\nimport THEME_ID from \"./identifier.js\";\nimport { defaultConfig } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst {\n CssVarsProvider: InternalCssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript: deprecatedGetInitColorSchemeScript\n} = createCssVarsProvider({\n themeId: THEME_ID,\n // @ts-ignore ignore module augmentation tests\n theme: () => createTheme({\n cssVariables: true\n }),\n colorSchemeStorageKey: defaultConfig.colorSchemeStorageKey,\n modeStorageKey: defaultConfig.modeStorageKey,\n defaultColorScheme: {\n light: defaultConfig.defaultLightColorScheme,\n dark: defaultConfig.defaultDarkColorScheme\n },\n resolveTheme: theme => {\n const newTheme = {\n ...theme,\n typography: createTypography(theme.palette, theme.typography)\n };\n newTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return newTheme;\n }\n});\nlet warnedOnce = false;\n\n// TODO: remove in v7\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction Experimental_CssVarsProvider(props) {\n if (!warnedOnce) {\n console.warn(['MUI: The Experimental_CssVarsProvider component has been ported into ThemeProvider.', '', \"You should use `import { ThemeProvider } from '@mui/material/styles'` instead.\", 'For more details, check out https://mui.com/material-ui/customization/css-theme-variables/usage/'].join('\\n'));\n warnedOnce = true;\n }\n return /*#__PURE__*/_jsx(InternalCssVarsProvider, {\n ...props\n });\n}\nlet warnedInitScriptOnce = false;\n\n// TODO: remove in v7\nconst getInitColorSchemeScript = params => {\n if (!warnedInitScriptOnce) {\n console.warn(['MUI: The getInitColorSchemeScript function has been deprecated.', '', \"You should use `import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'`\", 'and replace the function call with `<InitColorSchemeScript />` instead.'].join('\\n'));\n warnedInitScriptOnce = true;\n }\n return deprecatedGetInitColorSchemeScript(params);\n};\n\n/**\n * TODO: remove this export in v7\n * @deprecated\n * The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.\n *\n * You should use `ThemeProvider` and `createTheme` instead:\n *\n * ```diff\n * - import { CssVarsProvider, extendTheme } from '@mui/material/styles';\n * + import { ThemeProvider, createTheme } from '@mui/material/styles';\n *\n * - const theme = extendTheme();\n * + const theme = createTheme({\n * + cssVariables: true,\n * + colorSchemes: { light: true, dark: true },\n * + });\n *\n * - <CssVarsProvider theme={theme}>\n * + <ThemeProvider theme={theme}>\n * ```\n *\n * To see the full documentation, check out https://mui.com/material-ui/customization/css-theme-variables/usage/.\n */\nexport const CssVarsProvider = InternalCssVarsProvider;\nexport { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };","'use client';\n\nimport * as React from 'react';\nimport ThemeProviderNoVars from \"./ThemeProviderNoVars.js\";\nimport { CssVarsProvider } from \"./ThemeProviderWithVars.js\";\nimport THEME_ID from \"./identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function ThemeProvider({\n theme,\n ...props\n}) {\n if (typeof theme === 'function') {\n return /*#__PURE__*/_jsx(ThemeProviderNoVars, {\n theme: theme,\n ...props\n });\n }\n const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;\n if (!('colorSchemes' in muiTheme)) {\n return /*#__PURE__*/_jsx(ThemeProviderNoVars, {\n theme: theme,\n ...props\n });\n }\n return /*#__PURE__*/_jsx(CssVarsProvider, {\n theme: theme,\n ...props\n });\n}","import { createTheme } from '@mui/material/styles';\n\nimport '@mui/material/styles';\n\ndeclare module '@mui/material/styles' {\n interface BreakpointOverrides {\n xs: true;\n sm: true;\n md: true;\n lg: true;\n xl: true;\n xxl: true;\n }\n}\n\nexport const theme = createTheme({\n breakpoints: {\n values: {\n xs: 0,\n sm: 600,\n md: 900,\n lg: 1200,\n xl: 1536,\n xxl: 1750,\n },\n },\n});\n","import '@styles/globals.scss';\nimport { ReactElement, ReactNode, useEffect, useState } from 'react';\nimport type { AppProps } from 'next/app';\nimport { Hydrate, QueryClient, QueryClientProvider } from 'react-query';\nimport { ReactQueryDevtools } from 'react-query/devtools';\nimport { useAuthUser, useBuyerSignupInfo, useIsMounted, useTheme } from '@hooks';\nimport { LocaleProvider } from '@contexts';\nimport { NextPage } from 'next';\nimport { AppWrapper, RouteProtector } from '@components';\nimport Head from 'next/head';\nimport { Toaster } from 'react-hot-toast';\nimport { useRouter } from 'next/router';\nimport * as gtag from '@lib/gtag';\nimport { TourProvider } from 'contexts/tour-guide';\nimport { SidebarProvider } from 'contexts/sidebar-context';\nimport { RouteProvider } from '../context/RouteContext';\nimport { LanguageProvider } from 'context/LanguageContext';\nimport { TrackingService, TrackingSourceType } from '@services/tracking';\nimport { ThemeProvider } from '@mui/material';\nimport { theme } from '@styles/theme';\n\nexport type NextPageWithLayout = NextPage & { getLayout?: (page: ReactElement) => ReactNode };\n\ninterface AppPropsWithLayout extends AppProps {\n Component: NextPageWithLayout;\n}\n\nconst App = ({ Component, pageProps }: AppPropsWithLayout) => {\n const [queryClient] = useState(() => new QueryClient());\n const router = useRouter();\n\n const getLayout = Component.getLayout ?? ((page) => page);\n const { mode } = useTheme();\n\n useEffect(() => {\n if (mode === 'light') {\n document.querySelector('html')?.classList.remove('dark');\n } else {\n document.querySelector('html')?.classList.add('dark');\n }\n }, [mode]);\n\n useEffect(() => {\n const handleRouteChange = (url) => {\n gtag.pageView(url);\n \n // Determine the source type based on the URL\n let source = TrackingSourceType.UNKNOWN;\n \n if (url.includes('/summary')) {\n source = TrackingSourceType.DASHBOARD;\n } else if (url.includes('/signup') || url.includes('/register')) {\n // Use the appropriate source type based on query parameters\n const { ln } = router.query;\n if (ln === '1') source = TrackingSourceType.LANDING_PAGE_1;\n else if (ln === '2') source = TrackingSourceType.LANDING_PAGE_2;\n else if (ln === 'cal') source = TrackingSourceType.MORTGAGE_CALCULATOR;\n else if (ln === 'hn') source = TrackingSourceType.HOME_NURTURE;\n }\n \n // Track the page visit\n TrackingService.trackPageVisit(source, router.query.v_id as string, router.query.e ? 'Email Campaign' : router.query.m ? 'Mailer Campaign' : null,router.query.m ?router.query.m as string : router.query.e as string,router.query.f as string);\n };\n \n router.events.on('routeChangeComplete', handleRouteChange);\n return () => {\n router.events.off('routeChangeComplete', handleRouteChange);\n };\n }, [router.events, router.query]);\n const isDevSubdomain = typeof window !== \"undefined\" && window.location.hostname.includes(\"dev-app\");\n\n return (\n <>\n <LanguageProvider>\n <Head>\n <title>My Home Pathway - We're here to help you get your mortgage approved</title>\n <meta name=\"description\" content=\"Your founding team on demand.\" />\n {isDevSubdomain && <meta name=\"robots\" content=\"noindex, nofollow\" />}\n <link\n rel=\"apple-touch-icon\"\n type=\"image/png\"\n sizes=\"180x180\"\n href=\"/apple-touch-icon.png\"\n />\n <link\n rel=\"apple-touch-precomposed\"\n type=\"image/png\"\n sizes=\"180x180\"\n href=\"/apple-touch-icon.png\"\n />\n <link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/favicon-32x32.png\" />\n <link rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/favicon-16x16.png\" />\n <link rel=\"mask-icon\" href=\"/safari-pinned-tab.svg\" color=\"#FFFFFF\" />\n <link rel=\"manifest\" href=\"/site.webmanifest\" />\n <meta name=\"viewport\" content=\"initial-scale=1.0, width=device-width\" />\n </Head>\n <RouteProvider>\n <QueryClientProvider client={queryClient}>\n <Hydrate state={pageProps.dehydratedState}>\n <LocaleProvider>\n <SidebarProvider>\n <ThemeProvider theme={theme}>\n <AppWrapper>\n <TourProvider>\n <RouteProtector>\n {getLayout(<Component {...pageProps} />)}\n <Toaster />\n </RouteProtector>\n </TourProvider>\n </AppWrapper>\n </ThemeProvider>\n </SidebarProvider>\n </LocaleProvider>\n </Hydrate>\n {process.env.NODE_ENV === 'development' && <ReactQueryDevtools />}\n </QueryClientProvider>\n </RouteProvider>\n </LanguageProvider>\n </>\n );\n};\n\nexport default App;\n","import * as qs from 'qs';\nimport axios, { AxiosRequestConfig, AxiosResponse, Method } from 'axios';\n\nexport class RequestBuilder {\n config: AxiosRequestConfig;\n\n constructor(baseURL: string, config?: AxiosRequestConfig) {\n this.config = {\n baseURL,\n headers: {\n 'content-type': 'application/json',\n },\n ...(config ?? {}),\n };\n\n return this;\n }\n\n contentType(type: string): RequestBuilder {\n this.config.headers['content-type'] = type;\n\n return this;\n }\n\n append(url: string): RequestBuilder {\n this.config.url = url;\n\n return this;\n }\n\n method(name: Method): RequestBuilder {\n this.config.method = name;\n\n return this;\n }\n\n params(params: Record<string, any>): RequestBuilder {\n this.config.params = params;\n\n return this;\n }\n\n setHeader(newHeader: Record<string, any>): RequestBuilder {\n this.config.headers = {\n ...this.config.headers,\n ...newHeader,\n };\n\n return this;\n }\n\n setData(data: any): RequestBuilder {\n this.config.data = data;\n\n if (\n this.config.headers['content-type'] ===\n 'application/x-www-form-urlencoded'\n ) {\n this.config.data = qs.stringify(data);\n }\n\n if (this.config.headers['content-type'] === 'multipart/form-data') {\n this.config.data = data;\n }\n\n return this;\n }\n\n build<T = unknown>(): Promise<AxiosResponse<T>> {\n const client = axios.create(this.config);\n\n // Adding a response interceptor to handle responses and errors\n client.interceptors.response.use(\n (response) => {\n // Any status code that lie within the range of 2xx cause this function to trigger\n // Do something with response data\n\n return response;\n },\n async (error) => {\n // Any status codes that falls outside the range of 2xx cause this function to trigger\n // Do something with response error\n\n if (error.response) {\n // The request was made and the server responded with a status code\n // that falls out of the range of 2xx\n const errorData = error.response;\n return Promise.reject(errorData);\n } else if (error.request) {\n // The request was made but no response was received\n // `error.request` is an instance of XMLHttpRequest in the browser and an instance of\n // http.ClientRequest in node.js\n return Promise.reject(error.request);\n } else {\n // Something happened in setting up the request that triggered an Error\n return Promise.reject(error.message);\n }\n }\n );\n\n return client.request(this.config);\n }\n}\n","import { RequestBuilder } from '../../lib/RequestBuilder';\nimport { useUserStore } from '@hooks';\nimport { AxiosRequestHeaders } from 'axios';\n\nconst defaultHeaders = {\n 'Content-Type': 'application/json',\n 'x-api-key': process.env.NEXT_PUBLIC_SERVER_API_KEY || '',\n};\n\nexport const apiRequestClient = () => {\n const additionalConfig = {\n headers: defaultHeaders,\n };\n\n const accessToken = useUserStore?.getState?.()?.accessToken;\n // Adding the access token to the request if it exists\n if (accessToken) {\n const headers = {\n Authorization: `Bearer ${accessToken}`,\n };\n additionalConfig.headers = { ...additionalConfig.headers, ...headers };\n }\n\n return new RequestBuilder(process.env.NEXT_PUBLIC_API_URL, additionalConfig);\n};\n","import { apiRequestClient } from '../client';\nimport { AuthenticationPartialSignupForm, EAuthenticationType, User } from '../types';\nimport { Buyer, EUserType } from './../types';\n\n// ------------------------- // Common // ------------------------- //\n// /**\n// * Starts the authentication flow by phone\n// */\n// export const startAuthenticationByPhone = (body: Pick<User, 'phone'>) => {\n// return apiRequestClient()\n// .method('post')\n// .append('auth/phone')\n// .setData(body)\n// .build<{ authenticationId: string; type: 'signin' | 'signup' }>();\n// };\n/**\n * Get linkedin email using access token\n */\n// old code\n// export const getSocialLoginProviderEmailUsingAccessToken = (body: { accessToken: string }) => {\n// return apiRequestClient().method('post').append('auth/social-login/email').setData(body).build<{\n// elements: string;\n// }>();\n// };\n\nexport const getSocialLoginProviderEmailUsingAccessToken = (body: {\n authCode: string;\n redirectURI: string;\n}) => {\n return apiRequestClient().method('post').append('auth/social-login/email').setData(body).build<{\n elements: string;\n firstName?: string;\n lastName?: string;\n email?: string;\n accessToken?: string;\n code?: string;\n error?: string;\n }>();\n};\n\n/**\n * Starts the authentication flow by Social\n */\nexport const startSocialLoginAuthenticationByEmail = (body: {\n firstName: string;\n lastName: string;\n provider: string;\n email: string;\n userType: EUserType;\n type: EAuthenticationType;\n referredBy;\n}) => {\n return apiRequestClient().method('post').append('auth/social-login').setData(body).build<{\n firstName: string;\n lastName: string;\n authenticationId: string;\n type: EAuthenticationType;\n email: string;\n authType: string;\n provider: string;\n accessToken: string;\n userType: EUserType;\n partialSignupForm: AuthenticationPartialSignupForm;\n user: User;\n buyer: Buyer;\n }>();\n};\n\n/**\n * Starts the authentication flow by email & password\n */\nexport const startAuthenticationByEmailAndPassword = (body: {\n email: string;\n password: string;\n visitorId: string | string[];\n userType: EUserType;\n type: EAuthenticationType;\n referredBy?: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('auth/sign-in-with-email-and-password')\n .setData(body)\n .build<{\n authenticationId: string;\n type: EAuthenticationType;\n email: string;\n visitorId: string | string[];\n password: string;\n userType: EUserType;\n user: User;\n accessToken: string;\n }>();\n};\n\n/**\n * Starts the reset password flow by email\n */\nexport const startResetPasswordAuthenticationByEmail = (body: {\n email: string;\n userType: EUserType;\n type: EAuthenticationType;\n referredBy?: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('auth/reset-password-by-email')\n .setData(body)\n .build<{\n authenticationId: string;\n type: EAuthenticationType;\n email: string;\n userType: EUserType;\n }>();\n};\n\n/**\n * Reset password OTP verification flow\n */\nexport const resetPasswordOTPVerification = (body: {\n authenticationId: string;\n userType: EUserType;\n code: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('auth/reset-password-otp-verification')\n .setData(body)\n .build<{\n authenticationId: string;\n type: EAuthenticationType;\n email: string;\n userType: EUserType;\n userVerified: Boolean;\n }>();\n};\n\n/**\n * Reset password OTP verification flow\n */\nexport const resetPasswordUpdation = (body: {\n authenticationId: string;\n email: string;\n password: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('auth/reset-password-updation')\n .setData(body)\n .build<{\n accessToken: string;\n user: User;\n buyer?: Buyer;\n }>();\n};\n\n/**\n * Starts the authentication flow by email\n */\nexport const startAuthenticationByEmail = (body: {\n email: string;\n userType: EUserType;\n type: EAuthenticationType;\n referredBy?: string;\n}) => {\n return apiRequestClient().method('post').append('auth/email').setData(body).build<{\n authenticationId: string;\n type: EAuthenticationType;\n email: string;\n userType: EUserType;\n status: string;\n message: string;\n }>();\n};\n\nexport const createVerificationCode = (body: { phone: string; isResend?: boolean }) => {\n return apiRequestClient().method('post').append('/buyer/phone-verification').setData(body).build<{\n success: boolean;\n status: string;\n error: string;\n message: string;\n statusCode: number;\n }>(); // Define the expected response type\n};\n\nexport const verifyPhoneCode = (body: {\n email: string;\n verificationCode: string;\n phone: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('/buyer/phone-code-verification')\n .setData(body)\n .build<{\n success: boolean;\n status: string;\n error: string;\n message: string;\n statusCode: number;\n }>(); // Define the expected response type\n};\n\n/**\n * Starts the authentication flow by partnerId\n */\nexport type SignUpVerifyPartnerCodeResponse = {\n partnerCodeStatus: boolean;\n associateIdStatus: boolean;\n};\nexport const signUpVerifyPartnerCode = (body: {\n partnerCode: string;\n lenderCode: string;\n associateId: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('auth/sign-up/verify-partner-code')\n .setData(body)\n .build<SignUpVerifyPartnerCodeResponse>();\n};\n\n// ------------------------- // Sign In // ------------------------- //\n/**\n * Verifies the authentication code, and signs in the user\n */\nexport const signIn = (body: { authenticationId: string; userType: EUserType; code: string }) => {\n return apiRequestClient()\n .method('post')\n .append('auth/sign-in')\n .setData(body)\n .build<{ accessToken: string; user: User; buyer?: Buyer }>();\n};\n\n// ------------------------- // Sign Up // ------------------------- //\n/**\n * Verifies the authentication code, if no error, then the user may proceed to the next step\n */\nexport type SignUpVerifyCodeResponse = {\n authenticationId: string;\n email: string;\n partialSignupForm: AuthenticationPartialSignupForm;\n userType: EUserType;\n};\nexport const signUpVerifyCode = (body: {\n authenticationId: string;\n code: string;\n userType: EUserType;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('auth/sign-up/verify')\n .setData(body)\n .build<SignUpVerifyCodeResponse>();\n};\n\n/**\n * Saves the partial signups form data, to be used later in a different device, if needed\n */\nexport const savePartialSignUpForm = (body: {\n authenticationId: string;\n email: string;\n userType: EUserType;\n partialSignupForm: AuthenticationPartialSignupForm;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('auth/sign-up/save-partial')\n .setData(body)\n .build<void>();\n};\n\n// ------------------------- // Verification // ------------------------- //\n/**\n * Starts the verification flow and sends a code to the chosen type for the authenticated user\n */\nexport const getVerificationCode = (body: { email: string }) => {\n return apiRequestClient()\n .method('post')\n .append('/email-verification/send-verification-code')\n .setData(body)\n .build<{ verificationId: string; message: string }>();\n};\n\n/**\n * Resend the authentication code\n */\nexport const resendCode = (body: {\n id: string;\n type: 'authentication' | 'verification';\n emailCodeType?: 'sign-up' | 'reset';\n email?: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('/auth/resend-code')\n .setData(body)\n .build<void>();\n};\n\n/**\n * Verify the authentication code\n */\nexport const verifyCode = (body: { email: string; code: string }) => {\n return apiRequestClient()\n .method('post')\n .append('/email-verification/verify-code')\n .setData(body)\n .build<{ verified: boolean }>();\n};\n\nexport const getRecommendationPush = async (userId: string) => {\n return apiRequestClient()\n .method('get')\n .append('reco-v3/reco-push/' + userId)\n .build();\n};\n\n/**\n * Starts the authentication flow by SSO v2 firebase\n */\nexport const startSSOLogin = (body: {\n token: string;\n userType: EUserType;\n type: EAuthenticationType;\n provider: 'google' | 'apple';\n referredBy: string;\n firstName?: string;\n lastName?: string;\n}) => {\n return apiRequestClient().method('post').append('auth/sso').setData(body).build<{\n firstName: string;\n lastName: string;\n authenticationId: string;\n type: EAuthenticationType;\n email: string;\n authType: string;\n provider: string;\n accessToken: string;\n userType: EUserType;\n partialSignupForm: AuthenticationPartialSignupForm;\n user: User;\n buyer: Buyer;\n }>();\n};\n","import { apiRequestClient } from '../client';\nimport {\n BlockBuyerResponse,\n Buyer,\n BuyerOnboardingStatus,\n BuyerProfile,\n CalculateScoreResponse,\n EOnboardingPathTaken,\n User,\n} from '../types';\n\ntype UserFields = Pick<\n User,\n | 'firstName'\n | 'lastName'\n | 'email'\n | 'phone'\n | 'password'\n | 'acceptPhoneConsent'\n | 'declinePhoneConsent'\n>;\n\nexport type SignUpBuyerBody = {\n authenticationId: string;\n verificationCode: string;\n accessCode: string;\n partnerCode: string;\n lenderCode: string;\n provider: string;\n partnerCodeStatus: boolean;\n associateIdStatus: boolean;\n associateId: string;\n inviteId?: string;\n isLanded?: string;\n campaignFrequency?: string;\n campaignMonth?: string;\n campaignSource?: string;\n visitorId?: string | string[];\n metadata?: {\n source?: string;\n variant?: string;\n creditScore?: number;\n [key: string]: any;\n };\n} & UserFields &\n Pick<Buyer, 'housePriceGoal' | 'wishedLocations' | 'expectedPurchaseMonthsPeriod'>;\n\n/**\n * Signs up a new buyer and returns access token\n */\nexport const signUpBuyer = (body: SignUpBuyerBody) => {\n return apiRequestClient()\n .method('post')\n .append('buyer/sign-up')\n .setData(body)\n .build<{ accessToken: string; buyer: Buyer; user: User }>();\n};\n\n/**\n * Validates access code, throws error if invalid\n */\nexport const validateBuyerAccessCode = (body: { authenticationId: string; accessCode: string }) => {\n return apiRequestClient()\n .method('post')\n .append('buyer/validate-access-code')\n .setData(body)\n .build<void>();\n};\n\nexport type BuyerProfileFields = Pick<\n BuyerProfile,\n | 'housePriceGoal'\n | 'expectedPurchaseMonthsPeriod'\n | 'wishedLocations'\n | 'dateOfBirth'\n | 'gender'\n | 'race'\n | 'hispanicOrigin'\n | 'children'\n | 'childrenUnder18Count'\n | 'street'\n | 'city'\n | 'state'\n | 'zipCode'\n | 'occupation'\n | 'militaryStatus'\n | 'reasonForPurchase'\n | 'userJourney'\n | 'isWelcomeFlashCardsShown'\n | 'isRewardsWelcomeShown'\n>;\nexport const updateBuyer = (body: Partial<BuyerProfileFields>) => {\n return apiRequestClient()\n .method('patch')\n .append('buyer')\n .setData(body)\n .build<{ profile: BuyerProfile }>();\n};\n\nexport type RefreshBuyerOnboardingStatusBody = {\n skipTransactions?: boolean;\n skipCreditReport?: boolean;\n skipIncome?: boolean;\n};\nexport const refreshBuyerOnboardingStatus = (body: RefreshBuyerOnboardingStatusBody) => {\n return apiRequestClient()\n .method('put')\n .setData(body)\n .append('buyer/refresh-onboarding-status')\n .build<BuyerOnboardingStatus>();\n};\n\n//userjourney\nexport const updateUserJourney = (body: { userJourney: string }) => {\n return apiRequestClient()\n .method('patch')\n .append('buyer/user-journey')\n .setData(body)\n .build<{ profile: BuyerProfile }>();\n};\n\n// update onboarding path taken\nexport const updateOnboardingPath = (body: { onboardingPathTaken: EOnboardingPathTaken }) => {\n return apiRequestClient()\n .method('put')\n .append('buyer/onboarding-path')\n .setData(body)\n .build<void>();\n};\n\n/**\n * Calculates the buyer score\n */\nexport const calculateScore = (body: { creditScore: number }) => {\n return apiRequestClient()\n .method('post')\n .append('buyer/calculate-score')\n .setData(body)\n .build<CalculateScoreResponse>();\n};\n\n/**\n * [Careful, this is a destructive action]\n * Deletes the buyer, and all associated data, including the user, plaid's items, plaid's accounts, array's profile, debts, etc...\n */\nexport const deleteBuyer = () => {\n return apiRequestClient()\n .method('delete')\n .append('buyer')\n .build<{ id: string; userId: string }>();\n};\n\n/**\n * [SANDBOX ONLY]\n * Sync the verified data for the buyer\n */\nexport const syncVerifiedData = () => {\n return apiRequestClient().method('post').append('buyer/sync-monthly-verified-data').build<{\n savings: boolean;\n paystubs: boolean;\n incomes: boolean;\n transactions: boolean;\n debts: boolean;\n }>();\n};\n\nexport const buyerPartialValidate = (body: Partial<BuyerProfile>) => {\n return apiRequestClient()\n .method('post')\n .append('buyer/partial-validate')\n .setData(body)\n .build<void>();\n};\n\n// Block a buyer after failed credit score attempts\nexport const blockBuyer = (buyerId: string) => {\n return apiRequestClient()\n .method('post')\n .append(`buyer/block/${buyerId}`)\n .build<BlockBuyerResponse>();\n};\n\nexport const checkBlocked = (buyerId: string) => {\n return apiRequestClient().method('post').append(`buyer/check-block/${buyerId}`).build<BlockBuyerResponse>();\n}\n","import { CompleteProfileFields } from '@hooks';\nimport { apiRequestClient } from '../client';\n\nexport const getBuyerCreditReportUserId = () => {\n return apiRequestClient().method('get').append('buyer/credit-report/user').build<{\n userId: string;\n }>();\n};\n\nexport const getBuyerCreditReportUserToken = () => {\n return apiRequestClient().method('get').append('buyer/credit-report/user-token').build<{\n userId: string;\n userToken: string;\n }>();\n};\n\nexport const createBuyerCreditReportUser = (body: Partial<CompleteProfileFields>) => {\n return apiRequestClient().method('post').append('buyer/credit-report/user').setData(body).build<{\n userId: string;\n }>();\n};\n\nexport const updateBuyerCreditReportUserToken = (userToken: string) => {\n return apiRequestClient()\n .method('put')\n .setData({\n userToken,\n })\n .append('buyer/credit-report/update-user-token')\n .build<void>();\n};\n\nexport const retrieveBuyerCreditReport = () => {\n return apiRequestClient().method('put').append('buyer/credit-report/retrieve-report').build<{\n score: number;\n creditReport: { CREDIT_RESPONSE: { CREDIT_SCORE: { '@_Date': string } } };\n userToken: string;\n }>();\n};\n\nexport const disconnectBuyerCreditReportUser = () => {\n return apiRequestClient().method('delete').append('buyer/credit-report/user').build<void>();\n};\n\ninterface Alert {\n id: string;\n title: string;\n description: string;\n createdAt: string;\n seen: boolean;\n}\n\ninterface AlertsResponse {\n alerts: Alert[];\n}\n\nexport const getBuyerCreditReportAlerts = () => {\n return apiRequestClient().method('get').append(`buyer/alerts`).build<AlertsResponse>();\n};\n\nexport const markAlertsAsSeen = (alertId: string) => {\n return apiRequestClient()\n .method('post')\n .append(`buyer/alerts/mark-seen/${alertId}`)\n .build<void>();\n};\n","import { apiRequestClient } from '../client';\nimport { BuyerDebt } from '../types';\n\n/**\n * List all buyer debts\n */\nexport const listBuyerDebts = () => {\n return apiRequestClient().method('get').append('/buyer/debts').build<{\n items: BuyerDebt[];\n total: number;\n }>();\n};\n\ntype CreateBuyerDebtBody = Pick<BuyerDebt, 'amount' | 'category'> & {\n date: string;\n};\n/**\n * Create a buyer debts\n */\nexport const createBuyerDebt = (body: CreateBuyerDebtBody) => {\n return apiRequestClient().method('post').append('/buyer/debts').setData(body).build<BuyerDebt>();\n};\n\ntype UpdateBuyerDebtBody = Partial<CreateBuyerDebtBody>;\n/**\n * Create a buyer debts\n */\nexport const updateBuyerDebt = (id: string, body: UpdateBuyerDebtBody) => {\n return apiRequestClient()\n .method('patch')\n .append('/buyer/debts/' + id)\n .setData(body)\n .build<BuyerDebt>();\n};\n\n/**\n * Deletes a buyer debt\n */\nexport const deleteBuyerDebt = (id: string) => {\n return apiRequestClient()\n .method('delete')\n .append('/buyer/debts/' + id)\n .build<{ id: string }>();\n};\n","import { apiRequestClient } from '../client';\nimport { BuyerIncome } from '../types';\n\n/**\n * List all buyer incomes\n */\nexport const listBuyerIncomes = () => {\n return apiRequestClient().method('get').append('/buyer/incomes').build<{\n items: BuyerIncome[];\n total: number;\n }>();\n};\n\ntype CreateBuyerIncomeBody = Pick<BuyerIncome, 'grossPayAmount' | 'category' | 'frequency'> & {\n // This is a hack to make the API happy, but this will be converted to startDate & endDate\n date: string; // ISO 8601\n};\n/**\n * Create a buyer incomes\n */\nexport const createBuyerIncome = (body: CreateBuyerIncomeBody) => {\n return apiRequestClient()\n .method('post')\n .append('/buyer/incomes')\n .setData(body)\n .build<BuyerIncome>();\n};\n\ntype UpdateBuyerIncomeBody = Partial<CreateBuyerIncomeBody>;\n/**\n * Create a buyer incomes\n */\nexport const updateBuyerIncome = (id: string, body: UpdateBuyerIncomeBody) => {\n return apiRequestClient()\n .method('patch')\n .append('/buyer/incomes/' + id)\n .setData(body)\n .build<BuyerIncome>();\n};\n\n/**\n * Deletes a buyer income\n */\nexport const deleteBuyerIncome = (id: string) => {\n return apiRequestClient()\n .method('delete')\n .append('/buyer/incomes/' + id)\n .build<{ id: string }>();\n};\n","import { apiRequestClient } from '../client';\nimport { PlaidItem } from './buyer-plaid-items';\n\n/**\n * Create a link token for the Plaid Link frontend component, which allows the user to connect a bank account, for transactions.\n */\nexport const createBuyerIncomesLinkToken = () => {\n return apiRequestClient().method('post').append('/buyer/plaid/incomes/create-link-token').build<{\n link_token: string;\n expiration: string;\n }>();\n};\n\n/**\n * Exchange a public token for an access token\n */\nexport const exchangeBuyerIncomesPublicToken = (body: {\n publicToken: string;\n institutionId?: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('/buyer/plaid/incomes/exchange-public-token')\n .setData(body)\n .build<any>();\n};\n\n/**\n * List all income items connected to the buyer\n */\nexport const getBuyerIncomeItems = () => {\n return apiRequestClient().method('get').append('/buyer/plaid/incomes').build<PlaidItem[]>();\n};\n","import { apiRequestClient } from '../client';\nimport { stringify } from 'querystring';\n\nexport type PlaidItem = {\n itemId: string;\n // accessToken: string;\n institutionId: string | null;\n institutionName: string | null;\n institutionLogo: string | null;\n institutionPrimaryColor: string | null;\n status: 'connected' | 'waiting_for_webhook' | 'error';\n incomeType: 'payroll' | 'document';\n userId: string;\n createdAt: Date;\n updatedAt: Date;\n plaidIncomePayStubs: any;\n};\n\nexport type PlaidAccount = {\n accountId: string;\n accountBalanceAvailable: number | null;\n accountBalanceCurrent: number | null;\n accountBalanceLimit: number | null;\n accountBalanceIsoCode: string | null;\n accountBalanceLastUpdated: Date | null;\n name: string;\n mask: string | null;\n // TODO: add this enum\n // type: PlaidAccountType\n type: string;\n subType: string | null;\n itemId: string;\n item?: Pick<PlaidItem, 'institutionName' | 'institutionLogo' | 'institutionPrimaryColor'>;\n userId: string;\n createdAt: Date;\n updatedAt: Date;\n};\n\nexport type PlaidTransaction = {\n amount: number,\n buyerDebtId?: string,\n categories: string[],\n categoryId: string,\n createdAt: Date,\n currencyCode: string,\n date: Date,\n name: string,\n paymentChannel: string,\n pending: boolean,\n personalFinanceCategoryDetailed: string,\n personalFinanceCategoryPrimary: string,\n plaidAccountId: string,\n plaidItemId: string,\n transactionId: string,\n updatedAt: Date,\n userId: string,\n}\n\n/**\n * Create a link token for the Plaid Link frontend component, which allows the user to connect a bank account, for transactions.\n */\nexport const createBuyerTransactionsLinkToken = () => {\n return apiRequestClient().method('post').append('/buyer/plaid/items/create-link-token').build<{\n link_token: string;\n expiration: string;\n }>();\n};\n\n/**\n * Exchange a public token for an access token\n */\nexport const exchangeBuyerTransactionsPublicToken = (body: {\n publicToken: string;\n institutionId: string;\n}) => {\n return apiRequestClient()\n .method('post')\n .append('/buyer/plaid/items/exchange-public-token')\n .setData(body)\n .build<any>();\n};\n\ntype PlaidItemResponse = { accounts: PlaidAccount[] } & PlaidItem;\nexport const getBuyerTransactionsItems = async () => {\n return apiRequestClient().method('get').append('buyer/plaid/items').build<PlaidItemResponse[]>();\n};\n\n/**\n * Delete an income item, alogside all associated data(like income, transactions, savings, accounts, etc...)\n */\nexport const deleteBuyerPlaidItem = (itemId: string) => {\n console.log(\"Deleting Plaid Item with ID:\", itemId); // Debugging line\n return apiRequestClient()\n .method('delete')\n .append('/buyer/plaid/items/' + itemId)\n .build<{ id: string; userId: string }>();\n};\n\n\nexport type PastRangeOptions = 'pastWeek' | 'pastMonth' | 'pastYear';\n\n/**\n * Get buyer plaid transactions\n */\nexport const getBuyerPlaidTransactions = (query: { page?: number; pageSize?: number; pastRange?: PastRangeOptions }) => {\n return apiRequestClient()\n .method('get')\n .append(`/buyer/plaid/items/transactions?${stringify(query)}`)\n .build<{ total: number; items: PlaidTransaction[] }>();\n};\n\nexport class ExpenseByCategory {\n categoryId?: string;\n category?: string;\n amount: number;\n}\n\n\n/**\n * Get buyer plaid expenses\n */\nexport const getBuyerPlaidExpenses = (monthDate: string) => {\n return apiRequestClient()\n .method('get')\n .append(`/buyer/plaid/items/expenses?monthDate=${monthDate}`)\n .build<ExpenseByCategory[]>();\n};\n\n/**\n * Get buyer plaid cashflow\n */\nexport const getBuyerPlaidCashflow = (monthDate: string) => {\n return apiRequestClient()\n .method('get')\n .append(`/buyer/plaid/items/cash-flow?monthDate=${monthDate}`)\n .build<{\n income: number;\n expenses: number;\n net: number;\n vsLastMonthPercentage: number;\n vsLastMonth: string;\n }>();\n};\n\nexport type IncomeExpensesRangeItem = {\n income: number;\n expenses: number;\n monthDate: string;\n}\n\n\n\n/**\n * Get buyer plaid expenses & incomes for a requested range. Grouped by months.\n * manthDateStart & monthDateEnd range provided is considered inclusive\n */\nexport const getIncomeExpensesRange = (monthDateStart: string, monthDateEnd: string) => {\n return apiRequestClient()\n .method('get')\n .append(`/buyer/plaid/items/income-expenses-range?monthDateStart=${monthDateStart}&monthDateEnd=${monthDateEnd}`)\n .build<IncomeExpensesRangeItem[]>();\n};","import { apiRequestClient } from '../client';\nimport { BuyerSaving } from '../types';\n\n/**\n * List all buyer savings\n */\nexport const listBuyerSavings = () => {\n return apiRequestClient().method('get').append('/buyer/savings').build<{\n items: BuyerSaving[];\n total: number;\n }>();\n};\n\nexport type CreateBuyerSavingBody = Pick<BuyerSaving, 'amount' | 'category' | 'date'>;\n/**\n * Create a buyer savings\n */\nexport const createBuyerSaving = (body: CreateBuyerSavingBody) => {\n return apiRequestClient()\n .method('post')\n .append('/buyer/savings')\n .setData(body)\n .build<BuyerSaving>();\n};\n\nexport type UpdateBuyerSavingBody = Partial<CreateBuyerSavingBody>;\n/**\n * Create a buyer savings\n */\nexport const updateBuyerSaving = (id: string, body: UpdateBuyerSavingBody) => {\n return apiRequestClient()\n .method('patch')\n .append('/buyer/savings/' + id)\n .setData(body)\n .build<BuyerSaving>();\n};\n\n/**\n * Deletes a buyer saving\n */\nexport const deleteBuyerSaving = (id: string) => {\n return apiRequestClient()\n .method('delete')\n .append('/buyer/savings/' + id)\n .build<{ id: string }>();\n};\n","import { apiRequestClient } from '../client';\nimport { EBuyerRecommendationState } from '../types';\nimport { SuggestionStatus } from '../../../components/suggestions/suggestion-card';\n\nexport type UpdateBuyerPayload = { status: SuggestionStatus; id: string };\nexport type UpdateBuyerRecommendationStatePayload = { state: EBuyerRecommendationState; id: string };\n\n/**\n * Right now just returns the recommendations, without filters\n */\nexport const getBuyerRecommendations = (buyerId: string) => {\n return apiRequestClient()\n .method('get')\n .append('/buyer/recommendations?buyerId='+buyerId)\n .build<any>();\n};\n\n/**\n * Update the status of recommendations (this only happens for some recommendations)\n */\nexport const updateBuyerRecommendations = ({ status, id }: UpdateBuyerPayload) => {\n return apiRequestClient()\n .method('patch')\n .append('/buyer/recommendations/' + id)\n .setData({ status })\n .build();\n};\n\n/**\n * Update the status of recommendations (this only happens for some recommendations)\n */\nexport const updateBuyerRecommendationState = ({ state, id }: UpdateBuyerRecommendationStatePayload ) => {\n return apiRequestClient()\n .method('patch')\n .append('/buyer/recommendations/' + id)\n .setData({ state }) \n .build();\n};\n\n/**\n * Verifies a buyer recommendation\n * \n * @param buyerId The ID of the buyer\n * @param codedRecommendationId The ID of the coded recommendation\n * @returns The verified recommendation\n */\nexport const verifyBuyerRecommendation = (buyerId: string, codedRecommendationId: string) => {\n return apiRequestClient()\n .method('get')\n .append('/recommendations/verify')\n .params({ buyerId, codedRecommendationId })\n .build();\n};\n","import { apiRequestClient } from '../client';\nimport { BuyerProfile, GoogleBuyerProfile, EUserFeedbackReason, CoBorrowerProfile } from '../types';\n\n/**\n * Returns the current user profile information\n */\nexport const getProfile = () => {\n return apiRequestClient().method('get').append('auth/me').build<{\n profile: BuyerProfile;\n }>();\n};\n\n/**\n * Returns the current Google user profile information\n */\nexport const getGoogleProfile = () => {\n return apiRequestClient().method('get').append('auth/me').build<{\n profile: GoogleBuyerProfile;\n }>();\n};\n\n/**\n * Sends a referral link to the provided phone\n */\nexport const sendReferralLink = (phone: string) => {\n return apiRequestClient()\n .method('post')\n .append('send-referral-link')\n .setData({ phone })\n .build<{ ok: true }>();\n};\n\n/**\n * Sends a feedback to the support team\n */\nexport const sendFeedback = (reason: EUserFeedbackReason, feedback: string) => {\n return apiRequestClient()\n .method('post')\n .append('send-feedback')\n .setData({ reason, feedback })\n .build<{ ok: true }>();\n};\n\n/**\n * Gets the current user's position in the waiting list\n */\n/*export const getWaitlistPosition = () => {\n return apiRequestClient()\n .method('get')\n .append('/user/waitlist-position')\n .build<{ position: number }>();\n};*/\n\n// /**\n// * Update the current user profile information,\n// */\n// export const updateProfile = (\n// body: Partial<Pick<User, 'firstName' | 'lastName' | 'email' | 'phone'>>,\n// ) => {\n// return apiRequestClient().method('patch').append('auth/me').setData(body).build<User>();\n// };\n","import { apiRequestClient } from \"../client\";\nimport { ListItemRecord } from \"../types\";\n\n/**\n * Searches for skills and returns a list of matching skills\n */\nexport const searchSkills = (str?: string) => {\n return apiRequestClient()\n .method(\"get\")\n .append(\"resources/skills\" + (str && `?search=${str}`))\n .build<{ total: number; items: ListItemRecord[] }>();\n};\n\n/**\n * Searches for industries and returns a list of matching skills\n */\nexport const searchIndustries = (str?: string) => {\n return apiRequestClient()\n .method(\"get\")\n .append(\"resources/industries\" + (str && `?search=${str}`))\n .build<{ total: number; items: ListItemRecord[] }>();\n};\n","import { apiRequestClient } from '../client';\nexport const financialLiteracyAllCourses = (search?: string) => {\n const params = new URLSearchParams();\n if (search) params.set('search', search);\n return apiRequestClient()\n .method('get')\n .append(`financialliteracy/allCourses?${params.toString()}`)\n .build<{\n items: {\n courseId: number;\n courseName: string;\n logoURL: string;\n tags: string[];\n sections: { sectionId: number; isSectionCompleted: boolean }[];\n }[];\n }>();\n};\nexport const financialliteracyCourseAggr = (body: { courseId: number; sectionId: number }) => {\n return apiRequestClient()\n .method('put')\n .append('financialliteracy/courseAggregation')\n .setData(body)\n .build<{\n items: {\n courseId: number;\n courseName: string;\n logoURL: string;\n sections: {\n sectionId: number;\n isSectionCompleted: boolean;\n terms: {\n termId: number;\n termName: string;\n termDefinition: string;\n questions: {\n questionId: number;\n questionDescription: string;\n choices: {\n questionChoicePk: number;\n questionChoiceId: number;\n questionChoiceDescription: string;\n }[];\n }[];\n }[];\n }[];\n }[];\n }>();\n};\n\nexport const financialliteracyUserCourseUpdate = (body: {\n courseId: number;\n sectionId: number;\n questionsResponse: {\n questionId: number;\n questionChoicePk: number;\n }[];\n}) => {\n return apiRequestClient()\n .method('post')\n .append('financialliteracy/courseAggregation')\n .setData(body)\n .build<{\n items: string;\n }>();\n};\n\nexport const financialLiteracyMarkSectionComplete = (body: {\n courseId: number;\n sectionId: number;\n}) => {\n return apiRequestClient()\n .method('put')\n .append('financialliteracy/courseAggregation/mark-section-complete')\n .setData(body)\n .build<{\n items: string;\n }>();\n};\n","import { apiRequestClient } from '../client';\n\nexport type InviteCoBorrowerBody = {\n inviterId: string;\n email: string;\n firstName: string;\n lastName: string;\n};\n\nexport interface IInviteData {\n id: string;\n coBorrowersEmail: string;\n coBorrowersFirstName: string;\n coBorrowersLastName: string;\n inviter: {\n firstName: string;\n lastName: string;\n email: string;\n };\n}\n\nexport type InviteCoBorrowerResponse = {\n valid: boolean;\n invite: IInviteData;\n};\n\nexport type DisassociateCoBorrowerResponse = {\n status: 'dis-associated' | 'failure';\n};\n\n/**\n * invites co-borrower\n */\nexport const inviteCoBorrower = (body: InviteCoBorrowerBody) => {\n return apiRequestClient()\n .method('post')\n .append('co-borrower/invite')\n .setData(body)\n .build<InviteCoBorrowerResponse>();\n};\n/**\n * validates invite\n */\nexport const validateInvite = (id: any) => {\n return apiRequestClient()\n .method('get')\n .append(`co-borrower/validate/${id}`)\n .build<InviteCoBorrowerResponse>();\n};\n\n/**\n * accepts the invite\n */\nexport const acceptInvite = (body: { inviteId: string; decline?: boolean }) => {\n return apiRequestClient().method('post').append('co-borrower/accept').setData(body).build<{\n inviteId: string;\n status: 'linked' | 'redirect_to_sign_up' | 'declined';\n }>();\n};\n\n/**\n * disassociates the co-borrowers\n */\nexport const disassociateCoBorrower = () => {\n return apiRequestClient()\n .method('get')\n .append('co-borrower/dis-associate')\n .build<DisassociateCoBorrowerResponse>();\n};\n","import { apiRequestClient } from '../client';\nimport { ICreateMessage, IUserFilter } from '../types';\n\nexport interface IPartnerUserResponse {\n users: {\n id: string;\n bankConnection: boolean;\n creditConnection: boolean;\n bankName: string | null;\n totalScoreGrade: string | null;\n creditGrade: string | null;\n debtToIncomeGrade: string | null;\n downpaymentPercentageSavedGrade: string | null;\n grossIncomeGrade: string | null;\n initialTotalScoreGrade: string | null;\n initialCreditGrade: string | null;\n initialDebtToIncomeGrade: string | null;\n initialDownpaymentPercentageSavedGrade: string | null;\n initialGrossIncomeGrade: string | null;\n createdAt: string;\n partnerCode: string | null;\n firstName: string;\n lastName: string;\n }[];\n next: boolean;\n pages: number;\n total: number;\n}\n\nexport const listThreads = () => {\n return apiRequestClient()\n .method('get')\n .append('messages/user/threads')\n .build<IThreadsResponse[]>();\n};\n\nexport const listMessages = async (adminUserId: string) => {\n return apiRequestClient()\n .method('get')\n .append(`messages/user?adminUserId=${adminUserId}`)\n .build<IMessageResponse[]>();\n};\n\nexport const createMessage = async (data: ICreateMessage) => {\n return apiRequestClient().method('post').append(`messages/user`).setData(data).build();\n};\n\nexport interface IMessageResponse {\n id: string;\n adminId: string;\n isSenderAdmin: boolean;\n userId: string;\n messageText: string;\n createdAt: Date;\n}\n\nexport interface IThreadsResponse {\n adminId: string;\n createdAt: Date;\n messageText: string;\n adminUser: {\n firstName: string;\n lastName: string;\n };\n}\nexport interface UserWithMessage {\n id: string; // Unique identifier for the user\n firstName: string; // User's first name\n lastName: string; // User's last name\n email: string; // User's email address\n avatarUrl?: string; // Optional avatar URL for the user\n messages: any; // Array of messages associated with the user\n createdAt: string; // Date when the user was created\n updatedAt: string; // Date when the user was last updated\n lenght: number;\n userName: string;\n lastMessage: string;\n lastMessageTime: string;\n userId: string;\n subtitle: string;\n lenderCode: string;\n partnerCode: string;\n // Add any additional fields that are part of the API response\n}\n\n\n\nexport const getExclusiveUsersWithUserMessages = (userId: string, conversationType?: number) => {\n // Construct the query parameters\n const params = new URLSearchParams({\n userId: userId, // Pass the userId as a query parameter\n });\n\n if (conversationType !== undefined) {\n params.append('conversationType', conversationType.toString());\n }\n\n // Construct the API request\n const request = apiRequestClient()\n .method('get')\n .append(`messages/exclusive-user-with-message-users?${params.toString()}`);\n\n // Build and return the request\n return request.build<UserWithMessage[]>(); // Corrected interface name and type\n};\n\n\n\nexport const getAffiliatedUsersWithLimit = (\n page = 0,\n filters?: IUserFilter[],\n unassociated = false,\n limit = 50000, // Add a fourth parameter for limit\n) => {\n const skip = page * limit; // Adjust the skip calculation to use the dynamic limit\n const params = new URLSearchParams({\n limit: String(limit), // Use the dynamic limit here\n skip: String(skip),\n });\n\n if (unassociated) params.set('unassociated', 'true');\n\n if (filters && filters.length > 0) {\n params.append('filters', JSON.stringify(filters));\n }\n\n let request = apiRequestClient().method('get').append(`admin/users?${params.toString()}`);\n return request.build<IPartnerUserResponse>();\n};\n\nexport const togglePinMessage = (userId: string) => {\n return apiRequestClient().method('post').append(`messages/pin/client/${userId}`).build<{\n id: string;\n isPinned: boolean;\n pinnedAt: Date | null;\n message: string;\n // ... other message fields\n }>();\n};\n\n\nexport const toggleArchiveMessage = (userId: string) => {\n return apiRequestClient().method('post').append(`messages/archive/client/${userId}`).build<{\n id: string;\n isArchivedByClient: any;\n archivedAt: Date | null;\n message: string;\n // ... other message fields\n }>();\n};\n\nexport const toggleStarMessage = (userId: string) => {\n return apiRequestClient().method('post').append(`messages/star/client/${userId}`).build<{\n id: string;\n isStarredByClient: any;\n starredAt: Date | null;\n message: string;\n // ... other message fields\n }>();\n};","import { apiRequestClient } from '../client';\nimport { TrackingData } from '../../tracking';\n\n// Define interface for API tracking data\nexport interface ApiTrackingData {\n eventType: string;\n source?: string;\n authType?: string;\n abTestVariant?: string;\n ipAddress?: string;\n userId?: string;\n creditScoreBucket?: string;\n additionalData?: string; // API expects additionalData as string\n visitorId?: string | string[];\n campaignSource?: string;\n campaignMonth?: string;\n campaignFrequency?: string;\n}\n\n/**\n * Track an event in the data warehouse\n */\nexport const trackEvent = (data: ApiTrackingData) => {\n return apiRequestClient()\n .method('post')\n .append('tracking/event')\n .setData(data)\n .build<{ success: boolean }>();\n};\n\n/**\n * Get IP filtering configuration\n */\nexport const getIpFilterConfig = () => {\n return apiRequestClient()\n .method('get')\n .append('tracking/ip-filter-config')\n .build<{\n internalIps: string[];\n excludedIps: string[];\n filterEnabled: boolean;\n }>();\n};\n","export * from './auth';\nexport * from './buyer';\nexport * from './buyer-credit-report';\nexport * from './buyer-debts';\nexport * from './buyer-incomes';\nexport * from './buyer-plaid-incomes';\nexport * from './buyer-plaid-items';\nexport * from './buyer-savings';\nexport * from './buyer-recommendations';\nexport * from './profile';\nexport * from './resources';\nexport * from './financial-literacy';\nexport * from './co-borrower';\nexport * from './messages';\nexport * from './tracking';\n","import { apiRequestClient } from '../client';\nimport { IRewards } from '../types';\n\nexport const getRewardStats = () => {\n return apiRequestClient()\n .method('get')\n .append('/rewards/stats')\n .build<{ totalRewardPoints: number; totalRewardsAwarded: number }>();\n};\nexport const getNotPoppedRewards = () => {\n return apiRequestClient().method('get').append('/rewards/popped').build<{\n items: Array<{\n id: number;\n points: number;\n hasPoppedUp: boolean;\n reward: {\n id: string;\n name: string;\n description: string;\n imageUrl: string;\n };\n }>;\n }>();\n};\nexport const markPoppedRewards = ({\n data,\n}: {\n data: {\n rewardsIds: number[];\n };\n}) => {\n return apiRequestClient().method('post').append('/rewards/popped').setData(data).build<{\n items: Array<{\n id: number;\n points: number;\n hasPoppedUp: boolean;\n reward: {\n id: string;\n name: string;\n description: string;\n imageUrl: string;\n };\n }>;\n }>();\n};\nexport const getRewards = ({ skip, limit }: { skip?: number; limit?: number }) => {\n const urlParams = new URLSearchParams();\n urlParams.set('skip', `${skip}`);\n urlParams.set('limit', `${limit}`);\n return apiRequestClient()\n .method('get')\n .append(`/rewards/rewards?${urlParams.toString()}`)\n .build<{ count: number; hasNext: boolean; items: Array<IRewards> }>();\n};\nexport const getGifts = () => {\n return apiRequestClient().method('get').append('/rewards/gifts').build<Array<IRewards>>();\n};\n","// Utils\nexport type ListRequestResponse<T> = {\n items: T[];\n total: number;\n};\n\nexport type ListItemRecord = {\n value: string;\n label: string;\n};\n\n// Models\n\nexport enum ChildrenUnder18CountOptions {\n zeroTwo = '0-2',\n threeFive = '3-5',\n sixTen = '6-10',\n moreThanTen = 'more_than_10',\n}\n\nexport type User = {\n id: string;\n firstName: string;\n lastName: string;\n userType: EUserType;\n email: string;\n password: string;\n isEmailVerified: boolean;\n agreedToTerms: boolean;\n phone: string | null;\n isPhoneVerified: boolean;\n isOnboarded: boolean;\n buyerId: string | null;\n createdAt: string;\n updatedAt: string;\n acceptPhoneConsent: boolean;\n declinePhoneConsent: boolean;\n userJourney?: UserJourney;\n partnerName?: string;\n lenderName?: string;\n};\n\nexport type GoogleBuyer = {\n id: string;\n accessCode: string | null;\n userId: string;\n createdAt: string;\n updatedAt: string;\n avatar: string;\n\n approvalStatus: 'approved';\n housePriceGoal: number;\n expectedPurchaseMonthsPeriod: number;\n wishedLocations: WishedLocation[];\n\n isInitialDataFetched: boolean;\n isFetchingVerifiedData: boolean;\n lastVerificationRunAt: string | null;\n onboardingProfileStatus: EOnboardingStepStatus;\n onboardingTransactionAccountStatus: EOnboardingStepStatus;\n onboardingCreditReportStatus: EOnboardingStepStatus;\n onboardingIncomeAccountStatus: EOnboardingStepStatus;\n onboardingEmailVerificationStatus: EOnboardingStepStatus;\n onboardingAssessmentStatus: EOnboardingStepStatus;\n\n dateOfBirth: string | null;\n gender: EGender | null;\n race: string | null;\n hispanicOrigin: boolean | null;\n children: boolean | null;\n childrenUnder18Count: ChildrenUnder18CountOptions | null;\n ssn: string | null;\n street: string | null;\n city: string | null;\n state: string | null;\n apartment: string | null;\n zipCode: string | null;\n occupation: string | null;\n militaryStatus: EMilitaryStatus | null;\n reasonForPurchase: EReasonForPurchase | null;\n\n // Is only set to true after all steps are completed\n isOnboarded: boolean;\n allowedEmails?: BuyerAllowedEmails[];\n allowedSms?: BuyerAllowedSms[];\n preferredContactMethod?: { email: boolean; sms: boolean };\n houseRent?: MonthlyRent;\n\n coBorrower?: boolean;\n coBorrowersFirstName?: string;\n coBorrowersLastName?: string;\n coBorrowersEmail?: string;\n\n coBorrowerInvited?: boolean;\n coBorrowerInvite?: ICoBorrowerInvite;\n isWelcomeFlashCardsShown?: boolean;\n isRewardsWelcomeShown?: boolean;\n\n onboardingPathTaken?: EOnboardingPathTaken;\n isBlocked: boolean;\n visitorId: string | null | string[];\n campaignSource?: string;\n campaignMonth?: string;\n campaignFrequency?: string;\n blockedAt: string | null;\n isLanded: string;\n};\n\n// Idea is to have this as an enum\ntype BuyerAllowedEmails = 'recommendations' | 'account_setup' | 'journey_notifications';\n\n// Idea is to have this as an enum\ntype BuyerAllowedSms = 'recommendations';\ntype MonthlyRent =\n | 'one_thousand'\n | 'thousand_and_one_to_two_thousand'\n | 'two_thousand_and_one_to_three_thousand'\n | 'three_thousand_and_one_to_four_thousand'\n | 'above_four_thousand'\n | 'na';\n\nexport type Buyer = {\n id: string;\n accessCode: string | null;\n userId: string;\n createdAt: string;\n updatedAt: string;\n avatar: string;\n approvalStatus: EApprovalStatus;\n housePriceGoal: number;\n expectedPurchaseMonthsPeriod: number;\n wishedLocations: WishedLocation[];\n\n isInitialDataFetched: boolean;\n isFetchingVerifiedData: boolean;\n lastVerificationRunAt: string | null;\n onboardingProfileStatus: EOnboardingStepStatus;\n onboardingTransactionAccountStatus: EOnboardingStepStatus;\n onboardingCreditReportStatus: EOnboardingStepStatus;\n onboardingIncomeAccountStatus: EOnboardingStepStatus;\n onboardingEmailVerificationStatus: EOnboardingStepStatus;\n onboardingAssessmentStatus: EOnboardingStepStatus;\n\n dateOfBirth: string | null;\n gender: EGender | null;\n race: string | null;\n hispanicOrigin: boolean | null;\n children: boolean | null;\n childrenUnder18Count: ChildrenUnder18CountOptions | null;\n ssn: string | null;\n street: string | null;\n city: string | null;\n state: string | null;\n apartment: string | null;\n zipCode: string | null;\n occupation: string | null;\n militaryStatus: EMilitaryStatus | null;\n reasonForPurchase: EReasonForPurchase | null;\n acceptPhoneConsent: boolean;\n declinePhoneConsent: boolean;\n\n // Is only set to true after all steps are completed\n isOnboarded: boolean;\n allowedEmails?: BuyerAllowedEmails[];\n allowedSms?: BuyerAllowedSms[];\n preferredContactMethod?: { email: boolean; sms: boolean };\n houseRent?: MonthlyRent;\n\n coBorrower?: boolean;\n coBorrowersFirstName?: string;\n coBorrowersLastName?: string;\n coBorrowersEmail?: string;\n\n coBorrowerInvited?: boolean;\n coBorrowerInvite?: ICoBorrowerInvite;\n isWelcomeFlashCardsShown?: boolean;\n isRewardsWelcomeShown?: boolean;\n\n onboardingPathTaken?: EOnboardingPathTaken;\n isBlocked: boolean;\n visitorId: string | null | string[];\n campaignSource?: string;\n campaignMonth?: string;\n campaignFrequency?: string;\n blockedAt: string | null;\n isLanded: string;\n};\n\nexport type WishedLocation = {\n country: string;\n state: string;\n city?: string;\n};\n\ntype ProfileUserFields = Pick<\n User,\n | 'firstName'\n | 'lastName'\n | 'email'\n | 'phone'\n | 'userType'\n | 'userJourney'\n | 'lenderName'\n | 'partnerName'\n>;\n\ntype GoogleBuyerProfileFields = Pick<\n GoogleBuyer,\n | 'id'\n | 'userId'\n | 'approvalStatus'\n | 'isOnboarded'\n | 'onboardingProfileStatus'\n | 'onboardingTransactionAccountStatus'\n | 'onboardingCreditReportStatus'\n | 'onboardingIncomeAccountStatus'\n | 'onboardingEmailVerificationStatus'\n | 'onboardingAssessmentStatus'\n | 'isInitialDataFetched'\n | 'isFetchingVerifiedData'\n | 'lastVerificationRunAt'\n | 'housePriceGoal'\n | 'expectedPurchaseMonthsPeriod'\n | 'wishedLocations'\n | 'dateOfBirth'\n | 'gender'\n | 'race'\n | 'hispanicOrigin'\n | 'children'\n | 'childrenUnder18Count'\n | 'street'\n | 'apartment'\n | 'city'\n | 'state'\n | 'zipCode'\n | 'occupation'\n | 'militaryStatus'\n | 'reasonForPurchase'\n | 'createdAt'\n | 'updatedAt'\n | 'accessCode'\n | 'allowedEmails'\n | 'allowedSms'\n | 'avatar'\n | 'coBorrower'\n | 'coBorrowersFirstName'\n | 'coBorrowersLastName'\n | 'coBorrowersEmail'\n | 'coBorrowerInvited'\n | 'coBorrowerInvite'\n | 'isWelcomeFlashCardsShown'\n | 'isRewardsWelcomeShown'\n | 'houseRent'\n | 'preferredContactMethod'\n | 'onboardingPathTaken'\n | 'isBlocked'\n | 'blockedAt'\n | 'visitorId'\n | 'campaignSource'\n | 'campaignMonth'\n | 'campaignFrequency'\n | 'isLanded'\n>;\n\ntype BuyerProfileFields = Pick<\n Buyer,\n | 'id'\n | 'userId'\n | 'approvalStatus'\n | 'isOnboarded'\n | 'onboardingProfileStatus'\n | 'onboardingTransactionAccountStatus'\n | 'onboardingCreditReportStatus'\n | 'onboardingIncomeAccountStatus'\n | 'onboardingEmailVerificationStatus'\n | 'onboardingAssessmentStatus'\n | 'isInitialDataFetched'\n | 'isFetchingVerifiedData'\n | 'lastVerificationRunAt'\n | 'housePriceGoal'\n | 'expectedPurchaseMonthsPeriod'\n | 'wishedLocations'\n | 'dateOfBirth'\n | 'gender'\n | 'race'\n | 'hispanicOrigin'\n | 'children'\n | 'childrenUnder18Count'\n | 'street'\n | 'city'\n | 'state'\n | 'apartment'\n | 'zipCode'\n | 'occupation'\n | 'militaryStatus'\n | 'reasonForPurchase'\n | 'createdAt'\n | 'updatedAt'\n | 'accessCode'\n | 'allowedEmails'\n | 'allowedSms'\n | 'avatar'\n | 'coBorrower'\n | 'coBorrowersFirstName'\n | 'coBorrowersLastName'\n | 'coBorrowersEmail'\n | 'coBorrowerInvited'\n | 'coBorrowerInvite'\n | 'isWelcomeFlashCardsShown'\n | 'isRewardsWelcomeShown'\n | 'houseRent'\n | 'preferredContactMethod'\n | 'onboardingPathTaken'\n | 'isBlocked'\n | 'blockedAt'\n | 'visitorId'\n | 'campaignSource'\n | 'campaignMonth'\n | 'campaignFrequency'\n | 'isLanded'\n>;\n\nexport type GoogleBuyerProfile = ProfileUserFields & GoogleBuyerProfileFields;\n\nexport type BuyerProfile = ProfileUserFields & BuyerProfileFields;\n\nexport type CoBorrowerProfile = {\n email: string;\n firstName: string;\n lastName: string;\n};\n\nexport type BuyerOnboardingStatus = {\n onboardingProfileStatus: EOnboardingStepStatus;\n onboardingTransactionAccountStatus: EOnboardingStepStatus;\n onboardingCreditReportStatus: EOnboardingStepStatus;\n onboardingIncomeAccountStatus: EOnboardingStepStatus;\n onboardingEmailVerificationStatus: EOnboardingStepStatus;\n};\n\nexport enum EUserType {\n buyer = 'buyer',\n partner = 'partner',\n}\n\nexport enum EAuthenticationType {\n signin = 'signin',\n signup = 'signup',\n}\n\nexport interface Authentication {\n id: string;\n type: 'email' | 'phone';\n phone: string | null;\n email: string | null;\n password: string | null;\n code: string;\n isVerified: boolean;\n referredByUserId: string | null;\n partialSignupForm: AuthenticationPartialSignupForm;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface AuthenticationPartialSignupForm {\n values: PartialSignUpFormValues;\n}\n\ntype UserFields = Pick<User, 'firstName' | 'lastName' | 'email'>;\ntype PartialSignUpFormValues = Partial<\n UserFields & Omit<Buyer, 'authenticationId' | 'id' | 'createdAt' | 'updatedAt'>\n>;\n\nexport type AccountType = {\n account_id: string;\n balances: {\n available: number;\n current: number;\n limit: number;\n iso_currency_code: string;\n unofficial_currency_code: string;\n };\n mask: string;\n name: string;\n official_name: string;\n subtype: string;\n type: string;\n logo?: string;\n};\n\nexport type UserJourney = 'designer' | 'builder';\n\nexport interface NextGrade {\n grade: string;\n pointRangeMin: number;\n pointRangeMax: number;\n status: string;\n}\n\nexport interface TotalScore {\n value: number;\n grade: string;\n pointRangeMin: number;\n pointRangeMax: number;\n status: string;\n nextGrade: NextGrade;\n pointRangeMinTotal: number;\n pointRangeMaxTotal: number;\n}\n\nexport enum EOnboardingStepStatus {\n skipped = 'skipped',\n pending = 'pending',\n completed = 'completed',\n}\n\nexport enum EOnboardingPathTaken {\n null = 'null',\n quick_setup = 'quick_setup',\n complete_setup = 'complete_setup',\n skipped_to_dashboard = 'skipped_to_dashboard',\n}\n\nexport enum EApprovalStatus {\n pending = 'pending',\n approved = 'approved',\n rejected = 'rejected',\n}\n\nexport enum EGender {\n male = 'male',\n female = 'female',\n transgender = 'transgender',\n non_binary = 'non_binary',\n prefer_not_to_say = 'prefer_not_to_say',\n}\n\nexport enum EEthnicity {\n hispanic_origin,\n}\n\nexport enum EMilitaryStatus {\n active = 'active',\n veteran = 'veteran',\n notApplicable = 'notApplicable',\n}\n\nexport enum EReasonForPurchase {\n build_wealth = 'build_wealth',\n better_schools = 'better_schools',\n safer_neighborhood = 'safer_neighborhood',\n stop_paying_rent = 'stop_paying_rent',\n tax_benefits = 'tax_benefits',\n place_to_raise_family = 'place_to_raise_family',\n other = 'other',\n}\n\nexport enum EMonthlyRent {\n one_to_one_thousand = 'one_to_one_thousand',\n one_thousand_and_one_to_two_thousand = 'one_thousand_and_one_to_two_thousand',\n two_thousand_and_one_to_three_thousand = 'two_thousand_and_one_to_three_thousand',\n three_thousand_and_one_to_four_thousand = 'three_thousand_and_one_to_four_thousand',\n above_four_thousand = 'above_four_thousand',\n na = 'na',\n}\n\nexport interface ScoreResult {\n value: number;\n grade: string;\n pointRangeMin: number;\n pointRangeMax: number;\n status: string;\n nextGrade: NextGrade;\n updatedAt: string;\n}\n\nexport interface Grades {\n totalScore: TotalScore;\n creditScore: ScoreResult;\n debtToIncome: ScoreResult;\n downpaymentPercentageSaved: ScoreResult;\n grossIncome: ScoreResult;\n}\n\nexport interface ConfigItem {\n min: number;\n max: number;\n points: number;\n grade: string;\n status: string;\n}\n\nexport interface Config {\n creditScore: ConfigItem[];\n debtToIncome: ConfigItem[];\n downpaymentPercentageSaved: ConfigItem[];\n grossIncome: ConfigItem[];\n totalScore: ConfigItem[];\n}\n\nexport interface CalculateScoreResponse {\n id: string;\n grades: Grades;\n config: Config;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface BlockBuyerResponse {\n success: boolean;\n message: string;\n isBlocked: boolean;\n hoursLeft?: number;\n}\n\nexport interface ManualData<Category = string, Frequency = string> {\n category: Category;\n frequency?: Frequency;\n isVerified: boolean;\n amount: number;\n id: string;\n}\n\nexport type BuyerIncome = {\n id: string;\n grossPayAmount: number;\n netPayAmount: number;\n currencyCode: string;\n category: EBuyerIncomeCategory;\n frequency: EBuyerIncomeFrequency;\n startDate: string; // ISO 8601\n endDate: string; // ISO 8601\n isRecurring: boolean;\n paymentDate: string;\n employerName?: string;\n employerAddressStreet?: string;\n employerAddressCity?: string;\n employerAddressRegion?: string;\n employerAdressCountry?: string;\n isVerified: boolean;\n verifiedPlaidIncomeDocumentId?: string;\n verifiedPlaidItemId?: string;\n buyerId: string;\n createdAt: string; // ISO 8601\n updatedAt: string; // ISO 8601\n verifiedPlaidAccount: VerifiedPlaidAccount;\n};\n\nexport type BuyerDebt = {\n id: string;\n name: string | null;\n amount: number;\n currencyCode: string;\n category: EBuyerDebtCategory;\n paymentChannel: EPlaidTransactionPaymentChannel;\n startDate: string; // ISO 8601\n endDate: string; // ISO 8601\n isRecurring: boolean;\n isVerified: boolean;\n buyerId: string;\n createdAt: string; // ISO 8601\n updatedAt: string; // ISO 8601\n verifiedPlaidAccount: VerifiedPlaidAccount;\n};\n\nexport interface PlaidItem {\n itemId: string;\n institutionName: string;\n institutionId: string;\n institutionLogo?: any;\n createdAt: Date;\n updatedAt: Date;\n}\n\nexport interface VerifiedPlaidAccount {\n accountId: string;\n accountBalanceAvailable?: any;\n accountBalanceCurrent: number;\n accountBalanceLimit?: any;\n accountBalanceIsoCode: string;\n accountBalanceLastUpdated?: any;\n name: string;\n mask: string;\n type: string;\n subType: string;\n plaidItemId: string;\n userId: string;\n createdAt: Date;\n updatedAt: Date;\n plaidItem: PlaidItem;\n}\n\nexport type BuyerSaving = {\n id: string;\n name?: string;\n amount: number;\n currencyCode: string;\n category: EBuyerSavingsCategory;\n date: string; // ISO 8601\n isRecurring: boolean;\n isVerified: boolean;\n createdAt: string; // ISO 8601\n updatedAt: string; // ISO 8601\n verifiedPlaidAccountId: string;\n verifiedPlaidItemId: string;\n buyerId: string;\n verifiedPlaidAccount: VerifiedPlaidAccount;\n};\n\nexport enum EBuyerIncomeCategory {\n SALARY = 'SALARY',\n UNEMPLOYMENT = 'UNEMPLOYMENT',\n CASH = 'CASH',\n GIG_ECONOMY = 'GIG_ECONOMY',\n RENTAL = 'RENTAL',\n CHILD_SUPPORT = 'CHILD_SUPPORT',\n MILITARY = 'MILITARY',\n RETIREMENT = 'RETIREMENT',\n LONG_TERM_DISABILITY = 'LONG_TERM_DISABILITY',\n BANK_INTEREST = 'BANK_INTEREST',\n CASH_DEPOSIT = 'CASH_DEPOSIT',\n TRANSFER_FROM_APPLICATION = 'TRANSFER_FROM_APPLICATION',\n TAX_REFUND = 'TAX_REFUND',\n OTHER = 'OTHER',\n}\n\nexport enum EBuyerSavingsCategory {\n DEPOSITORY_SAVINGS = 'DEPOSITORY_SAVINGS',\n DEPOSITORY_CD = 'DEPOSITORY_CD',\n DEPOSITORY_MONEY_MARKET = 'DEPOSITORY_MONEY_MARKET',\n INVESTMENT_IRA = 'INVESTMENT_IRA',\n INVESTMENT_401K = 'INVESTMENT_401K',\n CASH = 'CASH',\n OTHER = 'OTHER',\n}\n\nexport enum EBuyerIncomeFrequency {\n WEEKLY = 'WEEKLY',\n BIWEEKLY = 'BIWEEKLY',\n SEMI_MONTHLY = 'SEMI_MONTHLY',\n MONTHLY = 'MONTHLY',\n}\n\nexport enum EBuyerDebtCategory {\n RENT = 'RENT',\n MORTGAGE = 'MORTGAGE',\n HOME_EQUITY = 'HOME_EQUITY',\n LINE_OF_CREDIT = 'LINE_OF_CREDIT',\n CREDIT_CARD = 'CREDIT_CARD',\n AUTO_LOAN = 'AUTO_LOAN',\n STUDENT_LOAN = 'STUDENT_LOAN',\n CHILD_SUPPORT = 'CHILD_SUPPORT',\n ALIMONY = 'ALIMONY',\n}\n\nexport enum EPlaidTransactionPaymentChannel {\n online = 'online',\n in_store = 'in_store',\n other = 'other',\n}\n\nexport enum EUserFeedbackReason {\n bug = 'bug',\n suggestion = 'suggestion',\n question = 'question',\n comment = 'comment',\n}\n\nexport enum ERecommendationGap {\n credit_score = 'credit_score',\n dti = 'dti',\n down_payment = 'down_payment',\n}\nexport interface BuyerRecommendation {\n id: string;\n status: EBuyerRecommendationStatus;\n category: EBuyerRecommendationCategory;\n type: EBuyerRecommendationType;\n title: string;\n description: string;\n // If we have a link to a somewhere else, we can put it here\n linkUrl?: string;\n linkLabel?: string;\n // For now, we only have a ruleId, but later, we'll be doing a relation to a rule\n ruleId: string;\n // Data returned by the rule, when the recommendation was created\n // - Can be used to generate the title, or description, or both\n // - Can be used to generate the link\n metadata: any;\n createdAt: Date;\n updatedAt: Date;\n gap: ERecommendationGap;\n subGap: string;\n benefit: string;\n}\n\nexport enum EBuyerRecommendationCategory {\n accounts = 'accounts',\n debt_to_income = 'debt_to_income',\n credit = 'credit',\n income = 'income',\n savings = 'savings',\n other = 'other',\n}\n\nexport enum EBuyerRecommendationType {\n action = 'action',\n alert = 'alert',\n}\n\nexport enum EBuyerRecommendationStatus {\n active = 'active',\n in_progress = 'in_progress',\n completed = 'completed',\n deferred = 'deferred',\n dismissed = 'dismissed',\n pinned = 'pinned',\n history = 'history',\n not_active = 'not_active',\n}\n\nexport enum EBuyerRecommendationState {\n idle = 'idle',\n accepted = 'accepted',\n deferred = 'deferred',\n under_review = 'under_review',\n done = 'done',\n completed_verified = 'completed_verified',\n completed_unverified = 'completed_unverified',\n}\n\nexport interface ICoBorrowerInvite {\n id: string;\n inviterId: string;\n coBorrowersFirstName: string;\n coBorrowersLastName: string;\n coBorrowersEmail: string;\n accepted: boolean;\n declined: boolean;\n createdAt: string;\n updatedAt: string;\n}\n\nexport interface IRewards {\n id: string;\n description: string;\n actionSlug: string;\n imageUrl: string;\n pointsRewarded: number;\n name: string;\n completedReward: boolean;\n}\n\nexport interface ICreateMessage {\n adminId: string;\n messageText: string;\n}\n\nexport interface IFilter {\n id: string;\n logic: string;\n column: string;\n columnLabel?: string;\n operator: string;\n operatorLabel?: string;\n value: string | string[];\n isActive?: boolean;\n}\n\nexport interface IUserFilter {\n id: string;\n filterName: string;\n isActive: boolean;\n filterLogic: IFilter[];\n}\n","export * as ApiService from './controllers';\nexport * from './types';\n","import { ApiService } from '@services/Api';\nimport { ApiTrackingData } from '@services/Api/controllers/tracking';\n\n// Define event types for type safety\nexport enum TrackingEventType {\n PAGE_VISIT = 'page_visit',\n SIGNUP_BUTTON_CLICK = 'signup_button_click',\n SIGNUP_COMPLETED = 'signup_completed',\n FORM_STEP_COMPLETED = 'form_step_completed',\n CREDIT_SCORE_CALCULATED = 'credit_score_calculated',\n CREDIT_SCORE_IMPROVED = 'credit_score_improved',\n}\n\n// Define source types\nexport enum TrackingSourceType {\n LANDING_PAGE_1 = 'landing-1',\n LANDING_PAGE_2 = 'landing-2',\n MORTGAGE_CALCULATOR = 'mortgage-calculator',\n DASHBOARD = 'summary',\n UNKNOWN = 'Direct',\n EMAIL = 'Email Campaign',\n MAILER = 'Mailer Campaign',\n HOME_NURTURE = 'Home Nurture'\n}\n\n// Define authentication types\nexport enum TrackingAuthType {\n EMAIL_PASSWORD = 'email_password',\n GOOGLE = 'google',\n APPLE = 'apple',\n}\n\n// Define interface for tracking data\nexport interface TrackingData {\n eventType: TrackingEventType;\n source?: TrackingSourceType | string;\n authType?: TrackingAuthType;\n abTestVariant?: string;\n ipAddress?: string;\n userId?: string;\n creditScoreBucket?: string;\n additionalData?: Record<string, any>;\n visitorId?: string | string[];\n campaignSource?: string;\n campaignMonth?: string;\n campaignFrequency?: string;\n}\n\n// Google Analytics helper\nconst sendToGA = (eventName: string, params: Record<string, any>) => {\n if (typeof window !== 'undefined' && (window as any).gtag) {\n (window as any).gtag('event', eventName, params);\n }\n};\n\n// Track recent events to prevent duplicates\nconst recentEvents = new Map<string, number>();\nconst DEBOUNCE_TIME = 2000; // 2 seconds debounce time\n\n// Longer debounce time for credit score events to prevent duplicates\nconst CREDIT_SCORE_DEBOUNCE_TIME = 10000; // 10 seconds for credit score events\n\n// Global tracking cache with a longer window for page visits\nconst pageVisitCache = new Set<string>();\nconst PAGE_VISIT_DEBOUNCE_TIME = 30 * 1000; // 30 seconds for page visits\n\n// Create a unique key for an event\nconst createEventKey = (data: TrackingData): string => {\n // For page visit events, create a key that includes the path\n if (data.eventType === TrackingEventType.PAGE_VISIT && data.additionalData && typeof data.additionalData === 'object') {\n return `${data.eventType}_${data.source || ''}_${data.additionalData.path || ''}`;\n }\n \n // For credit score events, create a more specific key to prevent duplicates\n if (data.eventType === TrackingEventType.CREDIT_SCORE_CALCULATED && data.additionalData && typeof data.additionalData === 'object') {\n return `${data.eventType}_${data.additionalData.creditScore || ''}_${data.additionalData.userId || ''}`;\n }\n \n if (data.eventType === TrackingEventType.CREDIT_SCORE_IMPROVED && data.additionalData && typeof data.additionalData === 'object') {\n return `${data.eventType}_${data.additionalData.creditScore || ''}_${data.additionalData.previousCreditScore || ''}_${data.additionalData.userId || ''}`;\n }\n \n // For other events, create a key that ignores userId to prevent duplicate events when userId is added later\n return `${data.eventType}_${data.source || ''}_${data.ipAddress || ''}_${JSON.stringify(data.additionalData || {})}`;\n};\n\n// Check if an event is a duplicate\nconst isDuplicateEvent = (data: TrackingData): boolean => {\n const key = createEventKey(data);\n const now = Date.now();\n \n // Special handling for page visit events\n if (data.eventType === TrackingEventType.PAGE_VISIT) {\n // Check if we've seen this page visit event before\n if (pageVisitCache.has(key)) {\n console.log('Skipping duplicate page visit event:', data.eventType, data.additionalData?.path);\n return true;\n }\n \n // Add to page visit cache with a longer expiration\n pageVisitCache.add(key);\n \n // Set a timeout to remove the key after the debounce time\n setTimeout(() => {\n pageVisitCache.delete(key);\n }, PAGE_VISIT_DEBOUNCE_TIME);\n \n return false;\n }\n \n // Special handling for credit score events\n if (data.eventType === TrackingEventType.CREDIT_SCORE_CALCULATED || data.eventType === TrackingEventType.CREDIT_SCORE_IMPROVED) {\n const lastTime = recentEvents.get(key);\n \n if (lastTime && now - lastTime < CREDIT_SCORE_DEBOUNCE_TIME) {\n console.log('Skipping duplicate credit score event:', data.eventType);\n return true;\n }\n \n recentEvents.set(key, now);\n return false;\n }\n \n // Normal debounce for other events\n const lastTime = recentEvents.get(key);\n \n if (lastTime && now - lastTime < DEBOUNCE_TIME) {\n console.log('Skipping duplicate event:', data.eventType);\n return true;\n }\n \n recentEvents.set(key, now);\n return false;\n};\n\n// Queue for pending tracking events\nconst pendingEvents = new Map<string, NodeJS.Timeout>();\n\n// Tracking service\nexport const TrackingService = {\n // Track an event both in GA and send to backend\n trackEvent: async (data: TrackingData): Promise<void> => {\n try {\n // Skip duplicate events\n if (isDuplicateEvent(data)) {\n console.log('Skipping duplicate event:', data.eventType);\n return;\n }\n \n // Create a key for this event\n const eventKey = createEventKey(data);\n \n // Clear any existing pending event with the same key\n if (pendingEvents.has(eventKey)) {\n clearTimeout(pendingEvents.get(eventKey));\n pendingEvents.delete(eventKey);\n }\n \n // Delay sending the event to allow profile fetch to complete\n const timeoutId = setTimeout(async () => {\n try {\n // Get user profile if userId is not provided\n if (!data.userId) {\n try {\n const profileResponse = await ApiService.getProfile();\n if (profileResponse?.data?.profile?.userId) {\n data.userId = profileResponse.data.profile.userId;\n }\n if(profileResponse?.data.profile.visitorId) {\n data.visitorId = profileResponse.data.profile.visitorId;\n }\n if(profileResponse?.data.profile.campaignSource) {\n data.campaignSource = profileResponse.data.profile.campaignSource;\n }\n if(profileResponse?.data.profile.campaignMonth) {\n data.campaignMonth = profileResponse.data.profile.campaignMonth;\n }\n if(profileResponse?.data.profile.campaignFrequency) {\n data.campaignFrequency = profileResponse.data.profile.campaignFrequency;\n }\n if(profileResponse?.data.profile.isLanded) {\n data.source = profileResponse.data.profile.isLanded;\n }\n } catch (profileError) {\n console.log('User not logged in or profile fetch failed');\n }\n }\n \n // Send to Google Analytics\n sendToGA(data.eventType, {\n source: data.source,\n auth_type: data.authType,\n ab_test_variant: data.abTestVariant,\n user_id: data.userId,\n visitorId: data.visitorId,\n campaignSource: data.campaignSource,\n campaignMonth: data.campaignMonth,\n campaignFrequency: data.campaignFrequency,\n credit_score_bucket: data.creditScoreBucket,\n ...data.additionalData,\n });\n\n // Send to backend using ApiService\n const apiData: ApiTrackingData = {\n eventType: data.eventType,\n source: data.source,\n authType: data.authType,\n abTestVariant: data.abTestVariant,\n ipAddress: data.ipAddress,\n userId: data.userId,\n creditScoreBucket: data.creditScoreBucket,\n visitorId: data.visitorId,\n campaignSource: data.campaignSource,\n campaignMonth: data.campaignMonth,\n campaignFrequency: data.campaignFrequency,\n additionalData: data.additionalData ? JSON.stringify(data.additionalData) : undefined,\n };\n \n // Use ApiService instead of direct fetch\n await ApiService.trackEvent(apiData);\n \n // Remove from pending events\n pendingEvents.delete(eventKey);\n } catch (innerError) {\n console.error('Error in delayed tracking event:', innerError);\n pendingEvents.delete(eventKey);\n }\n }, 100); // Short delay to allow for profile fetch to complete if it's already in progress\n \n // Store the timeout ID\n pendingEvents.set(eventKey, timeoutId);\n } catch (error) {\n console.error('Error tracking event:', error);\n }\n },\n\n // Track page visit\n trackPageVisit: async (source: TrackingSourceType, visitorId?: string, campaignSource?: string, campaignMonth?: string, campaignFrequency?: string): Promise<void> => {\n return TrackingService.trackEvent({\n eventType: TrackingEventType.PAGE_VISIT,\n source,\n visitorId,\n campaignSource,\n campaignMonth,\n campaignFrequency,\n additionalData: {\n path: typeof window !== 'undefined' ? window.location.pathname + window.location.search : '',\n timestamp: new Date().toISOString(),\n },\n });\n },\n\n // Track signup button click\n trackSignupButtonClick: async (source: TrackingSourceType, visitorId?: string, campaignSource?: string, campaignMonth?: string, campaignFrequency?: string): Promise<void> => {\n return TrackingService.trackEvent({\n eventType: TrackingEventType.SIGNUP_BUTTON_CLICK,\n source,\n visitorId,\n campaignSource,\n campaignMonth,\n campaignFrequency,\n });\n },\n\n // Track completed signup\n trackSignupCompleted: async (\n source: TrackingSourceType,\n authType: TrackingAuthType,\n userId: string,\n visitorId?: string | string[],\n campaignSource?: string,\n campaignMonth?: string,\n campaignFrequency?: string,\n creditScoreBucket?: string\n ): Promise<void> => {\n return TrackingService.trackEvent({\n eventType: TrackingEventType.SIGNUP_COMPLETED,\n source,\n authType,\n userId,\n visitorId,\n campaignSource,\n campaignMonth,\n campaignFrequency,\n creditScoreBucket,\n });\n },\n\n // Track form step completion\n trackFormStepCompleted: async (\n source: TrackingSourceType,\n step: number,\n visitorId: string | string[],\n campaignSource?: string,\n campaignMonth?: string,\n campaignFrequency?: string\n ): Promise<void> => {\n return TrackingService.trackEvent({\n eventType: TrackingEventType.FORM_STEP_COMPLETED,\n source,\n visitorId,\n campaignSource,\n campaignMonth,\n campaignFrequency,\n additionalData: {\n step,\n },\n });\n },\n\n // Track credit score calculation\n trackCreditScoreCalculated: async (\n creditScore: number,\n previousCreditScore?: number,\n grade?: string,\n userId?: string,\n visitorId?: string | string[],\n campaignSource?: string,\n campaignMonth?: string,\n creditScoreBucket?: string,\n campaignFrequency?: string\n ): Promise<void> => {\n // Only track if there's a change in credit score\n if (previousCreditScore !== undefined && creditScore === previousCreditScore) {\n console.log('Skipping credit score tracking - no change in score');\n return;\n }\n \n return TrackingService.trackEvent({\n eventType: TrackingEventType.CREDIT_SCORE_CALCULATED,\n source: TrackingSourceType.DASHBOARD,\n visitorId,\n campaignSource,\n campaignMonth,\n userId,\n campaignFrequency,\n creditScoreBucket: `${previousCreditScore} ? ${creditScore} - ${previousCreditScore} : null`,\n additionalData: {\n creditScore,\n previousCreditScore,\n improvement: previousCreditScore ? creditScore - previousCreditScore : null,\n grade,\n userId,\n timestamp: Date.now(), // Add timestamp to make each event unique\n },\n });\n },\n\n // Track credit score improvement\n trackCreditScoreImproved: async (\n creditScore: number,\n previousCreditScore: number,\n grade?: string,\n visitorId?: string | string[],\n campaignSource?: string,\n campaignMonth?: string,\n campaignFrequency?: string,\n previousGrade?: string,\n creditScoreBucket?: string,\n userId?: string\n ): Promise<void> => {\n // Only track if there's an actual improvement\n if (creditScore <= previousCreditScore) {\n console.log('Skipping credit score improvement tracking - no improvement');\n return;\n }\n \n return TrackingService.trackEvent({\n eventType: TrackingEventType.CREDIT_SCORE_IMPROVED,\n source: TrackingSourceType.DASHBOARD,\n visitorId,\n campaignSource,\n userId,\n campaignMonth,\n campaignFrequency,\n creditScoreBucket: `${previousCreditScore} ? ${creditScore} - ${previousCreditScore} : null`,\n additionalData: {\n creditScore,\n previousCreditScore,\n improvement: creditScore - previousCreditScore,\n grade,\n previousGrade,\n userId,\n timestamp: Date.now(), // Add timestamp to make each event unique\n },\n });\n },\n};\n\nexport default TrackingService;\n","import { link } from 'fs';\n\nexport const defaultErrorMessage =\n 'We encountered an error on our side. Please try again in a few minutes.';\n\nexport const commonRoutes = {\n getStarted: '/user/sign-in',\n nyuAlumniFeature:\n 'https://www.stern.nyu.edu/portal-partners/alumni/alumni-news-profiles/news/castleigh-johnson-mba-08-shares-what-led-him-launch-my-home-pathway#.YQiMxVRPMCs.linkedin',\n housingWire:\n 'https://www.housingwire.com/podcast/the-importance-of-financial-education-for-minority-borrowers/',\n forbes:\n 'https://www.google.com/url?q=https://www.forbes.com/sites/annefield/2021/05/29/app-focuses-on-closing-the-racial-wealth-gap-by-boosting-home-ownership/&sa=D&source=editors&ust=1628604599727140&usg=AOvVaw3OHgRNTD-RgPy3qZh4mH-n',\n nextAdvisor:\n 'https://time.com/nextadvisor/mortgages/mortgage-news/june-7-mortgage-rates-remain-below-3-percent/',\n newYorkUniversity:\n 'https://www.stern.nyu.edu/portal-partners/alumni/alumni-news-profiles/news/castleigh-johnson-mba-08-shares-what-led-him-launch-my-home-pathway',\n refinery:\n 'https://www.refinery29.com/en-us/2021/09/10668382/pandemic-real-estate-boom-racism-problem',\n realSimple:\n 'https://www.realsimple.com/work-life/money/money-planning/save-for-a-house-on-any-salary',\n nationalmortgageprofessional:\n 'https://nationalmortgageprofessional.com/news/76604/home-pathway-launches-nationwide',\n next: 'https://nextmortgagenews.com/news/first-republic-to-implement-my-home-pathway-app/',\n transUnionCreditDispute: 'https://service.transunion.com/dss/login.page',\n experianCreditDispute: 'https://www.experian.com/disputes/main.html',\n equifaxCreditDispute: 'https://www.equifax.com/personal/credit-report-services/credit-dispute',\n\n buyer: {\n signup: '/user/sign-up',\n signin: '/user/sign-in',\n getStarted: '/user/sign-in',\n //waitlist: '/user/waitlist',\n welcome: '/user/welcome',\n reset: '/user/reset-password',\n\n onboarding: {\n quickSetup: '/user/onboarding/quick-setup',\n completeSetup: '/user/onboarding/complete-setup',\n generateCredit: '/user/onboarding/complete-setup/generate-credit',\n // linkBankAccount: '/user/onboarding/complete-setup/link-bank-account',\n currentAssessment: '/user/onboarding/complete-setup/current-assessment',\n verifyIncome: '/user/onboarding/complete-setup/verify-income',\n },\n\n auth: {\n settings: '/user/settings',\n summary: '/user/summary',\n finances: '/user/finances',\n feedback: '/user/settings/feedback',\n accounts: '/user/settings/accounts',\n account: '/user/settings/profile',\n income: '/user/settings/income',\n financialliteracy: '/user/financialLiteracy',\n rewards: '/user/rewards',\n\n additionalresources: '/user/additional-resources',\n goodwilltemplate: '/user/additional-resources/goodwill-template',\n giftingTemplate: '/user/additional-resources/gifting-template',\n\n thankyou: '/user/thank-you',\n\n onboarding: '/user/onboarding',\n\n messages: '/user/messages',\n },\n },\n coBorrower: {\n invite: '/co-borrower/invite',\n },\n partner: {\n signup: '/partner/sign-up',\n signin: '/partner/sign-in',\n settings: '/partner/settings',\n },\n} as const;\n\nexport const incomeCategories = [\n 'SALARY',\n 'UNEMPLOYMENT',\n 'CASH',\n 'GIG_ECONOMY',\n 'RENTAL',\n 'CHILD_SUPPORT',\n 'MILITARY',\n 'RETIREMENT',\n 'LONG_TERM_DISABILITY',\n 'BANK_INTEREST',\n 'CASH_DEPOSIT',\n 'TRANSFER_FROM_APPLICATION',\n 'TAX_REFUND',\n 'OTHER',\n];\n\nexport const debtCategories = [\n 'RENT',\n 'MORTGAGE',\n 'LOAN',\n 'CREDIT_CARD_DEBT',\n 'ALIMONY',\n 'CHILD_SUPPORT',\n];\n\nexport const payFrequencies = ['WEEKLY', 'BIWEEKLY', 'SEMI_MONTHLY', 'MONTHLY'];\n\nexport const localStorageDataRef = {\n acceptInvite: 'invite_id_on_sign_up',\n acceptInviteDate: 'invite_id_on_sign_up_created_at',\n};\n","import * as CryptoJS from 'crypto-js';\nexport const encryptText = (plainText?: string, encKey?: string) => {\n const cipherText = CryptoJS.AES.encrypt(plainText, encKey).toString();\n return cipherText;\n};\n\nexport const decryptText = (encText?: string, encKey?: string) => {\n const deCipherText = CryptoJS.AES.decrypt(encText, encKey);\n const originalText = deCipherText.toString(CryptoJS.enc.Utf8);\n return originalText;\n};\n","import withMetadataArgument from './withMetadataArgument.js'\r\nimport { getCountries as _getCountries } from '../../core/index.js'\r\n\r\nexport function getCountries() {\r\n\treturn withMetadataArgument(_getCountries, arguments)\r\n}","import { extractNumbers } from './numbers';\nimport { CountryCode, getCountries, getCountryCallingCode } from 'libphonenumber-js';\nimport en from 'react-phone-number-input/locale/en.json';\n\nexport const countryPhoneCodes = () => {\n const codes = getCountries().sort((a, b) => en[a].localeCompare(en[b]));\n const countryCodes = codes.filter((code) => code !== 'CA');\n const canadaValue = codes.find((code) => code === 'CA') ;\n if (canadaValue) {\n countryCodes.unshift(canadaValue as any);\n }\n\n return countryCodes;\n};\n\ninterface GetCompletePhoneParams {\n countryCode: CountryCode | any;\n phone: string;\n}\n\nexport const getCompletePhone = ({ countryCode, phone }: GetCompletePhoneParams) => {\n const dialCode = getCountryCallingCode(countryCode);\n return `+${dialCode}${extractNumbers(phone! as unknown as number)}`;\n};\n\nexport const validEmail =\n /^(([^<>()[\\]\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@(([^<>()[\\]\\.,;:\\s@\\\"]+\\.)+[^<>()[\\]\\.,;:\\s@\\\"]{2,})$/i;\n\nexport const validPassword = /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9]).{8,24}$/;\n\nexport const validName = /^(?!.*[!(0-9)@#$%^&*()_+{}\\[\\]:;<>,.?/~\\\\-]).{1,20}$/;\n\nexport const validUserName = /^[A-Za-z0-9]+$/i;\n\nexport const assertString = (input) => {\n const isString = typeof input === 'string' || input instanceof String;\n\n if (!isString) {\n let invalidType: string = typeof input;\n if (input === null) invalidType = 'null';\n else if (invalidType === 'object') invalidType = input.constructor.name;\n\n throw new TypeError(`Expected a string but received a ${invalidType}`);\n }\n};\n\n/* eslint-disable max-len */\nconst phones = {\n 'am-AM': /^(\\+?374|0)((10|[9|7][0-9])\\d{6}$|[2-4]\\d{7}$)/,\n 'ar-AE': /^((\\+?971)|0)?5[024568]\\d{7}$/,\n 'ar-BH': /^(\\+?973)?(3|6)\\d{7}$/,\n 'ar-DZ': /^(\\+?213|0)(5|6|7)\\d{8}$/,\n 'ar-LB': /^(\\+?961)?((3|81)\\d{6}|7\\d{7})$/,\n 'ar-EG': /^((\\+?20)|0)?1[0125]\\d{8}$/,\n 'ar-IQ': /^(\\+?964|0)?7[0-9]\\d{8}$/,\n 'ar-JO': /^(\\+?962|0)?7[789]\\d{7}$/,\n 'ar-KW': /^(\\+?965)[569]\\d{7}$/,\n 'ar-LY': /^((\\+?218)|0)?(9[1-6]\\d{7}|[1-8]\\d{7,9})$/,\n 'ar-MA': /^(?:(?:\\+|00)212|0)[5-7]\\d{8}$/,\n 'ar-OM': /^((\\+|00)968)?(9[1-9])\\d{6}$/,\n 'ar-PS': /^(\\+?970|0)5[6|9](\\d{7})$/,\n 'ar-SA': /^(!?(\\+?966)|0)?5\\d{8}$/,\n 'ar-SY': /^(!?(\\+?963)|0)?9\\d{8}$/,\n 'ar-TN': /^(\\+?216)?[2459]\\d{7}$/,\n 'az-AZ': /^(\\+994|0)(10|5[015]|7[07]|99)\\d{7}$/,\n 'bs-BA': /^((((\\+|00)3876)|06))((([0-3]|[5-6])\\d{6})|(4\\d{7}))$/,\n 'be-BY': /^(\\+?375)?(24|25|29|33|44)\\d{7}$/,\n 'bg-BG': /^(\\+?359|0)?8[789]\\d{7}$/,\n 'bn-BD': /^(\\+?880|0)1[13456789][0-9]{8}$/,\n 'ca-AD': /^(\\+376)?[346]\\d{5}$/,\n 'cs-CZ': /^(\\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n 'da-DK': /^(\\+?45)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'de-DE': /^((\\+49|0)1)(5[0-25-9]\\d|6([23]|0\\d?)|7([0-57-9]|6\\d))\\d{7,9}$/,\n 'de-AT': /^(\\+43|0)\\d{1,4}\\d{3,12}$/,\n 'de-CH': /^(\\+41|0)([1-9])\\d{1,9}$/,\n 'de-LU': /^(\\+352)?((6\\d1)\\d{6})$/,\n 'dv-MV': /^(\\+?960)?(7[2-9]|91|9[3-9])\\d{7}$/,\n 'el-GR': /^(\\+?30|0)?(69\\d{8})$/,\n 'el-CY': /^(\\+?357?)?(9(9|6)\\d{6})$/,\n 'en-AI': /^(\\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\\d{4}$/,\n 'en-AU': /^(\\+?61|0)4\\d{8}$/,\n 'en-AG': /^(?:\\+1|1)268(?:464|7(?:1[3-9]|[28]\\d|3[0246]|64|7[0-689]))\\d{4}$/,\n 'en-BM': /^(\\+?1)?441(((3|7)\\d{6}$)|(5[0-3][0-9]\\d{4}$)|(59\\d{5}))/,\n 'en-BS': /^(\\+?1[-\\s]?|0)?\\(?242\\)?[-\\s]?\\d{3}[-\\s]?\\d{4}$/,\n 'en-GB': /^(\\+?44|0)7\\d{9}$/,\n 'en-GG': /^(\\+?44|0)1481\\d{6}$/,\n 'en-GH': /^(\\+233|0)(20|50|24|54|27|57|26|56|23|28|55|59)\\d{7}$/,\n 'en-GY': /^(\\+592|0)6\\d{6}$/,\n 'en-HK': /^(\\+?852[-\\s]?)?[456789]\\d{3}[-\\s]?\\d{4}$/,\n 'en-MO': /^(\\+?853[-\\s]?)?[6]\\d{3}[-\\s]?\\d{4}$/,\n 'en-IE': /^(\\+?353|0)8[356789]\\d{7}$/,\n 'en-IN': /^(\\+?91|0)?[6789]\\d{9}$/,\n 'en-JM': /^(\\+?876)?\\d{7}$/,\n 'en-KE': /^(\\+?254|0)(7|1)\\d{8}$/,\n 'en-KI': /^((\\+686|686)?)?( )?((6|7)(2|3|8)[0-9]{6})$/,\n 'en-KN': /^(?:\\+1|1)869(?:46\\d|48[89]|55[6-8]|66\\d|76[02-7])\\d{4}$/,\n 'en-LS': /^(\\+?266)(22|28|57|58|59|27|52)\\d{6}$/,\n 'en-MT': /^(\\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,\n 'en-MU': /^(\\+?230|0)?\\d{8}$/,\n 'en-NA': /^(\\+?264|0)(6|8)\\d{7}$/,\n 'en-NG': /^(\\+?234|0)?[789]\\d{9}$/,\n 'en-NZ': /^(\\+?64|0)[28]\\d{7,9}$/,\n 'en-PG': /^(\\+?675|0)?(7\\d|8[18])\\d{6}$/,\n 'en-PK': /^((00|\\+)?92|0)3[0-6]\\d{8}$/,\n 'en-PH': /^(09|\\+639)\\d{9}$/,\n 'en-RW': /^(\\+?250|0)?[7]\\d{8}$/,\n 'en-SG': /^(\\+65)?[3689]\\d{7}$/,\n 'en-SL': /^(\\+?232|0)\\d{8}$/,\n 'en-TZ': /^(\\+?255|0)?[67]\\d{8}$/,\n 'en-UG': /^(\\+?256|0)?[7]\\d{8}$/,\n // 'en-US':\n // /^((\\+1|1)?( |-)?)?(\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,\n 'en-US': /^(\\([2-9][0-9]{2}\\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,\n 'en-ZA': /^(\\+?27|0)\\d{9}$/,\n 'en-ZM': /^(\\+?26)?09[567]\\d{7}$/,\n 'en-ZW': /^(\\+263)[0-9]{9}$/,\n 'en-BW': /^(\\+?267)?(7[1-8]{1})\\d{6}$/,\n 'es-AR': /^\\+?549(11|[2368]\\d)\\d{8}$/,\n 'es-BO': /^(\\+?591)?(6|7)\\d{7}$/,\n 'es-CO': /^(\\+?57)?3(0(0|1|2|4|5)|1\\d|2[0-4]|5(0|1))\\d{7}$/,\n 'es-CL': /^(\\+?56|0)[2-9]\\d{1}\\d{7}$/,\n 'es-CR': /^(\\+506)?[2-8]\\d{7}$/,\n 'es-CU': /^(\\+53|0053)?5\\d{7}/,\n 'es-DO': /^(\\+?1)?8[024]9\\d{7}$/,\n 'es-HN': /^(\\+?504)?[9|8]\\d{7}$/,\n 'es-EC': /^(\\+?593|0)([2-7]|9[2-9])\\d{7}$/,\n 'es-ES': /^(\\+?34)?[6|7]\\d{8}$/,\n 'es-PE': /^(\\+?51)?9\\d{8}$/,\n 'es-MX': /^(\\+?52)?(1|01)?\\d{10,11}$/,\n 'es-NI': /^(\\+?505)\\d{7,8}$/,\n 'es-PA': /^(\\+?507)\\d{7,8}$/,\n 'es-PY': /^(\\+?595|0)9[9876]\\d{7}$/,\n 'es-SV': /^(\\+?503)?[67]\\d{7}$/,\n 'es-UY': /^(\\+598|0)9[1-9][\\d]{6}$/,\n 'es-VE': /^(\\+?58)?(2|4)\\d{9}$/,\n 'et-EE': /^(\\+?372)?\\s?(5|8[1-4])\\s?([0-9]\\s?){6,7}$/,\n 'fa-IR': /^(\\+?98[\\-\\s]?|0)9[0-39]\\d[\\-\\s]?\\d{3}[\\-\\s]?\\d{4}$/,\n 'fi-FI': /^(\\+?358|0)\\s?(4[0-6]|50)\\s?(\\d\\s?){4,8}$/,\n 'fj-FJ': /^(\\+?679)?\\s?\\d{3}\\s?\\d{4}$/,\n 'fo-FO': /^(\\+?298)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'fr-BF': /^(\\+226|0)[67]\\d{7}$/,\n 'fr-BJ': /^(\\+229)\\d{8}$/,\n 'fr-CM': /^(\\+?237)6[0-9]{8}$/,\n 'fr-FR': /^(\\+?33|0)[67]\\d{8}$/,\n 'fr-GF': /^(\\+?594|0|00594)[67]\\d{8}$/,\n 'fr-GP': /^(\\+?590|0|00590)[67]\\d{8}$/,\n 'fr-MQ': /^(\\+?596|0|00596)[67]\\d{8}$/,\n 'fr-PF': /^(\\+?689)?8[789]\\d{6}$/,\n 'fr-RE': /^(\\+?262|0|00262)[67]\\d{8}$/,\n 'he-IL': /^(\\+972|0)([23489]|5[012345689]|77)[1-9]\\d{6}$/,\n 'hu-HU': /^(\\+?36|06)(20|30|31|50|70)\\d{7}$/,\n 'id-ID':\n /^(\\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\\s?|\\d]{5,11})$/,\n 'ir-IR': /^(\\+98|0)?9\\d{9}$/,\n 'it-IT': /^(\\+?39)?\\s?3\\d{2} ?\\d{6,7}$/,\n 'it-SM': /^((\\+378)|(0549)|(\\+390549)|(\\+3780549))?6\\d{5,9}$/,\n 'ja-JP': /^(\\+81[ \\-]?(\\(0\\))?|0)[6789]0[ \\-]?\\d{4}[ \\-]?\\d{4}$/,\n 'ka-GE': /^(\\+?995)?(79\\d{7}|5\\d{8})$/,\n 'kk-KZ': /^(\\+?7|8)?7\\d{9}$/,\n 'kl-GL': /^(\\+?299)?\\s?\\d{2}\\s?\\d{2}\\s?\\d{2}$/,\n 'ko-KR': /^((\\+?82)[ \\-]?)?0?1([0|1|6|7|8|9]{1})[ \\-]?\\d{3,4}[ \\-]?\\d{4}$/,\n 'ky-KG': /^(\\+?7\\s?\\+?7|0)\\s?\\d{2}\\s?\\d{3}\\s?\\d{4}$/,\n 'lt-LT': /^(\\+370|8)\\d{8}$/,\n 'lv-LV': /^(\\+?371)2\\d{7}$/,\n 'mg-MG': /^((\\+?261|0)(2|3)\\d)?\\d{7}$/,\n 'mn-MN': /^(\\+|00|011)?976(77|81|88|91|94|95|96|99)\\d{6}$/,\n 'my-MM': /^(\\+?959|09|9)(2[5-7]|3[1-2]|4[0-5]|6[6-9]|7[5-9]|9[6-9])[0-9]{7}$/,\n 'ms-MY': /^(\\+?6?01){1}(([0145]{1}(\\-|\\s)?\\d{7,8})|([236789]{1}(\\s|\\-)?\\d{7}))$/,\n 'mz-MZ': /^(\\+?258)?8[234567]\\d{7}$/,\n 'nb-NO': /^(\\+?47)?[49]\\d{7}$/,\n 'ne-NP': /^(\\+?977)?9[78]\\d{8}$/,\n 'nl-BE': /^(\\+?32|0)4\\d{8}$/,\n 'nl-NL': /^(((\\+|00)?31\\(0\\))|((\\+|00)?31)|0)6{1}\\d{8}$/,\n 'nl-AW': /^(\\+)?297(56|59|64|73|74|99)\\d{5}$/,\n 'nn-NO': /^(\\+?47)?[49]\\d{7}$/,\n 'pl-PL': /^(\\+?48)? ?[5-8]\\d ?\\d{3} ?\\d{2} ?\\d{2}$/,\n 'pt-BR':\n /^((\\+?55\\ ?[1-9]{2}\\ ?)|(\\+?55\\ ?\\([1-9]{2}\\)\\ ?)|(0[1-9]{2}\\ ?)|(\\([1-9]{2}\\)\\ ?)|([1-9]{2}\\ ?))((\\d{4}\\-?\\d{4})|(9[1-9]{1}\\d{3}\\-?\\d{4}))$/,\n 'pt-PT': /^(\\+?351)?9[1236]\\d{7}$/,\n 'pt-AO': /^(\\+244)\\d{9}$/,\n 'ro-RO': /^(\\+?4?0)\\s?7\\d{2}(\\/|\\s|\\.|\\-)?\\d{3}(\\s|\\.|\\-)?\\d{3}$/,\n 'ru-RU': /^(\\+?7|8)?9\\d{9}$/,\n 'si-LK': /^(?:0|94|\\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\\d{7}$/,\n 'sl-SI': /^(\\+386\\s?|0)(\\d{1}\\s?\\d{3}\\s?\\d{2}\\s?\\d{2}|\\d{2}\\s?\\d{3}\\s?\\d{3})$/,\n 'sk-SK': /^(\\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,\n 'sq-AL': /^(\\+355|0)6[789]\\d{6}$/,\n 'sr-RS': /^(\\+3816|06)[- \\d]{5,9}$/,\n 'sv-SE': /^(\\+?46|0)[\\s\\-]?7[\\s\\-]?[02369]([\\s\\-]?\\d){7}$/,\n 'tg-TJ': /^(\\+?992)?[5][5]\\d{7}$/,\n 'th-TH': /^(\\+66|66|0)\\d{9}$/,\n 'tr-TR': /^(\\+?90|0)?5\\d{9}$/,\n 'tk-TM': /^(\\+993|993|8)\\d{8}$/,\n 'uk-UA': /^(\\+?38|8)?0\\d{9}$/,\n 'uz-UZ': /^(\\+?998)?(6[125-79]|7[1-69]|88|9\\d)\\d{7}$/,\n 'vi-VN': /^((\\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,\n 'zh-CN': /^((\\+|00)86)?(1[3-9]|9[28])\\d{9}$/,\n 'zh-TW': /^(\\+?886\\-?|0)?9\\d{8}$/,\n 'dz-BT': /^(\\+?975|0)?(17|16|77|02)\\d{6}$/,\n 'ar-YE': /^(((\\+|00)9677|0?7)[0137]\\d{7}|((\\+|00)967|0)[1-7]\\d{6})$/,\n 'ar-EH': /^(\\+?212|0)[\\s\\-]?(5288|5289)[\\s\\-]?\\d{5}$/,\n 'fa-AF': /^(\\+93|0)?(2{1}[0-8]{1}|[3-5]{1}[0-4]{1})(\\d{7})$/,\n};\n/* eslint-enable max-len */\n\n// aliases\nphones['en-CA'] = phones['en-US'];\nphones['fr-CA'] = phones['en-CA'];\nphones['fr-BE'] = phones['nl-BE'];\nphones['zh-HK'] = phones['en-HK'];\nphones['zh-MO'] = phones['en-MO'];\nphones['ga-IE'] = phones['en-IE'];\nphones['fr-CH'] = phones['de-CH'];\nphones['it-CH'] = phones['fr-CH'];\n\nexport const isMobilePhone = (str, locale?, options?) => {\n assertString(str);\n if (options && options.strictMode && !str.startsWith('+')) {\n return false;\n }\n if (Array.isArray(locale)) {\n return locale.some((key) => {\n // https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes\n // istanbul ignore else\n if (phones.hasOwnProperty(key)) {\n const phone = phones[key];\n if (phone.test(str)) {\n return true;\n }\n }\n return false;\n });\n } else if (locale in phones) {\n return phones[locale].test(str);\n // alias falsey locale as 'any'\n } else if (!locale || locale === 'any') {\n for (const key in phones) {\n // istanbul ignore else\n if (phones.hasOwnProperty(key)) {\n const phone = phones[key];\n if (phone.test(str)) {\n return true;\n }\n }\n }\n return false;\n }\n throw new Error(`Invalid locale '${locale}'`);\n};\n","export const hexToRGB = (hex, alpha) => {\n var r = parseInt(hex.slice(1, 3), 16),\n g = parseInt(hex.slice(3, 5), 16),\n b = parseInt(hex.slice(5, 7), 16);\n\n if (alpha) {\n return 'rgba(' + r + ', ' + g + ', ' + b + ', ' + alpha + ')';\n } else {\n return 'rgb(' + r + ', ' + g + ', ' + b + ')';\n }\n};\n","export const isValidUrl = (url: string) => {\n try {\n new URL(url);\n return true;\n } catch (err) {\n return false;\n }\n};\n","import * as React from 'react';\nimport * as DeprecatedReactTestUtils from 'react-dom/test-utils';\nimport ReactDOM from 'react-dom';\nimport * as ReactDOMClient from 'react-dom/client';\nimport { fireEvent as fireEvent$1, getConfig as getConfig$1, configure as configure$1, prettyDOM, getQueriesForElement } from '@testing-library/dom';\nexport * from '@testing-library/dom';\n\nconst reactAct = typeof React.act === 'function' ? React.act : DeprecatedReactTestUtils.act;\nfunction getGlobalThis() {\n /* istanbul ignore else */\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n /* istanbul ignore next */\n if (typeof self !== 'undefined') {\n return self;\n }\n /* istanbul ignore next */\n if (typeof window !== 'undefined') {\n return window;\n }\n /* istanbul ignore next */\n if (typeof global !== 'undefined') {\n return global;\n }\n /* istanbul ignore next */\n throw new Error('unable to locate global object');\n}\nfunction setIsReactActEnvironment(isReactActEnvironment) {\n getGlobalThis().IS_REACT_ACT_ENVIRONMENT = isReactActEnvironment;\n}\nfunction getIsReactActEnvironment() {\n return getGlobalThis().IS_REACT_ACT_ENVIRONMENT;\n}\nfunction withGlobalActEnvironment(actImplementation) {\n return callback => {\n const previousActEnvironment = getIsReactActEnvironment();\n setIsReactActEnvironment(true);\n try {\n // The return value of `act` is always a thenable.\n let callbackNeedsToBeAwaited = false;\n const actResult = actImplementation(() => {\n const result = callback();\n if (result !== null && typeof result === 'object' && typeof result.then === 'function') {\n callbackNeedsToBeAwaited = true;\n }\n return result;\n });\n if (callbackNeedsToBeAwaited) {\n const thenable = actResult;\n return {\n then: (resolve, reject) => {\n thenable.then(returnValue => {\n setIsReactActEnvironment(previousActEnvironment);\n resolve(returnValue);\n }, error => {\n setIsReactActEnvironment(previousActEnvironment);\n reject(error);\n });\n }\n };\n } else {\n setIsReactActEnvironment(previousActEnvironment);\n return actResult;\n }\n } catch (error) {\n // Can't be a `finally {}` block since we don't know if we have to immediately restore IS_REACT_ACT_ENVIRONMENT\n // or if we have to await the callback first.\n setIsReactActEnvironment(previousActEnvironment);\n throw error;\n }\n };\n}\nconst act = withGlobalActEnvironment(reactAct);\n\n/* eslint no-console:0 */\n\n// react-testing-library's version of fireEvent will call\n// dom-testing-library's version of fireEvent. The reason\n// we make this distinction however is because we have\n// a few extra events that work a bit differently\nconst fireEvent = function () {\n return fireEvent$1(...arguments);\n};\nObject.keys(fireEvent$1).forEach(key => {\n fireEvent[key] = function () {\n return fireEvent$1[key](...arguments);\n };\n});\n\n// React event system tracks native mouseOver/mouseOut events for\n// running onMouseEnter/onMouseLeave handlers\n// @link https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/events/EnterLeaveEventPlugin.js#L24-L31\nconst mouseEnter = fireEvent.mouseEnter;\nconst mouseLeave = fireEvent.mouseLeave;\nfireEvent.mouseEnter = function () {\n mouseEnter(...arguments);\n return fireEvent.mouseOver(...arguments);\n};\nfireEvent.mouseLeave = function () {\n mouseLeave(...arguments);\n return fireEvent.mouseOut(...arguments);\n};\nconst pointerEnter = fireEvent.pointerEnter;\nconst pointerLeave = fireEvent.pointerLeave;\nfireEvent.pointerEnter = function () {\n pointerEnter(...arguments);\n return fireEvent.pointerOver(...arguments);\n};\nfireEvent.pointerLeave = function () {\n pointerLeave(...arguments);\n return fireEvent.pointerOut(...arguments);\n};\nconst select = fireEvent.select;\nfireEvent.select = (node, init) => {\n select(node, init);\n // React tracks this event only on focused inputs\n node.focus();\n\n // React creates this event when one of the following native events happens\n // - contextMenu\n // - mouseUp\n // - dragEnd\n // - keyUp\n // - keyDown\n // so we can use any here\n // @link https://github.com/facebook/react/blob/b87aabdfe1b7461e7331abb3601d9e6bb27544bc/packages/react-dom/src/events/SelectEventPlugin.js#L203-L224\n fireEvent.keyUp(node, init);\n};\n\n// React event system tracks native focusout/focusin events for\n// running blur/focus handlers\n// @link https://github.com/facebook/react/pull/19186\nconst blur = fireEvent.blur;\nconst focus = fireEvent.focus;\nfireEvent.blur = function () {\n fireEvent.focusOut(...arguments);\n return blur(...arguments);\n};\nfireEvent.focus = function () {\n fireEvent.focusIn(...arguments);\n return focus(...arguments);\n};\n\nlet configForRTL = {\n reactStrictMode: false\n};\nfunction getConfig() {\n return {\n ...getConfig$1(),\n ...configForRTL\n };\n}\nfunction configure(newConfig) {\n if (typeof newConfig === 'function') {\n // Pass the existing config out to the provided function\n // and accept a delta in return\n newConfig = newConfig(getConfig());\n }\n const {\n reactStrictMode,\n ...configForDTL\n } = newConfig;\n configure$1(configForDTL);\n configForRTL = {\n ...configForRTL,\n reactStrictMode\n };\n}\n\nfunction jestFakeTimersAreEnabled() {\n /* istanbul ignore else */\n if (typeof jest !== 'undefined' && jest !== null) {\n return (\n // legacy timers\n setTimeout._isMockFunction === true ||\n // modern timers\n // eslint-disable-next-line prefer-object-has-own -- No Object.hasOwn in all target environments we support.\n Object.prototype.hasOwnProperty.call(setTimeout, 'clock')\n );\n } // istanbul ignore next\n\n return false;\n}\nconfigure$1({\n unstable_advanceTimersWrapper: cb => {\n return act(cb);\n },\n // We just want to run `waitFor` without IS_REACT_ACT_ENVIRONMENT\n // But that's not necessarily how `asyncWrapper` is used since it's a public method.\n // Let's just hope nobody else is using it.\n asyncWrapper: async cb => {\n const previousActEnvironment = getIsReactActEnvironment();\n setIsReactActEnvironment(false);\n try {\n const result = await cb();\n // Drain microtask queue.\n // Otherwise we'll restore the previous act() environment, before we resolve the `waitFor` call.\n // The caller would have no chance to wrap the in-flight Promises in `act()`\n await new Promise(resolve => {\n setTimeout(() => {\n resolve();\n }, 0);\n if (jestFakeTimersAreEnabled()) {\n jest.advanceTimersByTime(0);\n }\n });\n return result;\n } finally {\n setIsReactActEnvironment(previousActEnvironment);\n }\n },\n eventWrapper: cb => {\n let result;\n act(() => {\n result = cb();\n });\n return result;\n }\n});\n\n// Ideally we'd just use a WeakMap where containers are keys and roots are values.\n// We use two variables so that we can bail out in constant time when we render with a new container (most common use case)\n/**\n * @type {Set<import('react-dom').Container>}\n */\nconst mountedContainers = new Set();\n/**\n * @type Array<{container: import('react-dom').Container, root: ReturnType<typeof createConcurrentRoot>}>\n */\nconst mountedRootEntries = [];\nfunction strictModeIfNeeded(innerElement) {\n return getConfig().reactStrictMode ? /*#__PURE__*/React.createElement(React.StrictMode, null, innerElement) : innerElement;\n}\nfunction wrapUiIfNeeded(innerElement, wrapperComponent) {\n return wrapperComponent ? /*#__PURE__*/React.createElement(wrapperComponent, null, innerElement) : innerElement;\n}\nfunction createConcurrentRoot(container, _ref) {\n let {\n hydrate,\n ui,\n wrapper: WrapperComponent\n } = _ref;\n let root;\n if (hydrate) {\n act(() => {\n root = ReactDOMClient.hydrateRoot(container, strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)));\n });\n } else {\n root = ReactDOMClient.createRoot(container);\n }\n return {\n hydrate() {\n /* istanbul ignore if */\n if (!hydrate) {\n throw new Error('Attempted to hydrate a non-hydrateable root. This is a bug in `@testing-library/react`.');\n }\n // Nothing to do since hydration happens when creating the root object.\n },\n render(element) {\n root.render(element);\n },\n unmount() {\n root.unmount();\n }\n };\n}\nfunction createLegacyRoot(container) {\n return {\n hydrate(element) {\n ReactDOM.hydrate(element, container);\n },\n render(element) {\n ReactDOM.render(element, container);\n },\n unmount() {\n ReactDOM.unmountComponentAtNode(container);\n }\n };\n}\nfunction renderRoot(ui, _ref2) {\n let {\n baseElement,\n container,\n hydrate,\n queries,\n root,\n wrapper: WrapperComponent\n } = _ref2;\n act(() => {\n if (hydrate) {\n root.hydrate(strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)), container);\n } else {\n root.render(strictModeIfNeeded(wrapUiIfNeeded(ui, WrapperComponent)), container);\n }\n });\n return {\n container,\n baseElement,\n debug: function (el, maxLength, options) {\n if (el === void 0) {\n el = baseElement;\n }\n return Array.isArray(el) ?\n // eslint-disable-next-line no-console\n el.forEach(e => console.log(prettyDOM(e, maxLength, options))) :\n // eslint-disable-next-line no-console,\n console.log(prettyDOM(el, maxLength, options));\n },\n unmount: () => {\n act(() => {\n root.unmount();\n });\n },\n rerender: rerenderUi => {\n renderRoot(rerenderUi, {\n container,\n baseElement,\n root,\n wrapper: WrapperComponent\n });\n // Intentionally do not return anything to avoid unnecessarily complicating the API.\n // folks can use all the same utilities we return in the first place that are bound to the container\n },\n asFragment: () => {\n /* istanbul ignore else (old jsdom limitation) */\n if (typeof document.createRange === 'function') {\n return document.createRange().createContextualFragment(container.innerHTML);\n } else {\n const template = document.createElement('template');\n template.innerHTML = container.innerHTML;\n return template.content;\n }\n },\n ...getQueriesForElement(baseElement, queries)\n };\n}\nfunction render(ui, _temp) {\n let {\n container,\n baseElement = container,\n legacyRoot = false,\n queries,\n hydrate = false,\n wrapper\n } = _temp === void 0 ? {} : _temp;\n if (legacyRoot && typeof ReactDOM.render !== 'function') {\n const error = new Error('`legacyRoot: true` is not supported in this version of React. ' + 'If your app runs React 19 or later, you should remove this flag. ' + 'If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.');\n Error.captureStackTrace(error, render);\n throw error;\n }\n if (!baseElement) {\n // default to document.body instead of documentElement to avoid output of potentially-large\n // head elements (such as JSS style blocks) in debug output\n baseElement = document.body;\n }\n if (!container) {\n container = baseElement.appendChild(document.createElement('div'));\n }\n let root;\n // eslint-disable-next-line no-negated-condition -- we want to map the evolution of this over time. The root is created first. Only later is it re-used so we don't want to read the case that happens later first.\n if (!mountedContainers.has(container)) {\n const createRootImpl = legacyRoot ? createLegacyRoot : createConcurrentRoot;\n root = createRootImpl(container, {\n hydrate,\n ui,\n wrapper\n });\n mountedRootEntries.push({\n container,\n root\n });\n // we'll add it to the mounted containers regardless of whether it's actually\n // added to document.body so the cleanup method works regardless of whether\n // they're passing us a custom container or not.\n mountedContainers.add(container);\n } else {\n mountedRootEntries.forEach(rootEntry => {\n // Else is unreachable since `mountedContainers` has the `container`.\n // Only reachable if one would accidentally add the container to `mountedContainers` but not the root to `mountedRootEntries`\n /* istanbul ignore else */\n if (rootEntry.container === container) {\n root = rootEntry.root;\n }\n });\n }\n return renderRoot(ui, {\n container,\n baseElement,\n queries,\n hydrate,\n wrapper,\n root\n });\n}\nfunction cleanup() {\n mountedRootEntries.forEach(_ref3 => {\n let {\n root,\n container\n } = _ref3;\n act(() => {\n root.unmount();\n });\n if (container.parentNode === document.body) {\n document.body.removeChild(container);\n }\n });\n mountedRootEntries.length = 0;\n mountedContainers.clear();\n}\nfunction renderHook(renderCallback, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n initialProps,\n ...renderOptions\n } = options;\n if (renderOptions.legacyRoot && typeof ReactDOM.render !== 'function') {\n const error = new Error('`legacyRoot: true` is not supported in this version of React. ' + 'If your app runs React 19 or later, you should remove this flag. ' + 'If your app runs React 18 or earlier, visit https://react.dev/blog/2022/03/08/react-18-upgrade-guide for upgrade instructions.');\n Error.captureStackTrace(error, renderHook);\n throw error;\n }\n const result = /*#__PURE__*/React.createRef();\n function TestComponent(_ref4) {\n let {\n renderCallbackProps\n } = _ref4;\n const pendingResult = renderCallback(renderCallbackProps);\n React.useEffect(() => {\n result.current = pendingResult;\n });\n return null;\n }\n const {\n rerender: baseRerender,\n unmount\n } = render( /*#__PURE__*/React.createElement(TestComponent, {\n renderCallbackProps: initialProps\n }), renderOptions);\n function rerender(rerenderCallbackProps) {\n return baseRerender( /*#__PURE__*/React.createElement(TestComponent, {\n renderCallbackProps: rerenderCallbackProps\n }));\n }\n return {\n result,\n rerender,\n unmount\n };\n}\n\n/* eslint func-name-matching:0 */\n\n// if we're running in a test runner that supports afterEach\n// or teardown then we'll automatically run cleanup afterEach test\n// this ensures that tests run in isolation from each other\n// if you don't like this then either import the `pure` module\n// or set the RTL_SKIP_AUTO_CLEANUP env variable to 'true'.\nif (typeof process === 'undefined' || !process.env?.RTL_SKIP_AUTO_CLEANUP) {\n // ignore teardown() in code coverage because Jest does not support it\n /* istanbul ignore else */\n if (typeof afterEach === 'function') {\n afterEach(() => {\n cleanup();\n });\n } else if (typeof teardown === 'function') {\n // Block is guarded by `typeof` check.\n // eslint does not support `typeof` guards.\n // eslint-disable-next-line no-undef\n teardown(() => {\n cleanup();\n });\n }\n\n // No test setup with other test runners available\n /* istanbul ignore else */\n if (typeof beforeAll === 'function' && typeof afterAll === 'function') {\n // This matches the behavior of React < 18.\n let previousIsReactActEnvironment = getIsReactActEnvironment();\n beforeAll(() => {\n previousIsReactActEnvironment = getIsReactActEnvironment();\n setIsReactActEnvironment(true);\n });\n afterAll(() => {\n setIsReactActEnvironment(previousIsReactActEnvironment);\n });\n }\n}\n\nexport { act, cleanup, configure, fireEvent, getConfig, render, renderHook };\n","import { render, RenderOptions } from '@testing-library/react';\nimport { ReactElement, ReactNode } from 'react';\nimport { QueryClient, QueryClientProvider, QueryKey } from 'react-query';\n\nconst allProviders = ({ children }: { children: ReactNode }) => {\n const queryClient = new QueryClient();\n\n return (\n <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>\n );\n};\n\nconst customRender = (\n ui: ReactElement,\n options?: Omit<RenderOptions, 'wrapper'>\n) =>\n render(ui, {\n wrapper: ({ children }) => allProviders({ children }),\n ...options,\n });\n\nexport * from '@testing-library/react';\n\nexport { customRender as render };\n","export const capitalize = (text?: string) => text?.charAt(0).toUpperCase() + text?.slice(1);\n\nexport const capitalizeWords = (text?: string) =>\n text?.replace(/(?:^|\\s|[-\"'([{])+\\S/g, (c) => c.toUpperCase());\n","import { toast } from 'react-hot-toast';\n\nexport const Toast = ({\n text,\n variant = 'primary',\n icon = variant === 'error' ? 'error' : 'success',\n duration,\n}: {\n text: string;\n variant?: 'primary' | 'black' | 'error';\n icon?: 'copy' | 'success' | 'error';\n duration?: number;\n}) =>\n toast.success(\n (t) => (\n <div className=\"flex items-center w-full text-left\">\n {text}{' '}\n <button\n onClick={() => {\n toast.dismiss(t.id);\n }}\n className=\"ml-auto\"\n type=\"button\"\n >\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n width={20}\n height={20}\n strokeWidth={2}\n >\n <path\n d=\"M18 6L6 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M6 6L18 18\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n </button>\n </div>\n ),\n {\n icon:\n icon === 'copy' ? (\n <svg\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"shrink-0\"\n width={20}\n height={20}\n >\n <path\n d=\"M14.1667 14.6667H6C5.86739 14.6667 5.74021 14.614 5.64645 14.5202C5.55268 14.4265 5.5 14.2993 5.5 14.1667V6C5.5 5.86739 5.55268 5.74021 5.64645 5.64645C5.74021 5.55268 5.86739 5.5 6 5.5H14.1667C14.2993 5.5 14.4265 5.55268 14.5202 5.64645C14.614 5.74021 14.6667 5.86739 14.6667 6V14.1667C14.6667 14.2993 14.614 14.4265 14.5202 14.5202C14.4265 14.614 14.2993 14.6667 14.1667 14.6667Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n d=\"M10.4997 5.50016V1.8335C10.4997 1.70089 10.447 1.57371 10.3532 1.47994C10.2595 1.38617 10.1323 1.3335 9.99967 1.3335H1.83301C1.7004 1.3335 1.57322 1.38617 1.47945 1.47994C1.38569 1.57371 1.33301 1.70089 1.33301 1.8335V10.0002C1.33301 10.1328 1.38569 10.2599 1.47945 10.3537C1.57322 10.4475 1.7004 10.5002 1.83301 10.5002H5.49967\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n ) : icon === 'error' ? (\n <svg\n className=\"shrink-0 keep-color\"\n width={20}\n height={20}\n viewBox=\"0 0 20 20\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M7.64366 12.3565L10.0012 9.99984M12.3578 7.64317L10.0012 9.99984M10.0012 9.99984L7.64366 7.64317M10.0012 9.99984L12.3578 12.3565M10.0003 18.3332C14.6028 18.3332 18.3337 14.6023 18.3337 9.99984C18.3337 5.39734 14.6028 1.6665 10.0003 1.6665C5.39783 1.6665 1.66699 5.39734 1.66699 9.99984C1.66699 14.6023 5.39783 18.3332 10.0003 18.3332Z\"\n stroke=\"currentColor\"\n stroke-width=\"1.5\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </svg>\n ) : (\n <svg\n className=\"shrink-0\"\n width={20}\n height={20}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12 22.75C6.07 22.75 1.25 17.93 1.25 12C1.25 6.07 6.07 1.25 12 1.25C17.93 1.25 22.75 6.07 22.75 12C22.75 17.93 17.93 22.75 12 22.75ZM12 2.75C6.9 2.75 2.75 6.9 2.75 12C2.75 17.1 6.9 21.25 12 21.25C17.1 21.25 21.25 17.1 21.25 12C21.25 6.9 17.1 2.75 12 2.75Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M10.5814 15.58C10.3814 15.58 10.1914 15.5 10.0514 15.36L7.22141 12.53C6.93141 12.24 6.93141 11.76 7.22141 11.47C7.51141 11.18 7.99141 11.18 8.28141 11.47L10.5814 13.77L15.7214 8.62998C16.0114 8.33998 16.4914 8.33998 16.7814 8.62998C17.0714 8.91998 17.0714 9.39998 16.7814 9.68998L11.1114 15.36C10.9714 15.5 10.7814 15.58 10.5814 15.58Z\"\n fill=\"currentColor\"\n />\n </svg>\n ),\n className: 'text-sm font-medium w-full lg:min-w-[600px] !text-white h-[48px] !px-4',\n id: 'clipboard',\n duration,\n style: {\n ...(variant === 'primary'\n ? {\n backgroundColor: '#0AAA82',\n color: 'white',\n }\n : variant === 'black'\n ? {\n backgroundColor: '#212121',\n color: 'white',\n }\n : variant === 'error'\n ? {\n backgroundColor: '#F56464',\n color: 'white',\n }\n : undefined),\n maxWidth: 'max-content',\n minWidth: 300,\n borderRadius: '4px',\n },\n },\n );\n","export * from './api';\nexport * from './auth';\nexport * from './colors';\nexport * from './constants';\nexport * from './dates';\nexport * from './files';\nexport * from './form';\nexport * from './isValidURL';\nexport * from './numbers';\nexport * from './tests';\nexport * from './text';\nexport * from './toasts';\n","export const extractNumbers = (str: string | number) => String(str)?.replace(/[^\\d]/g, '');\n\nexport const toUSD = (usd: number) => {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n currencyDisplay: 'narrowSymbol',\n maximumFractionDigits: 0,\n }).format(usd);\n};\n\nexport const moneyToMonthly = ({ value, frequency }: { value: number; frequency: string }) => {\n let calculatedAmountBasedOnFrequency = value;\n\n if (!frequency) {\n return calculatedAmountBasedOnFrequency;\n }\n\n if (frequency.toLowerCase() === 'weekly') {\n calculatedAmountBasedOnFrequency = value * 4;\n }\n if (frequency.toLowerCase() === 'biweekly') {\n calculatedAmountBasedOnFrequency = Math.round((value * 26) / 12);\n }\n if (frequency.toLowerCase() === 'semi_monthly') {\n calculatedAmountBasedOnFrequency = value * 2;\n }\n\n return calculatedAmountBasedOnFrequency;\n};\n","(function(){var e={675:function(e,r){\"use strict\";r.byteLength=byteLength;r.toByteArray=toByteArray;r.fromByteArray=fromByteArray;var t=[];var f=[];var n=typeof Uint8Array!==\"undefined\"?Uint8Array:Array;var i=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";for(var o=0,u=i.length;o<u;++o){t[o]=i[o];f[i.charCodeAt(o)]=o}f[\"-\".charCodeAt(0)]=62;f[\"_\".charCodeAt(0)]=63;function getLens(e){var r=e.length;if(r%4>0){throw new Error(\"Invalid string. Length must be a multiple of 4\")}var t=e.indexOf(\"=\");if(t===-1)t=r;var f=t===r?0:4-t%4;return[t,f]}function byteLength(e){var r=getLens(e);var t=r[0];var f=r[1];return(t+f)*3/4-f}function _byteLength(e,r,t){return(r+t)*3/4-t}function toByteArray(e){var r;var t=getLens(e);var i=t[0];var o=t[1];var u=new n(_byteLength(e,i,o));var a=0;var s=o>0?i-4:i;var h;for(h=0;h<s;h+=4){r=f[e.charCodeAt(h)]<<18|f[e.charCodeAt(h+1)]<<12|f[e.charCodeAt(h+2)]<<6|f[e.charCodeAt(h+3)];u[a++]=r>>16&255;u[a++]=r>>8&255;u[a++]=r&255}if(o===2){r=f[e.charCodeAt(h)]<<2|f[e.charCodeAt(h+1)]>>4;u[a++]=r&255}if(o===1){r=f[e.charCodeAt(h)]<<10|f[e.charCodeAt(h+1)]<<4|f[e.charCodeAt(h+2)]>>2;u[a++]=r>>8&255;u[a++]=r&255}return u}function tripletToBase64(e){return t[e>>18&63]+t[e>>12&63]+t[e>>6&63]+t[e&63]}function encodeChunk(e,r,t){var f;var n=[];for(var i=r;i<t;i+=3){f=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(e[i+2]&255);n.push(tripletToBase64(f))}return n.join(\"\")}function fromByteArray(e){var r;var f=e.length;var n=f%3;var i=[];var o=16383;for(var u=0,a=f-n;u<a;u+=o){i.push(encodeChunk(e,u,u+o>a?a:u+o))}if(n===1){r=e[f-1];i.push(t[r>>2]+t[r<<4&63]+\"==\")}else if(n===2){r=(e[f-2]<<8)+e[f-1];i.push(t[r>>10]+t[r>>4&63]+t[r<<2&63]+\"=\")}return i.join(\"\")}},72:function(e,r,t){\"use strict\";\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh <https://feross.org>\n * @license MIT\n */var f=t(675);var n=t(783);var i=typeof Symbol===\"function\"&&typeof Symbol.for===\"function\"?Symbol.for(\"nodejs.util.inspect.custom\"):null;r.Buffer=Buffer;r.SlowBuffer=SlowBuffer;r.INSPECT_MAX_BYTES=50;var o=2147483647;r.kMaxLength=o;Buffer.TYPED_ARRAY_SUPPORT=typedArraySupport();if(!Buffer.TYPED_ARRAY_SUPPORT&&typeof console!==\"undefined\"&&typeof console.error===\"function\"){console.error(\"This browser lacks typed array (Uint8Array) support which is required by \"+\"`buffer` v5.x. Use `buffer` v4.x if you require old browser support.\")}function typedArraySupport(){try{var e=new Uint8Array(1);var r={foo:function(){return 42}};Object.setPrototypeOf(r,Uint8Array.prototype);Object.setPrototypeOf(e,r);return e.foo()===42}catch(e){return false}}Object.defineProperty(Buffer.prototype,\"parent\",{enumerable:true,get:function(){if(!Buffer.isBuffer(this))return undefined;return this.buffer}});Object.defineProperty(Buffer.prototype,\"offset\",{enumerable:true,get:function(){if(!Buffer.isBuffer(this))return undefined;return this.byteOffset}});function createBuffer(e){if(e>o){throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}var r=new Uint8Array(e);Object.setPrototypeOf(r,Buffer.prototype);return r}function Buffer(e,r,t){if(typeof e===\"number\"){if(typeof r===\"string\"){throw new TypeError('The \"string\" argument must be of type string. Received type number')}return allocUnsafe(e)}return from(e,r,t)}Buffer.poolSize=8192;function from(e,r,t){if(typeof e===\"string\"){return fromString(e,r)}if(ArrayBuffer.isView(e)){return fromArrayLike(e)}if(e==null){throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, \"+\"or Array-like Object. Received type \"+typeof e)}if(isInstance(e,ArrayBuffer)||e&&isInstance(e.buffer,ArrayBuffer)){return fromArrayBuffer(e,r,t)}if(typeof SharedArrayBuffer!==\"undefined\"&&(isInstance(e,SharedArrayBuffer)||e&&isInstance(e.buffer,SharedArrayBuffer))){return fromArrayBuffer(e,r,t)}if(typeof e===\"number\"){throw new TypeError('The \"value\" argument must not be of type number. Received type number')}var f=e.valueOf&&e.valueOf();if(f!=null&&f!==e){return Buffer.from(f,r,t)}var n=fromObject(e);if(n)return n;if(typeof Symbol!==\"undefined\"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]===\"function\"){return Buffer.from(e[Symbol.toPrimitive](\"string\"),r,t)}throw new TypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, \"+\"or Array-like Object. Received type \"+typeof e)}Buffer.from=function(e,r,t){return from(e,r,t)};Object.setPrototypeOf(Buffer.prototype,Uint8Array.prototype);Object.setPrototypeOf(Buffer,Uint8Array);function assertSize(e){if(typeof e!==\"number\"){throw new TypeError('\"size\" argument must be of type number')}else if(e<0){throw new RangeError('The value \"'+e+'\" is invalid for option \"size\"')}}function alloc(e,r,t){assertSize(e);if(e<=0){return createBuffer(e)}if(r!==undefined){return typeof t===\"string\"?createBuffer(e).fill(r,t):createBuffer(e).fill(r)}return createBuffer(e)}Buffer.alloc=function(e,r,t){return alloc(e,r,t)};function allocUnsafe(e){assertSize(e);return createBuffer(e<0?0:checked(e)|0)}Buffer.allocUnsafe=function(e){return allocUnsafe(e)};Buffer.allocUnsafeSlow=function(e){return allocUnsafe(e)};function fromString(e,r){if(typeof r!==\"string\"||r===\"\"){r=\"utf8\"}if(!Buffer.isEncoding(r)){throw new TypeError(\"Unknown encoding: \"+r)}var t=byteLength(e,r)|0;var f=createBuffer(t);var n=f.write(e,r);if(n!==t){f=f.slice(0,n)}return f}function fromArrayLike(e){var r=e.length<0?0:checked(e.length)|0;var t=createBuffer(r);for(var f=0;f<r;f+=1){t[f]=e[f]&255}return t}function fromArrayBuffer(e,r,t){if(r<0||e.byteLength<r){throw new RangeError('\"offset\" is outside of buffer bounds')}if(e.byteLength<r+(t||0)){throw new RangeError('\"length\" is outside of buffer bounds')}var f;if(r===undefined&&t===undefined){f=new Uint8Array(e)}else if(t===undefined){f=new Uint8Array(e,r)}else{f=new Uint8Array(e,r,t)}Object.setPrototypeOf(f,Buffer.prototype);return f}function fromObject(e){if(Buffer.isBuffer(e)){var r=checked(e.length)|0;var t=createBuffer(r);if(t.length===0){return t}e.copy(t,0,0,r);return t}if(e.length!==undefined){if(typeof e.length!==\"number\"||numberIsNaN(e.length)){return createBuffer(0)}return fromArrayLike(e)}if(e.type===\"Buffer\"&&Array.isArray(e.data)){return fromArrayLike(e.data)}}function checked(e){if(e>=o){throw new RangeError(\"Attempt to allocate Buffer larger than maximum \"+\"size: 0x\"+o.toString(16)+\" bytes\")}return e|0}function SlowBuffer(e){if(+e!=e){e=0}return Buffer.alloc(+e)}Buffer.isBuffer=function isBuffer(e){return e!=null&&e._isBuffer===true&&e!==Buffer.prototype};Buffer.compare=function compare(e,r){if(isInstance(e,Uint8Array))e=Buffer.from(e,e.offset,e.byteLength);if(isInstance(r,Uint8Array))r=Buffer.from(r,r.offset,r.byteLength);if(!Buffer.isBuffer(e)||!Buffer.isBuffer(r)){throw new TypeError('The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array')}if(e===r)return 0;var t=e.length;var f=r.length;for(var n=0,i=Math.min(t,f);n<i;++n){if(e[n]!==r[n]){t=e[n];f=r[n];break}}if(t<f)return-1;if(f<t)return 1;return 0};Buffer.isEncoding=function isEncoding(e){switch(String(e).toLowerCase()){case\"hex\":case\"utf8\":case\"utf-8\":case\"ascii\":case\"latin1\":case\"binary\":case\"base64\":case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return true;default:return false}};Buffer.concat=function concat(e,r){if(!Array.isArray(e)){throw new TypeError('\"list\" argument must be an Array of Buffers')}if(e.length===0){return Buffer.alloc(0)}var t;if(r===undefined){r=0;for(t=0;t<e.length;++t){r+=e[t].length}}var f=Buffer.allocUnsafe(r);var n=0;for(t=0;t<e.length;++t){var i=e[t];if(isInstance(i,Uint8Array)){i=Buffer.from(i)}if(!Buffer.isBuffer(i)){throw new TypeError('\"list\" argument must be an Array of Buffers')}i.copy(f,n);n+=i.length}return f};function byteLength(e,r){if(Buffer.isBuffer(e)){return e.length}if(ArrayBuffer.isView(e)||isInstance(e,ArrayBuffer)){return e.byteLength}if(typeof e!==\"string\"){throw new TypeError('The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. '+\"Received type \"+typeof e)}var t=e.length;var f=arguments.length>2&&arguments[2]===true;if(!f&&t===0)return 0;var n=false;for(;;){switch(r){case\"ascii\":case\"latin1\":case\"binary\":return t;case\"utf8\":case\"utf-8\":return utf8ToBytes(e).length;case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return t*2;case\"hex\":return t>>>1;case\"base64\":return base64ToBytes(e).length;default:if(n){return f?-1:utf8ToBytes(e).length}r=(\"\"+r).toLowerCase();n=true}}}Buffer.byteLength=byteLength;function slowToString(e,r,t){var f=false;if(r===undefined||r<0){r=0}if(r>this.length){return\"\"}if(t===undefined||t>this.length){t=this.length}if(t<=0){return\"\"}t>>>=0;r>>>=0;if(t<=r){return\"\"}if(!e)e=\"utf8\";while(true){switch(e){case\"hex\":return hexSlice(this,r,t);case\"utf8\":case\"utf-8\":return utf8Slice(this,r,t);case\"ascii\":return asciiSlice(this,r,t);case\"latin1\":case\"binary\":return latin1Slice(this,r,t);case\"base64\":return base64Slice(this,r,t);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return utf16leSlice(this,r,t);default:if(f)throw new TypeError(\"Unknown encoding: \"+e);e=(e+\"\").toLowerCase();f=true}}}Buffer.prototype._isBuffer=true;function swap(e,r,t){var f=e[r];e[r]=e[t];e[t]=f}Buffer.prototype.swap16=function swap16(){var e=this.length;if(e%2!==0){throw new RangeError(\"Buffer size must be a multiple of 16-bits\")}for(var r=0;r<e;r+=2){swap(this,r,r+1)}return this};Buffer.prototype.swap32=function swap32(){var e=this.length;if(e%4!==0){throw new RangeError(\"Buffer size must be a multiple of 32-bits\")}for(var r=0;r<e;r+=4){swap(this,r,r+3);swap(this,r+1,r+2)}return this};Buffer.prototype.swap64=function swap64(){var e=this.length;if(e%8!==0){throw new RangeError(\"Buffer size must be a multiple of 64-bits\")}for(var r=0;r<e;r+=8){swap(this,r,r+7);swap(this,r+1,r+6);swap(this,r+2,r+5);swap(this,r+3,r+4)}return this};Buffer.prototype.toString=function toString(){var e=this.length;if(e===0)return\"\";if(arguments.length===0)return utf8Slice(this,0,e);return slowToString.apply(this,arguments)};Buffer.prototype.toLocaleString=Buffer.prototype.toString;Buffer.prototype.equals=function equals(e){if(!Buffer.isBuffer(e))throw new TypeError(\"Argument must be a Buffer\");if(this===e)return true;return Buffer.compare(this,e)===0};Buffer.prototype.inspect=function inspect(){var e=\"\";var t=r.INSPECT_MAX_BYTES;e=this.toString(\"hex\",0,t).replace(/(.{2})/g,\"$1 \").trim();if(this.length>t)e+=\" ... \";return\"<Buffer \"+e+\">\"};if(i){Buffer.prototype[i]=Buffer.prototype.inspect}Buffer.prototype.compare=function compare(e,r,t,f,n){if(isInstance(e,Uint8Array)){e=Buffer.from(e,e.offset,e.byteLength)}if(!Buffer.isBuffer(e)){throw new TypeError('The \"target\" argument must be one of type Buffer or Uint8Array. '+\"Received type \"+typeof e)}if(r===undefined){r=0}if(t===undefined){t=e?e.length:0}if(f===undefined){f=0}if(n===undefined){n=this.length}if(r<0||t>e.length||f<0||n>this.length){throw new RangeError(\"out of range index\")}if(f>=n&&r>=t){return 0}if(f>=n){return-1}if(r>=t){return 1}r>>>=0;t>>>=0;f>>>=0;n>>>=0;if(this===e)return 0;var i=n-f;var o=t-r;var u=Math.min(i,o);var a=this.slice(f,n);var s=e.slice(r,t);for(var h=0;h<u;++h){if(a[h]!==s[h]){i=a[h];o=s[h];break}}if(i<o)return-1;if(o<i)return 1;return 0};function bidirectionalIndexOf(e,r,t,f,n){if(e.length===0)return-1;if(typeof t===\"string\"){f=t;t=0}else if(t>2147483647){t=2147483647}else if(t<-2147483648){t=-2147483648}t=+t;if(numberIsNaN(t)){t=n?0:e.length-1}if(t<0)t=e.length+t;if(t>=e.length){if(n)return-1;else t=e.length-1}else if(t<0){if(n)t=0;else return-1}if(typeof r===\"string\"){r=Buffer.from(r,f)}if(Buffer.isBuffer(r)){if(r.length===0){return-1}return arrayIndexOf(e,r,t,f,n)}else if(typeof r===\"number\"){r=r&255;if(typeof Uint8Array.prototype.indexOf===\"function\"){if(n){return Uint8Array.prototype.indexOf.call(e,r,t)}else{return Uint8Array.prototype.lastIndexOf.call(e,r,t)}}return arrayIndexOf(e,[r],t,f,n)}throw new TypeError(\"val must be string, number or Buffer\")}function arrayIndexOf(e,r,t,f,n){var i=1;var o=e.length;var u=r.length;if(f!==undefined){f=String(f).toLowerCase();if(f===\"ucs2\"||f===\"ucs-2\"||f===\"utf16le\"||f===\"utf-16le\"){if(e.length<2||r.length<2){return-1}i=2;o/=2;u/=2;t/=2}}function read(e,r){if(i===1){return e[r]}else{return e.readUInt16BE(r*i)}}var a;if(n){var s=-1;for(a=t;a<o;a++){if(read(e,a)===read(r,s===-1?0:a-s)){if(s===-1)s=a;if(a-s+1===u)return s*i}else{if(s!==-1)a-=a-s;s=-1}}}else{if(t+u>o)t=o-u;for(a=t;a>=0;a--){var h=true;for(var c=0;c<u;c++){if(read(e,a+c)!==read(r,c)){h=false;break}}if(h)return a}}return-1}Buffer.prototype.includes=function includes(e,r,t){return this.indexOf(e,r,t)!==-1};Buffer.prototype.indexOf=function indexOf(e,r,t){return bidirectionalIndexOf(this,e,r,t,true)};Buffer.prototype.lastIndexOf=function lastIndexOf(e,r,t){return bidirectionalIndexOf(this,e,r,t,false)};function hexWrite(e,r,t,f){t=Number(t)||0;var n=e.length-t;if(!f){f=n}else{f=Number(f);if(f>n){f=n}}var i=r.length;if(f>i/2){f=i/2}for(var o=0;o<f;++o){var u=parseInt(r.substr(o*2,2),16);if(numberIsNaN(u))return o;e[t+o]=u}return o}function utf8Write(e,r,t,f){return blitBuffer(utf8ToBytes(r,e.length-t),e,t,f)}function asciiWrite(e,r,t,f){return blitBuffer(asciiToBytes(r),e,t,f)}function latin1Write(e,r,t,f){return asciiWrite(e,r,t,f)}function base64Write(e,r,t,f){return blitBuffer(base64ToBytes(r),e,t,f)}function ucs2Write(e,r,t,f){return blitBuffer(utf16leToBytes(r,e.length-t),e,t,f)}Buffer.prototype.write=function write(e,r,t,f){if(r===undefined){f=\"utf8\";t=this.length;r=0}else if(t===undefined&&typeof r===\"string\"){f=r;t=this.length;r=0}else if(isFinite(r)){r=r>>>0;if(isFinite(t)){t=t>>>0;if(f===undefined)f=\"utf8\"}else{f=t;t=undefined}}else{throw new Error(\"Buffer.write(string, encoding, offset[, length]) is no longer supported\")}var n=this.length-r;if(t===undefined||t>n)t=n;if(e.length>0&&(t<0||r<0)||r>this.length){throw new RangeError(\"Attempt to write outside buffer bounds\")}if(!f)f=\"utf8\";var i=false;for(;;){switch(f){case\"hex\":return hexWrite(this,e,r,t);case\"utf8\":case\"utf-8\":return utf8Write(this,e,r,t);case\"ascii\":return asciiWrite(this,e,r,t);case\"latin1\":case\"binary\":return latin1Write(this,e,r,t);case\"base64\":return base64Write(this,e,r,t);case\"ucs2\":case\"ucs-2\":case\"utf16le\":case\"utf-16le\":return ucs2Write(this,e,r,t);default:if(i)throw new TypeError(\"Unknown encoding: \"+f);f=(\"\"+f).toLowerCase();i=true}}};Buffer.prototype.toJSON=function toJSON(){return{type:\"Buffer\",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice(e,r,t){if(r===0&&t===e.length){return f.fromByteArray(e)}else{return f.fromByteArray(e.slice(r,t))}}function utf8Slice(e,r,t){t=Math.min(e.length,t);var f=[];var n=r;while(n<t){var i=e[n];var o=null;var u=i>239?4:i>223?3:i>191?2:1;if(n+u<=t){var a,s,h,c;switch(u){case 1:if(i<128){o=i}break;case 2:a=e[n+1];if((a&192)===128){c=(i&31)<<6|a&63;if(c>127){o=c}}break;case 3:a=e[n+1];s=e[n+2];if((a&192)===128&&(s&192)===128){c=(i&15)<<12|(a&63)<<6|s&63;if(c>2047&&(c<55296||c>57343)){o=c}}break;case 4:a=e[n+1];s=e[n+2];h=e[n+3];if((a&192)===128&&(s&192)===128&&(h&192)===128){c=(i&15)<<18|(a&63)<<12|(s&63)<<6|h&63;if(c>65535&&c<1114112){o=c}}}}if(o===null){o=65533;u=1}else if(o>65535){o-=65536;f.push(o>>>10&1023|55296);o=56320|o&1023}f.push(o);n+=u}return decodeCodePointsArray(f)}var u=4096;function decodeCodePointsArray(e){var r=e.length;if(r<=u){return String.fromCharCode.apply(String,e)}var t=\"\";var f=0;while(f<r){t+=String.fromCharCode.apply(String,e.slice(f,f+=u))}return t}function asciiSlice(e,r,t){var f=\"\";t=Math.min(e.length,t);for(var n=r;n<t;++n){f+=String.fromCharCode(e[n]&127)}return f}function latin1Slice(e,r,t){var f=\"\";t=Math.min(e.length,t);for(var n=r;n<t;++n){f+=String.fromCharCode(e[n])}return f}function hexSlice(e,r,t){var f=e.length;if(!r||r<0)r=0;if(!t||t<0||t>f)t=f;var n=\"\";for(var i=r;i<t;++i){n+=s[e[i]]}return n}function utf16leSlice(e,r,t){var f=e.slice(r,t);var n=\"\";for(var i=0;i<f.length;i+=2){n+=String.fromCharCode(f[i]+f[i+1]*256)}return n}Buffer.prototype.slice=function slice(e,r){var t=this.length;e=~~e;r=r===undefined?t:~~r;if(e<0){e+=t;if(e<0)e=0}else if(e>t){e=t}if(r<0){r+=t;if(r<0)r=0}else if(r>t){r=t}if(r<e)r=e;var f=this.subarray(e,r);Object.setPrototypeOf(f,Buffer.prototype);return f};function checkOffset(e,r,t){if(e%1!==0||e<0)throw new RangeError(\"offset is not uint\");if(e+r>t)throw new RangeError(\"Trying to access beyond buffer length\")}Buffer.prototype.readUIntLE=function readUIntLE(e,r,t){e=e>>>0;r=r>>>0;if(!t)checkOffset(e,r,this.length);var f=this[e];var n=1;var i=0;while(++i<r&&(n*=256)){f+=this[e+i]*n}return f};Buffer.prototype.readUIntBE=function readUIntBE(e,r,t){e=e>>>0;r=r>>>0;if(!t){checkOffset(e,r,this.length)}var f=this[e+--r];var n=1;while(r>0&&(n*=256)){f+=this[e+--r]*n}return f};Buffer.prototype.readUInt8=function readUInt8(e,r){e=e>>>0;if(!r)checkOffset(e,1,this.length);return this[e]};Buffer.prototype.readUInt16LE=function readUInt16LE(e,r){e=e>>>0;if(!r)checkOffset(e,2,this.length);return this[e]|this[e+1]<<8};Buffer.prototype.readUInt16BE=function readUInt16BE(e,r){e=e>>>0;if(!r)checkOffset(e,2,this.length);return this[e]<<8|this[e+1]};Buffer.prototype.readUInt32LE=function readUInt32LE(e,r){e=e>>>0;if(!r)checkOffset(e,4,this.length);return(this[e]|this[e+1]<<8|this[e+2]<<16)+this[e+3]*16777216};Buffer.prototype.readUInt32BE=function readUInt32BE(e,r){e=e>>>0;if(!r)checkOffset(e,4,this.length);return this[e]*16777216+(this[e+1]<<16|this[e+2]<<8|this[e+3])};Buffer.prototype.readIntLE=function readIntLE(e,r,t){e=e>>>0;r=r>>>0;if(!t)checkOffset(e,r,this.length);var f=this[e];var n=1;var i=0;while(++i<r&&(n*=256)){f+=this[e+i]*n}n*=128;if(f>=n)f-=Math.pow(2,8*r);return f};Buffer.prototype.readIntBE=function readIntBE(e,r,t){e=e>>>0;r=r>>>0;if(!t)checkOffset(e,r,this.length);var f=r;var n=1;var i=this[e+--f];while(f>0&&(n*=256)){i+=this[e+--f]*n}n*=128;if(i>=n)i-=Math.pow(2,8*r);return i};Buffer.prototype.readInt8=function readInt8(e,r){e=e>>>0;if(!r)checkOffset(e,1,this.length);if(!(this[e]&128))return this[e];return(255-this[e]+1)*-1};Buffer.prototype.readInt16LE=function readInt16LE(e,r){e=e>>>0;if(!r)checkOffset(e,2,this.length);var t=this[e]|this[e+1]<<8;return t&32768?t|4294901760:t};Buffer.prototype.readInt16BE=function readInt16BE(e,r){e=e>>>0;if(!r)checkOffset(e,2,this.length);var t=this[e+1]|this[e]<<8;return t&32768?t|4294901760:t};Buffer.prototype.readInt32LE=function readInt32LE(e,r){e=e>>>0;if(!r)checkOffset(e,4,this.length);return this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24};Buffer.prototype.readInt32BE=function readInt32BE(e,r){e=e>>>0;if(!r)checkOffset(e,4,this.length);return this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]};Buffer.prototype.readFloatLE=function readFloatLE(e,r){e=e>>>0;if(!r)checkOffset(e,4,this.length);return n.read(this,e,true,23,4)};Buffer.prototype.readFloatBE=function readFloatBE(e,r){e=e>>>0;if(!r)checkOffset(e,4,this.length);return n.read(this,e,false,23,4)};Buffer.prototype.readDoubleLE=function readDoubleLE(e,r){e=e>>>0;if(!r)checkOffset(e,8,this.length);return n.read(this,e,true,52,8)};Buffer.prototype.readDoubleBE=function readDoubleBE(e,r){e=e>>>0;if(!r)checkOffset(e,8,this.length);return n.read(this,e,false,52,8)};function checkInt(e,r,t,f,n,i){if(!Buffer.isBuffer(e))throw new TypeError('\"buffer\" argument must be a Buffer instance');if(r>n||r<i)throw new RangeError('\"value\" argument is out of bounds');if(t+f>e.length)throw new RangeError(\"Index out of range\")}Buffer.prototype.writeUIntLE=function writeUIntLE(e,r,t,f){e=+e;r=r>>>0;t=t>>>0;if(!f){var n=Math.pow(2,8*t)-1;checkInt(this,e,r,t,n,0)}var i=1;var o=0;this[r]=e&255;while(++o<t&&(i*=256)){this[r+o]=e/i&255}return r+t};Buffer.prototype.writeUIntBE=function writeUIntBE(e,r,t,f){e=+e;r=r>>>0;t=t>>>0;if(!f){var n=Math.pow(2,8*t)-1;checkInt(this,e,r,t,n,0)}var i=t-1;var o=1;this[r+i]=e&255;while(--i>=0&&(o*=256)){this[r+i]=e/o&255}return r+t};Buffer.prototype.writeUInt8=function writeUInt8(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,1,255,0);this[r]=e&255;return r+1};Buffer.prototype.writeUInt16LE=function writeUInt16LE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,2,65535,0);this[r]=e&255;this[r+1]=e>>>8;return r+2};Buffer.prototype.writeUInt16BE=function writeUInt16BE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,2,65535,0);this[r]=e>>>8;this[r+1]=e&255;return r+2};Buffer.prototype.writeUInt32LE=function writeUInt32LE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,4,4294967295,0);this[r+3]=e>>>24;this[r+2]=e>>>16;this[r+1]=e>>>8;this[r]=e&255;return r+4};Buffer.prototype.writeUInt32BE=function writeUInt32BE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,4,4294967295,0);this[r]=e>>>24;this[r+1]=e>>>16;this[r+2]=e>>>8;this[r+3]=e&255;return r+4};Buffer.prototype.writeIntLE=function writeIntLE(e,r,t,f){e=+e;r=r>>>0;if(!f){var n=Math.pow(2,8*t-1);checkInt(this,e,r,t,n-1,-n)}var i=0;var o=1;var u=0;this[r]=e&255;while(++i<t&&(o*=256)){if(e<0&&u===0&&this[r+i-1]!==0){u=1}this[r+i]=(e/o>>0)-u&255}return r+t};Buffer.prototype.writeIntBE=function writeIntBE(e,r,t,f){e=+e;r=r>>>0;if(!f){var n=Math.pow(2,8*t-1);checkInt(this,e,r,t,n-1,-n)}var i=t-1;var o=1;var u=0;this[r+i]=e&255;while(--i>=0&&(o*=256)){if(e<0&&u===0&&this[r+i+1]!==0){u=1}this[r+i]=(e/o>>0)-u&255}return r+t};Buffer.prototype.writeInt8=function writeInt8(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,1,127,-128);if(e<0)e=255+e+1;this[r]=e&255;return r+1};Buffer.prototype.writeInt16LE=function writeInt16LE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,2,32767,-32768);this[r]=e&255;this[r+1]=e>>>8;return r+2};Buffer.prototype.writeInt16BE=function writeInt16BE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,2,32767,-32768);this[r]=e>>>8;this[r+1]=e&255;return r+2};Buffer.prototype.writeInt32LE=function writeInt32LE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,4,2147483647,-2147483648);this[r]=e&255;this[r+1]=e>>>8;this[r+2]=e>>>16;this[r+3]=e>>>24;return r+4};Buffer.prototype.writeInt32BE=function writeInt32BE(e,r,t){e=+e;r=r>>>0;if(!t)checkInt(this,e,r,4,2147483647,-2147483648);if(e<0)e=4294967295+e+1;this[r]=e>>>24;this[r+1]=e>>>16;this[r+2]=e>>>8;this[r+3]=e&255;return r+4};function checkIEEE754(e,r,t,f,n,i){if(t+f>e.length)throw new RangeError(\"Index out of range\");if(t<0)throw new RangeError(\"Index out of range\")}function writeFloat(e,r,t,f,i){r=+r;t=t>>>0;if(!i){checkIEEE754(e,r,t,4,34028234663852886e22,-34028234663852886e22)}n.write(e,r,t,f,23,4);return t+4}Buffer.prototype.writeFloatLE=function writeFloatLE(e,r,t){return writeFloat(this,e,r,true,t)};Buffer.prototype.writeFloatBE=function writeFloatBE(e,r,t){return writeFloat(this,e,r,false,t)};function writeDouble(e,r,t,f,i){r=+r;t=t>>>0;if(!i){checkIEEE754(e,r,t,8,17976931348623157e292,-17976931348623157e292)}n.write(e,r,t,f,52,8);return t+8}Buffer.prototype.writeDoubleLE=function writeDoubleLE(e,r,t){return writeDouble(this,e,r,true,t)};Buffer.prototype.writeDoubleBE=function writeDoubleBE(e,r,t){return writeDouble(this,e,r,false,t)};Buffer.prototype.copy=function copy(e,r,t,f){if(!Buffer.isBuffer(e))throw new TypeError(\"argument should be a Buffer\");if(!t)t=0;if(!f&&f!==0)f=this.length;if(r>=e.length)r=e.length;if(!r)r=0;if(f>0&&f<t)f=t;if(f===t)return 0;if(e.length===0||this.length===0)return 0;if(r<0){throw new RangeError(\"targetStart out of bounds\")}if(t<0||t>=this.length)throw new RangeError(\"Index out of range\");if(f<0)throw new RangeError(\"sourceEnd out of bounds\");if(f>this.length)f=this.length;if(e.length-r<f-t){f=e.length-r+t}var n=f-t;if(this===e&&typeof Uint8Array.prototype.copyWithin===\"function\"){this.copyWithin(r,t,f)}else if(this===e&&t<r&&r<f){for(var i=n-1;i>=0;--i){e[i+r]=this[i+t]}}else{Uint8Array.prototype.set.call(e,this.subarray(t,f),r)}return n};Buffer.prototype.fill=function fill(e,r,t,f){if(typeof e===\"string\"){if(typeof r===\"string\"){f=r;r=0;t=this.length}else if(typeof t===\"string\"){f=t;t=this.length}if(f!==undefined&&typeof f!==\"string\"){throw new TypeError(\"encoding must be a string\")}if(typeof f===\"string\"&&!Buffer.isEncoding(f)){throw new TypeError(\"Unknown encoding: \"+f)}if(e.length===1){var n=e.charCodeAt(0);if(f===\"utf8\"&&n<128||f===\"latin1\"){e=n}}}else if(typeof e===\"number\"){e=e&255}else if(typeof e===\"boolean\"){e=Number(e)}if(r<0||this.length<r||this.length<t){throw new RangeError(\"Out of range index\")}if(t<=r){return this}r=r>>>0;t=t===undefined?this.length:t>>>0;if(!e)e=0;var i;if(typeof e===\"number\"){for(i=r;i<t;++i){this[i]=e}}else{var o=Buffer.isBuffer(e)?e:Buffer.from(e,f);var u=o.length;if(u===0){throw new TypeError('The value \"'+e+'\" is invalid for argument \"value\"')}for(i=0;i<t-r;++i){this[i+r]=o[i%u]}}return this};var a=/[^+/0-9A-Za-z-_]/g;function base64clean(e){e=e.split(\"=\")[0];e=e.trim().replace(a,\"\");if(e.length<2)return\"\";while(e.length%4!==0){e=e+\"=\"}return e}function utf8ToBytes(e,r){r=r||Infinity;var t;var f=e.length;var n=null;var i=[];for(var o=0;o<f;++o){t=e.charCodeAt(o);if(t>55295&&t<57344){if(!n){if(t>56319){if((r-=3)>-1)i.push(239,191,189);continue}else if(o+1===f){if((r-=3)>-1)i.push(239,191,189);continue}n=t;continue}if(t<56320){if((r-=3)>-1)i.push(239,191,189);n=t;continue}t=(n-55296<<10|t-56320)+65536}else if(n){if((r-=3)>-1)i.push(239,191,189)}n=null;if(t<128){if((r-=1)<0)break;i.push(t)}else if(t<2048){if((r-=2)<0)break;i.push(t>>6|192,t&63|128)}else if(t<65536){if((r-=3)<0)break;i.push(t>>12|224,t>>6&63|128,t&63|128)}else if(t<1114112){if((r-=4)<0)break;i.push(t>>18|240,t>>12&63|128,t>>6&63|128,t&63|128)}else{throw new Error(\"Invalid code point\")}}return i}function asciiToBytes(e){var r=[];for(var t=0;t<e.length;++t){r.push(e.charCodeAt(t)&255)}return r}function utf16leToBytes(e,r){var t,f,n;var i=[];for(var o=0;o<e.length;++o){if((r-=2)<0)break;t=e.charCodeAt(o);f=t>>8;n=t%256;i.push(n);i.push(f)}return i}function base64ToBytes(e){return f.toByteArray(base64clean(e))}function blitBuffer(e,r,t,f){for(var n=0;n<f;++n){if(n+t>=r.length||n>=e.length)break;r[n+t]=e[n]}return n}function isInstance(e,r){return e instanceof r||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===r.name}function numberIsNaN(e){return e!==e}var s=function(){var e=\"0123456789abcdef\";var r=new Array(256);for(var t=0;t<16;++t){var f=t*16;for(var n=0;n<16;++n){r[f+n]=e[t]+e[n]}}return r}()},783:function(e,r){\n/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */\nr.read=function(e,r,t,f,n){var i,o;var u=n*8-f-1;var a=(1<<u)-1;var s=a>>1;var h=-7;var c=t?n-1:0;var l=t?-1:1;var p=e[r+c];c+=l;i=p&(1<<-h)-1;p>>=-h;h+=u;for(;h>0;i=i*256+e[r+c],c+=l,h-=8){}o=i&(1<<-h)-1;i>>=-h;h+=f;for(;h>0;o=o*256+e[r+c],c+=l,h-=8){}if(i===0){i=1-s}else if(i===a){return o?NaN:(p?-1:1)*Infinity}else{o=o+Math.pow(2,f);i=i-s}return(p?-1:1)*o*Math.pow(2,i-f)};r.write=function(e,r,t,f,n,i){var o,u,a;var s=i*8-n-1;var h=(1<<s)-1;var c=h>>1;var l=n===23?Math.pow(2,-24)-Math.pow(2,-77):0;var p=f?0:i-1;var y=f?1:-1;var g=r<0||r===0&&1/r<0?1:0;r=Math.abs(r);if(isNaN(r)||r===Infinity){u=isNaN(r)?1:0;o=h}else{o=Math.floor(Math.log(r)/Math.LN2);if(r*(a=Math.pow(2,-o))<1){o--;a*=2}if(o+c>=1){r+=l/a}else{r+=l*Math.pow(2,1-c)}if(r*a>=2){o++;a/=2}if(o+c>=h){u=0;o=h}else if(o+c>=1){u=(r*a-1)*Math.pow(2,n);o=o+c}else{u=r*Math.pow(2,c-1)*Math.pow(2,n);o=0}}for(;n>=8;e[t+p]=u&255,p+=y,u/=256,n-=8){}o=o<<n|u;s+=n;for(;s>0;e[t+p]=o&255,p+=y,o/=256,s-=8){}e[t+p-y]|=g*128}}};var r={};function __nccwpck_require__(t){var f=r[t];if(f!==undefined){return f.exports}var n=r[t]={exports:{}};var i=true;try{e[t](n,n.exports,__nccwpck_require__);i=false}finally{if(i)delete r[t]}return n.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var t=__nccwpck_require__(72);module.exports=t})();",null,"// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin","// extracted by mini-css-extract-plugin\nmodule.exports = {\"loading\":\"loading_loading__fjLdo\",\"loadingContainer\":\"loading_loadingContainer__PqKCP\",\"spin\":\"loading_spin__2zShZ\",\"loading--double\":\"loading_loading--double__8gRiC\",\"loading-pulse\":\"loading_loading-pulse__HyAre\",\"pulse\":\"loading_pulse__gMeMm\"};","(function(){\"use strict\";var e={815:function(e){function hasOwnProperty(e,r){return Object.prototype.hasOwnProperty.call(e,r)}e.exports=function(e,n,t,o){n=n||\"&\";t=t||\"=\";var a={};if(typeof e!==\"string\"||e.length===0){return a}var i=/\\+/g;e=e.split(n);var u=1e3;if(o&&typeof o.maxKeys===\"number\"){u=o.maxKeys}var c=e.length;if(u>0&&c>u){c=u}for(var p=0;p<c;++p){var f=e[p].replace(i,\"%20\"),s=f.indexOf(t),_,l,y,d;if(s>=0){_=f.substr(0,s);l=f.substr(s+1)}else{_=f;l=\"\"}y=decodeURIComponent(_);d=decodeURIComponent(l);if(!hasOwnProperty(a,y)){a[y]=d}else if(r(a[y])){a[y].push(d)}else{a[y]=[a[y],d]}}return a};var r=Array.isArray||function(e){return Object.prototype.toString.call(e)===\"[object Array]\"}},577:function(e){var stringifyPrimitive=function(e){switch(typeof e){case\"string\":return e;case\"boolean\":return e?\"true\":\"false\";case\"number\":return isFinite(e)?e:\"\";default:return\"\"}};e.exports=function(e,t,o,a){t=t||\"&\";o=o||\"=\";if(e===null){e=undefined}if(typeof e===\"object\"){return map(n(e),(function(n){var a=encodeURIComponent(stringifyPrimitive(n))+o;if(r(e[n])){return map(e[n],(function(e){return a+encodeURIComponent(stringifyPrimitive(e))})).join(t)}else{return a+encodeURIComponent(stringifyPrimitive(e[n]))}})).join(t)}if(!a)return\"\";return encodeURIComponent(stringifyPrimitive(a))+o+encodeURIComponent(stringifyPrimitive(e))};var r=Array.isArray||function(e){return Object.prototype.toString.call(e)===\"[object Array]\"};function map(e,r){if(e.map)return e.map(r);var n=[];for(var t=0;t<e.length;t++){n.push(r(e[t],t))}return n}var n=Object.keys||function(e){var r=[];for(var n in e){if(Object.prototype.hasOwnProperty.call(e,n))r.push(n)}return r}}};var r={};function __nccwpck_require__(n){var t=r[n];if(t!==undefined){return t.exports}var o=r[n]={exports:{}};var a=true;try{e[n](o,o.exports,__nccwpck_require__);a=false}finally{if(a)delete r[n]}return o.exports}if(typeof __nccwpck_require__!==\"undefined\")__nccwpck_require__.ab=__dirname+\"/\";var n={};!function(){var e=n;e.decode=e.parse=__nccwpck_require__(815);e.encode=e.stringify=__nccwpck_require__(577)}();module.exports=n})();","module.exports = require('./dist/shared/lib/head')\n","module.exports = require('./dist/shared/lib/image-external')\n","module.exports = require('./dist/client/link')\n","module.exports = require('./dist/client/router')\n","module.exports = require('./dist/client/script')\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","'use strict';\n\nvar replace = String.prototype.replace;\nvar percentTwenties = /%20/g;\n\nvar Format = {\n RFC1738: 'RFC1738',\n RFC3986: 'RFC3986'\n};\n\nmodule.exports = {\n 'default': Format.RFC3986,\n formatters: {\n RFC1738: function (value) {\n return replace.call(value, percentTwenties, '+');\n },\n RFC3986: function (value) {\n return String(value);\n }\n },\n RFC1738: Format.RFC1738,\n RFC3986: Format.RFC3986\n};\n","'use strict';\n\nvar stringify = require('./stringify');\nvar parse = require('./parse');\nvar formats = require('./formats');\n\nmodule.exports = {\n formats: formats,\n parse: parse,\n stringify: stringify\n};\n","'use strict';\n\nvar utils = require('./utils');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar defaults = {\n allowDots: false,\n allowPrototypes: false,\n allowSparse: false,\n arrayLimit: 20,\n charset: 'utf-8',\n charsetSentinel: false,\n comma: false,\n decoder: utils.decode,\n delimiter: '&',\n depth: 5,\n ignoreQueryPrefix: false,\n interpretNumericEntities: false,\n parameterLimit: 1000,\n parseArrays: true,\n plainObjects: false,\n strictNullHandling: false\n};\n\nvar interpretNumericEntities = function (str) {\n return str.replace(/&#(\\d+);/g, function ($0, numberStr) {\n return String.fromCharCode(parseInt(numberStr, 10));\n });\n};\n\nvar parseArrayValue = function (val, options) {\n if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {\n return val.split(',');\n }\n\n return val;\n};\n\n// This is what browsers will submit when the ✓ character occurs in an\n// application/x-www-form-urlencoded body and the encoding of the page containing\n// the form is iso-8859-1, or when the submitted form has an accept-charset\n// attribute of iso-8859-1. Presumably also with other charsets that do not contain\n// the ✓ character, such as us-ascii.\nvar isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('✓')\n\n// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.\nvar charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')\n\nvar parseValues = function parseQueryStringValues(str, options) {\n var obj = { __proto__: null };\n\n var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\\?/, '') : str;\n var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;\n var parts = cleanStr.split(options.delimiter, limit);\n var skipIndex = -1; // Keep track of where the utf8 sentinel was found\n var i;\n\n var charset = options.charset;\n if (options.charsetSentinel) {\n for (i = 0; i < parts.length; ++i) {\n if (parts[i].indexOf('utf8=') === 0) {\n if (parts[i] === charsetSentinel) {\n charset = 'utf-8';\n } else if (parts[i] === isoSentinel) {\n charset = 'iso-8859-1';\n }\n skipIndex = i;\n i = parts.length; // The eslint settings do not allow break;\n }\n }\n }\n\n for (i = 0; i < parts.length; ++i) {\n if (i === skipIndex) {\n continue;\n }\n var part = parts[i];\n\n var bracketEqualsPos = part.indexOf(']=');\n var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;\n\n var key, val;\n if (pos === -1) {\n key = options.decoder(part, defaults.decoder, charset, 'key');\n val = options.strictNullHandling ? null : '';\n } else {\n key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');\n val = utils.maybeMap(\n parseArrayValue(part.slice(pos + 1), options),\n function (encodedVal) {\n return options.decoder(encodedVal, defaults.decoder, charset, 'value');\n }\n );\n }\n\n if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {\n val = interpretNumericEntities(val);\n }\n\n if (part.indexOf('[]=') > -1) {\n val = isArray(val) ? [val] : val;\n }\n\n if (has.call(obj, key)) {\n obj[key] = utils.combine(obj[key], val);\n } else {\n obj[key] = val;\n }\n }\n\n return obj;\n};\n\nvar parseObject = function (chain, val, options, valuesParsed) {\n var leaf = valuesParsed ? val : parseArrayValue(val, options);\n\n for (var i = chain.length - 1; i >= 0; --i) {\n var obj;\n var root = chain[i];\n\n if (root === '[]' && options.parseArrays) {\n obj = [].concat(leaf);\n } else {\n obj = options.plainObjects ? Object.create(null) : {};\n var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;\n var index = parseInt(cleanRoot, 10);\n if (!options.parseArrays && cleanRoot === '') {\n obj = { 0: leaf };\n } else if (\n !isNaN(index)\n && root !== cleanRoot\n && String(index) === cleanRoot\n && index >= 0\n && (options.parseArrays && index <= options.arrayLimit)\n ) {\n obj = [];\n obj[index] = leaf;\n } else if (cleanRoot !== '__proto__') {\n obj[cleanRoot] = leaf;\n }\n }\n\n leaf = obj;\n }\n\n return leaf;\n};\n\nvar parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {\n if (!givenKey) {\n return;\n }\n\n // Transform dot notation to bracket notation\n var key = options.allowDots ? givenKey.replace(/\\.([^.[]+)/g, '[$1]') : givenKey;\n\n // The regex chunks\n\n var brackets = /(\\[[^[\\]]*])/;\n var child = /(\\[[^[\\]]*])/g;\n\n // Get the parent\n\n var segment = options.depth > 0 && brackets.exec(key);\n var parent = segment ? key.slice(0, segment.index) : key;\n\n // Stash the parent if it exists\n\n var keys = [];\n if (parent) {\n // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties\n if (!options.plainObjects && has.call(Object.prototype, parent)) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n\n keys.push(parent);\n }\n\n // Loop through children appending to the array until we hit depth\n\n var i = 0;\n while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {\n i += 1;\n if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {\n if (!options.allowPrototypes) {\n return;\n }\n }\n keys.push(segment[1]);\n }\n\n // If there's a remainder, just add whatever is left\n\n if (segment) {\n keys.push('[' + key.slice(segment.index) + ']');\n }\n\n return parseObject(keys, val, options, valuesParsed);\n};\n\nvar normalizeParseOptions = function normalizeParseOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {\n throw new TypeError('Decoder has to be a function.');\n }\n\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;\n\n return {\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,\n allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,\n arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,\n decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,\n delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,\n // eslint-disable-next-line no-implicit-coercion, no-extra-parens\n depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,\n ignoreQueryPrefix: opts.ignoreQueryPrefix === true,\n interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,\n parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,\n parseArrays: opts.parseArrays !== false,\n plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (str, opts) {\n var options = normalizeParseOptions(opts);\n\n if (str === '' || str === null || typeof str === 'undefined') {\n return options.plainObjects ? Object.create(null) : {};\n }\n\n var tempObj = typeof str === 'string' ? parseValues(str, options) : str;\n var obj = options.plainObjects ? Object.create(null) : {};\n\n // Iterate over the keys and setup the new object\n\n var keys = Object.keys(tempObj);\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');\n obj = utils.merge(obj, newObj, options);\n }\n\n if (options.allowSparse === true) {\n return obj;\n }\n\n return utils.compact(obj);\n};\n","'use strict';\n\nvar getSideChannel = require('side-channel');\nvar utils = require('./utils');\nvar formats = require('./formats');\nvar has = Object.prototype.hasOwnProperty;\n\nvar arrayPrefixGenerators = {\n brackets: function brackets(prefix) {\n return prefix + '[]';\n },\n comma: 'comma',\n indices: function indices(prefix, key) {\n return prefix + '[' + key + ']';\n },\n repeat: function repeat(prefix) {\n return prefix;\n }\n};\n\nvar isArray = Array.isArray;\nvar push = Array.prototype.push;\nvar pushToArray = function (arr, valueOrArray) {\n push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);\n};\n\nvar toISO = Date.prototype.toISOString;\n\nvar defaultFormat = formats['default'];\nvar defaults = {\n addQueryPrefix: false,\n allowDots: false,\n charset: 'utf-8',\n charsetSentinel: false,\n delimiter: '&',\n encode: true,\n encoder: utils.encode,\n encodeValuesOnly: false,\n format: defaultFormat,\n formatter: formats.formatters[defaultFormat],\n // deprecated\n indices: false,\n serializeDate: function serializeDate(date) {\n return toISO.call(date);\n },\n skipNulls: false,\n strictNullHandling: false\n};\n\nvar isNonNullishPrimitive = function isNonNullishPrimitive(v) {\n return typeof v === 'string'\n || typeof v === 'number'\n || typeof v === 'boolean'\n || typeof v === 'symbol'\n || typeof v === 'bigint';\n};\n\nvar sentinel = {};\n\nvar stringify = function stringify(\n object,\n prefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n sideChannel\n) {\n var obj = object;\n\n var tmpSc = sideChannel;\n var step = 0;\n var findFlag = false;\n while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {\n // Where object last appeared in the ref tree\n var pos = tmpSc.get(object);\n step += 1;\n if (typeof pos !== 'undefined') {\n if (pos === step) {\n throw new RangeError('Cyclic object value');\n } else {\n findFlag = true; // Break while\n }\n }\n if (typeof tmpSc.get(sentinel) === 'undefined') {\n step = 0;\n }\n }\n\n if (typeof filter === 'function') {\n obj = filter(prefix, obj);\n } else if (obj instanceof Date) {\n obj = serializeDate(obj);\n } else if (generateArrayPrefix === 'comma' && isArray(obj)) {\n obj = utils.maybeMap(obj, function (value) {\n if (value instanceof Date) {\n return serializeDate(value);\n }\n return value;\n });\n }\n\n if (obj === null) {\n if (strictNullHandling) {\n return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;\n }\n\n obj = '';\n }\n\n if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {\n if (encoder) {\n var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);\n return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];\n }\n return [formatter(prefix) + '=' + formatter(String(obj))];\n }\n\n var values = [];\n\n if (typeof obj === 'undefined') {\n return values;\n }\n\n var objKeys;\n if (generateArrayPrefix === 'comma' && isArray(obj)) {\n // we need to join elements in\n if (encodeValuesOnly && encoder) {\n obj = utils.maybeMap(obj, encoder);\n }\n objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];\n } else if (isArray(filter)) {\n objKeys = filter;\n } else {\n var keys = Object.keys(obj);\n objKeys = sort ? keys.sort(sort) : keys;\n }\n\n var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;\n\n for (var j = 0; j < objKeys.length; ++j) {\n var key = objKeys[j];\n var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];\n\n if (skipNulls && value === null) {\n continue;\n }\n\n var keyPrefix = isArray(obj)\n ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix\n : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');\n\n sideChannel.set(object, step);\n var valueSideChannel = getSideChannel();\n valueSideChannel.set(sentinel, sideChannel);\n pushToArray(values, stringify(\n value,\n keyPrefix,\n generateArrayPrefix,\n commaRoundTrip,\n strictNullHandling,\n skipNulls,\n generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,\n filter,\n sort,\n allowDots,\n serializeDate,\n format,\n formatter,\n encodeValuesOnly,\n charset,\n valueSideChannel\n ));\n }\n\n return values;\n};\n\nvar normalizeStringifyOptions = function normalizeStringifyOptions(opts) {\n if (!opts) {\n return defaults;\n }\n\n if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {\n throw new TypeError('Encoder has to be a function.');\n }\n\n var charset = opts.charset || defaults.charset;\n if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {\n throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');\n }\n\n var format = formats['default'];\n if (typeof opts.format !== 'undefined') {\n if (!has.call(formats.formatters, opts.format)) {\n throw new TypeError('Unknown format option provided.');\n }\n format = opts.format;\n }\n var formatter = formats.formatters[format];\n\n var filter = defaults.filter;\n if (typeof opts.filter === 'function' || isArray(opts.filter)) {\n filter = opts.filter;\n }\n\n return {\n addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,\n allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,\n charset: charset,\n charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,\n delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,\n encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,\n encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,\n encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,\n filter: filter,\n format: format,\n formatter: formatter,\n serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,\n skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,\n sort: typeof opts.sort === 'function' ? opts.sort : null,\n strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling\n };\n};\n\nmodule.exports = function (object, opts) {\n var obj = object;\n var options = normalizeStringifyOptions(opts);\n\n var objKeys;\n var filter;\n\n if (typeof options.filter === 'function') {\n filter = options.filter;\n obj = filter('', obj);\n } else if (isArray(options.filter)) {\n filter = options.filter;\n objKeys = filter;\n }\n\n var keys = [];\n\n if (typeof obj !== 'object' || obj === null) {\n return '';\n }\n\n var arrayFormat;\n if (opts && opts.arrayFormat in arrayPrefixGenerators) {\n arrayFormat = opts.arrayFormat;\n } else if (opts && 'indices' in opts) {\n arrayFormat = opts.indices ? 'indices' : 'repeat';\n } else {\n arrayFormat = 'indices';\n }\n\n var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];\n if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {\n throw new TypeError('`commaRoundTrip` must be a boolean, or absent');\n }\n var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;\n\n if (!objKeys) {\n objKeys = Object.keys(obj);\n }\n\n if (options.sort) {\n objKeys.sort(options.sort);\n }\n\n var sideChannel = getSideChannel();\n for (var i = 0; i < objKeys.length; ++i) {\n var key = objKeys[i];\n\n if (options.skipNulls && obj[key] === null) {\n continue;\n }\n pushToArray(keys, stringify(\n obj[key],\n key,\n generateArrayPrefix,\n commaRoundTrip,\n options.strictNullHandling,\n options.skipNulls,\n options.encode ? options.encoder : null,\n options.filter,\n options.sort,\n options.allowDots,\n options.serializeDate,\n options.format,\n options.formatter,\n options.encodeValuesOnly,\n options.charset,\n sideChannel\n ));\n }\n\n var joined = keys.join(options.delimiter);\n var prefix = options.addQueryPrefix === true ? '?' : '';\n\n if (options.charsetSentinel) {\n if (options.charset === 'iso-8859-1') {\n // encodeURIComponent('✓'), the \"numeric entity\" representation of a checkmark\n prefix += 'utf8=%26%2310003%3B&';\n } else {\n // encodeURIComponent('✓')\n prefix += 'utf8=%E2%9C%93&';\n }\n }\n\n return joined.length > 0 ? prefix + joined : '';\n};\n","'use strict';\n\nvar formats = require('./formats');\n\nvar has = Object.prototype.hasOwnProperty;\nvar isArray = Array.isArray;\n\nvar hexTable = (function () {\n var array = [];\n for (var i = 0; i < 256; ++i) {\n array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());\n }\n\n return array;\n}());\n\nvar compactQueue = function compactQueue(queue) {\n while (queue.length > 1) {\n var item = queue.pop();\n var obj = item.obj[item.prop];\n\n if (isArray(obj)) {\n var compacted = [];\n\n for (var j = 0; j < obj.length; ++j) {\n if (typeof obj[j] !== 'undefined') {\n compacted.push(obj[j]);\n }\n }\n\n item.obj[item.prop] = compacted;\n }\n }\n};\n\nvar arrayToObject = function arrayToObject(source, options) {\n var obj = options && options.plainObjects ? Object.create(null) : {};\n for (var i = 0; i < source.length; ++i) {\n if (typeof source[i] !== 'undefined') {\n obj[i] = source[i];\n }\n }\n\n return obj;\n};\n\nvar merge = function merge(target, source, options) {\n /* eslint no-param-reassign: 0 */\n if (!source) {\n return target;\n }\n\n if (typeof source !== 'object') {\n if (isArray(target)) {\n target.push(source);\n } else if (target && typeof target === 'object') {\n if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {\n target[source] = true;\n }\n } else {\n return [target, source];\n }\n\n return target;\n }\n\n if (!target || typeof target !== 'object') {\n return [target].concat(source);\n }\n\n var mergeTarget = target;\n if (isArray(target) && !isArray(source)) {\n mergeTarget = arrayToObject(target, options);\n }\n\n if (isArray(target) && isArray(source)) {\n source.forEach(function (item, i) {\n if (has.call(target, i)) {\n var targetItem = target[i];\n if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {\n target[i] = merge(targetItem, item, options);\n } else {\n target.push(item);\n }\n } else {\n target[i] = item;\n }\n });\n return target;\n }\n\n return Object.keys(source).reduce(function (acc, key) {\n var value = source[key];\n\n if (has.call(acc, key)) {\n acc[key] = merge(acc[key], value, options);\n } else {\n acc[key] = value;\n }\n return acc;\n }, mergeTarget);\n};\n\nvar assign = function assignSingleSource(target, source) {\n return Object.keys(source).reduce(function (acc, key) {\n acc[key] = source[key];\n return acc;\n }, target);\n};\n\nvar decode = function (str, decoder, charset) {\n var strWithoutPlus = str.replace(/\\+/g, ' ');\n if (charset === 'iso-8859-1') {\n // unescape never throws, no try...catch needed:\n return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);\n }\n // utf-8\n try {\n return decodeURIComponent(strWithoutPlus);\n } catch (e) {\n return strWithoutPlus;\n }\n};\n\nvar encode = function encode(str, defaultEncoder, charset, kind, format) {\n // This code was originally written by Brian White (mscdex) for the io.js core querystring library.\n // It has been adapted here for stricter adherence to RFC 3986\n if (str.length === 0) {\n return str;\n }\n\n var string = str;\n if (typeof str === 'symbol') {\n string = Symbol.prototype.toString.call(str);\n } else if (typeof str !== 'string') {\n string = String(str);\n }\n\n if (charset === 'iso-8859-1') {\n return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {\n return '%26%23' + parseInt($0.slice(2), 16) + '%3B';\n });\n }\n\n var out = '';\n for (var i = 0; i < string.length; ++i) {\n var c = string.charCodeAt(i);\n\n if (\n c === 0x2D // -\n || c === 0x2E // .\n || c === 0x5F // _\n || c === 0x7E // ~\n || (c >= 0x30 && c <= 0x39) // 0-9\n || (c >= 0x41 && c <= 0x5A) // a-z\n || (c >= 0x61 && c <= 0x7A) // A-Z\n || (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )\n ) {\n out += string.charAt(i);\n continue;\n }\n\n if (c < 0x80) {\n out = out + hexTable[c];\n continue;\n }\n\n if (c < 0x800) {\n out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n if (c < 0xD800 || c >= 0xE000) {\n out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);\n continue;\n }\n\n i += 1;\n c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));\n /* eslint operator-linebreak: [2, \"before\"] */\n out += hexTable[0xF0 | (c >> 18)]\n + hexTable[0x80 | ((c >> 12) & 0x3F)]\n + hexTable[0x80 | ((c >> 6) & 0x3F)]\n + hexTable[0x80 | (c & 0x3F)];\n }\n\n return out;\n};\n\nvar compact = function compact(value) {\n var queue = [{ obj: { o: value }, prop: 'o' }];\n var refs = [];\n\n for (var i = 0; i < queue.length; ++i) {\n var item = queue[i];\n var obj = item.obj[item.prop];\n\n var keys = Object.keys(obj);\n for (var j = 0; j < keys.length; ++j) {\n var key = keys[j];\n var val = obj[key];\n if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {\n queue.push({ obj: obj, prop: key });\n refs.push(val);\n }\n }\n }\n\n compactQueue(queue);\n\n return value;\n};\n\nvar isRegExp = function isRegExp(obj) {\n return Object.prototype.toString.call(obj) === '[object RegExp]';\n};\n\nvar isBuffer = function isBuffer(obj) {\n if (!obj || typeof obj !== 'object') {\n return false;\n }\n\n return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));\n};\n\nvar combine = function combine(a, b) {\n return [].concat(a, b);\n};\n\nvar maybeMap = function maybeMap(val, fn) {\n if (isArray(val)) {\n var mapped = [];\n for (var i = 0; i < val.length; i += 1) {\n mapped.push(fn(val[i]));\n }\n return mapped;\n }\n return fn(val);\n};\n\nmodule.exports = {\n arrayToObject: arrayToObject,\n assign: assign,\n combine: combine,\n compact: compact,\n decode: decode,\n encode: encode,\n isBuffer: isBuffer,\n isRegExp: isRegExp,\n maybeMap: maybeMap,\n merge: merge\n};\n","'use strict';\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _utils = require('./utils');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar propTypes = {\n thousandSeparator: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.oneOf([true])]),\n thousandSpacing: _propTypes2.default.oneOf(['2', '2s', '3', '4']),\n decimalSeparator: _propTypes2.default.string,\n decimalScale: _propTypes2.default.number,\n fixedDecimalScale: _propTypes2.default.bool,\n displayType: _propTypes2.default.oneOf(['input', 'text']),\n prefix: _propTypes2.default.string,\n suffix: _propTypes2.default.string,\n format: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),\n removeFormatting: _propTypes2.default.func,\n mask: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.arrayOf(_propTypes2.default.string)]),\n value: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.string]),\n isNumericString: _propTypes2.default.bool,\n customInput: _propTypes2.default.func,\n allowNegative: _propTypes2.default.bool,\n onValueChange: _propTypes2.default.func,\n onKeyDown: _propTypes2.default.func,\n onMouseUp: _propTypes2.default.func,\n onChange: _propTypes2.default.func,\n onFocus: _propTypes2.default.func,\n onBlur: _propTypes2.default.func,\n type: _propTypes2.default.oneOf(['text', 'tel']),\n isAllowed: _propTypes2.default.func,\n renderText: _propTypes2.default.func\n};\n\nvar defaultProps = {\n displayType: 'input',\n decimalSeparator: '.',\n thousandSpacing: '3',\n fixedDecimalScale: false,\n prefix: '',\n suffix: '',\n allowNegative: true,\n isNumericString: false,\n type: 'text',\n onValueChange: _utils.noop,\n onChange: _utils.noop,\n onKeyDown: _utils.noop,\n onMouseUp: _utils.noop,\n onFocus: _utils.noop,\n onBlur: _utils.noop,\n isAllowed: _utils.returnTrue\n};\n\nvar CurrencyFormat = function (_React$Component) {\n _inherits(CurrencyFormat, _React$Component);\n\n function CurrencyFormat(props) {\n _classCallCheck(this, CurrencyFormat);\n\n //validate props\n var _this = _possibleConstructorReturn(this, (CurrencyFormat.__proto__ || Object.getPrototypeOf(CurrencyFormat)).call(this, props));\n\n _this.validateProps();\n\n var formattedValue = _this.formatValueProp();\n\n _this.state = {\n value: formattedValue,\n numAsString: _this.removeFormatting(formattedValue)\n };\n\n _this.onChange = _this.onChange.bind(_this);\n _this.onKeyDown = _this.onKeyDown.bind(_this);\n _this.onMouseUp = _this.onMouseUp.bind(_this);\n _this.onFocus = _this.onFocus.bind(_this);\n _this.onBlur = _this.onBlur.bind(_this);\n return _this;\n }\n\n _createClass(CurrencyFormat, [{\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps) {\n this.updateValueIfRequired(prevProps);\n }\n }, {\n key: 'updateValueIfRequired',\n value: function updateValueIfRequired(prevProps) {\n var props = this.props,\n state = this.state;\n\n\n if (prevProps !== props) {\n //validate props\n this.validateProps();\n\n var stateValue = state.value;\n\n var lastNumStr = state.numAsString || '';\n\n var formattedValue = props.value === undefined ? this.formatNumString(lastNumStr) : this.formatValueProp();\n\n if (formattedValue !== stateValue) {\n this.setState({\n value: formattedValue,\n numAsString: this.removeFormatting(formattedValue)\n });\n }\n }\n }\n\n /** Misc methods **/\n\n }, {\n key: 'getFloatString',\n value: function getFloatString() {\n var num = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n\n var _getSeparators = this.getSeparators(),\n decimalSeparator = _getSeparators.decimalSeparator;\n\n var numRegex = this.getNumberRegex(true);\n\n //remove negation for regex check\n var hasNegation = num[0] === '-';\n if (hasNegation) num = num.replace('-', '');\n\n num = (num.match(numRegex) || []).join('').replace(decimalSeparator, '.');\n\n //remove extra decimals\n var firstDecimalIndex = num.indexOf('.');\n\n if (firstDecimalIndex !== -1) {\n num = num.substring(0, firstDecimalIndex) + '.' + num.substring(firstDecimalIndex + 1, num.length).replace(new RegExp((0, _utils.escapeRegExp)(decimalSeparator), 'g'), '');\n }\n\n //add negation back\n if (hasNegation) num = '-' + num;\n\n return num;\n }\n\n //returned regex assumes decimalSeparator is as per prop\n\n }, {\n key: 'getNumberRegex',\n value: function getNumberRegex(g, ignoreDecimalSeparator) {\n var _props = this.props,\n format = _props.format,\n decimalScale = _props.decimalScale;\n\n var _getSeparators2 = this.getSeparators(),\n decimalSeparator = _getSeparators2.decimalSeparator;\n\n return new RegExp('\\\\d' + (decimalSeparator && decimalScale !== 0 && !ignoreDecimalSeparator && !format ? '|' + (0, _utils.escapeRegExp)(decimalSeparator) : ''), g ? 'g' : undefined);\n }\n }, {\n key: 'getSeparators',\n value: function getSeparators() {\n var _props2 = this.props,\n decimalSeparator = _props2.decimalSeparator,\n thousandSpacing = _props2.thousandSpacing;\n var thousandSeparator = this.props.thousandSeparator;\n\n\n if (thousandSeparator === true) {\n thousandSeparator = ',';\n }\n\n return {\n decimalSeparator: decimalSeparator,\n thousandSeparator: thousandSeparator,\n thousandSpacing: thousandSpacing\n };\n }\n }, {\n key: 'getMaskAtIndex',\n value: function getMaskAtIndex(index) {\n var _props$mask = this.props.mask,\n mask = _props$mask === undefined ? ' ' : _props$mask;\n\n if (typeof mask === 'string') {\n return mask;\n }\n\n return mask[index] || ' ';\n }\n }, {\n key: 'validateProps',\n value: function validateProps() {\n var mask = this.props.mask;\n\n //validate decimalSeparator and thousandSeparator\n\n var _getSeparators3 = this.getSeparators(),\n decimalSeparator = _getSeparators3.decimalSeparator,\n thousandSeparator = _getSeparators3.thousandSeparator;\n\n if (decimalSeparator === thousandSeparator) {\n throw new Error('\\n Decimal separator can\\'t be same as thousand separator.\\n\\n thousandSeparator: ' + thousandSeparator + ' (thousandSeparator = {true} is same as thousandSeparator = \",\")\\n decimalSeparator: ' + decimalSeparator + ' (default value for decimalSeparator is .)\\n ');\n }\n\n //validate mask\n if (mask) {\n var maskAsStr = mask === 'string' ? mask : mask.toString();\n if (maskAsStr.match(/\\d/g)) {\n throw new Error('\\n Mask ' + mask + ' should not contain numeric character;\\n ');\n }\n }\n }\n }, {\n key: 'splitDecimal',\n value: function splitDecimal(numStr) {\n var allowNegative = this.props.allowNegative;\n\n var hasNagation = numStr[0] === '-';\n var addNegation = hasNagation && allowNegative;\n numStr = numStr.replace('-', '');\n\n var parts = numStr.split('.');\n var beforeDecimal = parts[0];\n var afterDecimal = parts[1] || '';\n\n return {\n beforeDecimal: beforeDecimal,\n afterDecimal: afterDecimal,\n hasNagation: hasNagation,\n addNegation: addNegation\n };\n }\n\n /** Misc methods end **/\n\n /** caret specific methods **/\n\n }, {\n key: 'setPatchedCaretPosition',\n value: function setPatchedCaretPosition(el, caretPos, currentValue) {\n /* setting caret position within timeout of 0ms is required for mobile chrome,\r\n otherwise browser resets the caret position after we set it\r\n We are also setting it without timeout so that in normal browser we don't see the flickering */\n (0, _utils.setCaretPosition)(el, caretPos);\n setTimeout(function () {\n if (el.value === currentValue) (0, _utils.setCaretPosition)(el, caretPos);\n }, 0);\n }\n\n /* This keeps the caret within typing area so people can't type in between prefix or suffix */\n\n }, {\n key: 'correctCaretPosition',\n value: function correctCaretPosition(value, caretPos, direction) {\n var _props3 = this.props,\n prefix = _props3.prefix,\n suffix = _props3.suffix,\n format = _props3.format;\n\n //in case of format as number limit between prefix and suffix\n\n if (!format) {\n var hasNegation = value[0] === '-';\n return Math.min(Math.max(caretPos, prefix.length + (hasNegation ? 1 : 0)), value.length - suffix.length);\n }\n\n //in case if custom format method don't do anything\n if (typeof format === 'function') return caretPos;\n\n /* in case format is string find the closest # position from the caret position */\n\n //in case the caretPos have input value on it don't do anything\n if (format[caretPos] === '#' && (0, _utils.charIsNumber)(value[caretPos])) return caretPos;\n\n //if caretPos is just after input value don't do anything\n if (format[caretPos - 1] === '#' && (0, _utils.charIsNumber)(value[caretPos - 1])) return caretPos;\n\n //find the nearest caret position\n var firstHashPosition = format.indexOf('#');\n var lastHashPosition = format.lastIndexOf('#');\n\n //limit the cursor between the first # position and the last # position\n caretPos = Math.min(Math.max(caretPos, firstHashPosition), lastHashPosition + 1);\n\n var nextPos = format.substring(caretPos, format.length).indexOf('#');\n var caretLeftBound = caretPos;\n var caretRightBoud = caretPos + (nextPos === -1 ? 0 : nextPos);\n\n //get the position where the last number is present\n while (caretLeftBound > firstHashPosition && (format[caretLeftBound] !== '#' || !(0, _utils.charIsNumber)(value[caretLeftBound]))) {\n caretLeftBound -= 1;\n }\n\n var goToLeft = !(0, _utils.charIsNumber)(value[caretRightBoud]) || direction === 'left' && caretPos !== firstHashPosition || caretPos - caretLeftBound < caretRightBoud - caretPos;\n\n return goToLeft ? caretLeftBound + 1 : caretRightBoud;\n }\n }, {\n key: 'getCaretPosition',\n value: function getCaretPosition(inputValue, formattedValue, caretPos) {\n var format = this.props.format;\n\n var stateValue = this.state.value;\n var numRegex = this.getNumberRegex(true);\n var inputNumber = (inputValue.match(numRegex) || []).join('');\n var formattedNumber = (formattedValue.match(numRegex) || []).join('');\n var j = void 0,\n i = void 0;\n\n j = 0;\n\n for (i = 0; i < caretPos; i++) {\n var currentInputChar = inputValue[i] || '';\n var currentFormatChar = formattedValue[j] || '';\n //no need to increase new cursor position if formatted value does not have those characters\n //case inputValue = 1a23 and formattedValue = 123\n if (!currentInputChar.match(numRegex) && currentInputChar !== currentFormatChar) continue;\n\n //When we are striping out leading zeros maintain the new cursor position\n //Case inputValue = 00023 and formattedValue = 23;\n if (currentInputChar === '0' && currentFormatChar.match(numRegex) && currentFormatChar !== '0' && inputNumber.length !== formattedNumber.length) continue;\n\n //we are not using currentFormatChar because j can change here\n while (currentInputChar !== formattedValue[j] && j < formattedValue.length) {\n j++;\n }j++;\n }\n\n if (typeof format === 'string' && !stateValue) {\n //set it to the maximum value so it goes after the last number\n j = formattedValue.length;\n }\n\n //correct caret position if its outside of editable area\n j = this.correctCaretPosition(formattedValue, j);\n\n return j;\n }\n /** caret specific methods ends **/\n\n /** methods to remove formattting **/\n\n }, {\n key: 'removePrefixAndSuffix',\n value: function removePrefixAndSuffix(val) {\n var _props4 = this.props,\n format = _props4.format,\n prefix = _props4.prefix,\n suffix = _props4.suffix;\n\n //remove prefix and suffix\n\n if (!format && val) {\n var isNegative = val[0] === '-';\n\n //remove negation sign\n if (isNegative) val = val.substring(1, val.length);\n\n //remove prefix\n val = prefix && val.indexOf(prefix) === 0 ? val.substring(prefix.length, val.length) : val;\n\n //remove suffix\n var suffixLastIndex = val.lastIndexOf(suffix);\n val = suffix && suffixLastIndex !== -1 && suffixLastIndex === val.length - suffix.length ? val.substring(0, suffixLastIndex) : val;\n\n //add negation sign back\n if (isNegative) val = '-' + val;\n }\n\n return val;\n }\n }, {\n key: 'removePatternFormatting',\n value: function removePatternFormatting(val) {\n var format = this.props.format;\n\n var formatArray = format.split('#').filter(function (str) {\n return str !== '';\n });\n var start = 0;\n var numStr = '';\n\n for (var i = 0, ln = formatArray.length; i <= ln; i++) {\n var part = formatArray[i] || '';\n\n //if i is the last fragment take the index of end of the value\n //For case like +1 (911) 911 91 91 having pattern +1 (###) ### ## ##\n var index = i === ln ? val.length : val.indexOf(part, start);\n\n /* in any case if we don't find the pattern part in the value assume the val as numeric string\r\n This will be also in case if user has started typing, in any other case it will not be -1\r\n unless wrong prop value is provided */\n if (index === -1) {\n numStr = val;\n break;\n } else {\n numStr += val.substring(start, index);\n start = index + part.length;\n }\n }\n\n return (numStr.match(/\\d/g) || []).join('');\n }\n }, {\n key: 'removeFormatting',\n value: function removeFormatting(val) {\n var _props5 = this.props,\n format = _props5.format,\n removeFormatting = _props5.removeFormatting;\n\n if (!val) return val;\n\n if (!format) {\n val = this.removePrefixAndSuffix(val);\n val = this.getFloatString(val);\n } else if (typeof format === 'string') {\n val = this.removePatternFormatting(val);\n } else if (typeof removeFormatting === 'function') {\n //condition need to be handled if format method is provide,\n val = removeFormatting(val);\n } else {\n val = (val.match(/\\d/g) || []).join('');\n }\n return val;\n }\n /** methods to remove formattting end **/\n\n /*** format specific methods start ***/\n /**\r\n * Format when # based string is provided\r\n * @param {string} numStr Numeric String\r\n * @return {string} formatted Value\r\n */\n\n }, {\n key: 'formatWithPattern',\n value: function formatWithPattern(numStr) {\n var format = this.props.format;\n\n var hashCount = 0;\n var formattedNumberAry = format.split('');\n for (var i = 0, ln = format.length; i < ln; i++) {\n if (format[i] === '#') {\n formattedNumberAry[i] = numStr[hashCount] || this.getMaskAtIndex(hashCount);\n hashCount += 1;\n }\n }\n return formattedNumberAry.join('');\n }\n /**\r\n * Format the given string according to thousand separator and thousand spacing\r\n * @param {*} beforeDecimal \r\n * @param {*} thousandSeparator \r\n * @param {*} thousandSpacing \r\n */\n\n }, {\n key: 'formatThousand',\n value: function formatThousand(beforeDecimal, thousandSeparator, thousandSpacing) {\n var digitalGroup = void 0;\n switch (thousandSpacing) {\n case _utils.thousandGroupSpacing.two:\n digitalGroup = /(\\d)(?=(\\d{2})+(?!\\d))/g;\n break;\n case _utils.thousandGroupSpacing.twoScaled:\n digitalGroup = /(\\d)(?=(((\\d{2})+)(\\d{1})(?!\\d)))/g;\n break;\n case _utils.thousandGroupSpacing.four:\n digitalGroup = /(\\d)(?=(\\d{4})+(?!\\d))/g;\n break;\n default:\n digitalGroup = /(\\d)(?=(\\d{3})+(?!\\d))/g;\n }\n\n return beforeDecimal.replace(digitalGroup, '$1' + thousandSeparator);\n }\n /**\r\n * @param {string} numStr Numeric string/floatString] It always have decimalSeparator as .\r\n * @return {string} formatted Value\r\n */\n\n }, {\n key: 'formatAsNumber',\n value: function formatAsNumber(numStr) {\n var _props6 = this.props,\n decimalScale = _props6.decimalScale,\n fixedDecimalScale = _props6.fixedDecimalScale,\n prefix = _props6.prefix,\n suffix = _props6.suffix;\n\n var _getSeparators4 = this.getSeparators(),\n thousandSeparator = _getSeparators4.thousandSeparator,\n decimalSeparator = _getSeparators4.decimalSeparator,\n thousandSpacing = _getSeparators4.thousandSpacing;\n\n var hasDecimalSeparator = numStr.indexOf('.') !== -1 || decimalScale && fixedDecimalScale;\n\n var _splitDecimal = this.splitDecimal(numStr),\n beforeDecimal = _splitDecimal.beforeDecimal,\n afterDecimal = _splitDecimal.afterDecimal,\n addNegation = _splitDecimal.addNegation; // eslint-disable-line prefer-const\n\n //apply decimal precision if its defined\n\n\n if (decimalScale !== undefined) afterDecimal = (0, _utils.limitToScale)(afterDecimal, decimalScale, fixedDecimalScale);\n\n if (thousandSeparator) {\n beforeDecimal = this.formatThousand(beforeDecimal, thousandSeparator, thousandSpacing);\n }\n\n //add prefix and suffix\n if (prefix) beforeDecimal = prefix + beforeDecimal;\n if (suffix) afterDecimal = afterDecimal + suffix;\n\n //restore negation sign\n if (addNegation) beforeDecimal = '-' + beforeDecimal;\n\n numStr = beforeDecimal + (hasDecimalSeparator && decimalSeparator || '') + afterDecimal;\n\n return numStr;\n }\n }, {\n key: 'formatNumString',\n value: function formatNumString() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var format = this.props.format;\n\n var formattedValue = value;\n\n if (value === '') {\n formattedValue = '';\n } else if (value === '-' && !format) {\n formattedValue = '-';\n value = '';\n } else if (typeof format === 'string') {\n formattedValue = this.formatWithPattern(formattedValue);\n } else if (typeof format === 'function') {\n formattedValue = format(formattedValue);\n } else {\n formattedValue = this.formatAsNumber(formattedValue);\n }\n\n return formattedValue;\n }\n }, {\n key: 'formatValueProp',\n value: function formatValueProp() {\n var _props7 = this.props,\n format = _props7.format,\n decimalScale = _props7.decimalScale,\n fixedDecimalScale = _props7.fixedDecimalScale;\n var _props8 = this.props,\n value = _props8.value,\n isNumericString = _props8.isNumericString;\n\n // if value is not defined return empty string\n\n if (value === undefined) return '';\n\n if (typeof value === 'number') {\n value = value.toString();\n isNumericString = true;\n }\n\n //round the number based on decimalScale\n //format only if non formatted value is provided\n if (isNumericString && !format && typeof decimalScale === 'number') {\n value = (0, _utils.roundToPrecision)(value, decimalScale, fixedDecimalScale);\n }\n\n var formattedValue = isNumericString ? this.formatNumString(value) : this.formatInput(value);\n\n return formattedValue;\n }\n }, {\n key: 'formatNegation',\n value: function formatNegation() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var allowNegative = this.props.allowNegative;\n\n var negationRegex = new RegExp('(-)');\n var doubleNegationRegex = new RegExp('(-)(.)*(-)');\n\n // Check number has '-' value\n var hasNegation = negationRegex.test(value);\n\n // Check number has 2 or more '-' values\n var removeNegation = doubleNegationRegex.test(value);\n\n //remove negation\n value = value.replace(/-/g, '');\n\n if (hasNegation && !removeNegation && allowNegative) {\n value = '-' + value;\n }\n\n return value;\n }\n }, {\n key: 'formatInput',\n value: function formatInput() {\n var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';\n var format = this.props.format;\n\n //format negation only if we are formatting as number\n\n if (!format) {\n value = this.formatNegation(value);\n }\n\n //remove formatting from number\n value = this.removeFormatting(value);\n\n return this.formatNumString(value);\n }\n\n /*** format specific methods end ***/\n\n }, {\n key: 'isCharacterAFormat',\n value: function isCharacterAFormat(caretPos, value) {\n var _props9 = this.props,\n format = _props9.format,\n prefix = _props9.prefix,\n suffix = _props9.suffix,\n decimalScale = _props9.decimalScale,\n fixedDecimalScale = _props9.fixedDecimalScale;\n\n var _getSeparators5 = this.getSeparators(),\n decimalSeparator = _getSeparators5.decimalSeparator;\n\n //check within format pattern\n\n\n if (typeof format === 'string' && format[caretPos] !== '#') return true;\n\n //check in number format\n if (!format && (caretPos < prefix.length || caretPos >= value.length - suffix.length || decimalScale && fixedDecimalScale && value[caretPos] === decimalSeparator)) {\n return true;\n }\n\n return false;\n }\n }, {\n key: 'checkIfFormatGotDeleted',\n value: function checkIfFormatGotDeleted(start, end, value) {\n for (var i = start; i < end; i++) {\n if (this.isCharacterAFormat(i, value)) return true;\n }\n return false;\n }\n\n /**\r\n * This will check if any formatting got removed by the delete or backspace and reset the value\r\n * It will also work as fallback if android chome keyDown handler does not work\r\n **/\n\n }, {\n key: 'correctInputValue',\n value: function correctInputValue(caretPos, lastValue, value) {\n var format = this.props.format;\n\n var lastNumStr = this.state.numAsString || '';\n\n //don't do anyhting if something got added, or if value is empty string (when whole input is cleared)\n if (value.length >= lastValue.length || !value.length) {\n return value;\n }\n\n var start = caretPos;\n var lastValueParts = (0, _utils.splitString)(lastValue, caretPos);\n var newValueParts = (0, _utils.splitString)(value, caretPos);\n var deletedIndex = lastValueParts[1].lastIndexOf(newValueParts[1]);\n var diff = deletedIndex !== -1 ? lastValueParts[1].substring(0, deletedIndex) : '';\n var end = start + diff.length;\n\n //if format got deleted reset the value to last value\n if (this.checkIfFormatGotDeleted(start, end, lastValue)) {\n value = lastValue;\n }\n\n //for numbers check if beforeDecimal got deleted and there is nothing after decimal,\n //clear all numbers in such case while keeping the - sign\n if (!format) {\n var numericString = this.removeFormatting(value);\n\n var _splitDecimal2 = this.splitDecimal(numericString),\n beforeDecimal = _splitDecimal2.beforeDecimal,\n afterDecimal = _splitDecimal2.afterDecimal,\n addNegation = _splitDecimal2.addNegation; // eslint-disable-line prefer-const\n\n //clear only if something got deleted\n\n\n if (numericString.length < lastNumStr.length && beforeDecimal === '' && !parseFloat(afterDecimal)) {\n return addNegation ? '-' : '';\n }\n }\n\n return value;\n }\n }, {\n key: 'onChange',\n value: function onChange(e) {\n e.persist();\n var el = e.target;\n var inputValue = el.value;\n var state = this.state,\n props = this.props;\n var isAllowed = props.isAllowed;\n\n var lastValue = state.value || '';\n\n /*Max of selectionStart and selectionEnd is taken for the patch of pixel and other mobile device caret bug*/\n var currentCaretPosition = Math.max(el.selectionStart, el.selectionEnd);\n\n inputValue = this.correctInputValue(currentCaretPosition, lastValue, inputValue);\n\n var formattedValue = this.formatInput(inputValue) || '';\n var numAsString = this.removeFormatting(formattedValue);\n\n var valueObj = {\n formattedValue: formattedValue,\n value: numAsString,\n floatValue: parseFloat(numAsString)\n };\n\n if (!isAllowed(valueObj)) {\n formattedValue = lastValue;\n }\n\n //set the value imperatively, this is required for IE fix\n el.value = formattedValue;\n\n //get the caret position\n var caretPos = this.getCaretPosition(inputValue, formattedValue, currentCaretPosition);\n\n //set caret position\n this.setPatchedCaretPosition(el, caretPos, formattedValue);\n\n //change the state\n if (formattedValue !== lastValue) {\n this.setState({ value: formattedValue, numAsString: numAsString }, function () {\n props.onValueChange(valueObj);\n props.onChange(e);\n });\n } else {\n props.onChange(e);\n }\n }\n }, {\n key: 'onBlur',\n value: function onBlur(e) {\n var props = this.props,\n state = this.state;\n var format = props.format,\n onBlur = props.onBlur;\n var numAsString = state.numAsString;\n\n var lastValue = state.value;\n if (!format) {\n numAsString = (0, _utils.fixLeadingZero)(numAsString);\n var formattedValue = this.formatNumString(numAsString);\n var valueObj = {\n formattedValue: formattedValue,\n value: numAsString,\n floatValue: parseFloat(numAsString)\n };\n\n //change the state\n if (formattedValue !== lastValue) {\n // the event needs to be persisted because its properties can be accessed in an asynchronous way\n e.persist();\n this.setState({ value: formattedValue, numAsString: numAsString }, function () {\n props.onValueChange(valueObj);\n onBlur(e);\n });\n return;\n }\n }\n onBlur(e);\n }\n }, {\n key: 'onKeyDown',\n value: function onKeyDown(e) {\n var el = e.target;\n var key = e.key;\n var selectionEnd = el.selectionEnd,\n value = el.value;\n var selectionStart = el.selectionStart;\n\n var expectedCaretPosition = void 0;\n var _props10 = this.props,\n decimalScale = _props10.decimalScale,\n fixedDecimalScale = _props10.fixedDecimalScale,\n prefix = _props10.prefix,\n suffix = _props10.suffix,\n format = _props10.format,\n onKeyDown = _props10.onKeyDown;\n\n var ignoreDecimalSeparator = decimalScale !== undefined && fixedDecimalScale;\n var numRegex = this.getNumberRegex(false, ignoreDecimalSeparator);\n var negativeRegex = new RegExp('-');\n var isPatternFormat = typeof format === 'string';\n\n //Handle backspace and delete against non numerical/decimal characters or arrow keys\n if (key === 'ArrowLeft' || key === 'Backspace') {\n expectedCaretPosition = selectionStart - 1;\n } else if (key === 'ArrowRight') {\n expectedCaretPosition = selectionStart + 1;\n } else if (key === 'Delete') {\n expectedCaretPosition = selectionStart;\n }\n\n //if expectedCaretPosition is not set it means we don't want to Handle keyDown\n //also if multiple characters are selected don't handle\n if (expectedCaretPosition === undefined || selectionStart !== selectionEnd) {\n onKeyDown(e);\n return;\n }\n\n var newCaretPosition = expectedCaretPosition;\n var leftBound = isPatternFormat ? format.indexOf('#') : prefix.length;\n var rightBound = isPatternFormat ? format.lastIndexOf('#') + 1 : value.length - suffix.length;\n\n if (key === 'ArrowLeft' || key === 'ArrowRight') {\n var direction = key === 'ArrowLeft' ? 'left' : 'right';\n newCaretPosition = this.correctCaretPosition(value, expectedCaretPosition, direction);\n } else if (key === 'Delete' && !numRegex.test(value[expectedCaretPosition]) && !negativeRegex.test(value[expectedCaretPosition])) {\n while (!numRegex.test(value[newCaretPosition]) && newCaretPosition < rightBound) {\n newCaretPosition++;\n }\n } else if (key === 'Backspace' && !numRegex.test(value[expectedCaretPosition]) && !negativeRegex.test(value[expectedCaretPosition])) {\n while (!numRegex.test(value[newCaretPosition - 1]) && newCaretPosition > leftBound) {\n newCaretPosition--;\n }\n newCaretPosition = this.correctCaretPosition(value, newCaretPosition, 'left');\n }\n\n if (newCaretPosition !== expectedCaretPosition || expectedCaretPosition < leftBound || expectedCaretPosition > rightBound) {\n e.preventDefault();\n this.setPatchedCaretPosition(el, newCaretPosition, value);\n }\n\n /* NOTE: this is just required for unit test as we need to get the newCaretPosition,\r\n Remove this when you find different solution */\n if (e.isUnitTestRun) {\n this.setPatchedCaretPosition(el, newCaretPosition, value);\n }\n\n this.props.onKeyDown(e);\n }\n\n /** required to handle the caret position when click anywhere within the input **/\n\n }, {\n key: 'onMouseUp',\n value: function onMouseUp(e) {\n var el = e.target;\n var selectionStart = el.selectionStart,\n selectionEnd = el.selectionEnd,\n value = el.value;\n\n\n if (selectionStart === selectionEnd) {\n var caretPostion = this.correctCaretPosition(value, selectionStart);\n if (caretPostion !== selectionStart) {\n this.setPatchedCaretPosition(el, caretPostion, value);\n }\n }\n\n this.props.onMouseUp(e);\n }\n }, {\n key: 'onFocus',\n value: function onFocus(e) {\n var _this2 = this;\n\n // Workaround Chrome and Safari bug https://bugs.chromium.org/p/chromium/issues/detail?id=779328\n // (onFocus event target selectionStart is always 0 before setTimeout)\n e.persist();\n setTimeout(function () {\n var el = e.target;\n var selectionStart = el.selectionStart,\n value = el.value;\n\n\n var caretPosition = _this2.correctCaretPosition(value, selectionStart);\n if (caretPosition !== selectionStart) {\n _this2.setPatchedCaretPosition(el, caretPosition, value);\n }\n\n _this2.props.onFocus(e);\n });\n }\n }, {\n key: 'render',\n value: function render() {\n var _props11 = this.props,\n type = _props11.type,\n displayType = _props11.displayType,\n customInput = _props11.customInput,\n renderText = _props11.renderText;\n var value = this.state.value;\n\n\n var otherProps = (0, _utils.omit)(this.props, propTypes);\n\n var inputProps = _extends({}, otherProps, {\n type: type,\n value: value,\n onChange: this.onChange,\n onKeyDown: this.onKeyDown,\n onMouseUp: this.onMouseUp,\n onFocus: this.onFocus,\n onBlur: this.onBlur\n });\n\n if (displayType === 'text') {\n return renderText ? renderText(value) || null : _react2.default.createElement(\n 'span',\n otherProps,\n value\n );\n } else if (customInput) {\n var CustomInput = customInput;\n return _react2.default.createElement(CustomInput, inputProps);\n }\n\n return _react2.default.createElement('input', inputProps);\n }\n }]);\n\n return CurrencyFormat;\n}(_react2.default.Component);\n\nCurrencyFormat.propTypes = propTypes;\nCurrencyFormat.defaultProps = defaultProps;\n\nmodule.exports = CurrencyFormat;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.noop = noop;\nexports.returnTrue = returnTrue;\nexports.charIsNumber = charIsNumber;\nexports.escapeRegExp = escapeRegExp;\nexports.fixLeadingZero = fixLeadingZero;\nexports.splitString = splitString;\nexports.limitToScale = limitToScale;\nexports.roundToPrecision = roundToPrecision;\nexports.omit = omit;\nexports.setCaretPosition = setCaretPosition;\n\n\n// basic noop function\nfunction noop() {}\nfunction returnTrue() {\n return true;\n}\n\nfunction charIsNumber(char) {\n return !!(char || '').match(/\\d/);\n}\n\nfunction escapeRegExp(str) {\n return str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, \"\\\\$&\");\n}\n\nfunction fixLeadingZero(numStr) {\n if (!numStr) return numStr;\n var isNegative = numStr[0] === '-';\n if (isNegative) numStr = numStr.substring(1, numStr.length);\n var parts = numStr.split('.');\n var beforeDecimal = parts[0].replace(/^0+/, '') || '0';\n var afterDecimal = parts[1] || '';\n\n return '' + (isNegative ? '-' : '') + beforeDecimal + (afterDecimal ? '.' + afterDecimal : '');\n}\n\nfunction splitString(str, index) {\n return [str.substring(0, index), str.substring(index)];\n}\n\n/**\r\n * limit decimal numbers to given scale\r\n * Not used .fixedTo because that will break with big numbers\r\n */\nfunction limitToScale(numStr, scale, fixedDecimalScale) {\n var str = '';\n var filler = fixedDecimalScale ? '0' : '';\n for (var i = 0; i <= scale - 1; i++) {\n str += numStr[i] || filler;\n }\n return str;\n}\n\n/**\r\n * This method is required to round prop value to given scale.\r\n * Not used .round or .fixedTo because that will break with big numbers\r\n */\nfunction roundToPrecision(numStr, scale, fixedDecimalScale) {\n var numberParts = numStr.split('.');\n var roundedDecimalParts = parseFloat('0.' + (numberParts[1] || '0')).toFixed(scale).split('.');\n var intPart = numberParts[0].split('').reverse().reduce(function (roundedStr, current, idx) {\n if (roundedStr.length > idx) {\n return (Number(roundedStr[0]) + Number(current)).toString() + roundedStr.substring(1, roundedStr.length);\n }\n return current + roundedStr;\n }, roundedDecimalParts[0]);\n\n var decimalPart = limitToScale(roundedDecimalParts[1] || '', (numberParts[1] || '').length, fixedDecimalScale);\n\n return intPart + (decimalPart ? '.' + decimalPart : '');\n}\n\nfunction omit(obj, keyMaps) {\n var filteredObj = {};\n Object.keys(obj).forEach(function (key) {\n if (!keyMaps[key]) filteredObj[key] = obj[key];\n });\n return filteredObj;\n}\n\n/** set the caret positon in an input field **/\nfunction setCaretPosition(el, caretPos) {\n el.value = el.value;\n // ^ this is used to not only get \"focus\", but\n // to make sure we don't have it everything -selected-\n // (it causes an issue in chrome, and having it doesn't hurt any other browser)\n if (el !== null) {\n if (el.createTextRange) {\n var range = el.createTextRange();\n range.move('character', caretPos);\n range.select();\n return true;\n }\n // (el.selectionStart === 0 added for Firefox bug)\n if (el.selectionStart || el.selectionStart === 0) {\n el.focus();\n el.setSelectionRange(caretPos, caretPos);\n return true;\n }\n\n // fail city, fortunately this never happens (as far as I've tested) :)\n el.focus();\n return false;\n }\n}\n\nvar thousandGroupSpacing = exports.thousandGroupSpacing = {\n two: '2',\n twoScaled: '2s',\n three: '3',\n four: '4'\n};","/*!\n * react-filepond v7.1.2\n * A handy FilePond adapter component for React\n * \n * Copyright (c) 2022 PQINA\n * https://pqina.nl/filepond\n * \n * Licensed under the MIT license.\n */\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.FilePond = exports.FileStatus = exports.registerPlugin = undefined;\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require(\"react\");\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _filepond = require(\"filepond\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n// Import required methods and styles from the FilePond module, should not need anything else\n\n\n// We need to be able to call the registerPlugin method directly so we can add plugins\nexports.registerPlugin = _filepond.registerPlugin;\nexports.FileStatus = _filepond.FileStatus;\n\n// Do this once\n\nvar isSupported = (0, _filepond.supported)();\n\n// filtered methods\nvar filteredMethods = [\"setOptions\", \"on\", \"off\", \"onOnce\", \"appendTo\", \"insertAfter\", \"insertBefore\", \"isAttachedTo\", \"replaceElement\", \"restoreElement\", \"destroy\"];\n\n// The React <FilePond/> wrapper\n\nvar FilePond = exports.FilePond = function (_React$Component) {\n _inherits(FilePond, _React$Component);\n\n function FilePond(props) {\n _classCallCheck(this, FilePond);\n\n var _this = _possibleConstructorReturn(this, (FilePond.__proto__ || Object.getPrototypeOf(FilePond)).call(this, props));\n\n _this.allowFilesSync = true;\n return _this;\n }\n\n // Will setup FilePond instance when mounted\n\n\n _createClass(FilePond, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n // clone the input so we can restore it in unmount\n this._input = this._element.querySelector('input[type=\"file\"]');\n this._inputClone = this._input.cloneNode();\n\n // exit here if not supported\n if (!isSupported) return;\n\n var options = Object.assign({}, this.props);\n\n // if onupdate files is defined, make sure setFiles does not cause race condition\n if (options.onupdatefiles) {\n var cb = options.onupdatefiles;\n options.onupdatefiles = function (items) {\n _this2.allowFilesSync = false;\n cb(items);\n };\n }\n\n // Create our pond\n this._pond = (0, _filepond.create)(this._input, options);\n\n // Reference pond methods to FilePond component instance\n Object.keys(this._pond).filter(function (key) {\n return !filteredMethods.includes(key);\n }).forEach(function (key) {\n _this2[key] = _this2._pond[key];\n });\n }\n\n // Will clean up FilePond instance when unmounted\n\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n // exit when no pond defined\n if (!this._pond) return;\n\n // This fixed <Strict> errors\n\n // FilePond destroy is async so we have to move FilePond to a bin element so it can no longer affect current element tree as React unmount / mount is sync\n var bin = document.createElement(\"div\");\n bin.append(this._pond.element);\n bin.id = \"foo\";\n\n // now we call destroy so FilePond can start it's destroy logic\n this._pond.destroy();\n this._pond = undefined;\n\n // we re-add the original file input element so everything is as it was before\n this._element.append(this._inputClone);\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate() {\n if (!this.allowFilesSync) {\n this.allowFilesSync = true;\n return false;\n }\n return true;\n }\n\n // Something changed\n\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n // exit when no pond defined\n if (!this._pond) return;\n\n var options = Object.assign({}, this.props);\n\n // this is only set onces, on didmount\n delete options.onupdatefiles;\n\n // update pond options based on new props\n this._pond.setOptions(options);\n }\n\n // Renders basic element hook for FilePond to attach to\n\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var _props = this.props,\n id = _props.id,\n name = _props.name,\n className = _props.className,\n allowMultiple = _props.allowMultiple,\n required = _props.required,\n captureMethod = _props.captureMethod,\n acceptedFileTypes = _props.acceptedFileTypes;\n\n return (0, _react.createElement)(\"div\", {\n className: \"filepond--wrapper\",\n ref: function ref(element) {\n return _this3._element = element;\n }\n }, (0, _react.createElement)(\"input\", {\n type: \"file\",\n name: name,\n id: id,\n accept: acceptedFileTypes,\n multiple: allowMultiple,\n required: required,\n className: className,\n capture: captureMethod\n }));\n }\n }]);\n\n return FilePond;\n}(_react2.default.Component);\n\n\n","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.GOOGLE_MAP_SCRIPT_BASE_URL = void 0;\nvar GOOGLE_MAP_SCRIPT_BASE_URL = \"https://maps.googleapis.com/maps/api/js\";\nexports.GOOGLE_MAP_SCRIPT_BASE_URL = GOOGLE_MAP_SCRIPT_BASE_URL;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = usePlacesAutocompleteService;\n\nvar _react = require(\"react\");\n\nvar _lodash = _interopRequireDefault(require(\"lodash.debounce\"));\n\nvar _utils = require(\"./utils\");\n\nvar _constants = require(\"./constants\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction usePlacesAutocompleteService(_ref) {\n var apiKey = _ref.apiKey,\n _ref$libraries = _ref.libraries,\n libraries = _ref$libraries === void 0 ? \"places\" : _ref$libraries,\n _ref$googleMapsScript = _ref.googleMapsScriptBaseUrl,\n googleMapsScriptBaseUrl = _ref$googleMapsScript === void 0 ? _constants.GOOGLE_MAP_SCRIPT_BASE_URL : _ref$googleMapsScript,\n _ref$debounce = _ref.debounce,\n debounce = _ref$debounce === void 0 ? 300 : _ref$debounce,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n sessionToken = _ref.sessionToken,\n language = _ref.language;\n var languageQueryParam = language ? \"&language=\".concat(language) : \"\";\n var googleMapsScriptUrl = \"\".concat(googleMapsScriptBaseUrl, \"?key=\").concat(apiKey, \"&libraries=\").concat(libraries).concat(languageQueryParam);\n\n var _useState = (0, _react.useState)([]),\n _useState2 = _slicedToArray(_useState, 2),\n placePredictions = _useState2[0],\n setPlacePredictions = _useState2[1];\n\n var _useState3 = (0, _react.useState)(false),\n _useState4 = _slicedToArray(_useState3, 2),\n isPlacePredsLoading = _useState4[0],\n setIsPlacePredsLoading = _useState4[1];\n\n var _useState5 = (0, _react.useState)(null),\n _useState6 = _slicedToArray(_useState5, 2),\n placeInputValue = _useState6[0],\n setPlaceInputValue = _useState6[1];\n\n var _useState7 = (0, _react.useState)(false),\n _useState8 = _slicedToArray(_useState7, 2),\n isQueryPredsLoading = _useState8[0],\n setIsQueryPredsLoading = _useState8[1];\n\n var _useState9 = (0, _react.useState)(false),\n _useState10 = _slicedToArray(_useState9, 2),\n queryInputValue = _useState10[0],\n setQueryInputValue = _useState10[1];\n\n var _useState11 = (0, _react.useState)([]),\n _useState12 = _slicedToArray(_useState11, 2),\n queryPredictions = _useState12[0],\n setQueryPredictions = _useState12[1];\n\n var placesAutocompleteService = (0, _react.useRef)(null);\n var placesService = (0, _react.useRef)(null);\n var autocompleteSession = (0, _react.useRef)(null);\n var handleLoadScript = (0, _react.useCallback)(function () {\n return (0, _utils.loadGoogleMapScript)(googleMapsScriptBaseUrl, googleMapsScriptUrl);\n }, [googleMapsScriptBaseUrl, googleMapsScriptUrl]);\n var debouncedPlacePredictions = (0, _react.useCallback)((0, _lodash.default)(function (optionsArg) {\n if (placesAutocompleteService.current && optionsArg.input) placesAutocompleteService.current.getPlacePredictions(_objectSpread(_objectSpread(_objectSpread({}, sessionToken && autocompleteSession.current ? {\n sessionToken: autocompleteSession.current\n } : {}), options), optionsArg), function (r) {\n setIsPlacePredsLoading(false);\n setPlacePredictions(r || []);\n });\n }, debounce), [debounce]);\n var debouncedQueryPredictions = (0, _react.useCallback)((0, _lodash.default)(function (optionsArg) {\n if (placesAutocompleteService.current && optionsArg.input) placesAutocompleteService.current.getQueryPredictions(_objectSpread(_objectSpread(_objectSpread({}, sessionToken && autocompleteSession.current ? {\n sessionToken: autocompleteSession.current\n } : {}), options), optionsArg), function (r) {\n setIsQueryPredsLoading(false);\n setQueryPredictions(r || []);\n });\n }, debounce), [debounce]);\n (0, _react.useEffect)(function () {\n if (!_utils.isBrowser) return;\n\n var buildService = function buildService() {\n // eslint-disable-next-line no-undef\n if (!google) return console.error(\"Google has not been found. Make sure your provide apiKey prop.\"); // eslint-disable-next-line no-undef\n\n placesAutocompleteService.current = new google.maps.places.AutocompleteService(); // eslint-disable-next-line no-undef\n\n placesService.current = new google.maps.places.PlacesService(document.createElement(\"div\"));\n if (sessionToken) autocompleteSession.current = new google.maps.places.AutocompleteSessionToken();\n };\n\n if (apiKey) {\n handleLoadScript().then(function () {\n return buildService();\n });\n } else {\n buildService();\n }\n }, []);\n return {\n placesService: placesService.current,\n autocompleteSessionToken: autocompleteSession.current,\n placesAutocompleteService: placesAutocompleteService.current,\n placePredictions: placeInputValue ? placePredictions : [],\n isPlacePredictionsLoading: isPlacePredsLoading,\n getPlacePredictions: function getPlacePredictions(opt) {\n if (opt.input) {\n setPlaceInputValue(opt.input);\n setIsPlacePredsLoading(true);\n debouncedPlacePredictions(opt);\n return;\n }\n\n setPlacePredictions([]);\n setPlaceInputValue(null);\n debouncedPlacePredictions(opt);\n setIsPlacePredsLoading(false);\n },\n queryPredictions: queryInputValue ? queryPredictions : [],\n isQueryPredictionsLoading: isQueryPredsLoading,\n getQueryPredictions: function getQueryPredictions(opt) {\n if (opt.input) {\n setQueryInputValue(opt.input);\n setIsQueryPredsLoading(true);\n debouncedQueryPredictions(opt);\n return;\n }\n\n setQueryPredictions([]);\n setQueryInputValue(null);\n debouncedQueryPredictions(opt);\n setIsQueryPredsLoading(false);\n },\n refreshSessionToken: function refreshSessionToken() {\n autocompleteSession.current = new google.maps.places.AutocompleteSessionToken();\n }\n };\n}","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.loadGoogleMapScript = exports.isBrowser = void 0;\nvar isBrowser = typeof window !== \"undefined\" && window.document;\nexports.isBrowser = isBrowser;\n\nvar loadGoogleMapScript = function loadGoogleMapScript(googleMapsScriptBaseUrl, googleMapsScriptUrl) {\n if (!isBrowser) return Promise.resolve();\n\n if (typeof google !== \"undefined\") {\n if (google.maps && google.maps.api) return Promise.resolve();\n }\n\n var scriptElements = document.querySelectorAll(\"script[src*=\\\"\".concat(googleMapsScriptBaseUrl, \"\\\"]\"));\n\n if (scriptElements && scriptElements.length) {\n return new Promise(function (resolve) {\n // in case we already have a script on the page and it's loaded we resolve\n if (typeof google !== \"undefined\") return resolve(); // otherwise we wait until it's loaded and resolve\n\n scriptElements[0].addEventListener(\"load\", function () {\n return resolve();\n });\n });\n }\n\n var scriptUrl = new URL(googleMapsScriptUrl);\n scriptUrl.searchParams.set(\"callback\", \"__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__\");\n var el = document.createElement(\"script\");\n el.src = scriptUrl.toString();\n return new Promise(function (resolve) {\n window.__REACT_GOOGLE_AUTOCOMPLETE_CALLBACK__ = resolve;\n document.body.appendChild(el);\n });\n};\n\nexports.loadGoogleMapScript = loadGoogleMapScript;","/* eslint-disable import/no-unresolved */\n\nif (process.env.NODE_ENV === \"production\") {\n module.exports = require(\"./lib/react-input-mask.production.min.js\");\n} else {\n module.exports = require(\"./lib/react-input-mask.development.js\");\n}\n","\"use strict\";function t(t){return t&&\"object\"==typeof t&&\"default\"in t?t.default:t}var e=require(\"react\"),n=t(e),i=require(\"react-dom\");require(\"prop-types\");var r=t(require(\"invariant\"));function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,function(t,e){for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var r=n[i],a=Object.getOwnPropertyDescriptor(e,r);a&&a.configurable&&void 0===t[r]&&Object.defineProperty(t,r,a)}}(t,e)}function l(t,e){if(null==t)return{};var n,i,r={},a=Object.keys(t);for(i=0;i<a.length;i++)n=a[i],e.indexOf(n)>=0||(r[n]=t[n]);return r}function u(t){return requestAnimationFrame(t)}function s(t){cancelAnimationFrame(t)}function c(t){var e=t.ownerDocument;return e.hasFocus()&&e.activeElement===t}function f(t){return null==t?void 0:t.ownerDocument}function h(t){var e=function(t){var e;return null==(e=f(t))?void 0:e.defaultView}(t);return!!e&&t instanceof e.HTMLElement}function g(t){return e.useCallback((function(){var e=t.current,n=\"undefined\"!=typeof window&&h(e);if(!e||!n)return null;if(\"INPUT\"!==e.nodeName&&(e=e.querySelector(\"input\")),!e)throw new Error(\"react-input-mask: inputComponent doesn't contain input node\");return e}),[t])}function v(t,n){var i,r,a,o,l=e.useRef({start:null,end:null}),f=g(t),h=e.useCallback((function(){return function(t){var e=t.selectionStart,n=t.selectionEnd;return{start:e,end:n,length:n-e}}(f())}),[f]),v=e.useCallback((function(){return l.current}),[]),d=e.useCallback((function(t){var e=f();e&&c(e)&&(!function(t,e,n){void 0===n&&(n=e),t.setSelectionRange(e,n)}(e,t.start,t.end),l.current=h())}),[f,h]),p=e.useCallback((function(){l.current=h()}),[h]),m=(i=p,r=e.useRef(null),a=e.useCallback((function(){null===r.current&&function t(){i(),r.current=u(t)}()}),[i]),o=e.useCallback((function(){s(r.current),r.current=null}),[]),e.useEffect((function(){r.current&&(o(),a())}),[a,o]),e.useEffect(s,[]),[a,o]),P=m[0],k=m[1];return e.useLayoutEffect((function(){if(n){var t=f();return t.addEventListener(\"focus\",P),t.addEventListener(\"blur\",k),c(t)&&P(),function(){t.removeEventListener(\"focus\",P),t.removeEventListener(\"blur\",k),k()}}})),{getSelection:h,getLastSelection:v,setSelection:d}}function d(t,n){var i=e.useRef(),r=v(i,n),a=r.getSelection,o=r.getLastSelection,l=r.setSelection,u=function(t,n){var i=g(t),r=e.useRef(n);return{getValue:e.useCallback((function(){return i().value}),[i]),getLastValue:e.useCallback((function(){return r.current}),[]),setValue:e.useCallback((function(t){r.current=t;var e=i();e&&(e.value=t)}),[i])}}(i,t),s=u.getValue,c=u.getLastValue,f=u.setValue;return{inputRef:i,getInputState:function(){return{value:s(),selection:a()}},getLastInputState:function(){return{value:c(),selection:o()}},setInputState:function(t){var e=t.value,n=t.selection;f(e),l(n)}}}require(\"warning\");var p=[\"disabled\",\"onBlur\",\"onChange\",\"onFocus\",\"onMouseDown\",\"readOnly\",\"value\"],m={9:/[0-9]/,a:/[A-Za-z]/,\"*\":/[A-Za-z0-9]/};var P=function(t){var e=this;this.isCharacterAllowedAtPosition=function(t,n){var i=e.maskOptions.maskPlaceholder;return!!e.isCharacterFillingPosition(t,n)||!!i&&i[n]===t},this.isCharacterFillingPosition=function(t,n){var i=e.maskOptions.mask;if(!t||n>=i.length)return!1;if(!e.isPositionEditable(n))return i[n]===t;var r=i[n];return new RegExp(r).test(t)},this.isPositionEditable=function(t){var n=e.maskOptions,i=n.mask,r=n.permanents;return t<i.length&&-1===r.indexOf(t)},this.isValueEmpty=function(t){return t.split(\"\").every((function(t,n){return!e.isPositionEditable(n)||!e.isCharacterFillingPosition(t,n)}))},this.isValueFilled=function(t){return e.getFilledLength(t)===e.maskOptions.lastEditablePosition+1},this.getDefaultSelectionForValue=function(t){var n=e.getFilledLength(t),i=e.getRightEditablePosition(n);return{start:i,end:i}},this.getFilledLength=function(t){return function(t,e){for(var n=t.length-1;n>=0;n--){if(e(t[n],n))return n}return-1}(t.split(\"\"),(function(t,n){return e.isPositionEditable(n)&&e.isCharacterFillingPosition(t,n)}))+1},this.getStringFillingLengthAtPosition=function(t,n){return t.split(\"\").reduce((function(t,n){return e.insertCharacterAtPosition(t,n,t.length)}),function(t,e){void 0===e&&(e=1);for(var n=\"\",i=0;i<e;i++)n+=t;return n}(\" \",n)).length-n},this.getLeftEditablePosition=function(t){for(var n=t;n>=0;n--)if(e.isPositionEditable(n))return n;return null},this.getRightEditablePosition=function(t){for(var n=e.maskOptions.mask,i=t;i<n.length;i++)if(e.isPositionEditable(i))return i;return null},this.formatValue=function(t){var n=e.maskOptions,i=n.maskPlaceholder,r=n.mask;if(!i){for(t=e.insertStringAtPosition(\"\",t,0);t.length<r.length&&!e.isPositionEditable(t.length);)t+=r[t.length];return t}return e.insertStringAtPosition(i,t,0)},this.clearRange=function(t,n,i){if(!i)return t;var r=n+i,a=e.maskOptions,o=a.maskPlaceholder,l=a.mask,u=t.split(\"\").map((function(t,i){var a=e.isPositionEditable(i);return!o&&i>=r&&!a?\"\":i<n||i>=r?t:a?o?o[i]:\"\":l[i]})).join(\"\");return e.formatValue(u)},this.insertCharacterAtPosition=function(t,n,i){var r=e.maskOptions,a=r.mask,o=r.maskPlaceholder;if(i>=a.length)return t;var l=e.isCharacterAllowedAtPosition(n,i),u=e.isPositionEditable(i),s=e.getRightEditablePosition(i),c=o&&s?n===o[s]:null,f=t.slice(0,i);!l&&u||(t=f+(l?n:a[i]));return l||u||c||(t=e.insertCharacterAtPosition(t,n,i+1)),t},this.insertStringAtPosition=function(t,n,i){var r=e.maskOptions,a=r.mask,o=r.maskPlaceholder;if(!n||i>=a.length)return t;var l=n.split(\"\"),u=e.isValueFilled(t)||!!o,s=t.slice(i);if(t=l.reduce((function(t,n){return e.insertCharacterAtPosition(t,n,t.length)}),t.slice(0,i)),u)t+=s.slice(t.length-i);else if(e.isValueFilled(t))t+=a.slice(t.length).join(\"\");else{t=s.split(\"\").filter((function(t,n){return e.isPositionEditable(i+n)})).reduce((function(t,n){var i=e.getRightEditablePosition(t.length);return null===i?t:(e.isPositionEditable(t.length)||(t+=a.slice(t.length,i).join(\"\")),e.insertCharacterAtPosition(t,n,t.length))}),t)}return t},this.processChange=function(t,n){var i=e.maskOptions,r=i.mask,a=i.prefix,o=i.lastEditablePosition,l=t.value,u=t.selection,s=n.value,c=n.selection,f=l,h=\"\",g=0,v=0,d=Math.min(c.start,u.start);if(u.end>c.start?(h=f.slice(c.start,u.end),v=(g=e.getStringFillingLengthAtPosition(h,d))?c.length:0):f.length<s.length&&(v=s.length-f.length),f=s,v){if(1===v&&!c.length)d=c.start===u.start?e.getRightEditablePosition(u.start):e.getLeftEditablePosition(u.start);f=e.clearRange(f,d,v)}return f=e.insertStringAtPosition(f,h,d),(d+=g)>=r.length?d=r.length:d<a.length&&!g?d=a.length:d>=a.length&&d<o&&g&&(d=e.getRightEditablePosition(d)),{value:f=e.formatValue(f),enteredString:h,selection:{start:d,end:d}}},this.maskOptions=function(t){var e=t.mask,n=t.maskPlaceholder,i=[];if(!e)return{maskPlaceholder:null,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};if(\"string\"==typeof e){var r=!1,a=\"\";e.split(\"\").forEach((function(t){r||\"\\\\\"!==t?(!r&&m[t]||i.push(a.length),a+=t,r=!1):r=!0})),e=a.split(\"\").map((function(t,e){return-1===i.indexOf(e)?m[t]:t}))}else e.forEach((function(t,e){\"string\"==typeof t&&i.push(e)}));n&&(n=1===n.length?e.map((function(t,e){return-1!==i.indexOf(e)?t:n})):n.split(\"\"),i.forEach((function(t){n[t]=e[t]})),n=n.join(\"\"));for(var o=i.filter((function(t,e){return t===e})).map((function(t){return e[t]})).join(\"\"),l=e.length-1;-1!==i.indexOf(l);)l--;return{maskPlaceholder:n,prefix:o,mask:e,lastEditablePosition:l,permanents:i}}(t)},k=function(t){function e(){return t.apply(this,arguments)||this}return o(e,t),e.prototype.render=function(){var t=this.props,e=t.children,i=l(t,[\"children\"]);return n.cloneElement(e,i)},e}(n.Component),b=e.forwardRef((function(t,o){var s=t.alwaysShowMask,h=t.children,v=t.mask,m=t.maskPlaceholder,b=t.beforeMaskedStateChange,E=l(t,[\"alwaysShowMask\",\"children\",\"mask\",\"maskPlaceholder\",\"beforeMaskedStateChange\"]);!function(t){var e=t.mask,n=t.maskPlaceholder;e&&n&&1!==n.length&&n.length!==e.length&&r(!1)}(t);var S,C,y=new P({mask:v,maskPlaceholder:m}),w=!!v,O=!E.disabled&&!E.readOnly,V=null!==t.value&&void 0!==t.value,F=(S=w,C=e.useRef(),e.useEffect((function(){C.current=S})),C.current),L=d(function(t){return\"\"+t}((V?t.value:t.defaultValue)||\"\"),w),A=L.inputRef,R=L.getInputState,M=L.setInputState,x=L.getLastInputState,D=g(A);if(w&&V){var j=D(),I=j&&c(j)||s||t.value?y.formatValue(t.value):t.value;b&&(I=b({nextState:{value:I,selection:{start:null,end:null}}}).value),M(a({},x(),{value:I}))}var q=x(),N=q.selection,B=q.value;e.useLayoutEffect((function(){if(w){var t=c(D()),e=N,n=R(),i=a({},n);if(!V){var r=n.value,o=y.formatValue(r),l=y.isValueEmpty(o);!l||t||s?i.value=o:l&&!t&&(i.value=\"\")}t&&!F?i.selection=y.getDefaultSelectionForValue(i.value):V&&t&&e&&null!==e.start&&null!==e.end&&(i.selection=e),b&&(i=b({currentState:n,nextState:i})),M(i)}}));var T=a({},E,{onFocus:function(e){A.current=e.target;var n=R().value;if(w&&!y.isValueFilled(n)){var i=y.formatValue(n),r=y.getDefaultSelectionForValue(i),a={value:i,selection:r};b&&(i=(a=b({currentState:R(),nextState:a})).value,r=a.selection),M(a),i!==n&&t.onChange&&t.onChange(e),u((function(){M(x())}))}t.onFocus&&t.onFocus(e)},onBlur:function(e){var n=R().value,i=x().value;if(w&&!s&&y.isValueEmpty(i)){var r=\"\",a={value:r,selection:{start:null,end:null}};b&&(r=(a=b({currentState:R(),nextState:a})).value),M(a),r!==n&&t.onChange&&t.onChange(e)}t.onBlur&&t.onBlur(e)},onChange:w&&O?function(e){var n=R(),i=x(),r=y.processChange(n,i);b&&(r=b({currentState:n,previousState:i,nextState:r})),M(r),t.onChange&&t.onChange(e)}:t.onChange,onMouseDown:w&&O?function(e){var n=D(),i=R().value,r=f(n);if(!c(n)&&!y.isValueFilled(i)){var o=e.clientX,l=e.clientY,u=(new Date).getTime();r.addEventListener(\"mouseup\",(function t(e){if(r.removeEventListener(\"mouseup\",t),c(n)){var i=Math.abs(e.clientX-o),s=Math.abs(e.clientY-l),f=Math.max(i,s),h=(new Date).getTime()-u;if(f<=10&&h<=200||f<=5&&h<=300){var g=x(),v=a({},g,{selection:y.getDefaultSelectionForValue(g.value)});M(v)}}}))}t.onMouseDown&&t.onMouseDown(e)}:t.onMouseDown,ref:function(t){A.current=i.findDOMNode(t),!function(t){return\"function\"==typeof t}(o)?null!==o&&\"object\"==typeof o&&(o.current=t):o(t)},value:w&&V?B:t.value});return h?(function(t,e){p.filter((function(n){return null!=e.props[n]&&e.props[n]!==t[n]})).length&&r(!1)}(t,h),n.createElement(k,T,h)):n.createElement(\"input\",T)}));b.displayName=\"InputMask\",b.defaultProps={alwaysShowMask:!1,maskPlaceholder:\"_\"},module.exports=b;\n","import { __assign } from \"tslib\";\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport * as React from 'react';\nimport { invariantIntlContext } from '../utils';\nfunction getDisplayName(Component) {\n return Component.displayName || Component.name || 'Component';\n}\n// This is primarily dealing with packaging systems where multiple copies of react-intl\n// might exist\nvar IntlContext = typeof window !== 'undefined' && !window.__REACT_INTL_BYPASS_GLOBAL_CONTEXT__\n ? window.__REACT_INTL_CONTEXT__ ||\n (window.__REACT_INTL_CONTEXT__ = React.createContext(null))\n : React.createContext(null);\nvar IntlConsumer = IntlContext.Consumer, IntlProvider = IntlContext.Provider;\nexport var Provider = IntlProvider;\nexport var Context = IntlContext;\nexport default function injectIntl(WrappedComponent, options) {\n var _a = options || {}, _b = _a.intlPropName, intlPropName = _b === void 0 ? 'intl' : _b, _c = _a.forwardRef, forwardRef = _c === void 0 ? false : _c, _d = _a.enforceContext, enforceContext = _d === void 0 ? true : _d;\n var WithIntl = function (props) { return (React.createElement(IntlConsumer, null, function (intl) {\n var _a;\n if (enforceContext) {\n invariantIntlContext(intl);\n }\n var intlProp = (_a = {}, _a[intlPropName] = intl, _a);\n return (React.createElement(WrappedComponent, __assign({}, props, intlProp, { ref: forwardRef ? props.forwardedRef : null })));\n })); };\n WithIntl.displayName = \"injectIntl(\".concat(getDisplayName(WrappedComponent), \")\");\n WithIntl.WrappedComponent = WrappedComponent;\n if (forwardRef) {\n return hoistNonReactStatics(\n // @ts-expect-error\n React.forwardRef(function (props, ref) { return (React.createElement(WithIntl, __assign({}, props, { forwardedRef: ref }))); }), WrappedComponent);\n }\n return hoistNonReactStatics(WithIntl, WrappedComponent);\n}\n","import * as React from 'react';\nimport { invariantIntlContext } from '../utils';\nimport { Context } from './injectIntl';\nexport default function useIntl() {\n var intl = React.useContext(Context);\n invariantIntlContext(intl);\n return intl;\n}\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { DEFAULT_INTL_CONFIG as CORE_DEFAULT_INTL_CONFIG } from '@formatjs/intl';\nexport function invariant(condition, message, Err) {\n if (Err === void 0) { Err = Error; }\n if (!condition) {\n throw new Err(message);\n }\n}\nexport function invariantIntlContext(intl) {\n invariant(intl, '[React Intl] Could not find required `intl` object. ' +\n '<IntlProvider> needs to exist in the component ancestry.');\n}\nexport var DEFAULT_INTL_CONFIG = __assign(__assign({}, CORE_DEFAULT_INTL_CONFIG), { textComponent: React.Fragment });\n/**\n * Takes a `formatXMLElementFn`, and composes it in function, which passes\n * argument `parts` through, assigning unique key to each part, to prevent\n * \"Each child in a list should have a unique \"key\"\" React error.\n * @param formatXMLElementFn\n */\nexport function assignUniqueKeysToParts(formatXMLElementFn) {\n return function (parts) {\n // eslint-disable-next-line prefer-rest-params\n return formatXMLElementFn(React.Children.toArray(parts));\n };\n}\nexport function shallowEqual(objA, objB) {\n if (objA === objB) {\n return true;\n }\n if (!objA || !objB) {\n return false;\n }\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n if (bKeys.length !== len) {\n return false;\n }\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n if (objA[key] !== objB[key] ||\n !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n return true;\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","!function(e,a){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=a(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],a):\"object\"==typeof exports?exports.ReactPaginate=a(require(\"react\")):e.ReactPaginate=a(e.React)}(this,(e=>(()=>{var a={703:(e,a,t)=>{\"use strict\";var r=t(414);function n(){}function i(){}i.resetWarningCache=n,e.exports=function(){function e(e,a,t,n,i,s){if(s!==r){var o=new Error(\"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types\");throw o.name=\"Invariant Violation\",o}}function a(){return e}e.isRequired=e;var t={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:a,element:e,elementType:e,instanceOf:a,node:e,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:i,resetWarningCache:n};return t.PropTypes=t,t}},697:(e,a,t)=>{e.exports=t(703)()},414:e=>{\"use strict\";e.exports=\"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED\"},98:a=>{\"use strict\";a.exports=e}},t={};function r(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return a[e](i,i.exports,r),i.exports}r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a}),a},r.d=(e,a)=>{for(var t in a)r.o(a,t)&&!r.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),r.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var n={};return(()=>{\"use strict\";r.r(n),r.d(n,{default:()=>k});var e=r(98),a=r.n(e),t=r(697),i=r.n(t);function s(){return s=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},s.apply(this,arguments)}var o=function(e){var t=e.pageClassName,r=e.pageLinkClassName,n=e.page,i=e.selected,o=e.activeClassName,l=e.activeLinkClassName,c=e.getEventListener,p=e.pageSelectedHandler,u=e.href,g=e.extraAriaContext,d=e.pageLabelBuilder,f=e.rel,b=e.ariaLabel||\"Page \"+n+(g?\" \"+g:\"\"),v=null;return i&&(v=\"page\",b=e.ariaLabel||\"Page \"+n+\" is your current page\",t=void 0!==t?t+\" \"+o:o,void 0!==r?void 0!==l&&(r=r+\" \"+l):r=l),a().createElement(\"li\",{className:t},a().createElement(\"a\",s({rel:f,role:u?void 0:\"button\",className:r,href:u,tabIndex:i?\"-1\":\"0\",\"aria-label\":b,\"aria-current\":v,onKeyPress:p},c(p)),d(n)))};o.propTypes={pageSelectedHandler:i().func.isRequired,selected:i().bool.isRequired,pageClassName:i().string,pageLinkClassName:i().string,activeClassName:i().string,activeLinkClassName:i().string,extraAriaContext:i().string,href:i().string,ariaLabel:i().string,page:i().number.isRequired,getEventListener:i().func.isRequired,pageLabelBuilder:i().func.isRequired,rel:i().string};const l=o;function c(){return c=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},c.apply(this,arguments)}var p=function(e){var t=e.breakLabel,r=e.breakAriaLabel,n=e.breakClassName,i=e.breakLinkClassName,s=e.breakHandler,o=e.getEventListener,l=n||\"break\";return a().createElement(\"li\",{className:l},a().createElement(\"a\",c({className:i,role:\"button\",tabIndex:\"0\",\"aria-label\":r,onKeyPress:s},o(s)),t))};p.propTypes={breakLabel:i().oneOfType([i().string,i().node]),breakAriaLabel:i().string,breakClassName:i().string,breakLinkClassName:i().string,breakHandler:i().func.isRequired,getEventListener:i().func.isRequired};const u=p;function g(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:\"\";return null!=e?e:a}function d(e){return d=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e},d(e)}function f(){return f=Object.assign?Object.assign.bind():function(e){for(var a=1;a<arguments.length;a++){var t=arguments[a];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},f.apply(this,arguments)}function b(e,a){for(var t=0;t<a.length;t++){var r=a[t];r.enumerable=r.enumerable||!1,r.configurable=!0,\"value\"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,a){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,a){return e.__proto__=a,e},v(e,a)}function h(e,a){if(a&&(\"object\"===d(a)||\"function\"==typeof a))return a;if(void 0!==a)throw new TypeError(\"Derived constructors may only return object or undefined\");return m(e)}function m(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function C(e,a,t){return a in e?Object.defineProperty(e,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[a]=t,e}var P=function(e){!function(e,a){if(\"function\"!=typeof a&&null!==a)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(a&&a.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,\"prototype\",{writable:!1}),a&&v(e,a)}(o,e);var t,r,n,i,s=(n=o,i=function(){if(\"undefined\"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if(\"function\"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,a=y(n);if(i){var t=y(this).constructor;e=Reflect.construct(a,arguments,t)}else e=a.apply(this,arguments);return h(this,e)});function o(e){var t,r;return function(e,a){if(!(e instanceof a))throw new TypeError(\"Cannot call a class as a function\")}(this,o),C(m(t=s.call(this,e)),\"handlePreviousPage\",(function(e){var a=t.state.selected;t.handleClick(e,null,a>0?a-1:void 0,{isPrevious:!0})})),C(m(t),\"handleNextPage\",(function(e){var a=t.state.selected,r=t.props.pageCount;t.handleClick(e,null,a<r-1?a+1:void 0,{isNext:!0})})),C(m(t),\"handlePageSelected\",(function(e,a){if(t.state.selected===e)return t.callActiveCallback(e),void t.handleClick(a,null,void 0,{isActive:!0});t.handleClick(a,null,e)})),C(m(t),\"handlePageChange\",(function(e){t.state.selected!==e&&(t.setState({selected:e}),t.callCallback(e))})),C(m(t),\"getEventListener\",(function(e){return C({},t.props.eventListener,e)})),C(m(t),\"handleClick\",(function(e,a,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=n.isPrevious,s=void 0!==i&&i,o=n.isNext,l=void 0!==o&&o,c=n.isBreak,p=void 0!==c&&c,u=n.isActive,g=void 0!==u&&u;e.preventDefault?e.preventDefault():e.returnValue=!1;var d=t.state.selected,f=t.props.onClick,b=r;if(f){var v=f({index:a,selected:d,nextSelectedPage:r,event:e,isPrevious:s,isNext:l,isBreak:p,isActive:g});if(!1===v)return;Number.isInteger(v)&&(b=v)}void 0!==b&&t.handlePageChange(b)})),C(m(t),\"handleBreakClick\",(function(e,a){var r=t.state.selected;t.handleClick(a,e,r<e?t.getForwardJump():t.getBackwardJump(),{isBreak:!0})})),C(m(t),\"callCallback\",(function(e){void 0!==t.props.onPageChange&&\"function\"==typeof t.props.onPageChange&&t.props.onPageChange({selected:e})})),C(m(t),\"callActiveCallback\",(function(e){void 0!==t.props.onPageActive&&\"function\"==typeof t.props.onPageActive&&t.props.onPageActive({selected:e})})),C(m(t),\"getElementPageRel\",(function(e){var a=t.state.selected,r=t.props,n=r.nextPageRel,i=r.prevPageRel,s=r.selectedPageRel;return a-1===e?i:a===e?s:a+1===e?n:void 0})),C(m(t),\"pagination\",(function(){var e=[],r=t.props,n=r.pageRangeDisplayed,i=r.pageCount,s=r.marginPagesDisplayed,o=r.breakLabel,l=r.breakClassName,c=r.breakLinkClassName,p=r.breakAriaLabels,g=t.state.selected;if(i<=n)for(var d=0;d<i;d++)e.push(t.getPageElement(d));else{var f=n/2,b=n-f;g>i-n/2?f=n-(b=i-g):g<n/2&&(b=n-(f=g));var v,h,m=function(e){return t.getPageElement(e)},y=[];for(v=0;v<i;v++){var C=v+1;if(C<=s)y.push({type:\"page\",index:v,display:m(v)});else if(C>i-s)y.push({type:\"page\",index:v,display:m(v)});else if(v>=g-f&&v<=g+(0===g&&n>1?b-1:b))y.push({type:\"page\",index:v,display:m(v)});else if(o&&y.length>0&&y[y.length-1].display!==h&&(n>0||s>0)){var P=v<g?p.backward:p.forward;h=a().createElement(u,{key:v,breakAriaLabel:P,breakLabel:o,breakClassName:l,breakLinkClassName:c,breakHandler:t.handleBreakClick.bind(null,v),getEventListener:t.getEventListener}),y.push({type:\"break\",index:v,display:h})}}y.forEach((function(a,t){var r=a;\"break\"===a.type&&y[t-1]&&\"page\"===y[t-1].type&&y[t+1]&&\"page\"===y[t+1].type&&y[t+1].index-y[t-1].index<=2&&(r={type:\"page\",index:a.index,display:m(a.index)}),e.push(r.display)}))}return e})),void 0!==e.initialPage&&void 0!==e.forcePage&&console.warn(\"(react-paginate): Both initialPage (\".concat(e.initialPage,\") and forcePage (\").concat(e.forcePage,\") props are provided, which is discouraged.\")+\" Use exclusively forcePage prop for a controlled component.\\nSee https://reactjs.org/docs/forms.html#controlled-components\"),r=e.initialPage?e.initialPage:e.forcePage?e.forcePage:0,t.state={selected:r},t}return t=o,(r=[{key:\"componentDidMount\",value:function(){var e=this.props,a=e.initialPage,t=e.disableInitialCallback,r=e.extraAriaContext,n=e.pageCount,i=e.forcePage;void 0===a||t||this.callCallback(a),r&&console.warn(\"DEPRECATED (react-paginate): The extraAriaContext prop is deprecated. You should now use the ariaLabelBuilder instead.\"),Number.isInteger(n)||console.warn(\"(react-paginate): The pageCount prop value provided is not an integer (\".concat(n,\"). Did you forget a Math.ceil()?\")),void 0!==a&&a>n-1&&console.warn(\"(react-paginate): The initialPage prop provided is greater than the maximum page index from pageCount prop (\".concat(a,\" > \").concat(n-1,\").\")),void 0!==i&&i>n-1&&console.warn(\"(react-paginate): The forcePage prop provided is greater than the maximum page index from pageCount prop (\".concat(i,\" > \").concat(n-1,\").\"))}},{key:\"componentDidUpdate\",value:function(e){void 0!==this.props.forcePage&&this.props.forcePage!==e.forcePage&&(this.props.forcePage>this.props.pageCount-1&&console.warn(\"(react-paginate): The forcePage prop provided is greater than the maximum page index from pageCount prop (\".concat(this.props.forcePage,\" > \").concat(this.props.pageCount-1,\").\")),this.setState({selected:this.props.forcePage})),Number.isInteger(e.pageCount)&&!Number.isInteger(this.props.pageCount)&&console.warn(\"(react-paginate): The pageCount prop value provided is not an integer (\".concat(this.props.pageCount,\"). Did you forget a Math.ceil()?\"))}},{key:\"getForwardJump\",value:function(){var e=this.state.selected,a=this.props,t=a.pageCount,r=e+a.pageRangeDisplayed;return r>=t?t-1:r}},{key:\"getBackwardJump\",value:function(){var e=this.state.selected-this.props.pageRangeDisplayed;return e<0?0:e}},{key:\"getElementHref\",value:function(e){var a=this.props,t=a.hrefBuilder,r=a.pageCount,n=a.hrefAllControls;if(t)return n||e>=0&&e<r?t(e+1,r,this.state.selected):void 0}},{key:\"ariaLabelBuilder\",value:function(e){var a=e===this.state.selected;if(this.props.ariaLabelBuilder&&e>=0&&e<this.props.pageCount){var t=this.props.ariaLabelBuilder(e+1,a);return this.props.extraAriaContext&&!a&&(t=t+\" \"+this.props.extraAriaContext),t}}},{key:\"getPageElement\",value:function(e){var t=this.state.selected,r=this.props,n=r.pageClassName,i=r.pageLinkClassName,s=r.activeClassName,o=r.activeLinkClassName,c=r.extraAriaContext,p=r.pageLabelBuilder;return a().createElement(l,{key:e,pageSelectedHandler:this.handlePageSelected.bind(null,e),selected:t===e,rel:this.getElementPageRel(e),pageClassName:n,pageLinkClassName:i,activeClassName:s,activeLinkClassName:o,extraAriaContext:c,href:this.getElementHref(e),ariaLabel:this.ariaLabelBuilder(e),page:e+1,pageLabelBuilder:p,getEventListener:this.getEventListener})}},{key:\"render\",value:function(){var e=this.props.renderOnZeroPageCount;if(0===this.props.pageCount&&void 0!==e)return e?e(this.props):e;var t=this.props,r=t.disabledClassName,n=t.disabledLinkClassName,i=t.pageCount,s=t.className,o=t.containerClassName,l=t.previousLabel,c=t.previousClassName,p=t.previousLinkClassName,u=t.previousAriaLabel,d=t.prevRel,b=t.nextLabel,v=t.nextClassName,h=t.nextLinkClassName,m=t.nextAriaLabel,y=t.nextRel,C=this.state.selected,P=0===C,k=C===i-1,x=\"\".concat(g(c)).concat(P?\" \".concat(g(r)):\"\"),L=\"\".concat(g(v)).concat(k?\" \".concat(g(r)):\"\"),N=\"\".concat(g(p)).concat(P?\" \".concat(g(n)):\"\"),O=\"\".concat(g(h)).concat(k?\" \".concat(g(n)):\"\"),R=P?\"true\":\"false\",E=k?\"true\":\"false\";return a().createElement(\"ul\",{className:s||o,role:\"navigation\",\"aria-label\":\"Pagination\"},a().createElement(\"li\",{className:x},a().createElement(\"a\",f({className:N,href:this.getElementHref(C-1),tabIndex:P?\"-1\":\"0\",role:\"button\",onKeyPress:this.handlePreviousPage,\"aria-disabled\":R,\"aria-label\":u,rel:d},this.getEventListener(this.handlePreviousPage)),l)),this.pagination(),a().createElement(\"li\",{className:L},a().createElement(\"a\",f({className:O,href:this.getElementHref(C+1),tabIndex:k?\"-1\":\"0\",role:\"button\",onKeyPress:this.handleNextPage,\"aria-disabled\":E,\"aria-label\":m,rel:y},this.getEventListener(this.handleNextPage)),b)))}}])&&b(t.prototype,r),Object.defineProperty(t,\"prototype\",{writable:!1}),o}(e.Component);C(P,\"propTypes\",{pageCount:i().number.isRequired,pageRangeDisplayed:i().number,marginPagesDisplayed:i().number,previousLabel:i().node,previousAriaLabel:i().string,prevPageRel:i().string,prevRel:i().string,nextLabel:i().node,nextAriaLabel:i().string,nextPageRel:i().string,nextRel:i().string,breakLabel:i().oneOfType([i().string,i().node]),breakAriaLabels:i().shape({forward:i().string,backward:i().string}),hrefBuilder:i().func,hrefAllControls:i().bool,onPageChange:i().func,onPageActive:i().func,onClick:i().func,initialPage:i().number,forcePage:i().number,disableInitialCallback:i().bool,containerClassName:i().string,className:i().string,pageClassName:i().string,pageLinkClassName:i().string,pageLabelBuilder:i().func,activeClassName:i().string,activeLinkClassName:i().string,previousClassName:i().string,nextClassName:i().string,previousLinkClassName:i().string,nextLinkClassName:i().string,disabledClassName:i().string,disabledLinkClassName:i().string,breakClassName:i().string,breakLinkClassName:i().string,extraAriaContext:i().string,ariaLabelBuilder:i().func,eventListener:i().string,renderOnZeroPageCount:i().func,selectedPageRel:i().string}),C(P,\"defaultProps\",{pageRangeDisplayed:2,marginPagesDisplayed:3,activeClassName:\"selected\",previousLabel:\"Previous\",previousClassName:\"previous\",previousAriaLabel:\"Previous page\",prevPageRel:\"prev\",prevRel:\"prev\",nextLabel:\"Next\",nextClassName:\"next\",nextAriaLabel:\"Next page\",nextPageRel:\"next\",nextRel:\"next\",breakLabel:\"...\",breakAriaLabels:{forward:\"Jump forward\",backward:\"Jump backward\"},disabledClassName:\"disabled\",disableInitialCallback:!1,pageLabelBuilder:function(e){return e},eventListener:\"onClick\",renderOnZeroPageCount:void 0,selectedPageRel:\"canonical\",hrefAllControls:!1});const k=P})(),n})()));\n//# sourceMappingURL=react-paginate.js.map","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t(require(\"react\")):\"function\"==typeof define&&define.amd?define([\"react\"],t):\"object\"==typeof exports?exports.ReactPhoneInput=t(require(\"react\")):e.ReactPhoneInput=t(e.React)}(this,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"\",r(r.s=8)}([function(t,r){t.exports=e},function(e,t,r){var n;\n/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/*!\n Copyright (c) 2017 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n!function(){\"use strict\";var r={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var o=typeof n;if(\"string\"===o||\"number\"===o)e.push(n);else if(Array.isArray(n)&&n.length){var i=a.apply(null,n);i&&e.push(i)}else if(\"object\"===o)for(var u in n)r.call(n,u)&&n[u]&&e.push(u)}}return e.join(\" \")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},function(e,t){var r;r=function(){return this}();try{r=r||new Function(\"return this\")()}catch(e){\"object\"==typeof window&&(r=window)}e.exports=r},function(e,t,r){(function(t){var r=\"Expected a function\",n=\"__lodash_hash_undefined__\",a=\"[object Function]\",o=\"[object GeneratorFunction]\",i=/^\\[object .+?Constructor\\]$/,u=\"object\"==typeof t&&t&&t.Object===Object&&t,c=\"object\"==typeof self&&self&&self.Object===Object&&self,s=u||c||Function(\"return this\")();var l,f=Array.prototype,d=Function.prototype,p=Object.prototype,h=s[\"__core-js_shared__\"],y=(l=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+l:\"\",m=d.toString,g=p.hasOwnProperty,b=p.toString,v=RegExp(\"^\"+m.call(g).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),C=f.splice,_=I(s,\"Map\"),w=I(Object,\"create\");function S(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function j(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function k(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function x(e,t){for(var r,n,a=e.length;a--;)if((r=e[a][0])===(n=t)||r!=r&&n!=n)return a;return-1}function O(e){return!(!N(e)||(t=e,y&&y in t))&&(function(e){var t=N(e)?b.call(e):\"\";return t==a||t==o}(e)||function(e){var t=!1;if(null!=e&&\"function\"!=typeof e.toString)try{t=!!(e+\"\")}catch(e){}return t}(e)?v:i).test(function(e){if(null!=e){try{return m.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}(e));var t}function E(e,t){var r,n,a=e.__data__;return(\"string\"==(n=typeof(r=t))||\"number\"==n||\"symbol\"==n||\"boolean\"==n?\"__proto__\"!==r:null===r)?a[\"string\"==typeof t?\"string\":\"hash\"]:a.map}function I(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return O(r)?r:void 0}function T(e,t){if(\"function\"!=typeof e||t&&\"function\"!=typeof t)throw new TypeError(r);var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i),i};return n.cache=new(T.Cache||k),n}function N(e){var t=typeof e;return!!e&&(\"object\"==t||\"function\"==t)}S.prototype.clear=function(){this.__data__=w?w(null):{}},S.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},S.prototype.get=function(e){var t=this.__data__;if(w){var r=t[e];return r===n?void 0:r}return g.call(t,e)?t[e]:void 0},S.prototype.has=function(e){var t=this.__data__;return w?void 0!==t[e]:g.call(t,e)},S.prototype.set=function(e,t){return this.__data__[e]=w&&void 0===t?n:t,this},j.prototype.clear=function(){this.__data__=[]},j.prototype.delete=function(e){var t=this.__data__,r=x(t,e);return!(r<0||(r==t.length-1?t.pop():C.call(t,r,1),0))},j.prototype.get=function(e){var t=this.__data__,r=x(t,e);return r<0?void 0:t[r][1]},j.prototype.has=function(e){return x(this.__data__,e)>-1},j.prototype.set=function(e,t){var r=this.__data__,n=x(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},k.prototype.clear=function(){this.__data__={hash:new S,map:new(_||j),string:new S}},k.prototype.delete=function(e){return E(this,e).delete(e)},k.prototype.get=function(e){return E(this,e).get(e)},k.prototype.has=function(e){return E(this,e).has(e)},k.prototype.set=function(e,t){return E(this,e).set(e,t),this},T.Cache=k,e.exports=T}).call(this,r(2))},function(e,t,r){(function(t){var r=\"Expected a function\",n=NaN,a=\"[object Symbol]\",o=/^\\s+|\\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,c=/^0o[0-7]+$/i,s=parseInt,l=\"object\"==typeof t&&t&&t.Object===Object&&t,f=\"object\"==typeof self&&self&&self.Object===Object&&self,d=l||f||Function(\"return this\")(),p=Object.prototype.toString,h=Math.max,y=Math.min,m=function(){return d.Date.now()};function g(e){var t=typeof e;return!!e&&(\"object\"==t||\"function\"==t)}function b(e){if(\"number\"==typeof e)return e;if(function(e){return\"symbol\"==typeof e||function(e){return!!e&&\"object\"==typeof e}(e)&&p.call(e)==a}(e))return n;if(g(e)){var t=\"function\"==typeof e.valueOf?e.valueOf():e;e=g(t)?t+\"\":t}if(\"string\"!=typeof e)return 0===e?e:+e;e=e.replace(o,\"\");var r=u.test(e);return r||c.test(e)?s(e.slice(2),r?2:8):i.test(e)?n:+e}e.exports=function(e,t,n){var a,o,i,u,c,s,l=0,f=!1,d=!1,p=!0;if(\"function\"!=typeof e)throw new TypeError(r);function v(t){var r=a,n=o;return a=o=void 0,l=t,u=e.apply(n,r)}function C(e){var r=e-s;return void 0===s||r>=t||r<0||d&&e-l>=i}function _(){var e=m();if(C(e))return w(e);c=setTimeout(_,function(e){var r=t-(e-s);return d?y(r,i-(e-l)):r}(e))}function w(e){return c=void 0,p&&a?v(e):(a=o=void 0,u)}function S(){var e=m(),r=C(e);if(a=arguments,o=this,s=e,r){if(void 0===c)return function(e){return l=e,c=setTimeout(_,t),f?v(e):u}(s);if(d)return c=setTimeout(_,t),v(s)}return void 0===c&&(c=setTimeout(_,t)),u}return t=b(t)||0,g(n)&&(f=!!n.leading,i=(d=\"maxWait\"in n)?h(b(n.maxWait)||0,t):i,p=\"trailing\"in n?!!n.trailing:p),S.cancel=function(){void 0!==c&&clearTimeout(c),l=0,a=s=o=c=void 0},S.flush=function(){return void 0===c?u:w(m())},S}}).call(this,r(2))},function(e,t,r){(function(e,r){var n=200,a=\"Expected a function\",o=\"__lodash_hash_undefined__\",i=1,u=2,c=1/0,s=9007199254740991,l=\"[object Arguments]\",f=\"[object Array]\",d=\"[object Boolean]\",p=\"[object Date]\",h=\"[object Error]\",y=\"[object Function]\",m=\"[object GeneratorFunction]\",g=\"[object Map]\",b=\"[object Number]\",v=\"[object Object]\",C=\"[object RegExp]\",_=\"[object Set]\",w=\"[object String]\",S=\"[object Symbol]\",j=\"[object ArrayBuffer]\",k=\"[object DataView]\",x=/\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,O=/^\\w*$/,E=/^\\./,I=/[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g,T=/\\\\(\\\\)?/g,N=/^\\[object .+?Constructor\\]$/,A=/^(?:0|[1-9]\\d*)$/,D={};D[\"[object Float32Array]\"]=D[\"[object Float64Array]\"]=D[\"[object Int8Array]\"]=D[\"[object Int16Array]\"]=D[\"[object Int32Array]\"]=D[\"[object Uint8Array]\"]=D[\"[object Uint8ClampedArray]\"]=D[\"[object Uint16Array]\"]=D[\"[object Uint32Array]\"]=!0,D[l]=D[f]=D[j]=D[d]=D[k]=D[p]=D[h]=D[y]=D[g]=D[b]=D[v]=D[C]=D[_]=D[w]=D[\"[object WeakMap]\"]=!1;var P=\"object\"==typeof e&&e&&e.Object===Object&&e,M=\"object\"==typeof self&&self&&self.Object===Object&&self,R=P||M||Function(\"return this\")(),z=t&&!t.nodeType&&t,F=z&&\"object\"==typeof r&&r&&!r.nodeType&&r,B=F&&F.exports===z&&P.process,L=function(){try{return B&&B.binding(\"util\")}catch(e){}}(),G=L&&L.isTypedArray;function K(e,t,r,n){var a=-1,o=e?e.length:0;for(n&&o&&(r=e[++a]);++a<o;)r=t(r,e[a],a,e);return r}function $(e,t){for(var r=-1,n=e?e.length:0;++r<n;)if(t(e[r],r,e))return!0;return!1}function W(e,t,r,n,a){return a(e,function(e,a,o){r=n?(n=!1,e):t(r,e,a,o)}),r}function q(e){var t=!1;if(null!=e&&\"function\"!=typeof e.toString)try{t=!!(e+\"\")}catch(e){}return t}function U(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function V(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var H,Z,J,Q=Array.prototype,Y=Function.prototype,X=Object.prototype,ee=R[\"__core-js_shared__\"],te=(H=/[^.]+$/.exec(ee&&ee.keys&&ee.keys.IE_PROTO||\"\"))?\"Symbol(src)_1.\"+H:\"\",re=Y.toString,ne=X.hasOwnProperty,ae=X.toString,oe=RegExp(\"^\"+re.call(ne).replace(/[\\\\^$.*+?()[\\]{}|]/g,\"\\\\$&\").replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g,\"$1.*?\")+\"$\"),ie=R.Symbol,ue=R.Uint8Array,ce=X.propertyIsEnumerable,se=Q.splice,le=(Z=Object.keys,J=Object,function(e){return Z(J(e))}),fe=qe(R,\"DataView\"),de=qe(R,\"Map\"),pe=qe(R,\"Promise\"),he=qe(R,\"Set\"),ye=qe(R,\"WeakMap\"),me=qe(Object,\"create\"),ge=Xe(fe),be=Xe(de),ve=Xe(pe),Ce=Xe(he),_e=Xe(ye),we=ie?ie.prototype:void 0,Se=we?we.valueOf:void 0,je=we?we.toString:void 0;function ke(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function xe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Oe(e){var t=-1,r=e?e.length:0;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Ee(e){var t=-1,r=e?e.length:0;for(this.__data__=new Oe;++t<r;)this.add(e[t])}function Ie(e){this.__data__=new xe(e)}function Te(e,t){var r=nt(e)||rt(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,a=!!n;for(var o in e)!t&&!ne.call(e,o)||a&&(\"length\"==o||Ve(o,n))||r.push(o);return r}function Ne(e,t){for(var r=e.length;r--;)if(tt(e[r][0],t))return r;return-1}ke.prototype.clear=function(){this.__data__=me?me(null):{}},ke.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},ke.prototype.get=function(e){var t=this.__data__;if(me){var r=t[e];return r===o?void 0:r}return ne.call(t,e)?t[e]:void 0},ke.prototype.has=function(e){var t=this.__data__;return me?void 0!==t[e]:ne.call(t,e)},ke.prototype.set=function(e,t){return this.__data__[e]=me&&void 0===t?o:t,this},xe.prototype.clear=function(){this.__data__=[]},xe.prototype.delete=function(e){var t=this.__data__,r=Ne(t,e);return!(r<0||(r==t.length-1?t.pop():se.call(t,r,1),0))},xe.prototype.get=function(e){var t=this.__data__,r=Ne(t,e);return r<0?void 0:t[r][1]},xe.prototype.has=function(e){return Ne(this.__data__,e)>-1},xe.prototype.set=function(e,t){var r=this.__data__,n=Ne(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},Oe.prototype.clear=function(){this.__data__={hash:new ke,map:new(de||xe),string:new ke}},Oe.prototype.delete=function(e){return We(this,e).delete(e)},Oe.prototype.get=function(e){return We(this,e).get(e)},Oe.prototype.has=function(e){return We(this,e).has(e)},Oe.prototype.set=function(e,t){return We(this,e).set(e,t),this},Ee.prototype.add=Ee.prototype.push=function(e){return this.__data__.set(e,o),this},Ee.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.clear=function(){this.__data__=new xe},Ie.prototype.delete=function(e){return this.__data__.delete(e)},Ie.prototype.get=function(e){return this.__data__.get(e)},Ie.prototype.has=function(e){return this.__data__.has(e)},Ie.prototype.set=function(e,t){var r=this.__data__;if(r instanceof xe){var a=r.__data__;if(!de||a.length<n-1)return a.push([e,t]),this;r=this.__data__=new Oe(a)}return r.set(e,t),this};var Ae,De,Pe=(Ae=function(e,t){return e&&Me(e,t,ft)},function(e,t){if(null==e)return e;if(!at(e))return Ae(e,t);for(var r=e.length,n=De?r:-1,a=Object(e);(De?n--:++n<r)&&!1!==t(a[n],n,a););return e}),Me=function(e){return function(t,r,n){for(var a=-1,o=Object(t),i=n(t),u=i.length;u--;){var c=i[e?u:++a];if(!1===r(o[c],c,o))break}return t}}();function Re(e,t){for(var r=0,n=(t=He(t,e)?[t]:Ke(t)).length;null!=e&&r<n;)e=e[Ye(t[r++])];return r&&r==n?e:void 0}function ze(e,t){return null!=e&&t in Object(e)}function Fe(e,t,r,n,a){return e===t||(null==e||null==t||!ut(e)&&!ct(t)?e!=e&&t!=t:function(e,t,r,n,a,o){var c=nt(e),s=nt(t),y=f,m=f;c||(y=(y=Ue(e))==l?v:y);s||(m=(m=Ue(t))==l?v:m);var x=y==v&&!q(e),O=m==v&&!q(t),E=y==m;if(E&&!x)return o||(o=new Ie),c||lt(e)?$e(e,t,r,n,a,o):function(e,t,r,n,a,o,c){switch(r){case k:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case j:return!(e.byteLength!=t.byteLength||!n(new ue(e),new ue(t)));case d:case p:case b:return tt(+e,+t);case h:return e.name==t.name&&e.message==t.message;case C:case w:return e==t+\"\";case g:var s=U;case _:var l=o&u;if(s||(s=V),e.size!=t.size&&!l)return!1;var f=c.get(e);if(f)return f==t;o|=i,c.set(e,t);var y=$e(s(e),s(t),n,a,o,c);return c.delete(e),y;case S:if(Se)return Se.call(e)==Se.call(t)}return!1}(e,t,y,r,n,a,o);if(!(a&u)){var I=x&&ne.call(e,\"__wrapped__\"),T=O&&ne.call(t,\"__wrapped__\");if(I||T){var N=I?e.value():e,A=T?t.value():t;return o||(o=new Ie),r(N,A,n,a,o)}}if(!E)return!1;return o||(o=new Ie),function(e,t,r,n,a,o){var i=a&u,c=ft(e),s=c.length,l=ft(t).length;if(s!=l&&!i)return!1;for(var f=s;f--;){var d=c[f];if(!(i?d in t:ne.call(t,d)))return!1}var p=o.get(e);if(p&&o.get(t))return p==t;var h=!0;o.set(e,t),o.set(t,e);for(var y=i;++f<s;){d=c[f];var m=e[d],g=t[d];if(n)var b=i?n(g,m,d,t,e,o):n(m,g,d,e,t,o);if(!(void 0===b?m===g||r(m,g,n,a,o):b)){h=!1;break}y||(y=\"constructor\"==d)}if(h&&!y){var v=e.constructor,C=t.constructor;v!=C&&\"constructor\"in e&&\"constructor\"in t&&!(\"function\"==typeof v&&v instanceof v&&\"function\"==typeof C&&C instanceof C)&&(h=!1)}return o.delete(e),o.delete(t),h}(e,t,r,n,a,o)}(e,t,Fe,r,n,a))}function Be(e){return!(!ut(e)||(t=e,te&&te in t))&&(ot(e)||q(e)?oe:N).test(Xe(e));var t}function Le(e){return\"function\"==typeof e?e:null==e?dt:\"object\"==typeof e?nt(e)?function(e,t){if(He(e)&&Ze(t))return Je(Ye(e),t);return function(r){var n=function(e,t,r){var n=null==e?void 0:Re(e,t);return void 0===n?r:n}(r,e);return void 0===n&&n===t?function(e,t){return null!=e&&function(e,t,r){t=He(t,e)?[t]:Ke(t);var n,a=-1,o=t.length;for(;++a<o;){var i=Ye(t[a]);if(!(n=null!=e&&r(e,i)))break;e=e[i]}if(n)return n;return!!(o=e?e.length:0)&&it(o)&&Ve(i,o)&&(nt(e)||rt(e))}(e,t,ze)}(r,e):Fe(t,n,void 0,i|u)}}(e[0],e[1]):function(e){var t=function(e){var t=ft(e),r=t.length;for(;r--;){var n=t[r],a=e[n];t[r]=[n,a,Ze(a)]}return t}(e);if(1==t.length&&t[0][2])return Je(t[0][0],t[0][1]);return function(r){return r===e||function(e,t,r,n){var a=r.length,o=a,c=!n;if(null==e)return!o;for(e=Object(e);a--;){var s=r[a];if(c&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<o;){var l=(s=r[a])[0],f=e[l],d=s[1];if(c&&s[2]){if(void 0===f&&!(l in e))return!1}else{var p=new Ie;if(n)var h=n(f,d,l,e,t,p);if(!(void 0===h?Fe(d,f,n,i|u,p):h))return!1}}return!0}(r,e,t)}}(e):He(t=e)?(r=Ye(t),function(e){return null==e?void 0:e[r]}):function(e){return function(t){return Re(t,e)}}(t);var t,r}function Ge(e){if(r=(t=e)&&t.constructor,n=\"function\"==typeof r&&r.prototype||X,t!==n)return le(e);var t,r,n,a=[];for(var o in Object(e))ne.call(e,o)&&\"constructor\"!=o&&a.push(o);return a}function Ke(e){return nt(e)?e:Qe(e)}function $e(e,t,r,n,a,o){var c=a&u,s=e.length,l=t.length;if(s!=l&&!(c&&l>s))return!1;var f=o.get(e);if(f&&o.get(t))return f==t;var d=-1,p=!0,h=a&i?new Ee:void 0;for(o.set(e,t),o.set(t,e);++d<s;){var y=e[d],m=t[d];if(n)var g=c?n(m,y,d,t,e,o):n(y,m,d,e,t,o);if(void 0!==g){if(g)continue;p=!1;break}if(h){if(!$(t,function(e,t){if(!h.has(t)&&(y===e||r(y,e,n,a,o)))return h.add(t)})){p=!1;break}}else if(y!==m&&!r(y,m,n,a,o)){p=!1;break}}return o.delete(e),o.delete(t),p}function We(e,t){var r,n,a=e.__data__;return(\"string\"==(n=typeof(r=t))||\"number\"==n||\"symbol\"==n||\"boolean\"==n?\"__proto__\"!==r:null===r)?a[\"string\"==typeof t?\"string\":\"hash\"]:a.map}function qe(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return Be(r)?r:void 0}var Ue=function(e){return ae.call(e)};function Ve(e,t){return!!(t=null==t?s:t)&&(\"number\"==typeof e||A.test(e))&&e>-1&&e%1==0&&e<t}function He(e,t){if(nt(e))return!1;var r=typeof e;return!(\"number\"!=r&&\"symbol\"!=r&&\"boolean\"!=r&&null!=e&&!st(e))||(O.test(e)||!x.test(e)||null!=t&&e in Object(t))}function Ze(e){return e==e&&!ut(e)}function Je(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}(fe&&Ue(new fe(new ArrayBuffer(1)))!=k||de&&Ue(new de)!=g||pe&&\"[object Promise]\"!=Ue(pe.resolve())||he&&Ue(new he)!=_||ye&&\"[object WeakMap]\"!=Ue(new ye))&&(Ue=function(e){var t=ae.call(e),r=t==v?e.constructor:void 0,n=r?Xe(r):void 0;if(n)switch(n){case ge:return k;case be:return g;case ve:return\"[object Promise]\";case Ce:return _;case _e:return\"[object WeakMap]\"}return t});var Qe=et(function(e){var t;e=null==(t=e)?\"\":function(e){if(\"string\"==typeof e)return e;if(st(e))return je?je.call(e):\"\";var t=e+\"\";return\"0\"==t&&1/e==-c?\"-0\":t}(t);var r=[];return E.test(e)&&r.push(\"\"),e.replace(I,function(e,t,n,a){r.push(n?a.replace(T,\"$1\"):t||e)}),r});function Ye(e){if(\"string\"==typeof e||st(e))return e;var t=e+\"\";return\"0\"==t&&1/e==-c?\"-0\":t}function Xe(e){if(null!=e){try{return re.call(e)}catch(e){}try{return e+\"\"}catch(e){}}return\"\"}function et(e,t){if(\"function\"!=typeof e||t&&\"function\"!=typeof t)throw new TypeError(a);var r=function(){var n=arguments,a=t?t.apply(this,n):n[0],o=r.cache;if(o.has(a))return o.get(a);var i=e.apply(this,n);return r.cache=o.set(a,i),i};return r.cache=new(et.Cache||Oe),r}function tt(e,t){return e===t||e!=e&&t!=t}function rt(e){return function(e){return ct(e)&&at(e)}(e)&&ne.call(e,\"callee\")&&(!ce.call(e,\"callee\")||ae.call(e)==l)}et.Cache=Oe;var nt=Array.isArray;function at(e){return null!=e&&it(e.length)&&!ot(e)}function ot(e){var t=ut(e)?ae.call(e):\"\";return t==y||t==m}function it(e){return\"number\"==typeof e&&e>-1&&e%1==0&&e<=s}function ut(e){var t=typeof e;return!!e&&(\"object\"==t||\"function\"==t)}function ct(e){return!!e&&\"object\"==typeof e}function st(e){return\"symbol\"==typeof e||ct(e)&&ae.call(e)==S}var lt=G?function(e){return function(t){return e(t)}}(G):function(e){return ct(e)&&it(e.length)&&!!D[ae.call(e)]};function ft(e){return at(e)?Te(e):Ge(e)}function dt(e){return e}r.exports=function(e,t,r){var n=nt(e)?K:W,a=arguments.length<3;return n(e,Le(t),r,a,Pe)}}).call(this,r(2),r(6)(e))},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,\"loaded\",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,\"id\",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,r){},function(e,t,r){\"use strict\";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e){if(Symbol.iterator in Object(e)||\"[object Arguments]\"===Object.prototype.toString.call(e))return Array.from(e)}function o(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||a(e)||function(){throw new TypeError(\"Invalid attempt to spread non-iterable instance\")}()}function i(e){return function(e){if(Array.isArray(e))return e}(e)||a(e)||function(){throw new TypeError(\"Invalid attempt to destructure non-iterable instance\")}()}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,\"value\"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e){return(c=\"function\"==typeof Symbol&&\"symbol\"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function s(e){return(s=\"function\"==typeof Symbol&&\"symbol\"===c(Symbol.iterator)?function(e){return c(e)}:function(e){return e&&\"function\"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":c(e)})(e)}function l(e){if(void 0===e)throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");return e}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}r.r(t);var p,h=r(0),y=r.n(h),m=r(4),g=r.n(m),b=r(3),v=r.n(b),C=r(5),_=r.n(C),w=r(1),S=r.n(w);var j={};function k(e,t,r){t in j||(j[t]=[]);var n=r||0;j[t][n]=e}var x={allCountries:(p=[]).concat.apply(p,o([[\"Afghanistan\",[\"asia\"],\"af\",\"93\"],[\"Albania\",[\"europe\"],\"al\",\"355\"],[\"Algeria\",[\"africa\",\"north-africa\"],\"dz\",\"213\"],[\"American Samoa\",[\"oceania\"],\"as\",\"1684\"],[\"Andorra\",[\"europe\"],\"ad\",\"376\"],[\"Angola\",[\"africa\"],\"ao\",\"244\"],[\"Anguilla\",[\"america\",\"carribean\"],\"ai\",\"1264\"],[\"Antigua and Barbuda\",[\"america\",\"carribean\"],\"ag\",\"1268\"],[\"Argentina\",[\"america\",\"south-america\"],\"ar\",\"54\",\"+.. (..) ........\"],[\"Armenia\",[\"asia\",\"ex-ussr\"],\"am\",\"374\"],[\"Aruba\",[\"america\",\"carribean\"],\"aw\",\"297\"],[\"Australia\",[\"oceania\"],\"au\",\"61\",\"+.. ... ... ...\"],[\"Austria\",[\"europe\",\"european-union\"],\"at\",\"43\"],[\"Azerbaijan\",[\"asia\",\"ex-ussr\"],\"az\",\"994\"],[\"Bahamas\",[\"america\",\"carribean\"],\"bs\",\"1242\"],[\"Bahrain\",[\"middle-east\"],\"bh\",\"973\"],[\"Bangladesh\",[\"asia\"],\"bd\",\"880\"],[\"Barbados\",[\"america\",\"carribean\"],\"bb\",\"1246\"],[\"Belarus\",[\"europe\",\"ex-ussr\"],\"by\",\"375\",\"+... (..) ... .. ..\"],[\"Belgium\",[\"europe\",\"european-union\"],\"be\",\"32\",\"+.. ... .. .. ..\"],[\"Belize\",[\"america\",\"central-america\"],\"bz\",\"501\"],[\"Benin\",[\"africa\"],\"bj\",\"229\"],[\"Bermuda\",[\"america\",\"north-america\"],\"bm\",\"1441\"],[\"Bhutan\",[\"asia\"],\"bt\",\"975\"],[\"Bolivia\",[\"america\",\"south-america\"],\"bo\",\"591\"],[\"Bosnia and Herzegovina\",[\"europe\"],\"ba\",\"387\"],[\"Botswana\",[\"africa\"],\"bw\",\"267\"],[\"Brazil\",[\"america\",\"south-america\"],\"br\",\"55\",\"+.. (..) .........\"],[\"British Indian Ocean Territory\",[\"asia\"],\"io\",\"246\"],[\"British Virgin Islands\",[\"america\",\"carribean\"],\"vg\",\"1284\"],[\"Brunei\",[\"asia\"],\"bn\",\"673\"],[\"Bulgaria\",[\"europe\",\"european-union\"],\"bg\",\"359\"],[\"Burkina Faso\",[\"africa\"],\"bf\",\"226\"],[\"Burundi\",[\"africa\"],\"bi\",\"257\"],[\"Cambodia\",[\"asia\"],\"kh\",\"855\"],[\"Cameroon\",[\"africa\"],\"cm\",\"237\"],[\"Canada\",[\"america\",\"north-america\"],\"ca\",\"1\",\"+. (...) ...-....\",1,[\"204\",\"236\",\"249\",\"250\",\"289\",\"306\",\"343\",\"365\",\"387\",\"403\",\"416\",\"418\",\"431\",\"437\",\"438\",\"450\",\"506\",\"514\",\"519\",\"548\",\"579\",\"581\",\"587\",\"604\",\"613\",\"639\",\"647\",\"672\",\"705\",\"709\",\"742\",\"778\",\"780\",\"782\",\"807\",\"819\",\"825\",\"867\",\"873\",\"902\",\"905\"]],[\"Cape Verde\",[\"africa\"],\"cv\",\"238\"],[\"Caribbean Netherlands\",[\"america\",\"carribean\"],\"bq\",\"599\",\"\",1],[\"Cayman Islands\",[\"america\",\"carribean\"],\"ky\",\"1345\"],[\"Central African Republic\",[\"africa\"],\"cf\",\"236\"],[\"Chad\",[\"africa\"],\"td\",\"235\"],[\"Chile\",[\"america\",\"south-america\"],\"cl\",\"56\"],[\"China\",[\"asia\"],\"cn\",\"86\",\"+.. ..-.........\"],[\"Colombia\",[\"america\",\"south-america\"],\"co\",\"57\"],[\"Comoros\",[\"africa\"],\"km\",\"269\"],[\"Congo\",[\"africa\"],\"cd\",\"243\"],[\"Congo\",[\"africa\"],\"cg\",\"242\"],[\"Cook Islands\",[\"oceania\"],\"ck\",\"682\"],[\"Costa Rica\",[\"america\",\"central-america\"],\"cr\",\"506\",\"+... ....-....\"],[\"Côte d’Ivoire\",[\"africa\"],\"ci\",\"225\"],[\"Croatia\",[\"europe\",\"european-union\"],\"hr\",\"385\"],[\"Cuba\",[\"america\",\"carribean\"],\"cu\",\"53\"],[\"Curaçao\",[\"america\",\"carribean\"],\"cw\",\"599\",\"\",0],[\"Cyprus\",[\"europe\",\"european-union\"],\"cy\",\"357\",\"+... .. ......\"],[\"Czech Republic\",[\"europe\",\"european-union\"],\"cz\",\"420\"],[\"Denmark\",[\"europe\",\"european-union\"],\"dk\",\"45\",\"+.. .. .. .. ..\"],[\"Djibouti\",[\"africa\"],\"dj\",\"253\"],[\"Dominica\",[\"america\",\"carribean\"],\"dm\",\"1767\"],[\"Dominican Republic\",[\"america\",\"carribean\"],\"do\",\"1\",\"\",2,[\"809\",\"829\",\"849\"]],[\"Ecuador\",[\"america\",\"south-america\"],\"ec\",\"593\"],[\"Egypt\",[\"africa\",\"north-africa\"],\"eg\",\"20\"],[\"El Salvador\",[\"america\",\"central-america\"],\"sv\",\"503\",\"+... ....-....\"],[\"Equatorial Guinea\",[\"africa\"],\"gq\",\"240\"],[\"Eritrea\",[\"africa\"],\"er\",\"291\"],[\"Estonia\",[\"europe\",\"european-union\",\"ex-ussr\"],\"ee\",\"372\",\"+... .... ......\"],[\"Ethiopia\",[\"africa\"],\"et\",\"251\"],[\"Falkland Islands\",[\"america\",\"south-america\"],\"fk\",\"500\"],[\"Faroe Islands\",[\"europe\"],\"fo\",\"298\"],[\"Fiji\",[\"oceania\"],\"fj\",\"679\"],[\"Finland\",[\"europe\",\"european-union\"],\"fi\",\"358\",\"+... .. ... .. ..\"],[\"France\",[\"europe\",\"european-union\"],\"fr\",\"33\",\"+.. . .. .. .. ..\"],[\"French Guiana\",[\"america\",\"south-america\"],\"gf\",\"594\"],[\"French Polynesia\",[\"oceania\"],\"pf\",\"689\"],[\"Gabon\",[\"africa\"],\"ga\",\"241\"],[\"Gambia\",[\"africa\"],\"gm\",\"220\"],[\"Georgia\",[\"asia\",\"ex-ussr\"],\"ge\",\"995\"],[\"Germany\",[\"europe\",\"european-union\"],\"de\",\"49\",\"+.. .... ........\"],[\"Ghana\",[\"africa\"],\"gh\",\"233\"],[\"Gibraltar\",[\"europe\"],\"gi\",\"350\"],[\"Greece\",[\"europe\",\"european-union\"],\"gr\",\"30\"],[\"Greenland\",[\"america\"],\"gl\",\"299\"],[\"Grenada\",[\"america\",\"carribean\"],\"gd\",\"1473\"],[\"Guadeloupe\",[\"america\",\"carribean\"],\"gp\",\"590\",\"\",0],[\"Guam\",[\"oceania\"],\"gu\",\"1671\"],[\"Guatemala\",[\"america\",\"central-america\"],\"gt\",\"502\",\"+... ....-....\"],[\"Guinea\",[\"africa\"],\"gn\",\"224\"],[\"Guinea-Bissau\",[\"africa\"],\"gw\",\"245\"],[\"Guyana\",[\"america\",\"south-america\"],\"gy\",\"592\"],[\"Haiti\",[\"america\",\"carribean\"],\"ht\",\"509\",\"+... ....-....\"],[\"Honduras\",[\"america\",\"central-america\"],\"hn\",\"504\"],[\"Hong Kong\",[\"asia\"],\"hk\",\"852\",\"+... .... ....\"],[\"Hungary\",[\"europe\",\"european-union\"],\"hu\",\"36\"],[\"Iceland\",[\"europe\"],\"is\",\"354\",\"+... ... ....\"],[\"India\",[\"asia\"],\"in\",\"91\",\"+.. .....-.....\"],[\"Indonesia\",[\"asia\"],\"id\",\"62\"],[\"Iran\",[\"middle-east\"],\"ir\",\"98\"],[\"Iraq\",[\"middle-east\"],\"iq\",\"964\"],[\"Ireland\",[\"europe\",\"european-union\"],\"ie\",\"353\",\"+... .. .......\"],[\"Israel\",[\"middle-east\"],\"il\",\"972\",\"+... ... ... ....\"],[\"Italy\",[\"europe\",\"european-union\"],\"it\",\"39\",\"+.. ... .......\",0],[\"Jamaica\",[\"america\",\"carribean\"],\"jm\",\"1876\"],[\"Japan\",[\"asia\"],\"jp\",\"81\",\"+.. .. .... ....\"],[\"Jordan\",[\"middle-east\"],\"jo\",\"962\"],[\"Kazakhstan\",[\"asia\",\"ex-ussr\"],\"kz\",\"7\",\"+. ... ...-..-..\",1,[\"313\",\"327\",\"7172\",\"312\",\"73622\",\"321\",\"324\",\"336\",\"318\",\"315\",\"325\",\"311\",\"326\",\"310\"]],[\"Kenya\",[\"africa\"],\"ke\",\"254\"],[\"Kiribati\",[\"oceania\"],\"ki\",\"686\"],[\"Kuwait\",[\"middle-east\"],\"kw\",\"965\"],[\"Kyrgyzstan\",[\"asia\",\"ex-ussr\"],\"kg\",\"996\"],[\"Laos\",[\"asia\"],\"la\",\"856\"],[\"Latvia\",[\"europe\",\"european-union\",\"ex-ussr\"],\"lv\",\"371\"],[\"Lebanon\",[\"middle-east\"],\"lb\",\"961\"],[\"Lesotho\",[\"africa\"],\"ls\",\"266\"],[\"Liberia\",[\"africa\"],\"lr\",\"231\"],[\"Libya\",[\"africa\",\"north-africa\"],\"ly\",\"218\"],[\"Liechtenstein\",[\"europe\"],\"li\",\"423\"],[\"Lithuania\",[\"europe\",\"european-union\",\"ex-ussr\"],\"lt\",\"370\"],[\"Luxembourg\",[\"europe\",\"european-union\"],\"lu\",\"352\"],[\"Macau\",[\"asia\"],\"mo\",\"853\"],[\"Macedonia\",[\"europe\"],\"mk\",\"389\"],[\"Madagascar\",[\"africa\"],\"mg\",\"261\"],[\"Malawi\",[\"africa\"],\"mw\",\"265\"],[\"Malaysia\",[\"asia\"],\"my\",\"60\",\"+.. ..-....-....\"],[\"Maldives\",[\"asia\"],\"mv\",\"960\"],[\"Mali\",[\"africa\"],\"ml\",\"223\"],[\"Malta\",[\"europe\",\"european-union\"],\"mt\",\"356\"],[\"Marshall Islands\",[\"oceania\"],\"mh\",\"692\"],[\"Martinique\",[\"america\",\"carribean\"],\"mq\",\"596\"],[\"Mauritania\",[\"africa\"],\"mr\",\"222\"],[\"Mauritius\",[\"africa\"],\"mu\",\"230\"],[\"Mexico\",[\"america\",\"central-america\"],\"mx\",\"52\"],[\"Micronesia\",[\"oceania\"],\"fm\",\"691\"],[\"Moldova\",[\"europe\"],\"md\",\"373\",\"+... (..) ..-..-..\"],[\"Monaco\",[\"europe\"],\"mc\",\"377\"],[\"Mongolia\",[\"asia\"],\"mn\",\"976\"],[\"Montenegro\",[\"europe\"],\"me\",\"382\"],[\"Montserrat\",[\"america\",\"carribean\"],\"ms\",\"1664\"],[\"Morocco\",[\"africa\",\"north-africa\"],\"ma\",\"212\"],[\"Mozambique\",[\"africa\"],\"mz\",\"258\"],[\"Myanmar\",[\"asia\"],\"mm\",\"95\"],[\"Namibia\",[\"africa\"],\"na\",\"264\"],[\"Nauru\",[\"africa\"],\"nr\",\"674\"],[\"Nepal\",[\"asia\"],\"np\",\"977\"],[\"Netherlands\",[\"europe\",\"european-union\"],\"nl\",\"31\",\"+.. .. ........\"],[\"New Caledonia\",[\"oceania\"],\"nc\",\"687\"],[\"New Zealand\",[\"oceania\"],\"nz\",\"64\",\"+.. ...-...-....\"],[\"Nicaragua\",[\"america\",\"central-america\"],\"ni\",\"505\"],[\"Niger\",[\"africa\"],\"ne\",\"227\"],[\"Nigeria\",[\"africa\"],\"ng\",\"234\"],[\"Niue\",[\"asia\"],\"nu\",\"683\"],[\"Norfolk Island\",[\"oceania\"],\"nf\",\"672\"],[\"North Korea\",[\"asia\"],\"kp\",\"850\"],[\"Northern Mariana Islands\",[\"oceania\"],\"mp\",\"1670\"],[\"Norway\",[\"europe\"],\"no\",\"47\",\"+.. ... .. ...\"],[\"Oman\",[\"middle-east\"],\"om\",\"968\"],[\"Pakistan\",[\"asia\"],\"pk\",\"92\",\"+.. ...-.......\"],[\"Palau\",[\"oceania\"],\"pw\",\"680\"],[\"Palestine\",[\"middle-east\"],\"ps\",\"970\"],[\"Panama\",[\"america\",\"central-america\"],\"pa\",\"507\"],[\"Papua New Guinea\",[\"oceania\"],\"pg\",\"675\"],[\"Paraguay\",[\"america\",\"south-america\"],\"py\",\"595\"],[\"Peru\",[\"america\",\"south-america\"],\"pe\",\"51\"],[\"Philippines\",[\"asia\"],\"ph\",\"63\",\"+.. .... .......\"],[\"Poland\",[\"europe\",\"european-union\"],\"pl\",\"48\",\"+.. ...-...-...\"],[\"Portugal\",[\"europe\",\"european-union\"],\"pt\",\"351\"],[\"Puerto Rico\",[\"america\",\"carribean\"],\"pr\",\"1\",\"\",3,[\"787\",\"939\"]],[\"Qatar\",[\"middle-east\"],\"qa\",\"974\"],[\"Réunion\",[\"africa\"],\"re\",\"262\"],[\"Romania\",[\"europe\",\"european-union\"],\"ro\",\"40\"],[\"Russia\",[\"europe\",\"asia\",\"ex-ussr\"],\"ru\",\"7\",\"+. (...) ...-..-..\",0],[\"Rwanda\",[\"africa\"],\"rw\",\"250\"],[\"Saint Barthélemy\",[\"america\",\"carribean\"],\"bl\",\"590\",\"\",1],[\"Saint Helena\",[\"africa\"],\"sh\",\"290\"],[\"Saint Kitts and Nevis\",[\"america\",\"carribean\"],\"kn\",\"1869\"],[\"Saint Lucia\",[\"america\",\"carribean\"],\"lc\",\"1758\"],[\"Saint Martin\",[\"america\",\"carribean\"],\"mf\",\"590\",\"\",2],[\"Saint Pierre and Miquelon\",[\"america\",\"north-america\"],\"pm\",\"508\"],[\"Saint Vincent and the Grenadines\",[\"america\",\"carribean\"],\"vc\",\"1784\"],[\"Samoa\",[\"oceania\"],\"ws\",\"685\"],[\"San Marino\",[\"europe\"],\"sm\",\"378\"],[\"São Tomé and PrÃncipe\",[\"africa\"],\"st\",\"239\"],[\"Saudi Arabia\",[\"middle-east\"],\"sa\",\"966\"],[\"Senegal\",[\"africa\"],\"sn\",\"221\"],[\"Serbia\",[\"europe\"],\"rs\",\"381\"],[\"Seychelles\",[\"africa\"],\"sc\",\"248\"],[\"Sierra Leone\",[\"africa\"],\"sl\",\"232\"],[\"Singapore\",[\"asia\"],\"sg\",\"65\",\"+.. ....-....\"],[\"Sint Maarten\",[\"america\",\"carribean\"],\"sx\",\"1721\"],[\"Slovakia\",[\"europe\",\"european-union\"],\"sk\",\"421\"],[\"Slovenia\",[\"europe\",\"european-union\"],\"si\",\"386\"],[\"Solomon Islands\",[\"oceania\"],\"sb\",\"677\"],[\"Somalia\",[\"africa\"],\"so\",\"252\"],[\"South Africa\",[\"africa\"],\"za\",\"27\"],[\"South Korea\",[\"asia\"],\"kr\",\"82\",\"+.. ... .... ....\"],[\"South Sudan\",[\"africa\",\"north-africa\"],\"ss\",\"211\"],[\"Spain\",[\"europe\",\"european-union\"],\"es\",\"34\",\"+.. ... ... ...\"],[\"Sri Lanka\",[\"asia\"],\"lk\",\"94\"],[\"Sudan\",[\"africa\"],\"sd\",\"249\"],[\"Suriname\",[\"america\",\"south-america\"],\"sr\",\"597\"],[\"Swaziland\",[\"africa\"],\"sz\",\"268\"],[\"Sweden\",[\"europe\",\"european-union\"],\"se\",\"46\",\"+.. (...) ...-...\"],[\"Switzerland\",[\"europe\"],\"ch\",\"41\",\"+.. .. ... .. ..\"],[\"Syria\",[\"middle-east\"],\"sy\",\"963\"],[\"Taiwan\",[\"asia\"],\"tw\",\"886\"],[\"Tajikistan\",[\"asia\",\"ex-ussr\"],\"tj\",\"992\"],[\"Tanzania\",[\"africa\"],\"tz\",\"255\"],[\"Thailand\",[\"asia\"],\"th\",\"66\"],[\"Timor-Leste\",[\"asia\"],\"tl\",\"670\"],[\"Togo\",[\"africa\"],\"tg\",\"228\"],[\"Tokelau\",[\"oceania\"],\"tk\",\"690\"],[\"Tonga\",[\"oceania\"],\"to\",\"676\"],[\"Trinidad and Tobago\",[\"america\",\"carribean\"],\"tt\",\"1868\"],[\"Tunisia\",[\"africa\",\"north-africa\"],\"tn\",\"216\"],[\"Turkey\",[\"europe\"],\"tr\",\"90\",\"+.. ... ... .. ..\"],[\"Turkmenistan\",[\"asia\",\"ex-ussr\"],\"tm\",\"993\"],[\"Turks and Caicos Islands\",[\"america\",\"carribean\"],\"tc\",\"1649\"],[\"Tuvalu\",[\"asia\"],\"tv\",\"688\"],[\"U.S. Virgin Islands\",[\"america\",\"carribean\"],\"vi\",\"1340\"],[\"Uganda\",[\"africa\"],\"ug\",\"256\"],[\"Ukraine\",[\"europe\",\"ex-ussr\"],\"ua\",\"380\",\"+... (..) ... .. ..\"],[\"United Arab Emirates\",[\"middle-east\"],\"ae\",\"971\"],[\"United Kingdom\",[\"europe\",\"european-union\"],\"gb\",\"44\",\"+.. .... ......\"],[\"United States\",[\"america\",\"north-america\"],\"us\",\"1\",\"+. (...) ...-....\",0,[\"907\",\"205\",\"251\",\"256\",\"334\",\"479\",\"501\",\"870\",\"480\",\"520\",\"602\",\"623\",\"928\",\"209\",\"213\",\"310\",\"323\",\"408\",\"415\",\"510\",\"530\",\"559\",\"562\",\"619\",\"626\",\"650\",\"661\",\"707\",\"714\",\"760\",\"805\",\"818\",\"831\",\"858\",\"909\",\"916\",\"925\",\"949\",\"951\",\"303\",\"719\",\"970\",\"203\",\"860\",\"202\",\"302\",\"239\",\"305\",\"321\",\"352\",\"386\",\"407\",\"561\",\"727\",\"772\",\"813\",\"850\",\"863\",\"904\",\"941\",\"954\",\"229\",\"404\",\"478\",\"706\",\"770\",\"912\",\"808\",\"319\",\"515\",\"563\",\"641\",\"712\",\"208\",\"217\",\"309\",\"312\",\"618\",\"630\",\"708\",\"773\",\"815\",\"847\",\"219\",\"260\",\"317\",\"574\",\"765\",\"812\",\"316\",\"620\",\"785\",\"913\",\"270\",\"502\",\"606\",\"859\",\"225\",\"318\",\"337\",\"504\",\"985\",\"413\",\"508\",\"617\",\"781\",\"978\",\"301\",\"410\",\"207\",\"231\",\"248\",\"269\",\"313\",\"517\",\"586\",\"616\",\"734\",\"810\",\"906\",\"989\",\"218\",\"320\",\"507\",\"612\",\"651\",\"763\",\"952\",\"314\",\"417\",\"573\",\"636\",\"660\",\"816\",\"228\",\"601\",\"662\",\"406\",\"252\",\"336\",\"704\",\"828\",\"910\",\"919\",\"701\",\"308\",\"402\",\"603\",\"201\",\"609\",\"732\",\"856\",\"908\",\"973\",\"505\",\"575\",\"702\",\"775\",\"212\",\"315\",\"516\",\"518\",\"585\",\"607\",\"631\",\"716\",\"718\",\"845\",\"914\",\"216\",\"330\",\"419\",\"440\",\"513\",\"614\",\"740\",\"937\",\"405\",\"580\",\"918\",\"503\",\"541\",\"215\",\"412\",\"570\",\"610\",\"717\",\"724\",\"814\",\"401\",\"803\",\"843\",\"864\",\"605\",\"423\",\"615\",\"731\",\"865\",\"901\",\"931\",\"210\",\"214\",\"254\",\"281\",\"325\",\"361\",\"409\",\"432\",\"512\",\"713\",\"806\",\"817\",\"830\",\"903\",\"915\",\"936\",\"940\",\"956\",\"972\",\"979\",\"435\",\"801\",\"276\",\"434\",\"540\",\"703\",\"757\",\"804\",\"802\",\"206\",\"253\",\"360\",\"425\",\"509\",\"262\",\"414\",\"608\",\"715\",\"920\",\"304\",\"307\"]],[\"Uruguay\",[\"america\",\"south-america\"],\"uy\",\"598\"],[\"Uzbekistan\",[\"asia\",\"ex-ussr\"],\"uz\",\"998\"],[\"Vanuatu\",[\"oceania\"],\"vu\",\"678\"],[\"Vatican City\",[\"europe\"],\"va\",\"39\",\"+.. .. .... ....\",1],[\"Venezuela\",[\"america\",\"south-america\"],\"ve\",\"58\"],[\"Vietnam\",[\"asia\"],\"vn\",\"84\"],[\"Wallis and Futuna\",[\"oceania\"],\"wf\",\"681\"],[\"Yemen\",[\"middle-east\"],\"ye\",\"967\"],[\"Zambia\",[\"africa\"],\"zm\",\"260\"],[\"Zimbabwe\",[\"africa\"],\"zw\",\"263\"]].map(function(e){var t={name:e[0],regions:e[1],iso2:e[2],dialCode:e[3],format:e[4]||void 0,priority:e[5]||0,hasAreaCodes:!!e[6]},r=[];return e[6]&&e[6].map(function(a){var o=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},a=Object.keys(r);\"function\"==typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),a.forEach(function(t){n(e,t,r[t])})}return e}({},t);o.regions=e[1],o.dialCode=e[3]+a,o.isAreaCode=!0,r.push(o),k(e[2],o.dialCode)}),k(t.iso2,t.dialCode,t.hasAreaCodes),r.length>0?[t].concat(r):[t]}))),allCountryCodes:j},O=(r(7),function(e){function t(e){var r,a,u;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t),a=this,u=f(t).call(this,e),(r=!u||\"object\"!==s(u)&&\"function\"!=typeof u?l(a):u).deleteAreaCodes=function(e){return e.filter(function(e){return!0!==e.isAreaCode})},r.filterRegions=function(e,t){if(\"string\"==typeof e){var r=e;return t.filter(function(e){return e.regions.some(function(e){return e===r})})}return t.filter(function(t){return e.map(function(e){return t.regions.some(function(t){return t===e})}).some(function(e){return e})})},r.insertMasks=function(e,t){var r=function(r){var n=t.findIndex(function(e){return e.iso2==r});-1!=n&&(t[n].format=e[r])};for(var n in e)r(n);return t},r.getOnlyCountries=function(e,t){return 0===e.length?t:t.filter(function(t){return e.some(function(e){return e===t.iso2})})},r.excludeCountries=function(e,t){return 0===t.length?e:e.filter(function(e){return!t.includes(e.iso2)})},r.getProbableCandidate=v()(function(e){return e&&0!==e.length?r.state.onlyCountries.filter(function(t){return t.name.toLowerCase().startsWith(e.toLowerCase())},l(l(r)))[0]:null}),r.guessSelectedCountry=v()(function(e,t,n){var a=t.find(function(e){return e.iso2==n})||{};if(\"\"===e.trim())return a;var o=t.reduce(function(t,r){if(e.startsWith(r.dialCode)){if(r.dialCode.length>t.dialCode.length)return r;if(r.dialCode.length===t.dialCode.length&&r.priority<t.priority)return r}return t},{dialCode:\"\",priority:10001},l(l(r)));return o.name?o:a}),r.updateDefaultCountry=function(e){var t=r.state.onlyCountries.find(function(t){return t.iso2==e});r.setState({defaultCountry:e,selectedCountry:t,formattedNumber:r.props.disableCountryCode?\"\":\"+\"+t.dialCode})},r.scrollTo=function(e,t){if(e){var n=r.dropdownRef;if(n&&document.body){var a=n.offsetHeight,o=n.getBoundingClientRect().top+document.body.scrollTop,i=o+a,u=e,c=u.getBoundingClientRect(),s=u.offsetHeight,l=c.top+document.body.scrollTop,f=l+s,d=l-o+n.scrollTop,p=a/2-s/2;if(l<o)t&&(d-=p),n.scrollTop=d;else if(f>i){t&&(d+=p);var h=a-s;n.scrollTop=d-h}}}},r.formatNumber=function(e,t){var n,a=r.props,o=a.disableCountryCode,u=a.enableLongNumbers,c=a.autoFormat;if(o&&t?((n=t.split(\" \")).shift(),n=n.join(\" \")):n=t,!e||0===e.length)return o?\"\":\"+\";if(e&&e.length<2||!n||!c)return o?e:\"+\".concat(e);var s,l=_()(n,function(e,t){if(0===e.remainingText.length)return e;if(\".\"!==t)return{formattedText:e.formattedText+t,remainingText:e.remainingText};var r=i(e.remainingText),n=r[0],a=r.slice(1);return{formattedText:e.formattedText+n,remainingText:a}},{formattedText:\"\",remainingText:e.split(\"\")});return(s=u?l.formattedText+l.remainingText.join(\"\"):l.formattedText).includes(\"(\")&&!s.includes(\")\")&&(s+=\")\"),s},r.cursorToEnd=function(){var e=r.numberInputRef;e.focus();var t=e.value.length;e.setSelectionRange(t,t)},r.getElement=function(e){return r[\"flag_no_\".concat(e)]},r.getCountryData=function(){return r.state.selectedCountry?{name:r.state.selectedCountry.name||\"\",dialCode:r.state.selectedCountry.dialCode||\"\",countryCode:r.state.selectedCountry.iso2||\"\"}:{}},r.handleFlagDropdownClick=function(){if(r.state.showDropdown||!r.props.disabled)if(r.state.preferredCountries.includes(r.state.selectedCountry))r.setState({showDropdown:!r.state.showDropdown,highlightCountryIndex:r.state.preferredCountries.findIndex(function(e){return e==r.state.selectedCountry})},function(){r.state.showDropdown&&r.scrollTo(r.getElement(r.state.highlightCountryIndex))});else{var e=r.props.disableAreaCodes?r.deleteAreaCodes(r.state.onlyCountries):r.state.onlyCountries;r.setState({showDropdown:!r.state.showDropdown,highlightCountryIndex:r.props.disableAreaCodes?e.findIndex(function(e){return e.iso2==r.state.selectedCountry.iso2}):e.findIndex(function(e){return e==r.state.selectedCountry})},function(){r.state.showDropdown&&r.scrollTo(r.getElement(r.state.highlightCountryIndex+r.state.preferredCountries.length))})}},r.handleInput=function(e){var t=r.props.disableCountryCode?\"\":\"+\",n=r.state.selectedCountry,a=r.state.freezeSelection;if(!r.props.countryCodeEditable){var o=\"+\"+n.dialCode;if(e.target.value.length<o.length)return}if(!(e.target.value.replace(/\\D/g,\"\").length>15)&&e.target.value!==r.state.formattedNumber){if(e.preventDefault?e.preventDefault():e.returnValue=!1,e.target.value.length>0){var i=e.target.value.replace(/\\D/g,\"\");(!r.state.freezeSelection||r.state.selectedCountry.dialCode.length>i.length)&&(n=r.guessSelectedCountry(i.substring(0,6),r.state.onlyCountries,r.state.defaultCountry),a=!1),t=r.formatNumber(i,n.format),n=n.dialCode?n:r.state.selectedCountry}var u=e.target.selectionStart,c=r.state.formattedNumber,s=t.length-c.length;r.setState({formattedNumber:t,freezeSelection:a,selectedCountry:n},function(){s>0&&(u-=s),\")\"==t.charAt(t.length-1)?r.numberInputRef.setSelectionRange(t.length-1,t.length-1):u>0&&c.length>=t.length&&r.numberInputRef.setSelectionRange(u,u),r.props.onChange&&r.props.onChange(r.state.formattedNumber,r.getCountryData())})}},r.handleInputClick=function(e){r.setState({showDropdown:!1}),r.props.onClick&&r.props.onClick(e,r.getCountryData())},r.handleFlagItemClick=function(e){var t=r.state.selectedCountry,n=r.state.onlyCountries.find(function(t){return t==e}),a=r.state.formattedNumber.replace(\" \",\"\").replace(\"(\",\"\").replace(\")\",\"\").replace(\"-\",\"\"),o=a.length>1?a.replace(t.dialCode,n.dialCode):n.dialCode,i=r.formatNumber(o.replace(/\\D/g,\"\"),n.format);r.setState({showDropdown:!1,selectedCountry:n,freezeSelection:!0,formattedNumber:i},function(){r.cursorToEnd(),r.props.onChange&&r.props.onChange(i.replace(/[^0-9]+/g,\"\"),r.getCountryData())})},r.handleInputFocus=function(e){r.numberInputRef&&\"+\"===r.numberInputRef.value&&r.state.selectedCountry&&!r.props.disableCountryCode&&r.setState({formattedNumber:\"+\"+r.state.selectedCountry.dialCode},function(){return setTimeout(r.cursorToEnd,10)}),r.setState({placeholder:\"\"}),r.props.onFocus&&r.props.onFocus(e,r.getCountryData()),setTimeout(r.cursorToEnd,10)},r.handleInputBlur=function(e){e.target.value||r.setState({placeholder:r.props.placeholder}),r.props.onBlur&&r.props.onBlur(e,r.getCountryData())},r.getHighlightCountryIndex=function(e){var t=r.state.highlightCountryIndex+e;return t<0||t>=r.state.onlyCountries.length+r.state.preferredCountries.length?t-e:t},r.searchCountry=function(){var e=r.getProbableCandidate(r.state.queryString)||r.state.onlyCountries[0],t=r.state.onlyCountries.findIndex(function(t){return t==e})+r.state.preferredCountries.length;r.scrollTo(r.getElement(t),!0),r.setState({queryString:\"\",highlightCountryIndex:t})},r.handleKeydown=function(e){var t=r.props.keys;if(r.state.showDropdown&&!r.props.disabled&&\"search-box\"!==e.target.id){e.preventDefault?e.preventDefault():e.returnValue=!1;var n=function(e){r.setState({highlightCountryIndex:r.getHighlightCountryIndex(e)},function(){r.scrollTo(r.getElement(r.state.highlightCountryIndex+r.state.preferredCountries.length),!0)})};switch(e.which){case t.DOWN:n(1);break;case t.UP:n(-1);break;case t.ENTER:r.handleFlagItemClick(r.state.onlyCountries[r.state.highlightCountryIndex],e);break;case t.ESC:r.setState({showDropdown:!1},r.cursorToEnd);break;default:(e.which>=t.A&&e.which<=t.Z||e.which===t.SPACE)&&r.setState({queryString:r.state.queryString+String.fromCharCode(e.which)},r.state.debouncedQueryStingSearcher)}}},r.handleInputKeyDown=function(e){var t=r.props.keys;e.which===t.ENTER&&r.props.onEnterKeyPress(e),r.props.onKeyDown&&r.props.onKeyDown(e)},r.handleClickOutside=function(e){r.dropdownRef&&!r.dropdownContainerRef.contains(e.target)&&r.state.showDropdown&&r.setState({showDropdown:!1})},r.handleSearchChange=function(e){var t=e.currentTarget.value;r.setState({searchValue:t})},r.getDropdownCountryName=function(e){return null!=r.props.localization[e.name]?r.props.localization[e.name]:null!=r.props.localization[e.iso2]?r.props.localization[e.iso2]:e.name},r.getCountryDropdownList=function(){var e,t=r.state,a=t.preferredCountries,i=t.onlyCountries,u=t.highlightCountryIndex,c=t.showDropdown,s=t.searchValue,l=r.props,f=l.enableSearchField,d=l.disableSearchIcon,p=l.searchClass,h=l.searchStyle,m=l.searchPlaceholder,g=r.state.preferredCountries.includes(r.state.selectedCountry),b=a.concat(i),v=s.trim().toLowerCase(),C=f&&v?o(new Set(b.filter(function(e){var t=e.name,r=e.iso2,n=e.dialCode;return[\"\".concat(t),\"\".concat(r),\"+\".concat(n)].some(function(e){return e.toLowerCase().includes(v)})}))):b;r.props.disableAreaCodes&&(C=r.deleteAreaCodes(C));var _=C.map(function(e,t){var n=S()({country:!0,preferred:\"us\"===e.iso2||\"gb\"===e.iso2,active:\"us\"===e.iso2,highlight:g?u===t:u===t-a.length}),o=\"flag \".concat(e.iso2);return y.a.createElement(\"li\",{ref:function(e){return r[\"flag_no_\".concat(t)]=e},key:\"flag_no_\".concat(t),\"data-flag-key\":\"flag_no_\".concat(t),className:n,\"data-dial-code\":\"1\",\"data-country-code\":e.iso2,onClick:function(){return r.handleFlagItemClick(e)}},y.a.createElement(\"div\",{className:o}),y.a.createElement(\"span\",{className:\"country-name\"},r.getDropdownCountryName(e)),y.a.createElement(\"span\",{className:\"dial-code\"},\"+\"+e.dialCode))}),w=y.a.createElement(\"li\",{key:\"dashes\",className:\"divider\"});a.length>0&&_.splice(a.length,0,w);var j=S()((n(e={},r.props.dropdownClass,!0),n(e,\"country-list\",!0),n(e,\"hide\",!c),e));return y.a.createElement(\"ul\",{ref:function(e){return r.dropdownRef=e},className:j,style:r.props.dropdownStyle},f&&y.a.createElement(\"li\",{className:S()(n({search:!0},p,p))},!d&&y.a.createElement(\"span\",{className:S()(n({\"search-emoji\":!0},\"\".concat(p,\"-emoji\"),p)),role:\"img\",\"aria-label\":\"Magnifying glass\"},\"🔎\"),y.a.createElement(\"input\",{className:S()(n({\"search-box\":!0},\"\".concat(p,\"-box\"),p)),style:h,id:\"search-box\",type:\"search\",placeholder:m,autoFocus:!0,value:s,onChange:r.handleSearchChange})),_.length>0?_:y.a.createElement(\"li\",{className:\"no-entries-message\"},y.a.createElement(\"span\",null,\"No entries to show.\")))};var c=x.allCountries;e.regions&&(c=r.filterRegions(e.regions,c)),0!==Object.keys(e.masks).length&&(c=r.insertMasks(e.masks,c));var d,p=r.excludeCountries(r.getOnlyCountries(e.onlyCountries,c),e.excludeCountries),h=c.filter(function(t){return e.preferredCountries.some(function(e){return e===t.iso2})}),m=e.value.replace(/[^0-9\\.]+/g,\"\")||\"\";d=m.length>1?r.guessSelectedCountry(m.substring(0,6),p,e.defaultCountry)||0:e.defaultCountry&&p.find(function(t){return t.iso2==e.defaultCountry})||0;var b,C=m.length<2&&d&&!m.replace(/\\D/g,\"\").startsWith(d.dialCode)?d.dialCode:\"\";b=\"\"===m&&0===d?\"\":r.formatNumber((e.disableCountryCode?\"\":C)+m.replace(/\\D/g,\"\"),d.name?d.format:void 0);var w=c.findIndex(function(e){return e==d});return r.state={formattedNumber:b,onlyCountries:p,preferredCountries:h,defaultCountry:e.defaultCountry,selectedCountry:d,highlightCountryIndex:w,queryString:\"\",showDropdown:!1,freezeSelection:!1,debouncedQueryStingSearcher:g()(r.searchCountry,250),searchValue:\"\"},r}var r,a,c;return function(e,t){if(\"function\"!=typeof t&&null!==t)throw new TypeError(\"Super expression must either be null or a function\");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(t,y.a.Component),r=t,(a=[{key:\"componentDidMount\",value:function(){document.addEventListener&&(document.addEventListener(\"mousedown\",this.handleClickOutside),document.addEventListener(\"keydown\",this.handleKeydown))}},{key:\"componentWillUnmount\",value:function(){document.removeEventListener&&(document.removeEventListener(\"mousedown\",this.handleClickOutside),document.removeEventListener(\"keydown\",this.handleKeydown))}},{key:\"componentWillReceiveProps\",value:function(e){e.defaultCountry&&e.defaultCountry!==this.state.defaultCountry?this.updateDefaultCountry(e.defaultCountry):e.value!==this.state.formattedNumber&&this.updateFormattedNumber(e.value)}},{key:\"updateFormattedNumber\",value:function(e){var t,r=this.state,n=r.onlyCountries,a=r.defaultCountry,o=e,i=e;if(o.startsWith(\"+\"))o=o.replace(/\\D/g,\"\"),t=this.guessSelectedCountry(o.substring(0,6),n,a),i=this.formatNumber(o,t.format);else{var u=(t=n.find(function(e){return e.iso2==a})||this.state.selectedCountry)&&!o.replace(/\\D/g,\"\").startsWith(t.dialCode)?t.dialCode:\"\";i=this.formatNumber((this.props.disableCountryCode?\"\":u)+o.replace(/\\D/g,\"\"),t?t.format:void 0)}this.setState({selectedCountry:t,formattedNumber:i})}},{key:\"render\",value:function(){var e,t,r=this,a=this.state,o=a.selectedCountry,i=a.showDropdown,u=a.formattedNumber,c=this.props.disableDropdown,s=S()({arrow:!0,up:i}),l=S()((n(e={},this.props.inputClass,!0),n(e,\"form-control\",!0),n(e,\"invalid-number\",!this.props.isValid(u.replace(/\\D/g,\"\"))),e)),f=S()((n(t={},this.props.buttonClass,!0),n(t,\"flag-dropdown\",!0),n(t,\"open-dropdown\",i),t)),d=\"flag \".concat(o.iso2);return y.a.createElement(\"div\",{className:this.props.containerClass,style:this.props.containerStyle},y.a.createElement(\"input\",Object.assign({className:l,style:this.props.inputStyle,onChange:this.handleInput,onClick:this.handleInputClick,onFocus:this.handleInputFocus,onBlur:this.handleInputBlur,value:u,ref:function(e){return r.numberInputRef=e},onKeyDown:this.handleInputKeyDown,placeholder:this.props.placeholder,disabled:this.props.disabled,type:\"tel\"},this.props.inputExtraProps)),y.a.createElement(\"div\",{className:f,style:this.props.buttonStyle,onKeyDown:this.handleKeydown,ref:function(e){return r.dropdownContainerRef=e}},y.a.createElement(\"div\",{onClick:c?void 0:this.handleFlagDropdownClick,className:\"selected-flag\",title:o?\"\".concat(o.name,\": + \").concat(o.dialCode):\"\"},y.a.createElement(\"div\",{className:d},!c&&y.a.createElement(\"div\",{className:s}))),i&&this.getCountryDropdownList()))}}])&&u(r.prototype,a),c&&u(r,c),t}());O.defaultProps={excludeCountries:[],onlyCountries:[],preferredCountries:[],defaultCountry:\"\",value:\"\",placeholder:\"+1 (702) 123-4567\",searchPlaceholder:\"search\",flagsImagePath:\"./flags.png\",disabled:!1,containerStyle:{},inputStyle:{},buttonStyle:{},dropdownStyle:{},searchStyle:{},containerClass:\"react-tel-input\",inputClass:\"\",buttonClass:\"\",dropdownClass:\"\",searchClass:\"\",autoFormat:!0,disableAreaCodes:!1,isValid:function(e){return x.allCountries.some(function(t){return e.startsWith(t.dialCode)||t.dialCode.startsWith(e)})},disableCountryCode:!1,disableDropdown:!1,enableLongNumbers:!1,countryCodeEditable:!0,enableSearchField:!1,disableSearchIcon:!1,regions:\"\",inputExtraProps:{},localization:{},masks:{},onEnterKeyPress:function(){},keys:{UP:38,DOWN:40,RIGHT:39,LEFT:37,ENTER:13,ESC:27,PLUS:43,A:65,Z:90,SPACE:32}};t.default=O}])});","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', 'react'], factory) :\n (global = global || self, factory(global.PlaidLink = {}, global.React));\n}(this, (function (exports, React) { 'use strict';\n\n var React__default = 'default' in React ? React['default'] : React;\n\n function ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n enumerableOnly && (symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n })), keys.push.apply(keys, symbols);\n }\n\n return keys;\n }\n\n function _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = null != arguments[i] ? arguments[i] : {};\n i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n\n return target;\n }\n\n function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n }\n\n function _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n }\n\n function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n }\n\n function _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n }\n\n function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n }\n\n function _iterableToArrayLimit(arr, i) {\n var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"];\n\n if (_i == null) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n\n var _s, _e;\n\n try {\n for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n function unwrapExports (x) {\n \treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n }\n\n function createCommonjsModule(fn, module) {\n \treturn module = { exports: {} }, fn(module, module.exports), module.exports;\n }\n\n var useScript_1 = createCommonjsModule(function (module, exports) {\n\n var __rest = commonjsGlobal && commonjsGlobal.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n };\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.scripts = void 0;\n\n // Previously loading/loaded scripts and their current status\n\n\n exports.scripts = {}; // Check for existing <script> tags with this src. If so, update scripts[src]\n // and return the new status; otherwise, return undefined.\n\n var checkExisting = function (src) {\n var existing = document.querySelector(\"script[src=\\\"\" + src + \"\\\"]\");\n\n if (existing) {\n // Assume existing <script> tag is already loaded,\n // and cache that data for future use.\n return exports.scripts[src] = {\n loading: false,\n error: null,\n scriptEl: existing\n };\n }\n\n return undefined;\n };\n\n function useScript(_a) {\n var src = _a.src,\n _b = _a.checkForExisting,\n checkForExisting = _b === void 0 ? false : _b,\n attributes = __rest(_a, [\"src\", \"checkForExisting\"]); // Check whether some instance of this hook considered this src.\n\n\n var status = src ? exports.scripts[src] : undefined; // If requested, check for existing <script> tags with this src\n // (unless we've already loaded the script ourselves).\n\n if (!status && checkForExisting && src && isBrowser) {\n status = checkExisting(src);\n }\n\n var _c = (0, React__default.useState)(status ? status.loading : Boolean(src)),\n loading = _c[0],\n setLoading = _c[1];\n\n var _d = (0, React__default.useState)(status ? status.error : null),\n error = _d[0],\n setError = _d[1]; // Tracks if script is loaded so we can avoid duplicate script tags\n\n\n var _e = (0, React__default.useState)(false),\n scriptLoaded = _e[0],\n setScriptLoaded = _e[1];\n\n (0, React__default.useEffect)(function () {\n // Nothing to do on server, or if no src specified, or\n // if script is already loaded or \"error\" state.\n if (!isBrowser || !src || scriptLoaded || error) return; // Check again for existing <script> tags with this src\n // in case it's changed since mount.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n status = exports.scripts[src];\n\n if (!status && checkForExisting) {\n status = checkExisting(src);\n } // Determine or create <script> element to listen to.\n\n\n var scriptEl;\n\n if (status) {\n scriptEl = status.scriptEl;\n } else {\n scriptEl = document.createElement('script');\n scriptEl.src = src;\n Object.keys(attributes).forEach(function (key) {\n if (scriptEl[key] === undefined) {\n scriptEl.setAttribute(key, attributes[key]);\n } else {\n scriptEl[key] = attributes[key];\n }\n });\n status = exports.scripts[src] = {\n loading: true,\n error: null,\n scriptEl: scriptEl\n };\n } // `status` is now guaranteed to be defined: either the old status\n // from a previous load, or a newly created one.\n\n\n var handleLoad = function () {\n if (status) status.loading = false;\n setLoading(false);\n setScriptLoaded(true);\n };\n\n var handleError = function (error) {\n if (status) status.error = error;\n setError(error);\n };\n\n scriptEl.addEventListener('load', handleLoad);\n scriptEl.addEventListener('error', handleError);\n document.body.appendChild(scriptEl);\n return function () {\n scriptEl.removeEventListener('load', handleLoad);\n scriptEl.removeEventListener('error', handleError); // if we unmount, and we are still loading the script, then\n // remove from the DOM & cache so we have a clean slate next time.\n // this is similar to the `removeOnUnmount` behavior of the TS useScript hook\n // https://github.com/juliencrn/usehooks-ts/blob/20667273744a22dd2cd2c48c38cd3c10f254ae47/packages/usehooks-ts/src/useScript/useScript.ts#L134\n // but only applied when loading\n\n if (status && status.loading) {\n scriptEl.remove();\n delete exports.scripts[src];\n }\n }; // we need to ignore the attributes as they're a new object per call, so we'd never skip an effect call\n }, [src]);\n return [loading, error];\n }\n\n exports.default = useScript;\n var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';\n });\n\n unwrapExports(useScript_1);\n var useScript_2 = useScript_1.scripts;\n\n var lib = createCommonjsModule(function (module, exports) {\n\n var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function (mod) {\n return mod && mod.__esModule ? mod : {\n \"default\": mod\n };\n };\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.scripts = exports.default = void 0;\n\n\n\n Object.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return __importDefault(useScript_1).default;\n }\n });\n Object.defineProperty(exports, \"scripts\", {\n enumerable: true,\n get: function () {\n return useScript_1.scripts;\n }\n });\n });\n\n var useScript = unwrapExports(lib);\n var lib_1 = lib.scripts;\n\n var renameKeyInObject = function renameKeyInObject(o, oldKey, newKey) {\n var newObject = {};\n delete Object.assign(newObject, o, _defineProperty({}, newKey, o[oldKey]))[oldKey];\n return newObject;\n };\n /**\n * Wrap link handler creation and instance to clean up iframe via destroy() method\n */\n\n\n var createPlaidHandler = function createPlaidHandler(config, creator) {\n var state = {\n plaid: null,\n open: false,\n onExitCallback: null\n }; // If Plaid is not available, throw an Error\n\n if (typeof window === 'undefined' || !window.Plaid) {\n throw new Error('Plaid not loaded');\n }\n\n state.plaid = creator(_objectSpread2(_objectSpread2({}, config), {}, {\n onExit: function onExit(error, metadata) {\n state.open = false;\n config.onExit && config.onExit(error, metadata);\n state.onExitCallback && state.onExitCallback();\n }\n }));\n\n var open = function open() {\n if (!state.plaid) {\n return;\n }\n\n state.open = true;\n state.onExitCallback = null;\n state.plaid.open();\n };\n\n var submit = function submit(data) {\n if (!state.plaid) {\n return;\n }\n\n state.plaid.submit(data);\n };\n\n var exit = function exit(exitOptions, callback) {\n if (!state.open || !state.plaid) {\n callback && callback();\n return;\n }\n\n state.onExitCallback = callback;\n state.plaid.exit(exitOptions);\n\n if (exitOptions && exitOptions.force) {\n state.open = false;\n }\n };\n\n var destroy = function destroy() {\n if (!state.plaid) {\n return;\n }\n\n state.plaid.destroy();\n state.plaid = null;\n };\n\n return {\n open: open,\n submit: submit,\n exit: exit,\n destroy: destroy\n };\n };\n var createPlaid = function createPlaid(options, creator) {\n var config = renameKeyInObject(options, 'publicKey', 'key');\n return createPlaidHandler(config, creator);\n };\n\n var PLAID_LINK_STABLE_URL = 'https://cdn.plaid.com/link/v2/stable/link-initialize.js';\n\n var noop = function noop() {};\n /**\n * This hook loads Plaid script and manages the Plaid Link creation for you.\n * You get easy open & exit methods to call and loading & error states.\n *\n * This will destroy the Plaid UI on un-mounting so it's up to you to be\n * graceful to the user.\n *\n * A new Plaid instance is created every time the token and products options change.\n * It's up to you to prevent unnecessary re-creations on re-render.\n */\n\n\n var usePlaidLink = function usePlaidLink(options) {\n // Asynchronously load the plaid/link/stable url into the DOM\n var _useScript = useScript({\n src: PLAID_LINK_STABLE_URL,\n checkForExisting: true\n }),\n _useScript2 = _slicedToArray(_useScript, 2),\n loading = _useScript2[0],\n error = _useScript2[1]; // internal state\n\n\n var _useState = React.useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n plaid = _useState2[0],\n setPlaid = _useState2[1];\n\n var _useState3 = React.useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n iframeLoaded = _useState4[0],\n setIframeLoaded = _useState4[1];\n\n var products = (options.product || []).slice().sort().join(',');\n React.useEffect(function () {\n // If the link.js script is still loading, return prematurely\n if (loading) {\n return;\n } // If the token, publicKey, and received redirect URI are undefined, return prematurely\n\n\n if (!options.token && !options.publicKey && !options.receivedRedirectUri) {\n return;\n }\n\n if (error || !window.Plaid) {\n // eslint-disable-next-line no-console\n console.error('Error loading Plaid', error);\n return;\n } // if an old plaid instance exists, destroy it before\n // creating a new one\n\n\n if (plaid != null) {\n plaid.exit({\n force: true\n }, function () {\n return plaid.destroy();\n });\n }\n\n var next = createPlaid(_objectSpread2(_objectSpread2({}, options), {}, {\n onLoad: function onLoad() {\n setIframeLoaded(true);\n options.onLoad && options.onLoad();\n }\n }), window.Plaid.create);\n setPlaid(next); // destroy the Plaid iframe factory\n\n return function () {\n return next.exit({\n force: true\n }, function () {\n return next.destroy();\n });\n };\n }, [loading, error, options.publicKey, options.token, products]);\n var ready = plaid != null && (!loading || iframeLoaded);\n\n var openNoOp = function openNoOp() {\n if (!options.token) {\n console.warn('react-plaid-link: You cannot call open() without a valid token supplied to usePlaidLink. This is a no-op.');\n }\n };\n\n return {\n error: error,\n ready: ready,\n submit: plaid ? plaid.submit : noop,\n exit: plaid ? plaid.exit : noop,\n open: plaid ? plaid.open : openNoOp\n };\n };\n\n var _excluded = [\"children\", \"style\", \"className\"];\n var PlaidLink = function PlaidLink(props) {\n var children = props.children,\n style = props.style,\n className = props.className,\n config = _objectWithoutProperties(props, _excluded);\n\n var _usePlaidLink = usePlaidLink(_objectSpread2({}, config)),\n error = _usePlaidLink.error,\n open = _usePlaidLink.open;\n\n return /*#__PURE__*/React__default.createElement(\"button\", {\n disabled: Boolean(error),\n type: \"button\",\n className: className,\n style: _objectSpread2({\n padding: '6px 4px',\n outline: 'none',\n background: '#FFFFFF',\n border: '2px solid #F1F1F1',\n borderRadius: '4px'\n }, style),\n onClick: function onClick() {\n return open();\n }\n }, children);\n };\n PlaidLink.displayName = 'PlaidLink';\n\n var PlaidEmbeddedLink = function PlaidEmbeddedLink(props) {\n var style = props.style,\n className = props.className,\n onSuccess = props.onSuccess,\n onExit = props.onExit,\n onLoad = props.onLoad,\n onEvent = props.onEvent,\n token = props.token,\n receivedRedirectUri = props.receivedRedirectUri;\n var config = React.useMemo(function () {\n return {\n onSuccess: onSuccess,\n onExit: onExit,\n onLoad: onLoad,\n onEvent: onEvent,\n token: token,\n receivedRedirectUri: receivedRedirectUri\n };\n }, [onSuccess, onExit, onLoad, onEvent, token, receivedRedirectUri]); // Asynchronously load the plaid/link/stable url into the DOM\n\n var _useScript = useScript({\n src: PLAID_LINK_STABLE_URL,\n checkForExisting: true\n }),\n _useScript2 = _slicedToArray(_useScript, 2),\n loading = _useScript2[0],\n error = _useScript2[1];\n\n var embeddedLinkTarget = React.useRef(null);\n React.useEffect(function () {\n // If the external link JS script is still loading, return prematurely\n if (loading) {\n return;\n }\n\n if (error || !window.Plaid) {\n // eslint-disable-next-line no-console\n console.error('Error loading Plaid', error);\n return;\n }\n\n if (config.token == null || config.token == '') {\n console.error('A token is required to initialize embedded Plaid Link');\n return;\n } // The embedded Link interface doesn't use the `usePlaidLink` hook to manage\n // its Plaid Link instance because the embedded Link integration in link-initialize\n // maintains its own handler internally.\n\n\n var _window$Plaid$createE = window.Plaid.createEmbedded(_objectSpread2({}, config), embeddedLinkTarget.current),\n destroy = _window$Plaid$createE.destroy; // Clean up embedded Link component on unmount\n\n\n return function () {\n destroy();\n };\n }, [loading, error, config, embeddedLinkTarget]);\n return /*#__PURE__*/React__default.createElement(\"div\", {\n style: style,\n className: className,\n ref: embeddedLinkTarget\n });\n };\n\n // The following event names are stable and will not be deprecated or changed\n\n (function (PlaidLinkStableEvent) {\n PlaidLinkStableEvent[\"OPEN\"] = \"OPEN\";\n PlaidLinkStableEvent[\"EXIT\"] = \"EXIT\";\n PlaidLinkStableEvent[\"HANDOFF\"] = \"HANDOFF\";\n PlaidLinkStableEvent[\"SELECT_INSTITUTION\"] = \"SELECT_INSTITUTION\";\n PlaidLinkStableEvent[\"ERROR\"] = \"ERROR\";\n PlaidLinkStableEvent[\"BANK_INCOME_INSIGHTS_COMPLETED\"] = \"BANK_INCOME_INSIGHTS_COMPLETED\";\n PlaidLinkStableEvent[\"IDENTITY_VERIFICATION_PASS_SESSION\"] = \"IDENTITY_VERIFICATION_PASS_SESSION\";\n PlaidLinkStableEvent[\"IDENTITY_VERIFICATION_FAIL_SESSION\"] = \"IDENTITY_VERIFICATION_FAIL_SESSION\";\n })(exports.PlaidLinkStableEvent || (exports.PlaidLinkStableEvent = {}));\n\n exports.PlaidEmbeddedLink = PlaidEmbeddedLink;\n exports.PlaidLink = PlaidLink;\n exports.usePlaidLink = usePlaidLink;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n})));\n","if (process.env.NODE_ENV !== 'development') {\n module.exports = {\n ReactQueryDevtools: function () {\n return null\n },\n ReactQueryDevtoolsPanel: function () {\n return null\n },\n }\n} else {\n module.exports = require('./development')\n}\n","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var FocusManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(FocusManager, _Subscribable);\n\n function FocusManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onFocus) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onFocus();\n }; // Listen to visibillitychange and focus\n\n\n window.addEventListener('visibilitychange', listener, false);\n window.addEventListener('focus', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('visibilitychange', listener);\n window.removeEventListener('focus', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = FocusManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (focused) {\n if (typeof focused === 'boolean') {\n _this2.setFocused(focused);\n } else {\n _this2.onFocus();\n }\n });\n };\n\n _proto.setFocused = function setFocused(focused) {\n this.focused = focused;\n\n if (focused) {\n this.onFocus();\n }\n };\n\n _proto.onFocus = function onFocus() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isFocused = function isFocused() {\n if (typeof this.focused === 'boolean') {\n return this.focused;\n } // document global can be unavailable in react native\n\n\n if (typeof document === 'undefined') {\n return true;\n }\n\n return [undefined, 'visible', 'prerender'].includes(document.visibilityState);\n };\n\n return FocusManager;\n}(Subscribable);\nexport var focusManager = new FocusManager();","export { CancelledError } from './retryer';\nexport { QueryCache } from './queryCache';\nexport { QueryClient } from './queryClient';\nexport { QueryObserver } from './queryObserver';\nexport { QueriesObserver } from './queriesObserver';\nexport { InfiniteQueryObserver } from './infiniteQueryObserver';\nexport { MutationCache } from './mutationCache';\nexport { MutationObserver } from './mutationObserver';\nexport { setLogger } from './logger';\nexport { notifyManager } from './notifyManager';\nexport { focusManager } from './focusManager';\nexport { onlineManager } from './onlineManager';\nexport { hashQueryKey, isError } from './utils';\nexport { isCancelledError } from './retryer';\nexport { dehydrate, hydrate } from './hydration'; // Types\n\nexport * from './types';","// TYPES\n// FUNCTIONS\nvar logger = console;\nexport function getLogger() {\n return logger;\n}\nexport function setLogger(newLogger) {\n logger = newLogger;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getLogger } from './logger';\nimport { notifyManager } from './notifyManager';\nimport { Retryer } from './retryer';\nimport { noop } from './utils'; // TYPES\n\n// CLASS\nexport var Mutation = /*#__PURE__*/function () {\n function Mutation(config) {\n this.options = _extends({}, config.defaultOptions, config.options);\n this.mutationId = config.mutationId;\n this.mutationCache = config.mutationCache;\n this.observers = [];\n this.state = config.state || getDefaultState();\n this.meta = config.meta;\n }\n\n var _proto = Mutation.prototype;\n\n _proto.setState = function setState(state) {\n this.dispatch({\n type: 'setState',\n state: state\n });\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n };\n\n _proto.cancel = function cancel() {\n if (this.retryer) {\n this.retryer.cancel();\n return this.retryer.promise.then(noop).catch(noop);\n }\n\n return Promise.resolve();\n };\n\n _proto.continue = function _continue() {\n if (this.retryer) {\n this.retryer.continue();\n return this.retryer.promise;\n }\n\n return this.execute();\n };\n\n _proto.execute = function execute() {\n var _this = this;\n\n var data;\n var restored = this.state.status === 'loading';\n var promise = Promise.resolve();\n\n if (!restored) {\n this.dispatch({\n type: 'loading',\n variables: this.options.variables\n });\n promise = promise.then(function () {\n // Notify cache callback\n _this.mutationCache.config.onMutate == null ? void 0 : _this.mutationCache.config.onMutate(_this.state.variables, _this);\n }).then(function () {\n return _this.options.onMutate == null ? void 0 : _this.options.onMutate(_this.state.variables);\n }).then(function (context) {\n if (context !== _this.state.context) {\n _this.dispatch({\n type: 'loading',\n context: context,\n variables: _this.state.variables\n });\n }\n });\n }\n\n return promise.then(function () {\n return _this.executeMutation();\n }).then(function (result) {\n data = result; // Notify cache callback\n\n _this.mutationCache.config.onSuccess == null ? void 0 : _this.mutationCache.config.onSuccess(data, _this.state.variables, _this.state.context, _this);\n }).then(function () {\n return _this.options.onSuccess == null ? void 0 : _this.options.onSuccess(data, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(data, null, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'success',\n data: data\n });\n\n return data;\n }).catch(function (error) {\n // Notify cache callback\n _this.mutationCache.config.onError == null ? void 0 : _this.mutationCache.config.onError(error, _this.state.variables, _this.state.context, _this); // Log error\n\n getLogger().error(error);\n return Promise.resolve().then(function () {\n return _this.options.onError == null ? void 0 : _this.options.onError(error, _this.state.variables, _this.state.context);\n }).then(function () {\n return _this.options.onSettled == null ? void 0 : _this.options.onSettled(undefined, error, _this.state.variables, _this.state.context);\n }).then(function () {\n _this.dispatch({\n type: 'error',\n error: error\n });\n\n throw error;\n });\n });\n };\n\n _proto.executeMutation = function executeMutation() {\n var _this2 = this,\n _this$options$retry;\n\n this.retryer = new Retryer({\n fn: function fn() {\n if (!_this2.options.mutationFn) {\n return Promise.reject('No mutationFn found');\n }\n\n return _this2.options.mutationFn(_this2.state.variables);\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: (_this$options$retry = this.options.retry) != null ? _this$options$retry : 0,\n retryDelay: this.options.retryDelay\n });\n return this.retryer.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onMutationUpdate(action);\n });\n\n _this3.mutationCache.notify(_this3);\n });\n };\n\n return Mutation;\n}();\nexport function getDefaultState() {\n return {\n context: undefined,\n data: undefined,\n error: null,\n failureCount: 0,\n isPaused: false,\n status: 'idle',\n variables: undefined\n };\n}\n\nfunction reducer(state, action) {\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n failureCount: state.failureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'loading':\n return _extends({}, state, {\n context: action.context,\n data: undefined,\n error: null,\n isPaused: false,\n status: 'loading',\n variables: action.variables\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n error: null,\n status: 'success',\n isPaused: false\n });\n\n case 'error':\n return _extends({}, state, {\n data: undefined,\n error: action.error,\n failureCount: state.failureCount + 1,\n isPaused: false,\n status: 'error'\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n}","import { scheduleMicrotask } from './utils'; // TYPES\n\n// CLASS\nexport var NotifyManager = /*#__PURE__*/function () {\n function NotifyManager() {\n this.queue = [];\n this.transactions = 0;\n\n this.notifyFn = function (callback) {\n callback();\n };\n\n this.batchNotifyFn = function (callback) {\n callback();\n };\n }\n\n var _proto = NotifyManager.prototype;\n\n _proto.batch = function batch(callback) {\n var result;\n this.transactions++;\n\n try {\n result = callback();\n } finally {\n this.transactions--;\n\n if (!this.transactions) {\n this.flush();\n }\n }\n\n return result;\n };\n\n _proto.schedule = function schedule(callback) {\n var _this = this;\n\n if (this.transactions) {\n this.queue.push(callback);\n } else {\n scheduleMicrotask(function () {\n _this.notifyFn(callback);\n });\n }\n }\n /**\n * All calls to the wrapped function will be batched.\n */\n ;\n\n _proto.batchCalls = function batchCalls(callback) {\n var _this2 = this;\n\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this2.schedule(function () {\n callback.apply(void 0, args);\n });\n };\n };\n\n _proto.flush = function flush() {\n var _this3 = this;\n\n var queue = this.queue;\n this.queue = [];\n\n if (queue.length) {\n scheduleMicrotask(function () {\n _this3.batchNotifyFn(function () {\n queue.forEach(function (callback) {\n _this3.notifyFn(callback);\n });\n });\n });\n }\n }\n /**\n * Use this method to set a custom notify function.\n * This can be used to for example wrap notifications with `React.act` while running tests.\n */\n ;\n\n _proto.setNotifyFunction = function setNotifyFunction(fn) {\n this.notifyFn = fn;\n }\n /**\n * Use this method to set a custom function to batch notifications together into a single tick.\n * By default React Query will use the batch function provided by ReactDOM or React Native.\n */\n ;\n\n _proto.setBatchNotifyFunction = function setBatchNotifyFunction(fn) {\n this.batchNotifyFn = fn;\n };\n\n return NotifyManager;\n}(); // SINGLETON\n\nexport var notifyManager = new NotifyManager();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { Subscribable } from './subscribable';\nimport { isServer } from './utils';\nexport var OnlineManager = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(OnlineManager, _Subscribable);\n\n function OnlineManager() {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n\n _this.setup = function (onOnline) {\n var _window;\n\n if (!isServer && ((_window = window) == null ? void 0 : _window.addEventListener)) {\n var listener = function listener() {\n return onOnline();\n }; // Listen to online\n\n\n window.addEventListener('online', listener, false);\n window.addEventListener('offline', listener, false);\n return function () {\n // Be sure to unsubscribe if a new handler is set\n window.removeEventListener('online', listener);\n window.removeEventListener('offline', listener);\n };\n }\n };\n\n return _this;\n }\n\n var _proto = OnlineManager.prototype;\n\n _proto.onSubscribe = function onSubscribe() {\n if (!this.cleanup) {\n this.setEventListener(this.setup);\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.hasListeners()) {\n var _this$cleanup;\n\n (_this$cleanup = this.cleanup) == null ? void 0 : _this$cleanup.call(this);\n this.cleanup = undefined;\n }\n };\n\n _proto.setEventListener = function setEventListener(setup) {\n var _this$cleanup2,\n _this2 = this;\n\n this.setup = setup;\n (_this$cleanup2 = this.cleanup) == null ? void 0 : _this$cleanup2.call(this);\n this.cleanup = setup(function (online) {\n if (typeof online === 'boolean') {\n _this2.setOnline(online);\n } else {\n _this2.onOnline();\n }\n });\n };\n\n _proto.setOnline = function setOnline(online) {\n this.online = online;\n\n if (online) {\n this.onOnline();\n }\n };\n\n _proto.onOnline = function onOnline() {\n this.listeners.forEach(function (listener) {\n listener();\n });\n };\n\n _proto.isOnline = function isOnline() {\n if (typeof this.online === 'boolean') {\n return this.online;\n }\n\n if (typeof navigator === 'undefined' || typeof navigator.onLine === 'undefined') {\n return true;\n }\n\n return navigator.onLine;\n };\n\n return OnlineManager;\n}(Subscribable);\nexport var onlineManager = new OnlineManager();","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { getAbortController, functionalUpdate, isValidTimeout, noop, replaceEqualDeep, timeUntilStale, ensureQueryKeyArray } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { getLogger } from './logger';\nimport { Retryer, isCancelledError } from './retryer'; // TYPES\n\n// CLASS\nexport var Query = /*#__PURE__*/function () {\n function Query(config) {\n this.abortSignalConsumed = false;\n this.hadObservers = false;\n this.defaultOptions = config.defaultOptions;\n this.setOptions(config.options);\n this.observers = [];\n this.cache = config.cache;\n this.queryKey = config.queryKey;\n this.queryHash = config.queryHash;\n this.initialState = config.state || this.getDefaultState(this.options);\n this.state = this.initialState;\n this.meta = config.meta;\n this.scheduleGc();\n }\n\n var _proto = Query.prototype;\n\n _proto.setOptions = function setOptions(options) {\n var _this$options$cacheTi;\n\n this.options = _extends({}, this.defaultOptions, options);\n this.meta = options == null ? void 0 : options.meta; // Default to 5 minutes if not cache time is set\n\n this.cacheTime = Math.max(this.cacheTime || 0, (_this$options$cacheTi = this.options.cacheTime) != null ? _this$options$cacheTi : 5 * 60 * 1000);\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.scheduleGc = function scheduleGc() {\n var _this = this;\n\n this.clearGcTimeout();\n\n if (isValidTimeout(this.cacheTime)) {\n this.gcTimeout = setTimeout(function () {\n _this.optionalRemove();\n }, this.cacheTime);\n }\n };\n\n _proto.clearGcTimeout = function clearGcTimeout() {\n if (this.gcTimeout) {\n clearTimeout(this.gcTimeout);\n this.gcTimeout = undefined;\n }\n };\n\n _proto.optionalRemove = function optionalRemove() {\n if (!this.observers.length) {\n if (this.state.isFetching) {\n if (this.hadObservers) {\n this.scheduleGc();\n }\n } else {\n this.cache.remove(this);\n }\n }\n };\n\n _proto.setData = function setData(updater, options) {\n var _this$options$isDataE, _this$options;\n\n var prevData = this.state.data; // Get the new data\n\n var data = functionalUpdate(updater, prevData); // Use prev data if an isDataEqual function is defined and returns `true`\n\n if ((_this$options$isDataE = (_this$options = this.options).isDataEqual) == null ? void 0 : _this$options$isDataE.call(_this$options, prevData, data)) {\n data = prevData;\n } else if (this.options.structuralSharing !== false) {\n // Structurally share data between prev and new data if needed\n data = replaceEqualDeep(prevData, data);\n } // Set data and mark it as cached\n\n\n this.dispatch({\n data: data,\n type: 'success',\n dataUpdatedAt: options == null ? void 0 : options.updatedAt\n });\n return data;\n };\n\n _proto.setState = function setState(state, setStateOptions) {\n this.dispatch({\n type: 'setState',\n state: state,\n setStateOptions: setStateOptions\n });\n };\n\n _proto.cancel = function cancel(options) {\n var _this$retryer;\n\n var promise = this.promise;\n (_this$retryer = this.retryer) == null ? void 0 : _this$retryer.cancel(options);\n return promise ? promise.then(noop).catch(noop) : Promise.resolve();\n };\n\n _proto.destroy = function destroy() {\n this.clearGcTimeout();\n this.cancel({\n silent: true\n });\n };\n\n _proto.reset = function reset() {\n this.destroy();\n this.setState(this.initialState);\n };\n\n _proto.isActive = function isActive() {\n return this.observers.some(function (observer) {\n return observer.options.enabled !== false;\n });\n };\n\n _proto.isFetching = function isFetching() {\n return this.state.isFetching;\n };\n\n _proto.isStale = function isStale() {\n return this.state.isInvalidated || !this.state.dataUpdatedAt || this.observers.some(function (observer) {\n return observer.getCurrentResult().isStale;\n });\n };\n\n _proto.isStaleByTime = function isStaleByTime(staleTime) {\n if (staleTime === void 0) {\n staleTime = 0;\n }\n\n return this.state.isInvalidated || !this.state.dataUpdatedAt || !timeUntilStale(this.state.dataUpdatedAt, staleTime);\n };\n\n _proto.onFocus = function onFocus() {\n var _this$retryer2;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnWindowFocus();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer2 = this.retryer) == null ? void 0 : _this$retryer2.continue();\n };\n\n _proto.onOnline = function onOnline() {\n var _this$retryer3;\n\n var observer = this.observers.find(function (x) {\n return x.shouldFetchOnReconnect();\n });\n\n if (observer) {\n observer.refetch();\n } // Continue fetch if currently paused\n\n\n (_this$retryer3 = this.retryer) == null ? void 0 : _this$retryer3.continue();\n };\n\n _proto.addObserver = function addObserver(observer) {\n if (this.observers.indexOf(observer) === -1) {\n this.observers.push(observer);\n this.hadObservers = true; // Stop the query from being garbage collected\n\n this.clearGcTimeout();\n this.cache.notify({\n type: 'observerAdded',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.removeObserver = function removeObserver(observer) {\n if (this.observers.indexOf(observer) !== -1) {\n this.observers = this.observers.filter(function (x) {\n return x !== observer;\n });\n\n if (!this.observers.length) {\n // If the transport layer does not support cancellation\n // we'll let the query continue so the result can be cached\n if (this.retryer) {\n if (this.retryer.isTransportCancelable || this.abortSignalConsumed) {\n this.retryer.cancel({\n revert: true\n });\n } else {\n this.retryer.cancelRetry();\n }\n }\n\n if (this.cacheTime) {\n this.scheduleGc();\n } else {\n this.cache.remove(this);\n }\n }\n\n this.cache.notify({\n type: 'observerRemoved',\n query: this,\n observer: observer\n });\n }\n };\n\n _proto.getObserversCount = function getObserversCount() {\n return this.observers.length;\n };\n\n _proto.invalidate = function invalidate() {\n if (!this.state.isInvalidated) {\n this.dispatch({\n type: 'invalidate'\n });\n }\n };\n\n _proto.fetch = function fetch(options, fetchOptions) {\n var _this2 = this,\n _this$options$behavio,\n _context$fetchOptions,\n _abortController$abor;\n\n if (this.state.isFetching) {\n if (this.state.dataUpdatedAt && (fetchOptions == null ? void 0 : fetchOptions.cancelRefetch)) {\n // Silently cancel current fetch if the user wants to cancel refetches\n this.cancel({\n silent: true\n });\n } else if (this.promise) {\n var _this$retryer4;\n\n // make sure that retries that were potentially cancelled due to unmounts can continue\n (_this$retryer4 = this.retryer) == null ? void 0 : _this$retryer4.continueRetry(); // Return current promise if we are already fetching\n\n return this.promise;\n }\n } // Update config if passed, otherwise the config from the last execution is used\n\n\n if (options) {\n this.setOptions(options);\n } // Use the options from the first observer with a query function if no function is found.\n // This can happen when the query is hydrated or created with setQueryData.\n\n\n if (!this.options.queryFn) {\n var observer = this.observers.find(function (x) {\n return x.options.queryFn;\n });\n\n if (observer) {\n this.setOptions(observer.options);\n }\n }\n\n var queryKey = ensureQueryKeyArray(this.queryKey);\n var abortController = getAbortController(); // Create query function context\n\n var queryFnContext = {\n queryKey: queryKey,\n pageParam: undefined,\n meta: this.meta\n };\n Object.defineProperty(queryFnContext, 'signal', {\n enumerable: true,\n get: function get() {\n if (abortController) {\n _this2.abortSignalConsumed = true;\n return abortController.signal;\n }\n\n return undefined;\n }\n }); // Create fetch function\n\n var fetchFn = function fetchFn() {\n if (!_this2.options.queryFn) {\n return Promise.reject('Missing queryFn');\n }\n\n _this2.abortSignalConsumed = false;\n return _this2.options.queryFn(queryFnContext);\n }; // Trigger behavior hook\n\n\n var context = {\n fetchOptions: fetchOptions,\n options: this.options,\n queryKey: queryKey,\n state: this.state,\n fetchFn: fetchFn,\n meta: this.meta\n };\n\n if ((_this$options$behavio = this.options.behavior) == null ? void 0 : _this$options$behavio.onFetch) {\n var _this$options$behavio2;\n\n (_this$options$behavio2 = this.options.behavior) == null ? void 0 : _this$options$behavio2.onFetch(context);\n } // Store state in case the current fetch needs to be reverted\n\n\n this.revertState = this.state; // Set to fetching state if not already in it\n\n if (!this.state.isFetching || this.state.fetchMeta !== ((_context$fetchOptions = context.fetchOptions) == null ? void 0 : _context$fetchOptions.meta)) {\n var _context$fetchOptions2;\n\n this.dispatch({\n type: 'fetch',\n meta: (_context$fetchOptions2 = context.fetchOptions) == null ? void 0 : _context$fetchOptions2.meta\n });\n } // Try to fetch the data\n\n\n this.retryer = new Retryer({\n fn: context.fetchFn,\n abort: abortController == null ? void 0 : (_abortController$abor = abortController.abort) == null ? void 0 : _abortController$abor.bind(abortController),\n onSuccess: function onSuccess(data) {\n _this2.setData(data); // Notify cache callback\n\n\n _this2.cache.config.onSuccess == null ? void 0 : _this2.cache.config.onSuccess(data, _this2); // Remove query after fetching if cache time is 0\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onError: function onError(error) {\n // Optimistically update state if needed\n if (!(isCancelledError(error) && error.silent)) {\n _this2.dispatch({\n type: 'error',\n error: error\n });\n }\n\n if (!isCancelledError(error)) {\n // Notify cache callback\n _this2.cache.config.onError == null ? void 0 : _this2.cache.config.onError(error, _this2); // Log error\n\n getLogger().error(error);\n } // Remove query after fetching if cache time is 0\n\n\n if (_this2.cacheTime === 0) {\n _this2.optionalRemove();\n }\n },\n onFail: function onFail() {\n _this2.dispatch({\n type: 'failed'\n });\n },\n onPause: function onPause() {\n _this2.dispatch({\n type: 'pause'\n });\n },\n onContinue: function onContinue() {\n _this2.dispatch({\n type: 'continue'\n });\n },\n retry: context.options.retry,\n retryDelay: context.options.retryDelay\n });\n this.promise = this.retryer.promise;\n return this.promise;\n };\n\n _proto.dispatch = function dispatch(action) {\n var _this3 = this;\n\n this.state = this.reducer(this.state, action);\n notifyManager.batch(function () {\n _this3.observers.forEach(function (observer) {\n observer.onQueryUpdate(action);\n });\n\n _this3.cache.notify({\n query: _this3,\n type: 'queryUpdated',\n action: action\n });\n });\n };\n\n _proto.getDefaultState = function getDefaultState(options) {\n var data = typeof options.initialData === 'function' ? options.initialData() : options.initialData;\n var hasInitialData = typeof options.initialData !== 'undefined';\n var initialDataUpdatedAt = hasInitialData ? typeof options.initialDataUpdatedAt === 'function' ? options.initialDataUpdatedAt() : options.initialDataUpdatedAt : 0;\n var hasData = typeof data !== 'undefined';\n return {\n data: data,\n dataUpdateCount: 0,\n dataUpdatedAt: hasData ? initialDataUpdatedAt != null ? initialDataUpdatedAt : Date.now() : 0,\n error: null,\n errorUpdateCount: 0,\n errorUpdatedAt: 0,\n fetchFailureCount: 0,\n fetchMeta: null,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: hasData ? 'success' : 'idle'\n };\n };\n\n _proto.reducer = function reducer(state, action) {\n var _action$meta, _action$dataUpdatedAt;\n\n switch (action.type) {\n case 'failed':\n return _extends({}, state, {\n fetchFailureCount: state.fetchFailureCount + 1\n });\n\n case 'pause':\n return _extends({}, state, {\n isPaused: true\n });\n\n case 'continue':\n return _extends({}, state, {\n isPaused: false\n });\n\n case 'fetch':\n return _extends({}, state, {\n fetchFailureCount: 0,\n fetchMeta: (_action$meta = action.meta) != null ? _action$meta : null,\n isFetching: true,\n isPaused: false\n }, !state.dataUpdatedAt && {\n error: null,\n status: 'loading'\n });\n\n case 'success':\n return _extends({}, state, {\n data: action.data,\n dataUpdateCount: state.dataUpdateCount + 1,\n dataUpdatedAt: (_action$dataUpdatedAt = action.dataUpdatedAt) != null ? _action$dataUpdatedAt : Date.now(),\n error: null,\n fetchFailureCount: 0,\n isFetching: false,\n isInvalidated: false,\n isPaused: false,\n status: 'success'\n });\n\n case 'error':\n var error = action.error;\n\n if (isCancelledError(error) && error.revert && this.revertState) {\n return _extends({}, this.revertState);\n }\n\n return _extends({}, state, {\n error: error,\n errorUpdateCount: state.errorUpdateCount + 1,\n errorUpdatedAt: Date.now(),\n fetchFailureCount: state.fetchFailureCount + 1,\n isFetching: false,\n isPaused: false,\n status: 'error'\n });\n\n case 'invalidate':\n return _extends({}, state, {\n isInvalidated: true\n });\n\n case 'setState':\n return _extends({}, state, action.state);\n\n default:\n return state;\n }\n };\n\n return Query;\n}();","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { hashQueryKeyByOptions, matchQuery, parseFilterArgs } from './utils';\nimport { Query } from './query';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var QueryCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryCache, _Subscribable);\n\n function QueryCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.queries = [];\n _this.queriesMap = {};\n return _this;\n }\n\n var _proto = QueryCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var _options$queryHash;\n\n var queryKey = options.queryKey;\n var queryHash = (_options$queryHash = options.queryHash) != null ? _options$queryHash : hashQueryKeyByOptions(queryKey, options);\n var query = this.get(queryHash);\n\n if (!query) {\n query = new Query({\n cache: this,\n queryKey: queryKey,\n queryHash: queryHash,\n options: client.defaultQueryOptions(options),\n state: state,\n defaultOptions: client.getQueryDefaults(queryKey),\n meta: options.meta\n });\n this.add(query);\n }\n\n return query;\n };\n\n _proto.add = function add(query) {\n if (!this.queriesMap[query.queryHash]) {\n this.queriesMap[query.queryHash] = query;\n this.queries.push(query);\n this.notify({\n type: 'queryAdded',\n query: query\n });\n }\n };\n\n _proto.remove = function remove(query) {\n var queryInMap = this.queriesMap[query.queryHash];\n\n if (queryInMap) {\n query.destroy();\n this.queries = this.queries.filter(function (x) {\n return x !== query;\n });\n\n if (queryInMap === query) {\n delete this.queriesMap[query.queryHash];\n }\n\n this.notify({\n type: 'queryRemoved',\n query: query\n });\n }\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.queries.forEach(function (query) {\n _this2.remove(query);\n });\n });\n };\n\n _proto.get = function get(queryHash) {\n return this.queriesMap[queryHash];\n };\n\n _proto.getAll = function getAll() {\n return this.queries;\n };\n\n _proto.find = function find(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.queries.find(function (query) {\n return matchQuery(filters, query);\n });\n };\n\n _proto.findAll = function findAll(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n return Object.keys(filters).length > 0 ? this.queries.filter(function (query) {\n return matchQuery(filters, query);\n }) : this.queries;\n };\n\n _proto.notify = function notify(event) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(event);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n var _this4 = this;\n\n notifyManager.batch(function () {\n _this4.queries.forEach(function (query) {\n query.onFocus();\n });\n });\n };\n\n _proto.onOnline = function onOnline() {\n var _this5 = this;\n\n notifyManager.batch(function () {\n _this5.queries.forEach(function (query) {\n query.onOnline();\n });\n });\n };\n\n return QueryCache;\n}(Subscribable);","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { notifyManager } from './notifyManager';\nimport { Mutation } from './mutation';\nimport { matchMutation, noop } from './utils';\nimport { Subscribable } from './subscribable'; // TYPES\n\n// CLASS\nexport var MutationCache = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationCache, _Subscribable);\n\n function MutationCache(config) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.config = config || {};\n _this.mutations = [];\n _this.mutationId = 0;\n return _this;\n }\n\n var _proto = MutationCache.prototype;\n\n _proto.build = function build(client, options, state) {\n var mutation = new Mutation({\n mutationCache: this,\n mutationId: ++this.mutationId,\n options: client.defaultMutationOptions(options),\n state: state,\n defaultOptions: options.mutationKey ? client.getMutationDefaults(options.mutationKey) : undefined,\n meta: options.meta\n });\n this.add(mutation);\n return mutation;\n };\n\n _proto.add = function add(mutation) {\n this.mutations.push(mutation);\n this.notify(mutation);\n };\n\n _proto.remove = function remove(mutation) {\n this.mutations = this.mutations.filter(function (x) {\n return x !== mutation;\n });\n mutation.cancel();\n this.notify(mutation);\n };\n\n _proto.clear = function clear() {\n var _this2 = this;\n\n notifyManager.batch(function () {\n _this2.mutations.forEach(function (mutation) {\n _this2.remove(mutation);\n });\n });\n };\n\n _proto.getAll = function getAll() {\n return this.mutations;\n };\n\n _proto.find = function find(filters) {\n if (typeof filters.exact === 'undefined') {\n filters.exact = true;\n }\n\n return this.mutations.find(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.findAll = function findAll(filters) {\n return this.mutations.filter(function (mutation) {\n return matchMutation(filters, mutation);\n });\n };\n\n _proto.notify = function notify(mutation) {\n var _this3 = this;\n\n notifyManager.batch(function () {\n _this3.listeners.forEach(function (listener) {\n listener(mutation);\n });\n });\n };\n\n _proto.onFocus = function onFocus() {\n this.resumePausedMutations();\n };\n\n _proto.onOnline = function onOnline() {\n this.resumePausedMutations();\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n var pausedMutations = this.mutations.filter(function (x) {\n return x.state.isPaused;\n });\n return notifyManager.batch(function () {\n return pausedMutations.reduce(function (promise, mutation) {\n return promise.then(function () {\n return mutation.continue().catch(noop);\n });\n }, Promise.resolve());\n });\n };\n\n return MutationCache;\n}(Subscribable);","import { isCancelable } from './retryer';\nimport { getAbortController } from './utils';\nexport function infiniteQueryBehavior() {\n return {\n onFetch: function onFetch(context) {\n context.fetchFn = function () {\n var _context$fetchOptions, _context$fetchOptions2, _context$fetchOptions3, _context$fetchOptions4, _context$state$data, _context$state$data2;\n\n var refetchPage = (_context$fetchOptions = context.fetchOptions) == null ? void 0 : (_context$fetchOptions2 = _context$fetchOptions.meta) == null ? void 0 : _context$fetchOptions2.refetchPage;\n var fetchMore = (_context$fetchOptions3 = context.fetchOptions) == null ? void 0 : (_context$fetchOptions4 = _context$fetchOptions3.meta) == null ? void 0 : _context$fetchOptions4.fetchMore;\n var pageParam = fetchMore == null ? void 0 : fetchMore.pageParam;\n var isFetchingNextPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'forward';\n var isFetchingPreviousPage = (fetchMore == null ? void 0 : fetchMore.direction) === 'backward';\n var oldPages = ((_context$state$data = context.state.data) == null ? void 0 : _context$state$data.pages) || [];\n var oldPageParams = ((_context$state$data2 = context.state.data) == null ? void 0 : _context$state$data2.pageParams) || [];\n var abortController = getAbortController();\n var abortSignal = abortController == null ? void 0 : abortController.signal;\n var newPageParams = oldPageParams;\n var cancelled = false; // Get query function\n\n var queryFn = context.options.queryFn || function () {\n return Promise.reject('Missing queryFn');\n };\n\n var buildNewPages = function buildNewPages(pages, param, page, previous) {\n newPageParams = previous ? [param].concat(newPageParams) : [].concat(newPageParams, [param]);\n return previous ? [page].concat(pages) : [].concat(pages, [page]);\n }; // Create function to fetch a page\n\n\n var fetchPage = function fetchPage(pages, manual, param, previous) {\n if (cancelled) {\n return Promise.reject('Cancelled');\n }\n\n if (typeof param === 'undefined' && !manual && pages.length) {\n return Promise.resolve(pages);\n }\n\n var queryFnContext = {\n queryKey: context.queryKey,\n signal: abortSignal,\n pageParam: param,\n meta: context.meta\n };\n var queryFnResult = queryFn(queryFnContext);\n var promise = Promise.resolve(queryFnResult).then(function (page) {\n return buildNewPages(pages, param, page, previous);\n });\n\n if (isCancelable(queryFnResult)) {\n var promiseAsAny = promise;\n promiseAsAny.cancel = queryFnResult.cancel;\n }\n\n return promise;\n };\n\n var promise; // Fetch first page?\n\n if (!oldPages.length) {\n promise = fetchPage([]);\n } // Fetch next page?\n else if (isFetchingNextPage) {\n var manual = typeof pageParam !== 'undefined';\n var param = manual ? pageParam : getNextPageParam(context.options, oldPages);\n promise = fetchPage(oldPages, manual, param);\n } // Fetch previous page?\n else if (isFetchingPreviousPage) {\n var _manual = typeof pageParam !== 'undefined';\n\n var _param = _manual ? pageParam : getPreviousPageParam(context.options, oldPages);\n\n promise = fetchPage(oldPages, _manual, _param, true);\n } // Refetch pages\n else {\n (function () {\n newPageParams = [];\n var manual = typeof context.options.getNextPageParam === 'undefined';\n var shouldFetchFirstPage = refetchPage && oldPages[0] ? refetchPage(oldPages[0], 0, oldPages) : true; // Fetch first page\n\n promise = shouldFetchFirstPage ? fetchPage([], manual, oldPageParams[0]) : Promise.resolve(buildNewPages([], oldPageParams[0], oldPages[0])); // Fetch remaining pages\n\n var _loop = function _loop(i) {\n promise = promise.then(function (pages) {\n var shouldFetchNextPage = refetchPage && oldPages[i] ? refetchPage(oldPages[i], i, oldPages) : true;\n\n if (shouldFetchNextPage) {\n var _param2 = manual ? oldPageParams[i] : getNextPageParam(context.options, pages);\n\n return fetchPage(pages, manual, _param2);\n }\n\n return Promise.resolve(buildNewPages(pages, oldPageParams[i], oldPages[i]));\n });\n };\n\n for (var i = 1; i < oldPages.length; i++) {\n _loop(i);\n }\n })();\n }\n\n var finalPromise = promise.then(function (pages) {\n return {\n pages: pages,\n pageParams: newPageParams\n };\n });\n var finalPromiseAsAny = finalPromise;\n\n finalPromiseAsAny.cancel = function () {\n cancelled = true;\n abortController == null ? void 0 : abortController.abort();\n\n if (isCancelable(promise)) {\n promise.cancel();\n }\n };\n\n return finalPromise;\n };\n }\n };\n}\nexport function getNextPageParam(options, pages) {\n return options.getNextPageParam == null ? void 0 : options.getNextPageParam(pages[pages.length - 1], pages);\n}\nexport function getPreviousPageParam(options, pages) {\n return options.getPreviousPageParam == null ? void 0 : options.getPreviousPageParam(pages[0], pages);\n}\n/**\n * Checks if there is a next page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasNextPage(options, pages) {\n if (options.getNextPageParam && Array.isArray(pages)) {\n var nextPageParam = getNextPageParam(options, pages);\n return typeof nextPageParam !== 'undefined' && nextPageParam !== null && nextPageParam !== false;\n }\n}\n/**\n * Checks if there is a previous page.\n * Returns `undefined` if it cannot be determined.\n */\n\nexport function hasPreviousPage(options, pages) {\n if (options.getPreviousPageParam && Array.isArray(pages)) {\n var previousPageParam = getPreviousPageParam(options, pages);\n return typeof previousPageParam !== 'undefined' && previousPageParam !== null && previousPageParam !== false;\n }\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { hashQueryKey, noop, parseFilterArgs, parseQueryArgs, partialMatchKey, hashQueryKeyByOptions } from './utils';\nimport { QueryCache } from './queryCache';\nimport { MutationCache } from './mutationCache';\nimport { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { notifyManager } from './notifyManager';\nimport { infiniteQueryBehavior } from './infiniteQueryBehavior';\n// CLASS\nexport var QueryClient = /*#__PURE__*/function () {\n function QueryClient(config) {\n if (config === void 0) {\n config = {};\n }\n\n this.queryCache = config.queryCache || new QueryCache();\n this.mutationCache = config.mutationCache || new MutationCache();\n this.defaultOptions = config.defaultOptions || {};\n this.queryDefaults = [];\n this.mutationDefaults = [];\n }\n\n var _proto = QueryClient.prototype;\n\n _proto.mount = function mount() {\n var _this = this;\n\n this.unsubscribeFocus = focusManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onFocus();\n\n _this.queryCache.onFocus();\n }\n });\n this.unsubscribeOnline = onlineManager.subscribe(function () {\n if (focusManager.isFocused() && onlineManager.isOnline()) {\n _this.mutationCache.onOnline();\n\n _this.queryCache.onOnline();\n }\n });\n };\n\n _proto.unmount = function unmount() {\n var _this$unsubscribeFocu, _this$unsubscribeOnli;\n\n (_this$unsubscribeFocu = this.unsubscribeFocus) == null ? void 0 : _this$unsubscribeFocu.call(this);\n (_this$unsubscribeOnli = this.unsubscribeOnline) == null ? void 0 : _this$unsubscribeOnli.call(this);\n };\n\n _proto.isFetching = function isFetching(arg1, arg2) {\n var _parseFilterArgs = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs[0];\n\n filters.fetching = true;\n return this.queryCache.findAll(filters).length;\n };\n\n _proto.isMutating = function isMutating(filters) {\n return this.mutationCache.findAll(_extends({}, filters, {\n fetching: true\n })).length;\n };\n\n _proto.getQueryData = function getQueryData(queryKey, filters) {\n var _this$queryCache$find;\n\n return (_this$queryCache$find = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find.state.data;\n };\n\n _proto.getQueriesData = function getQueriesData(queryKeyOrFilters) {\n return this.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref) {\n var queryKey = _ref.queryKey,\n state = _ref.state;\n var data = state.data;\n return [queryKey, data];\n });\n };\n\n _proto.setQueryData = function setQueryData(queryKey, updater, options) {\n var parsedOptions = parseQueryArgs(queryKey);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions);\n return this.queryCache.build(this, defaultedOptions).setData(updater, options);\n };\n\n _proto.setQueriesData = function setQueriesData(queryKeyOrFilters, updater, options) {\n var _this2 = this;\n\n return notifyManager.batch(function () {\n return _this2.getQueryCache().findAll(queryKeyOrFilters).map(function (_ref2) {\n var queryKey = _ref2.queryKey;\n return [queryKey, _this2.setQueryData(queryKey, updater, options)];\n });\n });\n };\n\n _proto.getQueryState = function getQueryState(queryKey, filters) {\n var _this$queryCache$find2;\n\n return (_this$queryCache$find2 = this.queryCache.find(queryKey, filters)) == null ? void 0 : _this$queryCache$find2.state;\n };\n\n _proto.removeQueries = function removeQueries(arg1, arg2) {\n var _parseFilterArgs2 = parseFilterArgs(arg1, arg2),\n filters = _parseFilterArgs2[0];\n\n var queryCache = this.queryCache;\n notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n queryCache.remove(query);\n });\n });\n };\n\n _proto.resetQueries = function resetQueries(arg1, arg2, arg3) {\n var _this3 = this;\n\n var _parseFilterArgs3 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs3[0],\n options = _parseFilterArgs3[1];\n\n var queryCache = this.queryCache;\n\n var refetchFilters = _extends({}, filters, {\n active: true\n });\n\n return notifyManager.batch(function () {\n queryCache.findAll(filters).forEach(function (query) {\n query.reset();\n });\n return _this3.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.cancelQueries = function cancelQueries(arg1, arg2, arg3) {\n var _this4 = this;\n\n var _parseFilterArgs4 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs4[0],\n _parseFilterArgs4$ = _parseFilterArgs4[1],\n cancelOptions = _parseFilterArgs4$ === void 0 ? {} : _parseFilterArgs4$;\n\n if (typeof cancelOptions.revert === 'undefined') {\n cancelOptions.revert = true;\n }\n\n var promises = notifyManager.batch(function () {\n return _this4.queryCache.findAll(filters).map(function (query) {\n return query.cancel(cancelOptions);\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.invalidateQueries = function invalidateQueries(arg1, arg2, arg3) {\n var _ref3,\n _filters$refetchActiv,\n _filters$refetchInact,\n _this5 = this;\n\n var _parseFilterArgs5 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs5[0],\n options = _parseFilterArgs5[1];\n\n var refetchFilters = _extends({}, filters, {\n // if filters.refetchActive is not provided and filters.active is explicitly false,\n // e.g. invalidateQueries({ active: false }), we don't want to refetch active queries\n active: (_ref3 = (_filters$refetchActiv = filters.refetchActive) != null ? _filters$refetchActiv : filters.active) != null ? _ref3 : true,\n inactive: (_filters$refetchInact = filters.refetchInactive) != null ? _filters$refetchInact : false\n });\n\n return notifyManager.batch(function () {\n _this5.queryCache.findAll(filters).forEach(function (query) {\n query.invalidate();\n });\n\n return _this5.refetchQueries(refetchFilters, options);\n });\n };\n\n _proto.refetchQueries = function refetchQueries(arg1, arg2, arg3) {\n var _this6 = this;\n\n var _parseFilterArgs6 = parseFilterArgs(arg1, arg2, arg3),\n filters = _parseFilterArgs6[0],\n options = _parseFilterArgs6[1];\n\n var promises = notifyManager.batch(function () {\n return _this6.queryCache.findAll(filters).map(function (query) {\n return query.fetch(undefined, _extends({}, options, {\n meta: {\n refetchPage: filters == null ? void 0 : filters.refetchPage\n }\n }));\n });\n });\n var promise = Promise.all(promises).then(noop);\n\n if (!(options == null ? void 0 : options.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.fetchQuery = function fetchQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n var defaultedOptions = this.defaultQueryOptions(parsedOptions); // https://github.com/tannerlinsley/react-query/issues/652\n\n if (typeof defaultedOptions.retry === 'undefined') {\n defaultedOptions.retry = false;\n }\n\n var query = this.queryCache.build(this, defaultedOptions);\n return query.isStaleByTime(defaultedOptions.staleTime) ? query.fetch(defaultedOptions) : Promise.resolve(query.state.data);\n };\n\n _proto.prefetchQuery = function prefetchQuery(arg1, arg2, arg3) {\n return this.fetchQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.fetchInfiniteQuery = function fetchInfiniteQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n parsedOptions.behavior = infiniteQueryBehavior();\n return this.fetchQuery(parsedOptions);\n };\n\n _proto.prefetchInfiniteQuery = function prefetchInfiniteQuery(arg1, arg2, arg3) {\n return this.fetchInfiniteQuery(arg1, arg2, arg3).then(noop).catch(noop);\n };\n\n _proto.cancelMutations = function cancelMutations() {\n var _this7 = this;\n\n var promises = notifyManager.batch(function () {\n return _this7.mutationCache.getAll().map(function (mutation) {\n return mutation.cancel();\n });\n });\n return Promise.all(promises).then(noop).catch(noop);\n };\n\n _proto.resumePausedMutations = function resumePausedMutations() {\n return this.getMutationCache().resumePausedMutations();\n };\n\n _proto.executeMutation = function executeMutation(options) {\n return this.mutationCache.build(this, options).execute();\n };\n\n _proto.getQueryCache = function getQueryCache() {\n return this.queryCache;\n };\n\n _proto.getMutationCache = function getMutationCache() {\n return this.mutationCache;\n };\n\n _proto.getDefaultOptions = function getDefaultOptions() {\n return this.defaultOptions;\n };\n\n _proto.setDefaultOptions = function setDefaultOptions(options) {\n this.defaultOptions = options;\n };\n\n _proto.setQueryDefaults = function setQueryDefaults(queryKey, options) {\n var result = this.queryDefaults.find(function (x) {\n return hashQueryKey(queryKey) === hashQueryKey(x.queryKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.queryDefaults.push({\n queryKey: queryKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getQueryDefaults = function getQueryDefaults(queryKey) {\n var _this$queryDefaults$f;\n\n return queryKey ? (_this$queryDefaults$f = this.queryDefaults.find(function (x) {\n return partialMatchKey(queryKey, x.queryKey);\n })) == null ? void 0 : _this$queryDefaults$f.defaultOptions : undefined;\n };\n\n _proto.setMutationDefaults = function setMutationDefaults(mutationKey, options) {\n var result = this.mutationDefaults.find(function (x) {\n return hashQueryKey(mutationKey) === hashQueryKey(x.mutationKey);\n });\n\n if (result) {\n result.defaultOptions = options;\n } else {\n this.mutationDefaults.push({\n mutationKey: mutationKey,\n defaultOptions: options\n });\n }\n };\n\n _proto.getMutationDefaults = function getMutationDefaults(mutationKey) {\n var _this$mutationDefault;\n\n return mutationKey ? (_this$mutationDefault = this.mutationDefaults.find(function (x) {\n return partialMatchKey(mutationKey, x.mutationKey);\n })) == null ? void 0 : _this$mutationDefault.defaultOptions : undefined;\n };\n\n _proto.defaultQueryOptions = function defaultQueryOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n var defaultedOptions = _extends({}, this.defaultOptions.queries, this.getQueryDefaults(options == null ? void 0 : options.queryKey), options, {\n _defaulted: true\n });\n\n if (!defaultedOptions.queryHash && defaultedOptions.queryKey) {\n defaultedOptions.queryHash = hashQueryKeyByOptions(defaultedOptions.queryKey, defaultedOptions);\n }\n\n return defaultedOptions;\n };\n\n _proto.defaultQueryObserverOptions = function defaultQueryObserverOptions(options) {\n return this.defaultQueryOptions(options);\n };\n\n _proto.defaultMutationOptions = function defaultMutationOptions(options) {\n if (options == null ? void 0 : options._defaulted) {\n return options;\n }\n\n return _extends({}, this.defaultOptions.mutations, this.getMutationDefaults(options == null ? void 0 : options.mutationKey), options, {\n _defaulted: true\n });\n };\n\n _proto.clear = function clear() {\n this.queryCache.clear();\n this.mutationCache.clear();\n };\n\n return QueryClient;\n}();","import { focusManager } from './focusManager';\nimport { onlineManager } from './onlineManager';\nimport { sleep } from './utils';\n\nfunction defaultRetryDelay(failureCount) {\n return Math.min(1000 * Math.pow(2, failureCount), 30000);\n}\n\nexport function isCancelable(value) {\n return typeof (value == null ? void 0 : value.cancel) === 'function';\n}\nexport var CancelledError = function CancelledError(options) {\n this.revert = options == null ? void 0 : options.revert;\n this.silent = options == null ? void 0 : options.silent;\n};\nexport function isCancelledError(value) {\n return value instanceof CancelledError;\n} // CLASS\n\nexport var Retryer = function Retryer(config) {\n var _this = this;\n\n var cancelRetry = false;\n var cancelFn;\n var continueFn;\n var promiseResolve;\n var promiseReject;\n this.abort = config.abort;\n\n this.cancel = function (cancelOptions) {\n return cancelFn == null ? void 0 : cancelFn(cancelOptions);\n };\n\n this.cancelRetry = function () {\n cancelRetry = true;\n };\n\n this.continueRetry = function () {\n cancelRetry = false;\n };\n\n this.continue = function () {\n return continueFn == null ? void 0 : continueFn();\n };\n\n this.failureCount = 0;\n this.isPaused = false;\n this.isResolved = false;\n this.isTransportCancelable = false;\n this.promise = new Promise(function (outerResolve, outerReject) {\n promiseResolve = outerResolve;\n promiseReject = outerReject;\n });\n\n var resolve = function resolve(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onSuccess == null ? void 0 : config.onSuccess(value);\n continueFn == null ? void 0 : continueFn();\n promiseResolve(value);\n }\n };\n\n var reject = function reject(value) {\n if (!_this.isResolved) {\n _this.isResolved = true;\n config.onError == null ? void 0 : config.onError(value);\n continueFn == null ? void 0 : continueFn();\n promiseReject(value);\n }\n };\n\n var pause = function pause() {\n return new Promise(function (continueResolve) {\n continueFn = continueResolve;\n _this.isPaused = true;\n config.onPause == null ? void 0 : config.onPause();\n }).then(function () {\n continueFn = undefined;\n _this.isPaused = false;\n config.onContinue == null ? void 0 : config.onContinue();\n });\n }; // Create loop function\n\n\n var run = function run() {\n // Do nothing if already resolved\n if (_this.isResolved) {\n return;\n }\n\n var promiseOrValue; // Execute query\n\n try {\n promiseOrValue = config.fn();\n } catch (error) {\n promiseOrValue = Promise.reject(error);\n } // Create callback to cancel this fetch\n\n\n cancelFn = function cancelFn(cancelOptions) {\n if (!_this.isResolved) {\n reject(new CancelledError(cancelOptions));\n _this.abort == null ? void 0 : _this.abort(); // Cancel transport if supported\n\n if (isCancelable(promiseOrValue)) {\n try {\n promiseOrValue.cancel();\n } catch (_unused) {}\n }\n }\n }; // Check if the transport layer support cancellation\n\n\n _this.isTransportCancelable = isCancelable(promiseOrValue);\n Promise.resolve(promiseOrValue).then(resolve).catch(function (error) {\n var _config$retry, _config$retryDelay;\n\n // Stop if the fetch is already resolved\n if (_this.isResolved) {\n return;\n } // Do we need to retry the request?\n\n\n var retry = (_config$retry = config.retry) != null ? _config$retry : 3;\n var retryDelay = (_config$retryDelay = config.retryDelay) != null ? _config$retryDelay : defaultRetryDelay;\n var delay = typeof retryDelay === 'function' ? retryDelay(_this.failureCount, error) : retryDelay;\n var shouldRetry = retry === true || typeof retry === 'number' && _this.failureCount < retry || typeof retry === 'function' && retry(_this.failureCount, error);\n\n if (cancelRetry || !shouldRetry) {\n // We are done if the query does not need to be retried\n reject(error);\n return;\n }\n\n _this.failureCount++; // Notify on fail\n\n config.onFail == null ? void 0 : config.onFail(_this.failureCount, error); // Delay\n\n sleep(delay) // Pause if the document is not visible or when the device is offline\n .then(function () {\n if (!focusManager.isFocused() || !onlineManager.isOnline()) {\n return pause();\n }\n }).then(function () {\n if (cancelRetry) {\n reject(error);\n } else {\n run();\n }\n });\n });\n }; // Start loop\n\n\n run();\n};","export var Subscribable = /*#__PURE__*/function () {\n function Subscribable() {\n this.listeners = [];\n }\n\n var _proto = Subscribable.prototype;\n\n _proto.subscribe = function subscribe(listener) {\n var _this = this;\n\n var callback = listener || function () {\n return undefined;\n };\n\n this.listeners.push(callback);\n this.onSubscribe();\n return function () {\n _this.listeners = _this.listeners.filter(function (x) {\n return x !== callback;\n });\n\n _this.onUnsubscribe();\n };\n };\n\n _proto.hasListeners = function hasListeners() {\n return this.listeners.length > 0;\n };\n\n _proto.onSubscribe = function onSubscribe() {// Do nothing\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {// Do nothing\n };\n\n return Subscribable;\n}();",null,"import _extends from \"@babel/runtime/helpers/esm/extends\";\n// TYPES\n// UTILS\nexport var isServer = typeof window === 'undefined';\nexport function noop() {\n return undefined;\n}\nexport function functionalUpdate(updater, input) {\n return typeof updater === 'function' ? updater(input) : updater;\n}\nexport function isValidTimeout(value) {\n return typeof value === 'number' && value >= 0 && value !== Infinity;\n}\nexport function ensureQueryKeyArray(value) {\n return Array.isArray(value) ? value : [value];\n}\nexport function difference(array1, array2) {\n return array1.filter(function (x) {\n return array2.indexOf(x) === -1;\n });\n}\nexport function replaceAt(array, index, value) {\n var copy = array.slice(0);\n copy[index] = value;\n return copy;\n}\nexport function timeUntilStale(updatedAt, staleTime) {\n return Math.max(updatedAt + (staleTime || 0) - Date.now(), 0);\n}\nexport function parseQueryArgs(arg1, arg2, arg3) {\n if (!isQueryKey(arg1)) {\n return arg1;\n }\n\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n queryKey: arg1,\n queryFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n queryKey: arg1\n });\n}\nexport function parseMutationArgs(arg1, arg2, arg3) {\n if (isQueryKey(arg1)) {\n if (typeof arg2 === 'function') {\n return _extends({}, arg3, {\n mutationKey: arg1,\n mutationFn: arg2\n });\n }\n\n return _extends({}, arg2, {\n mutationKey: arg1\n });\n }\n\n if (typeof arg1 === 'function') {\n return _extends({}, arg2, {\n mutationFn: arg1\n });\n }\n\n return _extends({}, arg1);\n}\nexport function parseFilterArgs(arg1, arg2, arg3) {\n return isQueryKey(arg1) ? [_extends({}, arg2, {\n queryKey: arg1\n }), arg3] : [arg1 || {}, arg2];\n}\nexport function parseMutationFilterArgs(arg1, arg2) {\n return isQueryKey(arg1) ? _extends({}, arg2, {\n mutationKey: arg1\n }) : arg1;\n}\nexport function mapQueryStatusFilter(active, inactive) {\n if (active === true && inactive === true || active == null && inactive == null) {\n return 'all';\n } else if (active === false && inactive === false) {\n return 'none';\n } else {\n // At this point, active|inactive can only be true|false or false|true\n // so, when only one value is provided, the missing one has to be the negated value\n var isActive = active != null ? active : !inactive;\n return isActive ? 'active' : 'inactive';\n }\n}\nexport function matchQuery(filters, query) {\n var active = filters.active,\n exact = filters.exact,\n fetching = filters.fetching,\n inactive = filters.inactive,\n predicate = filters.predicate,\n queryKey = filters.queryKey,\n stale = filters.stale;\n\n if (isQueryKey(queryKey)) {\n if (exact) {\n if (query.queryHash !== hashQueryKeyByOptions(queryKey, query.options)) {\n return false;\n }\n } else if (!partialMatchKey(query.queryKey, queryKey)) {\n return false;\n }\n }\n\n var queryStatusFilter = mapQueryStatusFilter(active, inactive);\n\n if (queryStatusFilter === 'none') {\n return false;\n } else if (queryStatusFilter !== 'all') {\n var isActive = query.isActive();\n\n if (queryStatusFilter === 'active' && !isActive) {\n return false;\n }\n\n if (queryStatusFilter === 'inactive' && isActive) {\n return false;\n }\n }\n\n if (typeof stale === 'boolean' && query.isStale() !== stale) {\n return false;\n }\n\n if (typeof fetching === 'boolean' && query.isFetching() !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(query)) {\n return false;\n }\n\n return true;\n}\nexport function matchMutation(filters, mutation) {\n var exact = filters.exact,\n fetching = filters.fetching,\n predicate = filters.predicate,\n mutationKey = filters.mutationKey;\n\n if (isQueryKey(mutationKey)) {\n if (!mutation.options.mutationKey) {\n return false;\n }\n\n if (exact) {\n if (hashQueryKey(mutation.options.mutationKey) !== hashQueryKey(mutationKey)) {\n return false;\n }\n } else if (!partialMatchKey(mutation.options.mutationKey, mutationKey)) {\n return false;\n }\n }\n\n if (typeof fetching === 'boolean' && mutation.state.status === 'loading' !== fetching) {\n return false;\n }\n\n if (predicate && !predicate(mutation)) {\n return false;\n }\n\n return true;\n}\nexport function hashQueryKeyByOptions(queryKey, options) {\n var hashFn = (options == null ? void 0 : options.queryKeyHashFn) || hashQueryKey;\n return hashFn(queryKey);\n}\n/**\n * Default query keys hash function.\n */\n\nexport function hashQueryKey(queryKey) {\n var asArray = ensureQueryKeyArray(queryKey);\n return stableValueHash(asArray);\n}\n/**\n * Hashes the value into a stable hash.\n */\n\nexport function stableValueHash(value) {\n return JSON.stringify(value, function (_, val) {\n return isPlainObject(val) ? Object.keys(val).sort().reduce(function (result, key) {\n result[key] = val[key];\n return result;\n }, {}) : val;\n });\n}\n/**\n * Checks if key `b` partially matches with key `a`.\n */\n\nexport function partialMatchKey(a, b) {\n return partialDeepEqual(ensureQueryKeyArray(a), ensureQueryKeyArray(b));\n}\n/**\n * Checks if `b` partially matches with `a`.\n */\n\nexport function partialDeepEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (typeof a !== typeof b) {\n return false;\n }\n\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n return !Object.keys(b).some(function (key) {\n return !partialDeepEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n/**\n * This function returns `a` if `b` is deeply equal.\n * If not, it will replace any deeply equal children of `b` with those of `a`.\n * This can be used for structural sharing between JSON values for example.\n */\n\nexport function replaceEqualDeep(a, b) {\n if (a === b) {\n return a;\n }\n\n var array = Array.isArray(a) && Array.isArray(b);\n\n if (array || isPlainObject(a) && isPlainObject(b)) {\n var aSize = array ? a.length : Object.keys(a).length;\n var bItems = array ? b : Object.keys(b);\n var bSize = bItems.length;\n var copy = array ? [] : {};\n var equalItems = 0;\n\n for (var i = 0; i < bSize; i++) {\n var key = array ? i : bItems[i];\n copy[key] = replaceEqualDeep(a[key], b[key]);\n\n if (copy[key] === a[key]) {\n equalItems++;\n }\n }\n\n return aSize === bSize && equalItems === aSize ? a : copy;\n }\n\n return b;\n}\n/**\n * Shallow compare objects. Only works with objects that always have the same properties.\n */\n\nexport function shallowEqualObjects(a, b) {\n if (a && !b || b && !a) {\n return false;\n }\n\n for (var key in a) {\n if (a[key] !== b[key]) {\n return false;\n }\n }\n\n return true;\n} // Copied from: https://github.com/jonschlinkert/is-plain-object\n\nexport function isPlainObject(o) {\n if (!hasObjectPrototype(o)) {\n return false;\n } // If has modified constructor\n\n\n var ctor = o.constructor;\n\n if (typeof ctor === 'undefined') {\n return true;\n } // If has modified prototype\n\n\n var prot = ctor.prototype;\n\n if (!hasObjectPrototype(prot)) {\n return false;\n } // If constructor does not have an Object-specific method\n\n\n if (!prot.hasOwnProperty('isPrototypeOf')) {\n return false;\n } // Most likely a plain Object\n\n\n return true;\n}\n\nfunction hasObjectPrototype(o) {\n return Object.prototype.toString.call(o) === '[object Object]';\n}\n\nexport function isQueryKey(value) {\n return typeof value === 'string' || Array.isArray(value);\n}\nexport function isError(value) {\n return value instanceof Error;\n}\nexport function sleep(timeout) {\n return new Promise(function (resolve) {\n setTimeout(resolve, timeout);\n });\n}\n/**\n * Schedules a microtask.\n * This can be useful to schedule state updates after rendering.\n */\n\nexport function scheduleMicrotask(callback) {\n Promise.resolve().then(callback).catch(function (error) {\n return setTimeout(function () {\n throw error;\n });\n });\n}\nexport function getAbortController() {\n if (typeof AbortController === 'function') {\n return new AbortController();\n }\n}","export * from './core';\nexport * from './react';","import ReactDOM from 'react-dom';\nexport var unstable_batchedUpdates = ReactDOM.unstable_batchedUpdates;","import { notifyManager } from '../core';\nimport { unstable_batchedUpdates } from './reactBatchedUpdates';\nnotifyManager.setBatchNotifyFunction(unstable_batchedUpdates);","export var logger = console;","import { setLogger } from '../core';\nimport { logger } from './logger';\nsetLogger(logger);","import React from 'react';\nvar defaultContext = /*#__PURE__*/React.createContext(undefined);\nvar QueryClientSharingContext = /*#__PURE__*/React.createContext(false); // if contextSharing is on, we share the first and at least one\n// instance of the context across the window\n// to ensure that if React Query is used across\n// different bundles or microfrontends they will\n// all use the same **instance** of context, regardless\n// of module scoping.\n\nfunction getQueryClientContext(contextSharing) {\n if (contextSharing && typeof window !== 'undefined') {\n if (!window.ReactQueryClientContext) {\n window.ReactQueryClientContext = defaultContext;\n }\n\n return window.ReactQueryClientContext;\n }\n\n return defaultContext;\n}\n\nexport var useQueryClient = function useQueryClient() {\n var queryClient = React.useContext(getQueryClientContext(React.useContext(QueryClientSharingContext)));\n\n if (!queryClient) {\n throw new Error('No QueryClient set, use QueryClientProvider to set one');\n }\n\n return queryClient;\n};\nexport var QueryClientProvider = function QueryClientProvider(_ref) {\n var client = _ref.client,\n _ref$contextSharing = _ref.contextSharing,\n contextSharing = _ref$contextSharing === void 0 ? false : _ref$contextSharing,\n children = _ref.children;\n React.useEffect(function () {\n client.mount();\n return function () {\n client.unmount();\n };\n }, [client]);\n var Context = getQueryClientContext(contextSharing);\n return /*#__PURE__*/React.createElement(QueryClientSharingContext.Provider, {\n value: contextSharing\n }, /*#__PURE__*/React.createElement(Context.Provider, {\n value: client\n }, children));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { getDefaultState } from './mutation';\nimport { notifyManager } from './notifyManager';\nimport { Subscribable } from './subscribable';\n// CLASS\nexport var MutationObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(MutationObserver, _Subscribable);\n\n function MutationObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n\n _this.setOptions(options);\n\n _this.bindMethods();\n\n _this.updateResult();\n\n return _this;\n }\n\n var _proto = MutationObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.mutate = this.mutate.bind(this);\n this.reset = this.reset.bind(this);\n };\n\n _proto.setOptions = function setOptions(options) {\n this.options = this.client.defaultMutationOptions(options);\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n var _this$currentMutation;\n\n (_this$currentMutation = this.currentMutation) == null ? void 0 : _this$currentMutation.removeObserver(this);\n }\n };\n\n _proto.onMutationUpdate = function onMutationUpdate(action) {\n this.updateResult(); // Determine which callbacks to trigger\n\n var notifyOptions = {\n listeners: true\n };\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error') {\n notifyOptions.onError = true;\n }\n\n this.notify(notifyOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.reset = function reset() {\n this.currentMutation = undefined;\n this.updateResult();\n this.notify({\n listeners: true\n });\n };\n\n _proto.mutate = function mutate(variables, options) {\n this.mutateOptions = options;\n\n if (this.currentMutation) {\n this.currentMutation.removeObserver(this);\n }\n\n this.currentMutation = this.client.getMutationCache().build(this.client, _extends({}, this.options, {\n variables: typeof variables !== 'undefined' ? variables : this.options.variables\n }));\n this.currentMutation.addObserver(this);\n return this.currentMutation.execute();\n };\n\n _proto.updateResult = function updateResult() {\n var state = this.currentMutation ? this.currentMutation.state : getDefaultState();\n\n var result = _extends({}, state, {\n isLoading: state.status === 'loading',\n isSuccess: state.status === 'success',\n isError: state.status === 'error',\n isIdle: state.status === 'idle',\n mutate: this.mutate,\n reset: this.reset\n });\n\n this.currentResult = result;\n };\n\n _proto.notify = function notify(options) {\n var _this2 = this;\n\n notifyManager.batch(function () {\n // First trigger the mutate callbacks\n if (_this2.mutateOptions) {\n if (options.onSuccess) {\n _this2.mutateOptions.onSuccess == null ? void 0 : _this2.mutateOptions.onSuccess(_this2.currentResult.data, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(_this2.currentResult.data, null, _this2.currentResult.variables, _this2.currentResult.context);\n } else if (options.onError) {\n _this2.mutateOptions.onError == null ? void 0 : _this2.mutateOptions.onError(_this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n _this2.mutateOptions.onSettled == null ? void 0 : _this2.mutateOptions.onSettled(undefined, _this2.currentResult.error, _this2.currentResult.variables, _this2.currentResult.context);\n }\n } // Then trigger the listeners\n\n\n if (options.listeners) {\n _this2.listeners.forEach(function (listener) {\n listener(_this2.currentResult);\n });\n }\n });\n };\n\n return MutationObserver;\n}(Subscribable);","export function shouldThrowError(suspense, _useErrorBoundary, params) {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary.apply(void 0, params);\n } // Allow useErrorBoundary to override suspense's throwing behavior\n\n\n if (typeof _useErrorBoundary === 'boolean') return _useErrorBoundary; // If suspense is enabled default to throwing errors\n\n return !!suspense;\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { noop, parseMutationArgs } from '../core/utils';\nimport { MutationObserver } from '../core/mutationObserver';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils'; // HOOK\n\nexport function useMutation(arg1, arg2, arg3) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var options = parseMutationArgs(arg1, arg2, arg3);\n var queryClient = useQueryClient();\n var obsRef = React.useRef();\n\n if (!obsRef.current) {\n obsRef.current = new MutationObserver(queryClient, options);\n } else {\n obsRef.current.setOptions(options);\n }\n\n var currentResult = obsRef.current.getCurrentResult();\n React.useEffect(function () {\n mountedRef.current = true;\n var unsubscribe = obsRef.current.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n }));\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, []);\n var mutate = React.useCallback(function (variables, mutateOptions) {\n obsRef.current.mutate(variables, mutateOptions).catch(noop);\n }, []);\n\n if (currentResult.error && shouldThrowError(undefined, obsRef.current.options.useErrorBoundary, [currentResult.error])) {\n throw currentResult.error;\n }\n\n return _extends({}, currentResult, {\n mutate: mutate,\n mutateAsync: currentResult.mutate\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport { isServer, isValidTimeout, noop, replaceEqualDeep, shallowEqualObjects, timeUntilStale } from './utils';\nimport { notifyManager } from './notifyManager';\nimport { focusManager } from './focusManager';\nimport { Subscribable } from './subscribable';\nimport { getLogger } from './logger';\nimport { isCancelledError } from './retryer';\nexport var QueryObserver = /*#__PURE__*/function (_Subscribable) {\n _inheritsLoose(QueryObserver, _Subscribable);\n\n function QueryObserver(client, options) {\n var _this;\n\n _this = _Subscribable.call(this) || this;\n _this.client = client;\n _this.options = options;\n _this.trackedProps = [];\n _this.selectError = null;\n\n _this.bindMethods();\n\n _this.setOptions(options);\n\n return _this;\n }\n\n var _proto = QueryObserver.prototype;\n\n _proto.bindMethods = function bindMethods() {\n this.remove = this.remove.bind(this);\n this.refetch = this.refetch.bind(this);\n };\n\n _proto.onSubscribe = function onSubscribe() {\n if (this.listeners.length === 1) {\n this.currentQuery.addObserver(this);\n\n if (shouldFetchOnMount(this.currentQuery, this.options)) {\n this.executeFetch();\n }\n\n this.updateTimers();\n }\n };\n\n _proto.onUnsubscribe = function onUnsubscribe() {\n if (!this.listeners.length) {\n this.destroy();\n }\n };\n\n _proto.shouldFetchOnReconnect = function shouldFetchOnReconnect() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnReconnect);\n };\n\n _proto.shouldFetchOnWindowFocus = function shouldFetchOnWindowFocus() {\n return shouldFetchOn(this.currentQuery, this.options, this.options.refetchOnWindowFocus);\n };\n\n _proto.destroy = function destroy() {\n this.listeners = [];\n this.clearTimers();\n this.currentQuery.removeObserver(this);\n };\n\n _proto.setOptions = function setOptions(options, notifyOptions) {\n var prevOptions = this.options;\n var prevQuery = this.currentQuery;\n this.options = this.client.defaultQueryObserverOptions(options);\n\n if (typeof this.options.enabled !== 'undefined' && typeof this.options.enabled !== 'boolean') {\n throw new Error('Expected enabled to be a boolean');\n } // Keep previous query key if the user does not supply one\n\n\n if (!this.options.queryKey) {\n this.options.queryKey = prevOptions.queryKey;\n }\n\n this.updateQuery();\n var mounted = this.hasListeners(); // Fetch if there are subscribers\n\n if (mounted && shouldFetchOptionally(this.currentQuery, prevQuery, this.options, prevOptions)) {\n this.executeFetch();\n } // Update result\n\n\n this.updateResult(notifyOptions); // Update stale interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || this.options.staleTime !== prevOptions.staleTime)) {\n this.updateStaleTimeout();\n }\n\n var nextRefetchInterval = this.computeRefetchInterval(); // Update refetch interval if needed\n\n if (mounted && (this.currentQuery !== prevQuery || this.options.enabled !== prevOptions.enabled || nextRefetchInterval !== this.currentRefetchInterval)) {\n this.updateRefetchInterval(nextRefetchInterval);\n }\n };\n\n _proto.getOptimisticResult = function getOptimisticResult(options) {\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return this.createResult(query, defaultedOptions);\n };\n\n _proto.getCurrentResult = function getCurrentResult() {\n return this.currentResult;\n };\n\n _proto.trackResult = function trackResult(result, defaultedOptions) {\n var _this2 = this;\n\n var trackedResult = {};\n\n var trackProp = function trackProp(key) {\n if (!_this2.trackedProps.includes(key)) {\n _this2.trackedProps.push(key);\n }\n };\n\n Object.keys(result).forEach(function (key) {\n Object.defineProperty(trackedResult, key, {\n configurable: false,\n enumerable: true,\n get: function get() {\n trackProp(key);\n return result[key];\n }\n });\n });\n\n if (defaultedOptions.useErrorBoundary || defaultedOptions.suspense) {\n trackProp('error');\n }\n\n return trackedResult;\n };\n\n _proto.getNextResult = function getNextResult(options) {\n var _this3 = this;\n\n return new Promise(function (resolve, reject) {\n var unsubscribe = _this3.subscribe(function (result) {\n if (!result.isFetching) {\n unsubscribe();\n\n if (result.isError && (options == null ? void 0 : options.throwOnError)) {\n reject(result.error);\n } else {\n resolve(result);\n }\n }\n });\n });\n };\n\n _proto.getCurrentQuery = function getCurrentQuery() {\n return this.currentQuery;\n };\n\n _proto.remove = function remove() {\n this.client.getQueryCache().remove(this.currentQuery);\n };\n\n _proto.refetch = function refetch(options) {\n return this.fetch(_extends({}, options, {\n meta: {\n refetchPage: options == null ? void 0 : options.refetchPage\n }\n }));\n };\n\n _proto.fetchOptimistic = function fetchOptimistic(options) {\n var _this4 = this;\n\n var defaultedOptions = this.client.defaultQueryObserverOptions(options);\n var query = this.client.getQueryCache().build(this.client, defaultedOptions);\n return query.fetch().then(function () {\n return _this4.createResult(query, defaultedOptions);\n });\n };\n\n _proto.fetch = function fetch(fetchOptions) {\n var _this5 = this;\n\n return this.executeFetch(fetchOptions).then(function () {\n _this5.updateResult();\n\n return _this5.currentResult;\n });\n };\n\n _proto.executeFetch = function executeFetch(fetchOptions) {\n // Make sure we reference the latest query as the current one might have been removed\n this.updateQuery(); // Fetch\n\n var promise = this.currentQuery.fetch(this.options, fetchOptions);\n\n if (!(fetchOptions == null ? void 0 : fetchOptions.throwOnError)) {\n promise = promise.catch(noop);\n }\n\n return promise;\n };\n\n _proto.updateStaleTimeout = function updateStaleTimeout() {\n var _this6 = this;\n\n this.clearStaleTimeout();\n\n if (isServer || this.currentResult.isStale || !isValidTimeout(this.options.staleTime)) {\n return;\n }\n\n var time = timeUntilStale(this.currentResult.dataUpdatedAt, this.options.staleTime); // The timeout is sometimes triggered 1 ms before the stale time expiration.\n // To mitigate this issue we always add 1 ms to the timeout.\n\n var timeout = time + 1;\n this.staleTimeoutId = setTimeout(function () {\n if (!_this6.currentResult.isStale) {\n _this6.updateResult();\n }\n }, timeout);\n };\n\n _proto.computeRefetchInterval = function computeRefetchInterval() {\n var _this$options$refetch;\n\n return typeof this.options.refetchInterval === 'function' ? this.options.refetchInterval(this.currentResult.data, this.currentQuery) : (_this$options$refetch = this.options.refetchInterval) != null ? _this$options$refetch : false;\n };\n\n _proto.updateRefetchInterval = function updateRefetchInterval(nextInterval) {\n var _this7 = this;\n\n this.clearRefetchInterval();\n this.currentRefetchInterval = nextInterval;\n\n if (isServer || this.options.enabled === false || !isValidTimeout(this.currentRefetchInterval) || this.currentRefetchInterval === 0) {\n return;\n }\n\n this.refetchIntervalId = setInterval(function () {\n if (_this7.options.refetchIntervalInBackground || focusManager.isFocused()) {\n _this7.executeFetch();\n }\n }, this.currentRefetchInterval);\n };\n\n _proto.updateTimers = function updateTimers() {\n this.updateStaleTimeout();\n this.updateRefetchInterval(this.computeRefetchInterval());\n };\n\n _proto.clearTimers = function clearTimers() {\n this.clearStaleTimeout();\n this.clearRefetchInterval();\n };\n\n _proto.clearStaleTimeout = function clearStaleTimeout() {\n if (this.staleTimeoutId) {\n clearTimeout(this.staleTimeoutId);\n this.staleTimeoutId = undefined;\n }\n };\n\n _proto.clearRefetchInterval = function clearRefetchInterval() {\n if (this.refetchIntervalId) {\n clearInterval(this.refetchIntervalId);\n this.refetchIntervalId = undefined;\n }\n };\n\n _proto.createResult = function createResult(query, options) {\n var prevQuery = this.currentQuery;\n var prevOptions = this.options;\n var prevResult = this.currentResult;\n var prevResultState = this.currentResultState;\n var prevResultOptions = this.currentResultOptions;\n var queryChange = query !== prevQuery;\n var queryInitialState = queryChange ? query.state : this.currentQueryInitialState;\n var prevQueryResult = queryChange ? this.currentResult : this.previousQueryResult;\n var state = query.state;\n var dataUpdatedAt = state.dataUpdatedAt,\n error = state.error,\n errorUpdatedAt = state.errorUpdatedAt,\n isFetching = state.isFetching,\n status = state.status;\n var isPreviousData = false;\n var isPlaceholderData = false;\n var data; // Optimistically set result in fetching state if needed\n\n if (options.optimisticResults) {\n var mounted = this.hasListeners();\n var fetchOnMount = !mounted && shouldFetchOnMount(query, options);\n var fetchOptionally = mounted && shouldFetchOptionally(query, prevQuery, options, prevOptions);\n\n if (fetchOnMount || fetchOptionally) {\n isFetching = true;\n\n if (!dataUpdatedAt) {\n status = 'loading';\n }\n }\n } // Keep previous data if needed\n\n\n if (options.keepPreviousData && !state.dataUpdateCount && (prevQueryResult == null ? void 0 : prevQueryResult.isSuccess) && status !== 'error') {\n data = prevQueryResult.data;\n dataUpdatedAt = prevQueryResult.dataUpdatedAt;\n status = prevQueryResult.status;\n isPreviousData = true;\n } // Select data if needed\n else if (options.select && typeof state.data !== 'undefined') {\n // Memoize select result\n if (prevResult && state.data === (prevResultState == null ? void 0 : prevResultState.data) && options.select === this.selectFn) {\n data = this.selectResult;\n } else {\n try {\n this.selectFn = options.select;\n data = options.select(state.data);\n\n if (options.structuralSharing !== false) {\n data = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, data);\n }\n\n this.selectResult = data;\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n } // Use query data\n else {\n data = state.data;\n } // Show placeholder data if needed\n\n\n if (typeof options.placeholderData !== 'undefined' && typeof data === 'undefined' && (status === 'loading' || status === 'idle')) {\n var placeholderData; // Memoize placeholder data\n\n if ((prevResult == null ? void 0 : prevResult.isPlaceholderData) && options.placeholderData === (prevResultOptions == null ? void 0 : prevResultOptions.placeholderData)) {\n placeholderData = prevResult.data;\n } else {\n placeholderData = typeof options.placeholderData === 'function' ? options.placeholderData() : options.placeholderData;\n\n if (options.select && typeof placeholderData !== 'undefined') {\n try {\n placeholderData = options.select(placeholderData);\n\n if (options.structuralSharing !== false) {\n placeholderData = replaceEqualDeep(prevResult == null ? void 0 : prevResult.data, placeholderData);\n }\n\n this.selectError = null;\n } catch (selectError) {\n getLogger().error(selectError);\n this.selectError = selectError;\n }\n }\n }\n\n if (typeof placeholderData !== 'undefined') {\n status = 'success';\n data = placeholderData;\n isPlaceholderData = true;\n }\n }\n\n if (this.selectError) {\n error = this.selectError;\n data = this.selectResult;\n errorUpdatedAt = Date.now();\n status = 'error';\n }\n\n var result = {\n status: status,\n isLoading: status === 'loading',\n isSuccess: status === 'success',\n isError: status === 'error',\n isIdle: status === 'idle',\n data: data,\n dataUpdatedAt: dataUpdatedAt,\n error: error,\n errorUpdatedAt: errorUpdatedAt,\n failureCount: state.fetchFailureCount,\n errorUpdateCount: state.errorUpdateCount,\n isFetched: state.dataUpdateCount > 0 || state.errorUpdateCount > 0,\n isFetchedAfterMount: state.dataUpdateCount > queryInitialState.dataUpdateCount || state.errorUpdateCount > queryInitialState.errorUpdateCount,\n isFetching: isFetching,\n isRefetching: isFetching && status !== 'loading',\n isLoadingError: status === 'error' && state.dataUpdatedAt === 0,\n isPlaceholderData: isPlaceholderData,\n isPreviousData: isPreviousData,\n isRefetchError: status === 'error' && state.dataUpdatedAt !== 0,\n isStale: isStale(query, options),\n refetch: this.refetch,\n remove: this.remove\n };\n return result;\n };\n\n _proto.shouldNotifyListeners = function shouldNotifyListeners(result, prevResult) {\n if (!prevResult) {\n return true;\n }\n\n var _this$options = this.options,\n notifyOnChangeProps = _this$options.notifyOnChangeProps,\n notifyOnChangePropsExclusions = _this$options.notifyOnChangePropsExclusions;\n\n if (!notifyOnChangeProps && !notifyOnChangePropsExclusions) {\n return true;\n }\n\n if (notifyOnChangeProps === 'tracked' && !this.trackedProps.length) {\n return true;\n }\n\n var includedProps = notifyOnChangeProps === 'tracked' ? this.trackedProps : notifyOnChangeProps;\n return Object.keys(result).some(function (key) {\n var typedKey = key;\n var changed = result[typedKey] !== prevResult[typedKey];\n var isIncluded = includedProps == null ? void 0 : includedProps.some(function (x) {\n return x === key;\n });\n var isExcluded = notifyOnChangePropsExclusions == null ? void 0 : notifyOnChangePropsExclusions.some(function (x) {\n return x === key;\n });\n return changed && !isExcluded && (!includedProps || isIncluded);\n });\n };\n\n _proto.updateResult = function updateResult(notifyOptions) {\n var prevResult = this.currentResult;\n this.currentResult = this.createResult(this.currentQuery, this.options);\n this.currentResultState = this.currentQuery.state;\n this.currentResultOptions = this.options; // Only notify if something has changed\n\n if (shallowEqualObjects(this.currentResult, prevResult)) {\n return;\n } // Determine which callbacks to trigger\n\n\n var defaultNotifyOptions = {\n cache: true\n };\n\n if ((notifyOptions == null ? void 0 : notifyOptions.listeners) !== false && this.shouldNotifyListeners(this.currentResult, prevResult)) {\n defaultNotifyOptions.listeners = true;\n }\n\n this.notify(_extends({}, defaultNotifyOptions, notifyOptions));\n };\n\n _proto.updateQuery = function updateQuery() {\n var query = this.client.getQueryCache().build(this.client, this.options);\n\n if (query === this.currentQuery) {\n return;\n }\n\n var prevQuery = this.currentQuery;\n this.currentQuery = query;\n this.currentQueryInitialState = query.state;\n this.previousQueryResult = this.currentResult;\n\n if (this.hasListeners()) {\n prevQuery == null ? void 0 : prevQuery.removeObserver(this);\n query.addObserver(this);\n }\n };\n\n _proto.onQueryUpdate = function onQueryUpdate(action) {\n var notifyOptions = {};\n\n if (action.type === 'success') {\n notifyOptions.onSuccess = true;\n } else if (action.type === 'error' && !isCancelledError(action.error)) {\n notifyOptions.onError = true;\n }\n\n this.updateResult(notifyOptions);\n\n if (this.hasListeners()) {\n this.updateTimers();\n }\n };\n\n _proto.notify = function notify(notifyOptions) {\n var _this8 = this;\n\n notifyManager.batch(function () {\n // First trigger the configuration callbacks\n if (notifyOptions.onSuccess) {\n _this8.options.onSuccess == null ? void 0 : _this8.options.onSuccess(_this8.currentResult.data);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(_this8.currentResult.data, null);\n } else if (notifyOptions.onError) {\n _this8.options.onError == null ? void 0 : _this8.options.onError(_this8.currentResult.error);\n _this8.options.onSettled == null ? void 0 : _this8.options.onSettled(undefined, _this8.currentResult.error);\n } // Then trigger the listeners\n\n\n if (notifyOptions.listeners) {\n _this8.listeners.forEach(function (listener) {\n listener(_this8.currentResult);\n });\n } // Then the cache listeners\n\n\n if (notifyOptions.cache) {\n _this8.client.getQueryCache().notify({\n query: _this8.currentQuery,\n type: 'observerResultsUpdated'\n });\n }\n });\n };\n\n return QueryObserver;\n}(Subscribable);\n\nfunction shouldLoadOnMount(query, options) {\n return options.enabled !== false && !query.state.dataUpdatedAt && !(query.state.status === 'error' && options.retryOnMount === false);\n}\n\nfunction shouldFetchOnMount(query, options) {\n return shouldLoadOnMount(query, options) || query.state.dataUpdatedAt > 0 && shouldFetchOn(query, options, options.refetchOnMount);\n}\n\nfunction shouldFetchOn(query, options, field) {\n if (options.enabled !== false) {\n var value = typeof field === 'function' ? field(query) : field;\n return value === 'always' || value !== false && isStale(query, options);\n }\n\n return false;\n}\n\nfunction shouldFetchOptionally(query, prevQuery, options, prevOptions) {\n return options.enabled !== false && (query !== prevQuery || prevOptions.enabled === false) && (!options.suspense || query.state.status !== 'error') && isStale(query, options);\n}\n\nfunction isStale(query, options) {\n return query.isStaleByTime(options.staleTime);\n}","import React from 'react'; // CONTEXT\n\nfunction createValue() {\n var _isReset = false;\n return {\n clearReset: function clearReset() {\n _isReset = false;\n },\n reset: function reset() {\n _isReset = true;\n },\n isReset: function isReset() {\n return _isReset;\n }\n };\n}\n\nvar QueryErrorResetBoundaryContext = /*#__PURE__*/React.createContext(createValue()); // HOOK\n\nexport var useQueryErrorResetBoundary = function useQueryErrorResetBoundary() {\n return React.useContext(QueryErrorResetBoundaryContext);\n}; // COMPONENT\n\nexport var QueryErrorResetBoundary = function QueryErrorResetBoundary(_ref) {\n var children = _ref.children;\n var value = React.useMemo(function () {\n return createValue();\n }, []);\n return /*#__PURE__*/React.createElement(QueryErrorResetBoundaryContext.Provider, {\n value: value\n }, typeof children === 'function' ? children(value) : children);\n};","import React from 'react';\nimport { notifyManager } from '../core/notifyManager';\nimport { useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nimport { useQueryClient } from './QueryClientProvider';\nimport { shouldThrowError } from './utils';\nexport function useBaseQuery(options, Observer) {\n var mountedRef = React.useRef(false);\n\n var _React$useState = React.useState(0),\n forceUpdate = _React$useState[1];\n\n var queryClient = useQueryClient();\n var errorResetBoundary = useQueryErrorResetBoundary();\n var defaultedOptions = queryClient.defaultQueryObserverOptions(options); // Make sure results are optimistically set in fetching state before subscribing or updating options\n\n defaultedOptions.optimisticResults = true; // Include callbacks in batch renders\n\n if (defaultedOptions.onError) {\n defaultedOptions.onError = notifyManager.batchCalls(defaultedOptions.onError);\n }\n\n if (defaultedOptions.onSuccess) {\n defaultedOptions.onSuccess = notifyManager.batchCalls(defaultedOptions.onSuccess);\n }\n\n if (defaultedOptions.onSettled) {\n defaultedOptions.onSettled = notifyManager.batchCalls(defaultedOptions.onSettled);\n }\n\n if (defaultedOptions.suspense) {\n // Always set stale time when using suspense to prevent\n // fetching again when directly mounting after suspending\n if (typeof defaultedOptions.staleTime !== 'number') {\n defaultedOptions.staleTime = 1000;\n } // Set cache time to 1 if the option has been set to 0\n // when using suspense to prevent infinite loop of fetches\n\n\n if (defaultedOptions.cacheTime === 0) {\n defaultedOptions.cacheTime = 1;\n }\n }\n\n if (defaultedOptions.suspense || defaultedOptions.useErrorBoundary) {\n // Prevent retrying failed query if the error boundary has not been reset yet\n if (!errorResetBoundary.isReset()) {\n defaultedOptions.retryOnMount = false;\n }\n }\n\n var _React$useState2 = React.useState(function () {\n return new Observer(queryClient, defaultedOptions);\n }),\n observer = _React$useState2[0];\n\n var result = observer.getOptimisticResult(defaultedOptions);\n React.useEffect(function () {\n mountedRef.current = true;\n errorResetBoundary.clearReset();\n var unsubscribe = observer.subscribe(notifyManager.batchCalls(function () {\n if (mountedRef.current) {\n forceUpdate(function (x) {\n return x + 1;\n });\n }\n })); // Update result to make sure we did not miss any query updates\n // between creating the observer and subscribing to it.\n\n observer.updateResult();\n return function () {\n mountedRef.current = false;\n unsubscribe();\n };\n }, [errorResetBoundary, observer]);\n React.useEffect(function () {\n // Do not notify on updates because of changes in the options because\n // these changes should already be reflected in the optimistic result.\n observer.setOptions(defaultedOptions, {\n listeners: false\n });\n }, [defaultedOptions, observer]); // Handle suspense\n\n if (defaultedOptions.suspense && result.isLoading) {\n throw observer.fetchOptimistic(defaultedOptions).then(function (_ref) {\n var data = _ref.data;\n defaultedOptions.onSuccess == null ? void 0 : defaultedOptions.onSuccess(data);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(data, null);\n }).catch(function (error) {\n errorResetBoundary.clearReset();\n defaultedOptions.onError == null ? void 0 : defaultedOptions.onError(error);\n defaultedOptions.onSettled == null ? void 0 : defaultedOptions.onSettled(undefined, error);\n });\n } // Handle error boundary\n\n\n if (result.isError && !errorResetBoundary.isReset() && !result.isFetching && shouldThrowError(defaultedOptions.suspense, defaultedOptions.useErrorBoundary, [result.error, observer.getCurrentQuery()])) {\n throw result.error;\n } // Handle result property usage tracking\n\n\n if (defaultedOptions.notifyOnChangeProps === 'tracked') {\n result = observer.trackResult(result, defaultedOptions);\n }\n\n return result;\n}","import { QueryObserver } from '../core';\nimport { parseQueryArgs } from '../core/utils';\nimport { useBaseQuery } from './useBaseQuery'; // HOOK\n\nexport function useQuery(arg1, arg2, arg3) {\n var parsedOptions = parseQueryArgs(arg1, arg2, arg3);\n return useBaseQuery(parsedOptions, QueryObserver);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\n\n// TYPES\n// FUNCTIONS\nfunction dehydrateMutation(mutation) {\n return {\n mutationKey: mutation.options.mutationKey,\n state: mutation.state\n };\n} // Most config is not dehydrated but instead meant to configure again when\n// consuming the de/rehydrated data, typically with useQuery on the client.\n// Sometimes it might make sense to prefetch data on the server and include\n// in the html-payload, but not consume it on the initial render.\n\n\nfunction dehydrateQuery(query) {\n return {\n state: query.state,\n queryKey: query.queryKey,\n queryHash: query.queryHash\n };\n}\n\nfunction defaultShouldDehydrateMutation(mutation) {\n return mutation.state.isPaused;\n}\n\nfunction defaultShouldDehydrateQuery(query) {\n return query.state.status === 'success';\n}\n\nexport function dehydrate(client, options) {\n var _options, _options2;\n\n options = options || {};\n var mutations = [];\n var queries = [];\n\n if (((_options = options) == null ? void 0 : _options.dehydrateMutations) !== false) {\n var shouldDehydrateMutation = options.shouldDehydrateMutation || defaultShouldDehydrateMutation;\n client.getMutationCache().getAll().forEach(function (mutation) {\n if (shouldDehydrateMutation(mutation)) {\n mutations.push(dehydrateMutation(mutation));\n }\n });\n }\n\n if (((_options2 = options) == null ? void 0 : _options2.dehydrateQueries) !== false) {\n var shouldDehydrateQuery = options.shouldDehydrateQuery || defaultShouldDehydrateQuery;\n client.getQueryCache().getAll().forEach(function (query) {\n if (shouldDehydrateQuery(query)) {\n queries.push(dehydrateQuery(query));\n }\n });\n }\n\n return {\n mutations: mutations,\n queries: queries\n };\n}\nexport function hydrate(client, dehydratedState, options) {\n if (typeof dehydratedState !== 'object' || dehydratedState === null) {\n return;\n }\n\n var mutationCache = client.getMutationCache();\n var queryCache = client.getQueryCache();\n var mutations = dehydratedState.mutations || [];\n var queries = dehydratedState.queries || [];\n mutations.forEach(function (dehydratedMutation) {\n var _options$defaultOptio;\n\n mutationCache.build(client, _extends({}, options == null ? void 0 : (_options$defaultOptio = options.defaultOptions) == null ? void 0 : _options$defaultOptio.mutations, {\n mutationKey: dehydratedMutation.mutationKey\n }), dehydratedMutation.state);\n });\n queries.forEach(function (dehydratedQuery) {\n var _options$defaultOptio2;\n\n var query = queryCache.get(dehydratedQuery.queryHash); // Do not hydrate if an existing query exists with newer data\n\n if (query) {\n if (query.state.dataUpdatedAt < dehydratedQuery.state.dataUpdatedAt) {\n query.setState(dehydratedQuery.state);\n }\n\n return;\n } // Restore query\n\n\n queryCache.build(client, _extends({}, options == null ? void 0 : (_options$defaultOptio2 = options.defaultOptions) == null ? void 0 : _options$defaultOptio2.queries, {\n queryKey: dehydratedQuery.queryKey,\n queryHash: dehydratedQuery.queryHash\n }), dehydratedQuery.state);\n });\n}","import React from 'react';\nimport { hydrate } from '../core';\nimport { useQueryClient } from './QueryClientProvider';\nexport function useHydrate(state, options) {\n var queryClient = useQueryClient();\n var optionsRef = React.useRef(options);\n optionsRef.current = options; // Running hydrate again with the same queries is safe,\n // it wont overwrite or initialize existing queries,\n // relying on useMemo here is only a performance optimization.\n // hydrate can and should be run *during* render here for SSR to work properly\n\n React.useMemo(function () {\n if (state) {\n hydrate(queryClient, state, optionsRef.current);\n }\n }, [queryClient, state]);\n}\nexport var Hydrate = function Hydrate(_ref) {\n var children = _ref.children,\n options = _ref.options,\n state = _ref.state;\n useHydrate(state, options);\n return children;\n};","// Side effects\nimport './setBatchUpdatesFn';\nimport './setLogger';\nexport { QueryClientProvider, useQueryClient } from './QueryClientProvider';\nexport { QueryErrorResetBoundary, useQueryErrorResetBoundary } from './QueryErrorResetBoundary';\nexport { useIsFetching } from './useIsFetching';\nexport { useIsMutating } from './useIsMutating';\nexport { useMutation } from './useMutation';\nexport { useQuery } from './useQuery';\nexport { useQueries } from './useQueries';\nexport { useInfiniteQuery } from './useInfiniteQuery';\nexport { useHydrate, Hydrate } from './Hydrate'; // Types\n\nexport * from './types';","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"MediaQuery\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"MediaQuery\"] = factory(root[\"React\"]);\n})(this, (__WEBPACK_EXTERNAL_MODULE_react__) => {\nreturn /******/ (() => { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./node_modules/css-mediaquery/index.js\":\n/*!**********************************************!*\\\n !*** ./node_modules/css-mediaquery/index.js ***!\n \\**********************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\n/*\nCopyright (c) 2014, Yahoo! Inc. All rights reserved.\nCopyrights licensed under the New BSD License.\nSee the accompanying LICENSE file for terms.\n*/\n\n\n\nexports.match = matchQuery;\nexports.parse = parseQuery;\n\n// -----------------------------------------------------------------------------\n\nvar RE_MEDIA_QUERY = /(?:(only|not)?\\s*([^\\s\\(\\)]+)(?:\\s*and)?\\s*)?(.+)?/i,\n RE_MQ_EXPRESSION = /\\(\\s*([^\\s\\:\\)]+)\\s*(?:\\:\\s*([^\\s\\)]+))?\\s*\\)/,\n RE_MQ_FEATURE = /^(?:(min|max)-)?(.+)/,\n RE_LENGTH_UNIT = /(em|rem|px|cm|mm|in|pt|pc)?$/,\n RE_RESOLUTION_UNIT = /(dpi|dpcm|dppx)?$/;\n\nfunction matchQuery(mediaQuery, values) {\n return parseQuery(mediaQuery).some(function (query) {\n var inverse = query.inverse;\n\n // Either the parsed or specified `type` is \"all\", or the types must be\n // equal for a match.\n var typeMatch = query.type === 'all' || values.type === query.type;\n\n // Quit early when `type` doesn't match, but take \"not\" into account.\n if ((typeMatch && inverse) || !(typeMatch || inverse)) {\n return false;\n }\n\n var expressionsMatch = query.expressions.every(function (expression) {\n var feature = expression.feature,\n modifier = expression.modifier,\n expValue = expression.value,\n value = values[feature];\n\n // Missing or falsy values don't match.\n if (!value) { return false; }\n\n switch (feature) {\n case 'orientation':\n case 'scan':\n return value.toLowerCase() === expValue.toLowerCase();\n\n case 'width':\n case 'height':\n case 'device-width':\n case 'device-height':\n expValue = toPx(expValue);\n value = toPx(value);\n break;\n\n case 'resolution':\n expValue = toDpi(expValue);\n value = toDpi(value);\n break;\n\n case 'aspect-ratio':\n case 'device-aspect-ratio':\n case /* Deprecated */ 'device-pixel-ratio':\n expValue = toDecimal(expValue);\n value = toDecimal(value);\n break;\n\n case 'grid':\n case 'color':\n case 'color-index':\n case 'monochrome':\n expValue = parseInt(expValue, 10) || 1;\n value = parseInt(value, 10) || 0;\n break;\n }\n\n switch (modifier) {\n case 'min': return value >= expValue;\n case 'max': return value <= expValue;\n default : return value === expValue;\n }\n });\n\n return (expressionsMatch && !inverse) || (!expressionsMatch && inverse);\n });\n}\n\nfunction parseQuery(mediaQuery) {\n return mediaQuery.split(',').map(function (query) {\n query = query.trim();\n\n var captures = query.match(RE_MEDIA_QUERY),\n modifier = captures[1],\n type = captures[2],\n expressions = captures[3] || '',\n parsed = {};\n\n parsed.inverse = !!modifier && modifier.toLowerCase() === 'not';\n parsed.type = type ? type.toLowerCase() : 'all';\n\n // Split expressions into a list.\n expressions = expressions.match(/\\([^\\)]+\\)/g) || [];\n\n parsed.expressions = expressions.map(function (expression) {\n var captures = expression.match(RE_MQ_EXPRESSION),\n feature = captures[1].toLowerCase().match(RE_MQ_FEATURE);\n\n return {\n modifier: feature[1],\n feature : feature[2],\n value : captures[2]\n };\n });\n\n return parsed;\n });\n}\n\n// -- Utilities ----------------------------------------------------------------\n\nfunction toDecimal(ratio) {\n var decimal = Number(ratio),\n numbers;\n\n if (!decimal) {\n numbers = ratio.match(/^(\\d+)\\s*\\/\\s*(\\d+)$/);\n decimal = numbers[1] / numbers[2];\n }\n\n return decimal;\n}\n\nfunction toDpi(resolution) {\n var value = parseFloat(resolution),\n units = String(resolution).match(RE_RESOLUTION_UNIT)[1];\n\n switch (units) {\n case 'dpcm': return value / 2.54;\n case 'dppx': return value * 96;\n default : return value;\n }\n}\n\nfunction toPx(length) {\n var value = parseFloat(length),\n units = String(length).match(RE_LENGTH_UNIT)[1];\n\n switch (units) {\n case 'em' : return value * 16;\n case 'rem': return value * 16;\n case 'cm' : return value * 96 / 2.54;\n case 'mm' : return value * 96 / 2.54 / 10;\n case 'in' : return value * 96;\n case 'pt' : return value * 72;\n case 'pc' : return value * 72 / 12;\n default : return value;\n }\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/hyphenate-style-name/index.js\":\n/*!****************************************************!*\\\n !*** ./node_modules/hyphenate-style-name/index.js ***!\n \\****************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => (__WEBPACK_DEFAULT_EXPORT__)\n/* harmony export */ });\n/* eslint-disable no-var, prefer-template */\nvar uppercasePattern = /[A-Z]/g\nvar msPattern = /^ms-/\nvar cache = {}\n\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase()\n}\n\nfunction hyphenateStyleName(name) {\n if (cache.hasOwnProperty(name)) {\n return cache[name]\n }\n\n var hName = name.replace(uppercasePattern, toHyphenLower)\n return (cache[name] = msPattern.test(hName) ? '-' + hName : hName)\n}\n\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (hyphenateStyleName);\n\n\n/***/ }),\n\n/***/ \"./node_modules/matchmediaquery/index.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/matchmediaquery/index.js ***!\n \\***********************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\n\n\nvar staticMatch = (__webpack_require__(/*! css-mediaquery */ \"./node_modules/css-mediaquery/index.js\").match);\nvar dynamicMatch = typeof window !== 'undefined' ? window.matchMedia : null;\n\n// our fake MediaQueryList\nfunction Mql(query, values, forceStatic){\n var self = this;\n if(dynamicMatch && !forceStatic){\n var mql = dynamicMatch.call(window, query);\n this.matches = mql.matches;\n this.media = mql.media;\n // TODO: is there a time it makes sense to remove this listener?\n mql.addListener(update);\n } else {\n this.matches = staticMatch(query, values);\n this.media = query;\n }\n\n this.addListener = addListener;\n this.removeListener = removeListener;\n this.dispose = dispose;\n\n function addListener(listener){\n if(mql){\n mql.addListener(listener);\n }\n }\n\n function removeListener(listener){\n if(mql){\n mql.removeListener(listener);\n }\n }\n\n // update ourselves!\n function update(evt){\n self.matches = evt.matches;\n self.media = evt.media;\n }\n\n function dispose(){\n if(mql){\n mql.removeListener(update);\n }\n }\n}\n\nfunction matchMedia(query, values, forceStatic){\n return new Mql(query, values, forceStatic);\n}\n\nmodule.exports = matchMedia;\n\n\n/***/ }),\n\n/***/ \"./node_modules/object-assign/index.js\":\n/*!*********************************************!*\\\n !*** ./node_modules/object-assign/index.js ***!\n \\*********************************************/\n/***/ ((module) => {\n\n\"use strict\";\n/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/prop-types/checkPropTypes.js\":\n/*!***************************************************!*\\\n !*** ./node_modules/prop-types/checkPropTypes.js ***!\n \\***************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar printWarning = function() {};\n\nif (true) {\n var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\n var loggedTypeFailures = {};\n var has = __webpack_require__(/*! ./lib/has */ \"./node_modules/prop-types/lib/has.js\");\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (true) {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (true) {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n\n\n/***/ }),\n\n/***/ \"./node_modules/prop-types/factoryWithTypeCheckers.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***!\n \\************************************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\nvar assign = __webpack_require__(/*! object-assign */ \"./node_modules/object-assign/index.js\");\n\nvar ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\");\nvar has = __webpack_require__(/*! ./lib/has */ \"./node_modules/prop-types/lib/has.js\");\nvar checkPropTypes = __webpack_require__(/*! ./checkPropTypes */ \"./node_modules/prop-types/checkPropTypes.js\");\n\nvar printWarning = function() {};\n\nif (true) {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<<anonymous>>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bigint: createPrimitiveTypeChecker('bigint'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message, data) {\n this.message = message;\n this.data = data && typeof data === 'object' ? data: {};\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (true) {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use `PropTypes.checkPropTypes()` to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n } else if ( true && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n {expectedType: expectedType}\n );\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (true) {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var expectedTypes = [];\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n if (checkerResult == null) {\n return null;\n }\n if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n expectedTypes.push(checkerResult.data.expectedType);\n }\n }\n var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function invalidValidatorError(componentName, location, propFullName, key, type) {\n return new PropTypeError(\n (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n );\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (has(shapeTypes, key) && typeof checker !== 'function') {\n return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n }\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n\n\n/***/ }),\n\n/***/ \"./node_modules/prop-types/index.js\":\n/*!******************************************!*\\\n !*** ./node_modules/prop-types/index.js ***!\n \\******************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ \"./node_modules/react-is/index.js\");\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ \"./node_modules/prop-types/factoryWithTypeCheckers.js\")(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n/***/ }),\n\n/***/ \"./node_modules/prop-types/lib/ReactPropTypesSecret.js\":\n/*!*************************************************************!*\\\n !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!\n \\*************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n\n\n/***/ }),\n\n/***/ \"./node_modules/prop-types/lib/has.js\":\n/*!********************************************!*\\\n !*** ./node_modules/prop-types/lib/has.js ***!\n \\********************************************/\n/***/ ((module) => {\n\nmodule.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n\n\n/***/ }),\n\n/***/ \"./node_modules/react-is/cjs/react-is.development.js\":\n/*!***********************************************************!*\\\n !*** ./node_modules/react-is/cjs/react-is.development.js ***!\n \\***********************************************************/\n/***/ ((__unused_webpack_module, exports) => {\n\n\"use strict\";\n/** @license React v16.13.1\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\n\n\n\nif (true) {\n (function() {\n'use strict';\n\n// The Symbol used to tag the ReactElement-like types. If there is no native Symbol\n// nor polyfill, then a plain number is used for performance.\nvar hasSymbol = typeof Symbol === 'function' && Symbol.for;\nvar REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;\nvar REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;\nvar REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;\nvar REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;\nvar REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;\nvar REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;\nvar REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary\n// (unstable) APIs that have been removed. Can we remove the symbols?\n\nvar REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;\nvar REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;\nvar REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;\nvar REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;\nvar REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;\nvar REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;\nvar REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;\nvar REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;\nvar REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;\nvar REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;\nvar REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;\n\nfunction isValidElementType(type) {\n return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.\n type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);\n}\n\nfunction typeOf(object) {\n if (typeof object === 'object' && object !== null) {\n var $$typeof = object.$$typeof;\n\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n var type = object.type;\n\n switch (type) {\n case REACT_ASYNC_MODE_TYPE:\n case REACT_CONCURRENT_MODE_TYPE:\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n return type;\n\n default:\n var $$typeofType = type && type.$$typeof;\n\n switch ($$typeofType) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n case REACT_PROVIDER_TYPE:\n return $$typeofType;\n\n default:\n return $$typeof;\n }\n\n }\n\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n\n return undefined;\n} // AsyncMode is deprecated along with isAsyncMode\n\nvar AsyncMode = REACT_ASYNC_MODE_TYPE;\nvar ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n {\n if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');\n }\n }\n\n return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;\n}\nfunction isConcurrentMode(object) {\n return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;\n}\nfunction isContextConsumer(object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\n\nexports.AsyncMode = AsyncMode;\nexports.ConcurrentMode = ConcurrentMode;\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n })();\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/react-is/index.js\":\n/*!****************************************!*\\\n !*** ./node_modules/react-is/index.js ***!\n \\****************************************/\n/***/ ((module, __unused_webpack_exports, __webpack_require__) => {\n\n\"use strict\";\n\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-is.development.js */ \"./node_modules/react-is/cjs/react-is.development.js\");\n}\n\n\n/***/ }),\n\n/***/ \"./node_modules/shallow-equal/dist/index.esm.js\":\n/*!******************************************************!*\\\n !*** ./node_modules/shallow-equal/dist/index.esm.js ***!\n \\******************************************************/\n/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"shallowEqualArrays\": () => (/* binding */ shallowEqualArrays),\n/* harmony export */ \"shallowEqualObjects\": () => (/* binding */ shallowEqualObjects)\n/* harmony export */ });\nfunction shallowEqualObjects(objA, objB) {\n if (objA === objB) {\n return true;\n }\n\n if (!objA || !objB) {\n return false;\n }\n\n var aKeys = Object.keys(objA);\n var bKeys = Object.keys(objB);\n var len = aKeys.length;\n\n if (bKeys.length !== len) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n var key = aKeys[i];\n\n if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction shallowEqualArrays(arrA, arrB) {\n if (arrA === arrB) {\n return true;\n }\n\n if (!arrA || !arrB) {\n return false;\n }\n\n var len = arrA.length;\n\n if (arrB.length !== len) {\n return false;\n }\n\n for (var i = 0; i < len; i++) {\n if (arrA[i] !== arrB[i]) {\n return false;\n }\n }\n\n return true;\n}\n\n\n\n\n/***/ }),\n\n/***/ \"./src/Component.ts\":\n/*!**************************!*\\\n !*** ./src/Component.ts ***!\n \\**************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ \"./src/useMediaQuery.ts\"));\n// ReactNode and ReactElement typings are a little funky for functional components, so the ReactElement cast is needed on the return\nvar MediaQuery = function (_a) {\n var children = _a.children, device = _a.device, onChange = _a.onChange, settings = __rest(_a, [\"children\", \"device\", \"onChange\"]);\n var matches = (0, useMediaQuery_1.default)(settings, device, onChange);\n if (typeof children === 'function') {\n return children(matches);\n }\n return matches ? children : null;\n};\nexports[\"default\"] = MediaQuery;\n\n\n/***/ }),\n\n/***/ \"./src/Context.ts\":\n/*!************************!*\\\n !*** ./src/Context.ts ***!\n \\************************/\n/***/ ((__unused_webpack_module, exports, __webpack_require__) => {\n\n\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar Context = (0, react_1.createContext)(undefined);\nexports[\"default\"] = Context;\n\n\n/***/ }),\n\n/***/ \"./src/index.ts\":\n/*!**********************!*\\\n !*** ./src/index.ts ***!\n \\**********************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Context = exports.toQuery = exports.useMediaQuery = exports[\"default\"] = void 0;\nvar useMediaQuery_1 = __importDefault(__webpack_require__(/*! ./useMediaQuery */ \"./src/useMediaQuery.ts\"));\nexports.useMediaQuery = useMediaQuery_1.default;\nvar Component_1 = __importDefault(__webpack_require__(/*! ./Component */ \"./src/Component.ts\"));\nexports[\"default\"] = Component_1.default;\nvar toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ \"./src/toQuery.ts\"));\nexports.toQuery = toQuery_1.default;\nvar Context_1 = __importDefault(__webpack_require__(/*! ./Context */ \"./src/Context.ts\"));\nexports.Context = Context_1.default;\n\n\n/***/ }),\n\n/***/ \"./src/mediaQuery.ts\":\n/*!***************************!*\\\n !*** ./src/mediaQuery.ts ***!\n \\***************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar prop_types_1 = __importDefault(__webpack_require__(/*! prop-types */ \"./node_modules/prop-types/index.js\"));\nvar stringOrNumber = prop_types_1.default.oneOfType([\n prop_types_1.default.string,\n prop_types_1.default.number\n]);\n// media types\nvar types = {\n all: prop_types_1.default.bool,\n grid: prop_types_1.default.bool,\n aural: prop_types_1.default.bool,\n braille: prop_types_1.default.bool,\n handheld: prop_types_1.default.bool,\n print: prop_types_1.default.bool,\n projection: prop_types_1.default.bool,\n screen: prop_types_1.default.bool,\n tty: prop_types_1.default.bool,\n tv: prop_types_1.default.bool,\n embossed: prop_types_1.default.bool\n};\n// properties that match media queries\nvar matchers = {\n orientation: prop_types_1.default.oneOf([\n 'portrait',\n 'landscape'\n ]),\n scan: prop_types_1.default.oneOf([\n 'progressive',\n 'interlace'\n ]),\n aspectRatio: prop_types_1.default.string,\n deviceAspectRatio: prop_types_1.default.string,\n height: stringOrNumber,\n deviceHeight: stringOrNumber,\n width: stringOrNumber,\n deviceWidth: stringOrNumber,\n color: prop_types_1.default.bool,\n colorIndex: prop_types_1.default.bool,\n monochrome: prop_types_1.default.bool,\n resolution: stringOrNumber,\n type: Object.keys(types)\n};\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nvar type = matchers.type, featureMatchers = __rest(matchers\n// media features\n, [\"type\"]);\n// media features\nvar features = __assign({ minAspectRatio: prop_types_1.default.string, maxAspectRatio: prop_types_1.default.string, minDeviceAspectRatio: prop_types_1.default.string, maxDeviceAspectRatio: prop_types_1.default.string, minHeight: stringOrNumber, maxHeight: stringOrNumber, minDeviceHeight: stringOrNumber, maxDeviceHeight: stringOrNumber, minWidth: stringOrNumber, maxWidth: stringOrNumber, minDeviceWidth: stringOrNumber, maxDeviceWidth: stringOrNumber, minColor: prop_types_1.default.number, maxColor: prop_types_1.default.number, minColorIndex: prop_types_1.default.number, maxColorIndex: prop_types_1.default.number, minMonochrome: prop_types_1.default.number, maxMonochrome: prop_types_1.default.number, minResolution: stringOrNumber, maxResolution: stringOrNumber }, featureMatchers);\nvar all = __assign(__assign({}, types), features);\nexports[\"default\"] = {\n all: all,\n types: types,\n matchers: matchers,\n features: features\n};\n\n\n/***/ }),\n\n/***/ \"./src/toQuery.ts\":\n/*!************************!*\\\n !*** ./src/toQuery.ts ***!\n \\************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ \"./node_modules/hyphenate-style-name/index.js\"));\nvar mediaQuery_1 = __importDefault(__webpack_require__(/*! ./mediaQuery */ \"./src/mediaQuery.ts\"));\nvar negate = function (cond) { return \"not \".concat(cond); };\nvar keyVal = function (k, v) {\n var realKey = (0, hyphenate_style_name_1.default)(k);\n // px shorthand\n if (typeof v === 'number') {\n v = \"\".concat(v, \"px\");\n }\n if (v === true) {\n return realKey;\n }\n if (v === false) {\n return negate(realKey);\n }\n return \"(\".concat(realKey, \": \").concat(v, \")\");\n};\nvar join = function (conds) { return conds.join(' and '); };\nvar toQuery = function (obj) {\n var rules = [];\n Object.keys(mediaQuery_1.default.all).forEach(function (k) {\n var v = obj[k];\n if (v != null) {\n rules.push(keyVal(k, v));\n }\n });\n return join(rules);\n};\nexports[\"default\"] = toQuery;\n\n\n/***/ }),\n\n/***/ \"./src/useMediaQuery.ts\":\n/*!******************************!*\\\n !*** ./src/useMediaQuery.ts ***!\n \\******************************/\n/***/ (function(__unused_webpack_module, exports, __webpack_require__) {\n\n\"use strict\";\n\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nvar react_1 = __webpack_require__(/*! react */ \"react\");\nvar matchmediaquery_1 = __importDefault(__webpack_require__(/*! matchmediaquery */ \"./node_modules/matchmediaquery/index.js\"));\nvar hyphenate_style_name_1 = __importDefault(__webpack_require__(/*! hyphenate-style-name */ \"./node_modules/hyphenate-style-name/index.js\"));\nvar shallow_equal_1 = __webpack_require__(/*! shallow-equal */ \"./node_modules/shallow-equal/dist/index.esm.js\");\nvar toQuery_1 = __importDefault(__webpack_require__(/*! ./toQuery */ \"./src/toQuery.ts\"));\nvar Context_1 = __importDefault(__webpack_require__(/*! ./Context */ \"./src/Context.ts\"));\nvar makeQuery = function (settings) { return settings.query || (0, toQuery_1.default)(settings); };\nvar hyphenateKeys = function (obj) {\n if (!obj)\n return undefined;\n var keys = Object.keys(obj);\n return keys.reduce(function (result, key) {\n result[(0, hyphenate_style_name_1.default)(key)] = obj[key];\n return result;\n }, {});\n};\nvar useIsUpdate = function () {\n var ref = (0, react_1.useRef)(false);\n (0, react_1.useEffect)(function () {\n ref.current = true;\n }, []);\n return ref.current;\n};\nvar useDevice = function (deviceFromProps) {\n var deviceFromContext = (0, react_1.useContext)(Context_1.default);\n var getDevice = function () {\n return hyphenateKeys(deviceFromProps) || hyphenateKeys(deviceFromContext);\n };\n var _a = (0, react_1.useState)(getDevice), device = _a[0], setDevice = _a[1];\n (0, react_1.useEffect)(function () {\n var newDevice = getDevice();\n if (!(0, shallow_equal_1.shallowEqualObjects)(device, newDevice)) {\n setDevice(newDevice);\n }\n }, [deviceFromProps, deviceFromContext]);\n return device;\n};\nvar useQuery = function (settings) {\n var getQuery = function () { return makeQuery(settings); };\n var _a = (0, react_1.useState)(getQuery), query = _a[0], setQuery = _a[1];\n (0, react_1.useEffect)(function () {\n var newQuery = getQuery();\n if (query !== newQuery) {\n setQuery(newQuery);\n }\n }, [settings]);\n return query;\n};\nvar useMatchMedia = function (query, device) {\n var getMatchMedia = function () { return (0, matchmediaquery_1.default)(query, device || {}, !!device); };\n var _a = (0, react_1.useState)(getMatchMedia), mq = _a[0], setMq = _a[1];\n var isUpdate = useIsUpdate();\n (0, react_1.useEffect)(function () {\n if (isUpdate) {\n // skip on mounting, it has already been set\n var newMq_1 = getMatchMedia();\n setMq(newMq_1);\n return function () {\n if (newMq_1) {\n newMq_1.dispose();\n }\n };\n }\n }, [query, device]);\n return mq;\n};\nvar useMatches = function (mediaQuery) {\n var _a = (0, react_1.useState)(mediaQuery.matches), matches = _a[0], setMatches = _a[1];\n (0, react_1.useEffect)(function () {\n var updateMatches = function (ev) {\n setMatches(ev.matches);\n };\n mediaQuery.addListener(updateMatches);\n setMatches(mediaQuery.matches);\n return function () {\n mediaQuery.removeListener(updateMatches);\n };\n }, [mediaQuery]);\n return matches;\n};\nvar useMediaQuery = function (settings, device, onChange) {\n var deviceSettings = useDevice(device);\n var query = useQuery(settings);\n if (!query)\n throw new Error('Invalid or missing MediaQuery!');\n var mq = useMatchMedia(query, deviceSettings);\n var matches = useMatches(mq);\n var isUpdate = useIsUpdate();\n (0, react_1.useEffect)(function () {\n if (isUpdate && onChange) {\n onChange(matches);\n }\n }, [matches]);\n (0, react_1.useEffect)(function () { return function () {\n if (mq) {\n mq.dispose();\n }\n }; }, []);\n return matches;\n};\nexports[\"default\"] = useMediaQuery;\n\n\n/***/ }),\n\n/***/ \"react\":\n/*!**************************************************************************************!*\\\n !*** external {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"} ***!\n \\**************************************************************************************/\n/***/ ((module) => {\n\n\"use strict\";\nmodule.exports = __WEBPACK_EXTERNAL_MODULE_react__;\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t(() => {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__webpack_require__.d = (exports, definition) => {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t(() => {\n/******/ \t\t__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))\n/******/ \t})();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t(() => {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__webpack_require__.r = (exports) => {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t})();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module is referenced by other modules so it can't be inlined\n/******/ \tvar __webpack_exports__ = __webpack_require__(\"./src/index.ts\");\n/******/ \t\n/******/ \treturn __webpack_exports__;\n/******/ })()\n;\n});\n//# sourceMappingURL=react-responsive.js.map","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.PrevArrow = exports.NextArrow = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar PrevArrow = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(PrevArrow, _React$PureComponent);\n\n var _super = _createSuper(PrevArrow);\n\n function PrevArrow() {\n _classCallCheck(this, PrevArrow);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(PrevArrow, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n if (e) {\n e.preventDefault();\n }\n\n this.props.clickHandler(options, e);\n }\n }, {\n key: \"render\",\n value: function render() {\n var prevClasses = {\n \"slick-arrow\": true,\n \"slick-prev\": true\n };\n var prevHandler = this.clickHandler.bind(this, {\n message: \"previous\"\n });\n\n if (!this.props.infinite && (this.props.currentSlide === 0 || this.props.slideCount <= this.props.slidesToShow)) {\n prevClasses[\"slick-disabled\"] = true;\n prevHandler = null;\n }\n\n var prevArrowProps = {\n key: \"0\",\n \"data-role\": \"none\",\n className: (0, _classnames[\"default\"])(prevClasses),\n style: {\n display: \"block\"\n },\n onClick: prevHandler\n };\n var customProps = {\n currentSlide: this.props.currentSlide,\n slideCount: this.props.slideCount\n };\n var prevArrow;\n\n if (this.props.prevArrow) {\n prevArrow = /*#__PURE__*/_react[\"default\"].cloneElement(this.props.prevArrow, _objectSpread(_objectSpread({}, prevArrowProps), customProps));\n } else {\n prevArrow = /*#__PURE__*/_react[\"default\"].createElement(\"button\", _extends({\n key: \"0\",\n type: \"button\"\n }, prevArrowProps), \" \", \"Previous\");\n }\n\n return prevArrow;\n }\n }]);\n\n return PrevArrow;\n}(_react[\"default\"].PureComponent);\n\nexports.PrevArrow = PrevArrow;\n\nvar NextArrow = /*#__PURE__*/function (_React$PureComponent2) {\n _inherits(NextArrow, _React$PureComponent2);\n\n var _super2 = _createSuper(NextArrow);\n\n function NextArrow() {\n _classCallCheck(this, NextArrow);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(NextArrow, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n if (e) {\n e.preventDefault();\n }\n\n this.props.clickHandler(options, e);\n }\n }, {\n key: \"render\",\n value: function render() {\n var nextClasses = {\n \"slick-arrow\": true,\n \"slick-next\": true\n };\n var nextHandler = this.clickHandler.bind(this, {\n message: \"next\"\n });\n\n if (!(0, _innerSliderUtils.canGoNext)(this.props)) {\n nextClasses[\"slick-disabled\"] = true;\n nextHandler = null;\n }\n\n var nextArrowProps = {\n key: \"1\",\n \"data-role\": \"none\",\n className: (0, _classnames[\"default\"])(nextClasses),\n style: {\n display: \"block\"\n },\n onClick: nextHandler\n };\n var customProps = {\n currentSlide: this.props.currentSlide,\n slideCount: this.props.slideCount\n };\n var nextArrow;\n\n if (this.props.nextArrow) {\n nextArrow = /*#__PURE__*/_react[\"default\"].cloneElement(this.props.nextArrow, _objectSpread(_objectSpread({}, nextArrowProps), customProps));\n } else {\n nextArrow = /*#__PURE__*/_react[\"default\"].createElement(\"button\", _extends({\n key: \"1\",\n type: \"button\"\n }, nextArrowProps), \" \", \"Next\");\n }\n\n return nextArrow;\n }\n }]);\n\n return NextArrow;\n}(_react[\"default\"].PureComponent);\n\nexports.NextArrow = NextArrow;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar defaultProps = {\n accessibility: true,\n adaptiveHeight: false,\n afterChange: null,\n appendDots: function appendDots(dots) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"ul\", {\n style: {\n display: \"block\"\n }\n }, dots);\n },\n arrows: true,\n autoplay: false,\n autoplaySpeed: 3000,\n beforeChange: null,\n centerMode: false,\n centerPadding: \"50px\",\n className: \"\",\n cssEase: \"ease\",\n customPaging: function customPaging(i) {\n return /*#__PURE__*/_react[\"default\"].createElement(\"button\", null, i + 1);\n },\n dots: false,\n dotsClass: \"slick-dots\",\n draggable: true,\n easing: \"linear\",\n edgeFriction: 0.35,\n fade: false,\n focusOnSelect: false,\n infinite: true,\n initialSlide: 0,\n lazyLoad: null,\n nextArrow: null,\n onEdge: null,\n onInit: null,\n onLazyLoadError: null,\n onReInit: null,\n pauseOnDotsHover: false,\n pauseOnFocus: false,\n pauseOnHover: true,\n prevArrow: null,\n responsive: null,\n rows: 1,\n rtl: false,\n slide: \"div\",\n slidesPerRow: 1,\n slidesToScroll: 1,\n slidesToShow: 1,\n speed: 500,\n swipe: true,\n swipeEvent: null,\n swipeToSlide: false,\n touchMove: true,\n touchThreshold: 5,\n useCSS: true,\n useTransform: true,\n variableWidth: false,\n vertical: false,\n waitForAnimate: true\n};\nvar _default = defaultProps;\nexports[\"default\"] = _default;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Dots = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nvar getDotCount = function getDotCount(spec) {\n var dots;\n\n if (spec.infinite) {\n dots = Math.ceil(spec.slideCount / spec.slidesToScroll);\n } else {\n dots = Math.ceil((spec.slideCount - spec.slidesToShow) / spec.slidesToScroll) + 1;\n }\n\n return dots;\n};\n\nvar Dots = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(Dots, _React$PureComponent);\n\n var _super = _createSuper(Dots);\n\n function Dots() {\n _classCallCheck(this, Dots);\n\n return _super.apply(this, arguments);\n }\n\n _createClass(Dots, [{\n key: \"clickHandler\",\n value: function clickHandler(options, e) {\n // In Autoplay the focus stays on clicked button even after transition\n // to next slide. That only goes away by click somewhere outside\n e.preventDefault();\n this.props.clickHandler(options);\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave,\n infinite = _this$props.infinite,\n slidesToScroll = _this$props.slidesToScroll,\n slidesToShow = _this$props.slidesToShow,\n slideCount = _this$props.slideCount,\n currentSlide = _this$props.currentSlide;\n var dotCount = getDotCount({\n slideCount: slideCount,\n slidesToScroll: slidesToScroll,\n slidesToShow: slidesToShow,\n infinite: infinite\n });\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n var dots = [];\n\n for (var i = 0; i < dotCount; i++) {\n var _rightBound = (i + 1) * slidesToScroll - 1;\n\n var rightBound = infinite ? _rightBound : (0, _innerSliderUtils.clamp)(_rightBound, 0, slideCount - 1);\n\n var _leftBound = rightBound - (slidesToScroll - 1);\n\n var leftBound = infinite ? _leftBound : (0, _innerSliderUtils.clamp)(_leftBound, 0, slideCount - 1);\n var className = (0, _classnames[\"default\"])({\n \"slick-active\": infinite ? currentSlide >= leftBound && currentSlide <= rightBound : currentSlide === leftBound\n });\n var dotOptions = {\n message: \"dots\",\n index: i,\n slidesToScroll: slidesToScroll,\n currentSlide: currentSlide\n };\n var onClick = this.clickHandler.bind(this, dotOptions);\n dots = dots.concat( /*#__PURE__*/_react[\"default\"].createElement(\"li\", {\n key: i,\n className: className\n }, /*#__PURE__*/_react[\"default\"].cloneElement(this.props.customPaging(i), {\n onClick: onClick\n })));\n }\n\n return /*#__PURE__*/_react[\"default\"].cloneElement(this.props.appendDots(dots), _objectSpread({\n className: this.props.dotsClass\n }, mouseEvents));\n }\n }]);\n\n return Dots;\n}(_react[\"default\"].PureComponent);\n\nexports.Dots = Dots;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _slider = _interopRequireDefault(require(\"./slider\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nvar _default = _slider[\"default\"];\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\nvar initialState = {\n animating: false,\n autoplaying: null,\n currentDirection: 0,\n currentLeft: null,\n currentSlide: 0,\n direction: 1,\n dragging: false,\n edgeDragged: false,\n initialized: false,\n lazyLoadedList: [],\n listHeight: null,\n listWidth: null,\n scrolling: false,\n slideCount: null,\n slideHeight: null,\n slideWidth: null,\n swipeLeft: null,\n swiped: false,\n // used by swipeEvent. differentites between touch and swipe.\n swiping: false,\n touchObject: {\n startX: 0,\n startY: 0,\n curX: 0,\n curY: 0\n },\n trackStyle: {},\n trackWidth: 0,\n targetSlide: 0\n};\nvar _default = initialState;\nexports[\"default\"] = _default;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.InnerSlider = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _initialState = _interopRequireDefault(require(\"./initial-state\"));\n\nvar _lodash = _interopRequireDefault(require(\"lodash.debounce\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nvar _track = require(\"./track\");\n\nvar _dots = require(\"./dots\");\n\nvar _arrows = require(\"./arrows\");\n\nvar _resizeObserverPolyfill = _interopRequireDefault(require(\"resize-observer-polyfill\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar InnerSlider = /*#__PURE__*/function (_React$Component) {\n _inherits(InnerSlider, _React$Component);\n\n var _super = _createSuper(InnerSlider);\n\n function InnerSlider(props) {\n var _this;\n\n _classCallCheck(this, InnerSlider);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"listRefHandler\", function (ref) {\n return _this.list = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"trackRefHandler\", function (ref) {\n return _this.track = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"adaptHeight\", function () {\n if (_this.props.adaptiveHeight && _this.list) {\n var elem = _this.list.querySelector(\"[data-index=\\\"\".concat(_this.state.currentSlide, \"\\\"]\"));\n\n _this.list.style.height = (0, _innerSliderUtils.getHeight)(elem) + \"px\";\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidMount\", function () {\n _this.props.onInit && _this.props.onInit();\n\n if (_this.props.lazyLoad) {\n var slidesToLoad = (0, _innerSliderUtils.getOnDemandLazySlides)(_objectSpread(_objectSpread({}, _this.props), _this.state));\n\n if (slidesToLoad.length > 0) {\n _this.setState(function (prevState) {\n return {\n lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)\n };\n });\n\n if (_this.props.onLazyLoad) {\n _this.props.onLazyLoad(slidesToLoad);\n }\n }\n }\n\n var spec = _objectSpread({\n listRef: _this.list,\n trackRef: _this.track\n }, _this.props);\n\n _this.updateState(spec, true, function () {\n _this.adaptHeight();\n\n _this.props.autoplay && _this.autoPlay(\"update\");\n });\n\n if (_this.props.lazyLoad === \"progressive\") {\n _this.lazyLoadTimer = setInterval(_this.progressiveLazyLoad, 1000);\n }\n\n _this.ro = new _resizeObserverPolyfill[\"default\"](function () {\n if (_this.state.animating) {\n _this.onWindowResized(false); // don't set trackStyle hence don't break animation\n\n\n _this.callbackTimers.push(setTimeout(function () {\n return _this.onWindowResized();\n }, _this.props.speed));\n } else {\n _this.onWindowResized();\n }\n });\n\n _this.ro.observe(_this.list);\n\n document.querySelectorAll && Array.prototype.forEach.call(document.querySelectorAll(\".slick-slide\"), function (slide) {\n slide.onfocus = _this.props.pauseOnFocus ? _this.onSlideFocus : null;\n slide.onblur = _this.props.pauseOnFocus ? _this.onSlideBlur : null;\n });\n\n if (window.addEventListener) {\n window.addEventListener(\"resize\", _this.onWindowResized);\n } else {\n window.attachEvent(\"onresize\", _this.onWindowResized);\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentWillUnmount\", function () {\n if (_this.animationEndCallback) {\n clearTimeout(_this.animationEndCallback);\n }\n\n if (_this.lazyLoadTimer) {\n clearInterval(_this.lazyLoadTimer);\n }\n\n if (_this.callbackTimers.length) {\n _this.callbackTimers.forEach(function (timer) {\n return clearTimeout(timer);\n });\n\n _this.callbackTimers = [];\n }\n\n if (window.addEventListener) {\n window.removeEventListener(\"resize\", _this.onWindowResized);\n } else {\n window.detachEvent(\"onresize\", _this.onWindowResized);\n }\n\n if (_this.autoplayTimer) {\n clearInterval(_this.autoplayTimer);\n }\n\n _this.ro.disconnect();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"componentDidUpdate\", function (prevProps) {\n _this.checkImagesLoad();\n\n _this.props.onReInit && _this.props.onReInit();\n\n if (_this.props.lazyLoad) {\n var slidesToLoad = (0, _innerSliderUtils.getOnDemandLazySlides)(_objectSpread(_objectSpread({}, _this.props), _this.state));\n\n if (slidesToLoad.length > 0) {\n _this.setState(function (prevState) {\n return {\n lazyLoadedList: prevState.lazyLoadedList.concat(slidesToLoad)\n };\n });\n\n if (_this.props.onLazyLoad) {\n _this.props.onLazyLoad(slidesToLoad);\n }\n }\n } // if (this.props.onLazyLoad) {\n // this.props.onLazyLoad([leftMostSlide])\n // }\n\n\n _this.adaptHeight();\n\n var spec = _objectSpread(_objectSpread({\n listRef: _this.list,\n trackRef: _this.track\n }, _this.props), _this.state);\n\n var setTrackStyle = _this.didPropsChange(prevProps);\n\n setTrackStyle && _this.updateState(spec, setTrackStyle, function () {\n if (_this.state.currentSlide >= _react[\"default\"].Children.count(_this.props.children)) {\n _this.changeSlide({\n message: \"index\",\n index: _react[\"default\"].Children.count(_this.props.children) - _this.props.slidesToShow,\n currentSlide: _this.state.currentSlide\n });\n }\n\n if (_this.props.autoplay) {\n _this.autoPlay(\"update\");\n } else {\n _this.pause(\"paused\");\n }\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onWindowResized\", function (setTrackStyle) {\n if (_this.debouncedResize) _this.debouncedResize.cancel();\n _this.debouncedResize = (0, _lodash[\"default\"])(function () {\n return _this.resizeWindow(setTrackStyle);\n }, 50);\n\n _this.debouncedResize();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"resizeWindow\", function () {\n var setTrackStyle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var isTrackMounted = Boolean(_this.track && _this.track.node); // prevent warning: setting state on unmounted component (server side rendering)\n\n if (!isTrackMounted) return;\n\n var spec = _objectSpread(_objectSpread({\n listRef: _this.list,\n trackRef: _this.track\n }, _this.props), _this.state);\n\n _this.updateState(spec, setTrackStyle, function () {\n if (_this.props.autoplay) _this.autoPlay(\"update\");else _this.pause(\"paused\");\n }); // animating state should be cleared while resizing, otherwise autoplay stops working\n\n\n _this.setState({\n animating: false\n });\n\n clearTimeout(_this.animationEndCallback);\n delete _this.animationEndCallback;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"updateState\", function (spec, setTrackStyle, callback) {\n var updatedState = (0, _innerSliderUtils.initializedState)(spec);\n spec = _objectSpread(_objectSpread(_objectSpread({}, spec), updatedState), {}, {\n slideIndex: updatedState.currentSlide\n });\n var targetLeft = (0, _innerSliderUtils.getTrackLeft)(spec);\n spec = _objectSpread(_objectSpread({}, spec), {}, {\n left: targetLeft\n });\n var trackStyle = (0, _innerSliderUtils.getTrackCSS)(spec);\n\n if (setTrackStyle || _react[\"default\"].Children.count(_this.props.children) !== _react[\"default\"].Children.count(spec.children)) {\n updatedState[\"trackStyle\"] = trackStyle;\n }\n\n _this.setState(updatedState, callback);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"ssrInit\", function () {\n if (_this.props.variableWidth) {\n var _trackWidth = 0,\n _trackLeft = 0;\n var childrenWidths = [];\n var preClones = (0, _innerSliderUtils.getPreClones)(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n slideCount: _this.props.children.length\n }));\n var postClones = (0, _innerSliderUtils.getPostClones)(_objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n slideCount: _this.props.children.length\n }));\n\n _this.props.children.forEach(function (child) {\n childrenWidths.push(child.props.style.width);\n _trackWidth += child.props.style.width;\n });\n\n for (var i = 0; i < preClones; i++) {\n _trackLeft += childrenWidths[childrenWidths.length - 1 - i];\n _trackWidth += childrenWidths[childrenWidths.length - 1 - i];\n }\n\n for (var _i = 0; _i < postClones; _i++) {\n _trackWidth += childrenWidths[_i];\n }\n\n for (var _i2 = 0; _i2 < _this.state.currentSlide; _i2++) {\n _trackLeft += childrenWidths[_i2];\n }\n\n var _trackStyle = {\n width: _trackWidth + \"px\",\n left: -_trackLeft + \"px\"\n };\n\n if (_this.props.centerMode) {\n var currentWidth = \"\".concat(childrenWidths[_this.state.currentSlide], \"px\");\n _trackStyle.left = \"calc(\".concat(_trackStyle.left, \" + (100% - \").concat(currentWidth, \") / 2 ) \");\n }\n\n return {\n trackStyle: _trackStyle\n };\n }\n\n var childrenCount = _react[\"default\"].Children.count(_this.props.children);\n\n var spec = _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n slideCount: childrenCount\n });\n\n var slideCount = (0, _innerSliderUtils.getPreClones)(spec) + (0, _innerSliderUtils.getPostClones)(spec) + childrenCount;\n var trackWidth = 100 / _this.props.slidesToShow * slideCount;\n var slideWidth = 100 / slideCount;\n var trackLeft = -slideWidth * ((0, _innerSliderUtils.getPreClones)(spec) + _this.state.currentSlide) * trackWidth / 100;\n\n if (_this.props.centerMode) {\n trackLeft += (100 - slideWidth * trackWidth / 100) / 2;\n }\n\n var trackStyle = {\n width: trackWidth + \"%\",\n left: trackLeft + \"%\"\n };\n return {\n slideWidth: slideWidth + \"%\",\n trackStyle: trackStyle\n };\n });\n\n _defineProperty(_assertThisInitialized(_this), \"checkImagesLoad\", function () {\n var images = _this.list && _this.list.querySelectorAll && _this.list.querySelectorAll(\".slick-slide img\") || [];\n var imagesCount = images.length,\n loadedCount = 0;\n Array.prototype.forEach.call(images, function (image) {\n var handler = function handler() {\n return ++loadedCount && loadedCount >= imagesCount && _this.onWindowResized();\n };\n\n if (!image.onclick) {\n image.onclick = function () {\n return image.parentNode.focus();\n };\n } else {\n var prevClickHandler = image.onclick;\n\n image.onclick = function () {\n prevClickHandler();\n image.parentNode.focus();\n };\n }\n\n if (!image.onload) {\n if (_this.props.lazyLoad) {\n image.onload = function () {\n _this.adaptHeight();\n\n _this.callbackTimers.push(setTimeout(_this.onWindowResized, _this.props.speed));\n };\n } else {\n image.onload = handler;\n\n image.onerror = function () {\n handler();\n _this.props.onLazyLoadError && _this.props.onLazyLoadError();\n };\n }\n }\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"progressiveLazyLoad\", function () {\n var slidesToLoad = [];\n\n var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);\n\n for (var index = _this.state.currentSlide; index < _this.state.slideCount + (0, _innerSliderUtils.getPostClones)(spec); index++) {\n if (_this.state.lazyLoadedList.indexOf(index) < 0) {\n slidesToLoad.push(index);\n break;\n }\n }\n\n for (var _index = _this.state.currentSlide - 1; _index >= -(0, _innerSliderUtils.getPreClones)(spec); _index--) {\n if (_this.state.lazyLoadedList.indexOf(_index) < 0) {\n slidesToLoad.push(_index);\n break;\n }\n }\n\n if (slidesToLoad.length > 0) {\n _this.setState(function (state) {\n return {\n lazyLoadedList: state.lazyLoadedList.concat(slidesToLoad)\n };\n });\n\n if (_this.props.onLazyLoad) {\n _this.props.onLazyLoad(slidesToLoad);\n }\n } else {\n if (_this.lazyLoadTimer) {\n clearInterval(_this.lazyLoadTimer);\n delete _this.lazyLoadTimer;\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slideHandler\", function (index) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var _this$props = _this.props,\n asNavFor = _this$props.asNavFor,\n beforeChange = _this$props.beforeChange,\n onLazyLoad = _this$props.onLazyLoad,\n speed = _this$props.speed,\n afterChange = _this$props.afterChange; // capture currentslide before state is updated\n\n var currentSlide = _this.state.currentSlide;\n\n var _slideHandler = (0, _innerSliderUtils.slideHandler)(_objectSpread(_objectSpread(_objectSpread({\n index: index\n }, _this.props), _this.state), {}, {\n trackRef: _this.track,\n useCSS: _this.props.useCSS && !dontAnimate\n })),\n state = _slideHandler.state,\n nextState = _slideHandler.nextState;\n\n if (!state) return;\n beforeChange && beforeChange(currentSlide, state.currentSlide);\n var slidesToLoad = state.lazyLoadedList.filter(function (value) {\n return _this.state.lazyLoadedList.indexOf(value) < 0;\n });\n onLazyLoad && slidesToLoad.length > 0 && onLazyLoad(slidesToLoad);\n\n if (!_this.props.waitForAnimate && _this.animationEndCallback) {\n clearTimeout(_this.animationEndCallback);\n afterChange && afterChange(currentSlide);\n delete _this.animationEndCallback;\n }\n\n _this.setState(state, function () {\n // asNavForIndex check is to avoid recursive calls of slideHandler in waitForAnimate=false mode\n if (asNavFor && _this.asNavForIndex !== index) {\n _this.asNavForIndex = index;\n asNavFor.innerSlider.slideHandler(index);\n }\n\n if (!nextState) return;\n _this.animationEndCallback = setTimeout(function () {\n var animating = nextState.animating,\n firstBatch = _objectWithoutProperties(nextState, [\"animating\"]);\n\n _this.setState(firstBatch, function () {\n _this.callbackTimers.push(setTimeout(function () {\n return _this.setState({\n animating: animating\n });\n }, 10));\n\n afterChange && afterChange(state.currentSlide);\n delete _this.animationEndCallback;\n });\n }, speed);\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"changeSlide\", function (options) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n\n var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);\n\n var targetSlide = (0, _innerSliderUtils.changeSlide)(spec, options);\n if (targetSlide !== 0 && !targetSlide) return;\n\n if (dontAnimate === true) {\n _this.slideHandler(targetSlide, dontAnimate);\n } else {\n _this.slideHandler(targetSlide);\n }\n\n _this.props.autoplay && _this.autoPlay(\"update\");\n\n if (_this.props.focusOnSelect) {\n var nodes = _this.list.querySelectorAll(\".slick-current\");\n\n nodes[0] && nodes[0].focus();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"clickHandler\", function (e) {\n if (_this.clickable === false) {\n e.stopPropagation();\n e.preventDefault();\n }\n\n _this.clickable = true;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"keyHandler\", function (e) {\n var dir = (0, _innerSliderUtils.keyHandler)(e, _this.props.accessibility, _this.props.rtl);\n dir !== \"\" && _this.changeSlide({\n message: dir\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"selectHandler\", function (options) {\n _this.changeSlide(options);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"disableBodyScroll\", function () {\n var preventDefault = function preventDefault(e) {\n e = e || window.event;\n if (e.preventDefault) e.preventDefault();\n e.returnValue = false;\n };\n\n window.ontouchmove = preventDefault;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"enableBodyScroll\", function () {\n window.ontouchmove = null;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"swipeStart\", function (e) {\n if (_this.props.verticalSwiping) {\n _this.disableBodyScroll();\n }\n\n var state = (0, _innerSliderUtils.swipeStart)(e, _this.props.swipe, _this.props.draggable);\n state !== \"\" && _this.setState(state);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"swipeMove\", function (e) {\n var state = (0, _innerSliderUtils.swipeMove)(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n trackRef: _this.track,\n listRef: _this.list,\n slideIndex: _this.state.currentSlide\n }));\n if (!state) return;\n\n if (state[\"swiping\"]) {\n _this.clickable = false;\n }\n\n _this.setState(state);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"swipeEnd\", function (e) {\n var state = (0, _innerSliderUtils.swipeEnd)(e, _objectSpread(_objectSpread(_objectSpread({}, _this.props), _this.state), {}, {\n trackRef: _this.track,\n listRef: _this.list,\n slideIndex: _this.state.currentSlide\n }));\n if (!state) return;\n var triggerSlideHandler = state[\"triggerSlideHandler\"];\n delete state[\"triggerSlideHandler\"];\n\n _this.setState(state);\n\n if (triggerSlideHandler === undefined) return;\n\n _this.slideHandler(triggerSlideHandler);\n\n if (_this.props.verticalSwiping) {\n _this.enableBodyScroll();\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"touchEnd\", function (e) {\n _this.swipeEnd(e);\n\n _this.clickable = true;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickPrev\", function () {\n // this and fellow methods are wrapped in setTimeout\n // to make sure initialize setState has happened before\n // any of such methods are called\n _this.callbackTimers.push(setTimeout(function () {\n return _this.changeSlide({\n message: \"previous\"\n });\n }, 0));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickNext\", function () {\n _this.callbackTimers.push(setTimeout(function () {\n return _this.changeSlide({\n message: \"next\"\n });\n }, 0));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickGoTo\", function (slide) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n slide = Number(slide);\n if (isNaN(slide)) return \"\";\n\n _this.callbackTimers.push(setTimeout(function () {\n return _this.changeSlide({\n message: \"index\",\n index: slide,\n currentSlide: _this.state.currentSlide\n }, dontAnimate);\n }, 0));\n });\n\n _defineProperty(_assertThisInitialized(_this), \"play\", function () {\n var nextIndex;\n\n if (_this.props.rtl) {\n nextIndex = _this.state.currentSlide - _this.props.slidesToScroll;\n } else {\n if ((0, _innerSliderUtils.canGoNext)(_objectSpread(_objectSpread({}, _this.props), _this.state))) {\n nextIndex = _this.state.currentSlide + _this.props.slidesToScroll;\n } else {\n return false;\n }\n }\n\n _this.slideHandler(nextIndex);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"autoPlay\", function (playType) {\n if (_this.autoplayTimer) {\n clearInterval(_this.autoplayTimer);\n }\n\n var autoplaying = _this.state.autoplaying;\n\n if (playType === \"update\") {\n if (autoplaying === \"hovered\" || autoplaying === \"focused\" || autoplaying === \"paused\") {\n return;\n }\n } else if (playType === \"leave\") {\n if (autoplaying === \"paused\" || autoplaying === \"focused\") {\n return;\n }\n } else if (playType === \"blur\") {\n if (autoplaying === \"paused\" || autoplaying === \"hovered\") {\n return;\n }\n }\n\n _this.autoplayTimer = setInterval(_this.play, _this.props.autoplaySpeed + 50);\n\n _this.setState({\n autoplaying: \"playing\"\n });\n });\n\n _defineProperty(_assertThisInitialized(_this), \"pause\", function (pauseType) {\n if (_this.autoplayTimer) {\n clearInterval(_this.autoplayTimer);\n _this.autoplayTimer = null;\n }\n\n var autoplaying = _this.state.autoplaying;\n\n if (pauseType === \"paused\") {\n _this.setState({\n autoplaying: \"paused\"\n });\n } else if (pauseType === \"focused\") {\n if (autoplaying === \"hovered\" || autoplaying === \"playing\") {\n _this.setState({\n autoplaying: \"focused\"\n });\n }\n } else {\n // pauseType is 'hovered'\n if (autoplaying === \"playing\") {\n _this.setState({\n autoplaying: \"hovered\"\n });\n }\n }\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDotsOver\", function () {\n return _this.props.autoplay && _this.pause(\"hovered\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onDotsLeave\", function () {\n return _this.props.autoplay && _this.state.autoplaying === \"hovered\" && _this.autoPlay(\"leave\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTrackOver\", function () {\n return _this.props.autoplay && _this.pause(\"hovered\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onTrackLeave\", function () {\n return _this.props.autoplay && _this.state.autoplaying === \"hovered\" && _this.autoPlay(\"leave\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSlideFocus\", function () {\n return _this.props.autoplay && _this.pause(\"focused\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"onSlideBlur\", function () {\n return _this.props.autoplay && _this.state.autoplaying === \"focused\" && _this.autoPlay(\"blur\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"render\", function () {\n var className = (0, _classnames[\"default\"])(\"slick-slider\", _this.props.className, {\n \"slick-vertical\": _this.props.vertical,\n \"slick-initialized\": true\n });\n\n var spec = _objectSpread(_objectSpread({}, _this.props), _this.state);\n\n var trackProps = (0, _innerSliderUtils.extractObject)(spec, [\"fade\", \"cssEase\", \"speed\", \"infinite\", \"centerMode\", \"focusOnSelect\", \"currentSlide\", \"lazyLoad\", \"lazyLoadedList\", \"rtl\", \"slideWidth\", \"slideHeight\", \"listHeight\", \"vertical\", \"slidesToShow\", \"slidesToScroll\", \"slideCount\", \"trackStyle\", \"variableWidth\", \"unslick\", \"centerPadding\", \"targetSlide\", \"useCSS\"]);\n var pauseOnHover = _this.props.pauseOnHover;\n trackProps = _objectSpread(_objectSpread({}, trackProps), {}, {\n onMouseEnter: pauseOnHover ? _this.onTrackOver : null,\n onMouseLeave: pauseOnHover ? _this.onTrackLeave : null,\n onMouseOver: pauseOnHover ? _this.onTrackOver : null,\n focusOnSelect: _this.props.focusOnSelect && _this.clickable ? _this.selectHandler : null\n });\n var dots;\n\n if (_this.props.dots === true && _this.state.slideCount >= _this.props.slidesToShow) {\n var dotProps = (0, _innerSliderUtils.extractObject)(spec, [\"dotsClass\", \"slideCount\", \"slidesToShow\", \"currentSlide\", \"slidesToScroll\", \"clickHandler\", \"children\", \"customPaging\", \"infinite\", \"appendDots\"]);\n var pauseOnDotsHover = _this.props.pauseOnDotsHover;\n dotProps = _objectSpread(_objectSpread({}, dotProps), {}, {\n clickHandler: _this.changeSlide,\n onMouseEnter: pauseOnDotsHover ? _this.onDotsLeave : null,\n onMouseOver: pauseOnDotsHover ? _this.onDotsOver : null,\n onMouseLeave: pauseOnDotsHover ? _this.onDotsLeave : null\n });\n dots = /*#__PURE__*/_react[\"default\"].createElement(_dots.Dots, dotProps);\n }\n\n var prevArrow, nextArrow;\n var arrowProps = (0, _innerSliderUtils.extractObject)(spec, [\"infinite\", \"centerMode\", \"currentSlide\", \"slideCount\", \"slidesToShow\", \"prevArrow\", \"nextArrow\"]);\n arrowProps.clickHandler = _this.changeSlide;\n\n if (_this.props.arrows) {\n prevArrow = /*#__PURE__*/_react[\"default\"].createElement(_arrows.PrevArrow, arrowProps);\n nextArrow = /*#__PURE__*/_react[\"default\"].createElement(_arrows.NextArrow, arrowProps);\n }\n\n var verticalHeightStyle = null;\n\n if (_this.props.vertical) {\n verticalHeightStyle = {\n height: _this.state.listHeight\n };\n }\n\n var centerPaddingStyle = null;\n\n if (_this.props.vertical === false) {\n if (_this.props.centerMode === true) {\n centerPaddingStyle = {\n padding: \"0px \" + _this.props.centerPadding\n };\n }\n } else {\n if (_this.props.centerMode === true) {\n centerPaddingStyle = {\n padding: _this.props.centerPadding + \" 0px\"\n };\n }\n }\n\n var listStyle = _objectSpread(_objectSpread({}, verticalHeightStyle), centerPaddingStyle);\n\n var touchMove = _this.props.touchMove;\n var listProps = {\n className: \"slick-list\",\n style: listStyle,\n onClick: _this.clickHandler,\n onMouseDown: touchMove ? _this.swipeStart : null,\n onMouseMove: _this.state.dragging && touchMove ? _this.swipeMove : null,\n onMouseUp: touchMove ? _this.swipeEnd : null,\n onMouseLeave: _this.state.dragging && touchMove ? _this.swipeEnd : null,\n onTouchStart: touchMove ? _this.swipeStart : null,\n onTouchMove: _this.state.dragging && touchMove ? _this.swipeMove : null,\n onTouchEnd: touchMove ? _this.touchEnd : null,\n onTouchCancel: _this.state.dragging && touchMove ? _this.swipeEnd : null,\n onKeyDown: _this.props.accessibility ? _this.keyHandler : null\n };\n var innerSliderProps = {\n className: className,\n dir: \"ltr\",\n style: _this.props.style\n };\n\n if (_this.props.unslick) {\n listProps = {\n className: \"slick-list\"\n };\n innerSliderProps = {\n className: className\n };\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", innerSliderProps, !_this.props.unslick ? prevArrow : \"\", /*#__PURE__*/_react[\"default\"].createElement(\"div\", _extends({\n ref: _this.listRefHandler\n }, listProps), /*#__PURE__*/_react[\"default\"].createElement(_track.Track, _extends({\n ref: _this.trackRefHandler\n }, trackProps), _this.props.children)), !_this.props.unslick ? nextArrow : \"\", !_this.props.unslick ? dots : \"\");\n });\n\n _this.list = null;\n _this.track = null;\n _this.state = _objectSpread(_objectSpread({}, _initialState[\"default\"]), {}, {\n currentSlide: _this.props.initialSlide,\n slideCount: _react[\"default\"].Children.count(_this.props.children)\n });\n _this.callbackTimers = [];\n _this.clickable = true;\n _this.debouncedResize = null;\n\n var ssrState = _this.ssrInit();\n\n _this.state = _objectSpread(_objectSpread({}, _this.state), ssrState);\n return _this;\n }\n\n _createClass(InnerSlider, [{\n key: \"didPropsChange\",\n value: function didPropsChange(prevProps) {\n var setTrackStyle = false;\n\n for (var _i3 = 0, _Object$keys = Object.keys(this.props); _i3 < _Object$keys.length; _i3++) {\n var key = _Object$keys[_i3];\n\n if (!prevProps.hasOwnProperty(key)) {\n setTrackStyle = true;\n break;\n }\n\n if (_typeof(prevProps[key]) === \"object\" || typeof prevProps[key] === \"function\") {\n continue;\n }\n\n if (prevProps[key] !== this.props[key]) {\n setTrackStyle = true;\n break;\n }\n }\n\n return setTrackStyle || _react[\"default\"].Children.count(this.props.children) !== _react[\"default\"].Children.count(prevProps.children);\n }\n }]);\n\n return InnerSlider;\n}(_react[\"default\"].Component);\n\nexports.InnerSlider = InnerSlider;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports[\"default\"] = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _innerSlider = require(\"./inner-slider\");\n\nvar _json2mq = _interopRequireDefault(require(\"json2mq\"));\n\nvar _defaultProps = _interopRequireDefault(require(\"./default-props\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar enquire = (0, _innerSliderUtils.canUseDOM)() && require(\"enquire.js\");\n\nvar Slider = /*#__PURE__*/function (_React$Component) {\n _inherits(Slider, _React$Component);\n\n var _super = _createSuper(Slider);\n\n function Slider(props) {\n var _this;\n\n _classCallCheck(this, Slider);\n\n _this = _super.call(this, props);\n\n _defineProperty(_assertThisInitialized(_this), \"innerSliderRefHandler\", function (ref) {\n return _this.innerSlider = ref;\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickPrev\", function () {\n return _this.innerSlider.slickPrev();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickNext\", function () {\n return _this.innerSlider.slickNext();\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickGoTo\", function (slide) {\n var dontAnimate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return _this.innerSlider.slickGoTo(slide, dontAnimate);\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickPause\", function () {\n return _this.innerSlider.pause(\"paused\");\n });\n\n _defineProperty(_assertThisInitialized(_this), \"slickPlay\", function () {\n return _this.innerSlider.autoPlay(\"play\");\n });\n\n _this.state = {\n breakpoint: null\n };\n _this._responsiveMediaHandlers = [];\n return _this;\n }\n\n _createClass(Slider, [{\n key: \"media\",\n value: function media(query, handler) {\n // javascript handler for css media query\n enquire.register(query, handler);\n\n this._responsiveMediaHandlers.push({\n query: query,\n handler: handler\n });\n } // handles responsive breakpoints\n\n }, {\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var _this2 = this;\n\n // performance monitoring\n //if (process.env.NODE_ENV !== 'production') {\n //const { whyDidYouUpdate } = require('why-did-you-update')\n //whyDidYouUpdate(React)\n //}\n if (this.props.responsive) {\n var breakpoints = this.props.responsive.map(function (breakpt) {\n return breakpt.breakpoint;\n }); // sort them in increasing order of their numerical value\n\n breakpoints.sort(function (x, y) {\n return x - y;\n });\n breakpoints.forEach(function (breakpoint, index) {\n // media query for each breakpoint\n var bQuery;\n\n if (index === 0) {\n bQuery = (0, _json2mq[\"default\"])({\n minWidth: 0,\n maxWidth: breakpoint\n });\n } else {\n bQuery = (0, _json2mq[\"default\"])({\n minWidth: breakpoints[index - 1] + 1,\n maxWidth: breakpoint\n });\n } // when not using server side rendering\n\n\n (0, _innerSliderUtils.canUseDOM)() && _this2.media(bQuery, function () {\n _this2.setState({\n breakpoint: breakpoint\n });\n });\n }); // Register media query for full screen. Need to support resize from small to large\n // convert javascript object to media query string\n\n var query = (0, _json2mq[\"default\"])({\n minWidth: breakpoints.slice(-1)[0]\n });\n (0, _innerSliderUtils.canUseDOM)() && this.media(query, function () {\n _this2.setState({\n breakpoint: null\n });\n });\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this._responsiveMediaHandlers.forEach(function (obj) {\n enquire.unregister(obj.query, obj.handler);\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var settings;\n var newProps;\n\n if (this.state.breakpoint) {\n newProps = this.props.responsive.filter(function (resp) {\n return resp.breakpoint === _this3.state.breakpoint;\n });\n settings = newProps[0].settings === \"unslick\" ? \"unslick\" : _objectSpread(_objectSpread(_objectSpread({}, _defaultProps[\"default\"]), this.props), newProps[0].settings);\n } else {\n settings = _objectSpread(_objectSpread({}, _defaultProps[\"default\"]), this.props);\n } // force scrolling by one if centerMode is on\n\n\n if (settings.centerMode) {\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 in centerMode, you are using \".concat(settings.slidesToScroll));\n }\n\n settings.slidesToScroll = 1;\n } // force showing one slide and scrolling by one if the fade mode is on\n\n\n if (settings.fade) {\n if (settings.slidesToShow > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToShow should be equal to 1 when fade is true, you're using \".concat(settings.slidesToShow));\n }\n\n if (settings.slidesToScroll > 1 && process.env.NODE_ENV !== \"production\") {\n console.warn(\"slidesToScroll should be equal to 1 when fade is true, you're using \".concat(settings.slidesToScroll));\n }\n\n settings.slidesToShow = 1;\n settings.slidesToScroll = 1;\n } // makes sure that children is an array, even when there is only 1 child\n\n\n var children = _react[\"default\"].Children.toArray(this.props.children); // Children may contain false or null, so we should filter them\n // children may also contain string filled with spaces (in certain cases where we use jsx strings)\n\n\n children = children.filter(function (child) {\n if (typeof child === \"string\") {\n return !!child.trim();\n }\n\n return !!child;\n }); // rows and slidesPerRow logic is handled here\n\n if (settings.variableWidth && (settings.rows > 1 || settings.slidesPerRow > 1)) {\n console.warn(\"variableWidth is not supported in case of rows > 1 or slidesPerRow > 1\");\n settings.variableWidth = false;\n }\n\n var newChildren = [];\n var currentWidth = null;\n\n for (var i = 0; i < children.length; i += settings.rows * settings.slidesPerRow) {\n var newSlide = [];\n\n for (var j = i; j < i + settings.rows * settings.slidesPerRow; j += settings.slidesPerRow) {\n var row = [];\n\n for (var k = j; k < j + settings.slidesPerRow; k += 1) {\n if (settings.variableWidth && children[k].props.style) {\n currentWidth = children[k].props.style.width;\n }\n\n if (k >= children.length) break;\n row.push( /*#__PURE__*/_react[\"default\"].cloneElement(children[k], {\n key: 100 * i + 10 * j + k,\n tabIndex: -1,\n style: {\n width: \"\".concat(100 / settings.slidesPerRow, \"%\"),\n display: \"inline-block\"\n }\n }));\n }\n\n newSlide.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: 10 * i + j\n }, row));\n }\n\n if (settings.variableWidth) {\n newChildren.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: i,\n style: {\n width: currentWidth\n }\n }, newSlide));\n } else {\n newChildren.push( /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n key: i\n }, newSlide));\n }\n }\n\n if (settings === \"unslick\") {\n var className = \"regular slider \" + (this.props.className || \"\");\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", {\n className: className\n }, children);\n } else if (newChildren.length <= settings.slidesToShow) {\n settings.unslick = true;\n }\n\n return /*#__PURE__*/_react[\"default\"].createElement(_innerSlider.InnerSlider, _extends({\n style: this.props.style,\n ref: this.innerSliderRefHandler\n }, settings), newChildren);\n }\n }]);\n\n return Slider;\n}(_react[\"default\"].Component);\n\nexports[\"default\"] = Slider;","\"use strict\";\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.Track = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nvar _classnames = _interopRequireDefault(require(\"classnames\"));\n\nvar _innerSliderUtils = require(\"./utils/innerSliderUtils\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// given specifications/props for a slide, fetch all the classes that need to be applied to the slide\nvar getSlideClasses = function getSlideClasses(spec) {\n var slickActive, slickCenter, slickCloned;\n var centerOffset, index;\n\n if (spec.rtl) {\n index = spec.slideCount - 1 - spec.index;\n } else {\n index = spec.index;\n }\n\n slickCloned = index < 0 || index >= spec.slideCount;\n\n if (spec.centerMode) {\n centerOffset = Math.floor(spec.slidesToShow / 2);\n slickCenter = (index - spec.currentSlide) % spec.slideCount === 0;\n\n if (index > spec.currentSlide - centerOffset - 1 && index <= spec.currentSlide + centerOffset) {\n slickActive = true;\n }\n } else {\n slickActive = spec.currentSlide <= index && index < spec.currentSlide + spec.slidesToShow;\n }\n\n var focusedSlide;\n\n if (spec.targetSlide < 0) {\n focusedSlide = spec.targetSlide + spec.slideCount;\n } else if (spec.targetSlide >= spec.slideCount) {\n focusedSlide = spec.targetSlide - spec.slideCount;\n } else {\n focusedSlide = spec.targetSlide;\n }\n\n var slickCurrent = index === focusedSlide;\n return {\n \"slick-slide\": true,\n \"slick-active\": slickActive,\n \"slick-center\": slickCenter,\n \"slick-cloned\": slickCloned,\n \"slick-current\": slickCurrent // dubious in case of RTL\n\n };\n};\n\nvar getSlideStyle = function getSlideStyle(spec) {\n var style = {};\n\n if (spec.variableWidth === undefined || spec.variableWidth === false) {\n style.width = spec.slideWidth;\n }\n\n if (spec.fade) {\n style.position = \"relative\";\n\n if (spec.vertical) {\n style.top = -spec.index * parseInt(spec.slideHeight);\n } else {\n style.left = -spec.index * parseInt(spec.slideWidth);\n }\n\n style.opacity = spec.currentSlide === spec.index ? 1 : 0;\n\n if (spec.useCSS) {\n style.transition = \"opacity \" + spec.speed + \"ms \" + spec.cssEase + \", \" + \"visibility \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n\n return style;\n};\n\nvar getKey = function getKey(child, fallbackKey) {\n return child.key || fallbackKey;\n};\n\nvar renderSlides = function renderSlides(spec) {\n var key;\n var slides = [];\n var preCloneSlides = [];\n var postCloneSlides = [];\n\n var childrenCount = _react[\"default\"].Children.count(spec.children);\n\n var startIndex = (0, _innerSliderUtils.lazyStartIndex)(spec);\n var endIndex = (0, _innerSliderUtils.lazyEndIndex)(spec);\n\n _react[\"default\"].Children.forEach(spec.children, function (elem, index) {\n var child;\n var childOnClickOptions = {\n message: \"children\",\n index: index,\n slidesToScroll: spec.slidesToScroll,\n currentSlide: spec.currentSlide\n }; // in case of lazyLoad, whether or not we want to fetch the slide\n\n if (!spec.lazyLoad || spec.lazyLoad && spec.lazyLoadedList.indexOf(index) >= 0) {\n child = elem;\n } else {\n child = /*#__PURE__*/_react[\"default\"].createElement(\"div\", null);\n }\n\n var childStyle = getSlideStyle(_objectSpread(_objectSpread({}, spec), {}, {\n index: index\n }));\n var slideClass = child.props.className || \"\";\n var slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {\n index: index\n })); // push a cloned element of the desired slide\n\n slides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"original\" + getKey(child, index),\n \"data-index\": index,\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n tabIndex: \"-1\",\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: _objectSpread(_objectSpread({\n outline: \"none\"\n }, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n })); // if slide needs to be precloned or postcloned\n\n if (spec.infinite && spec.fade === false) {\n var preCloneNo = childrenCount - index;\n\n if (preCloneNo <= (0, _innerSliderUtils.getPreClones)(spec) && childrenCount !== spec.slidesToShow) {\n key = -preCloneNo;\n\n if (key >= startIndex) {\n child = elem;\n }\n\n slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {\n index: key\n }));\n preCloneSlides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"precloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: _objectSpread(_objectSpread({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n\n if (childrenCount !== spec.slidesToShow) {\n key = childrenCount + index;\n\n if (key < endIndex) {\n child = elem;\n }\n\n slideClasses = getSlideClasses(_objectSpread(_objectSpread({}, spec), {}, {\n index: key\n }));\n postCloneSlides.push( /*#__PURE__*/_react[\"default\"].cloneElement(child, {\n key: \"postcloned\" + getKey(child, key),\n \"data-index\": key,\n tabIndex: \"-1\",\n className: (0, _classnames[\"default\"])(slideClasses, slideClass),\n \"aria-hidden\": !slideClasses[\"slick-active\"],\n style: _objectSpread(_objectSpread({}, child.props.style || {}), childStyle),\n onClick: function onClick(e) {\n child.props && child.props.onClick && child.props.onClick(e);\n\n if (spec.focusOnSelect) {\n spec.focusOnSelect(childOnClickOptions);\n }\n }\n }));\n }\n }\n });\n\n if (spec.rtl) {\n return preCloneSlides.concat(slides, postCloneSlides).reverse();\n } else {\n return preCloneSlides.concat(slides, postCloneSlides);\n }\n};\n\nvar Track = /*#__PURE__*/function (_React$PureComponent) {\n _inherits(Track, _React$PureComponent);\n\n var _super = _createSuper(Track);\n\n function Track() {\n var _this;\n\n _classCallCheck(this, Track);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _super.call.apply(_super, [this].concat(args));\n\n _defineProperty(_assertThisInitialized(_this), \"node\", null);\n\n _defineProperty(_assertThisInitialized(_this), \"handleRef\", function (ref) {\n _this.node = ref;\n });\n\n return _this;\n }\n\n _createClass(Track, [{\n key: \"render\",\n value: function render() {\n var slides = renderSlides(this.props);\n var _this$props = this.props,\n onMouseEnter = _this$props.onMouseEnter,\n onMouseOver = _this$props.onMouseOver,\n onMouseLeave = _this$props.onMouseLeave;\n var mouseEvents = {\n onMouseEnter: onMouseEnter,\n onMouseOver: onMouseOver,\n onMouseLeave: onMouseLeave\n };\n return /*#__PURE__*/_react[\"default\"].createElement(\"div\", _extends({\n ref: this.handleRef,\n className: \"slick-track\",\n style: this.props.trackStyle\n }, mouseEvents), slides);\n }\n }]);\n\n return Track;\n}(_react[\"default\"].PureComponent);\n\nexports.Track = Track;","\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.checkSpecKeys = exports.checkNavigable = exports.changeSlide = exports.canUseDOM = exports.canGoNext = void 0;\nexports.clamp = clamp;\nexports.swipeStart = exports.swipeMove = exports.swipeEnd = exports.slidesOnRight = exports.slidesOnLeft = exports.slideHandler = exports.siblingDirection = exports.safePreventDefault = exports.lazyStartIndex = exports.lazySlidesOnRight = exports.lazySlidesOnLeft = exports.lazyEndIndex = exports.keyHandler = exports.initializedState = exports.getWidth = exports.getTrackLeft = exports.getTrackCSS = exports.getTrackAnimateCSS = exports.getTotalSlides = exports.getSwipeDirection = exports.getSlideCount = exports.getRequiredLazySlides = exports.getPreClones = exports.getPostClones = exports.getOnDemandLazySlides = exports.getNavigableIndexes = exports.getHeight = exports.extractObject = void 0;\n\nvar _react = _interopRequireDefault(require(\"react\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction clamp(number, lowerBound, upperBound) {\n return Math.max(lowerBound, Math.min(number, upperBound));\n}\n\nvar safePreventDefault = function safePreventDefault(event) {\n var passiveEvents = [\"onTouchStart\", \"onTouchMove\", \"onWheel\"];\n\n if (!passiveEvents.includes(event._reactName)) {\n event.preventDefault();\n }\n};\n\nexports.safePreventDefault = safePreventDefault;\n\nvar getOnDemandLazySlides = function getOnDemandLazySlides(spec) {\n var onDemandSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n if (spec.lazyLoadedList.indexOf(slideIndex) < 0) {\n onDemandSlides.push(slideIndex);\n }\n }\n\n return onDemandSlides;\n}; // return list of slides that need to be present\n\n\nexports.getOnDemandLazySlides = getOnDemandLazySlides;\n\nvar getRequiredLazySlides = function getRequiredLazySlides(spec) {\n var requiredSlides = [];\n var startIndex = lazyStartIndex(spec);\n var endIndex = lazyEndIndex(spec);\n\n for (var slideIndex = startIndex; slideIndex < endIndex; slideIndex++) {\n requiredSlides.push(slideIndex);\n }\n\n return requiredSlides;\n}; // startIndex that needs to be present\n\n\nexports.getRequiredLazySlides = getRequiredLazySlides;\n\nvar lazyStartIndex = function lazyStartIndex(spec) {\n return spec.currentSlide - lazySlidesOnLeft(spec);\n};\n\nexports.lazyStartIndex = lazyStartIndex;\n\nvar lazyEndIndex = function lazyEndIndex(spec) {\n return spec.currentSlide + lazySlidesOnRight(spec);\n};\n\nexports.lazyEndIndex = lazyEndIndex;\n\nvar lazySlidesOnLeft = function lazySlidesOnLeft(spec) {\n return spec.centerMode ? Math.floor(spec.slidesToShow / 2) + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : 0;\n};\n\nexports.lazySlidesOnLeft = lazySlidesOnLeft;\n\nvar lazySlidesOnRight = function lazySlidesOnRight(spec) {\n return spec.centerMode ? Math.floor((spec.slidesToShow - 1) / 2) + 1 + (parseInt(spec.centerPadding) > 0 ? 1 : 0) : spec.slidesToShow;\n}; // get width of an element\n\n\nexports.lazySlidesOnRight = lazySlidesOnRight;\n\nvar getWidth = function getWidth(elem) {\n return elem && elem.offsetWidth || 0;\n};\n\nexports.getWidth = getWidth;\n\nvar getHeight = function getHeight(elem) {\n return elem && elem.offsetHeight || 0;\n};\n\nexports.getHeight = getHeight;\n\nvar getSwipeDirection = function getSwipeDirection(touchObject) {\n var verticalSwiping = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var xDist, yDist, r, swipeAngle;\n xDist = touchObject.startX - touchObject.curX;\n yDist = touchObject.startY - touchObject.curY;\n r = Math.atan2(yDist, xDist);\n swipeAngle = Math.round(r * 180 / Math.PI);\n\n if (swipeAngle < 0) {\n swipeAngle = 360 - Math.abs(swipeAngle);\n }\n\n if (swipeAngle <= 45 && swipeAngle >= 0 || swipeAngle <= 360 && swipeAngle >= 315) {\n return \"left\";\n }\n\n if (swipeAngle >= 135 && swipeAngle <= 225) {\n return \"right\";\n }\n\n if (verticalSwiping === true) {\n if (swipeAngle >= 35 && swipeAngle <= 135) {\n return \"up\";\n } else {\n return \"down\";\n }\n }\n\n return \"vertical\";\n}; // whether or not we can go next\n\n\nexports.getSwipeDirection = getSwipeDirection;\n\nvar canGoNext = function canGoNext(spec) {\n var canGo = true;\n\n if (!spec.infinite) {\n if (spec.centerMode && spec.currentSlide >= spec.slideCount - 1) {\n canGo = false;\n } else if (spec.slideCount <= spec.slidesToShow || spec.currentSlide >= spec.slideCount - spec.slidesToShow) {\n canGo = false;\n }\n }\n\n return canGo;\n}; // given an object and a list of keys, return new object with given keys\n\n\nexports.canGoNext = canGoNext;\n\nvar extractObject = function extractObject(spec, keys) {\n var newObject = {};\n keys.forEach(function (key) {\n return newObject[key] = spec[key];\n });\n return newObject;\n}; // get initialized state\n\n\nexports.extractObject = extractObject;\n\nvar initializedState = function initializedState(spec) {\n // spec also contains listRef, trackRef\n var slideCount = _react[\"default\"].Children.count(spec.children);\n\n var listNode = spec.listRef;\n var listWidth = Math.ceil(getWidth(listNode));\n var trackNode = spec.trackRef && spec.trackRef.node;\n var trackWidth = Math.ceil(getWidth(trackNode));\n var slideWidth;\n\n if (!spec.vertical) {\n var centerPaddingAdj = spec.centerMode && parseInt(spec.centerPadding) * 2;\n\n if (typeof spec.centerPadding === \"string\" && spec.centerPadding.slice(-1) === \"%\") {\n centerPaddingAdj *= listWidth / 100;\n }\n\n slideWidth = Math.ceil((listWidth - centerPaddingAdj) / spec.slidesToShow);\n } else {\n slideWidth = listWidth;\n }\n\n var slideHeight = listNode && getHeight(listNode.querySelector('[data-index=\"0\"]'));\n var listHeight = slideHeight * spec.slidesToShow;\n var currentSlide = spec.currentSlide === undefined ? spec.initialSlide : spec.currentSlide;\n\n if (spec.rtl && spec.currentSlide === undefined) {\n currentSlide = slideCount - 1 - spec.initialSlide;\n }\n\n var lazyLoadedList = spec.lazyLoadedList || [];\n var slidesToLoad = getOnDemandLazySlides(_objectSpread(_objectSpread({}, spec), {}, {\n currentSlide: currentSlide,\n lazyLoadedList: lazyLoadedList\n }));\n lazyLoadedList = lazyLoadedList.concat(slidesToLoad);\n var state = {\n slideCount: slideCount,\n slideWidth: slideWidth,\n listWidth: listWidth,\n trackWidth: trackWidth,\n currentSlide: currentSlide,\n slideHeight: slideHeight,\n listHeight: listHeight,\n lazyLoadedList: lazyLoadedList\n };\n\n if (spec.autoplaying === null && spec.autoplay) {\n state[\"autoplaying\"] = \"playing\";\n }\n\n return state;\n};\n\nexports.initializedState = initializedState;\n\nvar slideHandler = function slideHandler(spec) {\n var waitForAnimate = spec.waitForAnimate,\n animating = spec.animating,\n fade = spec.fade,\n infinite = spec.infinite,\n index = spec.index,\n slideCount = spec.slideCount,\n lazyLoad = spec.lazyLoad,\n currentSlide = spec.currentSlide,\n centerMode = spec.centerMode,\n slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n useCSS = spec.useCSS;\n var lazyLoadedList = spec.lazyLoadedList;\n if (waitForAnimate && animating) return {};\n var animationSlide = index,\n finalSlide,\n animationLeft,\n finalLeft;\n var state = {},\n nextState = {};\n var targetSlide = infinite ? index : clamp(index, 0, slideCount - 1);\n\n if (fade) {\n if (!infinite && (index < 0 || index >= slideCount)) return {};\n\n if (index < 0) {\n animationSlide = index + slideCount;\n } else if (index >= slideCount) {\n animationSlide = index - slideCount;\n }\n\n if (lazyLoad && lazyLoadedList.indexOf(animationSlide) < 0) {\n lazyLoadedList = lazyLoadedList.concat(animationSlide);\n }\n\n state = {\n animating: true,\n currentSlide: animationSlide,\n lazyLoadedList: lazyLoadedList,\n targetSlide: animationSlide\n };\n nextState = {\n animating: false,\n targetSlide: animationSlide\n };\n } else {\n finalSlide = animationSlide;\n\n if (animationSlide < 0) {\n finalSlide = animationSlide + slideCount;\n if (!infinite) finalSlide = 0;else if (slideCount % slidesToScroll !== 0) finalSlide = slideCount - slideCount % slidesToScroll;\n } else if (!canGoNext(spec) && animationSlide > currentSlide) {\n animationSlide = finalSlide = currentSlide;\n } else if (centerMode && animationSlide >= slideCount) {\n animationSlide = infinite ? slideCount : slideCount - 1;\n finalSlide = infinite ? 0 : slideCount - 1;\n } else if (animationSlide >= slideCount) {\n finalSlide = animationSlide - slideCount;\n if (!infinite) finalSlide = slideCount - slidesToShow;else if (slideCount % slidesToScroll !== 0) finalSlide = 0;\n }\n\n if (!infinite && animationSlide + slidesToShow >= slideCount) {\n finalSlide = slideCount - slidesToShow;\n }\n\n animationLeft = getTrackLeft(_objectSpread(_objectSpread({}, spec), {}, {\n slideIndex: animationSlide\n }));\n finalLeft = getTrackLeft(_objectSpread(_objectSpread({}, spec), {}, {\n slideIndex: finalSlide\n }));\n\n if (!infinite) {\n if (animationLeft === finalLeft) animationSlide = finalSlide;\n animationLeft = finalLeft;\n }\n\n if (lazyLoad) {\n lazyLoadedList = lazyLoadedList.concat(getOnDemandLazySlides(_objectSpread(_objectSpread({}, spec), {}, {\n currentSlide: animationSlide\n })));\n }\n\n if (!useCSS) {\n state = {\n currentSlide: finalSlide,\n trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: finalLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n } else {\n state = {\n animating: true,\n currentSlide: finalSlide,\n trackStyle: getTrackAnimateCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: animationLeft\n })),\n lazyLoadedList: lazyLoadedList,\n targetSlide: targetSlide\n };\n nextState = {\n animating: false,\n currentSlide: finalSlide,\n trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: finalLeft\n })),\n swipeLeft: null,\n targetSlide: targetSlide\n };\n }\n }\n\n return {\n state: state,\n nextState: nextState\n };\n};\n\nexports.slideHandler = slideHandler;\n\nvar changeSlide = function changeSlide(spec, options) {\n var indexOffset, previousInt, slideOffset, unevenOffset, targetSlide;\n var slidesToScroll = spec.slidesToScroll,\n slidesToShow = spec.slidesToShow,\n slideCount = spec.slideCount,\n currentSlide = spec.currentSlide,\n previousTargetSlide = spec.targetSlide,\n lazyLoad = spec.lazyLoad,\n infinite = spec.infinite;\n unevenOffset = slideCount % slidesToScroll !== 0;\n indexOffset = unevenOffset ? 0 : (slideCount - currentSlide) % slidesToScroll;\n\n if (options.message === \"previous\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : slidesToShow - indexOffset;\n targetSlide = currentSlide - slideOffset;\n\n if (lazyLoad && !infinite) {\n previousInt = currentSlide - slideOffset;\n targetSlide = previousInt === -1 ? slideCount - 1 : previousInt;\n }\n\n if (!infinite) {\n targetSlide = previousTargetSlide - slidesToScroll;\n }\n } else if (options.message === \"next\") {\n slideOffset = indexOffset === 0 ? slidesToScroll : indexOffset;\n targetSlide = currentSlide + slideOffset;\n\n if (lazyLoad && !infinite) {\n targetSlide = (currentSlide + slidesToScroll) % slideCount + indexOffset;\n }\n\n if (!infinite) {\n targetSlide = previousTargetSlide + slidesToScroll;\n }\n } else if (options.message === \"dots\") {\n // Click on dots\n targetSlide = options.index * options.slidesToScroll;\n } else if (options.message === \"children\") {\n // Click on the slides\n targetSlide = options.index;\n\n if (infinite) {\n var direction = siblingDirection(_objectSpread(_objectSpread({}, spec), {}, {\n targetSlide: targetSlide\n }));\n\n if (targetSlide > options.currentSlide && direction === \"left\") {\n targetSlide = targetSlide - slideCount;\n } else if (targetSlide < options.currentSlide && direction === \"right\") {\n targetSlide = targetSlide + slideCount;\n }\n }\n } else if (options.message === \"index\") {\n targetSlide = Number(options.index);\n }\n\n return targetSlide;\n};\n\nexports.changeSlide = changeSlide;\n\nvar keyHandler = function keyHandler(e, accessibility, rtl) {\n if (e.target.tagName.match(\"TEXTAREA|INPUT|SELECT\") || !accessibility) return \"\";\n if (e.keyCode === 37) return rtl ? \"next\" : \"previous\";\n if (e.keyCode === 39) return rtl ? \"previous\" : \"next\";\n return \"\";\n};\n\nexports.keyHandler = keyHandler;\n\nvar swipeStart = function swipeStart(e, swipe, draggable) {\n e.target.tagName === \"IMG\" && safePreventDefault(e);\n if (!swipe || !draggable && e.type.indexOf(\"mouse\") !== -1) return \"\";\n return {\n dragging: true,\n touchObject: {\n startX: e.touches ? e.touches[0].pageX : e.clientX,\n startY: e.touches ? e.touches[0].pageY : e.clientY,\n curX: e.touches ? e.touches[0].pageX : e.clientX,\n curY: e.touches ? e.touches[0].pageY : e.clientY\n }\n };\n};\n\nexports.swipeStart = swipeStart;\n\nvar swipeMove = function swipeMove(e, spec) {\n // spec also contains, trackRef and slideIndex\n var scrolling = spec.scrolling,\n animating = spec.animating,\n vertical = spec.vertical,\n swipeToSlide = spec.swipeToSlide,\n verticalSwiping = spec.verticalSwiping,\n rtl = spec.rtl,\n currentSlide = spec.currentSlide,\n edgeFriction = spec.edgeFriction,\n edgeDragged = spec.edgeDragged,\n onEdge = spec.onEdge,\n swiped = spec.swiped,\n swiping = spec.swiping,\n slideCount = spec.slideCount,\n slidesToScroll = spec.slidesToScroll,\n infinite = spec.infinite,\n touchObject = spec.touchObject,\n swipeEvent = spec.swipeEvent,\n listHeight = spec.listHeight,\n listWidth = spec.listWidth;\n if (scrolling) return;\n if (animating) return safePreventDefault(e);\n if (vertical && swipeToSlide && verticalSwiping) safePreventDefault(e);\n var swipeLeft,\n state = {};\n var curLeft = getTrackLeft(spec);\n touchObject.curX = e.touches ? e.touches[0].pageX : e.clientX;\n touchObject.curY = e.touches ? e.touches[0].pageY : e.clientY;\n touchObject.swipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curX - touchObject.startX, 2)));\n var verticalSwipeLength = Math.round(Math.sqrt(Math.pow(touchObject.curY - touchObject.startY, 2)));\n\n if (!verticalSwiping && !swiping && verticalSwipeLength > 10) {\n return {\n scrolling: true\n };\n }\n\n if (verticalSwiping) touchObject.swipeLength = verticalSwipeLength;\n var positionOffset = (!rtl ? 1 : -1) * (touchObject.curX > touchObject.startX ? 1 : -1);\n if (verticalSwiping) positionOffset = touchObject.curY > touchObject.startY ? 1 : -1;\n var dotCount = Math.ceil(slideCount / slidesToScroll);\n var swipeDirection = getSwipeDirection(spec.touchObject, verticalSwiping);\n var touchSwipeLength = touchObject.swipeLength;\n\n if (!infinite) {\n if (currentSlide === 0 && (swipeDirection === \"right\" || swipeDirection === \"down\") || currentSlide + 1 >= dotCount && (swipeDirection === \"left\" || swipeDirection === \"up\") || !canGoNext(spec) && (swipeDirection === \"left\" || swipeDirection === \"up\")) {\n touchSwipeLength = touchObject.swipeLength * edgeFriction;\n\n if (edgeDragged === false && onEdge) {\n onEdge(swipeDirection);\n state[\"edgeDragged\"] = true;\n }\n }\n }\n\n if (!swiped && swipeEvent) {\n swipeEvent(swipeDirection);\n state[\"swiped\"] = true;\n }\n\n if (!vertical) {\n if (!rtl) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n } else {\n swipeLeft = curLeft - touchSwipeLength * positionOffset;\n }\n } else {\n swipeLeft = curLeft + touchSwipeLength * (listHeight / listWidth) * positionOffset;\n }\n\n if (verticalSwiping) {\n swipeLeft = curLeft + touchSwipeLength * positionOffset;\n }\n\n state = _objectSpread(_objectSpread({}, state), {}, {\n touchObject: touchObject,\n swipeLeft: swipeLeft,\n trackStyle: getTrackCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: swipeLeft\n }))\n });\n\n if (Math.abs(touchObject.curX - touchObject.startX) < Math.abs(touchObject.curY - touchObject.startY) * 0.8) {\n return state;\n }\n\n if (touchObject.swipeLength > 10) {\n state[\"swiping\"] = true;\n safePreventDefault(e);\n }\n\n return state;\n};\n\nexports.swipeMove = swipeMove;\n\nvar swipeEnd = function swipeEnd(e, spec) {\n var dragging = spec.dragging,\n swipe = spec.swipe,\n touchObject = spec.touchObject,\n listWidth = spec.listWidth,\n touchThreshold = spec.touchThreshold,\n verticalSwiping = spec.verticalSwiping,\n listHeight = spec.listHeight,\n swipeToSlide = spec.swipeToSlide,\n scrolling = spec.scrolling,\n onSwipe = spec.onSwipe,\n targetSlide = spec.targetSlide,\n currentSlide = spec.currentSlide,\n infinite = spec.infinite;\n\n if (!dragging) {\n if (swipe) safePreventDefault(e);\n return {};\n }\n\n var minSwipe = verticalSwiping ? listHeight / touchThreshold : listWidth / touchThreshold;\n var swipeDirection = getSwipeDirection(touchObject, verticalSwiping); // reset the state of touch related state variables.\n\n var state = {\n dragging: false,\n edgeDragged: false,\n scrolling: false,\n swiping: false,\n swiped: false,\n swipeLeft: null,\n touchObject: {}\n };\n\n if (scrolling) {\n return state;\n }\n\n if (!touchObject.swipeLength) {\n return state;\n }\n\n if (touchObject.swipeLength > minSwipe) {\n safePreventDefault(e);\n\n if (onSwipe) {\n onSwipe(swipeDirection);\n }\n\n var slideCount, newSlide;\n var activeSlide = infinite ? currentSlide : targetSlide;\n\n switch (swipeDirection) {\n case \"left\":\n case \"up\":\n newSlide = activeSlide + getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 0;\n break;\n\n case \"right\":\n case \"down\":\n newSlide = activeSlide - getSlideCount(spec);\n slideCount = swipeToSlide ? checkNavigable(spec, newSlide) : newSlide;\n state[\"currentDirection\"] = 1;\n break;\n\n default:\n slideCount = activeSlide;\n }\n\n state[\"triggerSlideHandler\"] = slideCount;\n } else {\n // Adjust the track back to it's original position.\n var currentLeft = getTrackLeft(spec);\n state[\"trackStyle\"] = getTrackAnimateCSS(_objectSpread(_objectSpread({}, spec), {}, {\n left: currentLeft\n }));\n }\n\n return state;\n};\n\nexports.swipeEnd = swipeEnd;\n\nvar getNavigableIndexes = function getNavigableIndexes(spec) {\n var max = spec.infinite ? spec.slideCount * 2 : spec.slideCount;\n var breakpoint = spec.infinite ? spec.slidesToShow * -1 : 0;\n var counter = spec.infinite ? spec.slidesToShow * -1 : 0;\n var indexes = [];\n\n while (breakpoint < max) {\n indexes.push(breakpoint);\n breakpoint = counter + spec.slidesToScroll;\n counter += Math.min(spec.slidesToScroll, spec.slidesToShow);\n }\n\n return indexes;\n};\n\nexports.getNavigableIndexes = getNavigableIndexes;\n\nvar checkNavigable = function checkNavigable(spec, index) {\n var navigables = getNavigableIndexes(spec);\n var prevNavigable = 0;\n\n if (index > navigables[navigables.length - 1]) {\n index = navigables[navigables.length - 1];\n } else {\n for (var n in navigables) {\n if (index < navigables[n]) {\n index = prevNavigable;\n break;\n }\n\n prevNavigable = navigables[n];\n }\n }\n\n return index;\n};\n\nexports.checkNavigable = checkNavigable;\n\nvar getSlideCount = function getSlideCount(spec) {\n var centerOffset = spec.centerMode ? spec.slideWidth * Math.floor(spec.slidesToShow / 2) : 0;\n\n if (spec.swipeToSlide) {\n var swipedSlide;\n var slickList = spec.listRef;\n var slides = slickList.querySelectorAll && slickList.querySelectorAll(\".slick-slide\") || [];\n Array.from(slides).every(function (slide) {\n if (!spec.vertical) {\n if (slide.offsetLeft - centerOffset + getWidth(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n } else {\n if (slide.offsetTop + getHeight(slide) / 2 > spec.swipeLeft * -1) {\n swipedSlide = slide;\n return false;\n }\n }\n\n return true;\n });\n\n if (!swipedSlide) {\n return 0;\n }\n\n var currentIndex = spec.rtl === true ? spec.slideCount - spec.currentSlide : spec.currentSlide;\n var slidesTraversed = Math.abs(swipedSlide.dataset.index - currentIndex) || 1;\n return slidesTraversed;\n } else {\n return spec.slidesToScroll;\n }\n};\n\nexports.getSlideCount = getSlideCount;\n\nvar checkSpecKeys = function checkSpecKeys(spec, keysArray) {\n return keysArray.reduce(function (value, key) {\n return value && spec.hasOwnProperty(key);\n }, true) ? null : console.error(\"Keys Missing:\", spec);\n};\n\nexports.checkSpecKeys = checkSpecKeys;\n\nvar getTrackCSS = function getTrackCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\"]);\n var trackWidth, trackHeight;\n var trackChildren = spec.slideCount + 2 * spec.slidesToShow;\n\n if (!spec.vertical) {\n trackWidth = getTotalSlides(spec) * spec.slideWidth;\n } else {\n trackHeight = trackChildren * spec.slideHeight;\n }\n\n var style = {\n opacity: 1,\n transition: \"\",\n WebkitTransition: \"\"\n };\n\n if (spec.useTransform) {\n var WebkitTransform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var transform = !spec.vertical ? \"translate3d(\" + spec.left + \"px, 0px, 0px)\" : \"translate3d(0px, \" + spec.left + \"px, 0px)\";\n var msTransform = !spec.vertical ? \"translateX(\" + spec.left + \"px)\" : \"translateY(\" + spec.left + \"px)\";\n style = _objectSpread(_objectSpread({}, style), {}, {\n WebkitTransform: WebkitTransform,\n transform: transform,\n msTransform: msTransform\n });\n } else {\n if (spec.vertical) {\n style[\"top\"] = spec.left;\n } else {\n style[\"left\"] = spec.left;\n }\n }\n\n if (spec.fade) style = {\n opacity: 1\n };\n if (trackWidth) style.width = trackWidth;\n if (trackHeight) style.height = trackHeight; // Fallback for IE8\n\n if (window && !window.addEventListener && window.attachEvent) {\n if (!spec.vertical) {\n style.marginLeft = spec.left + \"px\";\n } else {\n style.marginTop = spec.left + \"px\";\n }\n }\n\n return style;\n};\n\nexports.getTrackCSS = getTrackCSS;\n\nvar getTrackAnimateCSS = function getTrackAnimateCSS(spec) {\n checkSpecKeys(spec, [\"left\", \"variableWidth\", \"slideCount\", \"slidesToShow\", \"slideWidth\", \"speed\", \"cssEase\"]);\n var style = getTrackCSS(spec); // useCSS is true by default so it can be undefined\n\n if (spec.useTransform) {\n style.WebkitTransition = \"-webkit-transform \" + spec.speed + \"ms \" + spec.cssEase;\n style.transition = \"transform \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n if (spec.vertical) {\n style.transition = \"top \" + spec.speed + \"ms \" + spec.cssEase;\n } else {\n style.transition = \"left \" + spec.speed + \"ms \" + spec.cssEase;\n }\n }\n\n return style;\n};\n\nexports.getTrackAnimateCSS = getTrackAnimateCSS;\n\nvar getTrackLeft = function getTrackLeft(spec) {\n if (spec.unslick) {\n return 0;\n }\n\n checkSpecKeys(spec, [\"slideIndex\", \"trackRef\", \"infinite\", \"centerMode\", \"slideCount\", \"slidesToShow\", \"slidesToScroll\", \"slideWidth\", \"listWidth\", \"variableWidth\", \"slideHeight\"]);\n var slideIndex = spec.slideIndex,\n trackRef = spec.trackRef,\n infinite = spec.infinite,\n centerMode = spec.centerMode,\n slideCount = spec.slideCount,\n slidesToShow = spec.slidesToShow,\n slidesToScroll = spec.slidesToScroll,\n slideWidth = spec.slideWidth,\n listWidth = spec.listWidth,\n variableWidth = spec.variableWidth,\n slideHeight = spec.slideHeight,\n fade = spec.fade,\n vertical = spec.vertical;\n var slideOffset = 0;\n var targetLeft;\n var targetSlide;\n var verticalOffset = 0;\n\n if (fade || spec.slideCount === 1) {\n return 0;\n }\n\n var slidesToOffset = 0;\n\n if (infinite) {\n slidesToOffset = -getPreClones(spec); // bring active slide to the beginning of visual area\n // if next scroll doesn't have enough children, just reach till the end of original slides instead of shifting slidesToScroll children\n\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = -(slideIndex > slideCount ? slidesToShow - (slideIndex - slideCount) : slideCount % slidesToScroll);\n } // shift current slide to center of the frame\n\n\n if (centerMode) {\n slidesToOffset += parseInt(slidesToShow / 2);\n }\n } else {\n if (slideCount % slidesToScroll !== 0 && slideIndex + slidesToScroll > slideCount) {\n slidesToOffset = slidesToShow - slideCount % slidesToScroll;\n }\n\n if (centerMode) {\n slidesToOffset = parseInt(slidesToShow / 2);\n }\n }\n\n slideOffset = slidesToOffset * slideWidth;\n verticalOffset = slidesToOffset * slideHeight;\n\n if (!vertical) {\n targetLeft = slideIndex * slideWidth * -1 + slideOffset;\n } else {\n targetLeft = slideIndex * slideHeight * -1 + verticalOffset;\n }\n\n if (variableWidth === true) {\n var targetSlideIndex;\n var trackElem = trackRef && trackRef.node;\n targetSlideIndex = slideIndex + getPreClones(spec);\n targetSlide = trackElem && trackElem.childNodes[targetSlideIndex];\n targetLeft = targetSlide ? targetSlide.offsetLeft * -1 : 0;\n\n if (centerMode === true) {\n targetSlideIndex = infinite ? slideIndex + getPreClones(spec) : slideIndex;\n targetSlide = trackElem && trackElem.children[targetSlideIndex];\n targetLeft = 0;\n\n for (var slide = 0; slide < targetSlideIndex; slide++) {\n targetLeft -= trackElem && trackElem.children[slide] && trackElem.children[slide].offsetWidth;\n }\n\n targetLeft -= parseInt(spec.centerPadding);\n targetLeft += targetSlide && (listWidth - targetSlide.offsetWidth) / 2;\n }\n }\n\n return targetLeft;\n};\n\nexports.getTrackLeft = getTrackLeft;\n\nvar getPreClones = function getPreClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n\n if (spec.variableWidth) {\n return spec.slideCount;\n }\n\n return spec.slidesToShow + (spec.centerMode ? 1 : 0);\n};\n\nexports.getPreClones = getPreClones;\n\nvar getPostClones = function getPostClones(spec) {\n if (spec.unslick || !spec.infinite) {\n return 0;\n }\n\n return spec.slideCount;\n};\n\nexports.getPostClones = getPostClones;\n\nvar getTotalSlides = function getTotalSlides(spec) {\n return spec.slideCount === 1 ? 1 : getPreClones(spec) + spec.slideCount + getPostClones(spec);\n};\n\nexports.getTotalSlides = getTotalSlides;\n\nvar siblingDirection = function siblingDirection(spec) {\n if (spec.targetSlide > spec.currentSlide) {\n if (spec.targetSlide > spec.currentSlide + slidesOnRight(spec)) {\n return \"left\";\n }\n\n return \"right\";\n } else {\n if (spec.targetSlide < spec.currentSlide - slidesOnLeft(spec)) {\n return \"right\";\n }\n\n return \"left\";\n }\n};\n\nexports.siblingDirection = siblingDirection;\n\nvar slidesOnRight = function slidesOnRight(_ref) {\n var slidesToShow = _ref.slidesToShow,\n centerMode = _ref.centerMode,\n rtl = _ref.rtl,\n centerPadding = _ref.centerPadding;\n\n // returns no of slides on the right of active slide\n if (centerMode) {\n var right = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) right += 1;\n if (rtl && slidesToShow % 2 === 0) right += 1;\n return right;\n }\n\n if (rtl) {\n return 0;\n }\n\n return slidesToShow - 1;\n};\n\nexports.slidesOnRight = slidesOnRight;\n\nvar slidesOnLeft = function slidesOnLeft(_ref2) {\n var slidesToShow = _ref2.slidesToShow,\n centerMode = _ref2.centerMode,\n rtl = _ref2.rtl,\n centerPadding = _ref2.centerPadding;\n\n // returns no of slides on the left of active slide\n if (centerMode) {\n var left = (slidesToShow - 1) / 2 + 1;\n if (parseInt(centerPadding) > 0) left += 1;\n if (!rtl && slidesToShow % 2 === 0) left += 1;\n return left;\n }\n\n if (rtl) {\n return slidesToShow - 1;\n }\n\n return 0;\n};\n\nexports.slidesOnLeft = slidesOnLeft;\n\nvar canUseDOM = function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n};\n\nexports.canUseDOM = canUseDOM;","export default {\n disabled: false\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * <Transition in={inProp} timeout={duration}>\n * {state => (\n * <div style={{\n * ...defaultStyle,\n * ...transitionStyles[state]\n * }}>\n * I'm a fade Transition!\n * </div>\n * )}\n * </Transition>\n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n * <div>\n * <Transition in={inProp} timeout={500}>\n * {state => (\n * // ...\n * )}\n * </Transition>\n * <button onClick={() => setInProp(true)}>\n * Click to Enter\n * </button>\n * </div>\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * <Transition in={this.state.in} timeout={150}>\n * {state => (\n * <MyComponent className={`fade fade-${state}`} />\n * )}\n * </Transition>\n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `<CSSTransition>` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `<TransitionGroup>` component manages a set of transition components\n * (`<Transition>` and `<CSSTransition>`) in a list. Like with the transition\n * components, `<TransitionGroup>` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the `<TransitionGroup>`.\n *\n * Note that `<TransitionGroup>` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `<TransitionGroup>` renders a `<div>` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `<div>` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `<Transition>` components, that are toggled `in` and out as they\n * leave. the `<TransitionGroup>` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `<Transition>` as\n * with our `<Fade>` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\r\n/* eslint-disable require-jsdoc, valid-jsdoc */\r\nvar MapShim = (function () {\r\n if (typeof Map !== 'undefined') {\r\n return Map;\r\n }\r\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\r\n function getIndex(arr, key) {\r\n var result = -1;\r\n arr.some(function (entry, index) {\r\n if (entry[0] === key) {\r\n result = index;\r\n return true;\r\n }\r\n return false;\r\n });\r\n return result;\r\n }\r\n return /** @class */ (function () {\r\n function class_1() {\r\n this.__entries__ = [];\r\n }\r\n Object.defineProperty(class_1.prototype, \"size\", {\r\n /**\r\n * @returns {boolean}\r\n */\r\n get: function () {\r\n return this.__entries__.length;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\r\n class_1.prototype.get = function (key) {\r\n var index = getIndex(this.__entries__, key);\r\n var entry = this.__entries__[index];\r\n return entry && entry[1];\r\n };\r\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\r\n class_1.prototype.set = function (key, value) {\r\n var index = getIndex(this.__entries__, key);\r\n if (~index) {\r\n this.__entries__[index][1] = value;\r\n }\r\n else {\r\n this.__entries__.push([key, value]);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.delete = function (key) {\r\n var entries = this.__entries__;\r\n var index = getIndex(entries, key);\r\n if (~index) {\r\n entries.splice(index, 1);\r\n }\r\n };\r\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\r\n class_1.prototype.has = function (key) {\r\n return !!~getIndex(this.__entries__, key);\r\n };\r\n /**\r\n * @returns {void}\r\n */\r\n class_1.prototype.clear = function () {\r\n this.__entries__.splice(0);\r\n };\r\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\r\n class_1.prototype.forEach = function (callback, ctx) {\r\n if (ctx === void 0) { ctx = null; }\r\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\r\n var entry = _a[_i];\r\n callback.call(ctx, entry[1], entry[0]);\r\n }\r\n };\r\n return class_1;\r\n }());\r\n})();\n\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\r\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;\n\n// Returns global object of a current environment.\r\nvar global$1 = (function () {\r\n if (typeof global !== 'undefined' && global.Math === Math) {\r\n return global;\r\n }\r\n if (typeof self !== 'undefined' && self.Math === Math) {\r\n return self;\r\n }\r\n if (typeof window !== 'undefined' && window.Math === Math) {\r\n return window;\r\n }\r\n // eslint-disable-next-line no-new-func\r\n return Function('return this')();\r\n})();\n\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\r\nvar requestAnimationFrame$1 = (function () {\r\n if (typeof requestAnimationFrame === 'function') {\r\n // It's required to use a bounded function because IE sometimes throws\r\n // an \"Invalid calling object\" error if rAF is invoked without the global\r\n // object on the left hand side.\r\n return requestAnimationFrame.bind(global$1);\r\n }\r\n return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };\r\n})();\n\n// Defines minimum timeout before adding a trailing call.\r\nvar trailingTimeout = 2;\r\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\r\nfunction throttle (callback, delay) {\r\n var leadingCall = false, trailingCall = false, lastCallTime = 0;\r\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\r\n function resolvePending() {\r\n if (leadingCall) {\r\n leadingCall = false;\r\n callback();\r\n }\r\n if (trailingCall) {\r\n proxy();\r\n }\r\n }\r\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\r\n function timeoutCallback() {\r\n requestAnimationFrame$1(resolvePending);\r\n }\r\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\r\n function proxy() {\r\n var timeStamp = Date.now();\r\n if (leadingCall) {\r\n // Reject immediately following calls.\r\n if (timeStamp - lastCallTime < trailingTimeout) {\r\n return;\r\n }\r\n // Schedule new call to be in invoked when the pending one is resolved.\r\n // This is important for \"transitions\" which never actually start\r\n // immediately so there is a chance that we might miss one if change\r\n // happens amids the pending invocation.\r\n trailingCall = true;\r\n }\r\n else {\r\n leadingCall = true;\r\n trailingCall = false;\r\n setTimeout(timeoutCallback, delay);\r\n }\r\n lastCallTime = timeStamp;\r\n }\r\n return proxy;\r\n}\n\n// Minimum delay before invoking the update of observers.\r\nvar REFRESH_DELAY = 20;\r\n// A list of substrings of CSS properties used to find transition events that\r\n// might affect dimensions of observed elements.\r\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];\r\n// Check if MutationObserver is available.\r\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\r\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\r\nvar ResizeObserverController = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\r\n function ResizeObserverController() {\r\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\r\n this.connected_ = false;\r\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\r\n this.mutationEventsAdded_ = false;\r\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\r\n this.mutationsObserver_ = null;\r\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\r\n this.observers_ = [];\r\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\r\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\r\n }\r\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.addObserver = function (observer) {\r\n if (!~this.observers_.indexOf(observer)) {\r\n this.observers_.push(observer);\r\n }\r\n // Add listeners if they haven't been added yet.\r\n if (!this.connected_) {\r\n this.connect_();\r\n }\r\n };\r\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.removeObserver = function (observer) {\r\n var observers = this.observers_;\r\n var index = observers.indexOf(observer);\r\n // Remove observer if it's present in registry.\r\n if (~index) {\r\n observers.splice(index, 1);\r\n }\r\n // Remove listeners if controller has no connected observers.\r\n if (!observers.length && this.connected_) {\r\n this.disconnect_();\r\n }\r\n };\r\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.refresh = function () {\r\n var changesDetected = this.updateObservers_();\r\n // Continue running updates if changes have been detected as there might\r\n // be future ones caused by CSS transitions.\r\n if (changesDetected) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\r\n ResizeObserverController.prototype.updateObservers_ = function () {\r\n // Collect observers that have active observations.\r\n var activeObservers = this.observers_.filter(function (observer) {\r\n return observer.gatherActive(), observer.hasActive();\r\n });\r\n // Deliver notifications in a separate cycle in order to avoid any\r\n // collisions between observers, e.g. when multiple instances of\r\n // ResizeObserver are tracking the same element and the callback of one\r\n // of them changes content dimensions of the observed target. Sometimes\r\n // this may result in notifications being blocked for the rest of observers.\r\n activeObservers.forEach(function (observer) { return observer.broadcastActive(); });\r\n return activeObservers.length > 0;\r\n };\r\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.connect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already added.\r\n if (!isBrowser || this.connected_) {\r\n return;\r\n }\r\n // Subscription to the \"Transitionend\" event is used as a workaround for\r\n // delayed transitions. This way it's possible to capture at least the\r\n // final state of an element.\r\n document.addEventListener('transitionend', this.onTransitionEnd_);\r\n window.addEventListener('resize', this.refresh);\r\n if (mutationObserverSupported) {\r\n this.mutationsObserver_ = new MutationObserver(this.refresh);\r\n this.mutationsObserver_.observe(document, {\r\n attributes: true,\r\n childList: true,\r\n characterData: true,\r\n subtree: true\r\n });\r\n }\r\n else {\r\n document.addEventListener('DOMSubtreeModified', this.refresh);\r\n this.mutationEventsAdded_ = true;\r\n }\r\n this.connected_ = true;\r\n };\r\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.disconnect_ = function () {\r\n // Do nothing if running in a non-browser environment or if listeners\r\n // have been already removed.\r\n if (!isBrowser || !this.connected_) {\r\n return;\r\n }\r\n document.removeEventListener('transitionend', this.onTransitionEnd_);\r\n window.removeEventListener('resize', this.refresh);\r\n if (this.mutationsObserver_) {\r\n this.mutationsObserver_.disconnect();\r\n }\r\n if (this.mutationEventsAdded_) {\r\n document.removeEventListener('DOMSubtreeModified', this.refresh);\r\n }\r\n this.mutationsObserver_ = null;\r\n this.mutationEventsAdded_ = false;\r\n this.connected_ = false;\r\n };\r\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\r\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\r\n var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;\r\n // Detect whether transition may affect dimensions of an element.\r\n var isReflowProperty = transitionKeys.some(function (key) {\r\n return !!~propertyName.indexOf(key);\r\n });\r\n if (isReflowProperty) {\r\n this.refresh();\r\n }\r\n };\r\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\r\n ResizeObserverController.getInstance = function () {\r\n if (!this.instance_) {\r\n this.instance_ = new ResizeObserverController();\r\n }\r\n return this.instance_;\r\n };\r\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\r\n ResizeObserverController.instance_ = null;\r\n return ResizeObserverController;\r\n}());\n\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\r\nvar defineConfigurable = (function (target, props) {\r\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\r\n var key = _a[_i];\r\n Object.defineProperty(target, key, {\r\n value: props[key],\r\n enumerable: false,\r\n writable: false,\r\n configurable: true\r\n });\r\n }\r\n return target;\r\n});\n\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\r\nvar getWindowOf = (function (target) {\r\n // Assume that the element is an instance of Node, which means that it\r\n // has the \"ownerDocument\" property from which we can retrieve a\r\n // corresponding global object.\r\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;\r\n // Return the local global object if it's not possible extract one from\r\n // provided element.\r\n return ownerGlobal || global$1;\r\n});\n\n// Placeholder of an empty content rectangle.\r\nvar emptyRect = createRectInit(0, 0, 0, 0);\r\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\r\nfunction toFloat(value) {\r\n return parseFloat(value) || 0;\r\n}\r\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\r\nfunction getBordersSize(styles) {\r\n var positions = [];\r\n for (var _i = 1; _i < arguments.length; _i++) {\r\n positions[_i - 1] = arguments[_i];\r\n }\r\n return positions.reduce(function (size, position) {\r\n var value = styles['border-' + position + '-width'];\r\n return size + toFloat(value);\r\n }, 0);\r\n}\r\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\r\nfunction getPaddings(styles) {\r\n var positions = ['top', 'right', 'bottom', 'left'];\r\n var paddings = {};\r\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\r\n var position = positions_1[_i];\r\n var value = styles['padding-' + position];\r\n paddings[position] = toFloat(value);\r\n }\r\n return paddings;\r\n}\r\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getSVGContentRect(target) {\r\n var bbox = target.getBBox();\r\n return createRectInit(0, 0, bbox.width, bbox.height);\r\n}\r\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getHTMLElementContentRect(target) {\r\n // Client width & height properties can't be\r\n // used exclusively as they provide rounded values.\r\n var clientWidth = target.clientWidth, clientHeight = target.clientHeight;\r\n // By this condition we can catch all non-replaced inline, hidden and\r\n // detached elements. Though elements with width & height properties less\r\n // than 0.5 will be discarded as well.\r\n //\r\n // Without it we would need to implement separate methods for each of\r\n // those cases and it's not possible to perform a precise and performance\r\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\r\n // gives wrong results for elements with width & height less than 0.5.\r\n if (!clientWidth && !clientHeight) {\r\n return emptyRect;\r\n }\r\n var styles = getWindowOf(target).getComputedStyle(target);\r\n var paddings = getPaddings(styles);\r\n var horizPad = paddings.left + paddings.right;\r\n var vertPad = paddings.top + paddings.bottom;\r\n // Computed styles of width & height are being used because they are the\r\n // only dimensions available to JS that contain non-rounded values. It could\r\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\r\n // affected by CSS transformations let alone paddings, borders and scroll bars.\r\n var width = toFloat(styles.width), height = toFloat(styles.height);\r\n // Width & height include paddings and borders when the 'border-box' box\r\n // model is applied (except for IE).\r\n if (styles.boxSizing === 'border-box') {\r\n // Following conditions are required to handle Internet Explorer which\r\n // doesn't include paddings and borders to computed CSS dimensions.\r\n //\r\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\r\n // properties then it's either IE, and thus we don't need to subtract\r\n // anything, or an element merely doesn't have paddings/borders styles.\r\n if (Math.round(width + horizPad) !== clientWidth) {\r\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\r\n }\r\n if (Math.round(height + vertPad) !== clientHeight) {\r\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\r\n }\r\n }\r\n // Following steps can't be applied to the document's root element as its\r\n // client[Width/Height] properties represent viewport area of the window.\r\n // Besides, it's as well not necessary as the <html> itself neither has\r\n // rendered scroll bars nor it can be clipped.\r\n if (!isDocumentElement(target)) {\r\n // In some browsers (only in Firefox, actually) CSS width & height\r\n // include scroll bars size which can be removed at this step as scroll\r\n // bars are the only difference between rounded dimensions + paddings\r\n // and \"client\" properties, though that is not always true in Chrome.\r\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\r\n var horizScrollbar = Math.round(height + vertPad) - clientHeight;\r\n // Chrome has a rather weird rounding of \"client\" properties.\r\n // E.g. for an element with content width of 314.2px it sometimes gives\r\n // the client width of 315px and for the width of 314.7px it may give\r\n // 314px. And it doesn't happen all the time. So just ignore this delta\r\n // as a non-relevant.\r\n if (Math.abs(vertScrollbar) !== 1) {\r\n width -= vertScrollbar;\r\n }\r\n if (Math.abs(horizScrollbar) !== 1) {\r\n height -= horizScrollbar;\r\n }\r\n }\r\n return createRectInit(paddings.left, paddings.top, width, height);\r\n}\r\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nvar isSVGGraphicsElement = (function () {\r\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\r\n // interface.\r\n if (typeof SVGGraphicsElement !== 'undefined') {\r\n return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };\r\n }\r\n // If it's so, then check that element is at least an instance of the\r\n // SVGElement and that it has the \"getBBox\" method.\r\n // eslint-disable-next-line no-extra-parens\r\n return function (target) { return (target instanceof getWindowOf(target).SVGElement &&\r\n typeof target.getBBox === 'function'); };\r\n})();\r\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\r\nfunction isDocumentElement(target) {\r\n return target === getWindowOf(target).document.documentElement;\r\n}\r\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction getContentRect(target) {\r\n if (!isBrowser) {\r\n return emptyRect;\r\n }\r\n if (isSVGGraphicsElement(target)) {\r\n return getSVGContentRect(target);\r\n }\r\n return getHTMLElementContentRect(target);\r\n}\r\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\r\nfunction createReadOnlyRect(_a) {\r\n var x = _a.x, y = _a.y, width = _a.width, height = _a.height;\r\n // If DOMRectReadOnly is available use it as a prototype for the rectangle.\r\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\r\n var rect = Object.create(Constr.prototype);\r\n // Rectangle's properties are not writable and non-enumerable.\r\n defineConfigurable(rect, {\r\n x: x, y: y, width: width, height: height,\r\n top: y,\r\n right: x + width,\r\n bottom: height + y,\r\n left: x\r\n });\r\n return rect;\r\n}\r\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\r\nfunction createRectInit(x, y, width, height) {\r\n return { x: x, y: y, width: width, height: height };\r\n}\n\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\r\nvar ResizeObservation = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\r\n function ResizeObservation(target) {\r\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastWidth = 0;\r\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\r\n this.broadcastHeight = 0;\r\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\r\n this.contentRect_ = createRectInit(0, 0, 0, 0);\r\n this.target = target;\r\n }\r\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObservation.prototype.isActive = function () {\r\n var rect = getContentRect(this.target);\r\n this.contentRect_ = rect;\r\n return (rect.width !== this.broadcastWidth ||\r\n rect.height !== this.broadcastHeight);\r\n };\r\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\r\n ResizeObservation.prototype.broadcastRect = function () {\r\n var rect = this.contentRect_;\r\n this.broadcastWidth = rect.width;\r\n this.broadcastHeight = rect.height;\r\n return rect;\r\n };\r\n return ResizeObservation;\r\n}());\n\nvar ResizeObserverEntry = /** @class */ (function () {\r\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\r\n function ResizeObserverEntry(target, rectInit) {\r\n var contentRect = createReadOnlyRect(rectInit);\r\n // According to the specification following properties are not writable\r\n // and are also not enumerable in the native implementation.\r\n //\r\n // Property accessors are not being used as they'd require to define a\r\n // private WeakMap storage which may cause memory leaks in browsers that\r\n // don't support this type of collections.\r\n defineConfigurable(this, { target: target, contentRect: contentRect });\r\n }\r\n return ResizeObserverEntry;\r\n}());\n\nvar ResizeObserverSPI = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\r\n function ResizeObserverSPI(callback, controller, callbackCtx) {\r\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\r\n this.observations_ = new MapShim();\r\n if (typeof callback !== 'function') {\r\n throw new TypeError('The callback provided as parameter 1 is not a function.');\r\n }\r\n this.callback_ = callback;\r\n this.controller_ = controller;\r\n this.callbackCtx_ = callbackCtx;\r\n }\r\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.observe = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is already being observed.\r\n if (observations.has(target)) {\r\n return;\r\n }\r\n observations.set(target, new ResizeObservation(target));\r\n this.controller_.addObserver(this);\r\n // Force the update of observations.\r\n this.controller_.refresh();\r\n };\r\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.unobserve = function (target) {\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n // Do nothing if current environment doesn't have the Element interface.\r\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\r\n return;\r\n }\r\n if (!(target instanceof getWindowOf(target).Element)) {\r\n throw new TypeError('parameter 1 is not of type \"Element\".');\r\n }\r\n var observations = this.observations_;\r\n // Do nothing if element is not being observed.\r\n if (!observations.has(target)) {\r\n return;\r\n }\r\n observations.delete(target);\r\n if (!observations.size) {\r\n this.controller_.removeObserver(this);\r\n }\r\n };\r\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.disconnect = function () {\r\n this.clearActive();\r\n this.observations_.clear();\r\n this.controller_.removeObserver(this);\r\n };\r\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.gatherActive = function () {\r\n var _this = this;\r\n this.clearActive();\r\n this.observations_.forEach(function (observation) {\r\n if (observation.isActive()) {\r\n _this.activeObservations_.push(observation);\r\n }\r\n });\r\n };\r\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.broadcastActive = function () {\r\n // Do nothing if observer doesn't have active observations.\r\n if (!this.hasActive()) {\r\n return;\r\n }\r\n var ctx = this.callbackCtx_;\r\n // Create ResizeObserverEntry instance for every active observation.\r\n var entries = this.activeObservations_.map(function (observation) {\r\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\r\n });\r\n this.callback_.call(ctx, entries, ctx);\r\n this.clearActive();\r\n };\r\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\r\n ResizeObserverSPI.prototype.clearActive = function () {\r\n this.activeObservations_.splice(0);\r\n };\r\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\r\n ResizeObserverSPI.prototype.hasActive = function () {\r\n return this.activeObservations_.length > 0;\r\n };\r\n return ResizeObserverSPI;\r\n}());\n\n// Registry of internal observers. If WeakMap is not available use current shim\r\n// for the Map collection as it has all required methods and because WeakMap\r\n// can't be fully polyfilled anyway.\r\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\r\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\r\nvar ResizeObserver = /** @class */ (function () {\r\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\r\n function ResizeObserver(callback) {\r\n if (!(this instanceof ResizeObserver)) {\r\n throw new TypeError('Cannot call a class as a function.');\r\n }\r\n if (!arguments.length) {\r\n throw new TypeError('1 argument required, but only 0 present.');\r\n }\r\n var controller = ResizeObserverController.getInstance();\r\n var observer = new ResizeObserverSPI(callback, controller, this);\r\n observers.set(this, observer);\r\n }\r\n return ResizeObserver;\r\n}());\r\n// Expose public methods of ResizeObserver.\r\n[\r\n 'observe',\r\n 'unobserve',\r\n 'disconnect'\r\n].forEach(function (method) {\r\n ResizeObserver.prototype[method] = function () {\r\n var _a;\r\n return (_a = observers.get(this))[method].apply(_a, arguments);\r\n };\r\n});\n\nvar index = (function () {\r\n // Export existing implementation if available.\r\n if (typeof global$1.ResizeObserver !== 'undefined') {\r\n return global$1.ResizeObserver;\r\n }\r\n return ResizeObserver;\r\n})();\n\nexport default index;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar callBound = require('call-bind/callBound');\nvar inspect = require('object-inspect');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $WeakMap = GetIntrinsic('%WeakMap%', true);\nvar $Map = GetIntrinsic('%Map%', true);\n\nvar $weakMapGet = callBound('WeakMap.prototype.get', true);\nvar $weakMapSet = callBound('WeakMap.prototype.set', true);\nvar $weakMapHas = callBound('WeakMap.prototype.has', true);\nvar $mapGet = callBound('Map.prototype.get', true);\nvar $mapSet = callBound('Map.prototype.set', true);\nvar $mapHas = callBound('Map.prototype.has', true);\n\n/*\n * This function traverses the list returning the node corresponding to the\n * given key.\n *\n * That node is also moved to the head of the list, so that if it's accessed\n * again we don't need to traverse the whole list. By doing so, all the recently\n * used nodes can be accessed relatively quickly.\n */\nvar listGetNode = function (list, key) { // eslint-disable-line consistent-return\n\tfor (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {\n\t\tif (curr.key === key) {\n\t\t\tprev.next = curr.next;\n\t\t\tcurr.next = list.next;\n\t\t\tlist.next = curr; // eslint-disable-line no-param-reassign\n\t\t\treturn curr;\n\t\t}\n\t}\n};\n\nvar listGet = function (objects, key) {\n\tvar node = listGetNode(objects, key);\n\treturn node && node.value;\n};\nvar listSet = function (objects, key, value) {\n\tvar node = listGetNode(objects, key);\n\tif (node) {\n\t\tnode.value = value;\n\t} else {\n\t\t// Prepend the new node to the beginning of the list\n\t\tobjects.next = { // eslint-disable-line no-param-reassign\n\t\t\tkey: key,\n\t\t\tnext: objects.next,\n\t\t\tvalue: value\n\t\t};\n\t}\n};\nvar listHas = function (objects, key) {\n\treturn !!listGetNode(objects, key);\n};\n\nmodule.exports = function getSideChannel() {\n\tvar $wm;\n\tvar $m;\n\tvar $o;\n\tvar channel = {\n\t\tassert: function (key) {\n\t\t\tif (!channel.has(key)) {\n\t\t\t\tthrow new $TypeError('Side channel does not contain ' + inspect(key));\n\t\t\t}\n\t\t},\n\t\tget: function (key) { // eslint-disable-line consistent-return\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapGet($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapGet($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listGet($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\thas: function (key) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif ($wm) {\n\t\t\t\t\treturn $weakMapHas($wm, key);\n\t\t\t\t}\n\t\t\t} else if ($Map) {\n\t\t\t\tif ($m) {\n\t\t\t\t\treturn $mapHas($m, key);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ($o) { // eslint-disable-line no-lonely-if\n\t\t\t\t\treturn listHas($o, key);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t},\n\t\tset: function (key, value) {\n\t\t\tif ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {\n\t\t\t\tif (!$wm) {\n\t\t\t\t\t$wm = new $WeakMap();\n\t\t\t\t}\n\t\t\t\t$weakMapSet($wm, key, value);\n\t\t\t} else if ($Map) {\n\t\t\t\tif (!$m) {\n\t\t\t\t\t$m = new $Map();\n\t\t\t\t}\n\t\t\t\t$mapSet($m, key, value);\n\t\t\t} else {\n\t\t\t\tif (!$o) {\n\t\t\t\t\t/*\n\t\t\t\t\t * Initialize the linked list as an empty node, so that we don't have\n\t\t\t\t\t * to special-case handling of the first node: we can always refer to\n\t\t\t\t\t * it as (previous node).next, instead of something like (list).head\n\t\t\t\t\t */\n\t\t\t\t\t$o = { key: {}, next: null };\n\t\t\t\t}\n\t\t\t\tlistSet($o, key, value);\n\t\t\t}\n\t\t}\n\t};\n\treturn channel;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true);\nvar $max = GetIntrinsic('%Math.max%');\n\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = null;\n\t}\n}\n\nmodule.exports = function callBind(originalFunction) {\n\tvar func = $reflectApply(bind, $call, arguments);\n\tif ($gOPD && $defineProperty) {\n\t\tvar desc = $gOPD(func, 'length');\n\t\tif (desc.configurable) {\n\t\t\t// original length, plus the receiver, minus any additional arguments (after the receiver)\n\t\t\t$defineProperty(\n\t\t\t\tfunc,\n\t\t\t\t'length',\n\t\t\t\t{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }\n\t\t\t);\n\t\t}\n\t}\n\treturn func;\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar slice = Array.prototype.slice;\nvar toStr = Object.prototype.toString;\nvar funcType = '[object Function]';\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.call(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slice.call(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n args.concat(slice.call(arguments))\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n } else {\n return target.apply(\n that,\n args.concat(slice.call(arguments))\n );\n }\n };\n\n var boundLength = Math.max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs.push('$' + i);\n }\n\n bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $SyntaxError = SyntaxError;\nvar $Function = Function;\nvar $TypeError = TypeError;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': RangeError,\n\t'%ReferenceError%': ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('has');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar test = {\n\tfoo: {}\n};\n\nvar $Object = Object;\n\nmodule.exports = function hasProto() {\n\treturn { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);\n};\n","var hasMap = typeof Map === 'function' && Map.prototype;\nvar mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;\nvar mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;\nvar mapForEach = hasMap && Map.prototype.forEach;\nvar hasSet = typeof Set === 'function' && Set.prototype;\nvar setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;\nvar setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;\nvar setForEach = hasSet && Set.prototype.forEach;\nvar hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;\nvar weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;\nvar hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;\nvar weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;\nvar hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;\nvar weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;\nvar booleanValueOf = Boolean.prototype.valueOf;\nvar objectToString = Object.prototype.toString;\nvar functionToString = Function.prototype.toString;\nvar $match = String.prototype.match;\nvar $slice = String.prototype.slice;\nvar $replace = String.prototype.replace;\nvar $toUpperCase = String.prototype.toUpperCase;\nvar $toLowerCase = String.prototype.toLowerCase;\nvar $test = RegExp.prototype.test;\nvar $concat = Array.prototype.concat;\nvar $join = Array.prototype.join;\nvar $arrSlice = Array.prototype.slice;\nvar $floor = Math.floor;\nvar bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;\nvar gOPS = Object.getOwnPropertySymbols;\nvar symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;\nvar hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';\n// ie, `has-tostringtag/shams\nvar toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')\n ? Symbol.toStringTag\n : null;\nvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\nvar gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (\n [].__proto__ === Array.prototype // eslint-disable-line no-proto\n ? function (O) {\n return O.__proto__; // eslint-disable-line no-proto\n }\n : null\n);\n\nfunction addNumericSeparator(num, str) {\n if (\n num === Infinity\n || num === -Infinity\n || num !== num\n || (num && num > -1000 && num < 1000)\n || $test.call(/e/, str)\n ) {\n return str;\n }\n var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;\n if (typeof num === 'number') {\n var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)\n if (int !== num) {\n var intStr = String(int);\n var dec = $slice.call(str, intStr.length + 1);\n return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');\n }\n }\n return $replace.call(str, sepRegex, '$&_');\n}\n\nvar utilInspect = require('./util.inspect');\nvar inspectCustom = utilInspect.custom;\nvar inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;\n\nmodule.exports = function inspect_(obj, options, depth, seen) {\n var opts = options || {};\n\n if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {\n throw new TypeError('option \"quoteStyle\" must be \"single\" or \"double\"');\n }\n if (\n has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'\n ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity\n : opts.maxStringLength !== null\n )\n ) {\n throw new TypeError('option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`');\n }\n var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;\n if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {\n throw new TypeError('option \"customInspect\", if provided, must be `true`, `false`, or `\\'symbol\\'`');\n }\n\n if (\n has(opts, 'indent')\n && opts.indent !== null\n && opts.indent !== '\\t'\n && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)\n ) {\n throw new TypeError('option \"indent\" must be \"\\\\t\", an integer > 0, or `null`');\n }\n if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {\n throw new TypeError('option \"numericSeparator\", if provided, must be `true` or `false`');\n }\n var numericSeparator = opts.numericSeparator;\n\n if (typeof obj === 'undefined') {\n return 'undefined';\n }\n if (obj === null) {\n return 'null';\n }\n if (typeof obj === 'boolean') {\n return obj ? 'true' : 'false';\n }\n\n if (typeof obj === 'string') {\n return inspectString(obj, opts);\n }\n if (typeof obj === 'number') {\n if (obj === 0) {\n return Infinity / obj > 0 ? '0' : '-0';\n }\n var str = String(obj);\n return numericSeparator ? addNumericSeparator(obj, str) : str;\n }\n if (typeof obj === 'bigint') {\n var bigIntStr = String(obj) + 'n';\n return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;\n }\n\n var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;\n if (typeof depth === 'undefined') { depth = 0; }\n if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {\n return isArray(obj) ? '[Array]' : '[Object]';\n }\n\n var indent = getIndent(opts, depth);\n\n if (typeof seen === 'undefined') {\n seen = [];\n } else if (indexOf(seen, obj) >= 0) {\n return '[Circular]';\n }\n\n function inspect(value, from, noIndent) {\n if (from) {\n seen = $arrSlice.call(seen);\n seen.push(from);\n }\n if (noIndent) {\n var newOpts = {\n depth: opts.depth\n };\n if (has(opts, 'quoteStyle')) {\n newOpts.quoteStyle = opts.quoteStyle;\n }\n return inspect_(value, newOpts, depth + 1, seen);\n }\n return inspect_(value, opts, depth + 1, seen);\n }\n\n if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable\n var name = nameOf(obj);\n var keys = arrObjKeys(obj, inspect);\n return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');\n }\n if (isSymbol(obj)) {\n var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\\(.*\\))_[^)]*$/, '$1') : symToString.call(obj);\n return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;\n }\n if (isElement(obj)) {\n var s = '<' + $toLowerCase.call(String(obj.nodeName));\n var attrs = obj.attributes || [];\n for (var i = 0; i < attrs.length; i++) {\n s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);\n }\n s += '>';\n if (obj.childNodes && obj.childNodes.length) { s += '...'; }\n s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';\n return s;\n }\n if (isArray(obj)) {\n if (obj.length === 0) { return '[]'; }\n var xs = arrObjKeys(obj, inspect);\n if (indent && !singleLineValues(xs)) {\n return '[' + indentedJoin(xs, indent) + ']';\n }\n return '[ ' + $join.call(xs, ', ') + ' ]';\n }\n if (isError(obj)) {\n var parts = arrObjKeys(obj, inspect);\n if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {\n return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';\n }\n if (parts.length === 0) { return '[' + String(obj) + ']'; }\n return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';\n }\n if (typeof obj === 'object' && customInspect) {\n if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {\n return utilInspect(obj, { depth: maxDepth - depth });\n } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {\n return obj.inspect();\n }\n }\n if (isMap(obj)) {\n var mapParts = [];\n if (mapForEach) {\n mapForEach.call(obj, function (value, key) {\n mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));\n });\n }\n return collectionOf('Map', mapSize.call(obj), mapParts, indent);\n }\n if (isSet(obj)) {\n var setParts = [];\n if (setForEach) {\n setForEach.call(obj, function (value) {\n setParts.push(inspect(value, obj));\n });\n }\n return collectionOf('Set', setSize.call(obj), setParts, indent);\n }\n if (isWeakMap(obj)) {\n return weakCollectionOf('WeakMap');\n }\n if (isWeakSet(obj)) {\n return weakCollectionOf('WeakSet');\n }\n if (isWeakRef(obj)) {\n return weakCollectionOf('WeakRef');\n }\n if (isNumber(obj)) {\n return markBoxed(inspect(Number(obj)));\n }\n if (isBigInt(obj)) {\n return markBoxed(inspect(bigIntValueOf.call(obj)));\n }\n if (isBoolean(obj)) {\n return markBoxed(booleanValueOf.call(obj));\n }\n if (isString(obj)) {\n return markBoxed(inspect(String(obj)));\n }\n if (!isDate(obj) && !isRegExp(obj)) {\n var ys = arrObjKeys(obj, inspect);\n var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;\n var protoTag = obj instanceof Object ? '' : 'null prototype';\n var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';\n var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';\n var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');\n if (ys.length === 0) { return tag + '{}'; }\n if (indent) {\n return tag + '{' + indentedJoin(ys, indent) + '}';\n }\n return tag + '{ ' + $join.call(ys, ', ') + ' }';\n }\n return String(obj);\n};\n\nfunction wrapQuotes(s, defaultStyle, opts) {\n var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '\"' : \"'\";\n return quoteChar + s + quoteChar;\n}\n\nfunction quote(s) {\n return $replace.call(String(s), /\"/g, '"');\n}\n\nfunction isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\nfunction isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }\n\n// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives\nfunction isSymbol(obj) {\n if (hasShammedSymbols) {\n return obj && typeof obj === 'object' && obj instanceof Symbol;\n }\n if (typeof obj === 'symbol') {\n return true;\n }\n if (!obj || typeof obj !== 'object' || !symToString) {\n return false;\n }\n try {\n symToString.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isBigInt(obj) {\n if (!obj || typeof obj !== 'object' || !bigIntValueOf) {\n return false;\n }\n try {\n bigIntValueOf.call(obj);\n return true;\n } catch (e) {}\n return false;\n}\n\nvar hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };\nfunction has(obj, key) {\n return hasOwn.call(obj, key);\n}\n\nfunction toStr(obj) {\n return objectToString.call(obj);\n}\n\nfunction nameOf(f) {\n if (f.name) { return f.name; }\n var m = $match.call(functionToString.call(f), /^function\\s*([\\w$]+)/);\n if (m) { return m[1]; }\n return null;\n}\n\nfunction indexOf(xs, x) {\n if (xs.indexOf) { return xs.indexOf(x); }\n for (var i = 0, l = xs.length; i < l; i++) {\n if (xs[i] === x) { return i; }\n }\n return -1;\n}\n\nfunction isMap(x) {\n if (!mapSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n mapSize.call(x);\n try {\n setSize.call(x);\n } catch (s) {\n return true;\n }\n return x instanceof Map; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakMap(x) {\n if (!weakMapHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakMapHas.call(x, weakMapHas);\n try {\n weakSetHas.call(x, weakSetHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakMap; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakRef(x) {\n if (!weakRefDeref || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakRefDeref.call(x);\n return true;\n } catch (e) {}\n return false;\n}\n\nfunction isSet(x) {\n if (!setSize || !x || typeof x !== 'object') {\n return false;\n }\n try {\n setSize.call(x);\n try {\n mapSize.call(x);\n } catch (m) {\n return true;\n }\n return x instanceof Set; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isWeakSet(x) {\n if (!weakSetHas || !x || typeof x !== 'object') {\n return false;\n }\n try {\n weakSetHas.call(x, weakSetHas);\n try {\n weakMapHas.call(x, weakMapHas);\n } catch (s) {\n return true;\n }\n return x instanceof WeakSet; // core-js workaround, pre-v2.5.0\n } catch (e) {}\n return false;\n}\n\nfunction isElement(x) {\n if (!x || typeof x !== 'object') { return false; }\n if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {\n return true;\n }\n return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';\n}\n\nfunction inspectString(str, opts) {\n if (str.length > opts.maxStringLength) {\n var remaining = str.length - opts.maxStringLength;\n var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');\n return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;\n }\n // eslint-disable-next-line no-control-regex\n var s = $replace.call($replace.call(str, /(['\\\\])/g, '\\\\$1'), /[\\x00-\\x1f]/g, lowbyte);\n return wrapQuotes(s, 'single', opts);\n}\n\nfunction lowbyte(c) {\n var n = c.charCodeAt(0);\n var x = {\n 8: 'b',\n 9: 't',\n 10: 'n',\n 12: 'f',\n 13: 'r'\n }[n];\n if (x) { return '\\\\' + x; }\n return '\\\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));\n}\n\nfunction markBoxed(str) {\n return 'Object(' + str + ')';\n}\n\nfunction weakCollectionOf(type) {\n return type + ' { ? }';\n}\n\nfunction collectionOf(type, size, entries, indent) {\n var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');\n return type + ' (' + size + ') {' + joinedEntries + '}';\n}\n\nfunction singleLineValues(xs) {\n for (var i = 0; i < xs.length; i++) {\n if (indexOf(xs[i], '\\n') >= 0) {\n return false;\n }\n }\n return true;\n}\n\nfunction getIndent(opts, depth) {\n var baseIndent;\n if (opts.indent === '\\t') {\n baseIndent = '\\t';\n } else if (typeof opts.indent === 'number' && opts.indent > 0) {\n baseIndent = $join.call(Array(opts.indent + 1), ' ');\n } else {\n return null;\n }\n return {\n base: baseIndent,\n prev: $join.call(Array(depth + 1), baseIndent)\n };\n}\n\nfunction indentedJoin(xs, indent) {\n if (xs.length === 0) { return ''; }\n var lineJoiner = '\\n' + indent.prev + indent.base;\n return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\\n' + indent.prev;\n}\n\nfunction arrObjKeys(obj, inspect) {\n var isArr = isArray(obj);\n var xs = [];\n if (isArr) {\n xs.length = obj.length;\n for (var i = 0; i < obj.length; i++) {\n xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';\n }\n }\n var syms = typeof gOPS === 'function' ? gOPS(obj) : [];\n var symMap;\n if (hasShammedSymbols) {\n symMap = {};\n for (var k = 0; k < syms.length; k++) {\n symMap['$' + syms[k]] = syms[k];\n }\n }\n\n for (var key in obj) { // eslint-disable-line no-restricted-syntax\n if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue\n if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {\n // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section\n continue; // eslint-disable-line no-restricted-syntax, no-continue\n } else if ($test.call(/[^\\w$]/, key)) {\n xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));\n } else {\n xs.push(key + ': ' + inspect(obj[key], obj));\n }\n }\n if (typeof gOPS === 'function') {\n for (var j = 0; j < syms.length; j++) {\n if (isEnumerable.call(obj, syms[j])) {\n xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));\n }\n }\n }\n return xs;\n}\n","var camel2hyphen = function (str) {\n return str\n .replace(/[A-Z]/g, function (match) {\n return '-' + match.toLowerCase();\n })\n .toLowerCase();\n};\n\nmodule.exports = camel2hyphen;","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","/**\n * This file automatically generated from `pre-publish.js`.\n * Do not manually edit.\n */\n\nmodule.exports = {\n \"area\": true,\n \"base\": true,\n \"br\": true,\n \"col\": true,\n \"embed\": true,\n \"hr\": true,\n \"img\": true,\n \"input\": true,\n \"link\": true,\n \"meta\": true,\n \"param\": true,\n \"source\": true,\n \"track\": true,\n \"wbr\": true\n};\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","/* (ignored) */","/* (ignored) */","function _interopRequireDefault(e) {\n return e && e.__esModule ? e : {\n \"default\": e\n };\n}\nmodule.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (e.includes(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","function _tagged_template_literal(strings, raw) {\n if (!raw) raw = strings.slice(0);\n\n return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } }));\n}\nexport { _tagged_template_literal as _ };\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object<any, any>} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array<boolean>}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array<any>} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object<any, any>} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object<string, any>} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array<String|Number>} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object<string, any>} params - The parameters to be converted to a FormData object.\n * @param {Object<string, any>} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array<any>} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object<string, any> | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isHeaders(header)) {\n for (const [key, value] of header.entries()) {\n setHeader(value, key, rewrite);\n }\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"<scheme>://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {\n let isRelativeUrl = !isAbsoluteURL(requestedURL);\n if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.8.3\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n // Set config.allowAbsoluteUrls\n if (config.allowAbsoluteUrls !== undefined) {\n // do nothing\n } else if (this.defaults.allowAbsoluteUrls !== undefined) {\n config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;\n } else {\n config.allowAbsoluteUrls = true;\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","import Metadata from './metadata.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport getNumberType from './helpers/getNumberType.js';\n/**\r\n * Checks if a given phone number is valid.\r\n *\r\n * isValid(phoneNumberInstance, { ..., v2: true }, metadata)\r\n *\r\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\r\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\r\n *\r\n * If the `number` is a string, it will be parsed to an object,\r\n * but only if it contains only valid phone number characters (including punctuation).\r\n * If the `number` is an object, it is used as is.\r\n *\r\n * The optional `defaultCountry` argument is the default country.\r\n * I.e. it does not restrict to just that country,\r\n * e.g. in those cases where several countries share\r\n * the same phone numbering rules (NANPA, Britain, etc).\r\n * For example, even though the number `07624 369230`\r\n * belongs to the Isle of Man (\"IM\" country code)\r\n * calling `isValidNumber('07624369230', 'GB', metadata)`\r\n * still returns `true` because the country is not restricted to `GB`,\r\n * it's just that `GB` is the default one for the phone numbering rules.\r\n * For restricting the country see `isValidNumberForRegion()`\r\n * though restricting a country might not be a good idea.\r\n * https://github.com/googlei18n/libphonenumber/blob/master/FAQ.md#when-should-i-use-isvalidnumberforregion\r\n *\r\n * Examples:\r\n *\r\n * ```js\r\n * isValidNumber('+78005553535', metadata)\r\n * isValidNumber('8005553535', 'RU', metadata)\r\n * isValidNumber('88005553535', 'RU', metadata)\r\n * isValidNumber({ phone: '8005553535', country: 'RU' }, metadata)\r\n * ```\r\n */\n\nexport default function isValidNumber(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode); // By default, countries only have type regexps when it's required for\n // distinguishing different countries having the same `countryCallingCode`.\n\n if (metadata.hasTypes()) {\n return getNumberType(input, options, metadata.metadata) !== undefined;\n } // If there are no type regexps for this country in metadata then use\n // `nationalNumberPattern` as a \"better than nothing\" replacement.\n\n\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone;\n return matchesEntirely(nationalNumber, metadata.nationalNumberPattern());\n}\n//# sourceMappingURL=isValid.js.map","import Metadata from '../metadata.js';\n/**\r\n * Returns a list of countries that the phone number could potentially belong to.\r\n * @param {string} callingCode — Calling code.\r\n * @param {string} nationalNumber — National (significant) number.\r\n * @param {object} metadata — Metadata.\r\n * @return {string[]} A list of possible countries.\r\n */\n\nexport default function getPossibleCountriesForNumber(callingCode, nationalNumber, metadata) {\n var _metadata = new Metadata(metadata);\n\n var possibleCountries = _metadata.getCountryCodesForCallingCode(callingCode);\n\n if (!possibleCountries) {\n return [];\n }\n\n return possibleCountries.filter(function (country) {\n return couldNationalNumberBelongToCountry(nationalNumber, country, metadata);\n });\n}\n\nfunction couldNationalNumberBelongToCountry(nationalNumber, country, metadata) {\n var _metadata = new Metadata(metadata);\n\n _metadata.selectNumberingPlan(country);\n\n if (_metadata.numberingPlan.possibleLengths().indexOf(nationalNumber.length) >= 0) {\n return true;\n }\n\n return false;\n}\n//# sourceMappingURL=getPossibleCountriesForNumber.js.map","import Metadata from '../metadata.js';\n/**\r\n * Pattern that makes it easy to distinguish whether a region has a single\r\n * international dialing prefix or not. If a region has a single international\r\n * prefix (e.g. 011 in USA), it will be represented as a string that contains\r\n * a sequence of ASCII digits, and possibly a tilde, which signals waiting for\r\n * the tone. If there are multiple available international prefixes in a\r\n * region, they will be represented as a regex string that always contains one\r\n * or more characters that are not ASCII digits or a tilde.\r\n */\n\nvar SINGLE_IDD_PREFIX_REG_EXP = /^[\\d]+(?:[~\\u2053\\u223C\\uFF5E][\\d]+)?$/; // For regions that have multiple IDD prefixes\n// a preferred IDD prefix is returned.\n\nexport default function getIddPrefix(country, callingCode, metadata) {\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n\n if (countryMetadata.defaultIDDPrefix()) {\n return countryMetadata.defaultIDDPrefix();\n }\n\n if (SINGLE_IDD_PREFIX_REG_EXP.test(countryMetadata.IDDPrefix())) {\n return countryMetadata.IDDPrefix();\n }\n}\n//# sourceMappingURL=getIddPrefix.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport isViablePhoneNumber from './isViablePhoneNumber.js'; // https://www.ietf.org/rfc/rfc3966.txt\n\n/**\r\n * @param {string} text - Phone URI (RFC 3966).\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\n\nexport function parseRFC3966(text) {\n var number;\n var ext; // Replace \"tel:\" with \"tel=\" for parsing convenience.\n\n text = text.replace(/^tel:/, 'tel=');\n\n for (var _iterator = _createForOfIteratorHelperLoose(text.split(';')), _step; !(_step = _iterator()).done;) {\n var part = _step.value;\n\n var _part$split = part.split('='),\n _part$split2 = _slicedToArray(_part$split, 2),\n name = _part$split2[0],\n value = _part$split2[1];\n\n switch (name) {\n case 'tel':\n number = value;\n break;\n\n case 'ext':\n ext = value;\n break;\n\n case 'phone-context':\n // Only \"country contexts\" are supported.\n // \"Domain contexts\" are ignored.\n if (value[0] === '+') {\n number = value + number;\n }\n\n break;\n }\n } // If the phone number is not viable, then abort.\n\n\n if (!isViablePhoneNumber(number)) {\n return {};\n }\n\n var result = {\n number: number\n };\n\n if (ext) {\n result.ext = ext;\n }\n\n return result;\n}\n/**\r\n * @param {object} - `{ ?number, ?extension }`.\r\n * @return {string} Phone URI (RFC 3966).\r\n */\n\nexport function formatRFC3966(_ref) {\n var number = _ref.number,\n ext = _ref.ext;\n\n if (!number) {\n return '';\n }\n\n if (number[0] !== '+') {\n throw new Error(\"\\\"formatRFC3966()\\\" expects \\\"number\\\" to be in E.164 format.\");\n }\n\n return \"tel:\".concat(number).concat(ext ? ';ext=' + ext : '');\n}\n//# sourceMappingURL=RFC3966.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js';\nimport Metadata, { getCountryCallingCode } from './metadata.js';\nimport getIddPrefix from './helpers/getIddPrefix.js';\nimport { formatRFC3966 } from './helpers/RFC3966.js';\nvar DEFAULT_OPTIONS = {\n formatExtension: function formatExtension(formattedNumber, extension, metadata) {\n return \"\".concat(formattedNumber).concat(metadata.ext()).concat(extension);\n }\n};\n/**\r\n * Formats a phone number.\r\n *\r\n * format(phoneNumberInstance, 'INTERNATIONAL', { ..., v2: true }, metadata)\r\n * format(phoneNumberInstance, 'NATIONAL', { ..., v2: true }, metadata)\r\n *\r\n * format({ phone: '8005553535', country: 'RU' }, 'INTERNATIONAL', { ... }, metadata)\r\n * format({ phone: '8005553535', country: 'RU' }, 'NATIONAL', undefined, metadata)\r\n *\r\n * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.\r\n * @param {string} format\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {string}\r\n */\n\nexport default function formatNumber(input, format, options, metadata) {\n // Apply default options.\n if (options) {\n options = _objectSpread(_objectSpread({}, DEFAULT_OPTIONS), options);\n } else {\n options = DEFAULT_OPTIONS;\n }\n\n metadata = new Metadata(metadata);\n\n if (input.country && input.country !== '001') {\n // Validate `input.country`.\n if (!metadata.hasCountry(input.country)) {\n throw new Error(\"Unknown country: \".concat(input.country));\n }\n\n metadata.country(input.country);\n } else if (input.countryCallingCode) {\n metadata.selectNumberingPlan(input.countryCallingCode);\n } else return input.phone || '';\n\n var countryCallingCode = metadata.countryCallingCode();\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone; // This variable should have been declared inside `case`s\n // but Babel has a bug and it says \"duplicate variable declaration\".\n\n var number;\n\n switch (format) {\n case 'NATIONAL':\n // Legacy argument support.\n // (`{ country: ..., phone: '' }`)\n if (!nationalNumber) {\n return '';\n }\n\n number = formatNationalNumber(nationalNumber, input.carrierCode, 'NATIONAL', metadata, options);\n return addExtension(number, input.ext, metadata, options.formatExtension);\n\n case 'INTERNATIONAL':\n // Legacy argument support.\n // (`{ country: ..., phone: '' }`)\n if (!nationalNumber) {\n return \"+\".concat(countryCallingCode);\n }\n\n number = formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata, options);\n number = \"+\".concat(countryCallingCode, \" \").concat(number);\n return addExtension(number, input.ext, metadata, options.formatExtension);\n\n case 'E.164':\n // `E.164` doesn't define \"phone number extensions\".\n return \"+\".concat(countryCallingCode).concat(nationalNumber);\n\n case 'RFC3966':\n return formatRFC3966({\n number: \"+\".concat(countryCallingCode).concat(nationalNumber),\n ext: input.ext\n });\n // For reference, here's Google's IDD formatter:\n // https://github.com/google/libphonenumber/blob/32719cf74e68796788d1ca45abc85dcdc63ba5b9/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L1546\n // Not saying that this IDD formatter replicates it 1:1, but it seems to work.\n // Who would even need to format phone numbers in IDD format anyway?\n\n case 'IDD':\n if (!options.fromCountry) {\n return; // throw new Error('`fromCountry` option not passed for IDD-prefixed formatting.')\n }\n\n var formattedNumber = formatIDD(nationalNumber, input.carrierCode, countryCallingCode, options.fromCountry, metadata);\n return addExtension(formattedNumber, input.ext, metadata, options.formatExtension);\n\n default:\n throw new Error(\"Unknown \\\"format\\\" argument passed to \\\"formatNumber()\\\": \\\"\".concat(format, \"\\\"\"));\n }\n}\n\nfunction formatNationalNumber(number, carrierCode, formatAs, metadata, options) {\n var format = chooseFormatForNumber(metadata.formats(), number);\n\n if (!format) {\n return number;\n }\n\n return formatNationalNumberUsingFormat(number, format, {\n useInternationalFormat: formatAs === 'INTERNATIONAL',\n withNationalPrefix: format.nationalPrefixIsOptionalWhenFormattingInNationalFormat() && options && options.nationalPrefix === false ? false : true,\n carrierCode: carrierCode,\n metadata: metadata\n });\n}\n\nexport function chooseFormatForNumber(availableFormats, nationalNnumber) {\n for (var _iterator = _createForOfIteratorHelperLoose(availableFormats), _step; !(_step = _iterator()).done;) {\n var format = _step.value;\n\n // Validate leading digits.\n // The test case for \"else path\" could be found by searching for\n // \"format.leadingDigitsPatterns().length === 0\".\n if (format.leadingDigitsPatterns().length > 0) {\n // The last leading_digits_pattern is used here, as it is the most detailed\n var lastLeadingDigitsPattern = format.leadingDigitsPatterns()[format.leadingDigitsPatterns().length - 1]; // If leading digits don't match then move on to the next phone number format\n\n if (nationalNnumber.search(lastLeadingDigitsPattern) !== 0) {\n continue;\n }\n } // Check that the national number matches the phone number format regular expression\n\n\n if (matchesEntirely(nationalNnumber, format.pattern())) {\n return format;\n }\n }\n}\n\nfunction addExtension(formattedNumber, ext, metadata, formatExtension) {\n return ext ? formatExtension(formattedNumber, ext, metadata) : formattedNumber;\n}\n\nfunction formatIDD(nationalNumber, carrierCode, countryCallingCode, fromCountry, metadata) {\n var fromCountryCallingCode = getCountryCallingCode(fromCountry, metadata.metadata); // When calling within the same country calling code.\n\n if (fromCountryCallingCode === countryCallingCode) {\n var formattedNumber = formatNationalNumber(nationalNumber, carrierCode, 'NATIONAL', metadata); // For NANPA regions, return the national format for these regions\n // but prefix it with the country calling code.\n\n if (countryCallingCode === '1') {\n return countryCallingCode + ' ' + formattedNumber;\n } // If regions share a country calling code, the country calling code need\n // not be dialled. This also applies when dialling within a region, so this\n // if clause covers both these cases. Technically this is the case for\n // dialling from La Reunion to other overseas departments of France (French\n // Guiana, Martinique, Guadeloupe), but not vice versa - so we don't cover\n // this edge case for now and for those cases return the version including\n // country calling code. Details here:\n // http://www.petitfute.com/voyage/225-info-pratiques-reunion\n //\n\n\n return formattedNumber;\n }\n\n var iddPrefix = getIddPrefix(fromCountry, undefined, metadata.metadata);\n\n if (iddPrefix) {\n return \"\".concat(iddPrefix, \" \").concat(countryCallingCode, \" \").concat(formatNationalNumber(nationalNumber, null, 'INTERNATIONAL', metadata));\n }\n}\n//# sourceMappingURL=format.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport Metadata from './metadata.js';\nimport isPossibleNumber from './isPossible.js';\nimport isValidNumber from './isValid.js'; // import checkNumberLength from './helpers/checkNumberLength.js'\n\nimport getNumberType from './helpers/getNumberType.js';\nimport getPossibleCountriesForNumber from './helpers/getPossibleCountriesForNumber.js';\nimport formatNumber from './format.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\nvar PhoneNumber = /*#__PURE__*/function () {\n /**\r\n * @param {string} countryOrCountryCallingCode\r\n * @param {string} nationalNumber\r\n * @param {object} metadata — Metadata JSON\r\n * @return {PhoneNumber}\r\n */\n function PhoneNumber(countryOrCountryCallingCode, nationalNumber, metadata) {\n _classCallCheck(this, PhoneNumber);\n\n if (!countryOrCountryCallingCode) {\n throw new TypeError('`country` or `countryCallingCode` not passed');\n }\n\n if (!nationalNumber) {\n throw new TypeError('`nationalNumber` not passed');\n }\n\n if (!metadata) {\n throw new TypeError('`metadata` not passed');\n }\n\n var _getCountryAndCountry = getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadata),\n country = _getCountryAndCountry.country,\n countryCallingCode = _getCountryAndCountry.countryCallingCode;\n\n this.country = country;\n this.countryCallingCode = countryCallingCode;\n this.nationalNumber = nationalNumber;\n this.number = '+' + this.countryCallingCode + this.nationalNumber; // Exclude `metadata` property output from `PhoneNumber.toString()`\n // so that it doesn't clutter the console output of Node.js.\n // Previously, when Node.js did `console.log(new PhoneNumber(...))`,\n // it would output the whole internal structure of the `metadata` object.\n\n this.getMetadata = function () {\n return metadata;\n };\n }\n\n _createClass(PhoneNumber, [{\n key: \"setExt\",\n value: function setExt(ext) {\n this.ext = ext;\n }\n }, {\n key: \"getPossibleCountries\",\n value: function getPossibleCountries() {\n if (this.country) {\n return [this.country];\n }\n\n return getPossibleCountriesForNumber(this.countryCallingCode, this.nationalNumber, this.getMetadata());\n }\n }, {\n key: \"isPossible\",\n value: function isPossible() {\n return isPossibleNumber(this, {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"isValid\",\n value: function isValid() {\n return isValidNumber(this, {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"isNonGeographic\",\n value: function isNonGeographic() {\n var metadata = new Metadata(this.getMetadata());\n return metadata.isNonGeographicCallingCode(this.countryCallingCode);\n }\n }, {\n key: \"isEqual\",\n value: function isEqual(phoneNumber) {\n return this.number === phoneNumber.number && this.ext === phoneNumber.ext;\n } // This function was originally meant to be an equivalent for `validatePhoneNumberLength()`,\n // but later it was found out that it doesn't include the possible `TOO_SHORT` result\n // returned from `parsePhoneNumberWithError()` in the original `validatePhoneNumberLength()`,\n // so eventually I simply commented out this method from the `PhoneNumber` class\n // and just left the `validatePhoneNumberLength()` function, even though that one would require\n // and additional step to also validate the actual country / calling code of the phone number.\n // validateLength() {\n // \tconst metadata = new Metadata(this.getMetadata())\n // \tmetadata.selectNumberingPlan(this.countryCallingCode)\n // \tconst result = checkNumberLength(this.nationalNumber, metadata)\n // \tif (result !== 'IS_POSSIBLE') {\n // \t\treturn result\n // \t}\n // }\n\n }, {\n key: \"getType\",\n value: function getType() {\n return getNumberType(this, {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"format\",\n value: function format(_format, options) {\n return formatNumber(this, _format, options ? _objectSpread(_objectSpread({}, options), {}, {\n v2: true\n }) : {\n v2: true\n }, this.getMetadata());\n }\n }, {\n key: \"formatNational\",\n value: function formatNational(options) {\n return this.format('NATIONAL', options);\n }\n }, {\n key: \"formatInternational\",\n value: function formatInternational(options) {\n return this.format('INTERNATIONAL', options);\n }\n }, {\n key: \"getURI\",\n value: function getURI(options) {\n return this.format('RFC3966', options);\n }\n }]);\n\n return PhoneNumber;\n}();\n\nexport { PhoneNumber as default };\n\nvar isCountryCode = function isCountryCode(value) {\n return /^[A-Z]{2}$/.test(value);\n};\n\nfunction getCountryAndCountryCallingCode(countryOrCountryCallingCode, metadataJson) {\n var country;\n var countryCallingCode;\n var metadata = new Metadata(metadataJson); // If country code is passed then derive `countryCallingCode` from it.\n // Also store the country code as `.country`.\n\n if (isCountryCode(countryOrCountryCallingCode)) {\n country = countryOrCountryCallingCode;\n metadata.selectNumberingPlan(country);\n countryCallingCode = metadata.countryCallingCode();\n } else {\n countryCallingCode = countryOrCountryCallingCode;\n /* istanbul ignore if */\n\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(countryCallingCode)) {\n country = '001';\n }\n }\n }\n\n return {\n country: country,\n countryCallingCode: countryCallingCode\n };\n}\n//# sourceMappingURL=PhoneNumber.js.map","// The minimum length of the national significant number.\nexport var MIN_LENGTH_FOR_NSN = 2; // The ITU says the maximum length should be 15,\n// but one can find longer numbers in Germany.\n\nexport var MAX_LENGTH_FOR_NSN = 17; // The maximum length of the country calling code.\n\nexport var MAX_LENGTH_COUNTRY_CODE = 3; // Digits accepted in phone numbers\n// (ascii, fullwidth, arabic-indic, and eastern arabic digits).\n\nexport var VALID_DIGITS = \"0-9\\uFF10-\\uFF19\\u0660-\\u0669\\u06F0-\\u06F9\"; // `DASHES` will be right after the opening square bracket of the \"character class\"\n\nvar DASHES = \"-\\u2010-\\u2015\\u2212\\u30FC\\uFF0D\";\nvar SLASHES = \"\\uFF0F/\";\nvar DOTS = \"\\uFF0E.\";\nexport var WHITESPACE = \" \\xA0\\xAD\\u200B\\u2060\\u3000\";\nvar BRACKETS = \"()\\uFF08\\uFF09\\uFF3B\\uFF3D\\\\[\\\\]\"; // export const OPENING_BRACKETS = '(\\uFF08\\uFF3B\\\\\\['\n\nvar TILDES = \"~\\u2053\\u223C\\uFF5E\"; // Regular expression of acceptable punctuation found in phone numbers. This\n// excludes punctuation found as a leading character only. This consists of dash\n// characters, white space characters, full stops, slashes, square brackets,\n// parentheses and tildes. Full-width variants are also present.\n\nexport var VALID_PUNCTUATION = \"\".concat(DASHES).concat(SLASHES).concat(DOTS).concat(WHITESPACE).concat(BRACKETS).concat(TILDES);\nexport var PLUS_CHARS = \"+\\uFF0B\"; // const LEADING_PLUS_CHARS_PATTERN = new RegExp('^[' + PLUS_CHARS + ']+')\n//# sourceMappingURL=constants.js.map","import Metadata from './metadata.js';\nexport default function getCountries(metadata) {\n return new Metadata(metadata).getCountries();\n}\n//# sourceMappingURL=getCountries.js.map","import { VALID_PUNCTUATION } from '../constants.js'; // Removes brackets and replaces dashes with spaces.\n//\n// E.g. \"(999) 111-22-33\" -> \"999 111 22 33\"\n//\n// For some reason Google's metadata contains `<intlFormat/>`s with brackets and dashes.\n// Meanwhile, there's no single opinion about using punctuation in international phone numbers.\n//\n// For example, Google's `<intlFormat/>` for USA is `+1 213-373-4253`.\n// And here's a quote from WikiPedia's \"North American Numbering Plan\" page:\n// https://en.wikipedia.org/wiki/North_American_Numbering_Plan\n//\n// \"The country calling code for all countries participating in the NANP is 1.\n// In international format, an NANP number should be listed as +1 301 555 01 00,\n// where 301 is an area code (Maryland).\"\n//\n// I personally prefer the international format without any punctuation.\n// For example, brackets are remnants of the old age, meaning that the\n// phone number part in brackets (so called \"area code\") can be omitted\n// if dialing within the same \"area\".\n// And hyphens were clearly introduced for splitting local numbers into memorizable groups.\n// For example, remembering \"5553535\" is difficult but \"555-35-35\" is much simpler.\n// Imagine a man taking a bus from home to work and seeing an ad with a phone number.\n// He has a couple of seconds to memorize that number until it passes by.\n// If it were spaces instead of hyphens the man wouldn't necessarily get it,\n// but with hyphens instead of spaces the grouping is more explicit.\n// I personally think that hyphens introduce visual clutter,\n// so I prefer replacing them with spaces in international numbers.\n// In the modern age all output is done on displays where spaces are clearly distinguishable\n// so hyphens can be safely replaced with spaces without losing any legibility.\n//\n\nexport default function applyInternationalSeparatorStyle(formattedNumber) {\n return formattedNumber.replace(new RegExp(\"[\".concat(VALID_PUNCTUATION, \"]+\"), 'g'), ' ').trim();\n}\n//# sourceMappingURL=applyInternationalSeparatorStyle.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n/**\r\n * Merges two arrays.\r\n * @param {*} a\r\n * @param {*} b\r\n * @return {*}\r\n */\nexport default function mergeArrays(a, b) {\n var merged = a.slice();\n\n for (var _iterator = _createForOfIteratorHelperLoose(b), _step; !(_step = _iterator()).done;) {\n var element = _step.value;\n\n if (a.indexOf(element) < 0) {\n merged.push(element);\n }\n }\n\n return merged.sort(function (a, b) {\n return a - b;\n }); // ES6 version, requires Set polyfill.\n // let merged = new Set(a)\n // for (const element of b) {\n // \tmerged.add(i)\n // }\n // return Array.from(merged).sort((a, b) => a - b)\n}\n//# sourceMappingURL=mergeArrays.js.map","import mergeArrays from './mergeArrays.js';\nexport default function checkNumberLength(nationalNumber, metadata) {\n return checkNumberLengthForType(nationalNumber, undefined, metadata);\n} // Checks whether a number is possible for the country based on its length.\n// Should only be called for the \"new\" metadata which has \"possible lengths\".\n\nexport function checkNumberLengthForType(nationalNumber, type, metadata) {\n var type_info = metadata.type(type); // There should always be \"<possiblePengths/>\" set for every type element.\n // This is declared in the XML schema.\n // For size efficiency, where a sub-description (e.g. fixed-line)\n // has the same \"<possiblePengths/>\" as the \"general description\", this is missing,\n // so we fall back to the \"general description\". Where no numbers of the type\n // exist at all, there is one possible length (-1) which is guaranteed\n // not to match the length of any real phone number.\n\n var possible_lengths = type_info && type_info.possibleLengths() || metadata.possibleLengths(); // let local_lengths = type_info && type.possibleLengthsLocal() || metadata.possibleLengthsLocal()\n // Metadata before version `1.0.18` didn't contain `possible_lengths`.\n\n if (!possible_lengths) {\n return 'IS_POSSIBLE';\n }\n\n if (type === 'FIXED_LINE_OR_MOBILE') {\n // No such country in metadata.\n\n /* istanbul ignore next */\n if (!metadata.type('FIXED_LINE')) {\n // The rare case has been encountered where no fixedLine data is available\n // (true for some non-geographic entities), so we just check mobile.\n return checkNumberLengthForType(nationalNumber, 'MOBILE', metadata);\n }\n\n var mobile_type = metadata.type('MOBILE');\n\n if (mobile_type) {\n // Merge the mobile data in if there was any. \"Concat\" creates a new\n // array, it doesn't edit possible_lengths in place, so we don't need a copy.\n // Note that when adding the possible lengths from mobile, we have\n // to again check they aren't empty since if they are this indicates\n // they are the same as the general desc and should be obtained from there.\n possible_lengths = mergeArrays(possible_lengths, mobile_type.possibleLengths()); // The current list is sorted; we need to merge in the new list and\n // re-sort (duplicates are okay). Sorting isn't so expensive because\n // the lists are very small.\n // if (local_lengths) {\n // \tlocal_lengths = mergeArrays(local_lengths, mobile_type.possibleLengthsLocal())\n // } else {\n // \tlocal_lengths = mobile_type.possibleLengthsLocal()\n // }\n }\n } // If the type doesn't exist then return 'INVALID_LENGTH'.\n else if (type && !type_info) {\n return 'INVALID_LENGTH';\n }\n\n var actual_length = nationalNumber.length; // In `libphonenumber-js` all \"local-only\" formats are dropped for simplicity.\n // // This is safe because there is never an overlap beween the possible lengths\n // // and the local-only lengths; this is checked at build time.\n // if (local_lengths && local_lengths.indexOf(nationalNumber.length) >= 0)\n // {\n // \treturn 'IS_POSSIBLE_LOCAL_ONLY'\n // }\n\n var minimum_length = possible_lengths[0];\n\n if (minimum_length === actual_length) {\n return 'IS_POSSIBLE';\n }\n\n if (minimum_length > actual_length) {\n return 'TOO_SHORT';\n }\n\n if (possible_lengths[possible_lengths.length - 1] < actual_length) {\n return 'TOO_LONG';\n } // We skip the first element since we've already checked it.\n\n\n return possible_lengths.indexOf(actual_length, 1) >= 0 ? 'IS_POSSIBLE' : 'INVALID_LENGTH';\n}\n//# sourceMappingURL=checkNumberLength.js.map","import stripIddPrefix from './stripIddPrefix.js';\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js';\nimport Metadata from '../metadata.js';\nimport { MAX_LENGTH_COUNTRY_CODE } from '../constants.js';\n/**\r\n * Converts a phone number digits (possibly with a `+`)\r\n * into a calling code and the rest phone number digits.\r\n * The \"rest phone number digits\" could include\r\n * a national prefix, carrier code, and national\r\n * (significant) number.\r\n * @param {string} number — Phone number digits (possibly with a `+`).\r\n * @param {string} [country] — Default country.\r\n * @param {string} [callingCode] — Default calling code (some phone numbering plans are non-geographic).\r\n * @param {object} metadata\r\n * @return {object} `{ countryCallingCodeSource: string?, countryCallingCode: string?, number: string }`\r\n * @example\r\n * // Returns `{ countryCallingCode: \"1\", number: \"2133734253\" }`.\r\n * extractCountryCallingCode('2133734253', 'US', null, metadata)\r\n * extractCountryCallingCode('2133734253', null, '1', metadata)\r\n * extractCountryCallingCode('+12133734253', null, null, metadata)\r\n * extractCountryCallingCode('+12133734253', 'RU', null, metadata)\r\n */\n\nexport default function extractCountryCallingCode(number, country, callingCode, metadata) {\n if (!number) {\n return {};\n }\n\n var isNumberWithIddPrefix; // If this is not an international phone number,\n // then either extract an \"IDD\" prefix, or extract a\n // country calling code from a number by autocorrecting it\n // by prepending a leading `+` in cases when it starts\n // with the country calling code.\n // https://wikitravel.org/en/International_dialling_prefix\n // https://github.com/catamphetamine/libphonenumber-js/issues/376\n\n if (number[0] !== '+') {\n // Convert an \"out-of-country\" dialing phone number\n // to a proper international phone number.\n var numberWithoutIDD = stripIddPrefix(number, country, callingCode, metadata); // If an IDD prefix was stripped then\n // convert the number to international one\n // for subsequent parsing.\n\n if (numberWithoutIDD && numberWithoutIDD !== number) {\n isNumberWithIddPrefix = true;\n number = '+' + numberWithoutIDD;\n } else {\n // Check to see if the number starts with the country calling code\n // for the default country. If so, we remove the country calling code,\n // and do some checks on the validity of the number before and after.\n // https://github.com/catamphetamine/libphonenumber-js/issues/376\n if (country || callingCode) {\n var _extractCountryCallin = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata),\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n shorterNumber = _extractCountryCallin.number;\n\n if (countryCallingCode) {\n return {\n countryCallingCodeSource: 'FROM_NUMBER_WITHOUT_PLUS_SIGN',\n countryCallingCode: countryCallingCode,\n number: shorterNumber\n };\n }\n }\n\n return {\n // No need to set it to `UNSPECIFIED`. It can be just `undefined`.\n // countryCallingCodeSource: 'UNSPECIFIED',\n number: number\n };\n }\n } // Fast abortion: country codes do not begin with a '0'\n\n\n if (number[1] === '0') {\n return {};\n }\n\n metadata = new Metadata(metadata); // The thing with country phone codes\n // is that they are orthogonal to each other\n // i.e. there's no such country phone code A\n // for which country phone code B exists\n // where B starts with A.\n // Therefore, while scanning digits,\n // if a valid country code is found,\n // that means that it is the country code.\n //\n\n var i = 2;\n\n while (i - 1 <= MAX_LENGTH_COUNTRY_CODE && i <= number.length) {\n var _countryCallingCode = number.slice(1, i);\n\n if (metadata.hasCallingCode(_countryCallingCode)) {\n metadata.selectNumberingPlan(_countryCallingCode);\n return {\n countryCallingCodeSource: isNumberWithIddPrefix ? 'FROM_NUMBER_WITH_IDD' : 'FROM_NUMBER_WITH_PLUS_SIGN',\n countryCallingCode: _countryCallingCode,\n number: number.slice(i)\n };\n }\n\n i++;\n }\n\n return {};\n} // The possible values for the returned `countryCallingCodeSource` are:\n//\n// Copy-pasted from:\n// https://github.com/google/libphonenumber/blob/master/resources/phonenumber.proto\n//\n// // The source from which the country_code is derived. This is not set in the\n// // general parsing method, but in the method that parses and keeps raw_input.\n// // New fields could be added upon request.\n// enum CountryCodeSource {\n// // Default value returned if this is not set, because the phone number was\n// // created using parse, not parseAndKeepRawInput. hasCountryCodeSource will\n// // return false if this is the case.\n// UNSPECIFIED = 0;\n//\n// // The country_code is derived based on a phone number with a leading \"+\",\n// // e.g. the French number \"+33 1 42 68 53 00\".\n// FROM_NUMBER_WITH_PLUS_SIGN = 1;\n//\n// // The country_code is derived based on a phone number with a leading IDD,\n// // e.g. the French number \"011 33 1 42 68 53 00\", as it is dialled from US.\n// FROM_NUMBER_WITH_IDD = 5;\n//\n// // The country_code is derived based on a phone number without a leading\n// // \"+\", e.g. the French number \"33 1 42 68 53 00\" when defaultCountry is\n// // supplied as France.\n// FROM_NUMBER_WITHOUT_PLUS_SIGN = 10;\n//\n// // The country_code is derived NOT based on the phone number itself, but\n// // from the defaultCountry parameter provided in the parsing function by the\n// // clients. This happens mostly for numbers written in the national format\n// // (without country code). For example, this would be set when parsing the\n// // French number \"01 42 68 53 00\", when defaultCountry is supplied as\n// // France.\n// FROM_DEFAULT_COUNTRY = 20;\n// }\n//# sourceMappingURL=extractCountryCallingCode.js.map","import Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nimport extractNationalNumber from './extractNationalNumber.js';\nimport checkNumberLength from './checkNumberLength.js';\nimport getCountryCallingCode from '../getCountryCallingCode.js';\n/**\r\n * Sometimes some people incorrectly input international phone numbers\r\n * without the leading `+`. This function corrects such input.\r\n * @param {string} number — Phone number digits.\r\n * @param {string?} country\r\n * @param {string?} callingCode\r\n * @param {object} metadata\r\n * @return {object} `{ countryCallingCode: string?, number: string }`.\r\n */\n\nexport default function extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(number, country, callingCode, metadata) {\n var countryCallingCode = country ? getCountryCallingCode(country, metadata) : callingCode;\n\n if (number.indexOf(countryCallingCode) === 0) {\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(country, callingCode);\n var possibleShorterNumber = number.slice(countryCallingCode.length);\n\n var _extractNationalNumbe = extractNationalNumber(possibleShorterNumber, metadata),\n possibleShorterNationalNumber = _extractNationalNumbe.nationalNumber;\n\n var _extractNationalNumbe2 = extractNationalNumber(number, metadata),\n nationalNumber = _extractNationalNumbe2.nationalNumber; // If the number was not valid before but is valid now,\n // or if it was too long before, we consider the number\n // with the country calling code stripped to be a better result\n // and keep that instead.\n // For example, in Germany (+49), `49` is a valid area code,\n // so if a number starts with `49`, it could be both a valid\n // national German number or an international number without\n // a leading `+`.\n\n\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) && matchesEntirely(possibleShorterNationalNumber, metadata.nationalNumberPattern()) || checkNumberLength(nationalNumber, metadata) === 'TOO_LONG') {\n return {\n countryCallingCode: countryCallingCode,\n number: possibleShorterNumber\n };\n }\n }\n\n return {\n number: number\n };\n}\n//# sourceMappingURL=extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js.map","import extractNationalNumberFromPossiblyIncompleteNumber from './extractNationalNumberFromPossiblyIncompleteNumber.js';\nimport matchesEntirely from './matchesEntirely.js';\nimport checkNumberLength from './checkNumberLength.js';\n/**\r\n * Strips national prefix and carrier code from a complete phone number.\r\n * The difference from the non-\"FromCompleteNumber\" function is that\r\n * it won't extract national prefix if the resultant number is too short\r\n * to be a complete number for the selected phone numbering plan.\r\n * @param {string} number — Complete phone number digits.\r\n * @param {Metadata} metadata — Metadata with a phone numbering plan selected.\r\n * @return {object} `{ nationalNumber: string, carrierCode: string? }`.\r\n */\n\nexport default function extractNationalNumber(number, metadata) {\n // Parsing national prefixes and carrier codes\n // is only required for local phone numbers\n // but some people don't understand that\n // and sometimes write international phone numbers\n // with national prefixes (or maybe even carrier codes).\n // http://ucken.blogspot.ru/2016/03/trunk-prefixes-in-skype4b.html\n // Google's original library forgives such mistakes\n // and so does this library, because it has been requested:\n // https://github.com/catamphetamine/libphonenumber-js/issues/127\n var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(number, metadata),\n carrierCode = _extractNationalNumbe.carrierCode,\n nationalNumber = _extractNationalNumbe.nationalNumber;\n\n if (nationalNumber !== number) {\n if (!shouldHaveExtractedNationalPrefix(number, nationalNumber, metadata)) {\n // Don't strip the national prefix.\n return {\n nationalNumber: number\n };\n } // Check the national (significant) number length after extracting national prefix and carrier code.\n // Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature.\n\n\n if (metadata.possibleLengths()) {\n // The number remaining after stripping the national prefix and carrier code\n // should be long enough to have a possible length for the country.\n // Otherwise, don't strip the national prefix and carrier code,\n // since the original number could be a valid number.\n // This check has been copy-pasted \"as is\" from Google's original library:\n // https://github.com/google/libphonenumber/blob/876268eb1ad6cdc1b7b5bef17fc5e43052702d57/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L3236-L3250\n // It doesn't check for the \"possibility\" of the original `number`.\n // I guess it's fine not checking that one. It works as is anyway.\n if (!isPossibleIncompleteNationalNumber(nationalNumber, metadata)) {\n // Don't strip the national prefix.\n return {\n nationalNumber: number\n };\n }\n }\n }\n\n return {\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n} // In some countries, the same digit could be a national prefix\n// or a leading digit of a valid phone number.\n// For example, in Russia, national prefix is `8`,\n// and also `800 555 35 35` is a valid number\n// in which `8` is not a national prefix, but the first digit\n// of a national (significant) number.\n// Same's with Belarus:\n// `82004910060` is a valid national (significant) number,\n// but `2004910060` is not.\n// To support such cases (to prevent the code from always stripping\n// national prefix), a condition is imposed: a national prefix\n// is not extracted when the original number is \"viable\" and the\n// resultant number is not, a \"viable\" national number being the one\n// that matches `national_number_pattern`.\n\nfunction shouldHaveExtractedNationalPrefix(nationalNumberBefore, nationalNumberAfter, metadata) {\n // The equivalent in Google's code is:\n // https://github.com/google/libphonenumber/blob/e326fa1fc4283bb05eb35cb3c15c18f98a31af33/java/libphonenumber/src/com/google/i18n/phonenumbers/PhoneNumberUtil.java#L2969-L3004\n if (matchesEntirely(nationalNumberBefore, metadata.nationalNumberPattern()) && !matchesEntirely(nationalNumberAfter, metadata.nationalNumberPattern())) {\n return false;\n } // This \"is possible\" national number (length) check has been commented out\n // because it's superceded by the (effectively) same check done in the\n // `extractNationalNumber()` function after it calls `shouldHaveExtractedNationalPrefix()`.\n // In other words, why run the same check twice if it could only be run once.\n // // Check the national (significant) number length after extracting national prefix and carrier code.\n // // Fixes a minor \"weird behavior\" bug: https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/57\n // // (Legacy generated metadata (before `1.0.18`) didn't support the \"possible lengths\" feature).\n // if (metadata.possibleLengths()) {\n // \tif (isPossibleIncompleteNationalNumber(nationalNumberBefore, metadata) &&\n // \t\t!isPossibleIncompleteNationalNumber(nationalNumberAfter, metadata)) {\n // \t\treturn false\n // \t}\n // }\n\n\n return true;\n}\n\nfunction isPossibleIncompleteNationalNumber(nationalNumber, metadata) {\n switch (checkNumberLength(nationalNumber, metadata)) {\n case 'TOO_SHORT':\n case 'INVALID_LENGTH':\n // This library ignores \"local-only\" phone numbers (for simplicity).\n // See the readme for more info on what are \"local-only\" phone numbers.\n // case 'IS_POSSIBLE_LOCAL_ONLY':\n return false;\n\n default:\n return true;\n }\n}\n//# sourceMappingURL=extractNationalNumber.js.map","/**\r\n * Strips any national prefix (such as 0, 1) present in a\r\n * (possibly incomplete) number provided.\r\n * \"Carrier codes\" are only used in Colombia and Brazil,\r\n * and only when dialing within those countries from a mobile phone to a fixed line number.\r\n * Sometimes it won't actually strip national prefix\r\n * and will instead prepend some digits to the `number`:\r\n * for example, when number `2345678` is passed with `VI` country selected,\r\n * it will return `{ number: \"3402345678\" }`, because `340` area code is prepended.\r\n * @param {string} number — National number digits.\r\n * @param {object} metadata — Metadata with country selected.\r\n * @return {object} `{ nationalNumber: string, nationalPrefix: string? carrierCode: string? }`. Even if a national prefix was extracted, it's not necessarily present in the returned object, so don't rely on its presence in the returned object in order to find out whether a national prefix has been extracted or not.\r\n */\nexport default function extractNationalNumberFromPossiblyIncompleteNumber(number, metadata) {\n if (number && metadata.numberingPlan.nationalPrefixForParsing()) {\n // See METADATA.md for the description of\n // `national_prefix_for_parsing` and `national_prefix_transform_rule`.\n // Attempt to parse the first digits as a national prefix.\n var prefixPattern = new RegExp('^(?:' + metadata.numberingPlan.nationalPrefixForParsing() + ')');\n var prefixMatch = prefixPattern.exec(number);\n\n if (prefixMatch) {\n var nationalNumber;\n var carrierCode; // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n // If a `national_prefix_for_parsing` has any \"capturing groups\"\n // then it means that the national (significant) number is equal to\n // those \"capturing groups\" transformed via `national_prefix_transform_rule`,\n // and nothing could be said about the actual national prefix:\n // what is it and was it even there.\n // If a `national_prefix_for_parsing` doesn't have any \"capturing groups\",\n // then everything it matches is a national prefix.\n // To determine whether `national_prefix_for_parsing` matched any\n // \"capturing groups\", the value of the result of calling `.exec()`\n // is looked at, and if it has non-undefined values where there're\n // \"capturing groups\" in the regular expression, then it means\n // that \"capturing groups\" have been matched.\n // It's not possible to tell whether there'll be any \"capturing gropus\"\n // before the matching process, because a `national_prefix_for_parsing`\n // could exhibit both behaviors.\n\n var capturedGroupsCount = prefixMatch.length - 1;\n var hasCapturedGroups = capturedGroupsCount > 0 && prefixMatch[capturedGroupsCount];\n\n if (metadata.nationalPrefixTransformRule() && hasCapturedGroups) {\n nationalNumber = number.replace(prefixPattern, metadata.nationalPrefixTransformRule()); // If there's more than one captured group,\n // then carrier code is the second one.\n\n if (capturedGroupsCount > 1) {\n carrierCode = prefixMatch[1];\n }\n } // If there're no \"capturing groups\",\n // or if there're \"capturing groups\" but no\n // `national_prefix_transform_rule`,\n // then just strip the national prefix from the number,\n // and possibly a carrier code.\n // Seems like there could be more.\n else {\n // `prefixBeforeNationalNumber` is the whole substring matched by\n // the `national_prefix_for_parsing` regular expression.\n // There seem to be no guarantees that it's just a national prefix.\n // For example, if there's a carrier code, it's gonna be a\n // part of `prefixBeforeNationalNumber` too.\n var prefixBeforeNationalNumber = prefixMatch[0];\n nationalNumber = number.slice(prefixBeforeNationalNumber.length); // If there's at least one captured group,\n // then carrier code is the first one.\n\n if (hasCapturedGroups) {\n carrierCode = prefixMatch[1];\n }\n } // Tries to guess whether a national prefix was present in the input.\n // This is not something copy-pasted from Google's library:\n // they don't seem to have an equivalent for that.\n // So this isn't an \"officially approved\" way of doing something like that.\n // But since there seems no other existing method, this library uses it.\n\n\n var nationalPrefix;\n\n if (hasCapturedGroups) {\n var possiblePositionOfTheFirstCapturedGroup = number.indexOf(prefixMatch[1]);\n var possibleNationalPrefix = number.slice(0, possiblePositionOfTheFirstCapturedGroup); // Example: an Argentinian (AR) phone number `0111523456789`.\n // `prefixMatch[0]` is `01115`, and `$1` is `11`,\n // and the rest of the phone number is `23456789`.\n // The national number is transformed via `9$1` to `91123456789`.\n // National prefix `0` is detected being present at the start.\n // if (possibleNationalPrefix.indexOf(metadata.numberingPlan.nationalPrefix()) === 0) {\n\n if (possibleNationalPrefix === metadata.numberingPlan.nationalPrefix()) {\n nationalPrefix = metadata.numberingPlan.nationalPrefix();\n }\n } else {\n nationalPrefix = prefixMatch[0];\n }\n\n return {\n nationalNumber: nationalNumber,\n nationalPrefix: nationalPrefix,\n carrierCode: carrierCode\n };\n }\n }\n\n return {\n nationalNumber: number\n };\n}\n//# sourceMappingURL=extractNationalNumberFromPossiblyIncompleteNumber.js.map","import applyInternationalSeparatorStyle from './applyInternationalSeparatorStyle.js'; // This was originally set to $1 but there are some countries for which the\n// first group is not used in the national pattern (e.g. Argentina) so the $1\n// group does not match correctly. Therefore, we use `\\d`, so that the first\n// group actually used in the pattern will be matched.\n\nexport var FIRST_GROUP_PATTERN = /(\\$\\d)/;\nexport default function formatNationalNumberUsingFormat(number, format, _ref) {\n var useInternationalFormat = _ref.useInternationalFormat,\n withNationalPrefix = _ref.withNationalPrefix,\n carrierCode = _ref.carrierCode,\n metadata = _ref.metadata;\n var formattedNumber = number.replace(new RegExp(format.pattern()), useInternationalFormat ? format.internationalFormat() : // This library doesn't use `domestic_carrier_code_formatting_rule`,\n // because that one is only used when formatting phone numbers\n // for dialing from a mobile phone, and this is not a dialing library.\n // carrierCode && format.domesticCarrierCodeFormattingRule()\n // \t// First, replace the $CC in the formatting rule with the desired carrier code.\n // \t// Then, replace the $FG in the formatting rule with the first group\n // \t// and the carrier code combined in the appropriate way.\n // \t? format.format().replace(FIRST_GROUP_PATTERN, format.domesticCarrierCodeFormattingRule().replace('$CC', carrierCode))\n // \t: (\n // \t\twithNationalPrefix && format.nationalPrefixFormattingRule()\n // \t\t\t? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule())\n // \t\t\t: format.format()\n // \t)\n withNationalPrefix && format.nationalPrefixFormattingRule() ? format.format().replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()) : format.format());\n\n if (useInternationalFormat) {\n return applyInternationalSeparatorStyle(formattedNumber);\n }\n\n return formattedNumber;\n}\n//# sourceMappingURL=formatNationalNumberUsingFormat.js.map","import getCountryByNationalNumber from './getCountryByNationalNumber.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\nexport default function getCountryByCallingCode(callingCode, _ref) {\n var nationalPhoneNumber = _ref.nationalNumber,\n defaultCountry = _ref.defaultCountry,\n metadata = _ref.metadata;\n\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(callingCode)) {\n return '001';\n }\n }\n\n var possibleCountries = metadata.getCountryCodesForCallingCode(callingCode);\n\n if (!possibleCountries) {\n return;\n } // If there's just one country corresponding to the country code,\n // then just return it, without further phone number digits validation.\n\n\n if (possibleCountries.length === 1) {\n return possibleCountries[0];\n }\n\n return getCountryByNationalNumber(nationalPhoneNumber, {\n countries: possibleCountries,\n defaultCountry: defaultCountry,\n metadata: metadata.metadata\n });\n}\n//# sourceMappingURL=getCountryByCallingCode.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport Metadata from '../metadata.js';\nimport getNumberType from './getNumberType.js';\nexport default function getCountryByNationalNumber(nationalPhoneNumber, _ref) {\n var countries = _ref.countries,\n defaultCountry = _ref.defaultCountry,\n metadata = _ref.metadata;\n // Re-create `metadata` because it will be selecting a `country`.\n metadata = new Metadata(metadata);\n var matchingCountries = [];\n\n for (var _iterator = _createForOfIteratorHelperLoose(countries), _step; !(_step = _iterator()).done;) {\n var country = _step.value;\n metadata.country(country); // \"Leading digits\" patterns are only defined for about 20% of all countries.\n // By definition, matching \"leading digits\" is a sufficient but not a necessary\n // condition for a phone number to belong to a country.\n // The point of \"leading digits\" check is that it's the fastest one to get a match.\n // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n // I'd suppose that \"leading digits\" patterns are mutually exclusive for different countries\n // because of the intended use of that feature.\n\n if (metadata.leadingDigits()) {\n if (nationalPhoneNumber && nationalPhoneNumber.search(metadata.leadingDigits()) === 0) {\n return country;\n }\n } // Else perform full validation with all of those\n // fixed-line/mobile/etc regular expressions.\n else if (getNumberType({\n phone: nationalPhoneNumber,\n country: country\n }, undefined, metadata.metadata)) {\n // If the `defaultCountry` is among the `matchingCountries` then return it.\n if (defaultCountry) {\n if (country === defaultCountry) {\n return country;\n }\n\n matchingCountries.push(country);\n } else {\n return country;\n }\n }\n } // Return the first (\"main\") one of the `matchingCountries`.\n\n\n if (matchingCountries.length > 0) {\n return matchingCountries[0];\n }\n}\n//# sourceMappingURL=getCountryByNationalNumber.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport Metadata from '../metadata.js';\nimport matchesEntirely from './matchesEntirely.js';\nvar NON_FIXED_LINE_PHONE_TYPES = ['MOBILE', 'PREMIUM_RATE', 'TOLL_FREE', 'SHARED_COST', 'VOIP', 'PERSONAL_NUMBER', 'PAGER', 'UAN', 'VOICEMAIL']; // Finds out national phone number type (fixed line, mobile, etc)\n\nexport default function getNumberType(input, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {}; // When `parse()` returns an empty object — `{}` —\n // that means that the phone number is malformed,\n // so it can't possibly be valid.\n\n if (!input.country && !input.countryCallingCode) {\n return;\n }\n\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(input.country, input.countryCallingCode);\n var nationalNumber = options.v2 ? input.nationalNumber : input.phone; // The following is copy-pasted from the original function:\n // https://github.com/googlei18n/libphonenumber/blob/3ea547d4fbaa2d0b67588904dfa5d3f2557c27ff/javascript/i18n/phonenumbers/phonenumberutil.js#L2835\n // Is this national number even valid for this country\n\n if (!matchesEntirely(nationalNumber, metadata.nationalNumberPattern())) {\n return;\n } // Is it fixed line number\n\n\n if (isNumberTypeEqualTo(nationalNumber, 'FIXED_LINE', metadata)) {\n // Because duplicate regular expressions are removed\n // to reduce metadata size, if \"mobile\" pattern is \"\"\n // then it means it was removed due to being a duplicate of the fixed-line pattern.\n //\n if (metadata.type('MOBILE') && metadata.type('MOBILE').pattern() === '') {\n return 'FIXED_LINE_OR_MOBILE';\n } // `MOBILE` type pattern isn't included if it matched `FIXED_LINE` one.\n // For example, for \"US\" country.\n // Old metadata (< `1.0.18`) had a specific \"types\" data structure\n // that happened to be `undefined` for `MOBILE` in that case.\n // Newer metadata (>= `1.0.18`) has another data structure that is\n // not `undefined` for `MOBILE` in that case (it's just an empty array).\n // So this `if` is just for backwards compatibility with old metadata.\n\n\n if (!metadata.type('MOBILE')) {\n return 'FIXED_LINE_OR_MOBILE';\n } // Check if the number happens to qualify as both fixed line and mobile.\n // (no such country in the minimal metadata set)\n\n /* istanbul ignore if */\n\n\n if (isNumberTypeEqualTo(nationalNumber, 'MOBILE', metadata)) {\n return 'FIXED_LINE_OR_MOBILE';\n }\n\n return 'FIXED_LINE';\n }\n\n for (var _iterator = _createForOfIteratorHelperLoose(NON_FIXED_LINE_PHONE_TYPES), _step; !(_step = _iterator()).done;) {\n var type = _step.value;\n\n if (isNumberTypeEqualTo(nationalNumber, type, metadata)) {\n return type;\n }\n }\n}\nexport function isNumberTypeEqualTo(nationalNumber, type, metadata) {\n type = metadata.type(type);\n\n if (!type || !type.pattern()) {\n return false;\n } // Check if any possible number lengths are present;\n // if so, we use them to avoid checking\n // the validation pattern if they don't match.\n // If they are absent, this means they match\n // the general description, which we have\n // already checked before a specific number type.\n\n\n if (type.possibleLengths() && type.possibleLengths().indexOf(nationalNumber.length) < 0) {\n return false;\n }\n\n return matchesEntirely(nationalNumber, type.pattern());\n}\n//# sourceMappingURL=getNumberType.js.map","var objectConstructor = {}.constructor;\nexport default function isObject(object) {\n return object !== undefined && object !== null && object.constructor === objectConstructor;\n}\n//# sourceMappingURL=isObject.js.map","/**\r\n * Checks whether the entire input sequence can be matched\r\n * against the regular expression.\r\n * @return {boolean}\r\n */\nexport default function matchesEntirely(text, regular_expression) {\n // If assigning the `''` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n text = text || '';\n return new RegExp('^(?:' + regular_expression + ')$').test(text);\n}\n//# sourceMappingURL=matchesEntirely.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n// These mappings map a character (key) to a specific digit that should\n// replace it for normalization purposes. Non-European digits that\n// may be used in phone numbers are mapped to a European equivalent.\n//\n// E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\n//\nexport var DIGITS = {\n '0': '0',\n '1': '1',\n '2': '2',\n '3': '3',\n '4': '4',\n '5': '5',\n '6': '6',\n '7': '7',\n '8': '8',\n '9': '9',\n \"\\uFF10\": '0',\n // Fullwidth digit 0\n \"\\uFF11\": '1',\n // Fullwidth digit 1\n \"\\uFF12\": '2',\n // Fullwidth digit 2\n \"\\uFF13\": '3',\n // Fullwidth digit 3\n \"\\uFF14\": '4',\n // Fullwidth digit 4\n \"\\uFF15\": '5',\n // Fullwidth digit 5\n \"\\uFF16\": '6',\n // Fullwidth digit 6\n \"\\uFF17\": '7',\n // Fullwidth digit 7\n \"\\uFF18\": '8',\n // Fullwidth digit 8\n \"\\uFF19\": '9',\n // Fullwidth digit 9\n \"\\u0660\": '0',\n // Arabic-indic digit 0\n \"\\u0661\": '1',\n // Arabic-indic digit 1\n \"\\u0662\": '2',\n // Arabic-indic digit 2\n \"\\u0663\": '3',\n // Arabic-indic digit 3\n \"\\u0664\": '4',\n // Arabic-indic digit 4\n \"\\u0665\": '5',\n // Arabic-indic digit 5\n \"\\u0666\": '6',\n // Arabic-indic digit 6\n \"\\u0667\": '7',\n // Arabic-indic digit 7\n \"\\u0668\": '8',\n // Arabic-indic digit 8\n \"\\u0669\": '9',\n // Arabic-indic digit 9\n \"\\u06F0\": '0',\n // Eastern-Arabic digit 0\n \"\\u06F1\": '1',\n // Eastern-Arabic digit 1\n \"\\u06F2\": '2',\n // Eastern-Arabic digit 2\n \"\\u06F3\": '3',\n // Eastern-Arabic digit 3\n \"\\u06F4\": '4',\n // Eastern-Arabic digit 4\n \"\\u06F5\": '5',\n // Eastern-Arabic digit 5\n \"\\u06F6\": '6',\n // Eastern-Arabic digit 6\n \"\\u06F7\": '7',\n // Eastern-Arabic digit 7\n \"\\u06F8\": '8',\n // Eastern-Arabic digit 8\n \"\\u06F9\": '9' // Eastern-Arabic digit 9\n\n};\nexport function parseDigit(character) {\n return DIGITS[character];\n}\n/**\r\n * Parses phone number digits from a string.\r\n * Drops all punctuation leaving only digits.\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * parseDigits('8 (800) 555')\r\n * // Outputs '8800555'.\r\n * ```\r\n */\n\nexport default function parseDigits(string) {\n var result = ''; // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n var digit = parseDigit(character);\n\n if (digit) {\n result += digit;\n }\n }\n\n return result;\n}\n//# sourceMappingURL=parseDigits.js.map","import Metadata from '../metadata.js';\nimport { VALID_DIGITS } from '../constants.js';\nvar CAPTURING_DIGIT_PATTERN = new RegExp('([' + VALID_DIGITS + '])');\nexport default function stripIddPrefix(number, country, callingCode, metadata) {\n if (!country) {\n return;\n } // Check if the number is IDD-prefixed.\n\n\n var countryMetadata = new Metadata(metadata);\n countryMetadata.selectNumberingPlan(country, callingCode);\n var IDDPrefixPattern = new RegExp(countryMetadata.IDDPrefix());\n\n if (number.search(IDDPrefixPattern) !== 0) {\n return;\n } // Strip IDD prefix.\n\n\n number = number.slice(number.match(IDDPrefixPattern)[0].length); // If there're any digits after an IDD prefix,\n // then those digits are a country calling code.\n // Since no country code starts with a `0`,\n // the code below validates that the next digit (if present) is not `0`.\n\n var matchedGroups = number.match(CAPTURING_DIGIT_PATTERN);\n\n if (matchedGroups && matchedGroups[1] != null && matchedGroups[1].length > 0) {\n if (matchedGroups[1] === '0') {\n return;\n }\n }\n\n return number;\n}\n//# sourceMappingURL=stripIddPrefix.js.map","import Metadata from './metadata.js';\nimport checkNumberLength from './helpers/checkNumberLength.js';\n/**\r\n * Checks if a phone number is \"possible\" (basically just checks its length).\r\n *\r\n * isPossible(phoneNumberInstance, { ..., v2: true }, metadata)\r\n *\r\n * isPossible({ phone: '8005553535', country: 'RU' }, { ... }, metadata)\r\n * isPossible({ phone: '8005553535', country: 'RU' }, undefined, metadata)\r\n *\r\n * @param {object|PhoneNumber} input — If `options.v2: true` flag is passed, the `input` should be a `PhoneNumber` instance. Otherwise, it should be an object of shape `{ phone: '...', country: '...' }`.\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {string}\r\n */\n\nexport default function isPossiblePhoneNumber(input, options, metadata) {\n /* istanbul ignore if */\n if (options === undefined) {\n options = {};\n }\n\n metadata = new Metadata(metadata);\n\n if (options.v2) {\n if (!input.countryCallingCode) {\n throw new Error('Invalid phone number object passed');\n }\n\n metadata.selectNumberingPlan(input.countryCallingCode);\n } else {\n if (!input.phone) {\n return false;\n }\n\n if (input.country) {\n if (!metadata.hasCountry(input.country)) {\n throw new Error(\"Unknown country: \".concat(input.country));\n }\n\n metadata.country(input.country);\n } else {\n if (!input.countryCallingCode) {\n throw new Error('Invalid phone number object passed');\n }\n\n metadata.selectNumberingPlan(input.countryCallingCode);\n }\n } // Old metadata (< 1.0.18) had no \"possible length\" data.\n\n\n if (metadata.possibleLengths()) {\n return isPossibleNumber(input.phone || input.nationalNumber, metadata);\n } else {\n // There was a bug between `1.7.35` and `1.7.37` where \"possible_lengths\"\n // were missing for \"non-geographical\" numbering plans.\n // Just assume the number is possible in such cases:\n // it's unlikely that anyone generated their custom metadata\n // in that short period of time (one day).\n // This code can be removed in some future major version update.\n if (input.countryCallingCode && metadata.isNonGeographicCallingCode(input.countryCallingCode)) {\n // \"Non-geographic entities\" did't have `possibleLengths`\n // due to a bug in metadata generation process.\n return true;\n } else {\n throw new Error('Missing \"possibleLengths\" in metadata. Perhaps the metadata has been generated before v1.0.18.');\n }\n }\n}\nexport function isPossibleNumber(nationalNumber, metadata) {\n //, isInternational) {\n switch (checkNumberLength(nationalNumber, metadata)) {\n case 'IS_POSSIBLE':\n return true;\n // This library ignores \"local-only\" phone numbers (for simplicity).\n // See the readme for more info on what are \"local-only\" phone numbers.\n // case 'IS_POSSIBLE_LOCAL_ONLY':\n // \treturn !isInternational\n\n default:\n return false;\n }\n}\n//# sourceMappingURL=isPossible.js.map","// Copy-pasted from:\n// https://github.com/substack/semver-compare/blob/master/index.js\n//\n// Inlining this function because some users reported issues with\n// importing from `semver-compare` in a browser with ES6 \"native\" modules.\n//\n// Fixes `semver-compare` not being able to compare versions with alpha/beta/etc \"tags\".\n// https://github.com/catamphetamine/libphonenumber-js/issues/381\nexport default function (a, b) {\n a = a.split('-');\n b = b.split('-');\n var pa = a[0].split('.');\n var pb = b[0].split('.');\n\n for (var i = 0; i < 3; i++) {\n var na = Number(pa[i]);\n var nb = Number(pb[i]);\n if (na > nb) return 1;\n if (nb > na) return -1;\n if (!isNaN(na) && isNaN(nb)) return 1;\n if (isNaN(na) && !isNaN(nb)) return -1;\n }\n\n if (a[1] && b[1]) {\n return a[1] > b[1] ? 1 : a[1] < b[1] ? -1 : 0;\n }\n\n return !a[1] && b[1] ? 1 : a[1] && !b[1] ? -1 : 0;\n}\n//# sourceMappingURL=semver-compare.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport compare from './tools/semver-compare.js';\nimport isObject from './helpers/isObject.js'; // Added \"possibleLengths\" and renamed\n// \"country_phone_code_to_countries\" to \"country_calling_codes\".\n\nvar V2 = '1.0.18'; // Added \"idd_prefix\" and \"default_idd_prefix\".\n\nvar V3 = '1.2.0'; // Moved `001` country code to \"nonGeographic\" section of metadata.\n\nvar V4 = '1.7.35';\nvar DEFAULT_EXT_PREFIX = ' ext. ';\nvar CALLING_CODE_REG_EXP = /^\\d+$/;\n/**\r\n * See: https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md\r\n */\n\nvar Metadata = /*#__PURE__*/function () {\n function Metadata(metadata) {\n _classCallCheck(this, Metadata);\n\n validateMetadata(metadata);\n this.metadata = metadata;\n setVersion.call(this, metadata);\n }\n\n _createClass(Metadata, [{\n key: \"getCountries\",\n value: function getCountries() {\n return Object.keys(this.metadata.countries).filter(function (_) {\n return _ !== '001';\n });\n }\n }, {\n key: \"getCountryMetadata\",\n value: function getCountryMetadata(countryCode) {\n return this.metadata.countries[countryCode];\n }\n }, {\n key: \"nonGeographic\",\n value: function nonGeographic() {\n if (this.v1 || this.v2 || this.v3) return; // `nonGeographical` was a typo.\n // It's present in metadata generated from `1.7.35` to `1.7.37`.\n // The test case could be found by searching for \"nonGeographical\".\n\n return this.metadata.nonGeographic || this.metadata.nonGeographical;\n }\n }, {\n key: \"hasCountry\",\n value: function hasCountry(country) {\n return this.getCountryMetadata(country) !== undefined;\n }\n }, {\n key: \"hasCallingCode\",\n value: function hasCallingCode(callingCode) {\n if (this.getCountryCodesForCallingCode(callingCode)) {\n return true;\n }\n\n if (this.nonGeographic()) {\n if (this.nonGeographic()[callingCode]) {\n return true;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return true;\n }\n }\n }\n }, {\n key: \"isNonGeographicCallingCode\",\n value: function isNonGeographicCallingCode(callingCode) {\n if (this.nonGeographic()) {\n return this.nonGeographic()[callingCode] ? true : false;\n } else {\n return this.getCountryCodesForCallingCode(callingCode) ? false : true;\n }\n } // Deprecated.\n\n }, {\n key: \"country\",\n value: function country(countryCode) {\n return this.selectNumberingPlan(countryCode);\n }\n }, {\n key: \"selectNumberingPlan\",\n value: function selectNumberingPlan(countryCode, callingCode) {\n // Supports just passing `callingCode` as the first argument.\n if (countryCode && CALLING_CODE_REG_EXP.test(countryCode)) {\n callingCode = countryCode;\n countryCode = null;\n }\n\n if (countryCode && countryCode !== '001') {\n if (!this.hasCountry(countryCode)) {\n throw new Error(\"Unknown country: \".concat(countryCode));\n }\n\n this.numberingPlan = new NumberingPlan(this.getCountryMetadata(countryCode), this);\n } else if (callingCode) {\n if (!this.hasCallingCode(callingCode)) {\n throw new Error(\"Unknown calling code: \".concat(callingCode));\n }\n\n this.numberingPlan = new NumberingPlan(this.getNumberingPlanMetadata(callingCode), this);\n } else {\n this.numberingPlan = undefined;\n }\n\n return this;\n }\n }, {\n key: \"getCountryCodesForCallingCode\",\n value: function getCountryCodesForCallingCode(callingCode) {\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes) {\n // Metadata before V4 included \"non-geographic entity\" calling codes\n // inside `country_calling_codes` (for example, `\"881\":[\"001\"]`).\n // Now the semantics of `country_calling_codes` has changed:\n // it's specifically for \"countries\" now.\n // Older versions of custom metadata will simply skip parsing\n // \"non-geographic entity\" phone numbers with new versions\n // of this library: it's not considered a bug,\n // because such numbers are extremely rare,\n // and developers extremely rarely use custom metadata.\n if (countryCodes.length === 1 && countryCodes[0].length === 3) {\n return;\n }\n\n return countryCodes;\n }\n }\n }, {\n key: \"getCountryCodeForCallingCode\",\n value: function getCountryCodeForCallingCode(callingCode) {\n var countryCodes = this.getCountryCodesForCallingCode(callingCode);\n\n if (countryCodes) {\n return countryCodes[0];\n }\n }\n }, {\n key: \"getNumberingPlanMetadata\",\n value: function getNumberingPlanMetadata(callingCode) {\n var countryCode = this.getCountryCodeForCallingCode(callingCode);\n\n if (countryCode) {\n return this.getCountryMetadata(countryCode);\n }\n\n if (this.nonGeographic()) {\n var metadata = this.nonGeographic()[callingCode];\n\n if (metadata) {\n return metadata;\n }\n } else {\n // A hacky workaround for old custom metadata (generated before V4).\n // In that metadata, there was no concept of \"non-geographic\" metadata\n // so metadata for `001` country code was stored along with other countries.\n // The test case can be found by searching for:\n // \"should work around `nonGeographic` metadata not existing\".\n var countryCodes = this.countryCallingCodes()[callingCode];\n\n if (countryCodes && countryCodes.length === 1 && countryCodes[0] === '001') {\n return this.metadata.countries['001'];\n }\n }\n } // Deprecated.\n\n }, {\n key: \"countryCallingCode\",\n value: function countryCallingCode() {\n return this.numberingPlan.callingCode();\n } // Deprecated.\n\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n return this.numberingPlan.IDDPrefix();\n } // Deprecated.\n\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n return this.numberingPlan.defaultIDDPrefix();\n } // Deprecated.\n\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n return this.numberingPlan.nationalNumberPattern();\n } // Deprecated.\n\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n return this.numberingPlan.possibleLengths();\n } // Deprecated.\n\n }, {\n key: \"formats\",\n value: function formats() {\n return this.numberingPlan.formats();\n } // Deprecated.\n\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n return this.numberingPlan.nationalPrefixForParsing();\n } // Deprecated.\n\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.numberingPlan.nationalPrefixTransformRule();\n } // Deprecated.\n\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.numberingPlan.leadingDigits();\n } // Deprecated.\n\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n return this.numberingPlan.hasTypes();\n } // Deprecated.\n\n }, {\n key: \"type\",\n value: function type(_type) {\n return this.numberingPlan.type(_type);\n } // Deprecated.\n\n }, {\n key: \"ext\",\n value: function ext() {\n return this.numberingPlan.ext();\n }\n }, {\n key: \"countryCallingCodes\",\n value: function countryCallingCodes() {\n if (this.v1) return this.metadata.country_phone_code_to_countries;\n return this.metadata.country_calling_codes;\n } // Deprecated.\n\n }, {\n key: \"chooseCountryByCountryCallingCode\",\n value: function chooseCountryByCountryCallingCode(callingCode) {\n return this.selectNumberingPlan(callingCode);\n }\n }, {\n key: \"hasSelectedNumberingPlan\",\n value: function hasSelectedNumberingPlan() {\n return this.numberingPlan !== undefined;\n }\n }]);\n\n return Metadata;\n}();\n\nexport { Metadata as default };\n\nvar NumberingPlan = /*#__PURE__*/function () {\n function NumberingPlan(metadata, globalMetadataObject) {\n _classCallCheck(this, NumberingPlan);\n\n this.globalMetadataObject = globalMetadataObject;\n this.metadata = metadata;\n setVersion.call(this, globalMetadataObject.metadata);\n }\n\n _createClass(NumberingPlan, [{\n key: \"callingCode\",\n value: function callingCode() {\n return this.metadata[0];\n } // Formatting information for regions which share\n // a country calling code is contained by only one region\n // for performance reasons. For example, for NANPA region\n // (\"North American Numbering Plan Administration\",\n // which includes USA, Canada, Cayman Islands, Bahamas, etc)\n // it will be contained in the metadata for `US`.\n\n }, {\n key: \"getDefaultCountryMetadataForRegion\",\n value: function getDefaultCountryMetadataForRegion() {\n return this.globalMetadataObject.getNumberingPlanMetadata(this.callingCode());\n } // Is always present.\n\n }, {\n key: \"IDDPrefix\",\n value: function IDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[1];\n } // Is only present when a country supports multiple IDD prefixes.\n\n }, {\n key: \"defaultIDDPrefix\",\n value: function defaultIDDPrefix() {\n if (this.v1 || this.v2) return;\n return this.metadata[12];\n }\n }, {\n key: \"nationalNumberPattern\",\n value: function nationalNumberPattern() {\n if (this.v1 || this.v2) return this.metadata[1];\n return this.metadata[2];\n } // \"possible length\" data is always present in Google's metadata.\n\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.v1) return;\n return this.metadata[this.v2 ? 2 : 3];\n }\n }, {\n key: \"_getFormats\",\n value: function _getFormats(metadata) {\n return metadata[this.v1 ? 2 : this.v2 ? 3 : 4];\n } // For countries of the same region (e.g. NANPA)\n // formats are all stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"formats\",\n value: function formats() {\n var _this = this;\n\n var formats = this._getFormats(this.metadata) || this._getFormats(this.getDefaultCountryMetadataForRegion()) || [];\n return formats.map(function (_) {\n return new Format(_, _this);\n });\n }\n }, {\n key: \"nationalPrefix\",\n value: function nationalPrefix() {\n return this.metadata[this.v1 ? 3 : this.v2 ? 4 : 5];\n }\n }, {\n key: \"_getNationalPrefixFormattingRule\",\n value: function _getNationalPrefixFormattingRule(metadata) {\n return metadata[this.v1 ? 4 : this.v2 ? 5 : 6];\n } // For countries of the same region (e.g. NANPA)\n // national prefix formatting rule is stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._getNationalPrefixFormattingRule(this.metadata) || this._getNationalPrefixFormattingRule(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"_nationalPrefixForParsing\",\n value: function _nationalPrefixForParsing() {\n return this.metadata[this.v1 ? 5 : this.v2 ? 6 : 7];\n }\n }, {\n key: \"nationalPrefixForParsing\",\n value: function nationalPrefixForParsing() {\n // If `national_prefix_for_parsing` is not set explicitly,\n // then infer it from `national_prefix` (if any)\n return this._nationalPrefixForParsing() || this.nationalPrefix();\n }\n }, {\n key: \"nationalPrefixTransformRule\",\n value: function nationalPrefixTransformRule() {\n return this.metadata[this.v1 ? 6 : this.v2 ? 7 : 8];\n }\n }, {\n key: \"_getNationalPrefixIsOptionalWhenFormatting\",\n value: function _getNationalPrefixIsOptionalWhenFormatting() {\n return !!this.metadata[this.v1 ? 7 : this.v2 ? 8 : 9];\n } // For countries of the same region (e.g. NANPA)\n // \"national prefix is optional when formatting\" flag is\n // stored in the \"main\" country for that region.\n // E.g. \"RU\" and \"KZ\", \"US\" and \"CA\".\n\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return this._getNationalPrefixIsOptionalWhenFormatting(this.metadata) || this._getNationalPrefixIsOptionalWhenFormatting(this.getDefaultCountryMetadataForRegion());\n }\n }, {\n key: \"leadingDigits\",\n value: function leadingDigits() {\n return this.metadata[this.v1 ? 8 : this.v2 ? 9 : 10];\n }\n }, {\n key: \"types\",\n value: function types() {\n return this.metadata[this.v1 ? 9 : this.v2 ? 10 : 11];\n }\n }, {\n key: \"hasTypes\",\n value: function hasTypes() {\n // Versions 1.2.0 - 1.2.4: can be `[]`.\n\n /* istanbul ignore next */\n if (this.types() && this.types().length === 0) {\n return false;\n } // Versions <= 1.2.4: can be `undefined`.\n // Version >= 1.2.5: can be `0`.\n\n\n return !!this.types();\n }\n }, {\n key: \"type\",\n value: function type(_type2) {\n if (this.hasTypes() && getType(this.types(), _type2)) {\n return new Type(getType(this.types(), _type2), this);\n }\n }\n }, {\n key: \"ext\",\n value: function ext() {\n if (this.v1 || this.v2) return DEFAULT_EXT_PREFIX;\n return this.metadata[13] || DEFAULT_EXT_PREFIX;\n }\n }]);\n\n return NumberingPlan;\n}();\n\nvar Format = /*#__PURE__*/function () {\n function Format(format, metadata) {\n _classCallCheck(this, Format);\n\n this._format = format;\n this.metadata = metadata;\n }\n\n _createClass(Format, [{\n key: \"pattern\",\n value: function pattern() {\n return this._format[0];\n }\n }, {\n key: \"format\",\n value: function format() {\n return this._format[1];\n }\n }, {\n key: \"leadingDigitsPatterns\",\n value: function leadingDigitsPatterns() {\n return this._format[2] || [];\n }\n }, {\n key: \"nationalPrefixFormattingRule\",\n value: function nationalPrefixFormattingRule() {\n return this._format[3] || this.metadata.nationalPrefixFormattingRule();\n }\n }, {\n key: \"nationalPrefixIsOptionalWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsOptionalWhenFormattingInNationalFormat() {\n return !!this._format[4] || this.metadata.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n }\n }, {\n key: \"nationalPrefixIsMandatoryWhenFormattingInNationalFormat\",\n value: function nationalPrefixIsMandatoryWhenFormattingInNationalFormat() {\n // National prefix is omitted if there's no national prefix formatting rule\n // set for this country, or when the national prefix formatting rule\n // contains no national prefix itself, or when this rule is set but\n // national prefix is optional for this phone number format\n // (and it is not enforced explicitly)\n return this.usesNationalPrefix() && !this.nationalPrefixIsOptionalWhenFormattingInNationalFormat();\n } // Checks whether national prefix formatting rule contains national prefix.\n\n }, {\n key: \"usesNationalPrefix\",\n value: function usesNationalPrefix() {\n return this.nationalPrefixFormattingRule() && // Check that national prefix formatting rule is not a \"dummy\" one.\n !FIRST_GROUP_ONLY_PREFIX_PATTERN.test(this.nationalPrefixFormattingRule()) // In compressed metadata, `this.nationalPrefixFormattingRule()` is `0`\n // when `national_prefix_formatting_rule` is not present.\n // So, `true` or `false` are returned explicitly here, so that\n // `0` number isn't returned.\n ? true : false;\n }\n }, {\n key: \"internationalFormat\",\n value: function internationalFormat() {\n return this._format[5] || this.format();\n }\n }]);\n\n return Format;\n}();\n/**\r\n * A pattern that is used to determine if the national prefix formatting rule\r\n * has the first group only, i.e., does not start with the national prefix.\r\n * Note that the pattern explicitly allows for unbalanced parentheses.\r\n */\n\n\nvar FIRST_GROUP_ONLY_PREFIX_PATTERN = /^\\(?\\$1\\)?$/;\n\nvar Type = /*#__PURE__*/function () {\n function Type(type, metadata) {\n _classCallCheck(this, Type);\n\n this.type = type;\n this.metadata = metadata;\n }\n\n _createClass(Type, [{\n key: \"pattern\",\n value: function pattern() {\n if (this.metadata.v1) return this.type;\n return this.type[0];\n }\n }, {\n key: \"possibleLengths\",\n value: function possibleLengths() {\n if (this.metadata.v1) return;\n return this.type[1] || this.metadata.possibleLengths();\n }\n }]);\n\n return Type;\n}();\n\nfunction getType(types, type) {\n switch (type) {\n case 'FIXED_LINE':\n return types[0];\n\n case 'MOBILE':\n return types[1];\n\n case 'TOLL_FREE':\n return types[2];\n\n case 'PREMIUM_RATE':\n return types[3];\n\n case 'PERSONAL_NUMBER':\n return types[4];\n\n case 'VOICEMAIL':\n return types[5];\n\n case 'UAN':\n return types[6];\n\n case 'PAGER':\n return types[7];\n\n case 'VOIP':\n return types[8];\n\n case 'SHARED_COST':\n return types[9];\n }\n}\n\nexport function validateMetadata(metadata) {\n if (!metadata) {\n throw new Error('[libphonenumber-js] `metadata` argument not passed. Check your arguments.');\n } // `country_phone_code_to_countries` was renamed to\n // `country_calling_codes` in `1.0.18`.\n\n\n if (!isObject(metadata) || !isObject(metadata.countries)) {\n throw new Error(\"[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got \".concat(isObject(metadata) ? 'an object of shape: { ' + Object.keys(metadata).join(', ') + ' }' : 'a ' + typeOf(metadata) + ': ' + metadata, \".\"));\n }\n} // Babel transforms `typeof` into some \"branches\"\n// so istanbul will show this as \"branch not covered\".\n\n/* istanbul ignore next */\n\nvar typeOf = function typeOf(_) {\n return _typeof(_);\n};\n/**\r\n * Returns extension prefix for a country.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string?}\r\n * @example\r\n * // Returns \" ext. \"\r\n * getExtPrefix(\"US\")\r\n */\n\n\nexport function getExtPrefix(country, metadata) {\n metadata = new Metadata(metadata);\n\n if (metadata.hasCountry(country)) {\n return metadata.country(country).ext();\n }\n\n return DEFAULT_EXT_PREFIX;\n}\n/**\r\n * Returns \"country calling code\" for a country.\r\n * Throws an error if the country doesn't exist or isn't supported by this library.\r\n * @param {string} country\r\n * @param {object} metadata\r\n * @return {string}\r\n * @example\r\n * // Returns \"44\"\r\n * getCountryCallingCode(\"GB\")\r\n */\n\nexport function getCountryCallingCode(country, metadata) {\n metadata = new Metadata(metadata);\n\n if (metadata.hasCountry(country)) {\n return metadata.country(country).countryCallingCode();\n }\n\n throw new Error(\"Unknown country: \".concat(country));\n}\nexport function isSupportedCountry(country, metadata) {\n // metadata = new Metadata(metadata)\n // return metadata.hasCountry(country)\n return metadata.countries.hasOwnProperty(country);\n}\n\nfunction setVersion(metadata) {\n var version = metadata.version;\n\n if (typeof version === 'number') {\n this.v1 = version === 1;\n this.v2 = version === 2;\n this.v3 = version === 3;\n this.v4 = version === 4;\n } else {\n if (!version) {\n this.v1 = true;\n } else if (compare(version, V3) === -1) {\n this.v2 = true;\n } else if (compare(version, V4) === -1) {\n this.v3 = true;\n } else {\n this.v4 = true;\n }\n }\n} // const ISO_COUNTRY_CODE = /^[A-Z]{2}$/\n// function isCountryCode(countryCode) {\n// \treturn ISO_COUNTRY_CODE.test(countryCodeOrCountryCallingCode)\n// }\n//# sourceMappingURL=metadata.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport isObject from './helpers/isObject.js'; // Extracts the following properties from function arguments:\n// * input `text`\n// * `options` object\n// * `metadata` JSON\n\nexport default function normalizeArguments(args) {\n var _Array$prototype$slic = Array.prototype.slice.call(args),\n _Array$prototype$slic2 = _slicedToArray(_Array$prototype$slic, 4),\n arg_1 = _Array$prototype$slic2[0],\n arg_2 = _Array$prototype$slic2[1],\n arg_3 = _Array$prototype$slic2[2],\n arg_4 = _Array$prototype$slic2[3];\n\n var text;\n var options;\n var metadata; // If the phone number is passed as a string.\n // `parsePhoneNumber('88005553535', ...)`.\n\n if (typeof arg_1 === 'string') {\n text = arg_1;\n } else throw new TypeError('A text for parsing must be a string.'); // If \"default country\" argument is being passed then move it to `options`.\n // `parsePhoneNumber('88005553535', 'RU', [options], metadata)`.\n\n\n if (!arg_2 || typeof arg_2 === 'string') {\n if (arg_4) {\n options = arg_3;\n metadata = arg_4;\n } else {\n options = undefined;\n metadata = arg_3;\n }\n\n if (arg_2) {\n options = _objectSpread({\n defaultCountry: arg_2\n }, options);\n }\n } // `defaultCountry` is not passed.\n // Example: `parsePhoneNumber('+78005553535', [options], metadata)`.\n else if (isObject(arg_2)) {\n if (arg_3) {\n options = arg_2;\n metadata = arg_3;\n } else {\n metadata = arg_2;\n }\n } else throw new Error(\"Invalid second argument: \".concat(arg_2));\n\n return {\n text: text,\n options: options,\n metadata: metadata\n };\n}\n//# sourceMappingURL=normalizeArguments.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { parseDigit } from './helpers/parseDigits.js';\n/**\r\n * Parses phone number characters from a string.\r\n * Drops all punctuation leaving only digits and the leading `+` sign (if any).\r\n * Also converts wide-ascii and arabic-indic numerals to conventional numerals.\r\n * E.g. in Iraq they don't write `+442323234` but rather `+٤٤٢٣٢٣٢٣٤`.\r\n * @param {string} string\r\n * @return {string}\r\n * @example\r\n * ```js\r\n * // Outputs '8800555'.\r\n * parseIncompletePhoneNumber('8 (800) 555')\r\n * // Outputs '+7800555'.\r\n * parseIncompletePhoneNumber('+7 800 555')\r\n * ```\r\n */\n\nexport default function parseIncompletePhoneNumber(string) {\n var result = ''; // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes) but digits\n // (including non-European ones) don't fall into that range\n // so such \"exotic\" characters would be discarded anyway.\n\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n result += parsePhoneNumberCharacter(character, result) || '';\n }\n\n return result;\n}\n/**\r\n * Parses next character while parsing phone number digits (including a `+`)\r\n * from text: discards everything except `+` and digits, and `+` is only allowed\r\n * at the start of a phone number.\r\n * For example, is used in `react-phone-number-input` where it uses\r\n * [`input-format`](https://gitlab.com/catamphetamine/input-format).\r\n * @param {string} character - Yet another character from raw input string.\r\n * @param {string?} prevParsedCharacters - Previous parsed characters.\r\n * @param {function?} emitEvent - An optional \"emit event\" function.\r\n * @return {string?} The parsed character.\r\n */\n\nexport function parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent) {\n // Only allow a leading `+`.\n if (character === '+') {\n // If this `+` is not the first parsed character\n // then discard it.\n if (prevParsedCharacters) {\n // `emitEvent` argument was added to this `export`ed function on Dec 26th, 2023.\n // Any 3rd-party code that used to `import` and call this function before that\n // won't be passing any `emitEvent` argument.\n //\n // The addition of the `emitEvent` argument was to fix the slightly-weird behavior\n // of parsing an input string when the user inputs something like `\"2+7\"\n // https://github.com/catamphetamine/react-phone-number-input/issues/437\n //\n // If the parser encounters an unexpected `+` in a string being parsed\n // then it simply discards that out-of-place `+` and any following characters.\n //\n if (typeof emitEvent === 'function') {\n emitEvent('end');\n }\n\n return;\n }\n\n return '+';\n } // Allow digits.\n\n\n return parseDigit(character);\n}\n//# sourceMappingURL=parseIncompletePhoneNumber.js.map","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n// https://stackoverflow.com/a/46971044/970769\n// \"Breaking changes in Typescript 2.1\"\n// \"Extending built-ins like Error, Array, and Map may no longer work.\"\n// \"As a recommendation, you can manually adjust the prototype immediately after any super(...) calls.\"\n// https://github.com/Microsoft/TypeScript-wiki/blob/main/Breaking-Changes.md#extending-built-ins-like-error-array-and-map-may-no-longer-work\nvar ParseError = /*#__PURE__*/function (_Error) {\n _inherits(ParseError, _Error);\n\n var _super = _createSuper(ParseError);\n\n function ParseError(code) {\n var _this;\n\n _classCallCheck(this, ParseError);\n\n _this = _super.call(this, code); // Set the prototype explicitly.\n // Any subclass of FooError will have to manually set the prototype as well.\n\n Object.setPrototypeOf(_assertThisInitialized(_this), ParseError.prototype);\n _this.name = _this.constructor.name;\n return _this;\n }\n\n return _createClass(ParseError);\n}( /*#__PURE__*/_wrapNativeSuper(Error));\n\nexport { ParseError as default };\n//# sourceMappingURL=ParseError.js.map","import { VALID_DIGITS } from '../../constants.js'; // The RFC 3966 format for extensions.\n\nvar RFC3966_EXTN_PREFIX = ';ext=';\n/**\r\n * Helper method for constructing regular expressions for parsing. Creates\r\n * an expression that captures up to max_length digits.\r\n * @return {string} RegEx pattern to capture extension digits.\r\n */\n\nvar getExtensionDigitsPattern = function getExtensionDigitsPattern(maxLength) {\n return \"([\".concat(VALID_DIGITS, \"]{1,\").concat(maxLength, \"})\");\n};\n/**\r\n * Helper initialiser method to create the regular-expression pattern to match\r\n * extensions.\r\n * Copy-pasted from Google's `libphonenumber`:\r\n * https://github.com/google/libphonenumber/blob/55b2646ec9393f4d3d6661b9c82ef9e258e8b829/javascript/i18n/phonenumbers/phonenumberutil.js#L759-L766\r\n * @return {string} RegEx pattern to capture extensions.\r\n */\n\n\nexport default function createExtensionPattern(purpose) {\n // We cap the maximum length of an extension based on the ambiguity of the way\n // the extension is prefixed. As per ITU, the officially allowed length for\n // extensions is actually 40, but we don't support this since we haven't seen real\n // examples and this introduces many false interpretations as the extension labels\n // are not standardized.\n\n /** @type {string} */\n var extLimitAfterExplicitLabel = '20';\n /** @type {string} */\n\n var extLimitAfterLikelyLabel = '15';\n /** @type {string} */\n\n var extLimitAfterAmbiguousChar = '9';\n /** @type {string} */\n\n var extLimitWhenNotSure = '6';\n /** @type {string} */\n\n var possibleSeparatorsBetweenNumberAndExtLabel = \"[ \\xA0\\\\t,]*\"; // Optional full stop (.) or colon, followed by zero or more spaces/tabs/commas.\n\n /** @type {string} */\n\n var possibleCharsAfterExtLabel = \"[:\\\\.\\uFF0E]?[ \\xA0\\\\t,-]*\";\n /** @type {string} */\n\n var optionalExtnSuffix = \"#?\"; // Here the extension is called out in more explicit way, i.e mentioning it obvious\n // patterns like \"ext.\".\n\n /** @type {string} */\n\n var explicitExtLabels = \"(?:e?xt(?:ensi(?:o\\u0301?|\\xF3))?n?|\\uFF45?\\uFF58\\uFF54\\uFF4E?|\\u0434\\u043E\\u0431|anexo)\"; // One-character symbols that can be used to indicate an extension, and less\n // commonly used or more ambiguous extension labels.\n\n /** @type {string} */\n\n var ambiguousExtLabels = \"(?:[x\\uFF58#\\uFF03~\\uFF5E]|int|\\uFF49\\uFF4E\\uFF54)\"; // When extension is not separated clearly.\n\n /** @type {string} */\n\n var ambiguousSeparator = \"[- ]+\"; // This is the same as possibleSeparatorsBetweenNumberAndExtLabel, but not matching\n // comma as extension label may have it.\n\n /** @type {string} */\n\n var possibleSeparatorsNumberExtLabelNoComma = \"[ \\xA0\\\\t]*\"; // \",,\" is commonly used for auto dialling the extension when connected. First\n // comma is matched through possibleSeparatorsBetweenNumberAndExtLabel, so we do\n // not repeat it here. Semi-colon works in Iphone and Android also to pop up a\n // button with the extension number following.\n\n /** @type {string} */\n\n var autoDiallingAndExtLabelsFound = \"(?:,{2}|;)\";\n /** @type {string} */\n\n var rfcExtn = RFC3966_EXTN_PREFIX + getExtensionDigitsPattern(extLimitAfterExplicitLabel);\n /** @type {string} */\n\n var explicitExtn = possibleSeparatorsBetweenNumberAndExtLabel + explicitExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterExplicitLabel) + optionalExtnSuffix;\n /** @type {string} */\n\n var ambiguousExtn = possibleSeparatorsBetweenNumberAndExtLabel + ambiguousExtLabels + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix;\n /** @type {string} */\n\n var americanStyleExtnWithSuffix = ambiguousSeparator + getExtensionDigitsPattern(extLimitWhenNotSure) + \"#\";\n /** @type {string} */\n\n var autoDiallingExtn = possibleSeparatorsNumberExtLabelNoComma + autoDiallingAndExtLabelsFound + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterLikelyLabel) + optionalExtnSuffix;\n /** @type {string} */\n\n var onlyCommasExtn = possibleSeparatorsNumberExtLabelNoComma + \"(?:,)+\" + possibleCharsAfterExtLabel + getExtensionDigitsPattern(extLimitAfterAmbiguousChar) + optionalExtnSuffix; // The first regular expression covers RFC 3966 format, where the extension is added\n // using \";ext=\". The second more generic where extension is mentioned with explicit\n // labels like \"ext:\". In both the above cases we allow more numbers in extension than\n // any other extension labels. The third one captures when single character extension\n // labels or less commonly used labels are used. In such cases we capture fewer\n // extension digits in order to reduce the chance of falsely interpreting two\n // numbers beside each other as a number + extension. The fourth one covers the\n // special case of American numbers where the extension is written with a hash\n // at the end, such as \"- 503#\". The fifth one is exclusively for extension\n // autodialling formats which are used when dialling and in this case we accept longer\n // extensions. The last one is more liberal on the number of commas that acts as\n // extension labels, so we have a strict cap on the number of digits in such extensions.\n\n return rfcExtn + \"|\" + explicitExtn + \"|\" + ambiguousExtn + \"|\" + americanStyleExtnWithSuffix + \"|\" + autoDiallingExtn + \"|\" + onlyCommasExtn;\n}\n//# sourceMappingURL=createExtensionPattern.js.map","import { MIN_LENGTH_FOR_NSN, VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from '../constants.js';\nimport createExtensionPattern from './extension/createExtensionPattern.js'; // Regular expression of viable phone numbers. This is location independent.\n// Checks we have at least three leading digits, and only valid punctuation,\n// alpha characters and digits in the phone number. Does not include extension\n// data. The symbol 'x' is allowed here as valid punctuation since it is often\n// used as a placeholder for carrier codes, for example in Brazilian phone\n// numbers. We also allow multiple '+' characters at the start.\n//\n// Corresponds to the following:\n// [digits]{minLengthNsn}|\n// plus_sign*\n// (([punctuation]|[star])*[digits]){3,}([punctuation]|[star]|[digits]|[alpha])*\n//\n// The first reg-ex is to allow short numbers (two digits long) to be parsed if\n// they are entered as \"15\" etc, but only if there is no punctuation in them.\n// The second expression restricts the number of digits to three or more, but\n// then allows them to be in international form, and to have alpha-characters\n// and punctuation. We split up the two reg-exes here and combine them when\n// creating the reg-ex VALID_PHONE_NUMBER_PATTERN itself so we can prefix it\n// with ^ and append $ to each branch.\n//\n// \"Note VALID_PUNCTUATION starts with a -,\n// so must be the first in the range\" (c) Google devs.\n// (wtf did they mean by saying that; probably nothing)\n//\n\nvar MIN_LENGTH_PHONE_NUMBER_PATTERN = '[' + VALID_DIGITS + ']{' + MIN_LENGTH_FOR_NSN + '}'; //\n// And this is the second reg-exp:\n// (see MIN_LENGTH_PHONE_NUMBER_PATTERN for a full description of this reg-exp)\n//\n\nexport var VALID_PHONE_NUMBER = '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){3,}' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*'; // This regular expression isn't present in Google's `libphonenumber`\n// and is only used to determine whether the phone number being input\n// is too short for it to even consider it a \"valid\" number.\n// This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\n\nvar VALID_PHONE_NUMBER_START_REG_EXP = new RegExp('^' + '[' + PLUS_CHARS + ']{0,1}' + '(?:' + '[' + VALID_PUNCTUATION + ']*' + '[' + VALID_DIGITS + ']' + '){1,2}' + '$', 'i');\nexport var VALID_PHONE_NUMBER_WITH_EXTENSION = VALID_PHONE_NUMBER + // Phone number extensions\n'(?:' + createExtensionPattern() + ')?'; // The combined regular expression for valid phone numbers:\n//\n\nvar VALID_PHONE_NUMBER_PATTERN = new RegExp( // Either a short two-digit-only phone number\n'^' + MIN_LENGTH_PHONE_NUMBER_PATTERN + '$' + '|' + // Or a longer fully parsed phone number (min 3 characters)\n'^' + VALID_PHONE_NUMBER_WITH_EXTENSION + '$', 'i'); // Checks to see if the string of characters could possibly be a phone number at\n// all. At the moment, checks to see that the string begins with at least 2\n// digits, ignoring any punctuation commonly found in phone numbers. This method\n// does not require the number to be normalized in advance - but does assume\n// that leading non-number symbols have been removed, such as by the method\n// `extract_possible_number`.\n//\n\nexport default function isViablePhoneNumber(number) {\n return number.length >= MIN_LENGTH_FOR_NSN && VALID_PHONE_NUMBER_PATTERN.test(number);\n} // This is just a way to differentiate between a really invalid phone\n// number like \"abcde\" and a valid phone number that a user has just\n// started inputting, like \"+1\" or \"1\": both these cases would be\n// considered `NOT_A_NUMBER` by Google's `libphonenumber`, but this\n// library can provide a more detailed error message — whether it's\n// really \"not a number\", or is it just a start of a valid phone number.\n\nexport function isViablePhoneNumberStart(number) {\n return VALID_PHONE_NUMBER_START_REG_EXP.test(number);\n}\n//# sourceMappingURL=isViablePhoneNumber.js.map","import createExtensionPattern from './createExtensionPattern.js'; // Regexp of all known extension prefixes used by different regions followed by\n// 1 or more valid digits, for use when parsing.\n\nvar EXTN_PATTERN = new RegExp('(?:' + createExtensionPattern() + ')$', 'i'); // Strips any extension (as in, the part of the number dialled after the call is\n// connected, usually indicated with extn, ext, x or similar) from the end of\n// the number, and returns it.\n\nexport default function extractExtension(number) {\n var start = number.search(EXTN_PATTERN);\n\n if (start < 0) {\n return {};\n } // If we find a potential extension, and the number preceding this is a viable\n // number, we assume it is an extension.\n\n\n var numberWithoutExtension = number.slice(0, start);\n var matches = number.match(EXTN_PATTERN);\n var i = 1;\n\n while (i < matches.length) {\n if (matches[i]) {\n return {\n number: numberWithoutExtension,\n ext: matches[i]\n };\n }\n\n i++;\n }\n}\n//# sourceMappingURL=extractExtension.js.map","// When phone numbers are written in `RFC3966` format — `\"tel:+12133734253\"` —\n// they can have their \"calling code\" part written separately in a `phone-context` parameter.\n// Example: `\"tel:12133734253;phone-context=+1\"`.\n// This function parses the full phone number from the local number and the `phone-context`\n// when the `phone-context` contains a `+` sign.\nimport { VALID_DIGITS // PLUS_CHARS\n} from '../constants.js';\nexport var PLUS_SIGN = '+';\nvar RFC3966_VISUAL_SEPARATOR_ = '[\\\\-\\\\.\\\\(\\\\)]?';\nvar RFC3966_PHONE_DIGIT_ = '(' + '[' + VALID_DIGITS + ']' + '|' + RFC3966_VISUAL_SEPARATOR_ + ')';\nvar RFC3966_GLOBAL_NUMBER_DIGITS_ = '^' + '\\\\' + PLUS_SIGN + RFC3966_PHONE_DIGIT_ + '*' + '[' + VALID_DIGITS + ']' + RFC3966_PHONE_DIGIT_ + '*' + '$';\n/**\r\n * Regular expression of valid global-number-digits for the phone-context\r\n * parameter, following the syntax defined in RFC3966.\r\n */\n\nvar RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_ = new RegExp(RFC3966_GLOBAL_NUMBER_DIGITS_, 'g'); // In this port of Google's library, we don't accept alpha characters in phone numbers.\n// const ALPHANUM_ = VALID_ALPHA_ + VALID_DIGITS\n\nvar ALPHANUM_ = VALID_DIGITS;\nvar RFC3966_DOMAINLABEL_ = '[' + ALPHANUM_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar VALID_ALPHA_ = 'a-zA-Z';\nvar RFC3966_TOPLABEL_ = '[' + VALID_ALPHA_ + ']+((\\\\-)*[' + ALPHANUM_ + '])*';\nvar RFC3966_DOMAINNAME_ = '^(' + RFC3966_DOMAINLABEL_ + '\\\\.)*' + RFC3966_TOPLABEL_ + '\\\\.?$';\n/**\r\n * Regular expression of valid domainname for the phone-context parameter,\r\n * following the syntax defined in RFC3966.\r\n */\n\nvar RFC3966_DOMAINNAME_PATTERN_ = new RegExp(RFC3966_DOMAINNAME_, 'g');\nexport var RFC3966_PREFIX_ = 'tel:';\nexport var RFC3966_PHONE_CONTEXT_ = ';phone-context=';\nexport var RFC3966_ISDN_SUBADDRESS_ = ';isub=';\n/**\r\n * Extracts the value of the phone-context parameter of `numberToExtractFrom`,\r\n * following the syntax defined in RFC3966.\r\n *\r\n * @param {string} numberToExtractFrom\r\n * @return {string|null} the extracted string (possibly empty), or `null` if no phone-context parameter is found.\r\n */\n\nexport default function extractPhoneContext(numberToExtractFrom) {\n var indexOfPhoneContext = numberToExtractFrom.indexOf(RFC3966_PHONE_CONTEXT_); // If no phone-context parameter is present\n\n if (indexOfPhoneContext < 0) {\n return null;\n }\n\n var phoneContextStart = indexOfPhoneContext + RFC3966_PHONE_CONTEXT_.length; // If phone-context parameter is empty\n\n if (phoneContextStart >= numberToExtractFrom.length) {\n return '';\n }\n\n var phoneContextEnd = numberToExtractFrom.indexOf(';', phoneContextStart); // If phone-context is not the last parameter\n\n if (phoneContextEnd >= 0) {\n return numberToExtractFrom.substring(phoneContextStart, phoneContextEnd);\n } else {\n return numberToExtractFrom.substring(phoneContextStart);\n }\n}\n/**\r\n * Returns whether the value of phoneContext follows the syntax defined in RFC3966.\r\n *\r\n * @param {string|null} phoneContext\r\n * @return {boolean}\r\n */\n\nexport function isPhoneContextValid(phoneContext) {\n if (phoneContext === null) {\n return true;\n }\n\n if (phoneContext.length === 0) {\n return false;\n } // Does phone-context value match pattern of global-number-digits or domainname.\n\n\n return RFC3966_GLOBAL_NUMBER_DIGITS_PATTERN_.test(phoneContext) || RFC3966_DOMAINNAME_PATTERN_.test(phoneContext);\n}\n//# sourceMappingURL=extractPhoneContext.js.map","import extractPhoneContext, { isPhoneContextValid, PLUS_SIGN, RFC3966_PREFIX_, RFC3966_PHONE_CONTEXT_, RFC3966_ISDN_SUBADDRESS_ } from './extractPhoneContext.js';\nimport ParseError from '../ParseError.js';\n/**\r\n * @param {string} numberToParse\r\n * @param {string} nationalNumber\r\n * @return {}\r\n */\n\nexport default function extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(numberToParse, _ref) {\n var extractFormattedPhoneNumber = _ref.extractFormattedPhoneNumber;\n var phoneContext = extractPhoneContext(numberToParse);\n\n if (!isPhoneContextValid(phoneContext)) {\n throw new ParseError('NOT_A_NUMBER');\n }\n\n var phoneNumberString;\n\n if (phoneContext === null) {\n // Extract a possible number from the string passed in.\n // (this strips leading characters that could not be the start of a phone number)\n phoneNumberString = extractFormattedPhoneNumber(numberToParse) || '';\n } else {\n phoneNumberString = ''; // If the phone context contains a phone number prefix, we need to capture\n // it, whereas domains will be ignored.\n\n if (phoneContext.charAt(0) === PLUS_SIGN) {\n phoneNumberString += phoneContext;\n } // Now append everything between the \"tel:\" prefix and the phone-context.\n // This should include the national number, an optional extension or\n // isdn-subaddress component. Note we also handle the case when \"tel:\" is\n // missing, as we have seen in some of the phone number inputs.\n // In that case, we append everything from the beginning.\n\n\n var indexOfRfc3966Prefix = numberToParse.indexOf(RFC3966_PREFIX_);\n var indexOfNationalNumber; // RFC 3966 \"tel:\" prefix is preset at this stage because\n // `isPhoneContextValid()` requires it to be present.\n\n /* istanbul ignore else */\n\n if (indexOfRfc3966Prefix >= 0) {\n indexOfNationalNumber = indexOfRfc3966Prefix + RFC3966_PREFIX_.length;\n } else {\n indexOfNationalNumber = 0;\n }\n\n var indexOfPhoneContext = numberToParse.indexOf(RFC3966_PHONE_CONTEXT_);\n phoneNumberString += numberToParse.substring(indexOfNationalNumber, indexOfPhoneContext);\n } // Delete the isdn-subaddress and everything after it if it is present.\n // Note extension won't appear at the same time with isdn-subaddress\n // according to paragraph 5.3 of the RFC3966 spec.\n\n\n var indexOfIsdn = phoneNumberString.indexOf(RFC3966_ISDN_SUBADDRESS_);\n\n if (indexOfIsdn > 0) {\n phoneNumberString = phoneNumberString.substring(0, indexOfIsdn);\n } // If both phone context and isdn-subaddress are absent but other\n // parameters are present, the parameters are left in nationalNumber.\n // This is because we are concerned about deleting content from a potential\n // number string when there is no strong evidence that the number is\n // actually written in RFC3966.\n\n\n if (phoneNumberString !== '') {\n return phoneNumberString;\n }\n}\n//# sourceMappingURL=extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js.map","// This is a port of Google Android `libphonenumber`'s\n// `phonenumberutil.js` of December 31th, 2018.\n//\n// https://github.com/googlei18n/libphonenumber/commits/master/javascript/i18n/phonenumbers/phonenumberutil.js\nimport { VALID_DIGITS, PLUS_CHARS, MIN_LENGTH_FOR_NSN, MAX_LENGTH_FOR_NSN } from './constants.js';\nimport ParseError from './ParseError.js';\nimport Metadata from './metadata.js';\nimport isViablePhoneNumber, { isViablePhoneNumberStart } from './helpers/isViablePhoneNumber.js';\nimport extractExtension from './helpers/extension/extractExtension.js';\nimport parseIncompletePhoneNumber from './parseIncompletePhoneNumber.js';\nimport getCountryCallingCode from './getCountryCallingCode.js';\nimport { isPossibleNumber } from './isPossible.js'; // import { parseRFC3966 } from './helpers/RFC3966.js'\n\nimport PhoneNumber from './PhoneNumber.js';\nimport matchesEntirely from './helpers/matchesEntirely.js';\nimport extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractNationalNumber from './helpers/extractNationalNumber.js';\nimport stripIddPrefix from './helpers/stripIddPrefix.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport extractFormattedPhoneNumberFromPossibleRfc3966NumberUri from './helpers/extractFormattedPhoneNumberFromPossibleRfc3966NumberUri.js'; // We don't allow input strings for parsing to be longer than 250 chars.\n// This prevents malicious input from consuming CPU.\n\nvar MAX_INPUT_STRING_LENGTH = 250; // This consists of the plus symbol, digits, and arabic-indic digits.\n\nvar PHONE_NUMBER_START_PATTERN = new RegExp('[' + PLUS_CHARS + VALID_DIGITS + ']'); // Regular expression of trailing characters that we want to remove.\n// A trailing `#` is sometimes used when writing phone numbers with extensions in US.\n// Example: \"+1 (645) 123 1234-910#\" number has extension \"910\".\n\nvar AFTER_PHONE_NUMBER_END_PATTERN = new RegExp('[^' + VALID_DIGITS + '#' + ']+$');\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false; // Examples:\n//\n// ```js\n// parse('8 (800) 555-35-35', 'RU')\n// parse('8 (800) 555-35-35', 'RU', metadata)\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } })\n// parse('8 (800) 555-35-35', { country: { default: 'RU' } }, metadata)\n// parse('+7 800 555 35 35')\n// parse('+7 800 555 35 35', metadata)\n// ```\n//\n\n/**\r\n * Parses a phone number.\r\n *\r\n * parse('123456789', { defaultCountry: 'RU', v2: true }, metadata)\r\n * parse('123456789', { defaultCountry: 'RU' }, metadata)\r\n * parse('123456789', undefined, metadata)\r\n *\r\n * @param {string} input\r\n * @param {object} [options]\r\n * @param {object} metadata\r\n * @return {object|PhoneNumber?} If `options.v2: true` flag is passed, it returns a `PhoneNumber?` instance. Otherwise, returns an object of shape `{ phone: '...', country: '...' }` (or just `{}` if no phone number was parsed).\r\n */\n\nexport default function parse(text, options, metadata) {\n // If assigning the `{}` default value is moved to the arguments above,\n // code coverage would decrease for some weird reason.\n options = options || {};\n metadata = new Metadata(metadata); // Validate `defaultCountry`.\n\n if (options.defaultCountry && !metadata.hasCountry(options.defaultCountry)) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n\n throw new Error(\"Unknown country: \".concat(options.defaultCountry));\n } // Parse the phone number.\n\n\n var _parseInput = parseInput(text, options.v2, options.extract),\n formattedPhoneNumber = _parseInput.number,\n ext = _parseInput.ext,\n error = _parseInput.error; // If the phone number is not viable then return nothing.\n\n\n if (!formattedPhoneNumber) {\n if (options.v2) {\n if (error === 'TOO_SHORT') {\n throw new ParseError('TOO_SHORT');\n }\n\n throw new ParseError('NOT_A_NUMBER');\n }\n\n return {};\n }\n\n var _parsePhoneNumber = parsePhoneNumber(formattedPhoneNumber, options.defaultCountry, options.defaultCallingCode, metadata),\n country = _parsePhoneNumber.country,\n nationalNumber = _parsePhoneNumber.nationalNumber,\n countryCallingCode = _parsePhoneNumber.countryCallingCode,\n countryCallingCodeSource = _parsePhoneNumber.countryCallingCodeSource,\n carrierCode = _parsePhoneNumber.carrierCode;\n\n if (!metadata.hasSelectedNumberingPlan()) {\n if (options.v2) {\n throw new ParseError('INVALID_COUNTRY');\n }\n\n return {};\n } // Validate national (significant) number length.\n\n\n if (!nationalNumber || nationalNumber.length < MIN_LENGTH_FOR_NSN) {\n // Won't throw here because the regexp already demands length > 1.\n\n /* istanbul ignore if */\n if (options.v2) {\n throw new ParseError('TOO_SHORT');\n } // Google's demo just throws an error in this case.\n\n\n return {};\n } // Validate national (significant) number length.\n //\n // A sidenote:\n //\n // They say that sometimes national (significant) numbers\n // can be longer than `MAX_LENGTH_FOR_NSN` (e.g. in Germany).\n // https://github.com/googlei18n/libphonenumber/blob/7e1748645552da39c4e1ba731e47969d97bdb539/resources/phonenumber.proto#L36\n // Such numbers will just be discarded.\n //\n\n\n if (nationalNumber.length > MAX_LENGTH_FOR_NSN) {\n if (options.v2) {\n throw new ParseError('TOO_LONG');\n } // Google's demo just throws an error in this case.\n\n\n return {};\n }\n\n if (options.v2) {\n var phoneNumber = new PhoneNumber(countryCallingCode, nationalNumber, metadata.metadata);\n\n if (country) {\n phoneNumber.country = country;\n }\n\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n }\n\n if (ext) {\n phoneNumber.ext = ext;\n }\n\n phoneNumber.__countryCallingCodeSource = countryCallingCodeSource;\n return phoneNumber;\n } // Check if national phone number pattern matches the number.\n // National number pattern is different for each country,\n // even for those ones which are part of the \"NANPA\" group.\n\n\n var valid = (options.extended ? metadata.hasSelectedNumberingPlan() : country) ? matchesEntirely(nationalNumber, metadata.nationalNumberPattern()) : false;\n\n if (!options.extended) {\n return valid ? result(country, nationalNumber, ext) : {};\n } // isInternational: countryCallingCode !== undefined\n\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n carrierCode: carrierCode,\n valid: valid,\n possible: valid ? true : options.extended === true && metadata.possibleLengths() && isPossibleNumber(nationalNumber, metadata) ? true : false,\n phone: nationalNumber,\n ext: ext\n };\n}\n/**\r\n * Extracts a formatted phone number from text.\r\n * Doesn't guarantee that the extracted phone number\r\n * is a valid phone number (for example, doesn't validate its length).\r\n * @param {string} text\r\n * @param {boolean} [extract] — If `false`, then will parse the entire `text` as a phone number.\r\n * @param {boolean} [throwOnError] — By default, it won't throw if the text is too long.\r\n * @return {string}\r\n * @example\r\n * // Returns \"(213) 373-4253\".\r\n * extractFormattedPhoneNumber(\"Call (213) 373-4253 for assistance.\")\r\n */\n\nfunction _extractFormattedPhoneNumber(text, extract, throwOnError) {\n if (!text) {\n return;\n }\n\n if (text.length > MAX_INPUT_STRING_LENGTH) {\n if (throwOnError) {\n throw new ParseError('TOO_LONG');\n }\n\n return;\n }\n\n if (extract === false) {\n return text;\n } // Attempt to extract a possible number from the string passed in\n\n\n var startsAt = text.search(PHONE_NUMBER_START_PATTERN);\n\n if (startsAt < 0) {\n return;\n }\n\n return text // Trim everything to the left of the phone number\n .slice(startsAt) // Remove trailing non-numerical characters\n .replace(AFTER_PHONE_NUMBER_END_PATTERN, '');\n}\n/**\r\n * @param {string} text - Input.\r\n * @param {boolean} v2 - Legacy API functions don't pass `v2: true` flag.\r\n * @param {boolean} [extract] - Whether to extract a phone number from `text`, or attempt to parse the entire text as a phone number.\r\n * @return {object} `{ ?number, ?ext }`.\r\n */\n\n\nfunction parseInput(text, v2, extract) {\n // // Parse RFC 3966 phone number URI.\n // if (text && text.indexOf('tel:') === 0) {\n // \treturn parseRFC3966(text)\n // }\n // let number = extractFormattedPhoneNumber(text, extract, v2)\n var number = extractFormattedPhoneNumberFromPossibleRfc3966NumberUri(text, {\n extractFormattedPhoneNumber: function extractFormattedPhoneNumber(text) {\n return _extractFormattedPhoneNumber(text, extract, v2);\n }\n }); // If the phone number is not viable, then abort.\n\n if (!number) {\n return {};\n }\n\n if (!isViablePhoneNumber(number)) {\n if (isViablePhoneNumberStart(number)) {\n return {\n error: 'TOO_SHORT'\n };\n }\n\n return {};\n } // Attempt to parse extension first, since it doesn't require region-specific\n // data and we want to have the non-normalised number here.\n\n\n var withExtensionStripped = extractExtension(number);\n\n if (withExtensionStripped.ext) {\n return withExtensionStripped;\n }\n\n return {\n number: number\n };\n}\n/**\r\n * Creates `parse()` result object.\r\n */\n\n\nfunction result(country, nationalNumber, ext) {\n var result = {\n country: country,\n phone: nationalNumber\n };\n\n if (ext) {\n result.ext = ext;\n }\n\n return result;\n}\n/**\r\n * Parses a viable phone number.\r\n * @param {string} formattedPhoneNumber — Example: \"(213) 373-4253\".\r\n * @param {string} [defaultCountry]\r\n * @param {string} [defaultCallingCode]\r\n * @param {Metadata} metadata\r\n * @return {object} Returns `{ country: string?, countryCallingCode: string?, nationalNumber: string? }`.\r\n */\n\n\nfunction parsePhoneNumber(formattedPhoneNumber, defaultCountry, defaultCallingCode, metadata) {\n // Extract calling code from phone number.\n var _extractCountryCallin = extractCountryCallingCode(parseIncompletePhoneNumber(formattedPhoneNumber), defaultCountry, defaultCallingCode, metadata.metadata),\n countryCallingCodeSource = _extractCountryCallin.countryCallingCodeSource,\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number; // Choose a country by `countryCallingCode`.\n\n\n var country;\n\n if (countryCallingCode) {\n metadata.selectNumberingPlan(countryCallingCode);\n } // If `formattedPhoneNumber` is passed in \"national\" format\n // then `number` is defined and `countryCallingCode` is `undefined`.\n else if (number && (defaultCountry || defaultCallingCode)) {\n metadata.selectNumberingPlan(defaultCountry, defaultCallingCode);\n\n if (defaultCountry) {\n country = defaultCountry;\n } else {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n country = '001';\n }\n }\n }\n\n countryCallingCode = defaultCallingCode || getCountryCallingCode(defaultCountry, metadata.metadata);\n } else return {};\n\n if (!number) {\n return {\n countryCallingCodeSource: countryCallingCodeSource,\n countryCallingCode: countryCallingCode\n };\n }\n\n var _extractNationalNumbe = extractNationalNumber(parseIncompletePhoneNumber(number), metadata),\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode; // Sometimes there are several countries\n // corresponding to the same country phone code\n // (e.g. NANPA countries all having `1` country phone code).\n // Therefore, to reliably determine the exact country,\n // national (significant) number should have been parsed first.\n //\n // When `metadata.json` is generated, all \"ambiguous\" country phone codes\n // get their countries populated with the full set of\n // \"phone number type\" regular expressions.\n //\n\n\n var exactCountry = getCountryByCallingCode(countryCallingCode, {\n nationalNumber: nationalNumber,\n defaultCountry: defaultCountry,\n metadata: metadata\n });\n\n if (exactCountry) {\n country = exactCountry;\n /* istanbul ignore if */\n\n if (exactCountry === '001') {// Can't happen with `USE_NON_GEOGRAPHIC_COUNTRY_CODE` being `false`.\n // If `USE_NON_GEOGRAPHIC_COUNTRY_CODE` is set to `true` for some reason,\n // then remove the \"istanbul ignore if\".\n } else {\n metadata.country(country);\n }\n }\n\n return {\n country: country,\n countryCallingCode: countryCallingCode,\n countryCallingCodeSource: countryCallingCodeSource,\n nationalNumber: nationalNumber,\n carrierCode: carrierCode\n };\n}\n//# sourceMappingURL=parse.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport parse from './parse.js';\nexport default function parsePhoneNumberWithError(text, options, metadata) {\n return parse(text, _objectSpread(_objectSpread({}, options), {}, {\n v2: true\n }), metadata);\n}\n//# sourceMappingURL=parsePhoneNumberWithError_.js.map","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport parsePhoneNumberWithError from './parsePhoneNumberWithError_.js';\nimport ParseError from './ParseError.js';\nimport { isSupportedCountry } from './metadata.js';\nexport default function parsePhoneNumber(text, options, metadata) {\n // Validate `defaultCountry`.\n if (options && options.defaultCountry && !isSupportedCountry(options.defaultCountry, metadata)) {\n options = _objectSpread(_objectSpread({}, options), {}, {\n defaultCountry: undefined\n });\n } // Parse phone number.\n\n\n try {\n return parsePhoneNumberWithError(text, options, metadata);\n } catch (error) {\n /* istanbul ignore else */\n if (error instanceof ParseError) {//\n } else {\n throw error;\n }\n }\n}\n//# sourceMappingURL=parsePhoneNumber_.js.map","// This file is a workaround for a bug in web browsers' \"native\"\n// ES6 importing system which is uncapable of importing \"*.json\" files.\n// https://github.com/catamphetamine/libphonenumber-js/issues/239\nexport default {\"version\":4,\"country_calling_codes\":{\"1\":[\"US\",\"AG\",\"AI\",\"AS\",\"BB\",\"BM\",\"BS\",\"CA\",\"DM\",\"DO\",\"GD\",\"GU\",\"JM\",\"KN\",\"KY\",\"LC\",\"MP\",\"MS\",\"PR\",\"SX\",\"TC\",\"TT\",\"VC\",\"VG\",\"VI\"],\"7\":[\"RU\",\"KZ\"],\"20\":[\"EG\"],\"27\":[\"ZA\"],\"30\":[\"GR\"],\"31\":[\"NL\"],\"32\":[\"BE\"],\"33\":[\"FR\"],\"34\":[\"ES\"],\"36\":[\"HU\"],\"39\":[\"IT\",\"VA\"],\"40\":[\"RO\"],\"41\":[\"CH\"],\"43\":[\"AT\"],\"44\":[\"GB\",\"GG\",\"IM\",\"JE\"],\"45\":[\"DK\"],\"46\":[\"SE\"],\"47\":[\"NO\",\"SJ\"],\"48\":[\"PL\"],\"49\":[\"DE\"],\"51\":[\"PE\"],\"52\":[\"MX\"],\"53\":[\"CU\"],\"54\":[\"AR\"],\"55\":[\"BR\"],\"56\":[\"CL\"],\"57\":[\"CO\"],\"58\":[\"VE\"],\"60\":[\"MY\"],\"61\":[\"AU\",\"CC\",\"CX\"],\"62\":[\"ID\"],\"63\":[\"PH\"],\"64\":[\"NZ\"],\"65\":[\"SG\"],\"66\":[\"TH\"],\"81\":[\"JP\"],\"82\":[\"KR\"],\"84\":[\"VN\"],\"86\":[\"CN\"],\"90\":[\"TR\"],\"91\":[\"IN\"],\"92\":[\"PK\"],\"93\":[\"AF\"],\"94\":[\"LK\"],\"95\":[\"MM\"],\"98\":[\"IR\"],\"211\":[\"SS\"],\"212\":[\"MA\",\"EH\"],\"213\":[\"DZ\"],\"216\":[\"TN\"],\"218\":[\"LY\"],\"220\":[\"GM\"],\"221\":[\"SN\"],\"222\":[\"MR\"],\"223\":[\"ML\"],\"224\":[\"GN\"],\"225\":[\"CI\"],\"226\":[\"BF\"],\"227\":[\"NE\"],\"228\":[\"TG\"],\"229\":[\"BJ\"],\"230\":[\"MU\"],\"231\":[\"LR\"],\"232\":[\"SL\"],\"233\":[\"GH\"],\"234\":[\"NG\"],\"235\":[\"TD\"],\"236\":[\"CF\"],\"237\":[\"CM\"],\"238\":[\"CV\"],\"239\":[\"ST\"],\"240\":[\"GQ\"],\"241\":[\"GA\"],\"242\":[\"CG\"],\"243\":[\"CD\"],\"244\":[\"AO\"],\"245\":[\"GW\"],\"246\":[\"IO\"],\"247\":[\"AC\"],\"248\":[\"SC\"],\"249\":[\"SD\"],\"250\":[\"RW\"],\"251\":[\"ET\"],\"252\":[\"SO\"],\"253\":[\"DJ\"],\"254\":[\"KE\"],\"255\":[\"TZ\"],\"256\":[\"UG\"],\"257\":[\"BI\"],\"258\":[\"MZ\"],\"260\":[\"ZM\"],\"261\":[\"MG\"],\"262\":[\"RE\",\"YT\"],\"263\":[\"ZW\"],\"264\":[\"NA\"],\"265\":[\"MW\"],\"266\":[\"LS\"],\"267\":[\"BW\"],\"268\":[\"SZ\"],\"269\":[\"KM\"],\"290\":[\"SH\",\"TA\"],\"291\":[\"ER\"],\"297\":[\"AW\"],\"298\":[\"FO\"],\"299\":[\"GL\"],\"350\":[\"GI\"],\"351\":[\"PT\"],\"352\":[\"LU\"],\"353\":[\"IE\"],\"354\":[\"IS\"],\"355\":[\"AL\"],\"356\":[\"MT\"],\"357\":[\"CY\"],\"358\":[\"FI\",\"AX\"],\"359\":[\"BG\"],\"370\":[\"LT\"],\"371\":[\"LV\"],\"372\":[\"EE\"],\"373\":[\"MD\"],\"374\":[\"AM\"],\"375\":[\"BY\"],\"376\":[\"AD\"],\"377\":[\"MC\"],\"378\":[\"SM\"],\"380\":[\"UA\"],\"381\":[\"RS\"],\"382\":[\"ME\"],\"383\":[\"XK\"],\"385\":[\"HR\"],\"386\":[\"SI\"],\"387\":[\"BA\"],\"389\":[\"MK\"],\"420\":[\"CZ\"],\"421\":[\"SK\"],\"423\":[\"LI\"],\"500\":[\"FK\"],\"501\":[\"BZ\"],\"502\":[\"GT\"],\"503\":[\"SV\"],\"504\":[\"HN\"],\"505\":[\"NI\"],\"506\":[\"CR\"],\"507\":[\"PA\"],\"508\":[\"PM\"],\"509\":[\"HT\"],\"590\":[\"GP\",\"BL\",\"MF\"],\"591\":[\"BO\"],\"592\":[\"GY\"],\"593\":[\"EC\"],\"594\":[\"GF\"],\"595\":[\"PY\"],\"596\":[\"MQ\"],\"597\":[\"SR\"],\"598\":[\"UY\"],\"599\":[\"CW\",\"BQ\"],\"670\":[\"TL\"],\"672\":[\"NF\"],\"673\":[\"BN\"],\"674\":[\"NR\"],\"675\":[\"PG\"],\"676\":[\"TO\"],\"677\":[\"SB\"],\"678\":[\"VU\"],\"679\":[\"FJ\"],\"680\":[\"PW\"],\"681\":[\"WF\"],\"682\":[\"CK\"],\"683\":[\"NU\"],\"685\":[\"WS\"],\"686\":[\"KI\"],\"687\":[\"NC\"],\"688\":[\"TV\"],\"689\":[\"PF\"],\"690\":[\"TK\"],\"691\":[\"FM\"],\"692\":[\"MH\"],\"850\":[\"KP\"],\"852\":[\"HK\"],\"853\":[\"MO\"],\"855\":[\"KH\"],\"856\":[\"LA\"],\"880\":[\"BD\"],\"886\":[\"TW\"],\"960\":[\"MV\"],\"961\":[\"LB\"],\"962\":[\"JO\"],\"963\":[\"SY\"],\"964\":[\"IQ\"],\"965\":[\"KW\"],\"966\":[\"SA\"],\"967\":[\"YE\"],\"968\":[\"OM\"],\"970\":[\"PS\"],\"971\":[\"AE\"],\"972\":[\"IL\"],\"973\":[\"BH\"],\"974\":[\"QA\"],\"975\":[\"BT\"],\"976\":[\"MN\"],\"977\":[\"NP\"],\"992\":[\"TJ\"],\"993\":[\"TM\"],\"994\":[\"AZ\"],\"995\":[\"GE\"],\"996\":[\"KG\"],\"998\":[\"UZ\"]},\"countries\":{\"AC\":[\"247\",\"00\",\"(?:[01589]\\\\d|[46])\\\\d{4}\",[5,6]],\"AD\":[\"376\",\"00\",\"(?:1|6\\\\d)\\\\d{7}|[135-9]\\\\d{5}\",[6,8,9],[[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"[135-9]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"1\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]]]],\"AE\":[\"971\",\"00\",\"(?:[4-7]\\\\d|9[0-689])\\\\d{7}|800\\\\d{2,9}|[2-4679]\\\\d{7}\",[5,6,7,8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{2,9})\",\"$1 $2\",[\"60|8\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[236]|[479][2-8]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{5})\",\"$1 $2 $3\",[\"[479]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"]],\"0\"],\"AF\":[\"93\",\"00\",\"[2-7]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-7]\"],\"0$1\"]],\"0\"],\"AG\":[\"1\",\"011\",\"(?:268|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([457]\\\\d{6})$|1\",\"268$1\",0,\"268\"],\"AI\":[\"1\",\"011\",\"(?:264|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2457]\\\\d{6})$|1\",\"264$1\",0,\"264\"],\"AL\":[\"355\",\"00\",\"(?:700\\\\d\\\\d|900)\\\\d{3}|8\\\\d{5,7}|(?:[2-5]|6\\\\d)\\\\d{7}\",[6,7,8,9],[[\"(\\\\d{3})(\\\\d{3,4})\",\"$1 $2\",[\"80|9\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"4[2-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2358][2-5]|4\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[23578]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"6\"],\"0$1\"]],\"0\"],\"AM\":[\"374\",\"00\",\"(?:[1-489]\\\\d|55|60|77)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]0\"],\"0 $1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"2|3[12]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"1|47\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[3-9]\"],\"0$1\"]],\"0\"],\"AO\":[\"244\",\"00\",\"[29]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[29]\"]]]],\"AR\":[\"54\",\"00\",\"(?:11|[89]\\\\d\\\\d)\\\\d{8}|[2368]\\\\d{9}\",[10,11],[[\"(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$1 $2-$3\",[\"2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9])\",\"2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8]))|2(?:2[24-9]|3[1-59]|47)\",\"2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5[56][46]|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]\",\"2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|58|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|54(?:4|5[13-7]|6[89])|86[3-6]))|2(?:2[24-9]|3[1-59]|47)|38(?:[58][78]|7[378])|3(?:454|85[56])[46]|3(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]\"],\"0$1\",1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2-$3\",[\"1\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[68]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2-$3\",[\"[23]\"],\"0$1\",1],[\"(\\\\d)(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$2 15-$3-$4\",[\"9(?:2[2-469]|3[3-578])\",\"9(?:2(?:2[024-9]|3[0-59]|47|6[245]|9[02-8])|3(?:3[28]|4[03-9]|5[2-46-8]|7[1-578]|8[2-9]))\",\"9(?:2(?:[23]02|6(?:[25]|4[6-8])|9(?:[02356]|4[02568]|72|8[23]))|3(?:3[28]|4(?:[04679]|3[5-8]|5[4-68]|8[2379])|5(?:[2467]|3[237]|8[2-5])|7[1-578]|8(?:[2469]|3[2578]|5[4-8]|7[36-8]|8[5-8])))|92(?:2[24-9]|3[1-59]|47)\",\"9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3[78]|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8[23])|7[1-578]|8(?:[2469]|3[278]|5(?:[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4[35][56]|58[45]|8(?:[38]5|54|76))[4-6]\",\"9(?:2(?:[23]02|6(?:[25]|4(?:64|[78]))|9(?:[02356]|4(?:[0268]|5[2-6])|72|8[23]))|3(?:3[28]|4(?:[04679]|3(?:5(?:4[0-25689]|[56])|[78])|5(?:4[46]|8)|8[2379])|5(?:[2467]|3[237]|8(?:[23]|4(?:[45]|60)|5(?:4[0-39]|5|64)))|7[1-578]|8(?:[2469]|3[278]|5(?:4(?:4|5[13-7]|6[89])|[56][46]|[78])|7[378]|8(?:6[3-6]|[78]))))|92(?:2[24-9]|3[1-59]|47)|93(?:4(?:36|5[56])|8(?:[38]5|76))[4-6]\"],\"0$1\",0,\"$1 $2 $3-$4\"],[\"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$2 15-$3-$4\",[\"91\"],\"0$1\",0,\"$1 $2 $3-$4\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1-$2-$3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$2 15-$3-$4\",[\"9\"],\"0$1\",0,\"$1 $2 $3-$4\"]],\"0\",0,\"0?(?:(11|2(?:2(?:02?|[13]|2[13-79]|4[1-6]|5[2457]|6[124-8]|7[1-4]|8[13-6]|9[1267])|3(?:02?|1[467]|2[03-6]|3[13-8]|[49][2-6]|5[2-8]|[67])|4(?:7[3-578]|9)|6(?:[0136]|2[24-6]|4[6-8]?|5[15-8])|80|9(?:0[1-3]|[19]|2\\\\d|3[1-6]|4[02568]?|5[2-4]|6[2-46]|72?|8[23]?))|3(?:3(?:2[79]|6|8[2578])|4(?:0[0-24-9]|[12]|3[5-8]?|4[24-7]|5[4-68]?|6[02-9]|7[126]|8[2379]?|9[1-36-8])|5(?:1|2[1245]|3[237]?|4[1-46-9]|6[2-4]|7[1-6]|8[2-5]?)|6[24]|7(?:[069]|1[1568]|2[15]|3[145]|4[13]|5[14-8]|7[2-57]|8[126])|8(?:[01]|2[15-7]|3[2578]?|4[13-6]|5[4-8]?|6[1-357-9]|7[36-8]?|8[5-8]?|9[124])))15)?\",\"9$1\"],\"AS\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|684|900)\\\\d{7}\",[10],0,\"1\",0,\"([267]\\\\d{6})$|1\",\"684$1\",0,\"684\"],\"AT\":[\"43\",\"00\",\"1\\\\d{3,12}|2\\\\d{6,12}|43(?:(?:0\\\\d|5[02-9])\\\\d{3,9}|2\\\\d{4,5}|[3467]\\\\d{4}|8\\\\d{4,6}|9\\\\d{4,7})|5\\\\d{4,12}|8\\\\d{7,12}|9\\\\d{8,12}|(?:[367]\\\\d|4[0-24-9])\\\\d{4,11}\",[4,5,6,7,8,9,10,11,12,13],[[\"(\\\\d)(\\\\d{3,12})\",\"$1 $2\",[\"1(?:11|[2-9])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})\",\"$1 $2\",[\"517\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,5})\",\"$1 $2\",[\"5[079]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,10})\",\"$1 $2\",[\"(?:31|4)6|51|6(?:5[0-3579]|[6-9])|7(?:20|32|8)|[89]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3,9})\",\"$1 $2\",[\"[2-467]|5[2-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4,7})\",\"$1 $2 $3\",[\"5\"],\"0$1\"]],\"0\"],\"AU\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{7}(?:\\\\d(?:\\\\d{2})?)?|8[0-24-9]\\\\d{7})|[2-478]\\\\d{8}|1\\\\d{4,7}\",[5,6,7,8,9,10,12],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1 $2\",[\"16\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"16\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"14|4\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[2378]\"],\"(0$1)\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1(?:30|[89])\"]]],\"0\",0,\"(183[12])|0\",0,0,0,[[\"(?:(?:(?:2(?:[0-26-9]\\\\d|3[0-8]|4[02-9]|5[0135-9])|7(?:[013-57-9]\\\\d|2[0-8]))\\\\d|3(?:(?:[0-3589]\\\\d|6[1-9]|7[0-35-9])\\\\d|4(?:[0-578]\\\\d|90)))\\\\d\\\\d|8(?:51(?:0(?:0[03-9]|[12479]\\\\d|3[2-9]|5[0-8]|6[1-9]|8[0-7])|1(?:[0235689]\\\\d|1[0-69]|4[0-589]|7[0-47-9])|2(?:0[0-79]|[18][13579]|2[14-9]|3[0-46-9]|[4-6]\\\\d|7[89]|9[0-4])|3\\\\d\\\\d)|(?:6[0-8]|[78]\\\\d)\\\\d{3}|9(?:[02-9]\\\\d{3}|1(?:(?:[0-58]\\\\d|6[0135-9])\\\\d|7(?:0[0-24-9]|[1-9]\\\\d)|9(?:[0-46-9]\\\\d|5[0-79])))))\\\\d{3}\",[9]],[\"4(?:79[01]|83[0-389]|94[0-4])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,[\"163\\\\d{2,6}\",[5,6,7,8,9]],[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"AW\":[\"297\",\"00\",\"(?:[25-79]\\\\d\\\\d|800)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[25-9]\"]]]],\"AX\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"2\\\\d{4,9}|35\\\\d{4,5}|(?:60\\\\d\\\\d|800)\\\\d{4,6}|7\\\\d{5,11}|(?:[14]\\\\d|3[0-46-9]|50)\\\\d{4,8}\",[5,6,7,8,9,10,11,12],0,\"0\",0,0,0,0,\"18\",0,\"00\"],\"AZ\":[\"994\",\"00\",\"365\\\\d{6}|(?:[124579]\\\\d|60|88)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[28]|2|365|46\",\"1[28]|2|365[45]|46\",\"1[28]|2|365(?:4|5[02])|46\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[13-9]\"],\"0$1\"]],\"0\"],\"BA\":[\"387\",\"00\",\"6\\\\d{8}|(?:[35689]\\\\d|49|70)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[1-3]|[7-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2-$3\",[\"[3-5]|6[56]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"6\"],\"0$1\"]],\"0\"],\"BB\":[\"1\",\"011\",\"(?:246|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"246$1\",0,\"246\"],\"BD\":[\"880\",\"00\",\"[1-469]\\\\d{9}|8[0-79]\\\\d{7,8}|[2-79]\\\\d{8}|[2-9]\\\\d{7}|[3-9]\\\\d{6}|[57-9]\\\\d{5}\",[6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1-$2\",[\"31[5-8]|[459]1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1-$2\",[\"3(?:[67]|8[013-9])|4(?:6[168]|7|[89][18])|5(?:6[128]|9)|6(?:[15]|28|4[14])|7[2-589]|8(?:0[014-9]|[12])|9[358]|(?:3[2-5]|4[235]|5[2-578]|6[0389]|76|8[3-7]|9[24])1|(?:44|66)[01346-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3,6})\",\"$1-$2\",[\"[13-9]|2[23]\"],\"0$1\"],[\"(\\\\d)(\\\\d{7,8})\",\"$1-$2\",[\"2\"],\"0$1\"]],\"0\"],\"BE\":[\"32\",\"00\",\"4\\\\d{8}|[1-9]\\\\d{7}\",[8,9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:80|9)0\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[239]|4[23]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[15-8]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"4\"],\"0$1\"]],\"0\"],\"BF\":[\"226\",\"00\",\"[025-7]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[025-7]\"]]]],\"BG\":[\"359\",\"00\",\"00800\\\\d{7}|[2-7]\\\\d{6,7}|[89]\\\\d{6,8}|2\\\\d{5}\",[6,7,8,9,12],[[\"(\\\\d)(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"43[1-6]|70[1-9]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[356]|4[124-7]|7[1-9]|8[1-6]|9[1-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:70|8)0\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3\",[\"43[1-7]|7\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[48]|9[08]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"BH\":[\"973\",\"00\",\"[136-9]\\\\d{7}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[13679]|8[02-4679]\"]]]],\"BI\":[\"257\",\"00\",\"(?:[267]\\\\d|31)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2367]\"]]]],\"BJ\":[\"229\",\"00\",\"[24-689]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24-689]\"]]]],\"BL\":[\"590\",\"00\",\"590\\\\d{6}|(?:69|80|9\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"590(?:2[7-9]|3[3-7]|5[12]|87)\\\\d{4}\"],[\"69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\\\d)|6(?:1[016-9]|5[0-4]|[67]\\\\d))\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],0,0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-5])\\\\d{4}\"]]],\"BM\":[\"1\",\"011\",\"(?:441|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"441$1\",0,\"441\"],\"BN\":[\"673\",\"00\",\"[2-578]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-578]\"]]]],\"BO\":[\"591\",\"00(?:1\\\\d)?\",\"8001\\\\d{5}|(?:[2-467]\\\\d|50)\\\\d{6}\",[8,9],[[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[235]|4[46]\"]],[\"(\\\\d{8})\",\"$1\",[\"[67]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\",0,\"0(1\\\\d)?\"],\"BQ\":[\"599\",\"00\",\"(?:[34]1|7\\\\d)\\\\d{5}\",[7],0,0,0,0,0,0,\"[347]\"],\"BR\":[\"55\",\"00(?:1[245]|2[1-35]|31|4[13]|[56]5|99)\",\"(?:[1-46-9]\\\\d\\\\d|5(?:[0-46-9]\\\\d|5[0-46-9]))\\\\d{8}|[1-9]\\\\d{9}|[3589]\\\\d{8}|[34]\\\\d{7}\",[8,9,10,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"300|4(?:0[02]|37)\",\"4(?:02|37)0|[34]00\"]],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{4})\",\"$1 $2 $3\",[\"(?:[358]|90)0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2-$3\",[\"(?:[14689][1-9]|2[12478]|3[1-578]|5[13-5]|7[13-579])[2-57]\"],\"($1)\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1 $2-$3\",[\"[16][1-9]|[2-57-9]\"],\"($1)\"]],\"0\",0,\"(?:0|90)(?:(1[245]|2[1-35]|31|4[13]|[56]5|99)(\\\\d{10,11}))?\",\"$2\"],\"BS\":[\"1\",\"011\",\"(?:242|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([3-8]\\\\d{6})$|1\",\"242$1\",0,\"242\"],\"BT\":[\"975\",\"00\",\"[17]\\\\d{7}|[2-8]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-68]|7[246]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[67]|7\"]]]],\"BW\":[\"267\",\"00\",\"(?:0800|(?:[37]|800)\\\\d)\\\\d{6}|(?:[2-6]\\\\d|90)\\\\d{5}\",[7,8,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"90\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[24-6]|3[15-9]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[37]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]]],\"BY\":[\"375\",\"810\",\"(?:[12]\\\\d|33|44|902)\\\\d{7}|8(?:0[0-79]\\\\d{5,7}|[1-7]\\\\d{9})|8(?:1[0-489]|[5-79]\\\\d)\\\\d{7}|8[1-79]\\\\d{6,7}|8[0-79]\\\\d{5}|8\\\\d{5}\",[6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"800\"],\"8 $1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,4})\",\"$1 $2 $3\",[\"800\"],\"8 $1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{3})\",\"$1 $2-$3\",[\"1(?:5[169]|6[3-5]|7[179])|2(?:1[35]|2[34]|3[3-5])\",\"1(?:5[169]|6(?:3[1-3]|4|5[125])|7(?:1[3-9]|7[0-24-6]|9[2-7]))|2(?:1[35]|2[34]|3[3-5])\"],\"8 0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"1(?:[56]|7[467])|2[1-3]\"],\"8 0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[1-4]\"],\"8 0$1\"],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"8 $1\"]],\"8\",0,\"0|80?\",0,0,0,0,\"8~10\"],\"BZ\":[\"501\",\"00\",\"(?:0800\\\\d|[2-8])\\\\d{6}\",[7,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[2-8]\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})(\\\\d{3})\",\"$1-$2-$3-$4\",[\"0\"]]]],\"CA\":[\"1\",\"011\",\"(?:[2-8]\\\\d|90)\\\\d{8}|3\\\\d{6}\",[7,10],0,\"1\",0,0,0,0,0,[[\"(?:2(?:04|[23]6|[48]9|50|63)|3(?:06|43|54|6[578]|82)|4(?:03|1[68]|[26]8|3[178]|50|74)|5(?:06|1[49]|48|79|8[147])|6(?:04|[18]3|39|47|72)|7(?:0[59]|42|53|78|8[02])|8(?:[06]7|19|25|7[39])|90[25])[2-9]\\\\d{6}\",[10]],[\"\",[10]],[\"8(?:00|33|44|55|66|77|88)[2-9]\\\\d{6}\",[10]],[\"900[2-9]\\\\d{6}\",[10]],[\"52(?:3(?:[2-46-9][02-9]\\\\d|5(?:[02-46-9]\\\\d|5[0-46-9]))|4(?:[2-478][02-9]\\\\d|5(?:[034]\\\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\\\d)|9(?:[05-9]\\\\d|2[0-5]|49)))\\\\d{4}|52[34][2-9]1[02-9]\\\\d{4}|(?:5(?:00|2[125-9]|33|44|66|77|88)|622)[2-9]\\\\d{6}\",[10]],0,[\"310\\\\d{4}\",[7]],0,[\"600[2-9]\\\\d{6}\",[10]]]],\"CC\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{8}(?:\\\\d{2})?|8[0-24-9]\\\\d{7})|[148]\\\\d{8}|1\\\\d{5,7}\",[6,7,8,9,10,12],0,\"0\",0,\"([59]\\\\d{7})$|0\",\"8$1\",0,0,[[\"8(?:51(?:0(?:02|31|60|89)|1(?:18|76)|223)|91(?:0(?:1[0-2]|29)|1(?:[28]2|50|79)|2(?:10|64)|3(?:[06]8|22)|4[29]8|62\\\\d|70[23]|959))\\\\d{3}\",[9]],[\"4(?:79[01]|83[0-389]|94[0-4])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,0,[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"CD\":[\"243\",\"00\",\"(?:(?:[189]|5\\\\d)\\\\d|2)\\\\d{7}|[1-68]\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"[1-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"5\"],\"0$1\"]],\"0\"],\"CF\":[\"236\",\"00\",\"(?:[27]\\\\d{3}|8776)\\\\d{4}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[278]\"]]]],\"CG\":[\"242\",\"00\",\"222\\\\d{6}|(?:0\\\\d|80)\\\\d{7}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[02]\"]]]],\"CH\":[\"41\",\"00\",\"8\\\\d{11}|[2-9]\\\\d{8}\",[9,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8[047]|90\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-79]|81\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"8\"],\"0$1\"]],\"0\"],\"CI\":[\"225\",\"00\",\"[02]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d)(\\\\d{5})\",\"$1 $2 $3 $4\",[\"2\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"0\"]]]],\"CK\":[\"682\",\"00\",\"[2-578]\\\\d{4}\",[5],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"[2-578]\"]]]],\"CL\":[\"56\",\"(?:0|1(?:1[0-69]|2[02-5]|5[13-58]|69|7[0167]|8[018]))0\",\"12300\\\\d{6}|6\\\\d{9,10}|[2-9]\\\\d{8}\",[9,10,11],[[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"219\",\"2196\"],\"($1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"44\"]],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2[1-36]\"],\"($1)\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"9[2-9]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"3[2-5]|[47]|5[1-3578]|6[13-57]|8(?:0[1-9]|[1-9])\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"60|8\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"60\"]]]],\"CM\":[\"237\",\"00\",\"[26]\\\\d{8}|88\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"88\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[26]|88\"]]]],\"CN\":[\"86\",\"00|1(?:[12]\\\\d|79)\\\\d\\\\d00\",\"(?:(?:1[03-689]|2\\\\d)\\\\d\\\\d|6)\\\\d{8}|1\\\\d{10}|[126]\\\\d{6}(?:\\\\d(?:\\\\d{2})?)?|86\\\\d{5,6}|(?:[3-579]\\\\d|8[0-57-9])\\\\d{5,9}\",[7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{5,6})\",\"$1 $2\",[\"(?:10|2[0-57-9])[19]|3(?:[157]|35|49|9[1-68])|4(?:1[124-9]|2[179]|6[47-9]|7|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:07|1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3|4[13]|5[1-5]|7[0-79]|9[0-35-9])|(?:4[35]|59|85)[1-9]\",\"(?:10|2[0-57-9])(?:1[02]|9[56])|8078|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))1\",\"10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|80781|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))12\",\"10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|807812|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123\",\"10(?:1(?:0|23)|9[56])|2[0-57-9](?:1(?:00|23)|9[56])|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:1[124-9]|2[179]|[35][1-9]|6[47-9]|7\\\\d|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:078|1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|3\\\\d|4[13]|5[1-5]|7[0-79]|9[0-35-9]))123\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"3(?:[157]|35|49|9[1-68])|4(?:[17]|2[179]|6[47-9]|8[23])|5(?:[1357]|2[37]|4[36]|6[1-46]|80)|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]|4[13]|5[1-5])|(?:4[35]|59|85)[1-9]\",\"(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:[17]\\\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[1-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\\\d|4[13]|5[1-5]))[19]\",\"85[23](?:10|95)|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:[17]\\\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\\\d|4[13]|5[1-5]))(?:10|9[56])\",\"85[23](?:100|95)|(?:3(?:[157]\\\\d|35|49|9[1-68])|4(?:[17]\\\\d|2[179]|[35][1-9]|6[47-9]|8[23])|5(?:[1357]\\\\d|2[37]|4[36]|6[1-46]|80|9[1-9])|6(?:3[1-5]|6[0238]|9[12])|7(?:01|[1579]\\\\d|2[248]|3[014-9]|4[3-6]|6[023689])|8(?:1[236-8]|2[5-7]|[37]\\\\d|5[14-9]|8[36-8]|9[1-8])|9(?:0[1-3689]|1[1-79]|[379]\\\\d|4[13]|5[1-5]))(?:100|9[56])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"(?:4|80)0\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"10|2(?:[02-57-9]|1[1-9])\",\"10|2(?:[02-57-9]|1[1-9])\",\"10[0-79]|2(?:[02-57-9]|1[1-79])|(?:10|21)8(?:0[1-9]|[1-9])\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"3(?:[3-59]|7[02-68])|4(?:[26-8]|3[3-9]|5[2-9])|5(?:3[03-9]|[468]|7[028]|9[2-46-9])|6|7(?:[0-247]|3[04-9]|5[0-4689]|6[2368])|8(?:[1-358]|9[1-7])|9(?:[013479]|5[1-5])|(?:[34]1|55|79|87)[02-9]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{7,8})\",\"$1 $2\",[\"9\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"80\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-578]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"1[3-9]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"[12]\"],\"0$1\",1]],\"0\",0,\"(1(?:[12]\\\\d|79)\\\\d\\\\d)|0\",0,0,0,0,\"00\"],\"CO\":[\"57\",\"00(?:4(?:[14]4|56)|[579])\",\"60\\\\d{8}|(?:1\\\\d|[39])\\\\d{9}\",[10,11],[[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"6|90\"],\"($1)\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"3[0-357]|91\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{7})\",\"$1-$2-$3\",[\"1\"],\"0$1\",0,\"$1 $2 $3\"]],\"0\",0,\"0([3579]|4(?:[14]4|56))?\"],\"CR\":[\"506\",\"00\",\"(?:8\\\\d|90)\\\\d{8}|(?:[24-8]\\\\d{3}|3005)\\\\d{4}\",[8,10],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-7]|8[3-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[89]\"]]],0,0,\"(19(?:0[0-2468]|1[09]|20|66|77|99))\"],\"CU\":[\"53\",\"119\",\"(?:[2-7]|8\\\\d\\\\d)\\\\d{7}|[2-47]\\\\d{6}|[34]\\\\d{5}\",[6,7,8,10],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1 $2\",[\"2[1-4]|[34]\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{6,7})\",\"$1 $2\",[\"7\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"[56]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"8\"],\"0$1\"]],\"0\"],\"CV\":[\"238\",\"0\",\"(?:[2-59]\\\\d\\\\d|800)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[2-589]\"]]]],\"CW\":[\"599\",\"00\",\"(?:[34]1|60|(?:7|9\\\\d)\\\\d)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[3467]\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"9[4-8]\"]]],0,0,0,0,0,\"[69]\"],\"CX\":[\"61\",\"001[14-689]|14(?:1[14]|34|4[17]|[56]6|7[47]|88)0011\",\"1(?:[0-79]\\\\d{8}(?:\\\\d{2})?|8[0-24-9]\\\\d{7})|[148]\\\\d{8}|1\\\\d{5,7}\",[6,7,8,9,10,12],0,\"0\",0,\"([59]\\\\d{7})$|0\",\"8$1\",0,0,[[\"8(?:51(?:0(?:01|30|59|88)|1(?:17|46|75)|2(?:22|35))|91(?:00[6-9]|1(?:[28]1|49|78)|2(?:09|63)|3(?:12|26|75)|4(?:56|97)|64\\\\d|7(?:0[01]|1[0-2])|958))\\\\d{3}\",[9]],[\"4(?:79[01]|83[0-389]|94[0-4])\\\\d{5}|4(?:[0-36]\\\\d|4[047-9]|5[0-25-9]|7[02-8]|8[0-24-9]|9[0-37-9])\\\\d{6}\",[9]],[\"180(?:0\\\\d{3}|2)\\\\d{3}\",[7,10]],[\"190[0-26]\\\\d{6}\",[10]],0,0,0,0,[\"14(?:5(?:1[0458]|[23][458])|71\\\\d)\\\\d{4}\",[9]],[\"13(?:00\\\\d{6}(?:\\\\d{2})?|45[0-4]\\\\d{3})|13\\\\d{4}\",[6,8,10,12]]],\"0011\"],\"CY\":[\"357\",\"00\",\"(?:[279]\\\\d|[58]0)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[257-9]\"]]]],\"CZ\":[\"420\",\"00\",\"(?:[2-578]\\\\d|60)\\\\d{7}|9\\\\d{8,11}\",[9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-8]|9[015-7]\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"96\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]]],\"DE\":[\"49\",\"00\",\"[2579]\\\\d{5,14}|49(?:[34]0|69|8\\\\d)\\\\d\\\\d?|49(?:37|49|60|7[089]|9\\\\d)\\\\d{1,3}|49(?:2[024-9]|3[2-689]|7[1-7])\\\\d{1,8}|(?:1|[368]\\\\d|4[0-8])\\\\d{3,13}|49(?:[015]\\\\d|2[13]|31|[46][1-8])\\\\d{1,9}\",[4,5,6,7,8,9,10,11,12,13,14,15],[[\"(\\\\d{2})(\\\\d{3,13})\",\"$1 $2\",[\"3[02]|40|[68]9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,12})\",\"$1 $2\",[\"2(?:0[1-389]|1[124]|2[18]|3[14])|3(?:[35-9][15]|4[015])|906|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\",\"2(?:0[1-389]|12[0-8])|3(?:[35-9][15]|4[015])|906|2(?:[13][14]|2[18])|(?:2[4-9]|4[2-9]|[579][1-9]|[68][1-8])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2,11})\",\"$1 $2\",[\"[24-6]|3(?:[3569][02-46-9]|4[2-4679]|7[2-467]|8[2-46-8])|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]\",\"[24-6]|3(?:3(?:0[1-467]|2[127-9]|3[124578]|7[1257-9]|8[1256]|9[145])|4(?:2[135]|4[13578]|9[1346])|5(?:0[14]|2[1-3589]|6[1-4]|7[13468]|8[13568])|6(?:2[1-489]|3[124-6]|6[13]|7[12579]|8[1-356]|9[135])|7(?:2[1-7]|4[145]|6[1-5]|7[1-4])|8(?:21|3[1468]|6|7[1467]|8[136])|9(?:0[12479]|2[1358]|4[134679]|6[1-9]|7[136]|8[147]|9[1468]))|70[2-8]|8(?:0[2-9]|[1-8])|90[7-9]|[79][1-9]|3[68]4[1347]|3(?:47|60)[1356]|3(?:3[46]|46|5[49])[1246]|3[4579]3[1357]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"138\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{2,10})\",\"$1 $2\",[\"3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,11})\",\"$1 $2\",[\"181\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{4,10})\",\"$1 $2 $3\",[\"1(?:3|80)|9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,8})\",\"$1 $2\",[\"1[67]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7,12})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"185\",\"1850\",\"18500\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"18[68]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{7})\",\"$1 $2\",[\"15[1279]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{6})\",\"$1 $2\",[\"15[03568]\",\"15(?:[0568]|31)\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{8})\",\"$1 $2\",[\"18\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{7,8})\",\"$1 $2 $3\",[\"1(?:6[023]|7)\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{7})\",\"$1 $2 $3\",[\"15[279]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{8})\",\"$1 $2 $3\",[\"15\"],\"0$1\"]],\"0\"],\"DJ\":[\"253\",\"00\",\"(?:2\\\\d|77)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[27]\"]]]],\"DK\":[\"45\",\"00\",\"[2-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-9]\"]]]],\"DM\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|767|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"767$1\",0,\"767\"],\"DO\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"8001|8[024]9\"],\"DZ\":[\"213\",\"00\",\"(?:[1-4]|[5-79]\\\\d|80)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-4]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-8]\"],\"0$1\"]],\"0\"],\"EC\":[\"593\",\"00\",\"1\\\\d{9,10}|(?:[2-7]|9\\\\d)\\\\d{7}\",[8,9,10,11],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2-$3\",[\"[2-7]\"],\"(0$1)\",0,\"$1-$2-$3\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"EE\":[\"372\",\"00\",\"8\\\\d{9}|[4578]\\\\d{7}|(?:[3-8]\\\\d|90)\\\\d{5}\",[7,8,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[369]|4[3-8]|5(?:[0-2]|5[0-478]|6[45])|7[1-9]|88\",\"[369]|4[3-8]|5(?:[02]|1(?:[0-8]|95)|5[0-478]|6(?:4[0-4]|5[1-589]))|7[1-9]|88\"]],[\"(\\\\d{4})(\\\\d{3,4})\",\"$1 $2\",[\"[45]|8(?:00|[1-49])\",\"[45]|8(?:00[1-9]|[1-49])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]]],\"EG\":[\"20\",\"00\",\"[189]\\\\d{8,9}|[24-6]\\\\d{8}|[135]\\\\d{7}\",[8,9,10],[[\"(\\\\d)(\\\\d{7,8})\",\"$1 $2\",[\"[23]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6,7})\",\"$1 $2\",[\"1[35]|[4-6]|8[2468]|9[235-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{8})\",\"$1 $2\",[\"1\"],\"0$1\"]],\"0\"],\"EH\":[\"212\",\"00\",\"[5-8]\\\\d{8}\",[9],0,\"0\",0,0,0,0,\"528[89]\"],\"ER\":[\"291\",\"00\",\"[178]\\\\d{6}\",[7],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[178]\"],\"0$1\"]],\"0\"],\"ES\":[\"34\",\"00\",\"[5-9]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[89]00\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-9]\"]]]],\"ET\":[\"251\",\"00\",\"(?:11|[2-579]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-579]\"],\"0$1\"]],\"0\"],\"FI\":[\"358\",\"00|99(?:[01469]|5(?:[14]1|3[23]|5[59]|77|88|9[09]))\",\"[1-35689]\\\\d{4}|7\\\\d{10,11}|(?:[124-7]\\\\d|3[0-46-9])\\\\d{8}|[1-9]\\\\d{5,8}\",[5,6,7,8,9,10,11,12],[[\"(\\\\d{5})\",\"$1\",[\"20[2-59]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1 $2\",[\"(?:[1-3]0|[68])0|70[07-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,8})\",\"$1 $2\",[\"[14]|2[09]|50|7[135]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6,10})\",\"$1 $2\",[\"7\"],\"0$1\"],[\"(\\\\d)(\\\\d{4,9})\",\"$1 $2\",[\"(?:1[49]|[2568])[1-8]|3(?:0[1-9]|[1-9])|9\"],\"0$1\"]],\"0\",0,0,0,0,\"1[03-79]|[2-9]\",0,\"00\"],\"FJ\":[\"679\",\"0(?:0|52)\",\"45\\\\d{5}|(?:0800\\\\d|[235-9])\\\\d{6}\",[7,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[235-9]|45\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]]],0,0,0,0,0,0,0,\"00\"],\"FK\":[\"500\",\"00\",\"[2-7]\\\\d{4}\",[5]],\"FM\":[\"691\",\"00\",\"(?:[39]\\\\d\\\\d|820)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[389]\"]]]],\"FO\":[\"298\",\"00\",\"[2-9]\\\\d{5}\",[6],[[\"(\\\\d{6})\",\"$1\",[\"[2-9]\"]]],0,0,\"(10(?:01|[12]0|88))\"],\"FR\":[\"33\",\"00\",\"[1-9]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0 $1\"],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"[1-79]\"],\"0$1\"]],\"0\"],\"GA\":[\"241\",\"00\",\"(?:[067]\\\\d|11)\\\\d{6}|[2-7]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-7]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"0\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"11|[67]\"],\"0$1\"]],0,0,\"0(11\\\\d{6}|60\\\\d{6}|61\\\\d{6}|6[256]\\\\d{6}|7[467]\\\\d{6})\",\"$1\"],\"GB\":[\"44\",\"00\",\"[1-357-9]\\\\d{9}|[18]\\\\d{8}|8\\\\d{6}\",[7,9,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"800\",\"8001\",\"80011\",\"800111\",\"8001111\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"845\",\"8454\",\"84546\",\"845464\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"800\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{4,5})\",\"$1 $2\",[\"1(?:38|5[23]|69|76|94)\",\"1(?:(?:38|69)7|5(?:24|39)|768|946)\",\"1(?:3873|5(?:242|39[4-6])|(?:697|768)[347]|9467)\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5,6})\",\"$1 $2\",[\"1(?:[2-69][02-9]|[78])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[25]|7(?:0|6[02-9])\",\"[25]|7(?:0|6(?:[03-9]|2[356]))\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"7\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1389]\"],\"0$1\"]],\"0\",0,0,0,0,0,[[\"(?:1(?:1(?:3(?:[0-58]\\\\d\\\\d|73[0-35])|4(?:(?:[0-5]\\\\d|70)\\\\d|69[7-9])|(?:(?:5[0-26-9]|[78][0-49])\\\\d|6(?:[0-4]\\\\d|50))\\\\d)|(?:2(?:(?:0[024-9]|2[3-9]|3[3-79]|4[1-689]|[58][02-9]|6[0-47-9]|7[013-9]|9\\\\d)\\\\d|1(?:[0-7]\\\\d|8[0-3]))|(?:3(?:0\\\\d|1[0-8]|[25][02-9]|3[02-579]|[468][0-46-9]|7[1-35-79]|9[2-578])|4(?:0[03-9]|[137]\\\\d|[28][02-57-9]|4[02-69]|5[0-8]|[69][0-79])|5(?:0[1-35-9]|[16]\\\\d|2[024-9]|3[015689]|4[02-9]|5[03-9]|7[0-35-9]|8[0-468]|9[0-57-9])|6(?:0[034689]|1\\\\d|2[0-35689]|[38][013-9]|4[1-467]|5[0-69]|6[13-9]|7[0-8]|9[0-24578])|7(?:0[0246-9]|2\\\\d|3[0236-8]|4[03-9]|5[0-46-9]|6[013-9]|7[0-35-9]|8[024-9]|9[02-9])|8(?:0[35-9]|2[1-57-9]|3[02-578]|4[0-578]|5[124-9]|6[2-69]|7\\\\d|8[02-9]|9[02569])|9(?:0[02-589]|[18]\\\\d|2[02-689]|3[1-57-9]|4[2-9]|5[0-579]|6[2-47-9]|7[0-24578]|9[2-57]))\\\\d)\\\\d)|2(?:0[013478]|3[0189]|4[017]|8[0-46-9]|9[0-2])\\\\d{3})\\\\d{4}|1(?:2(?:0(?:46[1-4]|87[2-9])|545[1-79]|76(?:2\\\\d|3[1-8]|6[1-6])|9(?:7(?:2[0-4]|3[2-5])|8(?:2[2-8]|7[0-47-9]|8[3-5])))|3(?:6(?:38[2-5]|47[23])|8(?:47[04-9]|64[0157-9]))|4(?:044[1-7]|20(?:2[23]|8\\\\d)|6(?:0(?:30|5[2-57]|6[1-8]|7[2-8])|140)|8(?:052|87[1-3]))|5(?:2(?:4(?:3[2-79]|6\\\\d)|76\\\\d)|6(?:26[06-9]|686))|6(?:06(?:4\\\\d|7[4-79])|295[5-7]|35[34]\\\\d|47(?:24|61)|59(?:5[08]|6[67]|74)|9(?:55[0-4]|77[23]))|7(?:26(?:6[13-9]|7[0-7])|(?:442|688)\\\\d|50(?:2[0-3]|[3-68]2|76))|8(?:27[56]\\\\d|37(?:5[2-5]|8[239])|843[2-58])|9(?:0(?:0(?:6[1-8]|85)|52\\\\d)|3583|4(?:66[1-8]|9(?:2[01]|81))|63(?:23|3[1-4])|9561))\\\\d{3}\",[9,10]],[\"7(?:457[0-57-9]|700[01]|911[028])\\\\d{5}|7(?:[1-3]\\\\d\\\\d|4(?:[0-46-9]\\\\d|5[0-689])|5(?:0[0-8]|[13-9]\\\\d|2[0-35-9])|7(?:0[1-9]|[1-7]\\\\d|8[02-9]|9[0-689])|8(?:[014-9]\\\\d|[23][0-8])|9(?:[024-9]\\\\d|1[02-9]|3[0-689]))\\\\d{6}\",[10]],[\"80[08]\\\\d{7}|800\\\\d{6}|8001111\"],[\"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\\\d|8[2-49]))\\\\d{7}|845464\\\\d\",[7,10]],[\"70\\\\d{8}\",[10]],0,[\"(?:3[0347]|55)\\\\d{8}\",[10]],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\",[10]],[\"56\\\\d{8}\",[10]]],0,\" x\"],\"GD\":[\"1\",\"011\",\"(?:473|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"473$1\",0,\"473\"],\"GE\":[\"995\",\"00\",\"(?:[3-57]\\\\d\\\\d|800)\\\\d{6}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"32\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[57]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[348]\"],\"0$1\"]],\"0\"],\"GF\":[\"594\",\"00\",\"[56]94\\\\d{6}|(?:80|9\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[56]|9[47]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[89]\"],\"0$1\"]],\"0\"],\"GG\":[\"44\",\"00\",\"(?:1481|[357-9]\\\\d{3})\\\\d{6}|8\\\\d{6}(?:\\\\d{2})?\",[7,9,10],0,\"0\",0,\"([25-9]\\\\d{5})$|0\",\"1481$1\",0,0,[[\"1481[25-9]\\\\d{5}\",[10]],[\"7(?:(?:781|839)\\\\d|911[17])\\\\d{5}\",[10]],[\"80[08]\\\\d{7}|800\\\\d{6}|8001111\"],[\"(?:8(?:4[2-5]|7[0-3])|9(?:[01]\\\\d|8[0-3]))\\\\d{7}|845464\\\\d\",[7,10]],[\"70\\\\d{8}\",[10]],0,[\"(?:3[0347]|55)\\\\d{8}\",[10]],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\",[10]],[\"56\\\\d{8}\",[10]]]],\"GH\":[\"233\",\"00\",\"(?:[235]\\\\d{3}|800)\\\\d{5}\",[8,9],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[235]\"],\"0$1\"]],\"0\"],\"GI\":[\"350\",\"00\",\"(?:[25]\\\\d|60)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"2\"]]]],\"GL\":[\"299\",\"00\",\"(?:19|[2-689]\\\\d|70)\\\\d{4}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"19|[2-9]\"]]]],\"GM\":[\"220\",\"00\",\"[2-9]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]]],\"GN\":[\"224\",\"00\",\"722\\\\d{6}|(?:3|6\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"3\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[67]\"]]]],\"GP\":[\"590\",\"00\",\"590\\\\d{6}|(?:69|80|9\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[569]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\",0,0,0,0,0,[[\"590(?:0[1-68]|[14][0-24-9]|2[0-68]|3[1-9]|5[3-579]|[68][0-689]|7[08]|9\\\\d)\\\\d{4}\"],[\"69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\\\d)|6(?:1[016-9]|5[0-4]|[67]\\\\d))\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],0,0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-5])\\\\d{4}\"]]],\"GQ\":[\"240\",\"00\",\"222\\\\d{6}|(?:3\\\\d|55|[89]0)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235]\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[89]\"]]]],\"GR\":[\"30\",\"00\",\"5005000\\\\d{3}|8\\\\d{9,11}|(?:[269]\\\\d|70)\\\\d{8}\",[10,11,12],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"21|7\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"2(?:2|3[2-57-9]|4[2-469]|5[2-59]|6[2-9]|7[2-69]|8[2-49])|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2689]\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{5})\",\"$1 $2 $3\",[\"8\"]]]],\"GT\":[\"502\",\"00\",\"80\\\\d{6}|(?:1\\\\d{3}|[2-7])\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-8]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]]]],\"GU\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|671|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"671$1\",0,\"671\"],\"GW\":[\"245\",\"00\",\"[49]\\\\d{8}|4\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"40\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"]]]],\"GY\":[\"592\",\"001\",\"(?:[2-8]\\\\d{3}|9008)\\\\d{3}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]]],\"HK\":[\"852\",\"00(?:30|5[09]|[126-9]?)\",\"8[0-46-9]\\\\d{6,7}|9\\\\d{4,7}|(?:[2-7]|9\\\\d{3})\\\\d{7}\",[5,6,7,8,9,11],[[\"(\\\\d{3})(\\\\d{2,5})\",\"$1 $2\",[\"900\",\"9003\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2-7]|8[1-4]|9(?:0[1-9]|[1-8])\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"9\"]]],0,0,0,0,0,0,0,\"00\"],\"HN\":[\"504\",\"00\",\"8\\\\d{10}|[237-9]\\\\d{7}\",[8,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"[237-9]\"]]]],\"HR\":[\"385\",\"00\",\"(?:[24-69]\\\\d|3[0-79])\\\\d{7}|80\\\\d{5,7}|[1-79]\\\\d{7}|6\\\\d{5,6}\",[6,7,8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"6[01]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6|7[245]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-57]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"HT\":[\"509\",\"00\",\"(?:[2-489]\\\\d|55)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-589]\"]]]],\"HU\":[\"36\",\"00\",\"[235-7]\\\\d{8}|[1-9]\\\\d{7}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[27][2-9]|3[2-7]|4[24-9]|5[2-79]|6|8[2-57-9]|9[2-69]\"],\"(06 $1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"06 $1\"]],\"06\"],\"ID\":[\"62\",\"00[89]\",\"00[1-9]\\\\d{9,14}|(?:[1-36]|8\\\\d{5})\\\\d{6}|00\\\\d{9}|[1-9]\\\\d{8,10}|[2-9]\\\\d{7}\",[7,8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"15\"]],[\"(\\\\d{2})(\\\\d{5,9})\",\"$1 $2\",[\"2[124]|[36]1\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,7})\",\"$1 $2\",[\"800\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5,8})\",\"$1 $2\",[\"[2-79]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{3})\",\"$1-$2-$3\",[\"8[1-35-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6,8})\",\"$1 $2\",[\"1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"804\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"80\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1-$2-$3\",[\"8\"],\"0$1\"]],\"0\"],\"IE\":[\"353\",\"00\",\"(?:1\\\\d|[2569])\\\\d{6,8}|4\\\\d{6,9}|7\\\\d{8}|8\\\\d{8,9}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"2[24-9]|47|58|6[237-9]|9[35-9]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[45]0\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2569]|4[1-69]|7[14]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"70\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"81\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"4\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"IL\":[\"972\",\"0(?:0|1[2-9])\",\"1\\\\d{6}(?:\\\\d{3,5})?|[57]\\\\d{8}|[1-489]\\\\d{7}\",[7,8,9,10,11,12],[[\"(\\\\d{4})(\\\\d{3})\",\"$1-$2\",[\"125\"]],[\"(\\\\d{4})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"121\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[2-489]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"12\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1-$2\",[\"159\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3-$4\",[\"1[7-9]\"]],[\"(\\\\d{3})(\\\\d{1,2})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3-$4\",[\"15\"]]],\"0\"],\"IM\":[\"44\",\"00\",\"1624\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([25-8]\\\\d{5})$|0\",\"1624$1\",0,\"74576|(?:16|7[56])24\"],\"IN\":[\"91\",\"00\",\"(?:000800|[2-9]\\\\d\\\\d)\\\\d{7}|1\\\\d{7,12}\",[8,9,10,11,12,13],[[\"(\\\\d{8})\",\"$1\",[\"5(?:0|2[23]|3[03]|[67]1|88)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|888)\",\"5(?:0|2(?:21|3)|3(?:0|3[23])|616|717|8888)\"],0,1],[\"(\\\\d{4})(\\\\d{4,5})\",\"$1 $2\",[\"180\",\"1800\"],0,1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"140\"],0,1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"11|2[02]|33|4[04]|79[1-7]|80[2-46]\",\"11|2[02]|33|4[04]|79(?:[1-6]|7[19])|80(?:[2-4]|6[0-589])\",\"11|2[02]|33|4[04]|79(?:[124-6]|3(?:[02-9]|1[0-24-9])|7(?:1|9[1-6]))|80(?:[2-4]|6[0-589])\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1(?:2[0-249]|3[0-25]|4[145]|[68]|7[1257])|2(?:1[257]|3[013]|4[01]|5[0137]|6[0158]|78|8[1568])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|5[12]|[78]1)|6(?:12|[2-4]1|5[17]|6[13]|80)|7(?:12|3[134]|4[47]|61|88)|8(?:16|2[014]|3[126]|6[136]|7[078]|8[34]|91)|(?:43|59|75)[15]|(?:1[59]|29|67|72)[14]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|674|7(?:(?:2[14]|3[34]|5[15])[2-6]|61[346]|88[0-8])|8(?:70[2-6]|84[235-7]|91[3-7])|(?:1(?:29|60|8[06])|261|552|6(?:12|[2-47]1|5[17]|6[13]|80)|7(?:12|31|4[47])|8(?:16|2[014]|3[126]|6[136]|7[78]|83))[2-7]\",\"1(?:2[0-24]|3[0-25]|4[145]|[59][14]|6[1-9]|7[1257]|8[1-57-9])|2(?:1[257]|3[013]|4[01]|5[0137]|6[058]|78|8[1568]|9[14])|3(?:26|4[1-3]|5[34]|6[01489]|7[02-46]|8[159])|4(?:1[36]|2[1-47]|3[15]|5[12]|6[0-26-9]|7[0-24-9]|8[013-57]|9[014-7])|5(?:1[025]|22|[36][25]|4[28]|[578]1|9[15])|6(?:12(?:[2-6]|7[0-8])|74[2-7])|7(?:(?:2[14]|5[15])[2-6]|3171|61[346]|88(?:[2-7]|82))|8(?:70[2-6]|84(?:[2356]|7[19])|91(?:[3-6]|7[19]))|73[134][2-6]|(?:74[47]|8(?:16|2[014]|3[126]|6[136]|7[78]|83))(?:[2-6]|7[19])|(?:1(?:29|60|8[06])|261|552|6(?:[2-4]1|5[17]|6[13]|7(?:1|4[0189])|80)|7(?:12|88[01]))[2-7]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2[2457-9]|3[2-5]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1[013-9]|28|3[129]|4[1-35689]|5[29]|6[02-5]|70)|807\",\"1(?:[2-479]|5[0235-9])|[2-5]|6(?:1[1358]|2(?:[2457]|84|95)|3(?:[2-4]|55)|4[235-7]|5[2-689]|6[24578]|7[235689]|8[1-6])|7(?:1(?:[013-8]|9[6-9])|28[6-8]|3(?:17|2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4|5[0-367])|70[13-7])|807[19]\",\"1(?:[2-479]|5(?:[0236-9]|5[013-9]))|[2-5]|6(?:2(?:84|95)|355|83)|73179|807(?:1|9[1-3])|(?:1552|6(?:1[1358]|2[2457]|3[2-4]|4[235-7]|5[2-689]|6[24578]|7[235689]|8[124-6])\\\\d|7(?:1(?:[013-8]\\\\d|9[6-9])|28[6-8]|3(?:2[0-49]|9[2-57])|4(?:1[2-4]|[29][0-7]|3[0-8]|[56]\\\\d|8[0-24-7])|5(?:2[1-3]|9[0-6])|6(?:0[5689]|2[5-9]|3[02-8]|4\\\\d|5[0-367])|70[13-7]))[2-7]\"],\"0$1\",1],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"[6-9]\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{2,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1(?:6|8[06])\",\"1(?:6|8[06]0)\"],0,1],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"18\"],0,1]],\"0\"],\"IO\":[\"246\",\"00\",\"3\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"3\"]]]],\"IQ\":[\"964\",\"00\",\"(?:1|7\\\\d\\\\d)\\\\d{7}|[2-6]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\"],\"IR\":[\"98\",\"00\",\"[1-9]\\\\d{9}|(?:[1-8]\\\\d\\\\d|9)\\\\d{3,4}\",[4,5,6,7,10],[[\"(\\\\d{4,5})\",\"$1\",[\"96\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4,5})\",\"$1 $2\",[\"(?:1[137]|2[13-68]|3[1458]|4[145]|5[1468]|6[16]|7[1467]|8[13467])[12689]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-8]\"],\"0$1\"]],\"0\"],\"IS\":[\"354\",\"00|1(?:0(?:01|[12]0)|100)\",\"(?:38\\\\d|[4-9])\\\\d{6}\",[7,9],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[4-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"3\"]]],0,0,0,0,0,0,0,\"00\"],\"IT\":[\"39\",\"00\",\"0\\\\d{5,10}|1\\\\d{8,10}|3(?:[0-8]\\\\d{7,10}|9\\\\d{7,8})|(?:43|55|70)\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?\",[6,7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{4,6})\",\"$1 $2\",[\"0[26]\"]],[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"0[13-57-9][0159]|8(?:03|4[17]|9[2-5])\",\"0[13-57-9][0159]|8(?:03|4[17]|9(?:2|3[04]|[45][0-4]))\"]],[\"(\\\\d{4})(\\\\d{2,6})\",\"$1 $2\",[\"0(?:[13-579][2-46-8]|8[236-8])\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"894\"]],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[26]|5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"1(?:44|[679])|[378]|43\"]],[\"(\\\\d{3})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"0[13-57-9][0159]|14\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{5})\",\"$1 $2 $3\",[\"0[26]\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"3\"]]],0,0,0,0,0,0,[[\"0669[0-79]\\\\d{1,6}|0(?:1(?:[0159]\\\\d|[27][1-5]|31|4[1-4]|6[1356]|8[2-57])|2\\\\d\\\\d|3(?:[0159]\\\\d|2[1-4]|3[12]|[48][1-6]|6[2-59]|7[1-7])|4(?:[0159]\\\\d|[23][1-9]|4[245]|6[1-5]|7[1-4]|81)|5(?:[0159]\\\\d|2[1-5]|3[2-6]|4[1-79]|6[4-6]|7[1-578]|8[3-8])|6(?:[0-57-9]\\\\d|6[0-8])|7(?:[0159]\\\\d|2[12]|3[1-7]|4[2-46]|6[13569]|7[13-6]|8[1-59])|8(?:[0159]\\\\d|2[3-578]|3[1-356]|[6-8][1-5])|9(?:[0159]\\\\d|[238][1-5]|4[12]|6[1-8]|7[1-6]))\\\\d{2,7}\",[6,7,8,9,10,11]],[\"3[2-9]\\\\d{7,8}|(?:31|43)\\\\d{8}\",[9,10]],[\"80(?:0\\\\d{3}|3)\\\\d{3}\",[6,9]],[\"(?:0878\\\\d{3}|89(?:2\\\\d|3[04]|4(?:[0-4]|[5-9]\\\\d\\\\d)|5[0-4]))\\\\d\\\\d|(?:1(?:44|6[346])|89(?:38|5[5-9]|9))\\\\d{6}\",[6,8,9,10]],[\"1(?:78\\\\d|99)\\\\d{6}\",[9,10]],[\"3[2-8]\\\\d{9,10}\",[11,12]],0,0,[\"55\\\\d{8}\",[10]],[\"84(?:[08]\\\\d{3}|[17])\\\\d{3}\",[6,9]]]],\"JE\":[\"44\",\"00\",\"1534\\\\d{6}|(?:[3578]\\\\d|90)\\\\d{8}\",[10],0,\"0\",0,\"([0-24-8]\\\\d{5})$|0\",\"1534$1\",0,0,[[\"1534[0-24-8]\\\\d{5}\"],[\"7(?:(?:(?:50|82)9|937)\\\\d|7(?:00[378]|97\\\\d))\\\\d{5}\"],[\"80(?:07(?:35|81)|8901)\\\\d{4}\"],[\"(?:8(?:4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|90(?:066[59]|1810|71(?:07|55)))\\\\d{4}\"],[\"701511\\\\d{4}\"],0,[\"(?:3(?:0(?:07(?:35|81)|8901)|3\\\\d{4}|4(?:4(?:4(?:05|42|69)|703)|5(?:041|800))|7(?:0002|1206))|55\\\\d{4})\\\\d{4}\"],[\"76(?:464|652)\\\\d{5}|76(?:0[0-28]|2[356]|34|4[01347]|5[49]|6[0-369]|77|8[14]|9[139])\\\\d{6}\"],[\"56\\\\d{8}\"]]],\"JM\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|658|900)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"658|876\"],\"JO\":[\"962\",\"00\",\"(?:(?:[2689]|7\\\\d)\\\\d|32|53)\\\\d{6}\",[8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2356]|87\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"70\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\"],\"JP\":[\"81\",\"010\",\"00[1-9]\\\\d{6,14}|[257-9]\\\\d{9}|(?:00|[1-9]\\\\d\\\\d)\\\\d{6}\",[8,9,10,11,12,13,14,15,16,17],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1-$2-$3\",[\"(?:12|57|99)0\"],\"0$1\"],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:26|3[79]|4[56]|5[4-68]|6[3-5])|499|5(?:76|97)|746|8(?:3[89]|47|51)|9(?:80|9[16])\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:76|97)9|7468|8(?:3(?:8[7-9]|96)|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\",\"1(?:267|3(?:7[247]|9[278])|466|5(?:47|58|64)|6(?:3[245]|48|5[4-68]))|499[2468]|5(?:769|979[2-69])|7468|8(?:3(?:8[7-9]|96[2457-9])|477|51[2-9])|9(?:802|9(?:1[23]|69))|1(?:45|58)[67]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"60\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[36]|4(?:2[09]|7[01])\",\"[36]|4(?:2(?:0|9[02-69])|7(?:0[019]|1))\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"1(?:1|5[45]|77|88|9[69])|2(?:2[1-37]|3[0-269]|4[59]|5|6[24]|7[1-358]|8[1369]|9[0-38])|4(?:[28][1-9]|3[0-57]|[45]|6[248]|7[2-579]|9[29])|5(?:2|3[0459]|4[0-369]|5[29]|8[02389]|9[0-389])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9[2-6])|8(?:2[124589]|3[26-9]|49|51|6|7[0-468]|8[68]|9[019])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9[1-489])\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2(?:[127]|3[014-9])|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9[19])|62|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|8[1-9]|9[29])|5(?:2|3(?:[045]|9[0-8])|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0-2469])|3(?:[29]|60)|49|51|6(?:[0-24]|36|5[0-3589]|7[23]|9[01459])|7[0-468]|8[68])|9(?:[23][1-9]|4[15]|5[138]|6[1-3]|7[156]|8[189]|9(?:[1289]|3[34]|4[0178]))|(?:264|837)[016-9]|2(?:57|93)[015-9]|(?:25[0468]|422|838)[01]|(?:47[59]|59[89]|8(?:6[68]|9))[019]\",\"1(?:1|5(?:4[018]|5[017])|77|88|9[69])|2(?:2[127]|3[0-269]|4[59]|5(?:[1-3]|5[0-69]|9(?:17|99))|6(?:2|4[016-9])|7(?:[1-35]|8[0189])|8(?:[16]|3[0134]|9[0-5])|9(?:[028]|17))|4(?:2(?:[13-79]|8[014-6])|3[0-57]|[45]|6[248]|7[2-47]|9[29])|5(?:2|3(?:[045]|9(?:[0-58]|6[4-9]|7[0-35689]))|4[0-369]|5[29]|8[02389]|9[0-3])|7(?:2[02-46-9]|34|[58]|6[0249]|7[57]|9(?:[23]|4[0-59]|5[01569]|6[0167]))|8(?:2(?:[1258]|4[0-39]|9[0169])|3(?:[29]|60|7(?:[017-9]|6[6-8]))|49|51|6(?:[0-24]|36[2-57-9]|5(?:[0-389]|5[23])|6(?:[01]|9[178])|7(?:2[2-468]|3[78])|9[0145])|7[0-468]|8[68])|9(?:4[15]|5[138]|7[156]|8[189]|9(?:[1289]|3(?:31|4[357])|4[0178]))|(?:8294|96)[1-3]|2(?:57|93)[015-9]|(?:223|8699)[014-9]|(?:25[0468]|422|838)[01]|(?:48|8292|9[23])[1-9]|(?:47[59]|59[89]|8(?:68|9))[019]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3\",[\"[14]|[289][2-9]|5[3-9]|7[2-4679]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"800\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[257-9]\"],\"0$1\"]],\"0\",0,\"(000[259]\\\\d{6})$|(?:(?:003768)0?)|0\",\"$1\"],\"KE\":[\"254\",\"000\",\"(?:[17]\\\\d\\\\d|900)\\\\d{6}|(?:2|80)0\\\\d{6,7}|[4-6]\\\\d{6,8}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"[24-6]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[17]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\"],\"KG\":[\"996\",\"00\",\"8\\\\d{9}|[235-9]\\\\d{8}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3(?:1[346]|[24-79])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[235-79]|88\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d)(\\\\d{2,3})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"KH\":[\"855\",\"00[14-9]\",\"1\\\\d{9}|[1-9]\\\\d{7,8}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"KI\":[\"686\",\"00\",\"(?:[37]\\\\d|6[0-79])\\\\d{6}|(?:[2-48]\\\\d|50)\\\\d{3}\",[5,8],0,\"0\"],\"KM\":[\"269\",\"00\",\"[3478]\\\\d{6}\",[7],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[3478]\"]]]],\"KN\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"869$1\",0,\"869\"],\"KP\":[\"850\",\"00|99\",\"85\\\\d{6}|(?:19\\\\d|[2-7])\\\\d{7}\",[8,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-7]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"]],\"0\"],\"KR\":[\"82\",\"00(?:[125689]|3(?:[46]5|91)|7(?:00|27|3|55|6[126]))\",\"00[1-9]\\\\d{8,11}|(?:[12]|5\\\\d{3})\\\\d{7}|[13-6]\\\\d{9}|(?:[1-6]\\\\d|80)\\\\d{7}|[3-6]\\\\d{4,5}|(?:00|7)0\\\\d{8}\",[5,6,8,9,10,11,12,13,14],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1-$2\",[\"(?:3[1-3]|[46][1-4]|5[1-5])1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"1\"]],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1-$2-$3\",[\"[36]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1-$2-$3\",[\"[1346]|5[1-5]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2-$3\",[\"[57]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})(\\\\d{4})\",\"$1-$2-$3\",[\"5\"],\"0$1\"]],\"0\",0,\"0(8(?:[1-46-8]|5\\\\d\\\\d))?\"],\"KW\":[\"965\",\"00\",\"18\\\\d{5}|(?:[2569]\\\\d|41)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3,4})\",\"$1 $2\",[\"[169]|2(?:[235]|4[1-35-9])|52\"]],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[245]\"]]]],\"KY\":[\"1\",\"011\",\"(?:345|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"345$1\",0,\"345\"],\"KZ\":[\"7\",\"810\",\"(?:33622|8\\\\d{8})\\\\d{5}|[78]\\\\d{9}\",[10,14],0,\"8\",0,0,0,0,\"33|7\",0,\"8~10\"],\"LA\":[\"856\",\"00\",\"[23]\\\\d{9}|3\\\\d{8}|(?:[235-8]\\\\d|41)\\\\d{6}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2[13]|3[14]|[4-8]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"30[0135-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[23]\"],\"0$1\"]],\"0\"],\"LB\":[\"961\",\"00\",\"[27-9]\\\\d{7}|[13-9]\\\\d{6}\",[7,8],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[13-69]|7(?:[2-57]|62|8[0-7]|9[04-9])|8[02-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[27-9]\"]]],\"0\"],\"LC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|758|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-8]\\\\d{6})$|1\",\"758$1\",0,\"758\"],\"LI\":[\"423\",\"00\",\"[68]\\\\d{8}|(?:[2378]\\\\d|90)\\\\d{5}\",[7,9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[2379]|8(?:0[09]|7)\",\"[2379]|8(?:0(?:02|9)|7)\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"69\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]]],\"0\",0,\"(1001)|0\"],\"LK\":[\"94\",\"00\",\"[1-9]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[1-689]\"],\"0$1\"]],\"0\"],\"LR\":[\"231\",\"00\",\"(?:[245]\\\\d|33|77|88)\\\\d{7}|(?:2\\\\d|[4-6])\\\\d{6}\",[7,8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"4[67]|[56]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-578]\"],\"0$1\"]],\"0\"],\"LS\":[\"266\",\"00\",\"(?:[256]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2568]\"]]]],\"LT\":[\"370\",\"00\",\"(?:[3469]\\\\d|52|[78]0)\\\\d{6}\",[8],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"52[0-7]\"],\"(0-$1)\",1],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[7-9]\"],\"0 $1\",1],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"37|4(?:[15]|6[1-8])\"],\"(0-$1)\",1],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[3-6]\"],\"(0-$1)\",1]],\"0\",0,\"[08]\"],\"LU\":[\"352\",\"00\",\"35[013-9]\\\\d{4,8}|6\\\\d{8}|35\\\\d{2,4}|(?:[2457-9]\\\\d|3[0-46-9])\\\\d{2,9}\",[4,5,6,7,8,9,10,11],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"2(?:0[2-689]|[2-9])|[3-57]|8(?:0[2-9]|[13-9])|9(?:0[89]|[2-579])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"20[2-689]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,2})\",\"$1 $2 $3 $4\",[\"2(?:[0367]|4[3-8])\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"80[01]|90[015]\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"20\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,2})\",\"$1 $2 $3 $4 $5\",[\"2(?:[0367]|4[3-8])\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{1,5})\",\"$1 $2 $3 $4\",[\"[3-57]|8[13-9]|9(?:0[89]|[2-579])|(?:2|80)[2-9]\"]]],0,0,\"(15(?:0[06]|1[12]|[35]5|4[04]|6[26]|77|88|99)\\\\d)\"],\"LV\":[\"371\",\"00\",\"(?:[268]\\\\d|90)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[269]|8[01]\"]]]],\"LY\":[\"218\",\"00\",\"[2-9]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"[2-9]\"],\"0$1\"]],\"0\"],\"MA\":[\"212\",\"00\",\"[5-8]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"5[45]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1-$2\",[\"5(?:2[2-46-9]|3[3-9]|9)|8(?:0[89]|92)\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1-$2\",[\"8\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1-$2\",[\"[5-7]\"],\"0$1\"]],\"0\",0,0,0,0,0,[[\"5(?:2(?:[0-25-79]\\\\d|3[1-578]|4[02-46-8]|8[0235-7])|3(?:[0-47]\\\\d|5[02-9]|6[02-8]|8[014-9]|9[3-9])|(?:4[067]|5[03])\\\\d)\\\\d{5}\"],[\"(?:6(?:[0-79]\\\\d|8[0-247-9])|7(?:[0167]\\\\d|2[0-4]|5[01]|8[0-3]))\\\\d{6}\"],[\"80[0-7]\\\\d{6}\"],[\"89\\\\d{7}\"],0,0,0,0,[\"(?:592(?:4[0-2]|93)|80[89]\\\\d\\\\d)\\\\d{4}\"]]],\"MC\":[\"377\",\"00\",\"(?:[3489]|6\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"4\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[389]\"]],[\"(\\\\d)(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4 $5\",[\"6\"],\"0$1\"]],\"0\"],\"MD\":[\"373\",\"00\",\"(?:[235-7]\\\\d|[89]0)\\\\d{6}\",[8],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"22|3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[25-7]\"],\"0$1\"]],\"0\"],\"ME\":[\"382\",\"00\",\"(?:20|[3-79]\\\\d)\\\\d{6}|80\\\\d{6,7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[2-9]\"],\"0$1\"]],\"0\"],\"MF\":[\"590\",\"00\",\"590\\\\d{6}|(?:69|80|9\\\\d)\\\\d{7}\",[9],0,\"0\",0,0,0,0,0,[[\"590(?:0[079]|[14]3|[27][79]|3[03-7]|5[0-268]|87)\\\\d{4}\"],[\"69(?:0\\\\d\\\\d|1(?:2[2-9]|3[0-5])|4(?:0[89]|1[2-6]|9\\\\d)|6(?:1[016-9]|5[0-4]|[67]\\\\d))\\\\d{4}\"],[\"80[0-5]\\\\d{6}\"],0,0,0,0,0,[\"9(?:(?:39[5-7]|76[018])\\\\d|475[0-5])\\\\d{4}\"]]],\"MG\":[\"261\",\"00\",\"[23]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[23]\"],\"0$1\"]],\"0\",0,\"([24-9]\\\\d{6})$|0\",\"20$1\"],\"MH\":[\"692\",\"011\",\"329\\\\d{4}|(?:[256]\\\\d|45)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[2-6]\"]]],\"1\"],\"MK\":[\"389\",\"00\",\"[2-578]\\\\d{7}\",[8],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2|34[47]|4(?:[37]7|5[47]|64)\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[347]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[58]\"],\"0$1\"]],\"0\"],\"ML\":[\"223\",\"00\",\"[24-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24-9]\"]]]],\"MM\":[\"95\",\"00\",\"1\\\\d{5,7}|95\\\\d{6}|(?:[4-7]|9[0-46-9])\\\\d{6,8}|(?:2|8\\\\d)\\\\d{5,8}\",[6,7,8,9,10],[[\"(\\\\d)(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"16|2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"[45]|6(?:0[23]|[1-689]|7[235-7])|7(?:[0-4]|5[2-7])|8[1-6]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[12]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[4-7]|8[1-35]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4,6})\",\"$1 $2 $3\",[\"9(?:2[0-4]|[35-9]|4[137-9])\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"92\"],\"0$1\"],[\"(\\\\d)(\\\\d{5})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"MN\":[\"976\",\"001\",\"[12]\\\\d{7,9}|[5-9]\\\\d{7}\",[8,9,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[12]1\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]],[\"(\\\\d{3})(\\\\d{5,6})\",\"$1 $2\",[\"[12]2[1-3]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5,6})\",\"$1 $2\",[\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])\",\"[12](?:27|3[2-8]|4[2-68]|5[1-4689])[0-3]\"],\"0$1\"],[\"(\\\\d{5})(\\\\d{4,5})\",\"$1 $2\",[\"[12]\"],\"0$1\"]],\"0\"],\"MO\":[\"853\",\"00\",\"0800\\\\d{3}|(?:28|[68]\\\\d)\\\\d{6}\",[7,8],[[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[268]\"]]]],\"MP\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:67|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"670$1\",0,\"670\"],\"MQ\":[\"596\",\"00\",\"596\\\\d{6}|(?:69|80|9\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[569]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"MR\":[\"222\",\"00\",\"(?:[2-4]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-48]\"]]]],\"MS\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|664|900)\\\\d{7}\",[10],0,\"1\",0,\"([34]\\\\d{6})$|1\",\"664$1\",0,\"664\"],\"MT\":[\"356\",\"00\",\"3550\\\\d{4}|(?:[2579]\\\\d\\\\d|800)\\\\d{5}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[2357-9]\"]]]],\"MU\":[\"230\",\"0(?:0|[24-7]0|3[03])\",\"(?:[57]|8\\\\d\\\\d)\\\\d{7}|[2-468]\\\\d{6}\",[7,8,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-46]|8[013]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[57]\"]],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"8\"]]],0,0,0,0,0,0,0,\"020\"],\"MV\":[\"960\",\"0(?:0|19)\",\"(?:800|9[0-57-9]\\\\d)\\\\d{7}|[34679]\\\\d{6}\",[7,10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[34679]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]],0,0,0,0,0,0,0,\"00\"],\"MW\":[\"265\",\"00\",\"(?:[1289]\\\\d|31|77)\\\\d{7}|1\\\\d{6}\",[7,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[137-9]\"],\"0$1\"]],\"0\"],\"MX\":[\"52\",\"0[09]\",\"[2-9]\\\\d{9}\",[10],[[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"33|5[56]|81\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2-9]\"]]],0,0,0,0,0,0,0,\"00\"],\"MY\":[\"60\",\"00\",\"1\\\\d{8,9}|(?:3\\\\d|[4-9])\\\\d{7}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"[4-79]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1-$2 $3\",[\"1(?:[02469]|[378][1-9]|53)|8\",\"1(?:[02469]|[37][1-9]|53|8(?:[1-46-9]|5[7-9]))|8\"],\"0$1\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"3\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1-$2-$3-$4\",[\"1(?:[367]|80)\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1-$2 $3\",[\"15\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1-$2 $3\",[\"1\"],\"0$1\"]],\"0\"],\"MZ\":[\"258\",\"00\",\"(?:2|8\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2|8[2-79]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]]]],\"NA\":[\"264\",\"00\",\"[68]\\\\d{7,8}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"88\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"87\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"NC\":[\"687\",\"00\",\"(?:050|[2-57-9]\\\\d\\\\d)\\\\d{3}\",[6],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1.$2.$3\",[\"[02-57-9]\"]]]],\"NE\":[\"227\",\"00\",\"[027-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"08\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[089]|2[013]|7[0467]\"]]]],\"NF\":[\"672\",\"00\",\"[13]\\\\d{5}\",[6],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"1[0-3]\"]],[\"(\\\\d)(\\\\d{5})\",\"$1 $2\",[\"[13]\"]]],0,0,\"([0-258]\\\\d{4})$\",\"3$1\"],\"NG\":[\"234\",\"009\",\"38\\\\d{6}|[78]\\\\d{9,13}|(?:20|9\\\\d)\\\\d{8}\",[8,10,11,12,13,14],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"3\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"20[129]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})(\\\\d{5,6})\",\"$1 $2 $3\",[\"[78]\"],\"0$1\"]],\"0\"],\"NI\":[\"505\",\"00\",\"(?:1800|[25-8]\\\\d{3})\\\\d{4}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[125-8]\"]]]],\"NL\":[\"31\",\"00\",\"(?:[124-7]\\\\d\\\\d|3(?:[02-9]\\\\d|1[0-8]))\\\\d{6}|8\\\\d{6,9}|9\\\\d{6,10}|1\\\\d{4,5}\",[5,6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{4,7})\",\"$1 $2\",[\"[89]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"66\"],\"0$1\"],[\"(\\\\d)(\\\\d{8})\",\"$1 $2\",[\"6\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1[16-8]|2[259]|3[124]|4[17-9]|5[124679]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-578]|91\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\",[\"9\"],\"0$1\"]],\"0\"],\"NO\":[\"47\",\"00\",\"(?:0|[2-9]\\\\d{3})\\\\d{4}\",[5,8],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2-79]\"]]],0,0,0,0,0,\"[02-689]|7[0-8]\"],\"NP\":[\"977\",\"00\",\"(?:1\\\\d|9)\\\\d{9}|[1-9]\\\\d{7}\",[8,10,11],[[\"(\\\\d)(\\\\d{7})\",\"$1-$2\",[\"1[2-6]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1-$2\",[\"1[01]|[2-8]|9(?:[1-59]|[67][2-6])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1-$2\",[\"9\"]]],\"0\"],\"NR\":[\"674\",\"00\",\"(?:444|(?:55|8\\\\d)\\\\d|666)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[4-68]\"]]]],\"NU\":[\"683\",\"00\",\"(?:[4-7]|888\\\\d)\\\\d{3}\",[4,7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"8\"]]]],\"NZ\":[\"64\",\"0(?:0|161)\",\"[1289]\\\\d{9}|50\\\\d{5}(?:\\\\d{2,3})?|[27-9]\\\\d{7,8}|(?:[34]\\\\d|6[0-35-9])\\\\d{6}|8\\\\d{4,6}\",[5,6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{3,8})\",\"$1 $2\",[\"8[1-79]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"50[036-8]|8|90\",\"50(?:[0367]|88)|8|90\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"24|[346]|7[2-57-9]|9[2-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2(?:10|74)|[589]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"1|2[028]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,5})\",\"$1 $2 $3\",[\"2(?:[169]|7[0-35-9])|7\"],\"0$1\"]],\"0\",0,0,0,0,0,0,\"00\"],\"OM\":[\"968\",\"00\",\"(?:1505|[279]\\\\d{3}|500)\\\\d{4}|800\\\\d{5,6}\",[7,8,9],[[\"(\\\\d{3})(\\\\d{4,6})\",\"$1 $2\",[\"[58]\"]],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"2\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[179]\"]]]],\"PA\":[\"507\",\"00\",\"(?:00800|8\\\\d{3})\\\\d{6}|[68]\\\\d{7}|[1-57-9]\\\\d{6}\",[7,8,10,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[1-57-9]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1-$2\",[\"[68]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]]],\"PE\":[\"51\",\"00|19(?:1[124]|77|90)00\",\"(?:[14-8]|9\\\\d)\\\\d{7}\",[8,9],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"80\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"1\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[4-8]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"]]],\"0\",0,0,0,0,0,0,\"00\",\" Anexo \"],\"PF\":[\"689\",\"00\",\"4\\\\d{5}(?:\\\\d{2})?|8\\\\d{7,8}\",[6,8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"44\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"4|8[7-9]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]]]],\"PG\":[\"675\",\"00|140[1-3]\",\"(?:180|[78]\\\\d{3})\\\\d{4}|(?:[2-589]\\\\d|64)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"18|[2-69]|85\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[78]\"]]],0,0,0,0,0,0,0,\"00\"],\"PH\":[\"63\",\"00\",\"(?:[2-7]|9\\\\d)\\\\d{8}|2\\\\d{5}|(?:1800|8)\\\\d{7,9}\",[6,8,9,10,11,12,13],[[\"(\\\\d)(\\\\d{5})\",\"$1 $2\",[\"2\"],\"(0$1)\"],[\"(\\\\d{4})(\\\\d{4,6})\",\"$1 $2\",[\"3(?:23|39|46)|4(?:2[3-6]|[35]9|4[26]|76)|544|88[245]|(?:52|64|86)2\",\"3(?:230|397|461)|4(?:2(?:35|[46]4|51)|396|4(?:22|63)|59[347]|76[15])|5(?:221|446)|642[23]|8(?:622|8(?:[24]2|5[13]))\"],\"(0$1)\"],[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"346|4(?:27|9[35])|883\",\"3469|4(?:279|9(?:30|56))|8834\"],\"(0$1)\"],[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-7]|8[2-8]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]],[\"(\\\\d{4})(\\\\d{1,2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3 $4\",[\"1\"]]],\"0\"],\"PK\":[\"92\",\"00\",\"122\\\\d{6}|[24-8]\\\\d{10,11}|9(?:[013-9]\\\\d{8,10}|2(?:[01]\\\\d\\\\d|2(?:[06-8]\\\\d|1[01]))\\\\d{7})|(?:[2-8]\\\\d{3}|92(?:[0-7]\\\\d|8[1-9]))\\\\d{6}|[24-9]\\\\d{8}|[89]\\\\d{7}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,7})\",\"$1 $2 $3\",[\"[89]0\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"1\"]],[\"(\\\\d{3})(\\\\d{6,7})\",\"$1 $2\",[\"2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:2[2-8]|3[27-9]|4[2-6]|6[3569]|9[25-8])\",\"9(?:2[3-8]|98)|(?:2(?:3[2358]|4[2-4]|9[2-8])|45[3479]|54[2-467]|60[468]|72[236]|8(?:2[2-689]|3[23578]|4[3478]|5[2356])|9(?:22|3[27-9]|4[2-6]|6[3569]|9[25-7]))[2-9]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{7,8})\",\"$1 $2\",[\"(?:2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91)[2-9]\"],\"(0$1)\"],[\"(\\\\d{5})(\\\\d{5})\",\"$1 $2\",[\"58\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{7})\",\"$1 $2\",[\"3\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"2[125]|4[0-246-9]|5[1-35-7]|6[1-8]|7[14]|8[16]|91\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[24-9]\"],\"(0$1)\"]],\"0\"],\"PL\":[\"48\",\"00\",\"(?:6|8\\\\d\\\\d)\\\\d{7}|[1-9]\\\\d{6}(?:\\\\d{2})?|[26]\\\\d{5}\",[6,7,8,9,10],[[\"(\\\\d{5})\",\"$1\",[\"19\"]],[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"11|20|64\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1 $2 $3\",[\"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])1\",\"(?:1[2-8]|2[2-69]|3[2-4]|4[1-468]|5[24-689]|6[1-3578]|7[14-7]|8[1-79]|9[145])19\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"64\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"21|39|45|5[0137]|6[0469]|7[02389]|8(?:0[14]|8)\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"1[2-8]|[2-7]|8[1-79]|9[145]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"8\"]]]],\"PM\":[\"508\",\"00\",\"[45]\\\\d{5}|(?:708|80\\\\d)\\\\d{6}\",[6,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[45]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"],\"0$1\"]],\"0\"],\"PR\":[\"1\",\"011\",\"(?:[589]\\\\d\\\\d|787)\\\\d{7}\",[10],0,\"1\",0,0,0,0,\"787|939\"],\"PS\":[\"970\",\"00\",\"[2489]2\\\\d{6}|(?:1\\\\d|5)\\\\d{8}\",[8,9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[2489]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"PT\":[\"351\",\"00\",\"1693\\\\d{5}|(?:[26-9]\\\\d|30)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2[12]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"16|[236-9]\"]]]],\"PW\":[\"680\",\"01[12]\",\"(?:[24-8]\\\\d\\\\d|345|900)\\\\d{4}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-9]\"]]]],\"PY\":[\"595\",\"00\",\"59\\\\d{4,6}|9\\\\d{5,10}|(?:[2-46-8]\\\\d|5[0-8])\\\\d{4,7}\",[6,7,8,9,10,11],[[\"(\\\\d{3})(\\\\d{3,6})\",\"$1 $2\",[\"[2-9]0\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"[26]1|3[289]|4[1246-8]|7[1-3]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{3})(\\\\d{4,5})\",\"$1 $2\",[\"2[279]|3[13-5]|4[359]|5|6(?:[34]|7[1-46-8])|7[46-8]|85\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2[14-68]|3[26-9]|4[1246-8]|6(?:1|75)|7[1-35]|8[1-36]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"87\"]],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"9(?:[5-79]|8[1-7])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-8]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"9\"]]],\"0\"],\"QA\":[\"974\",\"00\",\"800\\\\d{4}|(?:2|800)\\\\d{6}|(?:0080|[3-7])\\\\d{7}\",[7,8,9,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"2[16]|8\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[3-7]\"]]]],\"RE\":[\"262\",\"00\",\"(?:26|[689]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[2689]\"],\"0$1\"]],\"0\",0,0,0,0,0,[[\"26(?:2\\\\d\\\\d|3(?:0\\\\d|1[0-6]))\\\\d{4}\"],[\"69(?:2\\\\d\\\\d|3(?:[06][0-6]|1[013]|2[0-2]|3[0-39]|4\\\\d|5[0-5]|7[0-37]|8[0-8]|9[0-479]))\\\\d{4}\"],[\"80\\\\d{7}\"],[\"89[1-37-9]\\\\d{6}\"],0,0,0,0,[\"9(?:399[0-3]|479[0-5]|76(?:2[278]|3[0-37]))\\\\d{4}\"],[\"8(?:1[019]|2[0156]|84|90)\\\\d{6}\"]]],\"RO\":[\"40\",\"00\",\"(?:[236-8]\\\\d|90)\\\\d{7}|[23]\\\\d{5}\",[6,9],[[\"(\\\\d{3})(\\\\d{3})\",\"$1 $2\",[\"2[3-6]\",\"2[3-6]\\\\d9\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"219|31\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[23]1\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[236-9]\"],\"0$1\"]],\"0\",0,0,0,0,0,0,0,\" int \"],\"RS\":[\"381\",\"00\",\"38[02-9]\\\\d{6,9}|6\\\\d{7,9}|90\\\\d{4,8}|38\\\\d{5,6}|(?:7\\\\d\\\\d|800)\\\\d{3,9}|(?:[12]\\\\d|3[0-79])\\\\d{5,10}\",[6,7,8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3,9})\",\"$1 $2\",[\"(?:2[389]|39)0|[7-9]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{5,10})\",\"$1 $2\",[\"[1-36]\"],\"0$1\"]],\"0\"],\"RU\":[\"7\",\"810\",\"8\\\\d{13}|[347-9]\\\\d{9}\",[10,14],[[\"(\\\\d{4})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"7(?:1[0-8]|2[1-9])\",\"7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:1[23]|[2-9]2))\",\"7(?:1(?:[0-356]2|4[29]|7|8[27])|2(?:13[03-69]|62[013-9]))|72[1-57-9]2\"],\"8 ($1)\",1],[\"(\\\\d{5})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"7(?:1[0-68]|2[1-9])\",\"7(?:1(?:[06][3-6]|[18]|2[35]|[3-5][3-5])|2(?:[13][3-5]|[24-689]|7[457]))\",\"7(?:1(?:0(?:[356]|4[023])|[18]|2(?:3[013-9]|5)|3[45]|43[013-79]|5(?:3[1-8]|4[1-7]|5)|6(?:3[0-35-9]|[4-6]))|2(?:1(?:3[178]|[45])|[24-689]|3[35]|7[457]))|7(?:14|23)4[0-8]|71(?:33|45)[1-79]\"],\"8 ($1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"8 ($1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[349]|8(?:[02-7]|1[1-8])\"],\"8 ($1)\",1],[\"(\\\\d{4})(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"8\"],\"8 ($1)\"]],\"8\",0,0,0,0,\"3[04-689]|[489]\",0,\"8~10\"],\"RW\":[\"250\",\"00\",\"(?:06|[27]\\\\d\\\\d|[89]00)\\\\d{6}\",[8,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[7-9]\"],\"0$1\"]],\"0\"],\"SA\":[\"966\",\"00\",\"92\\\\d{7}|(?:[15]|8\\\\d)\\\\d{8}\",[9,10],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"9\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"5\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"81\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]]],\"0\"],\"SB\":[\"677\",\"0[01]\",\"[6-9]\\\\d{6}|[1-6]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"6[89]|7|8[4-9]|9(?:[1-8]|9[0-8])\"]]]],\"SC\":[\"248\",\"010|0[0-2]\",\"(?:[2489]\\\\d|64)\\\\d{5}\",[7],[[\"(\\\\d)(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[246]|9[57]\"]]],0,0,0,0,0,0,0,\"00\"],\"SD\":[\"249\",\"00\",\"[19]\\\\d{8}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[19]\"],\"0$1\"]],\"0\"],\"SE\":[\"46\",\"00\",\"(?:[26]\\\\d\\\\d|9)\\\\d{9}|[1-9]\\\\d{8}|[1-689]\\\\d{7}|[1-4689]\\\\d{6}|2\\\\d{5}\",[6,7,8,9,10,12],[[\"(\\\\d{2})(\\\\d{2,3})(\\\\d{2})\",\"$1-$2 $3\",[\"20\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"9(?:00|39|44|9)\"],\"0$1\",0,\"$1 $2\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})\",\"$1-$2 $3\",[\"[12][136]|3[356]|4[0246]|6[03]|90[1-9]\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d)(\\\\d{2,3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"8\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{2})\",\"$1-$2 $3\",[\"1[2457]|2(?:[247-9]|5[0138])|3[0247-9]|4[1357-9]|5[0-35-9]|6(?:[125689]|4[02-57]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d{3})(\\\\d{2,3})(\\\\d{3})\",\"$1-$2 $3\",[\"9(?:00|39|44)\"],\"0$1\",0,\"$1 $2 $3\"],[\"(\\\\d{2})(\\\\d{2,3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"1[13689]|2[0136]|3[1356]|4[0246]|54|6[03]|90[1-9]\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"10|7\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"8\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4\",[\"[13-5]|2(?:[247-9]|5[0138])|6(?:[124-689]|7[0-2])|9(?:[125-8]|3[02-5]|4[0-3])\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{3})\",\"$1-$2 $3 $4\",[\"9\"],\"0$1\",0,\"$1 $2 $3 $4\"],[\"(\\\\d{3})(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1-$2 $3 $4 $5\",[\"[26]\"],\"0$1\",0,\"$1 $2 $3 $4 $5\"]],\"0\"],\"SG\":[\"65\",\"0[0-3]\\\\d\",\"(?:(?:1\\\\d|8)\\\\d\\\\d|7000)\\\\d{7}|[3689]\\\\d{7}\",[8,10,11],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[369]|8(?:0[1-9]|[1-9])\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"]],[\"(\\\\d{4})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"]],[\"(\\\\d{4})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"1\"]]]],\"SH\":[\"290\",\"00\",\"(?:[256]\\\\d|8)\\\\d{3}\",[4,5],0,0,0,0,0,0,\"[256]\"],\"SI\":[\"386\",\"00|10(?:22|66|88|99)\",\"[1-7]\\\\d{7}|8\\\\d{4,7}|90\\\\d{4,6}\",[5,6,7,8],[[\"(\\\\d{2})(\\\\d{3,6})\",\"$1 $2\",[\"8[09]|9\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"59|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[37][01]|4[0139]|51|6\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[1-57]\"],\"(0$1)\"]],\"0\",0,0,0,0,0,0,\"00\"],\"SJ\":[\"47\",\"00\",\"0\\\\d{4}|(?:[489]\\\\d|79)\\\\d{6}\",[5,8],0,0,0,0,0,0,\"79\"],\"SK\":[\"421\",\"00\",\"[2-689]\\\\d{8}|[2-59]\\\\d{6}|[2-5]\\\\d{5}\",[6,7,9],[[\"(\\\\d)(\\\\d{2})(\\\\d{3,4})\",\"$1 $2 $3\",[\"21\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{2})(\\\\d{2,3})\",\"$1 $2 $3\",[\"[3-5][1-8]1\",\"[3-5][1-8]1[67]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{3})(\\\\d{2})\",\"$1/$2 $3 $4\",[\"2\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[689]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1/$2 $3 $4\",[\"[3-5]\"],\"0$1\"]],\"0\"],\"SL\":[\"232\",\"00\",\"(?:[237-9]\\\\d|66)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[236-9]\"],\"(0$1)\"]],\"0\"],\"SM\":[\"378\",\"00\",\"(?:0549|[5-7]\\\\d)\\\\d{6}\",[8,10],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[5-7]\"]],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"0\"]]],0,0,\"([89]\\\\d{5})$\",\"0549$1\"],\"SN\":[\"221\",\"00\",\"(?:[378]\\\\d|93)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[379]\"]]]],\"SO\":[\"252\",\"00\",\"[346-9]\\\\d{8}|[12679]\\\\d{7}|[1-5]\\\\d{6}|[1348]\\\\d{5}\",[6,7,8,9],[[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"8[125]\"]],[\"(\\\\d{6})\",\"$1\",[\"[134]\"]],[\"(\\\\d)(\\\\d{6})\",\"$1 $2\",[\"[15]|2[0-79]|3[0-46-8]|4[0-7]\"]],[\"(\\\\d)(\\\\d{7})\",\"$1 $2\",[\"(?:2|90)4|[67]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[348]|64|79|90\"]],[\"(\\\\d{2})(\\\\d{5,7})\",\"$1 $2\",[\"1|28|6[0-35-9]|77|9[2-9]\"]]],\"0\"],\"SR\":[\"597\",\"00\",\"(?:[2-5]|68|[78]\\\\d)\\\\d{5}\",[6,7],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1-$2-$3\",[\"56\"]],[\"(\\\\d{3})(\\\\d{3})\",\"$1-$2\",[\"[2-5]\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"[6-8]\"]]]],\"SS\":[\"211\",\"00\",\"[19]\\\\d{8}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[19]\"],\"0$1\"]],\"0\"],\"ST\":[\"239\",\"00\",\"(?:22|9\\\\d)\\\\d{5}\",[7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[29]\"]]]],\"SV\":[\"503\",\"00\",\"[267]\\\\d{7}|(?:80\\\\d|900)\\\\d{4}(?:\\\\d{4})?\",[7,8,11],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[89]\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[267]\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"]]]],\"SX\":[\"1\",\"011\",\"7215\\\\d{6}|(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"(5\\\\d{6})$|1\",\"721$1\",0,\"721\"],\"SY\":[\"963\",\"00\",\"[1-39]\\\\d{8}|[1-5]\\\\d{7}\",[8,9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-5]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\",1]],\"0\"],\"SZ\":[\"268\",\"00\",\"0800\\\\d{4}|(?:[237]\\\\d|900)\\\\d{6}\",[8,9],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[0237]\"]],[\"(\\\\d{5})(\\\\d{4})\",\"$1 $2\",[\"9\"]]]],\"TA\":[\"290\",\"00\",\"8\\\\d{3}\",[4],0,0,0,0,0,0,\"8\"],\"TC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|649|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-479]\\\\d{6})$|1\",\"649$1\",0,\"649\"],\"TD\":[\"235\",\"00|16\",\"(?:22|[689]\\\\d|77)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[26-9]\"]]],0,0,0,0,0,0,0,\"00\"],\"TG\":[\"228\",\"00\",\"[279]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[279]\"]]]],\"TH\":[\"66\",\"00[1-9]\",\"(?:001800|[2-57]|[689]\\\\d)\\\\d{7}|1\\\\d{7,9}\",[8,9,10,13],[[\"(\\\\d)(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"2\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[13-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"1\"]]],\"0\"],\"TJ\":[\"992\",\"810\",\"[0-57-9]\\\\d{8}\",[9],[[\"(\\\\d{6})(\\\\d)(\\\\d{2})\",\"$1 $2 $3\",[\"331\",\"3317\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"44[02-479]|[34]7\"]],[\"(\\\\d{4})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"3(?:[1245]|3[12])\"]],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[0-57-9]\"]]],0,0,0,0,0,0,0,\"8~10\"],\"TK\":[\"690\",\"00\",\"[2-47]\\\\d{3,6}\",[4,5,6,7]],\"TL\":[\"670\",\"00\",\"7\\\\d{7}|(?:[2-47]\\\\d|[89]0)\\\\d{5}\",[7,8],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[2-489]|70\"]],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"7\"]]]],\"TM\":[\"993\",\"810\",\"(?:[1-6]\\\\d|71)\\\\d{6}\",[8],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"12\"],\"(8 $1)\"],[\"(\\\\d{3})(\\\\d)(\\\\d{2})(\\\\d{2})\",\"$1 $2-$3-$4\",[\"[1-5]\"],\"(8 $1)\"],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"[67]\"],\"8 $1\"]],\"8\",0,0,0,0,0,0,\"8~10\"],\"TN\":[\"216\",\"00\",\"[2-57-9]\\\\d{7}\",[8],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-57-9]\"]]]],\"TO\":[\"676\",\"00\",\"(?:0800|(?:[5-8]\\\\d\\\\d|999)\\\\d)\\\\d{3}|[2-8]\\\\d{4}\",[5,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1-$2\",[\"[2-4]|50|6[09]|7[0-24-69]|8[05]\"]],[\"(\\\\d{4})(\\\\d{3})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[5-9]\"]]]],\"TR\":[\"90\",\"00\",\"4\\\\d{6}|8\\\\d{11,12}|(?:[2-58]\\\\d\\\\d|900)\\\\d{7}\",[7,10,12,13],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"512|8[01589]|90\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"5(?:[0-59]|61)\",\"5(?:[0-59]|61[06])\",\"5(?:[0-59]|61[06]1)\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[24][1-8]|3[1-9]\"],\"(0$1)\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{6,7})\",\"$1 $2 $3\",[\"80\"],\"0$1\",1]],\"0\"],\"TT\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-46-8]\\\\d{6})$|1\",\"868$1\",0,\"868\"],\"TV\":[\"688\",\"00\",\"(?:2|7\\\\d\\\\d|90)\\\\d{4}\",[5,6,7],[[\"(\\\\d{2})(\\\\d{3})\",\"$1 $2\",[\"2\"]],[\"(\\\\d{2})(\\\\d{4})\",\"$1 $2\",[\"90\"]],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"7\"]]]],\"TW\":[\"886\",\"0(?:0[25-79]|19)\",\"[2-689]\\\\d{8}|7\\\\d{9,10}|[2-8]\\\\d{7}|2\\\\d{6}\",[7,8,9,10,11],[[\"(\\\\d{2})(\\\\d)(\\\\d{4})\",\"$1 $2 $3\",[\"202\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[258]0\"],\"0$1\"],[\"(\\\\d)(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"[23568]|4(?:0[02-48]|[1-47-9])|7[1-9]\",\"[23568]|4(?:0[2-48]|[1-47-9])|(?:400|7)[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[49]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4,5})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\",0,0,0,0,0,0,0,\"#\"],\"TZ\":[\"255\",\"00[056]\",\"(?:[25-8]\\\\d|41|90)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[24]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"5\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[67]\"],\"0$1\"]],\"0\"],\"UA\":[\"380\",\"00\",\"[89]\\\\d{9}|[3-9]\\\\d{8}\",[9,10],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"6[12][29]|(?:3[1-8]|4[136-8]|5[12457]|6[49])2|(?:56|65)[24]\",\"6[12][29]|(?:35|4[1378]|5[12457]|6[49])2|(?:56|65)[24]|(?:3[1-46-8]|46)2[013-9]\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6[0135689]|7[4-6])|6(?:[12][3-7]|[459])\",\"3[1-8]|4(?:[1367]|[45][6-9]|8[4-6])|5(?:[1-5]|6(?:[015689]|3[02389])|7[4-6])|6(?:[12][3-7]|[459])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[3-7]|89|9[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[89]\"],\"0$1\"]],\"0\",0,0,0,0,0,0,\"0~0\"],\"UG\":[\"256\",\"00[057]\",\"800\\\\d{6}|(?:[29]0|[347]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{4})(\\\\d{5})\",\"$1 $2\",[\"202\",\"2024\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{6})\",\"$1 $2\",[\"[27-9]|4(?:6[45]|[7-9])\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"[34]\"],\"0$1\"]],\"0\"],\"US\":[\"1\",\"011\",\"[2-9]\\\\d{9}|3\\\\d{6}\",[10],[[\"(\\\\d{3})(\\\\d{4})\",\"$1-$2\",[\"310\"],0,1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"($1) $2-$3\",[\"[2-9]\"],0,1,\"$1-$2-$3\"]],\"1\",0,0,0,0,0,[[\"(?:3052(?:0[0-8]|[1-9]\\\\d)|5056(?:[0-35-9]\\\\d|4[468])|7302[0-4]\\\\d)\\\\d{4}|(?:305[3-9]|472[24]|505[2-57-9]|7306|983[2-47-9])\\\\d{6}|(?:2(?:0[1-35-9]|1[02-9]|2[03-57-9]|3[1459]|4[08]|5[1-46]|6[0279]|7[0269]|8[13])|3(?:0[1-47-9]|1[02-9]|2[013569]|3[0-24679]|4[167]|5[0-2]|6[01349]|8[056])|4(?:0[124-9]|1[02-579]|2[3-5]|3[0245]|4[023578]|58|6[349]|7[0589]|8[04])|5(?:0[1-47-9]|1[0235-8]|20|3[0149]|4[01]|5[179]|6[1-47]|7[0-5]|8[0256])|6(?:0[1-35-9]|1[024-9]|2[03689]|3[016]|4[0156]|5[01679]|6[0-279]|78|8[0-29])|7(?:0[1-46-8]|1[2-9]|2[04-8]|3[1247]|4[037]|5[47]|6[02359]|7[0-59]|8[156])|8(?:0[1-68]|1[02-8]|2[068]|3[0-2589]|4[03578]|5[046-9]|6[02-5]|7[028])|9(?:0[1346-9]|1[02-9]|2[0589]|3[0146-8]|4[01357-9]|5[12469]|7[0-389]|8[04-69]))[2-9]\\\\d{6}\"],[\"\"],[\"8(?:00|33|44|55|66|77|88)[2-9]\\\\d{6}\"],[\"900[2-9]\\\\d{6}\"],[\"52(?:3(?:[2-46-9][02-9]\\\\d|5(?:[02-46-9]\\\\d|5[0-46-9]))|4(?:[2-478][02-9]\\\\d|5(?:[034]\\\\d|2[024-9]|5[0-46-9])|6(?:0[1-9]|[2-9]\\\\d)|9(?:[05-9]\\\\d|2[0-5]|49)))\\\\d{4}|52[34][2-9]1[02-9]\\\\d{4}|5(?:00|2[125-9]|33|44|66|77|88)[2-9]\\\\d{6}\"],0,0,0,[\"305209\\\\d{4}\"]]],\"UY\":[\"598\",\"0(?:0|1[3-9]\\\\d)\",\"0004\\\\d{2,9}|[1249]\\\\d{7}|(?:[49]\\\\d|80)\\\\d{5}\",[6,7,8,9,10,11,12,13],[[\"(\\\\d{3})(\\\\d{3,4})\",\"$1 $2\",[\"0\"]],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[49]0|8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"9\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[124]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"0\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3 $4\",[\"0\"]]],\"0\",0,0,0,0,0,0,\"00\",\" int. \"],\"UZ\":[\"998\",\"00\",\"(?:20|33|[5-79]\\\\d|88)\\\\d{7}\",[9],[[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"[235-9]\"]]]],\"VA\":[\"39\",\"00\",\"0\\\\d{5,10}|3[0-8]\\\\d{7,10}|55\\\\d{8}|8\\\\d{5}(?:\\\\d{2,4})?|(?:1\\\\d|39)\\\\d{7,8}\",[6,7,8,9,10,11,12],0,0,0,0,0,0,\"06698\"],\"VC\":[\"1\",\"011\",\"(?:[58]\\\\d\\\\d|784|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-7]\\\\d{6})$|1\",\"784$1\",0,\"784\"],\"VE\":[\"58\",\"00\",\"[68]00\\\\d{7}|(?:[24]\\\\d|[59]0)\\\\d{8}\",[10],[[\"(\\\\d{3})(\\\\d{7})\",\"$1-$2\",[\"[24-689]\"],\"0$1\"]],\"0\"],\"VG\":[\"1\",\"011\",\"(?:284|[58]\\\\d\\\\d|900)\\\\d{7}\",[10],0,\"1\",0,\"([2-578]\\\\d{6})$|1\",\"284$1\",0,\"284\"],\"VI\":[\"1\",\"011\",\"[58]\\\\d{9}|(?:34|90)0\\\\d{7}\",[10],0,\"1\",0,\"([2-9]\\\\d{6})$|1\",\"340$1\",0,\"340\"],\"VN\":[\"84\",\"00\",\"[12]\\\\d{9}|[135-9]\\\\d{8}|[16]\\\\d{7}|[16-8]\\\\d{6}\",[7,8,9,10],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"80\"],\"0$1\",1],[\"(\\\\d{4})(\\\\d{4,6})\",\"$1 $2\",[\"1\"],0,1],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"6\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[357-9]\"],\"0$1\",1],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"2[48]\"],\"0$1\",1],[\"(\\\\d{3})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"2\"],\"0$1\",1]],\"0\"],\"VU\":[\"678\",\"00\",\"[57-9]\\\\d{6}|(?:[238]\\\\d|48)\\\\d{3}\",[5,7],[[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"[57-9]\"]]]],\"WF\":[\"681\",\"00\",\"(?:40|72)\\\\d{4}|8\\\\d{5}(?:\\\\d{3})?\",[6,9],[[\"(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3\",[\"[478]\"]],[\"(\\\\d{3})(\\\\d{2})(\\\\d{2})(\\\\d{2})\",\"$1 $2 $3 $4\",[\"8\"]]]],\"WS\":[\"685\",\"0\",\"(?:[2-6]|8\\\\d{5})\\\\d{4}|[78]\\\\d{6}|[68]\\\\d{5}\",[5,6,7,10],[[\"(\\\\d{5})\",\"$1\",[\"[2-5]|6[1-9]\"]],[\"(\\\\d{3})(\\\\d{3,7})\",\"$1 $2\",[\"[68]\"]],[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"7\"]]]],\"XK\":[\"383\",\"00\",\"2\\\\d{7,8}|3\\\\d{7,11}|(?:4\\\\d\\\\d|[89]00)\\\\d{5}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{5})\",\"$1 $2\",[\"[89]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[2-4]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"2|39\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7,10})\",\"$1 $2\",[\"3\"],\"0$1\"]],\"0\"],\"YE\":[\"967\",\"00\",\"(?:1|7\\\\d)\\\\d{7}|[1-7]\\\\d{6}\",[7,8,9],[[\"(\\\\d)(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"[1-6]|7(?:[24-6]|8[0-7])\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"7\"],\"0$1\"]],\"0\"],\"YT\":[\"262\",\"00\",\"(?:80|9\\\\d)\\\\d{7}|(?:26|63)9\\\\d{6}\",[9],0,\"0\",0,0,0,0,0,[[\"269(?:0[0-467]|15|5[0-4]|6\\\\d|[78]0)\\\\d{4}\"],[\"639(?:0[0-79]|1[019]|[267]\\\\d|3[09]|40|5[05-9]|9[04-79])\\\\d{4}\"],[\"80\\\\d{7}\"],0,0,0,0,0,[\"9(?:(?:39|47)8[01]|769\\\\d)\\\\d{4}\"]]],\"ZA\":[\"27\",\"00\",\"[1-79]\\\\d{8}|8\\\\d{4,9}\",[5,6,7,8,9,10],[[\"(\\\\d{2})(\\\\d{3,4})\",\"$1 $2\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{2,3})\",\"$1 $2 $3\",[\"8[1-4]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"860\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"[1-9]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"8\"],\"0$1\"]],\"0\"],\"ZM\":[\"260\",\"00\",\"800\\\\d{6}|(?:21|63|[79]\\\\d)\\\\d{7}\",[9],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[28]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"[79]\"],\"0$1\"]],\"0\"],\"ZW\":[\"263\",\"00\",\"2(?:[0-57-9]\\\\d{6,8}|6[0-24-9]\\\\d{6,7})|[38]\\\\d{9}|[35-8]\\\\d{8}|[3-6]\\\\d{7}|[1-689]\\\\d{6}|[1-3569]\\\\d{5}|[1356]\\\\d{4}\",[5,6,7,8,9,10],[[\"(\\\\d{3})(\\\\d{3,5})\",\"$1 $2\",[\"2(?:0[45]|2[278]|[49]8)|3(?:[09]8|17)|6(?:[29]8|37|75)|[23][78]|(?:33|5[15]|6[68])[78]\"],\"0$1\"],[\"(\\\\d)(\\\\d{3})(\\\\d{2,4})\",\"$1 $2 $3\",[\"[49]\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{4})\",\"$1 $2\",[\"80\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{7})\",\"$1 $2\",[\"24|8[13-59]|(?:2[05-79]|39|5[45]|6[15-8])2\",\"2(?:02[014]|4|[56]20|[79]2)|392|5(?:42|525)|6(?:[16-8]21|52[013])|8[13-59]\"],\"(0$1)\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"7\"],\"0$1\"],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"2(?:1[39]|2[0157]|[378]|[56][14])|3(?:12|29)\",\"2(?:1[39]|2[0157]|[378]|[56][14])|3(?:123|29)\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{6})\",\"$1 $2\",[\"8\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3,5})\",\"$1 $2\",[\"1|2(?:0[0-36-9]|12|29|[56])|3(?:1[0-689]|[24-6])|5(?:[0236-9]|1[2-4])|6(?:[013-59]|7[0-46-9])|(?:33|55|6[68])[0-69]|(?:29|3[09]|62)[0-79]\"],\"0$1\"],[\"(\\\\d{2})(\\\\d{3})(\\\\d{3,4})\",\"$1 $2 $3\",[\"29[013-9]|39|54\"],\"0$1\"],[\"(\\\\d{4})(\\\\d{3,5})\",\"$1 $2\",[\"(?:25|54)8\",\"258|5483\"],\"0$1\"]],\"0\"]},\"nonGeographic\":{\"800\":[\"800\",0,\"(?:00|[1-9]\\\\d)\\\\d{6}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"\\\\d\"]]],0,0,0,0,0,0,[0,0,[\"(?:00|[1-9]\\\\d)\\\\d{6}\"]]],\"808\":[\"808\",0,\"[1-9]\\\\d{7}\",[8],[[\"(\\\\d{4})(\\\\d{4})\",\"$1 $2\",[\"[1-9]\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,0,[\"[1-9]\\\\d{7}\"]]],\"870\":[\"870\",0,\"7\\\\d{11}|[35-7]\\\\d{8}\",[9,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"[35-7]\"]]],0,0,0,0,0,0,[0,[\"(?:[356]|774[45])\\\\d{8}|7[6-8]\\\\d{7}\"]]],\"878\":[\"878\",0,\"10\\\\d{10}\",[12],[[\"(\\\\d{2})(\\\\d{5})(\\\\d{5})\",\"$1 $2 $3\",[\"1\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[\"10\\\\d{10}\"]]],\"881\":[\"881\",0,\"6\\\\d{9}|[0-36-9]\\\\d{8}\",[9,10],[[\"(\\\\d)(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\",[\"[0-37-9]\"]],[\"(\\\\d)(\\\\d{3})(\\\\d{5,6})\",\"$1 $2 $3\",[\"6\"]]],0,0,0,0,0,0,[0,[\"6\\\\d{9}|[0-36-9]\\\\d{8}\"]]],\"882\":[\"882\",0,\"[13]\\\\d{6}(?:\\\\d{2,5})?|[19]\\\\d{7}|(?:[25]\\\\d\\\\d|4)\\\\d{7}(?:\\\\d{2})?\",[7,8,9,10,11,12],[[\"(\\\\d{2})(\\\\d{5})\",\"$1 $2\",[\"16|342\"]],[\"(\\\\d{2})(\\\\d{6})\",\"$1 $2\",[\"49\"]],[\"(\\\\d{2})(\\\\d{2})(\\\\d{4})\",\"$1 $2 $3\",[\"1[36]|9\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{3})\",\"$1 $2 $3\",[\"3[23]\"]],[\"(\\\\d{2})(\\\\d{3,4})(\\\\d{4})\",\"$1 $2 $3\",[\"16\"]],[\"(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"10|23|3(?:[15]|4[57])|4|51\"]],[\"(\\\\d{3})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"34\"]],[\"(\\\\d{2})(\\\\d{4,5})(\\\\d{5})\",\"$1 $2 $3\",[\"[1-35]\"]]],0,0,0,0,0,0,[0,[\"342\\\\d{4}|(?:337|49)\\\\d{6}|(?:3(?:2|47|7\\\\d{3})|50\\\\d{3})\\\\d{7}\",[7,8,9,10,12]],0,0,0,[\"348[57]\\\\d{7}\",[11]],0,0,[\"1(?:3(?:0[0347]|[13][0139]|2[035]|4[013568]|6[0459]|7[06]|8[15-8]|9[0689])\\\\d{4}|6\\\\d{5,10})|(?:345\\\\d|9[89])\\\\d{6}|(?:10|2(?:3|85\\\\d)|3(?:[15]|[69]\\\\d\\\\d)|4[15-8]|51)\\\\d{8}\"]]],\"883\":[\"883\",0,\"(?:[1-4]\\\\d|51)\\\\d{6,10}\",[8,9,10,11,12],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{2,8})\",\"$1 $2 $3\",[\"[14]|2[24-689]|3[02-689]|51[24-9]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3\",[\"510\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{4})\",\"$1 $2 $3\",[\"21\"]],[\"(\\\\d{4})(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"51[13]\"]],[\"(\\\\d{3})(\\\\d{3})(\\\\d{3})(\\\\d{3})\",\"$1 $2 $3 $4\",[\"[235]\"]]],0,0,0,0,0,0,[0,0,0,0,0,0,0,0,[\"(?:2(?:00\\\\d\\\\d|10)|(?:370[1-9]|51\\\\d0)\\\\d)\\\\d{7}|51(?:00\\\\d{5}|[24-9]0\\\\d{4,7})|(?:1[0-79]|2[24-689]|3[02-689]|4[0-4])0\\\\d{5,9}\"]]],\"888\":[\"888\",0,\"\\\\d{11}\",[11],[[\"(\\\\d{3})(\\\\d{3})(\\\\d{5})\",\"$1 $2 $3\"]],0,0,0,0,0,0,[0,0,0,0,0,0,[\"\\\\d{11}\"]]],\"979\":[\"979\",0,\"[1359]\\\\d{8}\",[9],[[\"(\\\\d)(\\\\d{4})(\\\\d{4})\",\"$1 $2 $3\",[\"[1359]\"]]],0,0,0,0,0,0,[0,0,0,[\"[1359]\\\\d{8}\"]]]}}","import withMetadataArgument from './withMetadataArgument.js'\r\nimport { getCountryCallingCode as _getCountryCallingCode } from '../../core/index.js'\r\n\r\nexport function getCountryCallingCode() {\r\n\treturn withMetadataArgument(_getCountryCallingCode, arguments)\r\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nimport normalizeArguments from './normalizeArguments.js';\nimport parsePhoneNumber from './parsePhoneNumber_.js';\nexport default function isValidPhoneNumber() {\n var _normalizeArguments = normalizeArguments(arguments),\n text = _normalizeArguments.text,\n options = _normalizeArguments.options,\n metadata = _normalizeArguments.metadata;\n\n options = _objectSpread(_objectSpread({}, options), {}, {\n extract: false\n });\n var phoneNumber = parsePhoneNumber(text, options, metadata);\n return phoneNumber && phoneNumber.isValid() || false;\n}\n//# sourceMappingURL=isValidPhoneNumber.js.map","import withMetadataArgument from './withMetadataArgument.js'\r\nimport { isValidPhoneNumber as _isValidPhoneNumber } from '../../core/index.js'\r\n\r\nexport function isValidPhoneNumber() {\r\n\treturn withMetadataArgument(_isValidPhoneNumber, arguments)\r\n}","// Importing from a \".js\" file is a workaround for Node.js \"ES Modules\"\r\n// importing system which is even uncapable of importing \"*.json\" files.\r\nimport metadata from '../../metadata.min.json.js'\r\n\r\nexport default function withMetadataArgument(func, _arguments) {\r\n\tvar args = Array.prototype.slice.call(_arguments)\r\n\targs.push(metadata)\r\n\treturn func.apply(this, args)\r\n}","import u,{createContext as m,useContext as D,useMemo as l,useState as T}from\"react\";import{useId as P}from'../../hooks/use-id.js';import{forwardRefWithAs as g,render as E}from'../../utils/render.js';import{useIsoMorphicEffect as x}from'../../hooks/use-iso-morphic-effect.js';import{useSyncRefs as R}from'../../hooks/use-sync-refs.js';import{useEvent as I}from'../../hooks/use-event.js';let d=m(null);function f(){let r=D(d);if(r===null){let t=new Error(\"You used a <Description /> component, but it is not inside a relevant parent.\");throw Error.captureStackTrace&&Error.captureStackTrace(t,f),t}return r}function M(){let[r,t]=T([]);return[r.length>0?r.join(\" \"):void 0,l(()=>function(e){let i=I(s=>(t(o=>[...o,s]),()=>t(o=>{let p=o.slice(),c=p.indexOf(s);return c!==-1&&p.splice(c,1),p}))),n=l(()=>({register:i,slot:e.slot,name:e.name,props:e.props}),[i,e.slot,e.name,e.props]);return u.createElement(d.Provider,{value:n},e.children)},[t])]}let S=\"p\";function h(r,t){let a=P(),{id:e=`headlessui-description-${a}`,...i}=r,n=f(),s=R(t);x(()=>n.register(e),[e,n.register]);let o={ref:s,...n.props,id:e};return E({ourProps:o,theirProps:i,slot:n.slot||{},defaultTag:S,name:n.name||\"Description\"})}let y=g(h),b=Object.assign(y,{});export{b as Description,M as useDescriptions};\n","var o=(r=>(r.Space=\" \",r.Enter=\"Enter\",r.Escape=\"Escape\",r.Backspace=\"Backspace\",r.Delete=\"Delete\",r.ArrowLeft=\"ArrowLeft\",r.ArrowUp=\"ArrowUp\",r.ArrowRight=\"ArrowRight\",r.ArrowDown=\"ArrowDown\",r.Home=\"Home\",r.End=\"End\",r.PageUp=\"PageUp\",r.PageDown=\"PageDown\",r.Tab=\"Tab\",r))(o||{});export{o as Keys};\n","let a=/([\\u2700-\\u27BF]|[\\uE000-\\uF8FF]|\\uD83C[\\uDC00-\\uDFFF]|\\uD83D[\\uDC00-\\uDFFF]|[\\u2011-\\u26FF]|\\uD83E[\\uDD10-\\uDDFF])/g;function o(e){var r,i;let n=(r=e.innerText)!=null?r:\"\",t=e.cloneNode(!0);if(!(t instanceof HTMLElement))return n;let u=!1;for(let f of t.querySelectorAll('[hidden],[aria-hidden],[role=\"img\"]'))f.remove(),u=!0;let l=u?(i=t.innerText)!=null?i:\"\":n;return a.test(l)&&(l=l.replace(a,\"\")),l}function g(e){let n=e.getAttribute(\"aria-label\");if(typeof n==\"string\")return n.trim();let t=e.getAttribute(\"aria-labelledby\");if(t){let u=t.split(\" \").map(l=>{let r=document.getElementById(l);if(r){let i=r.getAttribute(\"aria-label\");return typeof i==\"string\"?i.trim():o(r).trim()}return null}).filter(Boolean);if(u.length>0)return u.join(\", \")}return o(e).trim()}export{g as getTextValue};\n","import{useRef as l}from\"react\";import{getTextValue as i}from'../utils/get-text-value.js';import{useEvent as o}from'./use-event.js';function b(c){let t=l(\"\"),r=l(\"\");return o(()=>{let e=c.current;if(!e)return\"\";let u=e.innerText;if(t.current===u)return r.current;let n=i(e).trim().toLowerCase();return t.current=u,r.current=n,n})}export{b as useTextValue};\n","import j,{Fragment as xe,createContext as Z,createRef as ye,useCallback as ge,useContext as ee,useEffect as te,useMemo as h,useReducer as Oe,useRef as D}from\"react\";import{useDisposables as V}from'../../hooks/use-disposables.js';import{useId as K}from'../../hooks/use-id.js';import{useIsoMorphicEffect as Q}from'../../hooks/use-iso-morphic-effect.js';import{useComputed as oe}from'../../hooks/use-computed.js';import{useSyncRefs as k}from'../../hooks/use-sync-refs.js';import{Features as ne,forwardRefWithAs as w,render as _,compact as Le}from'../../utils/render.js';import{match as I}from'../../utils/match.js';import{disposables as $}from'../../utils/disposables.js';import{Keys as y}from'../keyboard.js';import{Focus as v,calculateActiveIndex as me}from'../../utils/calculate-active-index.js';import{isDisabledReactIssue7711 as Re}from'../../utils/bugs.js';import{isFocusableElement as ve,FocusableMode as Ae,sortByDomNode as Se}from'../../utils/focus-management.js';import{useOpenClosed as Pe,State as W,OpenClosedProvider as Ee}from'../../internal/open-closed.js';import{useResolveButtonType as he}from'../../hooks/use-resolve-button-type.js';import{useOutsideClick as De}from'../../hooks/use-outside-click.js';import{Hidden as Ie,Features as Ce}from'../../internal/hidden.js';import{objectToFormEntries as Fe}from'../../utils/form.js';import{getOwnerDocument as Me}from'../../utils/owner.js';import{useEvent as f}from'../../hooks/use-event.js';import{useControllable as ke}from'../../hooks/use-controllable.js';import{useLatestValue as we}from'../../hooks/use-latest-value.js';import{useTrackedPointer as _e}from'../../hooks/use-tracked-pointer.js';import{useTextValue as Ue}from'../../hooks/use-text-value.js';var Be=(n=>(n[n.Open=0]=\"Open\",n[n.Closed=1]=\"Closed\",n))(Be||{}),He=(n=>(n[n.Single=0]=\"Single\",n[n.Multi=1]=\"Multi\",n))(He||{}),Ge=(n=>(n[n.Pointer=0]=\"Pointer\",n[n.Other=1]=\"Other\",n))(Ge||{}),Ne=(i=>(i[i.OpenListbox=0]=\"OpenListbox\",i[i.CloseListbox=1]=\"CloseListbox\",i[i.GoToOption=2]=\"GoToOption\",i[i.Search=3]=\"Search\",i[i.ClearSearch=4]=\"ClearSearch\",i[i.RegisterOption=5]=\"RegisterOption\",i[i.UnregisterOption=6]=\"UnregisterOption\",i[i.RegisterLabel=7]=\"RegisterLabel\",i))(Ne||{});function z(e,a=n=>n){let n=e.activeOptionIndex!==null?e.options[e.activeOptionIndex]:null,r=Se(a(e.options.slice()),t=>t.dataRef.current.domRef.current),l=n?r.indexOf(n):null;return l===-1&&(l=null),{options:r,activeOptionIndex:l}}let je={[1](e){return e.dataRef.current.disabled||e.listboxState===1?e:{...e,activeOptionIndex:null,listboxState:1}},[0](e){if(e.dataRef.current.disabled||e.listboxState===0)return e;let a=e.activeOptionIndex,{isSelected:n}=e.dataRef.current,r=e.options.findIndex(l=>n(l.dataRef.current.value));return r!==-1&&(a=r),{...e,listboxState:0,activeOptionIndex:a}},[2](e,a){var l;if(e.dataRef.current.disabled||e.listboxState===1)return e;let n=z(e),r=me(a,{resolveItems:()=>n.options,resolveActiveIndex:()=>n.activeOptionIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return{...e,...n,searchQuery:\"\",activeOptionIndex:r,activationTrigger:(l=a.trigger)!=null?l:1}},[3]:(e,a)=>{if(e.dataRef.current.disabled||e.listboxState===1)return e;let r=e.searchQuery!==\"\"?0:1,l=e.searchQuery+a.value.toLowerCase(),p=(e.activeOptionIndex!==null?e.options.slice(e.activeOptionIndex+r).concat(e.options.slice(0,e.activeOptionIndex+r)):e.options).find(i=>{var b;return!i.dataRef.current.disabled&&((b=i.dataRef.current.textValue)==null?void 0:b.startsWith(l))}),u=p?e.options.indexOf(p):-1;return u===-1||u===e.activeOptionIndex?{...e,searchQuery:l}:{...e,searchQuery:l,activeOptionIndex:u,activationTrigger:1}},[4](e){return e.dataRef.current.disabled||e.listboxState===1||e.searchQuery===\"\"?e:{...e,searchQuery:\"\"}},[5]:(e,a)=>{let n={id:a.id,dataRef:a.dataRef},r=z(e,l=>[...l,n]);return e.activeOptionIndex===null&&e.dataRef.current.isSelected(a.dataRef.current.value)&&(r.activeOptionIndex=r.options.indexOf(n)),{...e,...r}},[6]:(e,a)=>{let n=z(e,r=>{let l=r.findIndex(t=>t.id===a.id);return l!==-1&&r.splice(l,1),r});return{...e,...n,activationTrigger:1}},[7]:(e,a)=>({...e,labelId:a.id})},J=Z(null);J.displayName=\"ListboxActionsContext\";function U(e){let a=ee(J);if(a===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,U),n}return a}let q=Z(null);q.displayName=\"ListboxDataContext\";function B(e){let a=ee(q);if(a===null){let n=new Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,B),n}return a}function Ve(e,a){return I(a.type,je,e,a)}let Ke=xe;function Qe(e,a){let{value:n,defaultValue:r,form:l,name:t,onChange:p,by:u=(s,c)=>s===c,disabled:i=!1,horizontal:b=!1,multiple:m=!1,...L}=e;const P=b?\"horizontal\":\"vertical\";let S=k(a),[g=m?[]:void 0,R]=ke(n,p,r),[T,o]=Oe(Ve,{dataRef:ye(),listboxState:1,options:[],searchQuery:\"\",labelId:null,activeOptionIndex:null,activationTrigger:1}),x=D({static:!1,hold:!1}),E=D(null),H=D(null),X=D(null),C=f(typeof u==\"string\"?(s,c)=>{let O=u;return(s==null?void 0:s[O])===(c==null?void 0:c[O])}:u),A=ge(s=>I(d.mode,{[1]:()=>g.some(c=>C(c,s)),[0]:()=>C(g,s)}),[g]),d=h(()=>({...T,value:g,disabled:i,mode:m?1:0,orientation:P,compare:C,isSelected:A,optionsPropsRef:x,labelRef:E,buttonRef:H,optionsRef:X}),[g,i,m,T]);Q(()=>{T.dataRef.current=d},[d]),De([d.buttonRef,d.optionsRef],(s,c)=>{var O;o({type:1}),ve(c,Ae.Loose)||(s.preventDefault(),(O=d.buttonRef.current)==null||O.focus())},d.listboxState===0);let G=h(()=>({open:d.listboxState===0,disabled:i,value:g}),[d,i,g]),ie=f(s=>{let c=d.options.find(O=>O.id===s);c&&F(c.dataRef.current.value)}),re=f(()=>{if(d.activeOptionIndex!==null){let{dataRef:s,id:c}=d.options[d.activeOptionIndex];F(s.current.value),o({type:2,focus:v.Specific,id:c})}}),ae=f(()=>o({type:0})),le=f(()=>o({type:1})),se=f((s,c,O)=>s===v.Specific?o({type:2,focus:v.Specific,id:c,trigger:O}):o({type:2,focus:s,trigger:O})),pe=f((s,c)=>(o({type:5,id:s,dataRef:c}),()=>o({type:6,id:s}))),ue=f(s=>(o({type:7,id:s}),()=>o({type:7,id:null}))),F=f(s=>I(d.mode,{[0](){return R==null?void 0:R(s)},[1](){let c=d.value.slice(),O=c.findIndex(M=>C(M,s));return O===-1?c.push(s):c.splice(O,1),R==null?void 0:R(c)}})),de=f(s=>o({type:3,value:s})),ce=f(()=>o({type:4})),fe=h(()=>({onChange:F,registerOption:pe,registerLabel:ue,goToOption:se,closeListbox:le,openListbox:ae,selectActiveOption:re,selectOption:ie,search:de,clearSearch:ce}),[]),Te={ref:S},N=D(null),be=V();return te(()=>{N.current&&r!==void 0&&be.addEventListener(N.current,\"reset\",()=>{F(r)})},[N,F]),j.createElement(J.Provider,{value:fe},j.createElement(q.Provider,{value:d},j.createElement(Ee,{value:I(d.listboxState,{[0]:W.Open,[1]:W.Closed})},t!=null&&g!=null&&Fe({[t]:g}).map(([s,c],O)=>j.createElement(Ie,{features:Ce.Hidden,ref:O===0?M=>{var Y;N.current=(Y=M==null?void 0:M.closest(\"form\"))!=null?Y:null}:void 0,...Le({key:s,as:\"input\",type:\"hidden\",hidden:!0,readOnly:!0,form:l,name:s,value:c})})),_({ourProps:Te,theirProps:L,slot:G,defaultTag:Ke,name:\"Listbox\"}))))}let We=\"button\";function Xe(e,a){var R;let n=K(),{id:r=`headlessui-listbox-button-${n}`,...l}=e,t=B(\"Listbox.Button\"),p=U(\"Listbox.Button\"),u=k(t.buttonRef,a),i=V(),b=f(T=>{switch(T.key){case y.Space:case y.Enter:case y.ArrowDown:T.preventDefault(),p.openListbox(),i.nextFrame(()=>{t.value||p.goToOption(v.First)});break;case y.ArrowUp:T.preventDefault(),p.openListbox(),i.nextFrame(()=>{t.value||p.goToOption(v.Last)});break}}),m=f(T=>{switch(T.key){case y.Space:T.preventDefault();break}}),L=f(T=>{if(Re(T.currentTarget))return T.preventDefault();t.listboxState===0?(p.closeListbox(),i.nextFrame(()=>{var o;return(o=t.buttonRef.current)==null?void 0:o.focus({preventScroll:!0})})):(T.preventDefault(),p.openListbox())}),P=oe(()=>{if(t.labelId)return[t.labelId,r].join(\" \")},[t.labelId,r]),S=h(()=>({open:t.listboxState===0,disabled:t.disabled,value:t.value}),[t]),g={ref:u,id:r,type:he(e,t.buttonRef),\"aria-haspopup\":\"listbox\",\"aria-controls\":(R=t.optionsRef.current)==null?void 0:R.id,\"aria-expanded\":t.disabled?void 0:t.listboxState===0,\"aria-labelledby\":P,disabled:t.disabled,onKeyDown:b,onKeyUp:m,onClick:L};return _({ourProps:g,theirProps:l,slot:S,defaultTag:We,name:\"Listbox.Button\"})}let $e=\"label\";function ze(e,a){let n=K(),{id:r=`headlessui-listbox-label-${n}`,...l}=e,t=B(\"Listbox.Label\"),p=U(\"Listbox.Label\"),u=k(t.labelRef,a);Q(()=>p.registerLabel(r),[r]);let i=f(()=>{var L;return(L=t.buttonRef.current)==null?void 0:L.focus({preventScroll:!0})}),b=h(()=>({open:t.listboxState===0,disabled:t.disabled}),[t]);return _({ourProps:{ref:u,id:r,onClick:i},theirProps:l,slot:b,defaultTag:$e,name:\"Listbox.Label\"})}let Je=\"ul\",qe=ne.RenderStrategy|ne.Static;function Ye(e,a){var T;let n=K(),{id:r=`headlessui-listbox-options-${n}`,...l}=e,t=B(\"Listbox.Options\"),p=U(\"Listbox.Options\"),u=k(t.optionsRef,a),i=V(),b=V(),m=Pe(),L=(()=>m!==null?(m&W.Open)===W.Open:t.listboxState===0)();te(()=>{var x;let o=t.optionsRef.current;o&&t.listboxState===0&&o!==((x=Me(o))==null?void 0:x.activeElement)&&o.focus({preventScroll:!0})},[t.listboxState,t.optionsRef]);let P=f(o=>{switch(b.dispose(),o.key){case y.Space:if(t.searchQuery!==\"\")return o.preventDefault(),o.stopPropagation(),p.search(o.key);case y.Enter:if(o.preventDefault(),o.stopPropagation(),t.activeOptionIndex!==null){let{dataRef:x}=t.options[t.activeOptionIndex];p.onChange(x.current.value)}t.mode===0&&(p.closeListbox(),$().nextFrame(()=>{var x;return(x=t.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})}));break;case I(t.orientation,{vertical:y.ArrowDown,horizontal:y.ArrowRight}):return o.preventDefault(),o.stopPropagation(),p.goToOption(v.Next);case I(t.orientation,{vertical:y.ArrowUp,horizontal:y.ArrowLeft}):return o.preventDefault(),o.stopPropagation(),p.goToOption(v.Previous);case y.Home:case y.PageUp:return o.preventDefault(),o.stopPropagation(),p.goToOption(v.First);case y.End:case y.PageDown:return o.preventDefault(),o.stopPropagation(),p.goToOption(v.Last);case y.Escape:return o.preventDefault(),o.stopPropagation(),p.closeListbox(),i.nextFrame(()=>{var x;return(x=t.buttonRef.current)==null?void 0:x.focus({preventScroll:!0})});case y.Tab:o.preventDefault(),o.stopPropagation();break;default:o.key.length===1&&(p.search(o.key),b.setTimeout(()=>p.clearSearch(),350));break}}),S=oe(()=>{var o,x,E;return(E=(o=t.labelRef.current)==null?void 0:o.id)!=null?E:(x=t.buttonRef.current)==null?void 0:x.id},[t.labelRef.current,t.buttonRef.current]),g=h(()=>({open:t.listboxState===0}),[t]),R={\"aria-activedescendant\":t.activeOptionIndex===null||(T=t.options[t.activeOptionIndex])==null?void 0:T.id,\"aria-multiselectable\":t.mode===1?!0:void 0,\"aria-labelledby\":S,\"aria-orientation\":t.orientation,id:r,onKeyDown:P,role:\"listbox\",tabIndex:0,ref:u};return _({ourProps:R,theirProps:l,slot:g,defaultTag:Je,features:qe,visible:L,name:\"Listbox.Options\"})}let Ze=\"li\";function et(e,a){let n=K(),{id:r=`headlessui-listbox-option-${n}`,disabled:l=!1,value:t,...p}=e,u=B(\"Listbox.Option\"),i=U(\"Listbox.Option\"),b=u.activeOptionIndex!==null?u.options[u.activeOptionIndex].id===r:!1,m=u.isSelected(t),L=D(null),P=Ue(L),S=we({disabled:l,value:t,domRef:L,get textValue(){return P()}}),g=k(a,L);Q(()=>{if(u.listboxState!==0||!b||u.activationTrigger===0)return;let A=$();return A.requestAnimationFrame(()=>{var d,G;(G=(d=L.current)==null?void 0:d.scrollIntoView)==null||G.call(d,{block:\"nearest\"})}),A.dispose},[L,b,u.listboxState,u.activationTrigger,u.activeOptionIndex]),Q(()=>i.registerOption(r,S),[S,r]);let R=f(A=>{if(l)return A.preventDefault();i.onChange(t),u.mode===0&&(i.closeListbox(),$().nextFrame(()=>{var d;return(d=u.buttonRef.current)==null?void 0:d.focus({preventScroll:!0})}))}),T=f(()=>{if(l)return i.goToOption(v.Nothing);i.goToOption(v.Specific,r)}),o=_e(),x=f(A=>o.update(A)),E=f(A=>{o.wasMoved(A)&&(l||b||i.goToOption(v.Specific,r,0))}),H=f(A=>{o.wasMoved(A)&&(l||b&&i.goToOption(v.Nothing))}),X=h(()=>({active:b,selected:m,disabled:l}),[b,m,l]);return _({ourProps:{id:r,ref:g,role:\"option\",tabIndex:l===!0?void 0:-1,\"aria-disabled\":l===!0?!0:void 0,\"aria-selected\":m,disabled:void 0,onClick:R,onFocus:T,onPointerEnter:x,onMouseEnter:x,onPointerMove:E,onMouseMove:E,onPointerLeave:H,onMouseLeave:H},theirProps:p,slot:X,defaultTag:Ze,name:\"Listbox.Option\"})}let tt=w(Qe),ot=w(Xe),nt=w(ze),it=w(Ye),rt=w(et),Nt=Object.assign(tt,{Button:ot,Label:nt,Options:it,Option:rt});export{Nt as Listbox};\n","function l(r){let e={called:!1};return(...t)=>{if(!e.called)return e.called=!0,r(...t)}}export{l as once};\n","import{once as T}from'../../../utils/once.js';import{disposables as g}from'../../../utils/disposables.js';import{match as s}from'../../../utils/match.js';function d(t,...e){t&&e.length>0&&t.classList.add(...e)}function v(t,...e){t&&e.length>0&&t.classList.remove(...e)}function F(t,e){let n=g();if(!t)return n.dispose;let{transitionDuration:m,transitionDelay:o}=getComputedStyle(t),[u,p]=[m,o].map(a=>{let[r=0]=a.split(\",\").filter(Boolean).map(i=>i.includes(\"ms\")?parseFloat(i):parseFloat(i)*1e3).sort((i,f)=>f-i);return r}),l=u+p;if(l!==0){n.group(r=>{r.setTimeout(()=>{e(),r.dispose()},l),r.addEventListener(t,\"transitionrun\",i=>{i.target===i.currentTarget&&r.dispose()})});let a=n.addEventListener(t,\"transitionend\",r=>{r.target===r.currentTarget&&(e(),a())})}else e();return n.add(()=>e()),n.dispose}function y(t,e,n,m){let o=n?\"enter\":\"leave\",u=g(),p=m!==void 0?T(m):()=>{};o===\"enter\"&&(t.removeAttribute(\"hidden\"),t.style.display=\"\");let l=s(o,{enter:()=>e.enter,leave:()=>e.leave}),a=s(o,{enter:()=>e.enterTo,leave:()=>e.leaveTo}),r=s(o,{enter:()=>e.enterFrom,leave:()=>e.leaveFrom});return v(t,...e.enter,...e.enterTo,...e.enterFrom,...e.leave,...e.leaveFrom,...e.leaveTo,...e.entered),d(t,...l,...r),u.nextFrame(()=>{v(t,...r),d(t,...a),F(t,()=>(v(t,...l),d(t,...e.entered),p()))}),u.dispose}export{y as transition};\n","import{transition as d}from'../components/transitions/utils/transition.js';import{disposables as l}from'../utils/disposables.js';import{useDisposables as f}from'./use-disposables.js';import{useIsMounted as m}from'./use-is-mounted.js';import{useIsoMorphicEffect as p}from'./use-iso-morphic-effect.js';import{useLatestValue as b}from'./use-latest-value.js';function D({container:i,direction:t,classes:o,onStart:s,onStop:u}){let a=m(),c=f(),r=b(t);p(()=>{let e=l();c.add(e.dispose);let n=i.current;if(n&&r.current!==\"idle\"&&a.current)return e.dispose(),s.current(r.current),e.add(d(n,o.current,r.current===\"enter\",()=>{e.dispose(),u.current(r.current)})),e.dispose},[t])}export{D as useTransition};\n","import{useState as f,useCallback as n}from\"react\";import{useIsMounted as i}from'./use-is-mounted.js';function c(a=0){let[l,r]=f(a),t=i(),o=n(e=>{t.current&&r(u=>u|e)},[l,t]),m=n(e=>Boolean(l&e),[l]),s=n(e=>{t.current&&r(u=>u&~e)},[r,t]),g=n(e=>{t.current&&r(u=>u^e)},[r]);return{flags:l,addFlag:o,hasFlag:m,removeFlag:s,toggleFlag:g}}export{c as useFlags};\n","import m,{Fragment as Q,createContext as Y,useContext as X,useEffect as y,useMemo as Z,useRef as c,useState as W}from\"react\";import{Features as de,forwardRefWithAs as q,render as $,RenderStrategy as E}from'../../utils/render.js';import{OpenClosedProvider as fe,State as b,useOpenClosed as ee}from'../../internal/open-closed.js';import{match as F}from'../../utils/match.js';import{useIsMounted as me}from'../../hooks/use-is-mounted.js';import{useIsoMorphicEffect as ce}from'../../hooks/use-iso-morphic-effect.js';import{useLatestValue as A}from'../../hooks/use-latest-value.js';import{useServerHandoffComplete as te}from'../../hooks/use-server-handoff-complete.js';import{useSyncRefs as ne}from'../../hooks/use-sync-refs.js';import{useTransition as pe}from'../../hooks/use-transition.js';import{useEvent as S}from'../../hooks/use-event.js';import{useDisposables as he}from'../../hooks/use-disposables.js';import{classNames as ve}from'../../utils/class-names.js';import{useFlags as ge}from'../../hooks/use-flags.js';function x(t=\"\"){return t.split(\" \").filter(n=>n.trim().length>1)}let I=Y(null);I.displayName=\"TransitionContext\";var Ce=(r=>(r.Visible=\"visible\",r.Hidden=\"hidden\",r))(Ce||{});function Ee(){let t=X(I);if(t===null)throw new Error(\"A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.\");return t}function be(){let t=X(_);if(t===null)throw new Error(\"A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.\");return t}let _=Y(null);_.displayName=\"NestingContext\";function M(t){return\"children\"in t?M(t.children):t.current.filter(({el:n})=>n.current!==null).filter(({state:n})=>n===\"visible\").length>0}function re(t,n){let r=A(t),o=c([]),N=me(),H=he(),p=S((s,e=E.Hidden)=>{let a=o.current.findIndex(({el:i})=>i===s);a!==-1&&(F(e,{[E.Unmount](){o.current.splice(a,1)},[E.Hidden](){o.current[a].state=\"hidden\"}}),H.microTask(()=>{var i;!M(o)&&N.current&&((i=r.current)==null||i.call(r))}))}),P=S(s=>{let e=o.current.find(({el:a})=>a===s);return e?e.state!==\"visible\"&&(e.state=\"visible\"):o.current.push({el:s,state:\"visible\"}),()=>p(s,E.Unmount)}),h=c([]),v=c(Promise.resolve()),T=c({enter:[],leave:[],idle:[]}),g=S((s,e,a)=>{h.current.splice(0),n&&(n.chains.current[e]=n.chains.current[e].filter(([i])=>i!==s)),n==null||n.chains.current[e].push([s,new Promise(i=>{h.current.push(i)})]),n==null||n.chains.current[e].push([s,new Promise(i=>{Promise.all(T.current[e].map(([l,R])=>R)).then(()=>i())})]),e===\"enter\"?v.current=v.current.then(()=>n==null?void 0:n.wait.current).then(()=>a(e)):a(e)}),f=S((s,e,a)=>{Promise.all(T.current[e].splice(0).map(([i,l])=>l)).then(()=>{var i;(i=h.current.shift())==null||i()}).then(()=>a(e))});return Z(()=>({children:o,register:P,unregister:p,onStart:g,onStop:f,wait:v,chains:T}),[P,p,o,g,f,T,v])}function Se(){}let xe=[\"beforeEnter\",\"afterEnter\",\"beforeLeave\",\"afterLeave\"];function ie(t){var r;let n={};for(let o of xe)n[o]=(r=t[o])!=null?r:Se;return n}function Pe(t){let n=c(ie(t));return y(()=>{n.current=ie(t)},[t]),n}let Re=\"div\",oe=de.RenderStrategy;function ye(t,n){let{beforeEnter:r,afterEnter:o,beforeLeave:N,afterLeave:H,enter:p,enterFrom:P,enterTo:h,entered:v,leave:T,leaveFrom:g,leaveTo:f,...s}=t,e=c(null),a=ne(e,n),i=s.unmount?E.Unmount:E.Hidden,{show:l,appear:R,initial:d}=Ee(),[u,U]=W(l?\"visible\":\"hidden\"),K=be(),{register:L,unregister:w}=K,j=c(null);y(()=>L(e),[L,e]),y(()=>{if(i===E.Hidden&&e.current){if(l&&u!==\"visible\"){U(\"visible\");return}return F(u,{[\"hidden\"]:()=>w(e),[\"visible\"]:()=>L(e)})}},[u,e,L,w,l,i]);let k=A({enter:x(p),enterFrom:x(P),enterTo:x(h),entered:x(v),leave:x(T),leaveFrom:x(g),leaveTo:x(f)}),O=Pe({beforeEnter:r,afterEnter:o,beforeLeave:N,afterLeave:H}),G=te();y(()=>{if(G&&u===\"visible\"&&e.current===null)throw new Error(\"Did you forget to passthrough the `ref` to the actual DOM node?\")},[e,u,G]);let B=d&&!R,ae=(()=>!G||B||j.current===l?\"idle\":l?\"enter\":\"leave\")(),D=ge(0),le=S(C=>F(C,{enter:()=>{D.addFlag(b.Opening),O.current.beforeEnter()},leave:()=>{D.addFlag(b.Closing),O.current.beforeLeave()},idle:()=>{}})),ue=S(C=>F(C,{enter:()=>{D.removeFlag(b.Opening),O.current.afterEnter()},leave:()=>{D.removeFlag(b.Closing),O.current.afterLeave()},idle:()=>{}})),V=re(()=>{U(\"hidden\"),w(e)},K);pe({container:e,classes:k,direction:ae,onStart:A(C=>{V.onStart(e,C,le)}),onStop:A(C=>{V.onStop(e,C,ue),C===\"leave\"&&!M(V)&&(U(\"hidden\"),w(e))})}),y(()=>{B&&(i===E.Hidden?j.current=null:j.current=l)},[l,B,u]);let J=s,Te={ref:a};return R&&l&&d&&(J={...J,className:ve(s.className,...k.current.enter,...k.current.enterFrom)}),m.createElement(_.Provider,{value:V},m.createElement(fe,{value:F(u,{[\"visible\"]:b.Open,[\"hidden\"]:b.Closed})|D.flags},$({ourProps:Te,theirProps:J,defaultTag:Re,features:oe,visible:u===\"visible\",name:\"Transition.Child\"})))}function Ne(t,n){let{show:r,appear:o=!1,unmount:N,...H}=t,p=c(null),P=ne(p,n);te();let h=ee();if(r===void 0&&h!==null&&(r=(h&b.Open)===b.Open),![!0,!1].includes(r))throw new Error(\"A <Transition /> is used but it is missing a `show={true | false}` prop.\");let[v,T]=W(r?\"visible\":\"hidden\"),g=re(()=>{T(\"hidden\")}),[f,s]=W(!0),e=c([r]);ce(()=>{f!==!1&&e.current[e.current.length-1]!==r&&(e.current.push(r),s(!1))},[e,r]);let a=Z(()=>({show:r,appear:o,initial:f}),[r,o,f]);y(()=>{if(r)T(\"visible\");else if(!M(g))T(\"hidden\");else{let d=p.current;if(!d)return;let u=d.getBoundingClientRect();u.x===0&&u.y===0&&u.width===0&&u.height===0&&T(\"hidden\")}},[r,g]);let i={unmount:N},l=S(()=>{var d;f&&s(!1),(d=t.beforeEnter)==null||d.call(t)}),R=S(()=>{var d;f&&s(!1),(d=t.beforeLeave)==null||d.call(t)});return m.createElement(_.Provider,{value:g},m.createElement(I.Provider,{value:a},$({ourProps:{...i,as:Q,children:m.createElement(se,{ref:P,...i,...H,beforeEnter:l,beforeLeave:R})},theirProps:{},defaultTag:Q,features:oe,visible:v===\"visible\",name:\"Transition\"})))}function He(t,n){let r=X(I)!==null,o=ee()!==null;return m.createElement(m.Fragment,null,!r&&o?m.createElement(z,{ref:n,...t}):m.createElement(se,{ref:n,...t}))}let z=q(Ne),se=q(ye),De=q(He),$e=Object.assign(z,{Child:De,Root:z});export{$e as Transition};\n","import{useState as s}from\"react\";import{useIsoMorphicEffect as f}from'./use-iso-morphic-effect.js';import{useLatestValue as m}from'./use-latest-value.js';function i(e,o){let[u,t]=s(e),r=m(e);return f(()=>t(r.current),[r,t,...o]),u}export{i as useComputed};\n","import{useRef as o,useState as f}from\"react\";import{useEvent as a}from'./use-event.js';function T(l,r,c){let[i,s]=f(c),e=l!==void 0,t=o(e),u=o(!1),d=o(!1);return e&&!t.current&&!u.current?(u.current=!0,t.current=e,console.error(\"A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.\")):!e&&t.current&&!d.current&&(d.current=!0,t.current=e,console.error(\"A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.\")),[e?l:i,a(n=>(e||s(n),r==null?void 0:r(n)))]}export{T as useControllable};\n","import{useState as s,useEffect as o}from\"react\";import{disposables as t}from'../utils/disposables.js';function p(){let[e]=s(t);return o(()=>()=>e.dispose(),[e]),e}export{p as useDisposables};\n","import a from\"react\";import{useLatestValue as n}from'./use-latest-value.js';let o=function(t){let e=n(t);return a.useCallback((...r)=>e.current(...r),[e])};export{o as useEvent};\n","var o;import t from\"react\";import{useIsoMorphicEffect as d}from'./use-iso-morphic-effect.js';import{useServerHandoffComplete as f}from'./use-server-handoff-complete.js';import{env as r}from'../utils/env.js';let I=(o=t.useId)!=null?o:function(){let n=f(),[e,u]=t.useState(n?()=>r.nextId():null);return d(()=>{e===null&&u(r.nextId())},[e]),e!=null?\"\"+e:void 0};export{I as useId};\n","import{useRef as r}from\"react\";import{useIsoMorphicEffect as t}from'./use-iso-morphic-effect.js';function f(){let e=r(!1);return t(()=>(e.current=!0,()=>{e.current=!1}),[]),e}export{f as useIsMounted};\n","import{useLayoutEffect as t,useEffect as c}from\"react\";import{env as i}from'../utils/env.js';let l=(e,f)=>{i.isServer?c(e,f):t(e,f)};export{l as useIsoMorphicEffect};\n","import{useRef as t}from\"react\";import{useIsoMorphicEffect as o}from'./use-iso-morphic-effect.js';function s(e){let r=t(e);return o(()=>{r.current=e},[e]),r}export{s as useLatestValue};\n","import{useEffect as m}from\"react\";import{useLatestValue as c}from'./use-latest-value.js';function d(e,r,n){let o=c(r);m(()=>{function t(u){o.current(u)}return document.addEventListener(e,t,n),()=>document.removeEventListener(e,t,n)},[e,n])}export{d as useDocumentEvent};\n","import{useEffect as d,useRef as c}from\"react\";import{FocusableMode as p,isFocusableElement as C}from'../utils/focus-management.js';import{useDocumentEvent as f}from'./use-document-event.js';import{useWindowEvent as M}from'./use-window-event.js';function H(s,m,i=!0){let l=c(!1);d(()=>{requestAnimationFrame(()=>{l.current=i})},[i]);function a(e,o){if(!l.current||e.defaultPrevented)return;let n=o(e);if(n===null||!n.getRootNode().contains(n))return;let E=function r(t){return typeof t==\"function\"?r(t()):Array.isArray(t)||t instanceof Set?t:[t]}(s);for(let r of E){if(r===null)continue;let t=r instanceof HTMLElement?r:r.current;if(t!=null&&t.contains(n)||e.composed&&e.composedPath().includes(t))return}return!C(n,p.Loose)&&n.tabIndex!==-1&&e.preventDefault(),m(e,n)}let u=c(null);f(\"mousedown\",e=>{var o,n;l.current&&(u.current=((n=(o=e.composedPath)==null?void 0:o.call(e))==null?void 0:n[0])||e.target)},!0),f(\"click\",e=>{u.current&&(a(e,()=>u.current),u.current=null)},!0),M(\"blur\",e=>a(e,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}export{H as useOutsideClick};\n","import{useState as o}from\"react\";import{useIsoMorphicEffect as r}from'./use-iso-morphic-effect.js';function i(t){var n;if(t.type)return t.type;let e=(n=t.as)!=null?n:\"button\";if(typeof e==\"string\"&&e.toLowerCase()===\"button\")return\"button\"}function s(t,e){let[n,u]=o(()=>i(t));return r(()=>{u(i(t))},[t.type,t.as]),r(()=>{n||e.current&&e.current instanceof HTMLButtonElement&&!e.current.hasAttribute(\"type\")&&u(\"button\")},[n,e]),n}export{s as useResolveButtonType};\n","import{useState as r,useEffect as o}from\"react\";import{env as t}from'../utils/env.js';function l(){let[e,f]=r(t.isHandoffComplete);return e&&t.isHandoffComplete===!1&&f(!1),o(()=>{e!==!0&&f(!0)},[e]),o(()=>t.handoff(),[]),e}export{l as useServerHandoffComplete};\n","import{useRef as l,useEffect as i}from\"react\";import{useEvent as r}from'./use-event.js';let u=Symbol();function T(t,n=!0){return Object.assign(t,{[u]:n})}function y(...t){let n=l(t);i(()=>{n.current=t},[t]);let c=r(e=>{for(let o of n.current)o!=null&&(typeof o==\"function\"?o(e):o.current=e)});return t.every(e=>e==null||(e==null?void 0:e[u]))?void 0:c}export{T as optionalRef,y as useSyncRefs};\n","import{useRef as o}from\"react\";function t(e){return[e.screenX,e.screenY]}function u(){let e=o([-1,-1]);return{wasMoved(r){let n=t(r);return e.current[0]===n[0]&&e.current[1]===n[1]?!1:(e.current=n,!0)},update(r){e.current=t(r)}}}export{u as useTrackedPointer};\n","import{useEffect as s,useRef as f}from\"react\";import{useEvent as i}from'./use-event.js';function m(u,t){let e=f([]),r=i(u);s(()=>{let o=[...e.current];for(let[n,a]of t.entries())if(e.current[n]!==a){let l=r(t,o);return e.current=t,l}},[r,...t])}export{m as useWatch};\n","import{useEffect as d}from\"react\";import{useLatestValue as a}from'./use-latest-value.js';function s(e,r,n){let o=a(r);d(()=>{function t(i){o.current(i)}return window.addEventListener(e,t,n),()=>window.removeEventListener(e,t,n)},[e,n])}export{s as useWindowEvent};\n","import{forwardRefWithAs as r,render as i}from'../utils/render.js';let a=\"div\";var p=(e=>(e[e.None=1]=\"None\",e[e.Focusable=2]=\"Focusable\",e[e.Hidden=4]=\"Hidden\",e))(p||{});function s(t,o){let{features:n=1,...e}=t,d={ref:o,\"aria-hidden\":(n&2)===2?!0:void 0,style:{position:\"fixed\",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:\"hidden\",clip:\"rect(0, 0, 0, 0)\",whiteSpace:\"nowrap\",borderWidth:\"0\",...(n&4)===4&&(n&2)!==2&&{display:\"none\"}}};return i({ourProps:d,theirProps:e,slot:{},defaultTag:a,name:\"Hidden\"})}let c=r(s);export{p as Features,c as Hidden};\n","import l,{createContext as t,useContext as p}from\"react\";let n=t(null);n.displayName=\"OpenClosedContext\";var d=(e=>(e[e.Open=1]=\"Open\",e[e.Closed=2]=\"Closed\",e[e.Closing=4]=\"Closing\",e[e.Opening=8]=\"Opening\",e))(d||{});function C(){return p(n)}function c({value:o,children:r}){return l.createElement(n.Provider,{value:o},r)}export{c as OpenClosedProvider,d as State,C as useOpenClosed};\n","function r(n){let e=n.parentElement,l=null;for(;e&&!(e instanceof HTMLFieldSetElement);)e instanceof HTMLLegendElement&&(l=e),e=e.parentElement;let t=(e==null?void 0:e.getAttribute(\"disabled\"))===\"\";return t&&i(l)?!1:t}function i(n){if(!n)return!1;let e=n.previousElementSibling;for(;e!==null;){if(e instanceof HTMLLegendElement)return!1;e=e.previousElementSibling}return!0}export{r as isDisabledReactIssue7711};\n","function f(r){throw new Error(\"Unexpected object: \"+r)}var a=(e=>(e[e.First=0]=\"First\",e[e.Previous=1]=\"Previous\",e[e.Next=2]=\"Next\",e[e.Last=3]=\"Last\",e[e.Specific=4]=\"Specific\",e[e.Nothing=5]=\"Nothing\",e))(a||{});function x(r,n){let t=n.resolveItems();if(t.length<=0)return null;let l=n.resolveActiveIndex(),s=l!=null?l:-1,d=(()=>{switch(r.focus){case 0:return t.findIndex(e=>!n.resolveDisabled(e));case 1:{let e=t.slice().reverse().findIndex((i,c,u)=>s!==-1&&u.length-c-1>=s?!1:!n.resolveDisabled(i));return e===-1?e:t.length-1-e}case 2:return t.findIndex((e,i)=>i<=s?!1:!n.resolveDisabled(e));case 3:{let e=t.slice().reverse().findIndex(i=>!n.resolveDisabled(i));return e===-1?e:t.length-1-e}case 4:return t.findIndex(e=>n.resolveId(e)===r.id);case 5:return null;default:f(r)}})();return d===-1?l:d}export{a as Focus,x as calculateActiveIndex};\n","function e(...n){return n.filter(Boolean).join(\" \")}export{e as classNames};\n","import{microTask as i}from'./micro-task.js';function o(){let n=[],r={addEventListener(e,t,s,a){return e.addEventListener(t,s,a),r.add(()=>e.removeEventListener(t,s,a))},requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return r.add(()=>cancelAnimationFrame(t))},nextFrame(...e){return r.requestAnimationFrame(()=>r.requestAnimationFrame(...e))},setTimeout(...e){let t=setTimeout(...e);return r.add(()=>clearTimeout(t))},microTask(...e){let t={current:!0};return i(()=>{t.current&&e[0]()}),r.add(()=>{t.current=!1})},style(e,t,s){let a=e.style.getPropertyValue(t);return Object.assign(e.style,{[t]:s}),this.add(()=>{Object.assign(e.style,{[t]:a})})},group(e){let t=o();return e(t),this.add(()=>t.dispose())},add(e){return n.push(e),()=>{let t=n.indexOf(e);if(t>=0)for(let s of n.splice(t,1))s()}},dispose(){for(let e of n.splice(0))e()}};return r}export{o as disposables};\n","var i=Object.defineProperty;var d=(t,e,n)=>e in t?i(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var r=(t,e,n)=>(d(t,typeof e!=\"symbol\"?e+\"\":e,n),n);class o{constructor(){r(this,\"current\",this.detect());r(this,\"handoffState\",\"pending\");r(this,\"currentId\",0)}set(e){this.current!==e&&(this.handoffState=\"pending\",this.currentId=0,this.current=e)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current===\"server\"}get isClient(){return this.current===\"client\"}detect(){return typeof window==\"undefined\"||typeof document==\"undefined\"?\"server\":\"client\"}handoff(){this.handoffState===\"pending\"&&(this.handoffState=\"complete\")}get isHandoffComplete(){return this.handoffState===\"complete\"}}let s=new o;export{s as env};\n","import{disposables as b}from'./disposables.js';import{match as L}from'./match.js';import{getOwnerDocument as m}from'./owner.js';let c=[\"[contentEditable=true]\",\"[tabindex]\",\"a[href]\",\"area[href]\",\"button:not([disabled])\",\"iframe\",\"input:not([disabled])\",\"select:not([disabled])\",\"textarea:not([disabled])\"].map(e=>`${e}:not([tabindex='-1'])`).join(\",\");var M=(n=>(n[n.First=1]=\"First\",n[n.Previous=2]=\"Previous\",n[n.Next=4]=\"Next\",n[n.Last=8]=\"Last\",n[n.WrapAround=16]=\"WrapAround\",n[n.NoScroll=32]=\"NoScroll\",n))(M||{}),N=(o=>(o[o.Error=0]=\"Error\",o[o.Overflow=1]=\"Overflow\",o[o.Success=2]=\"Success\",o[o.Underflow=3]=\"Underflow\",o))(N||{}),F=(t=>(t[t.Previous=-1]=\"Previous\",t[t.Next=1]=\"Next\",t))(F||{});function f(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(c)).sort((r,t)=>Math.sign((r.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER)))}var T=(t=>(t[t.Strict=0]=\"Strict\",t[t.Loose=1]=\"Loose\",t))(T||{});function h(e,r=0){var t;return e===((t=m(e))==null?void 0:t.body)?!1:L(r,{[0](){return e.matches(c)},[1](){let l=e;for(;l!==null;){if(l.matches(c))return!0;l=l.parentElement}return!1}})}function D(e){let r=m(e);b().nextFrame(()=>{r&&!h(r.activeElement,0)&&y(e)})}var w=(t=>(t[t.Keyboard=0]=\"Keyboard\",t[t.Mouse=1]=\"Mouse\",t))(w||{});typeof window!=\"undefined\"&&typeof document!=\"undefined\"&&(document.addEventListener(\"keydown\",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0),document.addEventListener(\"click\",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible=\"\")},!0));function y(e){e==null||e.focus({preventScroll:!0})}let S=[\"textarea\",\"input\"].join(\",\");function H(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,S))!=null?t:!1}function I(e,r=t=>t){return e.slice().sort((t,l)=>{let o=r(t),i=r(l);if(o===null||i===null)return 0;let n=o.compareDocumentPosition(i);return n&Node.DOCUMENT_POSITION_FOLLOWING?-1:n&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function _(e,r){return O(f(),r,{relativeTo:e})}function O(e,r,{sorted:t=!0,relativeTo:l=null,skipElements:o=[]}={}){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,n=Array.isArray(e)?t?I(e):e:f(e);o.length>0&&n.length>1&&(n=n.filter(s=>!o.includes(s))),l=l!=null?l:i.activeElement;let E=(()=>{if(r&5)return 1;if(r&10)return-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),x=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,n.indexOf(l))-1;if(r&4)return Math.max(0,n.indexOf(l))+1;if(r&8)return n.length-1;throw new Error(\"Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last\")})(),p=r&32?{preventScroll:!0}:{},d=0,a=n.length,u;do{if(d>=a||d+a<=0)return 0;let s=x+d;if(r&16)s=(s+a)%a;else{if(s<0)return 3;if(s>=a)return 1}u=n[s],u==null||u.focus(p),d+=E}while(u!==i.activeElement);return r&6&&H(u)&&u.select(),2}export{M as Focus,N as FocusResult,T as FocusableMode,y as focusElement,_ as focusFrom,O as focusIn,f as getFocusableElements,h as isFocusableElement,D as restoreFocusIfNecessary,I as sortByDomNode};\n","function e(n={},r=null,t=[]){for(let[i,o]of Object.entries(n))f(t,s(r,i),o);return t}function s(n,r){return n?n+\"[\"+r+\"]\":r}function f(n,r,t){if(Array.isArray(t))for(let[i,o]of t.entries())f(n,s(r,i.toString()),o);else t instanceof Date?n.push([r,t.toISOString()]):typeof t==\"boolean\"?n.push([r,t?\"1\":\"0\"]):typeof t==\"string\"?n.push([r,t]):typeof t==\"number\"?n.push([r,`${t}`]):t==null?n.push([r,\"\"]):e(t,r,n)}function p(n){var t;let r=(t=n==null?void 0:n.form)!=null?t:n.closest(\"form\");if(r){for(let i of r.elements)if(i.tagName===\"INPUT\"&&i.type===\"submit\"||i.tagName===\"BUTTON\"&&i.type===\"submit\"||i.nodeName===\"INPUT\"&&i.type===\"image\"){i.click();return}}}export{p as attemptSubmit,e as objectToFormEntries};\n","function u(r,n,...a){if(r in n){let e=n[r];return typeof e==\"function\"?e(...a):e}let t=new Error(`Tried to handle \"${r}\" but there is no handler defined. Only defined handlers are: ${Object.keys(n).map(e=>`\"${e}\"`).join(\", \")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,u),t}export{u as match};\n","function t(e){typeof queueMicrotask==\"function\"?queueMicrotask(e):Promise.resolve().then(e).catch(o=>setTimeout(()=>{throw o}))}export{t as microTask};\n","import{env as n}from'./env.js';function e(r){return n.isServer?null:r instanceof Node?r.ownerDocument:r!=null&&r.hasOwnProperty(\"current\")&&r.current instanceof Node?r.current.ownerDocument:document}export{e as getOwnerDocument};\n","function t(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function i(){return/Android/gi.test(window.navigator.userAgent)}function n(){return t()||i()}export{i as isAndroid,t as isIOS,n as isMobile};\n","import{Fragment as T,cloneElement as x,createElement as E,forwardRef as b,isValidElement as h}from\"react\";import{classNames as F}from'./class-names.js';import{match as P}from'./match.js';var S=(a=>(a[a.None=0]=\"None\",a[a.RenderStrategy=1]=\"RenderStrategy\",a[a.Static=2]=\"Static\",a))(S||{}),j=(e=>(e[e.Unmount=0]=\"Unmount\",e[e.Hidden=1]=\"Hidden\",e))(j||{});function X({ourProps:r,theirProps:t,slot:e,defaultTag:a,features:s,visible:n=!0,name:f}){let o=N(t,r);if(n)return c(o,e,a,f);let u=s!=null?s:0;if(u&2){let{static:l=!1,...p}=o;if(l)return c(p,e,a,f)}if(u&1){let{unmount:l=!0,...p}=o;return P(l?0:1,{[0](){return null},[1](){return c({...p,hidden:!0,style:{display:\"none\"}},e,a,f)}})}return c(o,e,a,f)}function c(r,t={},e,a){let{as:s=e,children:n,refName:f=\"ref\",...o}=g(r,[\"unmount\",\"static\"]),u=r.ref!==void 0?{[f]:r.ref}:{},l=typeof n==\"function\"?n(t):n;\"className\"in o&&o.className&&typeof o.className==\"function\"&&(o.className=o.className(t));let p={};if(t){let i=!1,m=[];for(let[y,d]of Object.entries(t))typeof d==\"boolean\"&&(i=!0),d===!0&&m.push(y);i&&(p[\"data-headlessui-state\"]=m.join(\" \"))}if(s===T&&Object.keys(R(o)).length>0){if(!h(l)||Array.isArray(l)&&l.length>1)throw new Error(['Passing props on \"Fragment\"!',\"\",`The current component <${a} /> is rendering a \"Fragment\".`,\"However we need to passthrough the following props:\",Object.keys(o).map(d=>` - ${d}`).join(`\n`),\"\",\"You can apply a few solutions:\",['Add an `as=\"...\"` prop, to ensure that we render an actual element instead of a \"Fragment\".',\"Render a single element as the child so that we can forward the props onto that element.\"].map(d=>` - ${d}`).join(`\n`)].join(`\n`));let i=l.props,m=typeof(i==null?void 0:i.className)==\"function\"?(...d)=>F(i==null?void 0:i.className(...d),o.className):F(i==null?void 0:i.className,o.className),y=m?{className:m}:{};return x(l,Object.assign({},N(l.props,R(g(o,[\"ref\"]))),p,u,w(l.ref,u.ref),y))}return E(s,Object.assign({},g(o,[\"ref\"]),s!==T&&u,s!==T&&p),l)}function w(...r){return{ref:r.every(t=>t==null)?void 0:t=>{for(let e of r)e!=null&&(typeof e==\"function\"?e(t):e.current=t)}}}function N(...r){var a;if(r.length===0)return{};if(r.length===1)return r[0];let t={},e={};for(let s of r)for(let n in s)n.startsWith(\"on\")&&typeof s[n]==\"function\"?((a=e[n])!=null||(e[n]=[]),e[n].push(s[n])):t[n]=s[n];if(t.disabled||t[\"aria-disabled\"])return Object.assign(t,Object.fromEntries(Object.keys(e).map(s=>[s,void 0])));for(let s in e)Object.assign(t,{[s](n,...f){let o=e[s];for(let u of o){if((n instanceof Event||(n==null?void 0:n.nativeEvent)instanceof Event)&&n.defaultPrevented)return;u(n,...f)}}});return t}function D(r){var t;return Object.assign(b(r),{displayName:(t=r.displayName)!=null?t:r.name})}function R(r){let t=Object.assign({},r);for(let e in t)t[e]===void 0&&delete t[e];return t}function g(r,t=[]){let e=Object.assign({},r);for(let a of t)a in e&&delete e[a];return e}export{S as Features,j as RenderStrategy,R as compact,D as forwardRefWithAs,X as render};\n","function r(e){var t,f,n=\"\";if(\"string\"==typeof e||\"number\"==typeof e)n+=e;else if(\"object\"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=\" \"),n+=f)}else for(f in e)e[f]&&(n&&(n+=\" \"),n+=f);return n}export function clsx(){for(var e,t,f=0,n=\"\",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=\" \"),n+=t);return n}export default clsx;","import React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : event.target.value\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n\nvar isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n let copy;\n const isArray = Array.isArray(data);\n if (data instanceof Date) {\n copy = new Date(data);\n }\n else if (data instanceof Set) {\n copy = new Set(data);\n }\n else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) &&\n (isArray || isObject(data))) {\n copy = isArray ? [] : {};\n if (!isArray && !isPlainObject(data)) {\n copy = data;\n }\n else {\n for (const key in data) {\n if (data.hasOwnProperty(key)) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n }\n else {\n return data;\n }\n return copy;\n}\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (obj, path, defaultValue) => {\n if (!path || !isObject(obj)) {\n return defaultValue;\n }\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);\n return isUndefined(result) || result === obj\n ? isUndefined(obj[path])\n ? defaultValue\n : obj[path]\n : result;\n};\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\n\nconst HookFormContext = React.createContext(null);\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useFrom methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst FormProvider = (props) => {\n const { children, ...data } = props;\n return (React.createElement(HookFormContext.Provider, { value: data }, children));\n};\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {\n defaultValues: control._defaultValues,\n };\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n return (isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar shouldSubscribeByName = (name, signalName, exact) => exact && signalName\n ? name === signalName\n : !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nfunction useSubscribe(props) {\n const _props = React.useRef(props);\n _props.current = props;\n React.useEffect(() => {\n const subscription = !props.disabled &&\n _props.current.subject &&\n _props.current.subject.subscribe({\n next: _props.current.next,\n });\n return () => {\n subscription && subscription.unsubscribe();\n };\n }, [props.disabled]);\n}\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input {...register(\"firstName\")} placeholder=\"First Name\" />\n * {dirtyFields.firstName && <p>Field is dirty.</p>}\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const methods = useFormContext();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _mounted = React.useRef(true);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n next: (value) => _mounted.current &&\n shouldSubscribeByName(_name.current, value.name, exact) &&\n shouldRenderFormState(value, _localProxyFormState.current, control._updateFormState) &&\n updateFormState({\n ...control._formState,\n ...value,\n }),\n subject: control._subjects.state,\n });\n React.useEffect(() => {\n _mounted.current = true;\n _localProxyFormState.current.isValid && control._updateValid(true);\n return () => {\n _mounted.current = false;\n };\n }, [control]);\n return getProxyFormState(formState, control, _localProxyFormState.current, false);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { watch } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const methods = useFormContext();\n const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n subject: control._subjects.values,\n next: (formState) => {\n if (shouldSubscribeByName(_name.current, formState.name, exact)) {\n updateValue(cloneObject(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, defaultValue)));\n }\n },\n });\n const [value, updateValue] = React.useState(control._getWatch(name, defaultValue));\n React.useEffect(() => control._removeUnmounted());\n return value;\n}\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nfunction set(object, path, value) {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n object[key] = newValue;\n object = object[key];\n }\n return object;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n * <div>\n * <input {...field} placeholder={props.name} />\n * <p>{fieldState.isTouched && \"Touched\"}</p>\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * </div>\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const methods = useFormContext();\n const { name, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),\n exact: true,\n });\n const formState = useFormState({\n control,\n name,\n });\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n }));\n _registerProps.current = control.register(name, props.rules);\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n return {\n field: {\n name,\n value,\n onChange: React.useCallback((event) => _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n }), [name]),\n onBlur: React.useCallback(() => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }), [name, control]),\n ref: (elm) => {\n const field = get(control._fields, name);\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message) => elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n },\n },\n formState,\n fieldState: Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }),\n };\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm<FormValues>({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n * <form>\n * <Controller\n * control={control}\n * name=\"test\"\n * render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => (\n * <>\n * <input\n * onChange={onChange} // send value to hook form\n * onBlur={onBlur} // notify when input is touched\n * value={value} // return updated value\n * ref={ref} // set ref for focus management\n * />\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * <p>{fieldState.isTouched ? \"touched\" : \"\"}</p>\n * </>\n * )}\n * />\n * </form>\n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nconst POST_REQUEST = 'post';\n/**\n * Form component to manage submission.\n *\n * @param props - to setup submission detail. {@link FormProps}\n *\n * @returns form component or headless render prop.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control, formState: { errors } } = useForm();\n *\n * return (\n * <Form action=\"/api\" control={control}>\n * <input {...register(\"name\")} />\n * <p>{errors?.root?.server && 'Server error'}</p>\n * <button>Submit</button>\n * </Form>\n * );\n * }\n * ```\n */\nfunction Form(props) {\n const methods = useFormContext();\n const [mounted, setMounted] = React.useState(false);\n const { control = methods.control, onSubmit, children, action, method = POST_REQUEST, headers, encType, onError, render, onSuccess, validateStatus, ...rest } = props;\n const submit = async (event) => {\n let hasError = false;\n let type = '';\n await control.handleSubmit(async (data) => {\n const formData = new FormData();\n let formDataJson = '';\n try {\n formDataJson = JSON.stringify(data);\n }\n catch (_a) { }\n for (const name of control._names.mount) {\n formData.append(name, get(data, name));\n }\n if (onSubmit) {\n onSubmit({\n data,\n event,\n method,\n formData,\n formDataJson,\n });\n }\n if (action) {\n try {\n const shouldStringifySubmissionData = [\n headers && headers['Content-Type'],\n encType,\n ].some((value) => value && value.includes('json'));\n const response = await fetch(action, {\n method,\n headers: {\n ...headers,\n ...(encType ? { 'Content-Type': encType } : {}),\n },\n body: shouldStringifySubmissionData ? formDataJson : formData,\n });\n if (response &&\n (validateStatus\n ? !validateStatus(response.status)\n : response.status < 200 || response.status >= 300)) {\n hasError = true;\n onError && onError({ response });\n type = String(response.status);\n }\n else {\n onSuccess && onSuccess({ response });\n }\n }\n catch (error) {\n hasError = true;\n onError && onError({ error });\n }\n }\n })(event);\n if (hasError && props.control) {\n props.control._subjects.state.next({\n isSubmitSuccessful: false,\n });\n props.control.setError('root.server', {\n type,\n });\n }\n };\n React.useEffect(() => {\n setMounted(true);\n }, []);\n return render ? (React.createElement(React.Fragment, null, render({\n submit,\n }))) : (React.createElement(\"form\", { noValidate: mounted, action: action, method: method, encType: encType, onSubmit: submit, ...rest }, children));\n}\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nconst focusFieldBy = (fields, callback, fieldsNames) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f && callback(_f.name)) {\n if (_f.ref.focus) {\n _f.ref.focus();\n break;\n }\n else if (_f.refs && _f.refs[0].focus) {\n _f.refs[0].focus();\n break;\n }\n }\n else if (isObject(currentField)) {\n focusFieldBy(currentField, callback);\n }\n }\n }\n};\n\nvar generateId = () => {\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nvar isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some((watchName) => name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length))));\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const fieldArrayErrors = compact(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isMessage = (value) => isString(value);\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRegex = (value) => value instanceof RegExp;\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, disabled, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabled) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nfunction append(data, value) {\n return [...data, ...convertToArrayPayload(value)];\n}\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nfunction prepend(data, value) {\n return [...convertToArrayPayload(value), ...convertToArrayPayload(data)];\n}\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n data[indexA] = [data[indexB], (data[indexB] = data[indexA])][0];\n};\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n * <form onSubmit={handleSubmit(data => console.log(data))}>\n * {fields.map((item, index) => (\n * <input key={item.id} {...register(`test.${index}.firstName`)} />\n * ))}\n * <button type=\"button\" onClick={() => append({ firstName: \"bill\" })}>\n * append\n * </button>\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const methods = useFormContext();\n const { control = methods.control, name, keyName = 'id', shouldUnregister, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n props.rules &&\n control.register(name, props.rules);\n useSubscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n subject: control._subjects.array,\n });\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._updateFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append$1 = (value, options) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = append(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = append(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, append, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend$1 = (value, options) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prepend(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prepend(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, prepend, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n if (_actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted)) {\n if (control._options.resolver) {\n control._executeSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n if (existingError\n ? (!error && existingError.type) ||\n (error &&\n (existingError.type !== error.type ||\n existingError.message !== error.message))\n : error && error.type) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field && field._f) {\n validateField(field, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n control._subjects.values.next({\n name,\n values: { ...control._formValues },\n });\n control._names.focus &&\n focusFieldBy(control._fields, (key) => !!key && key.startsWith(control._names.focus || ''));\n control._names.focus = '';\n control._updateValid();\n }, [fields, name, control]);\n React.useEffect(() => {\n !get(control._formValues, name) && control._updateFieldArray(name);\n return () => {\n (control._options.shouldUnregister || shouldUnregister) &&\n control.unregister(name);\n };\n }, [name, control, keyName, shouldUnregister]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend$1, [updateValues, name, control]),\n append: React.useCallback(append$1, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert$1, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName]),\n };\n}\n\nfunction createSubject() {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n}\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!keys2.includes(key)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction markFieldsDirty(data, fields = {}) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n }\n else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n return fields;\n}\nfunction getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n if (isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n }\n else {\n getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);\n }\n }\n else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n return dirtyFieldsFromValues;\n}\nvar getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (_f.refs ? _f.refs.every((ref) => ref.disabled) : ref.disabled) {\n return;\n }\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nfunction createFormControl(props = {}, flushRootRender) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n errors: {},\n };\n let _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.defaultValues || _options.values) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback;\n let timer = 0;\n const _proxyFormState = {\n isDirty: false,\n dirtyFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n const _subjects = {\n values: createSubject(),\n array: createSubject(),\n state: createSubject(),\n };\n const shouldCaptureDirtyFields = props.resetOptions && props.resetOptions.keepDirtyValues;\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (callback) => (wait) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n const _updateValid = async (shouldUpdateValid) => {\n if (_proxyFormState.isValid || shouldUpdateValid) {\n const isValid = _options.resolver\n ? isEmptyObject((await _executeSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (value) => _proxyFormState.isValidating &&\n _subjects.state.next({\n isValidating: value,\n });\n const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if (_proxyFormState.touchedFields &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n _state.mount && _updateValid();\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\n isPreviousDirty = get(_formState.dirtyFields, name);\n isCurrentFieldPristine\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.dirtyFields &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.touchedFields &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = _proxyFormState.isValid &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (props.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(props.delayError);\n }\n else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n _updateIsValidating(false);\n };\n const _executeSchema = async (name) => _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _executeSchema();\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {\n valid: true,\n }) => {\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const fieldError = await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n fieldValue &&\n (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => (name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, props.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!fieldValue.find((data) => data === checkboxRef.value)\n : fieldValue === checkboxRef.value))\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type) {\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);\n options.shouldValidate && trigger(name);\n };\n const setValues = (name, value, options) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n !isPrimitive(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n const setValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n set(_formValues, name, cloneValue);\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: { ..._formValues },\n });\n if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) &&\n options.shouldDirty) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n !_state.mount && flushRootRender();\n };\n const onChange = async (event) => {\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);\n if (field) {\n let error;\n let isValid;\n const fieldValue = getCurrentFieldValue();\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation = (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent, false);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.values.next({\n name,\n type: event.type,\n values: { ..._formValues },\n });\n if (shouldSkipValidation) {\n _proxyFormState.isValid && _updateValid();\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n _updateIsValidating(true);\n if (_options.resolver) {\n const { errors } = await _executeSchema([name]);\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n else {\n error = (await validateField(field, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n isFieldValueUpdated =\n isNaN(fieldValue) ||\n fieldValue === get(_formValues, name, fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n _updateIsValidating(true);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _updateValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n _subjects.state.next({\n ...(!isString(name) ||\n (_proxyFormState.isValid && isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n isValidating: false,\n });\n options.shouldFocus &&\n !validationResult &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames) => {\n const values = {\n ..._defaultValues,\n ...(_state.mount ? _formValues : {}),\n };\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n error: get((formState || _formState).errors, name),\n });\n const clearErrors = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n set(_formState.errors, name, {\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => isFunction(name)\n ? _subjects.values.subscribe({\n next: (payload) => name(_getWatch(undefined, defaultValue), payload),\n })\n : _getWatch(name, defaultValue, true);\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.values.next({\n values: { ..._formValues },\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _updateValid();\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled);\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n if (!isUndefined(options.value)) {\n set(_formValues, name, options.value);\n }\n field\n ? disabledIsDefined &&\n set(_formValues, name, options.disabled\n ? undefined\n : get(_formValues, name, getFieldValue(field._f)))\n : updateValidAndValue(name, true, options.value);\n return {\n ...(disabledIsDefined ? { disabled: options.disabled } : {}),\n ...(_options.progressive\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n focusFieldBy(_fields, (key) => key && get(_formState.errors, key), _names.mount);\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist && e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _executeSchema();\n _formState.errors = errors;\n fieldValues = values;\n }\n else {\n await executeBuiltInValidation(_fields);\n }\n unset(_formState.errors, 'root');\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n await onValid(fieldValues, e);\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors),\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, get(_defaultValues, name));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, options.defaultValue);\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, get(_defaultValues, name))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _updateValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues || _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const values = formValues && !isEmptyObject(formValues)\n ? cloneUpdatedValues\n : _defaultValues;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues || shouldCaptureDirtyFields) {\n for (const fieldName of _names.mount) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n _fields = {};\n }\n _formValues = props.shouldUnregister\n ? keepStateOptions.keepDefaultValues\n ? cloneObject(_defaultValues)\n : {}\n : cloneObject(values);\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.values.next({\n values: { ...values },\n });\n }\n _names = {\n mount: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n !_state.mount && flushRootRender();\n _state.mount = !_proxyFormState.isValid || !!keepStateOptions.keepIsValid;\n _state.watch = !!props.shouldUnregister;\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: keepStateOptions.keepDirtyValues\n ? _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitting: false,\n isSubmitSuccessful: false,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, keepStateOptions);\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect && fieldRef.select();\n }\n }\n };\n const _updateFormState = (updatedFormState) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n return {\n control: {\n register,\n unregister,\n getFieldState,\n handleSubmit,\n setError,\n _executeSchema,\n _getWatch,\n _getDirty,\n _updateValid,\n _removeUnmounted,\n _updateFieldArray,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _updateFormState,\n _subjects,\n _proxyFormState,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n set _formState(value) {\n _formState = value;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input defaultValue=\"test\" {...register(\"example\")} />\n * <input {...register(\"exampleRequired\", { required: true })} />\n * {errors.exampleRequired && <span>This field is required</span>}\n * <button>Submit</button>\n * </form>\n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef();\n const _values = React.useRef();\n const [formState, updateFormState] = React.useState({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n errors: {},\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n if (!_formControl.current) {\n _formControl.current = {\n ...createFormControl(props, () => updateFormState((formState) => ({ ...formState }))),\n formState,\n };\n }\n const control = _formControl.current.control;\n control._options = props;\n useSubscribe({\n subject: control._subjects.state,\n next: (value) => {\n if (shouldRenderFormState(value, control._proxyFormState, control._updateFormState, true)) {\n updateFormState({ ...control._formState });\n }\n },\n });\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, _values.current)) {\n control._reset(props.values, control._options.resetOptions);\n _values.current = props.values;\n }\n else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._updateValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n _formControl.current.formState = getProxyFormState(formState, control);\n return _formControl.current;\n}\n\nexport { Controller, Form, FormProvider, appendErrors, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n","let e={data:\"\"},t=t=>\"object\"==typeof window?((t?t.querySelector(\"#_goober\"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement(\"style\")),{innerHTML:\" \",id:\"_goober\"})).firstChild:t||e,r=e=>{let r=t(e),l=r.data;return r.data=\"\",l},l=/(?:([\\u0080-\\uFFFF\\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\\s*)/g,a=/\\/\\*[^]*?\\*\\/| +/g,n=/\\n+/g,o=(e,t)=>{let r=\"\",l=\"\",a=\"\";for(let n in e){let c=e[n];\"@\"==n[0]?\"i\"==n[1]?r=n+\" \"+c+\";\":l+=\"f\"==n[1]?o(c,n):n+\"{\"+o(c,\"k\"==n[1]?\"\":t)+\"}\":\"object\"==typeof c?l+=o(c,t?t.replace(/([^,])+/g,e=>n.replace(/(^:.*)|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+\" \"+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,\"-$&\").toLowerCase(),a+=o.p?o.p(n,c):n+\":\"+c+\";\")}return r+(t&&a?t+\"{\"+a+\"}\":a)+l},c={},s=e=>{if(\"object\"==typeof e){let t=\"\";for(let r in e)t+=r+s(e[r]);return t}return e},i=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return\"go\"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,\"\"));)t[4]?o.shift():t[3]?(r=t[3].replace(n,\" \").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n,\" \").trim();return o[0]})(e);c[d]=o(p?{[\"@keyframes \"+d]:t}:t,r?\"\":\".\"+d)}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e)})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?\".\"+t:e&&\"object\"==typeof e?e.props?\"\":o(e,\"\"):!1===e?\"\":e}return e+l+(null==n?\"\":n)},\"\");function u(e){let r=this||{},l=e.call?e(r.p):e;return i(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t(r.target),r.g,r.o,r.k)}let d,f,g,b=u.bind({g:1}),h=u.bind({k:1});function m(e,t,r,l){o.p=t,d=e,f=r,g=l}function j(e,t){let r=this||{};return function(){let l=arguments;function a(n,o){let c=Object.assign({},n),s=c.className||a.className;r.p=Object.assign({theme:f&&f()},c),r.o=/ *go\\d+/.test(s),c.className=u.apply(r,l)+(s?\" \"+s:\"\"),t&&(c.ref=o);let i=e;return e[0]&&(i=c.as||e,delete c.as),g&&i[0]&&g(c),d(i,c)}return t?t(a):a}}export{u as css,r as extractCss,b as glob,h as keyframes,m as setup,j as styled};\n","\"use client\";\nvar W=e=>typeof e==\"function\",T=(e,t)=>W(e)?e(t):e;var U=(()=>{let e=0;return()=>(++e).toString()})(),b=(()=>{let e;return()=>{if(e===void 0&&typeof window<\"u\"){let t=matchMedia(\"(prefers-reduced-motion: reduce)\");e=!t||t.matches}return e}})();import{useEffect as H,useState as j}from\"react\";var Q=20;var S=new Map,X=1e3,$=e=>{if(S.has(e))return;let t=setTimeout(()=>{S.delete(e),u({type:4,toastId:e})},X);S.set(e,t)},J=e=>{let t=S.get(e);t&&clearTimeout(t)},v=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,Q)};case 1:return t.toast.id&&J(t.toast.id),{...e,toasts:e.toasts.map(r=>r.id===t.toast.id?{...r,...t.toast}:r)};case 2:let{toast:o}=t;return e.toasts.find(r=>r.id===o.id)?v(e,{type:1,toast:o}):v(e,{type:0,toast:o});case 3:let{toastId:s}=t;return s?$(s):e.toasts.forEach(r=>{$(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===s||s===void 0?{...r,visible:!1}:r)};case 4:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(r=>r.id!==t.toastId)};case 5:return{...e,pausedAt:t.time};case 6:let a=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map(r=>({...r,pauseDuration:r.pauseDuration+a}))}}},A=[],P={toasts:[],pausedAt:void 0},u=e=>{P=v(P,e),A.forEach(t=>{t(P)})},Y={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},I=(e={})=>{let[t,o]=j(P);H(()=>(A.push(o),()=>{let a=A.indexOf(o);a>-1&&A.splice(a,1)}),[t]);let s=t.toasts.map(a=>{var r,c;return{...e,...e[a.type],...a,duration:a.duration||((r=e[a.type])==null?void 0:r.duration)||(e==null?void 0:e.duration)||Y[a.type],style:{...e.style,...(c=e[a.type])==null?void 0:c.style,...a.style}}});return{...t,toasts:s}};var G=(e,t=\"blank\",o)=>({createdAt:Date.now(),visible:!0,type:t,ariaProps:{role:\"status\",\"aria-live\":\"polite\"},message:e,pauseDuration:0,...o,id:(o==null?void 0:o.id)||U()}),h=e=>(t,o)=>{let s=G(t,e,o);return u({type:2,toast:s}),s.id},n=(e,t)=>h(\"blank\")(e,t);n.error=h(\"error\");n.success=h(\"success\");n.loading=h(\"loading\");n.custom=h(\"custom\");n.dismiss=e=>{u({type:3,toastId:e})};n.remove=e=>u({type:4,toastId:e});n.promise=(e,t,o)=>{let s=n.loading(t.loading,{...o,...o==null?void 0:o.loading});return e.then(a=>(n.success(T(t.success,a),{id:s,...o,...o==null?void 0:o.success}),a)).catch(a=>{n.error(T(t.error,a),{id:s,...o,...o==null?void 0:o.error})}),e};import{useEffect as K,useCallback as L}from\"react\";var Z=(e,t)=>{u({type:1,toast:{id:e,height:t}})},ee=()=>{u({type:5,time:Date.now()})},D=e=>{let{toasts:t,pausedAt:o}=I(e);K(()=>{if(o)return;let r=Date.now(),c=t.map(i=>{if(i.duration===1/0)return;let d=(i.duration||0)+i.pauseDuration-(r-i.createdAt);if(d<0){i.visible&&n.dismiss(i.id);return}return setTimeout(()=>n.dismiss(i.id),d)});return()=>{c.forEach(i=>i&&clearTimeout(i))}},[t,o]);let s=L(()=>{o&&u({type:6,time:Date.now()})},[o]),a=L((r,c)=>{let{reverseOrder:i=!1,gutter:d=8,defaultPosition:p}=c||{},g=t.filter(m=>(m.position||p)===(r.position||p)&&m.height),E=g.findIndex(m=>m.id===r.id),x=g.filter((m,R)=>R<E&&m.visible).length;return g.filter(m=>m.visible).slice(...i?[x+1]:[0,x]).reduce((m,R)=>m+(R.height||0)+d,0)},[t]);return{toasts:t,handlers:{updateHeight:Z,startPause:ee,endPause:s,calculateOffset:a}}};import*as l from\"react\";import{styled as B,keyframes as z}from\"goober\";import*as y from\"react\";import{styled as C,keyframes as me}from\"goober\";import{styled as te,keyframes as k}from\"goober\";var oe=k`\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n opacity: 1;\n}`,re=k`\nfrom {\n transform: scale(0);\n opacity: 0;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}`,se=k`\nfrom {\n transform: scale(0) rotate(90deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(90deg);\n\topacity: 1;\n}`,_=te(\"div\")`\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ${e=>e.primary||\"#ff4b4b\"};\n position: relative;\n transform: rotate(45deg);\n\n animation: ${oe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n\n &:after,\n &:before {\n content: '';\n animation: ${re} 0.15s ease-out forwards;\n animation-delay: 150ms;\n position: absolute;\n border-radius: 3px;\n opacity: 0;\n background: ${e=>e.secondary||\"#fff\"};\n bottom: 9px;\n left: 4px;\n height: 2px;\n width: 12px;\n }\n\n &:before {\n animation: ${se} 0.15s ease-out forwards;\n animation-delay: 180ms;\n transform: rotate(90deg);\n }\n`;import{styled as ae,keyframes as ie}from\"goober\";var ne=ie`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`,V=ae(\"div\")`\n width: 12px;\n height: 12px;\n box-sizing: border-box;\n border: 2px solid;\n border-radius: 100%;\n border-color: ${e=>e.secondary||\"#e0e0e0\"};\n border-right-color: ${e=>e.primary||\"#616161\"};\n animation: ${ne} 1s linear infinite;\n`;import{styled as ce,keyframes as N}from\"goober\";var pe=N`\nfrom {\n transform: scale(0) rotate(45deg);\n\topacity: 0;\n}\nto {\n transform: scale(1) rotate(45deg);\n\topacity: 1;\n}`,de=N`\n0% {\n\theight: 0;\n\twidth: 0;\n\topacity: 0;\n}\n40% {\n height: 0;\n\twidth: 6px;\n\topacity: 1;\n}\n100% {\n opacity: 1;\n height: 10px;\n}`,w=ce(\"div\")`\n width: 20px;\n opacity: 0;\n height: 20px;\n border-radius: 10px;\n background: ${e=>e.primary||\"#61d345\"};\n position: relative;\n transform: rotate(45deg);\n\n animation: ${pe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n animation-delay: 100ms;\n &:after {\n content: '';\n box-sizing: border-box;\n animation: ${de} 0.2s ease-out forwards;\n opacity: 0;\n animation-delay: 200ms;\n position: absolute;\n border-right: 2px solid;\n border-bottom: 2px solid;\n border-color: ${e=>e.secondary||\"#fff\"};\n bottom: 6px;\n left: 6px;\n height: 10px;\n width: 6px;\n }\n`;var ue=C(\"div\")`\n position: absolute;\n`,le=C(\"div\")`\n position: relative;\n display: flex;\n justify-content: center;\n align-items: center;\n min-width: 20px;\n min-height: 20px;\n`,Te=me`\nfrom {\n transform: scale(0.6);\n opacity: 0.4;\n}\nto {\n transform: scale(1);\n opacity: 1;\n}`,fe=C(\"div\")`\n position: relative;\n transform: scale(0.6);\n opacity: 0.4;\n min-width: 20px;\n animation: ${Te} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)\n forwards;\n`,M=({toast:e})=>{let{icon:t,type:o,iconTheme:s}=e;return t!==void 0?typeof t==\"string\"?y.createElement(fe,null,t):t:o===\"blank\"?null:y.createElement(le,null,y.createElement(V,{...s}),o!==\"loading\"&&y.createElement(ue,null,o===\"error\"?y.createElement(_,{...s}):y.createElement(w,{...s})))};var ye=e=>`\n0% {transform: translate3d(0,${e*-200}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,ge=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${e*-150}%,-1px) scale(.6); opacity:0;}\n`,he=\"0%{opacity:0;} 100%{opacity:1;}\",xe=\"0%{opacity:1;} 100%{opacity:0;}\",be=B(\"div\")`\n display: flex;\n align-items: center;\n background: #fff;\n color: #363636;\n line-height: 1.3;\n will-change: transform;\n box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);\n max-width: 350px;\n pointer-events: auto;\n padding: 8px 10px;\n border-radius: 8px;\n`,Se=B(\"div\")`\n display: flex;\n justify-content: center;\n margin: 4px 10px;\n color: inherit;\n flex: 1 1 auto;\n white-space: pre-line;\n`,Ae=(e,t)=>{let s=e.includes(\"top\")?1:-1,[a,r]=b()?[he,xe]:[ye(s),ge(s)];return{animation:t?`${z(a)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${z(r)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},F=l.memo(({toast:e,position:t,style:o,children:s})=>{let a=e.height?Ae(e.position||t||\"top-center\",e.visible):{opacity:0},r=l.createElement(M,{toast:e}),c=l.createElement(Se,{...e.ariaProps},T(e.message,e));return l.createElement(be,{className:e.className,style:{...a,...o,...e.style}},typeof s==\"function\"?s({icon:r,message:c}):l.createElement(l.Fragment,null,r,c))});import{css as Pe,setup as Oe}from\"goober\";import*as f from\"react\";Oe(f.createElement);var Ee=({id:e,className:t,style:o,onHeightUpdate:s,children:a})=>{let r=f.useCallback(c=>{if(c){let i=()=>{let d=c.getBoundingClientRect().height;s(e,d)};i(),new MutationObserver(i).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[e,s]);return f.createElement(\"div\",{ref:r,className:t,style:o},a)},Re=(e,t)=>{let o=e.includes(\"top\"),s=o?{top:0}:{bottom:0},a=e.includes(\"center\")?{justifyContent:\"center\"}:e.includes(\"right\")?{justifyContent:\"flex-end\"}:{};return{left:0,right:0,display:\"flex\",position:\"absolute\",transition:b()?void 0:\"all 230ms cubic-bezier(.21,1.02,.73,1)\",transform:`translateY(${t*(o?1:-1)}px)`,...s,...a}},ve=Pe`\n z-index: 9999;\n > * {\n pointer-events: auto;\n }\n`,O=16,Ie=({reverseOrder:e,position:t=\"top-center\",toastOptions:o,gutter:s,children:a,containerStyle:r,containerClassName:c})=>{let{toasts:i,handlers:d}=D(o);return f.createElement(\"div\",{style:{position:\"fixed\",zIndex:9999,top:O,left:O,right:O,bottom:O,pointerEvents:\"none\",...r},className:c,onMouseEnter:d.startPause,onMouseLeave:d.endPause},i.map(p=>{let g=p.position||t,E=d.calculateOffset(p,{reverseOrder:e,gutter:s,defaultPosition:t}),x=Re(g,E);return f.createElement(Ee,{id:p.id,key:p.id,onHeightUpdate:d.updateHeight,className:p.visible?ve:\"\",style:x},p.type===\"custom\"?T(p.message,p):a?a(p):f.createElement(F,{toast:p,position:g}))}))};var _t=n;export{w as CheckmarkIcon,_ as ErrorIcon,V as LoaderIcon,F as ToastBar,M as ToastIcon,Ie as Toaster,_t as default,T as resolveValue,n as toast,D as useToaster,I as useToasterStore};\n//# sourceMappingURL=index.mjs.map","import e from\"void-elements\";var t=/\\s([^'\"/\\s><]+?)[\\s/>]|([^\\s=]+)=\\s?(\".*?\"|'.*?')/g;function n(n){var r={type:\"tag\",name:\"\",voidElement:!1,attrs:{},children:[]},i=n.match(/<\\/?([^\\s]+?)[/\\s>]/);if(i&&(r.name=i[1],(e[i[1]]||\"/\"===n.charAt(n.length-2))&&(r.voidElement=!0),r.name.startsWith(\"!--\"))){var s=n.indexOf(\"--\\x3e\");return{type:\"comment\",comment:-1!==s?n.slice(4,s):\"\"}}for(var a=new RegExp(t),c=null;null!==(c=a.exec(n));)if(c[0].trim())if(c[1]){var o=c[1].trim(),l=[o,\"\"];o.indexOf(\"=\")>-1&&(l=o.split(\"=\")),r.attrs[l[0]]=l[1],a.lastIndex--}else c[2]&&(r.attrs[c[2]]=c[3].trim().substring(1,c[3].length-1));return r}var r=/<[a-zA-Z0-9\\-\\!\\/](?:\"[^\"]*\"|'[^']*'|[^'\">])*>/g,i=/^\\s*$/,s=Object.create(null);function a(e,t){switch(t.type){case\"text\":return e+t.content;case\"tag\":return e+=\"<\"+t.name+(t.attrs?function(e){var t=[];for(var n in e)t.push(n+'=\"'+e[n]+'\"');return t.length?\" \"+t.join(\" \"):\"\"}(t.attrs):\"\")+(t.voidElement?\"/>\":\">\"),t.voidElement?e:e+t.children.reduce(a,\"\")+\"</\"+t.name+\">\";case\"comment\":return e+\"\\x3c!--\"+t.comment+\"--\\x3e\"}}var c={parse:function(e,t){t||(t={}),t.components||(t.components=s);var a,c=[],o=[],l=-1,m=!1;if(0!==e.indexOf(\"<\")){var u=e.indexOf(\"<\");c.push({type:\"text\",content:-1===u?e:e.substring(0,u)})}return e.replace(r,function(r,s){if(m){if(r!==\"</\"+a.name+\">\")return;m=!1}var u,f=\"/\"!==r.charAt(1),h=r.startsWith(\"\\x3c!--\"),p=s+r.length,d=e.charAt(p);if(h){var v=n(r);return l<0?(c.push(v),c):((u=o[l]).children.push(v),c)}if(f&&(l++,\"tag\"===(a=n(r)).type&&t.components[a.name]&&(a.type=\"component\",m=!0),a.voidElement||m||!d||\"<\"===d||a.children.push({type:\"text\",content:e.slice(p,e.indexOf(\"<\",p))}),0===l&&c.push(a),(u=o[l-1])&&u.children.push(a),o[l]=a),(!f||a.voidElement)&&(l>-1&&(a.voidElement||a.name===r.slice(2,-1))&&(l--,a=-1===l?c:o[l]),!m&&\"<\"!==d&&d)){u=-1===l?c:o[l].children;var x=e.indexOf(\"<\",p),g=e.slice(p,-1===x?void 0:x);i.test(g)&&(g=\" \"),(x>-1&&l+u.length>=0||\" \"!==g)&&u.push({type:\"text\",content:g})}}),c},stringify:function(e){return e.reduce(function(e,t){return e+a(\"\",t)},\"\")}};export default c;\n//# sourceMappingURL=html-parse-stringify.module.js.map\n","export const warn = (i18n, code, msg, rest) => {\n const args = [msg, {\n code,\n ...(rest || {})\n }];\n if (i18n?.services?.logger?.forward) {\n return i18n.services.logger.forward(args, 'warn', 'react-i18next::', true);\n }\n if (isString(args[0])) args[0] = `react-i18next:: ${args[0]}`;\n if (i18n?.services?.logger?.warn) {\n i18n.services.logger.warn(...args);\n } else if (console?.warn) {\n console.warn(...args);\n }\n};\nconst alreadyWarned = {};\nexport const warnOnce = (i18n, code, msg, rest) => {\n if (isString(msg) && alreadyWarned[msg]) return;\n if (isString(msg)) alreadyWarned[msg] = new Date();\n warn(i18n, code, msg, rest);\n};\nconst loadedClb = (i18n, cb) => () => {\n if (i18n.isInitialized) {\n cb();\n } else {\n const initialized = () => {\n setTimeout(() => {\n i18n.off('initialized', initialized);\n }, 0);\n cb();\n };\n i18n.on('initialized', initialized);\n }\n};\nexport const loadNamespaces = (i18n, ns, cb) => {\n i18n.loadNamespaces(ns, loadedClb(i18n, cb));\n};\nexport const loadLanguages = (i18n, lng, ns, cb) => {\n if (isString(ns)) ns = [ns];\n if (i18n.options.preload && i18n.options.preload.indexOf(lng) > -1) return loadNamespaces(i18n, ns, cb);\n ns.forEach(n => {\n if (i18n.options.ns.indexOf(n) < 0) i18n.options.ns.push(n);\n });\n i18n.loadLanguages(lng, loadedClb(i18n, cb));\n};\nexport const hasLoadedNamespace = (ns, i18n, options = {}) => {\n if (!i18n.languages || !i18n.languages.length) {\n warnOnce(i18n, 'NO_LANGUAGES', 'i18n.languages were undefined or empty', {\n languages: i18n.languages\n });\n return true;\n }\n return i18n.hasLoadedNamespace(ns, {\n lng: options.lng,\n precheck: (i18nInstance, loadNotPending) => {\n if (options.bindI18n?.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;\n }\n });\n};\nexport const getDisplayName = Component => Component.displayName || Component.name || (isString(Component) && Component.length > 0 ? Component : 'Unknown');\nexport const isString = obj => typeof obj === 'string';\nexport const isObject = obj => typeof obj === 'object' && obj !== null;","const matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;\nconst htmlEntities = {\n '&': '&',\n '&': '&',\n '<': '<',\n '<': '<',\n '>': '>',\n '>': '>',\n ''': \"'\",\n ''': \"'\",\n '"': '\"',\n '"': '\"',\n ' ': ' ',\n ' ': ' ',\n '©': '©',\n '©': '©',\n '®': '®',\n '®': '®',\n '…': '…',\n '…': '…',\n '/': '/',\n '/': '/'\n};\nconst unescapeHtmlEntity = m => htmlEntities[m];\nexport const unescape = text => text.replace(matchHtmlEntity, unescapeHtmlEntity);","import { unescape } from './unescape.js';\nlet defaultOptions = {\n bindI18n: 'languageChanged',\n bindI18nStore: '',\n transEmptyNodeValue: '',\n transSupportBasicHtmlNodes: true,\n transWrapTextNodes: '',\n transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],\n useSuspense: true,\n unescape\n};\nexport const setDefaults = (options = {}) => {\n defaultOptions = {\n ...defaultOptions,\n ...options\n };\n};\nexport const getDefaults = () => defaultOptions;","import { Fragment, isValidElement, cloneElement, createElement, Children } from 'react';\nimport HTML from 'html-parse-stringify';\nimport { isObject, isString, warn, warnOnce } from './utils.js';\nimport { getDefaults } from './defaults.js';\nimport { getI18n } from './i18nInstance.js';\nconst hasChildren = (node, checkLength) => {\n if (!node) return false;\n const base = node.props?.children ?? node.children;\n if (checkLength) return base.length > 0;\n return !!base;\n};\nconst getChildren = node => {\n if (!node) return [];\n const children = node.props?.children ?? node.children;\n return node.props?.i18nIsDynamicList ? getAsArray(children) : children;\n};\nconst hasValidReactChildren = children => Array.isArray(children) && children.every(isValidElement);\nconst getAsArray = data => Array.isArray(data) ? data : [data];\nconst mergeProps = (source, target) => {\n const newTarget = {\n ...target\n };\n newTarget.props = Object.assign(source.props, target.props);\n return newTarget;\n};\nexport const nodesToString = (children, i18nOptions, i18n, i18nKey) => {\n if (!children) return '';\n let stringNode = '';\n const childrenArray = getAsArray(children);\n const keepArray = i18nOptions?.transSupportBasicHtmlNodes ? i18nOptions.transKeepBasicHtmlNodesFor ?? [] : [];\n childrenArray.forEach((child, childIndex) => {\n if (isString(child)) {\n stringNode += `${child}`;\n return;\n }\n if (isValidElement(child)) {\n const {\n props,\n type\n } = child;\n const childPropsCount = Object.keys(props).length;\n const shouldKeepChild = keepArray.indexOf(type) > -1;\n const childChildren = props.children;\n if (!childChildren && shouldKeepChild && !childPropsCount) {\n stringNode += `<${type}/>`;\n return;\n }\n if (!childChildren && (!shouldKeepChild || childPropsCount) || props.i18nIsDynamicList) {\n stringNode += `<${childIndex}></${childIndex}>`;\n return;\n }\n if (shouldKeepChild && childPropsCount === 1 && isString(childChildren)) {\n stringNode += `<${type}>${childChildren}</${type}>`;\n return;\n }\n const content = nodesToString(childChildren, i18nOptions, i18n, i18nKey);\n stringNode += `<${childIndex}>${content}</${childIndex}>`;\n return;\n }\n if (child === null) {\n warn(i18n, 'TRANS_NULL_VALUE', `Passed in a null value as child`, {\n i18nKey\n });\n return;\n }\n if (isObject(child)) {\n const {\n format,\n ...clone\n } = child;\n const keys = Object.keys(clone);\n if (keys.length === 1) {\n const value = format ? `${keys[0]}, ${format}` : keys[0];\n stringNode += `{{${value}}}`;\n return;\n }\n warn(i18n, 'TRANS_INVALID_OBJ', `Invalid child - Object should only have keys {{ value, format }} (format is optional).`, {\n i18nKey,\n child\n });\n return;\n }\n warn(i18n, 'TRANS_INVALID_VAR', `Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.`, {\n i18nKey,\n child\n });\n });\n return stringNode;\n};\nconst renderNodes = (children, targetString, i18n, i18nOptions, combinedTOpts, shouldUnescape) => {\n if (targetString === '') return [];\n const keepArray = i18nOptions.transKeepBasicHtmlNodesFor || [];\n const emptyChildrenButNeedsHandling = targetString && new RegExp(keepArray.map(keep => `<${keep}`).join('|')).test(targetString);\n if (!children && !emptyChildrenButNeedsHandling && !shouldUnescape) return [targetString];\n const data = {};\n const getData = childs => {\n const childrenArray = getAsArray(childs);\n childrenArray.forEach(child => {\n if (isString(child)) return;\n if (hasChildren(child)) getData(getChildren(child));else if (isObject(child) && !isValidElement(child)) Object.assign(data, child);\n });\n };\n getData(children);\n const ast = HTML.parse(`<0>${targetString}</0>`);\n const opts = {\n ...data,\n ...combinedTOpts\n };\n const renderInner = (child, node, rootReactNode) => {\n const childs = getChildren(child);\n const mappedChildren = mapAST(childs, node.children, rootReactNode);\n return hasValidReactChildren(childs) && mappedChildren.length === 0 || child.props?.i18nIsDynamicList ? childs : mappedChildren;\n };\n const pushTranslatedJSX = (child, inner, mem, i, isVoid) => {\n if (child.dummy) {\n child.children = inner;\n mem.push(cloneElement(child, {\n key: i\n }, isVoid ? undefined : inner));\n } else {\n mem.push(...Children.map([child], c => {\n const props = {\n ...c.props\n };\n delete props.i18nIsDynamicList;\n return createElement(c.type, {\n ...props,\n key: i,\n ref: c.ref\n }, isVoid ? null : inner);\n }));\n }\n };\n const mapAST = (reactNode, astNode, rootReactNode) => {\n const reactNodes = getAsArray(reactNode);\n const astNodes = getAsArray(astNode);\n return astNodes.reduce((mem, node, i) => {\n const translationContent = node.children?.[0]?.content && i18n.services.interpolator.interpolate(node.children[0].content, opts, i18n.language);\n if (node.type === 'tag') {\n let tmp = reactNodes[parseInt(node.name, 10)];\n if (rootReactNode.length === 1 && !tmp) tmp = rootReactNode[0][node.name];\n if (!tmp) tmp = {};\n const child = Object.keys(node.attrs).length !== 0 ? mergeProps({\n props: node.attrs\n }, tmp) : tmp;\n const isElement = isValidElement(child);\n const isValidTranslationWithChildren = isElement && hasChildren(node, true) && !node.voidElement;\n const isEmptyTransWithHTML = emptyChildrenButNeedsHandling && isObject(child) && child.dummy && !isElement;\n const isKnownComponent = isObject(children) && Object.hasOwnProperty.call(children, node.name);\n if (isString(child)) {\n const value = i18n.services.interpolator.interpolate(child, opts, i18n.language);\n mem.push(value);\n } else if (hasChildren(child) || isValidTranslationWithChildren) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (isEmptyTransWithHTML) {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i);\n } else if (Number.isNaN(parseFloat(node.name))) {\n if (isKnownComponent) {\n const inner = renderInner(child, node, rootReactNode);\n pushTranslatedJSX(child, inner, mem, i, node.voidElement);\n } else if (i18nOptions.transSupportBasicHtmlNodes && keepArray.indexOf(node.name) > -1) {\n if (node.voidElement) {\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }));\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(createElement(node.name, {\n key: `${node.name}-${i}`\n }, inner));\n }\n } else if (node.voidElement) {\n mem.push(`<${node.name} />`);\n } else {\n const inner = mapAST(reactNodes, node.children, rootReactNode);\n mem.push(`<${node.name}>${inner}</${node.name}>`);\n }\n } else if (isObject(child) && !isElement) {\n const content = node.children[0] ? translationContent : null;\n if (content) mem.push(content);\n } else {\n pushTranslatedJSX(child, translationContent, mem, i, node.children.length !== 1 || !translationContent);\n }\n } else if (node.type === 'text') {\n const wrapTextNodes = i18nOptions.transWrapTextNodes;\n const content = shouldUnescape ? i18nOptions.unescape(i18n.services.interpolator.interpolate(node.content, opts, i18n.language)) : i18n.services.interpolator.interpolate(node.content, opts, i18n.language);\n if (wrapTextNodes) {\n mem.push(createElement(wrapTextNodes, {\n key: `${node.name}-${i}`\n }, content));\n } else {\n mem.push(content);\n }\n }\n return mem;\n }, []);\n };\n const result = mapAST([{\n dummy: true,\n children: children || []\n }], ast, getAsArray(children || []));\n return getChildren(result[0]);\n};\nconst fixComponentProps = (component, index, translation) => {\n const componentKey = component.key || index;\n const comp = cloneElement(component, {\n key: componentKey\n });\n if (!comp.props || !comp.props.children || translation.indexOf(`${index}/>`) < 0 && translation.indexOf(`${index} />`) < 0) {\n return comp;\n }\n function Componentized() {\n return createElement(Fragment, null, comp);\n }\n return createElement(Componentized);\n};\nconst generateArrayComponents = (components, translation) => components.map((c, index) => fixComponentProps(c, index, translation));\nconst generateObjectComponents = (components, translation) => {\n const componentMap = {};\n Object.keys(components).forEach(c => {\n Object.assign(componentMap, {\n [c]: fixComponentProps(components[c], c, translation)\n });\n });\n return componentMap;\n};\nconst generateComponents = (components, translation, i18n, i18nKey) => {\n if (!components) return null;\n if (Array.isArray(components)) {\n return generateArrayComponents(components, translation);\n }\n if (isObject(components)) {\n return generateObjectComponents(components, translation);\n }\n warnOnce(i18n, 'TRANS_INVALID_COMPONENTS', `<Trans /> \"components\" prop expects an object or array`, {\n i18nKey\n });\n return null;\n};\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const i18n = i18nFromProps || getI18n();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', `Trans: You need to pass in an i18next instance using i18nextReactModule`, {\n i18nKey\n });\n return children;\n }\n const t = tFromProps || i18n.t.bind(i18n) || (k => k);\n const reactI18nextOptions = {\n ...getDefaults(),\n ...i18n.options?.react\n };\n let namespaces = ns || t.ns || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n const nodeAsString = nodesToString(children, reactI18nextOptions, i18n, i18nKey);\n const defaultValue = defaults || nodeAsString || reactI18nextOptions.transEmptyNodeValue || i18nKey;\n const {\n hashTransKey\n } = reactI18nextOptions;\n const key = i18nKey || (hashTransKey ? hashTransKey(nodeAsString || defaultValue) : nodeAsString || defaultValue);\n if (i18n.options?.interpolation?.defaultVariables) {\n values = values && Object.keys(values).length > 0 ? {\n ...values,\n ...i18n.options.interpolation.defaultVariables\n } : {\n ...i18n.options.interpolation.defaultVariables\n };\n }\n const interpolationOverride = values || count !== undefined && !i18n.options?.interpolation?.alwaysFormat || !children ? tOptions.interpolation : {\n interpolation: {\n ...tOptions.interpolation,\n prefix: '#$?',\n suffix: '?$#'\n }\n };\n const combinedTOpts = {\n ...tOptions,\n context: context || tOptions.context,\n count,\n ...values,\n ...interpolationOverride,\n defaultValue,\n ns: namespaces\n };\n const translation = key ? t(key, combinedTOpts) : defaultValue;\n const generatedComponents = generateComponents(components, translation, i18n, i18nKey);\n const content = renderNodes(generatedComponents || children, translation, i18n, reactI18nextOptions, combinedTOpts, shouldUnescape);\n const useAsParent = parent ?? reactI18nextOptions.defaultTransParent;\n return useAsParent ? createElement(useAsParent, additionalProps, content) : content;\n}","let i18nInstance;\nexport const setI18n = instance => {\n i18nInstance = instance;\n};\nexport const getI18n = () => i18nInstance;","import { setDefaults } from './defaults.js';\nimport { setI18n } from './i18nInstance.js';\nexport const initReactI18next = {\n type: '3rdParty',\n init(instance) {\n setDefaults(instance.options.react);\n setI18n(instance);\n }\n};","import { createContext } from 'react';\nimport { getDefaults, setDefaults } from './defaults.js';\nimport { getI18n, setI18n } from './i18nInstance.js';\nimport { initReactI18next } from './initReactI18next.js';\nexport { getDefaults, setDefaults, getI18n, setI18n, initReactI18next };\nexport const I18nContext = createContext();\nexport class ReportNamespaces {\n constructor() {\n this.usedNamespaces = {};\n }\n addUsedNamespaces(namespaces) {\n namespaces.forEach(ns => {\n if (!this.usedNamespaces[ns]) this.usedNamespaces[ns] = true;\n });\n }\n getUsedNamespaces() {\n return Object.keys(this.usedNamespaces);\n }\n}\nexport const composeInitialProps = ForComponent => async ctx => {\n const componentsInitialProps = (await ForComponent.getInitialProps?.(ctx)) ?? {};\n const i18nInitialProps = getInitialProps();\n return {\n ...componentsInitialProps,\n ...i18nInitialProps\n };\n};\nexport const getInitialProps = () => {\n const i18n = getI18n();\n const namespaces = i18n.reportNamespaces?.getUsedNamespaces() ?? [];\n const ret = {};\n const initialI18nStore = {};\n i18n.languages.forEach(l => {\n initialI18nStore[l] = {};\n namespaces.forEach(ns => {\n initialI18nStore[l][ns] = i18n.getResourceBundle(l, ns) || {};\n });\n });\n ret.initialI18nStore = initialI18nStore;\n ret.initialLanguage = i18n.language;\n return ret;\n};","import { useContext } from 'react';\nimport { nodesToString, Trans as TransWithoutContext } from './TransWithoutContext.js';\nimport { getI18n, I18nContext } from './context.js';\nexport { nodesToString };\nexport function Trans({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions = {},\n values,\n defaults,\n components,\n ns,\n i18n: i18nFromProps,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n}) {\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n const t = tFromProps || i18n?.t.bind(i18n);\n return TransWithoutContext({\n children,\n count,\n parent,\n i18nKey,\n context,\n tOptions,\n values,\n defaults,\n components,\n ns: ns || t?.ns || defaultNSFromContext || i18n?.options?.defaultNS,\n i18n,\n t: tFromProps,\n shouldUnescape,\n ...additionalProps\n });\n}","import { useState, useEffect, useContext, useRef, useCallback } from 'react';\nimport { getI18n, getDefaults, ReportNamespaces, I18nContext } from './context.js';\nimport { warnOnce, loadNamespaces, loadLanguages, hasLoadedNamespace, isString, isObject } from './utils.js';\nconst usePrevious = (value, ignore) => {\n const ref = useRef();\n useEffect(() => {\n ref.current = ignore ? ref.current : value;\n }, [value, ignore]);\n return ref.current;\n};\nconst alwaysNewT = (i18n, language, namespace, keyPrefix) => i18n.getFixedT(language, namespace, keyPrefix);\nconst useMemoizedT = (i18n, language, namespace, keyPrefix) => useCallback(alwaysNewT(i18n, language, namespace, keyPrefix), [i18n, language, namespace, keyPrefix]);\nexport const useTranslation = (ns, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext,\n defaultNS: defaultNSFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();\n if (!i18n) {\n warnOnce(i18n, 'NO_I18NEXT_INSTANCE', 'useTranslation: You will need to pass in an i18next instance by using initReactI18next');\n const notReadyT = (k, optsOrDefaultValue) => {\n if (isString(optsOrDefaultValue)) return optsOrDefaultValue;\n if (isObject(optsOrDefaultValue) && isString(optsOrDefaultValue.defaultValue)) return optsOrDefaultValue.defaultValue;\n return Array.isArray(k) ? k[k.length - 1] : k;\n };\n const retNotReady = [notReadyT, {}, false];\n retNotReady.t = notReadyT;\n retNotReady.i18n = {};\n retNotReady.ready = false;\n return retNotReady;\n }\n if (i18n.options.react?.wait) warnOnce(i18n, 'DEPRECATED_OPTION', 'useTranslation: It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');\n const i18nOptions = {\n ...getDefaults(),\n ...i18n.options.react,\n ...props\n };\n const {\n useSuspense,\n keyPrefix\n } = i18nOptions;\n let namespaces = ns || defaultNSFromContext || i18n.options?.defaultNS;\n namespaces = isString(namespaces) ? [namespaces] : namespaces || ['translation'];\n i18n.reportNamespaces.addUsedNamespaces?.(namespaces);\n const ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(n => hasLoadedNamespace(n, i18n, i18nOptions));\n const memoGetT = useMemoizedT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const getT = () => memoGetT;\n const getNewT = () => alwaysNewT(i18n, props.lng || null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);\n const [t, setT] = useState(getT);\n let joinedNS = namespaces.join();\n if (props.lng) joinedNS = `${props.lng}${joinedNS}`;\n const previousJoinedNS = usePrevious(joinedNS);\n const isMounted = useRef(true);\n useEffect(() => {\n const {\n bindI18n,\n bindI18nStore\n } = i18nOptions;\n isMounted.current = true;\n if (!ready && !useSuspense) {\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, () => {\n if (isMounted.current) setT(getNewT);\n });\n } else {\n loadNamespaces(i18n, namespaces, () => {\n if (isMounted.current) setT(getNewT);\n });\n }\n }\n if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {\n setT(getNewT);\n }\n const boundReset = () => {\n if (isMounted.current) setT(getNewT);\n };\n if (bindI18n) i18n?.on(bindI18n, boundReset);\n if (bindI18nStore) i18n?.store.on(bindI18nStore, boundReset);\n return () => {\n isMounted.current = false;\n if (i18n) bindI18n?.split(' ').forEach(e => i18n.off(e, boundReset));\n if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(e => i18n.store.off(e, boundReset));\n };\n }, [i18n, joinedNS]);\n useEffect(() => {\n if (isMounted.current && ready) {\n setT(getT);\n }\n }, [i18n, keyPrefix, ready]);\n const ret = [t, i18n, ready];\n ret.t = t;\n ret.i18n = i18n;\n ret.ready = ready;\n if (ready) return ret;\n if (!ready && !useSuspense) return ret;\n throw new Promise(resolve => {\n if (props.lng) {\n loadLanguages(i18n, props.lng, namespaces, () => resolve());\n } else {\n loadNamespaces(i18n, namespaces, () => resolve());\n }\n });\n};","import { createElement, forwardRef as forwardRefReact } from 'react';\nimport { useTranslation } from './useTranslation.js';\nimport { getDisplayName } from './utils.js';\nexport const withTranslation = (ns, options = {}) => function Extend(WrappedComponent) {\n function I18nextWithTranslation({\n forwardedRef,\n ...rest\n }) {\n const [t, i18n, ready] = useTranslation(ns, {\n ...rest,\n keyPrefix: options.keyPrefix\n });\n const passDownProps = {\n ...rest,\n t,\n i18n,\n tReady: ready\n };\n if (options.withRef && forwardedRef) {\n passDownProps.ref = forwardedRef;\n } else if (!options.withRef && forwardedRef) {\n passDownProps.forwardedRef = forwardedRef;\n }\n return createElement(WrappedComponent, passDownProps);\n }\n I18nextWithTranslation.displayName = `withI18nextTranslation(${getDisplayName(WrappedComponent)})`;\n I18nextWithTranslation.WrappedComponent = WrappedComponent;\n const forwardRef = (props, ref) => createElement(I18nextWithTranslation, Object.assign({}, props, {\n forwardedRef: ref\n }));\n return options.withRef ? forwardRefReact(forwardRef) : I18nextWithTranslation;\n};","import { useTranslation } from './useTranslation.js';\nexport const Translation = ({\n ns,\n children,\n ...options\n}) => {\n const [t, i18n, ready] = useTranslation(ns, options);\n return children(t, {\n i18n,\n lng: i18n.language\n }, ready);\n};","import { createElement, useMemo } from 'react';\nimport { I18nContext } from './context.js';\nexport function I18nextProvider({\n i18n,\n defaultNS,\n children\n}) {\n const value = useMemo(() => ({\n i18n,\n defaultNS\n }), [i18n, defaultNS]);\n return createElement(I18nContext.Provider, {\n value\n }, children);\n}","import { useContext } from 'react';\nimport { getI18n, I18nContext } from './context.js';\nexport const useSSR = (initialI18nStore, initialLanguage, props = {}) => {\n const {\n i18n: i18nFromProps\n } = props;\n const {\n i18n: i18nFromContext\n } = useContext(I18nContext) || {};\n const i18n = i18nFromProps || i18nFromContext || getI18n();\n if (i18n.options?.isClone) return;\n if (initialI18nStore && !i18n.initializedStoreOnce) {\n i18n.services.resourceStore.data = initialI18nStore;\n i18n.options.ns = Object.values(initialI18nStore).reduce((mem, lngResources) => {\n Object.keys(lngResources).forEach(ns => {\n if (mem.indexOf(ns) < 0) mem.push(ns);\n });\n return mem;\n }, i18n.options.ns);\n i18n.initializedStoreOnce = true;\n i18n.isInitialized = true;\n }\n if (initialLanguage && !i18n.initializedLanguageOnce) {\n i18n.changeLanguage(initialLanguage);\n i18n.initializedLanguageOnce = true;\n }\n};","import { createElement } from 'react';\nimport { useSSR } from './useSSR.js';\nimport { composeInitialProps } from './context.js';\nimport { getDisplayName } from './utils.js';\nexport const withSSR = () => function Extend(WrappedComponent) {\n function I18nextWithSSR({\n initialI18nStore,\n initialLanguage,\n ...rest\n }) {\n useSSR(initialI18nStore, initialLanguage);\n return createElement(WrappedComponent, {\n ...rest\n });\n }\n I18nextWithSSR.getInitialProps = composeInitialProps(WrappedComponent);\n I18nextWithSSR.displayName = `withI18nextSSR(${getDisplayName(WrappedComponent)})`;\n I18nextWithSSR.WrappedComponent = WrappedComponent;\n return I18nextWithSSR;\n};","export { Trans } from './Trans.js';\nexport { Trans as TransWithoutContext } from './TransWithoutContext.js';\nexport { useTranslation } from './useTranslation.js';\nexport { withTranslation } from './withTranslation.js';\nexport { Translation } from './Translation.js';\nexport { I18nextProvider } from './I18nextProvider.js';\nexport { withSSR } from './withSSR.js';\nexport { useSSR } from './useSSR.js';\nexport { initReactI18next } from './initReactI18next.js';\nexport { setDefaults, getDefaults } from './defaults.js';\nexport { setI18n, getI18n } from './i18nInstance.js';\nexport { I18nContext, composeInitialProps, getInitialProps } from './context.js';\nexport const date = () => '';\nexport const time = () => '';\nexport const number = () => '';\nexport const select = () => '';\nexport const plural = () => '';\nexport const selectOrdinal = () => '';","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export default {\n \"ext\": \"ext.\",\n \"country\": \"Phone number country\",\n \"phone\": \"Phone\",\n \"AB\": \"Abkhazia\",\n \"AC\": \"Ascension Island\",\n \"AD\": \"Andorra\",\n \"AE\": \"United Arab Emirates\",\n \"AF\": \"Afghanistan\",\n \"AG\": \"Antigua and Barbuda\",\n \"AI\": \"Anguilla\",\n \"AL\": \"Albania\",\n \"AM\": \"Armenia\",\n \"AO\": \"Angola\",\n \"AQ\": \"Antarctica\",\n \"AR\": \"Argentina\",\n \"AS\": \"American Samoa\",\n \"AT\": \"Austria\",\n \"AU\": \"Australia\",\n \"AW\": \"Aruba\",\n \"AX\": \"Ã…land Islands\",\n \"AZ\": \"Azerbaijan\",\n \"BA\": \"Bosnia and Herzegovina\",\n \"BB\": \"Barbados\",\n \"BD\": \"Bangladesh\",\n \"BE\": \"Belgium\",\n \"BF\": \"Burkina Faso\",\n \"BG\": \"Bulgaria\",\n \"BH\": \"Bahrain\",\n \"BI\": \"Burundi\",\n \"BJ\": \"Benin\",\n \"BL\": \"Saint Barthélemy\",\n \"BM\": \"Bermuda\",\n \"BN\": \"Brunei Darussalam\",\n \"BO\": \"Bolivia\",\n \"BQ\": \"Bonaire, Sint Eustatius and Saba\",\n \"BR\": \"Brazil\",\n \"BS\": \"Bahamas\",\n \"BT\": \"Bhutan\",\n \"BV\": \"Bouvet Island\",\n \"BW\": \"Botswana\",\n \"BY\": \"Belarus\",\n \"BZ\": \"Belize\",\n \"CA\": \"Canada\",\n \"CC\": \"Cocos (Keeling) Islands\",\n \"CD\": \"Congo, Democratic Republic of the\",\n \"CF\": \"Central African Republic\",\n \"CG\": \"Congo\",\n \"CH\": \"Switzerland\",\n \"CI\": \"Cote d'Ivoire\",\n \"CK\": \"Cook Islands\",\n \"CL\": \"Chile\",\n \"CM\": \"Cameroon\",\n \"CN\": \"China\",\n \"CO\": \"Colombia\",\n \"CR\": \"Costa Rica\",\n \"CU\": \"Cuba\",\n \"CV\": \"Cape Verde\",\n \"CW\": \"Curaçao\",\n \"CX\": \"Christmas Island\",\n \"CY\": \"Cyprus\",\n \"CZ\": \"Czech Republic\",\n \"DE\": \"Germany\",\n \"DJ\": \"Djibouti\",\n \"DK\": \"Denmark\",\n \"DM\": \"Dominica\",\n \"DO\": \"Dominican Republic\",\n \"DZ\": \"Algeria\",\n \"EC\": \"Ecuador\",\n \"EE\": \"Estonia\",\n \"EG\": \"Egypt\",\n \"EH\": \"Western Sahara\",\n \"ER\": \"Eritrea\",\n \"ES\": \"Spain\",\n \"ET\": \"Ethiopia\",\n \"FI\": \"Finland\",\n \"FJ\": \"Fiji\",\n \"FK\": \"Falkland Islands\",\n \"FM\": \"Federated States of Micronesia\",\n \"FO\": \"Faroe Islands\",\n \"FR\": \"France\",\n \"GA\": \"Gabon\",\n \"GB\": \"United Kingdom\",\n \"GD\": \"Grenada\",\n \"GE\": \"Georgia\",\n \"GF\": \"French Guiana\",\n \"GG\": \"Guernsey\",\n \"GH\": \"Ghana\",\n \"GI\": \"Gibraltar\",\n \"GL\": \"Greenland\",\n \"GM\": \"Gambia\",\n \"GN\": \"Guinea\",\n \"GP\": \"Guadeloupe\",\n \"GQ\": \"Equatorial Guinea\",\n \"GR\": \"Greece\",\n \"GS\": \"South Georgia and the South Sandwich Islands\",\n \"GT\": \"Guatemala\",\n \"GU\": \"Guam\",\n \"GW\": \"Guinea-Bissau\",\n \"GY\": \"Guyana\",\n \"HK\": \"Hong Kong\",\n \"HM\": \"Heard Island and McDonald Islands\",\n \"HN\": \"Honduras\",\n \"HR\": \"Croatia\",\n \"HT\": \"Haiti\",\n \"HU\": \"Hungary\",\n \"ID\": \"Indonesia\",\n \"IE\": \"Ireland\",\n \"IL\": \"Israel\",\n \"IM\": \"Isle of Man\",\n \"IN\": \"India\",\n \"IO\": \"British Indian Ocean Territory\",\n \"IQ\": \"Iraq\",\n \"IR\": \"Iran\",\n \"IS\": \"Iceland\",\n \"IT\": \"Italy\",\n \"JE\": \"Jersey\",\n \"JM\": \"Jamaica\",\n \"JO\": \"Jordan\",\n \"JP\": \"Japan\",\n \"KE\": \"Kenya\",\n \"KG\": \"Kyrgyzstan\",\n \"KH\": \"Cambodia\",\n \"KI\": \"Kiribati\",\n \"KM\": \"Comoros\",\n \"KN\": \"Saint Kitts and Nevis\",\n \"KP\": \"North Korea\",\n \"KR\": \"South Korea\",\n \"KW\": \"Kuwait\",\n \"KY\": \"Cayman Islands\",\n \"KZ\": \"Kazakhstan\",\n \"LA\": \"Laos\",\n \"LB\": \"Lebanon\",\n \"LC\": \"Saint Lucia\",\n \"LI\": \"Liechtenstein\",\n \"LK\": \"Sri Lanka\",\n \"LR\": \"Liberia\",\n \"LS\": \"Lesotho\",\n \"LT\": \"Lithuania\",\n \"LU\": \"Luxembourg\",\n \"LV\": \"Latvia\",\n \"LY\": \"Libya\",\n \"MA\": \"Morocco\",\n \"MC\": \"Monaco\",\n \"MD\": \"Moldova\",\n \"ME\": \"Montenegro\",\n \"MF\": \"Saint Martin (French Part)\",\n \"MG\": \"Madagascar\",\n \"MH\": \"Marshall Islands\",\n \"MK\": \"North Macedonia\",\n \"ML\": \"Mali\",\n \"MM\": \"Myanmar\",\n \"MN\": \"Mongolia\",\n \"MO\": \"Macao\",\n \"MP\": \"Northern Mariana Islands\",\n \"MQ\": \"Martinique\",\n \"MR\": \"Mauritania\",\n \"MS\": \"Montserrat\",\n \"MT\": \"Malta\",\n \"MU\": \"Mauritius\",\n \"MV\": \"Maldives\",\n \"MW\": \"Malawi\",\n \"MX\": \"Mexico\",\n \"MY\": \"Malaysia\",\n \"MZ\": \"Mozambique\",\n \"NA\": \"Namibia\",\n \"NC\": \"New Caledonia\",\n \"NE\": \"Niger\",\n \"NF\": \"Norfolk Island\",\n \"NG\": \"Nigeria\",\n \"NI\": \"Nicaragua\",\n \"NL\": \"Netherlands\",\n \"NO\": \"Norway\",\n \"NP\": \"Nepal\",\n \"NR\": \"Nauru\",\n \"NU\": \"Niue\",\n \"NZ\": \"New Zealand\",\n \"OM\": \"Oman\",\n \"OS\": \"South Ossetia\",\n \"PA\": \"Panama\",\n \"PE\": \"Peru\",\n \"PF\": \"French Polynesia\",\n \"PG\": \"Papua New Guinea\",\n \"PH\": \"Philippines\",\n \"PK\": \"Pakistan\",\n \"PL\": \"Poland\",\n \"PM\": \"Saint Pierre and Miquelon\",\n \"PN\": \"Pitcairn\",\n \"PR\": \"Puerto Rico\",\n \"PS\": \"Palestine\",\n \"PT\": \"Portugal\",\n \"PW\": \"Palau\",\n \"PY\": \"Paraguay\",\n \"QA\": \"Qatar\",\n \"RE\": \"Reunion\",\n \"RO\": \"Romania\",\n \"RS\": \"Serbia\",\n \"RU\": \"Russia\",\n \"RW\": \"Rwanda\",\n \"SA\": \"Saudi Arabia\",\n \"SB\": \"Solomon Islands\",\n \"SC\": \"Seychelles\",\n \"SD\": \"Sudan\",\n \"SE\": \"Sweden\",\n \"SG\": \"Singapore\",\n \"SH\": \"Saint Helena\",\n \"SI\": \"Slovenia\",\n \"SJ\": \"Svalbard and Jan Mayen\",\n \"SK\": \"Slovakia\",\n \"SL\": \"Sierra Leone\",\n \"SM\": \"San Marino\",\n \"SN\": \"Senegal\",\n \"SO\": \"Somalia\",\n \"SR\": \"Suriname\",\n \"SS\": \"South Sudan\",\n \"ST\": \"Sao Tome and Principe\",\n \"SV\": \"El Salvador\",\n \"SX\": \"Sint Maarten\",\n \"SY\": \"Syria\",\n \"SZ\": \"Swaziland\",\n \"TA\": \"Tristan da Cunha\",\n \"TC\": \"Turks and Caicos Islands\",\n \"TD\": \"Chad\",\n \"TF\": \"French Southern Territories\",\n \"TG\": \"Togo\",\n \"TH\": \"Thailand\",\n \"TJ\": \"Tajikistan\",\n \"TK\": \"Tokelau\",\n \"TL\": \"Timor-Leste\",\n \"TM\": \"Turkmenistan\",\n \"TN\": \"Tunisia\",\n \"TO\": \"Tonga\",\n \"TR\": \"Turkey\",\n \"TT\": \"Trinidad and Tobago\",\n \"TV\": \"Tuvalu\",\n \"TW\": \"Taiwan\",\n \"TZ\": \"Tanzania\",\n \"UA\": \"Ukraine\",\n \"UG\": \"Uganda\",\n \"UM\": \"United States Minor Outlying Islands\",\n \"US\": \"United States\",\n \"UY\": \"Uruguay\",\n \"UZ\": \"Uzbekistan\",\n \"VA\": \"Holy See (Vatican City State)\",\n \"VC\": \"Saint Vincent and the Grenadines\",\n \"VE\": \"Venezuela\",\n \"VG\": \"Virgin Islands, British\",\n \"VI\": \"Virgin Islands, U.S.\",\n \"VN\": \"Vietnam\",\n \"VU\": \"Vanuatu\",\n \"WF\": \"Wallis and Futuna\",\n \"WS\": \"Samoa\",\n \"XK\": \"Kosovo\",\n \"YE\": \"Yemen\",\n \"YT\": \"Mayotte\",\n \"ZA\": \"South Africa\",\n \"ZM\": \"Zambia\",\n \"ZW\": \"Zimbabwe\",\n \"ZZ\": \"International\"\n}","import normalizeArguments from './normalizeArguments.js';\nimport parsePhoneNumber_ from './parsePhoneNumber_.js';\nexport default function parsePhoneNumber() {\n var _normalizeArguments = normalizeArguments(arguments),\n text = _normalizeArguments.text,\n options = _normalizeArguments.options,\n metadata = _normalizeArguments.metadata;\n\n return parsePhoneNumber_(text, options, metadata);\n}\n//# sourceMappingURL=parsePhoneNumber.js.map","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nimport parsePhoneNumber from 'libphonenumber-js/core';\n\n/**\r\n * Formats a phone number.\r\n * Is a proxy for `libphonenumber-js`'s `.format()` function of a parsed `PhoneNumber`.\r\n * @param {string} value\r\n * @param {string} [format]\r\n * @param {object} metadata\r\n * @return {string}\r\n */\nexport default function formatPhoneNumber(value, format, metadata) {\n if (!metadata) {\n if (_typeof(format) === 'object') {\n metadata = format;\n format = 'NATIONAL';\n }\n }\n if (!value) {\n return '';\n }\n var phoneNumber = parsePhoneNumber(value, metadata);\n if (!phoneNumber) {\n return '';\n }\n // Deprecated.\n // Legacy `format`s.\n switch (format) {\n case 'National':\n format = 'NATIONAL';\n break;\n case 'International':\n format = 'INTERNATIONAL';\n break;\n }\n return phoneNumber.format(format);\n}\nexport function formatPhoneNumberIntl(value, metadata) {\n return formatPhoneNumber(value, 'INTERNATIONAL', metadata);\n}\n//# sourceMappingURL=formatPhoneNumber.js.map","import PropTypes from 'prop-types';\nexport var metadata = PropTypes.shape({\n country_calling_codes: PropTypes.object.isRequired,\n countries: PropTypes.object.isRequired\n});\nexport var labels = PropTypes.objectOf(PropTypes.string);\n//# sourceMappingURL=PropTypes.js.map","// Edits text `value` (if `operation` is passed) and repositions the `caret` if needed.\n//\n// Example:\n//\n// value - '88005553535'\n// caret - 2 // starting from 0; is positioned before the first zero\n// operation - 'Backspace'\n//\n// Returns\n// {\n// \tvalue: '8005553535'\n// \tcaret: 1\n// }\n//\n// Currently supports just 'Delete' and 'Backspace' operations\n//\nexport default function edit(value, caret, operation) {\n switch (operation) {\n case 'Backspace':\n // If there exists the previous character,\n // then erase it and reposition the caret.\n if (caret > 0) {\n // Remove the previous character\n value = value.slice(0, caret - 1) + value.slice(caret); // Position the caret where the previous (erased) character was\n\n caret--;\n }\n\n break;\n\n case 'Delete':\n // Remove current digit (if any)\n value = value.slice(0, caret) + value.slice(caret + 1);\n break;\n }\n\n return {\n value: value,\n caret: caret\n };\n}\n//# sourceMappingURL=edit.js.map","// Parses the `text`.\n//\n// Returns `{ value, caret }` where `caret` is\n// the caret position inside `value`\n// corresponding to the `caret_position` inside `text`.\n//\n// The `text` is parsed by feeding each character sequentially to\n// `parse_character(character, value, context)` function\n// and appending the result (if it's not `undefined`) to `value`.\n//\n// `context` argument is just a utility empty object that is shared within the bounds\n// of parsing a single input string. The `_parse()` function could use that object\n// to store any kind of \"flags\" in it in order to alter its behavior based when\n// parsing next characters within the same string. Or it could completely ignore it.\n//\n// Example:\n//\n// `text` is `8 (800) 555-35-35`,\n// `caret_position` is `4` (before the first `0`).\n// `parse_character` is `(character, value) =>\n// if (character >= '0' && character <= '9') { return character }`.\n//\n// then `parse()` outputs `{ value: '88005553535', caret: 2 }`.\n//\nexport default function parse(text, caret_position, parse_character) {\n var context = {};\n var value = '';\n var focused_input_character_index = 0;\n var index = 0;\n\n while (index < text.length) {\n var character = parse_character(text[index], value, context);\n\n if (character !== undefined) {\n value += character;\n\n if (caret_position !== undefined) {\n if (caret_position === index) {\n focused_input_character_index = value.length - 1;\n } else if (caret_position > index) {\n focused_input_character_index = value.length;\n }\n }\n }\n\n index++;\n } // If caret position wasn't specified\n\n\n if (caret_position === undefined) {\n // Then set caret position to \"after the last input character\"\n focused_input_character_index = value.length;\n }\n\n var result = {\n value: value,\n caret: focused_input_character_index\n };\n return result;\n}\n//# sourceMappingURL=parse.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n// Counts all occurences of a symbol in a string\nexport function count_occurences(symbol, string) {\n var count = 0; // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes)\n // but template placeholder characters don't fall into that range\n // so skipping such miscellaneous \"exotic\" characters\n // won't matter here for just counting placeholder character occurrences.\n\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n\n if (character === symbol) {\n count++;\n }\n }\n\n return count;\n}\n//# sourceMappingURL=helpers.js.map","import { count_occurences } from './helpers.js';\nexport default function closeBraces(retained_template, template) {\n var placeholder = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'x';\n var empty_placeholder = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ' ';\n var cut_before = retained_template.length;\n var opening_braces = count_occurences('(', retained_template);\n var closing_braces = count_occurences(')', retained_template);\n var dangling_braces = opening_braces - closing_braces;\n\n while (dangling_braces > 0 && cut_before < template.length) {\n retained_template += template[cut_before].replace(placeholder, empty_placeholder);\n\n if (template[cut_before] === ')') {\n dangling_braces--;\n }\n\n cut_before++;\n }\n\n return retained_template;\n}\n//# sourceMappingURL=closeBraces.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport { count_occurences } from './helpers.js';\nimport close_braces from './closeBraces.js'; // Takes a `template` where character placeholders\n// are denoted by 'x'es (e.g. 'x (xxx) xxx-xx-xx').\n//\n// Returns a function which takes `value` characters\n// and returns the `template` filled with those characters.\n// If the `template` can only be partially filled\n// then it is cut off.\n//\n// If `should_close_braces` is `true`,\n// then it will also make sure all dangling braces are closed,\n// e.g. \"8 (8\" -> \"8 (8 )\" (iPhone style phone number input).\n//\n\nexport default function (template) {\n var placeholder = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x';\n var should_close_braces = arguments.length > 2 ? arguments[2] : undefined;\n\n if (!template) {\n return function (value) {\n return {\n text: value\n };\n };\n }\n\n var characters_in_template = count_occurences(placeholder, template);\n return function (value) {\n if (!value) {\n return {\n text: '',\n template: template\n };\n }\n\n var value_character_index = 0;\n var filled_in_template = ''; // Using `.split('')` here instead of normal `for ... of`\n // because the importing application doesn't neccessarily include an ES6 polyfill.\n // The `.split('')` approach discards \"exotic\" UTF-8 characters\n // (the ones consisting of four bytes)\n // but template placeholder characters don't fall into that range\n // and appending UTF-8 characters to a string in parts still works.\n\n for (var _iterator = _createForOfIteratorHelperLoose(template.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n\n if (character !== placeholder) {\n filled_in_template += character;\n continue;\n }\n\n filled_in_template += value[value_character_index];\n value_character_index++; // If the last available value character has been filled in,\n // then return the filled in template\n // (either trim the right part or retain it,\n // if no more character placeholders in there)\n\n if (value_character_index === value.length) {\n // If there are more character placeholders\n // in the right part of the template\n // then simply trim it.\n if (value.length < characters_in_template) {\n break;\n }\n }\n }\n\n if (should_close_braces) {\n filled_in_template = close_braces(filled_in_template, template);\n }\n\n return {\n text: filled_in_template,\n template: template\n };\n };\n}\n//# sourceMappingURL=templateFormatter.js.map","import template_formatter from './templateFormatter.js'; // Formats `value` value preserving `caret` at the same character.\n//\n// `{ value, caret }` attribute is the result of `parse()` function call.\n//\n// Returns `{ text, caret }` where the new `caret` is the caret position\n// inside `text` text corresponding to the original `caret` position inside `value`.\n//\n// `formatter(value)` is a function returning `{ text, template }`.\n//\n// `text` is the `value` value formatted using `template`.\n// It may either cut off the non-filled right part of the `template`\n// or it may fill the non-filled character placeholders\n// in the right part of the `template` with `spacer`\n// which is a space (' ') character by default.\n//\n// `template` is the template used to format the `value`.\n// It can be either a full-length template or a partial template.\n//\n// `formatter` can also be a string — a `template`\n// where character placeholders are denoted by 'x'es.\n// In this case `formatter` function is automatically created.\n//\n// Example:\n//\n// `value` is '880',\n// `caret` is `2` (before the first `0`)\n//\n// `formatter` is `'880' =>\n// { text: '8 (80 )', template: 'x (xxx) xxx-xx-xx' }`\n//\n// The result is `{ text: '8 (80 )', caret: 4 }`.\n//\n\nexport default function format(value, caret, formatter) {\n if (typeof formatter === 'string') {\n formatter = template_formatter(formatter);\n }\n\n var _ref = formatter(value) || {},\n text = _ref.text,\n template = _ref.template;\n\n if (text === undefined) {\n text = value;\n }\n\n if (template) {\n if (caret === undefined) {\n caret = text.length;\n } else {\n var index = 0;\n var found = false;\n var possibly_last_input_character_index = -1;\n\n while (index < text.length && index < template.length) {\n // Character placeholder found\n if (text[index] !== template[index]) {\n if (caret === 0) {\n found = true;\n caret = index;\n break;\n }\n\n possibly_last_input_character_index = index;\n caret--;\n }\n\n index++;\n } // If the caret was positioned after last input character,\n // then the text caret index is just after the last input character.\n\n\n if (!found) {\n caret = possibly_last_input_character_index + 1;\n }\n }\n }\n\n return {\n text: text,\n caret: caret\n };\n}\n//# sourceMappingURL=format.js.map","export function isReadOnly(element) {\n return element.hasAttribute('readonly');\n} // Gets <input/> selection bounds\n\nexport function getSelection(element) {\n // If no selection, return nothing\n if (element.selectionStart === element.selectionEnd) {\n return;\n }\n\n return {\n start: element.selectionStart,\n end: element.selectionEnd\n };\n} // Key codes\n\nexport var Keys = {\n Backspace: 8,\n Delete: 46\n}; // Finds out the operation to be intercepted and performed\n// based on the key down event `keyCode`.\n\nexport function getOperation(event) {\n switch (event.keyCode) {\n case Keys.Backspace:\n return 'Backspace';\n\n case Keys.Delete:\n return 'Delete';\n }\n} // Gets <input/> caret position\n\nexport function getCaretPosition(element) {\n return element.selectionStart;\n} // Sets <input/> caret position\n\nexport function setCaretPosition(element, caret_position) {\n // Sanity check\n if (caret_position === undefined) {\n return;\n } // Set caret position.\n // There has been an issue with caret positioning on Android devices.\n // https://github.com/catamphetamine/input-format/issues/2\n // I was revisiting this issue and looked for similar issues in other libraries.\n // For example, there's [`text-mask`](https://github.com/text-mask/text-mask) library.\n // They've had exactly the same issue when the caret seemingly refused to be repositioned programmatically.\n // The symptoms were the same: whenever the caret passed through a non-digit character of a mask (a whitespace, a bracket, a dash, etc), it looked as if it placed itself one character before its correct position.\n // https://github.com/text-mask/text-mask/issues/300\n // They seem to have found a basic fix for it: calling `input.setSelectionRange()` in a timeout rather than instantly for Android devices.\n // https://github.com/text-mask/text-mask/pull/400/files\n // I've implemented the same workaround here.\n\n\n if (isAndroid()) {\n setTimeout(function () {\n return element.setSelectionRange(caret_position, caret_position);\n }, 0);\n } else {\n element.setSelectionRange(caret_position, caret_position);\n }\n}\n\nfunction isAndroid() {\n // `navigator` is not defined when running mocha tests.\n if (typeof navigator !== 'undefined') {\n return ANDROID_USER_AGENT_REG_EXP.test(navigator.userAgent);\n }\n}\n\nvar ANDROID_USER_AGENT_REG_EXP = /Android/i;\n//# sourceMappingURL=dom.js.map","import edit from './edit.js';\nimport parse from './parse.js';\nimport format from './format.js';\nimport { isReadOnly, getOperation, getSelection, getCaretPosition, setCaretPosition } from './dom.js'; // Deprecated.\n// I don't know why this function exists.\n\nexport function onCut(event, input, _parse, _format, on_change) {\n if (isReadOnly(input)) {\n return;\n } // The actual cut hasn't happened just yet hence the timeout.\n\n\n setTimeout(function () {\n return formatInputText(input, _parse, _format, undefined, on_change);\n }, 0);\n} // Deprecated.\n// I don't know why this function exists.\n\nexport function onPaste(event, input, _parse, _format, on_change) {\n if (isReadOnly(input)) {\n return;\n }\n\n var selection = getSelection(input); // If selection is made,\n // just erase the selected text\n // prior to pasting\n\n if (selection) {\n eraseSelection(input, selection);\n }\n\n formatInputText(input, _parse, _format, undefined, on_change);\n}\nexport function onChange(event, input, _parse, _format, on_change) {\n formatInputText(input, _parse, _format, undefined, on_change);\n} // \"Delete\" and \"Backspace\" keys are special\n// in a way that they're not handled by the regular `onChange()` handler\n// and instead are intercepted and re-applied manually.\n// The reason is that normally hitting \"Backspace\" or \"Delete\"\n// results in erasing a character, but that character might be any character,\n// while it would be a better \"user experience\" if it erased not just any character\n// but the closest \"meaningful\" character.\n// For example, if a template is `(xxx) xxx-xxxx`,\n// and the `<input/>` value is `(111) 222-3333`,\n// then, if a user begins erasing the `3333` part via \"Backspace\"\n// and reaches the \"-\" character, then it would just erase the \"-\" character.\n// Nothing wrong with that, but it would be a better \"user experience\"\n// if hitting \"Backspace\" at that position would erase the closest \"meaningful\"\n// character, which would be the rightmost `2`.\n// So, what this `onKeyDown()` handler does is it intercepts\n// \"Backspace\" and \"Delete\" keys and re-applies those operations manually\n// following the logic described above.\n\nexport function onKeyDown(event, input, _parse, _format, on_change) {\n if (isReadOnly(input)) {\n return;\n }\n\n var operation = getOperation(event);\n\n switch (operation) {\n case 'Delete':\n case 'Backspace':\n // Intercept this operation and perform it manually.\n event.preventDefault();\n var selection = getSelection(input); // If a selection is made, just erase the selected text.\n\n if (selection) {\n eraseSelection(input, selection);\n return formatInputText(input, _parse, _format, undefined, on_change);\n } // Else, perform the (character erasing) operation manually.\n\n\n return formatInputText(input, _parse, _format, operation, on_change);\n\n default: // Will be handled normally as part of the `onChange` handler.\n\n }\n}\n/**\r\n * Erases the selected text inside an `<input/>`.\r\n * @param {DOMElement} input\r\n * @param {Selection} selection\r\n */\n\nfunction eraseSelection(input, selection) {\n var text = input.value;\n text = text.slice(0, selection.start) + text.slice(selection.end);\n input.value = text;\n setCaretPosition(input, selection.start);\n}\n/**\r\n * Parses and re-formats `<input/>` textual value.\r\n * E.g. when a user enters something into the `<input/>`\r\n * that raw input must first be parsed and the re-formatted properly.\r\n * Is called either after some user input (e.g. entered a character, pasted something)\r\n * or after the user performed an `operation` (e.g. \"Backspace\", \"Delete\").\r\n * @param {DOMElement} input\r\n * @param {Function} parse\r\n * @param {Function} format\r\n * @param {string} [operation] - The operation that triggered `<input/>` textual value change. E.g. \"Backspace\", \"Delete\".\r\n * @param {Function} onChange\r\n */\n\n\nfunction formatInputText(input, _parse, _format, operation, on_change) {\n // Parse `<input/>` textual value.\n // Get the `value` and `caret` position.\n var _parse2 = parse(input.value, getCaretPosition(input), _parse),\n value = _parse2.value,\n caret = _parse2.caret; // If a user performed an operation (\"Backspace\", \"Delete\")\n // then apply that operation and get the new `value` and `caret` position.\n\n\n if (operation) {\n var newValueAndCaret = edit(value, caret, operation);\n value = newValueAndCaret.value;\n caret = newValueAndCaret.caret;\n } // Format the `value`.\n // (and reposition the caret accordingly)\n\n\n var formatted = format(value, caret, _format);\n var text = formatted.text;\n caret = formatted.caret; // Set `<input/>` textual value manually\n // to prevent React from resetting the caret position\n // later inside a subsequent `render()`.\n // Doesn't work for custom `inputComponent`s for some reason.\n\n input.value = text; // Position the caret properly.\n\n setCaretPosition(input, caret); // If the `<input/>` textual value did change,\n // then the parsed `value` may have changed too.\n\n on_change(value);\n}\n//# sourceMappingURL=inputControl.js.map","var _excluded = [\"value\", \"parse\", \"format\", \"inputComponent\", \"onChange\", \"onKeyDown\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\n// This is just `./ReactInput.js` rewritten in Hooks.\nimport React, { useCallback, useRef } from 'react';\nimport PropTypes from 'prop-types';\nimport { onChange as onInputChange, onKeyDown as onInputKeyDown } from '../inputControl.js'; // Usage:\n//\n// <ReactInput\n// \tvalue={this.state.phone}\n// \tonChange={phone => this.setState({ phone })}\n// \tparse={character => character}\n// \tformat={value => ({ text: value, template: 'xxxxxxxx' })}/>\n//\n\nfunction Input(_ref, ref) {\n var value = _ref.value,\n parse = _ref.parse,\n format = _ref.format,\n InputComponent = _ref.inputComponent,\n onChange = _ref.onChange,\n onKeyDown = _ref.onKeyDown,\n rest = _objectWithoutProperties(_ref, _excluded);\n\n var internalRef = useRef();\n var setRef = useCallback(function (instance) {\n internalRef.current = instance;\n\n if (ref) {\n if (typeof ref === 'function') {\n ref(instance);\n } else {\n ref.current = instance;\n }\n }\n }, [ref]);\n\n var _onChange = useCallback(function (event) {\n return onInputChange(event, internalRef.current, parse, format, onChange);\n }, [internalRef, parse, format, onChange]);\n\n var _onKeyDown = useCallback(function (event) {\n if (onKeyDown) {\n onKeyDown(event);\n } // If `onKeyDown()` handler above has called `event.preventDefault()`\n // then ignore this `keydown` event.\n\n\n if (event.defaultPrevented) {\n return;\n }\n\n return onInputKeyDown(event, internalRef.current, parse, format, onChange);\n }, [internalRef, parse, format, onChange, onKeyDown]);\n\n return /*#__PURE__*/React.createElement(InputComponent, _extends({}, rest, {\n ref: setRef,\n value: format(isEmptyValue(value) ? '' : value).text,\n onKeyDown: _onKeyDown,\n onChange: _onChange\n }));\n}\n\nInput = /*#__PURE__*/React.forwardRef(Input);\nInput.propTypes = {\n // Parses a single characher of `<input/>` text.\n parse: PropTypes.func.isRequired,\n // Formats `value` into `<input/>` text.\n format: PropTypes.func.isRequired,\n // Renders `<input/>` by default.\n inputComponent: PropTypes.elementType.isRequired,\n // `<input/>` `type` attribute.\n type: PropTypes.string.isRequired,\n // Is parsed from <input/> text.\n value: PropTypes.string,\n // This handler is called each time `<input/>` text is changed.\n onChange: PropTypes.func.isRequired,\n // Passthrough\n onKeyDown: PropTypes.func,\n onCut: PropTypes.func,\n onPaste: PropTypes.func\n};\nInput.defaultProps = {\n // Renders `<input/>` by default.\n inputComponent: 'input',\n // `<input/>` `type` attribute.\n type: 'text'\n};\nexport default Input;\n\nfunction isEmptyValue(value) {\n return value === undefined || value === null;\n}\n//# sourceMappingURL=Input.js.map","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\n// This \"state\" object simply holds the state of the \"AsYouType\" parser:\n//\n// * `country?: string`\n// * `callingCode?: string`\n// * `digits: string`\n// * `international: boolean`\n// * `missingPlus: boolean`\n// * `IDDPrefix?: string`\n// * `carrierCode?: string`\n// * `nationalPrefix?: string`\n// * `nationalSignificantNumber?: string`\n// * `nationalSignificantNumberMatchesInput: boolean`\n// * `complexPrefixBeforeNationalSignificantNumber?: string`\n//\n// `state.country` and `state.callingCode` aren't required to be in sync.\n// For example, `state.country` could be `\"AR\"` and `state.callingCode` could be `undefined`.\n// So `state.country` and `state.callingCode` are totally independent.\n//\nvar AsYouTypeState = /*#__PURE__*/function () {\n function AsYouTypeState(_ref) {\n var onCountryChange = _ref.onCountryChange,\n onCallingCodeChange = _ref.onCallingCodeChange;\n\n _classCallCheck(this, AsYouTypeState);\n\n this.onCountryChange = onCountryChange;\n this.onCallingCodeChange = onCallingCodeChange;\n }\n\n _createClass(AsYouTypeState, [{\n key: \"reset\",\n value: function reset(_ref2) {\n var country = _ref2.country,\n callingCode = _ref2.callingCode;\n this.international = false;\n this.missingPlus = false;\n this.IDDPrefix = undefined;\n this.callingCode = undefined;\n this.digits = '';\n this.resetNationalSignificantNumber();\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"resetNationalSignificantNumber\",\n value: function resetNationalSignificantNumber() {\n this.nationalSignificantNumber = this.getNationalDigits();\n this.nationalSignificantNumberMatchesInput = true;\n this.nationalPrefix = undefined;\n this.carrierCode = undefined;\n this.complexPrefixBeforeNationalSignificantNumber = undefined;\n }\n }, {\n key: \"update\",\n value: function update(properties) {\n for (var _i = 0, _Object$keys = Object.keys(properties); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n this[key] = properties[key];\n }\n }\n }, {\n key: \"initCountryAndCallingCode\",\n value: function initCountryAndCallingCode(country, callingCode) {\n this.setCountry(country);\n this.setCallingCode(callingCode);\n }\n }, {\n key: \"setCountry\",\n value: function setCountry(country) {\n this.country = country;\n this.onCountryChange(country);\n }\n }, {\n key: \"setCallingCode\",\n value: function setCallingCode(callingCode) {\n this.callingCode = callingCode;\n this.onCallingCodeChange(callingCode, this.country);\n }\n }, {\n key: \"startInternationalNumber\",\n value: function startInternationalNumber(country, callingCode) {\n // Prepend the `+` to parsed input.\n this.international = true; // If a default country was set then reset it\n // because an explicitly international phone\n // number is being entered.\n\n this.initCountryAndCallingCode(country, callingCode);\n }\n }, {\n key: \"appendDigits\",\n value: function appendDigits(nextDigits) {\n this.digits += nextDigits;\n }\n }, {\n key: \"appendNationalSignificantNumberDigits\",\n value: function appendNationalSignificantNumberDigits(nextDigits) {\n this.nationalSignificantNumber += nextDigits;\n }\n /**\r\n * Returns the part of `this.digits` that corresponds to the national number.\r\n * Basically, all digits that have been input by the user, except for the\r\n * international prefix and the country calling code part\r\n * (if the number is an international one).\r\n * @return {string}\r\n */\n\n }, {\n key: \"getNationalDigits\",\n value: function getNationalDigits() {\n if (this.international) {\n return this.digits.slice((this.IDDPrefix ? this.IDDPrefix.length : 0) + (this.callingCode ? this.callingCode.length : 0));\n }\n\n return this.digits;\n }\n }, {\n key: \"getDigitsWithoutInternationalPrefix\",\n value: function getDigitsWithoutInternationalPrefix() {\n if (this.international) {\n if (this.IDDPrefix) {\n return this.digits.slice(this.IDDPrefix.length);\n }\n }\n\n return this.digits;\n }\n }]);\n\n return AsYouTypeState;\n}();\n\nexport { AsYouTypeState as default };\n//# sourceMappingURL=AsYouTypeState.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\n// Should be the same as `DIGIT_PLACEHOLDER` in `libphonenumber-metadata-generator`.\nexport var DIGIT_PLACEHOLDER = 'x'; // '\\u2008' (punctuation space)\n\nvar DIGIT_PLACEHOLDER_MATCHER = new RegExp(DIGIT_PLACEHOLDER); // Counts all occurences of a symbol in a string.\n// Unicode-unsafe (because using `.split()`).\n\nexport function countOccurences(symbol, string) {\n var count = 0; // Using `.split('')` to iterate through a string here\n // to avoid requiring `Symbol.iterator` polyfill.\n // `.split('')` is generally not safe for Unicode,\n // but in this particular case for counting brackets it is safe.\n // for (const character of string)\n\n for (var _iterator = _createForOfIteratorHelperLoose(string.split('')), _step; !(_step = _iterator()).done;) {\n var character = _step.value;\n\n if (character === symbol) {\n count++;\n }\n }\n\n return count;\n} // Repeats a string (or a symbol) N times.\n// http://stackoverflow.com/questions/202605/repeat-string-javascript\n\nexport function repeat(string, times) {\n if (times < 1) {\n return '';\n }\n\n var result = '';\n\n while (times > 1) {\n if (times & 1) {\n result += string;\n }\n\n times >>= 1;\n string += string;\n }\n\n return result + string;\n}\nexport function cutAndStripNonPairedParens(string, cutBeforeIndex) {\n if (string[cutBeforeIndex] === ')') {\n cutBeforeIndex++;\n }\n\n return stripNonPairedParens(string.slice(0, cutBeforeIndex));\n}\nexport function closeNonPairedParens(template, cut_before) {\n var retained_template = template.slice(0, cut_before);\n var opening_braces = countOccurences('(', retained_template);\n var closing_braces = countOccurences(')', retained_template);\n var dangling_braces = opening_braces - closing_braces;\n\n while (dangling_braces > 0 && cut_before < template.length) {\n if (template[cut_before] === ')') {\n dangling_braces--;\n }\n\n cut_before++;\n }\n\n return template.slice(0, cut_before);\n}\nexport function stripNonPairedParens(string) {\n var dangling_braces = [];\n var i = 0;\n\n while (i < string.length) {\n if (string[i] === '(') {\n dangling_braces.push(i);\n } else if (string[i] === ')') {\n dangling_braces.pop();\n }\n\n i++;\n }\n\n var start = 0;\n var cleared_string = '';\n dangling_braces.push(string.length);\n\n for (var _i = 0, _dangling_braces = dangling_braces; _i < _dangling_braces.length; _i++) {\n var index = _dangling_braces[_i];\n cleared_string += string.slice(start, index);\n start = index + 1;\n }\n\n return cleared_string;\n}\nexport function populateTemplateWithDigits(template, position, digits) {\n // Using `.split('')` to iterate through a string here\n // to avoid requiring `Symbol.iterator` polyfill.\n // `.split('')` is generally not safe for Unicode,\n // but in this particular case for `digits` it is safe.\n // for (const digit of digits)\n for (var _iterator2 = _createForOfIteratorHelperLoose(digits.split('')), _step2; !(_step2 = _iterator2()).done;) {\n var digit = _step2.value;\n\n // If there is room for more digits in current `template`,\n // then set the next digit in the `template`,\n // and return the formatted digits so far.\n // If more digits are entered than the current format could handle.\n if (template.slice(position + 1).search(DIGIT_PLACEHOLDER_MATCHER) < 0) {\n return;\n }\n\n position = template.search(DIGIT_PLACEHOLDER_MATCHER);\n template = template.replace(DIGIT_PLACEHOLDER_MATCHER, digit);\n }\n\n return [template, position];\n}\n//# sourceMappingURL=AsYouTypeFormatter.util.js.map","import checkNumberLength from './helpers/checkNumberLength.js';\nimport parseDigits from './helpers/parseDigits.js';\nimport formatNationalNumberUsingFormat from './helpers/formatNationalNumberUsingFormat.js';\nexport default function formatCompleteNumber(state, format, _ref) {\n var metadata = _ref.metadata,\n shouldTryNationalPrefixFormattingRule = _ref.shouldTryNationalPrefixFormattingRule,\n getSeparatorAfterNationalPrefix = _ref.getSeparatorAfterNationalPrefix;\n var matcher = new RegExp(\"^(?:\".concat(format.pattern(), \")$\"));\n\n if (matcher.test(state.nationalSignificantNumber)) {\n return formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, {\n metadata: metadata,\n shouldTryNationalPrefixFormattingRule: shouldTryNationalPrefixFormattingRule,\n getSeparatorAfterNationalPrefix: getSeparatorAfterNationalPrefix\n });\n }\n}\nexport function canFormatCompleteNumber(nationalSignificantNumber, metadata) {\n return checkNumberLength(nationalSignificantNumber, metadata) === 'IS_POSSIBLE';\n}\n\nfunction formatNationalNumberWithAndWithoutNationalPrefixFormattingRule(state, format, _ref2) {\n var metadata = _ref2.metadata,\n shouldTryNationalPrefixFormattingRule = _ref2.shouldTryNationalPrefixFormattingRule,\n getSeparatorAfterNationalPrefix = _ref2.getSeparatorAfterNationalPrefix;\n // `format` has already been checked for `nationalPrefix` requirement.\n var nationalSignificantNumber = state.nationalSignificantNumber,\n international = state.international,\n nationalPrefix = state.nationalPrefix,\n carrierCode = state.carrierCode; // Format the number with using `national_prefix_formatting_rule`.\n // If the resulting formatted number is a valid formatted number, then return it.\n //\n // Google's AsYouType formatter is different in a way that it doesn't try\n // to format using the \"national prefix formatting rule\", and instead it\n // simply prepends a national prefix followed by a \" \" character.\n // This code does that too, but as a fallback.\n // The reason is that \"national prefix formatting rule\" may use parentheses,\n // which wouldn't be included has it used the simpler Google's way.\n //\n\n if (shouldTryNationalPrefixFormattingRule(format)) {\n var formattedNumber = formatNationalNumber(state, format, {\n useNationalPrefixFormattingRule: true,\n getSeparatorAfterNationalPrefix: getSeparatorAfterNationalPrefix,\n metadata: metadata\n });\n\n if (formattedNumber) {\n return formattedNumber;\n }\n } // Format the number without using `national_prefix_formatting_rule`.\n\n\n return formatNationalNumber(state, format, {\n useNationalPrefixFormattingRule: false,\n getSeparatorAfterNationalPrefix: getSeparatorAfterNationalPrefix,\n metadata: metadata\n });\n}\n\nfunction formatNationalNumber(state, format, _ref3) {\n var metadata = _ref3.metadata,\n useNationalPrefixFormattingRule = _ref3.useNationalPrefixFormattingRule,\n getSeparatorAfterNationalPrefix = _ref3.getSeparatorAfterNationalPrefix;\n var formattedNationalNumber = formatNationalNumberUsingFormat(state.nationalSignificantNumber, format, {\n carrierCode: state.carrierCode,\n useInternationalFormat: state.international,\n withNationalPrefix: useNationalPrefixFormattingRule,\n metadata: metadata\n });\n\n if (!useNationalPrefixFormattingRule) {\n if (state.nationalPrefix) {\n // If a national prefix was extracted, then just prepend it,\n // followed by a \" \" character.\n formattedNationalNumber = state.nationalPrefix + getSeparatorAfterNationalPrefix(format) + formattedNationalNumber;\n } else if (state.complexPrefixBeforeNationalSignificantNumber) {\n formattedNationalNumber = state.complexPrefixBeforeNationalSignificantNumber + ' ' + formattedNationalNumber;\n }\n }\n\n if (isValidFormattedNationalNumber(formattedNationalNumber, state)) {\n return formattedNationalNumber;\n }\n} // Check that the formatted phone number contains exactly\n// the same digits that have been input by the user.\n// For example, when \"0111523456789\" is input for `AR` country,\n// the extracted `this.nationalSignificantNumber` is \"91123456789\",\n// which means that the national part of `this.digits` isn't simply equal to\n// `this.nationalPrefix` + `this.nationalSignificantNumber`.\n//\n// Also, a `format` can add extra digits to the `this.nationalSignificantNumber`\n// being formatted via `metadata[country].national_prefix_transform_rule`.\n// For example, for `VI` country, it prepends `340` to the national number,\n// and if this check hasn't been implemented, then there would be a bug\n// when `340` \"area coude\" is \"duplicated\" during input for `VI` country:\n// https://github.com/catamphetamine/libphonenumber-js/issues/318\n//\n// So, all these \"gotchas\" are filtered out.\n//\n// In the original Google's code, the comments say:\n// \"Check that we didn't remove nor add any extra digits when we matched\n// this formatting pattern. This usually happens after we entered the last\n// digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when\n// formatted but AYTF should retain all the number entered and not change\n// in order to match a format (of same leading digits and length) display\n// in that way.\"\n// \"If it's the same (i.e entered number and format is same), then it's\n// safe to return this in formatted number as nothing is lost / added.\"\n// Otherwise, don't use this format.\n// https://github.com/google/libphonenumber/commit/3e7c1f04f5e7200f87fb131e6f85c6e99d60f510#diff-9149457fa9f5d608a11bb975c6ef4bc5\n// https://github.com/google/libphonenumber/commit/3ac88c7106e7dcb553bcc794b15f19185928a1c6#diff-2dcb77e833422ee304da348b905cde0b\n//\n\n\nfunction isValidFormattedNationalNumber(formattedNationalNumber, state) {\n return parseDigits(formattedNationalNumber) === state.getNationalDigits();\n}\n//# sourceMappingURL=AsYouTypeFormatter.complete.js.map","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nvar PatternParser = /*#__PURE__*/function () {\n function PatternParser() {\n _classCallCheck(this, PatternParser);\n }\n\n _createClass(PatternParser, [{\n key: \"parse\",\n value: function parse(pattern) {\n this.context = [{\n or: true,\n instructions: []\n }];\n this.parsePattern(pattern);\n\n if (this.context.length !== 1) {\n throw new Error('Non-finalized contexts left when pattern parse ended');\n }\n\n var _this$context$ = this.context[0],\n branches = _this$context$.branches,\n instructions = _this$context$.instructions;\n\n if (branches) {\n return {\n op: '|',\n args: branches.concat([expandSingleElementArray(instructions)])\n };\n }\n /* istanbul ignore if */\n\n\n if (instructions.length === 0) {\n throw new Error('Pattern is required');\n }\n\n if (instructions.length === 1) {\n return instructions[0];\n }\n\n return instructions;\n }\n }, {\n key: \"startContext\",\n value: function startContext(context) {\n this.context.push(context);\n }\n }, {\n key: \"endContext\",\n value: function endContext() {\n this.context.pop();\n }\n }, {\n key: \"getContext\",\n value: function getContext() {\n return this.context[this.context.length - 1];\n }\n }, {\n key: \"parsePattern\",\n value: function parsePattern(pattern) {\n if (!pattern) {\n throw new Error('Pattern is required');\n }\n\n var match = pattern.match(OPERATOR);\n\n if (!match) {\n if (ILLEGAL_CHARACTER_REGEXP.test(pattern)) {\n throw new Error(\"Illegal characters found in a pattern: \".concat(pattern));\n }\n\n this.getContext().instructions = this.getContext().instructions.concat(pattern.split(''));\n return;\n }\n\n var operator = match[1];\n var before = pattern.slice(0, match.index);\n var rightPart = pattern.slice(match.index + operator.length);\n\n switch (operator) {\n case '(?:':\n if (before) {\n this.parsePattern(before);\n }\n\n this.startContext({\n or: true,\n instructions: [],\n branches: []\n });\n break;\n\n case ')':\n if (!this.getContext().or) {\n throw new Error('\")\" operator must be preceded by \"(?:\" operator');\n }\n\n if (before) {\n this.parsePattern(before);\n }\n\n if (this.getContext().instructions.length === 0) {\n throw new Error('No instructions found after \"|\" operator in an \"or\" group');\n }\n\n var _this$getContext = this.getContext(),\n branches = _this$getContext.branches;\n\n branches.push(expandSingleElementArray(this.getContext().instructions));\n this.endContext();\n this.getContext().instructions.push({\n op: '|',\n args: branches\n });\n break;\n\n case '|':\n if (!this.getContext().or) {\n throw new Error('\"|\" operator can only be used inside \"or\" groups');\n }\n\n if (before) {\n this.parsePattern(before);\n } // The top-level is an implicit \"or\" group, if required.\n\n\n if (!this.getContext().branches) {\n // `branches` are not defined only for the root implicit \"or\" operator.\n\n /* istanbul ignore else */\n if (this.context.length === 1) {\n this.getContext().branches = [];\n } else {\n throw new Error('\"branches\" not found in an \"or\" group context');\n }\n }\n\n this.getContext().branches.push(expandSingleElementArray(this.getContext().instructions));\n this.getContext().instructions = [];\n break;\n\n case '[':\n if (before) {\n this.parsePattern(before);\n }\n\n this.startContext({\n oneOfSet: true\n });\n break;\n\n case ']':\n if (!this.getContext().oneOfSet) {\n throw new Error('\"]\" operator must be preceded by \"[\" operator');\n }\n\n this.endContext();\n this.getContext().instructions.push({\n op: '[]',\n args: parseOneOfSet(before)\n });\n break;\n\n /* istanbul ignore next */\n\n default:\n throw new Error(\"Unknown operator: \".concat(operator));\n }\n\n if (rightPart) {\n this.parsePattern(rightPart);\n }\n }\n }]);\n\n return PatternParser;\n}();\n\nexport { PatternParser as default };\n\nfunction parseOneOfSet(pattern) {\n var values = [];\n var i = 0;\n\n while (i < pattern.length) {\n if (pattern[i] === '-') {\n if (i === 0 || i === pattern.length - 1) {\n throw new Error(\"Couldn't parse a one-of set pattern: \".concat(pattern));\n }\n\n var prevValue = pattern[i - 1].charCodeAt(0) + 1;\n var nextValue = pattern[i + 1].charCodeAt(0) - 1;\n var value = prevValue;\n\n while (value <= nextValue) {\n values.push(String.fromCharCode(value));\n value++;\n }\n } else {\n values.push(pattern[i]);\n }\n\n i++;\n }\n\n return values;\n}\n\nvar ILLEGAL_CHARACTER_REGEXP = /[\\(\\)\\[\\]\\?\\:\\|]/;\nvar OPERATOR = new RegExp( // any of:\n'(' + // or operator\n'\\\\|' + // or\n'|' + // or group start\n'\\\\(\\\\?\\\\:' + // or\n'|' + // or group end\n'\\\\)' + // or\n'|' + // one-of set start\n'\\\\[' + // or\n'|' + // one-of set end\n'\\\\]' + ')');\n\nfunction expandSingleElementArray(array) {\n if (array.length === 1) {\n return array[0];\n }\n\n return array;\n}\n//# sourceMappingURL=AsYouTypeFormatter.PatternParser.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport PatternParser from './AsYouTypeFormatter.PatternParser.js';\n\nvar PatternMatcher = /*#__PURE__*/function () {\n function PatternMatcher(pattern) {\n _classCallCheck(this, PatternMatcher);\n\n this.matchTree = new PatternParser().parse(pattern);\n }\n\n _createClass(PatternMatcher, [{\n key: \"match\",\n value: function match(string) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n allowOverflow = _ref.allowOverflow;\n\n if (!string) {\n throw new Error('String is required');\n }\n\n var result = _match(string.split(''), this.matchTree, true);\n\n if (result && result.match) {\n delete result.matchedChars;\n }\n\n if (result && result.overflow) {\n if (!allowOverflow) {\n return;\n }\n }\n\n return result;\n }\n }]);\n\n return PatternMatcher;\n}();\n/**\r\n * Matches `characters` against a pattern compiled into a `tree`.\r\n * @param {string[]} characters\r\n * @param {Tree} tree — A pattern compiled into a `tree`. See the `*.d.ts` file for the description of the `tree` structure.\r\n * @param {boolean} last — Whether it's the last (rightmost) subtree on its level of the match tree.\r\n * @return {object} See the `*.d.ts` file for the description of the result object.\r\n */\n\n\nexport { PatternMatcher as default };\n\nfunction _match(characters, tree, last) {\n // If `tree` is a string, then `tree` is a single character.\n // That's because when a pattern is parsed, multi-character-string parts\n // of a pattern are compiled into arrays of single characters.\n // I still wrote this piece of code for a \"general\" hypothetical case\n // when `tree` could be a string of several characters, even though\n // such case is not possible with the current implementation.\n if (typeof tree === 'string') {\n var characterString = characters.join('');\n\n if (tree.indexOf(characterString) === 0) {\n // `tree` is always a single character.\n // If `tree.indexOf(characterString) === 0`\n // then `characters.length === tree.length`.\n\n /* istanbul ignore else */\n if (characters.length === tree.length) {\n return {\n match: true,\n matchedChars: characters\n };\n } // `tree` is always a single character.\n // If `tree.indexOf(characterString) === 0`\n // then `characters.length === tree.length`.\n\n /* istanbul ignore next */\n\n\n return {\n partialMatch: true // matchedChars: characters\n\n };\n }\n\n if (characterString.indexOf(tree) === 0) {\n if (last) {\n // The `else` path is not possible because `tree` is always a single character.\n // The `else` case for `characters.length > tree.length` would be\n // `characters.length <= tree.length` which means `characters.length <= 1`.\n // `characters` array can't be empty, so that means `characters === [tree]`,\n // which would also mean `tree.indexOf(characterString) === 0` and that'd mean\n // that the `if (tree.indexOf(characterString) === 0)` condition before this\n // `if` condition would be entered, and returned from there, not reaching this code.\n\n /* istanbul ignore else */\n if (characters.length > tree.length) {\n return {\n overflow: true\n };\n }\n }\n\n return {\n match: true,\n matchedChars: characters.slice(0, tree.length)\n };\n }\n\n return;\n }\n\n if (Array.isArray(tree)) {\n var restCharacters = characters.slice();\n var i = 0;\n\n while (i < tree.length) {\n var subtree = tree[i];\n\n var result = _match(restCharacters, subtree, last && i === tree.length - 1);\n\n if (!result) {\n return;\n } else if (result.overflow) {\n return result;\n } else if (result.match) {\n // Continue with the next subtree with the rest of the characters.\n restCharacters = restCharacters.slice(result.matchedChars.length);\n\n if (restCharacters.length === 0) {\n if (i === tree.length - 1) {\n return {\n match: true,\n matchedChars: characters\n };\n } else {\n return {\n partialMatch: true // matchedChars: characters\n\n };\n }\n }\n } else {\n /* istanbul ignore else */\n if (result.partialMatch) {\n return {\n partialMatch: true // matchedChars: characters\n\n };\n } else {\n throw new Error(\"Unsupported match result:\\n\".concat(JSON.stringify(result, null, 2)));\n }\n }\n\n i++;\n } // If `last` then overflow has already been checked\n // by the last element of the `tree` array.\n\n /* istanbul ignore if */\n\n\n if (last) {\n return {\n overflow: true\n };\n }\n\n return {\n match: true,\n matchedChars: characters.slice(0, characters.length - restCharacters.length)\n };\n }\n\n switch (tree.op) {\n case '|':\n var partialMatch;\n\n for (var _iterator = _createForOfIteratorHelperLoose(tree.args), _step; !(_step = _iterator()).done;) {\n var branch = _step.value;\n\n var _result = _match(characters, branch, last);\n\n if (_result) {\n if (_result.overflow) {\n return _result;\n } else if (_result.match) {\n return {\n match: true,\n matchedChars: _result.matchedChars\n };\n } else {\n /* istanbul ignore else */\n if (_result.partialMatch) {\n partialMatch = true;\n } else {\n throw new Error(\"Unsupported match result:\\n\".concat(JSON.stringify(_result, null, 2)));\n }\n }\n }\n }\n\n if (partialMatch) {\n return {\n partialMatch: true // matchedChars: ...\n\n };\n } // Not even a partial match.\n\n\n return;\n\n case '[]':\n for (var _iterator2 = _createForOfIteratorHelperLoose(tree.args), _step2; !(_step2 = _iterator2()).done;) {\n var _char = _step2.value;\n\n if (characters[0] === _char) {\n if (characters.length === 1) {\n return {\n match: true,\n matchedChars: characters\n };\n }\n\n if (last) {\n return {\n overflow: true\n };\n }\n\n return {\n match: true,\n matchedChars: [_char]\n };\n }\n } // No character matches.\n\n\n return;\n\n /* istanbul ignore next */\n\n default:\n throw new Error(\"Unsupported instruction tree: \".concat(tree));\n }\n}\n//# sourceMappingURL=AsYouTypeFormatter.PatternMatcher.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport { DIGIT_PLACEHOLDER, countOccurences, repeat, cutAndStripNonPairedParens, closeNonPairedParens, stripNonPairedParens, populateTemplateWithDigits } from './AsYouTypeFormatter.util.js';\nimport formatCompleteNumber, { canFormatCompleteNumber } from './AsYouTypeFormatter.complete.js';\nimport PatternMatcher from './AsYouTypeFormatter.PatternMatcher.js';\nimport parseDigits from './helpers/parseDigits.js';\nexport { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.util.js';\nimport { FIRST_GROUP_PATTERN } from './helpers/formatNationalNumberUsingFormat.js';\nimport { VALID_PUNCTUATION } from './constants.js';\nimport applyInternationalSeparatorStyle from './helpers/applyInternationalSeparatorStyle.js'; // Used in phone number format template creation.\n// Could be any digit, I guess.\n\nvar DUMMY_DIGIT = '9'; // I don't know why is it exactly `15`\n\nvar LONGEST_NATIONAL_PHONE_NUMBER_LENGTH = 15; // Create a phone number consisting only of the digit 9 that matches the\n// `number_pattern` by applying the pattern to the \"longest phone number\" string.\n\nvar LONGEST_DUMMY_PHONE_NUMBER = repeat(DUMMY_DIGIT, LONGEST_NATIONAL_PHONE_NUMBER_LENGTH); // A set of characters that, if found in a national prefix formatting rules, are an indicator to\n// us that we should separate the national prefix from the number when formatting.\n\nvar NATIONAL_PREFIX_SEPARATORS_PATTERN = /[- ]/; // Deprecated: Google has removed some formatting pattern related code from their repo.\n// https://github.com/googlei18n/libphonenumber/commit/a395b4fef3caf57c4bc5f082e1152a4d2bd0ba4c\n// \"We no longer have numbers in formatting matching patterns, only \\d.\"\n// Because this library supports generating custom metadata\n// some users may still be using old metadata so the relevant\n// code seems to stay until some next major version update.\n\nvar SUPPORT_LEGACY_FORMATTING_PATTERNS = true; // A pattern that is used to match character classes in regular expressions.\n// An example of a character class is \"[1-4]\".\n\nvar CREATE_CHARACTER_CLASS_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && function () {\n return /\\[([^\\[\\]])*\\]/g;\n}; // Any digit in a regular expression that actually denotes a digit. For\n// example, in the regular expression \"80[0-2]\\d{6,10}\", the first 2 digits\n// (8 and 0) are standalone digits, but the rest are not.\n// Two look-aheads are needed because the number following \\\\d could be a\n// two-digit number, since the phone number can be as long as 15 digits.\n\n\nvar CREATE_STANDALONE_DIGIT_PATTERN = SUPPORT_LEGACY_FORMATTING_PATTERNS && function () {\n return /\\d(?=[^,}][^,}])/g;\n}; // A regular expression that is used to determine if a `format` is\n// suitable to be used in the \"as you type formatter\".\n// A `format` is suitable when the resulting formatted number has\n// the same digits as the user has entered.\n//\n// In the simplest case, that would mean that the format\n// doesn't add any additional digits when formatting a number.\n// Google says that it also shouldn't add \"star\" (`*`) characters,\n// like it does in some Israeli formats.\n// Such basic format would only contain \"valid punctuation\"\n// and \"captured group\" identifiers ($1, $2, etc).\n//\n// An example of a format that adds additional digits:\n//\n// Country: `AR` (Argentina).\n// Format:\n// {\n// \"pattern\": \"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\n// \"leading_digits_patterns\": [\"91\"],\n// \"national_prefix_formatting_rule\": \"0$1\",\n// \"format\": \"$2 15-$3-$4\",\n// \"international_format\": \"$1 $2 $3-$4\"\n// }\n//\n// In the format above, the `format` adds `15` to the digits when formatting a number.\n// A sidenote: this format actually is suitable because `national_prefix_for_parsing`\n// has previously removed `15` from a national number, so re-adding `15` in `format`\n// doesn't actually result in any extra digits added to user's input.\n// But verifying that would be a complex procedure, so the code chooses a simpler path:\n// it simply filters out all `format`s that contain anything but \"captured group\" ids.\n//\n// This regular expression is called `ELIGIBLE_FORMAT_PATTERN` in Google's\n// `libphonenumber` code.\n//\n\n\nvar NON_ALTERING_FORMAT_REG_EXP = new RegExp('[' + VALID_PUNCTUATION + ']*' + // Google developers say:\n// \"We require that the first matching group is present in the\n// output pattern to ensure no data is lost while formatting.\"\n'\\\\$1' + '[' + VALID_PUNCTUATION + ']*' + '(\\\\$\\\\d[' + VALID_PUNCTUATION + ']*)*' + '$'); // This is the minimum length of the leading digits of a phone number\n// to guarantee the first \"leading digits pattern\" for a phone number format\n// to be preemptive.\n\nvar MIN_LEADING_DIGITS_LENGTH = 3;\n\nvar AsYouTypeFormatter = /*#__PURE__*/function () {\n function AsYouTypeFormatter(_ref) {\n var state = _ref.state,\n metadata = _ref.metadata;\n\n _classCallCheck(this, AsYouTypeFormatter);\n\n this.metadata = metadata;\n this.resetFormat();\n }\n\n _createClass(AsYouTypeFormatter, [{\n key: \"resetFormat\",\n value: function resetFormat() {\n this.chosenFormat = undefined;\n this.template = undefined;\n this.nationalNumberTemplate = undefined;\n this.populatedNationalNumberTemplate = undefined;\n this.populatedNationalNumberTemplatePosition = -1;\n }\n }, {\n key: \"reset\",\n value: function reset(numberingPlan, state) {\n this.resetFormat();\n\n if (numberingPlan) {\n this.isNANP = numberingPlan.callingCode() === '1';\n this.matchingFormats = numberingPlan.formats();\n\n if (state.nationalSignificantNumber) {\n this.narrowDownMatchingFormats(state);\n }\n } else {\n this.isNANP = undefined;\n this.matchingFormats = [];\n }\n }\n /**\r\n * Formats an updated phone number.\r\n * @param {string} nextDigits — Additional phone number digits.\r\n * @param {object} state — `AsYouType` state.\r\n * @return {[string]} Returns undefined if the updated phone number can't be formatted using any of the available formats.\r\n */\n\n }, {\n key: \"format\",\n value: function format(nextDigits, state) {\n var _this = this;\n\n // See if the phone number digits can be formatted as a complete phone number.\n // If not, use the results from `formatNationalNumberWithNextDigits()`,\n // which formats based on the chosen formatting pattern.\n //\n // Attempting to format complete phone number first is how it's done\n // in Google's `libphonenumber`, so this library just follows it.\n // Google's `libphonenumber` code doesn't explain in detail why does it\n // attempt to format digits as a complete phone number\n // instead of just going with a previoulsy (or newly) chosen `format`:\n //\n // \"Checks to see if there is an exact pattern match for these digits.\n // If so, we should use this instead of any other formatting template\n // whose leadingDigitsPattern also matches the input.\"\n //\n if (canFormatCompleteNumber(state.nationalSignificantNumber, this.metadata)) {\n for (var _iterator = _createForOfIteratorHelperLoose(this.matchingFormats), _step; !(_step = _iterator()).done;) {\n var format = _step.value;\n var formattedCompleteNumber = formatCompleteNumber(state, format, {\n metadata: this.metadata,\n shouldTryNationalPrefixFormattingRule: function shouldTryNationalPrefixFormattingRule(format) {\n return _this.shouldTryNationalPrefixFormattingRule(format, {\n international: state.international,\n nationalPrefix: state.nationalPrefix\n });\n },\n getSeparatorAfterNationalPrefix: function getSeparatorAfterNationalPrefix(format) {\n return _this.getSeparatorAfterNationalPrefix(format);\n }\n });\n\n if (formattedCompleteNumber) {\n this.resetFormat();\n this.chosenFormat = format;\n this.setNationalNumberTemplate(formattedCompleteNumber.replace(/\\d/g, DIGIT_PLACEHOLDER), state);\n this.populatedNationalNumberTemplate = formattedCompleteNumber; // With a new formatting template, the matched position\n // using the old template needs to be reset.\n\n this.populatedNationalNumberTemplatePosition = this.template.lastIndexOf(DIGIT_PLACEHOLDER);\n return formattedCompleteNumber;\n }\n }\n } // Format the digits as a partial (incomplete) phone number\n // using the previously chosen formatting pattern (or a newly chosen one).\n\n\n return this.formatNationalNumberWithNextDigits(nextDigits, state);\n } // Formats the next phone number digits.\n\n }, {\n key: \"formatNationalNumberWithNextDigits\",\n value: function formatNationalNumberWithNextDigits(nextDigits, state) {\n var previouslyChosenFormat = this.chosenFormat; // Choose a format from the list of matching ones.\n\n var newlyChosenFormat = this.chooseFormat(state);\n\n if (newlyChosenFormat) {\n if (newlyChosenFormat === previouslyChosenFormat) {\n // If it can format the next (current) digits\n // using the previously chosen phone number format\n // then return the updated formatted number.\n return this.formatNextNationalNumberDigits(nextDigits);\n } else {\n // If a more appropriate phone number format\n // has been chosen for these \"leading digits\",\n // then re-format the national phone number part\n // using the newly selected format.\n return this.formatNextNationalNumberDigits(state.getNationalDigits());\n }\n }\n }\n }, {\n key: \"narrowDownMatchingFormats\",\n value: function narrowDownMatchingFormats(_ref2) {\n var _this2 = this;\n\n var nationalSignificantNumber = _ref2.nationalSignificantNumber,\n nationalPrefix = _ref2.nationalPrefix,\n international = _ref2.international;\n var leadingDigits = nationalSignificantNumber; // \"leading digits\" pattern list starts with a\n // \"leading digits\" pattern fitting a maximum of 3 leading digits.\n // So, after a user inputs 3 digits of a national (significant) phone number\n // this national (significant) number can already be formatted.\n // The next \"leading digits\" pattern is for 4 leading digits max,\n // and the \"leading digits\" pattern after it is for 5 leading digits max, etc.\n // This implementation is different from Google's\n // in that it searches for a fitting format\n // even if the user has entered less than\n // `MIN_LEADING_DIGITS_LENGTH` digits of a national number.\n // Because some leading digit patterns already match for a single first digit.\n\n var leadingDigitsPatternIndex = leadingDigits.length - MIN_LEADING_DIGITS_LENGTH;\n\n if (leadingDigitsPatternIndex < 0) {\n leadingDigitsPatternIndex = 0;\n }\n\n this.matchingFormats = this.matchingFormats.filter(function (format) {\n return _this2.formatSuits(format, international, nationalPrefix) && _this2.formatMatches(format, leadingDigits, leadingDigitsPatternIndex);\n }); // If there was a phone number format chosen\n // and it no longer holds given the new leading digits then reset it.\n // The test for this `if` condition is marked as:\n // \"Reset a chosen format when it no longer holds given the new leading digits\".\n // To construct a valid test case for this one can find a country\n // in `PhoneNumberMetadata.xml` yielding one format for 3 `<leadingDigits>`\n // and yielding another format for 4 `<leadingDigits>` (Australia in this case).\n\n if (this.chosenFormat && this.matchingFormats.indexOf(this.chosenFormat) === -1) {\n this.resetFormat();\n }\n }\n }, {\n key: \"formatSuits\",\n value: function formatSuits(format, international, nationalPrefix) {\n // When a prefix before a national (significant) number is\n // simply a national prefix, then it's parsed as `this.nationalPrefix`.\n // In more complex cases, a prefix before national (significant) number\n // could include a national prefix as well as some \"capturing groups\",\n // and in that case there's no info whether a national prefix has been parsed.\n // If national prefix is not used when formatting a phone number\n // using this format, but a national prefix has been entered by the user,\n // and was extracted, then discard such phone number format.\n // In Google's \"AsYouType\" formatter code, the equivalent would be this part:\n // https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L175-L184\n if (nationalPrefix && !format.usesNationalPrefix() && // !format.domesticCarrierCodeFormattingRule() &&\n !format.nationalPrefixIsOptionalWhenFormattingInNationalFormat()) {\n return false;\n } // If national prefix is mandatory for this phone number format\n // and there're no guarantees that a national prefix is present in user input\n // then discard this phone number format as not suitable.\n // In Google's \"AsYouType\" formatter code, the equivalent would be this part:\n // https://github.com/google/libphonenumber/blob/0a45cfd96e71cad8edb0e162a70fcc8bd9728933/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L185-L193\n\n\n if (!international && !nationalPrefix && format.nationalPrefixIsMandatoryWhenFormattingInNationalFormat()) {\n return false;\n }\n\n return true;\n }\n }, {\n key: \"formatMatches\",\n value: function formatMatches(format, leadingDigits, leadingDigitsPatternIndex) {\n var leadingDigitsPatternsCount = format.leadingDigitsPatterns().length; // If this format is not restricted to a certain\n // leading digits pattern then it fits.\n // The test case could be found by searching for \"leadingDigitsPatternsCount === 0\".\n\n if (leadingDigitsPatternsCount === 0) {\n return true;\n } // Start narrowing down the list of possible formats based on the leading digits.\n // (only previously matched formats take part in the narrowing down process)\n // `leading_digits_patterns` start with 3 digits min\n // and then go up from there one digit at a time.\n\n\n leadingDigitsPatternIndex = Math.min(leadingDigitsPatternIndex, leadingDigitsPatternsCount - 1);\n var leadingDigitsPattern = format.leadingDigitsPatterns()[leadingDigitsPatternIndex]; // Google imposes a requirement on the leading digits\n // to be minimum 3 digits long in order to be eligible\n // for checking those with a leading digits pattern.\n //\n // Since `leading_digits_patterns` start with 3 digits min,\n // Google's original `libphonenumber` library only starts\n // excluding any non-matching formats only when the\n // national number entered so far is at least 3 digits long,\n // otherwise format matching would give false negatives.\n //\n // For example, when the digits entered so far are `2`\n // and the leading digits pattern is `21` –\n // it's quite obvious in this case that the format could be the one\n // but due to the absence of further digits it would give false negative.\n //\n // Also, `leading_digits_patterns` doesn't always correspond to a single\n // digits count. For example, `60|8` pattern would already match `8`\n // but the `60` part would require having at least two leading digits,\n // so the whole pattern would require inputting two digits first in order to\n // decide on whether it matches the input, even when the input is \"80\".\n //\n // This library — `libphonenumber-js` — allows filtering by `leading_digits_patterns`\n // even when there's only 1 or 2 digits of the national (significant) number.\n // To do that, it uses a non-strict pattern matcher written specifically for that.\n //\n\n if (leadingDigits.length < MIN_LEADING_DIGITS_LENGTH) {\n // Before leading digits < 3 matching was implemented:\n // return true\n //\n // After leading digits < 3 matching was implemented:\n try {\n return new PatternMatcher(leadingDigitsPattern).match(leadingDigits, {\n allowOverflow: true\n }) !== undefined;\n } catch (error)\n /* istanbul ignore next */\n {\n // There's a slight possibility that there could be some undiscovered bug\n // in the pattern matcher code. Since the \"leading digits < 3 matching\"\n // feature is not \"essential\" for operation, it can fall back to the old way\n // in case of any issues rather than halting the application's execution.\n console.error(error);\n return true;\n }\n } // If at least `MIN_LEADING_DIGITS_LENGTH` digits of a national number are\n // available then use the usual regular expression matching.\n //\n // The whole pattern is wrapped in round brackets (`()`) because\n // the pattern can use \"or\" operator (`|`) at the top level of the pattern.\n //\n\n\n return new RegExp(\"^(\".concat(leadingDigitsPattern, \")\")).test(leadingDigits);\n }\n }, {\n key: \"getFormatFormat\",\n value: function getFormatFormat(format, international) {\n return international ? format.internationalFormat() : format.format();\n }\n }, {\n key: \"chooseFormat\",\n value: function chooseFormat(state) {\n var _this3 = this;\n\n var _loop = function _loop() {\n var format = _step2.value;\n\n // If this format is currently being used\n // and is still suitable, then stick to it.\n if (_this3.chosenFormat === format) {\n return \"break\";\n } // Sometimes, a formatting rule inserts additional digits in a phone number,\n // and \"as you type\" formatter can't do that: it should only use the digits\n // that the user has input.\n //\n // For example, in Argentina, there's a format for mobile phone numbers:\n //\n // {\n // \"pattern\": \"(\\\\d)(\\\\d{2})(\\\\d{4})(\\\\d{4})\",\n // \"leading_digits_patterns\": [\"91\"],\n // \"national_prefix_formatting_rule\": \"0$1\",\n // \"format\": \"$2 15-$3-$4\",\n // \"international_format\": \"$1 $2 $3-$4\"\n // }\n //\n // In that format, `international_format` is used instead of `format`\n // because `format` inserts `15` in the formatted number,\n // and `AsYouType` formatter should only use the digits\n // the user has actually input, without adding any extra digits.\n // In this case, it wouldn't make a difference, because the `15`\n // is first stripped when applying `national_prefix_for_parsing`\n // and then re-added when using `format`, so in reality it doesn't\n // add any new digits to the number, but to detect that, the code\n // would have to be more complex: it would have to try formatting\n // the digits using the format and then see if any digits have\n // actually been added or removed, and then, every time a new digit\n // is input, it should re-check whether the chosen format doesn't\n // alter the digits.\n //\n // Google's code doesn't go that far, and so does this library:\n // it simply requires that a `format` doesn't add any additonal\n // digits to user's input.\n //\n // Also, people in general should move from inputting phone numbers\n // in national format (possibly with national prefixes)\n // and use international phone number format instead:\n // it's a logical thing in the modern age of mobile phones,\n // globalization and the internet.\n //\n\n /* istanbul ignore if */\n\n\n if (!NON_ALTERING_FORMAT_REG_EXP.test(_this3.getFormatFormat(format, state.international))) {\n return \"continue\";\n }\n\n if (!_this3.createTemplateForFormat(format, state)) {\n // Remove the format if it can't generate a template.\n _this3.matchingFormats = _this3.matchingFormats.filter(function (_) {\n return _ !== format;\n });\n return \"continue\";\n }\n\n _this3.chosenFormat = format;\n return \"break\";\n };\n\n // When there are multiple available formats, the formatter uses the first\n // format where a formatting template could be created.\n //\n // For some weird reason, `istanbul` says \"else path not taken\"\n // for the `for of` line below. Supposedly that means that\n // the loop doesn't ever go over the last element in the list.\n // That's true because there always is `this.chosenFormat`\n // when `this.matchingFormats` is non-empty.\n // And, for some weird reason, it doesn't think that the case\n // with empty `this.matchingFormats` qualifies for a valid \"else\" path.\n // So simply muting this `istanbul` warning.\n // It doesn't skip the contents of the `for of` loop,\n // it just skips the `for of` line.\n //\n\n /* istanbul ignore next */\n for (var _iterator2 = _createForOfIteratorHelperLoose(this.matchingFormats.slice()), _step2; !(_step2 = _iterator2()).done;) {\n var _ret = _loop();\n\n if (_ret === \"break\") break;\n if (_ret === \"continue\") continue;\n }\n\n if (!this.chosenFormat) {\n // No format matches the national (significant) phone number.\n this.resetFormat();\n }\n\n return this.chosenFormat;\n }\n }, {\n key: \"createTemplateForFormat\",\n value: function createTemplateForFormat(format, state) {\n // The formatter doesn't format numbers when numberPattern contains '|', e.g.\n // (20|3)\\d{4}. In those cases we quickly return.\n // (Though there's no such format in current metadata)\n\n /* istanbul ignore if */\n if (SUPPORT_LEGACY_FORMATTING_PATTERNS && format.pattern().indexOf('|') >= 0) {\n return;\n } // Get formatting template for this phone number format\n\n\n var template = this.getTemplateForFormat(format, state); // If the national number entered is too long\n // for any phone number format, then abort.\n\n if (template) {\n this.setNationalNumberTemplate(template, state);\n return true;\n }\n }\n }, {\n key: \"getSeparatorAfterNationalPrefix\",\n value: function getSeparatorAfterNationalPrefix(format) {\n // `US` metadata doesn't have a `national_prefix_formatting_rule`,\n // so the `if` condition below doesn't apply to `US`,\n // but in reality there shoudl be a separator\n // between a national prefix and a national (significant) number.\n // So `US` national prefix separator is a \"special\" \"hardcoded\" case.\n if (this.isNANP) {\n return ' ';\n } // If a `format` has a `national_prefix_formatting_rule`\n // and that rule has a separator after a national prefix,\n // then it means that there should be a separator\n // between a national prefix and a national (significant) number.\n\n\n if (format && format.nationalPrefixFormattingRule() && NATIONAL_PREFIX_SEPARATORS_PATTERN.test(format.nationalPrefixFormattingRule())) {\n return ' ';\n } // At this point, there seems to be no clear evidence that\n // there should be a separator between a national prefix\n // and a national (significant) number. So don't insert one.\n\n\n return '';\n }\n }, {\n key: \"getInternationalPrefixBeforeCountryCallingCode\",\n value: function getInternationalPrefixBeforeCountryCallingCode(_ref3, options) {\n var IDDPrefix = _ref3.IDDPrefix,\n missingPlus = _ref3.missingPlus;\n\n if (IDDPrefix) {\n return options && options.spacing === false ? IDDPrefix : IDDPrefix + ' ';\n }\n\n if (missingPlus) {\n return '';\n }\n\n return '+';\n }\n }, {\n key: \"getTemplate\",\n value: function getTemplate(state) {\n if (!this.template) {\n return;\n } // `this.template` holds the template for a \"complete\" phone number.\n // The currently entered phone number is most likely not \"complete\",\n // so trim all non-populated digits.\n\n\n var index = -1;\n var i = 0;\n var internationalPrefix = state.international ? this.getInternationalPrefixBeforeCountryCallingCode(state, {\n spacing: false\n }) : '';\n\n while (i < internationalPrefix.length + state.getDigitsWithoutInternationalPrefix().length) {\n index = this.template.indexOf(DIGIT_PLACEHOLDER, index + 1);\n i++;\n }\n\n return cutAndStripNonPairedParens(this.template, index + 1);\n }\n }, {\n key: \"setNationalNumberTemplate\",\n value: function setNationalNumberTemplate(template, state) {\n this.nationalNumberTemplate = template;\n this.populatedNationalNumberTemplate = template; // With a new formatting template, the matched position\n // using the old template needs to be reset.\n\n this.populatedNationalNumberTemplatePosition = -1; // For convenience, the public `.template` property\n // contains the whole international number\n // if the phone number being input is international:\n // 'x' for the '+' sign, 'x'es for the country phone code,\n // a spacebar and then the template for the formatted national number.\n\n if (state.international) {\n this.template = this.getInternationalPrefixBeforeCountryCallingCode(state).replace(/[\\d\\+]/g, DIGIT_PLACEHOLDER) + repeat(DIGIT_PLACEHOLDER, state.callingCode.length) + ' ' + template;\n } else {\n this.template = template;\n }\n }\n /**\r\n * Generates formatting template for a national phone number,\r\n * optionally containing a national prefix, for a format.\r\n * @param {Format} format\r\n * @param {string} nationalPrefix\r\n * @return {string}\r\n */\n\n }, {\n key: \"getTemplateForFormat\",\n value: function getTemplateForFormat(format, _ref4) {\n var nationalSignificantNumber = _ref4.nationalSignificantNumber,\n international = _ref4.international,\n nationalPrefix = _ref4.nationalPrefix,\n complexPrefixBeforeNationalSignificantNumber = _ref4.complexPrefixBeforeNationalSignificantNumber;\n var pattern = format.pattern();\n /* istanbul ignore else */\n\n if (SUPPORT_LEGACY_FORMATTING_PATTERNS) {\n pattern = pattern // Replace anything in the form of [..] with \\d\n .replace(CREATE_CHARACTER_CLASS_PATTERN(), '\\\\d') // Replace any standalone digit (not the one in `{}`) with \\d\n .replace(CREATE_STANDALONE_DIGIT_PATTERN(), '\\\\d');\n } // Generate a dummy national number (consisting of `9`s)\n // that fits this format's `pattern`.\n //\n // This match will always succeed,\n // because the \"longest dummy phone number\"\n // has enough length to accomodate any possible\n // national phone number format pattern.\n //\n\n\n var digits = LONGEST_DUMMY_PHONE_NUMBER.match(pattern)[0]; // If the national number entered is too long\n // for any phone number format, then abort.\n\n if (nationalSignificantNumber.length > digits.length) {\n return;\n } // Get a formatting template which can be used to efficiently format\n // a partial number where digits are added one by one.\n // Below `strictPattern` is used for the\n // regular expression (with `^` and `$`).\n // This wasn't originally in Google's `libphonenumber`\n // and I guess they don't really need it\n // because they're not using \"templates\" to format phone numbers\n // but I added `strictPattern` after encountering\n // South Korean phone number formatting bug.\n //\n // Non-strict regular expression bug demonstration:\n //\n // this.nationalSignificantNumber : `111111111` (9 digits)\n //\n // pattern : (\\d{2})(\\d{3,4})(\\d{4})\n // format : `$1 $2 $3`\n // digits : `9999999999` (10 digits)\n //\n // '9999999999'.replace(new RegExp(/(\\d{2})(\\d{3,4})(\\d{4})/g), '$1 $2 $3') = \"99 9999 9999\"\n //\n // template : xx xxxx xxxx\n //\n // But the correct template in this case is `xx xxx xxxx`.\n // The template was generated incorrectly because of the\n // `{3,4}` variability in the `pattern`.\n //\n // The fix is, if `this.nationalSignificantNumber` has already sufficient length\n // to satisfy the `pattern` completely then `this.nationalSignificantNumber`\n // is used instead of `digits`.\n\n\n var strictPattern = new RegExp('^' + pattern + '$');\n var nationalNumberDummyDigits = nationalSignificantNumber.replace(/\\d/g, DUMMY_DIGIT); // If `this.nationalSignificantNumber` has already sufficient length\n // to satisfy the `pattern` completely then use it\n // instead of `digits`.\n\n if (strictPattern.test(nationalNumberDummyDigits)) {\n digits = nationalNumberDummyDigits;\n }\n\n var numberFormat = this.getFormatFormat(format, international);\n var nationalPrefixIncludedInTemplate; // If a user did input a national prefix (and that's guaranteed),\n // and if a `format` does have a national prefix formatting rule,\n // then see if that national prefix formatting rule\n // prepends exactly the same national prefix the user has input.\n // If that's the case, then use the `format` with the national prefix formatting rule.\n // Otherwise, use the `format` without the national prefix formatting rule,\n // and prepend a national prefix manually to it.\n\n if (this.shouldTryNationalPrefixFormattingRule(format, {\n international: international,\n nationalPrefix: nationalPrefix\n })) {\n var numberFormatWithNationalPrefix = numberFormat.replace(FIRST_GROUP_PATTERN, format.nationalPrefixFormattingRule()); // If `national_prefix_formatting_rule` of a `format` simply prepends\n // national prefix at the start of a national (significant) number,\n // then such formatting can be used with `AsYouType` formatter.\n // There seems to be no `else` case: everywhere in metadata,\n // national prefix formatting rule is national prefix + $1,\n // or `($1)`, in which case such format isn't even considered\n // when the user has input a national prefix.\n\n /* istanbul ignore else */\n\n if (parseDigits(format.nationalPrefixFormattingRule()) === (nationalPrefix || '') + parseDigits('$1')) {\n numberFormat = numberFormatWithNationalPrefix;\n nationalPrefixIncludedInTemplate = true; // Replace all digits of the national prefix in the formatting template\n // with `DIGIT_PLACEHOLDER`s.\n\n if (nationalPrefix) {\n var i = nationalPrefix.length;\n\n while (i > 0) {\n numberFormat = numberFormat.replace(/\\d/, DIGIT_PLACEHOLDER);\n i--;\n }\n }\n }\n } // Generate formatting template for this phone number format.\n\n\n var template = digits // Format the dummy phone number according to the format.\n .replace(new RegExp(pattern), numberFormat) // Replace each dummy digit with a DIGIT_PLACEHOLDER.\n .replace(new RegExp(DUMMY_DIGIT, 'g'), DIGIT_PLACEHOLDER); // If a prefix of a national (significant) number is not as simple\n // as just a basic national prefix, then just prepend such prefix\n // before the national (significant) number, optionally spacing\n // the two with a whitespace.\n\n if (!nationalPrefixIncludedInTemplate) {\n if (complexPrefixBeforeNationalSignificantNumber) {\n // Prepend the prefix to the template manually.\n template = repeat(DIGIT_PLACEHOLDER, complexPrefixBeforeNationalSignificantNumber.length) + ' ' + template;\n } else if (nationalPrefix) {\n // Prepend national prefix to the template manually.\n template = repeat(DIGIT_PLACEHOLDER, nationalPrefix.length) + this.getSeparatorAfterNationalPrefix(format) + template;\n }\n }\n\n if (international) {\n template = applyInternationalSeparatorStyle(template);\n }\n\n return template;\n }\n }, {\n key: \"formatNextNationalNumberDigits\",\n value: function formatNextNationalNumberDigits(digits) {\n var result = populateTemplateWithDigits(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition, digits);\n\n if (!result) {\n // Reset the format.\n this.resetFormat();\n return;\n }\n\n this.populatedNationalNumberTemplate = result[0];\n this.populatedNationalNumberTemplatePosition = result[1]; // Return the formatted phone number so far.\n\n return cutAndStripNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1); // The old way which was good for `input-format` but is not so good\n // for `react-phone-number-input`'s default input (`InputBasic`).\n // return closeNonPairedParens(this.populatedNationalNumberTemplate, this.populatedNationalNumberTemplatePosition + 1)\n // \t.replace(new RegExp(DIGIT_PLACEHOLDER, 'g'), ' ')\n }\n }, {\n key: \"shouldTryNationalPrefixFormattingRule\",\n value: function shouldTryNationalPrefixFormattingRule(format, _ref5) {\n var international = _ref5.international,\n nationalPrefix = _ref5.nationalPrefix;\n\n if (format.nationalPrefixFormattingRule()) {\n // In some countries, `national_prefix_formatting_rule` is `($1)`,\n // so it applies even if the user hasn't input a national prefix.\n // `format.usesNationalPrefix()` detects such cases.\n var usesNationalPrefix = format.usesNationalPrefix();\n\n if (usesNationalPrefix && nationalPrefix || !usesNationalPrefix && !international) {\n return true;\n }\n }\n }\n }]);\n\n return AsYouTypeFormatter;\n}();\n\nexport { AsYouTypeFormatter as default };\n//# sourceMappingURL=AsYouTypeFormatter.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport _extractCountryCallingCode from './helpers/extractCountryCallingCode.js';\nimport extractCountryCallingCodeFromInternationalNumberWithoutPlusSign from './helpers/extractCountryCallingCodeFromInternationalNumberWithoutPlusSign.js';\nimport extractNationalNumberFromPossiblyIncompleteNumber from './helpers/extractNationalNumberFromPossiblyIncompleteNumber.js';\nimport stripIddPrefix from './helpers/stripIddPrefix.js';\nimport parseDigits from './helpers/parseDigits.js';\nimport { VALID_DIGITS, VALID_PUNCTUATION, PLUS_CHARS } from './constants.js';\nvar VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART = '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+';\nvar VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN = new RegExp('^' + VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART + '$', 'i');\nvar VALID_FORMATTED_PHONE_NUMBER_PART = '(?:' + '[' + PLUS_CHARS + ']' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']*' + '|' + '[' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + ')';\nvar AFTER_PHONE_NUMBER_DIGITS_END_PATTERN = new RegExp('[^' + VALID_PUNCTUATION + VALID_DIGITS + ']+' + '.*' + '$'); // Tests whether `national_prefix_for_parsing` could match\n// different national prefixes.\n// Matches anything that's not a digit or a square bracket.\n\nvar COMPLEX_NATIONAL_PREFIX = /[^\\d\\[\\]]/;\n\nvar AsYouTypeParser = /*#__PURE__*/function () {\n function AsYouTypeParser(_ref) {\n var defaultCountry = _ref.defaultCountry,\n defaultCallingCode = _ref.defaultCallingCode,\n metadata = _ref.metadata,\n onNationalSignificantNumberChange = _ref.onNationalSignificantNumberChange;\n\n _classCallCheck(this, AsYouTypeParser);\n\n this.defaultCountry = defaultCountry;\n this.defaultCallingCode = defaultCallingCode;\n this.metadata = metadata;\n this.onNationalSignificantNumberChange = onNationalSignificantNumberChange;\n }\n\n _createClass(AsYouTypeParser, [{\n key: \"input\",\n value: function input(text, state) {\n var _extractFormattedDigi = extractFormattedDigitsAndPlus(text),\n _extractFormattedDigi2 = _slicedToArray(_extractFormattedDigi, 2),\n formattedDigits = _extractFormattedDigi2[0],\n hasPlus = _extractFormattedDigi2[1];\n\n var digits = parseDigits(formattedDigits); // Checks for a special case: just a leading `+` has been entered.\n\n var justLeadingPlus;\n\n if (hasPlus) {\n if (!state.digits) {\n state.startInternationalNumber();\n\n if (!digits) {\n justLeadingPlus = true;\n }\n }\n }\n\n if (digits) {\n this.inputDigits(digits, state);\n }\n\n return {\n digits: digits,\n justLeadingPlus: justLeadingPlus\n };\n }\n /**\r\n * Inputs \"next\" phone number digits.\r\n * @param {string} digits\r\n * @return {string} [formattedNumber] Formatted national phone number (if it can be formatted at this stage). Returning `undefined` means \"don't format the national phone number at this stage\".\r\n */\n\n }, {\n key: \"inputDigits\",\n value: function inputDigits(nextDigits, state) {\n var digits = state.digits;\n var hasReceivedThreeLeadingDigits = digits.length < 3 && digits.length + nextDigits.length >= 3; // Append phone number digits.\n\n state.appendDigits(nextDigits); // Attempt to extract IDD prefix:\n // Some users input their phone number in international format,\n // but in an \"out-of-country\" dialing format instead of using the leading `+`.\n // https://github.com/catamphetamine/libphonenumber-js/issues/185\n // Detect such numbers as soon as there're at least 3 digits.\n // Google's library attempts to extract IDD prefix at 3 digits,\n // so this library just copies that behavior.\n // I guess that's because the most commot IDD prefixes are\n // `00` (Europe) and `011` (US).\n // There exist really long IDD prefixes too:\n // for example, in Australia the default IDD prefix is `0011`,\n // and it could even be as long as `14880011`.\n // An IDD prefix is extracted here, and then every time when\n // there's a new digit and the number couldn't be formatted.\n\n if (hasReceivedThreeLeadingDigits) {\n this.extractIddPrefix(state);\n }\n\n if (this.isWaitingForCountryCallingCode(state)) {\n if (!this.extractCountryCallingCode(state)) {\n return;\n }\n } else {\n state.appendNationalSignificantNumberDigits(nextDigits);\n } // If a phone number is being input in international format,\n // then it's not valid for it to have a national prefix.\n // Still, some people incorrectly input such numbers with a national prefix.\n // In such cases, only attempt to strip a national prefix if the number becomes too long.\n // (but that is done later, not here)\n\n\n if (!state.international) {\n if (!this.hasExtractedNationalSignificantNumber) {\n this.extractNationalSignificantNumber(state.getNationalDigits(), function (stateUpdate) {\n return state.update(stateUpdate);\n });\n }\n }\n }\n }, {\n key: \"isWaitingForCountryCallingCode\",\n value: function isWaitingForCountryCallingCode(_ref2) {\n var international = _ref2.international,\n callingCode = _ref2.callingCode;\n return international && !callingCode;\n } // Extracts a country calling code from a number\n // being entered in internatonal format.\n\n }, {\n key: \"extractCountryCallingCode\",\n value: function extractCountryCallingCode(state) {\n var _extractCountryCallin = _extractCountryCallingCode('+' + state.getDigitsWithoutInternationalPrefix(), this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),\n countryCallingCode = _extractCountryCallin.countryCallingCode,\n number = _extractCountryCallin.number;\n\n if (countryCallingCode) {\n state.setCallingCode(countryCallingCode);\n state.update({\n nationalSignificantNumber: number\n });\n return true;\n }\n }\n }, {\n key: \"reset\",\n value: function reset(numberingPlan) {\n if (numberingPlan) {\n this.hasSelectedNumberingPlan = true;\n\n var nationalPrefixForParsing = numberingPlan._nationalPrefixForParsing();\n\n this.couldPossiblyExtractAnotherNationalSignificantNumber = nationalPrefixForParsing && COMPLEX_NATIONAL_PREFIX.test(nationalPrefixForParsing);\n } else {\n this.hasSelectedNumberingPlan = undefined;\n this.couldPossiblyExtractAnotherNationalSignificantNumber = undefined;\n }\n }\n /**\r\n * Extracts a national (significant) number from user input.\r\n * Google's library is different in that it only applies `national_prefix_for_parsing`\r\n * and doesn't apply `national_prefix_transform_rule` after that.\r\n * https://github.com/google/libphonenumber/blob/a3d70b0487875475e6ad659af404943211d26456/java/libphonenumber/src/com/google/i18n/phonenumbers/AsYouTypeFormatter.java#L539\r\n * @return {boolean} [extracted]\r\n */\n\n }, {\n key: \"extractNationalSignificantNumber\",\n value: function extractNationalSignificantNumber(nationalDigits, setState) {\n if (!this.hasSelectedNumberingPlan) {\n return;\n }\n\n var _extractNationalNumbe = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),\n nationalPrefix = _extractNationalNumbe.nationalPrefix,\n nationalNumber = _extractNationalNumbe.nationalNumber,\n carrierCode = _extractNationalNumbe.carrierCode;\n\n if (nationalNumber === nationalDigits) {\n return;\n }\n\n this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);\n return true;\n }\n /**\r\n * In Google's code this function is called \"attempt to extract longer NDD\".\r\n * \"Some national prefixes are a substring of others\", they say.\r\n * @return {boolean} [result] — Returns `true` if extracting a national prefix produced different results from what they were.\r\n */\n\n }, {\n key: \"extractAnotherNationalSignificantNumber\",\n value: function extractAnotherNationalSignificantNumber(nationalDigits, prevNationalSignificantNumber, setState) {\n if (!this.hasExtractedNationalSignificantNumber) {\n return this.extractNationalSignificantNumber(nationalDigits, setState);\n }\n\n if (!this.couldPossiblyExtractAnotherNationalSignificantNumber) {\n return;\n }\n\n var _extractNationalNumbe2 = extractNationalNumberFromPossiblyIncompleteNumber(nationalDigits, this.metadata),\n nationalPrefix = _extractNationalNumbe2.nationalPrefix,\n nationalNumber = _extractNationalNumbe2.nationalNumber,\n carrierCode = _extractNationalNumbe2.carrierCode; // If a national prefix has been extracted previously,\n // then it's always extracted as additional digits are added.\n // That's assuming `extractNationalNumberFromPossiblyIncompleteNumber()`\n // doesn't do anything different from what it currently does.\n // So, just in case, here's this check, though it doesn't occur.\n\n /* istanbul ignore if */\n\n\n if (nationalNumber === prevNationalSignificantNumber) {\n return;\n }\n\n this.onExtractedNationalNumber(nationalPrefix, carrierCode, nationalNumber, nationalDigits, setState);\n return true;\n }\n }, {\n key: \"onExtractedNationalNumber\",\n value: function onExtractedNationalNumber(nationalPrefix, carrierCode, nationalSignificantNumber, nationalDigits, setState) {\n var complexPrefixBeforeNationalSignificantNumber;\n var nationalSignificantNumberMatchesInput; // This check also works with empty `this.nationalSignificantNumber`.\n\n var nationalSignificantNumberIndex = nationalDigits.lastIndexOf(nationalSignificantNumber); // If the extracted national (significant) number is the\n // last substring of the `digits`, then it means that it hasn't been altered:\n // no digits have been removed from the national (significant) number\n // while applying `national_prefix_transform_rule`.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/blob/master/METADATA.md#national_prefix_for_parsing--national_prefix_transform_rule\n\n if (nationalSignificantNumberIndex >= 0 && nationalSignificantNumberIndex === nationalDigits.length - nationalSignificantNumber.length) {\n nationalSignificantNumberMatchesInput = true; // If a prefix of a national (significant) number is not as simple\n // as just a basic national prefix, then such prefix is stored in\n // `this.complexPrefixBeforeNationalSignificantNumber` property and will be\n // prepended \"as is\" to the national (significant) number to produce\n // a formatted result.\n\n var prefixBeforeNationalNumber = nationalDigits.slice(0, nationalSignificantNumberIndex); // `prefixBeforeNationalNumber` is always non-empty,\n // because `onExtractedNationalNumber()` isn't called\n // when a national (significant) number hasn't been actually \"extracted\":\n // when a national (significant) number is equal to the national part of `digits`,\n // then `onExtractedNationalNumber()` doesn't get called.\n\n if (prefixBeforeNationalNumber !== nationalPrefix) {\n complexPrefixBeforeNationalSignificantNumber = prefixBeforeNationalNumber;\n }\n }\n\n setState({\n nationalPrefix: nationalPrefix,\n carrierCode: carrierCode,\n nationalSignificantNumber: nationalSignificantNumber,\n nationalSignificantNumberMatchesInput: nationalSignificantNumberMatchesInput,\n complexPrefixBeforeNationalSignificantNumber: complexPrefixBeforeNationalSignificantNumber\n }); // `onExtractedNationalNumber()` is only called when\n // the national (significant) number actually did change.\n\n this.hasExtractedNationalSignificantNumber = true;\n this.onNationalSignificantNumberChange();\n }\n }, {\n key: \"reExtractNationalSignificantNumber\",\n value: function reExtractNationalSignificantNumber(state) {\n // Attempt to extract a national prefix.\n //\n // Some people incorrectly input national prefix\n // in an international phone number.\n // For example, some people write British phone numbers as `+44(0)...`.\n //\n // Also, in some rare cases, it is valid for a national prefix\n // to be a part of an international phone number.\n // For example, mobile phone numbers in Mexico are supposed to be\n // dialled internationally using a `1` national prefix,\n // so the national prefix will be part of an international number.\n //\n // Quote from:\n // https://www.mexperience.com/dialing-cell-phones-in-mexico/\n //\n // \"Dialing a Mexican cell phone from abroad\n // When you are calling a cell phone number in Mexico from outside Mexico,\n // it’s necessary to dial an additional “1†after Mexico’s country code\n // (which is “52â€) and before the area code.\n // You also ignore the 045, and simply dial the area code and the\n // cell phone’s number.\n //\n // If you don’t add the “1â€, you’ll receive a recorded announcement\n // asking you to redial using it.\n //\n // For example, if you are calling from the USA to a cell phone\n // in Mexico City, you would dial +52 – 1 – 55 – 1234 5678.\n // (Note that this is different to calling a land line in Mexico City\n // from abroad, where the number dialed would be +52 – 55 – 1234 5678)\".\n //\n // Google's demo output:\n // https://libphonenumber.appspot.com/phonenumberparser?number=%2b5215512345678&country=MX\n //\n if (this.extractAnotherNationalSignificantNumber(state.getNationalDigits(), state.nationalSignificantNumber, function (stateUpdate) {\n return state.update(stateUpdate);\n })) {\n return true;\n } // If no format matches the phone number, then it could be\n // \"a really long IDD\" (quote from a comment in Google's library).\n // An IDD prefix is first extracted when the user has entered at least 3 digits,\n // and then here — every time when there's a new digit and the number\n // couldn't be formatted.\n // For example, in Australia the default IDD prefix is `0011`,\n // and it could even be as long as `14880011`.\n //\n // Could also check `!hasReceivedThreeLeadingDigits` here\n // to filter out the case when this check duplicates the one\n // already performed when there're 3 leading digits,\n // but it's not a big deal, and in most cases there\n // will be a suitable `format` when there're 3 leading digits.\n //\n\n\n if (this.extractIddPrefix(state)) {\n this.extractCallingCodeAndNationalSignificantNumber(state);\n return true;\n } // Google's AsYouType formatter supports sort of an \"autocorrection\" feature\n // when it \"autocorrects\" numbers that have been input for a country\n // with that country's calling code.\n // Such \"autocorrection\" feature looks weird, but different people have been requesting it:\n // https://github.com/catamphetamine/libphonenumber-js/issues/376\n // https://github.com/catamphetamine/libphonenumber-js/issues/375\n // https://github.com/catamphetamine/libphonenumber-js/issues/316\n\n\n if (this.fixMissingPlus(state)) {\n this.extractCallingCodeAndNationalSignificantNumber(state);\n return true;\n }\n }\n }, {\n key: \"extractIddPrefix\",\n value: function extractIddPrefix(state) {\n // An IDD prefix can't be present in a number written with a `+`.\n // Also, don't re-extract an IDD prefix if has already been extracted.\n var international = state.international,\n IDDPrefix = state.IDDPrefix,\n digits = state.digits,\n nationalSignificantNumber = state.nationalSignificantNumber;\n\n if (international || IDDPrefix) {\n return;\n } // Some users input their phone number in \"out-of-country\"\n // dialing format instead of using the leading `+`.\n // https://github.com/catamphetamine/libphonenumber-js/issues/185\n // Detect such numbers.\n\n\n var numberWithoutIDD = stripIddPrefix(digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata);\n\n if (numberWithoutIDD !== undefined && numberWithoutIDD !== digits) {\n // If an IDD prefix was stripped then convert the IDD-prefixed number\n // to international number for subsequent parsing.\n state.update({\n IDDPrefix: digits.slice(0, digits.length - numberWithoutIDD.length)\n });\n this.startInternationalNumber(state, {\n country: undefined,\n callingCode: undefined\n });\n return true;\n }\n }\n }, {\n key: \"fixMissingPlus\",\n value: function fixMissingPlus(state) {\n if (!state.international) {\n var _extractCountryCallin2 = extractCountryCallingCodeFromInternationalNumberWithoutPlusSign(state.digits, this.defaultCountry, this.defaultCallingCode, this.metadata.metadata),\n newCallingCode = _extractCountryCallin2.countryCallingCode,\n number = _extractCountryCallin2.number;\n\n if (newCallingCode) {\n state.update({\n missingPlus: true\n });\n this.startInternationalNumber(state, {\n country: state.country,\n callingCode: newCallingCode\n });\n return true;\n }\n }\n }\n }, {\n key: \"startInternationalNumber\",\n value: function startInternationalNumber(state, _ref3) {\n var country = _ref3.country,\n callingCode = _ref3.callingCode;\n state.startInternationalNumber(country, callingCode); // If a national (significant) number has been extracted before, reset it.\n\n if (state.nationalSignificantNumber) {\n state.resetNationalSignificantNumber();\n this.onNationalSignificantNumberChange();\n this.hasExtractedNationalSignificantNumber = undefined;\n }\n }\n }, {\n key: \"extractCallingCodeAndNationalSignificantNumber\",\n value: function extractCallingCodeAndNationalSignificantNumber(state) {\n if (this.extractCountryCallingCode(state)) {\n // `this.extractCallingCode()` is currently called when the number\n // couldn't be formatted during the standard procedure.\n // Normally, the national prefix would be re-extracted\n // for an international number if such number couldn't be formatted,\n // but since it's already not able to be formatted,\n // there won't be yet another retry, so also extract national prefix here.\n this.extractNationalSignificantNumber(state.getNationalDigits(), function (stateUpdate) {\n return state.update(stateUpdate);\n });\n }\n }\n }]);\n\n return AsYouTypeParser;\n}();\n/**\r\n * Extracts formatted phone number from text (if there's any).\r\n * @param {string} text\r\n * @return {string} [formattedPhoneNumber]\r\n */\n\n\nexport { AsYouTypeParser as default };\n\nfunction extractFormattedPhoneNumber(text) {\n // Attempt to extract a possible number from the string passed in.\n var startsAt = text.search(VALID_FORMATTED_PHONE_NUMBER_PART);\n\n if (startsAt < 0) {\n return;\n } // Trim everything to the left of the phone number.\n\n\n text = text.slice(startsAt); // Trim the `+`.\n\n var hasPlus;\n\n if (text[0] === '+') {\n hasPlus = true;\n text = text.slice('+'.length);\n } // Trim everything to the right of the phone number.\n\n\n text = text.replace(AFTER_PHONE_NUMBER_DIGITS_END_PATTERN, ''); // Re-add the previously trimmed `+`.\n\n if (hasPlus) {\n text = '+' + text;\n }\n\n return text;\n}\n/**\r\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\r\n * @param {string} text\r\n * @return {any[]}\r\n */\n\n\nfunction _extractFormattedDigitsAndPlus(text) {\n // Extract a formatted phone number part from text.\n var extractedNumber = extractFormattedPhoneNumber(text) || ''; // Trim a `+`.\n\n if (extractedNumber[0] === '+') {\n return [extractedNumber.slice('+'.length), true];\n }\n\n return [extractedNumber];\n}\n/**\r\n * Extracts formatted phone number digits (and a `+`) from text (if there're any).\r\n * @param {string} text\r\n * @return {any[]}\r\n */\n\n\nexport function extractFormattedDigitsAndPlus(text) {\n var _extractFormattedDigi3 = _extractFormattedDigitsAndPlus(text),\n _extractFormattedDigi4 = _slicedToArray(_extractFormattedDigi3, 2),\n formattedDigits = _extractFormattedDigi4[0],\n hasPlus = _extractFormattedDigi4[1]; // If the extracted phone number part\n // can possibly be a part of some valid phone number\n // then parse phone number characters from a formatted phone number.\n\n\n if (!VALID_FORMATTED_PHONE_NUMBER_DIGITS_PART_PATTERN.test(formattedDigits)) {\n formattedDigits = '';\n }\n\n return [formattedDigits, hasPlus];\n}\n//# sourceMappingURL=AsYouTypeParser.js.map","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\n\nimport Metadata from './metadata.js';\nimport PhoneNumber from './PhoneNumber.js';\nimport AsYouTypeState from './AsYouTypeState.js';\nimport AsYouTypeFormatter, { DIGIT_PLACEHOLDER } from './AsYouTypeFormatter.js';\nimport AsYouTypeParser, { extractFormattedDigitsAndPlus } from './AsYouTypeParser.js';\nimport getCountryByCallingCode from './helpers/getCountryByCallingCode.js';\nimport getCountryByNationalNumber from './helpers/getCountryByNationalNumber.js';\nimport isObject from './helpers/isObject.js';\nvar USE_NON_GEOGRAPHIC_COUNTRY_CODE = false;\n\nvar AsYouType = /*#__PURE__*/function () {\n /**\r\n * @param {(string|object)?} [optionsOrDefaultCountry] - The default country used for parsing non-international phone numbers. Can also be an `options` object.\r\n * @param {Object} metadata\r\n */\n function AsYouType(optionsOrDefaultCountry, metadata) {\n _classCallCheck(this, AsYouType);\n\n this.metadata = new Metadata(metadata);\n\n var _this$getCountryAndCa = this.getCountryAndCallingCode(optionsOrDefaultCountry),\n _this$getCountryAndCa2 = _slicedToArray(_this$getCountryAndCa, 2),\n defaultCountry = _this$getCountryAndCa2[0],\n defaultCallingCode = _this$getCountryAndCa2[1]; // `this.defaultCountry` and `this.defaultCallingCode` aren't required to be in sync.\n // For example, `this.defaultCountry` could be `\"AR\"` and `this.defaultCallingCode` could be `undefined`.\n // So `this.defaultCountry` and `this.defaultCallingCode` are totally independent.\n\n\n this.defaultCountry = defaultCountry;\n this.defaultCallingCode = defaultCallingCode;\n this.reset();\n }\n\n _createClass(AsYouType, [{\n key: \"getCountryAndCallingCode\",\n value: function getCountryAndCallingCode(optionsOrDefaultCountry) {\n // Set `defaultCountry` and `defaultCallingCode` options.\n var defaultCountry;\n var defaultCallingCode; // Turns out `null` also has type \"object\". Weird.\n\n if (optionsOrDefaultCountry) {\n if (isObject(optionsOrDefaultCountry)) {\n defaultCountry = optionsOrDefaultCountry.defaultCountry;\n defaultCallingCode = optionsOrDefaultCountry.defaultCallingCode;\n } else {\n defaultCountry = optionsOrDefaultCountry;\n }\n }\n\n if (defaultCountry && !this.metadata.hasCountry(defaultCountry)) {\n defaultCountry = undefined;\n }\n\n if (defaultCallingCode) {\n /* istanbul ignore if */\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n if (this.metadata.isNonGeographicCallingCode(defaultCallingCode)) {\n defaultCountry = '001';\n }\n }\n }\n\n return [defaultCountry, defaultCallingCode];\n }\n /**\r\n * Inputs \"next\" phone number characters.\r\n * @param {string} text\r\n * @return {string} Formatted phone number characters that have been input so far.\r\n */\n\n }, {\n key: \"input\",\n value: function input(text) {\n var _this$parser$input = this.parser.input(text, this.state),\n digits = _this$parser$input.digits,\n justLeadingPlus = _this$parser$input.justLeadingPlus;\n\n if (justLeadingPlus) {\n this.formattedOutput = '+';\n } else if (digits) {\n this.determineTheCountryIfNeeded(); // Match the available formats by the currently available leading digits.\n\n if (this.state.nationalSignificantNumber) {\n this.formatter.narrowDownMatchingFormats(this.state);\n }\n\n var formattedNationalNumber;\n\n if (this.metadata.hasSelectedNumberingPlan()) {\n formattedNationalNumber = this.formatter.format(digits, this.state);\n }\n\n if (formattedNationalNumber === undefined) {\n // See if another national (significant) number could be re-extracted.\n if (this.parser.reExtractNationalSignificantNumber(this.state)) {\n this.determineTheCountryIfNeeded(); // If it could, then re-try formatting the new national (significant) number.\n\n var nationalDigits = this.state.getNationalDigits();\n\n if (nationalDigits) {\n formattedNationalNumber = this.formatter.format(nationalDigits, this.state);\n }\n }\n }\n\n this.formattedOutput = formattedNationalNumber ? this.getFullNumber(formattedNationalNumber) : this.getNonFormattedNumber();\n }\n\n return this.formattedOutput;\n }\n }, {\n key: \"reset\",\n value: function reset() {\n var _this = this;\n\n this.state = new AsYouTypeState({\n onCountryChange: function onCountryChange(country) {\n // Before version `1.6.0`, the official `AsYouType` formatter API\n // included the `.country` property of an `AsYouType` instance.\n // Since that property (along with the others) have been moved to\n // `this.state`, `this.country` property is emulated for compatibility\n // with the old versions.\n _this.country = country;\n },\n onCallingCodeChange: function onCallingCodeChange(callingCode, country) {\n _this.metadata.selectNumberingPlan(country, callingCode);\n\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n\n _this.parser.reset(_this.metadata.numberingPlan);\n }\n });\n this.formatter = new AsYouTypeFormatter({\n state: this.state,\n metadata: this.metadata\n });\n this.parser = new AsYouTypeParser({\n defaultCountry: this.defaultCountry,\n defaultCallingCode: this.defaultCallingCode,\n metadata: this.metadata,\n state: this.state,\n onNationalSignificantNumberChange: function onNationalSignificantNumberChange() {\n _this.determineTheCountryIfNeeded();\n\n _this.formatter.reset(_this.metadata.numberingPlan, _this.state);\n }\n });\n this.state.reset({\n country: this.defaultCountry,\n callingCode: this.defaultCallingCode\n });\n this.formattedOutput = '';\n return this;\n }\n /**\r\n * Returns `true` if the phone number is being input in international format.\r\n * In other words, returns `true` if and only if the parsed phone number starts with a `\"+\"`.\r\n * @return {boolean}\r\n */\n\n }, {\n key: \"isInternational\",\n value: function isInternational() {\n return this.state.international;\n }\n /**\r\n * Returns the \"calling code\" part of the phone number when it's being input\r\n * in an international format.\r\n * If no valid calling code has been entered so far, returns `undefined`.\r\n * @return {string} [callingCode]\r\n */\n\n }, {\n key: \"getCallingCode\",\n value: function getCallingCode() {\n // If the number is being input in national format and some \"default calling code\"\n // has been passed to `AsYouType` constructor, then `this.state.callingCode`\n // is equal to that \"default calling code\".\n //\n // If the number is being input in national format and no \"default calling code\"\n // has been passed to `AsYouType` constructor, then returns `undefined`,\n // even if a \"default country\" has been passed to `AsYouType` constructor.\n //\n if (this.isInternational()) {\n return this.state.callingCode;\n }\n } // A legacy alias.\n\n }, {\n key: \"getCountryCallingCode\",\n value: function getCountryCallingCode() {\n return this.getCallingCode();\n }\n /**\r\n * Returns a two-letter country code of the phone number.\r\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\r\n * Returns `undefined` if no phone number has been input yet.\r\n * @return {string} [country]\r\n */\n\n }, {\n key: \"getCountry\",\n value: function getCountry() {\n var digits = this.state.digits; // Return `undefined` if no digits have been input yet.\n\n if (digits) {\n return this._getCountry();\n }\n }\n /**\r\n * Returns a two-letter country code of the phone number.\r\n * Returns `undefined` for \"non-geographic\" phone numbering plans.\r\n * @return {string} [country]\r\n */\n\n }, {\n key: \"_getCountry\",\n value: function _getCountry() {\n var country = this.state.country;\n /* istanbul ignore if */\n\n if (USE_NON_GEOGRAPHIC_COUNTRY_CODE) {\n // `AsYouType.getCountry()` returns `undefined`\n // for \"non-geographic\" phone numbering plans.\n if (country === '001') {\n return;\n }\n }\n\n return country;\n }\n }, {\n key: \"determineTheCountryIfNeeded\",\n value: function determineTheCountryIfNeeded() {\n // Suppose a user enters a phone number in international format,\n // and there're several countries corresponding to that country calling code,\n // and a country has been derived from the number, and then\n // a user enters one more digit and the number is no longer\n // valid for the derived country, so the country should be re-derived\n // on every new digit in those cases.\n //\n // If the phone number is being input in national format,\n // then it could be a case when `defaultCountry` wasn't specified\n // when creating `AsYouType` instance, and just `defaultCallingCode` was specified,\n // and that \"calling code\" could correspond to a \"non-geographic entity\",\n // or there could be several countries corresponding to that country calling code.\n // In those cases, `this.country` is `undefined` and should be derived\n // from the number. Again, if country calling code is ambiguous, then\n // `this.country` should be re-derived with each new digit.\n //\n if (!this.state.country || this.isCountryCallingCodeAmbiguous()) {\n this.determineTheCountry();\n }\n } // Prepends `+CountryCode ` in case of an international phone number\n\n }, {\n key: \"getFullNumber\",\n value: function getFullNumber(formattedNationalNumber) {\n var _this2 = this;\n\n if (this.isInternational()) {\n var prefix = function prefix(text) {\n return _this2.formatter.getInternationalPrefixBeforeCountryCallingCode(_this2.state, {\n spacing: text ? true : false\n }) + text;\n };\n\n var callingCode = this.state.callingCode;\n\n if (!callingCode) {\n return prefix(\"\".concat(this.state.getDigitsWithoutInternationalPrefix()));\n }\n\n if (!formattedNationalNumber) {\n return prefix(callingCode);\n }\n\n return prefix(\"\".concat(callingCode, \" \").concat(formattedNationalNumber));\n }\n\n return formattedNationalNumber;\n }\n }, {\n key: \"getNonFormattedNationalNumberWithPrefix\",\n value: function getNonFormattedNationalNumberWithPrefix() {\n var _this$state = this.state,\n nationalSignificantNumber = _this$state.nationalSignificantNumber,\n complexPrefixBeforeNationalSignificantNumber = _this$state.complexPrefixBeforeNationalSignificantNumber,\n nationalPrefix = _this$state.nationalPrefix;\n var number = nationalSignificantNumber;\n var prefix = complexPrefixBeforeNationalSignificantNumber || nationalPrefix;\n\n if (prefix) {\n number = prefix + number;\n }\n\n return number;\n }\n }, {\n key: \"getNonFormattedNumber\",\n value: function getNonFormattedNumber() {\n var nationalSignificantNumberMatchesInput = this.state.nationalSignificantNumberMatchesInput;\n return this.getFullNumber(nationalSignificantNumberMatchesInput ? this.getNonFormattedNationalNumberWithPrefix() : this.state.getNationalDigits());\n }\n }, {\n key: \"getNonFormattedTemplate\",\n value: function getNonFormattedTemplate() {\n var number = this.getNonFormattedNumber();\n\n if (number) {\n return number.replace(/[\\+\\d]/g, DIGIT_PLACEHOLDER);\n }\n }\n }, {\n key: \"isCountryCallingCodeAmbiguous\",\n value: function isCountryCallingCodeAmbiguous() {\n var callingCode = this.state.callingCode;\n var countryCodes = this.metadata.getCountryCodesForCallingCode(callingCode);\n return countryCodes && countryCodes.length > 1;\n } // Determines the country of the phone number\n // entered so far based on the country phone code\n // and the national phone number.\n\n }, {\n key: \"determineTheCountry\",\n value: function determineTheCountry() {\n this.state.setCountry(getCountryByCallingCode(this.isInternational() ? this.state.callingCode : this.defaultCallingCode, {\n nationalNumber: this.state.nationalSignificantNumber,\n defaultCountry: this.defaultCountry,\n metadata: this.metadata\n }));\n }\n /**\r\n * Returns a E.164 phone number value for the user's input.\r\n *\r\n * For example, for country `\"US\"` and input `\"(222) 333-4444\"`\r\n * it will return `\"+12223334444\"`.\r\n *\r\n * For international phone number input, it will also auto-correct\r\n * some minor errors such as using a national prefix when writing\r\n * an international phone number. For example, if the user inputs\r\n * `\"+44 0 7400 000000\"` then it will return an auto-corrected\r\n * `\"+447400000000\"` phone number value.\r\n *\r\n * Will return `undefined` if no digits have been input,\r\n * or when inputting a phone number in national format and no\r\n * default country or default \"country calling code\" have been set.\r\n *\r\n * @return {string} [value]\r\n */\n\n }, {\n key: \"getNumberValue\",\n value: function getNumberValue() {\n var _this$state2 = this.state,\n digits = _this$state2.digits,\n callingCode = _this$state2.callingCode,\n country = _this$state2.country,\n nationalSignificantNumber = _this$state2.nationalSignificantNumber; // Will return `undefined` if no digits have been input.\n\n if (!digits) {\n return;\n }\n\n if (this.isInternational()) {\n if (callingCode) {\n return '+' + callingCode + nationalSignificantNumber;\n } else {\n return '+' + digits;\n }\n } else {\n if (country || callingCode) {\n var callingCode_ = country ? this.metadata.countryCallingCode() : callingCode;\n return '+' + callingCode_ + nationalSignificantNumber;\n }\n }\n }\n /**\r\n * Returns an instance of `PhoneNumber` class.\r\n * Will return `undefined` if no national (significant) number\r\n * digits have been entered so far, or if no `defaultCountry` has been\r\n * set and the user enters a phone number not in international format.\r\n */\n\n }, {\n key: \"getNumber\",\n value: function getNumber() {\n var _this$state3 = this.state,\n nationalSignificantNumber = _this$state3.nationalSignificantNumber,\n carrierCode = _this$state3.carrierCode,\n callingCode = _this$state3.callingCode; // `this._getCountry()` is basically same as `this.state.country`\n // with the only change that it return `undefined` in case of a\n // \"non-geographic\" numbering plan instead of `\"001\"` \"internal use\" value.\n\n var country = this._getCountry();\n\n if (!nationalSignificantNumber) {\n return;\n } // `state.country` and `state.callingCode` aren't required to be in sync.\n // For example, `country` could be `\"AR\"` and `callingCode` could be `undefined`.\n // So `country` and `callingCode` are totally independent.\n\n\n if (!country && !callingCode) {\n return;\n } // By default, if `defaultCountry` parameter was passed when\n // creating `AsYouType` instance, `state.country` is gonna be\n // that `defaultCountry`, which doesn't entirely conform with\n // `parsePhoneNumber()`'s behavior where it attempts to determine\n // the country more precisely in cases when multiple countries\n // could correspond to the same `countryCallingCode`.\n // https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/103#note_1417192969\n //\n // Because `AsYouType.getNumber()` method is supposed to be a 1:1\n // equivalent for `parsePhoneNumber(AsYouType.getNumberValue())`,\n // then it should also behave accordingly in cases of `country` ambiguity.\n // That's how users of this library would expect it to behave anyway.\n //\n\n\n if (country) {\n if (country === this.defaultCountry) {\n // `state.country` and `state.callingCode` aren't required to be in sync.\n // For example, `state.country` could be `\"AR\"` and `state.callingCode` could be `undefined`.\n // So `state.country` and `state.callingCode` are totally independent.\n var metadata = new Metadata(this.metadata.metadata);\n metadata.selectNumberingPlan(country);\n\n var _callingCode = metadata.numberingPlan.callingCode();\n\n var ambiguousCountries = this.metadata.getCountryCodesForCallingCode(_callingCode);\n\n if (ambiguousCountries.length > 1) {\n var exactCountry = getCountryByNationalNumber(nationalSignificantNumber, {\n countries: ambiguousCountries,\n defaultCountry: this.defaultCountry,\n metadata: this.metadata.metadata\n });\n\n if (exactCountry) {\n country = exactCountry;\n }\n }\n }\n }\n\n var phoneNumber = new PhoneNumber(country || callingCode, nationalSignificantNumber, this.metadata.metadata);\n\n if (carrierCode) {\n phoneNumber.carrierCode = carrierCode;\n } // Phone number extensions are not supported by \"As You Type\" formatter.\n\n\n return phoneNumber;\n }\n /**\r\n * Returns `true` if the phone number is \"possible\".\r\n * Is just a shortcut for `PhoneNumber.isPossible()`.\r\n * @return {boolean}\r\n */\n\n }, {\n key: \"isPossible\",\n value: function isPossible() {\n var phoneNumber = this.getNumber();\n\n if (!phoneNumber) {\n return false;\n }\n\n return phoneNumber.isPossible();\n }\n /**\r\n * Returns `true` if the phone number is \"valid\".\r\n * Is just a shortcut for `PhoneNumber.isValid()`.\r\n * @return {boolean}\r\n */\n\n }, {\n key: \"isValid\",\n value: function isValid() {\n var phoneNumber = this.getNumber();\n\n if (!phoneNumber) {\n return false;\n }\n\n return phoneNumber.isValid();\n }\n /**\r\n * @deprecated\r\n * This method is used in `react-phone-number-input/source/input-control.js`\r\n * in versions before `3.0.16`.\r\n */\n\n }, {\n key: \"getNationalNumber\",\n value: function getNationalNumber() {\n return this.state.nationalSignificantNumber;\n }\n /**\r\n * Returns the phone number characters entered by the user.\r\n * @return {string}\r\n */\n\n }, {\n key: \"getChars\",\n value: function getChars() {\n return (this.state.international ? '+' : '') + this.state.digits;\n }\n /**\r\n * Returns the template for the formatted phone number.\r\n * @return {string}\r\n */\n\n }, {\n key: \"getTemplate\",\n value: function getTemplate() {\n return this.formatter.getTemplate(this.state) || this.getNonFormattedTemplate() || '';\n }\n }]);\n\n return AsYouType;\n}();\n\nexport { AsYouType as default };\n//# sourceMappingURL=AsYouType.js.map","import { getCountryCallingCode } from 'libphonenumber-js/core';\nexport function getPrefixForFormattingValueAsPhoneNumber(_ref) {\n var inputFormat = _ref.inputFormat,\n country = _ref.country,\n metadata = _ref.metadata;\n return inputFormat === 'NATIONAL_PART_OF_INTERNATIONAL' ? \"+\".concat(getCountryCallingCode(country, metadata)) : '';\n}\nexport function removePrefixFromFormattedPhoneNumber(value, prefix) {\n if (prefix) {\n value = value.slice(prefix.length);\n if (value[0] === ' ') {\n value = value.slice(1);\n }\n }\n return value;\n}\n//# sourceMappingURL=inputValuePrefix.js.map","import { parsePhoneNumberCharacter } from 'libphonenumber-js/core';\n\n/**\r\n * Parses next character while parsing phone number digits (including a `+`)\r\n * from text: discards everything except `+` and digits, and `+` is only allowed\r\n * at the start of a phone number.\r\n * For example, is used in `react-phone-number-input` where it uses\r\n * [`input-format`](https://gitlab.com/catamphetamine/input-format).\r\n * @param {string} character - Yet another character from raw input string.\r\n * @param {string?} prevParsedCharacters - Previous parsed characters.\r\n * @param {object?} context - An optional object that could be used by this function to set arbitrary \"flags\". The object should be shared within the parsing of the whole string.\r\n * @return {string?} The parsed character.\r\n */\nexport default function parsePhoneNumberCharacter_(character, prevParsedCharacters, context) {\n // `context` argument was added as a third argument of `parse()` function\n // in `input-format` package on Dec 26th, 2023. So it could potentially be\n // `undefined` here if a 3rd-party app somehow ends up with this newer version\n // of `react-phone-number-input` and an older version of `input-format`.\n // Dunno how, but just in case, it could be `undefined` here and it wouldn't break.\n // Maybe it's not required to handle `undefined` case here.\n //\n // The addition of the `context` argument was to fix the slightly-weird behavior\n // of parsing an input string when the user inputs something like `\"2+7\"\n // https://github.com/catamphetamine/react-phone-number-input/issues/437\n //\n // If the parser encounters an unexpected `+` in a string being parsed\n // then it simply discards that out-of-place `+` and any following characters.\n //\n if (context && context.ignoreRest) {\n return;\n }\n var emitEvent = function emitEvent(eventName) {\n if (context) {\n switch (eventName) {\n case 'end':\n context.ignoreRest = true;\n break;\n }\n }\n };\n return parsePhoneNumberCharacter(character, prevParsedCharacters, emitEvent);\n}\n//# sourceMappingURL=parsePhoneNumberCharacter.js.map","import { useCallback } from 'react';\n\n// Returns a custom `onKeyDown` handler that works around a Backspace keypress edge case:\n// * `<PhoneInputWithCountrySelect international countryCallingCodeEditable={false}/>`\n// * When placing the caret before the leading plus character and pressing Backspace,\n// it duplicates the country calling code in the `<input/>`.\n// https://github.com/catamphetamine/react-phone-number-input/issues/442\nexport default function useInputKeyDownHandler(_ref) {\n var onKeyDown = _ref.onKeyDown,\n inputFormat = _ref.inputFormat;\n return useCallback(function (event) {\n // Usability:\n // Don't allow the user to erase a leading \"+\" character when \"international\" input mode is forced.\n // That indicates to the user that they can't possibly enter the phone number in a non-international format.\n if (event.keyCode === BACKSPACE_KEY_CODE && inputFormat === 'INTERNATIONAL') {\n // It checks `event.target` here for being an `<input/>` element\n // because \"keydown\" events may bubble from arbitrary child elements\n // so there's no guarantee that `event.target` represents an `<input/>` element.\n // Also, since `inputComponent` is not neceesarily an `<input/>`, this check is required too.\n if (event.target instanceof HTMLInputElement) {\n if (getCaretPosition(event.target) === LEADING_PLUS.length) {\n event.preventDefault();\n return;\n }\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n }, [onKeyDown, inputFormat]);\n}\n\n// Gets the caret position in an `<input/>` field.\n// The caret position starts with `0` which means \"before the first character\".\nfunction getCaretPosition(element) {\n return element.selectionStart;\n}\nvar BACKSPACE_KEY_CODE = 8;\nvar LEADING_PLUS = '+';\n//# sourceMappingURL=useInputKeyDownHandler.js.map","var _excluded = [\"onKeyDown\", \"country\", \"inputFormat\", \"metadata\", \"international\", \"withCountryCallingCode\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport Input from 'input-format/react';\nimport { AsYouType } from 'libphonenumber-js/core';\nimport { getPrefixForFormattingValueAsPhoneNumber, removePrefixFromFormattedPhoneNumber } from './helpers/inputValuePrefix.js';\nimport parsePhoneNumberCharacter from './helpers/parsePhoneNumberCharacter.js';\nimport useInputKeyDownHandler from './useInputKeyDownHandler.js';\nexport function createInput(defaultMetadata) {\n /**\r\n * `InputSmart` is a \"smarter\" implementation of a `Component`\r\n * that can be passed to `<PhoneInput/>`. It parses and formats\r\n * the user's and maintains the caret's position in the process.\r\n * The caret positioning is maintained using `input-format` library.\r\n * Relies on being run in a DOM environment for calling caret positioning functions.\r\n */\n function InputSmart(_ref, ref) {\n var onKeyDown = _ref.onKeyDown,\n country = _ref.country,\n inputFormat = _ref.inputFormat,\n _ref$metadata = _ref.metadata,\n metadata = _ref$metadata === void 0 ? defaultMetadata : _ref$metadata,\n international = _ref.international,\n withCountryCallingCode = _ref.withCountryCallingCode,\n rest = _objectWithoutProperties(_ref, _excluded);\n var format = useCallback(function (value) {\n // \"As you type\" formatter.\n var formatter = new AsYouType(country, metadata);\n var prefix = getPrefixForFormattingValueAsPhoneNumber({\n inputFormat: inputFormat,\n country: country,\n metadata: metadata\n });\n\n // Format the number.\n var text = formatter.input(prefix + value);\n var template = formatter.getTemplate();\n if (prefix) {\n text = removePrefixFromFormattedPhoneNumber(text, prefix);\n // `AsYouType.getTemplate()` can be `undefined`.\n if (template) {\n template = removePrefixFromFormattedPhoneNumber(template, prefix);\n }\n }\n return {\n text: text,\n template: template\n };\n }, [country, metadata]);\n var _onKeyDown = useInputKeyDownHandler({\n onKeyDown: onKeyDown,\n inputFormat: inputFormat\n });\n return /*#__PURE__*/React.createElement(Input, _extends({}, rest, {\n ref: ref,\n parse: parsePhoneNumberCharacter,\n format: format,\n onKeyDown: _onKeyDown\n }));\n }\n InputSmart = /*#__PURE__*/React.forwardRef(InputSmart);\n InputSmart.propTypes = {\n /**\r\n * The parsed phone number.\r\n * \"Parsed\" not in a sense of \"E.164\"\r\n * but rather in a sense of \"having only\r\n * digits and possibly a leading plus character\".\r\n * Examples: `\"\"`, `\"+\"`, `\"+123\"`, `\"123\"`.\r\n */\n value: PropTypes.string.isRequired,\n /**\r\n * A function of `value: string`.\r\n * Updates the `value` property.\r\n */\n onChange: PropTypes.func.isRequired,\n /**\r\n * A function of `event: Event`.\r\n * Handles `keydown` events.\r\n */\n onKeyDown: PropTypes.func,\n /**\r\n * A two-letter country code for formatting `value`\r\n * as a national phone number (e.g. `(800) 555 35 35`).\r\n * E.g. \"US\", \"RU\", etc.\r\n * If no `country` is passed then `value`\r\n * is formatted as an international phone number.\r\n * (e.g. `+7 800 555 35 35`)\r\n * This property should've been called `defaultCountry`\r\n * because it only applies when the user inputs a phone number in a national format\r\n * and is completely ignored when the user inputs a phone number in an international format.\r\n */\n country: PropTypes.string,\n /**\r\n * The format that the input field value is being input/output in.\r\n */\n inputFormat: PropTypes.oneOf(['INTERNATIONAL', 'NATIONAL_PART_OF_INTERNATIONAL', 'NATIONAL', 'INTERNATIONAL_OR_NATIONAL']).isRequired,\n /**\r\n * `libphonenumber-js` metadata.\r\n */\n metadata: PropTypes.object\n };\n return InputSmart;\n}\nexport default createInput();\n//# sourceMappingURL=InputSmart.js.map","import AsYouType from './AsYouType.js';\n/**\r\n * Formats a (possibly incomplete) phone number.\r\n * The phone number can be either in E.164 format\r\n * or in a form of national number digits.\r\n * @param {string} value - A possibly incomplete phone number. Either in E.164 format or in a form of national number digits.\r\n * @param {string|object} [optionsOrDefaultCountry] - A two-letter (\"ISO 3166-1 alpha-2\") country code, or an object of shape `{ defaultCountry?: string, defaultCallingCode?: string }`.\r\n * @return {string} Formatted (possibly incomplete) phone number.\r\n */\n\nexport default function formatIncompletePhoneNumber(value, optionsOrDefaultCountry, metadata) {\n if (!metadata) {\n metadata = optionsOrDefaultCountry;\n optionsOrDefaultCountry = undefined;\n }\n\n return new AsYouType(optionsOrDefaultCountry, metadata).input(value);\n}\n//# sourceMappingURL=formatIncompletePhoneNumber.js.map","var _excluded = [\"value\", \"onChange\", \"onKeyDown\", \"country\", \"inputFormat\", \"metadata\", \"inputComponent\", \"international\", \"withCountryCallingCode\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback } from 'react';\nimport PropTypes from 'prop-types';\nimport { parseIncompletePhoneNumber, formatIncompletePhoneNumber } from 'libphonenumber-js/core';\nimport { getPrefixForFormattingValueAsPhoneNumber, removePrefixFromFormattedPhoneNumber } from './helpers/inputValuePrefix.js';\nimport useInputKeyDownHandler from './useInputKeyDownHandler.js';\nexport function createInput(defaultMetadata) {\n /**\r\n * `InputBasic` is the most basic implementation of a `Component`\r\n * that can be passed to `<PhoneInput/>`. It parses and formats\r\n * the user's input but doesn't control the caret in the process:\r\n * when erasing or inserting digits in the middle of a phone number\r\n * the caret usually jumps to the end (this is the expected behavior).\r\n * Why does `InputBasic` exist when there's `InputSmart`?\r\n * One reason is working around the [Samsung Galaxy smart caret positioning bug]\r\n * (https://github.com/catamphetamine/react-phone-number-input/issues/75).\r\n * Another reason is that, unlike `InputSmart`, it doesn't require DOM environment.\r\n */\n function InputBasic(_ref, ref) {\n var value = _ref.value,\n onChange = _ref.onChange,\n onKeyDown = _ref.onKeyDown,\n country = _ref.country,\n inputFormat = _ref.inputFormat,\n _ref$metadata = _ref.metadata,\n metadata = _ref$metadata === void 0 ? defaultMetadata : _ref$metadata,\n _ref$inputComponent = _ref.inputComponent,\n Input = _ref$inputComponent === void 0 ? 'input' : _ref$inputComponent,\n international = _ref.international,\n withCountryCallingCode = _ref.withCountryCallingCode,\n rest = _objectWithoutProperties(_ref, _excluded);\n var prefix = getPrefixForFormattingValueAsPhoneNumber({\n inputFormat: inputFormat,\n country: country,\n metadata: metadata\n });\n var _onChange = useCallback(function (event) {\n var newValue = parseIncompletePhoneNumber(event.target.value);\n // By default, if a value is something like `\"(123)\"`\n // then Backspace would only erase the rightmost brace\n // becoming something like `\"(123\"`\n // which would give the same `\"123\"` value\n // which would then be formatted back to `\"(123)\"`\n // and so a user wouldn't be able to erase the phone number.\n //\n // This issue is worked around with this simple hack:\n // when \"old\" and \"new\" parsed values are the same,\n // it checks if the \"new\" formatted value could be obtained\n // from the \"old\" formatted value by erasing some (or no) characters at the right side.\n // If it could then it's likely that the user has hit a Backspace key\n // and what they really intended was to erase a rightmost digit rather than\n // a rightmost punctuation character.\n //\n if (newValue === value) {\n var newValueFormatted = format(prefix, newValue, country, metadata);\n if (newValueFormatted.indexOf(event.target.value) === 0) {\n // Trim the last digit (or plus sign).\n newValue = newValue.slice(0, -1);\n }\n }\n onChange(newValue);\n }, [prefix, value, onChange, country, metadata]);\n var _onKeyDown = useInputKeyDownHandler({\n onKeyDown: onKeyDown,\n inputFormat: inputFormat\n });\n return /*#__PURE__*/React.createElement(Input, _extends({}, rest, {\n ref: ref,\n value: format(prefix, value, country, metadata),\n onChange: _onChange,\n onKeyDown: _onKeyDown\n }));\n }\n InputBasic = /*#__PURE__*/React.forwardRef(InputBasic);\n InputBasic.propTypes = {\n /**\r\n * The parsed phone number.\r\n * \"Parsed\" not in a sense of \"E.164\"\r\n * but rather in a sense of \"having only\r\n * digits and possibly a leading plus character\".\r\n * Examples: `\"\"`, `\"+\"`, `\"+123\"`, `\"123\"`.\r\n */\n value: PropTypes.string.isRequired,\n /**\r\n * A function of `value: string`.\r\n * Updates the `value` property.\r\n */\n onChange: PropTypes.func.isRequired,\n /**\r\n * A function of `event: Event`.\r\n * Handles `keydown` events.\r\n */\n onKeyDown: PropTypes.func,\n /**\r\n * A two-letter country code for formatting `value`\r\n * as a national phone number (e.g. `(800) 555 35 35`).\r\n * E.g. \"US\", \"RU\", etc.\r\n * If no `country` is passed then `value`\r\n * is formatted as an international phone number.\r\n * (e.g. `+7 800 555 35 35`)\r\n * This property should've been called `defaultCountry`\r\n * because it only applies when the user inputs a phone number in a national format\r\n * and is completely ignored when the user inputs a phone number in an international format.\r\n */\n country: PropTypes.string,\n /**\r\n * The format that the input field value is being input/output in.\r\n */\n inputFormat: PropTypes.oneOf(['INTERNATIONAL', 'NATIONAL_PART_OF_INTERNATIONAL', 'NATIONAL', 'INTERNATIONAL_OR_NATIONAL']).isRequired,\n /**\r\n * `libphonenumber-js` metadata.\r\n */\n metadata: PropTypes.object,\n /**\r\n * The `<input/>` component.\r\n */\n inputComponent: PropTypes.elementType\n };\n return InputBasic;\n}\nexport default createInput();\nfunction format(prefix, value, country, metadata) {\n return removePrefixFromFormattedPhoneNumber(formatIncompletePhoneNumber(prefix + value, country, metadata), prefix);\n}\n//# sourceMappingURL=InputBasic.js.map","/**\r\n * Creates Unicode flag from a two-letter ISO country code.\r\n * https://stackoverflow.com/questions/24050671/how-to-put-japan-flag-character-in-a-string\r\n * @param {string} country — A two-letter ISO country code (case-insensitive).\r\n * @return {string}\r\n */\nexport default function getCountryFlag(country) {\n return getRegionalIndicatorSymbol(country[0]) + getRegionalIndicatorSymbol(country[1]);\n}\n/**\r\n * Converts a letter to a Regional Indicator Symbol.\r\n * @param {string} letter\r\n * @return {string}\r\n */\n\nfunction getRegionalIndicatorSymbol(letter) {\n return String.fromCodePoint(0x1F1E6 - 65 + letter.toUpperCase().charCodeAt(0));\n}\n//# sourceMappingURL=unicode.js.map","var _excluded = [\"value\", \"onChange\", \"options\", \"disabled\", \"readOnly\"],\n _excluded2 = [\"value\", \"options\", \"className\", \"iconComponent\", \"getIconAspectRatio\", \"arrowComponent\", \"unicodeFlags\"];\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback, useMemo } from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport getUnicodeFlagIcon from 'country-flag-icons/unicode';\nexport default function CountrySelect(_ref) {\n var value = _ref.value,\n onChange = _ref.onChange,\n options = _ref.options,\n disabled = _ref.disabled,\n readOnly = _ref.readOnly,\n rest = _objectWithoutProperties(_ref, _excluded);\n var onChange_ = useCallback(function (event) {\n var value = event.target.value;\n onChange(value === 'ZZ' ? undefined : value);\n }, [onChange]);\n var selectedOption = useMemo(function () {\n return getSelectedOption(options, value);\n }, [options, value]);\n\n // \"ZZ\" means \"International\".\n // (HTML requires each `<option/>` have some string `value`).\n return /*#__PURE__*/React.createElement(\"select\", _extends({}, rest, {\n disabled: disabled || readOnly,\n readOnly: readOnly,\n value: value || 'ZZ',\n onChange: onChange_\n }), options.map(function (_ref2) {\n var value = _ref2.value,\n label = _ref2.label,\n divider = _ref2.divider;\n return /*#__PURE__*/React.createElement(\"option\", {\n key: divider ? '|' : value || 'ZZ',\n value: divider ? '|' : value || 'ZZ',\n disabled: divider ? true : false,\n style: divider ? DIVIDER_STYLE : undefined\n }, label);\n }));\n}\nCountrySelect.propTypes = {\n /**\r\n * A two-letter country code.\r\n * Example: \"US\", \"RU\", etc.\r\n */\n value: PropTypes.string,\n /**\r\n * A function of `value: string`.\r\n * Updates the `value` property.\r\n */\n onChange: PropTypes.func.isRequired,\n // `<select/>` options.\n options: PropTypes.arrayOf(PropTypes.shape({\n value: PropTypes.string,\n label: PropTypes.string,\n divider: PropTypes.bool\n })).isRequired,\n // `readonly` attribute doesn't work on a `<select/>`.\n // https://github.com/catamphetamine/react-phone-number-input/issues/419#issuecomment-1764384480\n // https://www.delftstack.com/howto/html/html-select-readonly/\n // To work around that, if `readOnly: true` property is passed\n // to this component, it behaves analogous to `disabled: true`.\n disabled: PropTypes.bool,\n readOnly: PropTypes.bool\n};\nvar DIVIDER_STYLE = {\n fontSize: '1px',\n backgroundColor: 'currentColor',\n color: 'inherit'\n};\nexport function CountrySelectWithIcon(_ref3) {\n var value = _ref3.value,\n options = _ref3.options,\n className = _ref3.className,\n Icon = _ref3.iconComponent,\n getIconAspectRatio = _ref3.getIconAspectRatio,\n _ref3$arrowComponent = _ref3.arrowComponent,\n Arrow = _ref3$arrowComponent === void 0 ? DefaultArrowComponent : _ref3$arrowComponent,\n unicodeFlags = _ref3.unicodeFlags,\n rest = _objectWithoutProperties(_ref3, _excluded2);\n var selectedOption = useMemo(function () {\n return getSelectedOption(options, value);\n }, [options, value]);\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"PhoneInputCountry\"\n }, /*#__PURE__*/React.createElement(CountrySelect, _extends({}, rest, {\n value: value,\n options: options,\n className: classNames('PhoneInputCountrySelect', className)\n })), selectedOption && (unicodeFlags && value ? /*#__PURE__*/React.createElement(\"div\", {\n className: \"PhoneInputCountryIconUnicode\"\n }, getUnicodeFlagIcon(value)) : /*#__PURE__*/React.createElement(Icon, {\n \"aria-hidden\": true,\n country: value,\n label: selectedOption.label,\n aspectRatio: unicodeFlags ? 1 : undefined\n })), /*#__PURE__*/React.createElement(Arrow, null));\n}\nCountrySelectWithIcon.propTypes = {\n // Country flag component.\n iconComponent: PropTypes.elementType,\n // Select arrow component.\n arrowComponent: PropTypes.elementType,\n // Set to `true` to render Unicode flag icons instead of SVG images.\n unicodeFlags: PropTypes.bool\n};\nfunction DefaultArrowComponent() {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"PhoneInputCountrySelectArrow\"\n });\n}\nfunction getSelectedOption(options, value) {\n for (var _iterator = _createForOfIteratorHelperLoose(options), _step; !(_step = _iterator()).done;) {\n var option = _step.value;\n if (!option.divider) {\n if (isSameOptionValue(option.value, value)) {\n return option;\n }\n }\n }\n}\nfunction isSameOptionValue(value1, value2) {\n // `undefined` is identical to `null`: both mean \"no country selected\".\n if (value1 === undefined || value1 === null) {\n return value2 === undefined || value2 === null;\n }\n return value1 === value2;\n}\n//# sourceMappingURL=CountrySelect.js.map","var _excluded = [\"country\", \"countryName\", \"flags\", \"flagUrl\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\n\n// Default country flag icon.\n// `<img/>` is wrapped in a `<div/>` to prevent SVGs from exploding in size in IE 11.\n// https://github.com/catamphetamine/react-phone-number-input/issues/111\nexport default function FlagComponent(_ref) {\n var country = _ref.country,\n countryName = _ref.countryName,\n flags = _ref.flags,\n flagUrl = _ref.flagUrl,\n rest = _objectWithoutProperties(_ref, _excluded);\n if (flags && flags[country]) {\n return flags[country]({\n title: countryName\n });\n }\n return /*#__PURE__*/React.createElement(\"img\", _extends({}, rest, {\n alt: countryName,\n role: countryName ? undefined : \"presentation\",\n src: flagUrl.replace('{XX}', country).replace('{xx}', country.toLowerCase())\n }));\n}\nFlagComponent.propTypes = {\n // The country to be selected by default.\n // Two-letter country code (\"ISO 3166-1 alpha-2\").\n country: PropTypes.string.isRequired,\n // Will be HTML `title` attribute of the `<img/>`.\n countryName: PropTypes.string.isRequired,\n // Country flag icon components.\n // By default flag icons are inserted as `<img/>`s\n // with their `src` pointed to `country-flag-icons` gitlab pages website.\n // There might be cases (e.g. an offline application)\n // where having a large (3 megabyte) `<svg/>` flags\n // bundle is more appropriate.\n // `import flags from 'react-phone-number-input/flags'`.\n flags: PropTypes.objectOf(PropTypes.elementType),\n // A URL for a country flag icon.\n // By default it points to `country-flag-icons` gitlab pages website.\n flagUrl: PropTypes.string.isRequired\n};\n//# sourceMappingURL=Flag.js.map","var _excluded = [\"aspectRatio\"],\n _excluded2 = [\"title\"],\n _excluded3 = [\"title\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nexport default function InternationalIcon(_ref) {\n var aspectRatio = _ref.aspectRatio,\n rest = _objectWithoutProperties(_ref, _excluded);\n if (aspectRatio === 1) {\n return /*#__PURE__*/React.createElement(InternationalIcon1x1, rest);\n } else {\n return /*#__PURE__*/React.createElement(InternationalIcon3x2, rest);\n }\n}\nInternationalIcon.propTypes = {\n title: PropTypes.string.isRequired,\n aspectRatio: PropTypes.number\n};\n\n// 3x2.\n// Using `<title/>` in `<svg/>`s:\n// https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title\nfunction InternationalIcon3x2(_ref2) {\n var title = _ref2.title,\n rest = _objectWithoutProperties(_ref2, _excluded2);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({}, rest, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 75 50\"\n }), /*#__PURE__*/React.createElement(\"title\", null, title), /*#__PURE__*/React.createElement(\"g\", {\n className: \"PhoneInputInternationalIconGlobe\",\n stroke: \"currentColor\",\n fill: \"none\",\n strokeWidth: \"2\",\n strokeMiterlimit: \"10\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n d: \"M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3\"\n }), /*#__PURE__*/React.createElement(\"line\", {\n x1: \"26\",\n y1: \"25\",\n x2: \"74\",\n y2: \"25\"\n }), /*#__PURE__*/React.createElement(\"line\", {\n x1: \"50\",\n y1: \"1\",\n x2: \"50\",\n y2: \"49\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n d: \"M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n d: \"M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2\"\n })), /*#__PURE__*/React.createElement(\"path\", {\n className: \"PhoneInputInternationalIconPhone\",\n stroke: \"none\",\n fill: \"currentColor\",\n d: \"M12.4,17.9c2.9-2.9,5.4-4.8,0.3-11.2S4.1,5.2,1.3,8.1C-2,11.4,1.1,23.5,13.1,35.6s24.3,15.2,27.5,11.9c2.8-2.8,7.8-6.3,1.4-11.5s-8.3-2.6-11.2,0.3c-2,2-7.2-2.2-11.7-6.7S10.4,19.9,12.4,17.9z\"\n }));\n}\nInternationalIcon3x2.propTypes = {\n title: PropTypes.string.isRequired\n};\n\n// 1x1.\n// Using `<title/>` in `<svg/>`s:\n// https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title\nfunction InternationalIcon1x1(_ref3) {\n var title = _ref3.title,\n rest = _objectWithoutProperties(_ref3, _excluded3);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({}, rest, {\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 50 50\"\n }), /*#__PURE__*/React.createElement(\"title\", null, title), /*#__PURE__*/React.createElement(\"g\", {\n className: \"PhoneInputInternationalIconGlobe\",\n stroke: \"currentColor\",\n fill: \"none\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M8.45,13A21.44,21.44,0,1,1,37.08,41.56\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86\"\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54\"\n }), /*#__PURE__*/React.createElement(\"line\", {\n x1: \"27.8\",\n y1: \"0.85\",\n x2: \"27.8\",\n y2: \"34.61\"\n }), /*#__PURE__*/React.createElement(\"line\", {\n x1: \"15.2\",\n y1: \"22.23\",\n x2: \"49.15\",\n y2: \"22.23\"\n })), /*#__PURE__*/React.createElement(\"path\", {\n className: \"PhoneInputInternationalIconPhone\",\n stroke: \"transparent\",\n fill: \"currentColor\",\n d: \"M9.42,26.64c2.22-2.22,4.15-3.59.22-8.49S3.08,17,.93,19.17c-2.49,2.48-.13,11.74,9,20.89s18.41,11.5,20.89,9c2.15-2.15,5.91-4.77,1-8.71s-6.27-2-8.49.22c-1.55,1.55-5.48-1.69-8.86-5.08S7.87,28.19,9.42,26.64Z\"\n }));\n}\nInternationalIcon1x1.propTypes = {\n title: PropTypes.string.isRequired\n};\n//# sourceMappingURL=InternationalIcon.js.map","// Tells if `value: string` is an `E.164` phone number.\n//\n// Returns a boolean.\n//\n// It doesn't validate that the minimum national (significant) number length\n// is at least 2 characters.\n//\nexport default function isE164Number(value) {\n if (value.length < 2) {\n return false;\n }\n if (value[0] !== '+') {\n return false;\n }\n var i = 1;\n while (i < value.length) {\n var character = value.charCodeAt(i);\n if (character >= 48 && character <= 57) {\n // Is a digit.\n } else {\n return false;\n }\n i++;\n }\n return true;\n}\nexport function validateE164Number(value) {\n if (!isE164Number(value)) {\n console.error('[react-phone-number-input] Expected the initial `value` to be a E.164 phone number. Got', value);\n }\n}\n//# sourceMappingURL=isE164Number.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\n// Ignores weird istanbul error: \"else path not taken\".\nimport { isSupportedCountry } from 'libphonenumber-js/core';\nexport { getCountries } from 'libphonenumber-js/core';\n\n/**\r\n * Sorts country `<select/>` options.\r\n * Can move some country `<select/>` options\r\n * to the top of the list, for example.\r\n * @param {object[]} countryOptions — Country `<select/>` options.\r\n * @param {string[]} [countryOptionsOrder] — Country `<select/>` options order. Example: `[\"US\", \"CA\", \"AU\", \"|\", \"...\"]`.\r\n * @return {object[]}\r\n */\nexport function sortCountryOptions(options, order) {\n if (!order) {\n return options;\n }\n var optionsOnTop = [];\n var optionsOnBottom = [];\n var appendTo = optionsOnTop;\n var _loop = function _loop() {\n var element = _step.value;\n if (element === '|') {\n appendTo.push({\n divider: true\n });\n } else if (element === '...' || element === '…') {\n appendTo = optionsOnBottom;\n } else {\n var countryCode;\n if (element === 'ðŸŒ') {\n countryCode = undefined;\n } else {\n countryCode = element;\n }\n // Find the position of the option.\n var index = options.indexOf(options.filter(function (option) {\n return option.value === countryCode;\n })[0]);\n // Get the option.\n var option = options[index];\n // Remove the option from its default position.\n options.splice(index, 1);\n // Add the option on top.\n appendTo.push(option);\n }\n };\n for (var _iterator = _createForOfIteratorHelperLoose(order), _step; !(_step = _iterator()).done;) {\n _loop();\n }\n return optionsOnTop.concat(options).concat(optionsOnBottom);\n}\nexport function getSupportedCountryOptions(countryOptions, metadata) {\n if (countryOptions) {\n countryOptions = countryOptions.filter(function (option) {\n switch (option) {\n case 'ðŸŒ':\n case '|':\n case '...':\n case '…':\n return true;\n default:\n return isCountrySupportedWithError(option, metadata);\n }\n });\n if (countryOptions.length > 0) {\n return countryOptions;\n }\n }\n}\nexport function isCountrySupportedWithError(country, metadata) {\n if (isSupportedCountry(country, metadata)) {\n return true;\n } else {\n console.error(\"Country not found: \".concat(country));\n return false;\n }\n}\nexport function getSupportedCountries(countries, metadata) {\n if (countries) {\n countries = countries.filter(function (country) {\n return isCountrySupportedWithError(country, metadata);\n });\n if (countries.length === 0) {\n countries = undefined;\n }\n }\n return countries;\n}\n//# sourceMappingURL=countries.js.map","var _excluded = [\"country\", \"label\", \"aspectRatio\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport DefaultInternationalIcon from './InternationalIcon.js';\nimport Flag from './Flag.js';\nexport function createCountryIconComponent(_ref) {\n var flags = _ref.flags,\n flagUrl = _ref.flagUrl,\n FlagComponent = _ref.flagComponent,\n InternationalIcon = _ref.internationalIcon;\n function CountryIcon(_ref2) {\n var country = _ref2.country,\n label = _ref2.label,\n aspectRatio = _ref2.aspectRatio,\n rest = _objectWithoutProperties(_ref2, _excluded);\n // `aspectRatio` is currently a hack for the default \"International\" icon\n // to render it as a square when Unicode flag icons are used.\n // So `aspectRatio` property is only used with the default \"International\" icon.\n var _aspectRatio = InternationalIcon === DefaultInternationalIcon ? aspectRatio : undefined;\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, rest, {\n className: classNames('PhoneInputCountryIcon', {\n 'PhoneInputCountryIcon--square': _aspectRatio === 1,\n 'PhoneInputCountryIcon--border': country\n })\n }), country ? /*#__PURE__*/React.createElement(FlagComponent, {\n country: country,\n countryName: label,\n flags: flags,\n flagUrl: flagUrl,\n className: \"PhoneInputCountryIconImg\"\n }) : /*#__PURE__*/React.createElement(InternationalIcon, {\n title: label,\n aspectRatio: _aspectRatio,\n className: \"PhoneInputCountryIconImg\"\n }));\n }\n CountryIcon.propTypes = {\n country: PropTypes.string,\n label: PropTypes.string.isRequired,\n aspectRatio: PropTypes.number\n };\n return CountryIcon;\n}\nexport default createCountryIconComponent({\n // Must be equal to `defaultProps.flagUrl` in `./PhoneInputWithCountry.js`.\n flagUrl: 'https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg',\n flagComponent: Flag,\n internationalIcon: DefaultInternationalIcon\n});\n//# sourceMappingURL=CountryIcon.js.map","function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { useRef, useCallback } from 'react';\n\n/**\r\n * This hook creates an internal copy of a `ref`\r\n * and returns a new `ref`-alike setter function\r\n * that updates both `ref` and the internal copy of it.\r\n * That `ref`-alike setter function could then be passed\r\n * to child elements instead of the original `ref`.\r\n *\r\n * The internal copy of the `ref` can then be used to\r\n * call instance methods like `.focus()`, etc.\r\n *\r\n * One may ask: why create a copy of `ref` for \"internal\" use\r\n * when the code could use the original `ref` for that.\r\n * The answer is: the code would have to dance around the original `ref` anyway\r\n * to figure out whether it exists and to find out the internal implementation of it\r\n * in order to read its value correctly. This hook encapsulates all that \"boilerplate\" code.\r\n * The returned copy of the `ref` is guaranteed to exist and functions as a proper ref \"object\".\r\n * The returned `ref`-alike setter function must be used instead of the original `ref`\r\n * when passing it to child elements.\r\n *\r\n * @param {(object|function)} [externalRef] — The original `ref` that may have any internal implementation and might not even exist.\r\n * @return {any[]} Returns an array of two elements: a copy of the `ref` for \"internal\" use and a `ref`-alike setter function that should be used in-place of the original `ref` when passing it to child elements.\r\n */\nexport default function useExternalRef(externalRef) {\n // Create a copy of the original `ref` (which might not exist).\n // Both refs will point to the same value.\n var refCopy = useRef();\n\n // Updates both `ref`s with the same `value`.\n var refSetter = useCallback(function (value) {\n setRefsValue([externalRef, refCopy], value);\n }, [externalRef, refCopy]);\n return [refCopy, refSetter];\n}\n\n// Sets the same `value` of all `ref`s.\n// Some of the `ref`s may not exist in which case they'll be skipped.\nexport function setRefsValue(refs, value) {\n for (var _iterator = _createForOfIteratorHelperLoose(refs), _step; !(_step = _iterator()).done;) {\n var ref = _step.value;\n if (ref) {\n setRefValue(ref, value);\n }\n }\n}\n\n// Sets the value of a `ref`.\n// Before React Hooks were introduced, `ref`s used to be functions.\n// After React Hooks were introduces, `ref`s became objects with `.current` property.\n// This function sets a `ref`'s value regardless of its internal implementation,\n// so it supports both types of `ref`s.\nfunction setRefValue(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else {\n ref.current = value;\n }\n}\n//# sourceMappingURL=useExternalRef.js.map","import { getCountryCallingCode, Metadata } from 'libphonenumber-js/core';\nvar ONLY_DIGITS_REGEXP = /^\\d+$/;\nexport default function getInternationalPhoneNumberPrefix(country, metadata) {\n // Standard international phone number prefix: \"+\" and \"country calling code\".\n var prefix = '+' + getCountryCallingCode(country, metadata);\n\n // \"Leading digits\" can't be used to rule out any countries.\n // So the \"pre-fill with leading digits on country selection\" feature had to be reverted.\n // https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/10#note_1231042367\n // // Get \"leading digits\" for a phone number of the country.\n // // If there're \"leading digits\" then they can be part of the prefix too.\n // // https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/10\n // metadata = new Metadata(metadata)\n // metadata.selectNumberingPlan(country)\n // // \"Leading digits\" patterns are only defined for about 20% of all countries.\n // // By definition, matching \"leading digits\" is a sufficient but not a necessary\n // // condition for a phone number to belong to a country.\n // // The point of \"leading digits\" check is that it's the fastest one to get a match.\n // // https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/METADATA.md#leading_digits\n // const leadingDigits = metadata.numberingPlan.leadingDigits()\n // if (leadingDigits && ONLY_DIGITS_REGEXP.test(leadingDigits)) {\n // \tprefix += leadingDigits\n // }\n\n return prefix;\n}\n//# sourceMappingURL=getInternationalPhoneNumberPrefix.js.map","import parsePhoneNumber_, { getCountryCallingCode, AsYouType, Metadata } from 'libphonenumber-js/core';\nimport getInternationalPhoneNumberPrefix from './getInternationalPhoneNumberPrefix.js';\n\n/**\r\n * Decides which country should be pre-selected\r\n * when the phone number input component is first mounted.\r\n * @param {object?} phoneNumber - An instance of `PhoneNumber` class.\r\n * @param {string?} country - Pre-defined country (two-letter code).\r\n * @param {string[]?} countries - A list of countries available.\r\n * @param {object} metadata - `libphonenumber-js` metadata\r\n * @return {string?}\r\n */\nexport function getPreSelectedCountry(_ref) {\n var value = _ref.value,\n phoneNumber = _ref.phoneNumber,\n defaultCountry = _ref.defaultCountry,\n getAnyCountry = _ref.getAnyCountry,\n countries = _ref.countries,\n required = _ref.required,\n metadata = _ref.metadata;\n var country;\n\n // If can get country from E.164 phone number\n // then it overrides the `country` passed (or not passed).\n if (phoneNumber && phoneNumber.country) {\n // `country` will be left `undefined` in case of non-detection.\n country = phoneNumber.country;\n } else if (defaultCountry) {\n if (!value || couldNumberBelongToCountry(value, defaultCountry, metadata)) {\n country = defaultCountry;\n }\n }\n\n // Only pre-select a country if it's in the available `countries` list.\n if (countries && countries.indexOf(country) < 0) {\n country = undefined;\n }\n\n // If there will be no \"International\" option\n // then some `country` must be selected.\n // It will still be the wrong country though.\n // But still country `<select/>` can't be left in a broken state.\n if (!country && required && countries && countries.length > 0) {\n country = getAnyCountry();\n // noCountryMatchesTheNumber = true\n }\n return country;\n}\n\n/**\r\n * Generates a sorted list of country `<select/>` options.\r\n * @param {string[]} countries - A list of two-letter (\"ISO 3166-1 alpha-2\") country codes.\r\n * @param {object} labels - Custom country labels. E.g. `{ RU: 'РоÑÑиÑ', US: 'СШÐ', ... }`.\r\n * @param {boolean} addInternationalOption - Whether should include \"International\" option at the top of the list.\r\n * @return {object[]} A list of objects having shape `{ value : string, label : string }`.\r\n */\nexport function getCountrySelectOptions(_ref2) {\n var countries = _ref2.countries,\n countryNames = _ref2.countryNames,\n addInternationalOption = _ref2.addInternationalOption,\n compareStringsLocales = _ref2.compareStringsLocales,\n _compareStrings = _ref2.compareStrings;\n // Default country name comparator uses `String.localeCompare()`.\n if (!_compareStrings) {\n _compareStrings = compareStrings;\n }\n\n // Generates a `<Select/>` option for each country.\n var countrySelectOptions = countries.map(function (country) {\n return {\n value: country,\n // All `locale` country names included in this library\n // include all countries (this is checked at build time).\n // The only case when a country name might be missing\n // is when a developer supplies their own `labels` property.\n // To guard against such cases, a missing country name\n // is substituted by country code.\n label: countryNames[country] || country\n };\n });\n\n // Sort the list of countries alphabetically.\n countrySelectOptions.sort(function (a, b) {\n return _compareStrings(a.label, b.label, compareStringsLocales);\n });\n\n // Add the \"International\" option to the country list (if suitable)\n if (addInternationalOption) {\n countrySelectOptions.unshift({\n label: countryNames.ZZ\n });\n }\n return countrySelectOptions;\n}\n\n/**\r\n * Parses a E.164 phone number to an instance of `PhoneNumber` class.\r\n * @param {string?} value = E.164 phone number.\r\n * @param {object} metadata - `libphonenumber-js` metadata\r\n * @return {object} Object having shape `{ country: string?, countryCallingCode: string, number: string }`. `PhoneNumber`: https://gitlab.com/catamphetamine/libphonenumber-js#phonenumber.\r\n * @example\r\n * parsePhoneNumber('+78005553535')\r\n */\nexport function parsePhoneNumber(value, metadata) {\n return parsePhoneNumber_(value || '', metadata);\n}\n\n/**\r\n * Generates national number digits for a parsed phone.\r\n * May prepend national prefix.\r\n * The phone number must be a complete and valid phone number.\r\n * @param {object} phoneNumber - An instance of `PhoneNumber` class.\r\n * @param {object} metadata - `libphonenumber-js` metadata\r\n * @return {string}\r\n * @example\r\n * getNationalNumberDigits({ country: 'RU', phone: '8005553535' })\r\n * // returns '88005553535'\r\n */\nexport function generateNationalNumberDigits(phoneNumber) {\n return phoneNumber.formatNational().replace(/\\D/g, '');\n}\n\n/**\r\n * Migrates parsed `<input/>` `value` for the newly selected `country`.\r\n * @param {string?} phoneDigits - Phone number digits (and `+`) parsed from phone number `<input/>` (it's not the same as the `value` property).\r\n * @param {string?} prevCountry - Previously selected country.\r\n * @param {string?} newCountry - Newly selected country. Can't be same as previously selected country.\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @param {boolean} useNationalFormat - whether should attempt to convert from international to national number for the new country.\r\n * @return {string?}\r\n */\nexport function getPhoneDigitsForNewCountry(phoneDigits, _ref3) {\n var prevCountry = _ref3.prevCountry,\n newCountry = _ref3.newCountry,\n metadata = _ref3.metadata,\n useNationalFormat = _ref3.useNationalFormat;\n if (prevCountry === newCountry) {\n return phoneDigits;\n }\n\n // If `parsed_input` is empty\n // then no need to migrate anything.\n if (!phoneDigits) {\n if (useNationalFormat) {\n return '';\n } else {\n if (newCountry) {\n // If `phoneDigits` is empty then set `phoneDigits` to\n // `+{getCountryCallingCode(newCountry)}`.\n return getInternationalPhoneNumberPrefix(newCountry, metadata);\n }\n return '';\n }\n }\n\n // If switching to some country.\n // (from \"International\" or another country)\n // If switching from \"International\" then `phoneDigits` starts with a `+`.\n // Otherwise it may or may not start with a `+`.\n if (newCountry) {\n // If the phone number was entered in international format\n // then migrate it to the newly selected country.\n // The phone number may be incomplete.\n // The phone number entered not necessarily starts with\n // the previously selected country phone prefix.\n if (phoneDigits[0] === '+') {\n // If the international phone number is for the new country\n // then convert it to local if required.\n if (useNationalFormat) {\n // // If a phone number is being input in international form\n // // and the country can already be derived from it,\n // // and if it is the new country, then format as a national number.\n // const derived_country = getCountryFromPossiblyIncompleteInternationalPhoneNumber(phoneDigits, metadata)\n // if (derived_country === newCountry) {\n // \treturn stripCountryCallingCode(phoneDigits, derived_country, metadata)\n // }\n\n // Actually, the two countries don't necessarily need to match:\n // the condition could be looser here, because several countries\n // might share the same international phone number format\n // (for example, \"NANPA\" countries like US, Canada, etc).\n // The looser condition would be just \"same nternational phone number format\"\n // which would mean \"same country calling code\" in the context of `libphonenumber-js`.\n if (phoneDigits.indexOf('+' + getCountryCallingCode(newCountry, metadata)) === 0) {\n return stripCountryCallingCode(phoneDigits, newCountry, metadata);\n }\n\n // Simply discard the previously entered international phone number,\n // because otherwise any \"smart\" transformation like getting the\n // \"national (significant) number\" part and then prepending the\n // newly selected country's \"country calling code\" to it\n // would just be confusing for a user without being actually useful.\n return '';\n\n // // Simply strip the leading `+` character\n // // therefore simply converting all digits into a \"local\" phone number.\n // // https://github.com/catamphetamine/react-phone-number-input/issues/287\n // return phoneDigits.slice(1)\n }\n if (prevCountry) {\n var newCountryPrefix = getInternationalPhoneNumberPrefix(newCountry, metadata);\n if (phoneDigits.indexOf(newCountryPrefix) === 0) {\n return phoneDigits;\n } else {\n return newCountryPrefix;\n }\n } else {\n var defaultValue = getInternationalPhoneNumberPrefix(newCountry, metadata);\n // If `phoneDigits`'s country calling code part is the same\n // as for the new `country`, then leave `phoneDigits` as is.\n if (phoneDigits.indexOf(defaultValue) === 0) {\n return phoneDigits;\n }\n // If `phoneDigits`'s country calling code part is not the same\n // as for the new `country`, then set `phoneDigits` to\n // `+{getCountryCallingCode(newCountry)}`.\n return defaultValue;\n }\n\n // // If the international phone number already contains\n // // any country calling code then trim the country calling code part.\n // // (that could also be the newly selected country phone code prefix as well)\n // // `phoneDigits` doesn't neccessarily belong to `prevCountry`.\n // // (e.g. if a user enters an international number\n // // not belonging to any of the reduced `countries` list).\n // phoneDigits = stripCountryCallingCode(phoneDigits, prevCountry, metadata)\n\n // // Prepend country calling code prefix\n // // for the newly selected country.\n // return e164(phoneDigits, newCountry, metadata) || `+${getCountryCallingCode(newCountry, metadata)}`\n }\n }\n // If switching to \"International\" from a country.\n else {\n // If the phone number was entered in national format.\n if (phoneDigits[0] !== '+') {\n // Format the national phone number as an international one.\n // The phone number entered not necessarily even starts with\n // the previously selected country phone prefix.\n // Even if the phone number belongs to whole another country\n // it will still be parsed into some national phone number.\n //\n // Ignore the now-uncovered `|| ''` code branch:\n // previously `e164()` function could return an empty string\n // even when `phoneDigits` were not empty.\n // Now it always returns some `value` when there're any `phoneDigits`.\n // Still, didn't remove the `|| ''` code branch just in case\n // that logic changes somehow in some future, so there're no\n // possible bugs related to that.\n //\n // (ignore the `|| ''` code branch)\n /* istanbul ignore next */\n return e164(phoneDigits, prevCountry, metadata) || '';\n }\n }\n return phoneDigits;\n}\n\n/**\r\n * Converts phone number digits to a (possibly incomplete) E.164 phone number.\r\n * @param {string?} number - A possibly incomplete phone number digits string. Can be a possibly incomplete E.164 phone number.\r\n * @param {string?} country\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @return {string?}\r\n */\nexport function e164(number, country, metadata) {\n if (!number) {\n return;\n }\n // If the phone number is being input in international format.\n if (number[0] === '+') {\n // If it's just the `+` sign then return nothing.\n if (number === '+') {\n return;\n }\n // Return a E.164 phone number.\n //\n // Could return `number` \"as is\" here, but there's a possibility\n // that some user might incorrectly input an international number\n // with a \"national prefix\". Such numbers aren't considered valid,\n // but `libphonenumber-js` is \"forgiving\" when it comes to parsing\n // user's input, and this input component follows that behavior.\n //\n var asYouType = new AsYouType(country, metadata);\n asYouType.input(number);\n // This function would return `undefined` only when `number` is `\"+\"`,\n // but at this point it is known that `number` is not `\"+\"`.\n return asYouType.getNumberValue();\n }\n // For non-international phone numbers\n // an accompanying country code is required.\n // The situation when `country` is `undefined`\n // and a non-international phone number is passed\n // to this function shouldn't happen.\n if (!country) {\n return;\n }\n var partial_national_significant_number = getNationalSignificantNumberDigits(number, country, metadata);\n //\n // Even if no \"national (significant) number\" digits have been input,\n // still return a non-`undefined` value.\n // https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/113\n //\n // For example, if the user has selected country `US` and entered `\"1\"`\n // then that `\"1\"` is just a \"national prefix\" and no \"national (significant) number\"\n // digits have been input yet. Still, return `\"+1\"` as `value` in such cases,\n // because otherwise the app would think that the input is empty and mark it as such\n // while in reality it isn't empty, which might be thought of as a \"bug\", or just\n // a \"weird\" behavior.\n //\n // if (partial_national_significant_number) {\n return \"+\".concat(getCountryCallingCode(country, metadata)).concat(partial_national_significant_number || '');\n // }\n}\n\n/**\r\n * Trims phone number digits if they exceed the maximum possible length\r\n * for a national (significant) number for the country.\r\n * @param {string} number - A possibly incomplete phone number digits string. Can be a possibly incomplete E.164 phone number.\r\n * @param {string} country\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @return {string} Can be empty.\r\n */\nexport function trimNumber(number, country, metadata) {\n var nationalSignificantNumberPart = getNationalSignificantNumberDigits(number, country, metadata);\n if (nationalSignificantNumberPart) {\n var overflowDigitsCount = nationalSignificantNumberPart.length - getMaxNumberLength(country, metadata);\n if (overflowDigitsCount > 0) {\n return number.slice(0, number.length - overflowDigitsCount);\n }\n }\n return number;\n}\nfunction getMaxNumberLength(country, metadata) {\n // Get \"possible lengths\" for a phone number of the country.\n metadata = new Metadata(metadata);\n metadata.selectNumberingPlan(country);\n // Return the last \"possible length\".\n return metadata.numberingPlan.possibleLengths()[metadata.numberingPlan.possibleLengths().length - 1];\n}\n\n// If the phone number being input is an international one\n// then tries to derive the country from the phone number.\n// (regardless of whether there's any country currently selected)\n/**\r\n * @param {string} partialE164Number - A possibly incomplete E.164 phone number.\r\n * @param {string?} country - Currently selected country.\r\n * @param {string[]?} countries - A list of available countries. If not passed then \"all countries\" are assumed.\r\n * @param {string?} defaultCountry — Default country.\r\n * @param {string?} latestCountrySelectedByUser — The latest country that has been manually selected by the user.\r\n * @param {boolean?} required — Whether \"International\" option could be selected, meaning \"no country is selected\".\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @return {string?}\r\n */\nexport function getCountryForPartialE164Number(partialE164Number, _ref4) {\n var country = _ref4.country,\n countries = _ref4.countries,\n defaultCountry = _ref4.defaultCountry,\n latestCountrySelectedByUser = _ref4.latestCountrySelectedByUser,\n required = _ref4.required,\n metadata = _ref4.metadata;\n // `partialE164Number` is supposed to be an E.164 phone number.\n\n // `partialE164Number` is supposed to be non-empty when calling this function\n // so it doesn't check for `if (!partialE164Number)`.\n\n if (partialE164Number === '+') {\n // Don't change the currently selected country yet.\n return country;\n }\n var derived_country = getCountryFromPossiblyIncompleteInternationalPhoneNumber(partialE164Number, metadata);\n\n // If a phone number is being input in international form\n // and the country can already be derived from it,\n // then select that country.\n if (derived_country) {\n if (!countries || countries.indexOf(derived_country) >= 0) {\n return derived_country;\n } else {\n return undefined;\n }\n }\n // Otherwise, if the phone number doesn't correspond to any particular country.\n // If some country was previously selected.\n else if (country) {\n // If the international phone number entered could still correspond to the previously selected country\n // and also to some other country or countries corresponding to the same calling code\n // then it should reset the currently selected country to reflect the ambiguity.\n if (couldNumberBelongToCountry(partialE164Number, country, metadata)) {\n // Reset the country either to the latest one that was manually selected by the user\n // or to the default country or just reset the country selection.\n if (latestCountrySelectedByUser && couldNumberBelongToCountry(partialE164Number, latestCountrySelectedByUser, metadata)) {\n return latestCountrySelectedByUser;\n } else if (defaultCountry && couldNumberBelongToCountry(partialE164Number, defaultCountry, metadata)) {\n return defaultCountry;\n } else {\n if (!required) {\n // Just reset the currently selected country.\n return undefined;\n }\n }\n } else {\n // If \"International\" country option has not been disabled\n // and the international phone number entered doesn't necessarily correspond to\n // the currently selected country and it could not possibly correspond to it\n // then reset the currently selected country.\n if (!required) {\n return undefined;\n }\n }\n }\n\n // Don't change the currently selected country.\n return country;\n}\n\n/**\r\n * Parses `<input/>` value. Derives `country` from `input`. Derives an E.164 `value`.\r\n * @param {string?} phoneDigits — Parsed `<input/>` value. Examples: `\"\"`, `\"+\"`, `\"+123\"`, `\"123\"`.\r\n * @param {string?} prevPhoneDigits — Previous parsed `<input/>` value. Examples: `\"\"`, `\"+\"`, `\"+123\"`, `\"123\"`.\r\n * @param {string?} country - Currently selected country.\r\n * @param {string?} defaultCountry - Default country.\r\n * @param {string?} latestCountrySelectedByUser - The latest country that has been manually selected by the user.\r\n * @param {boolean} countryRequired - Is selecting some country required.\r\n * @param {function} getAnyCountry - Can be used to get any country when selecting some country required.\r\n * @param {string[]?} countries - A list of available countries. If not passed then \"all countries\" are assumed.\r\n * @param {boolean} international - Set to `true` to force international phone number format (leading `+`). Set to `false` to force \"national\" phone number format. Is `undefined` by default.\r\n * @param {boolean} limitMaxLength — Whether to enable limiting phone number max length.\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @return {object} An object of shape `{ phoneDigits, country, value }`. `phoneDigits` returned here are a \"normalized\" version of the original `phoneDigits`. The returned `phoneDigits` shouldn't be used anywhere except for passing it as `prevPhoneDigits` parameter to this same function on next input change event.\r\n */\nexport function onPhoneDigitsChange(phoneDigits, _ref5) {\n var prevPhoneDigits = _ref5.prevPhoneDigits,\n country = _ref5.country,\n defaultCountry = _ref5.defaultCountry,\n latestCountrySelectedByUser = _ref5.latestCountrySelectedByUser,\n countryRequired = _ref5.countryRequired,\n getAnyCountry = _ref5.getAnyCountry,\n countries = _ref5.countries,\n international = _ref5.international,\n limitMaxLength = _ref5.limitMaxLength,\n countryCallingCodeEditable = _ref5.countryCallingCodeEditable,\n metadata = _ref5.metadata;\n // When the input is in `international` and `countryCallingCodeEditable={false}` mode,\n // the `country` should not change. If the user attempted to overwrite the country callling code part,\n // the component should reset it back to the correct country calling code for the `country`.\n if (international && countryCallingCodeEditable === false) {\n if (country) {\n // For international phone numbers written with non-editable country calling code,\n // the `<input/>` value must always start with that non-editable country calling code.\n var prefix = getInternationalPhoneNumberPrefix(country, metadata);\n // If the input value doesn't start with the non-editable country calling code,\n // it should be fixed.\n if (phoneDigits.indexOf(prefix) !== 0) {\n var _value;\n // If a phone number input is declared as\n // `international: true` and `countryCallingCodeEditable: false`,\n // then the value of the `<input/>` is gonna be non-empty at all times,\n // even before the user has started to input any digits in the input field,\n // because the country calling code is always there by design.\n //\n // The fact that the input value is always non-empty results in a side effect:\n // whenever a user tabs into such input field, its value gets automatically selected.\n // If at that moment in time the user starts typing in the national digits of the phone number,\n // the selected `<input/>` value gets automatically replaced by those typed-in digits\n // so the value changes from `+xxx` to `y`, because inputting anything while having\n // the `<input/>` value selected results in erasing that `<input/>` value.\n //\n // This component handles such cases by restoring the `<input/>` value to what\n // it should be in such cases: `+xxxy`.\n // https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/43\n //\n var hasStartedTypingInNationalNumberDigitsHavingInputValueSelected = phoneDigits && phoneDigits[0] !== '+';\n if (hasStartedTypingInNationalNumberDigitsHavingInputValueSelected) {\n // Fix the input value to what it should be: `y` → `+xxxy`.\n phoneDigits = prefix + phoneDigits;\n _value = e164(phoneDigits, country, metadata);\n } else {\n // In other cases, simply reset the `<input/>` value, because there're only two\n // possible cases:\n // * The user has selected the `<input/>` value and then hit Delete/Backspace to erase it.\n // * The user has pasted an international phone number for another country calling code,\n // which is considered a non-valid value.\n phoneDigits = prefix;\n }\n return {\n phoneDigits: phoneDigits,\n value: _value,\n country: country\n };\n }\n }\n }\n\n // If `international` property is `false`, then it means\n // \"enforce national-only format during input\",\n // so, if that's the case, then remove all `+` characters,\n // but only if some country is currently selected.\n // (not if \"International\" country is selected).\n if (international === false && country && phoneDigits && phoneDigits[0] === '+') {\n phoneDigits = convertInternationalPhoneDigitsToNational(phoneDigits, country, metadata);\n }\n\n // Trim the input to not exceed the maximum possible number length.\n if (phoneDigits && country && limitMaxLength) {\n phoneDigits = trimNumber(phoneDigits, country, metadata);\n }\n\n // If this `onChange()` event was triggered\n // as a result of selecting \"International\" country,\n // then force-prepend a `+` sign if the phone number\n // `<input/>` value isn't in international format.\n // Also, force-prepend a `+` sign if international\n // phone number input format is set.\n if (phoneDigits && phoneDigits[0] !== '+' && (!country || international)) {\n phoneDigits = '+' + phoneDigits;\n }\n\n // If the previously entered phone number\n // has been entered in international format\n // and the user decides to erase it,\n // then also reset the `country`\n // because it was most likely automatically selected\n // while the user was typing in the phone number\n // in international format.\n // This fixes the issue when a user is presented\n // with a phone number input with no country selected\n // and then types in their local phone number\n // then discovers that the input's messed up\n // (a `+` has been prepended at the start of their input\n // and a random country has been selected),\n // decides to undo it all by erasing everything\n // and then types in their local phone number again\n // resulting in a seemingly correct phone number\n // but in reality that phone number has incorrect country.\n // https://github.com/catamphetamine/react-phone-number-input/issues/273\n if (!phoneDigits && prevPhoneDigits && prevPhoneDigits[0] === '+') {\n if (international) {\n country = undefined;\n } else {\n country = defaultCountry;\n }\n }\n // Also resets such \"randomly\" selected country\n // as soon as the user erases the number\n // digit-by-digit up to the leading `+` sign.\n if (phoneDigits === '+' && prevPhoneDigits && prevPhoneDigits[0] === '+' && prevPhoneDigits.length > '+'.length) {\n country = undefined;\n }\n\n // Generate the new `value` property.\n var value;\n if (phoneDigits) {\n if (phoneDigits[0] === '+') {\n if (phoneDigits === '+') {\n value = undefined;\n } else if (country && getInternationalPhoneNumberPrefix(country, metadata).indexOf(phoneDigits) === 0) {\n // Selected a `country` and started inputting an\n // international phone number for this country\n // but hasn't input any \"national (significant) number\" digits yet.\n // In that case, assume `value` be `undefined`.\n //\n // For example, if selected `country` `\"US\"`\n // and started inputting phone number `\"+1\"`\n // then `value` `undefined` will be returned from this function.\n //\n value = undefined;\n } else {\n value = e164(phoneDigits, country, metadata);\n }\n } else {\n value = e164(phoneDigits, country, metadata);\n }\n }\n\n // Derive the country from the phone number.\n // (regardless of whether there's any country currently selected,\n // because there could be several countries corresponding to one country calling code)\n if (value) {\n country = getCountryForPartialE164Number(value, {\n country: country,\n countries: countries,\n defaultCountry: defaultCountry,\n latestCountrySelectedByUser: latestCountrySelectedByUser,\n // `countryRequired` flag is not passed here.\n // Instead, it's explicitly checked a bit later in the code.\n required: false,\n metadata: metadata\n });\n // If `international` property is `false`, then it means\n // \"enforce national-only format during input\",\n // so, if that's the case, then remove all `+` characters,\n // but only if some country is currently selected.\n // (not if \"International\" country is selected).\n if (international === false && country && phoneDigits && phoneDigits[0] === '+') {\n phoneDigits = convertInternationalPhoneDigitsToNational(phoneDigits, country, metadata);\n // Re-calculate `value` because `phoneDigits` has changed.\n value = e164(phoneDigits, country, metadata);\n }\n }\n if (!country && countryRequired) {\n country = defaultCountry || getAnyCountry();\n }\n return {\n // `phoneDigits` returned here are a \"normalized\" version of the original `phoneDigits`.\n // The returned `phoneDigits` shouldn't be used anywhere except for passing it as\n // `prevPhoneDigits` parameter to this same function on next input change event.\n phoneDigits: phoneDigits,\n country: country,\n value: value\n };\n}\nfunction convertInternationalPhoneDigitsToNational(input, country, metadata) {\n // Handle the case when a user might have pasted\n // a phone number in international format.\n if (input.indexOf(getInternationalPhoneNumberPrefix(country, metadata)) === 0) {\n // Create \"as you type\" formatter.\n var formatter = new AsYouType(country, metadata);\n // Input partial national phone number.\n formatter.input(input);\n // Return the parsed partial national phone number.\n var phoneNumber = formatter.getNumber();\n if (phoneNumber) {\n // Transform the number to a national one,\n // and remove all non-digits.\n return phoneNumber.formatNational().replace(/\\D/g, '');\n } else {\n return '';\n }\n } else {\n // Just remove the `+` sign.\n return input.replace(/\\D/g, '');\n }\n}\n\n/**\r\n * Determines the country for a given (possibly incomplete) E.164 phone number.\r\n * @param {string} number - A possibly incomplete E.164 phone number.\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @return {string?}\r\n */\nexport function getCountryFromPossiblyIncompleteInternationalPhoneNumber(number, metadata) {\n var formatter = new AsYouType(null, metadata);\n formatter.input(number);\n // // `001` is a special \"non-geograpical entity\" code\n // // in Google's `libphonenumber` library.\n // if (formatter.getCountry() === '001') {\n // \treturn\n // }\n return formatter.getCountry();\n}\n\n/**\r\n * Compares two strings.\r\n * A helper for `Array.sort()`.\r\n * @param {string} a — First string.\r\n * @param {string} b — Second string.\r\n * @param {(string[]|string)} [locales] — The `locales` argument of `String.localeCompare`.\r\n */\nexport function compareStrings(a, b, locales) {\n // Use `String.localeCompare` if it's available.\n // https://developer.mozilla.org/ru/docs/Web/JavaScript/Reference/Global_Objects/String/localeCompare\n // Which means everyone except IE <= 10 and Safari <= 10.\n // `localeCompare()` is available in latest Node.js versions.\n /* istanbul ignore else */\n if (String.prototype.localeCompare) {\n return a.localeCompare(b, locales);\n }\n /* istanbul ignore next */\n return a < b ? -1 : a > b ? 1 : 0;\n}\n\n/**\r\n * Strips `+${countryCallingCode}` prefix from an E.164 phone number.\r\n * @param {string} number - (possibly incomplete) E.164 phone number.\r\n * @param {string?} country - A possible country for this phone number.\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @return {string}\r\n */\nexport function stripCountryCallingCode(number, country, metadata) {\n // Just an optimization, so that it\n // doesn't have to iterate through all country calling codes.\n if (country) {\n var countryCallingCodePrefix = '+' + getCountryCallingCode(country, metadata);\n\n // If `country` fits the actual `number`.\n if (number.length < countryCallingCodePrefix.length) {\n if (countryCallingCodePrefix.indexOf(number) === 0) {\n return '';\n }\n } else {\n if (number.indexOf(countryCallingCodePrefix) === 0) {\n return number.slice(countryCallingCodePrefix.length);\n }\n }\n }\n\n // If `country` doesn't fit the actual `number`.\n // Try all available country calling codes.\n for (var _i = 0, _Object$keys = Object.keys(metadata.country_calling_codes); _i < _Object$keys.length; _i++) {\n var country_calling_code = _Object$keys[_i];\n if (number.indexOf(country_calling_code) === '+'.length) {\n return number.slice('+'.length + country_calling_code.length);\n }\n }\n return '';\n}\n\n/**\r\n * Parses a partially entered national phone number digits\r\n * (or a partially entered E.164 international phone number)\r\n * and returns the national significant number part.\r\n * National significant number returned doesn't come with a national prefix.\r\n * @param {string} number - National number digits. Or possibly incomplete E.164 phone number.\r\n * @param {string?} country\r\n * @param {object} metadata - `libphonenumber-js` metadata.\r\n * @return {string} [result]\r\n */\nexport function getNationalSignificantNumberDigits(number, country, metadata) {\n // Create \"as you type\" formatter.\n var formatter = new AsYouType(country, metadata);\n // Input partial national phone number.\n formatter.input(number);\n // Return the parsed partial national phone number.\n var phoneNumber = formatter.getNumber();\n return phoneNumber && phoneNumber.nationalNumber;\n}\n\n/**\r\n * Checks if a partially entered E.164 phone number could belong to a country.\r\n * @param {string} number\r\n * @param {string} country\r\n * @return {boolean}\r\n */\nexport function couldNumberBelongToCountry(number, country, metadata) {\n var intlPhoneNumberPrefix = getInternationalPhoneNumberPrefix(country, metadata);\n var i = 0;\n while (i < number.length && i < intlPhoneNumberPrefix.length) {\n if (number[i] !== intlPhoneNumberPrefix[i]) {\n return false;\n }\n i++;\n }\n return true;\n}\n\n/**\r\n * Gets initial \"phone digits\" (including `+`, if using international format).\r\n * @return {string} [phoneDigits] Returns `undefined` if there should be no initial \"phone digits\".\r\n */\nexport function getInitialPhoneDigits(_ref6) {\n var value = _ref6.value,\n phoneNumber = _ref6.phoneNumber,\n defaultCountry = _ref6.defaultCountry,\n international = _ref6.international,\n useNationalFormat = _ref6.useNationalFormat,\n metadata = _ref6.metadata;\n // If the `value` (E.164 phone number)\n // belongs to the currently selected country\n // and `useNationalFormat` is `true`\n // then convert `value` (E.164 phone number)\n // to a local phone number digits.\n // E.g. '+78005553535' -> '88005553535'.\n if ((international === false || useNationalFormat) && phoneNumber && phoneNumber.country) {\n return generateNationalNumberDigits(phoneNumber);\n }\n // If `international` property is `true`,\n // meaning \"enforce international phone number format\",\n // then always show country calling code in the input field.\n if (!value && international && defaultCountry) {\n return getInternationalPhoneNumberPrefix(defaultCountry, metadata);\n }\n return value;\n}\n\n// function doesIncompletePhoneNumberCorrespondToASingleCountry(value, metadata) {\n// \t// Create \"as you type\" formatter.\n// \tconst formatter = new AsYouType(undefined, metadata)\n// \t// Input partial national phone number.\n// \tformatter.input(value)\n// \t// Return the parsed partial national phone number.\n// \tconst phoneNumber = formatter.getNumber()\n// \tif (phoneNumber) {\n// \t\treturn phoneNumber.getPossibleCountries().length === 1\n// \t} else {\n// \t\treturn false\n// \t}\n// }\n//# sourceMappingURL=phoneInputHelpers.js.map","function _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport { getInitialPhoneDigits, getCountryForPartialE164Number, parsePhoneNumber, couldNumberBelongToCountry } from './phoneInputHelpers.js';\nimport { validateE164Number } from './isE164Number.js';\nimport getInternationalPhoneNumberPrefix from './getInternationalPhoneNumberPrefix.js';\nimport { isCountrySupportedWithError, getSupportedCountries } from './countries.js';\nexport default function getPhoneInputWithCountryStateUpdateFromNewProps(props, prevProps, state) {\n var metadata = props.metadata,\n countries = props.countries,\n newDefaultCountry = props.defaultCountry,\n newValue = props.value,\n newReset = props.reset,\n international = props.international,\n displayInitialValueAsLocalNumber = props.displayInitialValueAsLocalNumber,\n initialValueFormat = props.initialValueFormat;\n var prevDefaultCountry = prevProps.defaultCountry,\n prevValue = prevProps.value,\n prevReset = prevProps.reset;\n var country = state.country,\n value = state.value,\n hasUserSelectedACountry = state.hasUserSelectedACountry,\n latestCountrySelectedByUser = state.latestCountrySelectedByUser;\n var _getInitialPhoneDigits = function _getInitialPhoneDigits(parameters) {\n return getInitialPhoneDigits(_objectSpread(_objectSpread({}, parameters), {}, {\n international: international,\n useNationalFormat: displayInitialValueAsLocalNumber || initialValueFormat === 'national',\n metadata: metadata\n }));\n };\n\n // Some users requested a way to reset the component\n // (both number `<input/>` and country `<select/>`).\n // Whenever `reset` property changes both number `<input/>`\n // and country `<select/>` are reset.\n // It's not implemented as some instance `.reset()` method\n // because `ref` is forwarded to `<input/>`.\n // It's also not replaced with just resetting `country` on\n // external `value` reset, because a user could select a country\n // and then not input any `value`, and so the selected country\n // would be \"stuck\", if not using this `reset` property.\n // https://github.com/catamphetamine/react-phone-number-input/issues/300\n if (newReset !== prevReset) {\n return {\n phoneDigits: _getInitialPhoneDigits({\n value: undefined,\n defaultCountry: newDefaultCountry\n }),\n value: undefined,\n country: newDefaultCountry,\n latestCountrySelectedByUser: undefined,\n hasUserSelectedACountry: undefined\n };\n }\n\n // `value` is the value currently shown in the component:\n // it's stored in the component's `state`, and it's not the `value` property.\n // `prevValue` is \"previous `value` property\".\n // `newValue` is \"new `value` property\".\n\n // If the default country changed\n // (e.g. in case of ajax GeoIP detection after page loaded)\n // then select it, but only if the user hasn't already manually\n // selected a country, and no phone number has been manually entered so far.\n // Because if the user has already started inputting a phone number\n // then they're okay with no country being selected at all (\"International\")\n // and they don't want to be disturbed, don't want their input to be screwed, etc.\n if (newDefaultCountry !== prevDefaultCountry) {\n var isNewDefaultCountrySupported = !newDefaultCountry || isCountrySupportedWithError(newDefaultCountry, metadata);\n var noValueHasBeenEnteredByTheUser =\n // By default, \"no value has been entered\" means `value` is `undefined`.\n !value ||\n // When `international` is `true`, and some country has been pre-selected,\n // then the `<input/>` contains a pre-filled value of `+${countryCallingCode}${leadingDigits}`,\n // so in case of `international` being `true`, \"the user hasn't entered anything\" situation\n // doesn't just mean `value` is `undefined`, but could also mean `value` is `+${countryCallingCode}`.\n international && value === _getInitialPhoneDigits({\n value: undefined,\n defaultCountry: prevDefaultCountry\n });\n // Only update the `defaultCountry` property if no phone number\n // has been entered by the user or pre-set by the application.\n var noValueHasBeenEntered = !newValue && noValueHasBeenEnteredByTheUser;\n if (!hasUserSelectedACountry && isNewDefaultCountrySupported && noValueHasBeenEntered) {\n return {\n country: newDefaultCountry,\n // If `phoneDigits` is empty, then automatically select the new `country`\n // and set `phoneDigits` to `+{getCountryCallingCode(newCountry)}`.\n // The code assumes that \"no phone number has been entered by the user\",\n // and no `value` property has been passed, so the `phoneNumber` parameter\n // of `_getInitialPhoneDigits({ value, phoneNumber, ... })` is `undefined`.\n phoneDigits: _getInitialPhoneDigits({\n value: undefined,\n defaultCountry: newDefaultCountry\n }),\n // `value` is `undefined` and it stays so.\n value: undefined\n };\n }\n }\n\n // If a new `value` is set externally.\n // (e.g. as a result of an ajax API request\n // to get user's phone after page loaded)\n // The first part — `newValue !== prevValue` —\n // is basically `props.value !== prevProps.value`\n // so it means \"if value property was changed externally\".\n // The second part — `newValue !== value` —\n // is for ignoring the `getDerivedStateFromProps()` call\n // which happens in `this.onChange()` right after `this.setState()`.\n // If this `getDerivedStateFromProps()` call isn't ignored\n // then the country flag would reset on each input.\n if (!valuesAreEqual(newValue, prevValue) && !valuesAreEqual(newValue, value)) {\n var phoneNumber;\n var parsedCountry;\n if (newValue) {\n // Validate that the newly-supplied `value` is in `E.164` format.\n // Because sometimes people attempt to supply a `value` like \"+1 (879) 490-8676\".\n // https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/231#note_2016334796\n if (newValue) {\n validateE164Number(newValue);\n }\n phoneNumber = parsePhoneNumber(newValue, metadata);\n var supportedCountries = getSupportedCountries(countries, metadata);\n if (phoneNumber && phoneNumber.country) {\n // Ignore `else` because all countries are supported in metadata.\n /* istanbul ignore next */\n if (!supportedCountries || supportedCountries.indexOf(phoneNumber.country) >= 0) {\n parsedCountry = phoneNumber.country;\n }\n } else {\n parsedCountry = getCountryForPartialE164Number(newValue, {\n country: undefined,\n countries: supportedCountries,\n metadata: metadata\n });\n\n // In cases when multiple countries correspond to the same country calling code,\n // the phone number digits of `newValue` have to be matched against country-specific\n // regular expressions in order to determine the exact country.\n // Sometimes, that algorithm can't decide for sure which country does the phone number belong to,\n // for example when the digits of `newValue` don't match any of those regular expressions.\n // and the country of the phone number couldn't be determined.\n // In those cases, people prefer the component to show the flag of the `defaultCountry`\n // if the phone number could potentially belong to that `defaultCountry`.\n // At least that's how the component behaves when a user pastes an international\n // phone number into the input field: for example, when `defaultCountry` is `\"US\"`\n // and the user pastes value \"+1 555 555 5555\" into the input field, it keep showing \"US\" flag.\n // So when setting new `value` property externally, the component should behave the same way:\n // it should select the `defaultCountry` when the new `value` could potentially belong\n // to that country in cases when the exact country can't be determined.\n // https://github.com/catamphetamine/react-phone-number-input/issues/413#issuecomment-1536219404\n if (!parsedCountry) {\n if (newDefaultCountry) {\n if (newValue.indexOf(getInternationalPhoneNumberPrefix(newDefaultCountry, metadata)) === 0) {\n parsedCountry = newDefaultCountry;\n }\n }\n }\n }\n }\n var userCountrySelectionHistoryStateUpdate;\n if (newValue) {\n // If the latest country that has been manually selected by the user\n // no longer corresponds to the new value then reset it.\n if (latestCountrySelectedByUser) {\n var couldNewValueCorrespondToLatestCountrySelectedByUser = parsedCountry ? latestCountrySelectedByUser === parsedCountry : couldNumberBelongToCountry(newValue, latestCountrySelectedByUser, metadata);\n if (couldNewValueCorrespondToLatestCountrySelectedByUser) {\n if (!parsedCountry) {\n parsedCountry = latestCountrySelectedByUser;\n }\n } else {\n userCountrySelectionHistoryStateUpdate = {\n latestCountrySelectedByUser: undefined\n };\n }\n }\n } else {\n // When the `value` property is being reset \"externally\",\n // reset any tracking of the country that the user has previously selected.\n userCountrySelectionHistoryStateUpdate = {\n latestCountrySelectedByUser: undefined,\n hasUserSelectedACountry: undefined\n };\n }\n return _objectSpread(_objectSpread({}, userCountrySelectionHistoryStateUpdate), {}, {\n phoneDigits: _getInitialPhoneDigits({\n phoneNumber: phoneNumber,\n value: newValue,\n defaultCountry: newDefaultCountry\n }),\n value: newValue,\n country: newValue ? parsedCountry : newDefaultCountry\n });\n }\n\n // `defaultCountry` didn't change.\n // `value` didn't change.\n // `phoneDigits` didn't change, because `value` didn't change.\n //\n // So no need to update state.\n}\nexport function valuesAreEqual(value1, value2) {\n // If `value` has been set to `null` externally then convert it to `undefined`.\n //\n // For example, `react-hook-form` sets `value` to `null` when the user clears the input.\n // https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/164\n // In that case, without this conversion of `null` to `undefined`, it would reset\n // the selected country to `defaultCountry` because in that case `newValue !== value`\n // because `null !== undefined`.\n //\n // Historically, empty `value` is encoded as `undefined`.\n // Perhaps empty `value` would be better encoded as `null` instead.\n // But because that would be a potentially breaking change for some people,\n // it's left as is for the current \"major\" version of this library.\n //\n if (value1 === null) {\n value1 = undefined;\n }\n if (value2 === null) {\n value2 = undefined;\n }\n return value1 === value2;\n}\n//# sourceMappingURL=getPhoneInputWithCountryStateUpdateFromNewProps.js.map","var _excluded = [\"name\", \"disabled\", \"readOnly\", \"autoComplete\", \"style\", \"className\", \"inputRef\", \"inputComponent\", \"numberInputProps\", \"smartCaret\", \"countrySelectComponent\", \"countrySelectProps\", \"containerComponent\", \"containerComponentProps\", \"defaultCountry\", \"countries\", \"countryOptionsOrder\", \"labels\", \"flags\", \"flagComponent\", \"flagUrl\", \"addInternationalOption\", \"internationalIcon\", \"displayInitialValueAsLocalNumber\", \"initialValueFormat\", \"onCountryChange\", \"limitMaxLength\", \"countryCallingCodeEditable\", \"focusInputOnCountrySelection\", \"reset\", \"metadata\", \"international\", \"locales\"];\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(t) { var i = _toPrimitive(t, \"string\"); return \"symbol\" == _typeof(i) ? i : i + \"\"; }\nfunction _toPrimitive(t, r) { if (\"object\" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || \"default\"); if (\"object\" != _typeof(i)) return i; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (\"string\" === r ? String : Number)(t); }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport InputSmart from './InputSmart.js';\nimport InputBasic from './InputBasic.js';\nimport { CountrySelectWithIcon as CountrySelect } from './CountrySelect.js';\nimport Flag from './Flag.js';\nimport InternationalIcon from './InternationalIcon.js';\nimport { validateE164Number } from './helpers/isE164Number.js';\nimport { sortCountryOptions, isCountrySupportedWithError, getSupportedCountries, getSupportedCountryOptions, getCountries } from './helpers/countries.js';\nimport { createCountryIconComponent } from './CountryIcon.js';\nimport { setRefsValue } from './useExternalRef.js';\nimport { metadata as metadataPropType, labels as labelsPropType } from './PropTypes.js';\nimport { getPreSelectedCountry, getCountrySelectOptions as _getCountrySelectOptions, couldNumberBelongToCountry, parsePhoneNumber, generateNationalNumberDigits, getPhoneDigitsForNewCountry, getInitialPhoneDigits, onPhoneDigitsChange, e164 } from './helpers/phoneInputHelpers.js';\nimport getPhoneInputWithCountryStateUpdateFromNewProps from './helpers/getPhoneInputWithCountryStateUpdateFromNewProps.js';\nvar PhoneNumberInput_ = /*#__PURE__*/function (_React$PureComponent) {\n function PhoneNumberInput_(props) {\n var _this;\n _classCallCheck(this, PhoneNumberInput_);\n _this = _callSuper(this, PhoneNumberInput_, [props]);\n // This function mimicks `refSetter` function returned from `useExternalRef()` hook\n // because this class-like React component can't use the `useExternalRef()` hook.\n _defineProperty(_this, \"setInputRef\", function (instance) {\n setRefsValue([_this.props.inputRef, _this.inputRef], instance);\n });\n // A shorthand for not passing `metadata` as a second argument.\n _defineProperty(_this, \"isCountrySupportedWithError\", function (country) {\n var metadata = _this.props.metadata;\n return isCountrySupportedWithError(country, metadata);\n });\n // Country `<select/>` `onChange` handler.\n _defineProperty(_this, \"onCountryChange\", function (newCountry) {\n var _this$props = _this.props,\n international = _this$props.international,\n metadata = _this$props.metadata,\n onChange = _this$props.onChange,\n focusInputOnCountrySelection = _this$props.focusInputOnCountrySelection;\n var _this$state = _this.state,\n prevPhoneDigits = _this$state.phoneDigits,\n prevCountry = _this$state.country;\n\n // After the new `country` has been selected,\n // if the phone number `<input/>` holds any digits\n // then migrate those digits for the new `country`.\n var newPhoneDigits = getPhoneDigitsForNewCountry(prevPhoneDigits, {\n prevCountry: prevCountry,\n newCountry: newCountry,\n metadata: metadata,\n // Convert the phone number to \"national\" format\n // when the user changes the selected country by hand.\n useNationalFormat: !international\n });\n var newValue = e164(newPhoneDigits, newCountry, metadata);\n\n // Focus phone number `<input/>` upon country selection.\n if (focusInputOnCountrySelection) {\n _this.inputRef.current.focus();\n }\n\n // If the user has already manually selected a country\n // then don't override that already selected country\n // if the `defaultCountry` property changes.\n // That's what `hasUserSelectedACountry` flag is for.\n\n _this.setState({\n country: newCountry,\n latestCountrySelectedByUser: newCountry,\n hasUserSelectedACountry: true,\n phoneDigits: newPhoneDigits,\n value: newValue\n }, function () {\n // Update the new `value` property.\n // Doing it after the `state` has been updated\n // because `onChange()` will trigger `getDerivedStateFromProps()`\n // with the new `value` which will be compared to `state.value` there.\n onChange(newValue);\n });\n });\n /**\r\n * `<input/>` `onChange()` handler.\r\n * Updates `value` property accordingly (so that they are kept in sync).\r\n * @param {string?} input — Either a parsed phone number or an empty string. Examples: `\"\"`, `\"+\"`, `\"+123\"`, `\"123\"`.\r\n */\n _defineProperty(_this, \"onChange\", function (_phoneDigits) {\n var _this$props2 = _this.props,\n defaultCountry = _this$props2.defaultCountry,\n onChange = _this$props2.onChange,\n addInternationalOption = _this$props2.addInternationalOption,\n international = _this$props2.international,\n limitMaxLength = _this$props2.limitMaxLength,\n countryCallingCodeEditable = _this$props2.countryCallingCodeEditable,\n metadata = _this$props2.metadata;\n var _this$state2 = _this.state,\n countries = _this$state2.countries,\n prevPhoneDigits = _this$state2.phoneDigits,\n currentlySelectedCountry = _this$state2.country,\n latestCountrySelectedByUser = _this$state2.latestCountrySelectedByUser;\n var _onPhoneDigitsChange = onPhoneDigitsChange(_phoneDigits, {\n prevPhoneDigits: prevPhoneDigits,\n country: currentlySelectedCountry,\n countryRequired: !addInternationalOption,\n defaultCountry: defaultCountry,\n latestCountrySelectedByUser: latestCountrySelectedByUser,\n getAnyCountry: function getAnyCountry() {\n return _this.getFirstSupportedCountry({\n countries: countries\n });\n },\n countries: countries,\n international: international,\n limitMaxLength: limitMaxLength,\n countryCallingCodeEditable: countryCallingCodeEditable,\n metadata: metadata\n }),\n phoneDigits = _onPhoneDigitsChange.phoneDigits,\n country = _onPhoneDigitsChange.country,\n value = _onPhoneDigitsChange.value;\n var stateUpdate = {\n phoneDigits: phoneDigits,\n value: value,\n country: country\n };\n\n // Reset `latestCountrySelectedByUser` if it no longer fits the `value`.\n if (latestCountrySelectedByUser && value && !couldNumberBelongToCountry(value, latestCountrySelectedByUser, metadata)) {\n stateUpdate.latestCountrySelectedByUser = undefined;\n }\n if (countryCallingCodeEditable === false) {\n // If it simply did `setState({ phoneDigits: intlPrefix })` here,\n // then it would have no effect when erasing an inital international prefix\n // via Backspace, because `phoneDigits` in `state` wouldn't change\n // as a result, because it was `prefix` and it became `prefix`,\n // so the component wouldn't rerender, and the user would be able\n // to erase the country calling code part, and that part is\n // assumed to be non-eraseable. That's why the component is\n // forcefully rerendered here.\n // https://github.com/catamphetamine/react-phone-number-input/issues/367#issuecomment-721703501\n if (!value && phoneDigits === _this.state.phoneDigits) {\n // Force a re-render of the `<input/>` in order to reset its value.\n stateUpdate.forceRerender = {};\n }\n }\n _this.setState(stateUpdate,\n // Update the new `value` property.\n // Doing it after the `state` has been updated\n // because `onChange()` will trigger `getDerivedStateFromProps()`\n // with the new `value` which will be compared to `state.value` there.\n function () {\n return onChange(value);\n });\n });\n // Toggles the `--focus` CSS class.\n _defineProperty(_this, \"_onFocus\", function () {\n return _this.setState({\n isFocused: true\n });\n });\n // Toggles the `--focus` CSS class.\n _defineProperty(_this, \"_onBlur\", function () {\n return _this.setState({\n isFocused: false\n });\n });\n _defineProperty(_this, \"onFocus\", function (event) {\n _this._onFocus();\n var onFocus = _this.props.onFocus;\n if (onFocus) {\n onFocus(event);\n }\n });\n _defineProperty(_this, \"onBlur\", function (event) {\n var onBlur = _this.props.onBlur;\n _this._onBlur();\n if (onBlur) {\n onBlur(event);\n }\n });\n _defineProperty(_this, \"onCountryFocus\", function (event) {\n _this._onFocus();\n // this.setState({ countrySelectFocused: true })\n var countrySelectProps = _this.props.countrySelectProps;\n if (countrySelectProps) {\n var onFocus = countrySelectProps.onFocus;\n if (onFocus) {\n onFocus(event);\n }\n }\n });\n _defineProperty(_this, \"onCountryBlur\", function (event) {\n _this._onBlur();\n // this.setState({ countrySelectFocused: false })\n var countrySelectProps = _this.props.countrySelectProps;\n if (countrySelectProps) {\n var onBlur = countrySelectProps.onBlur;\n if (onBlur) {\n onBlur(event);\n }\n }\n });\n _this.inputRef = /*#__PURE__*/React.createRef();\n var _this$props3 = _this.props,\n _value = _this$props3.value,\n labels = _this$props3.labels,\n _international = _this$props3.international,\n _addInternationalOption = _this$props3.addInternationalOption,\n displayInitialValueAsLocalNumber = _this$props3.displayInitialValueAsLocalNumber,\n initialValueFormat = _this$props3.initialValueFormat,\n _metadata = _this$props3.metadata;\n var _this$props4 = _this.props,\n _defaultCountry = _this$props4.defaultCountry,\n _countries = _this$props4.countries;\n\n // Validate `defaultCountry`.\n if (_defaultCountry) {\n if (!_this.isCountrySupportedWithError(_defaultCountry)) {\n _defaultCountry = undefined;\n }\n }\n\n // Validate that the initially-supplied `value` is in `E.164` format.\n // Because sometimes people attempt to supply a `value` like \"+1 (879) 490-8676\".\n // https://gitlab.com/catamphetamine/react-phone-number-input/-/issues/231#note_2016334796\n if (_value) {\n validateE164Number(_value);\n }\n\n // Validate `countries`.\n _countries = getSupportedCountries(_countries, _metadata);\n var phoneNumber = parsePhoneNumber(_value, _metadata);\n _this.CountryIcon = createCountryIconComponent(_this.props);\n var preSelectedCountry = getPreSelectedCountry({\n value: _value,\n phoneNumber: phoneNumber,\n defaultCountry: _defaultCountry,\n required: !_addInternationalOption,\n countries: _countries || getCountries(_metadata),\n getAnyCountry: function getAnyCountry() {\n return _this.getFirstSupportedCountry({\n countries: _countries\n });\n },\n metadata: _metadata\n });\n _this.state = {\n // Workaround for `this.props` inside `getDerivedStateFromProps()`.\n props: _this.props,\n // The country selected.\n country: preSelectedCountry,\n // `countries` are stored in `this.state` because they're filtered.\n // For example, a developer might theoretically pass some unsupported\n // countries as part of the `countries` property, and because of that\n // the component uses `this.state.countries` (which are filtered)\n // instead of `this.props.countries`\n // (which could potentially contain unsupported countries).\n countries: _countries,\n // `phoneDigits` state property holds non-formatted user's input.\n // The reason is that there's no way of finding out\n // in which form should `value` be displayed: international or national.\n // E.g. if `value` is `+78005553535` then it could be input\n // by a user both as `8 (800) 555-35-35` and `+7 800 555 35 35`.\n // Hence storing just `value` is not sufficient for correct formatting.\n // E.g. if a user entered `8 (800) 555-35-35`\n // then value is `+78005553535` and `phoneDigits` are `88005553535`\n // and if a user entered `+7 800 555 35 35`\n // then value is `+78005553535` and `phoneDigits` are `+78005553535`.\n phoneDigits: getInitialPhoneDigits({\n value: _value,\n phoneNumber: phoneNumber,\n defaultCountry: _defaultCountry,\n international: _international,\n useNationalFormat: displayInitialValueAsLocalNumber || initialValueFormat === 'national',\n metadata: _metadata\n }),\n // `value` property is duplicated in state.\n // The reason is that `getDerivedStateFromProps()`\n // needs this `value` to compare to the new `value` property\n // to find out if `phoneDigits` needs updating:\n // If the `value` property was changed externally\n // then it won't be equal to `state.value`\n // in which case `phoneDigits` and `country` should be updated.\n value: _value\n };\n return _this;\n }\n _inherits(PhoneNumberInput_, _React$PureComponent);\n return _createClass(PhoneNumberInput_, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n var onCountryChange = this.props.onCountryChange;\n var defaultCountry = this.props.defaultCountry;\n var selectedCountry = this.state.country;\n if (onCountryChange) {\n if (defaultCountry) {\n if (!this.isCountrySupportedWithError(defaultCountry)) {\n defaultCountry = undefined;\n }\n }\n if (selectedCountry !== defaultCountry) {\n onCountryChange(selectedCountry);\n }\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps, prevState) {\n var onCountryChange = this.props.onCountryChange;\n var country = this.state.country;\n // Call `onCountryChange` when user selects another country.\n if (onCountryChange && country !== prevState.country) {\n onCountryChange(country);\n }\n }\n }, {\n key: \"getCountrySelectOptions\",\n value: function getCountrySelectOptions(_ref) {\n var countries = _ref.countries;\n var _this$props5 = this.props,\n international = _this$props5.international,\n countryCallingCodeEditable = _this$props5.countryCallingCodeEditable,\n countryOptionsOrder = _this$props5.countryOptionsOrder,\n addInternationalOption = _this$props5.addInternationalOption,\n labels = _this$props5.labels,\n locales = _this$props5.locales,\n metadata = _this$props5.metadata;\n return this.useMemoCountrySelectOptions(function () {\n return sortCountryOptions(_getCountrySelectOptions({\n countries: countries || getCountries(metadata),\n countryNames: labels,\n addInternationalOption: international && countryCallingCodeEditable === false ? false : addInternationalOption,\n compareStringsLocales: locales\n // compareStrings\n }), getSupportedCountryOptions(countryOptionsOrder, metadata));\n }, [countries, countryOptionsOrder, addInternationalOption, labels, metadata]);\n }\n }, {\n key: \"useMemoCountrySelectOptions\",\n value: function useMemoCountrySelectOptions(generator, dependencies) {\n if (!this.countrySelectOptionsMemoDependencies || !areEqualArrays(dependencies, this.countrySelectOptionsMemoDependencies)) {\n this.countrySelectOptionsMemo = generator();\n this.countrySelectOptionsMemoDependencies = dependencies;\n }\n return this.countrySelectOptionsMemo;\n }\n }, {\n key: \"getFirstSupportedCountry\",\n value: function getFirstSupportedCountry(_ref2) {\n var countries = _ref2.countries;\n var countryOptions = this.getCountrySelectOptions({\n countries: countries\n });\n return countryOptions[0].value;\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$props6 = this.props,\n name = _this$props6.name,\n disabled = _this$props6.disabled,\n readOnly = _this$props6.readOnly,\n autoComplete = _this$props6.autoComplete,\n style = _this$props6.style,\n className = _this$props6.className,\n inputRef = _this$props6.inputRef,\n inputComponent = _this$props6.inputComponent,\n numberInputProps = _this$props6.numberInputProps,\n smartCaret = _this$props6.smartCaret,\n CountrySelectComponent = _this$props6.countrySelectComponent,\n countrySelectProps = _this$props6.countrySelectProps,\n ContainerComponent = _this$props6.containerComponent,\n containerComponentProps = _this$props6.containerComponentProps,\n defaultCountry = _this$props6.defaultCountry,\n countriesProperty = _this$props6.countries,\n countryOptionsOrder = _this$props6.countryOptionsOrder,\n labels = _this$props6.labels,\n flags = _this$props6.flags,\n flagComponent = _this$props6.flagComponent,\n flagUrl = _this$props6.flagUrl,\n addInternationalOption = _this$props6.addInternationalOption,\n internationalIcon = _this$props6.internationalIcon,\n displayInitialValueAsLocalNumber = _this$props6.displayInitialValueAsLocalNumber,\n initialValueFormat = _this$props6.initialValueFormat,\n onCountryChange = _this$props6.onCountryChange,\n limitMaxLength = _this$props6.limitMaxLength,\n countryCallingCodeEditable = _this$props6.countryCallingCodeEditable,\n focusInputOnCountrySelection = _this$props6.focusInputOnCountrySelection,\n reset = _this$props6.reset,\n metadata = _this$props6.metadata,\n international = _this$props6.international,\n locales = _this$props6.locales,\n rest = _objectWithoutProperties(_this$props6, _excluded);\n var _this$state3 = this.state,\n country = _this$state3.country,\n countries = _this$state3.countries,\n phoneDigits = _this$state3.phoneDigits,\n isFocused = _this$state3.isFocused;\n var InputComponent = smartCaret ? InputSmart : InputBasic;\n var countrySelectOptions = this.getCountrySelectOptions({\n countries: countries\n });\n return /*#__PURE__*/React.createElement(ContainerComponent, _extends({\n style: style,\n className: classNames(className, 'PhoneInput', {\n 'PhoneInput--focus': isFocused,\n 'PhoneInput--disabled': disabled,\n 'PhoneInput--readOnly': readOnly\n })\n }, containerComponentProps), /*#__PURE__*/React.createElement(CountrySelectComponent, _extends({\n name: name ? \"\".concat(name, \"Country\") : undefined,\n \"aria-label\": labels.country\n }, countrySelectProps, {\n value: country,\n options: countrySelectOptions,\n onChange: this.onCountryChange,\n onFocus: this.onCountryFocus,\n onBlur: this.onCountryBlur,\n disabled: disabled || countrySelectProps && countrySelectProps.disabled,\n readOnly: readOnly || countrySelectProps && countrySelectProps.readOnly,\n iconComponent: this.CountryIcon\n })), /*#__PURE__*/React.createElement(InputComponent, _extends({\n ref: this.setInputRef,\n type: \"tel\",\n autoComplete: autoComplete\n }, numberInputProps, rest, {\n inputFormat: international === true ? 'INTERNATIONAL' : international === false ? 'NATIONAL' : 'INTERNATIONAL_OR_NATIONAL',\n international: international ? true : undefined,\n withCountryCallingCode: international ? true : undefined,\n name: name,\n metadata: metadata,\n country: country,\n value: phoneDigits || '',\n onChange: this.onChange,\n onFocus: this.onFocus,\n onBlur: this.onBlur,\n disabled: disabled,\n readOnly: readOnly,\n inputComponent: inputComponent,\n className: classNames('PhoneInputInput', numberInputProps && numberInputProps.className, rest.className)\n })));\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value:\n // `state` holds previous props as `props`, and also:\n // * `country` — The currently selected country, e.g. `\"RU\"`.\n // * `value` — The currently entered phone number (E.164), e.g. `+78005553535`.\n // * `phoneDigits` — The parsed `<input/>` value, e.g. `8005553535`.\n // (and a couple of other less significant properties)\n function getDerivedStateFromProps(props, state) {\n return _objectSpread({\n // Emulate `prevProps` via `state.props`.\n props: props\n }, getPhoneInputWithCountryStateUpdateFromNewProps(props, state.props, state));\n }\n }]);\n}(React.PureComponent); // This wrapper is only to `.forwardRef()` to the `<input/>`.\nvar PhoneNumberInput = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(PhoneNumberInput_, _extends({}, withDefaultProps(props), {\n inputRef: ref\n }));\n});\nPhoneNumberInput.propTypes = {\n /**\r\n * Phone number in `E.164` format.\r\n *\r\n * Example:\r\n *\r\n * `\"+12223333333\"`\r\n *\r\n * Any \"falsy\" value like `undefined`, `null` or an empty string `\"\"` is treated like \"empty\".\r\n */\n value: PropTypes.string,\n /**\r\n * A function of `value: string?`.\r\n *\r\n * Updates the `value` property as the user inputs a phone number.\r\n *\r\n * If the user erases the input value, the argument is `undefined`.\r\n */\n onChange: PropTypes.func.isRequired,\n /**\r\n * Toggles the `--focus` CSS class.\r\n * @ignore\r\n */\n onFocus: PropTypes.func,\n /**\r\n * `onBlur` is usually passed by `redux-form`.\r\n * @ignore\r\n */\n onBlur: PropTypes.func,\n /**\r\n * Set to `true` to mark both the phone number `<input/>`\r\n * and the country `<select/>` as `disabled`.\r\n */\n disabled: PropTypes.bool,\n /**\r\n * Set to `true` to mark both the phone number `<input/>`\r\n * and the country `<select/>` as `readonly`.\r\n */\n readOnly: PropTypes.bool,\n /**\r\n * Sets `autoComplete` property for phone number `<input/>`.\r\n *\r\n * Web browser's \"autocomplete\" feature\r\n * remembers the phone number being input\r\n * and can also autofill the `<input/>`\r\n * with previously remembered phone numbers.\r\n *\r\n * https://developers.google.com\r\n * /web/updates/2015/06/checkout-faster-with-autofill\r\n *\r\n * For example, can be used to turn it off:\r\n *\r\n * \"So when should you use `autocomplete=\"off\"`?\r\n * One example is when you've implemented your own version\r\n * of autocomplete for search. Another example is any form field\r\n * where users will input and submit different kinds of information\r\n * where it would not be useful to have the browser remember\r\n * what was submitted previously\".\r\n */\n // (is `\"tel\"` by default)\n autoComplete: PropTypes.string,\n /**\r\n * Set to `\"national\"` to show the initial `value` in\r\n * \"national\" format rather than \"international\".\r\n *\r\n * For example, if `initialValueFormat` is `\"national\"`\r\n * and the initial `value=\"+12133734253\"` is passed\r\n * then the `<input/>` value will be `\"(213) 373-4253\"`.\r\n *\r\n * By default, `initialValueFormat` is `undefined`,\r\n * meaning that if the initial `value=\"+12133734253\"` is passed\r\n * then the `<input/>` value will be `\"+1 213 373 4253\"`.\r\n *\r\n * The reason for such default behaviour is that\r\n * the newer generation grows up when there are no stationary phones\r\n * and therefore everyone inputs phone numbers in international format\r\n * in their smartphones so people gradually get more accustomed to\r\n * writing phone numbers in international format rather than in local format.\r\n * Future people won't be using \"national\" format, only \"international\".\r\n */\n // (is `undefined` by default)\n initialValueFormat: PropTypes.oneOf(['national']),\n // `displayInitialValueAsLocalNumber` property has been\n // superceded by `initialValueFormat` property.\n displayInitialValueAsLocalNumber: PropTypes.bool,\n /**\r\n * The country to be selected by default.\r\n * For example, can be set after a GeoIP lookup.\r\n *\r\n * Example: `\"US\"`.\r\n */\n // A two-letter country code (\"ISO 3166-1 alpha-2\").\n defaultCountry: PropTypes.string,\n /**\r\n * If specified, only these countries will be available for selection.\r\n *\r\n * Example:\r\n *\r\n * `[\"RU\", \"UA\", \"KZ\"]`\r\n */\n countries: PropTypes.arrayOf(PropTypes.string),\n /**\r\n * Custom country `<select/>` option names.\r\n * Also some labels like \"ext\" and country `<select/>` `aria-label`.\r\n *\r\n * Example:\r\n *\r\n * `{ \"ZZ\": \"Международный\", RU: \"РоÑÑиÑ\", US: \"СШÐ\", ... }`\r\n *\r\n * See the `locales` directory for examples.\r\n */\n labels: labelsPropType,\n /**\r\n * Country `<select/>` options are sorted by their labels.\r\n * The default sorting function uses `a.localeCompare(b, locales)`,\r\n * and, if that's not available, falls back to simple `a > b` / `a < b`.\r\n * Some languages, like Chinese, support multiple sorting variants\r\n * (called \"collations\"), and the user might prefer one or another.\r\n * Also, sometimes the Operating System language is not always\r\n * the preferred language for a person using a website or an application,\r\n * so there should be a way to specify custom locale.\r\n * This `locales` property mimicks the `locales` argument of `Intl` constructors,\r\n * and can be either a Unicode BCP 47 locale identifier or an array of such locale identifiers.\r\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl#locales_argument\r\n */\n locales: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.string)]),\n /*\r\n * Custom country `<select/>` options sorting function.\r\n * The default one uses `a.localeCompare(b)`, and,\r\n * if that's not available, falls back to simple `a > b`/`a < b`.\r\n * There have been requests to add custom sorter for cases\r\n * like Chinese language and \"pinyin\" (non-default) sorting order.\r\n * https://stackoverflow.com/questions/22907288/chinese-sorting-by-pinyin-in-javascript-with-localecompare\r\n compareStrings: PropTypes.func,\r\n */\n\n /**\r\n * A URL template of a country flag, where\r\n * \"{XX}\" is a two-letter country code in upper case,\r\n * or where \"{xx}\" is a two-letter country code in lower case.\r\n * By default it points to `country-flag-icons` gitlab pages website.\r\n * I imagine someone might want to download those country flag icons\r\n * and host them on their own servers instead\r\n * (all flags are available in the `country-flag-icons` library).\r\n * There's a catch though: new countries may be added in future,\r\n * so when hosting country flag icons on your own server\r\n * one should check the `CHANGELOG.md` every time before updating this library,\r\n * otherwise there's a possibility that some new country flag would be missing.\r\n */\n flagUrl: PropTypes.string,\n /**\r\n * Custom country flag icon components.\r\n * These flags will be used instead of the default ones.\r\n * The the \"Flags\" section of the readme for more info.\r\n *\r\n * The shape is an object where keys are country codes\r\n * and values are flag icon components.\r\n * Flag icon components receive the same properties\r\n * as `flagComponent` (see below).\r\n *\r\n * Example:\r\n *\r\n * `{ \"RU\": (props) => <img src=\"...\"/> }`\r\n *\r\n * Example:\r\n *\r\n * `import flags from 'country-flag-icons/react/3x2'`\r\n *\r\n * `import PhoneInput from 'react-phone-number-input'`\r\n *\r\n * `<PhoneInput flags={flags} .../>`\r\n */\n flags: PropTypes.objectOf(PropTypes.elementType),\n /**\r\n * Country flag icon component.\r\n *\r\n * Takes properties:\r\n *\r\n * * `country: string` — The country code.\r\n * * `countryName: string` — The country name.\r\n * * `flagUrl: string` — The `flagUrl` property (see above).\r\n * * `flags: object` — The `flags` property (see above).\r\n */\n flagComponent: PropTypes.elementType,\n /**\r\n * Set to `false` to remove the \"International\" option from country `<select/>`.\r\n */\n addInternationalOption: PropTypes.bool,\n /**\r\n * \"International\" icon component.\r\n * Should have the same aspect ratio.\r\n *\r\n * Receives properties:\r\n *\r\n * * `title: string` — \"International\" country option label.\r\n */\n internationalIcon: PropTypes.elementType,\n /**\r\n * Can be used to place some countries on top of the list of country `<select/>` options.\r\n *\r\n * * `\"XX\"` — inserts an option for \"XX\" country.\r\n * * `\"ðŸŒ\"` — inserts \"International\" option.\r\n * * `\"|\"` — inserts a separator.\r\n * * `\"...\"` — inserts options for the rest of the countries (can be omitted, in which case it will be automatically added at the end).\r\n *\r\n * Example:\r\n *\r\n * `[\"US\", \"CA\", \"AU\", \"|\", \"...\"]`\r\n */\n countryOptionsOrder: PropTypes.arrayOf(PropTypes.string),\n /**\r\n * `<Phone/>` component CSS style object.\r\n */\n style: PropTypes.object,\n /**\r\n * `<Phone/>` component CSS class.\r\n */\n className: PropTypes.string,\n /**\r\n * Country `<select/>` component.\r\n *\r\n * Receives properties:\r\n *\r\n * * `name: string?` — HTML `name` attribute.\r\n * * `value: string?` — The currently selected country code.\r\n * * `onChange(value: string?)` — Updates the `value`.\r\n * * `onFocus()` — Is used to toggle the `--focus` CSS class.\r\n * * `onBlur()` — Is used to toggle the `--focus` CSS class.\r\n * * `options: object[]` — The list of all selectable countries (including \"International\") each being an object of shape `{ value: string?, label: string }`.\r\n * * `iconComponent: PropTypes.elementType` — React component that renders a country icon: `<Icon country={value}/>`. If `country` is `undefined` then it renders an \"International\" icon.\r\n * * `disabled: boolean?` — HTML `disabled` attribute.\r\n * * `readOnly: boolean?` — HTML `readOnly` attribute.\r\n * * `tabIndex: (number|string)?` — HTML `tabIndex` attribute.\r\n * * `className: string` — CSS class name.\r\n */\n countrySelectComponent: PropTypes.elementType,\n /**\r\n * Country `<select/>` component props.\r\n * Along with the usual DOM properties such as `aria-label` and `tabIndex`,\r\n * some custom properties are supported, such as `arrowComponent` and `unicodeFlags`.\r\n */\n countrySelectProps: PropTypes.object,\n /**\r\n * Phone number `<input/>` component.\r\n *\r\n * Receives properties:\r\n *\r\n * * `value: string` — The formatted `value`.\r\n * * `onChange(event: Event)` — Updates the formatted `value` from `event.target.value`.\r\n * * `onFocus()` — Is used to toggle the `--focus` CSS class.\r\n * * `onBlur()` — Is used to toggle the `--focus` CSS class.\r\n * * Other properties like `type=\"tel\"` or `autoComplete=\"tel\"` that should be passed through to the DOM `<input/>`.\r\n *\r\n * Must also either use `React.forwardRef()` to \"forward\" `ref` to the `<input/>` or implement `.focus()` method.\r\n */\n inputComponent: PropTypes.elementType,\n /**\r\n * Phone number `<input/>` component props.\r\n */\n numberInputProps: PropTypes.object,\n /**\r\n * Wrapping `<div/>` component.\r\n *\r\n * Receives properties:\r\n *\r\n * * `style: object` — A component CSS style object.\r\n * * `className: string` — Classes to attach to the component, typically changes when component focuses or blurs.\r\n */\n containerComponent: PropTypes.elementType,\n /**\r\n * Wrapping `<div/>` component props.\r\n */\n containerComponentProps: PropTypes.object,\n /**\r\n * When the user attempts to insert a digit somewhere in the middle of a phone number,\r\n * the caret position is moved right before the next available digit skipping\r\n * any punctuation in between. This is called \"smart\" caret positioning.\r\n * Another case would be the phone number format changing as a result of\r\n * the user inserting the digit somewhere in the middle, which would require\r\n * re-positioning the caret because all digit positions have changed.\r\n * This \"smart\" caret positioning feature can be turned off by passing\r\n * `smartCaret={false}` property: use it in case of any possible issues\r\n * with caret position during phone number input.\r\n */\n // Is `true` by default.\n smartCaret: PropTypes.bool,\n /**\r\n * Set to `true` to force \"international\" phone number format.\r\n * Set to `false` to force \"national\" phone number format.\r\n * By default it's `undefined` meaning that it doesn't enforce any phone number format:\r\n * the user can input their phone number in either \"national\" or \"international\" format.\r\n */\n international: PropTypes.bool,\n /**\r\n * If set to `true`, the phone number input will get trimmed\r\n * if it exceeds the maximum length for the country.\r\n */\n limitMaxLength: PropTypes.bool,\n /**\r\n * If set to `false`, and `international` is `true`, then\r\n * users won't be able to erase the \"country calling part\"\r\n * of a phone number in the `<input/>`.\r\n */\n countryCallingCodeEditable: PropTypes.bool,\n /**\r\n * `libphonenumber-js` metadata.\r\n *\r\n * Can be used to pass custom `libphonenumber-js` metadata\r\n * to reduce the overall bundle size for those who compile \"custom\" metadata.\r\n */\n metadata: metadataPropType,\n /**\r\n * Is called every time the selected country changes:\r\n * either programmatically or when user selects it manually from the list.\r\n */\n // People have been asking for a way to get the selected country.\n // @see https://github.com/catamphetamine/react-phone-number-input/issues/128\n // For some it's just a \"business requirement\".\n // I guess it's about gathering as much info on the user as a website can\n // without introducing any addional fields that would complicate the form\n // therefore reducing \"conversion\" (that's a marketing term).\n // Assuming that the phone number's country is the user's country\n // is not 100% correct but in most cases I guess it's valid.\n onCountryChange: PropTypes.func,\n /**\r\n * If set to `false`, will not focus the `<input/>` component\r\n * when the user selects a country from the list of countries.\r\n * This can be used to conform to the Web Content Accessibility Guidelines (WCAG).\r\n * Quote:\r\n * \"On input: Changing the setting of any user interface component\r\n * does not automatically cause a change of context unless the user\r\n * has been advised of the behaviour before using the component.\"\r\n */\n focusInputOnCountrySelection: PropTypes.bool\n};\nvar defaultProps = {\n /**\r\n * Remember (and autofill) the value as a phone number.\r\n */\n autoComplete: 'tel',\n /**\r\n * Country `<select/>` component.\r\n */\n countrySelectComponent: CountrySelect,\n /**\r\n * Flag icon component.\r\n */\n flagComponent: Flag,\n /**\r\n * By default, uses icons from `country-flag-icons` gitlab pages website.\r\n */\n // Must be equal to `flagUrl` in `./CountryIcon.js`.\n flagUrl: 'https://purecatamphetamine.github.io/country-flag-icons/3x2/{XX}.svg',\n /**\r\n * Default \"International\" country `<select/>` option icon.\r\n */\n internationalIcon: InternationalIcon,\n /**\r\n * Phone number `<input/>` component.\r\n */\n inputComponent: 'input',\n /**\r\n * Wrapping `<div/>` component.\r\n */\n containerComponent: 'div',\n /**\r\n * Some users requested a way to reset the component:\r\n * both number `<input/>` and country `<select/>`.\r\n * Whenever `reset` property changes both number `<input/>`\r\n * and country `<select/>` are reset.\r\n * It's not implemented as some instance `.reset()` method\r\n * because `ref` is forwarded to `<input/>`.\r\n * It's also not replaced with just resetting `country` on\r\n * external `value` reset, because a user could select a country\r\n * and then not input any `value`, and so the selected country\r\n * would be \"stuck\", if not using this `reset` property.\r\n */\n // https://github.com/catamphetamine/react-phone-number-input/issues/300\n reset: PropTypes.any,\n /**\r\n *\r\n */\n\n /**\r\n * Set to `false` to use \"basic\" caret instead of the \"smart\" one.\r\n */\n smartCaret: true,\n /**\r\n * Whether to add the \"International\" option\r\n * to the list of countries.\r\n */\n addInternationalOption: true,\n /**\r\n * If set to `false`, and `international` is `true`, then\r\n * users won't be able to erase the \"country calling part\"\r\n * of a phone number in the `<input/>`.\r\n */\n countryCallingCodeEditable: true,\n /**\r\n * If set to `false`, will not focus the `<input/>` component\r\n * when the user selects a country from the list of countries.\r\n * This can be used to conform to the Web Content Accessibility Guidelines (WCAG).\r\n * Quote:\r\n * \"On input: Changing the setting of any user interface component\r\n * does not automatically cause a change of context unless the user\r\n * has been advised of the behaviour before using the component.\"\r\n */\n focusInputOnCountrySelection: true\n};\nfunction withDefaultProps(props) {\n props = _objectSpread({}, props);\n for (var key in defaultProps) {\n if (props[key] === undefined) {\n props[key] = defaultProps[key];\n }\n }\n return props;\n}\nexport default PhoneNumberInput;\nfunction areEqualArrays(a, b) {\n if (a.length !== b.length) {\n return false;\n }\n var i = 0;\n while (i < a.length) {\n if (a[i] !== b[i]) {\n return false;\n }\n i++;\n }\n return true;\n}\n//# sourceMappingURL=PhoneInputWithCountry.js.map","var _excluded = [\"metadata\", \"labels\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport defaultLabels from '../locale/en.json.js';\nimport { metadata as metadataPropType, labels as labelsPropType } from './PropTypes.js';\nimport PhoneInput from './PhoneInputWithCountry.js';\nexport function createPhoneInput(defaultMetadata) {\n var PhoneInputDefault = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var _ref$metadata = _ref.metadata,\n metadata = _ref$metadata === void 0 ? defaultMetadata : _ref$metadata,\n _ref$labels = _ref.labels,\n labels = _ref$labels === void 0 ? defaultLabels : _ref$labels,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(PhoneInput, _extends({}, rest, {\n ref: ref,\n metadata: metadata,\n labels: labels\n }));\n });\n PhoneInputDefault.propTypes = {\n metadata: metadataPropType,\n labels: labelsPropType\n };\n return PhoneInputDefault;\n}\nexport default createPhoneInput();\n//# sourceMappingURL=PhoneInputWithCountryDefault.js.map","import metadata from 'libphonenumber-js/min/metadata'\r\n\r\nimport {\r\n\tparsePhoneNumber as _parsePhoneNumber,\r\n\tformatPhoneNumber as _formatPhoneNumber,\r\n\tformatPhoneNumberIntl as _formatPhoneNumberIntl,\r\n\tisValidPhoneNumber as _isValidPhoneNumber,\r\n\tisPossiblePhoneNumber as _isPossiblePhoneNumber,\r\n\tgetCountries as _getCountries,\r\n\tgetCountryCallingCode as _getCountryCallingCode,\r\n\tisSupportedCountry as _isSupportedCountry\r\n} from '../core/index.js'\r\n\r\nimport { createPhoneInput } from '../modules/PhoneInputWithCountryDefault.js'\r\n\r\nfunction call(func, _arguments) {\r\n\tvar args = Array.prototype.slice.call(_arguments)\r\n\targs.push(metadata)\r\n\treturn func.apply(this, args)\r\n}\r\n\r\nexport default createPhoneInput(metadata)\r\n\r\nexport function parsePhoneNumber() {\r\n\treturn call(_parsePhoneNumber, arguments)\r\n}\r\n\r\nexport function formatPhoneNumber() {\r\n\treturn call(_formatPhoneNumber, arguments)\r\n}\r\n\r\nexport function formatPhoneNumberIntl() {\r\n\treturn call(_formatPhoneNumberIntl, arguments)\r\n}\r\n\r\nexport function isValidPhoneNumber() {\r\n\treturn call(_isValidPhoneNumber, arguments)\r\n}\r\n\r\nexport function isPossiblePhoneNumber() {\r\n\treturn call(_isPossiblePhoneNumber, arguments)\r\n}\r\n\r\nexport function getCountries() {\r\n\treturn call(_getCountries, arguments)\r\n}\r\n\r\nexport function getCountryCallingCode() {\r\n\treturn call(_getCountryCallingCode, arguments)\r\n}\r\n\r\nexport function isSupportedCountry() {\r\n\treturn call(_isSupportedCountry, arguments)\r\n}","const PACKET_TYPES = Object.create(null); // no Map = no polyfill\nPACKET_TYPES[\"open\"] = \"0\";\nPACKET_TYPES[\"close\"] = \"1\";\nPACKET_TYPES[\"ping\"] = \"2\";\nPACKET_TYPES[\"pong\"] = \"3\";\nPACKET_TYPES[\"message\"] = \"4\";\nPACKET_TYPES[\"upgrade\"] = \"5\";\nPACKET_TYPES[\"noop\"] = \"6\";\nconst PACKET_TYPES_REVERSE = Object.create(null);\nObject.keys(PACKET_TYPES).forEach((key) => {\n PACKET_TYPES_REVERSE[PACKET_TYPES[key]] = key;\n});\nconst ERROR_PACKET = { type: \"error\", data: \"parser error\" };\nexport { PACKET_TYPES, PACKET_TYPES_REVERSE, ERROR_PACKET };\n","import { PACKET_TYPES } from \"./commons.js\";\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n Object.prototype.toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\n// ArrayBuffer.isView method is not defined in IE10\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj && obj.buffer instanceof ArrayBuffer;\n};\nconst encodePacket = ({ type, data }, supportsBinary, callback) => {\n if (withNativeBlob && data instanceof Blob) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(data, callback);\n }\n }\n else if (withNativeArrayBuffer &&\n (data instanceof ArrayBuffer || isView(data))) {\n if (supportsBinary) {\n return callback(data);\n }\n else {\n return encodeBlobAsBase64(new Blob([data]), callback);\n }\n }\n // plain string\n return callback(PACKET_TYPES[type] + (data || \"\"));\n};\nconst encodeBlobAsBase64 = (data, callback) => {\n const fileReader = new FileReader();\n fileReader.onload = function () {\n const content = fileReader.result.split(\",\")[1];\n callback(\"b\" + (content || \"\"));\n };\n return fileReader.readAsDataURL(data);\n};\nfunction toArray(data) {\n if (data instanceof Uint8Array) {\n return data;\n }\n else if (data instanceof ArrayBuffer) {\n return new Uint8Array(data);\n }\n else {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength);\n }\n}\nlet TEXT_ENCODER;\nexport function encodePacketToBinary(packet, callback) {\n if (withNativeBlob && packet.data instanceof Blob) {\n return packet.data.arrayBuffer().then(toArray).then(callback);\n }\n else if (withNativeArrayBuffer &&\n (packet.data instanceof ArrayBuffer || isView(packet.data))) {\n return callback(toArray(packet.data));\n }\n encodePacket(packet, false, (encoded) => {\n if (!TEXT_ENCODER) {\n TEXT_ENCODER = new TextEncoder();\n }\n callback(TEXT_ENCODER.encode(encoded));\n });\n}\nexport { encodePacket };\n","// imported from https://github.com/socketio/base64-arraybuffer\nconst chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nconst lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (let i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nexport const encode = (arraybuffer) => {\n let bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nexport const decode = (base64) => {\n let bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n const arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n","import { ERROR_PACKET, PACKET_TYPES_REVERSE, } from \"./commons.js\";\nimport { decode } from \"./contrib/base64-arraybuffer.js\";\nconst withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nexport const decodePacket = (encodedPacket, binaryType) => {\n if (typeof encodedPacket !== \"string\") {\n return {\n type: \"message\",\n data: mapBinary(encodedPacket, binaryType),\n };\n }\n const type = encodedPacket.charAt(0);\n if (type === \"b\") {\n return {\n type: \"message\",\n data: decodeBase64Packet(encodedPacket.substring(1), binaryType),\n };\n }\n const packetType = PACKET_TYPES_REVERSE[type];\n if (!packetType) {\n return ERROR_PACKET;\n }\n return encodedPacket.length > 1\n ? {\n type: PACKET_TYPES_REVERSE[type],\n data: encodedPacket.substring(1),\n }\n : {\n type: PACKET_TYPES_REVERSE[type],\n };\n};\nconst decodeBase64Packet = (data, binaryType) => {\n if (withNativeArrayBuffer) {\n const decoded = decode(data);\n return mapBinary(decoded, binaryType);\n }\n else {\n return { base64: true, data }; // fallback for old browsers\n }\n};\nconst mapBinary = (data, binaryType) => {\n switch (binaryType) {\n case \"blob\":\n if (data instanceof Blob) {\n // from WebSocket + binaryType \"blob\"\n return data;\n }\n else {\n // from HTTP long-polling or WebTransport\n return new Blob([data]);\n }\n case \"arraybuffer\":\n default:\n if (data instanceof ArrayBuffer) {\n // from HTTP long-polling (base64) or WebSocket + binaryType \"arraybuffer\"\n return data;\n }\n else {\n // from WebTransport (Uint8Array)\n return data.buffer;\n }\n }\n};\n","import { encodePacket, encodePacketToBinary } from \"./encodePacket.js\";\nimport { decodePacket } from \"./decodePacket.js\";\nimport { ERROR_PACKET, } from \"./commons.js\";\nconst SEPARATOR = String.fromCharCode(30); // see https://en.wikipedia.org/wiki/Delimiter#ASCII_delimited_text\nconst encodePayload = (packets, callback) => {\n // some packets may be added to the array while encoding, so the initial length must be saved\n const length = packets.length;\n const encodedPackets = new Array(length);\n let count = 0;\n packets.forEach((packet, i) => {\n // force base64 encoding for binary packets\n encodePacket(packet, false, (encodedPacket) => {\n encodedPackets[i] = encodedPacket;\n if (++count === length) {\n callback(encodedPackets.join(SEPARATOR));\n }\n });\n });\n};\nconst decodePayload = (encodedPayload, binaryType) => {\n const encodedPackets = encodedPayload.split(SEPARATOR);\n const packets = [];\n for (let i = 0; i < encodedPackets.length; i++) {\n const decodedPacket = decodePacket(encodedPackets[i], binaryType);\n packets.push(decodedPacket);\n if (decodedPacket.type === \"error\") {\n break;\n }\n }\n return packets;\n};\nexport function createPacketEncoderStream() {\n return new TransformStream({\n transform(packet, controller) {\n encodePacketToBinary(packet, (encodedPacket) => {\n const payloadLength = encodedPacket.length;\n let header;\n // inspired by the WebSocket format: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#decoding_payload_length\n if (payloadLength < 126) {\n header = new Uint8Array(1);\n new DataView(header.buffer).setUint8(0, payloadLength);\n }\n else if (payloadLength < 65536) {\n header = new Uint8Array(3);\n const view = new DataView(header.buffer);\n view.setUint8(0, 126);\n view.setUint16(1, payloadLength);\n }\n else {\n header = new Uint8Array(9);\n const view = new DataView(header.buffer);\n view.setUint8(0, 127);\n view.setBigUint64(1, BigInt(payloadLength));\n }\n // first bit indicates whether the payload is plain text (0) or binary (1)\n if (packet.data && typeof packet.data !== \"string\") {\n header[0] |= 0x80;\n }\n controller.enqueue(header);\n controller.enqueue(encodedPacket);\n });\n },\n });\n}\nlet TEXT_DECODER;\nfunction totalLength(chunks) {\n return chunks.reduce((acc, chunk) => acc + chunk.length, 0);\n}\nfunction concatChunks(chunks, size) {\n if (chunks[0].length === size) {\n return chunks.shift();\n }\n const buffer = new Uint8Array(size);\n let j = 0;\n for (let i = 0; i < size; i++) {\n buffer[i] = chunks[0][j++];\n if (j === chunks[0].length) {\n chunks.shift();\n j = 0;\n }\n }\n if (chunks.length && j < chunks[0].length) {\n chunks[0] = chunks[0].slice(j);\n }\n return buffer;\n}\nexport function createPacketDecoderStream(maxPayload, binaryType) {\n if (!TEXT_DECODER) {\n TEXT_DECODER = new TextDecoder();\n }\n const chunks = [];\n let state = 0 /* State.READ_HEADER */;\n let expectedLength = -1;\n let isBinary = false;\n return new TransformStream({\n transform(chunk, controller) {\n chunks.push(chunk);\n while (true) {\n if (state === 0 /* State.READ_HEADER */) {\n if (totalLength(chunks) < 1) {\n break;\n }\n const header = concatChunks(chunks, 1);\n isBinary = (header[0] & 0x80) === 0x80;\n expectedLength = header[0] & 0x7f;\n if (expectedLength < 126) {\n state = 3 /* State.READ_PAYLOAD */;\n }\n else if (expectedLength === 126) {\n state = 1 /* State.READ_EXTENDED_LENGTH_16 */;\n }\n else {\n state = 2 /* State.READ_EXTENDED_LENGTH_64 */;\n }\n }\n else if (state === 1 /* State.READ_EXTENDED_LENGTH_16 */) {\n if (totalLength(chunks) < 2) {\n break;\n }\n const headerArray = concatChunks(chunks, 2);\n expectedLength = new DataView(headerArray.buffer, headerArray.byteOffset, headerArray.length).getUint16(0);\n state = 3 /* State.READ_PAYLOAD */;\n }\n else if (state === 2 /* State.READ_EXTENDED_LENGTH_64 */) {\n if (totalLength(chunks) < 8) {\n break;\n }\n const headerArray = concatChunks(chunks, 8);\n const view = new DataView(headerArray.buffer, headerArray.byteOffset, headerArray.length);\n const n = view.getUint32(0);\n if (n > Math.pow(2, 53 - 32) - 1) {\n // the maximum safe integer in JavaScript is 2^53 - 1\n controller.enqueue(ERROR_PACKET);\n break;\n }\n expectedLength = n * Math.pow(2, 32) + view.getUint32(4);\n state = 3 /* State.READ_PAYLOAD */;\n }\n else {\n if (totalLength(chunks) < expectedLength) {\n break;\n }\n const data = concatChunks(chunks, expectedLength);\n controller.enqueue(decodePacket(isBinary ? data : TEXT_DECODER.decode(data), binaryType));\n state = 0 /* State.READ_HEADER */;\n }\n if (expectedLength === 0 || expectedLength > maxPayload) {\n controller.enqueue(ERROR_PACKET);\n break;\n }\n }\n },\n });\n}\nexport const protocol = 4;\nexport { encodePacket, encodePayload, decodePacket, decodePayload, };\n","/**\n * Initialize a new `Emitter`.\n *\n * @api public\n */\n\nexport function Emitter(obj) {\n if (obj) return mixin(obj);\n}\n\n/**\n * Mixin the emitter properties.\n *\n * @param {Object} obj\n * @return {Object}\n * @api private\n */\n\nfunction mixin(obj) {\n for (var key in Emitter.prototype) {\n obj[key] = Emitter.prototype[key];\n }\n return obj;\n}\n\n/**\n * Listen on the given `event` with `fn`.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.on =\nEmitter.prototype.addEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n (this._callbacks['$' + event] = this._callbacks['$' + event] || [])\n .push(fn);\n return this;\n};\n\n/**\n * Adds an `event` listener that will be invoked a single\n * time then automatically removed.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.once = function(event, fn){\n function on() {\n this.off(event, on);\n fn.apply(this, arguments);\n }\n\n on.fn = fn;\n this.on(event, on);\n return this;\n};\n\n/**\n * Remove the given callback for `event` or all\n * registered callbacks.\n *\n * @param {String} event\n * @param {Function} fn\n * @return {Emitter}\n * @api public\n */\n\nEmitter.prototype.off =\nEmitter.prototype.removeListener =\nEmitter.prototype.removeAllListeners =\nEmitter.prototype.removeEventListener = function(event, fn){\n this._callbacks = this._callbacks || {};\n\n // all\n if (0 == arguments.length) {\n this._callbacks = {};\n return this;\n }\n\n // specific event\n var callbacks = this._callbacks['$' + event];\n if (!callbacks) return this;\n\n // remove all handlers\n if (1 == arguments.length) {\n delete this._callbacks['$' + event];\n return this;\n }\n\n // remove specific handler\n var cb;\n for (var i = 0; i < callbacks.length; i++) {\n cb = callbacks[i];\n if (cb === fn || cb.fn === fn) {\n callbacks.splice(i, 1);\n break;\n }\n }\n\n // Remove event specific arrays for event types that no\n // one is subscribed for to avoid memory leak.\n if (callbacks.length === 0) {\n delete this._callbacks['$' + event];\n }\n\n return this;\n};\n\n/**\n * Emit `event` with the given args.\n *\n * @param {String} event\n * @param {Mixed} ...\n * @return {Emitter}\n */\n\nEmitter.prototype.emit = function(event){\n this._callbacks = this._callbacks || {};\n\n var args = new Array(arguments.length - 1)\n , callbacks = this._callbacks['$' + event];\n\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n\n if (callbacks) {\n callbacks = callbacks.slice(0);\n for (var i = 0, len = callbacks.length; i < len; ++i) {\n callbacks[i].apply(this, args);\n }\n }\n\n return this;\n};\n\n// alias used for reserved events (protected method)\nEmitter.prototype.emitReserved = Emitter.prototype.emit;\n\n/**\n * Return array of callbacks for `event`.\n *\n * @param {String} event\n * @return {Array}\n * @api public\n */\n\nEmitter.prototype.listeners = function(event){\n this._callbacks = this._callbacks || {};\n return this._callbacks['$' + event] || [];\n};\n\n/**\n * Check if this emitter has `event` handlers.\n *\n * @param {String} event\n * @return {Boolean}\n * @api public\n */\n\nEmitter.prototype.hasListeners = function(event){\n return !! this.listeners(event).length;\n};\n","export const globalThisShim = (() => {\n if (typeof self !== \"undefined\") {\n return self;\n }\n else if (typeof window !== \"undefined\") {\n return window;\n }\n else {\n return Function(\"return this\")();\n }\n})();\n","import { globalThisShim as globalThis } from \"./globalThis.js\";\nexport function pick(obj, ...attr) {\n return attr.reduce((acc, k) => {\n if (obj.hasOwnProperty(k)) {\n acc[k] = obj[k];\n }\n return acc;\n }, {});\n}\n// Keep a reference to the real timeout functions so they can be used when overridden\nconst NATIVE_SET_TIMEOUT = globalThis.setTimeout;\nconst NATIVE_CLEAR_TIMEOUT = globalThis.clearTimeout;\nexport function installTimerFunctions(obj, opts) {\n if (opts.useNativeTimers) {\n obj.setTimeoutFn = NATIVE_SET_TIMEOUT.bind(globalThis);\n obj.clearTimeoutFn = NATIVE_CLEAR_TIMEOUT.bind(globalThis);\n }\n else {\n obj.setTimeoutFn = globalThis.setTimeout.bind(globalThis);\n obj.clearTimeoutFn = globalThis.clearTimeout.bind(globalThis);\n }\n}\n// base64 encoded buffers are about 33% bigger (https://en.wikipedia.org/wiki/Base64)\nconst BASE64_OVERHEAD = 1.33;\n// we could also have used `new Blob([obj]).size`, but it isn't supported in IE9\nexport function byteLength(obj) {\n if (typeof obj === \"string\") {\n return utf8Length(obj);\n }\n // arraybuffer or blob\n return Math.ceil((obj.byteLength || obj.size) * BASE64_OVERHEAD);\n}\nfunction utf8Length(str) {\n let c = 0, length = 0;\n for (let i = 0, l = str.length; i < l; i++) {\n c = str.charCodeAt(i);\n if (c < 0x80) {\n length += 1;\n }\n else if (c < 0x800) {\n length += 2;\n }\n else if (c < 0xd800 || c >= 0xe000) {\n length += 3;\n }\n else {\n i++;\n length += 4;\n }\n }\n return length;\n}\n","// imported from https://github.com/galkn/querystring\n/**\n * Compiles a querystring\n * Returns string representation of the object\n *\n * @param {Object}\n * @api private\n */\nexport function encode(obj) {\n let str = '';\n for (let i in obj) {\n if (obj.hasOwnProperty(i)) {\n if (str.length)\n str += '&';\n str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]);\n }\n }\n return str;\n}\n/**\n * Parses a simple querystring into an object\n *\n * @param {String} qs\n * @api private\n */\nexport function decode(qs) {\n let qry = {};\n let pairs = qs.split('&');\n for (let i = 0, l = pairs.length; i < l; i++) {\n let pair = pairs[i].split('=');\n qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]);\n }\n return qry;\n}\n","import { decodePacket } from \"engine.io-parser\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions } from \"./util.js\";\nimport { encode } from \"./contrib/parseqs.js\";\nexport class TransportError extends Error {\n constructor(reason, description, context) {\n super(reason);\n this.description = description;\n this.context = context;\n this.type = \"TransportError\";\n }\n}\nexport class Transport extends Emitter {\n /**\n * Transport abstract constructor.\n *\n * @param {Object} opts - options\n * @protected\n */\n constructor(opts) {\n super();\n this.writable = false;\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.query = opts.query;\n this.socket = opts.socket;\n }\n /**\n * Emits an error.\n *\n * @param {String} reason\n * @param description\n * @param context - the error context\n * @return {Transport} for chaining\n * @protected\n */\n onError(reason, description, context) {\n super.emitReserved(\"error\", new TransportError(reason, description, context));\n return this;\n }\n /**\n * Opens the transport.\n */\n open() {\n this.readyState = \"opening\";\n this.doOpen();\n return this;\n }\n /**\n * Closes the transport.\n */\n close() {\n if (this.readyState === \"opening\" || this.readyState === \"open\") {\n this.doClose();\n this.onClose();\n }\n return this;\n }\n /**\n * Sends multiple packets.\n *\n * @param {Array} packets\n */\n send(packets) {\n if (this.readyState === \"open\") {\n this.write(packets);\n }\n else {\n // this might happen if the transport was silently closed in the beforeunload event handler\n }\n }\n /**\n * Called upon open\n *\n * @protected\n */\n onOpen() {\n this.readyState = \"open\";\n this.writable = true;\n super.emitReserved(\"open\");\n }\n /**\n * Called with data.\n *\n * @param {String} data\n * @protected\n */\n onData(data) {\n const packet = decodePacket(data, this.socket.binaryType);\n this.onPacket(packet);\n }\n /**\n * Called with a decoded packet.\n *\n * @protected\n */\n onPacket(packet) {\n super.emitReserved(\"packet\", packet);\n }\n /**\n * Called upon close.\n *\n * @protected\n */\n onClose(details) {\n this.readyState = \"closed\";\n super.emitReserved(\"close\", details);\n }\n /**\n * Pauses the transport, in order not to lose packets during an upgrade.\n *\n * @param onPause\n */\n pause(onPause) { }\n createUri(schema, query = {}) {\n return (schema +\n \"://\" +\n this._hostname() +\n this._port() +\n this.opts.path +\n this._query(query));\n }\n _hostname() {\n const hostname = this.opts.hostname;\n return hostname.indexOf(\":\") === -1 ? hostname : \"[\" + hostname + \"]\";\n }\n _port() {\n if (this.opts.port &&\n ((this.opts.secure && Number(this.opts.port !== 443)) ||\n (!this.opts.secure && Number(this.opts.port) !== 80))) {\n return \":\" + this.opts.port;\n }\n else {\n return \"\";\n }\n }\n _query(query) {\n const encodedQuery = encode(query);\n return encodedQuery.length ? \"?\" + encodedQuery : \"\";\n }\n}\n","// imported from https://github.com/unshiftio/yeast\n'use strict';\nconst alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), length = 64, map = {};\nlet seed = 0, i = 0, prev;\n/**\n * Return a string representing the specified number.\n *\n * @param {Number} num The number to convert.\n * @returns {String} The string representation of the number.\n * @api public\n */\nexport function encode(num) {\n let encoded = '';\n do {\n encoded = alphabet[num % length] + encoded;\n num = Math.floor(num / length);\n } while (num > 0);\n return encoded;\n}\n/**\n * Return the integer value specified by the given string.\n *\n * @param {String} str The string to convert.\n * @returns {Number} The integer value represented by the string.\n * @api public\n */\nexport function decode(str) {\n let decoded = 0;\n for (i = 0; i < str.length; i++) {\n decoded = decoded * length + map[str.charAt(i)];\n }\n return decoded;\n}\n/**\n * Yeast: A tiny growing id generator.\n *\n * @returns {String} A unique id.\n * @api public\n */\nexport function yeast() {\n const now = encode(+new Date());\n if (now !== prev)\n return seed = 0, prev = now;\n return now + '.' + encode(seed++);\n}\n//\n// Map each character to its index.\n//\nfor (; i < length; i++)\n map[alphabet[i]] = i;\n","// imported from https://github.com/component/has-cors\nlet value = false;\ntry {\n value = typeof XMLHttpRequest !== 'undefined' &&\n 'withCredentials' in new XMLHttpRequest();\n}\ncatch (err) {\n // if XMLHttp support is disabled in IE then it will throw\n // when trying to create\n}\nexport const hasCORS = value;\n","// browser shim for xmlhttprequest module\nimport { hasCORS } from \"../contrib/has-cors.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nexport function XHR(opts) {\n const xdomain = opts.xdomain;\n // XMLHttpRequest can be disabled on IE\n try {\n if (\"undefined\" !== typeof XMLHttpRequest && (!xdomain || hasCORS)) {\n return new XMLHttpRequest();\n }\n }\n catch (e) { }\n if (!xdomain) {\n try {\n return new globalThis[[\"Active\"].concat(\"Object\").join(\"X\")](\"Microsoft.XMLHTTP\");\n }\n catch (e) { }\n }\n}\nexport function createCookieJar() { }\n","import { Transport } from \"../transport.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { encodePayload, decodePayload } from \"engine.io-parser\";\nimport { createCookieJar, XHR as XMLHttpRequest, } from \"./xmlhttprequest.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { installTimerFunctions, pick } from \"../util.js\";\nimport { globalThisShim as globalThis } from \"../globalThis.js\";\nfunction empty() { }\nconst hasXHR2 = (function () {\n const xhr = new XMLHttpRequest({\n xdomain: false,\n });\n return null != xhr.responseType;\n})();\nexport class Polling extends Transport {\n /**\n * XHR Polling constructor.\n *\n * @param {Object} opts\n * @package\n */\n constructor(opts) {\n super(opts);\n this.polling = false;\n if (typeof location !== \"undefined\") {\n const isSSL = \"https:\" === location.protocol;\n let port = location.port;\n // some user agents have empty `location.port`\n if (!port) {\n port = isSSL ? \"443\" : \"80\";\n }\n this.xd =\n (typeof location !== \"undefined\" &&\n opts.hostname !== location.hostname) ||\n port !== opts.port;\n }\n /**\n * XHR supports binary\n */\n const forceBase64 = opts && opts.forceBase64;\n this.supportsBinary = hasXHR2 && !forceBase64;\n if (this.opts.withCredentials) {\n this.cookieJar = createCookieJar();\n }\n }\n get name() {\n return \"polling\";\n }\n /**\n * Opens the socket (triggers polling). We write a PING message to determine\n * when the transport is open.\n *\n * @protected\n */\n doOpen() {\n this.poll();\n }\n /**\n * Pauses polling.\n *\n * @param {Function} onPause - callback upon buffers are flushed and transport is paused\n * @package\n */\n pause(onPause) {\n this.readyState = \"pausing\";\n const pause = () => {\n this.readyState = \"paused\";\n onPause();\n };\n if (this.polling || !this.writable) {\n let total = 0;\n if (this.polling) {\n total++;\n this.once(\"pollComplete\", function () {\n --total || pause();\n });\n }\n if (!this.writable) {\n total++;\n this.once(\"drain\", function () {\n --total || pause();\n });\n }\n }\n else {\n pause();\n }\n }\n /**\n * Starts polling cycle.\n *\n * @private\n */\n poll() {\n this.polling = true;\n this.doPoll();\n this.emitReserved(\"poll\");\n }\n /**\n * Overloads onData to detect payloads.\n *\n * @protected\n */\n onData(data) {\n const callback = (packet) => {\n // if its the first message we consider the transport open\n if (\"opening\" === this.readyState && packet.type === \"open\") {\n this.onOpen();\n }\n // if its a close packet, we close the ongoing requests\n if (\"close\" === packet.type) {\n this.onClose({ description: \"transport closed by the server\" });\n return false;\n }\n // otherwise bypass onData and handle the message\n this.onPacket(packet);\n };\n // decode payload\n decodePayload(data, this.socket.binaryType).forEach(callback);\n // if an event did not trigger closing\n if (\"closed\" !== this.readyState) {\n // if we got data we're not polling\n this.polling = false;\n this.emitReserved(\"pollComplete\");\n if (\"open\" === this.readyState) {\n this.poll();\n }\n else {\n }\n }\n }\n /**\n * For polling, send a close packet.\n *\n * @protected\n */\n doClose() {\n const close = () => {\n this.write([{ type: \"close\" }]);\n };\n if (\"open\" === this.readyState) {\n close();\n }\n else {\n // in case we're trying to close while\n // handshaking is in progress (GH-164)\n this.once(\"open\", close);\n }\n }\n /**\n * Writes a packets payload.\n *\n * @param {Array} packets - data packets\n * @protected\n */\n write(packets) {\n this.writable = false;\n encodePayload(packets, (data) => {\n this.doWrite(data, () => {\n this.writable = true;\n this.emitReserved(\"drain\");\n });\n });\n }\n /**\n * Generates uri for connection.\n *\n * @private\n */\n uri() {\n const schema = this.opts.secure ? \"https\" : \"http\";\n const query = this.query || {};\n // cache busting is forced\n if (false !== this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n if (!this.supportsBinary && !query.sid) {\n query.b64 = 1;\n }\n return this.createUri(schema, query);\n }\n /**\n * Creates a request.\n *\n * @param {String} method\n * @private\n */\n request(opts = {}) {\n Object.assign(opts, { xd: this.xd, cookieJar: this.cookieJar }, this.opts);\n return new Request(this.uri(), opts);\n }\n /**\n * Sends data.\n *\n * @param {String} data to send.\n * @param {Function} called upon flush.\n * @private\n */\n doWrite(data, fn) {\n const req = this.request({\n method: \"POST\",\n data: data,\n });\n req.on(\"success\", fn);\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr post error\", xhrStatus, context);\n });\n }\n /**\n * Starts a poll cycle.\n *\n * @private\n */\n doPoll() {\n const req = this.request();\n req.on(\"data\", this.onData.bind(this));\n req.on(\"error\", (xhrStatus, context) => {\n this.onError(\"xhr poll error\", xhrStatus, context);\n });\n this.pollXhr = req;\n }\n}\nexport class Request extends Emitter {\n /**\n * Request constructor\n *\n * @param {Object} options\n * @package\n */\n constructor(uri, opts) {\n super();\n installTimerFunctions(this, opts);\n this.opts = opts;\n this.method = opts.method || \"GET\";\n this.uri = uri;\n this.data = undefined !== opts.data ? opts.data : null;\n this.create();\n }\n /**\n * Creates the XHR object and sends the request.\n *\n * @private\n */\n create() {\n var _a;\n const opts = pick(this.opts, \"agent\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"autoUnref\");\n opts.xdomain = !!this.opts.xd;\n const xhr = (this.xhr = new XMLHttpRequest(opts));\n try {\n xhr.open(this.method, this.uri, true);\n try {\n if (this.opts.extraHeaders) {\n xhr.setDisableHeaderCheck && xhr.setDisableHeaderCheck(true);\n for (let i in this.opts.extraHeaders) {\n if (this.opts.extraHeaders.hasOwnProperty(i)) {\n xhr.setRequestHeader(i, this.opts.extraHeaders[i]);\n }\n }\n }\n }\n catch (e) { }\n if (\"POST\" === this.method) {\n try {\n xhr.setRequestHeader(\"Content-type\", \"text/plain;charset=UTF-8\");\n }\n catch (e) { }\n }\n try {\n xhr.setRequestHeader(\"Accept\", \"*/*\");\n }\n catch (e) { }\n (_a = this.opts.cookieJar) === null || _a === void 0 ? void 0 : _a.addCookies(xhr);\n // ie6 check\n if (\"withCredentials\" in xhr) {\n xhr.withCredentials = this.opts.withCredentials;\n }\n if (this.opts.requestTimeout) {\n xhr.timeout = this.opts.requestTimeout;\n }\n xhr.onreadystatechange = () => {\n var _a;\n if (xhr.readyState === 3) {\n (_a = this.opts.cookieJar) === null || _a === void 0 ? void 0 : _a.parseCookies(xhr);\n }\n if (4 !== xhr.readyState)\n return;\n if (200 === xhr.status || 1223 === xhr.status) {\n this.onLoad();\n }\n else {\n // make sure the `error` event handler that's user-set\n // does not throw in the same tick and gets caught here\n this.setTimeoutFn(() => {\n this.onError(typeof xhr.status === \"number\" ? xhr.status : 0);\n }, 0);\n }\n };\n xhr.send(this.data);\n }\n catch (e) {\n // Need to defer since .create() is called directly from the constructor\n // and thus the 'error' event can only be only bound *after* this exception\n // occurs. Therefore, also, we cannot throw here at all.\n this.setTimeoutFn(() => {\n this.onError(e);\n }, 0);\n return;\n }\n if (typeof document !== \"undefined\") {\n this.index = Request.requestsCount++;\n Request.requests[this.index] = this;\n }\n }\n /**\n * Called upon error.\n *\n * @private\n */\n onError(err) {\n this.emitReserved(\"error\", err, this.xhr);\n this.cleanup(true);\n }\n /**\n * Cleans up house.\n *\n * @private\n */\n cleanup(fromError) {\n if (\"undefined\" === typeof this.xhr || null === this.xhr) {\n return;\n }\n this.xhr.onreadystatechange = empty;\n if (fromError) {\n try {\n this.xhr.abort();\n }\n catch (e) { }\n }\n if (typeof document !== \"undefined\") {\n delete Request.requests[this.index];\n }\n this.xhr = null;\n }\n /**\n * Called upon load.\n *\n * @private\n */\n onLoad() {\n const data = this.xhr.responseText;\n if (data !== null) {\n this.emitReserved(\"data\", data);\n this.emitReserved(\"success\");\n this.cleanup();\n }\n }\n /**\n * Aborts the request.\n *\n * @package\n */\n abort() {\n this.cleanup();\n }\n}\nRequest.requestsCount = 0;\nRequest.requests = {};\n/**\n * Aborts pending requests when unloading the window. This is needed to prevent\n * memory leaks (e.g. when using IE) and to ensure that no spurious error is\n * emitted.\n */\nif (typeof document !== \"undefined\") {\n // @ts-ignore\n if (typeof attachEvent === \"function\") {\n // @ts-ignore\n attachEvent(\"onunload\", unloadHandler);\n }\n else if (typeof addEventListener === \"function\") {\n const terminationEvent = \"onpagehide\" in globalThis ? \"pagehide\" : \"unload\";\n addEventListener(terminationEvent, unloadHandler, false);\n }\n}\nfunction unloadHandler() {\n for (let i in Request.requests) {\n if (Request.requests.hasOwnProperty(i)) {\n Request.requests[i].abort();\n }\n }\n}\n","import { globalThisShim as globalThis } from \"../globalThis.js\";\nexport const nextTick = (() => {\n const isPromiseAvailable = typeof Promise === \"function\" && typeof Promise.resolve === \"function\";\n if (isPromiseAvailable) {\n return (cb) => Promise.resolve().then(cb);\n }\n else {\n return (cb, setTimeoutFn) => setTimeoutFn(cb, 0);\n }\n})();\nexport const WebSocket = globalThis.WebSocket || globalThis.MozWebSocket;\nexport const usingBrowserWebSocket = true;\nexport const defaultBinaryType = \"arraybuffer\";\n","import { Transport } from \"../transport.js\";\nimport { yeast } from \"../contrib/yeast.js\";\nimport { pick } from \"../util.js\";\nimport { nextTick, usingBrowserWebSocket, WebSocket, } from \"./websocket-constructor.js\";\nimport { encodePacket } from \"engine.io-parser\";\n// detect ReactNative environment\nconst isReactNative = typeof navigator !== \"undefined\" &&\n typeof navigator.product === \"string\" &&\n navigator.product.toLowerCase() === \"reactnative\";\nexport class WS extends Transport {\n /**\n * WebSocket transport constructor.\n *\n * @param {Object} opts - connection options\n * @protected\n */\n constructor(opts) {\n super(opts);\n this.supportsBinary = !opts.forceBase64;\n }\n get name() {\n return \"websocket\";\n }\n doOpen() {\n if (!this.check()) {\n // let probe timeout\n return;\n }\n const uri = this.uri();\n const protocols = this.opts.protocols;\n // React Native only supports the 'headers' option, and will print a warning if anything else is passed\n const opts = isReactNative\n ? {}\n : pick(this.opts, \"agent\", \"perMessageDeflate\", \"pfx\", \"key\", \"passphrase\", \"cert\", \"ca\", \"ciphers\", \"rejectUnauthorized\", \"localAddress\", \"protocolVersion\", \"origin\", \"maxPayload\", \"family\", \"checkServerIdentity\");\n if (this.opts.extraHeaders) {\n opts.headers = this.opts.extraHeaders;\n }\n try {\n this.ws =\n usingBrowserWebSocket && !isReactNative\n ? protocols\n ? new WebSocket(uri, protocols)\n : new WebSocket(uri)\n : new WebSocket(uri, protocols, opts);\n }\n catch (err) {\n return this.emitReserved(\"error\", err);\n }\n this.ws.binaryType = this.socket.binaryType;\n this.addEventListeners();\n }\n /**\n * Adds event listeners to the socket\n *\n * @private\n */\n addEventListeners() {\n this.ws.onopen = () => {\n if (this.opts.autoUnref) {\n this.ws._socket.unref();\n }\n this.onOpen();\n };\n this.ws.onclose = (closeEvent) => this.onClose({\n description: \"websocket connection closed\",\n context: closeEvent,\n });\n this.ws.onmessage = (ev) => this.onData(ev.data);\n this.ws.onerror = (e) => this.onError(\"websocket error\", e);\n }\n write(packets) {\n this.writable = false;\n // encodePacket efficient as it uses WS framing\n // no need for encodePayload\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n encodePacket(packet, this.supportsBinary, (data) => {\n // always create a new object (GH-437)\n const opts = {};\n if (!usingBrowserWebSocket) {\n if (packet.options) {\n opts.compress = packet.options.compress;\n }\n if (this.opts.perMessageDeflate) {\n const len = \n // @ts-ignore\n \"string\" === typeof data ? Buffer.byteLength(data) : data.length;\n if (len < this.opts.perMessageDeflate.threshold) {\n opts.compress = false;\n }\n }\n }\n // Sometimes the websocket has already been closed but the browser didn't\n // have a chance of informing us about it yet, in that case send will\n // throw an error\n try {\n if (usingBrowserWebSocket) {\n // TypeError is thrown when passing the second argument on Safari\n this.ws.send(data);\n }\n else {\n this.ws.send(data, opts);\n }\n }\n catch (e) {\n }\n if (lastPacket) {\n // fake drain\n // defer to next tick to allow Socket to clear writeBuffer\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n doClose() {\n if (typeof this.ws !== \"undefined\") {\n this.ws.close();\n this.ws = null;\n }\n }\n /**\n * Generates uri for connection.\n *\n * @private\n */\n uri() {\n const schema = this.opts.secure ? \"wss\" : \"ws\";\n const query = this.query || {};\n // append timestamp to URI\n if (this.opts.timestampRequests) {\n query[this.opts.timestampParam] = yeast();\n }\n // communicate binary support capabilities\n if (!this.supportsBinary) {\n query.b64 = 1;\n }\n return this.createUri(schema, query);\n }\n /**\n * Feature detection for WebSocket.\n *\n * @return {Boolean} whether this transport is available.\n * @private\n */\n check() {\n return !!WebSocket;\n }\n}\n","import { Transport } from \"../transport.js\";\nimport { nextTick } from \"./websocket-constructor.js\";\nimport { createPacketDecoderStream, createPacketEncoderStream, } from \"engine.io-parser\";\nexport class WT extends Transport {\n get name() {\n return \"webtransport\";\n }\n doOpen() {\n // @ts-ignore\n if (typeof WebTransport !== \"function\") {\n return;\n }\n // @ts-ignore\n this.transport = new WebTransport(this.createUri(\"https\"), this.opts.transportOptions[this.name]);\n this.transport.closed\n .then(() => {\n this.onClose();\n })\n .catch((err) => {\n this.onError(\"webtransport error\", err);\n });\n // note: we could have used async/await, but that would require some additional polyfills\n this.transport.ready.then(() => {\n this.transport.createBidirectionalStream().then((stream) => {\n const decoderStream = createPacketDecoderStream(Number.MAX_SAFE_INTEGER, this.socket.binaryType);\n const reader = stream.readable.pipeThrough(decoderStream).getReader();\n const encoderStream = createPacketEncoderStream();\n encoderStream.readable.pipeTo(stream.writable);\n this.writer = encoderStream.writable.getWriter();\n const read = () => {\n reader\n .read()\n .then(({ done, value }) => {\n if (done) {\n return;\n }\n this.onPacket(value);\n read();\n })\n .catch((err) => {\n });\n };\n read();\n const packet = { type: \"open\" };\n if (this.query.sid) {\n packet.data = `{\"sid\":\"${this.query.sid}\"}`;\n }\n this.writer.write(packet).then(() => this.onOpen());\n });\n });\n }\n write(packets) {\n this.writable = false;\n for (let i = 0; i < packets.length; i++) {\n const packet = packets[i];\n const lastPacket = i === packets.length - 1;\n this.writer.write(packet).then(() => {\n if (lastPacket) {\n nextTick(() => {\n this.writable = true;\n this.emitReserved(\"drain\");\n }, this.setTimeoutFn);\n }\n });\n }\n }\n doClose() {\n var _a;\n (_a = this.transport) === null || _a === void 0 ? void 0 : _a.close();\n }\n}\n","import { Polling } from \"./polling.js\";\nimport { WS } from \"./websocket.js\";\nimport { WT } from \"./webtransport.js\";\nexport const transports = {\n websocket: WS,\n webtransport: WT,\n polling: Polling,\n};\n","// imported from https://github.com/galkn/parseuri\n/**\n * Parses a URI\n *\n * Note: we could also have used the built-in URL object, but it isn't supported on all platforms.\n *\n * See:\n * - https://developer.mozilla.org/en-US/docs/Web/API/URL\n * - https://caniuse.com/url\n * - https://www.rfc-editor.org/rfc/rfc3986#appendix-B\n *\n * History of the parse() method:\n * - first commit: https://github.com/socketio/socket.io-client/commit/4ee1d5d94b3906a9c052b459f1a818b15f38f91c\n * - export into its own module: https://github.com/socketio/engine.io-client/commit/de2c561e4564efeb78f1bdb1ba39ef81b2822cb3\n * - reimport: https://github.com/socketio/engine.io-client/commit/df32277c3f6d622eec5ed09f493cae3f3391d242\n *\n * @author Steven Levithan <stevenlevithan.com> (MIT license)\n * @api private\n */\nconst re = /^(?:(?![^:@\\/?#]+:[^:@\\/]*@)(http|https|ws|wss):\\/\\/)?((?:(([^:@\\/?#]*)(?::([^:@\\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\\/?#]*)(?::(\\d*))?)(((\\/(?:[^?#](?![^?#\\/]*\\.[^?#\\/.]+(?:[?#]|$)))*\\/?)?([^?#\\/]*))(?:\\?([^#]*))?(?:#(.*))?)/;\nconst parts = [\n 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor'\n];\nexport function parse(str) {\n if (str.length > 2000) {\n throw \"URI too long\";\n }\n const src = str, b = str.indexOf('['), e = str.indexOf(']');\n if (b != -1 && e != -1) {\n str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length);\n }\n let m = re.exec(str || ''), uri = {}, i = 14;\n while (i--) {\n uri[parts[i]] = m[i] || '';\n }\n if (b != -1 && e != -1) {\n uri.source = src;\n uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':');\n uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':');\n uri.ipv6uri = true;\n }\n uri.pathNames = pathNames(uri, uri['path']);\n uri.queryKey = queryKey(uri, uri['query']);\n return uri;\n}\nfunction pathNames(obj, path) {\n const regx = /\\/{2,9}/g, names = path.replace(regx, \"/\").split(\"/\");\n if (path.slice(0, 1) == '/' || path.length === 0) {\n names.splice(0, 1);\n }\n if (path.slice(-1) == '/') {\n names.splice(names.length - 1, 1);\n }\n return names;\n}\nfunction queryKey(uri, query) {\n const data = {};\n query.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, function ($0, $1, $2) {\n if ($1) {\n data[$1] = $2;\n }\n });\n return data;\n}\n","import { transports } from \"./transports/index.js\";\nimport { installTimerFunctions, byteLength } from \"./util.js\";\nimport { decode } from \"./contrib/parseqs.js\";\nimport { parse } from \"./contrib/parseuri.js\";\nimport { Emitter } from \"@socket.io/component-emitter\";\nimport { protocol } from \"engine.io-parser\";\nimport { defaultBinaryType } from \"./transports/websocket-constructor.js\";\nexport class Socket extends Emitter {\n /**\n * Socket constructor.\n *\n * @param {String|Object} uri - uri or options\n * @param {Object} opts - options\n */\n constructor(uri, opts = {}) {\n super();\n this.binaryType = defaultBinaryType;\n this.writeBuffer = [];\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = null;\n }\n if (uri) {\n uri = parse(uri);\n opts.hostname = uri.host;\n opts.secure = uri.protocol === \"https\" || uri.protocol === \"wss\";\n opts.port = uri.port;\n if (uri.query)\n opts.query = uri.query;\n }\n else if (opts.host) {\n opts.hostname = parse(opts.host).host;\n }\n installTimerFunctions(this, opts);\n this.secure =\n null != opts.secure\n ? opts.secure\n : typeof location !== \"undefined\" && \"https:\" === location.protocol;\n if (opts.hostname && !opts.port) {\n // if no port is specified manually, use the protocol default\n opts.port = this.secure ? \"443\" : \"80\";\n }\n this.hostname =\n opts.hostname ||\n (typeof location !== \"undefined\" ? location.hostname : \"localhost\");\n this.port =\n opts.port ||\n (typeof location !== \"undefined\" && location.port\n ? location.port\n : this.secure\n ? \"443\"\n : \"80\");\n this.transports = opts.transports || [\n \"polling\",\n \"websocket\",\n \"webtransport\",\n ];\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n this.opts = Object.assign({\n path: \"/engine.io\",\n agent: false,\n withCredentials: false,\n upgrade: true,\n timestampParam: \"t\",\n rememberUpgrade: false,\n addTrailingSlash: true,\n rejectUnauthorized: true,\n perMessageDeflate: {\n threshold: 1024,\n },\n transportOptions: {},\n closeOnBeforeunload: false,\n }, opts);\n this.opts.path =\n this.opts.path.replace(/\\/$/, \"\") +\n (this.opts.addTrailingSlash ? \"/\" : \"\");\n if (typeof this.opts.query === \"string\") {\n this.opts.query = decode(this.opts.query);\n }\n // set on handshake\n this.id = null;\n this.upgrades = null;\n this.pingInterval = null;\n this.pingTimeout = null;\n // set on heartbeat\n this.pingTimeoutTimer = null;\n if (typeof addEventListener === \"function\") {\n if (this.opts.closeOnBeforeunload) {\n // Firefox closes the connection when the \"beforeunload\" event is emitted but not Chrome. This event listener\n // ensures every browser behaves the same (no \"disconnect\" event at the Socket.IO level when the page is\n // closed/reloaded)\n this.beforeunloadEventListener = () => {\n if (this.transport) {\n // silently close the transport\n this.transport.removeAllListeners();\n this.transport.close();\n }\n };\n addEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n }\n if (this.hostname !== \"localhost\") {\n this.offlineEventListener = () => {\n this.onClose(\"transport close\", {\n description: \"network connection lost\",\n });\n };\n addEventListener(\"offline\", this.offlineEventListener, false);\n }\n }\n this.open();\n }\n /**\n * Creates transport of the given type.\n *\n * @param {String} name - transport name\n * @return {Transport}\n * @private\n */\n createTransport(name) {\n const query = Object.assign({}, this.opts.query);\n // append engine.io protocol identifier\n query.EIO = protocol;\n // transport name\n query.transport = name;\n // session id if we already have one\n if (this.id)\n query.sid = this.id;\n const opts = Object.assign({}, this.opts, {\n query,\n socket: this,\n hostname: this.hostname,\n secure: this.secure,\n port: this.port,\n }, this.opts.transportOptions[name]);\n return new transports[name](opts);\n }\n /**\n * Initializes transport to use and starts probe.\n *\n * @private\n */\n open() {\n let transport;\n if (this.opts.rememberUpgrade &&\n Socket.priorWebsocketSuccess &&\n this.transports.indexOf(\"websocket\") !== -1) {\n transport = \"websocket\";\n }\n else if (0 === this.transports.length) {\n // Emit error on next tick so it can be listened to\n this.setTimeoutFn(() => {\n this.emitReserved(\"error\", \"No transports available\");\n }, 0);\n return;\n }\n else {\n transport = this.transports[0];\n }\n this.readyState = \"opening\";\n // Retry with the next transport if the transport is disabled (jsonp: false)\n try {\n transport = this.createTransport(transport);\n }\n catch (e) {\n this.transports.shift();\n this.open();\n return;\n }\n transport.open();\n this.setTransport(transport);\n }\n /**\n * Sets the current transport. Disables the existing one (if any).\n *\n * @private\n */\n setTransport(transport) {\n if (this.transport) {\n this.transport.removeAllListeners();\n }\n // set up transport\n this.transport = transport;\n // set up transport listeners\n transport\n .on(\"drain\", this.onDrain.bind(this))\n .on(\"packet\", this.onPacket.bind(this))\n .on(\"error\", this.onError.bind(this))\n .on(\"close\", (reason) => this.onClose(\"transport close\", reason));\n }\n /**\n * Probes a transport.\n *\n * @param {String} name - transport name\n * @private\n */\n probe(name) {\n let transport = this.createTransport(name);\n let failed = false;\n Socket.priorWebsocketSuccess = false;\n const onTransportOpen = () => {\n if (failed)\n return;\n transport.send([{ type: \"ping\", data: \"probe\" }]);\n transport.once(\"packet\", (msg) => {\n if (failed)\n return;\n if (\"pong\" === msg.type && \"probe\" === msg.data) {\n this.upgrading = true;\n this.emitReserved(\"upgrading\", transport);\n if (!transport)\n return;\n Socket.priorWebsocketSuccess = \"websocket\" === transport.name;\n this.transport.pause(() => {\n if (failed)\n return;\n if (\"closed\" === this.readyState)\n return;\n cleanup();\n this.setTransport(transport);\n transport.send([{ type: \"upgrade\" }]);\n this.emitReserved(\"upgrade\", transport);\n transport = null;\n this.upgrading = false;\n this.flush();\n });\n }\n else {\n const err = new Error(\"probe error\");\n // @ts-ignore\n err.transport = transport.name;\n this.emitReserved(\"upgradeError\", err);\n }\n });\n };\n function freezeTransport() {\n if (failed)\n return;\n // Any callback called by transport should be ignored since now\n failed = true;\n cleanup();\n transport.close();\n transport = null;\n }\n // Handle any error that happens while probing\n const onerror = (err) => {\n const error = new Error(\"probe error: \" + err);\n // @ts-ignore\n error.transport = transport.name;\n freezeTransport();\n this.emitReserved(\"upgradeError\", error);\n };\n function onTransportClose() {\n onerror(\"transport closed\");\n }\n // When the socket is closed while we're probing\n function onclose() {\n onerror(\"socket closed\");\n }\n // When the socket is upgraded while we're probing\n function onupgrade(to) {\n if (transport && to.name !== transport.name) {\n freezeTransport();\n }\n }\n // Remove all listeners on the transport and on self\n const cleanup = () => {\n transport.removeListener(\"open\", onTransportOpen);\n transport.removeListener(\"error\", onerror);\n transport.removeListener(\"close\", onTransportClose);\n this.off(\"close\", onclose);\n this.off(\"upgrading\", onupgrade);\n };\n transport.once(\"open\", onTransportOpen);\n transport.once(\"error\", onerror);\n transport.once(\"close\", onTransportClose);\n this.once(\"close\", onclose);\n this.once(\"upgrading\", onupgrade);\n if (this.upgrades.indexOf(\"webtransport\") !== -1 &&\n name !== \"webtransport\") {\n // favor WebTransport\n this.setTimeoutFn(() => {\n if (!failed) {\n transport.open();\n }\n }, 200);\n }\n else {\n transport.open();\n }\n }\n /**\n * Called when connection is deemed open.\n *\n * @private\n */\n onOpen() {\n this.readyState = \"open\";\n Socket.priorWebsocketSuccess = \"websocket\" === this.transport.name;\n this.emitReserved(\"open\");\n this.flush();\n // we check for `readyState` in case an `open`\n // listener already closed the socket\n if (\"open\" === this.readyState && this.opts.upgrade) {\n let i = 0;\n const l = this.upgrades.length;\n for (; i < l; i++) {\n this.probe(this.upgrades[i]);\n }\n }\n }\n /**\n * Handles a packet.\n *\n * @private\n */\n onPacket(packet) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n this.emitReserved(\"packet\", packet);\n // Socket is live - any packet counts\n this.emitReserved(\"heartbeat\");\n this.resetPingTimeout();\n switch (packet.type) {\n case \"open\":\n this.onHandshake(JSON.parse(packet.data));\n break;\n case \"ping\":\n this.sendPacket(\"pong\");\n this.emitReserved(\"ping\");\n this.emitReserved(\"pong\");\n break;\n case \"error\":\n const err = new Error(\"server error\");\n // @ts-ignore\n err.code = packet.data;\n this.onError(err);\n break;\n case \"message\":\n this.emitReserved(\"data\", packet.data);\n this.emitReserved(\"message\", packet.data);\n break;\n }\n }\n else {\n }\n }\n /**\n * Called upon handshake completion.\n *\n * @param {Object} data - handshake obj\n * @private\n */\n onHandshake(data) {\n this.emitReserved(\"handshake\", data);\n this.id = data.sid;\n this.transport.query.sid = data.sid;\n this.upgrades = this.filterUpgrades(data.upgrades);\n this.pingInterval = data.pingInterval;\n this.pingTimeout = data.pingTimeout;\n this.maxPayload = data.maxPayload;\n this.onOpen();\n // In case open handler closes socket\n if (\"closed\" === this.readyState)\n return;\n this.resetPingTimeout();\n }\n /**\n * Sets and resets ping timeout timer based on server pings.\n *\n * @private\n */\n resetPingTimeout() {\n this.clearTimeoutFn(this.pingTimeoutTimer);\n this.pingTimeoutTimer = this.setTimeoutFn(() => {\n this.onClose(\"ping timeout\");\n }, this.pingInterval + this.pingTimeout);\n if (this.opts.autoUnref) {\n this.pingTimeoutTimer.unref();\n }\n }\n /**\n * Called on `drain` event\n *\n * @private\n */\n onDrain() {\n this.writeBuffer.splice(0, this.prevBufferLen);\n // setting prevBufferLen = 0 is very important\n // for example, when upgrading, upgrade packet is sent over,\n // and a nonzero prevBufferLen could cause problems on `drain`\n this.prevBufferLen = 0;\n if (0 === this.writeBuffer.length) {\n this.emitReserved(\"drain\");\n }\n else {\n this.flush();\n }\n }\n /**\n * Flush write buffers.\n *\n * @private\n */\n flush() {\n if (\"closed\" !== this.readyState &&\n this.transport.writable &&\n !this.upgrading &&\n this.writeBuffer.length) {\n const packets = this.getWritablePackets();\n this.transport.send(packets);\n // keep track of current length of writeBuffer\n // splice writeBuffer and callbackBuffer on `drain`\n this.prevBufferLen = packets.length;\n this.emitReserved(\"flush\");\n }\n }\n /**\n * Ensure the encoded size of the writeBuffer is below the maxPayload value sent by the server (only for HTTP\n * long-polling)\n *\n * @private\n */\n getWritablePackets() {\n const shouldCheckPayloadSize = this.maxPayload &&\n this.transport.name === \"polling\" &&\n this.writeBuffer.length > 1;\n if (!shouldCheckPayloadSize) {\n return this.writeBuffer;\n }\n let payloadSize = 1; // first packet type\n for (let i = 0; i < this.writeBuffer.length; i++) {\n const data = this.writeBuffer[i].data;\n if (data) {\n payloadSize += byteLength(data);\n }\n if (i > 0 && payloadSize > this.maxPayload) {\n return this.writeBuffer.slice(0, i);\n }\n payloadSize += 2; // separator + packet type\n }\n return this.writeBuffer;\n }\n /**\n * Sends a message.\n *\n * @param {String} msg - message.\n * @param {Object} options.\n * @param {Function} callback function.\n * @return {Socket} for chaining.\n */\n write(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n send(msg, options, fn) {\n this.sendPacket(\"message\", msg, options, fn);\n return this;\n }\n /**\n * Sends a packet.\n *\n * @param {String} type: packet type.\n * @param {String} data.\n * @param {Object} options.\n * @param {Function} fn - callback function.\n * @private\n */\n sendPacket(type, data, options, fn) {\n if (\"function\" === typeof data) {\n fn = data;\n data = undefined;\n }\n if (\"function\" === typeof options) {\n fn = options;\n options = null;\n }\n if (\"closing\" === this.readyState || \"closed\" === this.readyState) {\n return;\n }\n options = options || {};\n options.compress = false !== options.compress;\n const packet = {\n type: type,\n data: data,\n options: options,\n };\n this.emitReserved(\"packetCreate\", packet);\n this.writeBuffer.push(packet);\n if (fn)\n this.once(\"flush\", fn);\n this.flush();\n }\n /**\n * Closes the connection.\n */\n close() {\n const close = () => {\n this.onClose(\"forced close\");\n this.transport.close();\n };\n const cleanupAndClose = () => {\n this.off(\"upgrade\", cleanupAndClose);\n this.off(\"upgradeError\", cleanupAndClose);\n close();\n };\n const waitForUpgrade = () => {\n // wait for upgrade to finish since we can't send packets while pausing a transport\n this.once(\"upgrade\", cleanupAndClose);\n this.once(\"upgradeError\", cleanupAndClose);\n };\n if (\"opening\" === this.readyState || \"open\" === this.readyState) {\n this.readyState = \"closing\";\n if (this.writeBuffer.length) {\n this.once(\"drain\", () => {\n if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n });\n }\n else if (this.upgrading) {\n waitForUpgrade();\n }\n else {\n close();\n }\n }\n return this;\n }\n /**\n * Called upon transport error\n *\n * @private\n */\n onError(err) {\n Socket.priorWebsocketSuccess = false;\n this.emitReserved(\"error\", err);\n this.onClose(\"transport error\", err);\n }\n /**\n * Called upon transport close.\n *\n * @private\n */\n onClose(reason, description) {\n if (\"opening\" === this.readyState ||\n \"open\" === this.readyState ||\n \"closing\" === this.readyState) {\n // clear timers\n this.clearTimeoutFn(this.pingTimeoutTimer);\n // stop event from firing again for transport\n this.transport.removeAllListeners(\"close\");\n // ensure transport won't stay open\n this.transport.close();\n // ignore further transport communication\n this.transport.removeAllListeners();\n if (typeof removeEventListener === \"function\") {\n removeEventListener(\"beforeunload\", this.beforeunloadEventListener, false);\n removeEventListener(\"offline\", this.offlineEventListener, false);\n }\n // set ready state\n this.readyState = \"closed\";\n // clear session id\n this.id = null;\n // emit close event\n this.emitReserved(\"close\", reason, description);\n // clean buffers after, so users can still\n // grab the buffers on `close` event\n this.writeBuffer = [];\n this.prevBufferLen = 0;\n }\n }\n /**\n * Filters upgrades, returning only those matching client transports.\n *\n * @param {Array} upgrades - server upgrades\n * @private\n */\n filterUpgrades(upgrades) {\n const filteredUpgrades = [];\n let i = 0;\n const j = upgrades.length;\n for (; i < j; i++) {\n if (~this.transports.indexOf(upgrades[i]))\n filteredUpgrades.push(upgrades[i]);\n }\n return filteredUpgrades;\n }\n}\nSocket.protocol = protocol;\n","import { Socket } from \"./socket.js\";\nexport { Socket };\nexport const protocol = Socket.protocol;\nexport { Transport, TransportError } from \"./transport.js\";\nexport { transports } from \"./transports/index.js\";\nexport { installTimerFunctions } from \"./util.js\";\nexport { parse } from \"./contrib/parseuri.js\";\nexport { nextTick } from \"./transports/websocket-constructor.js\";\n","import { parse } from \"engine.io-client\";\n/**\n * URL parser.\n *\n * @param uri - url\n * @param path - the request path of the connection\n * @param loc - An object meant to mimic window.location.\n * Defaults to window.location.\n * @public\n */\nexport function url(uri, path = \"\", loc) {\n let obj = uri;\n // default to window.location\n loc = loc || (typeof location !== \"undefined\" && location);\n if (null == uri)\n uri = loc.protocol + \"//\" + loc.host;\n // relative path support\n if (typeof uri === \"string\") {\n if (\"/\" === uri.charAt(0)) {\n if (\"/\" === uri.charAt(1)) {\n uri = loc.protocol + uri;\n }\n else {\n uri = loc.host + uri;\n }\n }\n if (!/^(https?|wss?):\\/\\//.test(uri)) {\n if (\"undefined\" !== typeof loc) {\n uri = loc.protocol + \"//\" + uri;\n }\n else {\n uri = \"https://\" + uri;\n }\n }\n // parse\n obj = parse(uri);\n }\n // make sure we treat `localhost:80` and `localhost` equally\n if (!obj.port) {\n if (/^(http|ws)$/.test(obj.protocol)) {\n obj.port = \"80\";\n }\n else if (/^(http|ws)s$/.test(obj.protocol)) {\n obj.port = \"443\";\n }\n }\n obj.path = obj.path || \"/\";\n const ipv6 = obj.host.indexOf(\":\") !== -1;\n const host = ipv6 ? \"[\" + obj.host + \"]\" : obj.host;\n // define unique id\n obj.id = obj.protocol + \"://\" + host + \":\" + obj.port + path;\n // define href\n obj.href =\n obj.protocol +\n \"://\" +\n host +\n (loc && loc.port === obj.port ? \"\" : \":\" + obj.port);\n return obj;\n}\n","const withNativeArrayBuffer = typeof ArrayBuffer === \"function\";\nconst isView = (obj) => {\n return typeof ArrayBuffer.isView === \"function\"\n ? ArrayBuffer.isView(obj)\n : obj.buffer instanceof ArrayBuffer;\n};\nconst toString = Object.prototype.toString;\nconst withNativeBlob = typeof Blob === \"function\" ||\n (typeof Blob !== \"undefined\" &&\n toString.call(Blob) === \"[object BlobConstructor]\");\nconst withNativeFile = typeof File === \"function\" ||\n (typeof File !== \"undefined\" &&\n toString.call(File) === \"[object FileConstructor]\");\n/**\n * Returns true if obj is a Buffer, an ArrayBuffer, a Blob or a File.\n *\n * @private\n */\nexport function isBinary(obj) {\n return ((withNativeArrayBuffer && (obj instanceof ArrayBuffer || isView(obj))) ||\n (withNativeBlob && obj instanceof Blob) ||\n (withNativeFile && obj instanceof File));\n}\nexport function hasBinary(obj, toJSON) {\n if (!obj || typeof obj !== \"object\") {\n return false;\n }\n if (Array.isArray(obj)) {\n for (let i = 0, l = obj.length; i < l; i++) {\n if (hasBinary(obj[i])) {\n return true;\n }\n }\n return false;\n }\n if (isBinary(obj)) {\n return true;\n }\n if (obj.toJSON &&\n typeof obj.toJSON === \"function\" &&\n arguments.length === 1) {\n return hasBinary(obj.toJSON(), true);\n }\n for (const key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key) && hasBinary(obj[key])) {\n return true;\n }\n }\n return false;\n}\n","import { isBinary } from \"./is-binary.js\";\n/**\n * Replaces every Buffer | ArrayBuffer | Blob | File in packet with a numbered placeholder.\n *\n * @param {Object} packet - socket.io event packet\n * @return {Object} with deconstructed packet and list of buffers\n * @public\n */\nexport function deconstructPacket(packet) {\n const buffers = [];\n const packetData = packet.data;\n const pack = packet;\n pack.data = _deconstructPacket(packetData, buffers);\n pack.attachments = buffers.length; // number of binary 'attachments'\n return { packet: pack, buffers: buffers };\n}\nfunction _deconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (isBinary(data)) {\n const placeholder = { _placeholder: true, num: buffers.length };\n buffers.push(data);\n return placeholder;\n }\n else if (Array.isArray(data)) {\n const newData = new Array(data.length);\n for (let i = 0; i < data.length; i++) {\n newData[i] = _deconstructPacket(data[i], buffers);\n }\n return newData;\n }\n else if (typeof data === \"object\" && !(data instanceof Date)) {\n const newData = {};\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n newData[key] = _deconstructPacket(data[key], buffers);\n }\n }\n return newData;\n }\n return data;\n}\n/**\n * Reconstructs a binary packet from its placeholder packet and buffers\n *\n * @param {Object} packet - event packet with placeholders\n * @param {Array} buffers - binary buffers to put in placeholder positions\n * @return {Object} reconstructed packet\n * @public\n */\nexport function reconstructPacket(packet, buffers) {\n packet.data = _reconstructPacket(packet.data, buffers);\n delete packet.attachments; // no longer useful\n return packet;\n}\nfunction _reconstructPacket(data, buffers) {\n if (!data)\n return data;\n if (data && data._placeholder === true) {\n const isIndexValid = typeof data.num === \"number\" &&\n data.num >= 0 &&\n data.num < buffers.length;\n if (isIndexValid) {\n return buffers[data.num]; // appropriate buffer (should be natural order anyway)\n }\n else {\n throw new Error(\"illegal attachments\");\n }\n }\n else if (Array.isArray(data)) {\n for (let i = 0; i < data.length; i++) {\n data[i] = _reconstructPacket(data[i], buffers);\n }\n }\n else if (typeof data === \"object\") {\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n data[key] = _reconstructPacket(data[key], buffers);\n }\n }\n }\n return data;\n}\n","import { Emitter } from \"@socket.io/component-emitter\";\nimport { deconstructPacket, reconstructPacket } from \"./binary.js\";\nimport { isBinary, hasBinary } from \"./is-binary.js\";\n/**\n * These strings must not be used as event names, as they have a special meaning.\n */\nconst RESERVED_EVENTS = [\n \"connect\",\n \"connect_error\",\n \"disconnect\",\n \"disconnecting\",\n \"newListener\",\n \"removeListener\", // used by the Node.js EventEmitter\n];\n/**\n * Protocol version.\n *\n * @public\n */\nexport const protocol = 5;\nexport var PacketType;\n(function (PacketType) {\n PacketType[PacketType[\"CONNECT\"] = 0] = \"CONNECT\";\n PacketType[PacketType[\"DISCONNECT\"] = 1] = \"DISCONNECT\";\n PacketType[PacketType[\"EVENT\"] = 2] = \"EVENT\";\n PacketType[PacketType[\"ACK\"] = 3] = \"ACK\";\n PacketType[PacketType[\"CONNECT_ERROR\"] = 4] = \"CONNECT_ERROR\";\n PacketType[PacketType[\"BINARY_EVENT\"] = 5] = \"BINARY_EVENT\";\n PacketType[PacketType[\"BINARY_ACK\"] = 6] = \"BINARY_ACK\";\n})(PacketType || (PacketType = {}));\n/**\n * A socket.io Encoder instance\n */\nexport class Encoder {\n /**\n * Encoder constructor\n *\n * @param {function} replacer - custom replacer to pass down to JSON.parse\n */\n constructor(replacer) {\n this.replacer = replacer;\n }\n /**\n * Encode a packet as a single string if non-binary, or as a\n * buffer sequence, depending on packet type.\n *\n * @param {Object} obj - packet object\n */\n encode(obj) {\n if (obj.type === PacketType.EVENT || obj.type === PacketType.ACK) {\n if (hasBinary(obj)) {\n return this.encodeAsBinary({\n type: obj.type === PacketType.EVENT\n ? PacketType.BINARY_EVENT\n : PacketType.BINARY_ACK,\n nsp: obj.nsp,\n data: obj.data,\n id: obj.id,\n });\n }\n }\n return [this.encodeAsString(obj)];\n }\n /**\n * Encode packet as string.\n */\n encodeAsString(obj) {\n // first is type\n let str = \"\" + obj.type;\n // attachments if we have them\n if (obj.type === PacketType.BINARY_EVENT ||\n obj.type === PacketType.BINARY_ACK) {\n str += obj.attachments + \"-\";\n }\n // if we have a namespace other than `/`\n // we append it followed by a comma `,`\n if (obj.nsp && \"/\" !== obj.nsp) {\n str += obj.nsp + \",\";\n }\n // immediately followed by the id\n if (null != obj.id) {\n str += obj.id;\n }\n // json data\n if (null != obj.data) {\n str += JSON.stringify(obj.data, this.replacer);\n }\n return str;\n }\n /**\n * Encode packet as 'buffer sequence' by removing blobs, and\n * deconstructing packet into object with placeholders and\n * a list of buffers.\n */\n encodeAsBinary(obj) {\n const deconstruction = deconstructPacket(obj);\n const pack = this.encodeAsString(deconstruction.packet);\n const buffers = deconstruction.buffers;\n buffers.unshift(pack); // add packet info to beginning of data list\n return buffers; // write all the buffers\n }\n}\n// see https://stackoverflow.com/questions/8511281/check-if-a-value-is-an-object-in-javascript\nfunction isObject(value) {\n return Object.prototype.toString.call(value) === \"[object Object]\";\n}\n/**\n * A socket.io Decoder instance\n *\n * @return {Object} decoder\n */\nexport class Decoder extends Emitter {\n /**\n * Decoder constructor\n *\n * @param {function} reviver - custom reviver to pass down to JSON.stringify\n */\n constructor(reviver) {\n super();\n this.reviver = reviver;\n }\n /**\n * Decodes an encoded packet string into packet JSON.\n *\n * @param {String} obj - encoded packet\n */\n add(obj) {\n let packet;\n if (typeof obj === \"string\") {\n if (this.reconstructor) {\n throw new Error(\"got plaintext data when reconstructing a packet\");\n }\n packet = this.decodeString(obj);\n const isBinaryEvent = packet.type === PacketType.BINARY_EVENT;\n if (isBinaryEvent || packet.type === PacketType.BINARY_ACK) {\n packet.type = isBinaryEvent ? PacketType.EVENT : PacketType.ACK;\n // binary packet's json\n this.reconstructor = new BinaryReconstructor(packet);\n // no attachments, labeled binary but no binary data to follow\n if (packet.attachments === 0) {\n super.emitReserved(\"decoded\", packet);\n }\n }\n else {\n // non-binary full packet\n super.emitReserved(\"decoded\", packet);\n }\n }\n else if (isBinary(obj) || obj.base64) {\n // raw binary data\n if (!this.reconstructor) {\n throw new Error(\"got binary data when not reconstructing a packet\");\n }\n else {\n packet = this.reconstructor.takeBinaryData(obj);\n if (packet) {\n // received final buffer\n this.reconstructor = null;\n super.emitReserved(\"decoded\", packet);\n }\n }\n }\n else {\n throw new Error(\"Unknown type: \" + obj);\n }\n }\n /**\n * Decode a packet String (JSON data)\n *\n * @param {String} str\n * @return {Object} packet\n */\n decodeString(str) {\n let i = 0;\n // look up type\n const p = {\n type: Number(str.charAt(0)),\n };\n if (PacketType[p.type] === undefined) {\n throw new Error(\"unknown packet type \" + p.type);\n }\n // look up attachments if type binary\n if (p.type === PacketType.BINARY_EVENT ||\n p.type === PacketType.BINARY_ACK) {\n const start = i + 1;\n while (str.charAt(++i) !== \"-\" && i != str.length) { }\n const buf = str.substring(start, i);\n if (buf != Number(buf) || str.charAt(i) !== \"-\") {\n throw new Error(\"Illegal attachments\");\n }\n p.attachments = Number(buf);\n }\n // look up namespace (if any)\n if (\"/\" === str.charAt(i + 1)) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (\",\" === c)\n break;\n if (i === str.length)\n break;\n }\n p.nsp = str.substring(start, i);\n }\n else {\n p.nsp = \"/\";\n }\n // look up id\n const next = str.charAt(i + 1);\n if (\"\" !== next && Number(next) == next) {\n const start = i + 1;\n while (++i) {\n const c = str.charAt(i);\n if (null == c || Number(c) != c) {\n --i;\n break;\n }\n if (i === str.length)\n break;\n }\n p.id = Number(str.substring(start, i + 1));\n }\n // look up json data\n if (str.charAt(++i)) {\n const payload = this.tryParse(str.substr(i));\n if (Decoder.isPayloadValid(p.type, payload)) {\n p.data = payload;\n }\n else {\n throw new Error(\"invalid payload\");\n }\n }\n return p;\n }\n tryParse(str) {\n try {\n return JSON.parse(str, this.reviver);\n }\n catch (e) {\n return false;\n }\n }\n static isPayloadValid(type, payload) {\n switch (type) {\n case PacketType.CONNECT:\n return isObject(payload);\n case PacketType.DISCONNECT:\n return payload === undefined;\n case PacketType.CONNECT_ERROR:\n return typeof payload === \"string\" || isObject(payload);\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n return (Array.isArray(payload) &&\n (typeof payload[0] === \"number\" ||\n (typeof payload[0] === \"string\" &&\n RESERVED_EVENTS.indexOf(payload[0]) === -1)));\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n return Array.isArray(payload);\n }\n }\n /**\n * Deallocates a parser's resources\n */\n destroy() {\n if (this.reconstructor) {\n this.reconstructor.finishedReconstruction();\n this.reconstructor = null;\n }\n }\n}\n/**\n * A manager of a binary event's 'buffer sequence'. Should\n * be constructed whenever a packet of type BINARY_EVENT is\n * decoded.\n *\n * @param {Object} packet\n * @return {BinaryReconstructor} initialized reconstructor\n */\nclass BinaryReconstructor {\n constructor(packet) {\n this.packet = packet;\n this.buffers = [];\n this.reconPack = packet;\n }\n /**\n * Method to be called when binary data received from connection\n * after a BINARY_EVENT packet.\n *\n * @param {Buffer | ArrayBuffer} binData - the raw binary data received\n * @return {null | Object} returns null if more binary data is expected or\n * a reconstructed packet object if all buffers have been received.\n */\n takeBinaryData(binData) {\n this.buffers.push(binData);\n if (this.buffers.length === this.reconPack.attachments) {\n // done with buffer list\n const packet = reconstructPacket(this.reconPack, this.buffers);\n this.finishedReconstruction();\n return packet;\n }\n return null;\n }\n /**\n * Cleans up binary packet reconstruction variables.\n */\n finishedReconstruction() {\n this.reconPack = null;\n this.buffers = [];\n }\n}\n","export function on(obj, ev, fn) {\n obj.on(ev, fn);\n return function subDestroy() {\n obj.off(ev, fn);\n };\n}\n","import { PacketType } from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\n/**\n * Internal events.\n * These events can't be emitted by the user.\n */\nconst RESERVED_EVENTS = Object.freeze({\n connect: 1,\n connect_error: 1,\n disconnect: 1,\n disconnecting: 1,\n // EventEmitter reserved events: https://nodejs.org/api/events.html#events_event_newlistener\n newListener: 1,\n removeListener: 1,\n});\n/**\n * A Socket is the fundamental class for interacting with the server.\n *\n * A Socket belongs to a certain Namespace (by default /) and uses an underlying {@link Manager} to communicate.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(\"connected\");\n * });\n *\n * // send an event to the server\n * socket.emit(\"foo\", \"bar\");\n *\n * socket.on(\"foobar\", () => {\n * // an event was received from the server\n * });\n *\n * // upon disconnection\n * socket.on(\"disconnect\", (reason) => {\n * console.log(`disconnected due to ${reason}`);\n * });\n */\nexport class Socket extends Emitter {\n /**\n * `Socket` constructor.\n */\n constructor(io, nsp, opts) {\n super();\n /**\n * Whether the socket is currently connected to the server.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.connected); // true\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.connected); // false\n * });\n */\n this.connected = false;\n /**\n * Whether the connection state was recovered after a temporary disconnection. In that case, any missed packets will\n * be transmitted by the server.\n */\n this.recovered = false;\n /**\n * Buffer for packets received before the CONNECT packet\n */\n this.receiveBuffer = [];\n /**\n * Buffer for packets that will be sent once the socket is connected\n */\n this.sendBuffer = [];\n /**\n * The queue of packets to be sent with retry in case of failure.\n *\n * Packets are sent one by one, each waiting for the server acknowledgement, in order to guarantee the delivery order.\n * @private\n */\n this._queue = [];\n /**\n * A sequence to generate the ID of the {@link QueuedPacket}.\n * @private\n */\n this._queueSeq = 0;\n this.ids = 0;\n /**\n * A map containing acknowledgement handlers.\n *\n * The `withError` attribute is used to differentiate handlers that accept an error as first argument:\n *\n * - `socket.emit(\"test\", (err, value) => { ... })` with `ackTimeout` option\n * - `socket.timeout(5000).emit(\"test\", (err, value) => { ... })`\n * - `const value = await socket.emitWithAck(\"test\")`\n *\n * From those that don't:\n *\n * - `socket.emit(\"test\", (value) => { ... });`\n *\n * In the first case, the handlers will be called with an error when:\n *\n * - the timeout is reached\n * - the socket gets disconnected\n *\n * In the second case, the handlers will be simply discarded upon disconnection, since the client will never receive\n * an acknowledgement from the server.\n *\n * @private\n */\n this.acks = {};\n this.flags = {};\n this.io = io;\n this.nsp = nsp;\n if (opts && opts.auth) {\n this.auth = opts.auth;\n }\n this._opts = Object.assign({}, opts);\n if (this.io._autoConnect)\n this.open();\n }\n /**\n * Whether the socket is currently disconnected\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"connect\", () => {\n * console.log(socket.disconnected); // false\n * });\n *\n * socket.on(\"disconnect\", () => {\n * console.log(socket.disconnected); // true\n * });\n */\n get disconnected() {\n return !this.connected;\n }\n /**\n * Subscribe to open, close and packet events\n *\n * @private\n */\n subEvents() {\n if (this.subs)\n return;\n const io = this.io;\n this.subs = [\n on(io, \"open\", this.onopen.bind(this)),\n on(io, \"packet\", this.onpacket.bind(this)),\n on(io, \"error\", this.onerror.bind(this)),\n on(io, \"close\", this.onclose.bind(this)),\n ];\n }\n /**\n * Whether the Socket will try to reconnect when its Manager connects or reconnects.\n *\n * @example\n * const socket = io();\n *\n * console.log(socket.active); // true\n *\n * socket.on(\"disconnect\", (reason) => {\n * if (reason === \"io server disconnect\") {\n * // the disconnection was initiated by the server, you need to manually reconnect\n * console.log(socket.active); // false\n * }\n * // else the socket will automatically try to reconnect\n * console.log(socket.active); // true\n * });\n */\n get active() {\n return !!this.subs;\n }\n /**\n * \"Opens\" the socket.\n *\n * @example\n * const socket = io({\n * autoConnect: false\n * });\n *\n * socket.connect();\n */\n connect() {\n if (this.connected)\n return this;\n this.subEvents();\n if (!this.io[\"_reconnecting\"])\n this.io.open(); // ensure open\n if (\"open\" === this.io._readyState)\n this.onopen();\n return this;\n }\n /**\n * Alias for {@link connect()}.\n */\n open() {\n return this.connect();\n }\n /**\n * Sends a `message` event.\n *\n * This method mimics the WebSocket.send() method.\n *\n * @see https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/send\n *\n * @example\n * socket.send(\"hello\");\n *\n * // this is equivalent to\n * socket.emit(\"message\", \"hello\");\n *\n * @return self\n */\n send(...args) {\n args.unshift(\"message\");\n this.emit.apply(this, args);\n return this;\n }\n /**\n * Override `emit`.\n * If the event is in `events`, it's emitted normally.\n *\n * @example\n * socket.emit(\"hello\", \"world\");\n *\n * // all serializable datastructures are supported (no need to call JSON.stringify)\n * socket.emit(\"hello\", 1, \"2\", { 3: [\"4\"], 5: Uint8Array.from([6]) });\n *\n * // with an acknowledgement from the server\n * socket.emit(\"hello\", \"world\", (val) => {\n * // ...\n * });\n *\n * @return self\n */\n emit(ev, ...args) {\n if (RESERVED_EVENTS.hasOwnProperty(ev)) {\n throw new Error('\"' + ev.toString() + '\" is a reserved event name');\n }\n args.unshift(ev);\n if (this._opts.retries && !this.flags.fromQueue && !this.flags.volatile) {\n this._addToQueue(args);\n return this;\n }\n const packet = {\n type: PacketType.EVENT,\n data: args,\n };\n packet.options = {};\n packet.options.compress = this.flags.compress !== false;\n // event ack callback\n if (\"function\" === typeof args[args.length - 1]) {\n const id = this.ids++;\n const ack = args.pop();\n this._registerAckCallback(id, ack);\n packet.id = id;\n }\n const isTransportWritable = this.io.engine &&\n this.io.engine.transport &&\n this.io.engine.transport.writable;\n const discardPacket = this.flags.volatile && (!isTransportWritable || !this.connected);\n if (discardPacket) {\n }\n else if (this.connected) {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n }\n else {\n this.sendBuffer.push(packet);\n }\n this.flags = {};\n return this;\n }\n /**\n * @private\n */\n _registerAckCallback(id, ack) {\n var _a;\n const timeout = (_a = this.flags.timeout) !== null && _a !== void 0 ? _a : this._opts.ackTimeout;\n if (timeout === undefined) {\n this.acks[id] = ack;\n return;\n }\n // @ts-ignore\n const timer = this.io.setTimeoutFn(() => {\n delete this.acks[id];\n for (let i = 0; i < this.sendBuffer.length; i++) {\n if (this.sendBuffer[i].id === id) {\n this.sendBuffer.splice(i, 1);\n }\n }\n ack.call(this, new Error(\"operation has timed out\"));\n }, timeout);\n const fn = (...args) => {\n // @ts-ignore\n this.io.clearTimeoutFn(timer);\n ack.apply(this, args);\n };\n fn.withError = true;\n this.acks[id] = fn;\n }\n /**\n * Emits an event and waits for an acknowledgement\n *\n * @example\n * // without timeout\n * const response = await socket.emitWithAck(\"hello\", \"world\");\n *\n * // with a specific timeout\n * try {\n * const response = await socket.timeout(1000).emitWithAck(\"hello\", \"world\");\n * } catch (err) {\n * // the server did not acknowledge the event in the given delay\n * }\n *\n * @return a Promise that will be fulfilled when the server acknowledges the event\n */\n emitWithAck(ev, ...args) {\n return new Promise((resolve, reject) => {\n const fn = (arg1, arg2) => {\n return arg1 ? reject(arg1) : resolve(arg2);\n };\n fn.withError = true;\n args.push(fn);\n this.emit(ev, ...args);\n });\n }\n /**\n * Add the packet to the queue.\n * @param args\n * @private\n */\n _addToQueue(args) {\n let ack;\n if (typeof args[args.length - 1] === \"function\") {\n ack = args.pop();\n }\n const packet = {\n id: this._queueSeq++,\n tryCount: 0,\n pending: false,\n args,\n flags: Object.assign({ fromQueue: true }, this.flags),\n };\n args.push((err, ...responseArgs) => {\n if (packet !== this._queue[0]) {\n // the packet has already been acknowledged\n return;\n }\n const hasError = err !== null;\n if (hasError) {\n if (packet.tryCount > this._opts.retries) {\n this._queue.shift();\n if (ack) {\n ack(err);\n }\n }\n }\n else {\n this._queue.shift();\n if (ack) {\n ack(null, ...responseArgs);\n }\n }\n packet.pending = false;\n return this._drainQueue();\n });\n this._queue.push(packet);\n this._drainQueue();\n }\n /**\n * Send the first packet of the queue, and wait for an acknowledgement from the server.\n * @param force - whether to resend a packet that has not been acknowledged yet\n *\n * @private\n */\n _drainQueue(force = false) {\n if (!this.connected || this._queue.length === 0) {\n return;\n }\n const packet = this._queue[0];\n if (packet.pending && !force) {\n return;\n }\n packet.pending = true;\n packet.tryCount++;\n this.flags = packet.flags;\n this.emit.apply(this, packet.args);\n }\n /**\n * Sends a packet.\n *\n * @param packet\n * @private\n */\n packet(packet) {\n packet.nsp = this.nsp;\n this.io._packet(packet);\n }\n /**\n * Called upon engine `open`.\n *\n * @private\n */\n onopen() {\n if (typeof this.auth == \"function\") {\n this.auth((data) => {\n this._sendConnectPacket(data);\n });\n }\n else {\n this._sendConnectPacket(this.auth);\n }\n }\n /**\n * Sends a CONNECT packet to initiate the Socket.IO session.\n *\n * @param data\n * @private\n */\n _sendConnectPacket(data) {\n this.packet({\n type: PacketType.CONNECT,\n data: this._pid\n ? Object.assign({ pid: this._pid, offset: this._lastOffset }, data)\n : data,\n });\n }\n /**\n * Called upon engine or manager `error`.\n *\n * @param err\n * @private\n */\n onerror(err) {\n if (!this.connected) {\n this.emitReserved(\"connect_error\", err);\n }\n }\n /**\n * Called upon engine `close`.\n *\n * @param reason\n * @param description\n * @private\n */\n onclose(reason, description) {\n this.connected = false;\n delete this.id;\n this.emitReserved(\"disconnect\", reason, description);\n this._clearAcks();\n }\n /**\n * Clears the acknowledgement handlers upon disconnection, since the client will never receive an acknowledgement from\n * the server.\n *\n * @private\n */\n _clearAcks() {\n Object.keys(this.acks).forEach((id) => {\n const isBuffered = this.sendBuffer.some((packet) => String(packet.id) === id);\n if (!isBuffered) {\n // note: handlers that do not accept an error as first argument are ignored here\n const ack = this.acks[id];\n delete this.acks[id];\n if (ack.withError) {\n ack.call(this, new Error(\"socket has been disconnected\"));\n }\n }\n });\n }\n /**\n * Called with socket packet.\n *\n * @param packet\n * @private\n */\n onpacket(packet) {\n const sameNamespace = packet.nsp === this.nsp;\n if (!sameNamespace)\n return;\n switch (packet.type) {\n case PacketType.CONNECT:\n if (packet.data && packet.data.sid) {\n this.onconnect(packet.data.sid, packet.data.pid);\n }\n else {\n this.emitReserved(\"connect_error\", new Error(\"It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)\"));\n }\n break;\n case PacketType.EVENT:\n case PacketType.BINARY_EVENT:\n this.onevent(packet);\n break;\n case PacketType.ACK:\n case PacketType.BINARY_ACK:\n this.onack(packet);\n break;\n case PacketType.DISCONNECT:\n this.ondisconnect();\n break;\n case PacketType.CONNECT_ERROR:\n this.destroy();\n const err = new Error(packet.data.message);\n // @ts-ignore\n err.data = packet.data.data;\n this.emitReserved(\"connect_error\", err);\n break;\n }\n }\n /**\n * Called upon a server event.\n *\n * @param packet\n * @private\n */\n onevent(packet) {\n const args = packet.data || [];\n if (null != packet.id) {\n args.push(this.ack(packet.id));\n }\n if (this.connected) {\n this.emitEvent(args);\n }\n else {\n this.receiveBuffer.push(Object.freeze(args));\n }\n }\n emitEvent(args) {\n if (this._anyListeners && this._anyListeners.length) {\n const listeners = this._anyListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, args);\n }\n }\n super.emit.apply(this, args);\n if (this._pid && args.length && typeof args[args.length - 1] === \"string\") {\n this._lastOffset = args[args.length - 1];\n }\n }\n /**\n * Produces an ack callback to emit with an event.\n *\n * @private\n */\n ack(id) {\n const self = this;\n let sent = false;\n return function (...args) {\n // prevent double callbacks\n if (sent)\n return;\n sent = true;\n self.packet({\n type: PacketType.ACK,\n id: id,\n data: args,\n });\n };\n }\n /**\n * Called upon a server acknowledgement.\n *\n * @param packet\n * @private\n */\n onack(packet) {\n const ack = this.acks[packet.id];\n if (typeof ack !== \"function\") {\n return;\n }\n delete this.acks[packet.id];\n // @ts-ignore FIXME ack is incorrectly inferred as 'never'\n if (ack.withError) {\n packet.data.unshift(null);\n }\n // @ts-ignore\n ack.apply(this, packet.data);\n }\n /**\n * Called upon server connect.\n *\n * @private\n */\n onconnect(id, pid) {\n this.id = id;\n this.recovered = pid && this._pid === pid;\n this._pid = pid; // defined only if connection state recovery is enabled\n this.connected = true;\n this.emitBuffered();\n this.emitReserved(\"connect\");\n this._drainQueue(true);\n }\n /**\n * Emit buffered events (received and emitted).\n *\n * @private\n */\n emitBuffered() {\n this.receiveBuffer.forEach((args) => this.emitEvent(args));\n this.receiveBuffer = [];\n this.sendBuffer.forEach((packet) => {\n this.notifyOutgoingListeners(packet);\n this.packet(packet);\n });\n this.sendBuffer = [];\n }\n /**\n * Called upon server disconnect.\n *\n * @private\n */\n ondisconnect() {\n this.destroy();\n this.onclose(\"io server disconnect\");\n }\n /**\n * Called upon forced client/server side disconnections,\n * this method ensures the manager stops tracking us and\n * that reconnections don't get triggered for this.\n *\n * @private\n */\n destroy() {\n if (this.subs) {\n // clean subscriptions to avoid reconnections\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs = undefined;\n }\n this.io[\"_destroy\"](this);\n }\n /**\n * Disconnects the socket manually. In that case, the socket will not try to reconnect.\n *\n * If this is the last active Socket instance of the {@link Manager}, the low-level connection will be closed.\n *\n * @example\n * const socket = io();\n *\n * socket.on(\"disconnect\", (reason) => {\n * // console.log(reason); prints \"io client disconnect\"\n * });\n *\n * socket.disconnect();\n *\n * @return self\n */\n disconnect() {\n if (this.connected) {\n this.packet({ type: PacketType.DISCONNECT });\n }\n // remove socket from pool\n this.destroy();\n if (this.connected) {\n // fire events\n this.onclose(\"io client disconnect\");\n }\n return this;\n }\n /**\n * Alias for {@link disconnect()}.\n *\n * @return self\n */\n close() {\n return this.disconnect();\n }\n /**\n * Sets the compress flag.\n *\n * @example\n * socket.compress(false).emit(\"hello\");\n *\n * @param compress - if `true`, compresses the sending data\n * @return self\n */\n compress(compress) {\n this.flags.compress = compress;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the event message will be dropped when this socket is not\n * ready to send messages.\n *\n * @example\n * socket.volatile.emit(\"hello\"); // the server may or may not receive it\n *\n * @returns self\n */\n get volatile() {\n this.flags.volatile = true;\n return this;\n }\n /**\n * Sets a modifier for a subsequent event emission that the callback will be called with an error when the\n * given number of milliseconds have elapsed without an acknowledgement from the server:\n *\n * @example\n * socket.timeout(5000).emit(\"my-event\", (err) => {\n * if (err) {\n * // the server did not acknowledge the event in the given delay\n * }\n * });\n *\n * @returns self\n */\n timeout(timeout) {\n this.flags.timeout = timeout;\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * @example\n * socket.onAny((event, ...args) => {\n * console.log(`got ${event}`);\n * });\n *\n * @param listener\n */\n onAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * @example\n * socket.prependAny((event, ...args) => {\n * console.log(`got event ${event}`);\n * });\n *\n * @param listener\n */\n prependAny(listener) {\n this._anyListeners = this._anyListeners || [];\n this._anyListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`got event ${event}`);\n * }\n *\n * socket.onAny(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAny(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAny();\n *\n * @param listener\n */\n offAny(listener) {\n if (!this._anyListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAny() {\n return this._anyListeners || [];\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.onAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n onAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.push(listener);\n return this;\n }\n /**\n * Adds a listener that will be fired when any event is emitted. The event name is passed as the first argument to the\n * callback. The listener is added to the beginning of the listeners array.\n *\n * Note: acknowledgements sent to the server are not included.\n *\n * @example\n * socket.prependAnyOutgoing((event, ...args) => {\n * console.log(`sent event ${event}`);\n * });\n *\n * @param listener\n */\n prependAnyOutgoing(listener) {\n this._anyOutgoingListeners = this._anyOutgoingListeners || [];\n this._anyOutgoingListeners.unshift(listener);\n return this;\n }\n /**\n * Removes the listener that will be fired when any event is emitted.\n *\n * @example\n * const catchAllListener = (event, ...args) => {\n * console.log(`sent event ${event}`);\n * }\n *\n * socket.onAnyOutgoing(catchAllListener);\n *\n * // remove a specific listener\n * socket.offAnyOutgoing(catchAllListener);\n *\n * // or remove all listeners\n * socket.offAnyOutgoing();\n *\n * @param [listener] - the catch-all listener (optional)\n */\n offAnyOutgoing(listener) {\n if (!this._anyOutgoingListeners) {\n return this;\n }\n if (listener) {\n const listeners = this._anyOutgoingListeners;\n for (let i = 0; i < listeners.length; i++) {\n if (listener === listeners[i]) {\n listeners.splice(i, 1);\n return this;\n }\n }\n }\n else {\n this._anyOutgoingListeners = [];\n }\n return this;\n }\n /**\n * Returns an array of listeners that are listening for any event that is specified. This array can be manipulated,\n * e.g. to remove listeners.\n */\n listenersAnyOutgoing() {\n return this._anyOutgoingListeners || [];\n }\n /**\n * Notify the listeners for each packet sent\n *\n * @param packet\n *\n * @private\n */\n notifyOutgoingListeners(packet) {\n if (this._anyOutgoingListeners && this._anyOutgoingListeners.length) {\n const listeners = this._anyOutgoingListeners.slice();\n for (const listener of listeners) {\n listener.apply(this, packet.data);\n }\n }\n }\n}\n","/**\n * Initialize backoff timer with `opts`.\n *\n * - `min` initial timeout in milliseconds [100]\n * - `max` max timeout [10000]\n * - `jitter` [0]\n * - `factor` [2]\n *\n * @param {Object} opts\n * @api public\n */\nexport function Backoff(opts) {\n opts = opts || {};\n this.ms = opts.min || 100;\n this.max = opts.max || 10000;\n this.factor = opts.factor || 2;\n this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0;\n this.attempts = 0;\n}\n/**\n * Return the backoff duration.\n *\n * @return {Number}\n * @api public\n */\nBackoff.prototype.duration = function () {\n var ms = this.ms * Math.pow(this.factor, this.attempts++);\n if (this.jitter) {\n var rand = Math.random();\n var deviation = Math.floor(rand * this.jitter * ms);\n ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation;\n }\n return Math.min(ms, this.max) | 0;\n};\n/**\n * Reset the number of attempts.\n *\n * @api public\n */\nBackoff.prototype.reset = function () {\n this.attempts = 0;\n};\n/**\n * Set the minimum duration\n *\n * @api public\n */\nBackoff.prototype.setMin = function (min) {\n this.ms = min;\n};\n/**\n * Set the maximum duration\n *\n * @api public\n */\nBackoff.prototype.setMax = function (max) {\n this.max = max;\n};\n/**\n * Set the jitter\n *\n * @api public\n */\nBackoff.prototype.setJitter = function (jitter) {\n this.jitter = jitter;\n};\n","import { Socket as Engine, installTimerFunctions, nextTick, } from \"engine.io-client\";\nimport { Socket } from \"./socket.js\";\nimport * as parser from \"socket.io-parser\";\nimport { on } from \"./on.js\";\nimport { Backoff } from \"./contrib/backo2.js\";\nimport { Emitter, } from \"@socket.io/component-emitter\";\nexport class Manager extends Emitter {\n constructor(uri, opts) {\n var _a;\n super();\n this.nsps = {};\n this.subs = [];\n if (uri && \"object\" === typeof uri) {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n opts.path = opts.path || \"/socket.io\";\n this.opts = opts;\n installTimerFunctions(this, opts);\n this.reconnection(opts.reconnection !== false);\n this.reconnectionAttempts(opts.reconnectionAttempts || Infinity);\n this.reconnectionDelay(opts.reconnectionDelay || 1000);\n this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000);\n this.randomizationFactor((_a = opts.randomizationFactor) !== null && _a !== void 0 ? _a : 0.5);\n this.backoff = new Backoff({\n min: this.reconnectionDelay(),\n max: this.reconnectionDelayMax(),\n jitter: this.randomizationFactor(),\n });\n this.timeout(null == opts.timeout ? 20000 : opts.timeout);\n this._readyState = \"closed\";\n this.uri = uri;\n const _parser = opts.parser || parser;\n this.encoder = new _parser.Encoder();\n this.decoder = new _parser.Decoder();\n this._autoConnect = opts.autoConnect !== false;\n if (this._autoConnect)\n this.open();\n }\n reconnection(v) {\n if (!arguments.length)\n return this._reconnection;\n this._reconnection = !!v;\n return this;\n }\n reconnectionAttempts(v) {\n if (v === undefined)\n return this._reconnectionAttempts;\n this._reconnectionAttempts = v;\n return this;\n }\n reconnectionDelay(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelay;\n this._reconnectionDelay = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMin(v);\n return this;\n }\n randomizationFactor(v) {\n var _a;\n if (v === undefined)\n return this._randomizationFactor;\n this._randomizationFactor = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setJitter(v);\n return this;\n }\n reconnectionDelayMax(v) {\n var _a;\n if (v === undefined)\n return this._reconnectionDelayMax;\n this._reconnectionDelayMax = v;\n (_a = this.backoff) === null || _a === void 0 ? void 0 : _a.setMax(v);\n return this;\n }\n timeout(v) {\n if (!arguments.length)\n return this._timeout;\n this._timeout = v;\n return this;\n }\n /**\n * Starts trying to reconnect if reconnection is enabled and we have not\n * started reconnecting yet\n *\n * @private\n */\n maybeReconnectOnOpen() {\n // Only try to reconnect if it's the first time we're connecting\n if (!this._reconnecting &&\n this._reconnection &&\n this.backoff.attempts === 0) {\n // keeps reconnection from firing twice for the same reconnection loop\n this.reconnect();\n }\n }\n /**\n * Sets the current transport `socket`.\n *\n * @param {Function} fn - optional, callback\n * @return self\n * @public\n */\n open(fn) {\n if (~this._readyState.indexOf(\"open\"))\n return this;\n this.engine = new Engine(this.uri, this.opts);\n const socket = this.engine;\n const self = this;\n this._readyState = \"opening\";\n this.skipReconnect = false;\n // emit `open`\n const openSubDestroy = on(socket, \"open\", function () {\n self.onopen();\n fn && fn();\n });\n const onError = (err) => {\n this.cleanup();\n this._readyState = \"closed\";\n this.emitReserved(\"error\", err);\n if (fn) {\n fn(err);\n }\n else {\n // Only do this if there is no fn to handle the error\n this.maybeReconnectOnOpen();\n }\n };\n // emit `error`\n const errorSub = on(socket, \"error\", onError);\n if (false !== this._timeout) {\n const timeout = this._timeout;\n // set timer\n const timer = this.setTimeoutFn(() => {\n openSubDestroy();\n onError(new Error(\"timeout\"));\n socket.close();\n }, timeout);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(() => {\n this.clearTimeoutFn(timer);\n });\n }\n this.subs.push(openSubDestroy);\n this.subs.push(errorSub);\n return this;\n }\n /**\n * Alias for open()\n *\n * @return self\n * @public\n */\n connect(fn) {\n return this.open(fn);\n }\n /**\n * Called upon transport open.\n *\n * @private\n */\n onopen() {\n // clear old subs\n this.cleanup();\n // mark as open\n this._readyState = \"open\";\n this.emitReserved(\"open\");\n // add new subs\n const socket = this.engine;\n this.subs.push(on(socket, \"ping\", this.onping.bind(this)), on(socket, \"data\", this.ondata.bind(this)), on(socket, \"error\", this.onerror.bind(this)), on(socket, \"close\", this.onclose.bind(this)), on(this.decoder, \"decoded\", this.ondecoded.bind(this)));\n }\n /**\n * Called upon a ping.\n *\n * @private\n */\n onping() {\n this.emitReserved(\"ping\");\n }\n /**\n * Called with data.\n *\n * @private\n */\n ondata(data) {\n try {\n this.decoder.add(data);\n }\n catch (e) {\n this.onclose(\"parse error\", e);\n }\n }\n /**\n * Called when parser fully decodes a packet.\n *\n * @private\n */\n ondecoded(packet) {\n // the nextTick call prevents an exception in a user-provided event listener from triggering a disconnection due to a \"parse error\"\n nextTick(() => {\n this.emitReserved(\"packet\", packet);\n }, this.setTimeoutFn);\n }\n /**\n * Called upon socket error.\n *\n * @private\n */\n onerror(err) {\n this.emitReserved(\"error\", err);\n }\n /**\n * Creates a new socket for the given `nsp`.\n *\n * @return {Socket}\n * @public\n */\n socket(nsp, opts) {\n let socket = this.nsps[nsp];\n if (!socket) {\n socket = new Socket(this, nsp, opts);\n this.nsps[nsp] = socket;\n }\n else if (this._autoConnect && !socket.active) {\n socket.connect();\n }\n return socket;\n }\n /**\n * Called upon a socket close.\n *\n * @param socket\n * @private\n */\n _destroy(socket) {\n const nsps = Object.keys(this.nsps);\n for (const nsp of nsps) {\n const socket = this.nsps[nsp];\n if (socket.active) {\n return;\n }\n }\n this._close();\n }\n /**\n * Writes a packet.\n *\n * @param packet\n * @private\n */\n _packet(packet) {\n const encodedPackets = this.encoder.encode(packet);\n for (let i = 0; i < encodedPackets.length; i++) {\n this.engine.write(encodedPackets[i], packet.options);\n }\n }\n /**\n * Clean up transport subscriptions and packet buffer.\n *\n * @private\n */\n cleanup() {\n this.subs.forEach((subDestroy) => subDestroy());\n this.subs.length = 0;\n this.decoder.destroy();\n }\n /**\n * Close the current socket.\n *\n * @private\n */\n _close() {\n this.skipReconnect = true;\n this._reconnecting = false;\n this.onclose(\"forced close\");\n if (this.engine)\n this.engine.close();\n }\n /**\n * Alias for close()\n *\n * @private\n */\n disconnect() {\n return this._close();\n }\n /**\n * Called upon engine close.\n *\n * @private\n */\n onclose(reason, description) {\n this.cleanup();\n this.backoff.reset();\n this._readyState = \"closed\";\n this.emitReserved(\"close\", reason, description);\n if (this._reconnection && !this.skipReconnect) {\n this.reconnect();\n }\n }\n /**\n * Attempt a reconnection.\n *\n * @private\n */\n reconnect() {\n if (this._reconnecting || this.skipReconnect)\n return this;\n const self = this;\n if (this.backoff.attempts >= this._reconnectionAttempts) {\n this.backoff.reset();\n this.emitReserved(\"reconnect_failed\");\n this._reconnecting = false;\n }\n else {\n const delay = this.backoff.duration();\n this._reconnecting = true;\n const timer = this.setTimeoutFn(() => {\n if (self.skipReconnect)\n return;\n this.emitReserved(\"reconnect_attempt\", self.backoff.attempts);\n // check again for the case socket closed in above events\n if (self.skipReconnect)\n return;\n self.open((err) => {\n if (err) {\n self._reconnecting = false;\n self.reconnect();\n this.emitReserved(\"reconnect_error\", err);\n }\n else {\n self.onreconnect();\n }\n });\n }, delay);\n if (this.opts.autoUnref) {\n timer.unref();\n }\n this.subs.push(() => {\n this.clearTimeoutFn(timer);\n });\n }\n }\n /**\n * Called upon successful reconnect.\n *\n * @private\n */\n onreconnect() {\n const attempt = this.backoff.attempts;\n this._reconnecting = false;\n this.backoff.reset();\n this.emitReserved(\"reconnect\", attempt);\n }\n}\n","import { url } from \"./url.js\";\nimport { Manager } from \"./manager.js\";\nimport { Socket } from \"./socket.js\";\n/**\n * Managers cache.\n */\nconst cache = {};\nfunction lookup(uri, opts) {\n if (typeof uri === \"object\") {\n opts = uri;\n uri = undefined;\n }\n opts = opts || {};\n const parsed = url(uri, opts.path || \"/socket.io\");\n const source = parsed.source;\n const id = parsed.id;\n const path = parsed.path;\n const sameNamespace = cache[id] && path in cache[id][\"nsps\"];\n const newConnection = opts.forceNew ||\n opts[\"force new connection\"] ||\n false === opts.multiplex ||\n sameNamespace;\n let io;\n if (newConnection) {\n io = new Manager(source, opts);\n }\n else {\n if (!cache[id]) {\n cache[id] = new Manager(source, opts);\n }\n io = cache[id];\n }\n if (parsed.query && !opts.query) {\n opts.query = parsed.queryKey;\n }\n return io.socket(parsed.path, opts);\n}\n// so that \"lookup\" can be used both as a function (e.g. `io(...)`) and as a\n// namespace (e.g. `io.connect(...)`), for backward compatibility\nObject.assign(lookup, {\n Manager,\n Socket,\n io: lookup,\n connect: lookup,\n});\n/**\n * Protocol version.\n *\n * @public\n */\nexport { protocol } from \"socket.io-parser\";\n/**\n * Expose constructors for standalone build.\n *\n * @public\n */\nexport { Manager, Socket, lookup as io, lookup as connect, lookup as default, };\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\") throw new TypeError(\"Object expected.\");\n var dispose;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","const createStoreImpl = (createState) => {\n let state;\n const listeners = /* @__PURE__ */ new Set();\n const setState = (partial, replace) => {\n const nextState = typeof partial === \"function\" ? partial(state) : partial;\n if (!Object.is(nextState, state)) {\n const previousState = state;\n state = (replace != null ? replace : typeof nextState !== \"object\") ? nextState : Object.assign({}, state, nextState);\n listeners.forEach((listener) => listener(state, previousState));\n }\n };\n const getState = () => state;\n const subscribe = (listener) => {\n listeners.add(listener);\n return () => listeners.delete(listener);\n };\n const destroy = () => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected.\"\n );\n }\n listeners.clear();\n };\n const api = { setState, getState, subscribe, destroy };\n state = createState(setState, getState, api);\n return api;\n};\nconst createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;\nvar vanilla = (createState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'.\"\n );\n }\n return createStore(createState);\n};\n\nexport { createStore, vanilla as default };\n","import { createStore } from 'zustand/vanilla';\nexport * from 'zustand/vanilla';\nimport { useDebugValue } from 'react';\nimport useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector.js';\n\nconst { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;\nfunction useStore(api, selector = api.getState, equalityFn) {\n const slice = useSyncExternalStoreWithSelector(\n api.subscribe,\n api.getState,\n api.getServerState || api.getState,\n selector,\n equalityFn\n );\n useDebugValue(slice);\n return slice;\n}\nconst createImpl = (createState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && typeof createState !== \"function\") {\n console.warn(\n \"[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.\"\n );\n }\n const api = typeof createState === \"function\" ? createStore(createState) : createState;\n const useBoundStore = (selector, equalityFn) => useStore(api, selector, equalityFn);\n Object.assign(useBoundStore, api);\n return useBoundStore;\n};\nconst create = (createState) => createState ? createImpl(createState) : createImpl;\nvar react = (createState) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] Default export is deprecated. Instead use `import { create } from 'zustand'`.\"\n );\n }\n return create(createState);\n};\n\nexport { create, react as default, useStore };\n","const reduxImpl = (reducer, initial) => (set, _get, api) => {\n api.dispatch = (action) => {\n set((state) => reducer(state, action), false, action);\n return action;\n };\n api.dispatchFromDevtools = true;\n return { dispatch: (...a) => api.dispatch(...a), ...initial };\n};\nconst redux = reduxImpl;\n\nconst trackedConnections = /* @__PURE__ */ new Map();\nconst getTrackedConnectionState = (name) => {\n const api = trackedConnections.get(name);\n if (!api)\n return {};\n return Object.fromEntries(\n Object.entries(api.stores).map(([key, api2]) => [key, api2.getState()])\n );\n};\nconst extractConnectionInformation = (store, extensionConnector, options) => {\n if (store === void 0) {\n return {\n type: \"untracked\",\n connection: extensionConnector.connect(options)\n };\n }\n const existingConnection = trackedConnections.get(options.name);\n if (existingConnection) {\n return { type: \"tracked\", store, ...existingConnection };\n }\n const newConnection = {\n connection: extensionConnector.connect(options),\n stores: {}\n };\n trackedConnections.set(options.name, newConnection);\n return { type: \"tracked\", store, ...newConnection };\n};\nconst devtoolsImpl = (fn, devtoolsOptions = {}) => (set, get, api) => {\n const { enabled, anonymousActionType, store, ...options } = devtoolsOptions;\n let extensionConnector;\n try {\n extensionConnector = (enabled != null ? enabled : (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") && window.__REDUX_DEVTOOLS_EXTENSION__;\n } catch (e) {\n }\n if (!extensionConnector) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && enabled) {\n console.warn(\n \"[zustand devtools middleware] Please install/enable Redux devtools extension\"\n );\n }\n return fn(set, get, api);\n }\n const { connection, ...connectionInformation } = extractConnectionInformation(store, extensionConnector, options);\n let isRecording = true;\n api.setState = (state, replace, nameOrAction) => {\n const r = set(state, replace);\n if (!isRecording)\n return r;\n const action = nameOrAction === void 0 ? { type: anonymousActionType || \"anonymous\" } : typeof nameOrAction === \"string\" ? { type: nameOrAction } : nameOrAction;\n if (store === void 0) {\n connection == null ? void 0 : connection.send(action, get());\n return r;\n }\n connection == null ? void 0 : connection.send(\n {\n ...action,\n type: `${store}/${action.type}`\n },\n {\n ...getTrackedConnectionState(options.name),\n [store]: api.getState()\n }\n );\n return r;\n };\n const setStateFromDevtools = (...a) => {\n const originalIsRecording = isRecording;\n isRecording = false;\n set(...a);\n isRecording = originalIsRecording;\n };\n const initialState = fn(api.setState, get, api);\n if (connectionInformation.type === \"untracked\") {\n connection == null ? void 0 : connection.init(initialState);\n } else {\n connectionInformation.stores[connectionInformation.store] = api;\n connection == null ? void 0 : connection.init(\n Object.fromEntries(\n Object.entries(connectionInformation.stores).map(([key, store2]) => [\n key,\n key === connectionInformation.store ? initialState : store2.getState()\n ])\n )\n );\n }\n if (api.dispatchFromDevtools && typeof api.dispatch === \"function\") {\n let didWarnAboutReservedActionType = false;\n const originalDispatch = api.dispatch;\n api.dispatch = (...a) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && a[0].type === \"__setState\" && !didWarnAboutReservedActionType) {\n console.warn(\n '[zustand devtools middleware] \"__setState\" action type is reserved to set state from the devtools. Avoid using it.'\n );\n didWarnAboutReservedActionType = true;\n }\n originalDispatch(...a);\n };\n }\n connection.subscribe((message) => {\n var _a;\n switch (message.type) {\n case \"ACTION\":\n if (typeof message.payload !== \"string\") {\n console.error(\n \"[zustand devtools middleware] Unsupported action format\"\n );\n return;\n }\n return parseJsonThen(\n message.payload,\n (action) => {\n if (action.type === \"__setState\") {\n if (store === void 0) {\n setStateFromDevtools(action.state);\n return;\n }\n if (Object.keys(action.state).length !== 1) {\n console.error(\n `\n [zustand devtools middleware] Unsupported __setState action format. \n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n `\n );\n }\n const stateFromDevtools = action.state[store];\n if (stateFromDevtools === void 0 || stateFromDevtools === null) {\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(stateFromDevtools)) {\n setStateFromDevtools(stateFromDevtools);\n }\n return;\n }\n if (!api.dispatchFromDevtools)\n return;\n if (typeof api.dispatch !== \"function\")\n return;\n api.dispatch(action);\n }\n );\n case \"DISPATCH\":\n switch (message.payload.type) {\n case \"RESET\":\n setStateFromDevtools(initialState);\n if (store === void 0) {\n return connection == null ? void 0 : connection.init(api.getState());\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"COMMIT\":\n if (store === void 0) {\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n return connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n case \"ROLLBACK\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n connection == null ? void 0 : connection.init(api.getState());\n return;\n }\n setStateFromDevtools(state[store]);\n connection == null ? void 0 : connection.init(getTrackedConnectionState(options.name));\n });\n case \"JUMP_TO_STATE\":\n case \"JUMP_TO_ACTION\":\n return parseJsonThen(message.state, (state) => {\n if (store === void 0) {\n setStateFromDevtools(state);\n return;\n }\n if (JSON.stringify(api.getState()) !== JSON.stringify(state[store])) {\n setStateFromDevtools(state[store]);\n }\n });\n case \"IMPORT_STATE\": {\n const { nextLiftedState } = message.payload;\n const lastComputedState = (_a = nextLiftedState.computedStates.slice(-1)[0]) == null ? void 0 : _a.state;\n if (!lastComputedState)\n return;\n if (store === void 0) {\n setStateFromDevtools(lastComputedState);\n } else {\n setStateFromDevtools(lastComputedState[store]);\n }\n connection == null ? void 0 : connection.send(\n null,\n // FIXME no-any\n nextLiftedState\n );\n return;\n }\n case \"PAUSE_RECORDING\":\n return isRecording = !isRecording;\n }\n return;\n }\n });\n return initialState;\n};\nconst devtools = devtoolsImpl;\nconst parseJsonThen = (stringified, f) => {\n let parsed;\n try {\n parsed = JSON.parse(stringified);\n } catch (e) {\n console.error(\n \"[zustand devtools middleware] Could not parse the received json\",\n e\n );\n }\n if (parsed !== void 0)\n f(parsed);\n};\n\nconst subscribeWithSelectorImpl = (fn) => (set, get, api) => {\n const origSubscribe = api.subscribe;\n api.subscribe = (selector, optListener, options) => {\n let listener = selector;\n if (optListener) {\n const equalityFn = (options == null ? void 0 : options.equalityFn) || Object.is;\n let currentSlice = selector(api.getState());\n listener = (state) => {\n const nextSlice = selector(state);\n if (!equalityFn(currentSlice, nextSlice)) {\n const previousSlice = currentSlice;\n optListener(currentSlice = nextSlice, previousSlice);\n }\n };\n if (options == null ? void 0 : options.fireImmediately) {\n optListener(currentSlice, currentSlice);\n }\n }\n return origSubscribe(listener);\n };\n const initialState = fn(set, get, api);\n return initialState;\n};\nconst subscribeWithSelector = subscribeWithSelectorImpl;\n\nconst combine = (initialState, create) => (...a) => Object.assign({}, initialState, create(...a));\n\nfunction createJSONStorage(getStorage, options) {\n let storage;\n try {\n storage = getStorage();\n } catch (e) {\n return;\n }\n const persistStorage = {\n getItem: (name) => {\n var _a;\n const parse = (str2) => {\n if (str2 === null) {\n return null;\n }\n return JSON.parse(str2, options == null ? void 0 : options.reviver);\n };\n const str = (_a = storage.getItem(name)) != null ? _a : null;\n if (str instanceof Promise) {\n return str.then(parse);\n }\n return parse(str);\n },\n setItem: (name, newValue) => storage.setItem(\n name,\n JSON.stringify(newValue, options == null ? void 0 : options.replacer)\n ),\n removeItem: (name) => storage.removeItem(name)\n };\n return persistStorage;\n}\nconst toThenable = (fn) => (input) => {\n try {\n const result = fn(input);\n if (result instanceof Promise) {\n return result;\n }\n return {\n then(onFulfilled) {\n return toThenable(onFulfilled)(result);\n },\n catch(_onRejected) {\n return this;\n }\n };\n } catch (e) {\n return {\n then(_onFulfilled) {\n return this;\n },\n catch(onRejected) {\n return toThenable(onRejected)(e);\n }\n };\n }\n};\nconst oldImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n getStorage: () => localStorage,\n serialize: JSON.stringify,\n deserialize: JSON.parse,\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage;\n try {\n storage = options.getStorage();\n } catch (e) {\n }\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const thenableSerialize = toThenable(options.serialize);\n const setItem = () => {\n const state = options.partialize({ ...get() });\n let errorInSync;\n const thenable = thenableSerialize({ state, version: options.version }).then(\n (serializedValue) => storage.setItem(options.name, serializedValue)\n ).catch((e) => {\n errorInSync = e;\n });\n if (errorInSync) {\n throw errorInSync;\n }\n return thenable;\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n void setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n void setItem();\n },\n get,\n api\n );\n let stateFromStorage;\n const hydrate = () => {\n var _a;\n if (!storage)\n return;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => cb(get()));\n const postRehydrationCallback = ((_a = options.onRehydrateStorage) == null ? void 0 : _a.call(options, get())) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((storageValue) => {\n if (storageValue) {\n return options.deserialize(storageValue);\n }\n }).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n return options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return deserializedStorageValue.state;\n }\n }\n }).then((migratedState) => {\n var _a2;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n return setItem();\n }).then(() => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.getStorage) {\n storage = newOptions.getStorage();\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n hydrate();\n return stateFromStorage || configResult;\n};\nconst newImpl = (config, baseOptions) => (set, get, api) => {\n let options = {\n storage: createJSONStorage(() => localStorage),\n partialize: (state) => state,\n version: 0,\n merge: (persistedState, currentState) => ({\n ...currentState,\n ...persistedState\n }),\n ...baseOptions\n };\n let hasHydrated = false;\n const hydrationListeners = /* @__PURE__ */ new Set();\n const finishHydrationListeners = /* @__PURE__ */ new Set();\n let storage = options.storage;\n if (!storage) {\n return config(\n (...args) => {\n console.warn(\n `[zustand persist middleware] Unable to update item '${options.name}', the given storage is currently unavailable.`\n );\n set(...args);\n },\n get,\n api\n );\n }\n const setItem = () => {\n const state = options.partialize({ ...get() });\n return storage.setItem(options.name, {\n state,\n version: options.version\n });\n };\n const savedSetState = api.setState;\n api.setState = (state, replace) => {\n savedSetState(state, replace);\n void setItem();\n };\n const configResult = config(\n (...args) => {\n set(...args);\n void setItem();\n },\n get,\n api\n );\n let stateFromStorage;\n const hydrate = () => {\n var _a, _b;\n if (!storage)\n return;\n hasHydrated = false;\n hydrationListeners.forEach((cb) => {\n var _a2;\n return cb((_a2 = get()) != null ? _a2 : configResult);\n });\n const postRehydrationCallback = ((_b = options.onRehydrateStorage) == null ? void 0 : _b.call(options, (_a = get()) != null ? _a : configResult)) || void 0;\n return toThenable(storage.getItem.bind(storage))(options.name).then((deserializedStorageValue) => {\n if (deserializedStorageValue) {\n if (typeof deserializedStorageValue.version === \"number\" && deserializedStorageValue.version !== options.version) {\n if (options.migrate) {\n return options.migrate(\n deserializedStorageValue.state,\n deserializedStorageValue.version\n );\n }\n console.error(\n `State loaded from storage couldn't be migrated since no migrate function was provided`\n );\n } else {\n return deserializedStorageValue.state;\n }\n }\n }).then((migratedState) => {\n var _a2;\n stateFromStorage = options.merge(\n migratedState,\n (_a2 = get()) != null ? _a2 : configResult\n );\n set(stateFromStorage, true);\n return setItem();\n }).then(() => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(stateFromStorage, void 0);\n stateFromStorage = get();\n hasHydrated = true;\n finishHydrationListeners.forEach((cb) => cb(stateFromStorage));\n }).catch((e) => {\n postRehydrationCallback == null ? void 0 : postRehydrationCallback(void 0, e);\n });\n };\n api.persist = {\n setOptions: (newOptions) => {\n options = {\n ...options,\n ...newOptions\n };\n if (newOptions.storage) {\n storage = newOptions.storage;\n }\n },\n clearStorage: () => {\n storage == null ? void 0 : storage.removeItem(options.name);\n },\n getOptions: () => options,\n rehydrate: () => hydrate(),\n hasHydrated: () => hasHydrated,\n onHydrate: (cb) => {\n hydrationListeners.add(cb);\n return () => {\n hydrationListeners.delete(cb);\n };\n },\n onFinishHydration: (cb) => {\n finishHydrationListeners.add(cb);\n return () => {\n finishHydrationListeners.delete(cb);\n };\n }\n };\n if (!options.skipHydration) {\n hydrate();\n }\n return stateFromStorage || configResult;\n};\nconst persistImpl = (config, baseOptions) => {\n if (\"getStorage\" in baseOptions || \"serialize\" in baseOptions || \"deserialize\" in baseOptions) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\n \"[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead.\"\n );\n }\n return oldImpl(config, baseOptions);\n }\n return newImpl(config, baseOptions);\n};\nconst persist = persistImpl;\n\nexport { combine, createJSONStorage, devtools, persist, redux, subscribeWithSelector };\n"],"names":["_interopRequireDefault","require","exports","_createSvgIcon","_jsxRuntime","default","jsx","d","Object","value","enumerable","get","_utils","createSvgIcon","_jsx","useUtilityClasses","ownerState","classes","variant","colorDefault","composeClasses","root","img","fallback","getAvatarUtilityClass","AvatarRoot","styled","name","slot","overridesResolver","props","styles","memoTheme","theme","position","display","alignItems","justifyContent","flexShrink","width","height","fontFamily","typography","fontSize","pxToRem","lineHeight","borderRadius","overflow","userSelect","variants","style","vars","shape","color","palette","background","backgroundColor","Avatar","defaultBg","grey","applyStyles","AvatarImg","textAlign","objectFit","textIndent","AvatarFallback","Person","React","ref","useDefaultProps","inProps","alt","children","childrenProp","className","component","slots","slotProps","imgProps","sizes","src","srcSet","other","loaded","useLoaded","crossOrigin","referrerPolicy","setLoaded","undefined","active","image","Image","onload","onerror","srcset","hasImg","hasImgNotFailing","ImgSlot","imgSlotProps","useSlot","elementType","externalForwardedProps","additionalProps","as","clsx","generateUtilityClass","generateUtilityClasses","avatarClasses","getBackdropUtilityClass","invisible","BackdropRoot","right","bottom","top","left","WebkitTapHighlightColor","Backdrop","open","components","componentsProps","TransitionComponent","TransitionComponentProp","transitionDuration","backwardCompatibleSlots","Root","RootSlot","rootProps","TransitionSlot","transitionProps","Fade","in","timeout","boxClasses","defaultTheme","createTheme","createBox","themeId","THEME_ID","defaultClassName","generateClassName","ClassNameGenerator","generate","getButtonUtilityClass","buttonClasses","ButtonGroupContext","ButtonGroupButtonContext","disableElevation","fullWidth","size","capitalize","label","startIcon","endIcon","composedClasses","commonIconStyles","ButtonRoot","ButtonBase","shouldForwardProp","prop","rootShouldForwardProp","colorInherit","inheritContainedBackgroundColor","mode","inheritContainedHoverBackgroundColor","A100","button","minWidth","padding","border","transition","transitions","create","duration","short","textDecoration","disabled","action","boxShadow","shadows","focusVisible","disabledBackground","borderColor","entries","filter","main","dark","contrastText","map","mainChannel","alpha","hoverOpacity","text","primary","getContrastText","Button","inheritContainedBg","inheritContainedHoverBg","primaryChannel","ButtonStartIcon","marginRight","marginLeft","ButtonEndIcon","contextProps","buttonGroupButtonContextPositionClassName","resolvedProps","resolveProps","disableFocusRipple","endIconProp","focusVisibleClassName","startIconProp","type","_jsxs","positionClassName","focusRipple","LazyRipple","use","ripple","useLazyRef","current","shouldMount","setShouldMount","mountEffect","mount","mounted","createControlledPromise","resolve","reject","p","Promise","resolveFn","rejectFn","start","args","then","stop","pulsate","constructor","didMount","touchRippleClasses","enterKeyframe","keyframes","exitKeyframe","pulsateKeyframe","TouchRippleRoot","pointerEvents","zIndex","Ripple","rippleX","rippleY","rippleSize","inProp","onExited","leaving","setLeaving","rippleClassName","rippleVisible","ripplePulsate","childClassName","child","childLeaving","childPulsate","timeoutId","setTimeout","clearTimeout","rippleStyles","DURATION","easing","easeInOut","shorter","TouchRipple","center","centerProp","ripples","setRipples","nextKey","rippleCallback","ignoringMouseDown","startTimer","useTimeout","startTimerCommit","container","startCommit","params","cb","oldRipples","TouchRippleRipple","event","options","fakeElement","element","rect","getBoundingClientRect","clientX","clientY","touches","length","Math","round","sqrt","sizeX","max","abs","clientWidth","sizeY","clientHeight","clear","slice","TransitionGroup","exit","getButtonBaseUtilityClass","buttonBaseClasses","ButtonBaseRoot","boxSizing","outline","margin","cursor","verticalAlign","MozAppearance","WebkitAppearance","borderStyle","colorAdjust","centerRipple","disableRipple","disableTouchRipple","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","buttonRef","useLazyRipple","handleRippleRef","useForkRef","setFocusVisible","focus","enableTouchRipple","useRippleHandler","rippleAction","eventCallback","skipRippleAction","useEventCallback","handleMouseDown","handleContextMenu","handleDragLeave","handleMouseUp","handleMouseLeave","preventDefault","handleTouchStart","handleTouchEnd","handleTouchMove","handleBlur","isFocusVisible","target","handleFocus","currentTarget","isNonNativeButton","tagName","href","handleKeyDown","repeat","key","handleKeyUp","defaultPrevented","ComponentProp","to","buttonProps","role","handleRef","getChipUtilityClass","chipClasses","iconColor","onDelete","clickable","avatar","icon","deleteIcon","ChipRoot","deletable","textColor","maxWidth","selected","whiteSpace","opacity","disabledOpacity","Chip","defaultAvatarColor","avatarColorPrimary","avatarColorSecondary","secondary","avatarSmall","contrastTextChannel","defaultIconColor","selectedChannel","selectedOpacity","focusOpacity","defaultBorder","hover","iconSmall","deleteIconSmall","ChipLabel","textOverflow","paddingLeft","paddingRight","isDeleteKeyboardEvent","keyboardEvent","avatarProp","clickableProp","deleteIconProp","iconProp","skipFocusWhenDisabled","chipRef","handleDeleteIconClick","stopPropagation","moreProps","CancelIcon","getCircularProgressUtilityClass","circularRotateKeyframe","circularDashKeyframe","rotateAnimation","css","dashAnimation","disableShrink","svg","circle","CircularProgressRoot","animation","CircularProgressSVG","CircularProgressCircle","circleDisableShrink","stroke","strokeDasharray","strokeDashoffset","CircularProgress","thickness","circleStyle","rootStyle","circumference","PI","toFixed","transform","viewBox","SIZE","cx","cy","r","fill","strokeWidth","createContainer","Container","createStyledComponent","String","fixed","disableGutters","useThemeProps","useSystemDefaultProps","DialogBackdrop","overrides","backdrop","scroll","fullScreen","paper","getDialogUtilityClass","DialogRoot","Modal","DialogContainer","overflowY","overflowX","content","DialogPaper","Paper","paperFullWidth","paperFullScreen","flexDirection","maxHeight","breakpoints","unit","values","xs","dialogClasses","paperScrollBody","down","keys","Dialog","useTheme","defaultTransitionDuration","enter","enteringScreen","leavingScreen","ariaDescribedby","ariaLabelledbyProp","BackdropComponent","BackdropProps","disableEscapeKeyDown","onBackdropClick","onClose","PaperComponent","PaperProps","TransitionProps","backdropClick","ariaLabelledby","useId","dialogContextValue","titleId","closeAfterTransition","handleBackdropClick","appear","elevation","DialogContext","Provider","getDialogContentUtilityClass","dividers","DialogContentRoot","flex","WebkitOverflowScrolling","borderTop","divider","borderBottom","dialogTitleClasses","paddingTop","DialogContent","getDialogTitleUtilityClass","absolute","flexItem","light","orientation","wrapper","getDividerUtilityClass","DividerRoot","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","borderWidth","borderBottomWidth","dividerChannel","spacing","marginTop","marginBottom","borderRightWidth","alignSelf","borderTopStyle","borderLeftStyle","borderLeft","DividerWrapper","wrapperVertical","paddingBottom","Divider","muiSkipListHighlight","dividerClasses","entering","entered","defaultTimeout","addEndListener","onEnter","onEntered","onEntering","onExit","onExiting","Transition","nodeRef","getReactNodeRef","normalizedTransitionCallback","callback","maybeIsAppearing","node","handleEntering","handleEnter","isAppearing","reflow","getTransitionProps","webkitTransition","handleEntered","handleExiting","handleExit","handleExited","enableStrictModeCompat","next","handleAddEndListener","state","childProps","visibility","getFilledInputUtilityClass","filledInputClasses","inputBaseClasses","disableUnderline","startAdornment","endAdornment","hiddenLabel","multiline","input","FilledInputRoot","InputBaseRoot","inputBaseRootOverridesResolver","underline","FilledInput","bg","borderTopLeftRadius","borderTopRightRadius","easeOut","hoverBg","hoverBackground","focused","disabledBg","error","borderBottomColor","common","onBackgroundChannel","inputUnderline","bottomLineColor","borderBottomStyle","FilledInputInput","InputBaseInput","inputBaseInputOverridesResolver","WebkitBoxShadow","WebkitTextFillColor","caretColor","getColorSchemeSelector","componentsPropsProp","inputComponent","filledInputComponentsProps","deepmerge","InputSlot","Input","InputBase","muiName","getFormControlUtilityClasses","FormControlRoot","FormControl","registerEffect","visuallyFocused","required","adornedStart","setAdornedStart","initialAdornedStart","forEach","isMuiElement","isAdornedStart","filled","setFilled","initialFilled","isFilled","inputProps","focusedState","setFocused","onEmpty","onFilled","FormControlContext","childContext","formControlState","states","muiFormControl","reduce","acc","useFormControl","GridContext","getGridUtilityClass","GRID_SIZES","gridClasses","SPACINGS","direction","wrap","extractZeroValueBreakpointKeys","nonZeroKey","sortedBreakpointKeysByValue","sort","a","b","indexOf","GridRoot","item","zeroMinWidth","spacingStyles","resolveSpacingStyles","Number","isNaN","breakpoint","push","breakpointsStyles","flexWrap","generateDirection","generateRowGap","directionValues","resolveBreakpointValues","generateGrid","handleBreakpoints","propValue","output","startsWith","rowSpacing","zeroValueBreakpointKeys","rowSpacingValues","themeSpacing","includes","generateColumnGap","columnSpacing","columnSpacingValues","negativeValue","globalStyles","flexBasis","flexGrow","columnsBreakpointValues","columns","columnValue","more","assign","up","spacingClasses","resolveSpacingClasses","breakpointsClasses","Grid","themeProps","extendSxProp","columnsProp","columnSpacingProp","rowSpacingProp","columnsContext","breakpointsValues","otherFiltered","getScale","isWebKit154","navigator","test","userAgent","Grow","timer","autoTimeout","delay","transitionTimingFunction","getAutoHeightDuration","join","getIconButtonUtilityClass","iconButtonClasses","edge","IconButtonRoot","shortest","activeChannel","IconButton","getInputUtilityClass","inputClasses","InputRoot","formControl","InputInput","inputComponentsProps","_span","getInputAdornmentUtilityClass","inputAdornmentClasses","disablePointerEvents","InputAdornmentRoot","positionStart","InputAdornment","disableTypography","variantProp","Typography","_InputGlobalStyles","getStyleValue","parseInt","shadow","TextareaAutosize","forwardedRef","onChange","maxRows","minRows","isControlled","inputRef","heightRef","shadowRef","calculateTextareaStyles","computedStyle","ownerWindow","getComputedStyle","outerHeightStyle","overflowing","inputShallow","placeholder","borderTopWidth","innerHeight","scrollHeight","singleRowHeight","outerHeight","min","syncHeight","textareaStyles","obj","isEmpty","useEnhancedEffect","rAF","resizeObserver","handleResize","debounceHandleResize","debounce","containerWindow","addEventListener","ResizeObserver","process","observe","rAFHandleResize","cancelAnimationFrame","removeEventListener","disconnect","handleChange","rows","readOnly","rootOverridesResolver","adornedEnd","sizeSmall","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel","getInputBaseUtilityClass","body1","inputOverridesResolver","inputPlaceholder","placeholderHidden","placeholderVisible","font","letterSpacing","disableInjectingGlobalStyles","animationName","animationDuration","resize","globalCss","from","autoComplete","autoFocus","defaultValue","id","inputPropsProp","inputRefProp","renderSuffix","valueProp","handleInputRefWarning","instance","handleInputRef","fcs","checkDirty","InputComponent","Boolean","InputGlobalStyles","handleClick","isHostComponent","onAnimationStart","handleAutoFill","_formatMuiErrorMessage","hasValue","Array","isArray","SSR","getListUtilityClass","disablePadding","dense","subheader","ListRoot","listStyle","List","context","ListContext","getListItemUtilityClass","listItemButtonClasses","getListItemSecondaryActionClassesUtilityClass","ListItemSecondaryActionRoot","ListItemSecondaryAction","hasSecondaryAction","ListItemRoot","alignItemsFlexStart","gutters","secondaryAction","backgroundClip","ListItem","componentProp","ContainerComponent","ContainerProps","ContainerClassName","listItemRef","toArray","componentProps","Component","ListItemContainer","pop","inset","getListItemTextUtilityClass","ListItemTextRoot","listItemTextClasses","typographyClasses","ListItemText","primaryProp","primaryTypographyProps","secondaryProp","secondaryTypographyProps","ariaHidden","show","setAttribute","removeAttribute","getPaddingRight","ariaHiddenSiblings","mountElement","currentElement","elementsToExclude","blacklist","call","isNotExcludedElement","isNotForbiddenElement","isAriaHiddenForbiddenOnElement","isForbiddenTagName","forbiddenTagNames","isInputHidden","getAttribute","findIndexOf","items","idx","some","index","ModalManager","add","modal","modalIndex","modals","modalRef","hiddenSiblings","getHiddenSiblings","containerIndex","containers","restore","containerInfo","handleContainer","restoreStyle","disableScrollLock","scrollContainer","isOverflowing","doc","ownerDocument","body","innerWidth","documentElement","scrollbarSize","getScrollbarSize","property","el","fixedElements","querySelectorAll","parentNode","DocumentFragment","parent","parentElement","nodeName","setProperty","removeProperty","remove","ariaHiddenState","splice","nextTop","isTopModal","defaultManager","useModal","manager","onTransitionEnter","onTransitionExited","rootRef","parameters","mountNodeRef","exited","setExited","hasTransition","hasOwnProperty","getHasTransition","ariaHiddenProp","getDoc","getModal","handleMounted","scrollTop","handleOpen","resolvedContainer","getContainer","handlePortalRef","handleClose","createHandleKeyDown","otherHandlers","which","createHandleBackdropClick","getRootProps","propsEventHandlers","extractEventHandlers","externalEventHandlers","getBackdropProps","createChainedFunction","portalRef","getModalUtilityClass","ModalRoot","hidden","ModalBackdrop","classesProp","disableAutoFocus","disableEnforceFocus","disablePortal","disableRestoreFocus","hideBackdrop","keepMounted","propsWithDefaults","getSlotProps","BackdropSlot","backdropProps","e","backdropRef","Portal","FocusTrap","isEnabled","NotchedOutlineRoot","NotchedOutlineLegend","float","withLabel","notched","getOutlinedInputUtilityClass","outlinedInputClasses","notchedOutline","OutlinedInputRoot","NotchedOutline","OutlinedInputInput","OutlinedInput","_React$Fragment","getPaperUtilityClass","square","PaperRoot","rounded","backgroundImage","overlays","getOverlayAlpha","getPopoverUtilityClass","getOffsetTop","offset","getOffsetLeft","horizontal","getTransformOriginValue","transformOrigin","n","resolveAnchorEl","anchorEl","PopoverRoot","PopoverPaper","PaperBase","minHeight","Popover","anchorOrigin","anchorPosition","anchorReference","containerProp","marginThreshold","PaperPropsProp","transitionDurationProp","externalPaperSlotProps","paperRef","getAnchorOffset","resolvedAnchorEl","anchorRect","anchorElement","nodeType","getTransformOrigin","elemRect","getPositioningStyle","offsetWidth","offsetHeight","elemTransformOrigin","anchorOffset","heightThreshold","widthThreshold","diff","isPositioned","setIsPositioned","setPositioningStyles","positioning","window","updatePosition","muiSupportAuto","PaperSlot","paperProps","rootSlotPropsProp","handlePaperRef","getPopperUtilityClass","defaultPopperOptions","PopperTooltip","modifiers","placement","initialPlacement","popperOptions","popperRef","popperRefProp","ownerStateProp","tooltipRef","ownRef","handlePopperRef","handlePopperRefRef","rtlPlacement","flipPlacement","setPlacement","resolvedAnchorElement","setResolvedAnchorElement","forceUpdate","handlePopperUpdate","data","popperModifiers","altBoundary","enabled","phase","fn","concat","popper","createPopper","destroy","useSlotProps","externalSlotProps","Popper","isHTMLElement","PopperRoot","BasePopper","isRtl","useRtl","RootComponent","otherProps","mountNode","setMountNode","document","setRef","newProps","ReactDOM","nextItem","list","disableListWrap","firstChild","nextElementSibling","previousItem","lastChild","previousElementSibling","textCriteriaMatches","nextFocus","textCriteria","innerText","textContent","trim","toLowerCase","repeating","moveFocus","currentFocus","disabledItemsFocusable","traversalFunction","wrappedOnce","nextFocusDisabled","hasAttribute","MenuList","actions","autoFocusItem","listRef","textCriteriaRef","previousKeyMatched","lastTime","adjustStyleForScrollbar","containerElement","noExplicitWidth","activeItemIndex","newChildProps","isModifierKeyPressed","ctrlKey","metaKey","altKey","activeElement","criteria","lowerKey","currTime","performance","now","keepFocusOnCurrent","getMenuUtilityClass","RTL_ORIGIN","LTR_ORIGIN","MenuRoot","MenuPaper","Menu","disableAutoFocusItem","MenuListProps","PopoverClasses","menuListActionsRef","paperExternalSlotProps","rootSlotProps","paperSlotProps","MenuMenuList","handleListKeyDown","getNativeSelectUtilityClasses","nativeSelectClasses","multiple","select","StyledSelectSelect","StyledSelectIcon","iconOpen","NativeSelectInput","IconComponent","NativeSelectSelect","NativeSelectIcon","getSelectUtilityClasses","selectClasses","SelectSelect","SelectIcon","SelectNativeInput","slotShouldForwardProp","nativeInput","areEqualValues","SelectInput","MenuProps","displaySingle","ariaLabel","autoWidth","defaultOpen","displayEmpty","labelId","onOpen","openProp","renderValue","SelectDisplayProps","tabIndexProp","setValueState","useControlled","controlled","openState","setOpenState","displayRef","displayNode","setDisplayNode","isOpenControlled","menuMinWidthState","setMenuMinWidthState","handleDisplayRef","getElementById","handler","getSelection","isCollapsed","update","childrenArray","handleItemClick","newValue","itemIndex","nativeEvent","clonedEvent","defineProperty","writable","displayMultiple","computeDisplay","v","menuMinWidth","buttonId","listboxId","find","childItem","styledRootConfig","StyledInput","StyledOutlinedInput","StyledFilledInput","Select","ArrowDropDownIcon","native","restOfClasses","standard","outlined","inputComponentRef","getSvgIconUtilityClass","SvgIconRoot","hasSvgAsChild","SvgIcon","htmlColor","inheritViewBox","titleAccess","instanceFontSize","focusable","getFormLabelUtilityClasses","formLabelClasses","asterisk","FormLabelRoot","colorSecondary","FormLabel","AsteriskComponent","getInputLabelUtilityClasses","shrink","disableAnimation","InputLabelRoot","animated","InputLabel","shrinkProp","getFormHelperTextUtilityClasses","formHelperTextClasses","contained","FormHelperTextRoot","caption","FormHelperText","getTextFieldUtilityClass","variantComponent","TextFieldRoot","TextField","FormHelperTextProps","FormHelperTextPropsProp","helperText","idOverride","InputLabelProps","InputLabelPropsProp","InputProps","InputPropsProp","SelectProps","SelectPropsProp","helperTextId","inputLabelId","inputLabel","htmlInput","formHelperText","inputAdditionalProps","inputLabelSlotProps","InputLabelSlot","inputLabelProps","HtmlInputSlot","htmlInputProps","FormHelperTextSlot","formHelperTextProps","SelectSlot","selectProps","InputElement","htmlFor","getTooltipUtilityClass","tooltipClasses","disableInteractive","arrow","touch","tooltip","split","TooltipPopper","popperInteractive","popperArrow","popperClose","TooltipTooltip","tooltipArrow","Tooltip","white","wordWrap","fontWeight","fontWeightMedium","fontWeightRegular","TooltipArrow","hystersisOpen","hystersisTimer","Timeout","cursorPosition","x","y","composeEventHandler","eventHandler","describeChild","disableFocusListener","disableHoverListener","disableInteractiveProp","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","idProp","leaveDelay","leaveTouchDelay","PopperComponent","PopperComponentProp","PopperProps","title","childNode","setChildNode","arrowRef","setArrowRef","ignoreNonTouchEvents","closeTimer","enterTimer","leaveTimer","touchTimer","prevUserSelect","stopTouchInteraction","WebkitUserSelect","handleMouseOver","setChildIsFocusVisible","detectTouchStart","childrenProps","nameOrDescProps","titleIsString","onMouseMove","handleMouseMove","interactiveWrapperListeners","onMouseOver","tooltipModifiers","TooltipComponent","ArrowComponent","Arrow","popperProps","appendOwnerState","tooltipProps","tooltipArrowProps","TransitionPropsInner","v6Colors","info","success","warning","textPrimary","textSecondary","textDisabled","internal_createExtendSxProp","align","gutterBottom","noWrap","paragraph","getTypographyUtilityClass","TypographyRoot","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body2","inherit","isSxColor","variantMapping","defaultVariantMapping","defaultGetTabbable","regularTabNodes","orderedTabNodes","candidatesSelector","i","nodeTabIndex","getTabIndex","tabindexAttr","contentEditable","isNodeMatchingSelectorFocusable","isNonTabbableRadio","getRadio","selector","querySelector","roving","documentOrder","defaultIsEnabled","getTabbable","ignoreNextEnforceFocus","sentinelStart","sentinelEnd","nodeToRestore","reactFocusEventTarget","activated","lastKeydown","contains","loopFocus","shiftKey","contain","rootElement","hasFocus","tabbable","isShiftTab","focusNext","focusPrevious","interval","setInterval","clearInterval","handleFocusSentinel","relatedTarget","childrenPropsHandler","black","A200","A400","A700","purple","red","orange","blue","lightBlue","green","activatedOpacity","addLightOrDark","intent","shade","tonalOffset","tonalOffsetLight","tonalOffsetDark","lighten","darken","createPalette","contrastThreshold","getDefaultPrimary","getDefaultSecondary","getDefaultError","getDefaultInfo","getDefaultSuccess","getDefaultWarning","getContrastRatio","augmentColor","mainShade","lightShade","darkShade","JSON","stringify","modes","createShadow","px","shadowKeyUmbraOpacity","shadowKeyPenumbraOpacity","shadowAmbientShadowOpacity","easeIn","sharp","complex","formatMs","milliseconds","constant","mobileStepper","fab","speedDial","appBar","drawer","snackbar","createThemeNoVars","mixins","breakpointsInput","mixinsInput","spacingInput","paletteInput","transitionsInput","typographyInput","shapeInput","systemTheme","systemCreateTheme","muiTheme","toolbar","createMixins","createTypography","createTransitions","mergedEasing","inputTransitions","mergedDuration","durationOption","easingOption","animatedProp","argument","unstable_sxConfig","defaultSxConfig","unstable_sx","sx","styleFunctionSx","defaultDarkOverlays","_","overlay","getOpacity","switchTrackDisabled","switchTrack","getOverlays","shouldSkipGeneratingVar","match","cssVarPrefix","colorScheme","colorSchemeSelector","rule","defaultColorScheme","excludedVariables","excludeVariablesFromRoot","cssVar","replace","stringifyTheme","baseTheme","serializableTheme","serializeTheme","object","array","isPlainObject","val","setColor","toRgb","hslToRgb","setColorChannel","safeColorChannel","silent","createGetCssVar","systemCreateGetCssVar","attachColorScheme","colorSchemes","scheme","restTheme","createColorScheme","rest","cssVariables","initialColorSchemes","initialDefaultColorScheme","defaultColorSchemeInput","defaultScheme","colorSchemesInput","paletteOptions","createThemeWithVars","disableCssColorScheme","defaultShouldSkipGeneratingVar","firstColorScheme","getCssVar","defaultSchemeInput","builtInLight","builtInDark","customColorSchemes","prepareTypographyVars","getSpacingVal","setCssVarColor","tokens","colorToken","assignNode","k","Alert","safeDarken","safeLighten","AppBar","LinearProgress","Skeleton","Slider","snackbarContentBackground","safeEmphasize","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","safeAlpha","colors","parserConfig","prefix","getSelector","defaultGetSelector","generateThemeVars","generateStyleSheets","prepareCssVars","generateSpacing","createSpacing","createUnarySpacing","createGetColorSchemeSelector","toRuntimeSource","caseAllCaps","textTransform","defaultFontFamily","fontWeightLight","fontWeightBold","htmlFontSize","allVariants","pxToRem2","coef","buildVariant","casing","overline","clone","alphaValue","log","createStyled","useThemeSystem","systemUseThemeProps","transitionDelay","path","displayName","deprecatedPropType","requirePropFactory","unsupportedProp","unstable_ClassNameGenerator","configure","generator","arg","styleFn","lastValue","lastTheme","initialElementType","getSlotOwnerState","internalForwardedProps","useSlotPropsParams","rootComponent","resolvedComponentsProps","resolveComponentProps","slotComponent","mergedProps","internalRef","mergeSlotProps","slotOwnerState","finalOwnerState","LeafComponent","propName","SystemGlobalStyles","GlobalStyles","GlobalStylesWrapper","_sentryCollisionFreeGlobalObject","global","dsn","env","SENTRY_DSN","NEXT_PUBLIC_SENTRY_DSN","integrations","Sentry","tracesSampleRate","replaysSessionSampleRate","replaysOnErrorSampleRate","module","onlyFirst","pattern","getDomainLocale","locale","locales","domainLocales","configEnv","handleLoading","onLoadRef","onLoadingCompleteRef","setBlurComplete","unoptimized","sizesInput","decode","catch","Event","prevented","stopped","isDefaultPrevented","isPropagationStopped","persist","getDynamicProps","fetchPriority","fetchpriority","ImageElement","forwardRef","decoding","loading","setShowAltText","onLoad","onError","useCallback","complete","useMergedRef","data-nimg","ImagePreload","isAppRouter","imgAttributes","opts","imageSrcSet","imageSizes","preload","Head","link","rel","pagesRouter","useContext","RouterContext","configContext","ImageConfigContext","config","useMemo","c","imageConfigDefault","allSizes","deviceSizes","onLoadingComplete","useRef","useEffect","blurComplete","useState","showAltText","meta","imgMeta","getImgProps","defaultLoader","imgConf","priority","prefetched","Set","prefetch","router","isLocalURL","bypassPrefetchedCheck","prefetchedKey","has","formatStringOrUrl","urlObjOrString","formatUrl","Link","hrefProp","asProp","prefetchProp","passHref","shallow","onMouseEnter","onMouseEnterProp","onTouchStartProp","legacyBehavior","restProps","prefetchEnabled","resolvedHref","resolvedAs","resolveHref","previousHref","previousAs","only","childRef","setIntersectionRef","isVisible","resetVisible","useIntersection","rootMargin","setIntersectionWithResetRef","linkClicked","toUpperCase","isModifiedEvent","navigate","routerScroll","isAbsoluteUrl","curLocale","localeDomain","isLocaleDomain","addBasePath","addLocale","defaultLocale","cloneElement","hasIntersectionObserver","IntersectionObserver","observers","Map","idList","isDisabled","visible","setVisible","elementRef","setElement","observer","elements","createObserver","existing","entry","isIntersecting","intersectionRatio","set","unobserve","delete","findIndex","idleCallback","requestIdleCallback","cancelIdleCallback","refA","refB","cleanupA","cleanupB","applyRef","cleanup","isStaticRequire","getInt","isFinite","NaN","_state","blurWidth","blurHeight","quality","overrideSrc","blurDataURL","layout","objectPosition","lazyBoundary","lazyRoot","loader","isDefaultLoader","customImageLoader","layoutStyle","intrinsic","responsive","layoutSizes","staticSrc","widthInt","heightInt","isStaticImageData","staticImageData","ratio","isLazy","dangerouslyAllowSVG","endsWith","qualityInt","imgStyle","getImageBlurSvg","backgroundSize","backgroundPosition","backgroundRepeat","generateImgAttrs","widths","kind","getWidths","viewportWidthRe","percentSizes","exec","smallestRatio","s","w","last","placeholderStyle","svgWidth","svgHeight","std","preserveAspectRatio","getImageProps","encodeURIComponent","__next_img_default","React__default","_interopDefaultLegacy","isProd","isString","o","prototype","toString","StyleSheet","param","_name","_optimizeForSpeed","optimizeForSpeed","invariant$1","_deletedRulePlaceholder","_serverSheet","_tags","_injected","_rulesCount","_nonce","_proto","setOptimizeForSpeed","bool","flush","inject","isOptimizeForSpeed","_this","makeStyleTag","getSheet","console","warn","cssRules","insertRule","cssText","deleteRule","getSheetForTag","tag","sheet","styleSheets","ownerNode","insertionPoint","replaceRule","removeChild","rules","cssString","relativeToTag","createElement","appendChild","createTextNode","head","getElementsByTagName","insertBefore","_defineProperties","descriptor","configurable","condition","message","stringHash","hash","_$hash","str","charCodeAt","cache","computeId","baseId","propsToString","computeSelector","idcss","selectoPlaceholderRegexp","StyleSheetRegistry","_styleSheet","styleSheet","_sheet","_fromServer","_indices","_instancesCounts","selectFromServer","getIdAndRules","styleId","indices","invariant","tagFromServer","nextProps","fromServer","mapRulesToStyle","nonce","dangerouslySetInnerHTML","__html","dynamic","StyleSheetContext","createContext","useInsertionEffect","useLayoutEffect","defaultRegistry","JSXStyle","registry","useStyleRegistry","tagInfo","ArrayCreditAlerts","closeArrayAlerts","bureau","appKey","userToken","sandbox","useArrayInfo","t","useTranslation","arrayUser","isError","status","useQuery","queryBoy","resp","ApiService","refetchOnWindowFocus","refetchOnMount","retry","setCurrentModal","useDashboardModal","Script","div","xmlns","stroke-width","stroke-linecap","stroke-linejoin","ContinueButton","BackButtonComponent","useRouter","refetchUserInfo","logout","useAuthUser","isOnboardingRoute","pathname","commonRoutes","buyer","auth","onboarding","isQuickSetupRoute","isCompleteSetupRoute","completeSetup","isLinkBankAccountRoute","currentAssessment","isVerifyIncomeRoute","verifyIncome","isGenerateCreditRoute","generateCredit","isResetPasswordRoute","reset","isSignUpRoute","signup","isSignInRoute","signin","isValidRoute","isAuthRoute","handleBack","Box","gap","ArrowBackIcon","InviteCoBorrower","profile","isOpen","setIsOpen","methods","useForm","defaultValues","coBorrowersFirstName","coBorrowerInvite","coBorrowersLastName","coBorrowersEmail","inviteeUserId","userId","reValidateMode","inviteMutation","useMutation","onSuccess","Toast","onSubmit","mutate","email","firstName","lastName","inviterId","coBorrower","panelClassName","Form","handleSubmit","CustomInput","validations","Email","responseError","Loading","isLoading","CoBorrowerDetails","DisAssociateCoBorrower","qc","useQueryClient","disassociationMutation","invalidateQueries","listItemIconClasses","getMenuItemUtilityClass","menuItemClasses","MenuItemRoot","MenuItem","menuItemRef","StyledSelect","FlagImage","language","LanguageSelect","setLanguage","useLanguage","languages","code","flag","KeyboardArrowDownIcon","md","lang","l","Checkbox","register","useFormContext","span","CoBorrowerInput","memo","UnMemoCoBorrowerInput","AutoCompleteLocation","fieldNames","street","apartment","city","zipCode","showPredictions","setShowPredictions","getValues","setValue","address","setAddress","placesService","placePredictions","getPlacePredictions","usePlaces","apiKey","componentRestrictions","country","types","getAddressComponentValue","addressComponents","long_name","getStreetName","streetNumberComponent","streetNumber","streetNameComponent","streetName","updateFormState","shouldTouch","shouldDirty","shouldValidate","selectAddress","getDetails","placeId","place","address_components","prev","predictions","prediction","place_id","description","prevAddress","section","onQueryChange","wrapperClassName","mask","getDialogActionsUtilityClass","disableSpacing","DialogActionsRoot","DialogActions","DATE_FORMAT","Flags","Currency","errors","showLabel","showRequired","customLabel","maxLength","labelClassName","intl","useIntl","formState","isSubmitted","watch","formatMessage","formatValidations","requiredMessage","validate","errorInvalid","errorFieldAlreadyExists","metadata","fields","hasError","allProps","Label","CurrencyFormat","onValueChange","ErrorMessage","otherAmountFieldName","PurchaseHomeTimeDropdown","otherAmountDefaultValue","otherAmountSelectionDefault","selectedVal","setSelectedVal","otherAmountSelection","setOtherAmountSelection","numberVal","extractNumbers","alternate","ReactInputMask","maskPlaceholder","shouldRegister","MultiSelectOptions","MultiSelect","setSelected","selectedOption","getFieldState","optionsRender","option","SelectDateAmount","inputRegister","currentExpectedPurchaseMonthsPeriod","inputValue","Listbox","aria-hidden","strokeLinecap","Fragment","leave","leaveFrom","leaveTo","Options","Option","m","M","E","h","T","passive","u","L","Error","captureStackTrace","P","g","ourProps","theirProps","defaultTag","A","Y","Ge","U","re","te","B","checked","f","defaultChecked","form","H","F","D","j","setSwitch","Q","S","C","I","Space","Enter","z","G","R","X","labelledby","describedby","onKeyPress","V","closest","$","features","q","Hidden","K","ee","Group","Z","W","J","switch","click","preventScroll","O","Description","N","LocationTags","locations","locationsRender","location","strokeLinejoin","validEmail","Password","showPwd","setShowPwd","repwdinputValue","password","PwdValidation","hasSpecialCharacters","charCheck","numberCheck","alphaCheck","specialCharsCheck","isContainsLowercase","isContainsNumber","showIcon","rightIcon","version","fill-rule","clip-rule","checkValidation","validPassword","Name","minLength","validName","TextArea","textArea","qtyCharacters","textarea","Radio","RadioWrapper","SwitchComponent","Country","countriesList","City","Title","CountryPhone","phone","phoneNumberValidationUS","Gender","Race","MilitaryStatus","ChildrenSelect","currentChildren","ChildrenUnder18CountOptions","zeroTwo","threeFive","sixTen","moreThanTen","ReasonForPurchase","EReasonForPurchase","build_wealth","better_schools","safer_neighborhood","stop_paying_rent","tax_benefits","place_to_raise_family","State","ZipCode","BirthDate","defaultDate","dayjs","LocalizationProvider","dateAdapter","AdapterDayjs","DatePicker","maxDate","subtract","handleDateChange","isValid","format","SSN","Occupation","HousePriceGoal","housePriceGoal","thousandSeparator","decimalSeparator","allowNegative","TimePills","SelectExpectedPurchasePeriod","isAnotherAmount","useAnotherAmount","minMonth","maxMonth","minYear","maxYear","CheckBoxOptions","nameOnForm","handleSelect","currValues","valueIndex","HispanicOrigin","WishedLocation","fieldName","searchTerm","setSearchTerm","usePlaceAutoComplete","setLocations","handlePredictionsClick","setError","filteredLocations","ExpectedPurchaseAt","expectedPurchaseMonthsPeriodDefault","otherAmountSelectDefault","expectedVal","otherSelectionVal","otherAmount","normalExpectedPurchaseMonthsPeriodValues","DateSelector","otherEmailErrors","isChecked","amountOptions","setIsAnotherAmount","dropdown","Dropdown","classNames","FormProvider","BuyerPlaidOauthPage","token","setToken","redirectTo","setRedirectTo","isMounted","useIsMounted","localStorageItem","localStorage","getItem","parse","exchangeTransactionsPublicTokenMutation","removeItem","receivedRedirectUri","publicToken","institutionId","institution","institution_id","ready","usePlaidLink","isArrayFull","every","CodeInputModal","onCodeResent","verifyCode","phoneNumber","inputRefs","setCode","setDuration","intervalId","changeInputFocus","updateCode","temp","BACKSPACE_KEY","CODE_LENGTH","onPasteNumber","pasteValue","clipboardData","getData","verificationCode","formattedPhoneNumber","formatPhoneNumberIntl","onPaste","SendCodeModal","parentOnSubmit","selectedAuth","countryCode","getCompletePhone","InputPhone","InputEmail","input_title","resetError","countryCodes","countryPhoneCodes","registerPhone","dialCode","getCountryCallingCode","purePhone","isValidPhoneNumber","en","PhoneInput","onlyCountries","defaultCountry","specialLabel","disableCountryCode","disableCountryGuess","jumpCursorToEnd","inputClass","RouteProtector","signedIn","protectedFromSignedIn","asPath","stepToRender","Case","Steps","CustomLink","ResendCodeButton","ResendCode","CodeInput","CustomCodeInput","disable","sendCodeInfo","RIGHT_KEY","LEFT_KEY","statusCode","ButtonContainer","BackButton","Paragraph","Step1","startAuthenticationByEmail","onNextStep","skipToThirdStep","setBuyerInfo","useBuyerSignupInfo","query","partnerID","pc","lenderID","lc","associateId","buyerEmail","associateIdError","setAssociateIdError","isDesktop","useMediaQuery","partnerCode","lenderCode","isPartnerCodeVerified","associateIdStatus","partnerCodeStatus","accessCode","referredBy","isReady","userType","EUserType","EAuthenticationType","authenticationId","submitErrorByEmail","ErrorState","FormWrapper","onBackClick","handleBackClick","getStarted","hr","BuyerSocialSigninV2","Step2","pwdCharCheck","setPwdCharCheck","pwdNumberCheck","setPwdNumberCheck","pwdAlphaCheck","setPwdAlphaCheck","pwdConfirmPwdCheck","setPwdConfirmPwdCheck","verifyCodeMessage","setVerifyCodeMessage","isEmailVerified","setIsEmailVerified","strCode","buyerFirstName","buyerLastName","verifyCodeMutation","result","partialSignupForm","resendCodeMutation","emailCodeType","emailSplit","encryptText","encryptedPassword","containerClassName","confirmPwdCheck","openTermsModal","setOpenTermsModal","Step3","onFinish","step","setBottom","timer1","ul","li","agreedToTerms","currStep","setCurrStep","valuesToSubmit","expectedPurchaseMonthsPeriod","wishedLocations","provider","inviteId","localStorageDataRef","acceptInvite","onNextStepMutation","inviteDate","acceptInviteDate","inviteValid","Date","toast","toThirdStep","Step","toSecondStep","prevStep","formClassName","formProps","isSignup","shouldShowSteps","StepHighlight","isActive","stepCount","totalSteps","handleGoBack","summary","arrowBack","ErrorIllustration2","br","ErrorIllustration","back","Empty","flavor","hideImage","EBuyerRecommendationType","alert","useSuggestions","suggestionQuery","buyerId","suggestionStatusMutation","refetch","suggestions","newSuggestions","in_progress","completed","deferred","dismissed","pinned","history","all","suggestionItem","EBuyerRecommendationStatus","handleSuggestionChange","qtyAvailableSuggestions","AnalyzingData","useCalculateScore","resetCompleteModal","useOnboarding","isShareOpen","setIsShareOpen","useAuthRouteProtector","routeAccessDenied","setRouteAccessDenied","newRouteAccessDenied","user","redirectLink","URL","redirectURLParams","URLSearchParams","url","search","useHubspotTracking","setPathPageView","useTrackingCode","useIdleLogout","showIdle","setShowIdle","remaining","setRemaining","promptTimeout","logoutAfterIdle","idleTimer","useIdleTimer","idleTimeout","onPrompt","showIdlePrompt","onIdle","startManually","stopOnIdle","remainingTime","getRemainingTime","ceil","activate","pause","resetIdleTimer","useKeepMixpanelSessionAlive","sessionTrackingId","random","substring","currentUrl","mixpanel","sendActivityTrackingEvent","setItem","toISOString","distinct_id","syncDataMutation","useSyncData","onboardingTransactionAccountStatus","onboardingIncomeAccountStatus","isFetchingVerifiedData","dataSynced","mutateAsync","useSyncOnLogin","GenericModal","actionTitle","onActionClick","CATEGORY_ICONS","BankFeesCategoryIcon","OtherCategoryIcon","CashAdvanceCategoryIcon","community","CommunityCategoryIcon","FoodAndDrinkCategoryIcon","healthcare","HealthcareCategoryIcon","interest","InterestCategoryIcon","payment","PaymentCategoryIcon","recreation","RecreationCategoryIcon","service","ServiceCategoryIcon","shops","ShopsCategoryIcon","tax","TaxCategoryIcon","transfer","TransferCategoryIcon","travel","TravelCategoryIcon","MonthlySpendingItem","category","mainCategoryKey","amount","percentage","CategoryIcon","MonthlySpending","selectedMonth","expenses","isFetching","totalExpenses","accum","currentValue","spendingByCategory","expense","getMainCategoryKey","spending","onSelect","selectedFilter","FilterPill","pathColor","CURRENCY_SYMBOLS","USD","EUR","CRC","GBP","ILS","INR","JPY","KRW","NGN","PHP","PLN","PYG","THB","UAH","VND","TransactionItem","currencyCode","date","pending","CheckFilledIcon","displayType","page","rangeFilter","transactions","pageSize","PAGE_SIZE","pastRange","customDate","transactionItem","toLocaleDateString","year","month","day","TransactionHistoryFilters","onRangeFilterChange","total","transactionId","CustomPagination","pageCount","onPageChange","onChangePage","currentPage","isIncome","subTitle","CashFlow","cashflow","net","vsLastMonthPercentage","vsLastMonth","CashFlowItem","income","ChartJS","CategoryScale","LinearScale","BarElement","Legend","plugins","legend","scales","stacked","grid","ticks","maxTicksLimit","IncomeExpensesChart","incomeExpensesChartData","incomes","monthLabels","incomeExpenseItem","monthDate","labels","datasets","Bar","Finances","selectedDate","setSelectedDate","dataExists","BuyerLayout","headerContainerClassName","MonthPicker","TransactionHistory","accounts","pageItemClassName","ReactPaginate","breakClassName","breakLabel","nextClassName","nextLabel","pageRangeDisplayed","previousClassName","previousLabel","renderOnZeroPageCount","pageClassName","activeClassName","marginPagesDisplayed","forcePage","MonthModalContent","selDate","adapterLocale","YearCalendar","MonthCalendar","shouldDisableMonth","showModal","setShowModal","tempDate","setTempDate","isSame","cancelActionTitle","cancelAction","DesktopIntroduction","useOpenTermsModal","isMobile","TermsModal","header","welcome","realSimple","nationalmortgageprofessional","useIntroduction","setIntroduction","Introduction","isLoadingUserInfo","FinancialLiteracyIcon","MessagesIcon","fillRule","clipRule","MenuLink","toggleMenu","collapsed","BuyerLayoutMenu","welcomTitle","hide","showMenu","setShowMenu","setCurrentRoute","useRoute","setIsSectionSelected","useSidebarContext","setIsCollapsed","handleNavigation","SmallScreenMenu","ChevronLeftIcon","EmergencyIcon","financialliteracy","CustomEvent","dispatchEvent","WalletOutlinedIcon","finances","AccountBalanceOutlinedIcon","EmojiEventsOutlinedIcon","rewards","MenuBookOutlinedIcon","additionalresources","messages","SettingsOutlinedIcon","settings","ArrowCircleRightOutlinedIcon","DefaultMenu","FeedbackModal","showSuccessModal","setShowSuccessModal","mutation","reason","feedback","FullModal","onClickBackButton","FeedbackContent","ShareModal","sendReferralLinkMutation","formattedPhone","defaultErrorMessage","handleReferralLink","origin","clipboard","writeText","NotificationScreen","notifications","onClear","isMessagesOpen","setIsMessagesOpen","handleClearNotifications","response","fetch","method","headers","ok","NotificationsIcon","NotInterestedIcon","CloseIcon","HourglassEmptyIcon","notification","notificationType","receiverID","senderID","createdAt","toLocaleString","ProfileDropdownItem","newSocket","BuyerLayoutProfileMenu","isUserInfoOpenDesktop","setIsUserInfoOpenDesktop","isFeedbackOpen","setIsFeedbackOpen","isNotificationOpen","setIsNotificationOpen","setNotifications","setHasUnreadNotifications","setIsLoading","refClickOutSideUserInfoDesktop","useClickOutside","useHandleReferralLink","checkIncompleteSetup","incompleteStepNames","transactionAccount","EOnboardingStepStatus","creditReport","onboardingCreditReportStatus","incomeAccount","isIncomplete","hasIncomplete","incompleteSteps","fetchNotifications","json","seenNotifications","latestSeenNotification","latest","newerNotifications","setupStatus","setupIncompleteNotification","unshift","sendNotification","connected","io","transports","on","prevNotifications","getTime","handleNotificationClick","hasUnreadNotifications","handleCloseNotification","UserLogo","handleUserAvatar","DashboardInfoModal","mainClassName","showNeedHelp","headerClassName","logoLink","hideProfile","alwaysShowLogo","customHeader","async","RewardsPopUpWrapper","ProfileLayout","leftMenu","prevMenu","rightMenu","toggleHeaderLogo","isInitialDataFetched","base","defaultHeaders","NEXT_PUBLIC_SERVER_API_KEY","client","axios","interceptors","request","useUserStore","accessToken","getState","Authorization","errorData","newbase","Header","logo","loginButton","updateUserInfo","userName","openSendModal","setOpenSendModal","openCodeInput","setOpenCodeInput","openMenu","setOpenMenu","mutateSendCode","errorCode","post","mutateResendCode","errorResendCode","resetResendCode","mutateVerifyCode","errorVerifyCode","resetVerifyCode","mutateVerifyCodeSignIn","errorSignin","setType","isFakeLoading","setIsFakeLoading","onPhoneSubmit","onEmailSubmit","partnerName","lenderName","currentRoute","isOnboarded","old","SignLayout","backgroundStyle","paddingY","sm","lg","TourProvider","fullscreen","loadingClassName","createPortal","RightPanel","starredThreads","archivedThreads","handleChatItemClick","handleToggleStar","handleToggleArchive","toggleStarred","setToggleStarred","fetchStarredLoading","fetchArchivedLoading","setUserId","setAdminMsgID","selectedAdminUserId","setSelectedAdminUserId","StarIcon","ArchiveIcon","PersonOutlineIcon","xl","translate","bgcolor","StarOutlineIcon","subtitle","ArchiveOutlinedIcon","StartConversation","ForumOutlinedIcon","mb","BorderRight500","MessageArea","scrollbarWidth","createTextMessage","userSenderName","userReceiverName","MessagesDashboard","threads","filteredThreads","setFilteredThreads","setThreads","setMessages","selectedAdminUser","setSelectedAdminUser","isArchived","setInputValue","socket","setSocket","adminMsgID","adminUserName","setAdminUserName","setArchivedThreads","toggleArchived","setToggleArchived","selectedUser","setSelectedUser","isMessagesLoading","setIsMessagesLoading","showThreadSidebar","setShowThreadSidebar","showExclusiveChats","setShowExclusiveChats","isStarred","setIsStarred","setIsArchived","setFetchStarredLoading","setFetchArchivedLoading","archivedThreadsList","setArchivedThreadsList","starredThreadsList","setStarredThreadsList","mostLatestMsg","setMostLatestMsg","isPinned","fetchThreads","fetchMessages","thread","isChatArchived","handleChatPining","res","handleArchiveChat","handleChatStar","prevThreads","isStarredByClient","toggleStarMessage","toggleArchiveMessage","sendingDate","prevMessages","messageText","newThreads","selectedThread","selectedIndex","adminId","latestMessage","messageEndRef","scrollIntoView","block","createThread","unread","statusColor","lastMessageTime","adminName","time","sortedData","formatLastMessageTime","dateInput","weekday","formatMessageTime","toLocaleTimeString","hour","minute","hour12","formattedMessages","messageMarkAsRead","handleSendMessage","emit","reciverId","username","senderId","unArchivedThreads","PushPinOutlinedIcon","isChatStarred","isUserMessage","wordBreak","overflowWrap","handleKeyPress","SendOutlinedIcon","onCloseProp","onBackButton","rightSideButton","modelShow","alwaysShowCloseButton","alwaysShowBackButton","titleClassName","showFeedbackButton","canSkip","onSkip","Element","isOnSettings","actionForm","CleanModal","Forwards","Backwards","HTMLElement","None","InitialFocus","TabLock","FocusLock","RestoreFocus","All","ge","initialFocus","isConnected","First","previousActiveElement","defaultView","skipElements","Last","Focusable","requestAnimationFrame","dataset","headlessuiFocusGuard","Next","Previous","WrapAround","relativeTo","readyState","capture","force","pe","isServer","Node","childNodes","Add","Remove","onUpdate","is","useDebugValue","useSyncExternalStore","getSnapshot","subscribe","dispatch","PUSH","count","POP","SCROLL_PREVENT","pageYOffset","after","flatMap","scrollTo","before","SCROLL_ALLOW","dispose","TEARDOWN","inert","_e","Open","Closed","Ie","SetTitleId","Me","ce","Be","He","RenderStrategy","Static","_t","Ve","qe","Ne","__demoMode","ye","Oe","Pe","Le","me","descriptionId","panelRef","De","be","Re","unregister","portals","resolveContainers","mainTreeNodeRef","MainTreeNode","oe","xe","defaultContainers","Closing","ne","le","ae","ie","se","Se","Fe","Ee","Escape","we","de","ue","fe","ve","dialogState","close","setTitleId","Te","he","leaf","ze","$e","Ye","Panel","Qe","Xe","Je","Overlay","Ze","We","Ae","Ue","Ke","je","Ce","dialog","modalRoot","setModalRoot","dialogClassName","isTransitioning","setIsTransitioning","modalContent","Child","enterFrom","enterTo","ModalPortal","cachedSupportsTouchActionNone","areArraysEqual","array2","itemComparer","array1","asc","findClosest","closestIndex","distance","trackFinger","touchId","changedTouches","touchEvent","identifier","setValueIndex","focusThumb","sliderRef","activeIndex","setActive","areValuesEqual","oldValue","axisProps","percent","leap","Identity","doesSupportTouchActionNone","CSS","supports","Slot","shouldSpreadAdditionalProps","getSliderUtilityClass","sliderClasses","useValueLabelClasses","utilityClasses","valueLabelOpen","valueLabelCircle","valueLabelLabel","SliderRoot","marked","track","trackInverted","trackFalse","touchAction","dragging","thumb","rail","SliderThumb","SliderValueLabel","BaseSliderValueLabel","valueLabel","markActive","mark","markLabel","markLabelActive","Forward","ariaValuetext","disableSwap","getAriaLabel","getAriaValueText","marks","marksProp","onChangeCommitted","shiftStep","scale","valueLabelDisplay","valueLabelFormat","getHiddenInputProps","getThumbProps","axis","focusedThumbIndex","range","trackOffset","trackLeap","getThumbStyle","useSlider","setOpen","setDragging","moveCount","valueDerived","thumbIndex","clamp","floor","marksValues","setFocusedThumbIndex","createHandleHiddenInputFocus","createHandleHiddenInputBlur","changeValue","valueInput","marksIndex","maxMarksValue","Infinity","previousValue","createHandleHiddenInputKeyDown","blur","createHandleHiddenInputChange","valueAsNumber","previousIndex","getFingerNewValue","finger","move","slider","percentToValue","nearest","roundValueToStep","getDecimalPrecision","num","parts","toExponential","matissaDecimalPart","decimalPart","buttons","INTENTIONAL_DRAG_COUNT_THRESHOLD","stopListening","createHandleMouseDown","valueToPercent","createHandleMouseOver","createHandleMouseLeave","externalProps","externalHandlers","ownEventHandlers","mergedEventHandlers","visuallyHidden","RailSlot","Rail","SliderRail","TrackSlot","Track","SliderTrack","ThumbSlot","Thumb","ValueLabelSlot","ValueLabel","MarkSlot","Mark","SliderMark","MarkLabelSlot","MarkLabel","SliderMarkLabel","railSlotProps","trackSlotProps","thumbSlotProps","valueLabelSlotProps","markSlotProps","markLabelSlotProps","inputSlotProps","railProps","trackProps","thumbProps","valueLabelProps","markProps","markLabelProps","inputSliderProps","ValueLabelComponent","getMarkValue","greenLight","yellow","Grade","gradeInfo","valueFromProps","pointRangeMin","nextGrade","grade","minRangeLabel","maxRangeLabel","fullProgress","reverse","isUnavailable","grayBar","usePills","hasMaxValue","isGradeActive","gradeConfig","arr","useRefetchRewards","queryClient","rewardsIds","mutationFn","markPoppedRewards","mutationKey","queryFn","getNotPoppedRewards","queryKey","refetchOnReconnect","SettingsDesktopLayout","useSuccessModal","isModal","EUserFeedbackReason","bug","comment","question","setSettingsModalOpen","useSettingsModal","HelpOutlineIcon","DeleteAccountModal","deleteAccountMutation","cookie","toUTCString","sessionStorage","caches","reload","registerPlugin","FilePondPluginImagePreview","FilePondPluginFileEncode","FilePondPluginFileValidateSize","FilePondPluginFileValidateType","AvatarUpload","onFileUpload","setLoading","onFileRemoved","filePondRef","handleFileProcess","file","serverId","FilePond","maxFileSize","imagePreviewMaxHeight","imagePreviewMinHeight","stylePanelLayout","styleLoadIndicatorPosition","styleButtonRemoveItemPosition","styleButtonProcessItemPosition","styleProgressIndicatorPosition","allowMultiple","server","onaddfile","onprocessfile","onremovefile","labelIdle","acceptedFileTypes","setURL","onUpload","onSave","trigger","Address","isPlacePredictionsLoading","usePlacesService","selectedPlace","setSelectedPlace","showmodal","setModal","selectedPrediction","savePlaceDetailsToState","placeDetails","handleManualChange","CoBorrowerInviteDisplay","canResend","invite","handleCopyLink","coBorrowerInvited","EmailSettingsOptions","SmsSettingsOptions","SettingsContent","showDeleteAccount","setShowDeleteAccount","UploadImage","EMonthlyRent","one_to_one_thousand","one_thousand_and_one_to_two_thousand","two_thousand_and_one_to_three_thousand","three_thousand_and_one_to_four_thousand","above_four_thousand","na","reasonOptions","reasonForPurchase","currentValues","newValues","MuiButton","copyDirtyFields","dirtyFields","currentSettingsModal","account","occupation","gender","race","hispanicOrigin","childrenUnder18Count","militaryStatus","locationsSearch","dateOfBirth","allowedEmails","allowedSms","houseRent","updateProfileMutation","formId","SettingsSave","tabs","activeTab","setActiveTab","tab","SettingsProfileForm","handleTabChange","newTab","app","initializeApp","firebaseConfig","authDomain","projectId","appId","getApp","firebaseApp","GoogleIcon","googleIcon","AppleIcon","appleIcon","actionLabelProp","buttonStyle","setProvider","signUpPhone","setSignUpPhone","onMutationSuccess","hasRedirect","redirect","isValidUrl","authType","remappedUserType","gtag","user_id","ln","v_id","source","TrackingSourceType","UNKNOWN","LANDING_PAGE_1","LANDING_PAGE_2","MORTGAGE_CALCULATOR","HOME_NURTURE","TrackingService","trackSignupButtonClick","trackingMetadata","visitorId","TrackingAuthType","GOOGLE","APPLE","trackSignupCompleted","startSSOMutation","providerData","getAuth","GoogleAuthProvider","setCustomParameters","prompt","signInWithPopup","OAuthProvider","addScope","currentUser","getIdToken","names","actionLabel","i18n","initReactI18next","resources","translation","enTranslations","es","esTranslations","lng","Cookies","keySeparator","interpolation","escapeValue","LanguageContext","LanguageProvider","changeLanguage","expires","sameSite","defaultRouteMap","RouteContext","RouteProvider","routeMap","SidebarContext","SidebarProvider","isSectionSelected","TourContext","startTour","isTourActive","isWelcomeFlashCardsShown","setIsTourActive","intro","introJs","setOptions","steps","nextlabel","prevLabel","exitOnOverlayClick","overlayOpacity","keyboardNavigation","disableInteraction","doneLabel","tooltipClass","showStepNumbers","onbeforechange","targetElement","scrollBy","onexit","initialState","toggle","listener","useSyncStore","isOpenSyncModal","setIsOpenSyncModal","setSyncStatus","syncStatus","fetchMoneyDataOnMount","incomeQuery","useIncomeQuery","debtsQuery","useDebtsQuery","savingsQuery","useSavingsQuery","onSettled","useCompleteModal","devtools","currentModal","setCurrentStep","setValues","birthMonth","birthDay","birthYear","ssn","allowedSMS","updateUserData","fromEntries","initialUserData","isPhoneVerified","store","partialize","restState","userInfo","resetCompleteForm","isSuccess","isSuccessUserInfo","isRefetching","isRefetchingUserInfo","isInitialRoute","areOnboardingRoutes","approvalStatus","EApprovalStatus","approved","authored","useBuyerCreditScoreStore","creditScore","expiresAt","lastUpdatedAt","setBuyerCreditScore","setDate","getDate","getBuyerCreditScore","clearBuyerCreditScore","useBuyerCreditScore","ignoreCache","cachedCreditScore","CREDIT_RESPONSE","CREDIT_SCORE","score","setBuyerResetPasswordInfo","useBuyerResetPassword","creditScoreQuery","scoreUpdatedAt","debtToIncomeProps","grades","debtToIncome","pointRangeMax","grossIncomeProps","grossIncome","toUSD","creditScoreProps","downpaymentProps","downpaymentPercentageSaved","fetchOnMount","incomesQuery","setIsMounted","onboardingProfileStatus","skipMutation","refreshBuyerOnboardingStatus","skip","GA_TRACKING_ID","page_path","event_category","event_label","pageView","addUserId","setUserProperties","companyName","enLocales","otp_verified","IntlProvider","ThemeProviderNoVars","themeInput","scopedTheme","SystemThemeProvider","defaultConfig","colorSchemeStorageKey","defaultLightColorScheme","defaultDarkColorScheme","modeStorageKey","CssVarsProvider","InternalCssVarsProvider","useColorScheme","getInitColorSchemeScript","deprecatedGetInitColorSchemeScript","createCssVarsProvider","resolveTheme","newTheme","ThemeProvider","xxl","App","pageProps","QueryClient","getLayout","classList","handleRouteChange","DASHBOARD","trackPageVisit","events","off","isDevSubdomain","hostname","QueryClientProvider","Hydrate","dehydratedState","LocaleProvider","AppWrapper","Toaster","ReactQueryDevtools","RequestBuilder","contentType","append","setHeader","newHeader","setData","qs","build","baseURL","apiRequestClient","additionalConfig","getSocialLoginProviderEmailUsingAccessToken","startSocialLoginAuthenticationByEmail","startAuthenticationByEmailAndPassword","startResetPasswordAuthenticationByEmail","resetPasswordOTPVerification","resetPasswordUpdation","createVerificationCode","verifyPhoneCode","signUpVerifyPartnerCode","signIn","signUpVerifyCode","savePartialSignUpForm","getVerificationCode","resendCode","getRecommendationPush","startSSOLogin","signUpBuyer","validateBuyerAccessCode","updateBuyer","updateUserJourney","updateOnboardingPath","calculateScore","deleteBuyer","syncVerifiedData","buyerPartialValidate","blockBuyer","checkBlocked","getBuyerCreditReportUserId","getBuyerCreditReportUserToken","createBuyerCreditReportUser","updateBuyerCreditReportUserToken","retrieveBuyerCreditReport","disconnectBuyerCreditReportUser","getBuyerCreditReportAlerts","markAlertsAsSeen","alertId","listBuyerDebts","createBuyerDebt","updateBuyerDebt","deleteBuyerDebt","listBuyerIncomes","createBuyerIncome","updateBuyerIncome","deleteBuyerIncome","createBuyerIncomesLinkToken","exchangeBuyerIncomesPublicToken","getBuyerIncomeItems","createBuyerTransactionsLinkToken","exchangeBuyerTransactionsPublicToken","getBuyerTransactionsItems","deleteBuyerPlaidItem","itemId","getBuyerPlaidTransactions","ExpenseByCategory","getBuyerPlaidExpenses","getBuyerPlaidCashflow","getIncomeExpensesRange","monthDateStart","monthDateEnd","listBuyerSavings","createBuyerSaving","updateBuyerSaving","deleteBuyerSaving","getBuyerRecommendations","updateBuyerRecommendations","updateBuyerRecommendationState","codedRecommendationId","getProfile","getGoogleProfile","sendReferralLink","sendFeedback","searchSkills","searchIndustries","financialLiteracyAllCourses","financialliteracyUserCourseUpdate","financialLiteracyMarkSectionComplete","inviteCoBorrower","validateInvite","disassociateCoBorrower","listThreads","listMessages","adminUserId","createMessage","getExclusiveUsersWithUserMessages","conversationType","filters","unassociated","limit","trackEvent","getIpFilterConfig","getRewardStats","getRewards","urlParams","EOnboardingPathTaken","EBuyerIncomeCategory","EBuyerSavingsCategory","EBuyerIncomeFrequency","EBuyerDebtCategory","EBuyerRecommendationCategory","EBuyerRecommendationState","sendToGA","eventName","recentEvents","pageVisitCache","createEventKey","eventType","additionalData","previousCreditScore","ipAddress","isDuplicateEvent","PAGE_VISIT_DEBOUNCE_TIME","CREDIT_SCORE_DEBOUNCE_TIME","DEBOUNCE_TIME","pendingEvents","eventKey","profileResponse","campaignSource","campaignMonth","campaignFrequency","isLanded","profileError","auth_type","ab_test_variant","abTestVariant","credit_score_bucket","creditScoreBucket","apiData","innerError","timestamp","trackFormStepCompleted","trackCreditScoreCalculated","improvement","trackCreditScoreImproved","previousGrade","nyuAlumniFeature","housingWire","forbes","nextAdvisor","newYorkUniversity","refinery","transUnionCreditDispute","experianCreditDispute","equifaxCreditDispute","quickSetup","goodwilltemplate","giftingTemplate","thankyou","partner","plainText","encKey","CryptoJS","encrypt","codes","getCountries","localeCompare","canadaValue","phones","hexToRGB","hex","err","charAt","dismiss","Intl","NumberFormat","currency","currencyDisplay","maximumFractionDigits","usd","moneyToMonthly","frequency","calculatedAmountBasedOnFrequency","Backspace","Delete","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","Home","End","PageUp","PageDown","Tab","cloneNode","Single","Multi","Pointer","Other","OpenListbox","CloseListbox","GoToOption","Search","ClearSearch","RegisterOption","UnregisterOption","RegisterLabel","activeOptionIndex","dataRef","domRef","listboxState","isSelected","resolveItems","resolveActiveIndex","resolveId","resolveDisabled","searchQuery","activationTrigger","textValue","Nt","tt","ot","by","ke","static","hold","compare","optionsPropsRef","labelRef","optionsRef","Loose","Specific","registerOption","registerLabel","goToOption","closeListbox","openListbox","selectActiveOption","selectOption","clearSearch","nt","nextFrame","it","rt","et","Nothing","wasMoved","onPointerEnter","onPointerMove","onPointerLeave","Visible","Unmount","microTask","idle","chains","wait","shift","onStart","onStop","unmount","initial","beforeEnter","beforeLeave","afterEnter","afterLeave","flags","addFlag","hasFlag","removeFlag","toggleFlag","Opening","called","parseFloat","group","nextId","getRootNode","composed","composedPath","HTMLIFrameElement","HTMLButtonElement","isHandoffComplete","handoff","Symbol","screenX","screenY","clip","HTMLFieldSetElement","HTMLLegendElement","getPropertyValue","handoffState","currentId","detect","isClient","NoScroll","Overflow","Success","Underflow","Strict","matches","Keyboard","Mouse","compareDocumentPosition","DOCUMENT_POSITION_FOLLOWING","DOCUMENT_POSITION_PRECEDING","sorted","sign","MAX_SAFE_INTEGER","headlessuiFocusVisible","detail","queueMicrotask","platform","maxTouchPoints","refName","arguments"],"sourceRoot":""}