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A,gCACA,GACA,YAEA,CACA,WACA,cACA,CACA,CAAG,QACH,IACA,EAKA,cACA,QAKA,OAJA,GAEA,GADA,yBACA,EAEA,CACA,CA6BA,OACA,SACA,SACA,OACA,QACA,MACA,QACA,IACA,GACA,EAsEA,aASA,OAAW,EARX,SACA,qCACA,sBAMW,EAJX,SACA,sCACA,sBAEW,CACX,CAaA,aACA,IAEA,SACA,IAYA,aADA,EACA,SACA,iBACA,aACA,sBAEA,aACA,sBAEA,aACA,sBAEA,WACA,sBAEA,CAfA,MAeA,CAEA,UCvPA,OACA,kBACA,WACA,OACA,MACA,iBACA,aACA,qBACA,YACA,CAAG,EACH,yBAAiB,6BAAqC,KACtD,QACA,SACA,eACA,cACA,gBACA,EAAG,CACH,aAAe,uBAAqB,KACpC,IACA,IACA,QACA,SACA,aACA,IACA,EAAG,CACH,uBAAe,0BAAmC,KAClD,IACA,IACA,QACA,SACA,oBACA,aAAkB,EAAO,GACzB,CAAG,CACH,wBAAgB,0BAAmC,KACnD,IACA,IACA,QACA,SACA,oBACA,qBACA,iBAAsB,EAAO,GAC7B,CAAG,CACH,oBAAsB,uBAAqB,KAC3C,IACA,IACA,QACA,SACA,qBACA,mBACA,cACA,EAAG,EA6HH,EAjHA,EACA,aACA,mBACA,UACA,qBACA,WAAa,CACb,QACA,YACA,2BACA,SACA,SACC,QDwGD,QCvGA,qBACA,iBACA,GAvBA,OACA,cACA,OACA,iBACA,EAoBA,UAA2B,EAAU,GACrC,KADqC,EACrC,GAA+B,EAAU,GACzC,GAAU,EAD+B,EAC/B,GAAO,IACjB,EDkGA,CADA,EClG4B,CACR,EAAJ,IAAI,uBDkGpB,MCjGA,EDiGA,CADA,EChGqB,IAAJ,GAAI,wBDiGrB,MChGA,EDgGA,CADA,EC/FkB,CAAJ,IAAI,uBDgGlB,MC/FA,ED+FA,CADA,EC9FmB,EAAJ,IAAI,uBD+FnB,MC9FA,QACA,QACA,gBACA,IACA,IACA,QACA,QACA,CAAG,EACH,uBACA,IACA,IACA,QACA,QACA,CAAG,EACH,OAAyB,eAAmB,CAC5C,MACA,CACA,wBAAwC,EACxC,UACA,WACA,CAAK,CACe,eAAmB,CACvC,MACA,CACA,QACA,SACA,mCACA,sBACA,cACA,eACA,MACA,KACA,CAAS,CACT,CAAO,CACe,eAAmB,aAA+B,eAAmB,SAAW,KAAY,CAAkB,eAAmB,CACvJ,OACA,CACA,IACA,IACA,QACA,SACA,YACA,GACyB,eAAmB,CAC5C,OACA,CACA,QACA,gBACA,IAC0B,eAAmB,aAAe,KAAY,CAAkB,eAAmB,CAC7G,UACA,CACA,iBAA4B,EAAa,IAAI,GAAM,EAAE,EAAa,IAAI,GAAM,EAAE,EAAI,IAAI,KAAc,EAAE,EAAI,IAAI,KAAc,EAAE,IAAa,IAAI,GAAM,EAAE,IAAa,IAAI,GAAM,EAAE,EAAa,IAAI,GAAa,EAAE,EAAa,IAAI,GAAa,OAGxN,eAAmB,CACzC,OACA,CACA,oBACA,cACA,eACA,QACA,CAAW,CACX,GAEsB,eAAmB,CACzC,OACA,CACA,qBACA,cACA,eACA,MACA,OACA,QACA,SACA,QACA,CAAW,CACX,GAEsB,eAAmB,CACzC,OACA,CACA,QACA,YACA,UACA,gBACA,IAIA,EAEA,cACA,mDACA,CCtLA,4BACA,0BACA,mCACA,+BACA,kCACA,wCACA,yBAA8E,kDAA6D,SAC3I,UACA,sBAA+B,CAC/B,aACA,YACA,KACA,kBACA,aACA,YAEA,QACA,EACA,mBACA,UACA,SACA,eACA,6BACA,YACA,cACA,kBACA,6BACA,YAEA,QACA,EAcI,EAAa,CACjB,cACA,CAFiB,QAEjB,QACA,aACA,uBACA,oBACA,2CACA,gBACA,WACA,4BACA,MACA,MACA,EAAG,EAyJH,EA9IA,IACA,IACA,WACA,oBACA,aACA,WAAe,CACf,QACA,YACA,CAPA,EAOI,IAPJ,EAOI,CACJ,WACA,WACA,UACA,SACA,QACA,YACA,EACA,MAAoB,YAAM,OAC1B,EAAsB,YAAM,KAC5B,EAA2B,YAAM,KACjC,EAA6B,YAAM,KACnC,CAAU,SAAoC,IAE9C,EFAA,GEFuD,IAE3B,EFA5B,KACA,SAAsC,cAAS,IAC/C,EAAuB,iBAAW,MAClC,4BAEA,8BACA,CAAG,6BAMH,MALE,eAAU,MACZ,IACA,oCACA,4CACG,8BACH,CACA,EEb4B,KAC5B,CAAU,kBAA2C,EACrD,wBACA,uBACA,yBACA,0BACA,4BACA,CACA,QACA,SACA,cACA,eACA,MACA,OACA,QACA,SACA,MACA,MACK,CACL,GACA,EACA,GACA,OACA,UACA,MACA,UACA,EACA,UAA2B,EAAU,GACrC,YACA,UACA,UACA,gBACA,aACA,qBACA,cACA,sBACA,YACA,iBACA,SACA,QACA,CACA,EACA,YACA,MF6FA,cE7FyC,CF6FzC,EACA,gDACA,6BACA,EACA,WACA,WACA,GACG,0GACH,EEpGA,EACA,0CAEA,YAAoB,WAA2B,IAC/C,eAEA,OADA,eACA,QAIA,OADA,mBACA,UAiDA,EA/CA,KACA,qBACA,MAAqB,EAAU,QAC/B,EAAqB,EAAU,eAC/B,mBACA,CACA,eACA,eACA,CAEA,MAA6B,EAAU,OACvC,CADuC,CACV,EAC7B,IACA,GAEA,CAJuC,CAIvC,gCACA,+CACA,GACA,WACA,mBAEA,gBAKA,EACA,iBAEA,kBAEA,OACA,gBACA,gBACA,iBACA,iBACA,QACA,QACA,QACA,QAEA,gCACA,YACA,MAEA,QACA,GACA,GACA,OAAyB,eAAmB,CAC5C,MACA,GACA,8BACA,YAA4C,GA1I5C,OACA,MAAiB,CAAa,OAC9B,EA2BiC,CA3BjC,IACA,iBACA,GAsI4C,WAC5C,mBACA,wBACA,yBACA,CAAO,IACP,uBAAgC,iBAAiB,MAAM,iBAAiB,KACjE,EACP,KACA,CAAK,IACL,EAEA,EChNI,EAAS,sBACT,EAAU,wBACV,EAAiB,iCACjB,EAAmB,6BACnB,EAAY,gCACZ,EAAY,sCACZ,GAAe,gBAAqC,EAAS,KAAa,KAAb,MAAa,uCAA6D,SACvI,GAAc,QAClB,MADkB,EAClB,cAA+B,CACvB,EAAY,WACd,EADc,CACC,UACrB,GAAM,EADe,IAErB,SAAqB,EAAmB,GAC9B,EAAY,WACd,EADc,CACC,CAFiB,CAEjB,QAEvB,KAFuB,EAEvB,CACA,EACI,GAAa,OAAa,EAAU,EAAI,EAAiB,IACzD,GAAS,QACb,CADa,EADgD,CAE7D,KACA,eACQ,EAAY,2BACpB,YACA,YAAwB,EACxB,aAAqB,EAAmB,GACxC,EAF2C,EAE3C,YAAuC,CADC,CACW,WACnD,EADmD,CACnD,SAEA,QACA,EAWI,GAAY,CAChB,SACA,IAFgB,GAEhB,EACA,OACA,QACA,MACA,QACA,cACA,eACA,IACA,GACA,EA8DA,yBACA,SACA,CAAU,SAAkC,IAC5C,KADuD,CAEvD,OAAW,GAAc,GAAc,EAAG,CAAE,EAAO,KACnD,IADuC,QACvC,EACA,eACA,qBACA,CAAK,EAEL,MAAc,EAAO,GACrB,EADqB,CAErB,SACA,SACA,OACA,QACA,MACA,OACA,EACA,gBACA,gCACA,+DACA,SAEA,MAAiB,EAAO,GACxB,EADwB,CACxB,EACA,OACA,aACA,cAEA,iBACA,kBAEA,mBACA,oBAEA,eACA,gBAEA,uBACA,0BAEA,aACA,cAEA,iBACA,kBAEA,mBACA,oBAEA,eACA,gBAEA,uBACA,wBAEA,CACA,uCACA,OACA,kBACA,gBACA,oBACA,sBACA,oBACA,sBACA,cACA,eACA,qBACA,MACA,MAEA,CAqEA,OAjEA,EACA,4BACA,iBACA,cACA,YACA,cACA,UACA,MACA,aACA,kBACC,IACD,kBAKA,MAMA,aACA,oBACA,CACA,aACA,kBACA,CAfA,oBACA,aAIA,IACA,oBACA,sBACA,sBAQA,wBACA,OACA,gBACA,kBACA,gBACA,CAAO,GAEP,oBACA,mBACA,OAEA,oBACA,mBACA,EACA,IAEA,KAGA,oBACA,mBACA,EACA,IAEA,MAIA,CAOA,MANE,eAAU,MACZ,wCACA,KACA,uCACA,GACG,SACH,IACA,EAUI,GAAa,CACjB,YACA,OAFiB,EAEjB,WACA,uBACA,4CACA,iBACA,aACA,uBACA,wBACA,eACA,uBACA,cACA,mBACA,8CACA,gBACA,gBACA,EAAG,CACH,eACA,eACA,aACA,oBACA,8BACA,EAAG,CACH,iBACA,mBACA,eACA,+BACA,oBACA,eACA,EAAG,CACH,kBAAa,EAAU,KACvB,gBACA,UACA,SACA,kBACA,gCACA,EAAG,CACH,iBAAY,EAAU,KACtB,4BACA,SACA,UACA,eAIA,EAAG,CACH,cAAU,0BAA+B,KACzC,uBACA,QACA,SACA,iCACA,oBACA,UACA,gBACA,SACA,0CACA,iCACA,mBAAwB,SAAmB,GAC3C,oDACA,qDAkBA,EAAG,CACH,iBAAY,EAAU,KACtB,oBACA,OACA,SACA,QACA,SACA,uCACA,4CACA,EAAG,CACH,UACA,eACA,EAAG,EAEH,SAAS,GAAa,GACtB,cACA,GAFsB,CAEtB,EAAiB,EAAa,OAC9B,OACA,iBACA,CACA,CAoKA,SACA,WAAa,CACb,cACA,WACC,IACD,MAAoB,GAAa,GACjC,OAAyB,UADQ,KACY,CAC7C,MACA,CACA,wBACA,0BAAkC,aAAoB,CACtD,CAAK,CACe,eAAoB,CACxC,OACA,CACA,2EACA,YACA,sBACA,gBACA,sBACA,qBACA,GAGA,EAGA,IACA,MA7LA,EACA,WAAa,CACb,WACC,IACD,MAAoB,GAAa,GACjC,OAAyB,UADQ,KACY,SAAW,kBAA4B,EAAG,GACvF,EAwLA,MAnLA,IACA,IACA,WAAe,CACf,UACA,WACA,CAAI,IAAc,GAJlB,EAI2B,CAC3B,MAD2B,GAE3B,UACA,WACA,EACA,MAAoB,GAAa,GACjC,OAAyB,UADQ,KACY,CAC7C,SACI,GAAc,CAClB,aADkB,sBAElB,MAAa,GAAe,GAAc,EAAG,SAAlB,GAAe,CAAG,CAAwB,cAAyB,WAAU,GACxG,SACA,CAAK,IACe,eAAoB,CACxC,MACA,CACA,sBACA,iBACA,oBACA,MAAe,GAAc,EAAG,WAAqB,CAAxB,CAC7B,CAAO,CACe,eAAoB,CAC1C,OACA,CACA,oBACA,0NACA,IAIA,EAiJA,QA7IA,EACA,UACA,iBACA,aACA,yBACA,cACA,YACC,GACD,wBACA,iBACA,aACA,yBACA,cACA,WACA,CAAG,IAgIH,WA1HA,EACA,WAAa,CACb,QACA,iBACA,cACA,YACA,aACA,aACA,cACA,WACA,cACA,aACA,MACA,WACC,IACD,eACA,EAAoB,GAAa,GACjC,IACA,UACA,GAHiC,EAGjC,SACA,WACA,YACG,GAcwB,eAAoB,CAC/C,SACA,CACA,kBACA,OACA,sCACA,CAAS,EACT,QApBA,WACA,IACA,wBACA,IAEA,WACA,qBAEA,mBAIA,EASA,sBAA+B,GAAM,MAC9B,CACP,EAOA,KAPmC,eAAoB,CACvD,EACA,CACA,SACA,iCACA,sCACA,GAEA,GAGA,OAAyB,eAAoB,QAAU,qBAA+B,oBAA6B,GAO/C,KAP+C,2BACnH,SACA,iBACA,cACA,cACA,YACA,OACA,CAAG,EAAoB,eAAoB,IAAW,YAAc,IAiBjE,KAjBuG,eAAoB,QAAU,uBAAiC,EAAG,aAAe,SAAqB,mBAChN,MACA,OAA2B,eAAoB,CAC/C,SACA,CACA,eACA,cACA,aACA,CAAS,EACT,aACA,MACA,IACA,CAAS,CACT,sBAA+B,EAAM,EACrC,sEAAmG,IAAU,GAG7G,CAAG,KAOwC,KAPxC,2BACH,SACA,iBACA,cACA,cACA,YACA,OACA,CAAG,EAAoB,eAAoB,SAC3C,EAkCA,QACA,EACA,MAAmC,GAAe,GAAc,EAAG,QA2FnE,CA3FiD,EAGjD,EACA,SACA,eAA8B,CAC9B,eACA,uBACA,kBACA,eACA,QACA,iBACA,cACA,aACA,yBACA,YACA,aACA,aACA,wBACA,MACA,yBACA,qBACA,oBACA,eACA,cACA,OACA,UACA,WACC,IACD,WACA,CAAU,gDAAkF,MAC5F,6BACA,cACA,oBACA,YACA,CAAG,MAkBH,OAAyB,eAAoB,CAAC,UAAe,QAAoC,eAAoB,WAAW,EAAQ,WAAmD,eAAoB,CAC/M,EACA,CACA,SACA,mDACA,WACA,QAvBA,WACA,IACA,wBACA,GACA,iBACA,YACA,cACA,QACA,OACA,UACA,UACA,CAAS,EAET,MAGA,CAQA,GACA,KAA4B,eAAoB,CAChD,EACA,CACA,iCACA,iBACA,cACA,aACA,yBACA,WACA,GACA,EAAsC,eAAoB,CAC1D,EACA,CACA,iBACA,cACA,YACA,QACA,SACA,8DACA,aACA,aACA,cACA,eACA,YACA,aACA,MACA,OACA,GACA,KACA,EAmOA,GA/NA,IACA,IAyEA,EAzEA,CACA,cACA,iBACA,YACA,WACA,WACA,WAA6B,CAC7B,eACA,YACA,cACA,aACA,WACA,cACA,qBACA,kBACA,gCACA,iCACA,2BACA,SACA,SACA,qBACA,4BACA,kBACA,kBACA,qBACA,2BACA,MACA,wBACA,kCACA,8BACA,CAAK,CACL,mBACA,UACA,OACA,UACA,mBACA,QACA,CACA,CAAI,IAAqB,GAtCzB,EAsCkC,CAClC,MADkC,QAElC,iBACA,YACA,QACA,WACA,SACA,eACA,YACA,cACA,UACA,WACA,cACA,qBACA,kBACA,YACA,gBACA,2BACA,SACA,SACA,qBAEA,4BACA,kBACA,kBACA,qBACA,2BACA,MACA,uBACA,mBACA,UACA,OACA,UACA,eACA,EAEA,WACA,EAAiB,GAAe,GAAc,EAAG,SAAlB,CAAkB,EAAH,KAAG,YACjD,CACA,QACA,aACA,sBACA,yBACA,SACA,CAAI,SA3qBJ,KACA,eACA,kBACA,iBACA,CAAC,EACD,SAAsC,cAAQ,KAC9C,MAAoC,cAAQ,KAC5C,MAA8D,cAAQ,KACtE,MAAoC,cAAQ,OAC5C,MAAsC,cAAQ,CAAC,IAC/C,aAD2D,GAC3D,4GACA,EAAuB,iBAAW,MAClC,SACA,EACA,sCACA,6BACA,oBAAS,GAAqB,IAAsB,GAAS,0BAC7D,uBACA,oBAEA,IAEA,CAAG,8CACD,eAAS,MACX,IACA,oCACA,4CACG,6CACD,eAAS,MAIX,CH0HA,MG7H2B,GH6H3B,CACA,MACA,QACA,SACA,OACA,YACC,EACD,IAAU,SAAkC,IAC5C,YAAU,gBA9BV,iBA8BmC,GA9BnC,OA8BmC,EA7BnC,CACA,kBACA,WA2BmC,EA3BnC,IACA,EAEA,CACA,WAuBmC,GAvBnC,EACA,WAsBmC,GAtBnC,CACA,EAsBA,iDACA,EGvI4B,GAAc,GAAc,EAAG,KAC3D,GADyC,IAAe,GACxD,kBACK,IACL,IACA,MACM,IH2CN,YACA,2BACA,iDAEA,QACA,OACA,iBAA0C,kBAAoB,CGjD5C,KHkDlB,kBACA,sBACA,aACA,YGrDkB,EHqDlB,OGrDkB,EHqDlB,4BACA,SACA,UACA,cACA,MAEA,IACA,IAEA,wBACA,EACA,CAAG,EGhEe,UAClB,GACA,aACA,CAAO,eACP,KACA,CAAO,EAEP,CAAG,MACH,MAA8B,iBAAW,MACzC,MACA,SACA,EACA,sCACA,6BACA,CAAS,sBAAqB,IAAkB,GAAS,0BACzD,KACA,KACA,KACA,CAAG,8CACH,OACA,QACA,aACA,SACA,sBACA,wBACA,CACA,EA+mBI,GACJ,eACA,2BACA,iBACA,CAAG,EACD,eAAU,MACZ,yBACA,KAEA,KACA,yBACA,IAEA,GACG,IACH,gBAAU,qCAA8C,SA8H/C,CAAU,KA9HiD,GA+HpE,MADmB,IACnB,mBACA,CACA,mBACA,yBACA,0BAGA,CACA,cACA,iBACA,gBACA,CACA,EA1IA,wCAEA,GACA,iBACA,YACA,cACA,WACA,QACA,UACA,MACA,EAUA,4HACE,eAAU,MACZ,wEACA,uBAEA,4CACA,mCAEA,KACA,kFACA,2BAEA,GACG,KACH,kEACA,KAA0C,UAAe,CACzD,SAAgC,eAAoB,QAAoC,eAAoB,CACxG,EACJ,CACA,gBAFe,IAEf,qCACA,qDACA,SACA,GACqB,eAAoB,CACzC,GACA,CACA,iBACA,cACA,YACA,qBACA,4BACA,UACA,MACA,aACA,iBACA,GACA,SAA8D,eAAoB,CAC9E,EACJ,CACA,SAFQ,EAER,EACA,QAjDA,WACA,IACA,wBACA,KAEA,MAGA,EA0CA,OAAc,GAAc,CAC5B,aAD4B,GAC5B,GAAmC,GAAc,GAAc,EAAG,KAClE,GADgD,IAAe,CAC/D,gBACA,CAAS,CACT,CAAO,IACP,cACA,2BACA,YACA,uBACA,mBACA,oBACA,GACA,MACA,CAAO,CACP,iBACA,SACA,QACA,GACA,SAA8D,eAAoB,CAC9E,EACJ,CACA,QACA,IAHW,GAGX,EACA,WACA,UACA,kDACA,YACA,WACA,CAAK,CACL,EAAuC,eAAoB,CAC3D,EACM,GAAc,CACpB,SACA,IAFoB,WAEpB,EACA,cACA,YACA,QACA,uBACA,kBACA,aACA,yBACA,KACA,CAAO,KACiB,eAAoB,CAC5C,GACM,GAAc,CACpB,SACA,IAFoB,WAEpB,EACA,cACA,YACA,QACA,WACA,uBACA,kBACA,aACA,yBACA,MACA,OACA,SACA,CAAO,OAEP,IACA,EAgBA,IACA,SACA,SACA,OACA,QACA,MACA,QACA,IACA,GACA,EAgBA,GAAkB,eAAoB,CAZtC,CACA,UACA,iBACA,cACA,qBACA,SACA,gBACA,eACA,mBACA,0BACA,aACA,GAEA,OACA,IACA,WACA,iBACA,YACA,QACA,iBACA,cACA,CAAI,IAAc,GAPlB,EAO2B,CAC3B,MAD2B,KAE3B,cACA,UACA,QACA,iBACA,cACA,EACA,SAA8B,cAAS,IACvC,MAAwC,cAAS,IACjD,MAA4B,cAAS,IACrC,MAA0B,cAAS,KACnC,MAAgD,cAAS,KACzD,EAAgB,GAAc,CAC9B,SACA,IAF8B,MAE9B,EACA,iBACA,2CACA,QACA,WACA,kBACA,qBACA,OACA,SACA,CAAG,IACH,OAAyB,eAAoB,oBAAyB,EAAO,KAAqC,eAAoB,IAAe,GAAc,EAAG,UACtK,EADmK,SAGnK,KACA,MAAS,gBAAU,IACnB","sources":["webpack://_N_E/../../client/app-dir/link.tsx","webpack://_N_E/../../src/client/use-intersection.tsx","webpack://_N_E/./node_modules/.pnpm/@rooks+use-mutation-observer@4.11.2_react@19.0.0/node_modules/@rooks/use-mutation-observer/lib/index.esm.js","webpack://_N_E/./node_modules/.pnpm/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack://_N_E/./node_modules/.pnpm/@reactour+utils@0.5.0_react@19.0.0/node_modules/@reactour/utils/dist/index.mjs","webpack://_N_E/./node_modules/.pnpm/@reactour+mask@1.1.0_react@19.0.0/node_modules/@reactour/mask/dist/index.mjs","webpack://_N_E/./node_modules/.pnpm/@reactour+popover@1.1.1_react@19.0.0/node_modules/@reactour/popover/dist/index.mjs","webpack://_N_E/./node_modules/.pnpm/@reactour+tour@3.6.2_react@19.0.0/node_modules/@reactour/tour/dist/index.mjs"],"sourcesContent":["'use client'\n\nimport type { NextRouter } from '../../shared/lib/router/router'\n\nimport React from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport type { AppRouterInstance } from '../../shared/lib/app-router-context.shared-runtime'\nimport type { PrefetchOptions } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useIntersection } from '../use-intersection'\nimport { PrefetchKind } from '../components/router-reducer/router-reducer-types'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys = {\n [K in keyof T]-?: {} extends Pick ? never : K\n}[keyof T]\ntype OptionalKeys = {\n [K in keyof T]-?: {} extends Pick ? 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 `` 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\n /**\n * Optional event handler for when Link is touched.\n */\n onTouchStart?: React.TouchEventHandler\n /**\n * Optional event handler for when Link is clicked.\n */\n onClick?: React.MouseEventHandler\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 = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys\ntype LinkPropsOptional = OptionalKeys>\n\nfunction prefetch(\n router: AppRouterInstance,\n href: string,\n options: PrefetchOptions\n): void {\n if (typeof window === 'undefined') {\n return\n }\n\n const doPrefetch = async () => {\n // note that `appRouter.prefetch()` is currently sync,\n // so we have to wrap this call in an async function to be able to catch() errors below.\n return router.prefetch(href, options)\n }\n\n // Prefetch the 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 doPrefetch().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): 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)) {\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 scroll: routerScroll,\n })\n } else {\n router[replace ? 'replace' : 'push'](as || href, {\n scroll: routerScroll,\n })\n }\n }\n\n React.startTransition(navigate)\n}\n\ntype LinkPropsReal = React.PropsWithChildren<\n Omit, 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 `` 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: ``](https://nextjs.org/docs/app/api-reference/components/link)\n */\nconst Link = React.forwardRef(\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 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 = {children}\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n /**\n * The possible states for prefetch are:\n * - null: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport\n * - true: we will prefetch if the link is visible and prefetch the full page, not just partially\n * - false: we will not prefetch if in the viewport at all\n */\n const appPrefetchKind =\n prefetchProp === null ? PrefetchKind.AUTO : PrefetchKind.FULL\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 \\`\\`, 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 = {\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 = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: 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 (\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 if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n const previousHref = React.useRef(href)\n const previousAs = React.useRef(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 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 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 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 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 with child. Please remove or use .\\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, {\n kind: appPrefetchKind,\n })\n }, [as, href, isVisible, prefetchEnabled, router, appPrefetchKind])\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler\n onMouseEnter: React.MouseEventHandler\n onClick: React.MouseEventHandler\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)\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 if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n prefetch(router, href, {\n kind: appPrefetchKind,\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 if (!prefetchEnabled) {\n return\n }\n\n prefetch(router, href, {\n kind: appPrefetchKind,\n })\n },\n }\n\n // If child is an 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 basePath.\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 childProps.href = addBasePath(as)\n }\n\n return legacyBehavior ? (\n React.cloneElement(child, childProps)\n ) : (\n \n {children}\n \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 | 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\n}\n\nconst hasIntersectionObserver = typeof IntersectionObserver === 'function'\n\nconst observers = new Map()\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()\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({\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(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 { useEffect } from 'react';\n\nvar config = {\r\n attributes: true,\r\n characterData: true,\r\n subtree: true,\r\n childList: true\r\n};\r\n/**\r\n *\r\n * useMutationObserver hook\r\n *\r\n * Returns a mutation observer for a React Ref and fires a callback\r\n *\r\n * @param {MutableRefObject} ref React ref on which mutations are to be observed\r\n * @param {MutationCallback} callback Function that needs to be fired on mutation\r\n * @param {MutationObserverInit} options\r\n */\r\nfunction useMutationObserver(ref, callback, options = config) {\r\n useEffect(() => {\r\n // Create an observer instance linked to the callback function\r\n if (ref.current) {\r\n const observer = new MutationObserver(callback);\r\n // Start observing the target node for configured mutations\r\n observer.observe(ref.current, options);\r\n return () => {\r\n observer.disconnect();\r\n };\r\n }\r\n }, [callback, options]);\r\n}\n\nexport default useMutationObserver;\n//# sourceMappingURL=index.esm.js.map\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} 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}\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 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 ().\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}\r\n */\r\n this.activeObservations_ = [];\r\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map}\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","// Observables.tsx\nimport { useRef, useEffect, useState } from \"react\";\nimport useMutationObserver from \"@rooks/use-mutation-observer\";\nimport ResizeObserver from \"resize-observer-polyfill\";\nvar Observables = ({\n mutationObservables,\n resizeObservables,\n refresh\n}) => {\n const [mutationsCounter, setMutationsCounter] = useState(0);\n const ref = useRef(document.documentElement || document.body);\n function refreshHighlightedRegionIfObservable(nodes) {\n const posibleNodes = Array.from(nodes);\n for (const node of posibleNodes) {\n if (mutationObservables) {\n if (!node.attributes) {\n continue;\n }\n const found = mutationObservables.find(\n (observable) => node.matches(observable)\n );\n if (found) {\n refresh(true);\n }\n }\n }\n }\n function incrementMutationsCounterIfObservable(nodes) {\n const posibleNodes = Array.from(nodes);\n for (const node of posibleNodes) {\n if (resizeObservables) {\n if (!node.attributes) {\n continue;\n }\n const found = resizeObservables.find(\n (observable) => node.matches(observable)\n );\n if (found)\n setMutationsCounter(mutationsCounter + 1);\n }\n }\n }\n useMutationObserver(\n ref,\n (mutationList) => {\n for (const mutation of mutationList) {\n if (mutation.addedNodes.length !== 0) {\n refreshHighlightedRegionIfObservable(mutation.addedNodes);\n incrementMutationsCounterIfObservable(mutation.addedNodes);\n }\n if (mutation.removedNodes.length !== 0) {\n refreshHighlightedRegionIfObservable(mutation.removedNodes);\n incrementMutationsCounterIfObservable(mutation.removedNodes);\n }\n }\n },\n { childList: true, subtree: true }\n );\n useEffect(() => {\n if (!resizeObservables) {\n return;\n }\n const resizeObserver = new ResizeObserver(() => {\n refresh();\n });\n for (const observable of resizeObservables) {\n const element = document.querySelector(observable);\n if (element) {\n resizeObserver.observe(element);\n }\n }\n return () => {\n resizeObserver.disconnect();\n };\n }, [resizeObservables, mutationsCounter]);\n return null;\n};\nvar Observables_default = Observables;\n\n// useRect.tsx\nimport { useEffect as useEffect2, useCallback, useState as useState2 } from \"react\";\nfunction getRect(element) {\n let rect = initialState;\n if (element) {\n const domRect = element.getBoundingClientRect();\n rect = domRect;\n }\n return rect;\n}\nfunction useRect(ref, refresher) {\n const [dimensions, setDimensions] = useState2(initialState);\n const handleResize = useCallback(() => {\n if (!(ref == null ? void 0 : ref.current))\n return;\n setDimensions(getRect(ref == null ? void 0 : ref.current));\n }, [ref == null ? void 0 : ref.current]);\n useEffect2(() => {\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [ref == null ? void 0 : ref.current, refresher]);\n return dimensions;\n}\nfunction useElemRect(elem, refresher) {\n const [dimensions, setDimensions] = useState2(initialState);\n const handleResize = useCallback(() => {\n if (!elem)\n return;\n setDimensions(getRect(elem));\n }, [elem]);\n useEffect2(() => {\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [elem, refresher]);\n return dimensions;\n}\nvar initialState = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0\n};\n\n// smoothScroll.tsx\nfunction smoothScroll(elem, options) {\n return new Promise((resolve) => {\n if (!(elem instanceof Element)) {\n throw new TypeError(\"Argument 1 must be an Element\");\n }\n let same = 0;\n let lastPos = null;\n const scrollOptions = Object.assign({ behavior: \"smooth\" }, options);\n elem.scrollIntoView(scrollOptions);\n requestAnimationFrame(check);\n function check() {\n const newPos = elem == null ? void 0 : elem.getBoundingClientRect().top;\n if (newPos === lastPos) {\n if (same++ > 2) {\n return resolve(null);\n }\n } else {\n same = 0;\n lastPos = newPos;\n }\n requestAnimationFrame(check);\n }\n });\n}\n\n// useIntersectionObserver.tsx\nimport { useEffect as useEffect3, useState as useState3 } from \"react\";\nfunction useIntersectionObserver(elementRef, {\n threshold = 0,\n root = null,\n rootMargin = \"0%\",\n freezeOnceVisible = false\n}) {\n const [entry, setEntry] = useState3();\n const frozen = (entry == null ? void 0 : entry.isIntersecting) && freezeOnceVisible;\n const updateEntry = ([entry2]) => {\n setEntry(entry2);\n };\n useEffect3(() => {\n const node = elementRef == null ? void 0 : elementRef.current;\n const hasIOSupport = !!window.IntersectionObserver;\n if (!hasIOSupport || frozen || !node)\n return;\n const observerParams = { threshold, root, rootMargin };\n const observer = new IntersectionObserver(updateEntry, observerParams);\n observer.observe(node);\n return () => observer.disconnect();\n }, [elementRef, JSON.stringify(threshold), root, rootMargin, frozen]);\n return entry;\n}\n\n// helpers.tsx\nfunction safe(sum) {\n return sum < 0 ? 0 : sum;\n}\nfunction getInViewThreshold(threshold) {\n if (typeof threshold === \"object\" && threshold !== null) {\n return {\n thresholdX: threshold.x || 0,\n thresholdY: threshold.y || 0\n };\n }\n return {\n thresholdX: threshold || 0,\n thresholdY: threshold || 0\n };\n}\nfunction getWindow() {\n const w = Math.max(\n document.documentElement.clientWidth,\n window.innerWidth || 0\n );\n const h = Math.max(\n document.documentElement.clientHeight,\n window.innerHeight || 0\n );\n return { w, h };\n}\nfunction inView({\n top,\n right,\n bottom,\n left,\n threshold\n}) {\n const { w: windowWidth, h: windowHeight } = getWindow();\n const { thresholdX, thresholdY } = getInViewThreshold(threshold);\n return top < 0 && bottom - top > windowHeight ? true : top >= 0 + thresholdY && left >= 0 + thresholdX && bottom <= windowHeight - thresholdY && right <= windowWidth - thresholdX;\n}\nvar isHoriz = (pos) => /(left|right)/.test(pos);\nvar isOutsideX = (val, windowWidth) => {\n return val > windowWidth;\n};\nvar isOutsideY = (val, windowHeight) => {\n return val > windowHeight;\n};\nfunction bestPositionOf(positions, filters = []) {\n const compareFn = (a, b) => filters.includes(a) ? 1 : filters.includes(b) ? -1 : 0;\n return Object.keys(positions).map((p) => {\n return {\n position: p,\n value: positions[p]\n };\n }).sort((a, b) => b.value - a.value).sort((a, b) => compareFn(a.position, b.position)).filter((p) => p.value > 0).map((p) => p.position);\n}\nvar defaultPadding = 10;\nfunction getPadding(padding = defaultPadding) {\n if (Array.isArray(padding)) {\n if (padding.length === 1) {\n return [padding[0], padding[0], padding[0], padding[0]];\n }\n if (padding.length === 2) {\n return [padding[1], padding[0], padding[1], padding[0]];\n }\n if (padding.length === 3) {\n return [padding[0], padding[1], padding[2], padding[1]];\n }\n if (padding.length > 3) {\n return [padding[0], padding[1], padding[2], padding[3]];\n }\n return [defaultPadding, defaultPadding];\n }\n return [padding, padding, padding, padding];\n}\nexport {\n Observables_default as Observables,\n bestPositionOf,\n getInViewThreshold,\n getPadding,\n getRect,\n getWindow,\n inView,\n isHoriz,\n isOutsideX,\n isOutsideY,\n safe,\n smoothScroll,\n useElemRect,\n useIntersectionObserver,\n useRect\n};\n","// Mask.tsx\nimport React from \"react\";\n\n// styles.tsx\nvar defaultStyles = {\n maskWrapper: () => ({\n opacity: 0.7,\n left: 0,\n top: 0,\n position: \"fixed\",\n zIndex: 99999,\n pointerEvents: \"none\",\n color: \"#000\"\n }),\n svgWrapper: ({ windowWidth, windowHeight, wpt, wpl }) => ({\n width: windowWidth,\n height: windowHeight,\n left: Number(wpl),\n top: Number(wpt),\n position: \"fixed\"\n }),\n maskArea: ({ x, y, width, height }) => ({\n x,\n y,\n width,\n height,\n fill: \"black\",\n rx: 0\n }),\n maskRect: ({ windowWidth, windowHeight, maskID }) => ({\n x: 0,\n y: 0,\n width: windowWidth,\n height: windowHeight,\n fill: \"currentColor\",\n mask: `url(#${maskID})`\n }),\n clickArea: ({ windowWidth, windowHeight, clipID }) => ({\n x: 0,\n y: 0,\n width: windowWidth,\n height: windowHeight,\n fill: \"currentcolor\",\n pointerEvents: \"auto\",\n clipPath: `url(#${clipID})`\n }),\n highlightedArea: ({ x, y, width, height }) => ({\n x,\n y,\n width,\n height,\n pointerEvents: \"auto\",\n fill: \"transparent\",\n display: \"none\"\n })\n};\nfunction stylesMatcher(styles) {\n return (key, state) => {\n const base = defaultStyles[key](state);\n const custom = styles[key];\n return custom ? custom(base, state) : base;\n };\n}\n\n// Mask.tsx\nimport { safe, getWindow, getPadding } from \"@reactour/utils\";\nvar Mask = ({\n padding = 10,\n wrapperPadding = 0,\n onClick,\n onClickHighlighted,\n styles = {},\n sizes,\n className,\n highlightedAreaClassName,\n maskId,\n clipId\n}) => {\n const maskID = maskId || uniqueId(\"mask__\");\n const clipID = clipId || uniqueId(\"clip__\");\n const getStyles = stylesMatcher(styles);\n const [pt, pr, pb, pl] = getPadding(padding);\n const [wpt, wpr, wpb, wpl] = getPadding(wrapperPadding);\n const { w, h } = getWindow();\n const width = safe((sizes == null ? void 0 : sizes.width) + pl + pr);\n const height = safe((sizes == null ? void 0 : sizes.height) + pt + pb);\n const top = safe((sizes == null ? void 0 : sizes.top) - pt - wpt);\n const left = safe((sizes == null ? void 0 : sizes.left) - pl - wpl);\n const windowWidth = w - wpl - wpr;\n const windowHeight = h - wpt - wpb;\n const maskAreaStyles = getStyles(\"maskArea\", {\n x: left,\n y: top,\n width,\n height\n });\n const highlightedAreaStyles = getStyles(\"highlightedArea\", {\n x: left,\n y: top,\n width,\n height\n });\n return /* @__PURE__ */ React.createElement(\n \"div\",\n {\n style: getStyles(\"maskWrapper\", {}),\n onClick,\n className\n },\n /* @__PURE__ */ React.createElement(\n \"svg\",\n {\n width: windowWidth,\n height: windowHeight,\n xmlns: \"http://www.w3.org/2000/svg\",\n style: getStyles(\"svgWrapper\", {\n windowWidth,\n windowHeight,\n wpt,\n wpl\n })\n },\n /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"mask\", { id: maskID }, /* @__PURE__ */ React.createElement(\n \"rect\",\n {\n x: 0,\n y: 0,\n width: windowWidth,\n height: windowHeight,\n fill: \"white\"\n }\n ), /* @__PURE__ */ React.createElement(\n \"rect\",\n {\n style: maskAreaStyles,\n rx: maskAreaStyles.rx ? 1 : void 0\n }\n )), /* @__PURE__ */ React.createElement(\"clipPath\", { id: clipID }, /* @__PURE__ */ React.createElement(\n \"polygon\",\n {\n points: `0 0, 0 ${windowHeight}, ${left} ${windowHeight}, ${left} ${top}, ${left + width} ${top}, ${left + width} ${top + height}, ${left} ${top + height}, ${left} ${windowHeight}, ${windowWidth} ${windowHeight}, ${windowWidth} 0`\n }\n ))),\n /* @__PURE__ */ React.createElement(\n \"rect\",\n {\n style: getStyles(\"maskRect\", {\n windowWidth,\n windowHeight,\n maskID\n })\n }\n ),\n /* @__PURE__ */ React.createElement(\n \"rect\",\n {\n style: getStyles(\"clickArea\", {\n windowWidth,\n windowHeight,\n top,\n left,\n width,\n height,\n clipID\n })\n }\n ),\n /* @__PURE__ */ React.createElement(\n \"rect\",\n {\n style: highlightedAreaStyles,\n className: highlightedAreaClassName,\n onClick: onClickHighlighted,\n rx: highlightedAreaStyles.rx ? 1 : void 0\n }\n )\n )\n );\n};\nvar Mask_default = Mask;\nfunction uniqueId(prefix) {\n return prefix + Math.random().toString(36).substring(2, 16);\n}\n\n// index.tsx\nvar mask_default = Mask_default;\nexport {\n Mask_default as Mask,\n mask_default as default\n};\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\n\n// Popover.tsx\nimport React, { useRef } from \"react\";\nimport {\n useRect,\n bestPositionOf,\n isOutsideX,\n isOutsideY,\n getWindow,\n getPadding\n} from \"@reactour/utils\";\n\n// styles.tsx\nvar defaultStyles = {\n popover: () => ({\n position: \"fixed\",\n maxWidth: 353,\n backgroundColor: \"#fff\",\n padding: \"24px 30px\",\n boxShadow: \"0 0.5em 3em rgba(0, 0, 0, 0.3)\",\n color: \"inherit\",\n zIndex: 1e5,\n transition: \"transform 0.3s\",\n top: 0,\n left: 0\n })\n};\nfunction stylesMatcher(styles) {\n return (key, state) => {\n const base = defaultStyles[key](state);\n const custom = styles[key];\n return custom ? custom(base, state) : base;\n };\n}\n\n// Popover.tsx\nvar Popover = (_a) => {\n var _b = _a, {\n children,\n position: providedPosition = \"bottom\",\n padding = 10,\n styles = {},\n sizes,\n refresher\n } = _b, props = __objRest(_b, [\n \"children\",\n \"position\",\n \"padding\",\n \"styles\",\n \"sizes\",\n \"refresher\"\n ]);\n const helperRef = useRef(null);\n const positionRef = useRef(\"\");\n const verticalAlignRef = useRef(\"\");\n const horizontalAlignRef = useRef(\"\");\n const { w: windowWidth, h: windowHeight } = getWindow();\n const getStyles = stylesMatcher(styles);\n const helperRect = useRect(helperRef, refresher);\n const { width: helperWidth, height: helperHeight } = helperRect;\n const targetLeft = sizes == null ? void 0 : sizes.left;\n const targetTop = sizes == null ? void 0 : sizes.top;\n const targetRight = sizes == null ? void 0 : sizes.right;\n const targetBottom = sizes == null ? void 0 : sizes.bottom;\n const position = providedPosition && typeof providedPosition === \"function\" ? providedPosition(\n {\n width: helperWidth,\n height: helperHeight,\n windowWidth,\n windowHeight,\n top: targetTop,\n left: targetLeft,\n right: targetRight,\n bottom: targetBottom,\n x: sizes.x,\n y: sizes.y\n },\n helperRect\n ) : providedPosition;\n const available = {\n left: targetLeft,\n right: windowWidth - targetRight,\n top: targetTop,\n bottom: windowHeight - targetBottom\n };\n const [pt, pr, pb, pl] = getPadding(padding);\n const couldPositionAt = (position2, isOutsideX2, isOutsideY2) => {\n switch (position2) {\n case \"top\":\n return available.top > helperHeight + pb;\n case \"right\":\n return isOutsideX2 ? false : available.right > helperWidth + pl;\n case \"bottom\":\n return isOutsideY2 ? false : available.bottom > helperHeight + pt;\n case \"left\":\n return available.left > helperWidth + pr;\n default:\n return false;\n }\n };\n const autoPosition = (coords, outX, outY) => {\n const positionsOrder = bestPositionOf(\n available,\n outY ? [\"right\", \"left\"] : outX ? [\"top\", \"bottom\"] : []\n );\n for (let j = 0; j < positionsOrder.length; j++) {\n if (couldPositionAt(positionsOrder[j], outX, outY)) {\n positionRef.current = positionsOrder[j];\n return coords[positionsOrder[j]];\n }\n }\n positionRef.current = \"center\";\n return coords.center;\n };\n const pos = (helperPosition) => {\n if (Array.isArray(helperPosition)) {\n const isOutX = isOutsideX(helperPosition[0], windowWidth);\n const isOutY = isOutsideY(helperPosition[1], windowHeight);\n positionRef.current = \"custom\";\n return [\n isOutX ? windowWidth / 2 - helperWidth / 2 : helperPosition[0],\n isOutY ? windowHeight / 2 - helperHeight / 2 : helperPosition[1]\n ];\n }\n const isHelperOutsideX = isOutsideX(targetLeft + helperWidth, windowWidth);\n const isHelperOutsideY = isOutsideY(\n targetBottom + helperHeight,\n windowHeight\n );\n const x = isHelperOutsideX ? Math.min(targetLeft, windowWidth - helperWidth) : Math.max(targetLeft, 0);\n const y = isHelperOutsideY ? helperHeight > available.bottom ? Math.max(targetBottom - helperHeight, 0) : Math.max(targetTop, 0) : targetTop;\n if (isHelperOutsideY) {\n if (helperHeight > available.bottom) {\n verticalAlignRef.current = \"bottom\";\n } else {\n verticalAlignRef.current = \"top\";\n }\n } else {\n verticalAlignRef.current = \"top\";\n }\n if (isHelperOutsideX) {\n horizontalAlignRef.current = \"left\";\n } else {\n horizontalAlignRef.current = \"right\";\n }\n const coords = {\n top: [x - pl, targetTop - helperHeight - pb],\n right: [targetRight + pl, y - pt],\n bottom: [x - pl, targetBottom + pt],\n left: [targetLeft - helperWidth - pr, y - pt],\n center: [\n windowWidth / 2 - helperWidth / 2,\n windowHeight / 2 - helperHeight / 2\n ]\n };\n if (helperPosition === \"center\" || couldPositionAt(helperPosition, isHelperOutsideX, isHelperOutsideY) && !isHelperOutsideX && !isHelperOutsideY) {\n positionRef.current = helperPosition;\n return coords[helperPosition];\n }\n return autoPosition(coords, isHelperOutsideX, isHelperOutsideY);\n };\n const p = pos(position);\n return /* @__PURE__ */ React.createElement(\n \"div\",\n __spreadValues({\n className: \"reactour__popover\",\n style: __spreadProps(__spreadValues({}, getStyles(\"popover\", {\n position: positionRef.current,\n verticalAlign: verticalAlignRef.current,\n horizontalAlign: horizontalAlignRef.current\n })), {\n transform: `translate(${Math.round(p[0])}px, ${Math.round(p[1])}px)`\n }),\n ref: helperRef\n }, props),\n children\n );\n};\nvar Popover_default = Popover;\n\n// index.tsx\nvar popover_default = Popover_default;\nexport {\n Popover_default as Popover,\n popover_default as default\n};\n","var __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nvar __objRest = (source, exclude) => {\n var target = {};\n for (var prop in source)\n if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)\n target[prop] = source[prop];\n if (source != null && __getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(source)) {\n if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))\n target[prop] = source[prop];\n }\n return target;\n};\n\n// Tour.tsx\nimport React6, { useEffect as useEffect3 } from \"react\";\nimport { Observables } from \"@reactour/utils\";\nimport { Mask } from \"@reactour/mask\";\nimport { Popover } from \"@reactour/popover\";\n\n// hooks.tsx\nimport { useEffect, useCallback, useState } from \"react\";\nimport { inView, smoothScroll, getWindow, getRect } from \"@reactour/utils\";\nvar initialState = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n windowWidth: 0,\n windowHeight: 0,\n x: 0,\n y: 0\n};\nfunction useSizes(step, scrollOptions = {\n block: \"center\",\n behavior: \"smooth\",\n inViewThreshold: 0\n}) {\n const [transition, setTransition] = useState(false);\n const [observing, setObserving] = useState(false);\n const [isHighlightingObserved, setIsHighlightingObserved] = useState(false);\n const [refresher, setRefresher] = useState(null);\n const [dimensions, setDimensions] = useState(initialState);\n const target = (step == null ? void 0 : step.selector) instanceof Element ? step == null ? void 0 : step.selector : document.querySelector(step == null ? void 0 : step.selector);\n const handleResize = useCallback(() => {\n const _a = getHighlightedRect(\n target,\n step == null ? void 0 : step.highlightedSelectors,\n step == null ? void 0 : step.bypassElem\n ), { hasHighligtedElems } = _a, newDimensions = __objRest(_a, [\"hasHighligtedElems\"]);\n if (Object.entries(dimensions).some(\n ([key, value]) => newDimensions[key] !== value\n )) {\n setDimensions(newDimensions);\n }\n }, [target, step == null ? void 0 : step.highlightedSelectors, dimensions]);\n useEffect(() => {\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n return () => window.removeEventListener(\"resize\", handleResize);\n }, [target, step == null ? void 0 : step.highlightedSelectors, refresher]);\n useEffect(() => {\n const isInView = inView(__spreadProps(__spreadValues({}, dimensions), {\n threshold: scrollOptions.inViewThreshold\n }));\n if (!isInView && target) {\n setTransition(true);\n smoothScroll(target, scrollOptions).then(() => {\n if (!observing)\n setRefresher(Date.now());\n }).finally(() => {\n setTransition(false);\n });\n }\n }, [dimensions]);\n const observableRefresher = useCallback(() => {\n setObserving(true);\n const _a = getHighlightedRect(\n target,\n step == null ? void 0 : step.highlightedSelectors,\n step == null ? void 0 : step.bypassElem\n ), { hasHighligtedElems } = _a, dimesions = __objRest(_a, [\"hasHighligtedElems\"]);\n setIsHighlightingObserved(hasHighligtedElems);\n setDimensions(dimesions);\n setObserving(false);\n }, [target, step == null ? void 0 : step.highlightedSelectors, dimensions]);\n return {\n sizes: dimensions,\n transition,\n target,\n observableRefresher,\n isHighlightingObserved\n };\n}\nfunction getHighlightedRect(node, highlightedSelectors = [], bypassElem = true) {\n let hasHighligtedElems = false;\n const { w: windowWidth, h: windowHeight } = getWindow();\n if (!highlightedSelectors) {\n return __spreadProps(__spreadValues({}, getRect(node)), {\n windowWidth,\n windowHeight,\n hasHighligtedElems: false\n });\n }\n let attrs = getRect(node);\n let altAttrs = {\n bottom: 0,\n height: 0,\n left: windowWidth,\n right: 0,\n top: windowHeight,\n width: 0\n };\n for (const selector of highlightedSelectors) {\n const element = document.querySelector(selector);\n if (!element || element.style.display === \"none\" || element.style.visibility === \"hidden\") {\n continue;\n }\n const rect = getRect(element);\n hasHighligtedElems = true;\n if (bypassElem || !node) {\n if (rect.top < altAttrs.top) {\n altAttrs.top = rect.top;\n }\n if (rect.right > altAttrs.right) {\n altAttrs.right = rect.right;\n }\n if (rect.bottom > altAttrs.bottom) {\n altAttrs.bottom = rect.bottom;\n }\n if (rect.left < altAttrs.left) {\n altAttrs.left = rect.left;\n }\n altAttrs.width = altAttrs.right - altAttrs.left;\n altAttrs.height = altAttrs.bottom - altAttrs.top;\n } else {\n if (rect.top < attrs.top) {\n attrs.top = rect.top;\n }\n if (rect.right > attrs.right) {\n attrs.right = rect.right;\n }\n if (rect.bottom > attrs.bottom) {\n attrs.bottom = rect.bottom;\n }\n if (rect.left < attrs.left) {\n attrs.left = rect.left;\n }\n attrs.width = attrs.right - attrs.left;\n attrs.height = attrs.bottom - attrs.top;\n }\n }\n const bypassable = bypassElem || !node ? altAttrs.width > 0 && altAttrs.height > 0 : false;\n return {\n left: (bypassable ? altAttrs : attrs).left,\n top: (bypassable ? altAttrs : attrs).top,\n right: (bypassable ? altAttrs : attrs).right,\n bottom: (bypassable ? altAttrs : attrs).bottom,\n width: (bypassable ? altAttrs : attrs).width,\n height: (bypassable ? altAttrs : attrs).height,\n windowWidth,\n windowHeight,\n hasHighligtedElems,\n x: attrs.x,\n y: attrs.y\n };\n}\n\n// Keyboard.tsx\nimport { useEffect as useEffect2 } from \"react\";\nvar Keyboard = ({\n disableKeyboardNavigation,\n setCurrentStep,\n currentStep,\n setIsOpen,\n stepsLength,\n disable,\n rtl,\n clickProps,\n keyboardHandler\n}) => {\n function keyDownHandler(e) {\n e.stopPropagation();\n if (disableKeyboardNavigation === true || disable) {\n return;\n }\n let isEscDisabled, isRightDisabled, isLeftDisabled;\n if (disableKeyboardNavigation) {\n isEscDisabled = disableKeyboardNavigation.includes(\"esc\");\n isRightDisabled = disableKeyboardNavigation.includes(\"right\");\n isLeftDisabled = disableKeyboardNavigation.includes(\"left\");\n }\n function next() {\n setCurrentStep(Math.min(currentStep + 1, stepsLength - 1));\n }\n function prev() {\n setCurrentStep(Math.max(currentStep - 1, 0));\n }\n if (keyboardHandler && typeof keyboardHandler === \"function\") {\n keyboardHandler(e, clickProps, {\n isEscDisabled,\n isRightDisabled,\n isLeftDisabled\n });\n } else {\n if (e.keyCode === 27 && !isEscDisabled) {\n e.preventDefault();\n setIsOpen(false);\n }\n if (e.keyCode === 39 && !isRightDisabled) {\n e.preventDefault();\n if (rtl) {\n prev();\n } else {\n next();\n }\n }\n if (e.keyCode === 37 && !isLeftDisabled) {\n e.preventDefault();\n if (rtl) {\n next();\n } else {\n prev();\n }\n }\n }\n }\n useEffect2(() => {\n window.addEventListener(\"keydown\", keyDownHandler, false);\n return () => {\n window.removeEventListener(\"keydown\", keyDownHandler);\n };\n }, [disable, setCurrentStep, currentStep]);\n return null;\n};\nvar Keyboard_default = Keyboard;\n\n// components/PopoverContent.tsx\nimport React5 from \"react\";\n\n// components/Badge.tsx\nimport React2 from \"react\";\n\n// styles.tsx\nvar defaultStyles = {\n badge: () => ({\n position: \"absolute\",\n fontFamily: \"monospace\",\n background: \"var(--reactour-accent,#007aff)\",\n height: \"1.875em\",\n lineHeight: 2,\n paddingLeft: \"0.8125em\",\n paddingRight: \"0.8125em\",\n fontSize: \"1em\",\n borderRadius: \"1.625em\",\n color: \"white\",\n textAlign: \"center\",\n boxShadow: \"0 0.25em 0.5em rgba(0, 0, 0, 0.3)\",\n top: \"-0.8125em\",\n left: \"-0.8125em\"\n }),\n controls: () => ({\n display: \"flex\",\n marginTop: 24,\n alignItems: \"center\",\n justifyContent: \"space-between\"\n }),\n navigation: () => ({\n counterReset: \"dot\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n flexWrap: \"wrap\"\n }),\n button: ({ disabled }) => ({\n display: \"block\",\n padding: 0,\n border: 0,\n background: \"none\",\n cursor: disabled ? \"not-allowed\" : \"pointer\"\n }),\n arrow: ({ disabled }) => ({\n color: disabled ? \"#caccce\" : \"#646464\",\n width: 16,\n height: 12,\n flex: \"0 0 16px\"\n // '&:hover': {\n // color: disabled ? '#caccce' : '#000',\n // },\n }),\n dot: ({ current, disabled, showNumber }) => ({\n counterIncrement: \"dot\",\n width: 8,\n height: 8,\n border: current ? \"0\" : \"1px solid #caccce\",\n borderRadius: \"100%\",\n padding: 0,\n display: \"block\",\n margin: 4,\n transition: \"opacity 0.3s, transform 0.3s\",\n cursor: disabled ? \"not-allowed\" : \"pointer\",\n transform: `scale(${current ? 1.25 : 1})`,\n color: current ? \"var(--reactour-accent, #007aff)\" : \"#caccce\",\n background: current ? \"var(--reactour-accent, #007aff)\" : \"none\"\n // '&:before': {\n // content: 'counter(dot)',\n // position: 'absolute',\n // bottom: 'calc(100% + 0.25em)',\n // left: '50%',\n // opacity: 0,\n // transform: 'translate(-50%, 1em)',\n // transition: '0.3s',\n // display: showNumber ? 'block' : 'none',\n // },\n // '&:hover': {\n // backgroundColor: 'currentColor',\n // '&:before': {\n // opacity: 0.5,\n // transform: 'translate(-50%, -2px)',\n // },\n // },\n }),\n close: ({ disabled }) => ({\n position: \"absolute\",\n top: 22,\n right: 22,\n width: 9,\n height: 9,\n \"--rt-close-btn\": disabled ? \"#caccce\" : \"#5e5e5e\",\n \"--rt-close-btn-disabled\": disabled ? \"#caccce\" : \"#000\"\n }),\n svg: () => ({\n display: \"block\"\n })\n};\nfunction stylesMatcher(styles) {\n return (key, state) => {\n const base = defaultStyles[key](state);\n const custom = styles[key];\n return custom ? custom(base, state) : base;\n };\n}\n\n// components/Badge.tsx\nvar Badge = ({\n styles = {},\n children\n}) => {\n const getStyles = stylesMatcher(styles);\n return /* @__PURE__ */ React2.createElement(\"span\", { style: getStyles(\"badge\", {}) }, children);\n};\nvar Badge_default = Badge;\n\n// components/Close.tsx\nimport React3 from \"react\";\nvar Close = (_a) => {\n var _b = _a, {\n styles = {},\n onClick,\n disabled\n } = _b, props = __objRest(_b, [\n \"styles\",\n \"onClick\",\n \"disabled\"\n ]);\n const getStyles = stylesMatcher(styles);\n return /* @__PURE__ */ React3.createElement(\n \"button\",\n __spreadValues({\n className: \"reactour__close-button\",\n style: __spreadValues(__spreadValues({}, getStyles(\"button\", {})), getStyles(\"close\", { disabled })),\n onClick\n }, props),\n /* @__PURE__ */ React3.createElement(\n \"svg\",\n {\n viewBox: \"0 0 9.1 9.1\",\n \"aria-hidden\": true,\n role: \"presentation\",\n style: __spreadValues({}, getStyles(\"svg\", {}))\n },\n /* @__PURE__ */ React3.createElement(\n \"path\",\n {\n fill: \"currentColor\",\n d: \"M5.9 4.5l2.8-2.8c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L4.5 3.1 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4l2.8 2.8L.3 7.4c-.4.4-.4 1 0 1.4.2.2.4.3.7.3s.5-.1.7-.3L4.5 6l2.8 2.8c.3.2.5.3.8.3s.5-.1.7-.3c.4-.4.4-1 0-1.4L5.9 4.5z\"\n }\n )\n )\n );\n};\nvar Close_default = Close;\n\n// components/Content.tsx\nvar Content = ({\n content,\n setCurrentStep,\n transition,\n isHighlightingObserved,\n currentStep,\n setIsOpen\n}) => {\n return typeof content === \"function\" ? content({\n setCurrentStep,\n transition,\n isHighlightingObserved,\n currentStep,\n setIsOpen\n }) : content;\n};\nvar Content_default = Content;\n\n// components/Navigation.tsx\nimport React4 from \"react\";\nvar Navigation = ({\n styles = {},\n steps,\n setCurrentStep,\n currentStep,\n setIsOpen,\n nextButton,\n prevButton,\n disableDots,\n hideDots,\n hideButtons,\n disableAll,\n rtl,\n Arrow = DefaultArrow\n}) => {\n const stepsLength = steps.length;\n const getStyles = stylesMatcher(styles);\n const Button = ({\n onClick,\n kind = \"next\",\n children,\n hideArrow\n }) => {\n function clickHandler() {\n if (!disableAll) {\n if (onClick && typeof onClick === \"function\") {\n onClick();\n } else {\n if (kind === \"next\") {\n setCurrentStep(Math.min(currentStep + 1, stepsLength - 1));\n } else {\n setCurrentStep(Math.max(currentStep - 1, 0));\n }\n }\n }\n }\n return /* @__PURE__ */ React4.createElement(\n \"button\",\n {\n style: getStyles(\"button\", {\n kind,\n disabled: disableAll ? disableAll : kind === \"next\" ? stepsLength - 1 === currentStep : currentStep === 0\n }),\n onClick: clickHandler,\n \"aria-label\": `Go to ${kind} step`\n },\n !hideArrow ? /* @__PURE__ */ React4.createElement(\n Arrow,\n {\n styles,\n inverted: rtl ? kind === \"prev\" : kind === \"next\",\n disabled: disableAll ? disableAll : kind === \"next\" ? stepsLength - 1 === currentStep : currentStep === 0\n }\n ) : null,\n children\n );\n };\n return /* @__PURE__ */ React4.createElement(\"div\", { style: getStyles(\"controls\", {}), dir: rtl ? \"rtl\" : \"ltr\" }, !hideButtons ? prevButton && typeof prevButton === \"function\" ? prevButton({\n Button,\n setCurrentStep,\n currentStep,\n stepsLength,\n setIsOpen,\n steps\n }) : /* @__PURE__ */ React4.createElement(Button, { kind: \"prev\" }) : null, !hideDots ? /* @__PURE__ */ React4.createElement(\"div\", { style: getStyles(\"navigation\", {}) }, Array.from({ length: stepsLength }, (_, i) => i).map((index) => {\n var _a;\n return /* @__PURE__ */ React4.createElement(\n \"button\",\n {\n style: getStyles(\"dot\", {\n current: index === currentStep,\n disabled: disableDots || disableAll\n }),\n onClick: () => {\n if (!disableDots && !disableAll)\n setCurrentStep(index);\n },\n key: `navigation_dot_${index}`,\n \"aria-label\": ((_a = steps[index]) == null ? void 0 : _a.navDotAriaLabel) || `Go to step ${index + 1}`\n }\n );\n })) : null, !hideButtons ? nextButton && typeof nextButton === \"function\" ? nextButton({\n Button,\n setCurrentStep,\n currentStep,\n stepsLength,\n setIsOpen,\n steps\n }) : /* @__PURE__ */ React4.createElement(Button, null) : null);\n};\nvar Navigation_default = Navigation;\nvar DefaultArrow = ({\n styles = {},\n inverted = false,\n disabled\n}) => {\n const getStyles = stylesMatcher(styles);\n return /* @__PURE__ */ React4.createElement(\n \"svg\",\n {\n viewBox: \"0 0 18.4 14.4\",\n style: getStyles(\"arrow\", { inverted, disabled })\n },\n /* @__PURE__ */ React4.createElement(\n \"path\",\n {\n d: inverted ? \"M17 7.2H1M10.8 1L17 7.2l-6.2 6.2\" : \"M1.4 7.2h16M7.6 1L1.4 7.2l6.2 6.2\",\n fill: \"none\",\n stroke: \"currentColor\",\n strokeWidth: \"2\",\n strokeLinecap: \"round\",\n strokeMiterlimit: \"10\"\n }\n )\n );\n};\n\n// components/index.tsx\nvar components = {\n Badge: Badge_default,\n Close: Close_default,\n Content: Content_default,\n Navigation: Navigation_default,\n Arrow: DefaultArrow\n};\nvar defaultComponents = (comps) => __spreadValues(__spreadValues({}, components), comps);\n\n// components/PopoverContent.tsx\nvar PopoverContent = ({\n styles,\n components: components2 = {},\n badgeContent,\n accessibilityOptions,\n disabledActions,\n onClickClose,\n steps,\n setCurrentStep,\n currentStep,\n transition,\n isHighlightingObserved,\n setIsOpen,\n nextButton,\n prevButton,\n disableDotsNavigation,\n rtl,\n showPrevNextButtons = true,\n showCloseButton = true,\n showNavigation = true,\n showBadge = true,\n showDots = true,\n meta,\n setMeta,\n setSteps\n}) => {\n const step = steps[currentStep];\n const { Badge: Badge2, Close: Close2, Content: Content2, Navigation: Navigation2, Arrow } = defaultComponents(components2);\n const badge = badgeContent && typeof badgeContent === \"function\" ? badgeContent({\n currentStep,\n totalSteps: steps.length,\n transition\n }) : currentStep + 1;\n function closeClickHandler() {\n if (!disabledActions) {\n if (onClickClose && typeof onClickClose === \"function\") {\n onClickClose({\n setCurrentStep,\n setIsOpen,\n currentStep,\n steps,\n meta,\n setMeta,\n setSteps\n });\n } else {\n setIsOpen(false);\n }\n }\n }\n return /* @__PURE__ */ React5.createElement(React5.Fragment, null, showBadge ? /* @__PURE__ */ React5.createElement(Badge2, { styles }, badge) : null, showCloseButton ? /* @__PURE__ */ React5.createElement(\n Close2,\n {\n styles,\n \"aria-label\": accessibilityOptions == null ? void 0 : accessibilityOptions.closeButtonAriaLabel,\n disabled: disabledActions,\n onClick: closeClickHandler\n }\n ) : null, /* @__PURE__ */ React5.createElement(\n Content2,\n {\n content: step == null ? void 0 : step.content,\n setCurrentStep,\n currentStep,\n transition,\n isHighlightingObserved,\n setIsOpen\n }\n ), showNavigation ? /* @__PURE__ */ React5.createElement(\n Navigation2,\n {\n setCurrentStep,\n currentStep,\n setIsOpen,\n steps,\n styles,\n \"aria-hidden\": !(accessibilityOptions == null ? void 0 : accessibilityOptions.showNavigationScreenReaders),\n nextButton,\n prevButton,\n disableDots: disableDotsNavigation,\n hideButtons: !showPrevNextButtons,\n hideDots: !showDots,\n disableAll: disabledActions,\n rtl,\n Arrow\n }\n ) : null);\n};\nvar PopoverContent_default = PopoverContent;\n\n// Tour.tsx\nvar Tour = (_a) => {\n var _b = _a, {\n currentStep,\n setCurrentStep,\n setIsOpen,\n steps = [],\n setSteps,\n styles: globalStyles = {},\n scrollSmooth,\n afterOpen,\n beforeClose,\n padding = 10,\n position,\n onClickMask,\n onClickHighlighted,\n keyboardHandler,\n className = \"reactour__popover\",\n maskClassName = \"reactour__mask\",\n highlightedMaskClassName,\n clipId,\n maskId,\n disableInteraction,\n disableKeyboardNavigation: disableKeyboardNavigation,\n inViewThreshold,\n disabledActions,\n setDisabledActions,\n disableWhenSelectorFalsy,\n rtl,\n accessibilityOptions = {\n closeButtonAriaLabel: \"Close Tour\",\n showNavigationScreenReaders: true\n },\n ContentComponent,\n Wrapper,\n meta,\n setMeta,\n onTransition = () => {\n return \"center\";\n }\n } = _b, popoverProps = __objRest(_b, [\n \"currentStep\",\n \"setCurrentStep\",\n \"setIsOpen\",\n \"steps\",\n \"setSteps\",\n \"styles\",\n \"scrollSmooth\",\n \"afterOpen\",\n \"beforeClose\",\n \"padding\",\n \"position\",\n \"onClickMask\",\n \"onClickHighlighted\",\n \"keyboardHandler\",\n \"className\",\n \"maskClassName\",\n \"highlightedMaskClassName\",\n \"clipId\",\n \"maskId\",\n \"disableInteraction\",\n // disableFocusLock,\n \"disableKeyboardNavigation\",\n \"inViewThreshold\",\n \"disabledActions\",\n \"setDisabledActions\",\n \"disableWhenSelectorFalsy\",\n \"rtl\",\n \"accessibilityOptions\",\n \"ContentComponent\",\n \"Wrapper\",\n \"meta\",\n \"setMeta\",\n \"onTransition\"\n ]);\n var _a2;\n const step = steps[currentStep];\n const styles = __spreadValues(__spreadValues({}, globalStyles), step == null ? void 0 : step.styles);\n const {\n sizes,\n transition,\n observableRefresher,\n isHighlightingObserved,\n target\n } = useSizes(step, {\n block: \"center\",\n behavior: scrollSmooth ? \"smooth\" : \"auto\",\n inViewThreshold\n });\n useEffect3(() => {\n if (afterOpen && typeof afterOpen === \"function\") {\n afterOpen(target);\n }\n return () => {\n if (beforeClose && typeof beforeClose === \"function\") {\n beforeClose(target);\n }\n };\n }, []);\n const { maskPadding, popoverPadding, wrapperPadding } = getPadding(\n (_a2 = step == null ? void 0 : step.padding) != null ? _a2 : padding\n );\n const clickProps = {\n setCurrentStep,\n setIsOpen,\n currentStep,\n setSteps,\n steps,\n setMeta,\n meta\n };\n function maskClickHandler() {\n if (!disabledActions) {\n if (onClickMask && typeof onClickMask === \"function\") {\n onClickMask(clickProps);\n } else {\n setIsOpen(false);\n }\n }\n }\n const doDisableInteraction = typeof (step == null ? void 0 : step.stepInteraction) === \"boolean\" ? !(step == null ? void 0 : step.stepInteraction) : disableInteraction ? typeof disableInteraction === \"boolean\" ? disableInteraction : disableInteraction(clickProps) : false;\n useEffect3(() => {\n if ((step == null ? void 0 : step.action) && typeof (step == null ? void 0 : step.action) === \"function\") {\n step == null ? void 0 : step.action(target);\n }\n if ((step == null ? void 0 : step.disableActions) !== void 0) {\n setDisabledActions(step == null ? void 0 : step.disableActions);\n }\n return () => {\n if ((step == null ? void 0 : step.actionAfter) && typeof (step == null ? void 0 : step.actionAfter) === \"function\") {\n step == null ? void 0 : step.actionAfter(target);\n }\n };\n }, [step]);\n const popoverPosition = transition ? onTransition : (step == null ? void 0 : step.position) ? step == null ? void 0 : step.position : position;\n const TourWrapper = Wrapper ? Wrapper : React6.Fragment;\n return step ? /* @__PURE__ */ React6.createElement(TourWrapper, null, /* @__PURE__ */ React6.createElement(\n Observables,\n {\n mutationObservables: step == null ? void 0 : step.mutationObservables,\n resizeObservables: step == null ? void 0 : step.resizeObservables,\n refresh: observableRefresher\n }\n ), /* @__PURE__ */ React6.createElement(\n Keyboard_default,\n {\n setCurrentStep,\n currentStep,\n setIsOpen,\n stepsLength: steps.length,\n disableKeyboardNavigation,\n disable: disabledActions,\n rtl,\n clickProps,\n keyboardHandler\n }\n ), (!disableWhenSelectorFalsy || target) && /* @__PURE__ */ React6.createElement(\n Mask,\n {\n sizes: transition ? initialState2 : sizes,\n onClick: maskClickHandler,\n styles: __spreadValues({\n highlightedArea: (base) => __spreadProps(__spreadValues({}, base), {\n display: doDisableInteraction ? \"block\" : \"none\"\n })\n }, styles),\n padding: transition ? 0 : maskPadding,\n highlightedAreaClassName: highlightedMaskClassName,\n className: maskClassName,\n onClickHighlighted: (e) => {\n e.preventDefault();\n e.stopPropagation();\n if (onClickHighlighted)\n onClickHighlighted(e, clickProps);\n },\n wrapperPadding,\n clipId,\n maskId\n }\n ), (!disableWhenSelectorFalsy || target) && /* @__PURE__ */ React6.createElement(\n Popover,\n {\n sizes,\n styles,\n position: popoverPosition,\n padding: popoverPadding,\n \"aria-labelledby\": accessibilityOptions == null ? void 0 : accessibilityOptions.ariaLabelledBy,\n className,\n refresher: currentStep\n },\n ContentComponent ? /* @__PURE__ */ React6.createElement(\n ContentComponent,\n __spreadValues({\n styles,\n setCurrentStep,\n currentStep,\n setIsOpen,\n steps,\n accessibilityOptions,\n disabledActions,\n transition,\n isHighlightingObserved,\n rtl\n }, popoverProps)\n ) : /* @__PURE__ */ React6.createElement(\n PopoverContent_default,\n __spreadValues({\n styles,\n setCurrentStep,\n currentStep,\n setIsOpen,\n steps,\n setSteps,\n accessibilityOptions,\n disabledActions,\n transition,\n isHighlightingObserved,\n rtl,\n meta,\n setMeta\n }, popoverProps)\n )\n )) : null;\n};\nvar Tour_default = Tour;\nfunction getPadding(padding) {\n if (typeof padding === \"object\" && padding !== null) {\n return {\n maskPadding: padding.mask,\n popoverPadding: padding.popover,\n wrapperPadding: padding.wrapper\n };\n }\n return {\n maskPadding: padding,\n popoverPadding: padding,\n wrapperPadding: 0\n };\n}\nvar initialState2 = {\n bottom: 0,\n height: 0,\n left: 0,\n right: 0,\n top: 0,\n width: 0,\n x: 0,\n y: 0\n};\n\n// Context.tsx\nimport React7, { useState as useState2, useContext } from \"react\";\nvar defaultState = {\n isOpen: false,\n setIsOpen: () => false,\n currentStep: 0,\n setCurrentStep: () => 0,\n steps: [],\n setSteps: () => [],\n setMeta: () => \"\",\n disabledActions: false,\n setDisabledActions: () => false,\n components: {}\n};\nvar TourContext = React7.createContext(defaultState);\nvar TourProvider = (_a) => {\n var _b = _a, {\n children,\n defaultOpen = false,\n startAt = 0,\n steps: defaultSteps,\n setCurrentStep: customSetCurrentStep,\n currentStep: customCurrentStep\n } = _b, props = __objRest(_b, [\n \"children\",\n \"defaultOpen\",\n \"startAt\",\n \"steps\",\n \"setCurrentStep\",\n \"currentStep\"\n ]);\n const [isOpen, setIsOpen] = useState2(defaultOpen);\n const [currentStep, setCurrentStep] = useState2(startAt);\n const [steps, setSteps] = useState2(defaultSteps);\n const [meta, setMeta] = useState2(\"\");\n const [disabledActions, setDisabledActions] = useState2(false);\n const value = __spreadValues({\n isOpen,\n setIsOpen,\n currentStep: customCurrentStep || currentStep,\n setCurrentStep: customSetCurrentStep && typeof customSetCurrentStep === \"function\" ? customSetCurrentStep : setCurrentStep,\n steps,\n setSteps,\n disabledActions,\n setDisabledActions,\n meta,\n setMeta\n }, props);\n return /* @__PURE__ */ React7.createElement(TourContext.Provider, { value }, children, isOpen ? /* @__PURE__ */ React7.createElement(Tour_default, __spreadValues({}, value)) : null);\n};\nvar Context_default = TourContext;\nfunction useTour() {\n return useContext(TourContext);\n}\n\n// withTour.tsx\nimport React8 from \"react\";\nfunction withTour(WrappedComponent) {\n const ComponentWithTour = (props) => {\n const tourProps = useTour();\n return /* @__PURE__ */ React8.createElement(WrappedComponent, __spreadValues(__spreadValues({}, props), tourProps));\n };\n return ComponentWithTour;\n}\n\n// index.tsx\nvar tour_default = Tour_default;\nexport {\n Tour_default as Tour,\n Context_default as TourContext,\n TourProvider,\n components,\n tour_default as default,\n useTour,\n withTour\n};\n"],"names":["prefetch","router","href","options","window","doPrefetch","catch","formatStringOrUrl","urlObjOrString","formatUrl","React","forwardRef","LinkComponent","forwardedRef","children","child","hrefProp","as","asProp","childrenProp","prefetchProp","passHref","replace","shallow","scroll","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","restProps","props","a","useContext","AppRouterContext","prefetchEnabled","appPrefetchKind","PrefetchKind","AUTO","FULL","useMemo","resolvedHref","previousHref","useRef","previousAs","only","childRef","ref","setIntersectionRef","isVisible","resetVisible","useIntersection","rootMargin","setIntersectionWithResetRef","useCallback","current","el","setRef","useMergedRef","useEffect","childProps","e","defaultPrevented","nodeName","currentTarget","toUpperCase","isModifiedEvent","target","event","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","preventDefault","startTransition","navigate","routerScroll","kind","process","env","NODE_ENV","undefined","isAbsoluteUrl","type","addBasePath","cloneElement","hasIntersectionObserver","IntersectionObserver","observers","Map","idList","rootRef","disabled","isDisabled","visible","setVisible","useState","elementRef","setElement","element","tagName","observe","callback","id","observer","elements","createObserver","instance","root","margin","existing","find","obj","get","entries","forEach","entry","isIntersecting","intersectionRatio","push","set","unobserve","delete","size","disconnect","index","findIndex","splice","idleCallback","requestIdleCallback","cancelIdleCallback"],"sourceRoot":"","ignoreList":[2,3,4,5,6,7]}