vendor-framer-motion.bundle.js 620 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217
  1. /******/ (() => { // webpackBootstrap
  2. /******/ "use strict";
  3. /******/ var __webpack_modules__ = ({
  4. /***/ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js":
  5. /*!*******************************************************************************!*\
  6. !*** ./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js ***!
  7. \*******************************************************************************/
  8. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9. __webpack_require__.r(__webpack_exports__);
  10. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  12. /* harmony export */ });
  13. /* harmony import */ var _emotion_memoize__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @emotion/memoize */ "./node_modules/@emotion/memoize/dist/memoize.browser.esm.js");
  14. var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23
  15. var index = (0,_emotion_memoize__WEBPACK_IMPORTED_MODULE_0__["default"])(function (prop) {
  16. return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111
  17. /* o */
  18. && prop.charCodeAt(1) === 110
  19. /* n */
  20. && prop.charCodeAt(2) < 91;
  21. }
  22. /* Z+1 */
  23. );
  24. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (index);
  25. /***/ }),
  26. /***/ "./node_modules/@emotion/memoize/dist/memoize.browser.esm.js":
  27. /*!*******************************************************************!*\
  28. !*** ./node_modules/@emotion/memoize/dist/memoize.browser.esm.js ***!
  29. \*******************************************************************/
  30. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  31. __webpack_require__.r(__webpack_exports__);
  32. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  33. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
  34. /* harmony export */ });
  35. function memoize(fn) {
  36. var cache = {};
  37. return function (arg) {
  38. if (cache[arg] === undefined) cache[arg] = fn(arg);
  39. return cache[arg];
  40. };
  41. }
  42. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (memoize);
  43. /***/ }),
  44. /***/ "./node_modules/framer-motion/dist/es/animation/animate.js":
  45. /*!*****************************************************************!*\
  46. !*** ./node_modules/framer-motion/dist/es/animation/animate.js ***!
  47. \*****************************************************************/
  48. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  49. __webpack_require__.r(__webpack_exports__);
  50. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  51. /* harmony export */ "animate": () => (/* binding */ animate)
  52. /* harmony export */ });
  53. /* harmony import */ var _utils_transitions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/transitions.js */ "./node_modules/framer-motion/dist/es/animation/utils/transitions.js");
  54. /* harmony import */ var _value_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../value/index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  55. /* harmony import */ var _value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../value/utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  56. /**
  57. * Animate a single value or a `MotionValue`.
  58. *
  59. * The first argument is either a `MotionValue` to animate, or an initial animation value.
  60. *
  61. * The second is either a value to animate to, or an array of keyframes to animate through.
  62. *
  63. * The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.
  64. *
  65. * Returns `AnimationPlaybackControls`, currently just a `stop` method.
  66. *
  67. * ```javascript
  68. * const x = useMotionValue(0)
  69. *
  70. * useEffect(() => {
  71. * const controls = animate(x, 100, {
  72. * type: "spring",
  73. * stiffness: 2000,
  74. * onComplete: v => {}
  75. * })
  76. *
  77. * return controls.stop
  78. * })
  79. * ```
  80. *
  81. * @public
  82. */
  83. function animate(from, to, transition) {
  84. if (transition === void 0) { transition = {}; }
  85. var value = (0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_0__.isMotionValue)(from) ? from : (0,_value_index_js__WEBPACK_IMPORTED_MODULE_1__.motionValue)(from);
  86. (0,_utils_transitions_js__WEBPACK_IMPORTED_MODULE_2__.startAnimation)("", value, to, transition);
  87. return {
  88. stop: function () { return value.stop(); },
  89. };
  90. }
  91. /***/ }),
  92. /***/ "./node_modules/framer-motion/dist/es/animation/animation-controls.js":
  93. /*!****************************************************************************!*\
  94. !*** ./node_modules/framer-motion/dist/es/animation/animation-controls.js ***!
  95. \****************************************************************************/
  96. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  97. __webpack_require__.r(__webpack_exports__);
  98. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  99. /* harmony export */ "animationControls": () => (/* binding */ animationControls),
  100. /* harmony export */ "isAnimationControls": () => (/* binding */ isAnimationControls)
  101. /* harmony export */ });
  102. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  103. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  104. /* harmony import */ var _render_utils_setters_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../render/utils/setters.js */ "./node_modules/framer-motion/dist/es/render/utils/setters.js");
  105. /* harmony import */ var _render_utils_animation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../render/utils/animation.js */ "./node_modules/framer-motion/dist/es/render/utils/animation.js");
  106. function animationControls() {
  107. /**
  108. * Track whether the host component has mounted.
  109. */
  110. var hasMounted = false;
  111. /**
  112. * Pending animations that are started before a component is mounted.
  113. * TODO: Remove this as animations should only run in effects
  114. */
  115. var pendingAnimations = [];
  116. /**
  117. * A collection of linked component animation controls.
  118. */
  119. var subscribers = new Set();
  120. var controls = {
  121. subscribe: function (visualElement) {
  122. subscribers.add(visualElement);
  123. return function () { return void subscribers.delete(visualElement); };
  124. },
  125. start: function (definition, transitionOverride) {
  126. /**
  127. * TODO: We only perform this hasMounted check because in Framer we used to
  128. * encourage the ability to start an animation within the render phase. This
  129. * isn't behaviour concurrent-safe so when we make Framer concurrent-safe
  130. * we can ditch this.
  131. */
  132. if (hasMounted) {
  133. var animations_1 = [];
  134. subscribers.forEach(function (visualElement) {
  135. animations_1.push((0,_render_utils_animation_js__WEBPACK_IMPORTED_MODULE_1__.animateVisualElement)(visualElement, definition, {
  136. transitionOverride: transitionOverride,
  137. }));
  138. });
  139. return Promise.all(animations_1);
  140. }
  141. else {
  142. return new Promise(function (resolve) {
  143. pendingAnimations.push({
  144. animation: [definition, transitionOverride],
  145. resolve: resolve,
  146. });
  147. });
  148. }
  149. },
  150. set: function (definition) {
  151. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(hasMounted, "controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook.");
  152. return subscribers.forEach(function (visualElement) {
  153. (0,_render_utils_setters_js__WEBPACK_IMPORTED_MODULE_2__.setValues)(visualElement, definition);
  154. });
  155. },
  156. stop: function () {
  157. subscribers.forEach(function (visualElement) {
  158. (0,_render_utils_animation_js__WEBPACK_IMPORTED_MODULE_1__.stopAnimation)(visualElement);
  159. });
  160. },
  161. mount: function () {
  162. hasMounted = true;
  163. pendingAnimations.forEach(function (_a) {
  164. var animation = _a.animation, resolve = _a.resolve;
  165. controls.start.apply(controls, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__spread)(animation)).then(resolve);
  166. });
  167. return function () {
  168. hasMounted = false;
  169. controls.stop();
  170. };
  171. },
  172. };
  173. return controls;
  174. }
  175. function isAnimationControls(v) {
  176. return typeof v === "object" && typeof v.start === "function";
  177. }
  178. /***/ }),
  179. /***/ "./node_modules/framer-motion/dist/es/animation/use-animated-state.js":
  180. /*!****************************************************************************!*\
  181. !*** ./node_modules/framer-motion/dist/es/animation/use-animated-state.js ***!
  182. \****************************************************************************/
  183. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  184. __webpack_require__.r(__webpack_exports__);
  185. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  186. /* harmony export */ "useAnimatedState": () => (/* binding */ useAnimatedState)
  187. /* harmony export */ });
  188. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  189. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  190. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  191. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  192. /* harmony import */ var _utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/geometry/index.js */ "./node_modules/framer-motion/dist/es/utils/geometry/index.js");
  193. /* harmony import */ var _render_utils_setters_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../render/utils/setters.js */ "./node_modules/framer-motion/dist/es/render/utils/setters.js");
  194. /* harmony import */ var _render_utils_animation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../render/utils/animation.js */ "./node_modules/framer-motion/dist/es/render/utils/animation.js");
  195. /* harmony import */ var _render_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../render/index.js */ "./node_modules/framer-motion/dist/es/render/index.js");
  196. /* harmony import */ var _motion_utils_use_visual_state_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../motion/utils/use-visual-state.js */ "./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js");
  197. var createObject = function () { return ({}); };
  198. var stateVisualElement = (0,_render_index_js__WEBPACK_IMPORTED_MODULE_1__.visualElement)({
  199. build: function () { },
  200. measureViewportBox: _utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_2__.axisBox,
  201. resetTransform: function () { },
  202. restoreTransform: function () { },
  203. removeValueFromRenderState: function () { },
  204. render: function () { },
  205. scrapeMotionValuesFromProps: createObject,
  206. readValueFromInstance: function (_state, key, options) {
  207. return options.initialState[key] || 0;
  208. },
  209. makeTargetAnimatable: function (element, _a) {
  210. var transition = _a.transition, transitionEnd = _a.transitionEnd, target = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__rest)(_a, ["transition", "transitionEnd"]);
  211. var origin = (0,_render_utils_setters_js__WEBPACK_IMPORTED_MODULE_4__.getOrigin)(target, transition || {}, element);
  212. (0,_render_utils_setters_js__WEBPACK_IMPORTED_MODULE_4__.checkTargetForNewValues)(element, target, origin);
  213. return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ transition: transition, transitionEnd: transitionEnd }, target);
  214. },
  215. });
  216. var useVisualState = (0,_motion_utils_use_visual_state_js__WEBPACK_IMPORTED_MODULE_5__.makeUseVisualState)({
  217. scrapeMotionValuesFromProps: createObject,
  218. createRenderState: createObject,
  219. });
  220. /**
  221. * This is not an officially supported API and may be removed
  222. * on any version.
  223. * @internal
  224. */
  225. function useAnimatedState(initialState) {
  226. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__read)((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initialState), 2), animationState = _a[0], setAnimationState = _a[1];
  227. var visualState = useVisualState({}, false);
  228. var element = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_6__.useConstant)(function () {
  229. return stateVisualElement({ props: {}, visualState: visualState }, { initialState: initialState });
  230. });
  231. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  232. element.mount({});
  233. return element.unmount();
  234. }, []);
  235. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  236. element.setProps({
  237. onUpdate: function (v) { return setAnimationState((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, v)); },
  238. });
  239. });
  240. var startAnimation = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_6__.useConstant)(function () { return function (animationDefinition) {
  241. return (0,_render_utils_animation_js__WEBPACK_IMPORTED_MODULE_7__.animateVisualElement)(element, animationDefinition);
  242. }; });
  243. return [animationState, startAnimation];
  244. }
  245. /***/ }),
  246. /***/ "./node_modules/framer-motion/dist/es/animation/use-animation.js":
  247. /*!***********************************************************************!*\
  248. !*** ./node_modules/framer-motion/dist/es/animation/use-animation.js ***!
  249. \***********************************************************************/
  250. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  251. __webpack_require__.r(__webpack_exports__);
  252. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  253. /* harmony export */ "useAnimation": () => (/* binding */ useAnimation)
  254. /* harmony export */ });
  255. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  256. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  257. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  258. /* harmony import */ var _animation_controls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./animation-controls.js */ "./node_modules/framer-motion/dist/es/animation/animation-controls.js");
  259. /**
  260. * Creates `AnimationControls`, which can be used to manually start, stop
  261. * and sequence animations on one or more components.
  262. *
  263. * The returned `AnimationControls` should be passed to the `animate` property
  264. * of the components you want to animate.
  265. *
  266. * These components can then be animated with the `start` method.
  267. *
  268. * @library
  269. *
  270. * ```jsx
  271. * import * as React from 'react'
  272. * import { Frame, useAnimation } from 'framer'
  273. *
  274. * export function MyComponent(props) {
  275. * const controls = useAnimation()
  276. *
  277. * controls.start({
  278. * x: 100,
  279. * transition: { duration: 0.5 },
  280. * })
  281. *
  282. * return <Frame animate={controls} />
  283. * }
  284. * ```
  285. *
  286. * @motion
  287. *
  288. * ```jsx
  289. * import * as React from 'react'
  290. * import { motion, useAnimation } from 'framer-motion'
  291. *
  292. * export function MyComponent(props) {
  293. * const controls = useAnimation()
  294. *
  295. * controls.start({
  296. * x: 100,
  297. * transition: { duration: 0.5 },
  298. * })
  299. *
  300. * return <motion.div animate={controls} />
  301. * }
  302. * ```
  303. *
  304. * @returns Animation controller with `start` and `stop` methods
  305. *
  306. * @public
  307. */
  308. function useAnimation() {
  309. var controls = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__.useConstant)(_animation_controls_js__WEBPACK_IMPORTED_MODULE_2__.animationControls);
  310. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(controls.mount, []);
  311. return controls;
  312. }
  313. /***/ }),
  314. /***/ "./node_modules/framer-motion/dist/es/animation/utils/default-transitions.js":
  315. /*!***********************************************************************************!*\
  316. !*** ./node_modules/framer-motion/dist/es/animation/utils/default-transitions.js ***!
  317. \***********************************************************************************/
  318. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  319. __webpack_require__.r(__webpack_exports__);
  320. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  321. /* harmony export */ "criticallyDampedSpring": () => (/* binding */ criticallyDampedSpring),
  322. /* harmony export */ "getDefaultTransition": () => (/* binding */ getDefaultTransition),
  323. /* harmony export */ "linearTween": () => (/* binding */ linearTween),
  324. /* harmony export */ "underDampedSpring": () => (/* binding */ underDampedSpring)
  325. /* harmony export */ });
  326. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  327. /* harmony import */ var _is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-keyframes-target.js */ "./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js");
  328. var underDampedSpring = function () { return ({
  329. type: "spring",
  330. stiffness: 500,
  331. damping: 25,
  332. restDelta: 0.5,
  333. restSpeed: 10,
  334. }); };
  335. var criticallyDampedSpring = function (to) { return ({
  336. type: "spring",
  337. stiffness: 550,
  338. damping: to === 0 ? 2 * Math.sqrt(550) : 30,
  339. restDelta: 0.01,
  340. restSpeed: 10,
  341. }); };
  342. var linearTween = function () { return ({
  343. type: "keyframes",
  344. ease: "linear",
  345. duration: 0.3,
  346. }); };
  347. var keyframes = function (values) { return ({
  348. type: "keyframes",
  349. duration: 0.8,
  350. values: values,
  351. }); };
  352. var defaultTransitions = {
  353. x: underDampedSpring,
  354. y: underDampedSpring,
  355. z: underDampedSpring,
  356. rotate: underDampedSpring,
  357. rotateX: underDampedSpring,
  358. rotateY: underDampedSpring,
  359. rotateZ: underDampedSpring,
  360. scaleX: criticallyDampedSpring,
  361. scaleY: criticallyDampedSpring,
  362. scale: criticallyDampedSpring,
  363. opacity: linearTween,
  364. backgroundColor: linearTween,
  365. color: linearTween,
  366. default: criticallyDampedSpring,
  367. };
  368. var getDefaultTransition = function (valueKey, to) {
  369. var transitionFactory;
  370. if ((0,_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_0__.isKeyframesTarget)(to)) {
  371. transitionFactory = keyframes;
  372. }
  373. else {
  374. transitionFactory =
  375. defaultTransitions[valueKey] || defaultTransitions.default;
  376. }
  377. return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ to: to }, transitionFactory(to));
  378. };
  379. /***/ }),
  380. /***/ "./node_modules/framer-motion/dist/es/animation/utils/easing.js":
  381. /*!**********************************************************************!*\
  382. !*** ./node_modules/framer-motion/dist/es/animation/utils/easing.js ***!
  383. \**********************************************************************/
  384. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  385. __webpack_require__.r(__webpack_exports__);
  386. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  387. /* harmony export */ "easingDefinitionToFunction": () => (/* binding */ easingDefinitionToFunction),
  388. /* harmony export */ "isEasingArray": () => (/* binding */ isEasingArray)
  389. /* harmony export */ });
  390. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  391. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  392. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/easing/index.js");
  393. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/easing/cubic-bezier.js");
  394. var easingLookup = {
  395. linear: popmotion__WEBPACK_IMPORTED_MODULE_1__.linear,
  396. easeIn: popmotion__WEBPACK_IMPORTED_MODULE_1__.easeIn,
  397. easeInOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.easeInOut,
  398. easeOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.easeOut,
  399. circIn: popmotion__WEBPACK_IMPORTED_MODULE_1__.circIn,
  400. circInOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.circInOut,
  401. circOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.circOut,
  402. backIn: popmotion__WEBPACK_IMPORTED_MODULE_1__.backIn,
  403. backInOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.backInOut,
  404. backOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.backOut,
  405. anticipate: popmotion__WEBPACK_IMPORTED_MODULE_1__.anticipate,
  406. bounceIn: popmotion__WEBPACK_IMPORTED_MODULE_1__.bounceIn,
  407. bounceInOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.bounceInOut,
  408. bounceOut: popmotion__WEBPACK_IMPORTED_MODULE_1__.bounceOut,
  409. };
  410. var easingDefinitionToFunction = function (definition) {
  411. if (Array.isArray(definition)) {
  412. // If cubic bezier definition, create bezier curve
  413. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(definition.length === 4, "Cubic bezier arrays must contain four numerical values.");
  414. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__read)(definition, 4), x1 = _a[0], y1 = _a[1], x2 = _a[2], y2 = _a[3];
  415. return (0,popmotion__WEBPACK_IMPORTED_MODULE_3__.cubicBezier)(x1, y1, x2, y2);
  416. }
  417. else if (typeof definition === "string") {
  418. // Else lookup from table
  419. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(easingLookup[definition] !== undefined, "Invalid easing type '" + definition + "'");
  420. return easingLookup[definition];
  421. }
  422. return definition;
  423. };
  424. var isEasingArray = function (ease) {
  425. return Array.isArray(ease) && typeof ease[0] !== "number";
  426. };
  427. /***/ }),
  428. /***/ "./node_modules/framer-motion/dist/es/animation/utils/is-animatable.js":
  429. /*!*****************************************************************************!*\
  430. !*** ./node_modules/framer-motion/dist/es/animation/utils/is-animatable.js ***!
  431. \*****************************************************************************/
  432. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  433. __webpack_require__.r(__webpack_exports__);
  434. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  435. /* harmony export */ "isAnimatable": () => (/* binding */ isAnimatable)
  436. /* harmony export */ });
  437. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/complex/index.js");
  438. /**
  439. * Check if a value is animatable. Examples:
  440. *
  441. * ✅: 100, "100px", "#fff"
  442. * ❌: "block", "url(2.jpg)"
  443. * @param value
  444. *
  445. * @internal
  446. */
  447. var isAnimatable = function (key, value) {
  448. // If the list of keys tat might be non-animatable grows, replace with Set
  449. if (key === "zIndex")
  450. return false;
  451. // If it's a number or a keyframes array, we can animate it. We might at some point
  452. // need to do a deep isAnimatable check of keyframes, or let Popmotion handle this,
  453. // but for now lets leave it like this for performance reasons
  454. if (typeof value === "number" || Array.isArray(value))
  455. return true;
  456. if (typeof value === "string" && // It's animatable if we have a string
  457. style_value_types__WEBPACK_IMPORTED_MODULE_0__.complex.test(value) && // And it contains numbers and/or colors
  458. !value.startsWith("url(") // Unless it starts with "url("
  459. ) {
  460. return true;
  461. }
  462. return false;
  463. };
  464. /***/ }),
  465. /***/ "./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js":
  466. /*!***********************************************************************************!*\
  467. !*** ./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js ***!
  468. \***********************************************************************************/
  469. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  470. __webpack_require__.r(__webpack_exports__);
  471. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  472. /* harmony export */ "isKeyframesTarget": () => (/* binding */ isKeyframesTarget)
  473. /* harmony export */ });
  474. var isKeyframesTarget = function (v) {
  475. return Array.isArray(v);
  476. };
  477. /***/ }),
  478. /***/ "./node_modules/framer-motion/dist/es/animation/utils/transitions.js":
  479. /*!***************************************************************************!*\
  480. !*** ./node_modules/framer-motion/dist/es/animation/utils/transitions.js ***!
  481. \***************************************************************************/
  482. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  483. __webpack_require__.r(__webpack_exports__);
  484. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  485. /* harmony export */ "convertTransitionToAnimationOptions": () => (/* binding */ convertTransitionToAnimationOptions),
  486. /* harmony export */ "getDelayFromTransition": () => (/* binding */ getDelayFromTransition),
  487. /* harmony export */ "getPopmotionAnimationOptions": () => (/* binding */ getPopmotionAnimationOptions),
  488. /* harmony export */ "getValueTransition": () => (/* binding */ getValueTransition),
  489. /* harmony export */ "hydrateKeyframes": () => (/* binding */ hydrateKeyframes),
  490. /* harmony export */ "isTransitionDefined": () => (/* binding */ isTransitionDefined),
  491. /* harmony export */ "startAnimation": () => (/* binding */ startAnimation)
  492. /* harmony export */ });
  493. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  494. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  495. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/animations/inertia.js");
  496. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/animations/index.js");
  497. /* harmony import */ var _utils_time_conversion_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/time-conversion.js */ "./node_modules/framer-motion/dist/es/utils/time-conversion.js");
  498. /* harmony import */ var _easing_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./easing.js */ "./node_modules/framer-motion/dist/es/animation/utils/easing.js");
  499. /* harmony import */ var _is_animatable_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./is-animatable.js */ "./node_modules/framer-motion/dist/es/animation/utils/is-animatable.js");
  500. /* harmony import */ var _default_transitions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./default-transitions.js */ "./node_modules/framer-motion/dist/es/animation/utils/default-transitions.js");
  501. /* harmony import */ var _render_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../render/dom/utils/value-types.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js");
  502. /**
  503. * Decide whether a transition is defined on a given Transition.
  504. * This filters out orchestration options and returns true
  505. * if any options are left.
  506. */
  507. function isTransitionDefined(_a) {
  508. var when = _a.when, delay = _a.delay, delayChildren = _a.delayChildren, staggerChildren = _a.staggerChildren, staggerDirection = _a.staggerDirection, repeat = _a.repeat, repeatType = _a.repeatType, repeatDelay = _a.repeatDelay, from = _a.from, transition = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["when", "delay", "delayChildren", "staggerChildren", "staggerDirection", "repeat", "repeatType", "repeatDelay", "from"]);
  509. return !!Object.keys(transition).length;
  510. }
  511. var legacyRepeatWarning = false;
  512. /**
  513. * Convert Framer Motion's Transition type into Popmotion-compatible options.
  514. */
  515. function convertTransitionToAnimationOptions(_a) {
  516. var ease = _a.ease, times = _a.times, yoyo = _a.yoyo, flip = _a.flip, loop = _a.loop, transition = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["ease", "times", "yoyo", "flip", "loop"]);
  517. var options = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, transition);
  518. if (times)
  519. options["offset"] = times;
  520. /**
  521. * Convert any existing durations from seconds to milliseconds
  522. */
  523. if (transition.duration)
  524. options["duration"] = (0,_utils_time_conversion_js__WEBPACK_IMPORTED_MODULE_2__.secondsToMilliseconds)(transition.duration);
  525. if (transition.repeatDelay)
  526. options.repeatDelay = (0,_utils_time_conversion_js__WEBPACK_IMPORTED_MODULE_2__.secondsToMilliseconds)(transition.repeatDelay);
  527. /**
  528. * Map easing names to Popmotion's easing functions
  529. */
  530. if (ease) {
  531. options["ease"] = (0,_easing_js__WEBPACK_IMPORTED_MODULE_3__.isEasingArray)(ease)
  532. ? ease.map(_easing_js__WEBPACK_IMPORTED_MODULE_3__.easingDefinitionToFunction)
  533. : (0,_easing_js__WEBPACK_IMPORTED_MODULE_3__.easingDefinitionToFunction)(ease);
  534. }
  535. /**
  536. * Support legacy transition API
  537. */
  538. if (transition.type === "tween")
  539. options.type = "keyframes";
  540. /**
  541. * TODO: These options are officially removed from the API.
  542. */
  543. if (yoyo || loop || flip) {
  544. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.warning)(!legacyRepeatWarning, "yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options.");
  545. legacyRepeatWarning = true;
  546. if (yoyo) {
  547. options.repeatType = "reverse";
  548. }
  549. else if (loop) {
  550. options.repeatType = "loop";
  551. }
  552. else if (flip) {
  553. options.repeatType = "mirror";
  554. }
  555. options.repeat = loop || yoyo || flip || transition.repeat;
  556. }
  557. /**
  558. * TODO: Popmotion 9 has the ability to automatically detect whether to use
  559. * a keyframes or spring animation, but does so by detecting velocity and other spring options.
  560. * It'd be good to introduce a similar thing here.
  561. */
  562. if (transition.type !== "spring")
  563. options.type = "keyframes";
  564. return options;
  565. }
  566. /**
  567. * Get the delay for a value by checking Transition with decreasing specificity.
  568. */
  569. function getDelayFromTransition(transition, key) {
  570. var _a;
  571. var valueTransition = getValueTransition(transition, key) || {};
  572. return (_a = valueTransition.delay) !== null && _a !== void 0 ? _a : 0;
  573. }
  574. function hydrateKeyframes(options) {
  575. if (Array.isArray(options.to) && options.to[0] === null) {
  576. options.to = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(options.to);
  577. options.to[0] = options.from;
  578. }
  579. return options;
  580. }
  581. function getPopmotionAnimationOptions(transition, options, key) {
  582. var _a;
  583. if (Array.isArray(options.to)) {
  584. (_a = transition.duration) !== null && _a !== void 0 ? _a : (transition.duration = 0.8);
  585. }
  586. hydrateKeyframes(options);
  587. /**
  588. * Get a default transition if none is determined to be defined.
  589. */
  590. if (!isTransitionDefined(transition)) {
  591. transition = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, transition), (0,_default_transitions_js__WEBPACK_IMPORTED_MODULE_4__.getDefaultTransition)(key, options.to));
  592. }
  593. return (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, options), convertTransitionToAnimationOptions(transition));
  594. }
  595. /**
  596. *
  597. */
  598. function getAnimation(key, value, target, transition, onComplete) {
  599. var _a;
  600. var valueTransition = getValueTransition(transition, key);
  601. var origin = (_a = valueTransition.from) !== null && _a !== void 0 ? _a : value.get();
  602. var isTargetAnimatable = (0,_is_animatable_js__WEBPACK_IMPORTED_MODULE_5__.isAnimatable)(key, target);
  603. /**
  604. * If we're trying to animate from "none", try and get an animatable version
  605. * of the target. This could be improved to work both ways.
  606. */
  607. if (origin === "none" && isTargetAnimatable && typeof target === "string") {
  608. origin = (0,_render_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_6__.getAnimatableNone)(key, target);
  609. }
  610. var isOriginAnimatable = (0,_is_animatable_js__WEBPACK_IMPORTED_MODULE_5__.isAnimatable)(key, origin);
  611. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.warning)(isOriginAnimatable === isTargetAnimatable, "You are trying to animate " + key + " from \"" + origin + "\" to \"" + target + "\". " + origin + " is not an animatable value - to enable this animation set " + origin + " to a value animatable to " + target + " via the `style` property.");
  612. function start() {
  613. var options = {
  614. from: origin,
  615. to: target,
  616. velocity: value.getVelocity(),
  617. onComplete: onComplete,
  618. onUpdate: function (v) { return value.set(v); },
  619. };
  620. return valueTransition.type === "inertia" ||
  621. valueTransition.type === "decay"
  622. ? (0,popmotion__WEBPACK_IMPORTED_MODULE_7__.inertia)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, options), valueTransition))
  623. : (0,popmotion__WEBPACK_IMPORTED_MODULE_8__.animate)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, getPopmotionAnimationOptions(valueTransition, options, key)), { onUpdate: function (v) {
  624. var _a;
  625. options.onUpdate(v);
  626. (_a = valueTransition.onUpdate) === null || _a === void 0 ? void 0 : _a.call(valueTransition, v);
  627. }, onComplete: function () {
  628. var _a;
  629. options.onComplete();
  630. (_a = valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);
  631. } }));
  632. }
  633. function set() {
  634. var _a;
  635. value.set(target);
  636. onComplete();
  637. (_a = valueTransition === null || valueTransition === void 0 ? void 0 : valueTransition.onComplete) === null || _a === void 0 ? void 0 : _a.call(valueTransition);
  638. return { stop: function () { } };
  639. }
  640. return !isOriginAnimatable ||
  641. !isTargetAnimatable ||
  642. valueTransition.type === false
  643. ? set
  644. : start;
  645. }
  646. function getValueTransition(transition, key) {
  647. return transition[key] || transition["default"] || transition;
  648. }
  649. /**
  650. * Start animation on a MotionValue. This function is an interface between
  651. * Framer Motion and Popmotion
  652. *
  653. * @internal
  654. */
  655. function startAnimation(key, value, target, transition) {
  656. if (transition === void 0) { transition = {}; }
  657. return value.start(function (onComplete) {
  658. var delayTimer;
  659. var controls;
  660. var animation = getAnimation(key, value, target, transition, onComplete);
  661. var delay = getDelayFromTransition(transition, key);
  662. var start = function () { return (controls = animation()); };
  663. if (delay) {
  664. delayTimer = setTimeout(start, (0,_utils_time_conversion_js__WEBPACK_IMPORTED_MODULE_2__.secondsToMilliseconds)(delay));
  665. }
  666. else {
  667. start();
  668. }
  669. return function () {
  670. clearTimeout(delayTimer);
  671. controls === null || controls === void 0 ? void 0 : controls.stop();
  672. };
  673. });
  674. }
  675. /***/ }),
  676. /***/ "./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js":
  677. /*!****************************************************************************************!*\
  678. !*** ./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js ***!
  679. \****************************************************************************************/
  680. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  681. __webpack_require__.r(__webpack_exports__);
  682. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  683. /* harmony export */ "PresenceChild": () => (/* binding */ PresenceChild)
  684. /* harmony export */ });
  685. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  686. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  687. /* harmony import */ var _context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../context/PresenceContext.js */ "./node_modules/framer-motion/dist/es/context/PresenceContext.js");
  688. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  689. var presenceId = 0;
  690. function getPresenceId() {
  691. var id = presenceId;
  692. presenceId++;
  693. return id;
  694. }
  695. var PresenceChild = function (_a) {
  696. var children = _a.children, initial = _a.initial, isPresent = _a.isPresent, onExitComplete = _a.onExitComplete, custom = _a.custom, presenceAffectsLayout = _a.presenceAffectsLayout;
  697. var presenceChildren = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__.useConstant)(newChildrenMap);
  698. var id = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__.useConstant)(getPresenceId);
  699. var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return ({
  700. id: id,
  701. initial: initial,
  702. isPresent: isPresent,
  703. custom: custom,
  704. onExitComplete: function (childId) {
  705. presenceChildren.set(childId, true);
  706. var allComplete = true;
  707. presenceChildren.forEach(function (isComplete) {
  708. if (!isComplete)
  709. allComplete = false;
  710. });
  711. allComplete && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());
  712. },
  713. register: function (childId) {
  714. presenceChildren.set(childId, false);
  715. return function () { return presenceChildren.delete(childId); };
  716. },
  717. }); },
  718. /**
  719. * If the presence of a child affects the layout of the components around it,
  720. * we want to make a new context value to ensure they get re-rendered
  721. * so they can detect that layout change.
  722. */
  723. presenceAffectsLayout ? undefined : [isPresent]);
  724. (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
  725. presenceChildren.forEach(function (_, key) { return presenceChildren.set(key, false); });
  726. }, [isPresent]);
  727. /**
  728. * If there's no `motion` components to fire exit animations, we want to remove this
  729. * component immediately.
  730. */
  731. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  732. !isPresent && !presenceChildren.size && (onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete());
  733. }, [isPresent]);
  734. return ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_2__.PresenceContext.Provider, { value: context }, children));
  735. };
  736. function newChildrenMap() {
  737. return new Map();
  738. }
  739. /***/ }),
  740. /***/ "./node_modules/framer-motion/dist/es/components/AnimatePresence/index.js":
  741. /*!********************************************************************************!*\
  742. !*** ./node_modules/framer-motion/dist/es/components/AnimatePresence/index.js ***!
  743. \********************************************************************************/
  744. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  745. __webpack_require__.r(__webpack_exports__);
  746. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  747. /* harmony export */ "AnimatePresence": () => (/* binding */ AnimatePresence)
  748. /* harmony export */ });
  749. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  750. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  751. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  752. /* harmony import */ var _context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../context/SharedLayoutContext.js */ "./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js");
  753. /* harmony import */ var _utils_use_force_update_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/use-force-update.js */ "./node_modules/framer-motion/dist/es/utils/use-force-update.js");
  754. /* harmony import */ var _PresenceChild_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PresenceChild.js */ "./node_modules/framer-motion/dist/es/components/AnimatePresence/PresenceChild.js");
  755. function getChildKey(child) {
  756. return child.key || "";
  757. }
  758. function updateChildLookup(children, allChildren) {
  759. var seenChildren = true ? new Set() : 0;
  760. children.forEach(function (child) {
  761. var key = getChildKey(child);
  762. if ( true && seenChildren) {
  763. if (seenChildren.has(key)) {
  764. console.warn("Children of AnimatePresence require unique keys. \"" + key + "\" is a duplicate.");
  765. }
  766. seenChildren.add(key);
  767. }
  768. allChildren.set(key, child);
  769. });
  770. }
  771. function onlyElements(children) {
  772. var filtered = [];
  773. // We use forEach here instead of map as map mutates the component key by preprending `.$`
  774. react__WEBPACK_IMPORTED_MODULE_0__.Children.forEach(children, function (child) {
  775. if ((0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(child))
  776. filtered.push(child);
  777. });
  778. return filtered;
  779. }
  780. /**
  781. * `AnimatePresence` enables the animation of components that have been removed from the tree.
  782. *
  783. * When adding/removing more than a single child, every child **must** be given a unique `key` prop.
  784. *
  785. * @library
  786. *
  787. * Any `Frame` components that have an `exit` property defined will animate out when removed from
  788. * the tree.
  789. *
  790. * ```jsx
  791. * import { Frame, AnimatePresence } from 'framer'
  792. *
  793. * // As items are added and removed from `items`
  794. * export function Items({ items }) {
  795. * return (
  796. * <AnimatePresence>
  797. * {items.map(item => (
  798. * <Frame
  799. * key={item.id}
  800. * initial={{ opacity: 0 }}
  801. * animate={{ opacity: 1 }}
  802. * exit={{ opacity: 0 }}
  803. * />
  804. * ))}
  805. * </AnimatePresence>
  806. * )
  807. * }
  808. * ```
  809. *
  810. * You can sequence exit animations throughout a tree using variants.
  811. *
  812. * @motion
  813. *
  814. * Any `motion` components that have an `exit` property defined will animate out when removed from
  815. * the tree.
  816. *
  817. * ```jsx
  818. * import { motion, AnimatePresence } from 'framer-motion'
  819. *
  820. * export const Items = ({ items }) => (
  821. * <AnimatePresence>
  822. * {items.map(item => (
  823. * <motion.div
  824. * key={item.id}
  825. * initial={{ opacity: 0 }}
  826. * animate={{ opacity: 1 }}
  827. * exit={{ opacity: 0 }}
  828. * />
  829. * ))}
  830. * </AnimatePresence>
  831. * )
  832. * ```
  833. *
  834. * You can sequence exit animations throughout a tree using variants.
  835. *
  836. * If a child contains multiple `motion` components with `exit` props, it will only unmount the child
  837. * once all `motion` components have finished animating out. Likewise, any components using
  838. * `usePresence` all need to call `safeToRemove`.
  839. *
  840. * @public
  841. */
  842. var AnimatePresence = function (_a) {
  843. var children = _a.children, custom = _a.custom, _b = _a.initial, initial = _b === void 0 ? true : _b, onExitComplete = _a.onExitComplete, exitBeforeEnter = _a.exitBeforeEnter, _c = _a.presenceAffectsLayout, presenceAffectsLayout = _c === void 0 ? true : _c;
  844. // We want to force a re-render once all exiting animations have finished. We
  845. // either use a local forceRender function, or one from a parent context if it exists.
  846. var forceRender = (0,_utils_use_force_update_js__WEBPACK_IMPORTED_MODULE_1__.useForceUpdate)();
  847. var layoutContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.SharedLayoutContext);
  848. if ((0,_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.isSharedLayout)(layoutContext)) {
  849. forceRender = layoutContext.forceUpdate;
  850. }
  851. var isInitialRender = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(true);
  852. // Filter out any children that aren't ReactElements. We can only track ReactElements with a props.key
  853. var filteredChildren = onlyElements(children);
  854. // Keep a living record of the children we're actually rendering so we
  855. // can diff to figure out which are entering and exiting
  856. var presentChildren = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(filteredChildren);
  857. // A lookup table to quickly reference components by key
  858. var allChildren = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(new Map())
  859. .current;
  860. // A living record of all currently exiting components.
  861. var exiting = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(new Set()).current;
  862. updateChildLookup(filteredChildren, allChildren);
  863. // If this is the initial component render, just deal with logic surrounding whether
  864. // we play onMount animations or not.
  865. if (isInitialRender.current) {
  866. isInitialRender.current = false;
  867. return ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, filteredChildren.map(function (child) { return ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PresenceChild_js__WEBPACK_IMPORTED_MODULE_3__.PresenceChild, { key: getChildKey(child), isPresent: true, initial: initial ? undefined : false, presenceAffectsLayout: presenceAffectsLayout }, child)); })));
  868. }
  869. // If this is a subsequent render, deal with entering and exiting children
  870. var childrenToRender = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__spread)(filteredChildren);
  871. // Diff the keys of the currently-present and target children to update our
  872. // exiting list.
  873. var presentKeys = presentChildren.current.map(getChildKey);
  874. var targetKeys = filteredChildren.map(getChildKey);
  875. // Diff the present children with our target children and mark those that are exiting
  876. var numPresent = presentKeys.length;
  877. for (var i = 0; i < numPresent; i++) {
  878. var key = presentKeys[i];
  879. if (targetKeys.indexOf(key) === -1) {
  880. exiting.add(key);
  881. }
  882. else {
  883. // In case this key has re-entered, remove from the exiting list
  884. exiting.delete(key);
  885. }
  886. }
  887. // If we currently have exiting children, and we're deferring rendering incoming children
  888. // until after all current children have exiting, empty the childrenToRender array
  889. if (exitBeforeEnter && exiting.size) {
  890. childrenToRender = [];
  891. }
  892. // Loop through all currently exiting components and clone them to overwrite `animate`
  893. // with any `exit` prop they might have defined.
  894. exiting.forEach(function (key) {
  895. // If this component is actually entering again, early return
  896. if (targetKeys.indexOf(key) !== -1)
  897. return;
  898. var child = allChildren.get(key);
  899. if (!child)
  900. return;
  901. var insertionIndex = presentKeys.indexOf(key);
  902. var onExit = function () {
  903. allChildren.delete(key);
  904. exiting.delete(key);
  905. // Remove this child from the present children
  906. var removeIndex = presentChildren.current.findIndex(function (presentChild) { return presentChild.key === key; });
  907. presentChildren.current.splice(removeIndex, 1);
  908. // Defer re-rendering until all exiting children have indeed left
  909. if (!exiting.size) {
  910. presentChildren.current = filteredChildren;
  911. forceRender();
  912. onExitComplete && onExitComplete();
  913. }
  914. };
  915. childrenToRender.splice(insertionIndex, 0, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PresenceChild_js__WEBPACK_IMPORTED_MODULE_3__.PresenceChild, { key: getChildKey(child), isPresent: false, onExitComplete: onExit, custom: custom, presenceAffectsLayout: presenceAffectsLayout }, child));
  916. });
  917. // Add `MotionContext` even to children that don't need it to ensure we're rendering
  918. // the same tree between renders
  919. childrenToRender = childrenToRender.map(function (child) {
  920. var key = child.key;
  921. return exiting.has(key) ? (child) : ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_PresenceChild_js__WEBPACK_IMPORTED_MODULE_3__.PresenceChild, { key: getChildKey(child), isPresent: true, presenceAffectsLayout: presenceAffectsLayout }, child));
  922. });
  923. presentChildren.current = childrenToRender;
  924. if ( true &&
  925. exitBeforeEnter &&
  926. childrenToRender.length > 1) {
  927. console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour.");
  928. }
  929. return ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, exiting.size
  930. ? childrenToRender
  931. : childrenToRender.map(function (child) { return (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(child); })));
  932. };
  933. /***/ }),
  934. /***/ "./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js":
  935. /*!***************************************************************************************!*\
  936. !*** ./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js ***!
  937. \***************************************************************************************/
  938. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  939. __webpack_require__.r(__webpack_exports__);
  940. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  941. /* harmony export */ "isPresent": () => (/* binding */ isPresent),
  942. /* harmony export */ "useIsPresent": () => (/* binding */ useIsPresent),
  943. /* harmony export */ "usePresence": () => (/* binding */ usePresence)
  944. /* harmony export */ });
  945. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  946. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  947. /* harmony import */ var _context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../context/PresenceContext.js */ "./node_modules/framer-motion/dist/es/context/PresenceContext.js");
  948. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  949. /**
  950. * When a component is the child of `AnimatePresence`, it can use `usePresence`
  951. * to access information about whether it's still present in the React tree.
  952. *
  953. * ```jsx
  954. * import { usePresence } from "framer-motion"
  955. *
  956. * export const Component = () => {
  957. * const [isPresent, safeToRemove] = usePresence()
  958. *
  959. * useEffect(() => {
  960. * !isPresent && setTimeout(safeToRemove, 1000)
  961. * }, [isPresent])
  962. *
  963. * return <div />
  964. * }
  965. * ```
  966. *
  967. * If `isPresent` is `false`, it means that a component has been removed the tree, but
  968. * `AnimatePresence` won't really remove it until `safeToRemove` has been called.
  969. *
  970. * @public
  971. */
  972. function usePresence() {
  973. var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_1__.PresenceContext);
  974. if (context === null)
  975. return [true, null];
  976. var isPresent = context.isPresent, onExitComplete = context.onExitComplete, register = context.register;
  977. // It's safe to call the following hooks conditionally (after an early return) because the context will always
  978. // either be null or non-null for the lifespan of the component.
  979. // Replace with useOpaqueId when released in React
  980. var id = useUniqueId();
  981. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { return register(id); }, []);
  982. var safeToRemove = function () { return onExitComplete === null || onExitComplete === void 0 ? void 0 : onExitComplete(id); };
  983. return !isPresent && onExitComplete ? [false, safeToRemove] : [true];
  984. }
  985. /**
  986. * Similar to `usePresence`, except `useIsPresent` simply returns whether or not the component is present.
  987. * There is no `safeToRemove` function.
  988. *
  989. * ```jsx
  990. * import { useIsPresent } from "framer-motion"
  991. *
  992. * export const Component = () => {
  993. * const isPresent = useIsPresent()
  994. *
  995. * useEffect(() => {
  996. * !isPresent && console.log("I've been removed!")
  997. * }, [isPresent])
  998. *
  999. * return <div />
  1000. * }
  1001. * ```
  1002. *
  1003. * @public
  1004. */
  1005. function useIsPresent() {
  1006. return isPresent((0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_1__.PresenceContext));
  1007. }
  1008. function isPresent(context) {
  1009. return context === null ? true : context.isPresent;
  1010. }
  1011. var counter = 0;
  1012. var incrementId = function () { return counter++; };
  1013. var useUniqueId = function () { return (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_2__.useConstant)(incrementId); };
  1014. /***/ }),
  1015. /***/ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/index.js":
  1016. /*!************************************************************************************!*\
  1017. !*** ./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/index.js ***!
  1018. \************************************************************************************/
  1019. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1020. __webpack_require__.r(__webpack_exports__);
  1021. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1022. /* harmony export */ "AnimateSharedLayout": () => (/* binding */ AnimateSharedLayout)
  1023. /* harmony export */ });
  1024. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1025. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1026. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  1027. /* harmony import */ var _context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../context/MotionContext/index.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/index.js");
  1028. /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./types.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js");
  1029. /* harmony import */ var _utils_batcher_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/batcher.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js");
  1030. /* harmony import */ var _context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../context/SharedLayoutContext.js */ "./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js");
  1031. /* harmony import */ var _utils_stack_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils/stack.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/stack.js");
  1032. /* harmony import */ var _utils_rotate_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/rotate.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/rotate.js");
  1033. /**
  1034. * @public
  1035. */
  1036. var AnimateSharedLayout = /** @class */ (function (_super) {
  1037. (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(AnimateSharedLayout, _super);
  1038. function AnimateSharedLayout() {
  1039. var _this = _super !== null && _super.apply(this, arguments) || this;
  1040. /**
  1041. * A list of all the children in the shared layout
  1042. */
  1043. _this.children = new Set();
  1044. /**
  1045. * As animate components with a defined `layoutId` are added/removed to the tree,
  1046. * we store them in order. When one is added, it will animate out from the
  1047. * previous one, and when it's removed, it'll animate to the previous one.
  1048. */
  1049. _this.stacks = new Map();
  1050. /**
  1051. * Track whether the component has mounted. If it hasn't, the presence of added children
  1052. * are set to Present, whereas if it has they're considered Entering
  1053. */
  1054. _this.hasMounted = false;
  1055. /**
  1056. * Track whether we already have an update scheduled. If we don't, we'll run snapshots
  1057. * and schedule one.
  1058. */
  1059. _this.updateScheduled = false;
  1060. /**
  1061. * Tracks whether we already have a render scheduled. If we don't, we'll force one with this.forceRender
  1062. */
  1063. _this.renderScheduled = false;
  1064. /**
  1065. * The methods provided to all children in the shared layout tree.
  1066. */
  1067. _this.syncContext = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, (0,_utils_batcher_js__WEBPACK_IMPORTED_MODULE_2__.createBatcher)()), { syncUpdate: function (force) { return _this.scheduleUpdate(force); }, forceUpdate: function () {
  1068. // By copying syncContext to itself, when this component re-renders it'll also re-render
  1069. // all children subscribed to the SharedLayout context.
  1070. _this.syncContext = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, _this.syncContext);
  1071. _this.scheduleUpdate(true);
  1072. }, register: function (child) { return _this.addChild(child); }, remove: function (child) { return _this.removeChild(child); } });
  1073. return _this;
  1074. }
  1075. AnimateSharedLayout.prototype.componentDidMount = function () {
  1076. this.hasMounted = true;
  1077. };
  1078. AnimateSharedLayout.prototype.componentDidUpdate = function () {
  1079. this.startLayoutAnimation();
  1080. };
  1081. AnimateSharedLayout.prototype.shouldComponentUpdate = function () {
  1082. this.renderScheduled = true;
  1083. return true;
  1084. };
  1085. AnimateSharedLayout.prototype.startLayoutAnimation = function () {
  1086. var _this = this;
  1087. /**
  1088. * Reset update and render scheduled status
  1089. */
  1090. this.renderScheduled = this.updateScheduled = false;
  1091. var type = this.props.type;
  1092. /**
  1093. * Update presence metadata based on the latest AnimatePresence status.
  1094. * This is a kind of goofy way of dealing with this, perhaps there's a better model to find.
  1095. */
  1096. this.children.forEach(function (child) {
  1097. if (!child.isPresent) {
  1098. child.presence = _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Exiting;
  1099. }
  1100. else if (child.presence !== _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Entering) {
  1101. child.presence =
  1102. child.presence === _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Exiting
  1103. ? _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Entering
  1104. : _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Present;
  1105. }
  1106. });
  1107. this.updateStacks();
  1108. /**
  1109. * Create a handler which we can use to flush the children animations
  1110. */
  1111. var handler = {
  1112. measureLayout: function (child) { return child.updateLayoutMeasurement(); },
  1113. layoutReady: function (child) {
  1114. if (child.getLayoutId() !== undefined) {
  1115. var stack = _this.getStack(child);
  1116. stack.animate(child, type === "crossfade");
  1117. }
  1118. else {
  1119. child.notifyLayoutReady();
  1120. }
  1121. },
  1122. parent: this.context.visualElement,
  1123. };
  1124. /**
  1125. * Shared layout animations can be used without the AnimateSharedLayout wrapping component.
  1126. * This requires some co-ordination across components to stop layout thrashing
  1127. * and ensure measurements are taken at the correct time.
  1128. *
  1129. * Here we use that same mechanism of schedule/flush.
  1130. */
  1131. this.children.forEach(function (child) { return _this.syncContext.add(child); });
  1132. this.syncContext.flush(handler);
  1133. /**
  1134. * Clear snapshots so subsequent rerenders don't retain memory of outgoing components
  1135. */
  1136. this.stacks.forEach(function (stack) { return stack.clearSnapshot(); });
  1137. };
  1138. AnimateSharedLayout.prototype.updateStacks = function () {
  1139. this.stacks.forEach(function (stack) { return stack.updateLeadAndFollow(); });
  1140. };
  1141. AnimateSharedLayout.prototype.scheduleUpdate = function (force) {
  1142. if (force === void 0) { force = false; }
  1143. if (!(force || !this.updateScheduled))
  1144. return;
  1145. /**
  1146. * Flag we've scheduled an update
  1147. */
  1148. this.updateScheduled = true;
  1149. /**
  1150. * Write: Reset rotation transforms so bounding boxes can be accurately measured.
  1151. */
  1152. this.children.forEach(function (child) { return (0,_utils_rotate_js__WEBPACK_IMPORTED_MODULE_4__.resetRotate)(child); });
  1153. /**
  1154. * Read: Snapshot children
  1155. */
  1156. this.children.forEach(function (child) { return child.snapshotViewportBox(); });
  1157. /**
  1158. * Every child keeps a local snapshot, but we also want to record
  1159. * snapshots of the visible children as, if they're are being removed
  1160. * in this render, we can still access them.
  1161. *
  1162. * TODO: What would be better here is doing a single loop where we
  1163. * only snapshotViewportBoxes of undefined layoutIds and then one for each stack
  1164. */
  1165. this.stacks.forEach(function (stack) { return stack.updateSnapshot(); });
  1166. /**
  1167. * Force a rerender by setting state if we aren't already going to render.
  1168. */
  1169. if (force || !this.renderScheduled) {
  1170. this.renderScheduled = true;
  1171. this.forceUpdate();
  1172. }
  1173. };
  1174. AnimateSharedLayout.prototype.addChild = function (child) {
  1175. this.children.add(child);
  1176. this.addToStack(child);
  1177. child.presence = this.hasMounted ? _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Entering : _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Present;
  1178. };
  1179. AnimateSharedLayout.prototype.removeChild = function (child) {
  1180. this.scheduleUpdate();
  1181. this.children.delete(child);
  1182. this.removeFromStack(child);
  1183. };
  1184. AnimateSharedLayout.prototype.addToStack = function (child) {
  1185. var stack = this.getStack(child);
  1186. stack === null || stack === void 0 ? void 0 : stack.add(child);
  1187. };
  1188. AnimateSharedLayout.prototype.removeFromStack = function (child) {
  1189. var stack = this.getStack(child);
  1190. stack === null || stack === void 0 ? void 0 : stack.remove(child);
  1191. };
  1192. /**
  1193. * Return a stack of animate children based on the provided layoutId.
  1194. * Will create a stack if none currently exists with that layoutId.
  1195. */
  1196. AnimateSharedLayout.prototype.getStack = function (child) {
  1197. var id = child.getLayoutId();
  1198. if (id === undefined)
  1199. return;
  1200. // Create stack if it doesn't already exist
  1201. !this.stacks.has(id) && this.stacks.set(id, (0,_utils_stack_js__WEBPACK_IMPORTED_MODULE_5__.layoutStack)());
  1202. return this.stacks.get(id);
  1203. };
  1204. AnimateSharedLayout.prototype.render = function () {
  1205. return ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_6__.SharedLayoutContext.Provider, { value: this.syncContext }, this.props.children));
  1206. };
  1207. AnimateSharedLayout.contextType = _context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_7__.MotionContext;
  1208. return AnimateSharedLayout;
  1209. }(react__WEBPACK_IMPORTED_MODULE_0__.Component));
  1210. /***/ }),
  1211. /***/ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js":
  1212. /*!************************************************************************************!*\
  1213. !*** ./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js ***!
  1214. \************************************************************************************/
  1215. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1216. __webpack_require__.r(__webpack_exports__);
  1217. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1218. /* harmony export */ "Presence": () => (/* binding */ Presence),
  1219. /* harmony export */ "VisibilityAction": () => (/* binding */ VisibilityAction)
  1220. /* harmony export */ });
  1221. var Presence;
  1222. (function (Presence) {
  1223. Presence[Presence["Entering"] = 0] = "Entering";
  1224. Presence[Presence["Present"] = 1] = "Present";
  1225. Presence[Presence["Exiting"] = 2] = "Exiting";
  1226. })(Presence || (Presence = {}));
  1227. var VisibilityAction;
  1228. (function (VisibilityAction) {
  1229. VisibilityAction[VisibilityAction["Hide"] = 0] = "Hide";
  1230. VisibilityAction[VisibilityAction["Show"] = 1] = "Show";
  1231. })(VisibilityAction || (VisibilityAction = {}));
  1232. /***/ }),
  1233. /***/ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js":
  1234. /*!********************************************************************************************!*\
  1235. !*** ./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js ***!
  1236. \********************************************************************************************/
  1237. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1238. __webpack_require__.r(__webpack_exports__);
  1239. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1240. /* harmony export */ "createBatcher": () => (/* binding */ createBatcher)
  1241. /* harmony export */ });
  1242. /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../types.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js");
  1243. /**
  1244. * Default handlers for batching VisualElements
  1245. */
  1246. var defaultHandler = {
  1247. measureLayout: function (child) { return child.updateLayoutMeasurement(); },
  1248. layoutReady: function (child) { return child.notifyLayoutReady(); },
  1249. };
  1250. /**
  1251. * Create a batcher to process VisualElements
  1252. */
  1253. function createBatcher() {
  1254. var queue = new Set();
  1255. return {
  1256. add: function (child) { return queue.add(child); },
  1257. flush: function (_a) {
  1258. var _b = _a === void 0 ? defaultHandler : _a, measureLayout = _b.measureLayout, layoutReady = _b.layoutReady, parent = _b.parent;
  1259. var order = Array.from(queue).sort(function (a, b) { return a.depth - b.depth; });
  1260. var resetAndMeasure = function () {
  1261. /**
  1262. * Write: Reset any transforms on children elements so we can read their actual layout
  1263. */
  1264. order.forEach(function (child) { return child.resetTransform(); });
  1265. /**
  1266. * Read: Measure the actual layout
  1267. */
  1268. order.forEach(measureLayout);
  1269. };
  1270. parent
  1271. ? parent.withoutTransform(resetAndMeasure)
  1272. : resetAndMeasure();
  1273. /**
  1274. * Write: Notify the VisualElements they're ready for further write operations.
  1275. */
  1276. order.forEach(layoutReady);
  1277. /**
  1278. * After all children have started animating, ensure any Entering components are set to Present.
  1279. * If we add deferred animations (set up all animations and then start them in two loops) this
  1280. * could be moved to the start loop. But it needs to happen after all the animations configs
  1281. * are generated in AnimateSharedLayout as this relies on presence data
  1282. */
  1283. order.forEach(function (child) {
  1284. if (child.isPresent)
  1285. child.presence = _types_js__WEBPACK_IMPORTED_MODULE_0__.Presence.Present;
  1286. });
  1287. queue.clear();
  1288. },
  1289. };
  1290. }
  1291. /***/ }),
  1292. /***/ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/crossfader.js":
  1293. /*!***********************************************************************************************!*\
  1294. !*** ./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/crossfader.js ***!
  1295. \***********************************************************************************************/
  1296. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1297. __webpack_require__.r(__webpack_exports__);
  1298. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1299. /* harmony export */ "createCrossfader": () => (/* binding */ createCrossfader)
  1300. /* harmony export */ });
  1301. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  1302. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/mix.js");
  1303. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/easing/index.js");
  1304. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/progress.js");
  1305. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/mix-color.js");
  1306. /* harmony import */ var framesync__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framesync */ "./node_modules/framesync/dist/es/index.js");
  1307. /* harmony import */ var _value_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../value/index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  1308. /* harmony import */ var _animation_animate_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../animation/animate.js */ "./node_modules/framer-motion/dist/es/animation/animate.js");
  1309. function createCrossfader() {
  1310. /**
  1311. * The current state of the crossfade as a value between 0 and 1
  1312. */
  1313. var progress = (0,_value_index_js__WEBPACK_IMPORTED_MODULE_1__.motionValue)(1);
  1314. var options = {
  1315. lead: undefined,
  1316. follow: undefined,
  1317. crossfadeOpacity: false,
  1318. preserveFollowOpacity: false,
  1319. };
  1320. var leadState = {};
  1321. var followState = {};
  1322. /**
  1323. *
  1324. */
  1325. var isActive = false;
  1326. /**
  1327. *
  1328. */
  1329. var finalCrossfadeFrame = null;
  1330. /**
  1331. * Framestamp of the last frame we updated values at.
  1332. */
  1333. var prevUpdate = 0;
  1334. function startCrossfadeAnimation(target, transition) {
  1335. var lead = options.lead, follow = options.follow;
  1336. isActive = true;
  1337. finalCrossfadeFrame = null;
  1338. return (0,_animation_animate_js__WEBPACK_IMPORTED_MODULE_2__.animate)(progress, target, (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, transition), { onUpdate: function () {
  1339. lead && lead.scheduleRender();
  1340. follow && follow.scheduleRender();
  1341. }, onComplete: function () {
  1342. isActive = false;
  1343. /**
  1344. * If the crossfade animation is no longer active, flag a frame
  1345. * that we're still allowed to crossfade
  1346. */
  1347. finalCrossfadeFrame = (0,framesync__WEBPACK_IMPORTED_MODULE_0__.getFrameData)().timestamp;
  1348. } }));
  1349. }
  1350. function updateCrossfade() {
  1351. var _a, _b;
  1352. /**
  1353. * We only want to compute the crossfade once per frame, so we
  1354. * compare the previous update framestamp with the current frame
  1355. * and early return if they're the same.
  1356. */
  1357. var timestamp = (0,framesync__WEBPACK_IMPORTED_MODULE_0__.getFrameData)().timestamp;
  1358. var lead = options.lead, follow = options.follow;
  1359. if (timestamp === prevUpdate || !lead)
  1360. return;
  1361. prevUpdate = timestamp;
  1362. /**
  1363. * Merge each component's latest values into our crossfaded state
  1364. * before crossfading.
  1365. */
  1366. var latestLeadValues = lead.getLatestValues();
  1367. Object.assign(leadState, latestLeadValues);
  1368. var latestFollowValues = follow
  1369. ? follow.getLatestValues()
  1370. : options.prevValues;
  1371. Object.assign(followState, latestFollowValues);
  1372. var p = progress.get();
  1373. /**
  1374. * Crossfade the opacity between the two components. This will result
  1375. * in a different opacity for each component.
  1376. */
  1377. var leadTargetOpacity = (_a = latestLeadValues.opacity) !== null && _a !== void 0 ? _a : 1;
  1378. var followTargetOpacity = (_b = latestFollowValues === null || latestFollowValues === void 0 ? void 0 : latestFollowValues.opacity) !== null && _b !== void 0 ? _b : 1;
  1379. if (options.crossfadeOpacity && follow) {
  1380. leadState.opacity = (0,popmotion__WEBPACK_IMPORTED_MODULE_4__.mix)(0, leadTargetOpacity, easeCrossfadeIn(p));
  1381. followState.opacity = options.preserveFollowOpacity
  1382. ? followTargetOpacity
  1383. : (0,popmotion__WEBPACK_IMPORTED_MODULE_4__.mix)(followTargetOpacity, 0, easeCrossfadeOut(p));
  1384. }
  1385. else if (!follow) {
  1386. leadState.opacity = (0,popmotion__WEBPACK_IMPORTED_MODULE_4__.mix)(followTargetOpacity, leadTargetOpacity, p);
  1387. }
  1388. mixValues(leadState, followState, latestLeadValues, latestFollowValues || {}, Boolean(follow), p);
  1389. }
  1390. return {
  1391. isActive: function () {
  1392. return leadState &&
  1393. (isActive || (0,framesync__WEBPACK_IMPORTED_MODULE_0__.getFrameData)().timestamp === finalCrossfadeFrame);
  1394. },
  1395. fromLead: function (transition) {
  1396. return startCrossfadeAnimation(0, transition);
  1397. },
  1398. toLead: function (transition) {
  1399. progress.set(options.follow ? 1 - progress.get() : 0);
  1400. return startCrossfadeAnimation(1, transition);
  1401. },
  1402. reset: function () { return progress.set(1); },
  1403. stop: function () { return progress.stop(); },
  1404. getCrossfadeState: function (element) {
  1405. updateCrossfade();
  1406. if (element === options.lead) {
  1407. return leadState;
  1408. }
  1409. else if (element === options.follow) {
  1410. return followState;
  1411. }
  1412. },
  1413. setOptions: function (newOptions) {
  1414. options = newOptions;
  1415. leadState = {};
  1416. followState = {};
  1417. },
  1418. getLatestValues: function () {
  1419. return leadState;
  1420. },
  1421. };
  1422. }
  1423. var easeCrossfadeIn = compress(0, 0.5, popmotion__WEBPACK_IMPORTED_MODULE_5__.circOut);
  1424. var easeCrossfadeOut = compress(0.5, 0.95, popmotion__WEBPACK_IMPORTED_MODULE_5__.linear);
  1425. function compress(min, max, easing) {
  1426. return function (p) {
  1427. // Could replace ifs with clamp
  1428. if (p < min)
  1429. return 0;
  1430. if (p > max)
  1431. return 1;
  1432. return easing((0,popmotion__WEBPACK_IMPORTED_MODULE_6__.progress)(min, max, p));
  1433. };
  1434. }
  1435. var borders = ["TopLeft", "TopRight", "BottomLeft", "BottomRight"];
  1436. var numBorders = borders.length;
  1437. function mixValues(leadState, followState, latestLeadValues, latestFollowValues, hasFollowElement, p) {
  1438. /**
  1439. * Mix border radius
  1440. */
  1441. for (var i = 0; i < numBorders; i++) {
  1442. var borderLabel = "border" + borders[i] + "Radius";
  1443. var followRadius = getRadius(latestFollowValues, borderLabel);
  1444. var leadRadius = getRadius(latestLeadValues, borderLabel);
  1445. if (followRadius === undefined && leadRadius === undefined)
  1446. continue;
  1447. followRadius || (followRadius = 0);
  1448. leadRadius || (leadRadius = 0);
  1449. /**
  1450. * Currently we're only crossfading between numerical border radius.
  1451. * It would be possible to crossfade between percentages for a little
  1452. * extra bundle size.
  1453. */
  1454. if (typeof followRadius === "number" &&
  1455. typeof leadRadius === "number") {
  1456. var radius = (0,popmotion__WEBPACK_IMPORTED_MODULE_4__.mix)(followRadius, leadRadius, p);
  1457. leadState[borderLabel] = followState[borderLabel] = radius;
  1458. }
  1459. }
  1460. /**
  1461. * Mix rotation
  1462. */
  1463. if (latestFollowValues.rotate || latestLeadValues.rotate) {
  1464. var rotate = (0,popmotion__WEBPACK_IMPORTED_MODULE_4__.mix)(latestFollowValues.rotate || 0, latestLeadValues.rotate || 0, p);
  1465. leadState.rotate = followState.rotate = rotate;
  1466. }
  1467. /**
  1468. * We only want to mix the background color if there's a follow element
  1469. * that we're not crossfading opacity between. For instance with switch
  1470. * AnimateSharedLayout animations, this helps the illusion of a continuous
  1471. * element being animated but also cuts down on the number of paints triggered
  1472. * for elements where opacity is doing that work for us.
  1473. */
  1474. if (!hasFollowElement &&
  1475. latestLeadValues.backgroundColor &&
  1476. latestFollowValues.backgroundColor) {
  1477. /**
  1478. * This isn't ideal performance-wise as mixColor is creating a new function every frame.
  1479. * We could probably create a mixer that runs at the start of the animation but
  1480. * the idea behind the crossfader is that it runs dynamically between two potentially
  1481. * changing targets (ie opacity or borderRadius may be animating independently via variants)
  1482. */
  1483. leadState.backgroundColor = followState.backgroundColor = (0,popmotion__WEBPACK_IMPORTED_MODULE_7__.mixColor)(latestFollowValues.backgroundColor, latestLeadValues.backgroundColor)(p);
  1484. }
  1485. }
  1486. function getRadius(values, radiusName) {
  1487. var _a;
  1488. return (_a = values[radiusName]) !== null && _a !== void 0 ? _a : values.borderRadius;
  1489. }
  1490. /***/ }),
  1491. /***/ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/rotate.js":
  1492. /*!*******************************************************************************************!*\
  1493. !*** ./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/rotate.js ***!
  1494. \*******************************************************************************************/
  1495. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1496. __webpack_require__.r(__webpack_exports__);
  1497. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1498. /* harmony export */ "resetRotate": () => (/* binding */ resetRotate)
  1499. /* harmony export */ });
  1500. /* harmony import */ var _render_html_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../render/html/utils/transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js");
  1501. function resetRotate(child) {
  1502. // If there's no detected rotation values, we can early return without a forced render.
  1503. var hasRotate = false;
  1504. // Keep a record of all the values we've reset
  1505. var resetValues = {};
  1506. // Check the rotate value of all axes and reset to 0
  1507. for (var i = 0; i < _render_html_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__.transformAxes.length; i++) {
  1508. var axis = _render_html_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__.transformAxes[i];
  1509. var key = "rotate" + axis;
  1510. // If this rotation doesn't exist as a motion value, then we don't
  1511. // need to reset it
  1512. if (!child.hasValue(key) || child.getStaticValue(key) === 0)
  1513. continue;
  1514. hasRotate = true;
  1515. // Record the rotation and then temporarily set it to 0
  1516. resetValues[key] = child.getStaticValue(key);
  1517. child.setStaticValue(key, 0);
  1518. }
  1519. // If there's no rotation values, we don't need to do any more.
  1520. if (!hasRotate)
  1521. return;
  1522. // Force a render of this element to apply the transform with all rotations
  1523. // set to 0.
  1524. child.syncRender();
  1525. // Put back all the values we reset
  1526. for (var key in resetValues) {
  1527. child.setStaticValue(key, resetValues[key]);
  1528. }
  1529. // Schedule a render for the next frame. This ensures we won't visually
  1530. // see the element with the reset rotate value applied.
  1531. child.scheduleRender();
  1532. }
  1533. /***/ }),
  1534. /***/ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/stack.js":
  1535. /*!******************************************************************************************!*\
  1536. !*** ./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/stack.js ***!
  1537. \******************************************************************************************/
  1538. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1539. __webpack_require__.r(__webpack_exports__);
  1540. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1541. /* harmony export */ "layoutStack": () => (/* binding */ layoutStack)
  1542. /* harmony export */ });
  1543. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  1544. /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../types.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js");
  1545. /* harmony import */ var _gestures_drag_VisualElementDragControls_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../gestures/drag/VisualElementDragControls.js */ "./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js");
  1546. /* harmony import */ var _crossfader_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./crossfader.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/crossfader.js");
  1547. function layoutStack() {
  1548. var stack = new Set();
  1549. var state = { leadIsExiting: false };
  1550. var prevState = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, state);
  1551. var prevValues;
  1552. var prevViewportBox;
  1553. var prevDragCursor;
  1554. var crossfader = (0,_crossfader_js__WEBPACK_IMPORTED_MODULE_1__.createCrossfader)();
  1555. var needsCrossfadeAnimation = false;
  1556. function getFollowViewportBox() {
  1557. return state.follow ? state.follow.prevViewportBox : prevViewportBox;
  1558. }
  1559. function getFollowLayout() {
  1560. var _a;
  1561. return (_a = state.follow) === null || _a === void 0 ? void 0 : _a.getLayoutState().layout;
  1562. }
  1563. return {
  1564. add: function (element) {
  1565. element.setCrossfader(crossfader);
  1566. stack.add(element);
  1567. /**
  1568. * Hydrate new element with previous drag position if we have one
  1569. */
  1570. if (prevDragCursor)
  1571. element.prevDragCursor = prevDragCursor;
  1572. if (!state.lead)
  1573. state.lead = element;
  1574. },
  1575. remove: function (element) {
  1576. stack.delete(element);
  1577. },
  1578. getLead: function () { return state.lead; },
  1579. updateSnapshot: function () {
  1580. if (!state.lead)
  1581. return;
  1582. prevValues = crossfader.isActive()
  1583. ? crossfader.getLatestValues()
  1584. : state.lead.getLatestValues();
  1585. prevViewportBox = state.lead.prevViewportBox;
  1586. var dragControls = _gestures_drag_VisualElementDragControls_js__WEBPACK_IMPORTED_MODULE_2__.elementDragControls.get(state.lead);
  1587. if (dragControls && dragControls.isDragging) {
  1588. prevDragCursor = dragControls.cursorProgress;
  1589. }
  1590. },
  1591. clearSnapshot: function () {
  1592. prevDragCursor = prevViewportBox = undefined;
  1593. },
  1594. updateLeadAndFollow: function () {
  1595. var _a;
  1596. prevState = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, state);
  1597. var lead;
  1598. var follow;
  1599. var order = Array.from(stack);
  1600. for (var i = order.length; i--; i >= 0) {
  1601. var element = order[i];
  1602. if (lead)
  1603. follow !== null && follow !== void 0 ? follow : (follow = element);
  1604. lead !== null && lead !== void 0 ? lead : (lead = element);
  1605. if (lead && follow)
  1606. break;
  1607. }
  1608. state.lead = lead;
  1609. state.follow = follow;
  1610. state.leadIsExiting = ((_a = state.lead) === null || _a === void 0 ? void 0 : _a.presence) === _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Exiting;
  1611. crossfader.setOptions({
  1612. lead: lead,
  1613. follow: follow,
  1614. prevValues: prevValues,
  1615. crossfadeOpacity: (follow === null || follow === void 0 ? void 0 : follow.isPresenceRoot) || (lead === null || lead === void 0 ? void 0 : lead.isPresenceRoot),
  1616. });
  1617. if (prevState.lead !== state.lead ||
  1618. prevState.leadIsExiting !== state.leadIsExiting) {
  1619. needsCrossfadeAnimation = true;
  1620. }
  1621. },
  1622. animate: function (child, shouldCrossfade) {
  1623. if (shouldCrossfade === void 0) { shouldCrossfade = false; }
  1624. if (child === state.lead) {
  1625. if (shouldCrossfade) {
  1626. /**
  1627. * Point a lead to itself in case it was previously pointing
  1628. * to a different visual element
  1629. */
  1630. child.pointTo(state.lead);
  1631. }
  1632. else {
  1633. child.setVisibility(true);
  1634. }
  1635. var config = {};
  1636. if (child.presence === _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Entering) {
  1637. config.originBox = getFollowViewportBox();
  1638. }
  1639. else if (child.presence === _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Exiting) {
  1640. config.targetBox = getFollowLayout();
  1641. }
  1642. if (needsCrossfadeAnimation) {
  1643. needsCrossfadeAnimation = false;
  1644. var transition = child.getDefaultTransition();
  1645. child.presence === _types_js__WEBPACK_IMPORTED_MODULE_3__.Presence.Entering
  1646. ? crossfader.toLead(transition)
  1647. : crossfader.fromLead(transition);
  1648. }
  1649. child.notifyLayoutReady(config);
  1650. }
  1651. else {
  1652. if (shouldCrossfade) {
  1653. state.lead && child.pointTo(state.lead);
  1654. }
  1655. else {
  1656. child.setVisibility(false);
  1657. }
  1658. }
  1659. },
  1660. };
  1661. }
  1662. /***/ }),
  1663. /***/ "./node_modules/framer-motion/dist/es/context/LayoutGroupContext.js":
  1664. /*!**************************************************************************!*\
  1665. !*** ./node_modules/framer-motion/dist/es/context/LayoutGroupContext.js ***!
  1666. \**************************************************************************/
  1667. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1668. __webpack_require__.r(__webpack_exports__);
  1669. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1670. /* harmony export */ "LayoutGroupContext": () => (/* binding */ LayoutGroupContext)
  1671. /* harmony export */ });
  1672. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1673. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1674. /**
  1675. * @internal
  1676. */
  1677. var LayoutGroupContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
  1678. /***/ }),
  1679. /***/ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js":
  1680. /*!***************************************************************************!*\
  1681. !*** ./node_modules/framer-motion/dist/es/context/MotionConfigContext.js ***!
  1682. \***************************************************************************/
  1683. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1684. __webpack_require__.r(__webpack_exports__);
  1685. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1686. /* harmony export */ "MotionConfig": () => (/* binding */ MotionConfig),
  1687. /* harmony export */ "MotionConfigContext": () => (/* binding */ MotionConfigContext)
  1688. /* harmony export */ });
  1689. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1690. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1691. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  1692. /**
  1693. * @public
  1694. */
  1695. var MotionConfigContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({
  1696. transformPagePoint: function (p) { return p; },
  1697. features: [],
  1698. isStatic: false,
  1699. });
  1700. /**
  1701. * MotionConfig can be used in combination with the `m` component to cut bundle size
  1702. * and dynamically load only the features you use.
  1703. *
  1704. * ```jsx
  1705. * import {
  1706. * m as motion,
  1707. * AnimationFeature,
  1708. * MotionConfig
  1709. * } from "framer-motion"
  1710. *
  1711. * export function App() {
  1712. * return (
  1713. * <MotionConfig features={[AnimationFeature]}>
  1714. * <motion.div animate={{ x: 100 }} />
  1715. * </MotionConfig>
  1716. * )
  1717. * }
  1718. * ```
  1719. *
  1720. * @public
  1721. */
  1722. function MotionConfig(_a) {
  1723. var children = _a.children, _b = _a.features, features = _b === void 0 ? [] : _b, transition = _a.transition, props = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["children", "features", "transition"]);
  1724. var pluginContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(MotionConfigContext);
  1725. var loadedFeatures = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(new Set((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(pluginContext.features, features)));
  1726. // We do want to rerender children when the number of loaded features changes
  1727. var value = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return ({
  1728. features: loadedFeatures,
  1729. transition: transition || pluginContext.transition,
  1730. }); }, [loadedFeatures.length, transition]);
  1731. // Mutative to prevent triggering rerenders in all listening
  1732. // components every time this component renders
  1733. for (var key in props) {
  1734. value[key] = props[key];
  1735. }
  1736. return ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(MotionConfigContext.Provider, { value: value }, children));
  1737. }
  1738. /***/ }),
  1739. /***/ "./node_modules/framer-motion/dist/es/context/MotionContext/create.js":
  1740. /*!****************************************************************************!*\
  1741. !*** ./node_modules/framer-motion/dist/es/context/MotionContext/create.js ***!
  1742. \****************************************************************************/
  1743. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1744. __webpack_require__.r(__webpack_exports__);
  1745. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1746. /* harmony export */ "useCreateMotionContext": () => (/* binding */ useCreateMotionContext)
  1747. /* harmony export */ });
  1748. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1749. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1750. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/index.js");
  1751. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/utils.js");
  1752. function useCreateMotionContext(props, isStatic) {
  1753. var _a = (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.getCurrentTreeVariants)(props, (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_index_js__WEBPACK_IMPORTED_MODULE_2__.MotionContext)), initial = _a.initial, animate = _a.animate;
  1754. return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () { return ({ initial: initial, animate: animate }); },
  1755. /**
  1756. * Only break memoisation in static mode
  1757. */
  1758. isStatic
  1759. ? [
  1760. variantLabelsAsDependency(initial),
  1761. variantLabelsAsDependency(animate),
  1762. ]
  1763. : []);
  1764. }
  1765. function variantLabelsAsDependency(prop) {
  1766. return Array.isArray(prop) ? prop.join(" ") : prop;
  1767. }
  1768. /***/ }),
  1769. /***/ "./node_modules/framer-motion/dist/es/context/MotionContext/index.js":
  1770. /*!***************************************************************************!*\
  1771. !*** ./node_modules/framer-motion/dist/es/context/MotionContext/index.js ***!
  1772. \***************************************************************************/
  1773. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1774. __webpack_require__.r(__webpack_exports__);
  1775. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1776. /* harmony export */ "MotionContext": () => (/* binding */ MotionContext),
  1777. /* harmony export */ "useVisualElementContext": () => (/* binding */ useVisualElementContext)
  1778. /* harmony export */ });
  1779. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1780. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1781. var MotionContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
  1782. function useVisualElementContext() {
  1783. return (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(MotionContext).visualElement;
  1784. }
  1785. /***/ }),
  1786. /***/ "./node_modules/framer-motion/dist/es/context/MotionContext/utils.js":
  1787. /*!***************************************************************************!*\
  1788. !*** ./node_modules/framer-motion/dist/es/context/MotionContext/utils.js ***!
  1789. \***************************************************************************/
  1790. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1791. __webpack_require__.r(__webpack_exports__);
  1792. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1793. /* harmony export */ "getCurrentTreeVariants": () => (/* binding */ getCurrentTreeVariants)
  1794. /* harmony export */ });
  1795. /* harmony import */ var _render_utils_variants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../render/utils/variants.js */ "./node_modules/framer-motion/dist/es/render/utils/variants.js");
  1796. function getCurrentTreeVariants(props, context) {
  1797. if ((0,_render_utils_variants_js__WEBPACK_IMPORTED_MODULE_0__.checkIfControllingVariants)(props)) {
  1798. var initial = props.initial, animate = props.animate;
  1799. return {
  1800. initial: initial === false || (0,_render_utils_variants_js__WEBPACK_IMPORTED_MODULE_0__.isVariantLabel)(initial)
  1801. ? initial
  1802. : undefined,
  1803. animate: (0,_render_utils_variants_js__WEBPACK_IMPORTED_MODULE_0__.isVariantLabel)(animate) ? animate : undefined,
  1804. };
  1805. }
  1806. return props.inherit !== false ? context : {};
  1807. }
  1808. /***/ }),
  1809. /***/ "./node_modules/framer-motion/dist/es/context/PresenceContext.js":
  1810. /*!***********************************************************************!*\
  1811. !*** ./node_modules/framer-motion/dist/es/context/PresenceContext.js ***!
  1812. \***********************************************************************/
  1813. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1814. __webpack_require__.r(__webpack_exports__);
  1815. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1816. /* harmony export */ "PresenceContext": () => (/* binding */ PresenceContext)
  1817. /* harmony export */ });
  1818. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1819. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1820. /**
  1821. * @public
  1822. */
  1823. var PresenceContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(null);
  1824. /***/ }),
  1825. /***/ "./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js":
  1826. /*!***************************************************************************!*\
  1827. !*** ./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js ***!
  1828. \***************************************************************************/
  1829. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1830. __webpack_require__.r(__webpack_exports__);
  1831. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1832. /* harmony export */ "FramerTreeLayoutContext": () => (/* binding */ FramerTreeLayoutContext),
  1833. /* harmony export */ "SharedLayoutContext": () => (/* binding */ SharedLayoutContext),
  1834. /* harmony export */ "isSharedLayout": () => (/* binding */ isSharedLayout)
  1835. /* harmony export */ });
  1836. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1837. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1838. /* harmony import */ var _components_AnimateSharedLayout_utils_batcher_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../components/AnimateSharedLayout/utils/batcher.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js");
  1839. var SharedLayoutContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)((0,_components_AnimateSharedLayout_utils_batcher_js__WEBPACK_IMPORTED_MODULE_1__.createBatcher)());
  1840. /**
  1841. * @internal
  1842. */
  1843. var FramerTreeLayoutContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)((0,_components_AnimateSharedLayout_utils_batcher_js__WEBPACK_IMPORTED_MODULE_1__.createBatcher)());
  1844. function isSharedLayout(context) {
  1845. return !!context.forceUpdate;
  1846. }
  1847. /***/ }),
  1848. /***/ "./node_modules/framer-motion/dist/es/events/event-info.js":
  1849. /*!*****************************************************************!*\
  1850. !*** ./node_modules/framer-motion/dist/es/events/event-info.js ***!
  1851. \*****************************************************************/
  1852. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1853. __webpack_require__.r(__webpack_exports__);
  1854. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1855. /* harmony export */ "extractEventInfo": () => (/* binding */ extractEventInfo),
  1856. /* harmony export */ "getViewportPointFromEvent": () => (/* binding */ getViewportPointFromEvent),
  1857. /* harmony export */ "wrapHandler": () => (/* binding */ wrapHandler)
  1858. /* harmony export */ });
  1859. /* harmony import */ var _gestures_utils_event_type_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../gestures/utils/event-type.js */ "./node_modules/framer-motion/dist/es/gestures/utils/event-type.js");
  1860. /**
  1861. * Filters out events not attached to the primary pointer (currently left mouse button)
  1862. * @param eventHandler
  1863. */
  1864. function filterPrimaryPointer(eventHandler) {
  1865. return function (event) {
  1866. var isMouseEvent = event instanceof MouseEvent;
  1867. var isPrimaryPointer = !isMouseEvent ||
  1868. (isMouseEvent && event.button === 0);
  1869. if (isPrimaryPointer) {
  1870. eventHandler(event);
  1871. }
  1872. };
  1873. }
  1874. var defaultPagePoint = { pageX: 0, pageY: 0 };
  1875. function pointFromTouch(e, pointType) {
  1876. if (pointType === void 0) { pointType = "page"; }
  1877. var primaryTouch = e.touches[0] || e.changedTouches[0];
  1878. var point = primaryTouch || defaultPagePoint;
  1879. return {
  1880. x: point[pointType + "X"],
  1881. y: point[pointType + "Y"],
  1882. };
  1883. }
  1884. function pointFromMouse(point, pointType) {
  1885. if (pointType === void 0) { pointType = "page"; }
  1886. return {
  1887. x: point[pointType + "X"],
  1888. y: point[pointType + "Y"],
  1889. };
  1890. }
  1891. function extractEventInfo(event, pointType) {
  1892. if (pointType === void 0) { pointType = "page"; }
  1893. return {
  1894. point: (0,_gestures_utils_event_type_js__WEBPACK_IMPORTED_MODULE_0__.isTouchEvent)(event)
  1895. ? pointFromTouch(event, pointType)
  1896. : pointFromMouse(event, pointType),
  1897. };
  1898. }
  1899. function getViewportPointFromEvent(event) {
  1900. return extractEventInfo(event, "client");
  1901. }
  1902. var wrapHandler = function (handler, shouldFilterPrimaryPointer) {
  1903. if (shouldFilterPrimaryPointer === void 0) { shouldFilterPrimaryPointer = false; }
  1904. var listener = function (event) {
  1905. return handler(event, extractEventInfo(event));
  1906. };
  1907. return shouldFilterPrimaryPointer
  1908. ? filterPrimaryPointer(listener)
  1909. : listener;
  1910. };
  1911. /***/ }),
  1912. /***/ "./node_modules/framer-motion/dist/es/events/use-dom-event.js":
  1913. /*!********************************************************************!*\
  1914. !*** ./node_modules/framer-motion/dist/es/events/use-dom-event.js ***!
  1915. \********************************************************************/
  1916. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1917. __webpack_require__.r(__webpack_exports__);
  1918. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1919. /* harmony export */ "addDomEvent": () => (/* binding */ addDomEvent),
  1920. /* harmony export */ "useDomEvent": () => (/* binding */ useDomEvent)
  1921. /* harmony export */ });
  1922. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  1923. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  1924. function addDomEvent(target, eventName, handler, options) {
  1925. target.addEventListener(eventName, handler, options);
  1926. return function () { return target.removeEventListener(eventName, handler, options); };
  1927. }
  1928. /**
  1929. * Attaches an event listener directly to the provided DOM element.
  1930. *
  1931. * Bypassing React's event system can be desirable, for instance when attaching non-passive
  1932. * event handlers.
  1933. *
  1934. * ```jsx
  1935. * const ref = useRef(null)
  1936. *
  1937. * useDomEvent(ref, 'wheel', onWheel, { passive: false })
  1938. *
  1939. * return <div ref={ref} />
  1940. * ```
  1941. *
  1942. * @param ref - React.RefObject that's been provided to the element you want to bind the listener to.
  1943. * @param eventName - Name of the event you want listen for.
  1944. * @param handler - Function to fire when receiving the event.
  1945. * @param options - Options to pass to `Event.addEventListener`.
  1946. *
  1947. * @public
  1948. */
  1949. function useDomEvent(ref, eventName, handler, options) {
  1950. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  1951. var element = ref.current;
  1952. if (handler && element) {
  1953. return addDomEvent(element, eventName, handler, options);
  1954. }
  1955. }, [ref, eventName, handler, options]);
  1956. }
  1957. /***/ }),
  1958. /***/ "./node_modules/framer-motion/dist/es/events/use-pointer-event.js":
  1959. /*!************************************************************************!*\
  1960. !*** ./node_modules/framer-motion/dist/es/events/use-pointer-event.js ***!
  1961. \************************************************************************/
  1962. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  1963. __webpack_require__.r(__webpack_exports__);
  1964. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  1965. /* harmony export */ "addPointerEvent": () => (/* binding */ addPointerEvent),
  1966. /* harmony export */ "usePointerEvent": () => (/* binding */ usePointerEvent)
  1967. /* harmony export */ });
  1968. /* harmony import */ var _event_info_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./event-info.js */ "./node_modules/framer-motion/dist/es/events/event-info.js");
  1969. /* harmony import */ var _use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-dom-event.js */ "./node_modules/framer-motion/dist/es/events/use-dom-event.js");
  1970. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/framer-motion/dist/es/events/utils.js");
  1971. var mouseEventNames = {
  1972. pointerdown: "mousedown",
  1973. pointermove: "mousemove",
  1974. pointerup: "mouseup",
  1975. pointercancel: "mousecancel",
  1976. pointerover: "mouseover",
  1977. pointerout: "mouseout",
  1978. pointerenter: "mouseenter",
  1979. pointerleave: "mouseleave",
  1980. };
  1981. var touchEventNames = {
  1982. pointerdown: "touchstart",
  1983. pointermove: "touchmove",
  1984. pointerup: "touchend",
  1985. pointercancel: "touchcancel",
  1986. };
  1987. function getPointerEventName(name) {
  1988. if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.supportsPointerEvents)()) {
  1989. return name;
  1990. }
  1991. else if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.supportsTouchEvents)()) {
  1992. return touchEventNames[name];
  1993. }
  1994. else if ((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.supportsMouseEvents)()) {
  1995. return mouseEventNames[name];
  1996. }
  1997. return name;
  1998. }
  1999. function addPointerEvent(target, eventName, handler, options) {
  2000. return (0,_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__.addDomEvent)(target, getPointerEventName(eventName), (0,_event_info_js__WEBPACK_IMPORTED_MODULE_2__.wrapHandler)(handler, eventName === "pointerdown"), options);
  2001. }
  2002. function usePointerEvent(ref, eventName, handler, options) {
  2003. return (0,_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__.useDomEvent)(ref, getPointerEventName(eventName), handler && (0,_event_info_js__WEBPACK_IMPORTED_MODULE_2__.wrapHandler)(handler, eventName === "pointerdown"), options);
  2004. }
  2005. /***/ }),
  2006. /***/ "./node_modules/framer-motion/dist/es/events/utils.js":
  2007. /*!************************************************************!*\
  2008. !*** ./node_modules/framer-motion/dist/es/events/utils.js ***!
  2009. \************************************************************/
  2010. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  2011. __webpack_require__.r(__webpack_exports__);
  2012. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2013. /* harmony export */ "supportsMouseEvents": () => (/* binding */ supportsMouseEvents),
  2014. /* harmony export */ "supportsPointerEvents": () => (/* binding */ supportsPointerEvents),
  2015. /* harmony export */ "supportsTouchEvents": () => (/* binding */ supportsTouchEvents)
  2016. /* harmony export */ });
  2017. var isBrowser = typeof window !== "undefined";
  2018. // We check for event support via functions in case they've been mocked by a testing suite.
  2019. var supportsPointerEvents = function () {
  2020. return isBrowser && window.onpointerdown === null;
  2021. };
  2022. var supportsTouchEvents = function () {
  2023. return isBrowser && window.ontouchstart === null;
  2024. };
  2025. var supportsMouseEvents = function () {
  2026. return isBrowser && window.onmousedown === null;
  2027. };
  2028. /***/ }),
  2029. /***/ "./node_modules/framer-motion/dist/es/gestures/PanSession.js":
  2030. /*!*******************************************************************!*\
  2031. !*** ./node_modules/framer-motion/dist/es/gestures/PanSession.js ***!
  2032. \*******************************************************************/
  2033. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  2034. __webpack_require__.r(__webpack_exports__);
  2035. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2036. /* harmony export */ "PanSession": () => (/* binding */ PanSession)
  2037. /* harmony export */ });
  2038. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  2039. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/distance.js");
  2040. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/pipe.js");
  2041. /* harmony import */ var _utils_event_type_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/event-type.js */ "./node_modules/framer-motion/dist/es/gestures/utils/event-type.js");
  2042. /* harmony import */ var _events_event_info_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../events/event-info.js */ "./node_modules/framer-motion/dist/es/events/event-info.js");
  2043. /* harmony import */ var framesync__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framesync */ "./node_modules/framesync/dist/es/index.js");
  2044. /* harmony import */ var _utils_time_conversion_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/time-conversion.js */ "./node_modules/framer-motion/dist/es/utils/time-conversion.js");
  2045. /* harmony import */ var _events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../events/use-pointer-event.js */ "./node_modules/framer-motion/dist/es/events/use-pointer-event.js");
  2046. /**
  2047. * @internal
  2048. */
  2049. var PanSession = /** @class */ (function () {
  2050. function PanSession(event, handlers, _a) {
  2051. var _this = this;
  2052. var transformPagePoint = (_a === void 0 ? {} : _a).transformPagePoint;
  2053. /**
  2054. * @internal
  2055. */
  2056. this.startEvent = null;
  2057. /**
  2058. * @internal
  2059. */
  2060. this.lastMoveEvent = null;
  2061. /**
  2062. * @internal
  2063. */
  2064. this.lastMoveEventInfo = null;
  2065. /**
  2066. * @internal
  2067. */
  2068. this.handlers = {};
  2069. this.updatePoint = function () {
  2070. if (!(_this.lastMoveEvent && _this.lastMoveEventInfo))
  2071. return;
  2072. var info = getPanInfo(_this.lastMoveEventInfo, _this.history);
  2073. var isPanStarted = _this.startEvent !== null;
  2074. // Only start panning if the offset is larger than 3 pixels. If we make it
  2075. // any larger than this we'll want to reset the pointer history
  2076. // on the first update to avoid visual snapping to the cursoe.
  2077. var isDistancePastThreshold = (0,popmotion__WEBPACK_IMPORTED_MODULE_1__.distance)(info.offset, { x: 0, y: 0 }) >= 3;
  2078. if (!isPanStarted && !isDistancePastThreshold)
  2079. return;
  2080. var point = info.point;
  2081. var timestamp = (0,framesync__WEBPACK_IMPORTED_MODULE_0__.getFrameData)().timestamp;
  2082. _this.history.push((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, point), { timestamp: timestamp }));
  2083. var _a = _this.handlers, onStart = _a.onStart, onMove = _a.onMove;
  2084. if (!isPanStarted) {
  2085. onStart && onStart(_this.lastMoveEvent, info);
  2086. _this.startEvent = _this.lastMoveEvent;
  2087. }
  2088. onMove && onMove(_this.lastMoveEvent, info);
  2089. };
  2090. this.handlePointerMove = function (event, info) {
  2091. _this.lastMoveEvent = event;
  2092. _this.lastMoveEventInfo = transformPoint(info, _this.transformPagePoint);
  2093. // Because Safari doesn't trigger mouseup events when it's above a `<select>`
  2094. if ((0,_utils_event_type_js__WEBPACK_IMPORTED_MODULE_3__.isMouseEvent)(event) && event.buttons === 0) {
  2095. _this.handlePointerUp(event, info);
  2096. return;
  2097. }
  2098. // Throttle mouse move event to once per frame
  2099. framesync__WEBPACK_IMPORTED_MODULE_0__["default"].update(_this.updatePoint, true);
  2100. };
  2101. this.handlePointerUp = function (event, info) {
  2102. _this.end();
  2103. var onEnd = _this.handlers.onEnd;
  2104. if (!onEnd || !_this.startEvent)
  2105. return;
  2106. var panInfo = getPanInfo(transformPoint(info, _this.transformPagePoint), _this.history);
  2107. onEnd && onEnd(event, panInfo);
  2108. };
  2109. // If we have more than one touch, don't start detecting this gesture
  2110. if ((0,_utils_event_type_js__WEBPACK_IMPORTED_MODULE_3__.isTouchEvent)(event) && event.touches.length > 1)
  2111. return;
  2112. this.handlers = handlers;
  2113. this.transformPagePoint = transformPagePoint;
  2114. var info = (0,_events_event_info_js__WEBPACK_IMPORTED_MODULE_4__.extractEventInfo)(event);
  2115. var initialInfo = transformPoint(info, this.transformPagePoint);
  2116. var point = initialInfo.point;
  2117. var timestamp = (0,framesync__WEBPACK_IMPORTED_MODULE_0__.getFrameData)().timestamp;
  2118. this.history = [(0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, point), { timestamp: timestamp })];
  2119. var onSessionStart = handlers.onSessionStart;
  2120. onSessionStart &&
  2121. onSessionStart(event, getPanInfo(initialInfo, this.history));
  2122. this.removeListeners = (0,popmotion__WEBPACK_IMPORTED_MODULE_5__.pipe)((0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_6__.addPointerEvent)(window, "pointermove", this.handlePointerMove), (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_6__.addPointerEvent)(window, "pointerup", this.handlePointerUp), (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_6__.addPointerEvent)(window, "pointercancel", this.handlePointerUp));
  2123. }
  2124. PanSession.prototype.updateHandlers = function (handlers) {
  2125. this.handlers = handlers;
  2126. };
  2127. PanSession.prototype.end = function () {
  2128. this.removeListeners && this.removeListeners();
  2129. framesync__WEBPACK_IMPORTED_MODULE_0__.cancelSync.update(this.updatePoint);
  2130. };
  2131. return PanSession;
  2132. }());
  2133. function transformPoint(info, transformPagePoint) {
  2134. return transformPagePoint ? { point: transformPagePoint(info.point) } : info;
  2135. }
  2136. function subtractPoint(a, b) {
  2137. return { x: a.x - b.x, y: a.y - b.y };
  2138. }
  2139. function getPanInfo(_a, history) {
  2140. var point = _a.point;
  2141. return {
  2142. point: point,
  2143. delta: subtractPoint(point, lastDevicePoint(history)),
  2144. offset: subtractPoint(point, startDevicePoint(history)),
  2145. velocity: getVelocity(history, 0.1),
  2146. };
  2147. }
  2148. function startDevicePoint(history) {
  2149. return history[0];
  2150. }
  2151. function lastDevicePoint(history) {
  2152. return history[history.length - 1];
  2153. }
  2154. function getVelocity(history, timeDelta) {
  2155. if (history.length < 2) {
  2156. return { x: 0, y: 0 };
  2157. }
  2158. var i = history.length - 1;
  2159. var timestampedPoint = null;
  2160. var lastPoint = lastDevicePoint(history);
  2161. while (i >= 0) {
  2162. timestampedPoint = history[i];
  2163. if (lastPoint.timestamp - timestampedPoint.timestamp >
  2164. (0,_utils_time_conversion_js__WEBPACK_IMPORTED_MODULE_7__.secondsToMilliseconds)(timeDelta)) {
  2165. break;
  2166. }
  2167. i--;
  2168. }
  2169. if (!timestampedPoint) {
  2170. return { x: 0, y: 0 };
  2171. }
  2172. var time = (lastPoint.timestamp - timestampedPoint.timestamp) / 1000;
  2173. if (time === 0) {
  2174. return { x: 0, y: 0 };
  2175. }
  2176. var currentVelocity = {
  2177. x: (lastPoint.x - timestampedPoint.x) / time,
  2178. y: (lastPoint.y - timestampedPoint.y) / time,
  2179. };
  2180. if (currentVelocity.x === Infinity) {
  2181. currentVelocity.x = 0;
  2182. }
  2183. if (currentVelocity.y === Infinity) {
  2184. currentVelocity.y = 0;
  2185. }
  2186. return currentVelocity;
  2187. }
  2188. /***/ }),
  2189. /***/ "./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js":
  2190. /*!***************************************************************************************!*\
  2191. !*** ./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js ***!
  2192. \***************************************************************************************/
  2193. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  2194. __webpack_require__.r(__webpack_exports__);
  2195. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2196. /* harmony export */ "VisualElementDragControls": () => (/* binding */ VisualElementDragControls),
  2197. /* harmony export */ "elementDragControls": () => (/* binding */ elementDragControls)
  2198. /* harmony export */ });
  2199. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  2200. /* harmony import */ var _utils_is_ref_object_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/is-ref-object.js */ "./node_modules/framer-motion/dist/es/utils/is-ref-object.js");
  2201. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  2202. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/progress.js");
  2203. /* harmony import */ var _events_event_info_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../events/event-info.js */ "./node_modules/framer-motion/dist/es/events/event-info.js");
  2204. /* harmony import */ var _events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../events/use-dom-event.js */ "./node_modules/framer-motion/dist/es/events/use-dom-event.js");
  2205. /* harmony import */ var _events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../events/use-pointer-event.js */ "./node_modules/framer-motion/dist/es/events/use-pointer-event.js");
  2206. /* harmony import */ var _PanSession_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../PanSession.js */ "./node_modules/framer-motion/dist/es/gestures/PanSession.js");
  2207. /* harmony import */ var _utils_lock_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/lock.js */ "./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js");
  2208. /* harmony import */ var _utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/geometry/index.js */ "./node_modules/framer-motion/dist/es/utils/geometry/index.js");
  2209. /* harmony import */ var _utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/each-axis.js */ "./node_modules/framer-motion/dist/es/utils/each-axis.js");
  2210. /* harmony import */ var _utils_geometry_delta_calc_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../utils/geometry/delta-calc.js */ "./node_modules/framer-motion/dist/es/utils/geometry/delta-calc.js");
  2211. /* harmony import */ var _utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/constraints.js */ "./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js");
  2212. /* harmony import */ var _render_dom_projection_measure_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../render/dom/projection/measure.js */ "./node_modules/framer-motion/dist/es/render/dom/projection/measure.js");
  2213. /* harmony import */ var _animation_utils_transitions_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../animation/utils/transitions.js */ "./node_modules/framer-motion/dist/es/animation/utils/transitions.js");
  2214. /* harmony import */ var _render_utils_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../render/utils/types.js */ "./node_modules/framer-motion/dist/es/render/utils/types.js");
  2215. var elementDragControls = new WeakMap();
  2216. /**
  2217. *
  2218. */
  2219. var lastPointerEvent;
  2220. var VisualElementDragControls = /** @class */ (function () {
  2221. function VisualElementDragControls(_a) {
  2222. var visualElement = _a.visualElement;
  2223. /**
  2224. * Track whether we're currently dragging.
  2225. *
  2226. * @internal
  2227. */
  2228. this.isDragging = false;
  2229. /**
  2230. * The current direction of drag, or `null` if both.
  2231. *
  2232. * @internal
  2233. */
  2234. this.currentDirection = null;
  2235. /**
  2236. * The permitted boundaries of travel, in pixels.
  2237. *
  2238. * @internal
  2239. */
  2240. this.constraints = false;
  2241. /**
  2242. * The per-axis resolved elastic values.
  2243. *
  2244. * @internal
  2245. */
  2246. this.elastic = (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_1__.axisBox)();
  2247. /**
  2248. * A reference to the host component's latest props.
  2249. *
  2250. * @internal
  2251. */
  2252. this.props = {};
  2253. /**
  2254. * @internal
  2255. */
  2256. this.hasMutatedConstraints = false;
  2257. /**
  2258. * Track the initial position of the cursor relative to the dragging element
  2259. * when dragging starts as a value of 0-1 on each axis. We then use this to calculate
  2260. * an ideal bounding box for the VisualElement renderer to project into every frame.
  2261. *
  2262. * @internal
  2263. */
  2264. this.cursorProgress = {
  2265. x: 0.5,
  2266. y: 0.5,
  2267. };
  2268. // When updating _dragX, or _dragY instead of the VisualElement,
  2269. // persist their values between drag gestures.
  2270. this.originPoint = {};
  2271. // This is a reference to the global drag gesture lock, ensuring only one component
  2272. // can "capture" the drag of one or both axes.
  2273. // TODO: Look into moving this into pansession?
  2274. this.openGlobalLock = null;
  2275. /**
  2276. * @internal
  2277. */
  2278. this.panSession = null;
  2279. this.visualElement = visualElement;
  2280. this.visualElement.enableLayoutProjection();
  2281. elementDragControls.set(visualElement, this);
  2282. }
  2283. /**
  2284. * Instantiate a PanSession for the drag gesture
  2285. *
  2286. * @public
  2287. */
  2288. VisualElementDragControls.prototype.start = function (originEvent, _a) {
  2289. var _this = this;
  2290. var _b = _a === void 0 ? {} : _a, _c = _b.snapToCursor, snapToCursor = _c === void 0 ? false : _c, cursorProgress = _b.cursorProgress;
  2291. /**
  2292. * If this drag session has been manually triggered by the user, it might be from an event
  2293. * outside the draggable element. If snapToCursor is set to true, we need to measure the position
  2294. * of the element and snap it to the cursor.
  2295. */
  2296. snapToCursor && this.snapToCursor(originEvent);
  2297. var onSessionStart = function () {
  2298. // Stop any animations on both axis values immediately. This allows the user to throw and catch
  2299. // the component.
  2300. _this.stopMotion();
  2301. };
  2302. var onStart = function (event, info) {
  2303. var _a, _b, _c;
  2304. // Attempt to grab the global drag gesture lock - maybe make this part of PanSession
  2305. var _d = _this.props, drag = _d.drag, dragPropagation = _d.dragPropagation;
  2306. if (drag && !dragPropagation) {
  2307. if (_this.openGlobalLock)
  2308. _this.openGlobalLock();
  2309. _this.openGlobalLock = (0,_utils_lock_js__WEBPACK_IMPORTED_MODULE_2__.getGlobalLock)(drag);
  2310. // If we don 't have the lock, don't start dragging
  2311. if (!_this.openGlobalLock)
  2312. return;
  2313. }
  2314. /**
  2315. * Record the progress of the mouse within the draggable element on each axis.
  2316. * onPan, we're going to use this to calculate a new bounding box for the element to
  2317. * project into. This will ensure that even if the DOM element moves via a relayout, it'll
  2318. * stick to the correct place under the pointer.
  2319. */
  2320. _this.prepareBoundingBox();
  2321. _this.visualElement.lockProjectionTarget();
  2322. /**
  2323. * Resolve the drag constraints. These are either set as top/right/bottom/left constraints
  2324. * relative to the element's layout, or a ref to another element. Both need converting to
  2325. * viewport coordinates.
  2326. */
  2327. _this.resolveDragConstraints();
  2328. /**
  2329. * When dragging starts, we want to find where the cursor is relative to the bounding box
  2330. * of the element. Every frame, we calculate a new bounding box using this relative position
  2331. * and let the visualElement renderer figure out how to reproject the element into this bounding
  2332. * box.
  2333. *
  2334. * By doing it this way, rather than applying an x/y transform directly to the element,
  2335. * we can ensure the component always visually sticks to the cursor as we'd expect, even
  2336. * if the DOM element itself changes layout as a result of React updates the user might
  2337. * make based on the drag position.
  2338. */
  2339. var point = (0,_events_event_info_js__WEBPACK_IMPORTED_MODULE_3__.getViewportPointFromEvent)(event).point;
  2340. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__.eachAxis)(function (axis) {
  2341. var _a = _this.visualElement.projection.target[axis], min = _a.min, max = _a.max;
  2342. _this.cursorProgress[axis] = cursorProgress
  2343. ? cursorProgress[axis]
  2344. : (0,popmotion__WEBPACK_IMPORTED_MODULE_5__.progress)(min, max, point[axis]);
  2345. /**
  2346. * If we have external drag MotionValues, record their origin point. On pointermove
  2347. * we'll apply the pan gesture offset directly to this value.
  2348. */
  2349. var axisValue = _this.getAxisMotionValue(axis);
  2350. if (axisValue) {
  2351. _this.originPoint[axis] = axisValue.get();
  2352. }
  2353. });
  2354. // Set current drag status
  2355. _this.isDragging = true;
  2356. _this.currentDirection = null;
  2357. // Fire onDragStart event
  2358. (_b = (_a = _this.props).onDragStart) === null || _b === void 0 ? void 0 : _b.call(_a, event, info);
  2359. (_c = _this.visualElement.animationState) === null || _c === void 0 ? void 0 : _c.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_6__.AnimationType.Drag, true);
  2360. };
  2361. var onMove = function (event, info) {
  2362. var _a, _b, _c, _d;
  2363. var _e = _this.props, dragPropagation = _e.dragPropagation, dragDirectionLock = _e.dragDirectionLock;
  2364. // If we didn't successfully receive the gesture lock, early return.
  2365. if (!dragPropagation && !_this.openGlobalLock)
  2366. return;
  2367. var offset = info.offset;
  2368. // Attempt to detect drag direction if directionLock is true
  2369. if (dragDirectionLock && _this.currentDirection === null) {
  2370. _this.currentDirection = getCurrentDirection(offset);
  2371. // If we've successfully set a direction, notify listener
  2372. if (_this.currentDirection !== null) {
  2373. (_b = (_a = _this.props).onDirectionLock) === null || _b === void 0 ? void 0 : _b.call(_a, _this.currentDirection);
  2374. }
  2375. return;
  2376. }
  2377. // Update each point with the latest position
  2378. _this.updateAxis("x", event, offset);
  2379. _this.updateAxis("y", event, offset);
  2380. // Fire onDrag event
  2381. (_d = (_c = _this.props).onDrag) === null || _d === void 0 ? void 0 : _d.call(_c, event, info);
  2382. // Update the last pointer event
  2383. lastPointerEvent = event;
  2384. };
  2385. var onEnd = function (event, info) { return _this.stop(event, info); };
  2386. var transformPagePoint = this.props.transformPagePoint;
  2387. this.panSession = new _PanSession_js__WEBPACK_IMPORTED_MODULE_7__.PanSession(originEvent, {
  2388. onSessionStart: onSessionStart,
  2389. onStart: onStart,
  2390. onMove: onMove,
  2391. onEnd: onEnd,
  2392. }, { transformPagePoint: transformPagePoint });
  2393. };
  2394. /**
  2395. * Ensure the component's layout and target bounding boxes are up-to-date.
  2396. */
  2397. VisualElementDragControls.prototype.prepareBoundingBox = function () {
  2398. var visualElement = this.visualElement;
  2399. visualElement.withoutTransform(function () {
  2400. visualElement.updateLayoutMeasurement();
  2401. });
  2402. visualElement.rebaseProjectionTarget(true, visualElement.measureViewportBox(false));
  2403. };
  2404. VisualElementDragControls.prototype.resolveDragConstraints = function () {
  2405. var _this = this;
  2406. var _a = this.props, dragConstraints = _a.dragConstraints, dragElastic = _a.dragElastic;
  2407. if (dragConstraints) {
  2408. this.constraints = (0,_utils_is_ref_object_js__WEBPACK_IMPORTED_MODULE_8__.isRefObject)(dragConstraints)
  2409. ? this.resolveRefConstraints(this.visualElement.getLayoutState().layout, dragConstraints)
  2410. : (0,_utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.calcRelativeConstraints)(this.visualElement.getLayoutState().layout, dragConstraints);
  2411. }
  2412. else {
  2413. this.constraints = false;
  2414. }
  2415. this.elastic = (0,_utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.resolveDragElastic)(dragElastic);
  2416. /**
  2417. * If we're outputting to external MotionValues, we want to rebase the measured constraints
  2418. * from viewport-relative to component-relative.
  2419. */
  2420. if (this.constraints && !this.hasMutatedConstraints) {
  2421. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__.eachAxis)(function (axis) {
  2422. if (_this.getAxisMotionValue(axis)) {
  2423. _this.constraints[axis] = (0,_utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.rebaseAxisConstraints)(_this.visualElement.getLayoutState().layout[axis], _this.constraints[axis]);
  2424. }
  2425. });
  2426. }
  2427. };
  2428. VisualElementDragControls.prototype.resolveRefConstraints = function (layoutBox, constraints) {
  2429. var _a = this.props, onMeasureDragConstraints = _a.onMeasureDragConstraints, transformPagePoint = _a.transformPagePoint;
  2430. var constraintsElement = constraints.current;
  2431. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(constraintsElement !== null, "If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");
  2432. this.constraintsBox = (0,_render_dom_projection_measure_js__WEBPACK_IMPORTED_MODULE_10__.getBoundingBox)(constraintsElement, transformPagePoint);
  2433. var measuredConstraints = (0,_utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.calcViewportConstraints)(layoutBox, this.constraintsBox);
  2434. /**
  2435. * If there's an onMeasureDragConstraints listener we call it and
  2436. * if different constraints are returned, set constraints to that
  2437. */
  2438. if (onMeasureDragConstraints) {
  2439. var userConstraints = onMeasureDragConstraints((0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_1__.convertAxisBoxToBoundingBox)(measuredConstraints));
  2440. this.hasMutatedConstraints = !!userConstraints;
  2441. if (userConstraints) {
  2442. measuredConstraints = (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_1__.convertBoundingBoxToAxisBox)(userConstraints);
  2443. }
  2444. }
  2445. return measuredConstraints;
  2446. };
  2447. VisualElementDragControls.prototype.cancelDrag = function () {
  2448. var _a;
  2449. this.isDragging = false;
  2450. this.panSession && this.panSession.end();
  2451. this.panSession = null;
  2452. if (!this.props.dragPropagation && this.openGlobalLock) {
  2453. this.openGlobalLock();
  2454. this.openGlobalLock = null;
  2455. }
  2456. (_a = this.visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_6__.AnimationType.Drag, false);
  2457. };
  2458. VisualElementDragControls.prototype.stop = function (event, info) {
  2459. var _a;
  2460. this.visualElement.unlockProjectionTarget();
  2461. (_a = this.panSession) === null || _a === void 0 ? void 0 : _a.end();
  2462. this.panSession = null;
  2463. var isDragging = this.isDragging;
  2464. this.cancelDrag();
  2465. if (!isDragging)
  2466. return;
  2467. var _b = this.props, dragMomentum = _b.dragMomentum, onDragEnd = _b.onDragEnd;
  2468. if (dragMomentum || this.elastic) {
  2469. var velocity = info.velocity;
  2470. this.animateDragEnd(velocity);
  2471. }
  2472. onDragEnd === null || onDragEnd === void 0 ? void 0 : onDragEnd(event, info);
  2473. };
  2474. VisualElementDragControls.prototype.snapToCursor = function (event) {
  2475. var _this = this;
  2476. this.prepareBoundingBox();
  2477. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__.eachAxis)(function (axis) {
  2478. var drag = _this.props.drag;
  2479. // If we're not dragging this axis, do an early return.
  2480. if (!shouldDrag(axis, drag, _this.currentDirection))
  2481. return;
  2482. var axisValue = _this.getAxisMotionValue(axis);
  2483. if (axisValue) {
  2484. var point = (0,_events_event_info_js__WEBPACK_IMPORTED_MODULE_3__.getViewportPointFromEvent)(event).point;
  2485. var box = _this.visualElement.getLayoutState().layout;
  2486. var length_1 = box[axis].max - box[axis].min;
  2487. var center = box[axis].min + length_1 / 2;
  2488. var offset = point[axis] - center;
  2489. _this.originPoint[axis] = point[axis];
  2490. axisValue.set(offset);
  2491. }
  2492. else {
  2493. _this.cursorProgress[axis] = 0.5;
  2494. _this.updateVisualElementAxis(axis, event);
  2495. }
  2496. });
  2497. };
  2498. /**
  2499. * Update the specified axis with the latest pointer information.
  2500. */
  2501. VisualElementDragControls.prototype.updateAxis = function (axis, event, offset) {
  2502. var drag = this.props.drag;
  2503. // If we're not dragging this axis, do an early return.
  2504. if (!shouldDrag(axis, drag, this.currentDirection))
  2505. return;
  2506. return this.getAxisMotionValue(axis)
  2507. ? this.updateAxisMotionValue(axis, offset)
  2508. : this.updateVisualElementAxis(axis, event);
  2509. };
  2510. VisualElementDragControls.prototype.updateAxisMotionValue = function (axis, offset) {
  2511. var axisValue = this.getAxisMotionValue(axis);
  2512. if (!offset || !axisValue)
  2513. return;
  2514. var nextValue = this.originPoint[axis] + offset[axis];
  2515. var update = this.constraints
  2516. ? (0,_utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.applyConstraints)(nextValue, this.constraints[axis], this.elastic[axis])
  2517. : nextValue;
  2518. axisValue.set(update);
  2519. };
  2520. VisualElementDragControls.prototype.updateVisualElementAxis = function (axis, event) {
  2521. var _a;
  2522. // Get the actual layout bounding box of the element
  2523. var axisLayout = this.visualElement.getLayoutState().layout[axis];
  2524. // Calculate its current length. In the future we might want to lerp this to animate
  2525. // between lengths if the layout changes as we change the DOM
  2526. var axisLength = axisLayout.max - axisLayout.min;
  2527. // Get the initial progress that the pointer sat on this axis on gesture start.
  2528. var axisProgress = this.cursorProgress[axis];
  2529. var point = (0,_events_event_info_js__WEBPACK_IMPORTED_MODULE_3__.getViewportPointFromEvent)(event).point;
  2530. // Calculate a new min point based on the latest pointer position, constraints and elastic
  2531. var min = (0,_utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.calcConstrainedMinPoint)(point[axis], axisLength, axisProgress, (_a = this.constraints) === null || _a === void 0 ? void 0 : _a[axis], this.elastic[axis]);
  2532. // Update the axis viewport target with this new min and the length
  2533. this.visualElement.setProjectionTargetAxis(axis, min, min + axisLength);
  2534. };
  2535. VisualElementDragControls.prototype.setProps = function (_a) {
  2536. var _b = _a.drag, drag = _b === void 0 ? false : _b, _c = _a.dragDirectionLock, dragDirectionLock = _c === void 0 ? false : _c, _d = _a.dragPropagation, dragPropagation = _d === void 0 ? false : _d, _e = _a.dragConstraints, dragConstraints = _e === void 0 ? false : _e, _f = _a.dragElastic, dragElastic = _f === void 0 ? _utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.defaultElastic : _f, _g = _a.dragMomentum, dragMomentum = _g === void 0 ? true : _g, remainingProps = (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__rest)(_a, ["drag", "dragDirectionLock", "dragPropagation", "dragConstraints", "dragElastic", "dragMomentum"]);
  2537. this.props = (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__assign)({ drag: drag,
  2538. dragDirectionLock: dragDirectionLock,
  2539. dragPropagation: dragPropagation,
  2540. dragConstraints: dragConstraints,
  2541. dragElastic: dragElastic,
  2542. dragMomentum: dragMomentum }, remainingProps);
  2543. };
  2544. /**
  2545. * Drag works differently depending on which props are provided.
  2546. *
  2547. * - If _dragX and _dragY are provided, we output the gesture delta directly to those motion values.
  2548. * - If the component will perform layout animations, we output the gesture to the component's
  2549. * visual bounding box
  2550. * - Otherwise, we apply the delta to the x/y motion values.
  2551. */
  2552. VisualElementDragControls.prototype.getAxisMotionValue = function (axis) {
  2553. var _a = this.props, layout = _a.layout, layoutId = _a.layoutId;
  2554. var dragKey = "_drag" + axis.toUpperCase();
  2555. if (this.props[dragKey]) {
  2556. return this.props[dragKey];
  2557. }
  2558. else if (!layout && layoutId === undefined) {
  2559. return this.visualElement.getValue(axis, 0);
  2560. }
  2561. };
  2562. VisualElementDragControls.prototype.animateDragEnd = function (velocity) {
  2563. var _this = this;
  2564. var _a = this.props, drag = _a.drag, dragMomentum = _a.dragMomentum, dragElastic = _a.dragElastic, dragTransition = _a.dragTransition;
  2565. var momentumAnimations = (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__.eachAxis)(function (axis) {
  2566. if (!shouldDrag(axis, drag, _this.currentDirection)) {
  2567. return;
  2568. }
  2569. var transition = _this.constraints ? _this.constraints[axis] : {};
  2570. /**
  2571. * Overdamp the boundary spring if `dragElastic` is disabled. There's still a frame
  2572. * of spring animations so we should look into adding a disable spring option to `inertia`.
  2573. * We could do something here where we affect the `bounceStiffness` and `bounceDamping`
  2574. * using the value of `dragElastic`.
  2575. */
  2576. var bounceStiffness = dragElastic ? 200 : 1000000;
  2577. var bounceDamping = dragElastic ? 40 : 10000000;
  2578. var inertia = (0,tslib__WEBPACK_IMPORTED_MODULE_11__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_11__.__assign)({ type: "inertia", velocity: dragMomentum ? velocity[axis] : 0, bounceStiffness: bounceStiffness,
  2579. bounceDamping: bounceDamping, timeConstant: 750, restDelta: 1, restSpeed: 10 }, dragTransition), transition);
  2580. // If we're not animating on an externally-provided `MotionValue` we can use the
  2581. // component's animation controls which will handle interactions with whileHover (etc),
  2582. // otherwise we just have to animate the `MotionValue` itself.
  2583. return _this.getAxisMotionValue(axis)
  2584. ? _this.startAxisValueAnimation(axis, inertia)
  2585. : _this.visualElement.startLayoutAnimation(axis, inertia);
  2586. });
  2587. // Run all animations and then resolve the new drag constraints.
  2588. return Promise.all(momentumAnimations).then(function () {
  2589. var _a, _b;
  2590. (_b = (_a = _this.props).onDragTransitionEnd) === null || _b === void 0 ? void 0 : _b.call(_a);
  2591. });
  2592. };
  2593. VisualElementDragControls.prototype.stopMotion = function () {
  2594. var _this = this;
  2595. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__.eachAxis)(function (axis) {
  2596. var axisValue = _this.getAxisMotionValue(axis);
  2597. axisValue
  2598. ? axisValue.stop()
  2599. : _this.visualElement.stopLayoutAnimation();
  2600. });
  2601. };
  2602. VisualElementDragControls.prototype.startAxisValueAnimation = function (axis, transition) {
  2603. var axisValue = this.getAxisMotionValue(axis);
  2604. if (!axisValue)
  2605. return;
  2606. var currentValue = axisValue.get();
  2607. axisValue.set(currentValue);
  2608. axisValue.set(currentValue); // Set twice to hard-reset velocity
  2609. return (0,_animation_utils_transitions_js__WEBPACK_IMPORTED_MODULE_12__.startAnimation)(axis, axisValue, 0, transition);
  2610. };
  2611. VisualElementDragControls.prototype.scalePoint = function () {
  2612. var _this = this;
  2613. var _a = this.props, drag = _a.drag, dragConstraints = _a.dragConstraints;
  2614. if (!(0,_utils_is_ref_object_js__WEBPACK_IMPORTED_MODULE_8__.isRefObject)(dragConstraints) || !this.constraintsBox)
  2615. return;
  2616. // Stop any current animations as there can be some visual glitching if we resize mid animation
  2617. this.stopMotion();
  2618. // Record the relative progress of the targetBox relative to the constraintsBox
  2619. var boxProgress = { x: 0, y: 0 };
  2620. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__.eachAxis)(function (axis) {
  2621. boxProgress[axis] = (0,_utils_geometry_delta_calc_js__WEBPACK_IMPORTED_MODULE_13__.calcOrigin)(_this.visualElement.projection.target[axis], _this.constraintsBox[axis]);
  2622. });
  2623. /**
  2624. * For each axis, calculate the current progress of the layout axis within the constraints.
  2625. * Then, using the latest layout and constraints measurements, reposition the new layout axis
  2626. * proportionally within the constraints.
  2627. */
  2628. this.prepareBoundingBox();
  2629. this.resolveDragConstraints();
  2630. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_4__.eachAxis)(function (axis) {
  2631. if (!shouldDrag(axis, drag, null))
  2632. return;
  2633. // Calculate the position of the targetBox relative to the constraintsBox using the
  2634. // previously calculated progress
  2635. var _a = (0,_utils_constraints_js__WEBPACK_IMPORTED_MODULE_9__.calcPositionFromProgress)(_this.visualElement.projection.target[axis], _this.constraintsBox[axis], boxProgress[axis]), min = _a.min, max = _a.max;
  2636. _this.visualElement.setProjectionTargetAxis(axis, min, max);
  2637. });
  2638. };
  2639. VisualElementDragControls.prototype.mount = function (visualElement) {
  2640. var _this = this;
  2641. var element = visualElement.getInstance();
  2642. /**
  2643. * Attach a pointerdown event listener on this DOM element to initiate drag tracking.
  2644. */
  2645. var stopPointerListener = (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_14__.addPointerEvent)(element, "pointerdown", function (event) {
  2646. var _a = _this.props, drag = _a.drag, _b = _a.dragListener, dragListener = _b === void 0 ? true : _b;
  2647. drag && dragListener && _this.start(event);
  2648. });
  2649. /**
  2650. * Attach a window resize listener to scale the draggable target within its defined
  2651. * constraints as the window resizes.
  2652. */
  2653. var stopResizeListener = (0,_events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_15__.addDomEvent)(window, "resize", function () {
  2654. _this.scalePoint();
  2655. });
  2656. /**
  2657. * Ensure drag constraints are resolved correctly relative to the dragging element
  2658. * whenever its layout changes.
  2659. */
  2660. var stopLayoutUpdateListener = visualElement.onLayoutUpdate(function () {
  2661. if (_this.isDragging)
  2662. _this.resolveDragConstraints();
  2663. });
  2664. /**
  2665. * If the previous component with this same layoutId was dragging at the time
  2666. * it was unmounted, we want to continue the same gesture on this component.
  2667. */
  2668. var prevDragCursor = visualElement.prevDragCursor;
  2669. if (prevDragCursor) {
  2670. this.start(lastPointerEvent, { cursorProgress: prevDragCursor });
  2671. }
  2672. /**
  2673. * Return a function that will teardown the drag gesture
  2674. */
  2675. return function () {
  2676. stopPointerListener === null || stopPointerListener === void 0 ? void 0 : stopPointerListener();
  2677. stopResizeListener === null || stopResizeListener === void 0 ? void 0 : stopResizeListener();
  2678. stopLayoutUpdateListener === null || stopLayoutUpdateListener === void 0 ? void 0 : stopLayoutUpdateListener();
  2679. _this.cancelDrag();
  2680. };
  2681. };
  2682. return VisualElementDragControls;
  2683. }());
  2684. function shouldDrag(direction, drag, currentDirection) {
  2685. return ((drag === true || drag === direction) &&
  2686. (currentDirection === null || currentDirection === direction));
  2687. }
  2688. /**
  2689. * Based on an x/y offset determine the current drag direction. If both axis' offsets are lower
  2690. * than the provided threshold, return `null`.
  2691. *
  2692. * @param offset - The x/y offset from origin.
  2693. * @param lockThreshold - (Optional) - the minimum absolute offset before we can determine a drag direction.
  2694. */
  2695. function getCurrentDirection(offset, lockThreshold) {
  2696. if (lockThreshold === void 0) { lockThreshold = 10; }
  2697. var direction = null;
  2698. if (Math.abs(offset.y) > lockThreshold) {
  2699. direction = "y";
  2700. }
  2701. else if (Math.abs(offset.x) > lockThreshold) {
  2702. direction = "x";
  2703. }
  2704. return direction;
  2705. }
  2706. /***/ }),
  2707. /***/ "./node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js":
  2708. /*!*******************************************************************************!*\
  2709. !*** ./node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js ***!
  2710. \*******************************************************************************/
  2711. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  2712. __webpack_require__.r(__webpack_exports__);
  2713. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2714. /* harmony export */ "DragControls": () => (/* binding */ DragControls),
  2715. /* harmony export */ "useDragControls": () => (/* binding */ useDragControls)
  2716. /* harmony export */ });
  2717. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  2718. /**
  2719. * Can manually trigger a drag gesture on one or more `drag`-enabled `motion` components.
  2720. *
  2721. * @library
  2722. *
  2723. * ```jsx
  2724. * const dragControls = useDragControls()
  2725. *
  2726. * function startDrag(event) {
  2727. * dragControls.start(event, { snapToCursor: true })
  2728. * }
  2729. *
  2730. * return (
  2731. * <>
  2732. * <Frame onTapStart={startDrag} />
  2733. * <Frame drag="x" dragControls={dragControls} />
  2734. * </>
  2735. * )
  2736. * ```
  2737. *
  2738. * @motion
  2739. *
  2740. * ```jsx
  2741. * const dragControls = useDragControls()
  2742. *
  2743. * function startDrag(event) {
  2744. * dragControls.start(event, { snapToCursor: true })
  2745. * }
  2746. *
  2747. * return (
  2748. * <>
  2749. * <div onPointerDown={startDrag} />
  2750. * <motion.div drag="x" dragControls={dragControls} />
  2751. * </>
  2752. * )
  2753. * ```
  2754. *
  2755. * @public
  2756. */
  2757. var DragControls = /** @class */ (function () {
  2758. function DragControls() {
  2759. this.componentControls = new Set();
  2760. }
  2761. /**
  2762. * Subscribe a component's internal `VisualElementDragControls` to the user-facing API.
  2763. *
  2764. * @internal
  2765. */
  2766. DragControls.prototype.subscribe = function (controls) {
  2767. var _this = this;
  2768. this.componentControls.add(controls);
  2769. return function () { return _this.componentControls.delete(controls); };
  2770. };
  2771. /**
  2772. * Start a drag gesture on every `motion` component that has this set of drag controls
  2773. * passed into it via the `dragControls` prop.
  2774. *
  2775. * ```jsx
  2776. * dragControls.start(e, {
  2777. * snapToCursor: true
  2778. * })
  2779. * ```
  2780. *
  2781. * @param event - PointerEvent
  2782. * @param options - Options
  2783. *
  2784. * @public
  2785. */
  2786. DragControls.prototype.start = function (event, options) {
  2787. this.componentControls.forEach(function (controls) {
  2788. controls.start(event.nativeEvent || event, options);
  2789. });
  2790. };
  2791. DragControls.prototype.updateConstraints = function () {
  2792. this.componentControls.forEach(function (controls) {
  2793. controls.prepareBoundingBox();
  2794. controls.resolveDragConstraints();
  2795. });
  2796. };
  2797. return DragControls;
  2798. }());
  2799. var createDragControls = function () { return new DragControls(); };
  2800. /**
  2801. * Usually, dragging is initiated by pressing down on a `motion` component with a `drag` prop
  2802. * and moving it. For some use-cases, for instance clicking at an arbitrary point on a video scrubber, we
  2803. * might want to initiate that dragging from a different component than the draggable one.
  2804. *
  2805. * By creating a `dragControls` using the `useDragControls` hook, we can pass this into
  2806. * the draggable component's `dragControls` prop. It exposes a `start` method
  2807. * that can start dragging from pointer events on other components.
  2808. *
  2809. * @library
  2810. *
  2811. * ```jsx
  2812. * const dragControls = useDragControls()
  2813. *
  2814. * function startDrag(event) {
  2815. * dragControls.start(event, { snapToCursor: true })
  2816. * }
  2817. *
  2818. * return (
  2819. * <>
  2820. * <Frame onTapStart={startDrag} />
  2821. * <Frame drag="x" dragControls={dragControls} />
  2822. * </>
  2823. * )
  2824. * ```
  2825. *
  2826. * @motion
  2827. *
  2828. * ```jsx
  2829. * const dragControls = useDragControls()
  2830. *
  2831. * function startDrag(event) {
  2832. * dragControls.start(event, { snapToCursor: true })
  2833. * }
  2834. *
  2835. * return (
  2836. * <>
  2837. * <div onPointerDown={startDrag} />
  2838. * <motion.div drag="x" dragControls={dragControls} />
  2839. * </>
  2840. * )
  2841. * ```
  2842. *
  2843. * @public
  2844. */
  2845. function useDragControls() {
  2846. return (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_0__.useConstant)(createDragControls);
  2847. }
  2848. /***/ }),
  2849. /***/ "./node_modules/framer-motion/dist/es/gestures/drag/use-drag.js":
  2850. /*!**********************************************************************!*\
  2851. !*** ./node_modules/framer-motion/dist/es/gestures/drag/use-drag.js ***!
  2852. \**********************************************************************/
  2853. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  2854. __webpack_require__.r(__webpack_exports__);
  2855. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2856. /* harmony export */ "useDrag": () => (/* binding */ useDrag)
  2857. /* harmony export */ });
  2858. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  2859. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  2860. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  2861. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  2862. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  2863. /* harmony import */ var _VisualElementDragControls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./VisualElementDragControls.js */ "./node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.js");
  2864. /**
  2865. * A hook that allows an element to be dragged.
  2866. *
  2867. * @internal
  2868. */
  2869. function useDrag(props, visualElement) {
  2870. var groupDragControls = props.dragControls;
  2871. var transformPagePoint = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__.MotionConfigContext).transformPagePoint;
  2872. var dragControls = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_2__.useConstant)(function () {
  2873. return new _VisualElementDragControls_js__WEBPACK_IMPORTED_MODULE_3__.VisualElementDragControls({
  2874. visualElement: visualElement,
  2875. });
  2876. });
  2877. dragControls.setProps((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({}, props), { transformPagePoint: transformPagePoint }));
  2878. // If we've been provided a DragControls for manual control over the drag gesture,
  2879. // subscribe this component to it on mount.
  2880. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { return groupDragControls && groupDragControls.subscribe(dragControls); }, [dragControls]);
  2881. // Mount the drag controls with the visualElement
  2882. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { return dragControls.mount(visualElement); }, []);
  2883. }
  2884. /***/ }),
  2885. /***/ "./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js":
  2886. /*!*******************************************************************************!*\
  2887. !*** ./node_modules/framer-motion/dist/es/gestures/drag/utils/constraints.js ***!
  2888. \*******************************************************************************/
  2889. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  2890. __webpack_require__.r(__webpack_exports__);
  2891. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  2892. /* harmony export */ "applyConstraints": () => (/* binding */ applyConstraints),
  2893. /* harmony export */ "calcConstrainedMinPoint": () => (/* binding */ calcConstrainedMinPoint),
  2894. /* harmony export */ "calcPositionFromProgress": () => (/* binding */ calcPositionFromProgress),
  2895. /* harmony export */ "calcRelativeAxisConstraints": () => (/* binding */ calcRelativeAxisConstraints),
  2896. /* harmony export */ "calcRelativeConstraints": () => (/* binding */ calcRelativeConstraints),
  2897. /* harmony export */ "calcViewportAxisConstraints": () => (/* binding */ calcViewportAxisConstraints),
  2898. /* harmony export */ "calcViewportConstraints": () => (/* binding */ calcViewportConstraints),
  2899. /* harmony export */ "defaultElastic": () => (/* binding */ defaultElastic),
  2900. /* harmony export */ "rebaseAxisConstraints": () => (/* binding */ rebaseAxisConstraints),
  2901. /* harmony export */ "resolveAxisElastic": () => (/* binding */ resolveAxisElastic),
  2902. /* harmony export */ "resolveDragElastic": () => (/* binding */ resolveDragElastic),
  2903. /* harmony export */ "resolvePointElastic": () => (/* binding */ resolvePointElastic)
  2904. /* harmony export */ });
  2905. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  2906. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/mix.js");
  2907. /**
  2908. * Apply constraints to a point. These constraints are both physical along an
  2909. * axis, and an elastic factor that determines how much to constrain the point
  2910. * by if it does lie outside the defined parameters.
  2911. */
  2912. function applyConstraints(point, _a, elastic) {
  2913. var min = _a.min, max = _a.max;
  2914. if (min !== undefined && point < min) {
  2915. // If we have a min point defined, and this is outside of that, constrain
  2916. point = elastic ? (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.mix)(min, point, elastic.min) : Math.max(point, min);
  2917. }
  2918. else if (max !== undefined && point > max) {
  2919. // If we have a max point defined, and this is outside of that, constrain
  2920. point = elastic ? (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.mix)(max, point, elastic.max) : Math.min(point, max);
  2921. }
  2922. return point;
  2923. }
  2924. /**
  2925. * Calculates a min projection point based on a pointer, pointer progress
  2926. * within the drag target, and constraints.
  2927. *
  2928. * For instance if an element was 100px width, we were dragging from 0.25
  2929. * along this axis, the pointer is at 200px, and there were no constraints,
  2930. * we would calculate a min projection point of 175px.
  2931. */
  2932. function calcConstrainedMinPoint(point, length, progress, constraints, elastic) {
  2933. // Calculate a min point for this axis and apply it to the current pointer
  2934. var min = point - length * progress;
  2935. return constraints ? applyConstraints(min, constraints, elastic) : min;
  2936. }
  2937. /**
  2938. * Calculate constraints in terms of the viewport when defined relatively to the
  2939. * measured axis. This is measured from the nearest edge, so a max constraint of 200
  2940. * on an axis with a max value of 300 would return a constraint of 500 - axis length
  2941. */
  2942. function calcRelativeAxisConstraints(axis, min, max) {
  2943. return {
  2944. min: min !== undefined ? axis.min + min : undefined,
  2945. max: max !== undefined
  2946. ? axis.max + max - (axis.max - axis.min)
  2947. : undefined,
  2948. };
  2949. }
  2950. /**
  2951. * Calculate constraints in terms of the viewport when
  2952. * defined relatively to the measured bounding box.
  2953. */
  2954. function calcRelativeConstraints(layoutBox, _a) {
  2955. var top = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;
  2956. return {
  2957. x: calcRelativeAxisConstraints(layoutBox.x, left, right),
  2958. y: calcRelativeAxisConstraints(layoutBox.y, top, bottom),
  2959. };
  2960. }
  2961. /**
  2962. * Calculate viewport constraints when defined as another viewport-relative axis
  2963. */
  2964. function calcViewportAxisConstraints(layoutAxis, constraintsAxis) {
  2965. var _a;
  2966. var min = constraintsAxis.min - layoutAxis.min;
  2967. var max = constraintsAxis.max - layoutAxis.max;
  2968. // If the constraints axis is actually smaller than the layout axis then we can
  2969. // flip the constraints
  2970. if (constraintsAxis.max - constraintsAxis.min <
  2971. layoutAxis.max - layoutAxis.min) {
  2972. _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)([max, min], 2), min = _a[0], max = _a[1];
  2973. }
  2974. return {
  2975. min: layoutAxis.min + min,
  2976. max: layoutAxis.min + max,
  2977. };
  2978. }
  2979. /**
  2980. * Calculate viewport constraints when defined as another viewport-relative box
  2981. */
  2982. function calcViewportConstraints(layoutBox, constraintsBox) {
  2983. return {
  2984. x: calcViewportAxisConstraints(layoutBox.x, constraintsBox.x),
  2985. y: calcViewportAxisConstraints(layoutBox.y, constraintsBox.y),
  2986. };
  2987. }
  2988. /**
  2989. * Calculate the an axis position based on two axes and a progress value.
  2990. */
  2991. function calcPositionFromProgress(axis, constraints, progress) {
  2992. var axisLength = axis.max - axis.min;
  2993. var min = (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.mix)(constraints.min, constraints.max - axisLength, progress);
  2994. return { min: min, max: min + axisLength };
  2995. }
  2996. /**
  2997. * Rebase the calculated viewport constraints relative to the layout.min point.
  2998. */
  2999. function rebaseAxisConstraints(layout, constraints) {
  3000. var relativeConstraints = {};
  3001. if (constraints.min !== undefined) {
  3002. relativeConstraints.min = constraints.min - layout.min;
  3003. }
  3004. if (constraints.max !== undefined) {
  3005. relativeConstraints.max = constraints.max - layout.min;
  3006. }
  3007. return relativeConstraints;
  3008. }
  3009. var defaultElastic = 0.35;
  3010. /**
  3011. * Accepts a dragElastic prop and returns resolved elastic values for each axis.
  3012. */
  3013. function resolveDragElastic(dragElastic) {
  3014. if (dragElastic === false) {
  3015. dragElastic = 0;
  3016. }
  3017. else if (dragElastic === true) {
  3018. dragElastic = defaultElastic;
  3019. }
  3020. return {
  3021. x: resolveAxisElastic(dragElastic, "left", "right"),
  3022. y: resolveAxisElastic(dragElastic, "top", "bottom"),
  3023. };
  3024. }
  3025. function resolveAxisElastic(dragElastic, minLabel, maxLabel) {
  3026. return {
  3027. min: resolvePointElastic(dragElastic, minLabel),
  3028. max: resolvePointElastic(dragElastic, maxLabel),
  3029. };
  3030. }
  3031. function resolvePointElastic(dragElastic, label) {
  3032. var _a;
  3033. return typeof dragElastic === "number"
  3034. ? dragElastic
  3035. : (_a = dragElastic[label]) !== null && _a !== void 0 ? _a : 0;
  3036. }
  3037. /***/ }),
  3038. /***/ "./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js":
  3039. /*!************************************************************************!*\
  3040. !*** ./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js ***!
  3041. \************************************************************************/
  3042. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3043. __webpack_require__.r(__webpack_exports__);
  3044. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3045. /* harmony export */ "createLock": () => (/* binding */ createLock),
  3046. /* harmony export */ "getGlobalLock": () => (/* binding */ getGlobalLock),
  3047. /* harmony export */ "isDragActive": () => (/* binding */ isDragActive)
  3048. /* harmony export */ });
  3049. function createLock(name) {
  3050. var lock = null;
  3051. return function () {
  3052. var openLock = function () {
  3053. lock = null;
  3054. };
  3055. if (lock === null) {
  3056. lock = name;
  3057. return openLock;
  3058. }
  3059. return false;
  3060. };
  3061. }
  3062. var globalHorizontalLock = createLock("dragHorizontal");
  3063. var globalVerticalLock = createLock("dragVertical");
  3064. function getGlobalLock(drag) {
  3065. var lock = false;
  3066. if (drag === "y") {
  3067. lock = globalVerticalLock();
  3068. }
  3069. else if (drag === "x") {
  3070. lock = globalHorizontalLock();
  3071. }
  3072. else {
  3073. var openHorizontal_1 = globalHorizontalLock();
  3074. var openVertical_1 = globalVerticalLock();
  3075. if (openHorizontal_1 && openVertical_1) {
  3076. lock = function () {
  3077. openHorizontal_1();
  3078. openVertical_1();
  3079. };
  3080. }
  3081. else {
  3082. // Release the locks because we don't use them
  3083. if (openHorizontal_1)
  3084. openHorizontal_1();
  3085. if (openVertical_1)
  3086. openVertical_1();
  3087. }
  3088. }
  3089. return lock;
  3090. }
  3091. function isDragActive() {
  3092. // Check the gesture lock - if we get it, it means no drag gesture is active
  3093. // and we can safely fire the tap gesture.
  3094. var openGestureLock = getGlobalLock(true);
  3095. if (!openGestureLock)
  3096. return true;
  3097. openGestureLock();
  3098. return false;
  3099. }
  3100. /***/ }),
  3101. /***/ "./node_modules/framer-motion/dist/es/gestures/types.js":
  3102. /*!**************************************************************!*\
  3103. !*** ./node_modules/framer-motion/dist/es/gestures/types.js ***!
  3104. \**************************************************************/
  3105. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3106. __webpack_require__.r(__webpack_exports__);
  3107. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3108. /* harmony export */ "gestureProps": () => (/* binding */ gestureProps)
  3109. /* harmony export */ });
  3110. /**
  3111. * @internal
  3112. */
  3113. var gestureProps = [
  3114. "onPan",
  3115. "onPanStart",
  3116. "onPanEnd",
  3117. "onPanSessionStart",
  3118. "onTap",
  3119. "onTapStart",
  3120. "onTapCancel",
  3121. "onHoverStart",
  3122. "onHoverEnd",
  3123. "whileFocus",
  3124. "whileTap",
  3125. "whileHover",
  3126. ];
  3127. /***/ }),
  3128. /***/ "./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.js":
  3129. /*!**************************************************************************!*\
  3130. !*** ./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.js ***!
  3131. \**************************************************************************/
  3132. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3133. __webpack_require__.r(__webpack_exports__);
  3134. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3135. /* harmony export */ "useFocusGesture": () => (/* binding */ useFocusGesture)
  3136. /* harmony export */ });
  3137. /* harmony import */ var _events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/use-dom-event.js */ "./node_modules/framer-motion/dist/es/events/use-dom-event.js");
  3138. /* harmony import */ var _render_utils_types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../render/utils/types.js */ "./node_modules/framer-motion/dist/es/render/utils/types.js");
  3139. /**
  3140. *
  3141. * @param props
  3142. * @param ref
  3143. * @internal
  3144. */
  3145. function useFocusGesture(_a, visualElement) {
  3146. var whileFocus = _a.whileFocus;
  3147. var onFocus = function () {
  3148. var _a;
  3149. (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Focus, true);
  3150. };
  3151. var onBlur = function () {
  3152. var _a;
  3153. (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Focus, false);
  3154. };
  3155. (0,_events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__.useDomEvent)(visualElement, "focus", whileFocus ? onFocus : undefined);
  3156. (0,_events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__.useDomEvent)(visualElement, "blur", whileFocus ? onBlur : undefined);
  3157. }
  3158. /***/ }),
  3159. /***/ "./node_modules/framer-motion/dist/es/gestures/use-gestures.js":
  3160. /*!*********************************************************************!*\
  3161. !*** ./node_modules/framer-motion/dist/es/gestures/use-gestures.js ***!
  3162. \*********************************************************************/
  3163. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3164. __webpack_require__.r(__webpack_exports__);
  3165. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3166. /* harmony export */ "useGestures": () => (/* binding */ useGestures)
  3167. /* harmony export */ });
  3168. /* harmony import */ var _use_pan_gesture_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use-pan-gesture.js */ "./node_modules/framer-motion/dist/es/gestures/use-pan-gesture.js");
  3169. /* harmony import */ var _use_tap_gesture_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-tap-gesture.js */ "./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.js");
  3170. /* harmony import */ var _use_hover_gesture_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-hover-gesture.js */ "./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.js");
  3171. /* harmony import */ var _use_focus_gesture_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use-focus-gesture.js */ "./node_modules/framer-motion/dist/es/gestures/use-focus-gesture.js");
  3172. /**
  3173. * Add pan and tap gesture recognition to an element.
  3174. *
  3175. * @param props - Gesture event handlers
  3176. * @param ref - React `ref` containing a DOM `Element`
  3177. * @public
  3178. */
  3179. function useGestures(props, visualElement) {
  3180. (0,_use_pan_gesture_js__WEBPACK_IMPORTED_MODULE_0__.usePanGesture)(props, visualElement);
  3181. (0,_use_tap_gesture_js__WEBPACK_IMPORTED_MODULE_1__.useTapGesture)(props, visualElement);
  3182. (0,_use_hover_gesture_js__WEBPACK_IMPORTED_MODULE_2__.useHoverGesture)(props, visualElement);
  3183. (0,_use_focus_gesture_js__WEBPACK_IMPORTED_MODULE_3__.useFocusGesture)(props, visualElement);
  3184. }
  3185. /***/ }),
  3186. /***/ "./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.js":
  3187. /*!**************************************************************************!*\
  3188. !*** ./node_modules/framer-motion/dist/es/gestures/use-hover-gesture.js ***!
  3189. \**************************************************************************/
  3190. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3191. __webpack_require__.r(__webpack_exports__);
  3192. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3193. /* harmony export */ "useHoverGesture": () => (/* binding */ useHoverGesture)
  3194. /* harmony export */ });
  3195. /* harmony import */ var _utils_event_type_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/event-type.js */ "./node_modules/framer-motion/dist/es/gestures/utils/event-type.js");
  3196. /* harmony import */ var _events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../events/use-pointer-event.js */ "./node_modules/framer-motion/dist/es/events/use-pointer-event.js");
  3197. /* harmony import */ var _render_utils_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../render/utils/types.js */ "./node_modules/framer-motion/dist/es/render/utils/types.js");
  3198. function createHoverEvent(visualElement, isActive, callback) {
  3199. return function (event, info) {
  3200. var _a;
  3201. if (!(0,_utils_event_type_js__WEBPACK_IMPORTED_MODULE_0__.isMouseEvent)(event) || !visualElement.isHoverEventsEnabled)
  3202. return;
  3203. callback === null || callback === void 0 ? void 0 : callback(event, info);
  3204. (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_1__.AnimationType.Hover, isActive);
  3205. };
  3206. }
  3207. function useHoverGesture(_a, visualElement) {
  3208. var onHoverStart = _a.onHoverStart, onHoverEnd = _a.onHoverEnd, whileHover = _a.whileHover;
  3209. (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_2__.usePointerEvent)(visualElement, "pointerenter", onHoverStart || whileHover
  3210. ? createHoverEvent(visualElement, true, onHoverStart)
  3211. : undefined);
  3212. (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_2__.usePointerEvent)(visualElement, "pointerleave", onHoverEnd || whileHover
  3213. ? createHoverEvent(visualElement, false, onHoverEnd)
  3214. : undefined);
  3215. }
  3216. /***/ }),
  3217. /***/ "./node_modules/framer-motion/dist/es/gestures/use-pan-gesture.js":
  3218. /*!************************************************************************!*\
  3219. !*** ./node_modules/framer-motion/dist/es/gestures/use-pan-gesture.js ***!
  3220. \************************************************************************/
  3221. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3222. __webpack_require__.r(__webpack_exports__);
  3223. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3224. /* harmony export */ "usePanGesture": () => (/* binding */ usePanGesture)
  3225. /* harmony export */ });
  3226. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3227. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3228. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  3229. /* harmony import */ var _events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../events/use-pointer-event.js */ "./node_modules/framer-motion/dist/es/events/use-pointer-event.js");
  3230. /* harmony import */ var _PanSession_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PanSession.js */ "./node_modules/framer-motion/dist/es/gestures/PanSession.js");
  3231. /* harmony import */ var _utils_use_unmount_effect_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/use-unmount-effect.js */ "./node_modules/framer-motion/dist/es/utils/use-unmount-effect.js");
  3232. /**
  3233. *
  3234. * @param handlers -
  3235. * @param ref -
  3236. *
  3237. * @internalremarks
  3238. * Currently this sets new pan gesture functions every render. The memo route has been explored
  3239. * in the past but ultimately we're still creating new functions every render. An optimisation
  3240. * to explore is creating the pan gestures and loading them into a `ref`.
  3241. *
  3242. * @internal
  3243. */
  3244. function usePanGesture(_a, ref) {
  3245. var onPan = _a.onPan, onPanStart = _a.onPanStart, onPanEnd = _a.onPanEnd, onPanSessionStart = _a.onPanSessionStart;
  3246. var hasPanEvents = onPan || onPanStart || onPanEnd || onPanSessionStart;
  3247. var panSession = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  3248. var transformPagePoint = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__.MotionConfigContext).transformPagePoint;
  3249. var handlers = {
  3250. onSessionStart: onPanSessionStart,
  3251. onStart: onPanStart,
  3252. onMove: onPan,
  3253. onEnd: function (event, info) {
  3254. panSession.current = null;
  3255. onPanEnd && onPanEnd(event, info);
  3256. },
  3257. };
  3258. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  3259. if (panSession.current !== null) {
  3260. panSession.current.updateHandlers(handlers);
  3261. }
  3262. });
  3263. function onPointerDown(event) {
  3264. panSession.current = new _PanSession_js__WEBPACK_IMPORTED_MODULE_2__.PanSession(event, handlers, {
  3265. transformPagePoint: transformPagePoint,
  3266. });
  3267. }
  3268. (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_3__.usePointerEvent)(ref, "pointerdown", hasPanEvents && onPointerDown);
  3269. (0,_utils_use_unmount_effect_js__WEBPACK_IMPORTED_MODULE_4__.useUnmountEffect)(function () { return panSession.current && panSession.current.end(); });
  3270. }
  3271. /***/ }),
  3272. /***/ "./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.js":
  3273. /*!************************************************************************!*\
  3274. !*** ./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.js ***!
  3275. \************************************************************************/
  3276. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3277. __webpack_require__.r(__webpack_exports__);
  3278. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3279. /* harmony export */ "useTapGesture": () => (/* binding */ useTapGesture)
  3280. /* harmony export */ });
  3281. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3282. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3283. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/pipe.js");
  3284. /* harmony import */ var _events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../events/use-pointer-event.js */ "./node_modules/framer-motion/dist/es/events/use-pointer-event.js");
  3285. /* harmony import */ var _drag_utils_lock_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./drag/utils/lock.js */ "./node_modules/framer-motion/dist/es/gestures/drag/utils/lock.js");
  3286. /* harmony import */ var _render_utils_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../render/utils/types.js */ "./node_modules/framer-motion/dist/es/render/utils/types.js");
  3287. /* harmony import */ var _utils_use_unmount_effect_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/use-unmount-effect.js */ "./node_modules/framer-motion/dist/es/utils/use-unmount-effect.js");
  3288. /* harmony import */ var _utils_is_node_or_child_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/is-node-or-child.js */ "./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.js");
  3289. /**
  3290. * @param handlers -
  3291. * @internal
  3292. */
  3293. function useTapGesture(_a, visualElement) {
  3294. var onTap = _a.onTap, onTapStart = _a.onTapStart, onTapCancel = _a.onTapCancel, whileTap = _a.whileTap;
  3295. var hasPressListeners = onTap || onTapStart || onTapCancel || whileTap;
  3296. var isPressing = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
  3297. var cancelPointerEndListeners = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  3298. function removePointerEndListener() {
  3299. var _a;
  3300. (_a = cancelPointerEndListeners.current) === null || _a === void 0 ? void 0 : _a.call(cancelPointerEndListeners);
  3301. cancelPointerEndListeners.current = null;
  3302. }
  3303. function checkPointerEnd() {
  3304. var _a;
  3305. removePointerEndListener();
  3306. isPressing.current = false;
  3307. (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_1__.AnimationType.Tap, false);
  3308. return !(0,_drag_utils_lock_js__WEBPACK_IMPORTED_MODULE_2__.isDragActive)();
  3309. }
  3310. function onPointerUp(event, info) {
  3311. if (!checkPointerEnd())
  3312. return;
  3313. /**
  3314. * We only count this as a tap gesture if the event.target is the same
  3315. * as, or a child of, this component's element
  3316. */
  3317. !(0,_utils_is_node_or_child_js__WEBPACK_IMPORTED_MODULE_3__.isNodeOrChild)(visualElement.getInstance(), event.target)
  3318. ? onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info) : onTap === null || onTap === void 0 ? void 0 : onTap(event, info);
  3319. }
  3320. function onPointerCancel(event, info) {
  3321. if (!checkPointerEnd())
  3322. return;
  3323. onTapCancel === null || onTapCancel === void 0 ? void 0 : onTapCancel(event, info);
  3324. }
  3325. function onPointerDown(event, info) {
  3326. var _a;
  3327. removePointerEndListener();
  3328. if (isPressing.current)
  3329. return;
  3330. isPressing.current = true;
  3331. cancelPointerEndListeners.current = (0,popmotion__WEBPACK_IMPORTED_MODULE_4__.pipe)((0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_5__.addPointerEvent)(window, "pointerup", onPointerUp), (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_5__.addPointerEvent)(window, "pointercancel", onPointerCancel));
  3332. onTapStart === null || onTapStart === void 0 ? void 0 : onTapStart(event, info);
  3333. (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_1__.AnimationType.Tap, true);
  3334. }
  3335. (0,_events_use_pointer_event_js__WEBPACK_IMPORTED_MODULE_5__.usePointerEvent)(visualElement, "pointerdown", hasPressListeners ? onPointerDown : undefined);
  3336. (0,_utils_use_unmount_effect_js__WEBPACK_IMPORTED_MODULE_6__.useUnmountEffect)(removePointerEndListener);
  3337. }
  3338. /***/ }),
  3339. /***/ "./node_modules/framer-motion/dist/es/gestures/utils/event-type.js":
  3340. /*!*************************************************************************!*\
  3341. !*** ./node_modules/framer-motion/dist/es/gestures/utils/event-type.js ***!
  3342. \*************************************************************************/
  3343. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3344. __webpack_require__.r(__webpack_exports__);
  3345. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3346. /* harmony export */ "isMouseEvent": () => (/* binding */ isMouseEvent),
  3347. /* harmony export */ "isTouchEvent": () => (/* binding */ isTouchEvent)
  3348. /* harmony export */ });
  3349. function isMouseEvent(event) {
  3350. // PointerEvent inherits from MouseEvent so we can't use a straight instanceof check.
  3351. if (typeof PointerEvent !== "undefined" && event instanceof PointerEvent) {
  3352. return !!(event.pointerType === "mouse");
  3353. }
  3354. return event instanceof MouseEvent;
  3355. }
  3356. function isTouchEvent(event) {
  3357. var hasTouches = !!event.touches;
  3358. return hasTouches;
  3359. }
  3360. /***/ }),
  3361. /***/ "./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.js":
  3362. /*!*******************************************************************************!*\
  3363. !*** ./node_modules/framer-motion/dist/es/gestures/utils/is-node-or-child.js ***!
  3364. \*******************************************************************************/
  3365. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3366. __webpack_require__.r(__webpack_exports__);
  3367. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3368. /* harmony export */ "isNodeOrChild": () => (/* binding */ isNodeOrChild)
  3369. /* harmony export */ });
  3370. /**
  3371. * Recursively traverse up the tree to check whether the provided child node
  3372. * is the parent or a descendant of it.
  3373. *
  3374. * @param parent - Element to find
  3375. * @param child - Element to test against parent
  3376. */
  3377. var isNodeOrChild = function (parent, child) {
  3378. if (!child) {
  3379. return false;
  3380. }
  3381. else if (parent === child) {
  3382. return true;
  3383. }
  3384. else {
  3385. return isNodeOrChild(parent, child.parentElement);
  3386. }
  3387. };
  3388. /***/ }),
  3389. /***/ "./node_modules/framer-motion/dist/es/index.js":
  3390. /*!*****************************************************!*\
  3391. !*** ./node_modules/framer-motion/dist/es/index.js ***!
  3392. \*****************************************************/
  3393. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3394. __webpack_require__.r(__webpack_exports__);
  3395. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3396. /* harmony export */ "AnimateLayoutFeature": () => (/* reexport safe */ _motion_features_layout_Animate_js__WEBPACK_IMPORTED_MODULE_19__.AnimateLayout),
  3397. /* harmony export */ "AnimatePresence": () => (/* reexport safe */ _components_AnimatePresence_index_js__WEBPACK_IMPORTED_MODULE_26__.AnimatePresence),
  3398. /* harmony export */ "AnimateSharedLayout": () => (/* reexport safe */ _components_AnimateSharedLayout_index_js__WEBPACK_IMPORTED_MODULE_29__.AnimateSharedLayout),
  3399. /* harmony export */ "AnimationFeature": () => (/* reexport safe */ _motion_features_animation_js__WEBPACK_IMPORTED_MODULE_18__.Animation),
  3400. /* harmony export */ "DragControls": () => (/* reexport safe */ _gestures_drag_use_drag_controls_js__WEBPACK_IMPORTED_MODULE_41__.DragControls),
  3401. /* harmony export */ "DragFeature": () => (/* reexport safe */ _motion_features_drag_js__WEBPACK_IMPORTED_MODULE_9__.Drag),
  3402. /* harmony export */ "ExitFeature": () => (/* reexport safe */ _motion_features_exit_js__WEBPACK_IMPORTED_MODULE_14__.Exit),
  3403. /* harmony export */ "FramerTreeLayoutContext": () => (/* reexport safe */ _context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_6__.FramerTreeLayoutContext),
  3404. /* harmony export */ "GesturesFeature": () => (/* reexport safe */ _motion_features_gestures_js__WEBPACK_IMPORTED_MODULE_13__.Gestures),
  3405. /* harmony export */ "LayoutGroupContext": () => (/* reexport safe */ _context_LayoutGroupContext_js__WEBPACK_IMPORTED_MODULE_3__.LayoutGroupContext),
  3406. /* harmony export */ "MotionConfig": () => (/* reexport safe */ _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_0__.MotionConfig),
  3407. /* harmony export */ "MotionConfigContext": () => (/* reexport safe */ _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_0__.MotionConfigContext),
  3408. /* harmony export */ "MotionValue": () => (/* reexport safe */ _value_index_js__WEBPACK_IMPORTED_MODULE_15__.MotionValue),
  3409. /* harmony export */ "PresenceContext": () => (/* reexport safe */ _context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_1__.PresenceContext),
  3410. /* harmony export */ "SharedLayoutContext": () => (/* reexport safe */ _context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_6__.SharedLayoutContext),
  3411. /* harmony export */ "VisibilityAction": () => (/* reexport safe */ _components_AnimateSharedLayout_types_js__WEBPACK_IMPORTED_MODULE_4__.VisibilityAction),
  3412. /* harmony export */ "addScaleCorrection": () => (/* reexport safe */ _render_dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_20__.addScaleCorrection),
  3413. /* harmony export */ "animate": () => (/* reexport safe */ _animation_animate_js__WEBPACK_IMPORTED_MODULE_27__.animate),
  3414. /* harmony export */ "animateVisualElement": () => (/* reexport safe */ _render_utils_animation_js__WEBPACK_IMPORTED_MODULE_16__.animateVisualElement),
  3415. /* harmony export */ "animationControls": () => (/* reexport safe */ _animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_17__.animationControls),
  3416. /* harmony export */ "createBatcher": () => (/* reexport safe */ _components_AnimateSharedLayout_utils_batcher_js__WEBPACK_IMPORTED_MODULE_5__.createBatcher),
  3417. /* harmony export */ "createCrossfader": () => (/* reexport safe */ _components_AnimateSharedLayout_utils_crossfader_js__WEBPACK_IMPORTED_MODULE_28__.createCrossfader),
  3418. /* harmony export */ "createDomMotionComponent": () => (/* reexport safe */ _render_dom_motion_js__WEBPACK_IMPORTED_MODULE_24__.createDomMotionComponent),
  3419. /* harmony export */ "createMotionComponent": () => (/* reexport safe */ _motion_index_js__WEBPACK_IMPORTED_MODULE_7__.createMotionComponent),
  3420. /* harmony export */ "isValidMotionProp": () => (/* reexport safe */ _motion_utils_valid_prop_js__WEBPACK_IMPORTED_MODULE_21__.isValidMotionProp),
  3421. /* harmony export */ "m": () => (/* reexport safe */ _render_dom_motion_minimal_js__WEBPACK_IMPORTED_MODULE_25__.m),
  3422. /* harmony export */ "motion": () => (/* reexport safe */ _render_dom_motion_js__WEBPACK_IMPORTED_MODULE_24__.motion),
  3423. /* harmony export */ "motionValue": () => (/* reexport safe */ _value_index_js__WEBPACK_IMPORTED_MODULE_15__.motionValue),
  3424. /* harmony export */ "resolveMotionValue": () => (/* reexport safe */ _value_utils_resolve_motion_value_js__WEBPACK_IMPORTED_MODULE_23__.resolveMotionValue),
  3425. /* harmony export */ "transform": () => (/* reexport safe */ _utils_transform_js__WEBPACK_IMPORTED_MODULE_32__.transform),
  3426. /* harmony export */ "useAnimation": () => (/* reexport safe */ _animation_use_animation_js__WEBPACK_IMPORTED_MODULE_39__.useAnimation),
  3427. /* harmony export */ "useCycle": () => (/* reexport safe */ _utils_use_cycle_js__WEBPACK_IMPORTED_MODULE_40__.useCycle),
  3428. /* harmony export */ "useDeprecatedAnimatedState": () => (/* reexport safe */ _animation_use_animated_state_js__WEBPACK_IMPORTED_MODULE_42__.useAnimatedState),
  3429. /* harmony export */ "useDeprecatedInvertedScale": () => (/* reexport safe */ _value_use_inverted_scale_js__WEBPACK_IMPORTED_MODULE_43__.useInvertedScale),
  3430. /* harmony export */ "useDomEvent": () => (/* reexport safe */ _events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_8__.useDomEvent),
  3431. /* harmony export */ "useDragControls": () => (/* reexport safe */ _gestures_drag_use_drag_controls_js__WEBPACK_IMPORTED_MODULE_41__.useDragControls),
  3432. /* harmony export */ "useElementScroll": () => (/* reexport safe */ _value_scroll_use_element_scroll_js__WEBPACK_IMPORTED_MODULE_36__.useElementScroll),
  3433. /* harmony export */ "useGestures": () => (/* reexport safe */ _gestures_use_gestures_js__WEBPACK_IMPORTED_MODULE_12__.useGestures),
  3434. /* harmony export */ "useIsPresent": () => (/* reexport safe */ _components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_2__.useIsPresent),
  3435. /* harmony export */ "useMotionTemplate": () => (/* reexport safe */ _value_use_motion_template_js__WEBPACK_IMPORTED_MODULE_31__.useMotionTemplate),
  3436. /* harmony export */ "useMotionValue": () => (/* reexport safe */ _value_use_motion_value_js__WEBPACK_IMPORTED_MODULE_30__.useMotionValue),
  3437. /* harmony export */ "usePanGesture": () => (/* reexport safe */ _gestures_use_pan_gesture_js__WEBPACK_IMPORTED_MODULE_10__.usePanGesture),
  3438. /* harmony export */ "usePresence": () => (/* reexport safe */ _components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_2__.usePresence),
  3439. /* harmony export */ "useReducedMotion": () => (/* reexport safe */ _utils_use_reduced_motion_js__WEBPACK_IMPORTED_MODULE_38__.useReducedMotion),
  3440. /* harmony export */ "useSpring": () => (/* reexport safe */ _value_use_spring_js__WEBPACK_IMPORTED_MODULE_34__.useSpring),
  3441. /* harmony export */ "useTapGesture": () => (/* reexport safe */ _gestures_use_tap_gesture_js__WEBPACK_IMPORTED_MODULE_11__.useTapGesture),
  3442. /* harmony export */ "useTransform": () => (/* reexport safe */ _value_use_transform_js__WEBPACK_IMPORTED_MODULE_33__.useTransform),
  3443. /* harmony export */ "useVelocity": () => (/* reexport safe */ _value_use_velocity_js__WEBPACK_IMPORTED_MODULE_35__.useVelocity),
  3444. /* harmony export */ "useViewportScroll": () => (/* reexport safe */ _value_scroll_use_viewport_scroll_js__WEBPACK_IMPORTED_MODULE_37__.useViewportScroll),
  3445. /* harmony export */ "visualElement": () => (/* reexport safe */ _render_index_js__WEBPACK_IMPORTED_MODULE_22__.visualElement)
  3446. /* harmony export */ });
  3447. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  3448. /* harmony import */ var _context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./context/PresenceContext.js */ "./node_modules/framer-motion/dist/es/context/PresenceContext.js");
  3449. /* harmony import */ var _components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/AnimatePresence/use-presence.js */ "./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js");
  3450. /* harmony import */ var _context_LayoutGroupContext_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./context/LayoutGroupContext.js */ "./node_modules/framer-motion/dist/es/context/LayoutGroupContext.js");
  3451. /* harmony import */ var _components_AnimateSharedLayout_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/AnimateSharedLayout/types.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js");
  3452. /* harmony import */ var _components_AnimateSharedLayout_utils_batcher_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/AnimateSharedLayout/utils/batcher.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/batcher.js");
  3453. /* harmony import */ var _context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./context/SharedLayoutContext.js */ "./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js");
  3454. /* harmony import */ var _motion_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./motion/index.js */ "./node_modules/framer-motion/dist/es/motion/index.js");
  3455. /* harmony import */ var _events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./events/use-dom-event.js */ "./node_modules/framer-motion/dist/es/events/use-dom-event.js");
  3456. /* harmony import */ var _motion_features_drag_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./motion/features/drag.js */ "./node_modules/framer-motion/dist/es/motion/features/drag.js");
  3457. /* harmony import */ var _gestures_use_pan_gesture_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./gestures/use-pan-gesture.js */ "./node_modules/framer-motion/dist/es/gestures/use-pan-gesture.js");
  3458. /* harmony import */ var _gestures_use_tap_gesture_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./gestures/use-tap-gesture.js */ "./node_modules/framer-motion/dist/es/gestures/use-tap-gesture.js");
  3459. /* harmony import */ var _gestures_use_gestures_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./gestures/use-gestures.js */ "./node_modules/framer-motion/dist/es/gestures/use-gestures.js");
  3460. /* harmony import */ var _motion_features_gestures_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./motion/features/gestures.js */ "./node_modules/framer-motion/dist/es/motion/features/gestures.js");
  3461. /* harmony import */ var _motion_features_exit_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./motion/features/exit.js */ "./node_modules/framer-motion/dist/es/motion/features/exit.js");
  3462. /* harmony import */ var _value_index_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./value/index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  3463. /* harmony import */ var _render_utils_animation_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./render/utils/animation.js */ "./node_modules/framer-motion/dist/es/render/utils/animation.js");
  3464. /* harmony import */ var _animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./animation/animation-controls.js */ "./node_modules/framer-motion/dist/es/animation/animation-controls.js");
  3465. /* harmony import */ var _motion_features_animation_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./motion/features/animation.js */ "./node_modules/framer-motion/dist/es/motion/features/animation.js");
  3466. /* harmony import */ var _motion_features_layout_Animate_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./motion/features/layout/Animate.js */ "./node_modules/framer-motion/dist/es/motion/features/layout/Animate.js");
  3467. /* harmony import */ var _render_dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./render/dom/projection/scale-correction.js */ "./node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js");
  3468. /* harmony import */ var _motion_utils_valid_prop_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./motion/utils/valid-prop.js */ "./node_modules/framer-motion/dist/es/motion/utils/valid-prop.js");
  3469. /* harmony import */ var _render_index_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./render/index.js */ "./node_modules/framer-motion/dist/es/render/index.js");
  3470. /* harmony import */ var _value_utils_resolve_motion_value_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./value/utils/resolve-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js");
  3471. /* harmony import */ var _render_dom_motion_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./render/dom/motion.js */ "./node_modules/framer-motion/dist/es/render/dom/motion.js");
  3472. /* harmony import */ var _render_dom_motion_minimal_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./render/dom/motion-minimal.js */ "./node_modules/framer-motion/dist/es/render/dom/motion-minimal.js");
  3473. /* harmony import */ var _components_AnimatePresence_index_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./components/AnimatePresence/index.js */ "./node_modules/framer-motion/dist/es/components/AnimatePresence/index.js");
  3474. /* harmony import */ var _animation_animate_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./animation/animate.js */ "./node_modules/framer-motion/dist/es/animation/animate.js");
  3475. /* harmony import */ var _components_AnimateSharedLayout_utils_crossfader_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./components/AnimateSharedLayout/utils/crossfader.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/utils/crossfader.js");
  3476. /* harmony import */ var _components_AnimateSharedLayout_index_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./components/AnimateSharedLayout/index.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/index.js");
  3477. /* harmony import */ var _value_use_motion_value_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./value/use-motion-value.js */ "./node_modules/framer-motion/dist/es/value/use-motion-value.js");
  3478. /* harmony import */ var _value_use_motion_template_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./value/use-motion-template.js */ "./node_modules/framer-motion/dist/es/value/use-motion-template.js");
  3479. /* harmony import */ var _utils_transform_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./utils/transform.js */ "./node_modules/framer-motion/dist/es/utils/transform.js");
  3480. /* harmony import */ var _value_use_transform_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./value/use-transform.js */ "./node_modules/framer-motion/dist/es/value/use-transform.js");
  3481. /* harmony import */ var _value_use_spring_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./value/use-spring.js */ "./node_modules/framer-motion/dist/es/value/use-spring.js");
  3482. /* harmony import */ var _value_use_velocity_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./value/use-velocity.js */ "./node_modules/framer-motion/dist/es/value/use-velocity.js");
  3483. /* harmony import */ var _value_scroll_use_element_scroll_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./value/scroll/use-element-scroll.js */ "./node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.js");
  3484. /* harmony import */ var _value_scroll_use_viewport_scroll_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./value/scroll/use-viewport-scroll.js */ "./node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.js");
  3485. /* harmony import */ var _utils_use_reduced_motion_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./utils/use-reduced-motion.js */ "./node_modules/framer-motion/dist/es/utils/use-reduced-motion.js");
  3486. /* harmony import */ var _animation_use_animation_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./animation/use-animation.js */ "./node_modules/framer-motion/dist/es/animation/use-animation.js");
  3487. /* harmony import */ var _utils_use_cycle_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./utils/use-cycle.js */ "./node_modules/framer-motion/dist/es/utils/use-cycle.js");
  3488. /* harmony import */ var _gestures_drag_use_drag_controls_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./gestures/drag/use-drag-controls.js */ "./node_modules/framer-motion/dist/es/gestures/drag/use-drag-controls.js");
  3489. /* harmony import */ var _animation_use_animated_state_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./animation/use-animated-state.js */ "./node_modules/framer-motion/dist/es/animation/use-animated-state.js");
  3490. /* harmony import */ var _value_use_inverted_scale_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./value/use-inverted-scale.js */ "./node_modules/framer-motion/dist/es/value/use-inverted-scale.js");
  3491. /***/ }),
  3492. /***/ "./node_modules/framer-motion/dist/es/motion/features/animation.js":
  3493. /*!*************************************************************************!*\
  3494. !*** ./node_modules/framer-motion/dist/es/motion/features/animation.js ***!
  3495. \*************************************************************************/
  3496. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3497. __webpack_require__.r(__webpack_exports__);
  3498. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3499. /* harmony export */ "Animation": () => (/* binding */ Animation)
  3500. /* harmony export */ });
  3501. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3502. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3503. /* harmony import */ var _utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/make-renderless-component.js */ "./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js");
  3504. /* harmony import */ var _animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../animation/animation-controls.js */ "./node_modules/framer-motion/dist/es/animation/animation-controls.js");
  3505. /* harmony import */ var _render_utils_animation_state_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../render/utils/animation-state.js */ "./node_modules/framer-motion/dist/es/render/utils/animation-state.js");
  3506. var AnimationState = (0,_utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_1__.makeRenderlessComponent)(function (props) {
  3507. var visualElement = props.visualElement, animate = props.animate;
  3508. /**
  3509. * We dynamically generate the AnimationState manager as it contains a reference
  3510. * to the underlying animation library. We only want to load that if we load this,
  3511. * so people can optionally code split it out using the `m` component.
  3512. */
  3513. visualElement.animationState || (visualElement.animationState = (0,_render_utils_animation_state_js__WEBPACK_IMPORTED_MODULE_2__.createAnimationState)(visualElement));
  3514. /**
  3515. * Subscribe any provided AnimationControls to the component's VisualElement
  3516. */
  3517. if ((0,_animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_3__.isAnimationControls)(animate)) {
  3518. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { return animate.subscribe(visualElement); }, [animate]);
  3519. }
  3520. });
  3521. /**
  3522. * @public
  3523. */
  3524. var Animation = {
  3525. key: "animation",
  3526. shouldRender: function () { return true; },
  3527. getComponent: function (_a) {
  3528. var animate = _a.animate, whileHover = _a.whileHover, whileFocus = _a.whileFocus, whileTap = _a.whileTap, whileDrag = _a.whileDrag, exit = _a.exit, variants = _a.variants;
  3529. return animate ||
  3530. whileHover ||
  3531. whileFocus ||
  3532. whileTap ||
  3533. whileDrag ||
  3534. exit ||
  3535. variants
  3536. ? AnimationState
  3537. : undefined;
  3538. },
  3539. };
  3540. /***/ }),
  3541. /***/ "./node_modules/framer-motion/dist/es/motion/features/drag.js":
  3542. /*!********************************************************************!*\
  3543. !*** ./node_modules/framer-motion/dist/es/motion/features/drag.js ***!
  3544. \********************************************************************/
  3545. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3546. __webpack_require__.r(__webpack_exports__);
  3547. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3548. /* harmony export */ "Drag": () => (/* binding */ Drag)
  3549. /* harmony export */ });
  3550. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  3551. /* harmony import */ var _gestures_drag_use_drag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../gestures/drag/use-drag.js */ "./node_modules/framer-motion/dist/es/gestures/drag/use-drag.js");
  3552. /* harmony import */ var _utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/make-renderless-component.js */ "./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js");
  3553. var Component = (0,_utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_0__.makeRenderlessComponent)(function (_a) {
  3554. var visualElement = _a.visualElement, props = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["visualElement"]);
  3555. return (0,_gestures_drag_use_drag_js__WEBPACK_IMPORTED_MODULE_2__.useDrag)(props, visualElement);
  3556. });
  3557. /**
  3558. * @public
  3559. */
  3560. var Drag = {
  3561. key: "drag",
  3562. shouldRender: function (props) { return !!props.drag || !!props.dragControls; },
  3563. getComponent: function () { return Component; },
  3564. };
  3565. /***/ }),
  3566. /***/ "./node_modules/framer-motion/dist/es/motion/features/exit.js":
  3567. /*!********************************************************************!*\
  3568. !*** ./node_modules/framer-motion/dist/es/motion/features/exit.js ***!
  3569. \********************************************************************/
  3570. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3571. __webpack_require__.r(__webpack_exports__);
  3572. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3573. /* harmony export */ "Exit": () => (/* binding */ Exit)
  3574. /* harmony export */ });
  3575. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3576. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3577. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  3578. /* harmony import */ var _context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../context/PresenceContext.js */ "./node_modules/framer-motion/dist/es/context/PresenceContext.js");
  3579. /* harmony import */ var _components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/AnimatePresence/use-presence.js */ "./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js");
  3580. /* harmony import */ var _render_utils_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../render/utils/types.js */ "./node_modules/framer-motion/dist/es/render/utils/types.js");
  3581. /* harmony import */ var _utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/make-renderless-component.js */ "./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js");
  3582. /* harmony import */ var _utils_should_inherit_variant_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/should-inherit-variant.js */ "./node_modules/framer-motion/dist/es/motion/utils/should-inherit-variant.js");
  3583. /**
  3584. * TODO: This component is quite small and no longer directly imports animation code.
  3585. * It could be a candidate for folding back into the main `motion` component.
  3586. */
  3587. var ExitComponent = (0,_utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_1__.makeRenderlessComponent)(function (props) {
  3588. var custom = props.custom, visualElement = props.visualElement;
  3589. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__read)((0,_components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_3__.usePresence)(), 2), isPresent = _a[0], onExitComplete = _a[1];
  3590. var presenceContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_4__.PresenceContext);
  3591. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  3592. var _a, _b;
  3593. var animation = (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.setActive(_render_utils_types_js__WEBPACK_IMPORTED_MODULE_5__.AnimationType.Exit, !isPresent, { custom: (_b = presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.custom) !== null && _b !== void 0 ? _b : custom });
  3594. !isPresent && (animation === null || animation === void 0 ? void 0 : animation.then(onExitComplete));
  3595. }, [isPresent]);
  3596. });
  3597. /**
  3598. * @public
  3599. */
  3600. var Exit = {
  3601. key: "exit",
  3602. shouldRender: function (props) { return !!props.exit && !(0,_utils_should_inherit_variant_js__WEBPACK_IMPORTED_MODULE_6__.checkShouldInheritVariant)(props); },
  3603. getComponent: function () { return ExitComponent; },
  3604. };
  3605. /***/ }),
  3606. /***/ "./node_modules/framer-motion/dist/es/motion/features/gestures.js":
  3607. /*!************************************************************************!*\
  3608. !*** ./node_modules/framer-motion/dist/es/motion/features/gestures.js ***!
  3609. \************************************************************************/
  3610. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3611. __webpack_require__.r(__webpack_exports__);
  3612. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3613. /* harmony export */ "Gestures": () => (/* binding */ Gestures)
  3614. /* harmony export */ });
  3615. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  3616. /* harmony import */ var _utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/make-renderless-component.js */ "./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js");
  3617. /* harmony import */ var _gestures_use_gestures_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../gestures/use-gestures.js */ "./node_modules/framer-motion/dist/es/gestures/use-gestures.js");
  3618. /* harmony import */ var _gestures_types_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../gestures/types.js */ "./node_modules/framer-motion/dist/es/gestures/types.js");
  3619. var GestureComponent = (0,_utils_make_renderless_component_js__WEBPACK_IMPORTED_MODULE_0__.makeRenderlessComponent)(function (_a) {
  3620. var visualElement = _a.visualElement, props = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["visualElement"]);
  3621. (0,_gestures_use_gestures_js__WEBPACK_IMPORTED_MODULE_2__.useGestures)(props, visualElement);
  3622. });
  3623. /**
  3624. * @public
  3625. */
  3626. var Gestures = {
  3627. key: "gestures",
  3628. shouldRender: function (props) {
  3629. return _gestures_types_js__WEBPACK_IMPORTED_MODULE_3__.gestureProps.some(function (key) { return props.hasOwnProperty(key); });
  3630. },
  3631. getComponent: function () { return GestureComponent; },
  3632. };
  3633. /***/ }),
  3634. /***/ "./node_modules/framer-motion/dist/es/motion/features/layout/Animate.js":
  3635. /*!******************************************************************************!*\
  3636. !*** ./node_modules/framer-motion/dist/es/motion/features/layout/Animate.js ***!
  3637. \******************************************************************************/
  3638. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3639. __webpack_require__.r(__webpack_exports__);
  3640. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3641. /* harmony export */ "AnimateLayout": () => (/* binding */ AnimateLayout)
  3642. /* harmony export */ });
  3643. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3644. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3645. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  3646. /* harmony import */ var _components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../components/AnimatePresence/use-presence.js */ "./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js");
  3647. /* harmony import */ var _components_AnimateSharedLayout_types_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../components/AnimateSharedLayout/types.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js");
  3648. /* harmony import */ var _utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/geometry/index.js */ "./node_modules/framer-motion/dist/es/utils/geometry/index.js");
  3649. /* harmony import */ var _utils_each_axis_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/each-axis.js */ "./node_modules/framer-motion/dist/es/utils/each-axis.js");
  3650. /* harmony import */ var _animation_utils_transitions_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../animation/utils/transitions.js */ "./node_modules/framer-motion/dist/es/animation/utils/transitions.js");
  3651. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils.js */ "./node_modules/framer-motion/dist/es/motion/features/layout/utils.js");
  3652. var progressTarget = 1000;
  3653. var Animate = /** @class */ (function (_super) {
  3654. (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(Animate, _super);
  3655. function Animate() {
  3656. var _this = _super !== null && _super.apply(this, arguments) || this;
  3657. /**
  3658. * A mutable object that tracks the target viewport box
  3659. * for the current animation frame.
  3660. */
  3661. _this.frameTarget = (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_2__.axisBox)();
  3662. /**
  3663. * The current animation target, we use this to check whether to start
  3664. * a new animation or continue the existing one.
  3665. */
  3666. _this.currentAnimationTarget = (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_2__.axisBox)();
  3667. /**
  3668. * Track whether we're animating this axis.
  3669. */
  3670. _this.isAnimating = {
  3671. x: false,
  3672. y: false,
  3673. };
  3674. _this.stopAxisAnimation = {
  3675. x: undefined,
  3676. y: undefined,
  3677. };
  3678. _this.isAnimatingTree = false;
  3679. _this.animate = function (target, origin, _a) {
  3680. if (_a === void 0) { _a = {}; }
  3681. var originBox = _a.originBox, targetBox = _a.targetBox, visibilityAction = _a.visibilityAction, shouldStackAnimate = _a.shouldStackAnimate, onComplete = _a.onComplete, config = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["originBox", "targetBox", "visibilityAction", "shouldStackAnimate", "onComplete"]);
  3682. var _b = _this.props, visualElement = _b.visualElement, layout = _b.layout;
  3683. /**
  3684. * Early return if we've been instructed not to animate this render.
  3685. */
  3686. if (shouldStackAnimate === false) {
  3687. _this.isAnimatingTree = false;
  3688. return _this.safeToRemove();
  3689. }
  3690. /**
  3691. * Prioritise tree animations
  3692. */
  3693. if (_this.isAnimatingTree && shouldStackAnimate !== true) {
  3694. return;
  3695. }
  3696. else if (shouldStackAnimate) {
  3697. _this.isAnimatingTree = true;
  3698. }
  3699. /**
  3700. * Allow the measured origin (prev bounding box) and target (actual layout) to be
  3701. * overridden by the provided config.
  3702. */
  3703. origin = originBox || origin;
  3704. target = targetBox || target;
  3705. var boxHasMoved = hasMoved(origin, target);
  3706. var animations = (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_3__.eachAxis)(function (axis) {
  3707. /**
  3708. * If layout is set to "position", we can resize the origin box based on the target
  3709. * box and only animate its position.
  3710. */
  3711. if (layout === "position") {
  3712. var targetLength = target[axis].max - target[axis].min;
  3713. origin[axis].max = origin[axis].min + targetLength;
  3714. }
  3715. if (visualElement.projection.isTargetLocked) {
  3716. return;
  3717. }
  3718. else if (visibilityAction !== undefined) {
  3719. visualElement.setVisibility(visibilityAction === _components_AnimateSharedLayout_types_js__WEBPACK_IMPORTED_MODULE_4__.VisibilityAction.Show);
  3720. }
  3721. else if (boxHasMoved) {
  3722. // If the box has moved, animate between it's current visual state and its
  3723. // final state
  3724. return _this.animateAxis(axis, target[axis], origin[axis], config);
  3725. }
  3726. else {
  3727. // If the box has remained in the same place, immediately set the axis target
  3728. // to the final desired state
  3729. return visualElement.setProjectionTargetAxis(axis, target[axis].min, target[axis].max);
  3730. }
  3731. });
  3732. // Force a render to ensure there's no flash of uncorrected bounding box.
  3733. visualElement.syncRender();
  3734. /**
  3735. * If this visualElement isn't present (ie it's been removed from the tree by the user but
  3736. * kept in by the tree by AnimatePresence) then call safeToRemove when all axis animations
  3737. * have successfully finished.
  3738. */
  3739. return Promise.all(animations).then(function () {
  3740. _this.isAnimatingTree = false;
  3741. onComplete && onComplete();
  3742. visualElement.notifyLayoutAnimationComplete();
  3743. });
  3744. };
  3745. return _this;
  3746. }
  3747. Animate.prototype.componentDidMount = function () {
  3748. var _this = this;
  3749. var visualElement = this.props.visualElement;
  3750. visualElement.animateMotionValue = _animation_utils_transitions_js__WEBPACK_IMPORTED_MODULE_5__.startAnimation;
  3751. visualElement.enableLayoutProjection();
  3752. this.unsubLayoutReady = visualElement.onLayoutUpdate(this.animate);
  3753. visualElement.layoutSafeToRemove = function () { return _this.safeToRemove(); };
  3754. };
  3755. Animate.prototype.componentWillUnmount = function () {
  3756. var _this = this;
  3757. this.unsubLayoutReady();
  3758. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_3__.eachAxis)(function (axis) { var _a, _b; return (_b = (_a = _this.stopAxisAnimation)[axis]) === null || _b === void 0 ? void 0 : _b.call(_a); });
  3759. };
  3760. /**
  3761. * TODO: This manually performs animations on the visualElement's layout progress
  3762. * values. It'd be preferable to amend the startLayoutAxisAnimation
  3763. * API to accept more custom animations like this.
  3764. */
  3765. Animate.prototype.animateAxis = function (axis, target, origin, _a) {
  3766. var _this = this;
  3767. var _b, _c;
  3768. var transition = (_a === void 0 ? {} : _a).transition;
  3769. /**
  3770. * If we're not animating to a new target, don't run this animation
  3771. */
  3772. if (this.isAnimating[axis] &&
  3773. axisIsEqual(target, this.currentAnimationTarget[axis])) {
  3774. return;
  3775. }
  3776. (_c = (_b = this.stopAxisAnimation)[axis]) === null || _c === void 0 ? void 0 : _c.call(_b);
  3777. this.isAnimating[axis] = true;
  3778. var visualElement = this.props.visualElement;
  3779. var frameTarget = this.frameTarget[axis];
  3780. var layoutProgress = visualElement.getProjectionAnimationProgress()[axis];
  3781. /**
  3782. * Set layout progress back to 0. We set it twice to hard-reset any velocity that might
  3783. * be re-incoporated into a subsequent spring animation.
  3784. */
  3785. layoutProgress.clearListeners();
  3786. layoutProgress.set(0);
  3787. layoutProgress.set(0);
  3788. /**
  3789. * Create an animation function to run once per frame. This will tween the visual bounding box from
  3790. * origin to target using the latest progress value.
  3791. */
  3792. var frame = function () {
  3793. // Convert the latest layoutProgress, which is a value from 0-1000, into a 0-1 progress
  3794. var p = layoutProgress.get() / progressTarget;
  3795. // Tween the axis and update the visualElement with the latest values
  3796. (0,_utils_js__WEBPACK_IMPORTED_MODULE_6__.tweenAxis)(frameTarget, origin, target, p);
  3797. visualElement.setProjectionTargetAxis(axis, frameTarget.min, frameTarget.max);
  3798. };
  3799. // Synchronously run a frame to ensure there's no flash of the uncorrected bounding box.
  3800. frame();
  3801. // Ensure that the layout delta is updated for this frame.
  3802. visualElement.updateLayoutProjection();
  3803. // Create a function to stop animation on this specific axis
  3804. var unsubscribeProgress = layoutProgress.onChange(frame);
  3805. this.stopAxisAnimation[axis] = function () {
  3806. _this.isAnimating[axis] = false;
  3807. layoutProgress.stop();
  3808. unsubscribeProgress();
  3809. };
  3810. this.currentAnimationTarget[axis] = target;
  3811. // Start the animation on this axis
  3812. var animation = (0,_animation_utils_transitions_js__WEBPACK_IMPORTED_MODULE_5__.startAnimation)(axis === "x" ? "layoutX" : "layoutY", layoutProgress, progressTarget, transition || this.props.transition || defaultTransition).then(this.stopAxisAnimation[axis]);
  3813. return animation;
  3814. };
  3815. Animate.prototype.safeToRemove = function () {
  3816. var _a, _b;
  3817. (_b = (_a = this.props).safeToRemove) === null || _b === void 0 ? void 0 : _b.call(_a);
  3818. };
  3819. Animate.prototype.render = function () {
  3820. return null;
  3821. };
  3822. return Animate;
  3823. }(react__WEBPACK_IMPORTED_MODULE_0__.Component));
  3824. function AnimateLayoutContextProvider(props) {
  3825. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)((0,_components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_7__.usePresence)(), 2), safeToRemove = _a[1];
  3826. return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Animate, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, props, { safeToRemove: safeToRemove }));
  3827. }
  3828. function hasMoved(a, b) {
  3829. return (!isZeroBox(a) &&
  3830. !isZeroBox(b) &&
  3831. (!axisIsEqual(a.x, b.x) || !axisIsEqual(a.y, b.y)));
  3832. }
  3833. var zeroAxis = { min: 0, max: 0 };
  3834. function isZeroBox(a) {
  3835. return axisIsEqual(a.x, zeroAxis) && axisIsEqual(a.y, zeroAxis);
  3836. }
  3837. function axisIsEqual(a, b) {
  3838. return a.min === b.min && a.max === b.max;
  3839. }
  3840. var defaultTransition = {
  3841. duration: 0.45,
  3842. ease: [0.4, 0, 0.1, 1],
  3843. };
  3844. /**
  3845. * @public
  3846. */
  3847. var AnimateLayout = {
  3848. key: "animate-layout",
  3849. shouldRender: function (props) {
  3850. return !!props.layout || props.layoutId !== undefined;
  3851. },
  3852. getComponent: function () { return AnimateLayoutContextProvider; },
  3853. };
  3854. /***/ }),
  3855. /***/ "./node_modules/framer-motion/dist/es/motion/features/layout/Measure.js":
  3856. /*!******************************************************************************!*\
  3857. !*** ./node_modules/framer-motion/dist/es/motion/features/layout/Measure.js ***!
  3858. \******************************************************************************/
  3859. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3860. __webpack_require__.r(__webpack_exports__);
  3861. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3862. /* harmony export */ "MeasureLayout": () => (/* binding */ MeasureLayout)
  3863. /* harmony export */ });
  3864. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3865. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3866. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  3867. /* harmony import */ var _context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../context/SharedLayoutContext.js */ "./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js");
  3868. /**
  3869. * This component is responsible for scheduling the measuring of the motion component
  3870. */
  3871. var Measure = /** @class */ (function (_super) {
  3872. (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__extends)(Measure, _super);
  3873. function Measure() {
  3874. return _super !== null && _super.apply(this, arguments) || this;
  3875. }
  3876. /**
  3877. * If this is a child of a SyncContext, register the VisualElement with it on mount.
  3878. */
  3879. Measure.prototype.componentDidMount = function () {
  3880. var _a = this.props, syncLayout = _a.syncLayout, framerSyncLayout = _a.framerSyncLayout, visualElement = _a.visualElement;
  3881. (0,_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.isSharedLayout)(syncLayout) && syncLayout.register(visualElement);
  3882. (0,_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.isSharedLayout)(framerSyncLayout) &&
  3883. framerSyncLayout.register(visualElement);
  3884. };
  3885. /**
  3886. * If this is a child of a SyncContext, notify it that it needs to re-render. It will then
  3887. * handle the snapshotting.
  3888. *
  3889. * If it is stand-alone component, add it to the batcher.
  3890. */
  3891. Measure.prototype.getSnapshotBeforeUpdate = function () {
  3892. var _a = this.props, syncLayout = _a.syncLayout, visualElement = _a.visualElement;
  3893. if ((0,_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.isSharedLayout)(syncLayout)) {
  3894. syncLayout.syncUpdate();
  3895. }
  3896. else {
  3897. visualElement.snapshotViewportBox();
  3898. syncLayout.add(visualElement);
  3899. }
  3900. return null;
  3901. };
  3902. Measure.prototype.componentDidUpdate = function () {
  3903. var _a = this.props, syncLayout = _a.syncLayout, visualElement = _a.visualElement;
  3904. if (!(0,_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.isSharedLayout)(syncLayout))
  3905. syncLayout.flush();
  3906. /**
  3907. * If this axis isn't animating as a result of this render we want to reset the targetBox
  3908. * to the measured box
  3909. */
  3910. visualElement.rebaseProjectionTarget();
  3911. };
  3912. Measure.prototype.render = function () {
  3913. return null;
  3914. };
  3915. return Measure;
  3916. }((react__WEBPACK_IMPORTED_MODULE_0___default().Component)));
  3917. function MeasureContextProvider(props) {
  3918. var syncLayout = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.SharedLayoutContext);
  3919. var framerSyncLayout = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_2__.FramerTreeLayoutContext);
  3920. return (react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Measure, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, props, { syncLayout: syncLayout, framerSyncLayout: framerSyncLayout })));
  3921. }
  3922. var MeasureLayout = {
  3923. key: "measure-layout",
  3924. shouldRender: function (props) {
  3925. return !!props.drag || !!props.layout || props.layoutId !== undefined;
  3926. },
  3927. getComponent: function () { return MeasureContextProvider; },
  3928. };
  3929. /***/ }),
  3930. /***/ "./node_modules/framer-motion/dist/es/motion/features/layout/use-snapshot-on-unmount.js":
  3931. /*!**********************************************************************************************!*\
  3932. !*** ./node_modules/framer-motion/dist/es/motion/features/layout/use-snapshot-on-unmount.js ***!
  3933. \**********************************************************************************************/
  3934. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3935. __webpack_require__.r(__webpack_exports__);
  3936. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3937. /* harmony export */ "useSnapshotOnUnmount": () => (/* binding */ useSnapshotOnUnmount)
  3938. /* harmony export */ });
  3939. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3940. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3941. /* harmony import */ var _context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../context/SharedLayoutContext.js */ "./node_modules/framer-motion/dist/es/context/SharedLayoutContext.js");
  3942. /* harmony import */ var _utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/use-isomorphic-effect.js */ "./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js");
  3943. function useSnapshotOnUnmount(visualElement) {
  3944. var syncLayout = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_1__.SharedLayoutContext);
  3945. var framerSyncLayout = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_1__.FramerTreeLayoutContext);
  3946. (0,_utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(function () { return function () {
  3947. if ((0,_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_1__.isSharedLayout)(syncLayout)) {
  3948. syncLayout.remove(visualElement);
  3949. }
  3950. if ((0,_context_SharedLayoutContext_js__WEBPACK_IMPORTED_MODULE_1__.isSharedLayout)(framerSyncLayout)) {
  3951. framerSyncLayout.remove(visualElement);
  3952. }
  3953. }; }, []);
  3954. }
  3955. /***/ }),
  3956. /***/ "./node_modules/framer-motion/dist/es/motion/features/layout/utils.js":
  3957. /*!****************************************************************************!*\
  3958. !*** ./node_modules/framer-motion/dist/es/motion/features/layout/utils.js ***!
  3959. \****************************************************************************/
  3960. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3961. __webpack_require__.r(__webpack_exports__);
  3962. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3963. /* harmony export */ "tweenAxis": () => (/* binding */ tweenAxis)
  3964. /* harmony export */ });
  3965. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/mix.js");
  3966. function tweenAxis(target, prev, next, p) {
  3967. target.min = (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.mix)(prev.min, next.min, p);
  3968. target.max = (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.mix)(prev.max, next.max, p);
  3969. }
  3970. /***/ }),
  3971. /***/ "./node_modules/framer-motion/dist/es/motion/features/use-features.js":
  3972. /*!****************************************************************************!*\
  3973. !*** ./node_modules/framer-motion/dist/es/motion/features/use-features.js ***!
  3974. \****************************************************************************/
  3975. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  3976. __webpack_require__.r(__webpack_exports__);
  3977. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  3978. /* harmony export */ "useFeatures": () => (/* binding */ useFeatures)
  3979. /* harmony export */ });
  3980. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  3981. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  3982. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  3983. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  3984. /**
  3985. * Load features via renderless components based on the provided MotionProps.
  3986. * TODO: Look into porting this to a component-less appraoch.
  3987. */
  3988. function useFeatures(defaultFeatures, visualElement, props) {
  3989. var plugins = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__.MotionConfigContext);
  3990. var allFeatures = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spread)(defaultFeatures, plugins.features);
  3991. var numFeatures = allFeatures.length;
  3992. var features = [];
  3993. // Decide which features we should render and add them to the returned array
  3994. for (var i = 0; i < numFeatures; i++) {
  3995. var _a = allFeatures[i], shouldRender = _a.shouldRender, key = _a.key, getComponent = _a.getComponent;
  3996. if (shouldRender(props)) {
  3997. var Component = getComponent(props);
  3998. Component &&
  3999. features.push((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component, (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ key: key }, props, { visualElement: visualElement })));
  4000. }
  4001. }
  4002. return features;
  4003. }
  4004. /***/ }),
  4005. /***/ "./node_modules/framer-motion/dist/es/motion/index.js":
  4006. /*!************************************************************!*\
  4007. !*** ./node_modules/framer-motion/dist/es/motion/index.js ***!
  4008. \************************************************************/
  4009. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4010. __webpack_require__.r(__webpack_exports__);
  4011. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4012. /* harmony export */ "createMotionComponent": () => (/* binding */ createMotionComponent)
  4013. /* harmony export */ });
  4014. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  4015. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  4016. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  4017. /* harmony import */ var _features_use_features_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./features/use-features.js */ "./node_modules/framer-motion/dist/es/motion/features/use-features.js");
  4018. /* harmony import */ var _context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../context/MotionContext/index.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/index.js");
  4019. /* harmony import */ var _utils_use_visual_element_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/use-visual-element.js */ "./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js");
  4020. /* harmony import */ var _utils_use_motion_ref_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/use-motion-ref.js */ "./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js");
  4021. /* harmony import */ var _context_MotionContext_create_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/MotionContext/create.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/create.js");
  4022. /**
  4023. * Create a `motion` component.
  4024. *
  4025. * This function accepts a Component argument, which can be either a string (ie "div"
  4026. * for `motion.div`), or an actual React component.
  4027. *
  4028. * Alongside this is a config option which provides a way of rendering the provided
  4029. * component "offline", or outside the React render cycle.
  4030. *
  4031. * @internal
  4032. */
  4033. function createMotionComponent(_a) {
  4034. var defaultFeatures = _a.defaultFeatures, createVisualElement = _a.createVisualElement, useRender = _a.useRender, useVisualState = _a.useVisualState;
  4035. function MotionComponent(props, externalRef) {
  4036. /**
  4037. * If we're rendering in a static environment, we only visually update the component
  4038. * as a result of a React-rerender rather than interactions or animations. This
  4039. * means we don't need to load additional memory structures like VisualElement,
  4040. * or any gesture/animation features.
  4041. */
  4042. var isStatic = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__.MotionConfigContext).isStatic;
  4043. var features = null;
  4044. /**
  4045. * Create the tree context. This is memoized and will only trigger renders
  4046. * when the current tree variant changes in static mode.
  4047. */
  4048. var context = (0,_context_MotionContext_create_js__WEBPACK_IMPORTED_MODULE_2__.useCreateMotionContext)(props, isStatic);
  4049. /**
  4050. *
  4051. */
  4052. var visualState = useVisualState(props, isStatic);
  4053. if (!isStatic && typeof window !== "undefined") {
  4054. /**
  4055. * Create a VisualElement for this component. A VisualElement provides a common
  4056. * interface to renderer-specific APIs (ie DOM/Three.js etc) as well as
  4057. * providing a way of rendering to these APIs outside of the React render loop
  4058. * for more performant animations and interactions
  4059. */
  4060. context.visualElement = (0,_utils_use_visual_element_js__WEBPACK_IMPORTED_MODULE_3__.useVisualElement)(isStatic, visualState, createVisualElement, props);
  4061. /**
  4062. * Load Motion gesture and animation features. These are rendered as renderless
  4063. * components so each feature can optionally make use of React lifecycle methods.
  4064. *
  4065. * TODO: The intention is to move these away from a React-centric to a
  4066. * VisualElement-centric lifecycle scheme.
  4067. */
  4068. features = (0,_features_use_features_js__WEBPACK_IMPORTED_MODULE_4__.useFeatures)(defaultFeatures, context.visualElement, props);
  4069. }
  4070. /**
  4071. * The mount order and hierarchy is specific to ensure our element ref
  4072. * is hydrated by the time features fire their effects.
  4073. */
  4074. return ((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null,
  4075. (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_5__.MotionContext.Provider, { value: context }, useRender(props, (0,_utils_use_motion_ref_js__WEBPACK_IMPORTED_MODULE_6__.useMotionRef)(visualState, context.visualElement, externalRef), visualState, isStatic)),
  4076. features));
  4077. }
  4078. return (0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(MotionComponent);
  4079. }
  4080. /***/ }),
  4081. /***/ "./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js":
  4082. /*!***********************************************************************************!*\
  4083. !*** ./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js ***!
  4084. \***********************************************************************************/
  4085. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4086. __webpack_require__.r(__webpack_exports__);
  4087. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4088. /* harmony export */ "isForcedMotionValue": () => (/* binding */ isForcedMotionValue)
  4089. /* harmony export */ });
  4090. /* harmony import */ var _render_dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../render/dom/projection/scale-correction.js */ "./node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js");
  4091. /* harmony import */ var _render_html_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../render/html/utils/transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js");
  4092. function isForcedMotionValue(key, _a) {
  4093. var layout = _a.layout, layoutId = _a.layoutId;
  4094. return ((0,_render_html_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__.isTransformProp)(key) ||
  4095. (0,_render_html_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__.isTransformOriginProp)(key) ||
  4096. ((layout || layoutId !== undefined) && !!_render_dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_1__.valueScaleCorrection[key]));
  4097. }
  4098. /***/ }),
  4099. /***/ "./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js":
  4100. /*!**************************************************************************************!*\
  4101. !*** ./node_modules/framer-motion/dist/es/motion/utils/make-renderless-component.js ***!
  4102. \**************************************************************************************/
  4103. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4104. __webpack_require__.r(__webpack_exports__);
  4105. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4106. /* harmony export */ "makeRenderlessComponent": () => (/* binding */ makeRenderlessComponent)
  4107. /* harmony export */ });
  4108. var makeRenderlessComponent = function (hook) { return function (props) {
  4109. hook(props);
  4110. return null;
  4111. }; };
  4112. /***/ }),
  4113. /***/ "./node_modules/framer-motion/dist/es/motion/utils/should-inherit-variant.js":
  4114. /*!***********************************************************************************!*\
  4115. !*** ./node_modules/framer-motion/dist/es/motion/utils/should-inherit-variant.js ***!
  4116. \***********************************************************************************/
  4117. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4118. __webpack_require__.r(__webpack_exports__);
  4119. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4120. /* harmony export */ "checkShouldInheritVariant": () => (/* binding */ checkShouldInheritVariant)
  4121. /* harmony export */ });
  4122. function checkShouldInheritVariant(_a) {
  4123. var animate = _a.animate, variants = _a.variants, inherit = _a.inherit;
  4124. return inherit !== null && inherit !== void 0 ? inherit : (!!variants && !animate);
  4125. }
  4126. /***/ }),
  4127. /***/ "./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js":
  4128. /*!***************************************************************************!*\
  4129. !*** ./node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.js ***!
  4130. \***************************************************************************/
  4131. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4132. __webpack_require__.r(__webpack_exports__);
  4133. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4134. /* harmony export */ "useMotionRef": () => (/* binding */ useMotionRef)
  4135. /* harmony export */ });
  4136. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  4137. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  4138. /* harmony import */ var _utils_is_ref_object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/is-ref-object.js */ "./node_modules/framer-motion/dist/es/utils/is-ref-object.js");
  4139. /**
  4140. * Creates a ref function that, when called, hydrates the provided
  4141. * external ref and VisualElement.
  4142. */
  4143. function useMotionRef(visualState, visualElement, externalRef) {
  4144. return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function (instance) {
  4145. var _a;
  4146. instance && ((_a = visualState.mount) === null || _a === void 0 ? void 0 : _a.call(visualState, instance));
  4147. if (visualElement) {
  4148. instance ? visualElement.mount(instance) : visualElement.unmount();
  4149. }
  4150. if (externalRef) {
  4151. if (typeof externalRef === "function") {
  4152. externalRef(instance);
  4153. }
  4154. else if ((0,_utils_is_ref_object_js__WEBPACK_IMPORTED_MODULE_1__.isRefObject)(externalRef)) {
  4155. externalRef.current = instance;
  4156. }
  4157. }
  4158. }, []);
  4159. }
  4160. /***/ }),
  4161. /***/ "./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js":
  4162. /*!*******************************************************************************!*\
  4163. !*** ./node_modules/framer-motion/dist/es/motion/utils/use-visual-element.js ***!
  4164. \*******************************************************************************/
  4165. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4166. __webpack_require__.r(__webpack_exports__);
  4167. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4168. /* harmony export */ "useVisualElement": () => (/* binding */ useVisualElement)
  4169. /* harmony export */ });
  4170. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  4171. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  4172. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4173. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  4174. /* harmony import */ var _context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../context/MotionContext/index.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/index.js");
  4175. /* harmony import */ var _context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../context/PresenceContext.js */ "./node_modules/framer-motion/dist/es/context/PresenceContext.js");
  4176. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  4177. /* harmony import */ var _components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/AnimatePresence/use-presence.js */ "./node_modules/framer-motion/dist/es/components/AnimatePresence/use-presence.js");
  4178. /* harmony import */ var _context_LayoutGroupContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../context/LayoutGroupContext.js */ "./node_modules/framer-motion/dist/es/context/LayoutGroupContext.js");
  4179. /* harmony import */ var _utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/use-isomorphic-effect.js */ "./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js");
  4180. /* harmony import */ var _features_layout_use_snapshot_on_unmount_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../features/layout/use-snapshot-on-unmount.js */ "./node_modules/framer-motion/dist/es/motion/features/layout/use-snapshot-on-unmount.js");
  4181. function useLayoutId(_a) {
  4182. var layoutId = _a.layoutId;
  4183. var layoutGroupId = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_LayoutGroupContext_js__WEBPACK_IMPORTED_MODULE_1__.LayoutGroupContext);
  4184. return layoutGroupId && layoutId !== undefined
  4185. ? layoutGroupId + "-" + layoutId
  4186. : layoutId;
  4187. }
  4188. function useVisualElement(isStatic, visualState, createVisualElement, props) {
  4189. var config = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_2__.MotionConfigContext);
  4190. var parent = (0,_context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_3__.useVisualElementContext)();
  4191. var presenceContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_4__.PresenceContext);
  4192. var layoutId = useLayoutId(props);
  4193. var visualElement = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_5__.useConstant)(function () {
  4194. return createVisualElement(isStatic, {
  4195. visualState: visualState,
  4196. parent: parent,
  4197. props: (0,tslib__WEBPACK_IMPORTED_MODULE_6__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_6__.__assign)({}, props), { layoutId: layoutId }),
  4198. presenceId: presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id,
  4199. blockInitialAnimation: (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false,
  4200. });
  4201. });
  4202. (0,_utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_7__.useIsomorphicLayoutEffect)(function () {
  4203. visualElement.setProps((0,tslib__WEBPACK_IMPORTED_MODULE_6__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_6__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_6__.__assign)({}, config), props), { layoutId: layoutId }));
  4204. visualElement.isPresent = (0,_components_AnimatePresence_use_presence_js__WEBPACK_IMPORTED_MODULE_8__.isPresent)(presenceContext);
  4205. visualElement.isPresenceRoot =
  4206. !parent || parent.presenceId !== (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.id);
  4207. /**
  4208. * Fire a render to ensure the latest state is reflected on-screen.
  4209. */
  4210. visualElement.syncRender();
  4211. });
  4212. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  4213. var _a;
  4214. /**
  4215. * In a future refactor we can replace the features-as-components and
  4216. * have this loop through them all firing "effect" listeners
  4217. */
  4218. (_a = visualElement.animationState) === null || _a === void 0 ? void 0 : _a.animateChanges();
  4219. });
  4220. /**
  4221. * If this component is a child of AnimateSharedLayout, we need to snapshot the component
  4222. * before it's unmounted. This lives here rather than in features/layout/Measure because
  4223. * as a child component its unmount effect runs after this component has been unmounted.
  4224. */
  4225. (0,_features_layout_use_snapshot_on_unmount_js__WEBPACK_IMPORTED_MODULE_9__.useSnapshotOnUnmount)(visualElement);
  4226. return visualElement;
  4227. }
  4228. /***/ }),
  4229. /***/ "./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js":
  4230. /*!*****************************************************************************!*\
  4231. !*** ./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js ***!
  4232. \*****************************************************************************/
  4233. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4234. __webpack_require__.r(__webpack_exports__);
  4235. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4236. /* harmony export */ "makeUseVisualState": () => (/* binding */ makeUseVisualState)
  4237. /* harmony export */ });
  4238. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  4239. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  4240. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4241. /* harmony import */ var _context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../context/MotionContext/index.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/index.js");
  4242. /* harmony import */ var _context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../context/PresenceContext.js */ "./node_modules/framer-motion/dist/es/context/PresenceContext.js");
  4243. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  4244. /* harmony import */ var _render_utils_variants_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../render/utils/variants.js */ "./node_modules/framer-motion/dist/es/render/utils/variants.js");
  4245. /* harmony import */ var _animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../animation/animation-controls.js */ "./node_modules/framer-motion/dist/es/animation/animation-controls.js");
  4246. /* harmony import */ var _value_utils_resolve_motion_value_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../value/utils/resolve-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js");
  4247. function makeState(_a, props, context, presenceContext) {
  4248. var scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps, createRenderState = _a.createRenderState, onMount = _a.onMount;
  4249. var state = {
  4250. latestValues: makeLatestValues(props, context, presenceContext, scrapeMotionValuesFromProps),
  4251. renderState: createRenderState(),
  4252. };
  4253. if (onMount) {
  4254. state.mount = function (instance) { return onMount(props, instance, state); };
  4255. }
  4256. return state;
  4257. }
  4258. var makeUseVisualState = function (config) { return function (props, isStatic) {
  4259. var context = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_1__.MotionContext);
  4260. var presenceContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_PresenceContext_js__WEBPACK_IMPORTED_MODULE_2__.PresenceContext);
  4261. return isStatic
  4262. ? makeState(config, props, context, presenceContext)
  4263. : (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_3__.useConstant)(function () { return makeState(config, props, context, presenceContext); });
  4264. }; };
  4265. function makeLatestValues(props, context, presenceContext, scrapeMotionValues) {
  4266. var values = {};
  4267. var blockInitialAnimation = (presenceContext === null || presenceContext === void 0 ? void 0 : presenceContext.initial) === false;
  4268. var motionValues = scrapeMotionValues(props);
  4269. for (var key in motionValues) {
  4270. values[key] = (0,_value_utils_resolve_motion_value_js__WEBPACK_IMPORTED_MODULE_4__.resolveMotionValue)(motionValues[key]);
  4271. }
  4272. var initial = props.initial, animate = props.animate;
  4273. var isControllingVariants = (0,_render_utils_variants_js__WEBPACK_IMPORTED_MODULE_5__.checkIfControllingVariants)(props);
  4274. var isVariantNode = (0,_render_utils_variants_js__WEBPACK_IMPORTED_MODULE_5__.checkIfVariantNode)(props);
  4275. if (context &&
  4276. isVariantNode &&
  4277. !isControllingVariants &&
  4278. props.inherit !== false) {
  4279. initial !== null && initial !== void 0 ? initial : (initial = context.initial);
  4280. animate !== null && animate !== void 0 ? animate : (animate = context.animate);
  4281. }
  4282. var variantToSet = blockInitialAnimation || initial === false ? animate : initial;
  4283. if (variantToSet &&
  4284. typeof variantToSet !== "boolean" &&
  4285. !(0,_animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_6__.isAnimationControls)(variantToSet)) {
  4286. var list = Array.isArray(variantToSet) ? variantToSet : [variantToSet];
  4287. list.forEach(function (definition) {
  4288. var resolved = (0,_render_utils_variants_js__WEBPACK_IMPORTED_MODULE_5__.resolveVariantFromProps)(props, definition);
  4289. if (!resolved)
  4290. return;
  4291. var transitionEnd = resolved.transitionEnd, transition = resolved.transition, target = (0,tslib__WEBPACK_IMPORTED_MODULE_7__.__rest)(resolved, ["transitionEnd", "transition"]);
  4292. for (var key in target)
  4293. values[key] = target[key];
  4294. for (var key in transitionEnd)
  4295. values[key] = transitionEnd[key];
  4296. });
  4297. }
  4298. return values;
  4299. }
  4300. /***/ }),
  4301. /***/ "./node_modules/framer-motion/dist/es/motion/utils/valid-prop.js":
  4302. /*!***********************************************************************!*\
  4303. !*** ./node_modules/framer-motion/dist/es/motion/utils/valid-prop.js ***!
  4304. \***********************************************************************/
  4305. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4306. __webpack_require__.r(__webpack_exports__);
  4307. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4308. /* harmony export */ "isValidMotionProp": () => (/* binding */ isValidMotionProp)
  4309. /* harmony export */ });
  4310. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4311. /* harmony import */ var _gestures_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../gestures/types.js */ "./node_modules/framer-motion/dist/es/gestures/types.js");
  4312. /**
  4313. * A list of all valid MotionProps.
  4314. *
  4315. * @internalremarks
  4316. * This doesn't throw if a `MotionProp` name is missing - it should.
  4317. */
  4318. var validMotionProps = new Set((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spread)([
  4319. "initial",
  4320. "animate",
  4321. "exit",
  4322. "style",
  4323. "variants",
  4324. "transition",
  4325. "transformTemplate",
  4326. "transformValues",
  4327. "custom",
  4328. "inherit",
  4329. "layout",
  4330. "layoutId",
  4331. "onLayoutAnimationComplete",
  4332. "onViewportBoxUpdate",
  4333. "onLayoutMeasure",
  4334. "onBeforeLayoutMeasure",
  4335. "onAnimationStart",
  4336. "onAnimationComplete",
  4337. "onUpdate",
  4338. "onDragStart",
  4339. "onDrag",
  4340. "onDragEnd",
  4341. "onMeasureDragConstraints",
  4342. "onDirectionLock",
  4343. "onDragTransitionEnd",
  4344. "drag",
  4345. "dragControls",
  4346. "dragListener",
  4347. "dragConstraints",
  4348. "dragDirectionLock",
  4349. "_dragX",
  4350. "_dragY",
  4351. "dragElastic",
  4352. "dragMomentum",
  4353. "dragPropagation",
  4354. "dragTransition",
  4355. "whileDrag"
  4356. ], _gestures_types_js__WEBPACK_IMPORTED_MODULE_1__.gestureProps));
  4357. /**
  4358. * Check whether a prop name is a valid `MotionProp` key.
  4359. *
  4360. * @param key - Name of the property to check
  4361. * @returns `true` is key is a valid `MotionProp`.
  4362. *
  4363. * @public
  4364. */
  4365. function isValidMotionProp(key) {
  4366. return validMotionProps.has(key);
  4367. }
  4368. /***/ }),
  4369. /***/ "./node_modules/framer-motion/dist/es/render/dom/motion-minimal.js":
  4370. /*!*************************************************************************!*\
  4371. !*** ./node_modules/framer-motion/dist/es/render/dom/motion-minimal.js ***!
  4372. \*************************************************************************/
  4373. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4374. __webpack_require__.r(__webpack_exports__);
  4375. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4376. /* harmony export */ "m": () => (/* binding */ m)
  4377. /* harmony export */ });
  4378. /* harmony import */ var _motion_features_layout_Measure_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../motion/features/layout/Measure.js */ "./node_modules/framer-motion/dist/es/motion/features/layout/Measure.js");
  4379. /* harmony import */ var _motion_proxy_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./motion-proxy.js */ "./node_modules/framer-motion/dist/es/render/dom/motion-proxy.js");
  4380. /**
  4381. * @public
  4382. */
  4383. var m = (0,_motion_proxy_js__WEBPACK_IMPORTED_MODULE_0__.createMotionProxy)([_motion_features_layout_Measure_js__WEBPACK_IMPORTED_MODULE_1__.MeasureLayout]);
  4384. /***/ }),
  4385. /***/ "./node_modules/framer-motion/dist/es/render/dom/motion-proxy.js":
  4386. /*!***********************************************************************!*\
  4387. !*** ./node_modules/framer-motion/dist/es/render/dom/motion-proxy.js ***!
  4388. \***********************************************************************/
  4389. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4390. __webpack_require__.r(__webpack_exports__);
  4391. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4392. /* harmony export */ "createMotionProxy": () => (/* binding */ createMotionProxy)
  4393. /* harmony export */ });
  4394. /* harmony import */ var _motion_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../motion/index.js */ "./node_modules/framer-motion/dist/es/motion/index.js");
  4395. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  4396. /* harmony import */ var _utils_create_config_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/create-config.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/create-config.js");
  4397. /**
  4398. * Convert any React component into a `motion` component. The provided component
  4399. * **must** use `React.forwardRef` to the underlying DOM component you want to animate.
  4400. *
  4401. * ```jsx
  4402. * const Component = React.forwardRef((props, ref) => {
  4403. * return <div ref={ref} />
  4404. * })
  4405. *
  4406. * const MotionComponent = motion(Component)
  4407. * ```
  4408. *
  4409. * @public
  4410. */
  4411. function createMotionProxy(defaultFeatures) {
  4412. function custom(Component, _a) {
  4413. var _b = (_a === void 0 ? {} : _a).forwardMotionProps, forwardMotionProps = _b === void 0 ? false : _b;
  4414. return (0,_motion_index_js__WEBPACK_IMPORTED_MODULE_1__.createMotionComponent)((0,_utils_create_config_js__WEBPACK_IMPORTED_MODULE_2__.createDomMotionConfig)(defaultFeatures, Component, forwardMotionProps));
  4415. }
  4416. function deprecatedCustom(Component) {
  4417. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.warning)(false, "motion.custom() is deprecated. Use motion() instead.");
  4418. return custom(Component, { forwardMotionProps: true });
  4419. }
  4420. /**
  4421. * A cache of generated `motion` components, e.g `motion.div`, `motion.input` etc.
  4422. * Rather than generating them anew every render.
  4423. */
  4424. var componentCache = new Map();
  4425. return new Proxy(custom, {
  4426. /**
  4427. * Called when `motion` is referenced with a prop: `motion.div`, `motion.input` etc.
  4428. * The prop name is passed through as `key` and we can use that to generate a `motion`
  4429. * DOM component with that name.
  4430. */
  4431. get: function (_target, key) {
  4432. /**
  4433. * Can be removed in 4.0
  4434. */
  4435. if (key === "custom")
  4436. return deprecatedCustom;
  4437. /**
  4438. * If this element doesn't exist in the component cache, create it and cache.
  4439. */
  4440. if (!componentCache.has(key)) {
  4441. componentCache.set(key, custom(key));
  4442. }
  4443. return componentCache.get(key);
  4444. },
  4445. });
  4446. }
  4447. /***/ }),
  4448. /***/ "./node_modules/framer-motion/dist/es/render/dom/motion.js":
  4449. /*!*****************************************************************!*\
  4450. !*** ./node_modules/framer-motion/dist/es/render/dom/motion.js ***!
  4451. \*****************************************************************/
  4452. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4453. __webpack_require__.r(__webpack_exports__);
  4454. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4455. /* harmony export */ "createDomMotionComponent": () => (/* binding */ createDomMotionComponent),
  4456. /* harmony export */ "motion": () => (/* binding */ motion)
  4457. /* harmony export */ });
  4458. /* harmony import */ var _motion_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../motion/index.js */ "./node_modules/framer-motion/dist/es/motion/index.js");
  4459. /* harmony import */ var _motion_features_drag_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../motion/features/drag.js */ "./node_modules/framer-motion/dist/es/motion/features/drag.js");
  4460. /* harmony import */ var _motion_features_gestures_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../motion/features/gestures.js */ "./node_modules/framer-motion/dist/es/motion/features/gestures.js");
  4461. /* harmony import */ var _motion_features_exit_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../motion/features/exit.js */ "./node_modules/framer-motion/dist/es/motion/features/exit.js");
  4462. /* harmony import */ var _motion_features_animation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../motion/features/animation.js */ "./node_modules/framer-motion/dist/es/motion/features/animation.js");
  4463. /* harmony import */ var _motion_features_layout_Animate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../motion/features/layout/Animate.js */ "./node_modules/framer-motion/dist/es/motion/features/layout/Animate.js");
  4464. /* harmony import */ var _motion_features_layout_Measure_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../motion/features/layout/Measure.js */ "./node_modules/framer-motion/dist/es/motion/features/layout/Measure.js");
  4465. /* harmony import */ var _utils_create_config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/create-config.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/create-config.js");
  4466. /* harmony import */ var _motion_proxy_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./motion-proxy.js */ "./node_modules/framer-motion/dist/es/render/dom/motion-proxy.js");
  4467. var allMotionFeatures = [
  4468. _motion_features_layout_Measure_js__WEBPACK_IMPORTED_MODULE_0__.MeasureLayout,
  4469. _motion_features_animation_js__WEBPACK_IMPORTED_MODULE_1__.Animation,
  4470. _motion_features_drag_js__WEBPACK_IMPORTED_MODULE_2__.Drag,
  4471. _motion_features_gestures_js__WEBPACK_IMPORTED_MODULE_3__.Gestures,
  4472. _motion_features_exit_js__WEBPACK_IMPORTED_MODULE_4__.Exit,
  4473. _motion_features_layout_Animate_js__WEBPACK_IMPORTED_MODULE_5__.AnimateLayout,
  4474. ];
  4475. /**
  4476. * HTML & SVG components, optimised for use with gestures and animation. These can be used as
  4477. * drop-in replacements for any HTML & SVG component, all CSS & SVG properties are supported.
  4478. *
  4479. * @public
  4480. */
  4481. var motion = /*@__PURE__*/ (0,_motion_proxy_js__WEBPACK_IMPORTED_MODULE_6__.createMotionProxy)(allMotionFeatures);
  4482. /**
  4483. * Create a DOM `motion` component with the provided string. This is primarily intended
  4484. * as a full alternative to `motion` for consumers who have to support environments that don't
  4485. * support `Proxy`.
  4486. *
  4487. * ```javascript
  4488. * import { createDomMotionComponent } from "framer-motion"
  4489. *
  4490. * const motion = {
  4491. * div: createDomMotionComponent('div')
  4492. * }
  4493. * ```
  4494. *
  4495. * @public
  4496. */
  4497. function createDomMotionComponent(key) {
  4498. return (0,_motion_index_js__WEBPACK_IMPORTED_MODULE_7__.createMotionComponent)((0,_utils_create_config_js__WEBPACK_IMPORTED_MODULE_8__.createDomMotionConfig)(allMotionFeatures, key, false));
  4499. }
  4500. /***/ }),
  4501. /***/ "./node_modules/framer-motion/dist/es/render/dom/projection/measure.js":
  4502. /*!*****************************************************************************!*\
  4503. !*** ./node_modules/framer-motion/dist/es/render/dom/projection/measure.js ***!
  4504. \*****************************************************************************/
  4505. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4506. __webpack_require__.r(__webpack_exports__);
  4507. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4508. /* harmony export */ "getBoundingBox": () => (/* binding */ getBoundingBox)
  4509. /* harmony export */ });
  4510. /* harmony import */ var _utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/geometry/index.js */ "./node_modules/framer-motion/dist/es/utils/geometry/index.js");
  4511. /**
  4512. * Measure and return the element bounding box.
  4513. *
  4514. * We convert the box into an AxisBox2D to make it easier to work with each axis
  4515. * individually and programmatically.
  4516. *
  4517. * This function optionally accepts a transformPagePoint function which allows us to compensate
  4518. * for, for instance, measuring the element within a scaled plane like a Framer devivce preview component.
  4519. */
  4520. function getBoundingBox(element, transformPagePoint) {
  4521. var box = element.getBoundingClientRect();
  4522. return (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.convertBoundingBoxToAxisBox)((0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.transformBoundingBox)(box, transformPagePoint));
  4523. }
  4524. /***/ }),
  4525. /***/ "./node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js":
  4526. /*!**************************************************************************************!*\
  4527. !*** ./node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js ***!
  4528. \**************************************************************************************/
  4529. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4530. __webpack_require__.r(__webpack_exports__);
  4531. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4532. /* harmony export */ "addScaleCorrection": () => (/* binding */ addScaleCorrection),
  4533. /* harmony export */ "correctBorderRadius": () => (/* binding */ correctBorderRadius),
  4534. /* harmony export */ "correctBoxShadow": () => (/* binding */ correctBoxShadow),
  4535. /* harmony export */ "pixelsToPercent": () => (/* binding */ pixelsToPercent),
  4536. /* harmony export */ "valueScaleCorrection": () => (/* binding */ valueScaleCorrection)
  4537. /* harmony export */ });
  4538. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4539. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/mix.js");
  4540. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/numbers/units.js");
  4541. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/complex/index.js");
  4542. /* harmony import */ var _utils_css_variables_conversion_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/css-variables-conversion.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js");
  4543. function pixelsToPercent(pixels, axis) {
  4544. return (pixels / (axis.max - axis.min)) * 100;
  4545. }
  4546. /**
  4547. * We always correct borderRadius as a percentage rather than pixels to reduce paints.
  4548. * For example, if you are projecting a box that is 100px wide with a 10px borderRadius
  4549. * into a box that is 200px wide with a 20px borderRadius, that is actually a 10%
  4550. * borderRadius in both states. If we animate between the two in pixels that will trigger
  4551. * a paint each time. If we animate between the two in percentage we'll avoid a paint.
  4552. */
  4553. function correctBorderRadius(latest, _layoutState, _a) {
  4554. var target = _a.target;
  4555. /**
  4556. * If latest is a string, if it's a percentage we can return immediately as it's
  4557. * going to be stretched appropriately. Otherwise, if it's a pixel, convert it to a number.
  4558. */
  4559. if (typeof latest === "string") {
  4560. if (style_value_types__WEBPACK_IMPORTED_MODULE_0__.px.test(latest)) {
  4561. latest = parseFloat(latest);
  4562. }
  4563. else {
  4564. return latest;
  4565. }
  4566. }
  4567. /**
  4568. * If latest is a number, it's a pixel value. We use the current viewportBox to calculate that
  4569. * pixel value as a percentage of each axis
  4570. */
  4571. var x = pixelsToPercent(latest, target.x);
  4572. var y = pixelsToPercent(latest, target.y);
  4573. return x + "% " + y + "%";
  4574. }
  4575. var varToken = "_$css";
  4576. function correctBoxShadow(latest, _a) {
  4577. var delta = _a.delta, treeScale = _a.treeScale;
  4578. var original = latest;
  4579. /**
  4580. * We need to first strip and store CSS variables from the string.
  4581. */
  4582. var containsCSSVariables = latest.includes("var(");
  4583. var cssVariables = [];
  4584. if (containsCSSVariables) {
  4585. latest = latest.replace(_utils_css_variables_conversion_js__WEBPACK_IMPORTED_MODULE_1__.cssVariableRegex, function (match) {
  4586. cssVariables.push(match);
  4587. return varToken;
  4588. });
  4589. }
  4590. var shadow = style_value_types__WEBPACK_IMPORTED_MODULE_2__.complex.parse(latest);
  4591. // TODO: Doesn't support multiple shadows
  4592. if (shadow.length > 5)
  4593. return original;
  4594. var template = style_value_types__WEBPACK_IMPORTED_MODULE_2__.complex.createTransformer(latest);
  4595. var offset = typeof shadow[0] !== "number" ? 1 : 0;
  4596. // Calculate the overall context scale
  4597. var xScale = delta.x.scale * treeScale.x;
  4598. var yScale = delta.y.scale * treeScale.y;
  4599. shadow[0 + offset] /= xScale;
  4600. shadow[1 + offset] /= yScale;
  4601. /**
  4602. * Ideally we'd correct x and y scales individually, but because blur and
  4603. * spread apply to both we have to take a scale average and apply that instead.
  4604. * We could potentially improve the outcome of this by incorporating the ratio between
  4605. * the two scales.
  4606. */
  4607. var averageScale = (0,popmotion__WEBPACK_IMPORTED_MODULE_3__.mix)(xScale, yScale, 0.5);
  4608. // Blur
  4609. if (typeof shadow[2 + offset] === "number")
  4610. shadow[2 + offset] /= averageScale;
  4611. // Spread
  4612. if (typeof shadow[3 + offset] === "number")
  4613. shadow[3 + offset] /= averageScale;
  4614. var output = template(shadow);
  4615. if (containsCSSVariables) {
  4616. var i_1 = 0;
  4617. output = output.replace(varToken, function () {
  4618. var cssVariable = cssVariables[i_1];
  4619. i_1++;
  4620. return cssVariable;
  4621. });
  4622. }
  4623. return output;
  4624. }
  4625. var borderCorrectionDefinition = {
  4626. process: correctBorderRadius,
  4627. };
  4628. var valueScaleCorrection = {
  4629. borderRadius: (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({}, borderCorrectionDefinition), { applyTo: [
  4630. "borderTopLeftRadius",
  4631. "borderTopRightRadius",
  4632. "borderBottomLeftRadius",
  4633. "borderBottomRightRadius",
  4634. ] }),
  4635. borderTopLeftRadius: borderCorrectionDefinition,
  4636. borderTopRightRadius: borderCorrectionDefinition,
  4637. borderBottomLeftRadius: borderCorrectionDefinition,
  4638. borderBottomRightRadius: borderCorrectionDefinition,
  4639. boxShadow: {
  4640. process: correctBoxShadow,
  4641. },
  4642. };
  4643. /**
  4644. * @internal
  4645. */
  4646. function addScaleCorrection(correctors) {
  4647. for (var key in correctors) {
  4648. valueScaleCorrection[key] = correctors[key];
  4649. }
  4650. }
  4651. /***/ }),
  4652. /***/ "./node_modules/framer-motion/dist/es/render/dom/use-render.js":
  4653. /*!*********************************************************************!*\
  4654. !*** ./node_modules/framer-motion/dist/es/render/dom/use-render.js ***!
  4655. \*********************************************************************/
  4656. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4657. __webpack_require__.r(__webpack_exports__);
  4658. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4659. /* harmony export */ "createUseRender": () => (/* binding */ createUseRender)
  4660. /* harmony export */ });
  4661. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  4662. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  4663. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4664. /* harmony import */ var _utils_is_svg_component_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/is-svg-component.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js");
  4665. /* harmony import */ var _html_use_props_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../html/use-props.js */ "./node_modules/framer-motion/dist/es/render/html/use-props.js");
  4666. /* harmony import */ var _utils_filter_props_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/filter-props.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js");
  4667. /* harmony import */ var _svg_use_props_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../svg/use-props.js */ "./node_modules/framer-motion/dist/es/render/svg/use-props.js");
  4668. function createUseRender(Component, forwardMotionProps) {
  4669. if (forwardMotionProps === void 0) { forwardMotionProps = false; }
  4670. var useRender = function (props, ref, _a, isStatic) {
  4671. var latestValues = _a.latestValues;
  4672. var useVisualProps = (0,_utils_is_svg_component_js__WEBPACK_IMPORTED_MODULE_1__.isSVGComponent)(Component)
  4673. ? _svg_use_props_js__WEBPACK_IMPORTED_MODULE_2__.useSVGProps
  4674. : _html_use_props_js__WEBPACK_IMPORTED_MODULE_3__.useHTMLProps;
  4675. var visualProps = useVisualProps(props, latestValues, isStatic);
  4676. var filteredProps = (0,_utils_filter_props_js__WEBPACK_IMPORTED_MODULE_4__.filterProps)(props, typeof Component === "string", forwardMotionProps);
  4677. var elementProps = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)({}, filteredProps), visualProps), { ref: ref });
  4678. return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Component, elementProps);
  4679. };
  4680. return useRender;
  4681. }
  4682. /***/ }),
  4683. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js":
  4684. /*!******************************************************************************!*\
  4685. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js ***!
  4686. \******************************************************************************/
  4687. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4688. __webpack_require__.r(__webpack_exports__);
  4689. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4690. /* harmony export */ "camelToDash": () => (/* binding */ camelToDash)
  4691. /* harmony export */ });
  4692. var CAMEL_CASE_PATTERN = /([a-z])([A-Z])/g;
  4693. var REPLACE_TEMPLATE = "$1-$2";
  4694. /**
  4695. * Convert camelCase to dash-case properties.
  4696. */
  4697. var camelToDash = function (str) {
  4698. return str.replace(CAMEL_CASE_PATTERN, REPLACE_TEMPLATE).toLowerCase();
  4699. };
  4700. /***/ }),
  4701. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/create-config.js":
  4702. /*!******************************************************************************!*\
  4703. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/create-config.js ***!
  4704. \******************************************************************************/
  4705. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4706. __webpack_require__.r(__webpack_exports__);
  4707. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4708. /* harmony export */ "createDomMotionConfig": () => (/* binding */ createDomMotionConfig)
  4709. /* harmony export */ });
  4710. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4711. /* harmony import */ var _is_svg_component_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-svg-component.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js");
  4712. /* harmony import */ var _use_render_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../use-render.js */ "./node_modules/framer-motion/dist/es/render/dom/use-render.js");
  4713. /* harmony import */ var _svg_config_motion_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../svg/config-motion.js */ "./node_modules/framer-motion/dist/es/render/svg/config-motion.js");
  4714. /* harmony import */ var _html_config_motion_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../html/config-motion.js */ "./node_modules/framer-motion/dist/es/render/html/config-motion.js");
  4715. function createDomMotionConfig(defaultFeatures, Component, forwardMotionProps) {
  4716. var baseConfig = (0,_is_svg_component_js__WEBPACK_IMPORTED_MODULE_0__.isSVGComponent)(Component)
  4717. ? _svg_config_motion_js__WEBPACK_IMPORTED_MODULE_1__.svgMotionConfig
  4718. : _html_config_motion_js__WEBPACK_IMPORTED_MODULE_2__.htmlMotionConfig;
  4719. return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, baseConfig), { defaultFeatures: defaultFeatures, useRender: (0,_use_render_js__WEBPACK_IMPORTED_MODULE_4__.createUseRender)(Component, forwardMotionProps) });
  4720. }
  4721. /***/ }),
  4722. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js":
  4723. /*!*****************************************************************************************!*\
  4724. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js ***!
  4725. \*****************************************************************************************/
  4726. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4727. __webpack_require__.r(__webpack_exports__);
  4728. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4729. /* harmony export */ "cssVariableRegex": () => (/* binding */ cssVariableRegex),
  4730. /* harmony export */ "parseCSSVariable": () => (/* binding */ parseCSSVariable),
  4731. /* harmony export */ "resolveCSSVariables": () => (/* binding */ resolveCSSVariables)
  4732. /* harmony export */ });
  4733. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4734. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  4735. function isCSSVariable(value) {
  4736. return typeof value === "string" && value.startsWith("var(--");
  4737. }
  4738. /**
  4739. * Parse Framer's special CSS variable format into a CSS token and a fallback.
  4740. *
  4741. * ```
  4742. * `var(--foo, #fff)` => [`--foo`, '#fff']
  4743. * ```
  4744. *
  4745. * @param current
  4746. */
  4747. var cssVariableRegex = /var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;
  4748. function parseCSSVariable(current) {
  4749. var match = cssVariableRegex.exec(current);
  4750. if (!match)
  4751. return [,];
  4752. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)(match, 3), token = _a[1], fallback = _a[2];
  4753. return [token, fallback];
  4754. }
  4755. var maxDepth = 4;
  4756. function getVariableValue(current, element, depth) {
  4757. if (depth === void 0) { depth = 1; }
  4758. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(depth <= maxDepth, "Max CSS variable fallback depth detected in property \"" + current + "\". This may indicate a circular fallback dependency.");
  4759. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)(parseCSSVariable(current), 2), token = _a[0], fallback = _a[1];
  4760. // No CSS variable detected
  4761. if (!token)
  4762. return;
  4763. // Attempt to read this CSS variable off the element
  4764. var resolved = window.getComputedStyle(element).getPropertyValue(token);
  4765. if (resolved) {
  4766. return resolved.trim();
  4767. }
  4768. else if (isCSSVariable(fallback)) {
  4769. // The fallback might itself be a CSS variable, in which case we attempt to resolve it too.
  4770. return getVariableValue(fallback, element, depth + 1);
  4771. }
  4772. else {
  4773. return fallback;
  4774. }
  4775. }
  4776. /**
  4777. * Resolve CSS variables from
  4778. *
  4779. * @internal
  4780. */
  4781. function resolveCSSVariables(visualElement, _a, transitionEnd) {
  4782. var _b;
  4783. var target = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, []);
  4784. var element = visualElement.getInstance();
  4785. if (!(element instanceof HTMLElement))
  4786. return { target: target, transitionEnd: transitionEnd };
  4787. // If `transitionEnd` isn't `undefined`, clone it. We could clone `target` and `transitionEnd`
  4788. // only if they change but I think this reads clearer and this isn't a performance-critical path.
  4789. if (transitionEnd) {
  4790. transitionEnd = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, transitionEnd);
  4791. }
  4792. // Go through existing `MotionValue`s and ensure any existing CSS variables are resolved
  4793. visualElement.forEachValue(function (value) {
  4794. var current = value.get();
  4795. if (!isCSSVariable(current))
  4796. return;
  4797. var resolved = getVariableValue(current, element);
  4798. if (resolved)
  4799. value.set(resolved);
  4800. });
  4801. // Cycle through every target property and resolve CSS variables. Currently
  4802. // we only read single-var properties like `var(--foo)`, not `calc(var(--foo) + 20px)`
  4803. for (var key in target) {
  4804. var current = target[key];
  4805. if (!isCSSVariable(current))
  4806. continue;
  4807. var resolved = getVariableValue(current, element);
  4808. if (!resolved)
  4809. continue;
  4810. // Clone target if it hasn't already been
  4811. target[key] = resolved;
  4812. // If the user hasn't already set this key on `transitionEnd`, set it to the unresolved
  4813. // CSS variable. This will ensure that after the animation the component will reflect
  4814. // changes in the value of the CSS variable.
  4815. if (transitionEnd)
  4816. (_b = transitionEnd[key]) !== null && _b !== void 0 ? _b : (transitionEnd[key] = current);
  4817. }
  4818. return { target: target, transitionEnd: transitionEnd };
  4819. }
  4820. /***/ }),
  4821. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js":
  4822. /*!*****************************************************************************!*\
  4823. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/filter-props.js ***!
  4824. \*****************************************************************************/
  4825. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4826. __webpack_require__.r(__webpack_exports__);
  4827. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4828. /* harmony export */ "filterProps": () => (/* binding */ filterProps)
  4829. /* harmony export */ });
  4830. /* harmony import */ var _motion_utils_valid_prop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../motion/utils/valid-prop.js */ "./node_modules/framer-motion/dist/es/motion/utils/valid-prop.js");
  4831. var shouldForward = function (key) { return !(0,_motion_utils_valid_prop_js__WEBPACK_IMPORTED_MODULE_0__.isValidMotionProp)(key); };
  4832. /**
  4833. * Emotion and Styled Components both allow users to pass through arbitrary props to their components
  4834. * to dynamically generate CSS. They both use the `@emotion/is-prop-valid` package to determine which
  4835. * of these should be passed to the underlying DOM node.
  4836. *
  4837. * However, when styling a Motion component `styled(motion.div)`, both packages pass through *all* props
  4838. * as it's seen as an arbitrary component rather than a DOM node. Motion only allows arbitrary props
  4839. * passed through the `custom` prop so it doesn't *need* the payload or computational overhead of
  4840. * `@emotion/is-prop-valid`, however to fix this problem we need to use it.
  4841. *
  4842. * By making it an optionalDependency we can offer this functionality only in the situations where it's
  4843. * actually required.
  4844. */
  4845. try {
  4846. var emotionIsPropValid_1 = (__webpack_require__(/*! @emotion/is-prop-valid */ "./node_modules/@emotion/is-prop-valid/dist/is-prop-valid.browser.esm.js")["default"]);
  4847. shouldForward = function (key) {
  4848. // Handle events explicitly as Emotion validates them all as true
  4849. if (key.startsWith("on")) {
  4850. return !(0,_motion_utils_valid_prop_js__WEBPACK_IMPORTED_MODULE_0__.isValidMotionProp)(key);
  4851. }
  4852. else {
  4853. return emotionIsPropValid_1(key);
  4854. }
  4855. };
  4856. }
  4857. catch (_a) {
  4858. // We don't need to actually do anything here - the fallback is the existing `isPropValid`.
  4859. }
  4860. function filterProps(props, isDom, forwardMotionProps) {
  4861. var filteredProps = {};
  4862. for (var key in props) {
  4863. if (shouldForward(key) ||
  4864. (forwardMotionProps === true && (0,_motion_utils_valid_prop_js__WEBPACK_IMPORTED_MODULE_0__.isValidMotionProp)(key)) ||
  4865. (!isDom && !(0,_motion_utils_valid_prop_js__WEBPACK_IMPORTED_MODULE_0__.isValidMotionProp)(key))) {
  4866. filteredProps[key] = props[key];
  4867. }
  4868. }
  4869. return filteredProps;
  4870. }
  4871. /***/ }),
  4872. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js":
  4873. /*!********************************************************************************!*\
  4874. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js ***!
  4875. \********************************************************************************/
  4876. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4877. __webpack_require__.r(__webpack_exports__);
  4878. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4879. /* harmony export */ "isCSSVariable": () => (/* binding */ isCSSVariable)
  4880. /* harmony export */ });
  4881. /**
  4882. * Returns true if the provided key is a CSS variable
  4883. */
  4884. function isCSSVariable(key) {
  4885. return key.startsWith("--");
  4886. }
  4887. /***/ }),
  4888. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js":
  4889. /*!*********************************************************************************!*\
  4890. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/is-svg-component.js ***!
  4891. \*********************************************************************************/
  4892. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4893. __webpack_require__.r(__webpack_exports__);
  4894. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4895. /* harmony export */ "isSVGComponent": () => (/* binding */ isSVGComponent)
  4896. /* harmony export */ });
  4897. /* harmony import */ var _svg_supported_elements_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../svg/supported-elements.js */ "./node_modules/framer-motion/dist/es/render/svg/supported-elements.js");
  4898. function isSVGComponent(Component) {
  4899. /**
  4900. * If it's not a string, it's a custom React component. Currently we only support
  4901. * HTML custom React components.
  4902. */
  4903. if (typeof Component !== "string")
  4904. return false;
  4905. /**
  4906. * If it contains a dash, the element is a custom HTML webcomponent.
  4907. */
  4908. if (Component.includes("-"))
  4909. return false;
  4910. /**
  4911. * If it's in our list of lowercase SVG tags, it's an SVG component
  4912. */
  4913. if (_svg_supported_elements_js__WEBPACK_IMPORTED_MODULE_0__.lowercaseSVGElements.indexOf(Component) > -1)
  4914. return true;
  4915. /**
  4916. * If it contains a capital letter, it's an SVG component
  4917. */
  4918. if (/[A-Z]/.test(Component))
  4919. return true;
  4920. }
  4921. /***/ }),
  4922. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.js":
  4923. /*!**********************************************************************************!*\
  4924. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.js ***!
  4925. \**********************************************************************************/
  4926. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4927. __webpack_require__.r(__webpack_exports__);
  4928. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4929. /* harmony export */ "parseDomVariant": () => (/* binding */ parseDomVariant)
  4930. /* harmony export */ });
  4931. /* harmony import */ var _css_variables_conversion_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css-variables-conversion.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/css-variables-conversion.js");
  4932. /* harmony import */ var _unit_conversion_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./unit-conversion.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js");
  4933. /**
  4934. * Parse a DOM variant to make it animatable. This involves resolving CSS variables
  4935. * and ensuring animations like "20%" => "calc(50vw)" are performed in pixels.
  4936. */
  4937. var parseDomVariant = function (visualElement, target, origin, transitionEnd) {
  4938. var resolved = (0,_css_variables_conversion_js__WEBPACK_IMPORTED_MODULE_0__.resolveCSSVariables)(visualElement, target, transitionEnd);
  4939. target = resolved.target;
  4940. transitionEnd = resolved.transitionEnd;
  4941. return (0,_unit_conversion_js__WEBPACK_IMPORTED_MODULE_1__.unitConversion)(visualElement, target, origin, transitionEnd);
  4942. };
  4943. /***/ }),
  4944. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js":
  4945. /*!********************************************************************************!*\
  4946. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/unit-conversion.js ***!
  4947. \********************************************************************************/
  4948. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  4949. __webpack_require__.r(__webpack_exports__);
  4950. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  4951. /* harmony export */ "BoundingBoxDimension": () => (/* binding */ BoundingBoxDimension),
  4952. /* harmony export */ "unitConversion": () => (/* binding */ unitConversion)
  4953. /* harmony export */ });
  4954. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  4955. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  4956. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/numbers/index.js");
  4957. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/numbers/units.js");
  4958. /* harmony import */ var _animation_utils_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../animation/utils/is-keyframes-target.js */ "./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js");
  4959. /* harmony import */ var _value_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./value-types.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js");
  4960. /* harmony import */ var _html_utils_transform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../html/utils/transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js");
  4961. var positionalKeys = new Set([
  4962. "width",
  4963. "height",
  4964. "top",
  4965. "left",
  4966. "right",
  4967. "bottom",
  4968. "x",
  4969. "y",
  4970. ]);
  4971. var isPositionalKey = function (key) { return positionalKeys.has(key); };
  4972. var hasPositionalKey = function (target) {
  4973. return Object.keys(target).some(isPositionalKey);
  4974. };
  4975. var setAndResetVelocity = function (value, to) {
  4976. // Looks odd but setting it twice doesn't render, it'll just
  4977. // set both prev and current to the latest value
  4978. value.set(to, false);
  4979. value.set(to);
  4980. };
  4981. var isNumOrPxType = function (v) {
  4982. return v === style_value_types__WEBPACK_IMPORTED_MODULE_1__.number || v === style_value_types__WEBPACK_IMPORTED_MODULE_2__.px;
  4983. };
  4984. var BoundingBoxDimension;
  4985. (function (BoundingBoxDimension) {
  4986. BoundingBoxDimension["width"] = "width";
  4987. BoundingBoxDimension["height"] = "height";
  4988. BoundingBoxDimension["left"] = "left";
  4989. BoundingBoxDimension["right"] = "right";
  4990. BoundingBoxDimension["top"] = "top";
  4991. BoundingBoxDimension["bottom"] = "bottom";
  4992. })(BoundingBoxDimension || (BoundingBoxDimension = {}));
  4993. var getPosFromMatrix = function (matrix, pos) {
  4994. return parseFloat(matrix.split(", ")[pos]);
  4995. };
  4996. var getTranslateFromMatrix = function (pos2, pos3) { return function (_bbox, _a) {
  4997. var transform = _a.transform;
  4998. if (transform === "none" || !transform)
  4999. return 0;
  5000. var matrix3d = transform.match(/^matrix3d\((.+)\)$/);
  5001. if (matrix3d) {
  5002. return getPosFromMatrix(matrix3d[1], pos3);
  5003. }
  5004. else {
  5005. var matrix = transform.match(/^matrix\((.+)\)$/);
  5006. if (matrix) {
  5007. return getPosFromMatrix(matrix[1], pos2);
  5008. }
  5009. else {
  5010. return 0;
  5011. }
  5012. }
  5013. }; };
  5014. var transformKeys = new Set(["x", "y", "z"]);
  5015. var nonTranslationalTransformKeys = _html_utils_transform_js__WEBPACK_IMPORTED_MODULE_3__.transformProps.filter(function (key) { return !transformKeys.has(key); });
  5016. function removeNonTranslationalTransform(visualElement) {
  5017. var removedTransforms = [];
  5018. nonTranslationalTransformKeys.forEach(function (key) {
  5019. var value = visualElement.getValue(key);
  5020. if (value !== undefined) {
  5021. removedTransforms.push([key, value.get()]);
  5022. value.set(key.startsWith("scale") ? 1 : 0);
  5023. }
  5024. });
  5025. // Apply changes to element before measurement
  5026. if (removedTransforms.length)
  5027. visualElement.syncRender();
  5028. return removedTransforms;
  5029. }
  5030. var positionalValues = {
  5031. // Dimensions
  5032. width: function (_a) {
  5033. var x = _a.x;
  5034. return x.max - x.min;
  5035. },
  5036. height: function (_a) {
  5037. var y = _a.y;
  5038. return y.max - y.min;
  5039. },
  5040. top: function (_bbox, _a) {
  5041. var top = _a.top;
  5042. return parseFloat(top);
  5043. },
  5044. left: function (_bbox, _a) {
  5045. var left = _a.left;
  5046. return parseFloat(left);
  5047. },
  5048. bottom: function (_a, _b) {
  5049. var y = _a.y;
  5050. var top = _b.top;
  5051. return parseFloat(top) + (y.max - y.min);
  5052. },
  5053. right: function (_a, _b) {
  5054. var x = _a.x;
  5055. var left = _b.left;
  5056. return parseFloat(left) + (x.max - x.min);
  5057. },
  5058. // Transform
  5059. x: getTranslateFromMatrix(4, 13),
  5060. y: getTranslateFromMatrix(5, 14),
  5061. };
  5062. var convertChangedValueTypes = function (target, visualElement, changedKeys) {
  5063. var originBbox = visualElement.measureViewportBox();
  5064. var element = visualElement.getInstance();
  5065. var elementComputedStyle = getComputedStyle(element);
  5066. var display = elementComputedStyle.display, top = elementComputedStyle.top, left = elementComputedStyle.left, bottom = elementComputedStyle.bottom, right = elementComputedStyle.right, transform = elementComputedStyle.transform;
  5067. var originComputedStyle = { top: top, left: left, bottom: bottom, right: right, transform: transform };
  5068. // If the element is currently set to display: "none", make it visible before
  5069. // measuring the target bounding box
  5070. if (display === "none") {
  5071. visualElement.setStaticValue("display", target.display || "block");
  5072. }
  5073. // Apply the latest values (as set in checkAndConvertChangedValueTypes)
  5074. visualElement.syncRender();
  5075. var targetBbox = visualElement.measureViewportBox();
  5076. changedKeys.forEach(function (key) {
  5077. // Restore styles to their **calculated computed style**, not their actual
  5078. // originally set style. This allows us to animate between equivalent pixel units.
  5079. var value = visualElement.getValue(key);
  5080. setAndResetVelocity(value, positionalValues[key](originBbox, originComputedStyle));
  5081. target[key] = positionalValues[key](targetBbox, elementComputedStyle);
  5082. });
  5083. return target;
  5084. };
  5085. var checkAndConvertChangedValueTypes = function (visualElement, target, origin, transitionEnd) {
  5086. if (origin === void 0) { origin = {}; }
  5087. if (transitionEnd === void 0) { transitionEnd = {}; }
  5088. target = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({}, target);
  5089. transitionEnd = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({}, transitionEnd);
  5090. var targetPositionalKeys = Object.keys(target).filter(isPositionalKey);
  5091. // We want to remove any transform values that could affect the element's bounding box before
  5092. // it's measured. We'll reapply these later.
  5093. var removedTransformValues = [];
  5094. var hasAttemptedToRemoveTransformValues = false;
  5095. var changedValueTypeKeys = [];
  5096. targetPositionalKeys.forEach(function (key) {
  5097. var value = visualElement.getValue(key);
  5098. if (!visualElement.hasValue(key))
  5099. return;
  5100. var from = origin[key];
  5101. var to = target[key];
  5102. var fromType = (0,_value_types_js__WEBPACK_IMPORTED_MODULE_5__.findDimensionValueType)(from);
  5103. var toType;
  5104. // TODO: The current implementation of this basically throws an error
  5105. // if you try and do value conversion via keyframes. There's probably
  5106. // a way of doing this but the performance implications would need greater scrutiny,
  5107. // as it'd be doing multiple resize-remeasure operations.
  5108. if ((0,_animation_utils_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_6__.isKeyframesTarget)(to)) {
  5109. var numKeyframes = to.length;
  5110. for (var i = to[0] === null ? 1 : 0; i < numKeyframes; i++) {
  5111. if (!toType) {
  5112. toType = (0,_value_types_js__WEBPACK_IMPORTED_MODULE_5__.findDimensionValueType)(to[i]);
  5113. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(toType === fromType ||
  5114. (isNumOrPxType(fromType) && isNumOrPxType(toType)), "Keyframes must be of the same dimension as the current value");
  5115. }
  5116. else {
  5117. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)((0,_value_types_js__WEBPACK_IMPORTED_MODULE_5__.findDimensionValueType)(to[i]) === toType, "All keyframes must be of the same type");
  5118. }
  5119. }
  5120. }
  5121. else {
  5122. toType = (0,_value_types_js__WEBPACK_IMPORTED_MODULE_5__.findDimensionValueType)(to);
  5123. }
  5124. if (fromType !== toType) {
  5125. // If they're both just number or px, convert them both to numbers rather than
  5126. // relying on resize/remeasure to convert (which is wasteful in this situation)
  5127. if (isNumOrPxType(fromType) && isNumOrPxType(toType)) {
  5128. var current = value.get();
  5129. if (typeof current === "string") {
  5130. value.set(parseFloat(current));
  5131. }
  5132. if (typeof to === "string") {
  5133. target[key] = parseFloat(to);
  5134. }
  5135. else if (Array.isArray(to) && toType === style_value_types__WEBPACK_IMPORTED_MODULE_2__.px) {
  5136. target[key] = to.map(parseFloat);
  5137. }
  5138. }
  5139. else if ((fromType === null || fromType === void 0 ? void 0 : fromType.transform) && (toType === null || toType === void 0 ? void 0 : toType.transform) &&
  5140. (from === 0 || to === 0)) {
  5141. // If one or the other value is 0, it's safe to coerce it to the
  5142. // type of the other without measurement
  5143. if (from === 0) {
  5144. value.set(toType.transform(from));
  5145. }
  5146. else {
  5147. target[key] = fromType.transform(to);
  5148. }
  5149. }
  5150. else {
  5151. // If we're going to do value conversion via DOM measurements, we first
  5152. // need to remove non-positional transform values that could affect the bbox measurements.
  5153. if (!hasAttemptedToRemoveTransformValues) {
  5154. removedTransformValues = removeNonTranslationalTransform(visualElement);
  5155. hasAttemptedToRemoveTransformValues = true;
  5156. }
  5157. changedValueTypeKeys.push(key);
  5158. transitionEnd[key] =
  5159. transitionEnd[key] !== undefined
  5160. ? transitionEnd[key]
  5161. : target[key];
  5162. setAndResetVelocity(value, to);
  5163. }
  5164. }
  5165. });
  5166. if (changedValueTypeKeys.length) {
  5167. var convertedTarget = convertChangedValueTypes(target, visualElement, changedValueTypeKeys);
  5168. // If we removed transform values, reapply them before the next render
  5169. if (removedTransformValues.length) {
  5170. removedTransformValues.forEach(function (_a) {
  5171. var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__read)(_a, 2), key = _b[0], value = _b[1];
  5172. visualElement.getValue(key).set(value);
  5173. });
  5174. }
  5175. // Reapply original values
  5176. visualElement.syncRender();
  5177. return { target: convertedTarget, transitionEnd: transitionEnd };
  5178. }
  5179. else {
  5180. return { target: target, transitionEnd: transitionEnd };
  5181. }
  5182. };
  5183. /**
  5184. * Convert value types for x/y/width/height/top/left/bottom/right
  5185. *
  5186. * Allows animation between `'auto'` -> `'100%'` or `0` -> `'calc(50% - 10vw)'`
  5187. *
  5188. * @internal
  5189. */
  5190. function unitConversion(visualElement, target, origin, transitionEnd) {
  5191. return hasPositionalKey(target)
  5192. ? checkAndConvertChangedValueTypes(visualElement, target, origin, transitionEnd)
  5193. : { target: target, transitionEnd: transitionEnd };
  5194. }
  5195. /***/ }),
  5196. /***/ "./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js":
  5197. /*!****************************************************************************!*\
  5198. !*** ./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js ***!
  5199. \****************************************************************************/
  5200. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5201. __webpack_require__.r(__webpack_exports__);
  5202. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5203. /* harmony export */ "auto": () => (/* binding */ auto),
  5204. /* harmony export */ "findDimensionValueType": () => (/* binding */ findDimensionValueType),
  5205. /* harmony export */ "findValueType": () => (/* binding */ findValueType),
  5206. /* harmony export */ "getAnimatableNone": () => (/* binding */ getAnimatableNone),
  5207. /* harmony export */ "getDefaultValueType": () => (/* binding */ getDefaultValueType),
  5208. /* harmony export */ "getValueAsType": () => (/* binding */ getValueAsType)
  5209. /* harmony export */ });
  5210. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  5211. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/numbers/index.js");
  5212. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/color/index.js");
  5213. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/numbers/units.js");
  5214. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/complex/filter.js");
  5215. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/complex/index.js");
  5216. /**
  5217. * ValueType for "auto"
  5218. */
  5219. var auto = {
  5220. test: function (v) { return v === "auto"; },
  5221. parse: function (v) { return v; },
  5222. };
  5223. /**
  5224. * ValueType for ints
  5225. */
  5226. var int = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, style_value_types__WEBPACK_IMPORTED_MODULE_1__.number), { transform: Math.round });
  5227. /**
  5228. * A map of default value types for common values
  5229. */
  5230. var defaultValueTypes = {
  5231. // Color props
  5232. color: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5233. backgroundColor: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5234. outlineColor: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5235. fill: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5236. stroke: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5237. // Border props
  5238. borderColor: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5239. borderTopColor: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5240. borderRightColor: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5241. borderBottomColor: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5242. borderLeftColor: style_value_types__WEBPACK_IMPORTED_MODULE_2__.color,
  5243. borderWidth: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5244. borderTopWidth: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5245. borderRightWidth: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5246. borderBottomWidth: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5247. borderLeftWidth: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5248. borderRadius: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5249. radius: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5250. borderTopLeftRadius: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5251. borderTopRightRadius: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5252. borderBottomRightRadius: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5253. borderBottomLeftRadius: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5254. // Positioning props
  5255. width: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5256. maxWidth: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5257. height: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5258. maxHeight: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5259. size: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5260. top: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5261. right: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5262. bottom: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5263. left: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5264. // Spacing props
  5265. padding: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5266. paddingTop: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5267. paddingRight: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5268. paddingBottom: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5269. paddingLeft: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5270. margin: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5271. marginTop: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5272. marginRight: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5273. marginBottom: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5274. marginLeft: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5275. // Transform props
  5276. rotate: style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees,
  5277. rotateX: style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees,
  5278. rotateY: style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees,
  5279. rotateZ: style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees,
  5280. scale: style_value_types__WEBPACK_IMPORTED_MODULE_1__.scale,
  5281. scaleX: style_value_types__WEBPACK_IMPORTED_MODULE_1__.scale,
  5282. scaleY: style_value_types__WEBPACK_IMPORTED_MODULE_1__.scale,
  5283. scaleZ: style_value_types__WEBPACK_IMPORTED_MODULE_1__.scale,
  5284. skew: style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees,
  5285. skewX: style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees,
  5286. skewY: style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees,
  5287. distance: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5288. translateX: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5289. translateY: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5290. translateZ: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5291. x: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5292. y: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5293. z: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5294. perspective: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5295. transformPerspective: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5296. opacity: style_value_types__WEBPACK_IMPORTED_MODULE_1__.alpha,
  5297. originX: style_value_types__WEBPACK_IMPORTED_MODULE_3__.progressPercentage,
  5298. originY: style_value_types__WEBPACK_IMPORTED_MODULE_3__.progressPercentage,
  5299. originZ: style_value_types__WEBPACK_IMPORTED_MODULE_3__.px,
  5300. // Misc
  5301. zIndex: int,
  5302. filter: style_value_types__WEBPACK_IMPORTED_MODULE_4__.filter,
  5303. WebkitFilter: style_value_types__WEBPACK_IMPORTED_MODULE_4__.filter,
  5304. // SVG
  5305. fillOpacity: style_value_types__WEBPACK_IMPORTED_MODULE_1__.alpha,
  5306. strokeOpacity: style_value_types__WEBPACK_IMPORTED_MODULE_1__.alpha,
  5307. numOctaves: int,
  5308. };
  5309. /**
  5310. * A list of value types commonly used for dimensions
  5311. */
  5312. var dimensionValueTypes = [style_value_types__WEBPACK_IMPORTED_MODULE_1__.number, style_value_types__WEBPACK_IMPORTED_MODULE_3__.px, style_value_types__WEBPACK_IMPORTED_MODULE_3__.percent, style_value_types__WEBPACK_IMPORTED_MODULE_3__.degrees, style_value_types__WEBPACK_IMPORTED_MODULE_3__.vw, style_value_types__WEBPACK_IMPORTED_MODULE_3__.vh, auto];
  5313. /**
  5314. * Tests a provided value against a ValueType
  5315. */
  5316. var testValueType = function (v) { return function (type) { return type.test(v); }; };
  5317. /**
  5318. * Tests a dimensional value against the list of dimension ValueTypes
  5319. */
  5320. var findDimensionValueType = function (v) {
  5321. return dimensionValueTypes.find(testValueType(v));
  5322. };
  5323. /**
  5324. * A list of all ValueTypes
  5325. */
  5326. var valueTypes = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__spread)(dimensionValueTypes, [style_value_types__WEBPACK_IMPORTED_MODULE_2__.color, style_value_types__WEBPACK_IMPORTED_MODULE_5__.complex]);
  5327. /**
  5328. * Tests a value against the list of ValueTypes
  5329. */
  5330. var findValueType = function (v) { return valueTypes.find(testValueType(v)); };
  5331. /**
  5332. * Gets the default ValueType for the provided value key
  5333. */
  5334. var getDefaultValueType = function (key) { return defaultValueTypes[key]; };
  5335. /**
  5336. * Provided a value and a ValueType, returns the value as that value type.
  5337. */
  5338. var getValueAsType = function (value, type) {
  5339. return type && typeof value === "number"
  5340. ? type.transform(value)
  5341. : value;
  5342. };
  5343. function getAnimatableNone(key, value) {
  5344. var _a;
  5345. var defaultValueType = getDefaultValueType(key);
  5346. if (defaultValueType !== style_value_types__WEBPACK_IMPORTED_MODULE_4__.filter)
  5347. defaultValueType = style_value_types__WEBPACK_IMPORTED_MODULE_5__.complex;
  5348. // If value is not recognised as animatable, ie "none", create an animatable version origin based on the target
  5349. return (_a = defaultValueType.getAnimatableNone) === null || _a === void 0 ? void 0 : _a.call(defaultValueType, value);
  5350. }
  5351. /***/ }),
  5352. /***/ "./node_modules/framer-motion/dist/es/render/html/config-motion.js":
  5353. /*!*************************************************************************!*\
  5354. !*** ./node_modules/framer-motion/dist/es/render/html/config-motion.js ***!
  5355. \*************************************************************************/
  5356. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5357. __webpack_require__.r(__webpack_exports__);
  5358. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5359. /* harmony export */ "htmlMotionConfig": () => (/* binding */ htmlMotionConfig)
  5360. /* harmony export */ });
  5361. /* harmony import */ var _utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/create-render-state.js */ "./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js");
  5362. /* harmony import */ var _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/scrape-motion-values.js */ "./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js");
  5363. /* harmony import */ var _visual_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./visual-element.js */ "./node_modules/framer-motion/dist/es/render/html/visual-element.js");
  5364. /* harmony import */ var _motion_utils_use_visual_state_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../motion/utils/use-visual-state.js */ "./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js");
  5365. var htmlMotionConfig = {
  5366. createVisualElement: function (isStatic, options) {
  5367. return (0,_visual_element_js__WEBPACK_IMPORTED_MODULE_0__.htmlVisualElement)(options, { enableHardwareAcceleration: !isStatic });
  5368. },
  5369. useVisualState: (0,_motion_utils_use_visual_state_js__WEBPACK_IMPORTED_MODULE_1__.makeUseVisualState)({
  5370. scrapeMotionValuesFromProps: _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_2__.scrapeMotionValuesFromProps,
  5371. createRenderState: _utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_3__.createHtmlRenderState,
  5372. }),
  5373. };
  5374. /***/ }),
  5375. /***/ "./node_modules/framer-motion/dist/es/render/html/use-props.js":
  5376. /*!*********************************************************************!*\
  5377. !*** ./node_modules/framer-motion/dist/es/render/html/use-props.js ***!
  5378. \*********************************************************************/
  5379. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5380. __webpack_require__.r(__webpack_exports__);
  5381. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5382. /* harmony export */ "copyRawValuesOnly": () => (/* binding */ copyRawValuesOnly),
  5383. /* harmony export */ "useHTMLProps": () => (/* binding */ useHTMLProps),
  5384. /* harmony export */ "useStyle": () => (/* binding */ useStyle)
  5385. /* harmony export */ });
  5386. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  5387. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  5388. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  5389. /* harmony import */ var _motion_utils_is_forced_motion_value_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../motion/utils/is-forced-motion-value.js */ "./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js");
  5390. /* harmony import */ var _value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../value/utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  5391. /* harmony import */ var _utils_build_styles_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/build-styles.js */ "./node_modules/framer-motion/dist/es/render/html/utils/build-styles.js");
  5392. /* harmony import */ var _utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/create-render-state.js */ "./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js");
  5393. function copyRawValuesOnly(target, source, props) {
  5394. for (var key in source) {
  5395. if (!(0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.isMotionValue)(source[key]) && !(0,_motion_utils_is_forced_motion_value_js__WEBPACK_IMPORTED_MODULE_2__.isForcedMotionValue)(key, props)) {
  5396. target[key] = source[key];
  5397. }
  5398. }
  5399. }
  5400. function useInitialMotionValues(_a, visualState, isStatic) {
  5401. var transformTemplate = _a.transformTemplate;
  5402. return (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
  5403. var state = (0,_utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_3__.createHtmlRenderState)();
  5404. (0,_utils_build_styles_js__WEBPACK_IMPORTED_MODULE_4__.buildHTMLStyles)(state, visualState, undefined, undefined, { enableHardwareAcceleration: !isStatic }, transformTemplate);
  5405. var vars = state.vars, style = state.style;
  5406. return (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)({}, vars), style);
  5407. }, [visualState]);
  5408. }
  5409. function useStyle(props, visualState, isStatic) {
  5410. var styleProp = props.style || {};
  5411. var style = {};
  5412. /**
  5413. * Copy non-Motion Values straight into style
  5414. */
  5415. copyRawValuesOnly(style, styleProp, props);
  5416. Object.assign(style, useInitialMotionValues(props, visualState, isStatic));
  5417. if (props.transformValues) {
  5418. style = props.transformValues(style);
  5419. }
  5420. return style;
  5421. }
  5422. function useHTMLProps(props, visualState, isStatic) {
  5423. // The `any` isn't ideal but it is the type of createElement props argument
  5424. var htmlProps = {};
  5425. var style = useStyle(props, visualState, isStatic);
  5426. if (Boolean(props.drag)) {
  5427. // Disable the ghost element when a user drags
  5428. htmlProps.draggable = false;
  5429. // Disable text selection
  5430. style.userSelect = style.WebkitUserSelect = style.WebkitTouchCallout =
  5431. "none";
  5432. // Disable scrolling on the draggable direction
  5433. style.touchAction =
  5434. props.drag === true
  5435. ? "none"
  5436. : "pan-" + (props.drag === "x" ? "y" : "x");
  5437. }
  5438. htmlProps.style = style;
  5439. return htmlProps;
  5440. }
  5441. /***/ }),
  5442. /***/ "./node_modules/framer-motion/dist/es/render/html/utils/build-styles.js":
  5443. /*!******************************************************************************!*\
  5444. !*** ./node_modules/framer-motion/dist/es/render/html/utils/build-styles.js ***!
  5445. \******************************************************************************/
  5446. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5447. __webpack_require__.r(__webpack_exports__);
  5448. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5449. /* harmony export */ "buildHTMLStyles": () => (/* binding */ buildHTMLStyles)
  5450. /* harmony export */ });
  5451. /* harmony import */ var _dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../dom/utils/value-types.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js");
  5452. /* harmony import */ var _dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../dom/projection/scale-correction.js */ "./node_modules/framer-motion/dist/es/render/dom/projection/scale-correction.js");
  5453. /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js");
  5454. /* harmony import */ var _build_transform_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./build-transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/build-transform.js");
  5455. /* harmony import */ var _dom_utils_is_css_variable_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../dom/utils/is-css-variable.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js");
  5456. function buildHTMLStyles(state, latestValues, projection, layoutState, options, transformTemplate) {
  5457. var _a;
  5458. var style = state.style, vars = state.vars, transform = state.transform, transformKeys = state.transformKeys, transformOrigin = state.transformOrigin;
  5459. // Empty the transformKeys array. As we're throwing out refs to its items
  5460. // this might not be as cheap as suspected. Maybe using the array as a buffer
  5461. // with a manual incrementation would be better.
  5462. transformKeys.length = 0;
  5463. // Track whether we encounter any transform or transformOrigin values.
  5464. var hasTransform = false;
  5465. var hasTransformOrigin = false;
  5466. // Does the calculated transform essentially equal "none"?
  5467. var transformIsNone = true;
  5468. /**
  5469. * Loop over all our latest animated values and decide whether to handle them
  5470. * as a style or CSS variable.
  5471. *
  5472. * Transforms and transform origins are kept seperately for further processing.
  5473. */
  5474. for (var key in latestValues) {
  5475. var value = latestValues[key];
  5476. /**
  5477. * If this is a CSS variable we don't do any further processing.
  5478. */
  5479. if ((0,_dom_utils_is_css_variable_js__WEBPACK_IMPORTED_MODULE_0__.isCSSVariable)(key)) {
  5480. vars[key] = value;
  5481. continue;
  5482. }
  5483. // Convert the value to its default value type, ie 0 -> "0px"
  5484. var valueType = (0,_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_1__.getDefaultValueType)(key);
  5485. var valueAsType = (0,_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_1__.getValueAsType)(value, valueType);
  5486. if ((0,_transform_js__WEBPACK_IMPORTED_MODULE_2__.isTransformProp)(key)) {
  5487. // If this is a transform, flag to enable further transform processing
  5488. hasTransform = true;
  5489. transform[key] = valueAsType;
  5490. transformKeys.push(key);
  5491. // If we already know we have a non-default transform, early return
  5492. if (!transformIsNone)
  5493. continue;
  5494. // Otherwise check to see if this is a default transform
  5495. if (value !== ((_a = valueType.default) !== null && _a !== void 0 ? _a : 0))
  5496. transformIsNone = false;
  5497. }
  5498. else if ((0,_transform_js__WEBPACK_IMPORTED_MODULE_2__.isTransformOriginProp)(key)) {
  5499. transformOrigin[key] = valueAsType;
  5500. // If this is a transform origin, flag and enable further transform-origin processing
  5501. hasTransformOrigin = true;
  5502. }
  5503. else {
  5504. /**
  5505. * If layout projection is on, and we need to perform scale correction for this
  5506. * value type, perform it.
  5507. */
  5508. if (layoutState &&
  5509. projection &&
  5510. layoutState.isHydrated &&
  5511. _dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_3__.valueScaleCorrection[key]) {
  5512. var correctedValue = _dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_3__.valueScaleCorrection[key].process(value, layoutState, projection);
  5513. /**
  5514. * Scale-correctable values can define a number of other values to break
  5515. * down into. For instance borderRadius needs applying to borderBottomLeftRadius etc
  5516. */
  5517. var applyTo = _dom_projection_scale_correction_js__WEBPACK_IMPORTED_MODULE_3__.valueScaleCorrection[key].applyTo;
  5518. if (applyTo) {
  5519. var num = applyTo.length;
  5520. for (var i = 0; i < num; i++) {
  5521. style[applyTo[i]] = correctedValue;
  5522. }
  5523. }
  5524. else {
  5525. style[key] = correctedValue;
  5526. }
  5527. }
  5528. else {
  5529. style[key] = valueAsType;
  5530. }
  5531. }
  5532. }
  5533. if (layoutState &&
  5534. projection &&
  5535. projection.isEnabled &&
  5536. layoutState.isHydrated) {
  5537. style.transform = (0,_build_transform_js__WEBPACK_IMPORTED_MODULE_4__.buildLayoutProjectionTransform)(layoutState.deltaFinal, layoutState.treeScale, hasTransform ? transform : undefined);
  5538. if (transformTemplate) {
  5539. style.transform = transformTemplate(transform, style.transform);
  5540. }
  5541. style.transformOrigin = (0,_build_transform_js__WEBPACK_IMPORTED_MODULE_4__.buildLayoutProjectionTransformOrigin)(layoutState);
  5542. }
  5543. else {
  5544. if (hasTransform) {
  5545. style.transform = (0,_build_transform_js__WEBPACK_IMPORTED_MODULE_4__.buildTransform)(state, options, transformIsNone, transformTemplate);
  5546. }
  5547. if (hasTransformOrigin) {
  5548. style.transformOrigin = (0,_build_transform_js__WEBPACK_IMPORTED_MODULE_4__.buildTransformOrigin)(transformOrigin);
  5549. }
  5550. }
  5551. }
  5552. /***/ }),
  5553. /***/ "./node_modules/framer-motion/dist/es/render/html/utils/build-transform.js":
  5554. /*!*********************************************************************************!*\
  5555. !*** ./node_modules/framer-motion/dist/es/render/html/utils/build-transform.js ***!
  5556. \*********************************************************************************/
  5557. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5558. __webpack_require__.r(__webpack_exports__);
  5559. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5560. /* harmony export */ "buildLayoutProjectionTransform": () => (/* binding */ buildLayoutProjectionTransform),
  5561. /* harmony export */ "buildLayoutProjectionTransformOrigin": () => (/* binding */ buildLayoutProjectionTransformOrigin),
  5562. /* harmony export */ "buildTransform": () => (/* binding */ buildTransform),
  5563. /* harmony export */ "buildTransformOrigin": () => (/* binding */ buildTransformOrigin),
  5564. /* harmony export */ "identityProjection": () => (/* binding */ identityProjection)
  5565. /* harmony export */ });
  5566. /* harmony import */ var _transform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js");
  5567. /* harmony import */ var _utils_state_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/state.js */ "./node_modules/framer-motion/dist/es/render/utils/state.js");
  5568. var translateAlias = {
  5569. x: "translateX",
  5570. y: "translateY",
  5571. z: "translateZ",
  5572. transformPerspective: "perspective",
  5573. };
  5574. /**
  5575. * Build a CSS transform style from individual x/y/scale etc properties.
  5576. *
  5577. * This outputs with a default order of transforms/scales/rotations, this can be customised by
  5578. * providing a transformTemplate function.
  5579. */
  5580. function buildTransform(_a, _b, transformIsDefault, transformTemplate) {
  5581. var transform = _a.transform, transformKeys = _a.transformKeys;
  5582. var _c = _b.enableHardwareAcceleration, enableHardwareAcceleration = _c === void 0 ? true : _c, _d = _b.allowTransformNone, allowTransformNone = _d === void 0 ? true : _d;
  5583. // The transform string we're going to build into.
  5584. var transformString = "";
  5585. // Transform keys into their default order - this will determine the output order.
  5586. transformKeys.sort(_transform_js__WEBPACK_IMPORTED_MODULE_0__.sortTransformProps);
  5587. // Track whether the defined transform has a defined z so we don't add a
  5588. // second to enable hardware acceleration
  5589. var transformHasZ = false;
  5590. // Loop over each transform and build them into transformString
  5591. var numTransformKeys = transformKeys.length;
  5592. for (var i = 0; i < numTransformKeys; i++) {
  5593. var key = transformKeys[i];
  5594. transformString += (translateAlias[key] || key) + "(" + transform[key] + ") ";
  5595. if (key === "z")
  5596. transformHasZ = true;
  5597. }
  5598. if (!transformHasZ && enableHardwareAcceleration) {
  5599. transformString += "translateZ(0)";
  5600. }
  5601. else {
  5602. transformString = transformString.trim();
  5603. }
  5604. // If we have a custom `transform` template, pass our transform values and
  5605. // generated transformString to that before returning
  5606. if (transformTemplate) {
  5607. transformString = transformTemplate(transform, transformIsDefault ? "" : transformString);
  5608. }
  5609. else if (allowTransformNone && transformIsDefault) {
  5610. transformString = "none";
  5611. }
  5612. return transformString;
  5613. }
  5614. /**
  5615. * Build a transformOrigin style. Uses the same defaults as the browser for
  5616. * undefined origins.
  5617. */
  5618. function buildTransformOrigin(_a) {
  5619. var _b = _a.originX, originX = _b === void 0 ? "50%" : _b, _c = _a.originY, originY = _c === void 0 ? "50%" : _c, _d = _a.originZ, originZ = _d === void 0 ? 0 : _d;
  5620. return originX + " " + originY + " " + originZ;
  5621. }
  5622. /**
  5623. * Build a transform style that takes a calculated delta between the element's current
  5624. * space on screen and projects it into the desired space.
  5625. */
  5626. function buildLayoutProjectionTransform(_a, treeScale, latestTransform) {
  5627. var x = _a.x, y = _a.y;
  5628. /**
  5629. * The translations we use to calculate are always relative to the viewport coordinate space.
  5630. * But when we apply scales, we also scale the coordinate space of an element and its children.
  5631. * For instance if we have a treeScale (the culmination of all parent scales) of 0.5 and we need
  5632. * to move an element 100 pixels, we actually need to move it 200 in within that scaled space.
  5633. */
  5634. var xTranslate = x.translate / treeScale.x;
  5635. var yTranslate = y.translate / treeScale.y;
  5636. var transform = "translate3d(" + xTranslate + "px, " + yTranslate + "px, 0) ";
  5637. if (latestTransform) {
  5638. var rotate = latestTransform.rotate, rotateX = latestTransform.rotateX, rotateY = latestTransform.rotateY;
  5639. if (rotate)
  5640. transform += "rotate(" + rotate + ") ";
  5641. if (rotateX)
  5642. transform += "rotateX(" + rotateX + ") ";
  5643. if (rotateY)
  5644. transform += "rotateY(" + rotateY + ") ";
  5645. }
  5646. transform += "scale(" + x.scale + ", " + y.scale + ")";
  5647. return !latestTransform && transform === identityProjection ? "" : transform;
  5648. }
  5649. /**
  5650. * Take the calculated delta origin and apply it as a transform string.
  5651. */
  5652. function buildLayoutProjectionTransformOrigin(_a) {
  5653. var deltaFinal = _a.deltaFinal;
  5654. return deltaFinal.x.origin * 100 + "% " + deltaFinal.y.origin * 100 + "% 0";
  5655. }
  5656. var identityProjection = buildLayoutProjectionTransform(_utils_state_js__WEBPACK_IMPORTED_MODULE_1__.zeroLayout.delta, _utils_state_js__WEBPACK_IMPORTED_MODULE_1__.zeroLayout.treeScale, { x: 1, y: 1 });
  5657. /***/ }),
  5658. /***/ "./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js":
  5659. /*!*************************************************************************************!*\
  5660. !*** ./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js ***!
  5661. \*************************************************************************************/
  5662. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5663. __webpack_require__.r(__webpack_exports__);
  5664. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5665. /* harmony export */ "createHtmlRenderState": () => (/* binding */ createHtmlRenderState)
  5666. /* harmony export */ });
  5667. var createHtmlRenderState = function () { return ({
  5668. style: {},
  5669. transform: {},
  5670. transformKeys: [],
  5671. transformOrigin: {},
  5672. vars: {},
  5673. }); };
  5674. /***/ }),
  5675. /***/ "./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js":
  5676. /*!**************************************************************************************!*\
  5677. !*** ./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js ***!
  5678. \**************************************************************************************/
  5679. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5680. __webpack_require__.r(__webpack_exports__);
  5681. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5682. /* harmony export */ "scrapeMotionValuesFromProps": () => (/* binding */ scrapeMotionValuesFromProps)
  5683. /* harmony export */ });
  5684. /* harmony import */ var _motion_utils_is_forced_motion_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../motion/utils/is-forced-motion-value.js */ "./node_modules/framer-motion/dist/es/motion/utils/is-forced-motion-value.js");
  5685. /* harmony import */ var _value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../value/utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  5686. function scrapeMotionValuesFromProps(props) {
  5687. var style = props.style;
  5688. var newValues = {};
  5689. for (var key in style) {
  5690. if ((0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_0__.isMotionValue)(style[key]) || (0,_motion_utils_is_forced_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.isForcedMotionValue)(key, props)) {
  5691. newValues[key] = style[key];
  5692. }
  5693. }
  5694. return newValues;
  5695. }
  5696. /***/ }),
  5697. /***/ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js":
  5698. /*!***************************************************************************!*\
  5699. !*** ./node_modules/framer-motion/dist/es/render/html/utils/transform.js ***!
  5700. \***************************************************************************/
  5701. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5702. __webpack_require__.r(__webpack_exports__);
  5703. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5704. /* harmony export */ "isTransformOriginProp": () => (/* binding */ isTransformOriginProp),
  5705. /* harmony export */ "isTransformProp": () => (/* binding */ isTransformProp),
  5706. /* harmony export */ "sortTransformProps": () => (/* binding */ sortTransformProps),
  5707. /* harmony export */ "transformAxes": () => (/* binding */ transformAxes),
  5708. /* harmony export */ "transformProps": () => (/* binding */ transformProps)
  5709. /* harmony export */ });
  5710. /**
  5711. * A list of all transformable axes. We'll use this list to generated a version
  5712. * of each axes for each transform.
  5713. */
  5714. var transformAxes = ["", "X", "Y", "Z"];
  5715. /**
  5716. * An ordered array of each transformable value. By default, transform values
  5717. * will be sorted to this order.
  5718. */
  5719. var order = ["translate", "scale", "rotate", "skew"];
  5720. /**
  5721. * Generate a list of every possible transform key.
  5722. */
  5723. var transformProps = ["transformPerspective", "x", "y", "z"];
  5724. order.forEach(function (operationKey) {
  5725. return transformAxes.forEach(function (axesKey) {
  5726. return transformProps.push(operationKey + axesKey);
  5727. });
  5728. });
  5729. /**
  5730. * A function to use with Array.sort to sort transform keys by their default order.
  5731. */
  5732. function sortTransformProps(a, b) {
  5733. return transformProps.indexOf(a) - transformProps.indexOf(b);
  5734. }
  5735. /**
  5736. * A quick lookup for transform props.
  5737. */
  5738. var transformPropSet = new Set(transformProps);
  5739. function isTransformProp(key) {
  5740. return transformPropSet.has(key);
  5741. }
  5742. /**
  5743. * A quick lookup for transform origin props
  5744. */
  5745. var transformOriginProps = new Set(["originX", "originY", "originZ"]);
  5746. function isTransformOriginProp(key) {
  5747. return transformOriginProps.has(key);
  5748. }
  5749. /***/ }),
  5750. /***/ "./node_modules/framer-motion/dist/es/render/html/visual-element.js":
  5751. /*!**************************************************************************!*\
  5752. !*** ./node_modules/framer-motion/dist/es/render/html/visual-element.js ***!
  5753. \**************************************************************************/
  5754. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5755. __webpack_require__.r(__webpack_exports__);
  5756. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5757. /* harmony export */ "getComputedStyle": () => (/* binding */ getComputedStyle),
  5758. /* harmony export */ "htmlConfig": () => (/* binding */ htmlConfig),
  5759. /* harmony export */ "htmlVisualElement": () => (/* binding */ htmlVisualElement)
  5760. /* harmony export */ });
  5761. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  5762. /* harmony import */ var _dom_projection_measure_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../dom/projection/measure.js */ "./node_modules/framer-motion/dist/es/render/dom/projection/measure.js");
  5763. /* harmony import */ var _dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../dom/utils/value-types.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js");
  5764. /* harmony import */ var _utils_setters_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/setters.js */ "./node_modules/framer-motion/dist/es/render/utils/setters.js");
  5765. /* harmony import */ var _utils_transform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js");
  5766. /* harmony import */ var _dom_utils_is_css_variable_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dom/utils/is-css-variable.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/is-css-variable.js");
  5767. /* harmony import */ var _utils_build_styles_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/build-styles.js */ "./node_modules/framer-motion/dist/es/render/html/utils/build-styles.js");
  5768. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../index.js */ "./node_modules/framer-motion/dist/es/render/index.js");
  5769. /* harmony import */ var _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/scrape-motion-values.js */ "./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js");
  5770. /* harmony import */ var _dom_utils_parse_dom_variant_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dom/utils/parse-dom-variant.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/parse-dom-variant.js");
  5771. function getComputedStyle(element) {
  5772. return window.getComputedStyle(element);
  5773. }
  5774. var htmlConfig = {
  5775. treeType: "dom",
  5776. readValueFromInstance: function (domElement, key) {
  5777. if ((0,_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__.isTransformProp)(key)) {
  5778. var defaultType = (0,_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_1__.getDefaultValueType)(key);
  5779. return defaultType ? defaultType.default || 0 : 0;
  5780. }
  5781. else {
  5782. var computedStyle = getComputedStyle(domElement);
  5783. return (((0,_dom_utils_is_css_variable_js__WEBPACK_IMPORTED_MODULE_2__.isCSSVariable)(key)
  5784. ? computedStyle.getPropertyValue(key)
  5785. : computedStyle[key]) || 0);
  5786. }
  5787. },
  5788. sortNodePosition: function (a, b) {
  5789. /**
  5790. * compareDocumentPosition returns a bitmask, by using the bitwise &
  5791. * we're returning true if 2 in that bitmask is set to true. 2 is set
  5792. * to true if b preceeds a.
  5793. */
  5794. return a.compareDocumentPosition(b) & 2 ? 1 : -1;
  5795. },
  5796. getBaseTarget: function (props, key) {
  5797. var _a;
  5798. return (_a = props.style) === null || _a === void 0 ? void 0 : _a[key];
  5799. },
  5800. measureViewportBox: function (element, _a) {
  5801. var transformPagePoint = _a.transformPagePoint;
  5802. return (0,_dom_projection_measure_js__WEBPACK_IMPORTED_MODULE_3__.getBoundingBox)(element, transformPagePoint);
  5803. },
  5804. /**
  5805. * Reset the transform on the current Element. This is called as part
  5806. * of a batched process across the entire layout tree. To remove this write
  5807. * cycle it'd be interesting to see if it's possible to "undo" all the current
  5808. * layout transforms up the tree in the same way this.getBoundingBoxWithoutTransforms
  5809. * works
  5810. */
  5811. resetTransform: function (element, domElement, props) {
  5812. /**
  5813. * When we reset the transform of an element, there's a fair possibility that
  5814. * the element will visually move from underneath the pointer, triggering attached
  5815. * pointerenter/leave events. We temporarily suspend these while measurement takes place.
  5816. */
  5817. element.suspendHoverEvents();
  5818. var transformTemplate = props.transformTemplate;
  5819. domElement.style.transform = transformTemplate
  5820. ? transformTemplate({}, "")
  5821. : "none";
  5822. // Ensure that whatever happens next, we restore our transform on the next frame
  5823. element.scheduleRender();
  5824. },
  5825. restoreTransform: function (instance, mutableState) {
  5826. instance.style.transform = mutableState.style.transform;
  5827. },
  5828. removeValueFromRenderState: function (key, _a) {
  5829. var vars = _a.vars, style = _a.style;
  5830. delete vars[key];
  5831. delete style[key];
  5832. },
  5833. /**
  5834. * Ensure that HTML and Framer-specific value types like `px`->`%` and `Color`
  5835. * can be animated by Motion.
  5836. */
  5837. makeTargetAnimatable: function (element, _a, _b, isMounted) {
  5838. var transformValues = _b.transformValues;
  5839. if (isMounted === void 0) { isMounted = true; }
  5840. var transition = _a.transition, transitionEnd = _a.transitionEnd, target = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__rest)(_a, ["transition", "transitionEnd"]);
  5841. var origin = (0,_utils_setters_js__WEBPACK_IMPORTED_MODULE_5__.getOrigin)(target, transition || {}, element);
  5842. /**
  5843. * If Framer has provided a function to convert `Color` etc value types, convert them
  5844. */
  5845. if (transformValues) {
  5846. if (transitionEnd)
  5847. transitionEnd = transformValues(transitionEnd);
  5848. if (target)
  5849. target = transformValues(target);
  5850. if (origin)
  5851. origin = transformValues(origin);
  5852. }
  5853. if (isMounted) {
  5854. (0,_utils_setters_js__WEBPACK_IMPORTED_MODULE_5__.checkTargetForNewValues)(element, target, origin);
  5855. var parsed = (0,_dom_utils_parse_dom_variant_js__WEBPACK_IMPORTED_MODULE_6__.parseDomVariant)(element, target, origin, transitionEnd);
  5856. transitionEnd = parsed.transitionEnd;
  5857. target = parsed.target;
  5858. }
  5859. return (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({ transition: transition,
  5860. transitionEnd: transitionEnd }, target);
  5861. },
  5862. scrapeMotionValuesFromProps: _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_7__.scrapeMotionValuesFromProps,
  5863. build: function (element, renderState, latestValues, projection, layoutState, options, props) {
  5864. if (element.isVisible !== undefined) {
  5865. renderState.style.visibility = element.isVisible
  5866. ? "visible"
  5867. : "hidden";
  5868. }
  5869. (0,_utils_build_styles_js__WEBPACK_IMPORTED_MODULE_8__.buildHTMLStyles)(renderState, latestValues, projection, layoutState, options, props.transformTemplate);
  5870. },
  5871. render: function (element, _a) {
  5872. var style = _a.style, vars = _a.vars;
  5873. // Directly assign style into the Element's style prop. In tests Object.assign is the
  5874. // fastest way to assign styles.
  5875. Object.assign(element.style, style);
  5876. // Loop over any CSS variables and assign those.
  5877. for (var key in vars) {
  5878. element.style.setProperty(key, vars[key]);
  5879. }
  5880. },
  5881. };
  5882. var htmlVisualElement = (0,_index_js__WEBPACK_IMPORTED_MODULE_9__.visualElement)(htmlConfig);
  5883. /***/ }),
  5884. /***/ "./node_modules/framer-motion/dist/es/render/index.js":
  5885. /*!************************************************************!*\
  5886. !*** ./node_modules/framer-motion/dist/es/render/index.js ***!
  5887. \************************************************************/
  5888. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  5889. __webpack_require__.r(__webpack_exports__);
  5890. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  5891. /* harmony export */ "visualElement": () => (/* binding */ visualElement)
  5892. /* harmony export */ });
  5893. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  5894. /* harmony import */ var _components_AnimateSharedLayout_types_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../components/AnimateSharedLayout/types.js */ "./node_modules/framer-motion/dist/es/components/AnimateSharedLayout/types.js");
  5895. /* harmony import */ var _utils_variants_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./utils/variants.js */ "./node_modules/framer-motion/dist/es/render/utils/variants.js");
  5896. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/pipe.js");
  5897. /* harmony import */ var framesync__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framesync */ "./node_modules/framesync/dist/es/index.js");
  5898. /* harmony import */ var _utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/geometry/index.js */ "./node_modules/framer-motion/dist/es/utils/geometry/index.js");
  5899. /* harmony import */ var _utils_each_axis_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/each-axis.js */ "./node_modules/framer-motion/dist/es/utils/each-axis.js");
  5900. /* harmony import */ var _utils_geometry_delta_calc_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/geometry/delta-calc.js */ "./node_modules/framer-motion/dist/es/utils/geometry/delta-calc.js");
  5901. /* harmony import */ var _value_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../value/index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  5902. /* harmony import */ var _utils_animation_state_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./utils/animation-state.js */ "./node_modules/framer-motion/dist/es/render/utils/animation-state.js");
  5903. /* harmony import */ var _value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../value/utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  5904. /* harmony import */ var _utils_state_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/state.js */ "./node_modules/framer-motion/dist/es/render/utils/state.js");
  5905. /* harmony import */ var _html_utils_build_transform_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./html/utils/build-transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/build-transform.js");
  5906. /* harmony import */ var _utils_geometry_delta_apply_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/geometry/delta-apply.js */ "./node_modules/framer-motion/dist/es/utils/geometry/delta-apply.js");
  5907. /* harmony import */ var _utils_lifecycles_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/lifecycles.js */ "./node_modules/framer-motion/dist/es/render/utils/lifecycles.js");
  5908. /* harmony import */ var _utils_motion_values_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./utils/motion-values.js */ "./node_modules/framer-motion/dist/es/render/utils/motion-values.js");
  5909. /* harmony import */ var _utils_projection_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./utils/projection.js */ "./node_modules/framer-motion/dist/es/render/utils/projection.js");
  5910. var visualElement = function (_a) {
  5911. var _b = _a.treeType, treeType = _b === void 0 ? "" : _b, build = _a.build, getBaseTarget = _a.getBaseTarget, makeTargetAnimatable = _a.makeTargetAnimatable, measureViewportBox = _a.measureViewportBox, renderInstance = _a.render, readValueFromInstance = _a.readValueFromInstance, resetTransform = _a.resetTransform, restoreTransform = _a.restoreTransform, removeValueFromRenderState = _a.removeValueFromRenderState, sortNodePosition = _a.sortNodePosition, scrapeMotionValuesFromProps = _a.scrapeMotionValuesFromProps;
  5912. return function (_a, options) {
  5913. var parent = _a.parent, props = _a.props, presenceId = _a.presenceId, blockInitialAnimation = _a.blockInitialAnimation, visualState = _a.visualState;
  5914. if (options === void 0) { options = {}; }
  5915. var latestValues = visualState.latestValues, renderState = visualState.renderState;
  5916. /**
  5917. * The instance of the render-specific node that will be hydrated by the
  5918. * exposed React ref. So for example, this visual element can host a
  5919. * HTMLElement, plain object, or Three.js object. The functions provided
  5920. * in VisualElementConfig allow us to interface with this instance.
  5921. */
  5922. var instance;
  5923. /**
  5924. * A set of all children of this visual element. We use this to traverse
  5925. * the tree when updating layout projections.
  5926. */
  5927. var children = new Set();
  5928. /**
  5929. * Manages the subscriptions for a visual element's lifecycle, for instance
  5930. * onRender and onViewportBoxUpdate.
  5931. */
  5932. var lifecycles = (0,_utils_lifecycles_js__WEBPACK_IMPORTED_MODULE_1__.createLifecycles)();
  5933. /**
  5934. *
  5935. */
  5936. var projection = (0,_utils_state_js__WEBPACK_IMPORTED_MODULE_2__.createProjectionState)();
  5937. /**
  5938. * This is a reference to the visual state of the "lead" visual element.
  5939. * Usually, this will be this visual element. But if it shares a layoutId
  5940. * with other visual elements, only one of them will be designated lead by
  5941. * AnimateSharedLayout. All the other visual elements will take on the visual
  5942. * appearance of the lead while they crossfade to it.
  5943. */
  5944. var leadProjection = projection;
  5945. var leadLatestValues = latestValues;
  5946. var unsubscribeFromLeadVisualElement;
  5947. /**
  5948. * The latest layout measurements and calculated projections. This
  5949. * is seperate from the target projection data in visualState as
  5950. * many visual elements might point to the same piece of visualState as
  5951. * a target, whereas they might each have different layouts and thus
  5952. * projection calculations needed to project into the same viewport box.
  5953. */
  5954. var layoutState = (0,_utils_state_js__WEBPACK_IMPORTED_MODULE_2__.createLayoutState)();
  5955. /**
  5956. *
  5957. */
  5958. var crossfader;
  5959. /**
  5960. * Keep track of whether the viewport box has been updated since the
  5961. * last time the layout projection was re-calculated.
  5962. */
  5963. var hasViewportBoxUpdated = false;
  5964. /**
  5965. * A map of all motion values attached to this visual element. Motion
  5966. * values are source of truth for any given animated value. A motion
  5967. * value might be provided externally by the component via props.
  5968. */
  5969. var values = new Map();
  5970. /**
  5971. * A map of every subscription that binds the provided or generated
  5972. * motion values onChange listeners to this visual element.
  5973. */
  5974. var valueSubscriptions = new Map();
  5975. /**
  5976. * A reference to the previously-provided motion values as returned
  5977. * from scrapeMotionValuesFromProps. We use the keys in here to determine
  5978. * if any motion values need to be removed after props are updated.
  5979. */
  5980. var prevMotionValues = {};
  5981. /**
  5982. * x/y motion values that track the progress of initiated layout
  5983. * animations.
  5984. *
  5985. * TODO: Target for removal
  5986. */
  5987. var projectionTargetProgress;
  5988. /**
  5989. * When values are removed from all animation props we need to search
  5990. * for a fallback value to animate to. These values are tracked in baseTarget.
  5991. */
  5992. var baseTarget = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, latestValues);
  5993. // Internal methods ========================
  5994. /**
  5995. * On mount, this will be hydrated with a callback to disconnect
  5996. * this visual element from its parent on unmount.
  5997. */
  5998. var removeFromMotionTree;
  5999. var removeFromVariantTree;
  6000. /**
  6001. *
  6002. */
  6003. function isProjecting() {
  6004. return projection.isEnabled && layoutState.isHydrated;
  6005. }
  6006. /**
  6007. *
  6008. */
  6009. function render() {
  6010. if (!instance)
  6011. return;
  6012. if (isProjecting()) {
  6013. /**
  6014. * Apply the latest user-set transforms to the targetBox to produce the targetBoxFinal.
  6015. * This is the final box that we will then project into by calculating a transform delta and
  6016. * applying it to the corrected box.
  6017. */
  6018. (0,_utils_geometry_delta_apply_js__WEBPACK_IMPORTED_MODULE_4__.applyBoxTransforms)(leadProjection.targetFinal, leadProjection.target, leadLatestValues);
  6019. /**
  6020. * Update the delta between the corrected box and the final target box, after
  6021. * user-set transforms are applied to it. This will be used by the renderer to
  6022. * create a transform style that will reproject the element from its actual layout
  6023. * into the desired bounding box.
  6024. */
  6025. (0,_utils_geometry_delta_calc_js__WEBPACK_IMPORTED_MODULE_5__.updateBoxDelta)(layoutState.deltaFinal, layoutState.layoutCorrected, leadProjection.targetFinal, latestValues);
  6026. }
  6027. triggerBuild();
  6028. renderInstance(instance, renderState);
  6029. }
  6030. function triggerBuild() {
  6031. var valuesToRender = latestValues;
  6032. if (crossfader && crossfader.isActive()) {
  6033. var crossfadedValues = crossfader.getCrossfadeState(element);
  6034. if (crossfadedValues)
  6035. valuesToRender = crossfadedValues;
  6036. }
  6037. build(element, renderState, valuesToRender, leadProjection, layoutState, options, props);
  6038. }
  6039. function update() {
  6040. lifecycles.notifyUpdate(latestValues);
  6041. }
  6042. function updateLayoutProjection() {
  6043. var delta = layoutState.delta, treeScale = layoutState.treeScale;
  6044. var prevTreeScaleX = treeScale.x;
  6045. var prevTreeScaleY = treeScale.x;
  6046. var prevDeltaTransform = layoutState.deltaTransform;
  6047. (0,_utils_projection_js__WEBPACK_IMPORTED_MODULE_6__.updateLayoutDeltas)(layoutState, leadProjection, element.path, latestValues);
  6048. hasViewportBoxUpdated &&
  6049. element.notifyViewportBoxUpdate(leadProjection.target, delta);
  6050. hasViewportBoxUpdated = false;
  6051. var deltaTransform = (0,_html_utils_build_transform_js__WEBPACK_IMPORTED_MODULE_7__.buildLayoutProjectionTransform)(delta, treeScale);
  6052. if (deltaTransform !== prevDeltaTransform ||
  6053. // Also compare calculated treeScale, for values that rely on this only for scale correction
  6054. prevTreeScaleX !== treeScale.x ||
  6055. prevTreeScaleY !== treeScale.y) {
  6056. element.scheduleRender();
  6057. }
  6058. layoutState.deltaTransform = deltaTransform;
  6059. }
  6060. /**
  6061. *
  6062. */
  6063. function bindToMotionValue(key, value) {
  6064. var removeOnChange = value.onChange(function (latestValue) {
  6065. latestValues[key] = latestValue;
  6066. props.onUpdate && framesync__WEBPACK_IMPORTED_MODULE_0__["default"].update(update, false, true);
  6067. });
  6068. var removeOnRenderRequest = value.onRenderRequest(element.scheduleRender);
  6069. valueSubscriptions.set(key, function () {
  6070. removeOnChange();
  6071. removeOnRenderRequest();
  6072. });
  6073. }
  6074. /**
  6075. * Any motion values that are provided to the element when created
  6076. * aren't yet bound to the element, as this would technically be impure.
  6077. * However, we iterate through the motion values and set them to the
  6078. * initial values for this component.
  6079. *
  6080. * TODO: This is impure and we should look at changing this to run on mount.
  6081. * Doing so will break some tests but this isn't neccessarily a breaking change,
  6082. * more a reflection of the test.
  6083. */
  6084. var initialMotionValues = scrapeMotionValuesFromProps(props);
  6085. for (var key in initialMotionValues) {
  6086. var value = initialMotionValues[key];
  6087. if (latestValues[key] !== undefined && (0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_8__.isMotionValue)(value)) {
  6088. value.set(latestValues[key], false);
  6089. }
  6090. }
  6091. /**
  6092. * Determine what role this visual element should take in the variant tree.
  6093. */
  6094. var isControllingVariants = (0,_utils_variants_js__WEBPACK_IMPORTED_MODULE_9__.checkIfControllingVariants)(props);
  6095. var isVariantNode = (0,_utils_variants_js__WEBPACK_IMPORTED_MODULE_9__.checkIfVariantNode)(props);
  6096. var element = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({ treeType: treeType,
  6097. /**
  6098. * This is a mirror of the internal instance prop, which keeps
  6099. * VisualElement type-compatible with React's RefObject.
  6100. */
  6101. current: null,
  6102. /**
  6103. * The depth of this visual element within the visual element tree.
  6104. */
  6105. depth: parent ? parent.depth + 1 : 0,
  6106. /**
  6107. * An ancestor path back to the root visual element. This is used
  6108. * by layout projection to quickly recurse back up the tree.
  6109. */
  6110. path: parent ? (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__spread)(parent.path, [parent]) : [],
  6111. /**
  6112. *
  6113. */
  6114. presenceId: presenceId,
  6115. projection: projection,
  6116. /**
  6117. * If this component is part of the variant tree, it should track
  6118. * any children that are also part of the tree. This is essentially
  6119. * a shadow tree to simplify logic around how to stagger over children.
  6120. */
  6121. variantChildren: isVariantNode ? new Set() : undefined,
  6122. /**
  6123. * Whether this instance is visible. This can be changed imperatively
  6124. * by AnimateSharedLayout, is analogous to CSS's visibility in that
  6125. * hidden elements should take up layout, and needs enacting by the configured
  6126. * render function.
  6127. */
  6128. isVisible: undefined,
  6129. /**
  6130. * Normally, if a component is controlled by a parent's variants, it can
  6131. * rely on that ancestor to trigger animations further down the tree.
  6132. * However, if a component is created after its parent is mounted, the parent
  6133. * won't trigger that mount animation so the child needs to.
  6134. *
  6135. * TODO: This might be better replaced with a method isParentMounted
  6136. */
  6137. manuallyAnimateOnMount: Boolean(parent === null || parent === void 0 ? void 0 : parent.isMounted()),
  6138. /**
  6139. * This can be set by AnimatePresence to force components that mount
  6140. * at the same time as it to mount as if they have initial={false} set.
  6141. */
  6142. blockInitialAnimation: blockInitialAnimation,
  6143. /**
  6144. * A boolean that can be used to determine whether to respect hover events.
  6145. * For layout measurements we often have to reposition the instance by
  6146. * removing its transform. This can trigger hover events, which is
  6147. * undesired.
  6148. */
  6149. isHoverEventsEnabled: true,
  6150. /**
  6151. * Determine whether this component has mounted yet. This is mostly used
  6152. * by variant children to determine whether they need to trigger their
  6153. * own animations on mount.
  6154. */
  6155. isMounted: function () { return Boolean(instance); }, mount: function (newInstance) {
  6156. instance = element.current = newInstance;
  6157. element.pointTo(element);
  6158. removeFromMotionTree = parent === null || parent === void 0 ? void 0 : parent.addChild(element);
  6159. if (isVariantNode && parent && !isControllingVariants) {
  6160. removeFromVariantTree = parent === null || parent === void 0 ? void 0 : parent.addVariantChild(element);
  6161. }
  6162. },
  6163. /**
  6164. *
  6165. */
  6166. unmount: function () {
  6167. framesync__WEBPACK_IMPORTED_MODULE_0__.cancelSync.update(update);
  6168. framesync__WEBPACK_IMPORTED_MODULE_0__.cancelSync.render(render);
  6169. framesync__WEBPACK_IMPORTED_MODULE_0__.cancelSync.preRender(element.updateLayoutProjection);
  6170. valueSubscriptions.forEach(function (remove) { return remove(); });
  6171. element.stopLayoutAnimation();
  6172. removeFromMotionTree === null || removeFromMotionTree === void 0 ? void 0 : removeFromMotionTree();
  6173. removeFromVariantTree === null || removeFromVariantTree === void 0 ? void 0 : removeFromVariantTree();
  6174. unsubscribeFromLeadVisualElement === null || unsubscribeFromLeadVisualElement === void 0 ? void 0 : unsubscribeFromLeadVisualElement();
  6175. lifecycles.clearAllListeners();
  6176. },
  6177. /**
  6178. * Add a child visual element to our set of children.
  6179. */
  6180. addChild: function (child) {
  6181. children.add(child);
  6182. return function () { return children.delete(child); };
  6183. },
  6184. /**
  6185. * Add a child visual element to our set of children.
  6186. */
  6187. addVariantChild: function (child) {
  6188. var _a;
  6189. var closestVariantNode = element.getClosestVariantNode();
  6190. if (closestVariantNode) {
  6191. (_a = closestVariantNode.variantChildren) === null || _a === void 0 ? void 0 : _a.add(child);
  6192. return function () { return closestVariantNode.variantChildren.delete(child); };
  6193. }
  6194. },
  6195. sortNodePosition: function (other) {
  6196. /**
  6197. * If these nodes aren't even of the same type we can't compare their depth.
  6198. */
  6199. if (!sortNodePosition || treeType !== other.treeType)
  6200. return 0;
  6201. return sortNodePosition(element.getInstance(), other.getInstance());
  6202. },
  6203. /**
  6204. * Returns the closest variant node in the tree starting from
  6205. * this visual element.
  6206. */
  6207. getClosestVariantNode: function () {
  6208. return isVariantNode ? element : parent === null || parent === void 0 ? void 0 : parent.getClosestVariantNode();
  6209. },
  6210. /**
  6211. * A method that schedules an update to layout projections throughout
  6212. * the tree. We inherit from the parent so there's only ever one
  6213. * job scheduled on the next frame - that of the root visual element.
  6214. */
  6215. scheduleUpdateLayoutProjection: parent
  6216. ? parent.scheduleUpdateLayoutProjection
  6217. : function () { return framesync__WEBPACK_IMPORTED_MODULE_0__["default"].preRender(element.updateLayoutProjection, false, true); },
  6218. /**
  6219. * Expose the latest layoutId prop.
  6220. */
  6221. getLayoutId: function () { return props.layoutId; },
  6222. /**
  6223. * Returns the current instance.
  6224. */
  6225. getInstance: function () { return instance; },
  6226. /**
  6227. * Get/set the latest static values.
  6228. */
  6229. getStaticValue: function (key) { return latestValues[key]; }, setStaticValue: function (key, value) { return (latestValues[key] = value); },
  6230. /**
  6231. * Returns the latest motion value state. Currently only used to take
  6232. * a snapshot of the visual element - perhaps this can return the whole
  6233. * visual state
  6234. */
  6235. getLatestValues: function () { return latestValues; },
  6236. /**
  6237. * Set the visiblity of the visual element. If it's changed, schedule
  6238. * a render to reflect these changes.
  6239. */
  6240. setVisibility: function (visibility) {
  6241. if (element.isVisible === visibility)
  6242. return;
  6243. element.isVisible = visibility;
  6244. element.scheduleRender();
  6245. },
  6246. /**
  6247. * Make a target animatable by Popmotion. For instance, if we're
  6248. * trying to animate width from 100px to 100vw we need to measure 100vw
  6249. * in pixels to determine what we really need to animate to. This is also
  6250. * pluggable to support Framer's custom value types like Color,
  6251. * and CSS variables.
  6252. */
  6253. makeTargetAnimatable: function (target, canMutate) {
  6254. if (canMutate === void 0) { canMutate = true; }
  6255. return makeTargetAnimatable(element, target, props, canMutate);
  6256. },
  6257. /**
  6258. * Temporarily suspend hover events while we remove transforms in order to measure the layout.
  6259. *
  6260. * This seems like an odd bit of scheduling but what we're doing is saying after
  6261. * the next render, wait 10 milliseconds before reenabling hover events. Waiting until
  6262. * the next frame results in missed, valid hover events. But triggering on the postRender
  6263. * frame is too soon to avoid triggering events with layout measurements.
  6264. *
  6265. * Note: If we figure out a way of measuring layout while transforms remain applied, this can be removed.
  6266. */
  6267. suspendHoverEvents: function () {
  6268. element.isHoverEventsEnabled = false;
  6269. framesync__WEBPACK_IMPORTED_MODULE_0__["default"].postRender(function () {
  6270. return setTimeout(function () { return (element.isHoverEventsEnabled = true); }, 10);
  6271. });
  6272. },
  6273. // Motion values ========================
  6274. /**
  6275. * Add a motion value and bind it to this visual element.
  6276. */
  6277. addValue: function (key, value) {
  6278. // Remove existing value if it exists
  6279. if (element.hasValue(key))
  6280. element.removeValue(key);
  6281. values.set(key, value);
  6282. latestValues[key] = value.get();
  6283. bindToMotionValue(key, value);
  6284. },
  6285. /**
  6286. * Remove a motion value and unbind any active subscriptions.
  6287. */
  6288. removeValue: function (key) {
  6289. var _a;
  6290. values.delete(key);
  6291. (_a = valueSubscriptions.get(key)) === null || _a === void 0 ? void 0 : _a();
  6292. valueSubscriptions.delete(key);
  6293. delete latestValues[key];
  6294. removeValueFromRenderState(key, renderState);
  6295. },
  6296. /**
  6297. * Check whether we have a motion value for this key
  6298. */
  6299. hasValue: function (key) { return values.has(key); },
  6300. /**
  6301. * Get a motion value for this key. If called with a default
  6302. * value, we'll create one if none exists.
  6303. */
  6304. getValue: function (key, defaultValue) {
  6305. var value = values.get(key);
  6306. if (value === undefined && defaultValue !== undefined) {
  6307. value = (0,_value_index_js__WEBPACK_IMPORTED_MODULE_10__.motionValue)(defaultValue);
  6308. element.addValue(key, value);
  6309. }
  6310. return value;
  6311. },
  6312. /**
  6313. * Iterate over our motion values.
  6314. */
  6315. forEachValue: function (callback) { return values.forEach(callback); },
  6316. /**
  6317. * If we're trying to animate to a previously unencountered value,
  6318. * we need to check for it in our state and as a last resort read it
  6319. * directly from the instance (which might have performance implications).
  6320. */
  6321. readValue: function (key) { var _a; return (_a = latestValues[key]) !== null && _a !== void 0 ? _a : readValueFromInstance(instance, key, options); },
  6322. /**
  6323. * Set the base target to later animate back to. This is currently
  6324. * only hydrated on creation and when we first read a value.
  6325. */
  6326. setBaseTarget: function (key, value) {
  6327. baseTarget[key] = value;
  6328. },
  6329. /**
  6330. * Find the base target for a value thats been removed from all animation
  6331. * props.
  6332. */
  6333. getBaseTarget: function (key) {
  6334. if (getBaseTarget) {
  6335. var target = getBaseTarget(props, key);
  6336. if (target !== undefined && !(0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_8__.isMotionValue)(target))
  6337. return target;
  6338. }
  6339. return baseTarget[key];
  6340. } }, lifecycles), {
  6341. /**
  6342. * Build the renderer state based on the latest visual state.
  6343. */
  6344. build: function () {
  6345. triggerBuild();
  6346. return renderState;
  6347. },
  6348. /**
  6349. * Schedule a render on the next animation frame.
  6350. */
  6351. scheduleRender: function () {
  6352. framesync__WEBPACK_IMPORTED_MODULE_0__["default"].render(render, false, true);
  6353. },
  6354. /**
  6355. * Synchronously fire render. It's prefered that we batch renders but
  6356. * in many circumstances, like layout measurement, we need to run this
  6357. * synchronously. However in those instances other measures should be taken
  6358. * to batch reads/writes.
  6359. */
  6360. syncRender: render,
  6361. /**
  6362. * Update the provided props. Ensure any newly-added motion values are
  6363. * added to our map, old ones removed, and listeners updated.
  6364. */
  6365. setProps: function (newProps) {
  6366. props = newProps;
  6367. lifecycles.updatePropListeners(newProps);
  6368. prevMotionValues = (0,_utils_motion_values_js__WEBPACK_IMPORTED_MODULE_11__.updateMotionValuesFromProps)(element, scrapeMotionValuesFromProps(props), prevMotionValues);
  6369. }, getProps: function () { return props; },
  6370. // Variants ==============================
  6371. /**
  6372. * Returns the variant definition with a given name.
  6373. */
  6374. getVariant: function (name) { var _a; return (_a = props.variants) === null || _a === void 0 ? void 0 : _a[name]; },
  6375. /**
  6376. * Returns the defined default transition on this component.
  6377. */
  6378. getDefaultTransition: function () { return props.transition; },
  6379. /**
  6380. * Used by child variant nodes to get the closest ancestor variant props.
  6381. */
  6382. getVariantContext: function (startAtParent) {
  6383. if (startAtParent === void 0) { startAtParent = false; }
  6384. if (startAtParent)
  6385. return parent === null || parent === void 0 ? void 0 : parent.getVariantContext();
  6386. if (!isControllingVariants) {
  6387. var context_1 = (parent === null || parent === void 0 ? void 0 : parent.getVariantContext()) || {};
  6388. if (props.initial !== undefined) {
  6389. context_1.initial = props.initial;
  6390. }
  6391. return context_1;
  6392. }
  6393. var context = {};
  6394. for (var i = 0; i < numVariantProps; i++) {
  6395. var name_1 = variantProps[i];
  6396. var prop = props[name_1];
  6397. if ((0,_utils_variants_js__WEBPACK_IMPORTED_MODULE_9__.isVariantLabel)(prop) || prop === false) {
  6398. context[name_1] = prop;
  6399. }
  6400. }
  6401. return context;
  6402. },
  6403. // Layout projection ==============================
  6404. /**
  6405. * Enable layout projection for this visual element. Won't actually
  6406. * occur until we also have hydrated layout measurements.
  6407. */
  6408. enableLayoutProjection: function () {
  6409. projection.isEnabled = true;
  6410. },
  6411. /**
  6412. * Lock the projection target, for instance when dragging, so
  6413. * nothing else can try and animate it.
  6414. */
  6415. lockProjectionTarget: function () {
  6416. projection.isTargetLocked = true;
  6417. },
  6418. unlockProjectionTarget: function () {
  6419. element.stopLayoutAnimation();
  6420. projection.isTargetLocked = false;
  6421. },
  6422. /**
  6423. * Record the viewport box as it was before an expected mutation/re-render
  6424. */
  6425. snapshotViewportBox: function () {
  6426. // TODO: Store this snapshot in LayoutState
  6427. element.prevViewportBox = element.measureViewportBox(false);
  6428. /**
  6429. * Update targetBox to match the prevViewportBox. This is just to ensure
  6430. * that targetBox is affected by scroll in the same way as the measured box
  6431. */
  6432. element.rebaseProjectionTarget(false, element.prevViewportBox);
  6433. }, getLayoutState: function () { return layoutState; }, setCrossfader: function (newCrossfader) {
  6434. crossfader = newCrossfader;
  6435. },
  6436. /**
  6437. * Start a layout animation on a given axis.
  6438. * TODO: This could be better.
  6439. */
  6440. startLayoutAnimation: function (axis, transition) {
  6441. var progress = element.getProjectionAnimationProgress()[axis];
  6442. var _a = projection.target[axis], min = _a.min, max = _a.max;
  6443. var length = max - min;
  6444. progress.clearListeners();
  6445. progress.set(min);
  6446. progress.set(min); // Set twice to hard-reset velocity
  6447. progress.onChange(function (v) {
  6448. return element.setProjectionTargetAxis(axis, v, v + length);
  6449. });
  6450. return element.animateMotionValue(axis, progress, 0, transition);
  6451. },
  6452. /**
  6453. * Stop layout animations.
  6454. */
  6455. stopLayoutAnimation: function () {
  6456. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_12__.eachAxis)(function (axis) {
  6457. return element.getProjectionAnimationProgress()[axis].stop();
  6458. });
  6459. },
  6460. /**
  6461. * Measure the current viewport box with or without transforms.
  6462. * Only measures axis-aligned boxes, rotate and skew must be manually
  6463. * removed with a re-render to work.
  6464. */
  6465. measureViewportBox: function (withTransform) {
  6466. if (withTransform === void 0) { withTransform = true; }
  6467. var viewportBox = measureViewportBox(instance, options);
  6468. if (!withTransform)
  6469. (0,_utils_geometry_delta_apply_js__WEBPACK_IMPORTED_MODULE_4__.removeBoxTransforms)(viewportBox, latestValues);
  6470. return viewportBox;
  6471. },
  6472. /**
  6473. * Update the layoutState by measuring the DOM layout. This
  6474. * should be called after resetting any layout-affecting transforms.
  6475. */
  6476. updateLayoutMeasurement: function () {
  6477. element.notifyBeforeLayoutMeasure(layoutState.layout);
  6478. layoutState.isHydrated = true;
  6479. layoutState.layout = element.measureViewportBox();
  6480. layoutState.layoutCorrected = (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_13__.copyAxisBox)(layoutState.layout);
  6481. element.notifyLayoutMeasure(layoutState.layout, element.prevViewportBox || layoutState.layout);
  6482. framesync__WEBPACK_IMPORTED_MODULE_0__["default"].update(function () { return element.rebaseProjectionTarget(); });
  6483. },
  6484. /**
  6485. * Get the motion values tracking the layout animations on each
  6486. * axis. Lazy init if not already created.
  6487. */
  6488. getProjectionAnimationProgress: function () {
  6489. projectionTargetProgress || (projectionTargetProgress = {
  6490. x: (0,_value_index_js__WEBPACK_IMPORTED_MODULE_10__.motionValue)(0),
  6491. y: (0,_value_index_js__WEBPACK_IMPORTED_MODULE_10__.motionValue)(0),
  6492. });
  6493. return projectionTargetProgress;
  6494. },
  6495. /**
  6496. * Update the projection of a single axis. Schedule an update to
  6497. * the tree layout projection.
  6498. */
  6499. setProjectionTargetAxis: function (axis, min, max) {
  6500. var target = projection.target[axis];
  6501. target.min = min;
  6502. target.max = max;
  6503. // Flag that we want to fire the onViewportBoxUpdate event handler
  6504. hasViewportBoxUpdated = true;
  6505. lifecycles.notifySetAxisTarget();
  6506. },
  6507. /**
  6508. * Rebase the projection target on top of the provided viewport box
  6509. * or the measured layout. This ensures that non-animating elements
  6510. * don't fall out of sync differences in measurements vs projections
  6511. * after a page scroll or other relayout.
  6512. */
  6513. rebaseProjectionTarget: function (force, box) {
  6514. if (box === void 0) { box = layoutState.layout; }
  6515. var _a = element.getProjectionAnimationProgress(), x = _a.x, y = _a.y;
  6516. var shouldRebase = !projection.isTargetLocked &&
  6517. !x.isAnimating() &&
  6518. !y.isAnimating();
  6519. if (force || shouldRebase) {
  6520. (0,_utils_each_axis_js__WEBPACK_IMPORTED_MODULE_12__.eachAxis)(function (axis) {
  6521. var _a = box[axis], min = _a.min, max = _a.max;
  6522. element.setProjectionTargetAxis(axis, min, max);
  6523. });
  6524. }
  6525. },
  6526. /**
  6527. * Notify the visual element that its layout is up-to-date.
  6528. * Currently Animate.tsx uses this to check whether a layout animation
  6529. * needs to be performed.
  6530. */
  6531. notifyLayoutReady: function (config) {
  6532. element.notifyLayoutUpdate(layoutState.layout, element.prevViewportBox || layoutState.layout, config);
  6533. },
  6534. /**
  6535. * Temporarily reset the transform of the instance.
  6536. */
  6537. resetTransform: function () { return resetTransform(element, instance, props); },
  6538. /**
  6539. * Perform the callback after temporarily unapplying the transform
  6540. * upwards through the tree.
  6541. */
  6542. withoutTransform: function (callback) {
  6543. var isEnabled = projection.isEnabled;
  6544. isEnabled && element.resetTransform();
  6545. parent ? parent.withoutTransform(callback) : callback();
  6546. isEnabled && restoreTransform(instance, renderState);
  6547. },
  6548. updateLayoutProjection: function () {
  6549. isProjecting() && updateLayoutProjection();
  6550. children.forEach(fireUpdateLayoutProjection);
  6551. },
  6552. /**
  6553. *
  6554. */
  6555. pointTo: function (newLead) {
  6556. leadProjection = newLead.projection;
  6557. leadLatestValues = newLead.getLatestValues();
  6558. /**
  6559. * Subscribe to lead component's layout animations
  6560. */
  6561. unsubscribeFromLeadVisualElement === null || unsubscribeFromLeadVisualElement === void 0 ? void 0 : unsubscribeFromLeadVisualElement();
  6562. unsubscribeFromLeadVisualElement = (0,popmotion__WEBPACK_IMPORTED_MODULE_14__.pipe)(newLead.onSetAxisTarget(element.scheduleUpdateLayoutProjection), newLead.onLayoutAnimationComplete(function () {
  6563. var _a;
  6564. if (element.isPresent) {
  6565. element.presence = _components_AnimateSharedLayout_types_js__WEBPACK_IMPORTED_MODULE_15__.Presence.Present;
  6566. }
  6567. else {
  6568. (_a = element.layoutSafeToRemove) === null || _a === void 0 ? void 0 : _a.call(element);
  6569. }
  6570. }));
  6571. },
  6572. // TODO: Clean this up
  6573. isPresent: true, presence: _components_AnimateSharedLayout_types_js__WEBPACK_IMPORTED_MODULE_15__.Presence.Entering });
  6574. return element;
  6575. };
  6576. };
  6577. function fireUpdateLayoutProjection(child) {
  6578. child.updateLayoutProjection();
  6579. }
  6580. var variantProps = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__spread)(["initial"], _utils_animation_state_js__WEBPACK_IMPORTED_MODULE_16__.variantPriorityOrder);
  6581. var numVariantProps = variantProps.length;
  6582. /***/ }),
  6583. /***/ "./node_modules/framer-motion/dist/es/render/svg/config-motion.js":
  6584. /*!************************************************************************!*\
  6585. !*** ./node_modules/framer-motion/dist/es/render/svg/config-motion.js ***!
  6586. \************************************************************************/
  6587. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6588. __webpack_require__.r(__webpack_exports__);
  6589. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6590. /* harmony export */ "svgMotionConfig": () => (/* binding */ svgMotionConfig)
  6591. /* harmony export */ });
  6592. /* harmony import */ var _utils_build_attrs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/build-attrs.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js");
  6593. /* harmony import */ var _utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/create-render-state.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js");
  6594. /* harmony import */ var _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/scrape-motion-values.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js");
  6595. /* harmony import */ var _visual_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./visual-element.js */ "./node_modules/framer-motion/dist/es/render/svg/visual-element.js");
  6596. /* harmony import */ var _motion_utils_use_visual_state_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../motion/utils/use-visual-state.js */ "./node_modules/framer-motion/dist/es/motion/utils/use-visual-state.js");
  6597. var svgMotionConfig = {
  6598. createVisualElement: function (_, options) {
  6599. return (0,_visual_element_js__WEBPACK_IMPORTED_MODULE_0__.svgVisualElement)(options, { enableHardwareAcceleration: false });
  6600. },
  6601. useVisualState: (0,_motion_utils_use_visual_state_js__WEBPACK_IMPORTED_MODULE_1__.makeUseVisualState)({
  6602. scrapeMotionValuesFromProps: _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_2__.scrapeMotionValuesFromProps,
  6603. createRenderState: _utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_3__.createSvgRenderState,
  6604. onMount: function (props, instance, _a) {
  6605. var renderState = _a.renderState, latestValues = _a.latestValues;
  6606. try {
  6607. renderState.dimensions =
  6608. typeof instance.getBBox ===
  6609. "function"
  6610. ? instance.getBBox()
  6611. : instance.getBoundingClientRect();
  6612. }
  6613. catch (e) {
  6614. // Most likely trying to measure an unrendered element under Firefox
  6615. renderState.dimensions = {
  6616. x: 0,
  6617. y: 0,
  6618. width: 0,
  6619. height: 0,
  6620. };
  6621. }
  6622. if (isPath(instance)) {
  6623. renderState.totalPathLength = instance.getTotalLength();
  6624. }
  6625. (0,_utils_build_attrs_js__WEBPACK_IMPORTED_MODULE_4__.buildSVGAttrs)(renderState, latestValues, undefined, undefined, { enableHardwareAcceleration: false }, props.transformTemplate);
  6626. (0,_visual_element_js__WEBPACK_IMPORTED_MODULE_0__.renderSVG)(instance, renderState);
  6627. },
  6628. }),
  6629. };
  6630. function isPath(element) {
  6631. return element.tagName === "path";
  6632. }
  6633. /***/ }),
  6634. /***/ "./node_modules/framer-motion/dist/es/render/svg/supported-elements.js":
  6635. /*!*****************************************************************************!*\
  6636. !*** ./node_modules/framer-motion/dist/es/render/svg/supported-elements.js ***!
  6637. \*****************************************************************************/
  6638. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6639. __webpack_require__.r(__webpack_exports__);
  6640. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6641. /* harmony export */ "lowercaseSVGElements": () => (/* binding */ lowercaseSVGElements)
  6642. /* harmony export */ });
  6643. /**
  6644. * We keep these listed seperately as we use the lowercase tag names as part
  6645. * of the runtime bundle to detect SVG components
  6646. */
  6647. var lowercaseSVGElements = [
  6648. "animate",
  6649. "circle",
  6650. "defs",
  6651. "desc",
  6652. "ellipse",
  6653. "g",
  6654. "image",
  6655. "line",
  6656. "filter",
  6657. "marker",
  6658. "mask",
  6659. "metadata",
  6660. "path",
  6661. "pattern",
  6662. "polygon",
  6663. "polyline",
  6664. "rect",
  6665. "stop",
  6666. "svg",
  6667. "switch",
  6668. "symbol",
  6669. "text",
  6670. "tspan",
  6671. "use",
  6672. "view",
  6673. ];
  6674. /***/ }),
  6675. /***/ "./node_modules/framer-motion/dist/es/render/svg/use-props.js":
  6676. /*!********************************************************************!*\
  6677. !*** ./node_modules/framer-motion/dist/es/render/svg/use-props.js ***!
  6678. \********************************************************************/
  6679. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6680. __webpack_require__.r(__webpack_exports__);
  6681. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6682. /* harmony export */ "useSVGProps": () => (/* binding */ useSVGProps)
  6683. /* harmony export */ });
  6684. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  6685. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  6686. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  6687. /* harmony import */ var _html_use_props_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../html/use-props.js */ "./node_modules/framer-motion/dist/es/render/html/use-props.js");
  6688. /* harmony import */ var _utils_build_attrs_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/build-attrs.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js");
  6689. /* harmony import */ var _utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/create-render-state.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js");
  6690. function useSVGProps(props, visualState) {
  6691. var visualProps = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
  6692. var state = (0,_utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_1__.createSvgRenderState)();
  6693. (0,_utils_build_attrs_js__WEBPACK_IMPORTED_MODULE_2__.buildSVGAttrs)(state, visualState, undefined, undefined, { enableHardwareAcceleration: false }, props.transformTemplate);
  6694. return (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, state.attrs), { style: (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, state.style) });
  6695. }, [visualState]);
  6696. if (props.style) {
  6697. var rawStyles = {};
  6698. (0,_html_use_props_js__WEBPACK_IMPORTED_MODULE_4__.copyRawValuesOnly)(rawStyles, props.style, props);
  6699. visualProps.style = (0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_3__.__assign)({}, rawStyles), visualProps.style);
  6700. }
  6701. return visualProps;
  6702. }
  6703. /***/ }),
  6704. /***/ "./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js":
  6705. /*!****************************************************************************!*\
  6706. !*** ./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js ***!
  6707. \****************************************************************************/
  6708. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6709. __webpack_require__.r(__webpack_exports__);
  6710. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6711. /* harmony export */ "buildSVGAttrs": () => (/* binding */ buildSVGAttrs)
  6712. /* harmony export */ });
  6713. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  6714. /* harmony import */ var _html_utils_build_styles_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../html/utils/build-styles.js */ "./node_modules/framer-motion/dist/es/render/html/utils/build-styles.js");
  6715. /* harmony import */ var _transform_origin_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./transform-origin.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js");
  6716. /* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./path.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/path.js");
  6717. /**
  6718. * Build SVG visual attrbutes, like cx and style.transform
  6719. */
  6720. function buildSVGAttrs(state, _a, projection, layoutState, options, transformTemplate) {
  6721. var attrX = _a.attrX, attrY = _a.attrY, originX = _a.originX, originY = _a.originY, pathLength = _a.pathLength, _b = _a.pathSpacing, pathSpacing = _b === void 0 ? 1 : _b, _c = _a.pathOffset, pathOffset = _c === void 0 ? 0 : _c,
  6722. // This is object creation, which we try to avoid per-frame.
  6723. latest = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__rest)(_a, ["attrX", "attrY", "originX", "originY", "pathLength", "pathSpacing", "pathOffset"]);
  6724. (0,_html_utils_build_styles_js__WEBPACK_IMPORTED_MODULE_1__.buildHTMLStyles)(state, latest, projection, layoutState, options, transformTemplate);
  6725. state.attrs = state.style;
  6726. state.style = {};
  6727. var attrs = state.attrs, style = state.style, dimensions = state.dimensions, totalPathLength = state.totalPathLength;
  6728. /**
  6729. * However, we apply transforms as CSS transforms. So if we detect a transform we take it from attrs
  6730. * and copy it into style.
  6731. */
  6732. if (attrs.transform) {
  6733. if (dimensions)
  6734. style.transform = attrs.transform;
  6735. delete attrs.transform;
  6736. }
  6737. // Parse transformOrigin
  6738. if (dimensions &&
  6739. (originX !== undefined || originY !== undefined || style.transform)) {
  6740. style.transformOrigin = (0,_transform_origin_js__WEBPACK_IMPORTED_MODULE_2__.calcSVGTransformOrigin)(dimensions, originX !== undefined ? originX : 0.5, originY !== undefined ? originY : 0.5);
  6741. }
  6742. // Treat x/y not as shortcuts but as actual attributes
  6743. if (attrX !== undefined)
  6744. attrs.x = attrX;
  6745. if (attrY !== undefined)
  6746. attrs.y = attrY;
  6747. // Build SVG path if one has been measured
  6748. if (totalPathLength !== undefined && pathLength !== undefined) {
  6749. (0,_path_js__WEBPACK_IMPORTED_MODULE_3__.buildSVGPath)(attrs, totalPathLength, pathLength, pathSpacing, pathOffset, false);
  6750. }
  6751. }
  6752. /***/ }),
  6753. /***/ "./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js":
  6754. /*!*********************************************************************************!*\
  6755. !*** ./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js ***!
  6756. \*********************************************************************************/
  6757. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6758. __webpack_require__.r(__webpack_exports__);
  6759. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6760. /* harmony export */ "camelCaseAttributes": () => (/* binding */ camelCaseAttributes)
  6761. /* harmony export */ });
  6762. /**
  6763. * A set of attribute names that are always read/written as camel case.
  6764. */
  6765. var camelCaseAttributes = new Set([
  6766. "baseFrequency",
  6767. "diffuseConstant",
  6768. "kernelMatrix",
  6769. "kernelUnitLength",
  6770. "keySplines",
  6771. "keyTimes",
  6772. "limitingConeAngle",
  6773. "markerHeight",
  6774. "markerWidth",
  6775. "numOctaves",
  6776. "targetX",
  6777. "targetY",
  6778. "surfaceScale",
  6779. "specularConstant",
  6780. "specularExponent",
  6781. "stdDeviation",
  6782. "tableValues",
  6783. "viewBox",
  6784. ]);
  6785. /***/ }),
  6786. /***/ "./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js":
  6787. /*!************************************************************************************!*\
  6788. !*** ./node_modules/framer-motion/dist/es/render/svg/utils/create-render-state.js ***!
  6789. \************************************************************************************/
  6790. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6791. __webpack_require__.r(__webpack_exports__);
  6792. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6793. /* harmony export */ "createSvgRenderState": () => (/* binding */ createSvgRenderState)
  6794. /* harmony export */ });
  6795. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  6796. /* harmony import */ var _html_utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../html/utils/create-render-state.js */ "./node_modules/framer-motion/dist/es/render/html/utils/create-render-state.js");
  6797. var createSvgRenderState = function () { return ((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, (0,_html_utils_create_render_state_js__WEBPACK_IMPORTED_MODULE_1__.createHtmlRenderState)()), { attrs: {} })); };
  6798. /***/ }),
  6799. /***/ "./node_modules/framer-motion/dist/es/render/svg/utils/path.js":
  6800. /*!*********************************************************************!*\
  6801. !*** ./node_modules/framer-motion/dist/es/render/svg/utils/path.js ***!
  6802. \*********************************************************************/
  6803. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6804. __webpack_require__.r(__webpack_exports__);
  6805. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6806. /* harmony export */ "buildSVGPath": () => (/* binding */ buildSVGPath)
  6807. /* harmony export */ });
  6808. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/numbers/units.js");
  6809. // Convert a progress 0-1 to a pixels value based on the provided length
  6810. var progressToPixels = function (progress, length) {
  6811. return style_value_types__WEBPACK_IMPORTED_MODULE_0__.px.transform(progress * length);
  6812. };
  6813. var dashKeys = {
  6814. offset: "stroke-dashoffset",
  6815. array: "stroke-dasharray",
  6816. };
  6817. var camelKeys = {
  6818. offset: "strokeDashoffset",
  6819. array: "strokeDasharray",
  6820. };
  6821. /**
  6822. * Build SVG path properties. Uses the path's measured length to convert
  6823. * our custom pathLength, pathSpacing and pathOffset into stroke-dashoffset
  6824. * and stroke-dasharray attributes.
  6825. *
  6826. * This function is mutative to reduce per-frame GC.
  6827. */
  6828. function buildSVGPath(attrs, totalLength, length, spacing, offset, useDashCase) {
  6829. if (spacing === void 0) { spacing = 1; }
  6830. if (offset === void 0) { offset = 0; }
  6831. if (useDashCase === void 0) { useDashCase = true; }
  6832. // We use dash case when setting attributes directly to the DOM node and camel case
  6833. // when defining props on a React component.
  6834. var keys = useDashCase ? dashKeys : camelKeys;
  6835. // Build the dash offset
  6836. attrs[keys.offset] = progressToPixels(-offset, totalLength);
  6837. // Build the dash array
  6838. var pathLength = progressToPixels(length, totalLength);
  6839. var pathSpacing = progressToPixels(spacing, totalLength);
  6840. attrs[keys.array] = pathLength + " " + pathSpacing;
  6841. }
  6842. /***/ }),
  6843. /***/ "./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js":
  6844. /*!*************************************************************************************!*\
  6845. !*** ./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js ***!
  6846. \*************************************************************************************/
  6847. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6848. __webpack_require__.r(__webpack_exports__);
  6849. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6850. /* harmony export */ "scrapeMotionValuesFromProps": () => (/* binding */ scrapeMotionValuesFromProps)
  6851. /* harmony export */ });
  6852. /* harmony import */ var _value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../value/utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  6853. /* harmony import */ var _html_utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../html/utils/scrape-motion-values.js */ "./node_modules/framer-motion/dist/es/render/html/utils/scrape-motion-values.js");
  6854. function scrapeMotionValuesFromProps(props) {
  6855. var newValues = (0,_html_utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_0__.scrapeMotionValuesFromProps)(props);
  6856. for (var key in props) {
  6857. if ((0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.isMotionValue)(props[key])) {
  6858. var targetKey = key === "x" || key === "y" ? "attr" + key.toUpperCase() : key;
  6859. newValues[targetKey] = props[key];
  6860. }
  6861. }
  6862. return newValues;
  6863. }
  6864. /***/ }),
  6865. /***/ "./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js":
  6866. /*!*********************************************************************************!*\
  6867. !*** ./node_modules/framer-motion/dist/es/render/svg/utils/transform-origin.js ***!
  6868. \*********************************************************************************/
  6869. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6870. __webpack_require__.r(__webpack_exports__);
  6871. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6872. /* harmony export */ "calcSVGTransformOrigin": () => (/* binding */ calcSVGTransformOrigin)
  6873. /* harmony export */ });
  6874. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/numbers/units.js");
  6875. function calcOrigin(origin, offset, size) {
  6876. return typeof origin === "string"
  6877. ? origin
  6878. : style_value_types__WEBPACK_IMPORTED_MODULE_0__.px.transform(offset + size * origin);
  6879. }
  6880. /**
  6881. * The SVG transform origin defaults are different to CSS and is less intuitive,
  6882. * so we use the measured dimensions of the SVG to reconcile these.
  6883. */
  6884. function calcSVGTransformOrigin(dimensions, originX, originY) {
  6885. var pxOriginX = calcOrigin(originX, dimensions.x, dimensions.width);
  6886. var pxOriginY = calcOrigin(originY, dimensions.y, dimensions.height);
  6887. return pxOriginX + " " + pxOriginY;
  6888. }
  6889. /***/ }),
  6890. /***/ "./node_modules/framer-motion/dist/es/render/svg/visual-element.js":
  6891. /*!*************************************************************************!*\
  6892. !*** ./node_modules/framer-motion/dist/es/render/svg/visual-element.js ***!
  6893. \*************************************************************************/
  6894. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6895. __webpack_require__.r(__webpack_exports__);
  6896. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6897. /* harmony export */ "renderSVG": () => (/* binding */ renderSVG),
  6898. /* harmony export */ "svgVisualElement": () => (/* binding */ svgVisualElement)
  6899. /* harmony export */ });
  6900. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  6901. /* harmony import */ var _dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../dom/utils/value-types.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js");
  6902. /* harmony import */ var _html_utils_transform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../html/utils/transform.js */ "./node_modules/framer-motion/dist/es/render/html/utils/transform.js");
  6903. /* harmony import */ var _utils_build_attrs_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./utils/build-attrs.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/build-attrs.js");
  6904. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../index.js */ "./node_modules/framer-motion/dist/es/render/index.js");
  6905. /* harmony import */ var _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./utils/scrape-motion-values.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/scrape-motion-values.js");
  6906. /* harmony import */ var _html_visual_element_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../html/visual-element.js */ "./node_modules/framer-motion/dist/es/render/html/visual-element.js");
  6907. /* harmony import */ var _dom_utils_camel_to_dash_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../dom/utils/camel-to-dash.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/camel-to-dash.js");
  6908. /* harmony import */ var _utils_camel_case_attrs_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/camel-case-attrs.js */ "./node_modules/framer-motion/dist/es/render/svg/utils/camel-case-attrs.js");
  6909. function renderSVG(element, renderState) {
  6910. _html_visual_element_js__WEBPACK_IMPORTED_MODULE_0__.htmlConfig.render(element, renderState);
  6911. for (var key in renderState.attrs) {
  6912. element.setAttribute(!_utils_camel_case_attrs_js__WEBPACK_IMPORTED_MODULE_1__.camelCaseAttributes.has(key) ? (0,_dom_utils_camel_to_dash_js__WEBPACK_IMPORTED_MODULE_2__.camelToDash)(key) : key, renderState.attrs[key]);
  6913. }
  6914. }
  6915. var svgVisualElement = (0,_index_js__WEBPACK_IMPORTED_MODULE_3__.visualElement)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({}, _html_visual_element_js__WEBPACK_IMPORTED_MODULE_0__.htmlConfig), { getBaseTarget: function (props, key) {
  6916. return props[key];
  6917. },
  6918. readValueFromInstance: function (domElement, key) {
  6919. var _a;
  6920. if ((0,_html_utils_transform_js__WEBPACK_IMPORTED_MODULE_5__.isTransformProp)(key)) {
  6921. return ((_a = (0,_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_6__.getDefaultValueType)(key)) === null || _a === void 0 ? void 0 : _a.default) || 0;
  6922. }
  6923. key = !_utils_camel_case_attrs_js__WEBPACK_IMPORTED_MODULE_1__.camelCaseAttributes.has(key) ? (0,_dom_utils_camel_to_dash_js__WEBPACK_IMPORTED_MODULE_2__.camelToDash)(key) : key;
  6924. return domElement.getAttribute(key);
  6925. },
  6926. scrapeMotionValuesFromProps: _utils_scrape_motion_values_js__WEBPACK_IMPORTED_MODULE_7__.scrapeMotionValuesFromProps,
  6927. build: function (_element, renderState, latestValues, projection, layoutState, options, props) {
  6928. (0,_utils_build_attrs_js__WEBPACK_IMPORTED_MODULE_8__.buildSVGAttrs)(renderState, latestValues, projection, layoutState, options, props.transformTemplate);
  6929. }, render: renderSVG }));
  6930. /***/ }),
  6931. /***/ "./node_modules/framer-motion/dist/es/render/utils/animation-state.js":
  6932. /*!****************************************************************************!*\
  6933. !*** ./node_modules/framer-motion/dist/es/render/utils/animation-state.js ***!
  6934. \****************************************************************************/
  6935. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  6936. __webpack_require__.r(__webpack_exports__);
  6937. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  6938. /* harmony export */ "createAnimationState": () => (/* binding */ createAnimationState),
  6939. /* harmony export */ "variantPriorityOrder": () => (/* binding */ variantPriorityOrder),
  6940. /* harmony export */ "variantsHaveChanged": () => (/* binding */ variantsHaveChanged)
  6941. /* harmony export */ });
  6942. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  6943. /* harmony import */ var _variants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./variants.js */ "./node_modules/framer-motion/dist/es/render/utils/variants.js");
  6944. /* harmony import */ var _animation_utils_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../animation/utils/is-keyframes-target.js */ "./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js");
  6945. /* harmony import */ var _types_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./types.js */ "./node_modules/framer-motion/dist/es/render/utils/types.js");
  6946. /* harmony import */ var _animation_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./animation.js */ "./node_modules/framer-motion/dist/es/render/utils/animation.js");
  6947. /* harmony import */ var _animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../animation/animation-controls.js */ "./node_modules/framer-motion/dist/es/animation/animation-controls.js");
  6948. /* harmony import */ var _utils_shallow_compare_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/shallow-compare.js */ "./node_modules/framer-motion/dist/es/utils/shallow-compare.js");
  6949. var variantPriorityOrder = [
  6950. _types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Animate,
  6951. _types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Hover,
  6952. _types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Tap,
  6953. _types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Drag,
  6954. _types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Focus,
  6955. _types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Exit,
  6956. ];
  6957. var reversePriorityOrder = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(variantPriorityOrder).reverse();
  6958. var numAnimationTypes = variantPriorityOrder.length;
  6959. function animateList(visualElement) {
  6960. return function (animations) {
  6961. return Promise.all(animations.map(function (_a) {
  6962. var animation = _a.animation, options = _a.options;
  6963. return (0,_animation_js__WEBPACK_IMPORTED_MODULE_2__.animateVisualElement)(visualElement, animation, options);
  6964. }));
  6965. };
  6966. }
  6967. function createAnimationState(visualElement) {
  6968. var animate = animateList(visualElement);
  6969. var state = createState();
  6970. var allAnimatedKeys = {};
  6971. var isInitialRender = true;
  6972. /**
  6973. * This function will be used to reduce the animation definitions for
  6974. * each active animation type into an object of resolved values for it.
  6975. */
  6976. var buildResolvedTypeValues = function (acc, definition) {
  6977. var resolved = (0,_variants_js__WEBPACK_IMPORTED_MODULE_3__.resolveVariant)(visualElement, definition);
  6978. if (resolved) {
  6979. var transition = resolved.transition, transitionEnd = resolved.transitionEnd, target = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(resolved, ["transition", "transitionEnd"]);
  6980. acc = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, acc), target), transitionEnd);
  6981. }
  6982. return acc;
  6983. };
  6984. function isAnimated(key) {
  6985. return allAnimatedKeys[key] !== undefined;
  6986. }
  6987. /**
  6988. * This just allows us to inject mocked animation functions
  6989. * @internal
  6990. */
  6991. function setAnimateFunction(makeAnimator) {
  6992. animate = makeAnimator(visualElement);
  6993. }
  6994. /**
  6995. * When we receive new props, we need to:
  6996. * 1. Create a list of protected keys for each type. This is a directory of
  6997. * value keys that are currently being "handled" by types of a higher priority
  6998. * so that whenever an animation is played of a given type, these values are
  6999. * protected from being animated.
  7000. * 2. Determine if an animation type needs animating.
  7001. * 3. Determine if any values have been removed from a type and figure out
  7002. * what to animate those to.
  7003. */
  7004. function animateChanges(options, changedActiveType) {
  7005. var props = visualElement.getProps();
  7006. var context = visualElement.getVariantContext(true) || {};
  7007. /**
  7008. * A list of animations that we'll build into as we iterate through the animation
  7009. * types. This will get executed at the end of the function.
  7010. */
  7011. var animations = [];
  7012. /**
  7013. * Keep track of which values have been removed. Then, as we hit lower priority
  7014. * animation types, we can check if they contain removed values and animate to that.
  7015. */
  7016. var removedKeys = new Set();
  7017. /**
  7018. * A dictionary of all encountered keys. This is an object to let us build into and
  7019. * copy it without iteration. Each time we hit an animation type we set its protected
  7020. * keys - the keys its not allowed to animate - to the latest version of this object.
  7021. */
  7022. var encounteredKeys = {};
  7023. /**
  7024. * If a variant has been removed at a given index, and this component is controlling
  7025. * variant animations, we want to ensure lower-priority variants are forced to animate.
  7026. */
  7027. var removedVariantIndex = Infinity;
  7028. var _loop_1 = function (i) {
  7029. var type = reversePriorityOrder[i];
  7030. var typeState = state[type];
  7031. var prop = (_a = props[type]) !== null && _a !== void 0 ? _a : context[type];
  7032. var propIsVariant = (0,_variants_js__WEBPACK_IMPORTED_MODULE_3__.isVariantLabel)(prop);
  7033. /**
  7034. * If this type has *just* changed isActive status, set activeDelta
  7035. * to that status. Otherwise set to null.
  7036. */
  7037. var activeDelta = type === changedActiveType ? typeState.isActive : null;
  7038. if (activeDelta === false)
  7039. removedVariantIndex = i;
  7040. /**
  7041. * If this prop is an inherited variant, rather than been set directly on the
  7042. * component itself, we want to make sure we allow the parent to trigger animations.
  7043. *
  7044. * TODO: Can probably change this to a !isControllingVariants check
  7045. */
  7046. var isInherited = prop === context[type] && prop !== props[type] && propIsVariant;
  7047. /**
  7048. *
  7049. */
  7050. if (isInherited &&
  7051. isInitialRender &&
  7052. visualElement.manuallyAnimateOnMount) {
  7053. isInherited = false;
  7054. }
  7055. /**
  7056. * Set all encountered keys so far as the protected keys for this type. This will
  7057. * be any key that has been animated or otherwise handled by active, higher-priortiy types.
  7058. */
  7059. typeState.protectedKeys = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, encounteredKeys);
  7060. // Check if we can skip analysing this prop early
  7061. if (
  7062. // If it isn't active and hasn't *just* been set as inactive
  7063. (!typeState.isActive && activeDelta === null) ||
  7064. // If we didn't and don't have any defined prop for this animation type
  7065. (!prop && !typeState.prevProp) ||
  7066. // Or if the prop doesn't define an animation
  7067. (0,_animation_animation_controls_js__WEBPACK_IMPORTED_MODULE_4__.isAnimationControls)(prop) ||
  7068. typeof prop === "boolean") {
  7069. return "continue";
  7070. }
  7071. /**
  7072. * As we go look through the values defined on this type, if we detect
  7073. * a changed value or a value that was removed in a higher priority, we set
  7074. * this to true and add this prop to the animation list.
  7075. */
  7076. var shouldAnimateType = variantsHaveChanged(typeState.prevProp, prop) ||
  7077. // If we're making this variant active, we want to always make it active
  7078. (type === changedActiveType &&
  7079. typeState.isActive &&
  7080. !isInherited &&
  7081. propIsVariant) ||
  7082. // If we removed a higher-priority variant (i is in reverse order)
  7083. (i > removedVariantIndex && propIsVariant);
  7084. /**
  7085. * As animations can be set as variant lists, variants or target objects, we
  7086. * coerce everything to an array if it isn't one already
  7087. */
  7088. var definitionList = Array.isArray(prop) ? prop : [prop];
  7089. /**
  7090. * Build an object of all the resolved values. We'll use this in the subsequent
  7091. * animateChanges calls to determine whether a value has changed.
  7092. */
  7093. var resolvedValues = definitionList.reduce(buildResolvedTypeValues, {});
  7094. if (activeDelta === false)
  7095. resolvedValues = {};
  7096. /**
  7097. * Now we need to loop through all the keys in the prev prop and this prop,
  7098. * and decide:
  7099. * 1. If the value has changed, and needs animating
  7100. * 2. If it has been removed, and needs adding to the removedKeys set
  7101. * 3. If it has been removed in a higher priority type and needs animating
  7102. * 4. If it hasn't been removed in a higher priority but hasn't changed, and
  7103. * needs adding to the type's protectedKeys list.
  7104. */
  7105. var _a = typeState.prevResolvedValues, prevResolvedValues = _a === void 0 ? {} : _a;
  7106. var allKeys = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, prevResolvedValues), resolvedValues);
  7107. var markToAnimate = function (key) {
  7108. shouldAnimateType = true;
  7109. removedKeys.delete(key);
  7110. typeState.needsAnimating[key] = true;
  7111. };
  7112. for (var key in allKeys) {
  7113. var next = resolvedValues[key];
  7114. var prev = prevResolvedValues[key];
  7115. // If we've already handled this we can just skip ahead
  7116. if (encounteredKeys.hasOwnProperty(key))
  7117. continue;
  7118. /**
  7119. * If the value has changed, we probably want to animate it.
  7120. */
  7121. if (next !== prev) {
  7122. /**
  7123. * If both values are keyframes, we need to shallow compare them to
  7124. * detect whether any value has changed. If it has, we animate it.
  7125. */
  7126. if ((0,_animation_utils_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_5__.isKeyframesTarget)(next) && (0,_animation_utils_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_5__.isKeyframesTarget)(prev)) {
  7127. if (!(0,_utils_shallow_compare_js__WEBPACK_IMPORTED_MODULE_6__.shallowCompare)(next, prev)) {
  7128. markToAnimate(key);
  7129. }
  7130. else {
  7131. /**
  7132. * If it hasn't changed, we want to ensure it doesn't animate by
  7133. * adding it to the list of protected keys.
  7134. */
  7135. typeState.protectedKeys[key] = true;
  7136. }
  7137. }
  7138. else if (next !== undefined) {
  7139. // If next is defined and doesn't equal prev, it needs animating
  7140. markToAnimate(key);
  7141. }
  7142. else {
  7143. // If it's undefined, it's been removed.
  7144. removedKeys.add(key);
  7145. }
  7146. }
  7147. else if (next !== undefined && removedKeys.has(key)) {
  7148. /**
  7149. * If next hasn't changed and it isn't undefined, we want to check if it's
  7150. * been removed by a higher priority
  7151. */
  7152. markToAnimate(key);
  7153. }
  7154. else {
  7155. /**
  7156. * If it hasn't changed, we add it to the list of protected values
  7157. * to ensure it doesn't get animated.
  7158. */
  7159. typeState.protectedKeys[key] = true;
  7160. }
  7161. }
  7162. /**
  7163. * Update the typeState so next time animateChanges is called we can compare the
  7164. * latest prop and resolvedValues to these.
  7165. */
  7166. typeState.prevProp = prop;
  7167. typeState.prevResolvedValues = resolvedValues;
  7168. /**
  7169. *
  7170. */
  7171. if (typeState.isActive) {
  7172. encounteredKeys = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, encounteredKeys), resolvedValues);
  7173. }
  7174. if (isInitialRender && visualElement.blockInitialAnimation) {
  7175. shouldAnimateType = false;
  7176. }
  7177. /**
  7178. * If this is an inherited prop we want to hard-block animations
  7179. * TODO: Test as this should probably still handle animations triggered
  7180. * by removed values?
  7181. */
  7182. if (shouldAnimateType && !isInherited) {
  7183. animations.push.apply(animations, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(definitionList.map(function (animation) { return ({
  7184. animation: animation,
  7185. options: (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ type: type }, options),
  7186. }); })));
  7187. }
  7188. };
  7189. /**
  7190. * Iterate through all animation types in reverse priority order. For each, we want to
  7191. * detect which values it's handling and whether or not they've changed (and therefore
  7192. * need to be animated). If any values have been removed, we want to detect those in
  7193. * lower priority props and flag for animation.
  7194. */
  7195. for (var i = 0; i < numAnimationTypes; i++) {
  7196. _loop_1(i);
  7197. }
  7198. allAnimatedKeys = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, encounteredKeys);
  7199. /**
  7200. * If there are some removed value that haven't been dealt with,
  7201. * we need to create a new animation that falls back either to the value
  7202. * defined in the style prop, or the last read value.
  7203. */
  7204. if (removedKeys.size) {
  7205. var fallbackAnimation_1 = {};
  7206. removedKeys.forEach(function (key) {
  7207. var fallbackTarget = visualElement.getBaseTarget(key);
  7208. if (fallbackTarget !== undefined) {
  7209. fallbackAnimation_1[key] = fallbackTarget;
  7210. }
  7211. });
  7212. animations.push({ animation: fallbackAnimation_1 });
  7213. }
  7214. var shouldAnimate = Boolean(animations.length);
  7215. if (isInitialRender &&
  7216. props.initial === false &&
  7217. !visualElement.manuallyAnimateOnMount) {
  7218. shouldAnimate = false;
  7219. }
  7220. isInitialRender = false;
  7221. return shouldAnimate ? animate(animations) : Promise.resolve();
  7222. }
  7223. /**
  7224. * Change whether a certain animation type is active.
  7225. */
  7226. function setActive(type, isActive, options) {
  7227. var _a;
  7228. // If the active state hasn't changed, we can safely do nothing here
  7229. if (state[type].isActive === isActive)
  7230. return Promise.resolve();
  7231. // Propagate active change to children
  7232. (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) { var _a; return (_a = child.animationState) === null || _a === void 0 ? void 0 : _a.setActive(type, isActive); });
  7233. state[type].isActive = isActive;
  7234. return animateChanges(options, type);
  7235. }
  7236. return {
  7237. isAnimated: isAnimated,
  7238. animateChanges: animateChanges,
  7239. setActive: setActive,
  7240. setAnimateFunction: setAnimateFunction,
  7241. getState: function () { return state; },
  7242. };
  7243. }
  7244. function variantsHaveChanged(prev, next) {
  7245. if (typeof next === "string") {
  7246. return next !== prev;
  7247. }
  7248. else if ((0,_variants_js__WEBPACK_IMPORTED_MODULE_3__.isVariantLabels)(next)) {
  7249. return !(0,_utils_shallow_compare_js__WEBPACK_IMPORTED_MODULE_6__.shallowCompare)(next, prev);
  7250. }
  7251. return false;
  7252. }
  7253. function createTypeState(isActive) {
  7254. if (isActive === void 0) { isActive = false; }
  7255. return {
  7256. isActive: isActive,
  7257. protectedKeys: {},
  7258. needsAnimating: {},
  7259. prevResolvedValues: {},
  7260. };
  7261. }
  7262. function createState() {
  7263. var _a;
  7264. return _a = {},
  7265. _a[_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Animate] = createTypeState(true),
  7266. _a[_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Hover] = createTypeState(),
  7267. _a[_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Tap] = createTypeState(),
  7268. _a[_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Drag] = createTypeState(),
  7269. _a[_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Focus] = createTypeState(),
  7270. _a[_types_js__WEBPACK_IMPORTED_MODULE_0__.AnimationType.Exit] = createTypeState(),
  7271. _a;
  7272. }
  7273. /***/ }),
  7274. /***/ "./node_modules/framer-motion/dist/es/render/utils/animation.js":
  7275. /*!**********************************************************************!*\
  7276. !*** ./node_modules/framer-motion/dist/es/render/utils/animation.js ***!
  7277. \**********************************************************************/
  7278. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7279. __webpack_require__.r(__webpack_exports__);
  7280. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7281. /* harmony export */ "animateVisualElement": () => (/* binding */ animateVisualElement),
  7282. /* harmony export */ "sortByTreeOrder": () => (/* binding */ sortByTreeOrder),
  7283. /* harmony export */ "stopAnimation": () => (/* binding */ stopAnimation)
  7284. /* harmony export */ });
  7285. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  7286. /* harmony import */ var _variants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variants.js */ "./node_modules/framer-motion/dist/es/render/utils/variants.js");
  7287. /* harmony import */ var _animation_utils_transitions_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../animation/utils/transitions.js */ "./node_modules/framer-motion/dist/es/animation/utils/transitions.js");
  7288. /* harmony import */ var _setters_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./setters.js */ "./node_modules/framer-motion/dist/es/render/utils/setters.js");
  7289. /**
  7290. * @internal
  7291. */
  7292. function animateVisualElement(visualElement, definition, options) {
  7293. if (options === void 0) { options = {}; }
  7294. visualElement.notifyAnimationStart();
  7295. var animation;
  7296. if (Array.isArray(definition)) {
  7297. var animations = definition.map(function (variant) {
  7298. return animateVariant(visualElement, variant, options);
  7299. });
  7300. animation = Promise.all(animations);
  7301. }
  7302. else if (typeof definition === "string") {
  7303. animation = animateVariant(visualElement, definition, options);
  7304. }
  7305. else {
  7306. var resolvedDefinition = typeof definition === "function"
  7307. ? (0,_variants_js__WEBPACK_IMPORTED_MODULE_0__.resolveVariant)(visualElement, definition, options.custom)
  7308. : definition;
  7309. animation = animateTarget(visualElement, resolvedDefinition, options);
  7310. }
  7311. return animation.then(function () {
  7312. return visualElement.notifyAnimationComplete(definition);
  7313. });
  7314. }
  7315. function animateVariant(visualElement, variant, options) {
  7316. var _a;
  7317. if (options === void 0) { options = {}; }
  7318. var resolved = (0,_variants_js__WEBPACK_IMPORTED_MODULE_0__.resolveVariant)(visualElement, variant, options.custom);
  7319. var _b = (resolved || {}).transition, transition = _b === void 0 ? visualElement.getDefaultTransition() || {} : _b;
  7320. if (options.transitionOverride) {
  7321. transition = options.transitionOverride;
  7322. }
  7323. /**
  7324. * If we have a variant, create a callback that runs it as an animation.
  7325. * Otherwise, we resolve a Promise immediately for a composable no-op.
  7326. */
  7327. var getAnimation = resolved
  7328. ? function () { return animateTarget(visualElement, resolved, options); }
  7329. : function () { return Promise.resolve(); };
  7330. /**
  7331. * If we have children, create a callback that runs all their animations.
  7332. * Otherwise, we resolve a Promise immediately for a composable no-op.
  7333. */
  7334. var getChildAnimations = ((_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.size) ? function (forwardDelay) {
  7335. if (forwardDelay === void 0) { forwardDelay = 0; }
  7336. var _a = transition.delayChildren, delayChildren = _a === void 0 ? 0 : _a, staggerChildren = transition.staggerChildren, staggerDirection = transition.staggerDirection;
  7337. return animateChildren(visualElement, variant, delayChildren + forwardDelay, staggerChildren, staggerDirection, options);
  7338. }
  7339. : function () { return Promise.resolve(); };
  7340. /**
  7341. * If the transition explicitly defines a "when" option, we need to resolve either
  7342. * this animation or all children animations before playing the other.
  7343. */
  7344. var when = transition.when;
  7345. if (when) {
  7346. var _c = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)(when === "beforeChildren"
  7347. ? [getAnimation, getChildAnimations]
  7348. : [getChildAnimations, getAnimation], 2), first = _c[0], last = _c[1];
  7349. return first().then(last);
  7350. }
  7351. else {
  7352. return Promise.all([getAnimation(), getChildAnimations(options.delay)]);
  7353. }
  7354. }
  7355. /**
  7356. * @internal
  7357. */
  7358. function animateTarget(visualElement, definition, _a) {
  7359. var _b;
  7360. var _c = _a === void 0 ? {} : _a, _d = _c.delay, delay = _d === void 0 ? 0 : _d, transitionOverride = _c.transitionOverride, type = _c.type;
  7361. var _e = visualElement.makeTargetAnimatable(definition), _f = _e.transition, transition = _f === void 0 ? visualElement.getDefaultTransition() : _f, transitionEnd = _e.transitionEnd, target = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_e, ["transition", "transitionEnd"]);
  7362. if (transitionOverride)
  7363. transition = transitionOverride;
  7364. var animations = [];
  7365. var animationTypeState = type && ((_b = visualElement.animationState) === null || _b === void 0 ? void 0 : _b.getState()[type]);
  7366. for (var key in target) {
  7367. var value = visualElement.getValue(key);
  7368. var valueTarget = target[key];
  7369. if (!value ||
  7370. valueTarget === undefined ||
  7371. (animationTypeState &&
  7372. shouldBlockAnimation(animationTypeState, key))) {
  7373. continue;
  7374. }
  7375. var animation = (0,_animation_utils_transitions_js__WEBPACK_IMPORTED_MODULE_2__.startAnimation)(key, value, valueTarget, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ delay: delay }, transition));
  7376. animations.push(animation);
  7377. }
  7378. return Promise.all(animations).then(function () {
  7379. transitionEnd && (0,_setters_js__WEBPACK_IMPORTED_MODULE_3__.setTarget)(visualElement, transitionEnd);
  7380. });
  7381. }
  7382. function animateChildren(visualElement, variant, delayChildren, staggerChildren, staggerDirection, options) {
  7383. if (delayChildren === void 0) { delayChildren = 0; }
  7384. if (staggerChildren === void 0) { staggerChildren = 0; }
  7385. if (staggerDirection === void 0) { staggerDirection = 1; }
  7386. var animations = [];
  7387. var maxStaggerDuration = (visualElement.variantChildren.size - 1) * staggerChildren;
  7388. var generateStaggerDuration = staggerDirection === 1
  7389. ? function (i) {
  7390. if (i === void 0) { i = 0; }
  7391. return i * staggerChildren;
  7392. }
  7393. : function (i) {
  7394. if (i === void 0) { i = 0; }
  7395. return maxStaggerDuration - i * staggerChildren;
  7396. };
  7397. Array.from(visualElement.variantChildren)
  7398. .sort(sortByTreeOrder)
  7399. .forEach(function (child, i) {
  7400. animations.push(animateVariant(child, variant, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, options), { delay: delayChildren + generateStaggerDuration(i) })).then(function () { return child.notifyAnimationComplete(variant); }));
  7401. });
  7402. return Promise.all(animations);
  7403. }
  7404. function stopAnimation(visualElement) {
  7405. visualElement.forEachValue(function (value) { return value.stop(); });
  7406. }
  7407. function sortByTreeOrder(a, b) {
  7408. return a.sortNodePosition(b);
  7409. }
  7410. /**
  7411. * Decide whether we should block this animation. Previously, we achieved this
  7412. * just by checking whether the key was listed in protectedKeys, but this
  7413. * posed problems if an animation was triggered by afterChildren and protectedKeys
  7414. * had been set to true in the meantime.
  7415. */
  7416. function shouldBlockAnimation(_a, key) {
  7417. var protectedKeys = _a.protectedKeys, needsAnimating = _a.needsAnimating;
  7418. var shouldBlock = protectedKeys.hasOwnProperty(key) && needsAnimating[key] !== true;
  7419. needsAnimating[key] = false;
  7420. return shouldBlock;
  7421. }
  7422. /***/ }),
  7423. /***/ "./node_modules/framer-motion/dist/es/render/utils/lifecycles.js":
  7424. /*!***********************************************************************!*\
  7425. !*** ./node_modules/framer-motion/dist/es/render/utils/lifecycles.js ***!
  7426. \***********************************************************************/
  7427. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7428. __webpack_require__.r(__webpack_exports__);
  7429. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7430. /* harmony export */ "createLifecycles": () => (/* binding */ createLifecycles)
  7431. /* harmony export */ });
  7432. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  7433. /* harmony import */ var _utils_subscription_manager_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/subscription-manager.js */ "./node_modules/framer-motion/dist/es/utils/subscription-manager.js");
  7434. var names = [
  7435. "LayoutMeasure",
  7436. "BeforeLayoutMeasure",
  7437. "LayoutUpdate",
  7438. "ViewportBoxUpdate",
  7439. "Update",
  7440. "Render",
  7441. "AnimationComplete",
  7442. "LayoutAnimationComplete",
  7443. "AnimationStart",
  7444. "SetAxisTarget",
  7445. ];
  7446. function createLifecycles() {
  7447. var managers = names.map(function () { return new _utils_subscription_manager_js__WEBPACK_IMPORTED_MODULE_0__.SubscriptionManager(); });
  7448. var propSubscriptions = {};
  7449. var lifecycles = {
  7450. clearAllListeners: function () { return managers.forEach(function (manager) { return manager.clear(); }); },
  7451. updatePropListeners: function (props) {
  7452. return names.forEach(function (name) {
  7453. var _a;
  7454. (_a = propSubscriptions[name]) === null || _a === void 0 ? void 0 : _a.call(propSubscriptions);
  7455. var on = "on" + name;
  7456. var propListener = props[on];
  7457. if (propListener) {
  7458. propSubscriptions[name] = lifecycles[on](propListener);
  7459. }
  7460. });
  7461. },
  7462. };
  7463. managers.forEach(function (manager, i) {
  7464. lifecycles["on" + names[i]] = function (handler) { return manager.add(handler); };
  7465. lifecycles["notify" + names[i]] = function () {
  7466. var args = [];
  7467. for (var _i = 0; _i < arguments.length; _i++) {
  7468. args[_i] = arguments[_i];
  7469. }
  7470. return manager.notify.apply(manager, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__spread)(args));
  7471. };
  7472. });
  7473. return lifecycles;
  7474. }
  7475. /***/ }),
  7476. /***/ "./node_modules/framer-motion/dist/es/render/utils/motion-values.js":
  7477. /*!**************************************************************************!*\
  7478. !*** ./node_modules/framer-motion/dist/es/render/utils/motion-values.js ***!
  7479. \**************************************************************************/
  7480. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7481. __webpack_require__.r(__webpack_exports__);
  7482. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7483. /* harmony export */ "updateMotionValuesFromProps": () => (/* binding */ updateMotionValuesFromProps)
  7484. /* harmony export */ });
  7485. /* harmony import */ var _value_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../value/index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  7486. /* harmony import */ var _value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../value/utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  7487. function updateMotionValuesFromProps(element, next, prev) {
  7488. var _a;
  7489. for (var key in next) {
  7490. var nextValue = next[key];
  7491. var prevValue = prev[key];
  7492. if ((0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_0__.isMotionValue)(nextValue)) {
  7493. /**
  7494. * If this is a motion value found in props or style, we want to add it
  7495. * to our visual element's motion value map.
  7496. */
  7497. element.addValue(key, nextValue);
  7498. }
  7499. else if ((0,_value_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_0__.isMotionValue)(prevValue)) {
  7500. /**
  7501. * If we're swapping to a new motion value, create a new motion value
  7502. * from that
  7503. */
  7504. element.addValue(key, (0,_value_index_js__WEBPACK_IMPORTED_MODULE_1__.motionValue)(nextValue));
  7505. }
  7506. else if (prevValue !== nextValue) {
  7507. /**
  7508. * If this is a flat value that has changed, update the motion value
  7509. * or create one if it doesn't exist. We only want to do this if we're
  7510. * not handling the value with our animation state.
  7511. */
  7512. if (element.hasValue(key)) {
  7513. var existingValue = element.getValue(key);
  7514. // TODO: Only update values that aren't being animated or even looked at
  7515. !existingValue.hasAnimated && existingValue.set(nextValue);
  7516. }
  7517. else {
  7518. element.addValue(key, (0,_value_index_js__WEBPACK_IMPORTED_MODULE_1__.motionValue)((_a = element.getStaticValue(key)) !== null && _a !== void 0 ? _a : nextValue));
  7519. }
  7520. }
  7521. }
  7522. // Handle removed values
  7523. for (var key in prev) {
  7524. if (next[key] === undefined)
  7525. element.removeValue(key);
  7526. }
  7527. return next;
  7528. }
  7529. /***/ }),
  7530. /***/ "./node_modules/framer-motion/dist/es/render/utils/projection.js":
  7531. /*!***********************************************************************!*\
  7532. !*** ./node_modules/framer-motion/dist/es/render/utils/projection.js ***!
  7533. \***********************************************************************/
  7534. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7535. __webpack_require__.r(__webpack_exports__);
  7536. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7537. /* harmony export */ "updateLayoutDeltas": () => (/* binding */ updateLayoutDeltas)
  7538. /* harmony export */ });
  7539. /* harmony import */ var _utils_geometry_delta_calc_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/geometry/delta-calc.js */ "./node_modules/framer-motion/dist/es/utils/geometry/delta-calc.js");
  7540. /* harmony import */ var _utils_geometry_delta_apply_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/geometry/delta-apply.js */ "./node_modules/framer-motion/dist/es/utils/geometry/delta-apply.js");
  7541. function updateLayoutDeltas(_a, _b, treePath, transformOrigin) {
  7542. var delta = _a.delta, layout = _a.layout, layoutCorrected = _a.layoutCorrected, treeScale = _a.treeScale;
  7543. var target = _b.target;
  7544. /**
  7545. * Reset the corrected box with the latest values from box, as we're then going
  7546. * to perform mutative operations on it.
  7547. */
  7548. (0,_utils_geometry_delta_apply_js__WEBPACK_IMPORTED_MODULE_0__.resetBox)(layoutCorrected, layout);
  7549. /**
  7550. * Apply all the parent deltas to this box to produce the corrected box. This
  7551. * is the layout box, as it will appear on screen as a result of the transforms of its parents.
  7552. */
  7553. (0,_utils_geometry_delta_apply_js__WEBPACK_IMPORTED_MODULE_0__.applyTreeDeltas)(layoutCorrected, treeScale, treePath);
  7554. /**
  7555. * Update the delta between the corrected box and the target box before user-set transforms were applied.
  7556. * This will allow us to calculate the corrected borderRadius and boxShadow to compensate
  7557. * for our layout reprojection, but still allow them to be scaled correctly by the user.
  7558. * It might be that to simplify this we may want to accept that user-set scale1 is also corrected
  7559. * and we wouldn't have to keep and calc both deltas, OR we could support a user setting
  7560. * to allow people to choose whether these styles are corrected based on just the
  7561. * layout reprojection or the final bounding box.
  7562. */
  7563. (0,_utils_geometry_delta_calc_js__WEBPACK_IMPORTED_MODULE_1__.updateBoxDelta)(delta, layoutCorrected, target, transformOrigin);
  7564. }
  7565. /***/ }),
  7566. /***/ "./node_modules/framer-motion/dist/es/render/utils/setters.js":
  7567. /*!********************************************************************!*\
  7568. !*** ./node_modules/framer-motion/dist/es/render/utils/setters.js ***!
  7569. \********************************************************************/
  7570. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7571. __webpack_require__.r(__webpack_exports__);
  7572. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7573. /* harmony export */ "checkTargetForNewValues": () => (/* binding */ checkTargetForNewValues),
  7574. /* harmony export */ "getOrigin": () => (/* binding */ getOrigin),
  7575. /* harmony export */ "getOriginFromTransition": () => (/* binding */ getOriginFromTransition),
  7576. /* harmony export */ "setTarget": () => (/* binding */ setTarget),
  7577. /* harmony export */ "setValues": () => (/* binding */ setValues)
  7578. /* harmony export */ });
  7579. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  7580. /* harmony import */ var _variants_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./variants.js */ "./node_modules/framer-motion/dist/es/render/utils/variants.js");
  7581. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/complex/index.js");
  7582. /* harmony import */ var _dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../dom/utils/value-types.js */ "./node_modules/framer-motion/dist/es/render/dom/utils/value-types.js");
  7583. /* harmony import */ var _utils_is_numerical_string_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/is-numerical-string.js */ "./node_modules/framer-motion/dist/es/utils/is-numerical-string.js");
  7584. /* harmony import */ var _utils_resolve_value_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/resolve-value.js */ "./node_modules/framer-motion/dist/es/utils/resolve-value.js");
  7585. /* harmony import */ var _value_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../value/index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  7586. /**
  7587. * Set VisualElement's MotionValue, creating a new MotionValue for it if
  7588. * it doesn't exist.
  7589. */
  7590. function setMotionValue(visualElement, key, value) {
  7591. if (visualElement.hasValue(key)) {
  7592. visualElement.getValue(key).set(value);
  7593. }
  7594. else {
  7595. visualElement.addValue(key, (0,_value_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(value));
  7596. }
  7597. }
  7598. function setTarget(visualElement, definition) {
  7599. var resolved = (0,_variants_js__WEBPACK_IMPORTED_MODULE_1__.resolveVariant)(visualElement, definition);
  7600. var _a = resolved
  7601. ? visualElement.makeTargetAnimatable(resolved, false)
  7602. : {}, _b = _a.transitionEnd, transitionEnd = _b === void 0 ? {} : _b, _c = _a.transition, target = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__rest)(_a, ["transitionEnd", "transition"]);
  7603. target = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, target), transitionEnd);
  7604. for (var key in target) {
  7605. var value = (0,_utils_resolve_value_js__WEBPACK_IMPORTED_MODULE_3__.resolveFinalValueInKeyframes)(target[key]);
  7606. setMotionValue(visualElement, key, value);
  7607. }
  7608. }
  7609. function setVariants(visualElement, variantLabels) {
  7610. var reversedLabels = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__spread)(variantLabels).reverse();
  7611. reversedLabels.forEach(function (key) {
  7612. var _a;
  7613. var variant = visualElement.getVariant(key);
  7614. variant && setTarget(visualElement, variant);
  7615. (_a = visualElement.variantChildren) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {
  7616. setVariants(child, variantLabels);
  7617. });
  7618. });
  7619. }
  7620. function setValues(visualElement, definition) {
  7621. if (Array.isArray(definition)) {
  7622. return setVariants(visualElement, definition);
  7623. }
  7624. else if (typeof definition === "string") {
  7625. return setVariants(visualElement, [definition]);
  7626. }
  7627. else {
  7628. setTarget(visualElement, definition);
  7629. }
  7630. }
  7631. function checkTargetForNewValues(visualElement, target, origin) {
  7632. var _a, _b, _c;
  7633. var _d;
  7634. var newValueKeys = Object.keys(target).filter(function (key) { return !visualElement.hasValue(key); });
  7635. var numNewValues = newValueKeys.length;
  7636. if (!numNewValues)
  7637. return;
  7638. for (var i = 0; i < numNewValues; i++) {
  7639. var key = newValueKeys[i];
  7640. var targetValue = target[key];
  7641. var value = null;
  7642. /**
  7643. * If the target is a series of keyframes, we can use the first value
  7644. * in the array. If this first value is null, we'll still need to read from the DOM.
  7645. */
  7646. if (Array.isArray(targetValue)) {
  7647. value = targetValue[0];
  7648. }
  7649. /**
  7650. * If the target isn't keyframes, or the first keyframe was null, we need to
  7651. * first check if an origin value was explicitly defined in the transition as "from",
  7652. * if not read the value from the DOM. As an absolute fallback, take the defined target value.
  7653. */
  7654. if (value === null) {
  7655. value = (_b = (_a = origin[key]) !== null && _a !== void 0 ? _a : visualElement.readValue(key)) !== null && _b !== void 0 ? _b : target[key];
  7656. }
  7657. /**
  7658. * If value is still undefined or null, ignore it. Preferably this would throw,
  7659. * but this was causing issues in Framer.
  7660. */
  7661. if (value === undefined || value === null)
  7662. continue;
  7663. if (typeof value === "string" && (0,_utils_is_numerical_string_js__WEBPACK_IMPORTED_MODULE_4__.isNumericalString)(value)) {
  7664. // If this is a number read as a string, ie "0" or "200", convert it to a number
  7665. value = parseFloat(value);
  7666. }
  7667. else if (!(0,_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_5__.findValueType)(value) && style_value_types__WEBPACK_IMPORTED_MODULE_6__.complex.test(targetValue)) {
  7668. value = (0,_dom_utils_value_types_js__WEBPACK_IMPORTED_MODULE_5__.getAnimatableNone)(key, targetValue);
  7669. }
  7670. visualElement.addValue(key, (0,_value_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(value));
  7671. (_c = (_d = origin)[key]) !== null && _c !== void 0 ? _c : (_d[key] = value);
  7672. visualElement.setBaseTarget(key, value);
  7673. }
  7674. }
  7675. function getOriginFromTransition(key, transition) {
  7676. if (!transition)
  7677. return;
  7678. var valueTransition = transition[key] || transition["default"] || transition;
  7679. return valueTransition.from;
  7680. }
  7681. function getOrigin(target, transition, visualElement) {
  7682. var _a, _b;
  7683. var origin = {};
  7684. for (var key in target) {
  7685. origin[key] = (_a = getOriginFromTransition(key, transition)) !== null && _a !== void 0 ? _a : (_b = visualElement.getValue(key)) === null || _b === void 0 ? void 0 : _b.get();
  7686. }
  7687. return origin;
  7688. }
  7689. /***/ }),
  7690. /***/ "./node_modules/framer-motion/dist/es/render/utils/state.js":
  7691. /*!******************************************************************!*\
  7692. !*** ./node_modules/framer-motion/dist/es/render/utils/state.js ***!
  7693. \******************************************************************/
  7694. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7695. __webpack_require__.r(__webpack_exports__);
  7696. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7697. /* harmony export */ "createLayoutState": () => (/* binding */ createLayoutState),
  7698. /* harmony export */ "createProjectionState": () => (/* binding */ createProjectionState),
  7699. /* harmony export */ "zeroLayout": () => (/* binding */ zeroLayout)
  7700. /* harmony export */ });
  7701. /* harmony import */ var _utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/geometry/index.js */ "./node_modules/framer-motion/dist/es/utils/geometry/index.js");
  7702. var createProjectionState = function () { return ({
  7703. isEnabled: false,
  7704. isTargetLocked: false,
  7705. target: (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.axisBox)(),
  7706. targetFinal: (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.axisBox)(),
  7707. }); };
  7708. function createLayoutState() {
  7709. return {
  7710. isHydrated: false,
  7711. layout: (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.axisBox)(),
  7712. layoutCorrected: (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.axisBox)(),
  7713. treeScale: { x: 1, y: 1 },
  7714. delta: (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.delta)(),
  7715. deltaFinal: (0,_utils_geometry_index_js__WEBPACK_IMPORTED_MODULE_0__.delta)(),
  7716. deltaTransform: "",
  7717. };
  7718. }
  7719. var zeroLayout = createLayoutState();
  7720. /***/ }),
  7721. /***/ "./node_modules/framer-motion/dist/es/render/utils/types.js":
  7722. /*!******************************************************************!*\
  7723. !*** ./node_modules/framer-motion/dist/es/render/utils/types.js ***!
  7724. \******************************************************************/
  7725. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7726. __webpack_require__.r(__webpack_exports__);
  7727. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7728. /* harmony export */ "AnimationType": () => (/* binding */ AnimationType)
  7729. /* harmony export */ });
  7730. var AnimationType;
  7731. (function (AnimationType) {
  7732. AnimationType["Animate"] = "animate";
  7733. AnimationType["Hover"] = "whileHover";
  7734. AnimationType["Tap"] = "whileTap";
  7735. AnimationType["Drag"] = "whileDrag";
  7736. AnimationType["Focus"] = "whileFocus";
  7737. AnimationType["Exit"] = "exit";
  7738. })(AnimationType || (AnimationType = {}));
  7739. /***/ }),
  7740. /***/ "./node_modules/framer-motion/dist/es/render/utils/variants.js":
  7741. /*!*********************************************************************!*\
  7742. !*** ./node_modules/framer-motion/dist/es/render/utils/variants.js ***!
  7743. \*********************************************************************/
  7744. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7745. __webpack_require__.r(__webpack_exports__);
  7746. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7747. /* harmony export */ "checkIfControllingVariants": () => (/* binding */ checkIfControllingVariants),
  7748. /* harmony export */ "checkIfVariantNode": () => (/* binding */ checkIfVariantNode),
  7749. /* harmony export */ "isVariantLabel": () => (/* binding */ isVariantLabel),
  7750. /* harmony export */ "isVariantLabels": () => (/* binding */ isVariantLabels),
  7751. /* harmony export */ "resolveVariant": () => (/* binding */ resolveVariant),
  7752. /* harmony export */ "resolveVariantFromProps": () => (/* binding */ resolveVariantFromProps)
  7753. /* harmony export */ });
  7754. /**
  7755. * Decides if the supplied variable is an array of variant labels
  7756. */
  7757. function isVariantLabels(v) {
  7758. return Array.isArray(v);
  7759. }
  7760. /**
  7761. * Decides if the supplied variable is variant label
  7762. */
  7763. function isVariantLabel(v) {
  7764. return typeof v === "string" || isVariantLabels(v);
  7765. }
  7766. /**
  7767. * Creates an object containing the latest state of every MotionValue on a VisualElement
  7768. */
  7769. function getCurrent(visualElement) {
  7770. var current = {};
  7771. visualElement.forEachValue(function (value, key) { return (current[key] = value.get()); });
  7772. return current;
  7773. }
  7774. /**
  7775. * Creates an object containing the latest velocity of every MotionValue on a VisualElement
  7776. */
  7777. function getVelocity(visualElement) {
  7778. var velocity = {};
  7779. visualElement.forEachValue(function (value, key) { return (velocity[key] = value.getVelocity()); });
  7780. return velocity;
  7781. }
  7782. function resolveVariantFromProps(props, definition, custom, currentValues, currentVelocity) {
  7783. var _a;
  7784. if (currentValues === void 0) { currentValues = {}; }
  7785. if (currentVelocity === void 0) { currentVelocity = {}; }
  7786. if (typeof definition === "string") {
  7787. definition = (_a = props.variants) === null || _a === void 0 ? void 0 : _a[definition];
  7788. }
  7789. return typeof definition === "function"
  7790. ? definition(custom !== null && custom !== void 0 ? custom : props.custom, currentValues, currentVelocity)
  7791. : definition;
  7792. }
  7793. function resolveVariant(visualElement, definition, custom) {
  7794. var props = visualElement.getProps();
  7795. return resolveVariantFromProps(props, definition, custom !== null && custom !== void 0 ? custom : props.custom, getCurrent(visualElement), getVelocity(visualElement));
  7796. }
  7797. function checkIfControllingVariants(props) {
  7798. var _a;
  7799. return (typeof ((_a = props.animate) === null || _a === void 0 ? void 0 : _a.start) === "function" ||
  7800. isVariantLabel(props.initial) ||
  7801. isVariantLabel(props.animate) ||
  7802. isVariantLabel(props.whileHover) ||
  7803. isVariantLabel(props.whileDrag) ||
  7804. isVariantLabel(props.whileTap) ||
  7805. isVariantLabel(props.whileFocus) ||
  7806. isVariantLabel(props.exit));
  7807. }
  7808. function checkIfVariantNode(props) {
  7809. return Boolean(checkIfControllingVariants(props) || props.variants);
  7810. }
  7811. /***/ }),
  7812. /***/ "./node_modules/framer-motion/dist/es/utils/array.js":
  7813. /*!***********************************************************!*\
  7814. !*** ./node_modules/framer-motion/dist/es/utils/array.js ***!
  7815. \***********************************************************/
  7816. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7817. __webpack_require__.r(__webpack_exports__);
  7818. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7819. /* harmony export */ "addUniqueItem": () => (/* binding */ addUniqueItem),
  7820. /* harmony export */ "removeItem": () => (/* binding */ removeItem)
  7821. /* harmony export */ });
  7822. function addUniqueItem(arr, item) {
  7823. arr.indexOf(item) === -1 && arr.push(item);
  7824. }
  7825. function removeItem(arr, item) {
  7826. var index = arr.indexOf(item);
  7827. index > -1 && arr.splice(index, 1);
  7828. }
  7829. /***/ }),
  7830. /***/ "./node_modules/framer-motion/dist/es/utils/each-axis.js":
  7831. /*!***************************************************************!*\
  7832. !*** ./node_modules/framer-motion/dist/es/utils/each-axis.js ***!
  7833. \***************************************************************/
  7834. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7835. __webpack_require__.r(__webpack_exports__);
  7836. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7837. /* harmony export */ "eachAxis": () => (/* binding */ eachAxis)
  7838. /* harmony export */ });
  7839. // Call a handler once for each axis
  7840. function eachAxis(handler) {
  7841. return [handler("x"), handler("y")];
  7842. }
  7843. /***/ }),
  7844. /***/ "./node_modules/framer-motion/dist/es/utils/geometry/delta-apply.js":
  7845. /*!**************************************************************************!*\
  7846. !*** ./node_modules/framer-motion/dist/es/utils/geometry/delta-apply.js ***!
  7847. \**************************************************************************/
  7848. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  7849. __webpack_require__.r(__webpack_exports__);
  7850. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  7851. /* harmony export */ "applyAxisDelta": () => (/* binding */ applyAxisDelta),
  7852. /* harmony export */ "applyAxisTransforms": () => (/* binding */ applyAxisTransforms),
  7853. /* harmony export */ "applyBoxDelta": () => (/* binding */ applyBoxDelta),
  7854. /* harmony export */ "applyBoxTransforms": () => (/* binding */ applyBoxTransforms),
  7855. /* harmony export */ "applyPointDelta": () => (/* binding */ applyPointDelta),
  7856. /* harmony export */ "applyTreeDeltas": () => (/* binding */ applyTreeDeltas),
  7857. /* harmony export */ "removeAxisDelta": () => (/* binding */ removeAxisDelta),
  7858. /* harmony export */ "removeAxisTransforms": () => (/* binding */ removeAxisTransforms),
  7859. /* harmony export */ "removeBoxTransforms": () => (/* binding */ removeBoxTransforms),
  7860. /* harmony export */ "removePointDelta": () => (/* binding */ removePointDelta),
  7861. /* harmony export */ "resetAxis": () => (/* binding */ resetAxis),
  7862. /* harmony export */ "resetBox": () => (/* binding */ resetBox),
  7863. /* harmony export */ "scalePoint": () => (/* binding */ scalePoint)
  7864. /* harmony export */ });
  7865. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  7866. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/mix.js");
  7867. /**
  7868. * Reset an axis to the provided origin box.
  7869. *
  7870. * This is a mutative operation.
  7871. */
  7872. function resetAxis(axis, originAxis) {
  7873. axis.min = originAxis.min;
  7874. axis.max = originAxis.max;
  7875. }
  7876. /**
  7877. * Reset a box to the provided origin box.
  7878. *
  7879. * This is a mutative operation.
  7880. */
  7881. function resetBox(box, originBox) {
  7882. resetAxis(box.x, originBox.x);
  7883. resetAxis(box.y, originBox.y);
  7884. }
  7885. /**
  7886. * Scales a point based on a factor and an originPoint
  7887. */
  7888. function scalePoint(point, scale, originPoint) {
  7889. var distanceFromOrigin = point - originPoint;
  7890. var scaled = scale * distanceFromOrigin;
  7891. return originPoint + scaled;
  7892. }
  7893. /**
  7894. * Applies a translate/scale delta to a point
  7895. */
  7896. function applyPointDelta(point, translate, scale, originPoint, boxScale) {
  7897. if (boxScale !== undefined) {
  7898. point = scalePoint(point, boxScale, originPoint);
  7899. }
  7900. return scalePoint(point, scale, originPoint) + translate;
  7901. }
  7902. /**
  7903. * Applies a translate/scale delta to an axis
  7904. */
  7905. function applyAxisDelta(axis, translate, scale, originPoint, boxScale) {
  7906. if (translate === void 0) { translate = 0; }
  7907. if (scale === void 0) { scale = 1; }
  7908. axis.min = applyPointDelta(axis.min, translate, scale, originPoint, boxScale);
  7909. axis.max = applyPointDelta(axis.max, translate, scale, originPoint, boxScale);
  7910. }
  7911. /**
  7912. * Applies a translate/scale delta to a box
  7913. */
  7914. function applyBoxDelta(box, _a) {
  7915. var x = _a.x, y = _a.y;
  7916. applyAxisDelta(box.x, x.translate, x.scale, x.originPoint);
  7917. applyAxisDelta(box.y, y.translate, y.scale, y.originPoint);
  7918. }
  7919. /**
  7920. * Apply a transform to an axis from the latest resolved motion values.
  7921. * This function basically acts as a bridge between a flat motion value map
  7922. * and applyAxisDelta
  7923. */
  7924. function applyAxisTransforms(final, axis, transforms, _a) {
  7925. var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__read)(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];
  7926. // Copy the current axis to the final axis before mutation
  7927. final.min = axis.min;
  7928. final.max = axis.max;
  7929. var axisOrigin = transforms[originKey] !== undefined ? transforms[originKey] : 0.5;
  7930. var originPoint = (0,popmotion__WEBPACK_IMPORTED_MODULE_1__.mix)(axis.min, axis.max, axisOrigin);
  7931. // Apply the axis delta to the final axis
  7932. applyAxisDelta(final, transforms[key], transforms[scaleKey], originPoint, transforms.scale);
  7933. }
  7934. /**
  7935. * The names of the motion values we want to apply as translation, scale and origin.
  7936. */
  7937. var xKeys = ["x", "scaleX", "originX"];
  7938. var yKeys = ["y", "scaleY", "originY"];
  7939. /**
  7940. * Apply a transform to a box from the latest resolved motion values.
  7941. */
  7942. function applyBoxTransforms(finalBox, box, transforms) {
  7943. applyAxisTransforms(finalBox.x, box.x, transforms, xKeys);
  7944. applyAxisTransforms(finalBox.y, box.y, transforms, yKeys);
  7945. }
  7946. /**
  7947. * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse
  7948. */
  7949. function removePointDelta(point, translate, scale, originPoint, boxScale) {
  7950. point -= translate;
  7951. point = scalePoint(point, 1 / scale, originPoint);
  7952. if (boxScale !== undefined) {
  7953. point = scalePoint(point, 1 / boxScale, originPoint);
  7954. }
  7955. return point;
  7956. }
  7957. /**
  7958. * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse
  7959. */
  7960. function removeAxisDelta(axis, translate, scale, origin, boxScale) {
  7961. if (translate === void 0) { translate = 0; }
  7962. if (scale === void 0) { scale = 1; }
  7963. if (origin === void 0) { origin = 0.5; }
  7964. var originPoint = (0,popmotion__WEBPACK_IMPORTED_MODULE_1__.mix)(axis.min, axis.max, origin) - translate;
  7965. axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);
  7966. axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);
  7967. }
  7968. /**
  7969. * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse
  7970. * and acts as a bridge between motion values and removeAxisDelta
  7971. */
  7972. function removeAxisTransforms(axis, transforms, _a) {
  7973. var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__read)(_a, 3), key = _b[0], scaleKey = _b[1], originKey = _b[2];
  7974. removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale);
  7975. }
  7976. /**
  7977. * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse
  7978. * and acts as a bridge between motion values and removeAxisDelta
  7979. */
  7980. function removeBoxTransforms(box, transforms) {
  7981. removeAxisTransforms(box.x, transforms, xKeys);
  7982. removeAxisTransforms(box.y, transforms, yKeys);
  7983. }
  7984. /**
  7985. * Apply a tree of deltas to a box. We do this to calculate the effect of all the transforms
  7986. * in a tree upon our box before then calculating how to project it into our desired viewport-relative box
  7987. *
  7988. * This is the final nested loop within updateLayoutDelta for future refactoring
  7989. */
  7990. function applyTreeDeltas(box, treeScale, treePath) {
  7991. var treeLength = treePath.length;
  7992. if (!treeLength)
  7993. return;
  7994. // Reset the treeScale
  7995. treeScale.x = treeScale.y = 1;
  7996. for (var i = 0; i < treeLength; i++) {
  7997. var delta = treePath[i].getLayoutState().delta;
  7998. // Incoporate each ancestor's scale into a culmulative treeScale for this component
  7999. treeScale.x *= delta.x.scale;
  8000. treeScale.y *= delta.y.scale;
  8001. // Apply each ancestor's calculated delta into this component's recorded layout box
  8002. applyBoxDelta(box, delta);
  8003. }
  8004. }
  8005. /***/ }),
  8006. /***/ "./node_modules/framer-motion/dist/es/utils/geometry/delta-calc.js":
  8007. /*!*************************************************************************!*\
  8008. !*** ./node_modules/framer-motion/dist/es/utils/geometry/delta-calc.js ***!
  8009. \*************************************************************************/
  8010. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8011. __webpack_require__.r(__webpack_exports__);
  8012. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8013. /* harmony export */ "calcOrigin": () => (/* binding */ calcOrigin),
  8014. /* harmony export */ "isNear": () => (/* binding */ isNear),
  8015. /* harmony export */ "updateAxisDelta": () => (/* binding */ updateAxisDelta),
  8016. /* harmony export */ "updateBoxDelta": () => (/* binding */ updateBoxDelta)
  8017. /* harmony export */ });
  8018. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/clamp.js");
  8019. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/distance.js");
  8020. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/progress.js");
  8021. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/mix.js");
  8022. var clampProgress = function (v) { return (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.clamp)(0, 1, v); };
  8023. /**
  8024. * Returns true if the provided value is within maxDistance of the provided target
  8025. */
  8026. function isNear(value, target, maxDistance) {
  8027. if (target === void 0) { target = 0; }
  8028. if (maxDistance === void 0) { maxDistance = 0.01; }
  8029. return (0,popmotion__WEBPACK_IMPORTED_MODULE_1__.distance)(value, target) < maxDistance;
  8030. }
  8031. function calcLength(axis) {
  8032. return axis.max - axis.min;
  8033. }
  8034. /**
  8035. * Calculate a transform origin relative to the source axis, between 0-1, that results
  8036. * in an asthetically pleasing scale/transform needed to project from source to target.
  8037. */
  8038. function calcOrigin(source, target) {
  8039. var origin = 0.5;
  8040. var sourceLength = calcLength(source);
  8041. var targetLength = calcLength(target);
  8042. if (targetLength > sourceLength) {
  8043. origin = (0,popmotion__WEBPACK_IMPORTED_MODULE_2__.progress)(target.min, target.max - sourceLength, source.min);
  8044. }
  8045. else if (sourceLength > targetLength) {
  8046. origin = (0,popmotion__WEBPACK_IMPORTED_MODULE_2__.progress)(source.min, source.max - targetLength, target.min);
  8047. }
  8048. return clampProgress(origin);
  8049. }
  8050. /**
  8051. * Update the AxisDelta with a transform that projects source into target.
  8052. *
  8053. * The transform `origin` is optional. If not provided, it'll be automatically
  8054. * calculated based on the relative positions of the two bounding boxes.
  8055. */
  8056. function updateAxisDelta(delta, source, target, origin) {
  8057. if (origin === void 0) { origin = 0.5; }
  8058. delta.origin = origin;
  8059. delta.originPoint = (0,popmotion__WEBPACK_IMPORTED_MODULE_3__.mix)(source.min, source.max, delta.origin);
  8060. delta.scale = calcLength(target) / calcLength(source);
  8061. if (isNear(delta.scale, 1, 0.0001))
  8062. delta.scale = 1;
  8063. delta.translate =
  8064. (0,popmotion__WEBPACK_IMPORTED_MODULE_3__.mix)(target.min, target.max, delta.origin) - delta.originPoint;
  8065. if (isNear(delta.translate))
  8066. delta.translate = 0;
  8067. }
  8068. /**
  8069. * Update the BoxDelta with a transform that projects the source into the target.
  8070. *
  8071. * The transform `origin` is optional. If not provided, it'll be automatically
  8072. * calculated based on the relative positions of the two bounding boxes.
  8073. */
  8074. function updateBoxDelta(delta, source, target, origin) {
  8075. updateAxisDelta(delta.x, source.x, target.x, defaultOrigin(origin.originX));
  8076. updateAxisDelta(delta.y, source.y, target.y, defaultOrigin(origin.originY));
  8077. }
  8078. /**
  8079. * Currently this only accepts numerical origins, measured as 0-1, but could
  8080. * accept pixel values by comparing to the target axis.
  8081. */
  8082. function defaultOrigin(origin) {
  8083. return typeof origin === "number" ? origin : 0.5;
  8084. }
  8085. /***/ }),
  8086. /***/ "./node_modules/framer-motion/dist/es/utils/geometry/index.js":
  8087. /*!********************************************************************!*\
  8088. !*** ./node_modules/framer-motion/dist/es/utils/geometry/index.js ***!
  8089. \********************************************************************/
  8090. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8091. __webpack_require__.r(__webpack_exports__);
  8092. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8093. /* harmony export */ "axisBox": () => (/* binding */ axisBox),
  8094. /* harmony export */ "convertAxisBoxToBoundingBox": () => (/* binding */ convertAxisBoxToBoundingBox),
  8095. /* harmony export */ "convertBoundingBoxToAxisBox": () => (/* binding */ convertBoundingBoxToAxisBox),
  8096. /* harmony export */ "copyAxisBox": () => (/* binding */ copyAxisBox),
  8097. /* harmony export */ "delta": () => (/* binding */ delta),
  8098. /* harmony export */ "transformBoundingBox": () => (/* binding */ transformBoundingBox)
  8099. /* harmony export */ });
  8100. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  8101. /* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "./node_modules/framer-motion/dist/es/utils/noop.js");
  8102. /**
  8103. * Bounding boxes tend to be defined as top, left, right, bottom. For various operations
  8104. * it's easier to consider each axis individually. This function returns a bounding box
  8105. * as a map of single-axis min/max values.
  8106. */
  8107. function convertBoundingBoxToAxisBox(_a) {
  8108. var top = _a.top, left = _a.left, right = _a.right, bottom = _a.bottom;
  8109. return {
  8110. x: { min: left, max: right },
  8111. y: { min: top, max: bottom },
  8112. };
  8113. }
  8114. function convertAxisBoxToBoundingBox(_a) {
  8115. var x = _a.x, y = _a.y;
  8116. return {
  8117. top: y.min,
  8118. bottom: y.max,
  8119. left: x.min,
  8120. right: x.max,
  8121. };
  8122. }
  8123. /**
  8124. * Applies a TransformPoint function to a bounding box. TransformPoint is usually a function
  8125. * provided by Framer to allow measured points to be corrected for device scaling. This is used
  8126. * when measuring DOM elements and DOM event points.
  8127. */
  8128. function transformBoundingBox(_a, transformPoint) {
  8129. var top = _a.top, left = _a.left, bottom = _a.bottom, right = _a.right;
  8130. if (transformPoint === void 0) { transformPoint = _noop_js__WEBPACK_IMPORTED_MODULE_0__.noop; }
  8131. var topLeft = transformPoint({ x: left, y: top });
  8132. var bottomRight = transformPoint({ x: right, y: bottom });
  8133. return {
  8134. top: topLeft.y,
  8135. left: topLeft.x,
  8136. bottom: bottomRight.y,
  8137. right: bottomRight.x,
  8138. };
  8139. }
  8140. /**
  8141. * Create an empty axis box of zero size
  8142. */
  8143. function axisBox() {
  8144. return { x: { min: 0, max: 1 }, y: { min: 0, max: 1 } };
  8145. }
  8146. function copyAxisBox(box) {
  8147. return {
  8148. x: (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, box.x),
  8149. y: (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, box.y),
  8150. };
  8151. }
  8152. /**
  8153. * Create an empty box delta
  8154. */
  8155. var zeroDelta = {
  8156. translate: 0,
  8157. scale: 1,
  8158. origin: 0,
  8159. originPoint: 0,
  8160. };
  8161. function delta() {
  8162. return {
  8163. x: (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, zeroDelta),
  8164. y: (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, zeroDelta),
  8165. };
  8166. }
  8167. /***/ }),
  8168. /***/ "./node_modules/framer-motion/dist/es/utils/is-numerical-string.js":
  8169. /*!*************************************************************************!*\
  8170. !*** ./node_modules/framer-motion/dist/es/utils/is-numerical-string.js ***!
  8171. \*************************************************************************/
  8172. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8173. __webpack_require__.r(__webpack_exports__);
  8174. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8175. /* harmony export */ "isNumericalString": () => (/* binding */ isNumericalString)
  8176. /* harmony export */ });
  8177. /**
  8178. * Check if value is a numerical string, ie a string that is purely a number eg "100" or "-100.1"
  8179. */
  8180. var isNumericalString = function (v) { return /^\-?\d*\.?\d+$/.test(v); };
  8181. /***/ }),
  8182. /***/ "./node_modules/framer-motion/dist/es/utils/is-ref-object.js":
  8183. /*!*******************************************************************!*\
  8184. !*** ./node_modules/framer-motion/dist/es/utils/is-ref-object.js ***!
  8185. \*******************************************************************/
  8186. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8187. __webpack_require__.r(__webpack_exports__);
  8188. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8189. /* harmony export */ "isRefObject": () => (/* binding */ isRefObject)
  8190. /* harmony export */ });
  8191. function isRefObject(ref) {
  8192. return (typeof ref === "object" &&
  8193. Object.prototype.hasOwnProperty.call(ref, "current"));
  8194. }
  8195. /***/ }),
  8196. /***/ "./node_modules/framer-motion/dist/es/utils/noop.js":
  8197. /*!**********************************************************!*\
  8198. !*** ./node_modules/framer-motion/dist/es/utils/noop.js ***!
  8199. \**********************************************************/
  8200. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8201. __webpack_require__.r(__webpack_exports__);
  8202. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8203. /* harmony export */ "noop": () => (/* binding */ noop)
  8204. /* harmony export */ });
  8205. function noop(any) {
  8206. return any;
  8207. }
  8208. /***/ }),
  8209. /***/ "./node_modules/framer-motion/dist/es/utils/resolve-value.js":
  8210. /*!*******************************************************************!*\
  8211. !*** ./node_modules/framer-motion/dist/es/utils/resolve-value.js ***!
  8212. \*******************************************************************/
  8213. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8214. __webpack_require__.r(__webpack_exports__);
  8215. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8216. /* harmony export */ "isCustomValue": () => (/* binding */ isCustomValue),
  8217. /* harmony export */ "resolveFinalValueInKeyframes": () => (/* binding */ resolveFinalValueInKeyframes)
  8218. /* harmony export */ });
  8219. /* harmony import */ var _animation_utils_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../animation/utils/is-keyframes-target.js */ "./node_modules/framer-motion/dist/es/animation/utils/is-keyframes-target.js");
  8220. var isCustomValue = function (v) {
  8221. return Boolean(v && typeof v === "object" && v.mix && v.toValue);
  8222. };
  8223. var resolveFinalValueInKeyframes = function (v) {
  8224. // TODO maybe throw if v.length - 1 is placeholder token?
  8225. return (0,_animation_utils_is_keyframes_target_js__WEBPACK_IMPORTED_MODULE_0__.isKeyframesTarget)(v) ? v[v.length - 1] || 0 : v;
  8226. };
  8227. /***/ }),
  8228. /***/ "./node_modules/framer-motion/dist/es/utils/shallow-compare.js":
  8229. /*!*********************************************************************!*\
  8230. !*** ./node_modules/framer-motion/dist/es/utils/shallow-compare.js ***!
  8231. \*********************************************************************/
  8232. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8233. __webpack_require__.r(__webpack_exports__);
  8234. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8235. /* harmony export */ "shallowCompare": () => (/* binding */ shallowCompare)
  8236. /* harmony export */ });
  8237. function shallowCompare(next, prev) {
  8238. if (!Array.isArray(prev))
  8239. return false;
  8240. var prevLength = prev.length;
  8241. if (prevLength !== next.length)
  8242. return false;
  8243. for (var i = 0; i < prevLength; i++) {
  8244. if (prev[i] !== next[i])
  8245. return false;
  8246. }
  8247. return true;
  8248. }
  8249. /***/ }),
  8250. /***/ "./node_modules/framer-motion/dist/es/utils/subscription-manager.js":
  8251. /*!**************************************************************************!*\
  8252. !*** ./node_modules/framer-motion/dist/es/utils/subscription-manager.js ***!
  8253. \**************************************************************************/
  8254. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8255. __webpack_require__.r(__webpack_exports__);
  8256. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8257. /* harmony export */ "SubscriptionManager": () => (/* binding */ SubscriptionManager)
  8258. /* harmony export */ });
  8259. /* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "./node_modules/framer-motion/dist/es/utils/array.js");
  8260. var SubscriptionManager = /** @class */ (function () {
  8261. function SubscriptionManager() {
  8262. this.subscriptions = [];
  8263. }
  8264. SubscriptionManager.prototype.add = function (handler) {
  8265. var _this = this;
  8266. (0,_array_js__WEBPACK_IMPORTED_MODULE_0__.addUniqueItem)(this.subscriptions, handler);
  8267. return function () { return (0,_array_js__WEBPACK_IMPORTED_MODULE_0__.removeItem)(_this.subscriptions, handler); };
  8268. };
  8269. SubscriptionManager.prototype.notify = function (a, b, c) {
  8270. var numSubscriptions = this.subscriptions.length;
  8271. if (!numSubscriptions)
  8272. return;
  8273. if (numSubscriptions === 1) {
  8274. /**
  8275. * If there's only a single handler we can just call it without invoking a loop.
  8276. */
  8277. this.subscriptions[0](a, b, c);
  8278. }
  8279. else {
  8280. for (var i = 0; i < numSubscriptions; i++) {
  8281. /**
  8282. * Check whether the handler exists before firing as it's possible
  8283. * the subscriptions were modified during this loop running.
  8284. */
  8285. var handler = this.subscriptions[i];
  8286. handler && handler(a, b, c);
  8287. }
  8288. }
  8289. };
  8290. SubscriptionManager.prototype.getSize = function () {
  8291. return this.subscriptions.length;
  8292. };
  8293. SubscriptionManager.prototype.clear = function () {
  8294. this.subscriptions.length = 0;
  8295. };
  8296. return SubscriptionManager;
  8297. }());
  8298. /***/ }),
  8299. /***/ "./node_modules/framer-motion/dist/es/utils/time-conversion.js":
  8300. /*!*********************************************************************!*\
  8301. !*** ./node_modules/framer-motion/dist/es/utils/time-conversion.js ***!
  8302. \*********************************************************************/
  8303. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8304. __webpack_require__.r(__webpack_exports__);
  8305. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8306. /* harmony export */ "secondsToMilliseconds": () => (/* binding */ secondsToMilliseconds)
  8307. /* harmony export */ });
  8308. /**
  8309. * Converts seconds to milliseconds
  8310. *
  8311. * @param seconds - Time in seconds.
  8312. * @return milliseconds - Converted time in milliseconds.
  8313. */
  8314. var secondsToMilliseconds = function (seconds) { return seconds * 1000; };
  8315. /***/ }),
  8316. /***/ "./node_modules/framer-motion/dist/es/utils/transform.js":
  8317. /*!***************************************************************!*\
  8318. !*** ./node_modules/framer-motion/dist/es/utils/transform.js ***!
  8319. \***************************************************************/
  8320. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8321. __webpack_require__.r(__webpack_exports__);
  8322. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8323. /* harmony export */ "transform": () => (/* binding */ transform)
  8324. /* harmony export */ });
  8325. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  8326. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/interpolate.js");
  8327. var isCustomValueType = function (v) {
  8328. return typeof v === "object" && v.mix;
  8329. };
  8330. var getMixer = function (v) { return (isCustomValueType(v) ? v.mix : undefined); };
  8331. function transform() {
  8332. var args = [];
  8333. for (var _i = 0; _i < arguments.length; _i++) {
  8334. args[_i] = arguments[_i];
  8335. }
  8336. var useImmediate = !Array.isArray(args[0]);
  8337. var argOffset = useImmediate ? 0 : -1;
  8338. var inputValue = args[0 + argOffset];
  8339. var inputRange = args[1 + argOffset];
  8340. var outputRange = args[2 + argOffset];
  8341. var options = args[3 + argOffset];
  8342. var interpolator = (0,popmotion__WEBPACK_IMPORTED_MODULE_0__.interpolate)(inputRange, outputRange, (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({ mixer: getMixer(outputRange[0]) }, options));
  8343. return useImmediate ? interpolator(inputValue) : interpolator;
  8344. }
  8345. /***/ }),
  8346. /***/ "./node_modules/framer-motion/dist/es/utils/use-constant.js":
  8347. /*!******************************************************************!*\
  8348. !*** ./node_modules/framer-motion/dist/es/utils/use-constant.js ***!
  8349. \******************************************************************/
  8350. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8351. __webpack_require__.r(__webpack_exports__);
  8352. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8353. /* harmony export */ "useConstant": () => (/* binding */ useConstant)
  8354. /* harmony export */ });
  8355. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  8356. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  8357. /**
  8358. * Creates a constant value over the lifecycle of a component.
  8359. *
  8360. * Even if `useMemo` is provided an empty array as its final argument, it doesn't offer
  8361. * a guarantee that it won't re-run for performance reasons later on. By using `useConstant`
  8362. * you can ensure that initialisers don't execute twice or more.
  8363. */
  8364. function useConstant(init) {
  8365. var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  8366. if (ref.current === null) {
  8367. ref.current = init();
  8368. }
  8369. return ref.current;
  8370. }
  8371. /***/ }),
  8372. /***/ "./node_modules/framer-motion/dist/es/utils/use-cycle.js":
  8373. /*!***************************************************************!*\
  8374. !*** ./node_modules/framer-motion/dist/es/utils/use-cycle.js ***!
  8375. \***************************************************************/
  8376. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8377. __webpack_require__.r(__webpack_exports__);
  8378. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8379. /* harmony export */ "useCycle": () => (/* binding */ useCycle)
  8380. /* harmony export */ });
  8381. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  8382. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  8383. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  8384. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/wrap.js");
  8385. /**
  8386. * Cycles through a series of visual properties. Can be used to toggle between or cycle through animations. It works similar to `useState` in React. It is provided an initial array of possible states, and returns an array of two arguments.
  8387. *
  8388. * @library
  8389. *
  8390. * ```jsx
  8391. * import * as React from "react"
  8392. * import { Frame, useCycle } from "framer"
  8393. *
  8394. * export function MyComponent() {
  8395. * const [x, cycleX] = useCycle(0, 50, 100)
  8396. *
  8397. * return (
  8398. * <Frame
  8399. * animate={{ x: x }}
  8400. * onTap={() => cycleX()}
  8401. * />
  8402. * )
  8403. * }
  8404. * ```
  8405. *
  8406. * @motion
  8407. *
  8408. * An index value can be passed to the returned `cycle` function to cycle to a specific index.
  8409. *
  8410. * ```jsx
  8411. * import * as React from "react"
  8412. * import { motion, useCycle } from "framer-motion"
  8413. *
  8414. * export const MyComponent = () => {
  8415. * const [x, cycleX] = useCycle(0, 50, 100)
  8416. *
  8417. * return (
  8418. * <motion.div
  8419. * animate={{ x: x }}
  8420. * onTap={() => cycleX()}
  8421. * />
  8422. * )
  8423. * }
  8424. * ```
  8425. *
  8426. * @param items - items to cycle through
  8427. * @returns [currentState, cycleState]
  8428. *
  8429. * @public
  8430. */
  8431. function useCycle() {
  8432. var items = [];
  8433. for (var _i = 0; _i < arguments.length; _i++) {
  8434. items[_i] = arguments[_i];
  8435. }
  8436. var index = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);
  8437. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(items[index.current]), 2), item = _a[0], setItem = _a[1];
  8438. return [
  8439. item,
  8440. function (next) {
  8441. index.current =
  8442. typeof next !== "number"
  8443. ? (0,popmotion__WEBPACK_IMPORTED_MODULE_2__.wrap)(0, items.length, index.current + 1)
  8444. : next;
  8445. setItem(items[index.current]);
  8446. },
  8447. ];
  8448. }
  8449. /***/ }),
  8450. /***/ "./node_modules/framer-motion/dist/es/utils/use-force-update.js":
  8451. /*!**********************************************************************!*\
  8452. !*** ./node_modules/framer-motion/dist/es/utils/use-force-update.js ***!
  8453. \**********************************************************************/
  8454. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8455. __webpack_require__.r(__webpack_exports__);
  8456. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8457. /* harmony export */ "useForceUpdate": () => (/* binding */ useForceUpdate)
  8458. /* harmony export */ });
  8459. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  8460. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  8461. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  8462. /* harmony import */ var _use_unmount_effect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-unmount-effect.js */ "./node_modules/framer-motion/dist/es/utils/use-unmount-effect.js");
  8463. function useForceUpdate() {
  8464. var unloadingRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(false);
  8465. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0), 2), forcedRenderCount = _a[0], setForcedRenderCount = _a[1];
  8466. (0,_use_unmount_effect_js__WEBPACK_IMPORTED_MODULE_2__.useUnmountEffect)(function () { return (unloadingRef.current = true); });
  8467. return (0,react__WEBPACK_IMPORTED_MODULE_0__.useCallback)(function () {
  8468. !unloadingRef.current && setForcedRenderCount(forcedRenderCount + 1);
  8469. }, [forcedRenderCount]);
  8470. }
  8471. /***/ }),
  8472. /***/ "./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js":
  8473. /*!***************************************************************************!*\
  8474. !*** ./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js ***!
  8475. \***************************************************************************/
  8476. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8477. __webpack_require__.r(__webpack_exports__);
  8478. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8479. /* harmony export */ "useIsomorphicLayoutEffect": () => (/* binding */ useIsomorphicLayoutEffect)
  8480. /* harmony export */ });
  8481. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  8482. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  8483. var isBrowser = typeof window !== "undefined";
  8484. var useIsomorphicLayoutEffect = isBrowser ? react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect : react__WEBPACK_IMPORTED_MODULE_0__.useEffect;
  8485. /***/ }),
  8486. /***/ "./node_modules/framer-motion/dist/es/utils/use-reduced-motion.js":
  8487. /*!************************************************************************!*\
  8488. !*** ./node_modules/framer-motion/dist/es/utils/use-reduced-motion.js ***!
  8489. \************************************************************************/
  8490. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8491. __webpack_require__.r(__webpack_exports__);
  8492. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8493. /* harmony export */ "useReducedMotion": () => (/* binding */ useReducedMotion)
  8494. /* harmony export */ });
  8495. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  8496. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  8497. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  8498. /* harmony import */ var _value_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../value/index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  8499. /* harmony import */ var _value_use_on_change_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../value/use-on-change.js */ "./node_modules/framer-motion/dist/es/value/use-on-change.js");
  8500. // Does this device prefer reduced motion? Returns `null` server-side.
  8501. var prefersReducedMotion;
  8502. function initPrefersReducedMotion() {
  8503. prefersReducedMotion = (0,_value_index_js__WEBPACK_IMPORTED_MODULE_1__.motionValue)(null);
  8504. if (typeof window === "undefined")
  8505. return;
  8506. if (window.matchMedia) {
  8507. var motionMediaQuery_1 = window.matchMedia("(prefers-reduced-motion)");
  8508. var setReducedMotionPreferences = function () {
  8509. return prefersReducedMotion.set(motionMediaQuery_1.matches);
  8510. };
  8511. motionMediaQuery_1.addListener(setReducedMotionPreferences);
  8512. setReducedMotionPreferences();
  8513. }
  8514. else {
  8515. prefersReducedMotion.set(false);
  8516. }
  8517. }
  8518. /**
  8519. * A hook that returns `true` if we should be using reduced motion based on the current device's Reduced Motion setting.
  8520. *
  8521. * This can be used to implement changes to your UI based on Reduced Motion. For instance, replacing motion-sickness inducing
  8522. * `x`/`y` animations with `opacity`, disabling the autoplay of background videos, or turning off parallax motion.
  8523. *
  8524. * It will actively respond to changes and re-render your components with the latest setting.
  8525. *
  8526. * ```jsx
  8527. * export function Sidebar({ isOpen }) {
  8528. * const shouldReduceMotion = useReducedMotion()
  8529. * const closedX = shouldReduceMotion ? 0 : "-100%"
  8530. *
  8531. * return (
  8532. * <motion.div animate={{
  8533. * opacity: isOpen ? 1 : 0,
  8534. * x: isOpen ? 0 : closedX
  8535. * }} />
  8536. * )
  8537. * }
  8538. * ```
  8539. *
  8540. * @return boolean
  8541. *
  8542. * @public
  8543. */
  8544. function useReducedMotion() {
  8545. /**
  8546. * Lazy initialisation of prefersReducedMotion
  8547. */
  8548. !prefersReducedMotion && initPrefersReducedMotion();
  8549. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_2__.__read)((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(prefersReducedMotion.get()), 2), shouldReduceMotion = _a[0], setShouldReduceMotion = _a[1];
  8550. (0,_value_use_on_change_js__WEBPACK_IMPORTED_MODULE_3__.useOnChange)(prefersReducedMotion, setShouldReduceMotion);
  8551. return shouldReduceMotion;
  8552. }
  8553. /***/ }),
  8554. /***/ "./node_modules/framer-motion/dist/es/utils/use-unmount-effect.js":
  8555. /*!************************************************************************!*\
  8556. !*** ./node_modules/framer-motion/dist/es/utils/use-unmount-effect.js ***!
  8557. \************************************************************************/
  8558. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8559. __webpack_require__.r(__webpack_exports__);
  8560. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8561. /* harmony export */ "useUnmountEffect": () => (/* binding */ useUnmountEffect)
  8562. /* harmony export */ });
  8563. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  8564. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  8565. function useUnmountEffect(callback) {
  8566. return (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { return function () { return callback(); }; }, []);
  8567. }
  8568. /***/ }),
  8569. /***/ "./node_modules/framer-motion/dist/es/value/index.js":
  8570. /*!***********************************************************!*\
  8571. !*** ./node_modules/framer-motion/dist/es/value/index.js ***!
  8572. \***********************************************************/
  8573. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8574. __webpack_require__.r(__webpack_exports__);
  8575. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8576. /* harmony export */ "MotionValue": () => (/* binding */ MotionValue),
  8577. /* harmony export */ "motionValue": () => (/* binding */ motionValue)
  8578. /* harmony export */ });
  8579. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/utils/velocity-per-second.js");
  8580. /* harmony import */ var framesync__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framesync */ "./node_modules/framesync/dist/es/index.js");
  8581. /* harmony import */ var _utils_subscription_manager_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/subscription-manager.js */ "./node_modules/framer-motion/dist/es/utils/subscription-manager.js");
  8582. var isFloat = function (value) {
  8583. return !isNaN(parseFloat(value));
  8584. };
  8585. /**
  8586. * `MotionValue` is used to track the state and velocity of motion values.
  8587. *
  8588. * @public
  8589. */
  8590. var MotionValue = /** @class */ (function () {
  8591. /**
  8592. * @param init - The initiating value
  8593. * @param config - Optional configuration options
  8594. *
  8595. * - `transformer`: A function to transform incoming values with.
  8596. *
  8597. * @internal
  8598. */
  8599. function MotionValue(init) {
  8600. var _this = this;
  8601. /**
  8602. * Duration, in milliseconds, since last updating frame.
  8603. *
  8604. * @internal
  8605. */
  8606. this.timeDelta = 0;
  8607. /**
  8608. * Timestamp of the last time this `MotionValue` was updated.
  8609. *
  8610. * @internal
  8611. */
  8612. this.lastUpdated = 0;
  8613. /**
  8614. * Functions to notify when the `MotionValue` updates.
  8615. *
  8616. * @internal
  8617. */
  8618. this.updateSubscribers = new _utils_subscription_manager_js__WEBPACK_IMPORTED_MODULE_1__.SubscriptionManager();
  8619. /**
  8620. * Functions to notify when the velocity updates.
  8621. *
  8622. * @internal
  8623. */
  8624. this.velocityUpdateSubscribers = new _utils_subscription_manager_js__WEBPACK_IMPORTED_MODULE_1__.SubscriptionManager();
  8625. /**
  8626. * Functions to notify when the `MotionValue` updates and `render` is set to `true`.
  8627. *
  8628. * @internal
  8629. */
  8630. this.renderSubscribers = new _utils_subscription_manager_js__WEBPACK_IMPORTED_MODULE_1__.SubscriptionManager();
  8631. /**
  8632. * Tracks whether this value can output a velocity. Currently this is only true
  8633. * if the value is numerical, but we might be able to widen the scope here and support
  8634. * other value types.
  8635. *
  8636. * @internal
  8637. */
  8638. this.canTrackVelocity = false;
  8639. this.updateAndNotify = function (v, render) {
  8640. if (render === void 0) { render = true; }
  8641. _this.prev = _this.current;
  8642. _this.current = v;
  8643. // Update timestamp
  8644. var _a = (0,framesync__WEBPACK_IMPORTED_MODULE_0__.getFrameData)(), delta = _a.delta, timestamp = _a.timestamp;
  8645. if (_this.lastUpdated !== timestamp) {
  8646. _this.timeDelta = delta;
  8647. _this.lastUpdated = timestamp;
  8648. framesync__WEBPACK_IMPORTED_MODULE_0__["default"].postRender(_this.scheduleVelocityCheck);
  8649. }
  8650. // Update update subscribers
  8651. if (_this.prev !== _this.current) {
  8652. _this.updateSubscribers.notify(_this.current);
  8653. }
  8654. // Update velocity subscribers
  8655. if (_this.velocityUpdateSubscribers.getSize()) {
  8656. _this.velocityUpdateSubscribers.notify(_this.getVelocity());
  8657. }
  8658. // Update render subscribers
  8659. if (render) {
  8660. _this.renderSubscribers.notify(_this.current);
  8661. }
  8662. };
  8663. /**
  8664. * Schedule a velocity check for the next frame.
  8665. *
  8666. * This is an instanced and bound function to prevent generating a new
  8667. * function once per frame.
  8668. *
  8669. * @internal
  8670. */
  8671. this.scheduleVelocityCheck = function () { return framesync__WEBPACK_IMPORTED_MODULE_0__["default"].postRender(_this.velocityCheck); };
  8672. /**
  8673. * Updates `prev` with `current` if the value hasn't been updated this frame.
  8674. * This ensures velocity calculations return `0`.
  8675. *
  8676. * This is an instanced and bound function to prevent generating a new
  8677. * function once per frame.
  8678. *
  8679. * @internal
  8680. */
  8681. this.velocityCheck = function (_a) {
  8682. var timestamp = _a.timestamp;
  8683. if (timestamp !== _this.lastUpdated) {
  8684. _this.prev = _this.current;
  8685. _this.velocityUpdateSubscribers.notify(_this.getVelocity());
  8686. }
  8687. };
  8688. this.hasAnimated = false;
  8689. this.prev = this.current = init;
  8690. this.canTrackVelocity = isFloat(this.current);
  8691. }
  8692. /**
  8693. * Adds a function that will be notified when the `MotionValue` is updated.
  8694. *
  8695. * It returns a function that, when called, will cancel the subscription.
  8696. *
  8697. * When calling `onChange` inside a React component, it should be wrapped with the
  8698. * `useEffect` hook. As it returns an unsubscribe function, this should be returned
  8699. * from the `useEffect` function to ensure you don't add duplicate subscribers..
  8700. *
  8701. * @library
  8702. *
  8703. * ```jsx
  8704. * function MyComponent() {
  8705. * const x = useMotionValue(0)
  8706. * const y = useMotionValue(0)
  8707. * const opacity = useMotionValue(1)
  8708. *
  8709. * useEffect(() => {
  8710. * function updateOpacity() {
  8711. * const maxXY = Math.max(x.get(), y.get())
  8712. * const newOpacity = transform(maxXY, [0, 100], [1, 0])
  8713. * opacity.set(newOpacity)
  8714. * }
  8715. *
  8716. * const unsubscribeX = x.onChange(updateOpacity)
  8717. * const unsubscribeY = y.onChange(updateOpacity)
  8718. *
  8719. * return () => {
  8720. * unsubscribeX()
  8721. * unsubscribeY()
  8722. * }
  8723. * }, [])
  8724. *
  8725. * return <Frame x={x} />
  8726. * }
  8727. * ```
  8728. *
  8729. * @motion
  8730. *
  8731. * ```jsx
  8732. * export const MyComponent = () => {
  8733. * const x = useMotionValue(0)
  8734. * const y = useMotionValue(0)
  8735. * const opacity = useMotionValue(1)
  8736. *
  8737. * useEffect(() => {
  8738. * function updateOpacity() {
  8739. * const maxXY = Math.max(x.get(), y.get())
  8740. * const newOpacity = transform(maxXY, [0, 100], [1, 0])
  8741. * opacity.set(newOpacity)
  8742. * }
  8743. *
  8744. * const unsubscribeX = x.onChange(updateOpacity)
  8745. * const unsubscribeY = y.onChange(updateOpacity)
  8746. *
  8747. * return () => {
  8748. * unsubscribeX()
  8749. * unsubscribeY()
  8750. * }
  8751. * }, [])
  8752. *
  8753. * return <motion.div style={{ x }} />
  8754. * }
  8755. * ```
  8756. *
  8757. * @internalremarks
  8758. *
  8759. * We could look into a `useOnChange` hook if the above lifecycle management proves confusing.
  8760. *
  8761. * ```jsx
  8762. * useOnChange(x, () => {})
  8763. * ```
  8764. *
  8765. * @param subscriber - A function that receives the latest value.
  8766. * @returns A function that, when called, will cancel this subscription.
  8767. *
  8768. * @public
  8769. */
  8770. MotionValue.prototype.onChange = function (subscription) {
  8771. return this.updateSubscribers.add(subscription);
  8772. };
  8773. MotionValue.prototype.clearListeners = function () {
  8774. this.updateSubscribers.clear();
  8775. };
  8776. /**
  8777. * Adds a function that will be notified when the `MotionValue` requests a render.
  8778. *
  8779. * @param subscriber - A function that's provided the latest value.
  8780. * @returns A function that, when called, will cancel this subscription.
  8781. *
  8782. * @internal
  8783. */
  8784. MotionValue.prototype.onRenderRequest = function (subscription) {
  8785. // Render immediately
  8786. subscription(this.get());
  8787. return this.renderSubscribers.add(subscription);
  8788. };
  8789. /**
  8790. * Attaches a passive effect to the `MotionValue`.
  8791. *
  8792. * @internal
  8793. */
  8794. MotionValue.prototype.attach = function (passiveEffect) {
  8795. this.passiveEffect = passiveEffect;
  8796. };
  8797. /**
  8798. * Sets the state of the `MotionValue`.
  8799. *
  8800. * @remarks
  8801. *
  8802. * ```jsx
  8803. * const x = useMotionValue(0)
  8804. * x.set(10)
  8805. * ```
  8806. *
  8807. * @param latest - Latest value to set.
  8808. * @param render - Whether to notify render subscribers. Defaults to `true`
  8809. *
  8810. * @public
  8811. */
  8812. MotionValue.prototype.set = function (v, render) {
  8813. if (render === void 0) { render = true; }
  8814. if (!render || !this.passiveEffect) {
  8815. this.updateAndNotify(v, render);
  8816. }
  8817. else {
  8818. this.passiveEffect(v, this.updateAndNotify);
  8819. }
  8820. };
  8821. /**
  8822. * Returns the latest state of `MotionValue`
  8823. *
  8824. * @returns - The latest state of `MotionValue`
  8825. *
  8826. * @public
  8827. */
  8828. MotionValue.prototype.get = function () {
  8829. return this.current;
  8830. };
  8831. /**
  8832. * @public
  8833. */
  8834. MotionValue.prototype.getPrevious = function () {
  8835. return this.prev;
  8836. };
  8837. /**
  8838. * Returns the latest velocity of `MotionValue`
  8839. *
  8840. * @returns - The latest velocity of `MotionValue`. Returns `0` if the state is non-numerical.
  8841. *
  8842. * @public
  8843. */
  8844. MotionValue.prototype.getVelocity = function () {
  8845. // This could be isFloat(this.prev) && isFloat(this.current), but that would be wasteful
  8846. return this.canTrackVelocity
  8847. ? // These casts could be avoided if parseFloat would be typed better
  8848. (0,popmotion__WEBPACK_IMPORTED_MODULE_2__.velocityPerSecond)(parseFloat(this.current) -
  8849. parseFloat(this.prev), this.timeDelta)
  8850. : 0;
  8851. };
  8852. /**
  8853. * Registers a new animation to control this `MotionValue`. Only one
  8854. * animation can drive a `MotionValue` at one time.
  8855. *
  8856. * ```jsx
  8857. * value.start()
  8858. * ```
  8859. *
  8860. * @param animation - A function that starts the provided animation
  8861. *
  8862. * @internal
  8863. */
  8864. MotionValue.prototype.start = function (animation) {
  8865. var _this = this;
  8866. this.stop();
  8867. return new Promise(function (resolve) {
  8868. _this.hasAnimated = true;
  8869. _this.stopAnimation = animation(resolve);
  8870. }).then(function () { return _this.clearAnimation(); });
  8871. };
  8872. /**
  8873. * Stop the currently active animation.
  8874. *
  8875. * @public
  8876. */
  8877. MotionValue.prototype.stop = function () {
  8878. if (this.stopAnimation)
  8879. this.stopAnimation();
  8880. this.clearAnimation();
  8881. };
  8882. /**
  8883. * Returns `true` if this value is currently animating.
  8884. *
  8885. * @public
  8886. */
  8887. MotionValue.prototype.isAnimating = function () {
  8888. return !!this.stopAnimation;
  8889. };
  8890. MotionValue.prototype.clearAnimation = function () {
  8891. this.stopAnimation = null;
  8892. };
  8893. /**
  8894. * Destroy and clean up subscribers to this `MotionValue`.
  8895. *
  8896. * The `MotionValue` hooks like `useMotionValue` and `useTransform` automatically
  8897. * handle the lifecycle of the returned `MotionValue`, so this method is only necessary if you've manually
  8898. * created a `MotionValue` via the `motionValue` function.
  8899. *
  8900. * @public
  8901. */
  8902. MotionValue.prototype.destroy = function () {
  8903. this.updateSubscribers.clear();
  8904. this.renderSubscribers.clear();
  8905. this.stop();
  8906. };
  8907. return MotionValue;
  8908. }());
  8909. /**
  8910. * @internal
  8911. */
  8912. function motionValue(init) {
  8913. return new MotionValue(init);
  8914. }
  8915. /***/ }),
  8916. /***/ "./node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.js":
  8917. /*!*******************************************************************************!*\
  8918. !*** ./node_modules/framer-motion/dist/es/value/scroll/use-element-scroll.js ***!
  8919. \*******************************************************************************/
  8920. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  8921. __webpack_require__.r(__webpack_exports__);
  8922. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  8923. /* harmony export */ "useElementScroll": () => (/* binding */ useElementScroll)
  8924. /* harmony export */ });
  8925. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  8926. /* harmony import */ var _utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/use-isomorphic-effect.js */ "./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js");
  8927. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  8928. /* harmony import */ var _events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../events/use-dom-event.js */ "./node_modules/framer-motion/dist/es/events/use-dom-event.js");
  8929. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils.js */ "./node_modules/framer-motion/dist/es/value/scroll/utils.js");
  8930. var getElementScrollOffsets = function (element) { return function () {
  8931. return {
  8932. xOffset: element.scrollLeft,
  8933. yOffset: element.scrollTop,
  8934. xMaxOffset: element.scrollWidth - element.offsetWidth,
  8935. yMaxOffset: element.scrollHeight - element.offsetHeight,
  8936. };
  8937. }; };
  8938. /**
  8939. * Returns MotionValues that update when the provided element scrolls:
  8940. *
  8941. * - `scrollX` — Horizontal scroll distance in pixels.
  8942. * - `scrollY` — Vertical scroll distance in pixels.
  8943. * - `scrollXProgress` — Horizontal scroll progress between `0` and `1`.
  8944. * - `scrollYProgress` — Vertical scroll progress between `0` and `1`.
  8945. *
  8946. * This element must be set to `overflow: scroll` on either or both axes to report scroll offset.
  8947. *
  8948. * @library
  8949. *
  8950. * ```jsx
  8951. * import * as React from "react"
  8952. * import {
  8953. * Frame,
  8954. * useElementScroll,
  8955. * useTransform
  8956. * } from "framer"
  8957. *
  8958. * export function MyComponent() {
  8959. * const ref = React.useRef()
  8960. * const { scrollYProgress } = useElementScroll(ref)
  8961. *
  8962. * return (
  8963. * <Frame ref={ref}>
  8964. * <Frame scaleX={scrollYProgress} />
  8965. * </Frame>
  8966. * )
  8967. * }
  8968. * ```
  8969. *
  8970. * @motion
  8971. *
  8972. * ```jsx
  8973. * export const MyComponent = () => {
  8974. * const ref = useRef()
  8975. * const { scrollYProgress } = useElementScroll(ref)
  8976. *
  8977. * return (
  8978. * <div ref={ref}>
  8979. * <motion.div style={{ scaleX: scrollYProgress }} />
  8980. * </div>
  8981. * )
  8982. * }
  8983. * ```
  8984. *
  8985. * @public
  8986. */
  8987. function useElementScroll(ref) {
  8988. var values = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__.useConstant)(_utils_js__WEBPACK_IMPORTED_MODULE_2__.createScrollMotionValues);
  8989. (0,_utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_3__.useIsomorphicLayoutEffect)(function () {
  8990. var element = ref.current;
  8991. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(!!element, "ref provided to useScroll must be passed into a HTML element.");
  8992. if (!element)
  8993. return;
  8994. var updateScrollValues = (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.createScrollUpdater)(values, getElementScrollOffsets(element));
  8995. var scrollListener = (0,_events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_4__.addDomEvent)(element, "scroll", updateScrollValues, { passive: true });
  8996. var resizeListener = (0,_events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_4__.addDomEvent)(element, "resize", updateScrollValues);
  8997. return function () {
  8998. scrollListener && scrollListener();
  8999. resizeListener && resizeListener();
  9000. };
  9001. }, []);
  9002. return values;
  9003. }
  9004. /***/ }),
  9005. /***/ "./node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.js":
  9006. /*!********************************************************************************!*\
  9007. !*** ./node_modules/framer-motion/dist/es/value/scroll/use-viewport-scroll.js ***!
  9008. \********************************************************************************/
  9009. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9010. __webpack_require__.r(__webpack_exports__);
  9011. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9012. /* harmony export */ "useViewportScroll": () => (/* binding */ useViewportScroll)
  9013. /* harmony export */ });
  9014. /* harmony import */ var _utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/use-isomorphic-effect.js */ "./node_modules/framer-motion/dist/es/utils/use-isomorphic-effect.js");
  9015. /* harmony import */ var _events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../events/use-dom-event.js */ "./node_modules/framer-motion/dist/es/events/use-dom-event.js");
  9016. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/framer-motion/dist/es/value/scroll/utils.js");
  9017. var viewportScrollValues;
  9018. function getViewportScrollOffsets() {
  9019. return {
  9020. xOffset: window.pageXOffset,
  9021. yOffset: window.pageYOffset,
  9022. xMaxOffset: document.body.clientWidth - window.innerWidth,
  9023. yMaxOffset: document.body.clientHeight - window.innerHeight,
  9024. };
  9025. }
  9026. var hasListeners = false;
  9027. function addEventListeners() {
  9028. hasListeners = true;
  9029. if (typeof window === "undefined")
  9030. return;
  9031. var updateScrollValues = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createScrollUpdater)(viewportScrollValues, getViewportScrollOffsets);
  9032. (0,_events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__.addDomEvent)(window, "scroll", updateScrollValues, { passive: true });
  9033. (0,_events_use_dom_event_js__WEBPACK_IMPORTED_MODULE_1__.addDomEvent)(window, "resize", updateScrollValues);
  9034. }
  9035. /**
  9036. * Returns MotionValues that update when the viewport scrolls:
  9037. *
  9038. * - `scrollX` — Horizontal scroll distance in pixels.
  9039. * - `scrollY` — Vertical scroll distance in pixels.
  9040. * - `scrollXProgress` — Horizontal scroll progress between `0` and `1`.
  9041. * - `scrollYProgress` — Vertical scroll progress between `0` and `1`.
  9042. *
  9043. * **Warning:** Setting `body` or `html` to `height: 100%` or similar will break the `Progress`
  9044. * values as this breaks the browser's capability to accurately measure the page length.
  9045. *
  9046. * @library
  9047. *
  9048. * ```jsx
  9049. * import * as React from "react"
  9050. * import {
  9051. * Frame,
  9052. * useViewportScroll,
  9053. * useTransform
  9054. * } from "framer"
  9055. *
  9056. * export function MyComponent() {
  9057. * const { scrollYProgress } = useViewportScroll()
  9058. * return <Frame scaleX={scrollYProgress} />
  9059. * }
  9060. * ```
  9061. *
  9062. * @motion
  9063. *
  9064. * ```jsx
  9065. * export const MyComponent = () => {
  9066. * const { scrollYProgress } = useViewportScroll()
  9067. * return <motion.div style={{ scaleX: scrollYProgress }} />
  9068. * }
  9069. * ```
  9070. *
  9071. * @public
  9072. */
  9073. function useViewportScroll() {
  9074. /**
  9075. * Lazy-initialise the viewport scroll values
  9076. */
  9077. if (!viewportScrollValues) {
  9078. viewportScrollValues = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createScrollMotionValues)();
  9079. }
  9080. (0,_utils_use_isomorphic_effect_js__WEBPACK_IMPORTED_MODULE_2__.useIsomorphicLayoutEffect)(function () {
  9081. !hasListeners && addEventListeners();
  9082. }, []);
  9083. return viewportScrollValues;
  9084. }
  9085. /***/ }),
  9086. /***/ "./node_modules/framer-motion/dist/es/value/scroll/utils.js":
  9087. /*!******************************************************************!*\
  9088. !*** ./node_modules/framer-motion/dist/es/value/scroll/utils.js ***!
  9089. \******************************************************************/
  9090. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9091. __webpack_require__.r(__webpack_exports__);
  9092. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9093. /* harmony export */ "createScrollMotionValues": () => (/* binding */ createScrollMotionValues),
  9094. /* harmony export */ "createScrollUpdater": () => (/* binding */ createScrollUpdater)
  9095. /* harmony export */ });
  9096. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  9097. function createScrollMotionValues() {
  9098. return {
  9099. scrollX: (0,_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(0),
  9100. scrollY: (0,_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(0),
  9101. scrollXProgress: (0,_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(0),
  9102. scrollYProgress: (0,_index_js__WEBPACK_IMPORTED_MODULE_0__.motionValue)(0),
  9103. };
  9104. }
  9105. function setProgress(offset, maxOffset, value) {
  9106. value.set(!offset || !maxOffset ? 0 : offset / maxOffset);
  9107. }
  9108. function createScrollUpdater(values, getOffsets) {
  9109. var update = function () {
  9110. var _a = getOffsets(), xOffset = _a.xOffset, yOffset = _a.yOffset, xMaxOffset = _a.xMaxOffset, yMaxOffset = _a.yMaxOffset;
  9111. // Set absolute positions
  9112. values.scrollX.set(xOffset);
  9113. values.scrollY.set(yOffset);
  9114. // Set 0-1 progress
  9115. setProgress(xOffset, xMaxOffset, values.scrollXProgress);
  9116. setProgress(yOffset, yMaxOffset, values.scrollYProgress);
  9117. };
  9118. update();
  9119. return update;
  9120. }
  9121. /***/ }),
  9122. /***/ "./node_modules/framer-motion/dist/es/value/use-combine-values.js":
  9123. /*!************************************************************************!*\
  9124. !*** ./node_modules/framer-motion/dist/es/value/use-combine-values.js ***!
  9125. \************************************************************************/
  9126. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9127. __webpack_require__.r(__webpack_exports__);
  9128. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9129. /* harmony export */ "useCombineMotionValues": () => (/* binding */ useCombineMotionValues)
  9130. /* harmony export */ });
  9131. /* harmony import */ var framesync__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framesync */ "./node_modules/framesync/dist/es/index.js");
  9132. /* harmony import */ var _use_motion_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-motion-value.js */ "./node_modules/framer-motion/dist/es/value/use-motion-value.js");
  9133. /* harmony import */ var _use_on_change_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-on-change.js */ "./node_modules/framer-motion/dist/es/value/use-on-change.js");
  9134. function useCombineMotionValues(values, combineValues) {
  9135. /**
  9136. * Initialise the returned motion value. This remains the same between renders.
  9137. */
  9138. var value = (0,_use_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.useMotionValue)(combineValues());
  9139. /**
  9140. * Create a function that will update the template motion value with the latest values.
  9141. * This is pre-bound so whenever a motion value updates it can schedule its
  9142. * execution in Framesync. If it's already been scheduled it won't be fired twice
  9143. * in a single frame.
  9144. */
  9145. var updateValue = function () { return value.set(combineValues()); };
  9146. /**
  9147. * Synchronously update the motion value with the latest values during the render.
  9148. * This ensures that within a React render, the styles applied to the DOM are up-to-date.
  9149. */
  9150. updateValue();
  9151. /**
  9152. * Subscribe to all motion values found within the template. Whenever any of them change,
  9153. * schedule an update.
  9154. */
  9155. (0,_use_on_change_js__WEBPACK_IMPORTED_MODULE_2__.useMultiOnChange)(values, function () { return framesync__WEBPACK_IMPORTED_MODULE_0__["default"].update(updateValue, false, true); });
  9156. return value;
  9157. }
  9158. /***/ }),
  9159. /***/ "./node_modules/framer-motion/dist/es/value/use-inverted-scale.js":
  9160. /*!************************************************************************!*\
  9161. !*** ./node_modules/framer-motion/dist/es/value/use-inverted-scale.js ***!
  9162. \************************************************************************/
  9163. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9164. __webpack_require__.r(__webpack_exports__);
  9165. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9166. /* harmony export */ "invertScale": () => (/* binding */ invertScale),
  9167. /* harmony export */ "useInvertedScale": () => (/* binding */ useInvertedScale)
  9168. /* harmony export */ });
  9169. /* harmony import */ var _context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../context/MotionContext/index.js */ "./node_modules/framer-motion/dist/es/context/MotionContext/index.js");
  9170. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  9171. /* harmony import */ var _use_motion_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-motion-value.js */ "./node_modules/framer-motion/dist/es/value/use-motion-value.js");
  9172. /* harmony import */ var _use_transform_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use-transform.js */ "./node_modules/framer-motion/dist/es/value/use-transform.js");
  9173. // Keep things reasonable and avoid scale: Infinity. In practise we might need
  9174. // to add another value, opacity, that could interpolate scaleX/Y [0,0.01] => [0,1]
  9175. // to simply hide content at unreasonable scales.
  9176. var maxScale = 100000;
  9177. var invertScale = function (scale) {
  9178. return scale > 0.001 ? 1 / scale : maxScale;
  9179. };
  9180. var hasWarned = false;
  9181. /**
  9182. * Returns a `MotionValue` each for `scaleX` and `scaleY` that update with the inverse
  9183. * of their respective parent scales.
  9184. *
  9185. * This is useful for undoing the distortion of content when scaling a parent component.
  9186. *
  9187. * By default, `useInvertedScale` will automatically fetch `scaleX` and `scaleY` from the nearest parent.
  9188. * By passing other `MotionValue`s in as `useInvertedScale({ scaleX, scaleY })`, it will invert the output
  9189. * of those instead.
  9190. *
  9191. * @motion
  9192. *
  9193. * ```jsx
  9194. * const MyComponent = () => {
  9195. * const { scaleX, scaleY } = useInvertedScale()
  9196. * return <motion.div style={{ scaleX, scaleY }} />
  9197. * }
  9198. * ```
  9199. *
  9200. * @library
  9201. *
  9202. * ```jsx
  9203. * function MyComponent() {
  9204. * const { scaleX, scaleY } = useInvertedScale()
  9205. * return <Frame scaleX={scaleX} scaleY={scaleY} />
  9206. * }
  9207. * ```
  9208. *
  9209. * @deprecated
  9210. */
  9211. function useInvertedScale(scale) {
  9212. var parentScaleX = (0,_use_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.useMotionValue)(1);
  9213. var parentScaleY = (0,_use_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.useMotionValue)(1);
  9214. var visualElement = (0,_context_MotionContext_index_js__WEBPACK_IMPORTED_MODULE_2__.useVisualElementContext)();
  9215. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(!!(scale || visualElement), "If no scale values are provided, useInvertedScale must be used within a child of another motion component.");
  9216. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.warning)(hasWarned, "useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead.");
  9217. hasWarned = true;
  9218. if (scale) {
  9219. parentScaleX = scale.scaleX || parentScaleX;
  9220. parentScaleY = scale.scaleY || parentScaleY;
  9221. }
  9222. else if (visualElement) {
  9223. parentScaleX = visualElement.getValue("scaleX", 1);
  9224. parentScaleY = visualElement.getValue("scaleY", 1);
  9225. }
  9226. var scaleX = (0,_use_transform_js__WEBPACK_IMPORTED_MODULE_3__.useTransform)(parentScaleX, invertScale);
  9227. var scaleY = (0,_use_transform_js__WEBPACK_IMPORTED_MODULE_3__.useTransform)(parentScaleY, invertScale);
  9228. return { scaleX: scaleX, scaleY: scaleY };
  9229. }
  9230. /***/ }),
  9231. /***/ "./node_modules/framer-motion/dist/es/value/use-motion-template.js":
  9232. /*!*************************************************************************!*\
  9233. !*** ./node_modules/framer-motion/dist/es/value/use-motion-template.js ***!
  9234. \*************************************************************************/
  9235. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9236. __webpack_require__.r(__webpack_exports__);
  9237. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9238. /* harmony export */ "useMotionTemplate": () => (/* binding */ useMotionTemplate)
  9239. /* harmony export */ });
  9240. /* harmony import */ var _use_combine_values_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./use-combine-values.js */ "./node_modules/framer-motion/dist/es/value/use-combine-values.js");
  9241. /**
  9242. * Combine multiple motion values into a new one using a string template literal.
  9243. *
  9244. * ```jsx
  9245. * import {
  9246. * motion,
  9247. * useSpring,
  9248. * useMotionValue,
  9249. * useMotionTemplate
  9250. * } from "framer-motion"
  9251. *
  9252. * function Component() {
  9253. * const shadowX = useSpring(0)
  9254. * const shadowY = useMotionValue(0)
  9255. * const shadow = useMotionTemplate`drop-shadow(${shadowX}px ${shadowY}px 20px rgba(0,0,0,0.3))`
  9256. *
  9257. * return <motion.div style={{ filter: shadow }} />
  9258. * }
  9259. * ```
  9260. *
  9261. * @public
  9262. */
  9263. function useMotionTemplate(fragments) {
  9264. var values = [];
  9265. for (var _i = 1; _i < arguments.length; _i++) {
  9266. values[_i - 1] = arguments[_i];
  9267. }
  9268. /**
  9269. * Create a function that will build a string from the latest motion values.
  9270. */
  9271. var numFragments = fragments.length;
  9272. function buildValue() {
  9273. var output = "";
  9274. for (var i = 0; i < numFragments; i++) {
  9275. output += fragments[i];
  9276. var value = values[i];
  9277. if (value)
  9278. output += values[i].get();
  9279. }
  9280. return output;
  9281. }
  9282. return (0,_use_combine_values_js__WEBPACK_IMPORTED_MODULE_0__.useCombineMotionValues)(values, buildValue);
  9283. }
  9284. /***/ }),
  9285. /***/ "./node_modules/framer-motion/dist/es/value/use-motion-value.js":
  9286. /*!**********************************************************************!*\
  9287. !*** ./node_modules/framer-motion/dist/es/value/use-motion-value.js ***!
  9288. \**********************************************************************/
  9289. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9290. __webpack_require__.r(__webpack_exports__);
  9291. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9292. /* harmony export */ "useMotionValue": () => (/* binding */ useMotionValue)
  9293. /* harmony export */ });
  9294. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  9295. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  9296. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  9297. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  9298. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  9299. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  9300. /**
  9301. * Creates a `MotionValue` to track the state and velocity of a value.
  9302. *
  9303. * Usually, these are created automatically. For advanced use-cases, like use with `useTransform`, you can create `MotionValue`s externally and pass them into the animated component via the `style` prop.
  9304. *
  9305. * @library
  9306. *
  9307. * ```jsx
  9308. * export function MyComponent() {
  9309. * const scale = useMotionValue(1)
  9310. *
  9311. * return <Frame scale={scale} />
  9312. * }
  9313. * ```
  9314. *
  9315. * @motion
  9316. *
  9317. * ```jsx
  9318. * export const MyComponent = () => {
  9319. * const scale = useMotionValue(1)
  9320. *
  9321. * return <motion.div style={{ scale }} />
  9322. * }
  9323. * ```
  9324. *
  9325. * @param initial - The initial state.
  9326. *
  9327. * @public
  9328. */
  9329. function useMotionValue(initial) {
  9330. var value = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_1__.useConstant)(function () { return (0,_index_js__WEBPACK_IMPORTED_MODULE_2__.motionValue)(initial); });
  9331. /**
  9332. * If this motion value is being used in static mode, like on
  9333. * the Framer canvas, force components to rerender when the motion
  9334. * value is updated.
  9335. */
  9336. var isStatic = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_3__.MotionConfigContext).isStatic;
  9337. if (isStatic) {
  9338. var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__read)((0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(initial), 2), setLatest_1 = _a[1];
  9339. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () { return value.onChange(setLatest_1); }, []);
  9340. }
  9341. return value;
  9342. }
  9343. /***/ }),
  9344. /***/ "./node_modules/framer-motion/dist/es/value/use-on-change.js":
  9345. /*!*******************************************************************!*\
  9346. !*** ./node_modules/framer-motion/dist/es/value/use-on-change.js ***!
  9347. \*******************************************************************/
  9348. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9349. __webpack_require__.r(__webpack_exports__);
  9350. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9351. /* harmony export */ "useMultiOnChange": () => (/* binding */ useMultiOnChange),
  9352. /* harmony export */ "useOnChange": () => (/* binding */ useOnChange)
  9353. /* harmony export */ });
  9354. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  9355. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  9356. /* harmony import */ var _utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  9357. function useOnChange(value, callback) {
  9358. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  9359. if ((0,_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.isMotionValue)(value))
  9360. return value.onChange(callback);
  9361. }, [callback]);
  9362. }
  9363. function useMultiOnChange(values, handler) {
  9364. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  9365. var subscriptions = values.map(function (value) { return value.onChange(handler); });
  9366. return function () { return subscriptions.forEach(function (unsubscribe) { return unsubscribe(); }); };
  9367. });
  9368. }
  9369. /***/ }),
  9370. /***/ "./node_modules/framer-motion/dist/es/value/use-spring.js":
  9371. /*!****************************************************************!*\
  9372. !*** ./node_modules/framer-motion/dist/es/value/use-spring.js ***!
  9373. \****************************************************************/
  9374. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9375. __webpack_require__.r(__webpack_exports__);
  9376. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9377. /* harmony export */ "useSpring": () => (/* binding */ useSpring)
  9378. /* harmony export */ });
  9379. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  9380. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  9381. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  9382. /* harmony import */ var _context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../context/MotionConfigContext.js */ "./node_modules/framer-motion/dist/es/context/MotionConfigContext.js");
  9383. /* harmony import */ var popmotion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! popmotion */ "./node_modules/popmotion/dist/es/animations/index.js");
  9384. /* harmony import */ var _utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils/is-motion-value.js */ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js");
  9385. /* harmony import */ var _use_motion_value_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./use-motion-value.js */ "./node_modules/framer-motion/dist/es/value/use-motion-value.js");
  9386. /* harmony import */ var _use_on_change_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./use-on-change.js */ "./node_modules/framer-motion/dist/es/value/use-on-change.js");
  9387. /**
  9388. * Creates a `MotionValue` that, when `set`, will use a spring animation to animate to its new state.
  9389. *
  9390. * It can either work as a stand-alone `MotionValue` by initialising it with a value, or as a subscriber
  9391. * to another `MotionValue`.
  9392. *
  9393. * @remarks
  9394. *
  9395. * ```jsx
  9396. * const x = useSpring(0, { stiffness: 300 })
  9397. * const y = useSpring(x, { damping: 10 })
  9398. * ```
  9399. *
  9400. * @param inputValue - `MotionValue` or number. If provided a `MotionValue`, when the input `MotionValue` changes, the created `MotionValue` will spring towards that value.
  9401. * @param springConfig - Configuration options for the spring.
  9402. * @returns `MotionValue`
  9403. *
  9404. * @public
  9405. */
  9406. function useSpring(source, config) {
  9407. if (config === void 0) { config = {}; }
  9408. var isStatic = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_context_MotionConfigContext_js__WEBPACK_IMPORTED_MODULE_1__.MotionConfigContext).isStatic;
  9409. var activeSpringAnimation = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
  9410. var value = (0,_use_motion_value_js__WEBPACK_IMPORTED_MODULE_2__.useMotionValue)((0,_utils_is_motion_value_js__WEBPACK_IMPORTED_MODULE_3__.isMotionValue)(source) ? source.get() : source);
  9411. (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
  9412. return value.attach(function (v, set) {
  9413. /**
  9414. * A more hollistic approach to this might be to use isStatic to fix VisualElement animations
  9415. * at that level, but this will work for now
  9416. */
  9417. if (isStatic)
  9418. return set(v);
  9419. if (activeSpringAnimation.current) {
  9420. activeSpringAnimation.current.stop();
  9421. }
  9422. activeSpringAnimation.current = (0,popmotion__WEBPACK_IMPORTED_MODULE_4__.animate)((0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)({ from: value.get(), to: v, velocity: value.getVelocity() }, config), { onUpdate: set }));
  9423. return value.get();
  9424. });
  9425. }, Object.values(config));
  9426. (0,_use_on_change_js__WEBPACK_IMPORTED_MODULE_6__.useOnChange)(source, function (v) { return value.set(parseFloat(v)); });
  9427. return value;
  9428. }
  9429. /***/ }),
  9430. /***/ "./node_modules/framer-motion/dist/es/value/use-transform.js":
  9431. /*!*******************************************************************!*\
  9432. !*** ./node_modules/framer-motion/dist/es/value/use-transform.js ***!
  9433. \*******************************************************************/
  9434. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9435. __webpack_require__.r(__webpack_exports__);
  9436. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9437. /* harmony export */ "useTransform": () => (/* binding */ useTransform)
  9438. /* harmony export */ });
  9439. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  9440. /* harmony import */ var _utils_use_constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/use-constant.js */ "./node_modules/framer-motion/dist/es/utils/use-constant.js");
  9441. /* harmony import */ var _use_combine_values_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./use-combine-values.js */ "./node_modules/framer-motion/dist/es/value/use-combine-values.js");
  9442. /* harmony import */ var _utils_transform_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/transform.js */ "./node_modules/framer-motion/dist/es/utils/transform.js");
  9443. function useTransform(input, inputRangeOrTransformer, outputRange, options) {
  9444. var transformer = typeof inputRangeOrTransformer === "function"
  9445. ? inputRangeOrTransformer
  9446. : (0,_utils_transform_js__WEBPACK_IMPORTED_MODULE_0__.transform)(inputRangeOrTransformer, outputRange, options);
  9447. return Array.isArray(input)
  9448. ? useListTransform(input, transformer)
  9449. : useListTransform([input], function (_a) {
  9450. var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__read)(_a, 1), latest = _b[0];
  9451. return transformer(latest);
  9452. });
  9453. }
  9454. function useListTransform(values, transformer) {
  9455. var latest = (0,_utils_use_constant_js__WEBPACK_IMPORTED_MODULE_2__.useConstant)(function () { return []; });
  9456. return (0,_use_combine_values_js__WEBPACK_IMPORTED_MODULE_3__.useCombineMotionValues)(values, function () {
  9457. latest.length = 0;
  9458. var numValues = values.length;
  9459. for (var i = 0; i < numValues; i++) {
  9460. latest[i] = values[i].get();
  9461. }
  9462. return transformer(latest);
  9463. });
  9464. }
  9465. /***/ }),
  9466. /***/ "./node_modules/framer-motion/dist/es/value/use-velocity.js":
  9467. /*!******************************************************************!*\
  9468. !*** ./node_modules/framer-motion/dist/es/value/use-velocity.js ***!
  9469. \******************************************************************/
  9470. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9471. __webpack_require__.r(__webpack_exports__);
  9472. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9473. /* harmony export */ "useVelocity": () => (/* binding */ useVelocity)
  9474. /* harmony export */ });
  9475. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
  9476. /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
  9477. /* harmony import */ var _use_motion_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./use-motion-value.js */ "./node_modules/framer-motion/dist/es/value/use-motion-value.js");
  9478. /**
  9479. * Creates a `MotionValue` that updates when the velocity of the provided `MotionValue` changes.
  9480. *
  9481. * ```javascript
  9482. * const x = useMotionValue(0)
  9483. * const xVelocity = useVelocity(x)
  9484. * const xAcceleration = useVelocity(xVelocity)
  9485. * ```
  9486. *
  9487. * @public
  9488. */
  9489. function useVelocity(value) {
  9490. var velocity = (0,_use_motion_value_js__WEBPACK_IMPORTED_MODULE_1__.useMotionValue)(value.getVelocity());
  9491. (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
  9492. return value.velocityUpdateSubscribers.add(function (newVelocity) {
  9493. velocity.set(newVelocity);
  9494. });
  9495. }, [value]);
  9496. return velocity;
  9497. }
  9498. /***/ }),
  9499. /***/ "./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js":
  9500. /*!***************************************************************************!*\
  9501. !*** ./node_modules/framer-motion/dist/es/value/utils/is-motion-value.js ***!
  9502. \***************************************************************************/
  9503. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9504. __webpack_require__.r(__webpack_exports__);
  9505. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9506. /* harmony export */ "isMotionValue": () => (/* binding */ isMotionValue)
  9507. /* harmony export */ });
  9508. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  9509. var isMotionValue = function (value) {
  9510. return value instanceof _index_js__WEBPACK_IMPORTED_MODULE_0__.MotionValue;
  9511. };
  9512. /***/ }),
  9513. /***/ "./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js":
  9514. /*!********************************************************************************!*\
  9515. !*** ./node_modules/framer-motion/dist/es/value/utils/resolve-motion-value.js ***!
  9516. \********************************************************************************/
  9517. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9518. __webpack_require__.r(__webpack_exports__);
  9519. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9520. /* harmony export */ "resolveMotionValue": () => (/* binding */ resolveMotionValue)
  9521. /* harmony export */ });
  9522. /* harmony import */ var _utils_resolve_value_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/resolve-value.js */ "./node_modules/framer-motion/dist/es/utils/resolve-value.js");
  9523. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../index.js */ "./node_modules/framer-motion/dist/es/value/index.js");
  9524. /**
  9525. * If the provided value is a MotionValue, this returns the actual value, otherwise just the value itself
  9526. *
  9527. * TODO: Remove and move to library
  9528. *
  9529. * @internal
  9530. */
  9531. function resolveMotionValue(value) {
  9532. var unwrappedValue = value instanceof _index_js__WEBPACK_IMPORTED_MODULE_0__.MotionValue ? value.get() : value;
  9533. return (0,_utils_resolve_value_js__WEBPACK_IMPORTED_MODULE_1__.isCustomValue)(unwrappedValue)
  9534. ? unwrappedValue.toValue()
  9535. : unwrappedValue;
  9536. }
  9537. /***/ }),
  9538. /***/ "./node_modules/framesync/dist/es/create-render-step.js":
  9539. /*!**************************************************************!*\
  9540. !*** ./node_modules/framesync/dist/es/create-render-step.js ***!
  9541. \**************************************************************/
  9542. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9543. __webpack_require__.r(__webpack_exports__);
  9544. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9545. /* harmony export */ "createRenderStep": () => (/* binding */ createRenderStep)
  9546. /* harmony export */ });
  9547. function createRenderStep(runNextFrame) {
  9548. var toRun = [];
  9549. var toRunNextFrame = [];
  9550. var numToRun = 0;
  9551. var isProcessing = false;
  9552. var toKeepAlive = new WeakSet();
  9553. var step = {
  9554. schedule: function (callback, keepAlive, immediate) {
  9555. if (keepAlive === void 0) { keepAlive = false; }
  9556. if (immediate === void 0) { immediate = false; }
  9557. var addToCurrentFrame = immediate && isProcessing;
  9558. var buffer = addToCurrentFrame ? toRun : toRunNextFrame;
  9559. if (keepAlive)
  9560. toKeepAlive.add(callback);
  9561. if (buffer.indexOf(callback) === -1) {
  9562. buffer.push(callback);
  9563. if (addToCurrentFrame && isProcessing)
  9564. numToRun = toRun.length;
  9565. }
  9566. return callback;
  9567. },
  9568. cancel: function (callback) {
  9569. var index = toRunNextFrame.indexOf(callback);
  9570. if (index !== -1)
  9571. toRunNextFrame.splice(index, 1);
  9572. toKeepAlive.delete(callback);
  9573. },
  9574. process: function (frameData) {
  9575. var _a;
  9576. isProcessing = true;
  9577. _a = [toRunNextFrame, toRun], toRun = _a[0], toRunNextFrame = _a[1];
  9578. toRunNextFrame.length = 0;
  9579. numToRun = toRun.length;
  9580. if (numToRun) {
  9581. for (var i = 0; i < numToRun; i++) {
  9582. var callback = toRun[i];
  9583. callback(frameData);
  9584. if (toKeepAlive.has(callback)) {
  9585. step.schedule(callback);
  9586. runNextFrame();
  9587. }
  9588. }
  9589. }
  9590. isProcessing = false;
  9591. },
  9592. };
  9593. return step;
  9594. }
  9595. /***/ }),
  9596. /***/ "./node_modules/framesync/dist/es/index.js":
  9597. /*!*************************************************!*\
  9598. !*** ./node_modules/framesync/dist/es/index.js ***!
  9599. \*************************************************/
  9600. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9601. __webpack_require__.r(__webpack_exports__);
  9602. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9603. /* harmony export */ "cancelSync": () => (/* binding */ cancelSync),
  9604. /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
  9605. /* harmony export */ "getFrameData": () => (/* binding */ getFrameData)
  9606. /* harmony export */ });
  9607. /* harmony import */ var _on_next_frame_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./on-next-frame.js */ "./node_modules/framesync/dist/es/on-next-frame.js");
  9608. /* harmony import */ var _create_render_step_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./create-render-step.js */ "./node_modules/framesync/dist/es/create-render-step.js");
  9609. var maxElapsed = 40;
  9610. var useDefaultElapsed = true;
  9611. var runNextFrame = false;
  9612. var isProcessing = false;
  9613. var frame = {
  9614. delta: 0,
  9615. timestamp: 0
  9616. };
  9617. var stepsOrder = ["read", "update", "preRender", "render", "postRender"];
  9618. var steps = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {
  9619. acc[key] = (0,_create_render_step_js__WEBPACK_IMPORTED_MODULE_1__.createRenderStep)(function () {
  9620. return runNextFrame = true;
  9621. });
  9622. return acc;
  9623. }, {});
  9624. var sync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {
  9625. var step = steps[key];
  9626. acc[key] = function (process, keepAlive, immediate) {
  9627. if (keepAlive === void 0) {
  9628. keepAlive = false;
  9629. }
  9630. if (immediate === void 0) {
  9631. immediate = false;
  9632. }
  9633. if (!runNextFrame) startLoop();
  9634. return step.schedule(process, keepAlive, immediate);
  9635. };
  9636. return acc;
  9637. }, {});
  9638. var cancelSync = /*#__PURE__*/stepsOrder.reduce(function (acc, key) {
  9639. acc[key] = steps[key].cancel;
  9640. return acc;
  9641. }, {});
  9642. var processStep = function (stepId) {
  9643. return steps[stepId].process(frame);
  9644. };
  9645. var processFrame = function (timestamp) {
  9646. runNextFrame = false;
  9647. frame.delta = useDefaultElapsed ? _on_next_frame_js__WEBPACK_IMPORTED_MODULE_0__.defaultTimestep : Math.max(Math.min(timestamp - frame.timestamp, maxElapsed), 1);
  9648. frame.timestamp = timestamp;
  9649. isProcessing = true;
  9650. stepsOrder.forEach(processStep);
  9651. isProcessing = false;
  9652. if (runNextFrame) {
  9653. useDefaultElapsed = false;
  9654. (0,_on_next_frame_js__WEBPACK_IMPORTED_MODULE_0__.onNextFrame)(processFrame);
  9655. }
  9656. };
  9657. var startLoop = function () {
  9658. runNextFrame = true;
  9659. useDefaultElapsed = true;
  9660. if (!isProcessing) (0,_on_next_frame_js__WEBPACK_IMPORTED_MODULE_0__.onNextFrame)(processFrame);
  9661. };
  9662. var getFrameData = function () {
  9663. return frame;
  9664. };
  9665. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (sync);
  9666. /***/ }),
  9667. /***/ "./node_modules/framesync/dist/es/on-next-frame.js":
  9668. /*!*********************************************************!*\
  9669. !*** ./node_modules/framesync/dist/es/on-next-frame.js ***!
  9670. \*********************************************************/
  9671. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9672. __webpack_require__.r(__webpack_exports__);
  9673. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9674. /* harmony export */ "defaultTimestep": () => (/* binding */ defaultTimestep),
  9675. /* harmony export */ "onNextFrame": () => (/* binding */ onNextFrame)
  9676. /* harmony export */ });
  9677. var defaultTimestep = (1 / 60) * 1000;
  9678. var getCurrentTime = typeof performance !== "undefined"
  9679. ? function () { return performance.now(); }
  9680. : function () { return Date.now(); };
  9681. var onNextFrame = typeof window !== "undefined"
  9682. ? function (callback) {
  9683. return window.requestAnimationFrame(callback);
  9684. }
  9685. : function (callback) {
  9686. return setTimeout(function () { return callback(getCurrentTime()); }, defaultTimestep);
  9687. };
  9688. /***/ }),
  9689. /***/ "./node_modules/hey-listen/dist/hey-listen.es.js":
  9690. /*!*******************************************************!*\
  9691. !*** ./node_modules/hey-listen/dist/hey-listen.es.js ***!
  9692. \*******************************************************/
  9693. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9694. __webpack_require__.r(__webpack_exports__);
  9695. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9696. /* harmony export */ "invariant": () => (/* binding */ invariant),
  9697. /* harmony export */ "warning": () => (/* binding */ warning)
  9698. /* harmony export */ });
  9699. var warning = function () { };
  9700. var invariant = function () { };
  9701. if (true) {
  9702. warning = function (check, message) {
  9703. if (!check && typeof console !== 'undefined') {
  9704. console.warn(message);
  9705. }
  9706. };
  9707. invariant = function (check, message) {
  9708. if (!check) {
  9709. throw new Error(message);
  9710. }
  9711. };
  9712. }
  9713. /***/ }),
  9714. /***/ "./node_modules/popmotion/dist/es/animations/generators/decay.js":
  9715. /*!***********************************************************************!*\
  9716. !*** ./node_modules/popmotion/dist/es/animations/generators/decay.js ***!
  9717. \***********************************************************************/
  9718. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9719. __webpack_require__.r(__webpack_exports__);
  9720. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9721. /* harmony export */ "decay": () => (/* binding */ decay)
  9722. /* harmony export */ });
  9723. function decay(_a) {
  9724. var _b = _a.velocity, velocity = _b === void 0 ? 0 : _b, _c = _a.from, from = _c === void 0 ? 0 : _c, _d = _a.power, power = _d === void 0 ? 0.8 : _d, _e = _a.timeConstant, timeConstant = _e === void 0 ? 350 : _e, _f = _a.restDelta, restDelta = _f === void 0 ? 0.5 : _f, modifyTarget = _a.modifyTarget;
  9725. var state = { done: false, value: from };
  9726. var amplitude = power * velocity;
  9727. var ideal = from + amplitude;
  9728. var target = modifyTarget === undefined ? ideal : modifyTarget(ideal);
  9729. if (target !== ideal)
  9730. amplitude = target - from;
  9731. return {
  9732. next: function (t) {
  9733. var delta = -amplitude * Math.exp(-t / timeConstant);
  9734. state.done = !(delta > restDelta || delta < -restDelta);
  9735. state.value = state.done ? target : target + delta;
  9736. return state;
  9737. },
  9738. flipTarget: function () { },
  9739. };
  9740. }
  9741. /***/ }),
  9742. /***/ "./node_modules/popmotion/dist/es/animations/generators/keyframes.js":
  9743. /*!***************************************************************************!*\
  9744. !*** ./node_modules/popmotion/dist/es/animations/generators/keyframes.js ***!
  9745. \***************************************************************************/
  9746. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9747. __webpack_require__.r(__webpack_exports__);
  9748. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9749. /* harmony export */ "convertOffsetToTimes": () => (/* binding */ convertOffsetToTimes),
  9750. /* harmony export */ "defaultEasing": () => (/* binding */ defaultEasing),
  9751. /* harmony export */ "defaultOffset": () => (/* binding */ defaultOffset),
  9752. /* harmony export */ "keyframes": () => (/* binding */ keyframes)
  9753. /* harmony export */ });
  9754. /* harmony import */ var _utils_interpolate_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/interpolate.js */ "./node_modules/popmotion/dist/es/utils/interpolate.js");
  9755. /* harmony import */ var _easing_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../easing/index.js */ "./node_modules/popmotion/dist/es/easing/index.js");
  9756. function defaultEasing(values, easing) {
  9757. return values.map(function () { return easing || _easing_index_js__WEBPACK_IMPORTED_MODULE_0__.easeInOut; }).splice(0, values.length - 1);
  9758. }
  9759. function defaultOffset(values) {
  9760. var numValues = values.length;
  9761. return values.map(function (_value, i) {
  9762. return i !== 0 ? i / (numValues - 1) : 0;
  9763. });
  9764. }
  9765. function convertOffsetToTimes(offset, duration) {
  9766. return offset.map(function (o) { return o * duration; });
  9767. }
  9768. function keyframes(_a) {
  9769. var _b = _a.from, from = _b === void 0 ? 0 : _b, _c = _a.to, to = _c === void 0 ? 1 : _c, ease = _a.ease, offset = _a.offset, _d = _a.duration, duration = _d === void 0 ? 300 : _d;
  9770. var state = { done: false, value: from };
  9771. var values = Array.isArray(to) ? to : [from, to];
  9772. var times = convertOffsetToTimes(offset && offset.length === values.length
  9773. ? offset
  9774. : defaultOffset(values), duration);
  9775. function createInterpolator() {
  9776. return (0,_utils_interpolate_js__WEBPACK_IMPORTED_MODULE_1__.interpolate)(times, values, {
  9777. ease: Array.isArray(ease) ? ease : defaultEasing(values, ease),
  9778. });
  9779. }
  9780. var interpolator = createInterpolator();
  9781. return {
  9782. next: function (t) {
  9783. state.value = interpolator(t);
  9784. state.done = t >= duration;
  9785. return state;
  9786. },
  9787. flipTarget: function () {
  9788. values.reverse();
  9789. interpolator = createInterpolator();
  9790. },
  9791. };
  9792. }
  9793. /***/ }),
  9794. /***/ "./node_modules/popmotion/dist/es/animations/generators/spring.js":
  9795. /*!************************************************************************!*\
  9796. !*** ./node_modules/popmotion/dist/es/animations/generators/spring.js ***!
  9797. \************************************************************************/
  9798. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9799. __webpack_require__.r(__webpack_exports__);
  9800. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9801. /* harmony export */ "spring": () => (/* binding */ spring)
  9802. /* harmony export */ });
  9803. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  9804. /* harmony import */ var _utils_find_spring_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/find-spring.js */ "./node_modules/popmotion/dist/es/animations/utils/find-spring.js");
  9805. var durationKeys = ["duration", "bounce"];
  9806. var physicsKeys = ["stiffness", "damping", "mass"];
  9807. function isSpringType(options, keys) {
  9808. return keys.some(function (key) { return options[key] !== undefined; });
  9809. }
  9810. function getSpringOptions(options) {
  9811. var springOptions = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({ velocity: 0.0, stiffness: 100, damping: 10, mass: 1.0, isResolvedFromDuration: false }, options);
  9812. if (!isSpringType(options, physicsKeys) &&
  9813. isSpringType(options, durationKeys)) {
  9814. var derived = (0,_utils_find_spring_js__WEBPACK_IMPORTED_MODULE_1__.findSpring)(options);
  9815. springOptions = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, springOptions), derived), { velocity: 0.0, mass: 1.0 });
  9816. springOptions.isResolvedFromDuration = true;
  9817. }
  9818. return springOptions;
  9819. }
  9820. function spring(_a) {
  9821. var _b = _a.from, from = _b === void 0 ? 0.0 : _b, _c = _a.to, to = _c === void 0 ? 1.0 : _c, _d = _a.restSpeed, restSpeed = _d === void 0 ? 2 : _d, restDelta = _a.restDelta, options = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__rest)(_a, ["from", "to", "restSpeed", "restDelta"]);
  9822. var state = { done: false, value: from };
  9823. var _e = getSpringOptions(options), stiffness = _e.stiffness, damping = _e.damping, mass = _e.mass, velocity = _e.velocity, isResolvedFromDuration = _e.isResolvedFromDuration;
  9824. var resolveSpring = zero;
  9825. var resolveVelocity = zero;
  9826. function createSpring() {
  9827. var initialVelocity = velocity ? -(velocity / 1000) : 0.0;
  9828. var initialDelta = to - from;
  9829. var dampingRatio = damping / (2 * Math.sqrt(stiffness * mass));
  9830. var undampedAngularFreq = Math.sqrt(stiffness / mass) / 1000;
  9831. restDelta !== null && restDelta !== void 0 ? restDelta : (restDelta = Math.abs(to - from) <= 1 ? 0.01 : 0.4);
  9832. if (dampingRatio < 1) {
  9833. var angularFreq_1 = (0,_utils_find_spring_js__WEBPACK_IMPORTED_MODULE_1__.calcAngularFreq)(undampedAngularFreq, dampingRatio);
  9834. resolveSpring = function (t) {
  9835. var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
  9836. return (to -
  9837. envelope *
  9838. (((initialVelocity +
  9839. dampingRatio * undampedAngularFreq * initialDelta) /
  9840. angularFreq_1) *
  9841. Math.sin(angularFreq_1 * t) +
  9842. initialDelta * Math.cos(angularFreq_1 * t)));
  9843. };
  9844. resolveVelocity = function (t) {
  9845. var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
  9846. return (dampingRatio *
  9847. undampedAngularFreq *
  9848. envelope *
  9849. ((Math.sin(angularFreq_1 * t) *
  9850. (initialVelocity +
  9851. dampingRatio *
  9852. undampedAngularFreq *
  9853. initialDelta)) /
  9854. angularFreq_1 +
  9855. initialDelta * Math.cos(angularFreq_1 * t)) -
  9856. envelope *
  9857. (Math.cos(angularFreq_1 * t) *
  9858. (initialVelocity +
  9859. dampingRatio *
  9860. undampedAngularFreq *
  9861. initialDelta) -
  9862. angularFreq_1 *
  9863. initialDelta *
  9864. Math.sin(angularFreq_1 * t)));
  9865. };
  9866. }
  9867. else if (dampingRatio === 1) {
  9868. resolveSpring = function (t) {
  9869. return to -
  9870. Math.exp(-undampedAngularFreq * t) *
  9871. (initialDelta +
  9872. (initialVelocity + undampedAngularFreq * initialDelta) *
  9873. t);
  9874. };
  9875. }
  9876. else {
  9877. var dampedAngularFreq_1 = undampedAngularFreq * Math.sqrt(dampingRatio * dampingRatio - 1);
  9878. resolveSpring = function (t) {
  9879. var envelope = Math.exp(-dampingRatio * undampedAngularFreq * t);
  9880. var freqForT = Math.min(dampedAngularFreq_1 * t, 300);
  9881. return (to -
  9882. (envelope *
  9883. ((initialVelocity +
  9884. dampingRatio * undampedAngularFreq * initialDelta) *
  9885. Math.sinh(freqForT) +
  9886. dampedAngularFreq_1 *
  9887. initialDelta *
  9888. Math.cosh(freqForT))) /
  9889. dampedAngularFreq_1);
  9890. };
  9891. }
  9892. }
  9893. createSpring();
  9894. return {
  9895. next: function (t) {
  9896. var current = resolveSpring(t);
  9897. if (!isResolvedFromDuration) {
  9898. var currentVelocity = resolveVelocity(t) * 1000;
  9899. var isBelowVelocityThreshold = Math.abs(currentVelocity) <= restSpeed;
  9900. var isBelowDisplacementThreshold = Math.abs(to - current) <= restDelta;
  9901. state.done =
  9902. isBelowVelocityThreshold && isBelowDisplacementThreshold;
  9903. }
  9904. else {
  9905. state.done = t >= options.duration;
  9906. }
  9907. state.value = state.done ? to : current;
  9908. return state;
  9909. },
  9910. flipTarget: function () {
  9911. var _a;
  9912. velocity = -velocity;
  9913. _a = [to, from], from = _a[0], to = _a[1];
  9914. createSpring();
  9915. },
  9916. };
  9917. }
  9918. spring.needsInterpolation = function (a, b) {
  9919. return typeof a === "string" || typeof b === "string";
  9920. };
  9921. var zero = function (_t) { return 0; };
  9922. /***/ }),
  9923. /***/ "./node_modules/popmotion/dist/es/animations/index.js":
  9924. /*!************************************************************!*\
  9925. !*** ./node_modules/popmotion/dist/es/animations/index.js ***!
  9926. \************************************************************/
  9927. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  9928. __webpack_require__.r(__webpack_exports__);
  9929. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  9930. /* harmony export */ "animate": () => (/* binding */ animate)
  9931. /* harmony export */ });
  9932. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  9933. /* harmony import */ var _utils_detect_animation_from_options_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./utils/detect-animation-from-options.js */ "./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js");
  9934. /* harmony import */ var framesync__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framesync */ "./node_modules/framesync/dist/es/index.js");
  9935. /* harmony import */ var _utils_interpolate_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/interpolate.js */ "./node_modules/popmotion/dist/es/utils/interpolate.js");
  9936. /* harmony import */ var _utils_elapsed_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils/elapsed.js */ "./node_modules/popmotion/dist/es/animations/utils/elapsed.js");
  9937. var framesync = function (update) {
  9938. var passTimestamp = function (_a) {
  9939. var delta = _a.delta;
  9940. return update(delta);
  9941. };
  9942. return {
  9943. start: function () { return framesync__WEBPACK_IMPORTED_MODULE_0__["default"].update(passTimestamp, true); },
  9944. stop: function () { return framesync__WEBPACK_IMPORTED_MODULE_0__.cancelSync.update(passTimestamp); },
  9945. };
  9946. };
  9947. function animate(_a) {
  9948. var _b, _c;
  9949. var from = _a.from, _d = _a.autoplay, autoplay = _d === void 0 ? true : _d, _e = _a.driver, driver = _e === void 0 ? framesync : _e, _f = _a.elapsed, elapsed = _f === void 0 ? 0 : _f, _g = _a.repeat, repeatMax = _g === void 0 ? 0 : _g, _h = _a.repeatType, repeatType = _h === void 0 ? "loop" : _h, _j = _a.repeatDelay, repeatDelay = _j === void 0 ? 0 : _j, onPlay = _a.onPlay, onStop = _a.onStop, onComplete = _a.onComplete, onRepeat = _a.onRepeat, onUpdate = _a.onUpdate, options = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__rest)(_a, ["from", "autoplay", "driver", "elapsed", "repeat", "repeatType", "repeatDelay", "onPlay", "onStop", "onComplete", "onRepeat", "onUpdate"]);
  9950. var to = options.to;
  9951. var driverControls;
  9952. var repeatCount = 0;
  9953. var computedDuration = options.duration;
  9954. var latest;
  9955. var isComplete = false;
  9956. var isForwardPlayback = true;
  9957. var interpolateFromNumber;
  9958. var animator = (0,_utils_detect_animation_from_options_js__WEBPACK_IMPORTED_MODULE_2__.detectAnimationFromOptions)(options);
  9959. if ((_c = (_b = animator).needsInterpolation) === null || _c === void 0 ? void 0 : _c.call(_b, from, to)) {
  9960. interpolateFromNumber = (0,_utils_interpolate_js__WEBPACK_IMPORTED_MODULE_3__.interpolate)([0, 100], [from, to], {
  9961. clamp: false,
  9962. });
  9963. from = 0;
  9964. to = 100;
  9965. }
  9966. var animation = animator((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, options), { from: from, to: to }));
  9967. function repeat() {
  9968. repeatCount++;
  9969. if (repeatType === "reverse") {
  9970. isForwardPlayback = repeatCount % 2 === 0;
  9971. elapsed = (0,_utils_elapsed_js__WEBPACK_IMPORTED_MODULE_4__.reverseElapsed)(elapsed, computedDuration, repeatDelay, isForwardPlayback);
  9972. }
  9973. else {
  9974. elapsed = (0,_utils_elapsed_js__WEBPACK_IMPORTED_MODULE_4__.loopElapsed)(elapsed, computedDuration, repeatDelay);
  9975. if (repeatType === "mirror")
  9976. animation.flipTarget();
  9977. }
  9978. isComplete = false;
  9979. onRepeat && onRepeat();
  9980. }
  9981. function complete() {
  9982. driverControls.stop();
  9983. onComplete && onComplete();
  9984. }
  9985. function update(delta) {
  9986. if (!isForwardPlayback)
  9987. delta = -delta;
  9988. elapsed += delta;
  9989. if (!isComplete) {
  9990. var state = animation.next(Math.max(0, elapsed));
  9991. latest = state.value;
  9992. if (interpolateFromNumber)
  9993. latest = interpolateFromNumber(latest);
  9994. isComplete = isForwardPlayback ? state.done : elapsed <= 0;
  9995. }
  9996. onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(latest);
  9997. if (isComplete) {
  9998. if (repeatCount === 0)
  9999. computedDuration !== null && computedDuration !== void 0 ? computedDuration : (computedDuration = elapsed);
  10000. if (repeatCount < repeatMax) {
  10001. (0,_utils_elapsed_js__WEBPACK_IMPORTED_MODULE_4__.hasRepeatDelayElapsed)(elapsed, computedDuration, repeatDelay, isForwardPlayback) && repeat();
  10002. }
  10003. else {
  10004. complete();
  10005. }
  10006. }
  10007. }
  10008. function play() {
  10009. onPlay === null || onPlay === void 0 ? void 0 : onPlay();
  10010. driverControls = driver(update);
  10011. driverControls.start();
  10012. }
  10013. autoplay && play();
  10014. return {
  10015. stop: function () {
  10016. onStop === null || onStop === void 0 ? void 0 : onStop();
  10017. driverControls.stop();
  10018. },
  10019. };
  10020. }
  10021. /***/ }),
  10022. /***/ "./node_modules/popmotion/dist/es/animations/inertia.js":
  10023. /*!**************************************************************!*\
  10024. !*** ./node_modules/popmotion/dist/es/animations/inertia.js ***!
  10025. \**************************************************************/
  10026. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10027. __webpack_require__.r(__webpack_exports__);
  10028. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10029. /* harmony export */ "inertia": () => (/* binding */ inertia)
  10030. /* harmony export */ });
  10031. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  10032. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.js */ "./node_modules/popmotion/dist/es/animations/index.js");
  10033. /* harmony import */ var _utils_velocity_per_second_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/velocity-per-second.js */ "./node_modules/popmotion/dist/es/utils/velocity-per-second.js");
  10034. /* harmony import */ var framesync__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! framesync */ "./node_modules/framesync/dist/es/index.js");
  10035. function inertia(_a) {
  10036. var _b = _a.from, from = _b === void 0 ? 0 : _b, _c = _a.velocity, velocity = _c === void 0 ? 0 : _c, min = _a.min, max = _a.max, _d = _a.power, power = _d === void 0 ? 0.8 : _d, _e = _a.timeConstant, timeConstant = _e === void 0 ? 750 : _e, _f = _a.bounceStiffness, bounceStiffness = _f === void 0 ? 500 : _f, _g = _a.bounceDamping, bounceDamping = _g === void 0 ? 10 : _g, _h = _a.restDelta, restDelta = _h === void 0 ? 1 : _h, modifyTarget = _a.modifyTarget, driver = _a.driver, onUpdate = _a.onUpdate, onComplete = _a.onComplete;
  10037. var currentAnimation;
  10038. function isOutOfBounds(v) {
  10039. return (min !== undefined && v < min) || (max !== undefined && v > max);
  10040. }
  10041. function boundaryNearest(v) {
  10042. if (min === undefined)
  10043. return max;
  10044. if (max === undefined)
  10045. return min;
  10046. return Math.abs(min - v) < Math.abs(max - v) ? min : max;
  10047. }
  10048. function startAnimation(options) {
  10049. currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop();
  10050. currentAnimation = (0,_index_js__WEBPACK_IMPORTED_MODULE_1__.animate)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({}, options), { driver: driver, onUpdate: function (v) {
  10051. var _a;
  10052. onUpdate === null || onUpdate === void 0 ? void 0 : onUpdate(v);
  10053. (_a = options.onUpdate) === null || _a === void 0 ? void 0 : _a.call(options, v);
  10054. }, onComplete: onComplete }));
  10055. }
  10056. function startSpring(options) {
  10057. startAnimation((0,tslib__WEBPACK_IMPORTED_MODULE_2__.__assign)({ type: "spring", stiffness: bounceStiffness, damping: bounceDamping, restDelta: restDelta }, options));
  10058. }
  10059. if (isOutOfBounds(from)) {
  10060. startSpring({ from: from, velocity: velocity, to: boundaryNearest(from) });
  10061. }
  10062. else {
  10063. var target = power * velocity + from;
  10064. if (typeof modifyTarget !== "undefined")
  10065. target = modifyTarget(target);
  10066. var boundary_1 = boundaryNearest(target);
  10067. var heading_1 = boundary_1 === min ? -1 : 1;
  10068. var prev_1;
  10069. var current_1;
  10070. var checkBoundary = function (v) {
  10071. prev_1 = current_1;
  10072. current_1 = v;
  10073. velocity = (0,_utils_velocity_per_second_js__WEBPACK_IMPORTED_MODULE_3__.velocityPerSecond)(v - prev_1, (0,framesync__WEBPACK_IMPORTED_MODULE_0__.getFrameData)().delta);
  10074. if ((heading_1 === 1 && v > boundary_1) ||
  10075. (heading_1 === -1 && v < boundary_1)) {
  10076. startSpring({ from: v, to: boundary_1, velocity: velocity });
  10077. }
  10078. };
  10079. startAnimation({
  10080. type: "decay",
  10081. from: from,
  10082. velocity: velocity,
  10083. timeConstant: timeConstant,
  10084. power: power,
  10085. restDelta: restDelta,
  10086. modifyTarget: modifyTarget,
  10087. onUpdate: isOutOfBounds(target) ? checkBoundary : undefined,
  10088. });
  10089. }
  10090. return {
  10091. stop: function () { return currentAnimation === null || currentAnimation === void 0 ? void 0 : currentAnimation.stop(); },
  10092. };
  10093. }
  10094. /***/ }),
  10095. /***/ "./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js":
  10096. /*!******************************************************************************************!*\
  10097. !*** ./node_modules/popmotion/dist/es/animations/utils/detect-animation-from-options.js ***!
  10098. \******************************************************************************************/
  10099. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10100. __webpack_require__.r(__webpack_exports__);
  10101. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10102. /* harmony export */ "detectAnimationFromOptions": () => (/* binding */ detectAnimationFromOptions)
  10103. /* harmony export */ });
  10104. /* harmony import */ var _generators_spring_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../generators/spring.js */ "./node_modules/popmotion/dist/es/animations/generators/spring.js");
  10105. /* harmony import */ var _generators_keyframes_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../generators/keyframes.js */ "./node_modules/popmotion/dist/es/animations/generators/keyframes.js");
  10106. /* harmony import */ var _generators_decay_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../generators/decay.js */ "./node_modules/popmotion/dist/es/animations/generators/decay.js");
  10107. var types = { keyframes: _generators_keyframes_js__WEBPACK_IMPORTED_MODULE_0__.keyframes, spring: _generators_spring_js__WEBPACK_IMPORTED_MODULE_1__.spring, decay: _generators_decay_js__WEBPACK_IMPORTED_MODULE_2__.decay };
  10108. function detectAnimationFromOptions(config) {
  10109. if (Array.isArray(config.to)) {
  10110. return _generators_keyframes_js__WEBPACK_IMPORTED_MODULE_0__.keyframes;
  10111. }
  10112. else if (types[config.type]) {
  10113. return types[config.type];
  10114. }
  10115. var keys = new Set(Object.keys(config));
  10116. if (keys.has("ease") ||
  10117. (keys.has("duration") && !keys.has("dampingRatio"))) {
  10118. return _generators_keyframes_js__WEBPACK_IMPORTED_MODULE_0__.keyframes;
  10119. }
  10120. else if (keys.has("dampingRatio") ||
  10121. keys.has("stiffness") ||
  10122. keys.has("mass") ||
  10123. keys.has("damping") ||
  10124. keys.has("restSpeed") ||
  10125. keys.has("restDelta")) {
  10126. return _generators_spring_js__WEBPACK_IMPORTED_MODULE_1__.spring;
  10127. }
  10128. return _generators_keyframes_js__WEBPACK_IMPORTED_MODULE_0__.keyframes;
  10129. }
  10130. /***/ }),
  10131. /***/ "./node_modules/popmotion/dist/es/animations/utils/elapsed.js":
  10132. /*!********************************************************************!*\
  10133. !*** ./node_modules/popmotion/dist/es/animations/utils/elapsed.js ***!
  10134. \********************************************************************/
  10135. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10136. __webpack_require__.r(__webpack_exports__);
  10137. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10138. /* harmony export */ "hasRepeatDelayElapsed": () => (/* binding */ hasRepeatDelayElapsed),
  10139. /* harmony export */ "loopElapsed": () => (/* binding */ loopElapsed),
  10140. /* harmony export */ "reverseElapsed": () => (/* binding */ reverseElapsed)
  10141. /* harmony export */ });
  10142. function loopElapsed(elapsed, duration, delay) {
  10143. if (delay === void 0) { delay = 0; }
  10144. return elapsed - duration - delay;
  10145. }
  10146. function reverseElapsed(elapsed, duration, delay, isForwardPlayback) {
  10147. if (delay === void 0) { delay = 0; }
  10148. if (isForwardPlayback === void 0) { isForwardPlayback = true; }
  10149. return isForwardPlayback
  10150. ? loopElapsed(duration + -elapsed, duration, delay)
  10151. : duration - (elapsed - duration) + delay;
  10152. }
  10153. function hasRepeatDelayElapsed(elapsed, duration, delay, isForwardPlayback) {
  10154. return isForwardPlayback ? elapsed >= duration + delay : elapsed <= -delay;
  10155. }
  10156. /***/ }),
  10157. /***/ "./node_modules/popmotion/dist/es/animations/utils/find-spring.js":
  10158. /*!************************************************************************!*\
  10159. !*** ./node_modules/popmotion/dist/es/animations/utils/find-spring.js ***!
  10160. \************************************************************************/
  10161. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10162. __webpack_require__.r(__webpack_exports__);
  10163. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10164. /* harmony export */ "calcAngularFreq": () => (/* binding */ calcAngularFreq),
  10165. /* harmony export */ "findSpring": () => (/* binding */ findSpring),
  10166. /* harmony export */ "maxDamping": () => (/* binding */ maxDamping),
  10167. /* harmony export */ "maxDuration": () => (/* binding */ maxDuration),
  10168. /* harmony export */ "minDamping": () => (/* binding */ minDamping),
  10169. /* harmony export */ "minDuration": () => (/* binding */ minDuration)
  10170. /* harmony export */ });
  10171. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  10172. /* harmony import */ var _utils_clamp_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/clamp.js */ "./node_modules/popmotion/dist/es/utils/clamp.js");
  10173. var safeMin = 0.001;
  10174. var minDuration = 0.01;
  10175. var maxDuration = 10.0;
  10176. var minDamping = 0.05;
  10177. var maxDamping = 1;
  10178. function findSpring(_a) {
  10179. var _b = _a.duration, duration = _b === void 0 ? 800 : _b, _c = _a.bounce, bounce = _c === void 0 ? 0.25 : _c, _d = _a.velocity, velocity = _d === void 0 ? 0 : _d, _e = _a.mass, mass = _e === void 0 ? 1 : _e;
  10180. var envelope;
  10181. var derivative;
  10182. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.warning)(duration <= maxDuration * 1000, "Spring duration must be 10 seconds or less");
  10183. var dampingRatio = 1 - bounce;
  10184. dampingRatio = (0,_utils_clamp_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(minDamping, maxDamping, dampingRatio);
  10185. duration = (0,_utils_clamp_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(minDuration, maxDuration, duration / 1000);
  10186. if (dampingRatio < 1) {
  10187. envelope = function (undampedFreq) {
  10188. var exponentialDecay = undampedFreq * dampingRatio;
  10189. var delta = exponentialDecay * duration;
  10190. var a = exponentialDecay - velocity;
  10191. var b = calcAngularFreq(undampedFreq, dampingRatio);
  10192. var c = Math.exp(-delta);
  10193. return safeMin - (a / b) * c;
  10194. };
  10195. derivative = function (undampedFreq) {
  10196. var exponentialDecay = undampedFreq * dampingRatio;
  10197. var delta = exponentialDecay * duration;
  10198. var d = delta * velocity + velocity;
  10199. var e = Math.pow(dampingRatio, 2) * Math.pow(undampedFreq, 2) * duration;
  10200. var f = Math.exp(-delta);
  10201. var g = calcAngularFreq(Math.pow(undampedFreq, 2), dampingRatio);
  10202. var factor = -envelope(undampedFreq) + safeMin > 0 ? -1 : 1;
  10203. return (factor * ((d - e) * f)) / g;
  10204. };
  10205. }
  10206. else {
  10207. envelope = function (undampedFreq) {
  10208. var a = Math.exp(-undampedFreq * duration);
  10209. var b = (undampedFreq - velocity) * duration + 1;
  10210. return -safeMin + a * b;
  10211. };
  10212. derivative = function (undampedFreq) {
  10213. var a = Math.exp(-undampedFreq * duration);
  10214. var b = (velocity - undampedFreq) * (duration * duration);
  10215. return a * b;
  10216. };
  10217. }
  10218. var initialGuess = 5 / duration;
  10219. var undampedFreq = approximateRoot(envelope, derivative, initialGuess);
  10220. if (isNaN(undampedFreq)) {
  10221. return {
  10222. stiffness: 100,
  10223. damping: 10,
  10224. };
  10225. }
  10226. else {
  10227. var stiffness = Math.pow(undampedFreq, 2) * mass;
  10228. return {
  10229. stiffness: stiffness,
  10230. damping: dampingRatio * 2 * Math.sqrt(mass * stiffness),
  10231. };
  10232. }
  10233. }
  10234. var rootIterations = 12;
  10235. function approximateRoot(envelope, derivative, initialGuess) {
  10236. var result = initialGuess;
  10237. for (var i = 1; i < rootIterations; i++) {
  10238. result = result - envelope(result) / derivative(result);
  10239. }
  10240. return result;
  10241. }
  10242. function calcAngularFreq(undampedFreq, dampingRatio) {
  10243. return undampedFreq * Math.sqrt(1 - dampingRatio * dampingRatio);
  10244. }
  10245. /***/ }),
  10246. /***/ "./node_modules/popmotion/dist/es/easing/cubic-bezier.js":
  10247. /*!***************************************************************!*\
  10248. !*** ./node_modules/popmotion/dist/es/easing/cubic-bezier.js ***!
  10249. \***************************************************************/
  10250. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10251. __webpack_require__.r(__webpack_exports__);
  10252. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10253. /* harmony export */ "cubicBezier": () => (/* binding */ cubicBezier)
  10254. /* harmony export */ });
  10255. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.js */ "./node_modules/popmotion/dist/es/easing/index.js");
  10256. var a = function (a1, a2) { return 1.0 - 3.0 * a2 + 3.0 * a1; };
  10257. var b = function (a1, a2) { return 3.0 * a2 - 6.0 * a1; };
  10258. var c = function (a1) { return 3.0 * a1; };
  10259. var calcBezier = function (t, a1, a2) {
  10260. return ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;
  10261. };
  10262. var getSlope = function (t, a1, a2) {
  10263. return 3.0 * a(a1, a2) * t * t + 2.0 * b(a1, a2) * t + c(a1);
  10264. };
  10265. var subdivisionPrecision = 0.0000001;
  10266. var subdivisionMaxIterations = 10;
  10267. function binarySubdivide(aX, aA, aB, mX1, mX2) {
  10268. var currentX;
  10269. var currentT;
  10270. var i = 0;
  10271. do {
  10272. currentT = aA + (aB - aA) / 2.0;
  10273. currentX = calcBezier(currentT, mX1, mX2) - aX;
  10274. if (currentX > 0.0) {
  10275. aB = currentT;
  10276. }
  10277. else {
  10278. aA = currentT;
  10279. }
  10280. } while (Math.abs(currentX) > subdivisionPrecision &&
  10281. ++i < subdivisionMaxIterations);
  10282. return currentT;
  10283. }
  10284. var newtonIterations = 8;
  10285. var newtonMinSlope = 0.001;
  10286. function newtonRaphsonIterate(aX, aGuessT, mX1, mX2) {
  10287. for (var i = 0; i < newtonIterations; ++i) {
  10288. var currentSlope = getSlope(aGuessT, mX1, mX2);
  10289. if (currentSlope === 0.0) {
  10290. return aGuessT;
  10291. }
  10292. var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
  10293. aGuessT -= currentX / currentSlope;
  10294. }
  10295. return aGuessT;
  10296. }
  10297. var kSplineTableSize = 11;
  10298. var kSampleStepSize = 1.0 / (kSplineTableSize - 1.0);
  10299. function cubicBezier(mX1, mY1, mX2, mY2) {
  10300. if (mX1 === mY1 && mX2 === mY2)
  10301. return _index_js__WEBPACK_IMPORTED_MODULE_0__.linear;
  10302. var sampleValues = new Float32Array(kSplineTableSize);
  10303. for (var i = 0; i < kSplineTableSize; ++i) {
  10304. sampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);
  10305. }
  10306. function getTForX(aX) {
  10307. var intervalStart = 0.0;
  10308. var currentSample = 1;
  10309. var lastSample = kSplineTableSize - 1;
  10310. for (; currentSample !== lastSample && sampleValues[currentSample] <= aX; ++currentSample) {
  10311. intervalStart += kSampleStepSize;
  10312. }
  10313. --currentSample;
  10314. var dist = (aX - sampleValues[currentSample]) /
  10315. (sampleValues[currentSample + 1] - sampleValues[currentSample]);
  10316. var guessForT = intervalStart + dist * kSampleStepSize;
  10317. var initialSlope = getSlope(guessForT, mX1, mX2);
  10318. if (initialSlope >= newtonMinSlope) {
  10319. return newtonRaphsonIterate(aX, guessForT, mX1, mX2);
  10320. }
  10321. else if (initialSlope === 0.0) {
  10322. return guessForT;
  10323. }
  10324. else {
  10325. return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize, mX1, mX2);
  10326. }
  10327. }
  10328. return function (t) {
  10329. return t === 0 || t === 1 ? t : calcBezier(getTForX(t), mY1, mY2);
  10330. };
  10331. }
  10332. /***/ }),
  10333. /***/ "./node_modules/popmotion/dist/es/easing/index.js":
  10334. /*!********************************************************!*\
  10335. !*** ./node_modules/popmotion/dist/es/easing/index.js ***!
  10336. \********************************************************/
  10337. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10338. __webpack_require__.r(__webpack_exports__);
  10339. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10340. /* harmony export */ "anticipate": () => (/* binding */ anticipate),
  10341. /* harmony export */ "backIn": () => (/* binding */ backIn),
  10342. /* harmony export */ "backInOut": () => (/* binding */ backInOut),
  10343. /* harmony export */ "backOut": () => (/* binding */ backOut),
  10344. /* harmony export */ "bounceIn": () => (/* binding */ bounceIn),
  10345. /* harmony export */ "bounceInOut": () => (/* binding */ bounceInOut),
  10346. /* harmony export */ "bounceOut": () => (/* binding */ bounceOut),
  10347. /* harmony export */ "circIn": () => (/* binding */ circIn),
  10348. /* harmony export */ "circInOut": () => (/* binding */ circInOut),
  10349. /* harmony export */ "circOut": () => (/* binding */ circOut),
  10350. /* harmony export */ "easeIn": () => (/* binding */ easeIn),
  10351. /* harmony export */ "easeInOut": () => (/* binding */ easeInOut),
  10352. /* harmony export */ "easeOut": () => (/* binding */ easeOut),
  10353. /* harmony export */ "linear": () => (/* binding */ linear)
  10354. /* harmony export */ });
  10355. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/popmotion/dist/es/easing/utils.js");
  10356. var DEFAULT_OVERSHOOT_STRENGTH = 1.525;
  10357. var BOUNCE_FIRST_THRESHOLD = 4.0 / 11.0;
  10358. var BOUNCE_SECOND_THRESHOLD = 8.0 / 11.0;
  10359. var BOUNCE_THIRD_THRESHOLD = 9.0 / 10.0;
  10360. var linear = function (p) { return p; };
  10361. var easeIn = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createExpoIn)(2);
  10362. var easeOut = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.reverseEasing)(easeIn);
  10363. var easeInOut = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.mirrorEasing)(easeIn);
  10364. var circIn = function (p) { return 1 - Math.sin(Math.acos(p)); };
  10365. var circOut = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.reverseEasing)(circIn);
  10366. var circInOut = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.mirrorEasing)(circOut);
  10367. var backIn = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createBackIn)(DEFAULT_OVERSHOOT_STRENGTH);
  10368. var backOut = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.reverseEasing)(backIn);
  10369. var backInOut = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.mirrorEasing)(backIn);
  10370. var anticipate = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.createAnticipate)(DEFAULT_OVERSHOOT_STRENGTH);
  10371. var ca = 4356.0 / 361.0;
  10372. var cb = 35442.0 / 1805.0;
  10373. var cc = 16061.0 / 1805.0;
  10374. var bounceOut = function (p) {
  10375. if (p === 1 || p === 0)
  10376. return p;
  10377. var p2 = p * p;
  10378. return p < BOUNCE_FIRST_THRESHOLD
  10379. ? 7.5625 * p2
  10380. : p < BOUNCE_SECOND_THRESHOLD
  10381. ? 9.075 * p2 - 9.9 * p + 3.4
  10382. : p < BOUNCE_THIRD_THRESHOLD
  10383. ? ca * p2 - cb * p + cc
  10384. : 10.8 * p * p - 20.52 * p + 10.72;
  10385. };
  10386. var bounceIn = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.reverseEasing)(bounceOut);
  10387. var bounceInOut = function (p) {
  10388. return p < 0.5
  10389. ? 0.5 * (1.0 - bounceOut(1.0 - p * 2.0))
  10390. : 0.5 * bounceOut(p * 2.0 - 1.0) + 0.5;
  10391. };
  10392. /***/ }),
  10393. /***/ "./node_modules/popmotion/dist/es/easing/utils.js":
  10394. /*!********************************************************!*\
  10395. !*** ./node_modules/popmotion/dist/es/easing/utils.js ***!
  10396. \********************************************************/
  10397. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10398. __webpack_require__.r(__webpack_exports__);
  10399. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10400. /* harmony export */ "createAnticipate": () => (/* binding */ createAnticipate),
  10401. /* harmony export */ "createBackIn": () => (/* binding */ createBackIn),
  10402. /* harmony export */ "createExpoIn": () => (/* binding */ createExpoIn),
  10403. /* harmony export */ "mirrorEasing": () => (/* binding */ mirrorEasing),
  10404. /* harmony export */ "reverseEasing": () => (/* binding */ reverseEasing)
  10405. /* harmony export */ });
  10406. var reverseEasing = function (easing) { return function (p) { return 1 - easing(1 - p); }; };
  10407. var mirrorEasing = function (easing) { return function (p) {
  10408. return p <= 0.5 ? easing(2 * p) / 2 : (2 - easing(2 * (1 - p))) / 2;
  10409. }; };
  10410. var createExpoIn = function (power) { return function (p) { return Math.pow(p, power); }; };
  10411. var createBackIn = function (power) { return function (p) {
  10412. return p * p * ((power + 1) * p - power);
  10413. }; };
  10414. var createAnticipate = function (power) {
  10415. var backEasing = createBackIn(power);
  10416. return function (p) {
  10417. return (p *= 2) < 1
  10418. ? 0.5 * backEasing(p)
  10419. : 0.5 * (2 - Math.pow(2, -10 * (p - 1)));
  10420. };
  10421. };
  10422. /***/ }),
  10423. /***/ "./node_modules/popmotion/dist/es/utils/clamp.js":
  10424. /*!*******************************************************!*\
  10425. !*** ./node_modules/popmotion/dist/es/utils/clamp.js ***!
  10426. \*******************************************************/
  10427. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10428. __webpack_require__.r(__webpack_exports__);
  10429. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10430. /* harmony export */ "clamp": () => (/* binding */ clamp)
  10431. /* harmony export */ });
  10432. var clamp = function (min, max, v) {
  10433. return Math.min(Math.max(v, min), max);
  10434. };
  10435. /***/ }),
  10436. /***/ "./node_modules/popmotion/dist/es/utils/distance.js":
  10437. /*!**********************************************************!*\
  10438. !*** ./node_modules/popmotion/dist/es/utils/distance.js ***!
  10439. \**********************************************************/
  10440. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10441. __webpack_require__.r(__webpack_exports__);
  10442. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10443. /* harmony export */ "distance": () => (/* binding */ distance)
  10444. /* harmony export */ });
  10445. /* harmony import */ var _is_point_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./is-point.js */ "./node_modules/popmotion/dist/es/utils/is-point.js");
  10446. /* harmony import */ var _is_point_3d_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./is-point-3d.js */ "./node_modules/popmotion/dist/es/utils/is-point-3d.js");
  10447. /* harmony import */ var _inc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./inc.js */ "./node_modules/popmotion/dist/es/utils/inc.js");
  10448. var distance1D = function (a, b) { return Math.abs(a - b); };
  10449. function distance(a, b) {
  10450. if ((0,_inc_js__WEBPACK_IMPORTED_MODULE_0__.isNum)(a) && (0,_inc_js__WEBPACK_IMPORTED_MODULE_0__.isNum)(b)) {
  10451. return distance1D(a, b);
  10452. }
  10453. else if ((0,_is_point_js__WEBPACK_IMPORTED_MODULE_1__.isPoint)(a) && (0,_is_point_js__WEBPACK_IMPORTED_MODULE_1__.isPoint)(b)) {
  10454. var xDelta = distance1D(a.x, b.x);
  10455. var yDelta = distance1D(a.y, b.y);
  10456. var zDelta = (0,_is_point_3d_js__WEBPACK_IMPORTED_MODULE_2__.isPoint3D)(a) && (0,_is_point_3d_js__WEBPACK_IMPORTED_MODULE_2__.isPoint3D)(b) ? distance1D(a.z, b.z) : 0;
  10457. return Math.sqrt(Math.pow(xDelta, 2) + Math.pow(yDelta, 2) + Math.pow(zDelta, 2));
  10458. }
  10459. }
  10460. /***/ }),
  10461. /***/ "./node_modules/popmotion/dist/es/utils/inc.js":
  10462. /*!*****************************************************!*\
  10463. !*** ./node_modules/popmotion/dist/es/utils/inc.js ***!
  10464. \*****************************************************/
  10465. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10466. __webpack_require__.r(__webpack_exports__);
  10467. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10468. /* harmony export */ "isNum": () => (/* binding */ isNum),
  10469. /* harmony export */ "zeroPoint": () => (/* binding */ zeroPoint)
  10470. /* harmony export */ });
  10471. var zeroPoint = {
  10472. x: 0,
  10473. y: 0,
  10474. z: 0
  10475. };
  10476. var isNum = function (v) { return typeof v === 'number'; };
  10477. /***/ }),
  10478. /***/ "./node_modules/popmotion/dist/es/utils/interpolate.js":
  10479. /*!*************************************************************!*\
  10480. !*** ./node_modules/popmotion/dist/es/utils/interpolate.js ***!
  10481. \*************************************************************/
  10482. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10483. __webpack_require__.r(__webpack_exports__);
  10484. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10485. /* harmony export */ "interpolate": () => (/* binding */ interpolate)
  10486. /* harmony export */ });
  10487. /* harmony import */ var _progress_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./progress.js */ "./node_modules/popmotion/dist/es/utils/progress.js");
  10488. /* harmony import */ var _mix_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mix.js */ "./node_modules/popmotion/dist/es/utils/mix.js");
  10489. /* harmony import */ var _mix_color_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mix-color.js */ "./node_modules/popmotion/dist/es/utils/mix-color.js");
  10490. /* harmony import */ var _mix_complex_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mix-complex.js */ "./node_modules/popmotion/dist/es/utils/mix-complex.js");
  10491. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/color/index.js");
  10492. /* harmony import */ var _clamp_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./clamp.js */ "./node_modules/popmotion/dist/es/utils/clamp.js");
  10493. /* harmony import */ var _pipe_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./pipe.js */ "./node_modules/popmotion/dist/es/utils/pipe.js");
  10494. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  10495. var mixNumber = function (from, to) { return function (p) { return (0,_mix_js__WEBPACK_IMPORTED_MODULE_1__.mix)(from, to, p); }; };
  10496. function detectMixerFactory(v) {
  10497. if (typeof v === 'number') {
  10498. return mixNumber;
  10499. }
  10500. else if (typeof v === 'string') {
  10501. if (style_value_types__WEBPACK_IMPORTED_MODULE_2__.color.test(v)) {
  10502. return _mix_color_js__WEBPACK_IMPORTED_MODULE_3__.mixColor;
  10503. }
  10504. else {
  10505. return _mix_complex_js__WEBPACK_IMPORTED_MODULE_4__.mixComplex;
  10506. }
  10507. }
  10508. else if (Array.isArray(v)) {
  10509. return _mix_complex_js__WEBPACK_IMPORTED_MODULE_4__.mixArray;
  10510. }
  10511. else if (typeof v === 'object') {
  10512. return _mix_complex_js__WEBPACK_IMPORTED_MODULE_4__.mixObject;
  10513. }
  10514. }
  10515. function createMixers(output, ease, customMixer) {
  10516. var mixers = [];
  10517. var mixerFactory = customMixer || detectMixerFactory(output[0]);
  10518. var numMixers = output.length - 1;
  10519. for (var i = 0; i < numMixers; i++) {
  10520. var mixer = mixerFactory(output[i], output[i + 1]);
  10521. if (ease) {
  10522. var easingFunction = Array.isArray(ease) ? ease[i] : ease;
  10523. mixer = (0,_pipe_js__WEBPACK_IMPORTED_MODULE_5__.pipe)(easingFunction, mixer);
  10524. }
  10525. mixers.push(mixer);
  10526. }
  10527. return mixers;
  10528. }
  10529. function fastInterpolate(_a, _b) {
  10530. var from = _a[0], to = _a[1];
  10531. var mixer = _b[0];
  10532. return function (v) { return mixer((0,_progress_js__WEBPACK_IMPORTED_MODULE_6__.progress)(from, to, v)); };
  10533. }
  10534. function slowInterpolate(input, mixers) {
  10535. var inputLength = input.length;
  10536. var lastInputIndex = inputLength - 1;
  10537. return function (v) {
  10538. var mixerIndex = 0;
  10539. var foundMixerIndex = false;
  10540. if (v <= input[0]) {
  10541. foundMixerIndex = true;
  10542. }
  10543. else if (v >= input[lastInputIndex]) {
  10544. mixerIndex = lastInputIndex - 1;
  10545. foundMixerIndex = true;
  10546. }
  10547. if (!foundMixerIndex) {
  10548. var i = 1;
  10549. for (; i < inputLength; i++) {
  10550. if (input[i] > v || i === lastInputIndex) {
  10551. break;
  10552. }
  10553. }
  10554. mixerIndex = i - 1;
  10555. }
  10556. var progressInRange = (0,_progress_js__WEBPACK_IMPORTED_MODULE_6__.progress)(input[mixerIndex], input[mixerIndex + 1], v);
  10557. return mixers[mixerIndex](progressInRange);
  10558. };
  10559. }
  10560. function interpolate(input, output, _a) {
  10561. var _b = _a === void 0 ? {} : _a, _c = _b.clamp, isClamp = _c === void 0 ? true : _c, ease = _b.ease, mixer = _b.mixer;
  10562. var inputLength = input.length;
  10563. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(inputLength === output.length, 'Both input and output ranges must be the same length');
  10564. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(!ease || !Array.isArray(ease) || ease.length === inputLength - 1, 'Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values.');
  10565. if (input[0] > input[inputLength - 1]) {
  10566. input = [].concat(input);
  10567. output = [].concat(output);
  10568. input.reverse();
  10569. output.reverse();
  10570. }
  10571. var mixers = createMixers(output, ease, mixer);
  10572. var interpolator = inputLength === 2
  10573. ? fastInterpolate(input, mixers)
  10574. : slowInterpolate(input, mixers);
  10575. return isClamp
  10576. ? function (v) { return interpolator((0,_clamp_js__WEBPACK_IMPORTED_MODULE_7__.clamp)(input[0], input[inputLength - 1], v)); }
  10577. : interpolator;
  10578. }
  10579. /***/ }),
  10580. /***/ "./node_modules/popmotion/dist/es/utils/is-point-3d.js":
  10581. /*!*************************************************************!*\
  10582. !*** ./node_modules/popmotion/dist/es/utils/is-point-3d.js ***!
  10583. \*************************************************************/
  10584. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10585. __webpack_require__.r(__webpack_exports__);
  10586. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10587. /* harmony export */ "isPoint3D": () => (/* binding */ isPoint3D)
  10588. /* harmony export */ });
  10589. /* harmony import */ var _is_point_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./is-point.js */ "./node_modules/popmotion/dist/es/utils/is-point.js");
  10590. var isPoint3D = function (point) {
  10591. return (0,_is_point_js__WEBPACK_IMPORTED_MODULE_0__.isPoint)(point) && point.hasOwnProperty('z');
  10592. };
  10593. /***/ }),
  10594. /***/ "./node_modules/popmotion/dist/es/utils/is-point.js":
  10595. /*!**********************************************************!*\
  10596. !*** ./node_modules/popmotion/dist/es/utils/is-point.js ***!
  10597. \**********************************************************/
  10598. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10599. __webpack_require__.r(__webpack_exports__);
  10600. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10601. /* harmony export */ "isPoint": () => (/* binding */ isPoint)
  10602. /* harmony export */ });
  10603. var isPoint = function (point) {
  10604. return point.hasOwnProperty('x') && point.hasOwnProperty('y');
  10605. };
  10606. /***/ }),
  10607. /***/ "./node_modules/popmotion/dist/es/utils/mix-color.js":
  10608. /*!***********************************************************!*\
  10609. !*** ./node_modules/popmotion/dist/es/utils/mix-color.js ***!
  10610. \***********************************************************/
  10611. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10612. __webpack_require__.r(__webpack_exports__);
  10613. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10614. /* harmony export */ "mixColor": () => (/* binding */ mixColor),
  10615. /* harmony export */ "mixLinearColor": () => (/* binding */ mixLinearColor)
  10616. /* harmony export */ });
  10617. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  10618. /* harmony import */ var _mix_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./mix.js */ "./node_modules/popmotion/dist/es/utils/mix.js");
  10619. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/color/hex.js");
  10620. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/color/rgba.js");
  10621. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/color/hsla.js");
  10622. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  10623. var mixLinearColor = function (from, to, v) {
  10624. var fromExpo = from * from;
  10625. var toExpo = to * to;
  10626. return Math.sqrt(Math.max(0, v * (toExpo - fromExpo) + fromExpo));
  10627. };
  10628. var colorTypes = [style_value_types__WEBPACK_IMPORTED_MODULE_1__.hex, style_value_types__WEBPACK_IMPORTED_MODULE_2__.rgba, style_value_types__WEBPACK_IMPORTED_MODULE_3__.hsla];
  10629. var getColorType = function (v) {
  10630. return colorTypes.find(function (type) { return type.test(v); });
  10631. };
  10632. var notAnimatable = function (color) {
  10633. return "'" + color + "' is not an animatable color. Use the equivalent color code instead.";
  10634. };
  10635. var mixColor = function (from, to) {
  10636. var fromColorType = getColorType(from);
  10637. var toColorType = getColorType(to);
  10638. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(!!fromColorType, notAnimatable(from));
  10639. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(!!toColorType, notAnimatable(to));
  10640. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(fromColorType.transform === toColorType.transform, "Both colors must be hex/RGBA, OR both must be HSLA.");
  10641. var fromColor = fromColorType.parse(from);
  10642. var toColor = toColorType.parse(to);
  10643. var blended = (0,tslib__WEBPACK_IMPORTED_MODULE_4__.__assign)({}, fromColor);
  10644. var mixFunc = fromColorType === style_value_types__WEBPACK_IMPORTED_MODULE_3__.hsla ? _mix_js__WEBPACK_IMPORTED_MODULE_5__.mix : mixLinearColor;
  10645. return function (v) {
  10646. for (var key in blended) {
  10647. if (key !== "alpha") {
  10648. blended[key] = mixFunc(fromColor[key], toColor[key], v);
  10649. }
  10650. }
  10651. blended.alpha = (0,_mix_js__WEBPACK_IMPORTED_MODULE_5__.mix)(fromColor.alpha, toColor.alpha, v);
  10652. return fromColorType.transform(blended);
  10653. };
  10654. };
  10655. /***/ }),
  10656. /***/ "./node_modules/popmotion/dist/es/utils/mix-complex.js":
  10657. /*!*************************************************************!*\
  10658. !*** ./node_modules/popmotion/dist/es/utils/mix-complex.js ***!
  10659. \*************************************************************/
  10660. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10661. __webpack_require__.r(__webpack_exports__);
  10662. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10663. /* harmony export */ "mixArray": () => (/* binding */ mixArray),
  10664. /* harmony export */ "mixComplex": () => (/* binding */ mixComplex),
  10665. /* harmony export */ "mixObject": () => (/* binding */ mixObject)
  10666. /* harmony export */ });
  10667. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  10668. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/color/index.js");
  10669. /* harmony import */ var style_value_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! style-value-types */ "./node_modules/style-value-types/dist/es/complex/index.js");
  10670. /* harmony import */ var _mix_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mix.js */ "./node_modules/popmotion/dist/es/utils/mix.js");
  10671. /* harmony import */ var _mix_color_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./mix-color.js */ "./node_modules/popmotion/dist/es/utils/mix-color.js");
  10672. /* harmony import */ var _inc_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./inc.js */ "./node_modules/popmotion/dist/es/utils/inc.js");
  10673. /* harmony import */ var _pipe_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./pipe.js */ "./node_modules/popmotion/dist/es/utils/pipe.js");
  10674. /* harmony import */ var hey_listen__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! hey-listen */ "./node_modules/hey-listen/dist/hey-listen.es.js");
  10675. function getMixer(origin, target) {
  10676. if ((0,_inc_js__WEBPACK_IMPORTED_MODULE_1__.isNum)(origin)) {
  10677. return function (v) { return (0,_mix_js__WEBPACK_IMPORTED_MODULE_2__.mix)(origin, target, v); };
  10678. }
  10679. else if (style_value_types__WEBPACK_IMPORTED_MODULE_3__.color.test(origin)) {
  10680. return (0,_mix_color_js__WEBPACK_IMPORTED_MODULE_4__.mixColor)(origin, target);
  10681. }
  10682. else {
  10683. return mixComplex(origin, target);
  10684. }
  10685. }
  10686. var mixArray = function (from, to) {
  10687. var output = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__spreadArrays)(from);
  10688. var numValues = output.length;
  10689. var blendValue = from.map(function (fromThis, i) { return getMixer(fromThis, to[i]); });
  10690. return function (v) {
  10691. for (var i = 0; i < numValues; i++) {
  10692. output[i] = blendValue[i](v);
  10693. }
  10694. return output;
  10695. };
  10696. };
  10697. var mixObject = function (origin, target) {
  10698. var output = (0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_5__.__assign)({}, origin), target);
  10699. var blendValue = {};
  10700. for (var key in output) {
  10701. if (origin[key] !== undefined && target[key] !== undefined) {
  10702. blendValue[key] = getMixer(origin[key], target[key]);
  10703. }
  10704. }
  10705. return function (v) {
  10706. for (var key in blendValue) {
  10707. output[key] = blendValue[key](v);
  10708. }
  10709. return output;
  10710. };
  10711. };
  10712. function analyse(value) {
  10713. var parsed = style_value_types__WEBPACK_IMPORTED_MODULE_6__.complex.parse(value);
  10714. var numValues = parsed.length;
  10715. var numNumbers = 0;
  10716. var numRGB = 0;
  10717. var numHSL = 0;
  10718. for (var i = 0; i < numValues; i++) {
  10719. if (numNumbers || typeof parsed[i] === "number") {
  10720. numNumbers++;
  10721. }
  10722. else {
  10723. if (parsed[i].hue !== undefined) {
  10724. numHSL++;
  10725. }
  10726. else {
  10727. numRGB++;
  10728. }
  10729. }
  10730. }
  10731. return { parsed: parsed, numNumbers: numNumbers, numRGB: numRGB, numHSL: numHSL };
  10732. }
  10733. var mixComplex = function (origin, target) {
  10734. var template = style_value_types__WEBPACK_IMPORTED_MODULE_6__.complex.createTransformer(target);
  10735. var originStats = analyse(origin);
  10736. var targetStats = analyse(target);
  10737. (0,hey_listen__WEBPACK_IMPORTED_MODULE_0__.invariant)(originStats.numHSL === targetStats.numHSL &&
  10738. originStats.numRGB === targetStats.numRGB &&
  10739. originStats.numNumbers >= targetStats.numNumbers, "Complex values '" + origin + "' and '" + target + "' too different to mix. Ensure all colors are of the same type.");
  10740. return (0,_pipe_js__WEBPACK_IMPORTED_MODULE_7__.pipe)(mixArray(originStats.parsed, targetStats.parsed), template);
  10741. };
  10742. /***/ }),
  10743. /***/ "./node_modules/popmotion/dist/es/utils/mix.js":
  10744. /*!*****************************************************!*\
  10745. !*** ./node_modules/popmotion/dist/es/utils/mix.js ***!
  10746. \*****************************************************/
  10747. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10748. __webpack_require__.r(__webpack_exports__);
  10749. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10750. /* harmony export */ "mix": () => (/* binding */ mix)
  10751. /* harmony export */ });
  10752. var mix = function (from, to, progress) {
  10753. return -progress * from + progress * to + from;
  10754. };
  10755. /***/ }),
  10756. /***/ "./node_modules/popmotion/dist/es/utils/pipe.js":
  10757. /*!******************************************************!*\
  10758. !*** ./node_modules/popmotion/dist/es/utils/pipe.js ***!
  10759. \******************************************************/
  10760. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10761. __webpack_require__.r(__webpack_exports__);
  10762. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10763. /* harmony export */ "pipe": () => (/* binding */ pipe)
  10764. /* harmony export */ });
  10765. var combineFunctions = function (a, b) { return function (v) { return b(a(v)); }; };
  10766. var pipe = function () {
  10767. var transformers = [];
  10768. for (var _i = 0; _i < arguments.length; _i++) {
  10769. transformers[_i] = arguments[_i];
  10770. }
  10771. return transformers.reduce(combineFunctions);
  10772. };
  10773. /***/ }),
  10774. /***/ "./node_modules/popmotion/dist/es/utils/progress.js":
  10775. /*!**********************************************************!*\
  10776. !*** ./node_modules/popmotion/dist/es/utils/progress.js ***!
  10777. \**********************************************************/
  10778. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10779. __webpack_require__.r(__webpack_exports__);
  10780. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10781. /* harmony export */ "progress": () => (/* binding */ progress)
  10782. /* harmony export */ });
  10783. var progress = function (from, to, value) {
  10784. var toFromDifference = to - from;
  10785. return toFromDifference === 0 ? 1 : (value - from) / toFromDifference;
  10786. };
  10787. /***/ }),
  10788. /***/ "./node_modules/popmotion/dist/es/utils/velocity-per-second.js":
  10789. /*!*********************************************************************!*\
  10790. !*** ./node_modules/popmotion/dist/es/utils/velocity-per-second.js ***!
  10791. \*********************************************************************/
  10792. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10793. __webpack_require__.r(__webpack_exports__);
  10794. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10795. /* harmony export */ "velocityPerSecond": () => (/* binding */ velocityPerSecond)
  10796. /* harmony export */ });
  10797. function velocityPerSecond(velocity, frameDuration) {
  10798. return frameDuration ? velocity * (1000 / frameDuration) : 0;
  10799. }
  10800. /***/ }),
  10801. /***/ "./node_modules/popmotion/dist/es/utils/wrap.js":
  10802. /*!******************************************************!*\
  10803. !*** ./node_modules/popmotion/dist/es/utils/wrap.js ***!
  10804. \******************************************************/
  10805. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10806. __webpack_require__.r(__webpack_exports__);
  10807. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10808. /* harmony export */ "wrap": () => (/* binding */ wrap)
  10809. /* harmony export */ });
  10810. var wrap = function (min, max, v) {
  10811. var rangeSize = max - min;
  10812. return ((((v - min) % rangeSize) + rangeSize) % rangeSize) + min;
  10813. };
  10814. /***/ }),
  10815. /***/ "./node_modules/style-value-types/dist/es/color/hex.js":
  10816. /*!*************************************************************!*\
  10817. !*** ./node_modules/style-value-types/dist/es/color/hex.js ***!
  10818. \*************************************************************/
  10819. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10820. __webpack_require__.r(__webpack_exports__);
  10821. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10822. /* harmony export */ "hex": () => (/* binding */ hex)
  10823. /* harmony export */ });
  10824. /* harmony import */ var _rgba_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rgba.js */ "./node_modules/style-value-types/dist/es/color/rgba.js");
  10825. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/style-value-types/dist/es/color/utils.js");
  10826. function parseHex(v) {
  10827. var r = '';
  10828. var g = '';
  10829. var b = '';
  10830. var a = '';
  10831. if (v.length > 5) {
  10832. r = v.substr(1, 2);
  10833. g = v.substr(3, 2);
  10834. b = v.substr(5, 2);
  10835. a = v.substr(7, 2);
  10836. }
  10837. else {
  10838. r = v.substr(1, 1);
  10839. g = v.substr(2, 1);
  10840. b = v.substr(3, 1);
  10841. a = v.substr(4, 1);
  10842. r += r;
  10843. g += g;
  10844. b += b;
  10845. a += a;
  10846. }
  10847. return {
  10848. red: parseInt(r, 16),
  10849. green: parseInt(g, 16),
  10850. blue: parseInt(b, 16),
  10851. alpha: a ? parseInt(a, 16) / 255 : 1,
  10852. };
  10853. }
  10854. var hex = {
  10855. test: (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isColorString)('#'),
  10856. parse: parseHex,
  10857. transform: _rgba_js__WEBPACK_IMPORTED_MODULE_1__.rgba.transform,
  10858. };
  10859. /***/ }),
  10860. /***/ "./node_modules/style-value-types/dist/es/color/hsla.js":
  10861. /*!**************************************************************!*\
  10862. !*** ./node_modules/style-value-types/dist/es/color/hsla.js ***!
  10863. \**************************************************************/
  10864. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10865. __webpack_require__.r(__webpack_exports__);
  10866. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10867. /* harmony export */ "hsla": () => (/* binding */ hsla)
  10868. /* harmony export */ });
  10869. /* harmony import */ var _numbers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../numbers/index.js */ "./node_modules/style-value-types/dist/es/numbers/index.js");
  10870. /* harmony import */ var _numbers_units_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numbers/units.js */ "./node_modules/style-value-types/dist/es/numbers/units.js");
  10871. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  10872. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils.js */ "./node_modules/style-value-types/dist/es/color/utils.js");
  10873. var hsla = {
  10874. test: (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isColorString)('hsl', 'hue'),
  10875. parse: (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.splitColor)('hue', 'saturation', 'lightness'),
  10876. transform: function (_a) {
  10877. var hue = _a.hue, saturation = _a.saturation, lightness = _a.lightness, _b = _a.alpha, alpha$1 = _b === void 0 ? 1 : _b;
  10878. return ('hsla(' +
  10879. Math.round(hue) +
  10880. ', ' +
  10881. _numbers_units_js__WEBPACK_IMPORTED_MODULE_1__.percent.transform((0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.sanitize)(saturation)) +
  10882. ', ' +
  10883. _numbers_units_js__WEBPACK_IMPORTED_MODULE_1__.percent.transform((0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.sanitize)(lightness)) +
  10884. ', ' +
  10885. (0,_utils_js__WEBPACK_IMPORTED_MODULE_2__.sanitize)(_numbers_index_js__WEBPACK_IMPORTED_MODULE_3__.alpha.transform(alpha$1)) +
  10886. ')');
  10887. },
  10888. };
  10889. /***/ }),
  10890. /***/ "./node_modules/style-value-types/dist/es/color/index.js":
  10891. /*!***************************************************************!*\
  10892. !*** ./node_modules/style-value-types/dist/es/color/index.js ***!
  10893. \***************************************************************/
  10894. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10895. __webpack_require__.r(__webpack_exports__);
  10896. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10897. /* harmony export */ "color": () => (/* binding */ color)
  10898. /* harmony export */ });
  10899. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  10900. /* harmony import */ var _hex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./hex.js */ "./node_modules/style-value-types/dist/es/color/hex.js");
  10901. /* harmony import */ var _hsla_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./hsla.js */ "./node_modules/style-value-types/dist/es/color/hsla.js");
  10902. /* harmony import */ var _rgba_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./rgba.js */ "./node_modules/style-value-types/dist/es/color/rgba.js");
  10903. var color = {
  10904. test: function (v) { return _rgba_js__WEBPACK_IMPORTED_MODULE_0__.rgba.test(v) || _hex_js__WEBPACK_IMPORTED_MODULE_1__.hex.test(v) || _hsla_js__WEBPACK_IMPORTED_MODULE_2__.hsla.test(v); },
  10905. parse: function (v) {
  10906. if (_rgba_js__WEBPACK_IMPORTED_MODULE_0__.rgba.test(v)) {
  10907. return _rgba_js__WEBPACK_IMPORTED_MODULE_0__.rgba.parse(v);
  10908. }
  10909. else if (_hsla_js__WEBPACK_IMPORTED_MODULE_2__.hsla.test(v)) {
  10910. return _hsla_js__WEBPACK_IMPORTED_MODULE_2__.hsla.parse(v);
  10911. }
  10912. else {
  10913. return _hex_js__WEBPACK_IMPORTED_MODULE_1__.hex.parse(v);
  10914. }
  10915. },
  10916. transform: function (v) {
  10917. return (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.isString)(v)
  10918. ? v
  10919. : v.hasOwnProperty('red')
  10920. ? _rgba_js__WEBPACK_IMPORTED_MODULE_0__.rgba.transform(v)
  10921. : _hsla_js__WEBPACK_IMPORTED_MODULE_2__.hsla.transform(v);
  10922. },
  10923. };
  10924. /***/ }),
  10925. /***/ "./node_modules/style-value-types/dist/es/color/rgba.js":
  10926. /*!**************************************************************!*\
  10927. !*** ./node_modules/style-value-types/dist/es/color/rgba.js ***!
  10928. \**************************************************************/
  10929. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10930. __webpack_require__.r(__webpack_exports__);
  10931. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10932. /* harmony export */ "rgbUnit": () => (/* binding */ rgbUnit),
  10933. /* harmony export */ "rgba": () => (/* binding */ rgba)
  10934. /* harmony export */ });
  10935. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  10936. /* harmony import */ var _numbers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../numbers/index.js */ "./node_modules/style-value-types/dist/es/numbers/index.js");
  10937. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  10938. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./utils.js */ "./node_modules/style-value-types/dist/es/color/utils.js");
  10939. var clampRgbUnit = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.clamp)(0, 255);
  10940. var rgbUnit = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, _numbers_index_js__WEBPACK_IMPORTED_MODULE_2__.number), { transform: function (v) { return Math.round(clampRgbUnit(v)); } });
  10941. var rgba = {
  10942. test: (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.isColorString)('rgb', 'red'),
  10943. parse: (0,_utils_js__WEBPACK_IMPORTED_MODULE_3__.splitColor)('red', 'green', 'blue'),
  10944. transform: function (_a) {
  10945. var red = _a.red, green = _a.green, blue = _a.blue, _b = _a.alpha, alpha$1 = _b === void 0 ? 1 : _b;
  10946. return 'rgba(' +
  10947. rgbUnit.transform(red) +
  10948. ', ' +
  10949. rgbUnit.transform(green) +
  10950. ', ' +
  10951. rgbUnit.transform(blue) +
  10952. ', ' +
  10953. (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitize)(_numbers_index_js__WEBPACK_IMPORTED_MODULE_2__.alpha.transform(alpha$1)) +
  10954. ')';
  10955. },
  10956. };
  10957. /***/ }),
  10958. /***/ "./node_modules/style-value-types/dist/es/color/utils.js":
  10959. /*!***************************************************************!*\
  10960. !*** ./node_modules/style-value-types/dist/es/color/utils.js ***!
  10961. \***************************************************************/
  10962. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10963. __webpack_require__.r(__webpack_exports__);
  10964. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10965. /* harmony export */ "isColorString": () => (/* binding */ isColorString),
  10966. /* harmony export */ "splitColor": () => (/* binding */ splitColor)
  10967. /* harmony export */ });
  10968. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  10969. var isColorString = function (type, testProp) { return function (v) {
  10970. return (((0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isString)(v) && _utils_js__WEBPACK_IMPORTED_MODULE_0__.singleColorRegex.test(v) && v.startsWith(type)) ||
  10971. (testProp && Object.prototype.hasOwnProperty.call(v, testProp)));
  10972. }; };
  10973. var splitColor = function (aName, bName, cName) { return function (v) {
  10974. var _a;
  10975. if (!(0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isString)(v))
  10976. return v;
  10977. var _b = v.match(_utils_js__WEBPACK_IMPORTED_MODULE_0__.floatRegex), a = _b[0], b = _b[1], c = _b[2], alpha = _b[3];
  10978. return _a = {},
  10979. _a[aName] = parseFloat(a),
  10980. _a[bName] = parseFloat(b),
  10981. _a[cName] = parseFloat(c),
  10982. _a.alpha = alpha !== undefined ? parseFloat(alpha) : 1,
  10983. _a;
  10984. }; };
  10985. /***/ }),
  10986. /***/ "./node_modules/style-value-types/dist/es/complex/filter.js":
  10987. /*!******************************************************************!*\
  10988. !*** ./node_modules/style-value-types/dist/es/complex/filter.js ***!
  10989. \******************************************************************/
  10990. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  10991. __webpack_require__.r(__webpack_exports__);
  10992. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  10993. /* harmony export */ "filter": () => (/* binding */ filter)
  10994. /* harmony export */ });
  10995. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  10996. /* harmony import */ var _index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index.js */ "./node_modules/style-value-types/dist/es/complex/index.js");
  10997. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  10998. var maxDefaults = new Set(['brightness', 'contrast', 'saturate', 'opacity']);
  10999. function applyDefaultFilter(v) {
  11000. var _a = v.slice(0, -1).split('('), name = _a[0], value = _a[1];
  11001. if (name === 'drop-shadow')
  11002. return v;
  11003. var number = (value.match(_utils_js__WEBPACK_IMPORTED_MODULE_0__.floatRegex) || [])[0];
  11004. if (!number)
  11005. return v;
  11006. var unit = value.replace(number, '');
  11007. var defaultValue = maxDefaults.has(name) ? 1 : 0;
  11008. if (number !== value)
  11009. defaultValue *= 100;
  11010. return name + '(' + defaultValue + unit + ')';
  11011. }
  11012. var functionRegex = /([a-z-]*)\(.*?\)/g;
  11013. var filter = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, _index_js__WEBPACK_IMPORTED_MODULE_2__.complex), { getAnimatableNone: function (v) {
  11014. var functions = v.match(functionRegex);
  11015. return functions ? functions.map(applyDefaultFilter).join(' ') : v;
  11016. } });
  11017. /***/ }),
  11018. /***/ "./node_modules/style-value-types/dist/es/complex/index.js":
  11019. /*!*****************************************************************!*\
  11020. !*** ./node_modules/style-value-types/dist/es/complex/index.js ***!
  11021. \*****************************************************************/
  11022. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11023. __webpack_require__.r(__webpack_exports__);
  11024. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11025. /* harmony export */ "complex": () => (/* binding */ complex)
  11026. /* harmony export */ });
  11027. /* harmony import */ var _color_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../color/index.js */ "./node_modules/style-value-types/dist/es/color/index.js");
  11028. /* harmony import */ var _numbers_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../numbers/index.js */ "./node_modules/style-value-types/dist/es/numbers/index.js");
  11029. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  11030. var colorToken = '${c}';
  11031. var numberToken = '${n}';
  11032. function test(v) {
  11033. var _a, _b, _c, _d;
  11034. return (isNaN(v) &&
  11035. (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isString)(v) &&
  11036. ((_b = (_a = v.match(_utils_js__WEBPACK_IMPORTED_MODULE_0__.floatRegex)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) + ((_d = (_c = v.match(_utils_js__WEBPACK_IMPORTED_MODULE_0__.colorRegex)) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0);
  11037. }
  11038. function analyse(v) {
  11039. var values = [];
  11040. var numColors = 0;
  11041. var colors = v.match(_utils_js__WEBPACK_IMPORTED_MODULE_0__.colorRegex);
  11042. if (colors) {
  11043. numColors = colors.length;
  11044. v = v.replace(_utils_js__WEBPACK_IMPORTED_MODULE_0__.colorRegex, colorToken);
  11045. values.push.apply(values, colors.map(_color_index_js__WEBPACK_IMPORTED_MODULE_1__.color.parse));
  11046. }
  11047. var numbers = v.match(_utils_js__WEBPACK_IMPORTED_MODULE_0__.floatRegex);
  11048. if (numbers) {
  11049. v = v.replace(_utils_js__WEBPACK_IMPORTED_MODULE_0__.floatRegex, numberToken);
  11050. values.push.apply(values, numbers.map(_numbers_index_js__WEBPACK_IMPORTED_MODULE_2__.number.parse));
  11051. }
  11052. return { values: values, numColors: numColors, tokenised: v };
  11053. }
  11054. function parse(v) {
  11055. return analyse(v).values;
  11056. }
  11057. function createTransformer(v) {
  11058. var _a = analyse(v), values = _a.values, numColors = _a.numColors, tokenised = _a.tokenised;
  11059. var numValues = values.length;
  11060. return function (v) {
  11061. var output = tokenised;
  11062. for (var i = 0; i < numValues; i++) {
  11063. output = output.replace(i < numColors ? colorToken : numberToken, i < numColors ? _color_index_js__WEBPACK_IMPORTED_MODULE_1__.color.transform(v[i]) : (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.sanitize)(v[i]));
  11064. }
  11065. return output;
  11066. };
  11067. }
  11068. var convertNumbersToZero = function (v) {
  11069. return typeof v === 'number' ? 0 : v;
  11070. };
  11071. function getAnimatableNone(v) {
  11072. var parsed = parse(v);
  11073. var transformer = createTransformer(v);
  11074. return transformer(parsed.map(convertNumbersToZero));
  11075. }
  11076. var complex = { test: test, parse: parse, createTransformer: createTransformer, getAnimatableNone: getAnimatableNone };
  11077. /***/ }),
  11078. /***/ "./node_modules/style-value-types/dist/es/numbers/index.js":
  11079. /*!*****************************************************************!*\
  11080. !*** ./node_modules/style-value-types/dist/es/numbers/index.js ***!
  11081. \*****************************************************************/
  11082. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11083. __webpack_require__.r(__webpack_exports__);
  11084. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11085. /* harmony export */ "alpha": () => (/* binding */ alpha),
  11086. /* harmony export */ "number": () => (/* binding */ number),
  11087. /* harmony export */ "scale": () => (/* binding */ scale)
  11088. /* harmony export */ });
  11089. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  11090. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  11091. var number = {
  11092. test: function (v) { return typeof v === 'number'; },
  11093. parse: parseFloat,
  11094. transform: function (v) { return v; },
  11095. };
  11096. var alpha = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, number), { transform: (0,_utils_js__WEBPACK_IMPORTED_MODULE_1__.clamp)(0, 1) });
  11097. var scale = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, number), { default: 1 });
  11098. /***/ }),
  11099. /***/ "./node_modules/style-value-types/dist/es/numbers/units.js":
  11100. /*!*****************************************************************!*\
  11101. !*** ./node_modules/style-value-types/dist/es/numbers/units.js ***!
  11102. \*****************************************************************/
  11103. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11104. __webpack_require__.r(__webpack_exports__);
  11105. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11106. /* harmony export */ "degrees": () => (/* binding */ degrees),
  11107. /* harmony export */ "percent": () => (/* binding */ percent),
  11108. /* harmony export */ "progressPercentage": () => (/* binding */ progressPercentage),
  11109. /* harmony export */ "px": () => (/* binding */ px),
  11110. /* harmony export */ "vh": () => (/* binding */ vh),
  11111. /* harmony export */ "vw": () => (/* binding */ vw)
  11112. /* harmony export */ });
  11113. /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tslib */ "./node_modules/tslib/tslib.es6.js");
  11114. /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "./node_modules/style-value-types/dist/es/utils.js");
  11115. var createUnitType = function (unit) { return ({
  11116. test: function (v) {
  11117. return (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__.isString)(v) && v.endsWith(unit) && v.split(' ').length === 1;
  11118. },
  11119. parse: parseFloat,
  11120. transform: function (v) { return "" + v + unit; },
  11121. }); };
  11122. var degrees = createUnitType('deg');
  11123. var percent = createUnitType('%');
  11124. var px = createUnitType('px');
  11125. var vh = createUnitType('vh');
  11126. var vw = createUnitType('vw');
  11127. var progressPercentage = (0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)((0,tslib__WEBPACK_IMPORTED_MODULE_1__.__assign)({}, percent), { parse: function (v) { return percent.parse(v) / 100; }, transform: function (v) { return percent.transform(v * 100); } });
  11128. /***/ }),
  11129. /***/ "./node_modules/style-value-types/dist/es/utils.js":
  11130. /*!*********************************************************!*\
  11131. !*** ./node_modules/style-value-types/dist/es/utils.js ***!
  11132. \*********************************************************/
  11133. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11134. __webpack_require__.r(__webpack_exports__);
  11135. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11136. /* harmony export */ "clamp": () => (/* binding */ clamp),
  11137. /* harmony export */ "colorRegex": () => (/* binding */ colorRegex),
  11138. /* harmony export */ "floatRegex": () => (/* binding */ floatRegex),
  11139. /* harmony export */ "isString": () => (/* binding */ isString),
  11140. /* harmony export */ "sanitize": () => (/* binding */ sanitize),
  11141. /* harmony export */ "singleColorRegex": () => (/* binding */ singleColorRegex)
  11142. /* harmony export */ });
  11143. var clamp = function (min, max) { return function (v) {
  11144. return Math.max(Math.min(v, max), min);
  11145. }; };
  11146. var sanitize = function (v) { return (v % 1 ? Number(v.toFixed(5)) : v); };
  11147. var floatRegex = /(-)?([\d]*\.?[\d])+/g;
  11148. var colorRegex = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi;
  11149. var singleColorRegex = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
  11150. function isString(v) {
  11151. return typeof v === 'string';
  11152. }
  11153. /***/ }),
  11154. /***/ "./node_modules/tslib/tslib.es6.js":
  11155. /*!*****************************************!*\
  11156. !*** ./node_modules/tslib/tslib.es6.js ***!
  11157. \*****************************************/
  11158. /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
  11159. __webpack_require__.r(__webpack_exports__);
  11160. /* harmony export */ __webpack_require__.d(__webpack_exports__, {
  11161. /* harmony export */ "__assign": () => (/* binding */ __assign),
  11162. /* harmony export */ "__asyncDelegator": () => (/* binding */ __asyncDelegator),
  11163. /* harmony export */ "__asyncGenerator": () => (/* binding */ __asyncGenerator),
  11164. /* harmony export */ "__asyncValues": () => (/* binding */ __asyncValues),
  11165. /* harmony export */ "__await": () => (/* binding */ __await),
  11166. /* harmony export */ "__awaiter": () => (/* binding */ __awaiter),
  11167. /* harmony export */ "__classPrivateFieldGet": () => (/* binding */ __classPrivateFieldGet),
  11168. /* harmony export */ "__classPrivateFieldSet": () => (/* binding */ __classPrivateFieldSet),
  11169. /* harmony export */ "__createBinding": () => (/* binding */ __createBinding),
  11170. /* harmony export */ "__decorate": () => (/* binding */ __decorate),
  11171. /* harmony export */ "__exportStar": () => (/* binding */ __exportStar),
  11172. /* harmony export */ "__extends": () => (/* binding */ __extends),
  11173. /* harmony export */ "__generator": () => (/* binding */ __generator),
  11174. /* harmony export */ "__importDefault": () => (/* binding */ __importDefault),
  11175. /* harmony export */ "__importStar": () => (/* binding */ __importStar),
  11176. /* harmony export */ "__makeTemplateObject": () => (/* binding */ __makeTemplateObject),
  11177. /* harmony export */ "__metadata": () => (/* binding */ __metadata),
  11178. /* harmony export */ "__param": () => (/* binding */ __param),
  11179. /* harmony export */ "__read": () => (/* binding */ __read),
  11180. /* harmony export */ "__rest": () => (/* binding */ __rest),
  11181. /* harmony export */ "__spread": () => (/* binding */ __spread),
  11182. /* harmony export */ "__spreadArrays": () => (/* binding */ __spreadArrays),
  11183. /* harmony export */ "__values": () => (/* binding */ __values)
  11184. /* harmony export */ });
  11185. /*! *****************************************************************************
  11186. Copyright (c) Microsoft Corporation.
  11187. Permission to use, copy, modify, and/or distribute this software for any
  11188. purpose with or without fee is hereby granted.
  11189. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
  11190. REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  11191. AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
  11192. INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11193. LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
  11194. OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  11195. PERFORMANCE OF THIS SOFTWARE.
  11196. ***************************************************************************** */
  11197. /* global Reflect, Promise */
  11198. var extendStatics = function(d, b) {
  11199. extendStatics = Object.setPrototypeOf ||
  11200. ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
  11201. function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
  11202. return extendStatics(d, b);
  11203. };
  11204. function __extends(d, b) {
  11205. extendStatics(d, b);
  11206. function __() { this.constructor = d; }
  11207. d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
  11208. }
  11209. var __assign = function() {
  11210. __assign = Object.assign || function __assign(t) {
  11211. for (var s, i = 1, n = arguments.length; i < n; i++) {
  11212. s = arguments[i];
  11213. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
  11214. }
  11215. return t;
  11216. }
  11217. return __assign.apply(this, arguments);
  11218. }
  11219. function __rest(s, e) {
  11220. var t = {};
  11221. for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
  11222. t[p] = s[p];
  11223. if (s != null && typeof Object.getOwnPropertySymbols === "function")
  11224. for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
  11225. if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
  11226. t[p[i]] = s[p[i]];
  11227. }
  11228. return t;
  11229. }
  11230. function __decorate(decorators, target, key, desc) {
  11231. var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
  11232. if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
  11233. else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
  11234. return c > 3 && r && Object.defineProperty(target, key, r), r;
  11235. }
  11236. function __param(paramIndex, decorator) {
  11237. return function (target, key) { decorator(target, key, paramIndex); }
  11238. }
  11239. function __metadata(metadataKey, metadataValue) {
  11240. if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
  11241. }
  11242. function __awaiter(thisArg, _arguments, P, generator) {
  11243. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  11244. return new (P || (P = Promise))(function (resolve, reject) {
  11245. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  11246. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  11247. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  11248. step((generator = generator.apply(thisArg, _arguments || [])).next());
  11249. });
  11250. }
  11251. function __generator(thisArg, body) {
  11252. var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
  11253. return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
  11254. function verb(n) { return function (v) { return step([n, v]); }; }
  11255. function step(op) {
  11256. if (f) throw new TypeError("Generator is already executing.");
  11257. while (_) try {
  11258. if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
  11259. if (y = 0, t) op = [op[0] & 2, t.value];
  11260. switch (op[0]) {
  11261. case 0: case 1: t = op; break;
  11262. case 4: _.label++; return { value: op[1], done: false };
  11263. case 5: _.label++; y = op[1]; op = [0]; continue;
  11264. case 7: op = _.ops.pop(); _.trys.pop(); continue;
  11265. default:
  11266. if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
  11267. if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
  11268. if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
  11269. if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
  11270. if (t[2]) _.ops.pop();
  11271. _.trys.pop(); continue;
  11272. }
  11273. op = body.call(thisArg, _);
  11274. } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
  11275. if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
  11276. }
  11277. }
  11278. function __createBinding(o, m, k, k2) {
  11279. if (k2 === undefined) k2 = k;
  11280. o[k2] = m[k];
  11281. }
  11282. function __exportStar(m, exports) {
  11283. for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
  11284. }
  11285. function __values(o) {
  11286. var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
  11287. if (m) return m.call(o);
  11288. if (o && typeof o.length === "number") return {
  11289. next: function () {
  11290. if (o && i >= o.length) o = void 0;
  11291. return { value: o && o[i++], done: !o };
  11292. }
  11293. };
  11294. throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
  11295. }
  11296. function __read(o, n) {
  11297. var m = typeof Symbol === "function" && o[Symbol.iterator];
  11298. if (!m) return o;
  11299. var i = m.call(o), r, ar = [], e;
  11300. try {
  11301. while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
  11302. }
  11303. catch (error) { e = { error: error }; }
  11304. finally {
  11305. try {
  11306. if (r && !r.done && (m = i["return"])) m.call(i);
  11307. }
  11308. finally { if (e) throw e.error; }
  11309. }
  11310. return ar;
  11311. }
  11312. function __spread() {
  11313. for (var ar = [], i = 0; i < arguments.length; i++)
  11314. ar = ar.concat(__read(arguments[i]));
  11315. return ar;
  11316. }
  11317. function __spreadArrays() {
  11318. for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
  11319. for (var r = Array(s), k = 0, i = 0; i < il; i++)
  11320. for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
  11321. r[k] = a[j];
  11322. return r;
  11323. };
  11324. function __await(v) {
  11325. return this instanceof __await ? (this.v = v, this) : new __await(v);
  11326. }
  11327. function __asyncGenerator(thisArg, _arguments, generator) {
  11328. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  11329. var g = generator.apply(thisArg, _arguments || []), i, q = [];
  11330. return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
  11331. function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
  11332. function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
  11333. function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
  11334. function fulfill(value) { resume("next", value); }
  11335. function reject(value) { resume("throw", value); }
  11336. function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
  11337. }
  11338. function __asyncDelegator(o) {
  11339. var i, p;
  11340. return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
  11341. function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
  11342. }
  11343. function __asyncValues(o) {
  11344. if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  11345. var m = o[Symbol.asyncIterator], i;
  11346. return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
  11347. function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
  11348. function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
  11349. }
  11350. function __makeTemplateObject(cooked, raw) {
  11351. if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
  11352. return cooked;
  11353. };
  11354. function __importStar(mod) {
  11355. if (mod && mod.__esModule) return mod;
  11356. var result = {};
  11357. if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
  11358. result.default = mod;
  11359. return result;
  11360. }
  11361. function __importDefault(mod) {
  11362. return (mod && mod.__esModule) ? mod : { default: mod };
  11363. }
  11364. function __classPrivateFieldGet(receiver, privateMap) {
  11365. if (!privateMap.has(receiver)) {
  11366. throw new TypeError("attempted to get private field on non-instance");
  11367. }
  11368. return privateMap.get(receiver);
  11369. }
  11370. function __classPrivateFieldSet(receiver, privateMap, value) {
  11371. if (!privateMap.has(receiver)) {
  11372. throw new TypeError("attempted to set private field on non-instance");
  11373. }
  11374. privateMap.set(receiver, value);
  11375. return value;
  11376. }
  11377. /***/ }),
  11378. /***/ "react":
  11379. /*!************************!*\
  11380. !*** external "React" ***!
  11381. \************************/
  11382. /***/ ((module) => {
  11383. module.exports = React;
  11384. /***/ })
  11385. /******/ });
  11386. /************************************************************************/
  11387. /******/ // The module cache
  11388. /******/ var __webpack_module_cache__ = {};
  11389. /******/
  11390. /******/ // The require function
  11391. /******/ function __webpack_require__(moduleId) {
  11392. /******/ // Check if module is in cache
  11393. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  11394. /******/ if (cachedModule !== undefined) {
  11395. /******/ return cachedModule.exports;
  11396. /******/ }
  11397. /******/ // Create a new module (and put it into the cache)
  11398. /******/ var module = __webpack_module_cache__[moduleId] = {
  11399. /******/ // no module.id needed
  11400. /******/ // no module.loaded needed
  11401. /******/ exports: {}
  11402. /******/ };
  11403. /******/
  11404. /******/ // Execute the module function
  11405. /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
  11406. /******/
  11407. /******/ // Return the exports of the module
  11408. /******/ return module.exports;
  11409. /******/ }
  11410. /******/
  11411. /************************************************************************/
  11412. /******/ /* webpack/runtime/compat get default export */
  11413. /******/ (() => {
  11414. /******/ // getDefaultExport function for compatibility with non-harmony modules
  11415. /******/ __webpack_require__.n = (module) => {
  11416. /******/ var getter = module && module.__esModule ?
  11417. /******/ () => (module['default']) :
  11418. /******/ () => (module);
  11419. /******/ __webpack_require__.d(getter, { a: getter });
  11420. /******/ return getter;
  11421. /******/ };
  11422. /******/ })();
  11423. /******/
  11424. /******/ /* webpack/runtime/define property getters */
  11425. /******/ (() => {
  11426. /******/ // define getter functions for harmony exports
  11427. /******/ __webpack_require__.d = (exports, definition) => {
  11428. /******/ for(var key in definition) {
  11429. /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
  11430. /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
  11431. /******/ }
  11432. /******/ }
  11433. /******/ };
  11434. /******/ })();
  11435. /******/
  11436. /******/ /* webpack/runtime/hasOwnProperty shorthand */
  11437. /******/ (() => {
  11438. /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
  11439. /******/ })();
  11440. /******/
  11441. /******/ /* webpack/runtime/make namespace object */
  11442. /******/ (() => {
  11443. /******/ // define __esModule on exports
  11444. /******/ __webpack_require__.r = (exports) => {
  11445. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  11446. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  11447. /******/ }
  11448. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  11449. /******/ };
  11450. /******/ })();
  11451. /******/
  11452. /************************************************************************/
  11453. var __webpack_exports__ = {};
  11454. // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
  11455. (() => {
  11456. /*!**************************************!*\
  11457. !*** ./src/vendors/framer-motion.js ***!
  11458. \**************************************/
  11459. __webpack_require__.r(__webpack_exports__);
  11460. /* harmony import */ var vendor_framer_motion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vendor-framer-motion */ "./node_modules/framer-motion/dist/es/index.js");
  11461. window.FramerMotion = window.FramerMotion || vendor_framer_motion__WEBPACK_IMPORTED_MODULE_0__;
  11462. })();
  11463. /******/ })()
  11464. ;